Create a polyline from multiple curves

I want to create a cross-section to sweep along a rail. I am defining the curves that make up the cross-section from Lines and Arcs and I want to join them into a PolylineCurve so that I can use Brep.CreateFromSweep(Curve rail, Curve section). How could I do that?

Hi @Christos_Tsaridis,

How about calling Curve.JoinCurves?

– Dale

1 Like

Hi @dale,

JoinCurves returns a Curve array while I want to have a single Curve object to pass to CreateFromSweep. I am experimenting with PolyCurve right now, might be able to solve this with that.

Hi @Christos_Tsaridis,

if your curves join nicely, the resulting array will have a single element, which you can then pass to the sweeper.

– Dale

Oh, I didn’t know it worked like that. I will definitely try that thanks for the help!

Something to improve in the documentation?