algorithmic modeling for Rhino
I want to group my definition lines to certain Layers when I bake. But it seems that what ever I do, I always get these Layers:
Default
Layer 01
Layer 02
Layer 03
Layer 04
Layer 05
And I can only choose one layer of these to bake definition in.
On the end of my definition I have 8 "Line" components, which I connected to the "Data" parameter, and then bake it.
Now, I want to group certain of these lines into particular layers, this is why I tried to use the "Group" component to group certain "Line" component before connecting it to the "Data" parameter and baking it. But this did not work.
How can I achieve this?
Tags:
This website has a lot of baking scripts for the C# component that might help you out.
It seems the second script component is the one I need.
But I dot not know how to use it :(
You can download it as a grasshopper file, and I imagine just plug sliders and strings into it. I don't think you need to write additional script. Unfortunately, I'm not good with scripting either. Otherwise, I'd walk you though it. Surely, others on the board can help you out.
Good Luck!
I know this Michael.
But I want to bake up certain part of my definition into 5 different layers.
This means that each time I want to bake some of these certain parts of my definition, I need to get back into the Rhino and change the Layer.
I was wondering if there is an automated process to do this directly from the Grasshopper.
Hi Djordje,
this is a simple version of the definition posted there. Is shows how to bake to specific layers. It's enough to give each object a corresponding layer name.
The "group" feature is mostly used in the Set and Transform menus at present as far as I know and is not directly accepted by "normal" components.
You might be interested in experimenting with Data caches, they should be useful in your case. The only current limitation is that they cannot change cache name dynamically, but only through direct input.
I hope this helps,
- Giulio
_____________
giulio@mcneel.com
McNeel Europe
Thank you for the reply Giulio.
But I do not understand you. I need to connect each of my "Line" components output to the "object" input of the "bakeAttributes" component? And then how can I know which of these Lines of mine will be baked under which Layer?
Hello again Djordje,
maybe we need to take a step back and look at the standard way Grasshopper manages inputs.
In the script component we have two used inputs, say G (geometry) and L (layer names).
If list G and L have the same length, by default (longest list) the first element in list G goes with first element in L, second with second, third with third, etc.
Then, if one list is shorter, the last possibility in any list is used with all unpaired elements of the other. Say, 3 circles and 5 layer names. Then all circle will be baked once, except the last circle will be baked three times to be paired with layers #3, #4 and #5.
If there is only one layer and 4 circles, then all 4 circles will end into the same layer. The last possibility is repeated as long as necessary: this is no exception to the rule.
Finally lists of lists (trees): if trees have the same structure, lists are used in the way specified above but only branches with the same path are matched with each other.
I normally suggest to use this pairing logic as last resort.
So, ultimately, you need to order geometry or layer names in a manner that will result in the correct pairing logic, given the standard input management outlined above.
I hope this helps. And if you post a definition, even a small one, I will try to assist with it.
- Giulio
_____________
giulio@mcneel.com
McNeel Europe
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