Update Rhino Objects position through Grasshopper

Is there a way to move native Rhino Objects through Grasshopper and retain connection in the definition? It is a bit tricky for me to even describe it and use proper nomenclature.

In the definition shown in the video I am using Instant Bake component from Flex Hopper plugin but it is not quite the effect I want to achieve. I want only one Curve which position is controlled by the Grasshopper, but at the same time, it is a native Rhino Object which I can edit with Rhino tools.
Later on, this moved and edited curve will be referenced in GH to control other things (can be referenced by Geometry Pipeline).

przesuniecie z bake.3dm (30.2 KB)
przesuniecie z bake.gh (3.3 KB)

1 Like

20200102 MoveIt!.3dm (20.7 KB) 20200102 MoveIt!.gh (7.4 KB)

2 Likes

Just a minor note: you can simply connect the ID component to a geometry parameter to get its ID - no need to go and copy that information from the Details... in Rhino.
image
-wim

1 Like

Thank you very much :slight_smile: ,
It brings some problems, if I change shape of the curve it is treated as a kind of a movement. I think it is not worth investigating right now and I found good enough solution - Replacer from Heteroptera Plugin.

image

In my definiton I used the center of the curve’s bounding box as its “characteristic” point, because after each move, Rhino/GH doesn’t know where its original position is. To fulfill your requirement, I may use a point, which moves along with the curve, to mark where the curve’s origin is.

20200102 MoveIt!.3dm (21.4 KB) 20200102 MoveIt!.gh (39.8 KB)

1 Like

Hi @gankeyu. I came across this thread when I was trying to find a way to control rhino geometry from grasshopper. I was wondering how you would orient a brep from a start plane to a movable end plane?

I have no real knowledge of coding, so have come up against a bit of a wall. I was able to edit your code to do what I want for the first iteration, but then I don’t know how to update the start plane to equal the end plane for the next iteration (when I move the Target Surface) - I’m sure it’s a fairly simple ‘for’ loop - but it’s beyond my current knowledge.

Where I got to.

2021-10-20_Orient_Rhino_Brep_to_Plane.3dm (3.0 MB)
2021-10-20_Orient_Rhino_Brep_to_Plane.gh (10.1 KB)

@Czaja which version of Heteroptera is this component?

I’m not sure because my post is quite old. Currently, I got Heteroptera from 2021 and this component is called “Replace Objects”. You can find it in the Utilities section.

Hi @gankeyu,

Thanks for your script, I have zero knowledge in coding. May I know how do I make your c# script work with a list of guids? I’m trying to move multiple rhino guids with different vectors.

Do you have rhino 8?

Hi @scottd,

Not right now no. May I know if its doable in Rhino8?

Hi -

In Grasshopper in Rhino 8, you can update a Rhino object’s position, yes.
-wim

@wim Could you elaborate on how to update a Rhino object’s position through Grasshopper in Rhino 8 a bit more? What components should I use to achieve this? Thanks.

Query model object, some filtering, then translate and finally cache the model object….

Look at this topic:

Thanks a lot, Martin!!
The explanation about Conte Cache from Mcneel sounds very confusing…
I read it again and again, but I feel still confused.
Thanks again !!

Yes, just like @martinsiegrist said.

The Content Cache guide is quite long and detailed. Here’s a concise version:

Content Cache Guide (Rhino 8.8 Release Candidate Required)

Important: This guide applies to Rhino 8.8 Release Candidate, which is for testing only and not recommended for critical projects. To access it, subscribe to the Release Candidate update stream (Windows/Mac).

What’s New?

The Content Cache component now allows Grasshopper to interact with Rhino objects more efficiently by replacing objects instead of duplicating them.

Key Features:

  • Push: Send Grasshopper objects into Rhino without creating duplicates.
  • Pull: Retrieve Rhino objects into Grasshopper for updates.
  • Bake: Permanently add objects to Rhino (creates duplicates).
  • Purge: Remove objects from Rhino if they are not in use.

How to Use:

  1. Find the Content Cache Component in the Rhino Toolbar.
  2. Push Objects into Rhino by clicking the button on the component.
  3. Pull Objects into Grasshopper to modify them later.
  4. Automate Actions by exposing the Action input and using Boolean values or predefined action names (Pull, Push, Bake, Purge).

Performance Tips:

  • Hiding the Result output can improve performance by reducing unnecessary pulls.
  • Minimize the number of Push and Bake actions, as they are computationally expensive.
  • Limit the number of Content Cache components in large models.

Advanced Features:

  • Cache Names help organize objects and versions.
  • Branch Names create structured layers in Rhino.
  • Content Details Component provides insights into cache states.

For more details, refer to the Model Objects Guide
Rhino - Object Attributes in Grasshopper.

Can we see the definition you have so far? Generally, run an object through content cache and it will update the object in Rhino each time it runs.

This is the simplest defintinon to see how it works:

Of course there are more details depending on the specific behavior you are looking for.

1 Like

Hi, Scott
Here is the definition. It works perfect so far.


Capture

So you got the interaction you want? Great, good to hear it is working for you.