Updating objects in the Rhino document from Grasshopper

I’m wondering if grasshopper could edit Rhino objects directly instead of going through “Baking” workflow each time.

One example where this would be useful: splitting surfaces and deleting their selected parts. Grasshopper has a lot of sophisticated selection methods that could help quickly clean up the document. I think that it would make switching between Rhino-Grasshopper much easier.

I’m really interested in technical details of why it wasn’t added at the beginning and perhaps even more if we could still add it? For example, an option to edit reference geometry “in-place” right next to the usual “Bake” menu entry.

this is a complex topic :slight_smile:

about just the possibility of GH editing_replacing rhino objects, for instance by using the Elefront -> Bake while providing the originals object name will replace each rhino object with given name by the ones being baked

but this implies 1:1 relation one object being replaced by one single object

1 Like

Thanks for mentioning Elefront, I need to try it out and see if any obvious pitfalls pop up on their own

Im searching for this feature along time. I wanted to update existing objects in Rhino without baking, which is making a copy then. Finally i found a way using C# script component with the CommitChanges() method.

Scaling Example

private void RunScript(List<Guid> Guids, double Factor, bool Commit, ref object A)

      foreach(var guid in Guids)
        var rhObj = doc.Objects.FindId(guid);

Use Params/Input/Object Details to get the Guids of your seleted objects
and Params/Input/Button to toggle between true/false

This scales an existing object preserving all other attributes like layer, name, etc.
Hope that helps

1 Like

I’ve been working on this during the past couple weeks and finally getting some progress.
Not quite sure if my goal is exactly the same as described on this topic, but it looks very similar and the process is the following:
1- get the objects with the pipeline component to automatically select them
2- using a scrip to hide selected objects while computing changes in grasshopper
3- using another script to replace the objects with the new ones keeping the original atributes
By other hand, I’m using grasshopper player to share these with the rest of the team and now the problem comes when repeating the process several times on the same session, the Hide (python script) starts to fail after a few runs while the computer memory keeps increasing with large definitions to a point that we need to restart Rhino to work smoothy again. The search continues…
The positive aspect is that using this process only throught the grasshopper definition it keeps running well over and over again!

1 Like