I’m working in C# with Rhino.Net SDK building commands for a plug-in.
I’ve picked up the user’s GUI-selection of a MeshFace with MRhinoGetObject, via
MRhinoGetObject go = new MRhinoGetObject(); ... ... (filter for mesh face) IOnMeshFaceRef pFace = go.Object(i).MeshFace();
, now I need the (IRhinoObjectRef) reference to the parent Mesh of that selected Face. (I need it so I can later do a context.m_doc.ReplaceObject() ) I thought it might be something like:
IRhinoObjRef origMesh = go.Object(i).m_parent_geometry; – or some cast of that or similar,
but its not. I have no trouble getting (a copy of) the parent mesh itself by
OnMesh mesh = new OnMesh(pFace.m_mesh);
, but I don’t know how to get an IRhinoObjRef of that.