I have a question that might be straightforward but has me a bit stuck.
How can I select specific items from a data tree in a particular order? For instance, if I have a 10x10x10 grid of points (totaling 1,000 points), I’d like to select the second layer of points in the XZ direction or the fifth row from the top in the XY plane. Is there a way to select branches in various patterns so I can get an entire grid (10x10 points in this case), rather than just a single row or column?
Thanks so much for helping me understand!
I’ve attached a file with a point grid, but same goes for rectangular arrays etc.
Thank you I went through a bunch of tutorials and links already, but I think I get still very confused
I haven’t found a way to control the selection order of the tree branches. The method that @ftzuk suggested (thanks a lot for that!) works well, but it currently selects branches in the XY plane. Is there a way to instead select a grid in the XZ or YZ plane?
When I try using the Flip Matrix component, it switches to the XZ plane, but only gives me a single column of points rather than the full grid.
Is there a way to apply this to boxes if I don’t have point components I can use as inputs for keys in the sort list component? I’d need it specifically for twisted boxes like the ones in this script: TBox.gh (15.2 KB)
Use Area or Volume to get the centre point and use that point. This approach works for a grid but with other geometries their centre points might overlap or not work. Try and see, I haven’t had a chance to look at that latest .GH you posted.
I tried that, but somehow it gives me very odd results—not the layer-by-layer output I achieved with the points. I’m not sure why it’s behaving differently.
It’s not behaving because a neat grid is very different to geometries that aren’t in a straight line. Don’t think you’ll be able to use the Sort Point approach for this.