algorithmic modeling for Rhino
Hi all,
How would you arrange this data tree :
{0;1}, {0;2}, {0;3}, {0;4}, {1;1}, {1;2}, {1;3}, {1;4}, {2;1}, {2;2}, {2;3}, {2;4}
into something like:
[{0;1}, {0;2}, {0;3}, {0;4}], [{1;1}, {1;2}, {1;3}, {1;4}], [{2;1}, {2;2}, {2;3}, {2;4}]
So then I can do operations separately within each group...
Tags:
Hi Roger,
The square brackets represent a single list?
If that is so, then use "Shift paths" component.
If you use "shift paths" with the default input of -1 it will remove the last index, leaving you with a tree that is {0}, {1}, {2}. Then, after you perform your operations at that level (so long as your elements then remain in the same order as when you shifted paths) you can re-apply the original data structure using the "unflatten tree" component:
Use the [Split Tree] component with some masks, such as: {0;?} to get all of the first branch etc.
Also read http://www.grasshopper3d.com/forum/topics/datatree-selection-rules?...
Try:
{A;B}(i) --> {A;i}
also, if you have Tree Sloth you can use the "flip last matrix" component, which swaps index for the last non-uniform path index. You'll have to join "Milk Box" to get it...http://www.grasshopper3d.com/group/milkbox/forum/topics/tree-sloth
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by