Content Cache Updated Guide

Wonderful, that’s great to hear, thank you!

1 Like

@michaelvollrath

2 Likes

Really great, thanks @eirannejad for hooking that up. Opens up a lot of possibilities!

1 Like

4 posts were split to a new topic: Reading multiple files Grasshopper 8

Maybe a warning is required in the docs for this?

“Warning: messing around with content cache could remove geometry from your existing rhino layers!”

I guess this system goes against my previous intuition on how things in GH are separate from things in Rhino. I’ll need to spend more time reading the docs, but just wanted to post about how scary it was realizing that all my nicely organized layers in Rhino no longer contained my geometry after experimenting with pushing a cache.

1 Like

I recognize and sympathize! The content cache component is super helpful in my Rhino/GH scenario. I especially use the push function so my model and drawings continually update. I also like the part where I can change things in the rhino model and then query the geometry back into GH and work with it, while still keeping my part numbers and such.

All that said I know the stress of suddenly misplacing a bunch of geometry ha! For me its usually a data tree mistake, so I’ve been leaning toward using more separate content cache components and fewer entwine components. That makes it easier for me to locate my errors quickly.

2 Likes

Hi @scottd . I have a question why does Content Cache update even with null as input? It is confusing, I was expecting it to literally “do nothing”. But it still eats some computational time. Is it intended like that?

@kike knows the exact details to this.

But, I suspect the result is still pulled in that case. Remove the result from being visible and see if that changes this.

My guess that is a large mesh sitting in there?

2 Likes

Yes is exactly what @scottd explained.

In case you have R output connected to something it should still return the resulting cached items to the rest of the graph.

If you remove the output it should not compute it.

1 Like

Although the “R” was previously not connected to anything, removing it helped. Now the “null” state works as expected. Surprisingly it still works even after displaying the “R” output again… Thanks for your suggestions. Petr

Doesn’t matter if is connected or not, the component avoid computing it only if is not present.

How can I modify an object attribute like color after i just bake them?

I am modeling this shapes to be building floors, all controlled by user attributes, but I’d like to change their use value, so that when I change it the color sets to red, for example. The problem is that I’m not able to pull the new attributes I’m writing on them once I bake the floors…

250826 Analisis volumetrico de eficiencia (huella).gh (25.1 KB)

push pull analisis.3dm (998.2 KB)

Hi Johan,

I’m not quite following what you are trying to do.

You can get the usos values like so..

You could also create a filter to get a particular set then change its value & color

What I’m trying to achieve is a workflow where I could model and bake a building from a boundary curve, creating the breps of floors and embedding user attributes, like use and price/m2. Everything looks good until I want to change this attributes and assign a new user attribute, not from gh, but from rhino. I’m not able to read this new hand inserted values in grasshopper. I’m doing this to have the freedom in rhino to classify whether a floor is an office, commercial or whatever and generate a color to identify it (this part of coloring is no problem).

The other challenge I see is that, if I go to change the shape of my initial boundary, all my user text assigned shapes will go back to “desconocido” (unknown) as this is my default value for use. Is it possible to retain this objects values? or I will have to do some magic to order my past user values?

In the past I’ve done this long script to this by slicing breps and embedding this attributes to them in order to have all the data structure, but this time I would like to recreate and test how much interactivity I can achieve through content cache.

I actually got inspired by what tools like Arco are doing. At first I thought you could just change the overall shape of the building with one curve, but after testing it again they actually assign a different boundary shape to this new use. So that if you want to change the shape of the building you will need to redo this new boundaries apart. I think I’m asking to much bc I know there are limitations to object permanence workflow (Or maybe not enough time to code that deep).

Retaining information means that the object pulled needs to be the object that contains the Userdata. In the case above a extrusion is made, then pushed/pulled. By that first PUSH/Pull, the Model object also comes with a ObjectID. So any later push will be an update to the object. Then Userdata is created on the Model object in GH. That object, now with an ID and Userdata would need to be pushed into Rhino.

If I understand the problem here, you probably need more then one content cache. It is important to remember that the object manipulated in GH is not the object in Rhino. It is content Cache that Sync the two objects.

So the simplified definition on the top here uses the two content caches to update the information.

logic may have to follow this:

Create geometry > Push/pull to get an ID > Change anything on the object > Push/Pull to update that object.

On another note, On the Content Cache component the Result output is an automatic Pull. I might wire directly to that:

1 Like

I managed, but now is cycling :smiling_face_with_tear:

If I use the button this wont happen, but I really like that the pushing happens realtime.

Sure, I think because they are both on automatic it may create a loop. We could look closer to that and see why it it is looping. I know there is code in there to try and limit looping.

But, what is the purpose in this case? To the left of the first Content cache is a set of components to create the geometry. Why, is that first Content cache needed?

In this case it seems a single Cache at the end would work?

The first cache push the geometry and embed the user text values

Once this geometry is in rhino I can write what use I wish this to be.

Then I push this new colour choosen by the type of use values. In this case: “desconocido” and “office”

I want all this to happen without the need to push the button.

I am not on my machine right now for a few days but If you use a Query Model Objects component to get object via layer and have a constant push at the end of your script it will not loop and it you will be able to edit the user text in rhino. It will add that seamless functionality you are looking for, I am using it for a similar purpose - coloring blocks according to a function.

1 Like