Sort along curve work but doesn't work well

hi all,
i want to use to sort a group of line, most element is sorted well, but there are some element that have problem in sorting. when i list item, some of them have different sequence.

thanks a lot

here is GH
TT-changan.gh (46.7 KB)

here is data
sort along curve.3dm (1.5 MB)

the segments are sorted correctly along the circles

the problem is that some circles are created on Planes that are rotated almost 180°, and so the start of your sorting curve lies on the opposite side:

thanks, i didn’t notice this problem on circle. However, this is not my intention to have this rotated circle. so, why this happen, and how can i solve this issue?

I think the easiest and fastest solution would be to align all the planes on which the circles are built with an external vector, for instance this aligns the planes with vector Z:


TT-changan_Re.gh (41.8 KB)

1 Like

woo, cool. That is a new tool for me as a beginner in GH. Thanks a lot.

by the way, i want to know why this happen. i think, in my script, i never rotate these specific shape. could you please give me some explanation?