Exploding Polygon such as grasshopper

Hi, I want to know how I Explode Polygon to use line and point separately in Python,
I think at first I need to change polygon ToNurbsCurve()
But I cant.

Hello sailor!
Have you tried explode, shatter or discontinuity components?

Best regards,
Sir Ernest Shackleton

sorry, I want to do this process in Python.

If you are trying to manipulate something in Rhino, you can use either of the following:


Else you can use ghpythonlib.components.Explode(), iirc can’t remember the exact library.

Thank You for responding, but for exploding in this way I need to change polygon to curve, such as picture. I cant change Polygon to curve.

The error in the line 11 RotateObject

You can simply use ToNurbsCurve method of Polyline object:

Diana.gh (13.1 KB)

As @AndersDeleuran once pointed out to me, if you have a polyline, you should just use GetSegments.

This way you don’t need to convert and also the result will be the lines, not “Line-Like Curves”.


Thank u All Dears, it worked