Solid from 3D polyline (projection on curved surface)

I’m trying to project list of curves on a curved surface, and then extrude projected curves by Z vector to create a solid geometry.
But I got stuck on joining curves to the polyline/closed curve after that projection.
Do you have any ideas what should I try/do next?

Here is capture of my script.

Topography_Most_Wysepki_Projection.dyn (79.6 KB)


What does the error say?

@jacob.small The error says that polycurve may be branching, but it is not. I have “Check for null geometries” part of the script, and it cheks if closed cruves have any break/overlay in the loop. That part checks after translation of the geometry, so idk what the problem is.

Also I have tried to use PolyCurve.ByJoinedCurves without flatten list, but whatever if I choose list lvl or not it does not want to join curves into one loop.

Would need the relevant part of the cad drawing to be certain where the issue is, but I have yet to see a case of the node reporting branching when it wasn’t so. Can you make a single polycurve of the items (with no overlaps) using AutoCAD? Note that any points folding back onto itself will cause a failure, or any 3 curves coming to a single location, or a disconnected line segment (one bad click in AutoCAD).

@jacob.small thanks for your interest and sorry for late answer. I have been away from PC for a while. As I have said before, part of my script was created to check if ther is any overlay or any other mistake made in CAD file. Group “Check for null geometry” is responsible for that. However it does not find any errors in dwg file. I have attached dwg, rvt and dyn files. I do not know where should I look for the problem.

Bridge.rvt (1.6 MB)
Roads_test.dwg (42.9 KB)
Topography_Bridge_Projection.dyn (79.6 KB)

So… no issue with the CAD file, but process you’re using in the graph is causing an issue with branching.

If you disable all geometry preview prior to the Curve.Project node you’re able to easily see where the issue lies:

The three points coming together in the lower right corner is a no-no for a polyline. This leaves a bit of a conundrum. I’m assuming you only want these curbs on the ‘walking’ surface of a bridge. If so you could go through the process of finding surfaces which have a normal close to the Z axis, but why? You already have to select the element in Revit, so I’d just grab the vertical surface like this:

You also need a flatten node after the projection, as your data structure runs into some issues otherwise. Didn’t need to make any other changes to the graph in order to make the Dynamo solids for the layer you selected with List.ItemAtIndex early on. To do the “_Linia_Tramwajowa_projection” layer I did need to add a ‘group curves’ node in after the List.Flatten node though, as you have two separate loops there. That is likely a good add to the graph in all cases as it will allow you to process lists of shapes better.


Ohh crap… So that was the problem… Seems logic that prejction node has made curves on every possible surface of the selected element.
Lame that I didn’t think about switching off visibility of bridge geometry :sweat_smile:
Thank you @jacob.small for solution :slight_smile:
Ps. I had used “group curves” node but it was replaced with “Get.List.Item” to find out where the problem is. Anyway, again thank you so much for your help :slight_smile:

1 Like