Polyline3D to Surface


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.


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


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.



@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.

hello Mzjensen
If I understood correctly, if you have a Surface in Dynamo, you cannot export it as such to Autocad? … I am with a case similar to the one exposed to this post. I am generating surfaces that will later serve me to make cuts in solids, therefore, I only need surfaces with 0 thickness (the mesch I think will not help me). So I’m testing with the option that you say with Topology.Faces and Face.ByGeometry, but the result is an infinity of faces that will not serve me later to make cuts. Is there a way to put those faces together? Another question I have is that surfaces cannot be created through 3D polylines? only Polysurface. ?

I don’t know of a way to do this with the current Dynamo nodes. I think you’d have to use AutoCAD commands like CONVTOSURFACE and UNION to merge all of the faces together, which will not be dynamic.

Thanks for the reply.
Another doubt…:
How a Dynamo Surface is translated to Autocad’s Surface. Object.ByGeometry doesn’t work, right?


Is there a way for it?

It may be that you already thought of this, but what about bringing the solids to dynamo too ? and use the dynamo surface to do the cuts ?

I already found the way, thanks for the answer. What I did is transform the Tinsurface into a polisurface and that helped me to create another solid, which at the same time served to subtract from the first solid.