Sort Curve List by Index Midpoints Along Sort Curve (not working)

Typically I would take a point on the curves, deconstruct them, and sort the curves by their X, Y, or Z component. However, in this case, I’m looking for a linear sorting along a curve that is not parallel to the axis. I’ve use a “Sort Along Curve” component to sort the points. But then the point indices don’t seem to sort the original curves. This should work I think.
lines bw curves.gh (183.2 KB)

My current gh script::

This is the correct sorting of points, but the curves don’t follow suit:


lines bw curves_2021May7a.gh (184.0 KB)

1 Like

Thank you for this solution Joseph.
I also realized I could rotate the entire geometry to be easily sorted. And use the rotated geometry to sort the unrotated geometry.

This is the solution I arrived at: