organize grid.gh (14.6 KB)

Hello everyone! I have a grid of 4 by 4 breps and Instead of having them flattened in one list, I would like to have them organized in one tree with one branch for each column. How can I do that?

This can be a way of doing it.

Rounded X and Y coordinates of center points, then partitioned by count of set members in X, and lastly sorted by Y.

With the scale factor you can control the â€śrounding snapâ€ť, so this can even tolerate some level of misalignment and/or rotationâ€¦ but not much.

Work safer with simple orthogonal grids.

organize grid_re.gh (16.8 KB)

1 Like

Thank you so much!!

Use â€śFlipâ€ť component (to flip matrix) of the tree (out of â€śSrfâ€ť component in this example).

Note that it is best if you create the geometry as a tree to start with, rather that incur the overhead to sort it. I cases objects are not parallel to xy-plane, the solution might not work, etc.)

1 Like