Problem with loading back CustomMeshObject in a block

Hello,

We use our customized Rhino.DocObjects.Custom.CustomMeshObject class for display purposes.

Rhino doesn’t save these as CustomMeshObjects (but simple Meshes), and it is OK after loading the file the plugin can convert them back to our CustomMeshObject type.

we do it like this:
doc.Objects.Replace(objRef, cust);

and it works fine.

But in case the CustomMesh object is in a Block definition, Rhino can not replace the mesh to our CustomMesh class, and it can be disturbing for the users.

Is it possible to improve this situation?

Márton

@dale - could you help me maybe?

Hi @marton.parlagh,

What is special about your custom mesh class? That is, what is it used for?

– Dale

We have same procedural objects like MaxwellSea and also Maxwell referenced geometry - to display these under Rhino.

It works nice in case the meshes are not inside a block…

Hi @marton.parlagh,

Yes, I understand. Unfortunately, the custom object support in RhinoCommon isn’t where we want it to be. The solution is to implement custom objects in C++, or just attach user data to RhinoCommon objects and custom draw them with a conduit as needed.

Let me know if you need more details.

– Dale

Hello Dale, thanks for the answer.

Is there a plan to improve this area in the future, or it is better to go in a different direction?

Márton

1 Like