Create a ranking of points according to an order

Hello, I am trying to create a ranking of points from bottom to top then progressing from left to right

1/ I tried with list.reorder and ranking x then y (without success)
2/I adopted another method with a mesh that works, I control the positioning of the point in a mesh

My question is the following, can we manage n (density of the mesh with a loopwhile), or you recommend increasing n manually (if loopwhile not possible)

I am attaching screen script and script so you can get an idea
script: 02 octobre pour ├ęcole.dyn (79.3 KB)


Hi @christian.stan ,

To sort your points by X and then Y you need to group your points first by X.
To do this use the node List.SortByKey and List.GroupByKey right after each other, the List.SortByKey is also needed here to make sure your points are actually sorted by X and not only grouped by X.

Then to sort them by their Y-value use the List.SortByKey node again but now use the Y-values as keys. Just make sure you are working at @L2 here.


got it,
no need for loopWhile, targeted efficiency.

Thank you Mr. Daan.

1 Like