Mesh mesh0;
using (GetObject getMeshAction = new GetObject())
{
getMeshAction.SetCommandPrompt("Please select a mesh");
getMeshAction.Get();
getMeshAction.EnablePreSelect(true, true);
ObjRef meshref = getMeshAction.Object(0);
RhinoObject meshobj = meshref.Object();
mesh0 = meshobj.Geometry;
if (!(meshobj.Geometry is Mesh)) RhinoApp.WriteLine("No mesh has been selected");
}
return Result.Success;
I am trying to get a Mesh from Rhino and have it run the Mesh.ClosestPoint(Point3d) Method.
But on this line:
mesh0 = meshobj.Geometry;
I cannot turn RhinoObject Class into Mesh Class.
Will be super grateful if you guys can show me how to do that?