I’ve subclassed CRhinoMeshObject and have it working on a basic (it displays correctly). But I want to completely override the wireframe for the object, so I can provide my own curves during display instead of the dense mesh wireframe.
How can I do this? I overrided GetWireframeCurves() but it is never called. I can land in Draw() but I have no idea what to put in there. I want it to render the same as it does now, but with my own custom wireframe curves.
… It now renders incorrectly when selected. And shaded incorrectly in all 4 viewports now. I’d really like to be able to just affect the supeclass wires argument somehow without having to override Draw()
First, if you override it but keep it empty you’ll see that Rhino’s default wireframe is no longer drawn.
Then, you can just draw your own lines or polygons or whatever calling the DrawLines/Polygons etc. contained in CRhinoDisplayPipeline &dgs. This is how I do it.
Take a look at this sample the Draw() part. It’s a bit different here cause it’s overriding CRhinoObjectGrips but you can get the idea.