Sorting points

Help with sorting points into groups. In the video, I showed one list, which must be combined into groups of points depending on their number, for further combining them into a polyniny. That is, as many groups of points, as many polylines.
Thank you!

have you tried Sort Along Curve ? (13.1 KB)

please upload a grasshopper file with internalized geometries to get help on your specific case

Thanks for the quick reply.
I’m trying to connect points that are close to each other.
Here are the working files.

Sorting (22.9 KB)
Sorting points.3dm (546.3 KB)

flipping the central curve / reversing the A output of Sort List allows you to reverse the order/direction of the polylines

Sorting (30.1 KB)

Interesting solution, here is my solution, it is a little longer than yours. I wonder if it is possible to combine the created curves with each other if the distance between them is less than the “X” value.
thanks for the help