algorithmic modeling for Rhino
Hi all,
I think I have a pretty good understanding of trees, but I'm blanking here.
Given a tree:
{0},{1},{2},...,{n}
I have identified branches (for example) {25} through {32} and {62} through {69} that I want to remove and replace with whatever. How do I do that? The trees line up as needed, it is simply taking branch {30} from tree B, and shoving it into tree A instead of the current object/value at {30}, if that makes sense.
Thanks!
-BC
Tags:
Thanks Matt.
This seems like a somewhat labour-intensive approach in having to check the branch numbers, go back, update sliders, check they are correct, update when it changes, etc.
Is there a way to pull out the branch number of first and last branches for each, then use that as the dynamic input for split tree as above? Would that be the path deconstruct ?
To follow up, I've been reading further into tree path selection rules here:
http://www.grasshopper3d.com/forum/topics/tsplit
While its certainly a much more roundabout way of approaching it (and much more GH-native scripting intensive) I think this would actually give me the variable approach I'm looking for, as I can couple it with the [First/Last] component to get the specific tree branches I need and produce the correct paths automatically.
Will update further.
The sliders were just a simple way to show you can dynamically change the input of a splitting mask. If i am doing things dynamically i am usually plug-in the numbers in from somewhere else in the code as well and not from sliders
This should better explain all the Things you can do with tree split.
http://www.grasshopper3d.com/forum/topics/datatree-selection-rules?...
You should use Tree Statistics. It will give you the paths of any tree. You can then use Tree Branch to get those paths and it lets you either keep the original branch numbers or renumber them. I have found you can do most things like that by working on the branch numbers like any list with partition list, cull index, etc. then get the 2 lists of branch numbers, get the branches and just merge them back together.
Could you attach your gh file, then I can show you.
Woops - I wasn't refreshing this page, thanks for the further replies all!
Looks like it worked as expected. The [clean tree] / [tree stat] was able to identify the key branches, and a [tree split] removed them from the main tree structure, to be replaced by the same edited surfaces from the identical tree elsewhere. (in this case, it was a surface trim based on a if/and statement from the original tree of surfaces).
Image attached.
Much appreciated all,
-BC
Don't have access to GH currently so will have to explain in writing, will try and make a quick gh example later.
From looking at your last image, if you zoom in on the clean tree and press the + button that will appears and plug the input you currently have into the Tree Split component this will remove the branches from both the tree structure will nulls and the tree you want to replace branches in.
So no need for the tree Statistics or tree split as the output of these can come from the synchronises tree on the clean tree component.
This is great referance for all the ZUI components http://www.grasshopper3d.com/photo/zui?xg_source=activity
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