Sort rectangle list by location

Hi there!
I’m trying to sort a list of rectangle by rectangle’s center point (y and then by x)

from this:

to that:
6 7 8
3 4 5
0 1 2

sort_rectangles_list.gh (10.5 KB)


sort_rectangles_list_re.gh (10.6 KB)

1 Like