When I join a collection of lines that form a closed polyline, then explode the polyline and do the same thing again each time the order of the lines in the curve is shifting.
So the last one instead of being joined to the previous segment is joined to the first one and becomes the first instead. I tried the Preserve direction toggle but it had no effect.
I also tried writing a custom sequential joining script but in the end, it again joins the last segment to the beginning.
Thanks. But what if the segments are aligned and there is no discontinuity? I need to have all the segments exploded and after joining I need to preserve the initial order.
Here you go. This is a simplified thing just to show the difference. I needed the segments in the end not the polyline in the exact order as before. The grouping did it.