Selecting Alternating Columns of Points

I have a point grid and I’d like to make a dimensional shift on alternating columns. For example, every even column will be shifted 1 unit up and every odd column will be shifted 1 unit down. I can achieve this by making a point grid, exploding the tree, and selecting alternate branches manually, but this method will break down if I change the X extents of my grid (adding more columns that would need to be manually selected).

How can I select alternating branches of data from the point grid’s tree? For example, I want to select all branches {0;0;X} where X is an even number.

Thanks!



Shift Points.gh (18.1 KB)

Have a try Split Tree.

Shift Points_re.gh (15.2 KB)

2 Likes

Shift Points_re.gh (12.0 KB)

1 Like

Thanks, this is perfect! The syntax of the Mask input for Split Tree is what I was stuck on with that approach. This is a very clean solution.

Follow up question. What would the Mask syntax be to select only the first and last columns or the first and last rows?

There are several ways and Tree Statistics is handy here in this case…
You can also try to use plugins like treesloth.
And it would be better to check “data tree selection rules” first.




Shift Points_rev2.gh (23.8 KB)

Cool. I’m a little confused by the syntax for branching and splitting, but Treesloth accomplishes exactly what I need.