I can't find Counter in Kangaroo

I can’t find a counter in Kangaroo and I can’t make Anemone work the same way. Basically I am using the Human component to bake in some sublayers, that use the input layers as the parent. Then I bake some geometry onto those layers. Problem is if you do it all in one step the layer for the geometry gets messed up cause it is computing for both the layers and the geometry at the same time and sometimes the geometry gets there before the layer has been created. If I recompute the problem disappears, but I would like to make a super definition that doesn’t need that step. I wanted to use a counter that counts how many times you pushed the bake layers button and then if it is greater than 0, pass through the geometry data. Seems simple, but I can’t figure it out.

Definition attached.
Sheet Labeler.gh (40.1 KB)

Post with internalized geometry please.

Typically if everything is branched well you can iterate with Anemone with the split tree component.


Try to Install
Kangaroo Physics 0.099 version you will find counter component.

Do I have to remove Kangaroo 2 ? For some reason I can’t get it to load.

Please don’t install the old version of Kangaroo just for this. A counter can be a couple of lines of C#
counterscript.gh (3.0 KB)

edit, and here’s one that uses a button to trigger each step:


counterscript2.gh (2.4 KB)

Funny I have exactly the same issue right now with the Human bake component and looping. It just seems it doesn’t like it if you have bake constantly set to true and then run a loop. I always somewhere in there have the same thing baked twice in a row.

If you do it manually step by step it works fine, but it seems like even though the bake component is placed right at the end it doesn’t follow the execution order properly if it is set to true during the recalculation of the whole graph. Unfortunately there is no concept of triggering an event at a certain point, only that of recalculating once something changes or you recalculate everything.

I seem to remember that old versions of Firefly used to have components that can trigger bangs and also had a counter, but it seems like most of the components in Firefly have disappeared over the years.

Could it be that giving Bake Geometry or Place Block an output that can then do something it would work better @andheum?

It almost seems like it triggers the Bake, which happens in Rhino and the loop already recalculates everything before it has finished, because it does it immediately after Bake is triggered, but not necessarily after Bake is finished in Rhino.

If Bake Geometry and Place Block had an output that would do something like just switch to true when done, then we could hook something up to that, say just a panel and the loop would have to “wait” till that part is done and only then trigger the next iteration of the loop. Could that work?

This is what I am doing. I bake the layers with a button. Then once the count registers <0 (Layers are baked) It lets the parts pass the though to bake the geometry.

Cool, I will try that and probably go for something more manual like you have. Looping is awesome, but I have noticed it doesn’t play so nicely with a few nodes, especially those that trigger (with a button) something in Rhino, which some of the more specialised plugins do.