Hi FreeCad team,
For the past few weeks I was playing around with programming CAM simulation to work with Path workbench. I feel this is an important feature as it lets you make sure the rendered gcode indeed delivers what you intended to get.
At first I tried to do it with python and boolean operations. The results were nice, but it was extremely slow. As a test I used one of sliptonic's torture models, and it took about 1 hour and 20 minutes to complete.
(See following thread for images and videos: https://forum.freecadweb.org/viewtopic.php?f=15&t=24422
I then tried to do the same using external BSP tree boolean library in C++. This helped a bit but still too slow.
Then I decided to go for something like 2.5D voxels (ugly but fast), wrote everything from scratch (no external libraries) and the simulation dropped down to a mere 1 second.
Right now its a stand alone c++ application. I want to integrate it into freecad's path workbench so it can work seamlessly.
Unfortunately as far as I know I can not create an external c++ module, I have to integrate it into FC code. There is lots of info of how to add Python code, but I didnt find enough docs of how to add C++ code. Specially how to write all the python interface to C++ objects. I saw some xml files, suggesting a code generator perhaps?
Any links to docs and samples will be appreciated.
OCC Boolean simulation:
C++ 2.5D Voxel sim :