Explode Curve RhinoCommon


I have a curve that has discontinuities but when I explode it, I still get a connected curve. Is there any way to force curve explode within discontinuities?

I am using this command:
Curve segments = x.DuplicateSegments();

The Grasshopper explode comments gives me good results, any idea what is the code behind?

code.gh (13.7 KB)

If you bake your curve, you’ll see that its a polycurve with 4 segments.

If you want to further “explode” the curve, you’ll need to split the NURBS curve at discontinuities.

– Dale

1 Like

Thanks Dale, I managed to find the solution, just following PeterFotiadis post C# explode curve like Rhino explode & GH explode component(with recursive true)