Content Cache Updated Guide

Imagine all the components we would have…

I guess you are aware of the possibility to create user objects?

Yes I am, at the same time, it would be nice if you could search for these component so you don’t have to change their options as often :wink:

1 Like

My intention is to modify the location of some Rhino geometry.

I reference a Rhino curve and use Content Cache to Pull it into Grasshopper. If I just Push it back into Rhino, the GUID stays the same, as expected. ( upper blue group )

If I move or rotate the curve in Grasshopper, the GUID changes. ( lower brown group )

I realize that there would need to be some controls on the Push in order not to have the original geometry move along x at every tick. I don’t understand why the original remains unmoved and a new object and new GUID is created.

you could do it this way, but that will create a cyclic relation:

1 Like

As Gijs showed a moment before me, I think the issue here is that you are “dumbing down” the Model Object by passing it into Geometry input of the Move component, you ditch all the data about the Object and create a new one solely out of the input geometry.
If you want to keep the GUID you need to deconstruct the model object to get the geometry, modify the geometry, and construct the Model Object again.

3 Likes

The short answer is a move in grasshopper is actually a copy operation, creating a new object. In this case a simple geometry type. This is a logical necessity.

But to reconstruct the model object before the push is the key. With the passthrough components it is not too hard to just replace the geometry of the original model object. Exactly as @Czaja shows.

Just a note: there is no need to run the Model object component right before the move component, as the move component itself will convert the model object input into the necessary GH geometry automatically.

1 Like

I’ve been chasing my tail with this, and I’m not sure if its user error or a bug:

When I use Content Cache with “PUSH” set via right click, the behaviour is different than if I use the “A” input.

Specifically - in this case, I’m creating a SubD with gh and using Content Cache to PUSH to Rhino. But if I manipulate the input (“set”) crv, Content Cache bombs out and fails to display anything. But again - it is failing in 2 different ways: Null vs. “Model SubD Deleted”

What am I missing?

Why are there two Cache Components?
Is the original SubD referencing a Rhino object?

We may need the definition and 3DM to see what the logic path is.

I was just showing that using button-Push vs. input-Push results in different outputs, but I had 2 realizations:

  1. The button-Push is a momentary switch, not a toggle, so you have to push it each time you want to “Push”

  2. The input-Push needs to be similarly re-triggered (I think?). However, even when I did this I couldn’t get it to work.

However - today, on a different computer, I’m not seeing the issue, so I’ll dig into my system settings and report back if I find the culprit.

It looks like you are trying to keep it alive for constant updates, but then are looking to send a momentary purge into the system to reset?

Also check exactly which version of rhino is running on both machines. Service releases have subtle improvements in them.

Yes - I’m basically using it just as a preview (with the ModelObject Display set to “Locked”) because regular preview wasn’t working with HumanUI windows. HumanUI outputs a boolean when the window closes and that triggers the purge.

I will verify SR#'s. Thanks Scott!

OK - here is a more thorough description of what’s happening. I’m using (8.13.24292.13001, 2024-10-18).

I have a .gh file that makes a SubD Multipipe using input curves. If I just run the .gh definition, I can change the curves and SubD updates in the Rhino viewport as expected.

If I use the ScriptEditor to publish this .gh file, the SubD does not update when I move the curves (although when I bake it, I do get the SubD from the changed curve). Attached is the raw .gh file and the resulting .yak file.

Note - I’m using Content Cache as a fancy preview tool, because my understanding is that standard CustomPreview doesn’t work with published .rhp’s. I’d be happy to use some other less-complicated solution for preview, but I feel like I DID have this working fine until a recent update.

Thanks in advance for any help!!

UPDATE: When I run this .rhp on my work machine (also SR13.24292.13001) it behaves as expected… Adjust the curve and the SubD updates. So weird. Should I start another thread to avoid hijacking this one?

simplemultipipe-0.5.25434.9064-rh8-any.yak (38.1 KB)
Multipipe.gh (20.5 KB)

There must be something very basic I am missing, but I cannot seem to get it.

I am baking some geometry and using that new geometry for more steps, in this example starting with the “References” on the right. Some simple geometry, some imported meshes, etc. I am live modifying the Rhino geometry with Grasshopper.


I cannot find a way to connect the left side, baking, to the right side, references to actual geometry. I can only do it manually, line by line “set one curve”.

Below canvas shows the state when the button is pressed, when lifted the GUID returns to null.

This is the function that I am using to modify with the Rhino geometry curves after referencing.

Stuck on this, thanks for advice.

I am a bit confused why use Bake in this case? The button is throwing a True on press down and a False on the way up. So the True Bakes the object, which is promptly forgotten by the component as Bake does. But the False Bakes nothing and therefore updates the Result to a null, as nothing was baked with the False input.

A Push on the other hand, pushes the object on the down true press. But on the False up release it continues to track the object it created. Therefore the results continues to send out the Result.

1 Like

As Scott said, I’m really confused by this example as well. Are you basically trying to have three orthographic lines to be rotated a small amount each time it’s baked, but update it’s position? Maybe something like this?

RotatingLines.gh (15.7 KB)

1 Like

@declan Would you mind testing the upcoming Rhino 8.13 SRC next week? There was a bug with content cache that would not run inside a command made from a Grasshopper definition. We also made good improvements to how previews are drawn for published commands and components

1 Like

By previews do you mean graphics previews such as the Custom Preview component will now work if nested inside a command that uses a gh component? If so that’s exciting!

Andy, thanks for the clear explanation, that is what I needed!

The “air gap” between baking and locating by query is the key. I need each axis broken out on its own and centered on zero, the resulting working modifications:

The context of this “building axis step”, is intrinsic transformations of objects via an external dial box. The axes are rotated around each other, with momentary cyclic dependency, and the geometry is then oriented to the 3 axes.

Thanks for the answer.

3 Likes

Yup. So the change is that for the most part embedded GH definition will draw its own previews. I’ll document these today and will share here.

3 Likes