Context Bake bug

Hi everyone!

I’m attempting to create a script for Grasshopper Player that generates new walls and connects them to existing ones. However, I’ve discovered that the Context Bake component appears to function only on a single object at a time.

Here, you can see two wall objects whose geometry needs to be replaced with a new one. In a grasshopper test I have two objects and two replacing geometry.

However, it only works for the single wall. Here you can see baked result from Grasshopper Player. I attempted to reverse the objects list, but they just switched their sides, and one wall remains not replaced.

I recreated simple test and tried to replace 3 boxes with spheres, so the only first being replaced:

Is this a bug or I missing something?

my first thought is that you might be missing something :slight_smile:
I’m not a superuser of the new Rhino components yet, just studying them from time to time, but if you reference one Model Object (from a layer or whatever) then you change the geometry linked to that single Model Object with multiple geometries, you of course Pushing it will repeatedly overwrite the very same model object and only the very last one will show up in Rhino

simple example, the Sphere gets overwritten by the first box, then from the middle one, then from the top one, and that is because you are rewriting the very same Model Object the sphere was:

overwrite_same_model_object.gh (12.2 KB)

posting screenshots insted of a gh file didn’t help either :smiley:

Thanks for reply

I’d share a script but there are 300 nodes which may bring more confusion, so I made simple test to recreate a problem which you can see at the last screenshot :slight_smile:

No, in my last test with cubes, I used three different objects and provided for each new geometry. The Content Cache component works well and replaces both objects. However, I can’t use CC with Grasshopper Player because it overwrites objects in real time, creating a mess. Additionally, it makes the viewport laggy since it updates each millisecond.

Sharing the simplified Grasshopper definition might help…

grasshopper-player.gh (11.1 KB)
test.3dm (3.0 MB)

Just open a rhino file and run .gh file in player

Any workaround?

I’m have never used the Grasshopper Player before.

The definition seems to only bake one object every time it runs.

It sounds to me that you need to use the content cache. Check if this works for you

grasshopper-player boxes to spheres.gh (12.5 KB)

You should not be constantly pushing in such a case. Only display a preview while the user in providing inputs for your grasshopper player command and keep your content cache at the end of the script with a simple boolean gate