A note on my existing 3D CAM-algorithms in OpenCAMLib, c++ code with python bindings, under GPL license.
Typical "drop-cutter" ("axial tool projection") finish toolpath.
http://www.anderswallin.net/wp-content/ ... 4/tux1.png
These may essentially be any toolpath in the XY plane which is the "dropped" or "projected" down onto an STL surface to produce cutter-location points. There is a filter for reducing the number of points on straight parts of the surface. A filter for recognizing circular arcs in the principal planes (i.e. g2/3 moves) would be a good addition.
Drop-cutter works with the following tool-shapes. The bottom row shows composite-cutters that are combinations of the top-row basic cutter shapes. Many more of these are possible to define, if desired.
http://www.anderswallin.net/wp-content/ ... 8/all1.jpg
A stock-to-leave feature is implemented thorugh offset cutters. When we want to machine a surface with a positive stock-to-leave value we first offset the cutter outward, calculate the toolpath with this larger-than-actual cutter, and then machine with the small original cutter. This should result in the desired surface with the given stock-to-leave.
(I seem to have no good image of this idea in my blog, sorry...)
A cutter can also be "pushed" in the XY plane ("radial tool projection"). When these cutter-location points are hooked up correctly we have a waterline toolpath:
http://www.anderswallin.net/wp-content/ ... e_tux1.png
There are still issues with how the cutter-location points should validly be hooked up into a waterline-loop. Your patches will be welcome!
The typical roughing-strategy is to rough or clear-out "Z-terraces" where each terrace is defined by a waterline and the stock-definition. For a 3D roughing operation these waterlines calculated in 3D are thus input for a 2D roughing/clearing algorithms that is run at each Z-step.
TODO/Plans:
- Pencil-milling. By looking at the cutter-contact point with a rounded tool (BallCutter or BullCutter) it is possible to determine the surface normal at the point where we make contact with the model. Pencil-milling cutter-locations are points on the STL model where this contact-normal changes abruptly. It should be straightforward to create a mesh in the XY-plane covering the whole model, then run drop-cutter on all vertices in the mesh, then find places where the cutter-normal changes abruptly. Optionally refine the mesh adaptively in interesting regions. Then hook up these found points into pencil-milling paths.
- Constant-scallop. Again start with a mesh in the XY-plane covering the whole model. Run drop-cutter on this to project "wrap" the mesh down on the model. Refine adaptively to desired accuracy. Now run a "geodesic distance field" or similar (many papers/descriptions exist) algorithm on this mesh. This results in equally-spaced curves on the mesh, which at least with BallCutter will be exactly (or an approximation(?)) a constant-scallop toolpath. See for example this image:
http://www.graphics.rwth-aachen.de/medi ... c076c1.png
- non-simultaneous 4/5-axis paths are possible, i.e. toolpaths where we do not machine while the 4/5 axis rotates are essentially just 3-axis paths, but with the STL model oriented/rotated into a new position. Applying all existing 3-axis oprations to rotated STL-model should be straightforward.
My conclusion is that on the geometry/math side of things there's already a bit of work done! It's mainly the integration part into freecad that is lacking now.
Anders