Arrange points by x and y and create tree for each row

Hi, is there a component that can do this in grasshopper? or is there a plugin that anyone is familiar with to do so?

say for a list of points (for example these points are all under {0}, how can i seperate them into trees {0;*} or {0},{n+1} based on the x and y as shown below?

sorry i should have been clearer, what im trying to say is that im trying to convert those points and assuming its all in a single list, break it down into seperate trees according to x and y

Have you looked at this?

The result is one tree with multiple branches containing horizontally sorted points.

Is that not what you’re looking for?

If your points are neatly aligned on their rows, then use my method:

If they’re more roughly lined up, use @inno’s variation, which follows in that thread.

If they are in order, it would be “Partition List” to get your blue rows, and “Flip matrix” to get your red columns. All in the link I sent.

1 Like