algorithmic modeling for Rhino
Hi,
I am fairly new to Grasshopper but have been getting along fairly well from some of my previous coding experiences (they were minor). My biggest problem is not the generation of data, but more so the management of data in grasshopper.
I am having problems practically creating data trees. I am trying to build the data represented below, but I do not now how to add all of this data together. Basically, as I generate the geometry starting with room data it becomes one room, which are lumped together to create one floor, which are lumped together to create the building.Also, the only thing that is defined is the data within the room, everything else will be parametric based on sliders and use input.
My questions, is how can I build a data tree like this? I can see all the tools for cleaning, flatten, trim, reducing trees etc, but how do I simply build the tree in the first place?
Thanks in advance
Tags:
Hi Ryan,
"previous coding experiences" Does this mean you're looking for ways to create such data trees programmatically (I.e. VB.NET, C# or Python)?
Assuming not, then it's hard to answer this fairly generic question. It should be possible to create the data in such a fashion that this automatically works. If this is difficult or not possible to achieve in your particular case, there's ways to modify data trees, the [Path Mapper] and [Replace Branches] being the most flexible components short of writing VB/C# code.
It seems you need to create a layout that looks like this:
{A;B;C;D}(i)
where A is always zero, B indicates which building, C indicates which floor, D indicates which room and i indicates which piece of roomdata. Or maybe I'm reading your image wrong and you're actually looking to even separate the roomdata into individual branches. Of course you don't need the leading zero, but that's the only way you'll get the image you posted.
If I were to very naively create a definition that
I'd end up with something like this:
With the strategic placement of Graft components and tags I'm able to recreate your data tree with fairly minimum fuss. This is relatively easy because this is exactly how Grasshopper is supposed to handle data. The whole point of the {A;B;C;...;X} thing is to keep a history record of where data came from.
Now if you don't have the option to (re)structure your file, then you'll have to resort to changing your data trees to match expectations. This can be much (really much) harder. But for this I'll need to see what you do actually have to work with. Are all your rooms in a single honking list? Do you have one list of rooms per building and only need to divide them into separate floors? Or....?
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi David,
Could you explain how you would do this programmatically in C# as you mentioned? I am having trouble with how to initialize and work with the "GH_Path" part of the tree structure.
Thanks!
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