Baking single geometry in different states

hi,
this might be a silly question:
Is it possible to bake the same geometry at different states?

For example, here we have a circle with a slider for the Radius.
Would it be possible to automatically ‘capture’ it for every odd radius and end up with 5 concentric circles in Rhino?
I’m suspecting bake geometry does that but I don’t know if and how…
I know I can just define 5 circles and bake them, or change the slider and bake 5 times, but this is just a simplified example.
In reality I have a much more complex definition and it would be very convenient to just ‘capture’ it.

thanks!

Use an anemone loop to change the radius and trigger the bake boolean.

1 Like

Instead of using a slider, use the Series component to plug in a series of numbers. When you bake it, you will bake all the different versions of the circle at the same time.

I know I can just define 5 circles and bake them

He asked for a step by step way. I assume he probably has a lot of geometry. Baking one by one in an automated step process can often complete faster than all at once via lists.

Understandable. Is it really faster? I assumed that recalculating 5x version calculating 5x the amount of numbers would be the same.

Really depends on the geometry. The speed comes is two ways with a kind of step by step process.

1: There is only ever one version there at a time in gh memory, after it is baked it is discarded in gh and the next version is there (as opposed to say having 1000 geometries present in gh memory at once) - You might have so many geometries at once that RAM runs out or you hit the ceiling. Doing one by one you will just keep using the amount of RAM more or less for one geometry.

2: The baking, baking can take very long when you try to bake a lot at once, again depending on amount and type of geometry.

For a few circles a list def makes the most sense, but he said the actual thing he has is more complex.

1 Like

hahaha,
I appreciate your interest guys but don’t over-analyze it!
I had a complex transformation for a (very complex) curve and wanted to capture it for every 10 degrees of a full circle so I wanted to avoid baking it 36 times. (also, because of it’s complexity it only worked with a single input-I would have to spent time to make it list-proof)
anemone worked out fine!

just learn scripting and build such a very custom functionality by yourself. There are so many special cases, where a generalised component or plugin would be nonesense. Baking is nothing more as adding geometry to your current Rhinodocument (RhinoDocument.Objects.Add(someGeometry, someObjectAttribute))

1 Like

tomtom,
I’ve already started slowly scripting, but it has a long learning curve and I’m aftaid It will decrease (in the short-term) my productivity more than I can afford right now.

which language did you chose, I may help you out

c#
I followed P.Fotiadis advice, as according to him it’s the most universal and versatile.
But I’m still at the level of constructing single points (yeaaah what a triumph!!!)

1 Like

stateBake.gh (5.7 KB)

(Rhino 6)

2 Likes

Heeeyyy!
you cheated! :slight_smile:
I don’t want to be scrutinous (because after all you’re helping me!)
but you created the tweened lines and then baked them!
what I was talking about is having a single entity and bake it in different states according to a list of parameters
(that’s why I used the example of the radiae)
(the problem was a non-tree-proof definition that didn’t work with lists as an input, and instead of debugging it -which would take a lot of time- or manually baking it for the different values of a single input, I wanted to find a way to automatically bake it for different -single- values.)

Nevertheless, as I said to the other guys, it was a one-off problem that’s been solved. I’m going to study your script and I think it will help me understand one or two things about coding.
thanks!!!

oh my fault, this however is even more simple:
stateBake3.gh (3.2 KB)

It’s about time I made the transition to R6
(I must put the crabs out of my pocets and upgrade! hahhaha)
but it surprises me that scripts are not backwards compatible…
it means the architecture of gh has changed(?)

1 Like

yes it has, some methods regarding layering changed

try to replace the -1 with true or eliminate that argument

Try

while(true){
HopeDiesLast(ref when, ref where, ref why);
if(!why) break;
}

1 Like

If(alive)
PoteDenThaPethanoume(KoyfalaNekrothafti)
else
(DoesntMatter)

Holly Cow … as the fella in the Full Metal Jacket said: you talk the talk but you walk the walk as well.

Screen%20Shot%20080

just need somebody to keep throwing hand grenades at me for the rest of my life!