algorithmic modeling for Rhino
Hello everyone,
I am looking for a way to split a data tree by the first index of the branches.
My data is in the format {1;0}, {1;1}, {1;2} .. {2;0}, {2;1}... {3;0}, {3;1} ...
So now I want to split the tree so that I have one tree with all the branches with 1 in the beginning, all the ones with 2 and all the ones with 3. They have differing numbers of branches for each index.
I can easily get a true/false pattern for each branch, but would need something like dispatch for branches rather then items. Or maybe if Tree Branch component could take a wildcard, where I can look for {1;*} for example.
Tags:
Hello Armin,
you can try the following,
but if branch lengths are different, or tree has many branches things get tedious. So there is this discussion where David Stasiuk provides with a c# that works for more complicated scenarios.
best
alex
Thanks Alex,
actually the example in the red box works fine for this purpose. The number of the first indexes doesn't change, only the number of branches. Good to know the Split component accepts a wildcard!
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by