Any reason why my AddMesh() fails while ReplaceMesh works?

When I do this:

Rhino.RhinoDoc.ActiveDoc.Objects.Replace(meshTag.ObjRef.ObjectId, Sculpting.activeMesh);

it works and the old mesh got replaced.

But when I do this


it doesn’t work and the AddMesh() method returns with an empty Guid.

Make sure your mesh is valid before adding to the document.

Beyond that, we’re going to need a working code sample that we can run here and that replicates the behavior you describe.


– Dale