How to make 'Selected' breps selectable in Rhino

Hello all, I am trying to find a solution to what appears to be a very simple problem.
I have a script that searches for Breps of a particular type / size, and highlights them in Grasshopper. what is the simplest method of actually selecting these within Rhino, so they can be deleted? I thought I might be able to bake and then select duplicates, but this only works on items on the same layer (I think), meaning it is impossible to then search for the items once baked.

Any help gratefully received!


Hi @aleclitchfield,

If I understand correctly, you have a way of selecting breps that you want to delete. How about inverting the selection process to fetch the breps that you want to keep, and bake those into rhino?

You could apply properties from the original objects while baking, you’ll end up with exact duplicates, then it will be easy to find them and remove at once.


you are right. Its simple, just not without coding since it violates a bit against Grasshopper logic. This simple script will select any RhinoObject by its id. This probably works only for V6, since finding Rhino objects slightly changed.

Anyway. You will need to reference geometry by its “Guid”. You can simple retrieve the geometry from a RhinoObjects Guid by plugin a “Geometry” Component.

Hope this works for you: (3.3 KB)

Edit: Be aware of the fact that Grasshopper works with Geometry, but not with Rhino objects. The process of “baking” means attaching Geometry to a new Rhino object. Grasshopper usually doesn’t directly deal with Rhino objects. The moment you load a brep with the brep component, the moment you loose connection to its RhinoObject. This is why you need to keep the id and filter them based on what the geometry is, does or whatever.
Usually Grasshopper works like this: get a copy of the geometry, do something with it and end with adding new Rhino objects (baking).


Thankyou for all of these responses, all work great.