Sorting Curves bound by polygons

I have trouble sorting a set of curves bound by polygons. After using the Point in Curves component, I some of the curves are missing. I get 9,9 and 10 curves in each branch instead of 10,10 and 10.

Sorting (85.8 KB)

One way which kind of works is this:


Another way is do collision test with boundary and polylines…

Sorting (88.9 KB)


Oh this is clever. I had no idea it even existed :smiley: Love it!!! Thank you once again!

After seeing this message when opening your file:


I see nothing when the file is opened… After sorting through the code, the simplified version looks like this to me: (147.3 KB)