CustomMeshObject & SetMesh

Hello,

I don’t understand how to use SetMesh in a CustomMeshObject (And probably also CommitChanges).

Do you have an example that explains this?

thank you, jmv.

To clarify.
I’m generating a set of LOD meshes and I have an ObjectPropertiesPage to set the current LOD of a Rhino CustomMeshObject.
Now I would like to keep my CustomMeshObject but dynamically change Geometry.MeshGeometry data
All my attempt gives exception or empty geometry.

Ref:

Hi @kitjmv,

I think you’re better off not using a custom mesh object. Just add some user data to your mesh object. Then create a conduit that looks for mesh objects that have your user data. When found, have the conduit draw the mesh in any manner is chooses.

– Dale

Bonjour @dale ,
thank you for your reply

Is there a way to inject control points into the selection process so we can snap to vertices of a “virtual” mesh (Draw with conduit) ?

jmv

Hi @kitjmv,

If you are doing the point picking with a GetPoint object, then just add your snap points using GetPoint.AddSnapPoints.

– Dale

Hello @dale

Thank you for your reply.
Unfortunately, this involves creating personal commands.
I wanted to know how to insert this object into standard Rhino commands (Curve, Box, …)
A simple conduit has the same effect as the Grasshopper preview, an object without interactions.

Do you have an example of using Rhino.DocObjects.MeshObject.SetMesh?
What are the terms of use? What do we need to do before/after for this function to give the desired result?

jmv