Polyline3D to Surface

Hi

I have a skript in Dynamo that generates a lot of Polyline3D objects in a dwg-file.
Some of them, like the marked green line, i want to extrude to Surface object in the dwg-file like the grey surface (handmade).

Is it possible?

How do I proceed?

Thanks in advance.

Hi,

To work with objects from the dwg in Dynamo, you need first to select the objects (by layer for example or all objects of a type) and bring them to Dynamo (since you are working with polylines, try the Object.Geometry node).

After you have the Dynamo representation, you can perform the geometry operation that you want. For this you need to expore the nodes on the Geometry/Surface section of Dynamo (for example creating a surface by loft).

Finally you can send the objects back to the dwg using the Object.ByGeometry node

Hi

Thanks for the answer.
Wish it was that easy. In any case, it does not work for me.
If I add Object.ByGeometry to the Geometry_Surfaces sample…

…it generates nothing in the drawing.

can you share files ?

I start with the adjusted Geometry_Surfaces sample file.
It should work on a empty Civil3D file?
Geometry_Surfaces2object.dyn (65.2 KB)

Hi @hnha,

In this case Object.ByGeometry will not work because the Dynamo object type (PolySurface) that you are trying to pass back to AutoCAD does not have a corresponding AutoCAD object to “convert” to. Dynamo works as a standalone application, so it has a lot of it’s own native geometry types. This doesn’t necessarily mean that all of those object types will map directly back to AutoCAD.

Following are the AutoCAD geometries that can be created from Dynamo geometries, to my knowledge. I won’t say that this list is exhaustive; I definitely could be missing something here. The formatting I’m using is [Dynamo object] -> [Node] -> [AutoCAD object]. Bold text means that the node is not available OOTB and is part of the Civil 3D Toolkit package.

Arc -> Arc.ByGeometry or Arc.ByThreePoints -> Arc
Circle -> Object.ByGeometry -> Circle
Face -> Face.ByGeometry -> 3D Face
Hatch -> Hatch.ByGeometry -> Hatch
Line -> Object.ByGeometry -> Line
Mesh -> Mesh.ByGeometry -> Polyface Mesh
Polyline -> PolylineExtensions.ObjectByGeometry -> Polyline
N/A -> Polyline3D.ByPoints -> 3D Polyline
Solid -> Object.ByGeometry -> 3D Solid

So back to your original question…I would try first creating the surface in Dynamo, perhaps using Curve.Extrude. From there, you could either use Topology.Faces -> Face.ByGeometry or try to convert the extruded surface to a mesh and then send that to CAD as a Polyface Mesh using Mesh.ByGeometry.

2 Likes

Hi

@mzjensen, thanks for the reply. Good information.
I’m working on this but I haven’t found a solution working for me yet.

Why do you need a surface in the dwg ? Can a solid with a small depth work ? Because it would be much straight forward to create.
If you want a surface, would a tin surface serve your needs ? This is simplified, but you can imagine creating cogo points at a certain interval or along the surface if needed too.