C#: How to Highlight derived Rhino objects?

After picking some edges I derive some other edges and objects (surfaces, points etc) in my code, and I would like to highlight some of them. But how do I do that?

For example, how do I highlight the following object (fixed_edge) which was not selected by the user? :

// ...
Curve fixed_edge = match_brep.Edges[opposite_index];

// Rolf

I think you should refer to the original RhinoObject, and call RhinoObject.SelectSubObject(ComponentIndex,bool,bool)

In the ComponentIndex struct, you can set the type of subobject (edge) and the index (opposite_index).

Don’t forget to call doc.Views.Redraw() :slightly_smiling_face:

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_DocObjects_RhinoObject_SelectSubObject.htm

If you search for SelectSubObject or SubObjectSelect in the RhinoCommon docs, there are many other hits as well

1 Like