Align all closed curves to one direction

Hello, I have a list of closed curves and I am trying to get them all in one direction. It does not matter which one but all must be in one direction. The flip curve is not working because they are closed curves Do you have any idea, how will this work?


Align all curves to one direction…gh (113.5 KB)

Hi @RANE

I converted the curves into surface and I analyze the normal vector in order to detect those curves with different direction.

I hope that is what you are looking for!

Align all curves to one direction. Answer.gh (338.0 KB)


Align all curves to one direction_2024Mar7a.gh (121.4 KB)

P.S. Simplified.


Align all curves to one direction_2024Mar7b.gh (120.4 KB)

Just in case somebody needs an alternative way using this small UserObject from Food4Rhino: Curve Counterclockwise | Food4Rhino


Align all curves to one direction…gh (117.9 KB)

1 Like