Replacing Rhino Geometry
If you've ever made a semi-automated workflow where users interact with Rhino directly—say by editing or inputting data manually—then you’ll know that sometimes that Rhino file becomes the source of truth.
The challenge then becomes how do you update the geometry through Grasshopper without overwriting the user-inputted data already in the file?
That’s what this week’s script is about.
The most obvious approach is to create the geometry and then use a script to copy data from the old object to the new one. But actually the Rhino API allows us to just update the geometry of an existing Rhino object. The user data, layer info, material assignments all stays untouched.
Rhino objects aren't just geometry
Each object in Rhino isn't just geometry. It’s a full container, with properties like material, layer, and user data. So when you “bake” something, you're not just putting geometry into Rhino, you're creating this container which includes the geometry.
That means, to update the geometry, we just have to use the API to replace the geometry part.
This script does just that, supply the ID and it will replace the geometry
property of the object.

In practice
Rhino files aren’t typically treated as a single source of truth, so I get that this might feel like an edge case.
To show how it works in context, here’s how I have used this in a real workflow:

Here, we just needed to update the geometry while leaving the rest of the model untouched. And this approach made that simple.
Want to Try It?
You’ll find the script and a short write-up here: Replace Rhino Geometry
Let me know if you’ve built workflows where you treat Rhino as the “source of truth”, I'd love to hear how you’re doing it and if this approach could make your life easier.
Happy scripting,
Braden