How to create a polyline from a conduit selection

Hello, I am trying to create a poly line form a run of conduit, however I cannot seem to connect the endpoints to the start points of the next segment in the sequence. I have tried creating a line.bystartpointendpoints and then reversing the start and end points but it just draws the same lines (the conduit lines) regardless of how I connect the start and end point nodes. what gives? I am trying to find a way to connect the lines (because the conduit fittings will not come in). into a poly line so that I can create an extrusion from it. Can anyone help me please?

Assuming that the curves you have already extracted are running in a uniform direction (start to end, start to end, etc along the conduit direction) then you can reassemble them in order to create a Polycurve.


If they are not let me know and I can look at that workflow also. :grinning:

Have you tried a Flatten node after the List.FilterByBoolMask, and then a Polycurve.ByJoinedCurves node?

@jacob.small The Polycurve.ByJoinedCurves node doe’s work if the curves are already joined without gaps. Otherwise in a test file Im getting the “Curve join produced more than one WIRE in PolyCurve” error.

Here is a workflow that allows for any input curves having their vector (start to end direction) in the opposite direction than the intended Polycurve. There is a node in #lunchbox that does this also.

Can you try something like this. Not sure on the structure on your list. you may need a shift list somewhere. sorry saw you post on the way out the door and did not have too much time to look it over but I think this will work.

Ah! Didn’t realize that the curves weren’t connected! Good catch @Ewan_Opie!

Hi guys, thanks for all your replies! However, I dont really see a difference in what you are doing to what I already did. Unless I am missing something. The problem is connecting all the conduits together as a line in a logical sequence. The conduits are separated because in the model they are connected via fittings, which do not return a centerline. (for reasons unknown!) so I cant just create a polylinebyjoined curves because none of them touch. Unless, I can somehow use the fittings and extract their center lines?? Ewan, I thought your second post was on to something using the nurbs curve to sort the points for me, however, all it is doing is creating some spiral of death for me. I must admit I dont understand what you are doing exactly with the point at parameter and sort index by value nodes, but I understand the concept. I just dont see it working.

Edit: I did notice that your and my list structures are diffferent in the list.transpose node, but I dont know why. Could that be the culprit?

It’s a little redundant but you need to get the location (conduit) and geometry (fittings) to get all the curves. Then you can join them.

3 Likes

Thanks Nick! I was trying to mess with those arcs and extract them. looks like I was just missing the fact that I needed the lines that were connected to them. Didnt understand what they really were until I saw your script. Looks like they were the tangent ends that the conduit fittings has built into them. Haha I was trying to find a way to build my own tangent ends! let me see if yours works!

Edit: Jackpot!!