Drawing custom mesh


#1

Hello,

Im working in a class inherited from CRhinoObject to Draw a custom Mesh in Rhino. but when i try to Redraw i get the next error:
CRhinoDoc::AddObject obj->Geometry() is NULL.

Then i tried to create Geometry(void) method and returning my m_geometry member, but again i got that error.

Can you help me understand why i can’t draw my object? I’ll keep trying.

Thanks in advance.


(Dale Fugier) #2

Is you m_geometry member something that is derived from ON_Geometry?

In general, it always best to derive custom objects from existing object classes. For example, if you are trying to create a custom mesh object, it’s best to derive from CRhinoMeshObject, etc.

Other than this, we’re going to need more information to be helpful. Sample code might be helpful.