Catenary component randomly flips direction of the curve

Hello everyone,

I recently found an issue with gh catenary component. It flips a curve, so the start point becomes the endpoint depending on the points’ positions. Is there a way to overcome or fix this bug?

Windows 11
Rhino version 7 SR19
(7.19.22165.13001, 2022-06-14)

Please find a file with an issue below!


Catenary (8.0 KB)

I just tried your file, and confirm that the problem exists. I guess the only way to solve this would be to check which direction it’s facing, and if it changes to to flip it.

You can do this by determining the vector between the 2 points, before and after the curve is created, then calculate the dot product between the 2 vectors.

If the dot product is negative, flip the curve.

Catenary (13.5 KB)

1 Like

Thank you @richard.aubin,
This does help!