algorithmic modeling for Rhino
I cant for the life of me figure out how to replace a branch of a tree.
Lets say i have a tree
{0;0} n8
{0;1} n8
{0;2} n8
{0;3} n8
{0;4} n8
{0;5} n8
And i want to alter the data in {0;0} n8 and {0;5} n8 I can easily retrieve a specific tree branch, then modify the data, lets say to each have 6 items in their list instead of 8. the end resut i want is:
{0;0} n6
{0;1} n8
{0;2} n8
{0;3} n8
{0;4} n8
{0;5} n6
But i cant seem to get the "replace branch" componet to work
In reality i have a tree that consists of 108 branches, so exploding the tree and entwining (which is my normal work around) is impractical
any help is appreciated!
Tags:
ReplaceBranch renames the branch index. If you had a branch {0;0;0} and wanted to have {0;1} instead, this would be your component.
For your problem: you normally have a logic, that is flexible enought to handle zero input. Say you want to delete the first and last item in the list. Then your logic could pass 0 and [listLength-1] in your branches {0;0} and {0;5} and use those for a CullIndex. For branches, you want to leave untouched, just pass no values.
I think i understand what your saying. But for my specific problem, im not trying to eliminate items in the list, i am taking the {0;0} n8 and completely changing the items in the list.
Thanks Phillip, I couldn't figure out how to make that work.
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