New Finishing Almost Done
Below is a shot of the almost-working finishing code. The big thing pictured below is that the threshold angle is now working (set to 20 degrees below)- I forgot that I would need to know the angle of contact with the cutter to determine the angle for both parallel and waterline finishing. This took another bunch of code and testing to get done. Also, the path linker turned out to be inadequate for the task and required a lot of changes to reduce the unneeded retracts. Luckily I’ve rewritten that so many times that it went really quickly.
Before I can release the new version I’ve got to add the code to find the correct forward step, the scallop height calculation that Randy mentioned, which should be no problem. Then I just need to make sure that mm/inch units are respected in the translation for the old ZMap code to the new code. These should both be pretty straight forward but there has been a lot of plumbing changed to get this code working so I’ll feel better after a lot of testing.
New User Project
I just posed an article written by John Williams to http://www.grzsoftware.com/users/johnw.php . It’s a really good write up about making guitars using a CNC mill with MeshCAM as part of the workflow. Thanks to John for all the hard work.
Toolpath Refinement Working
As I mentioned before, I’ve been rewriting the finishing code to eliminate the ZMap. The ZMap has several problems, the first is that a highly accurate toolpath requires a ton of memory. A second is that it you have to do a lot of calculations on the area in between raster lines that you don’t really care about other than avoiding collisions. Finally, since you’re evaluating the toolpath on a rectangular grid you cannot dedicate more memory/processing to the more detailed areas; it must all be uniform. The benefit is that it’s fast if you use a lot of optimizations and it’s bulletproof.
The new code is a more standard approach used by major CAM programs. It allows the toolpath code to project a rough path downward onto the model and have it offset to avoid collisions. The initial path is sampled at the widest spacing that will meet the tolerance requirement specified in the toolpath dialog. After this rough path is determined it is analyzed for non-smooth areas. These non-smooth areas are further refined by adding extra points where required until they become smooth or the point spacing becomes smaller than a specified threshold.
The images below show the benefits of this new approach. The model on the left has no refinement, the toolpath is sampled at .003″ intervals. You can see in the steep areas that the walls would be very rough since the tool slides down the edge at different points. The right image shows the same model and tool but with refinement down to a .0005″ interval. This limit can be very small, I’ve run it down to .0001″ and it still works well but the result is not significantly different when viewed on a computer monitor. A machined part from a good mill could be measured to show the difference.
Filleted End Mills
I finally got the new code for filleted end mills working. I tried a number of ways to solve the line/torus intersection problem including one from an academic paper that seemed to just not work. I had hoped to solve the equations analytically but the math becomes unwieldy and round off errors due to floating point calculations make an iterative solution more accurate anyway. Below you can see an example of all of the work. It doesn’t look much different from a current toolpath and that’s a good thing. One difference though- this one takes every triangle in to account at each step. The current zmap-based approach can miss tiny features that fall between sampling points.
I just need to test the tapered filleted end mill and then I can move on to integrating it into the new finishing toolpath code.

