Arrange lines clockwise rotation

Hello!
I want to arrange a group of lines in order to get the consecutive, as it could describe the contour of a polygon in clockwise rotation. The lines or segments came from a polygon, but have been split at specific lengths, and for that reason I do not want to use the join component, because it would change the number an sizes of the segments. I would appreciate any idea

arrange_curves.gh (9.8 KB)

arrange_curvesb.gh (9.8 KB)