Sorting two sets of curves (one to another)

I have two sets of curves. the white ones and the red ones

the white ones are orderes in rows and coloums
the red ones are randomly ordered

I would like to get the red ones into the same order as the white ones.

I tried deconstructing the white ones and sorting them. i can manage to get them to the same order. but now they are only ordered by rows and no more colums (if this makes sense :wink: )

but i just want the same order as the white ones

anyone have an idea??


There are all sorts of ways. If you already sorted the white lines based using the Sort Points component, you can get the top points of the red lines, sort points again, and then use List Item on the curves with the indices output from the sort points component.

Another way would be to get the bottom points of the white lines and use the Closest Point component to the top point of the red lines. This will give the index of the closest point which you can then use this with List Item, as above.

Its best if you could upload your gh definition, internalising any geometry referenced from Rhino.


i did not sort the white lines. it is created a grid took the points moved them on the z axis and created lines. so they are in the order of the grid component

sorry to not have uploaded the lines right away:

sorting two sets of (9.7 KB)

The second version with closest point did the job

1 Like