C# explode curve like Rhino explode & GH explode component(with recursive true)

I am trying to explode a curve into it’s segments like Rhino and the Gh explode component does. For the most part polycurve.Explode(); and curve.DuplicateSegments(); works but in some cases doesn’t get all the segments I would expect. I thought using polycurve.RemoveNesting(); before the polycurve.Explode(); would atleast work but seems to get the same result whether I use it or not.

Is there some way I am missing or is the way to go like @DavidRutten explode components recursive option. In which case what is that option doing? splitting at discontinuities?

I did find this old discussion (4+ years ago). Is this still the way to go? Any advice would be great.

Find attached the curve in question and gh file:
CurveExploding.gh (13.8 KB)
PolyCurve.3dm (391.4 KB)

2 Likes

Indeed David’s stuff is the way to go. See attached:

Curve_explode_V1.gh (18.7 KB)

4 Likes

thanks Peter!
P.S. I am on the side of “Who Cares?”