I’m trying to convert a code snippet (by clement) from Python to C# (see code below). After spending an hour searching the RhinoCommon API I got nowhere.
The problem I can’t get my head around is how to get the “HighligtedSubObject” indicies from the Mesh (starting from the id or from the Mesh).
The Mesh
type doesn’t provide with the UI stuff, and I don’t understand how I can get hold of the RhinoObject
(from there I guess I can get the Mesh via Geometry, but that’s another story) based on the id, although it seems so trivial to do in the Python code below :
if not id:
return
obj_ref = Rhino.DocObjects.ObjRef(id)
obj = obj_ref.Object()
comp_indices = Rhino.DocObjects.RhinoObject.GetHighlightedSubObjects(obj)
The C# equivalent to the above, anyone?
// Rolf