Organize list of points by y-value

Hi all,

I would like to organize the list shown below into a tree with a branch for each unique y-value. So, items 0 through 7 are one branch, 8 through 15 are the next, and so on.

I’ve attached the relevant files for reference.

Thanks!

image1
split list.gh (12.7 KB)
U-V swap curves.3dm (175.6 KB)


split list_2021Mar24a.gh (31.6 KB)

Same result, much more simple:

If you reverse the list you will get the opposite direction on the y. Can be done with Z and X also.

and you will need this plugin:

Tree8.gha (27 KB)

Also do not quite understand what you are trying to do, but I think it could be done simply.

You could make it parametric so that as you adjust the x or y values the branches automatically sort into corresponding rows etc…

The problem is very similar to this one (below), a common pattern:

In distilled form, the problem is that I have a list of points and in some cases, there are multiple points with the same X and Y coordinates, differing only in Z.

‘Create Set (CSet)’ is used to get a list of all the unique X/Y coordinates by zeroing the Z value. In this case, out of 303 points there are 178 unique “columns”.

To get a list of the points in each column, do this:

this works really well, thanks so much!

thanks for your solution! This is just one part of a larger script, and I’m trying to avoid adding too many plugins as the finished script will get passed around a bit, but I will definitely download for my own personal use, it looks awesome.