How to explode a polyline in a certain order?

Hi everyone,

I would like to know how can I explode a polyline or a polycurve in clockwise or in a counter clock wise order ?

Thank you in advance

If your curve is a planar one and closed, then use Flip Curve.

1 Like

Just reverse the list of segments? Check out this thread from five days ago:

Just reverse the list of segments?

then the segments will still be oriented (start/end points) in the original way, but just order is reversed, if that matters.

I mean something like this.

4 Likes

“Clockwise” depends on your viewpoint.

If you want clockwise as seen from top view in XY, and you expect to need to do this often, do the following:

  1. Draw a rectangle in rhino in the top viewport. Use the “dir” command to make sure it’s clockwise (It very likely won’t be until you use dir to flip it.)

  2. Create a flip curve component in Grasshopper.

  3. Click in the guide curve input to the flip component, select “set one curve” and pick your rectangle. Then internalize the data.

  4. Connect a “cluster input” component to the curve input of the flip component. Don’t connect one to the guide input. Connect cluster output components to both outputs. Then make all of this a cluster, and name it “clockwise XY”. Save it to user objects.

I’ve done this for all three planes and for straight lines on the x, y and z axis, to flip lines toward the positive side unit vectors. It might seem silly and overzealous but because I work with a lot of orthogonal geometry, it saves me time and layout space.

Update: what @HS_Kim just showed you is basically the same thing I’m suggesting, but all inside Grasshopper and much more illustrative of the concept. Also, he adds the option to go clockwise or counterclockwise, which is nice.