View Full Version : Solid construction for CAM application

09-29-2010, 08:49 AM
Hi, I'm quite new in OpenGl. I'm working to a Cad/Cam software and up to now I used opengl to draw tool movements with lines.
Now I would draw a manufacturing preview. I don't know what would be the best approach, but in my mind it should be something like this: draw the material (like a parallelepiped) and for each tool position subtract from the material the tool space (usually a cylinder).
My first approach has been to use OpenCSG but the huge amount of solid subtractions (1000-10000 positions circa) gave me a very slow render and some view problems (something like ghost shapes and holes that appear rotating the model).
Do you have some ideas/suggestions for me? Is there any other OpenGL based library to perform Solid Construction? Thanks in advance!

09-29-2010, 12:23 PM
I would try to do that with an actual geometry-based CSG after each tool stroke, and doing only the current stroke with image-based CSG.

OpenCSG suggests http://gts.sourceforge.net/

09-29-2010, 11:26 PM
Thank you! I will try!

09-30-2010, 01:31 AM
Ok, while I'm struggling to compile gts under windows (because I'm working with VS2008), could you explain me what do you mean or what's the difference between geometry-based CSG and image-based CSG?

09-30-2010, 03:09 AM
Have you ever heard about http://www.opencascade.org? (http://www.opencascade.org)

09-30-2010, 11:07 AM
what's the difference between geometry-based CSG and image-based CSG?
That is pretty much explained in the Introduction of the front page on OpenCSG ...