AnsweredAssumed Answered

Is there support for rendering IBody2 objects in opengl

Question asked by Brad Phelan on Mar 10, 2016
Latest reply on Jun 6, 2016 by Brad Phelan

If I have generated a complex IBody2 or set of curves using IModeler and wish to render them using opengl in the OnBufferSwap method is there any support in the API to make this easy or am I going to have to extract edges and triangles manually? Any examples of doing this would be appreciated. I can't find any good opengl / solidworks examples. I've managed to draw a simple line in the OnBufferSwapNotify method but that's about all.


        private int OnBufferSwapNotify()


            const int GL_LINES = 1;







            glVertex3f(0.0F, 0.0F, 0.0F);

            glVertex3f(0.5F, 0.5F, 0.5F);




            return 0;



An example of taking an IBody2 brep model and rendering it in opengl would be much appreciated


Our use case is that we need to render a large set of curves and bodies which changes as we fiddle some parameters in a UI. We have found that creating and removing IBody2 objects rapidly from the view has performance problems.