Bug in Grasshopper Script

Combining curves and keeping the logical sense is very random.
Similarly, creating plans from a point can give different results.
And I don’t think we have to trust.
You must keep the references to the plan and sort the points on this plan.
The SortPoint component gives incorrect results because it does not accept any tolerance.
So you have to sort the dots yourself.

Flipped_Curve_bug-01-SortPoint.gh (14.9 KB)

That would indeed be my advice, It’s much faster and more reliable, because you directly get the points you need.
But this is only for this example, I do not know if it is suitable for possible other input.

-Willem

Well … (I work with R5 mind) if you want an approach on that (via C#) post here an indicative case that is rather more “general” with regard Curves, Curve ops (bool and/or other), Curve clustering with regard Orientation(s) etc etc. This in real-life has a big importance when you attempt to properly offset Curves/Polylines (convex and concave).

That said for closed planar (to tol) Curves there’s Methods to check the orientation against a Plane and/or a Vector. If on the other hand Curves are open … this becomes (general case) a puzzle that may (or may not) have a solution.