Toolpath Refinement Working

July 16, 2007 · Filed Under MeshCAM Development 

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.

 

image image

Comments

4 Responses to “Toolpath Refinement Working”

  1. Randy on July 17th, 2007 7:30 pm

    It’s cool to load both screenshots into Irfanview and strobe between them to see how the toolpath is tightened up at the dropoff.

    You wrote “The initial path is sampled at the widest spacing that will meet the tolerance requirement specified in the toolpath dialog.” Is that something like a scallop height calculation?

    Randy

  2. Robert on July 17th, 2007 7:37 pm

    It’s exactly the scallop height calculation.

    The interesting thing to note is that with the current ZMap approach the quality change between the two above would have required about 36 times the memory to go from .003 or .0005″ steps. The new code only requires about 10-20% more depending on the model.

  3. Randy on July 30th, 2007 8:41 pm

    Obviously the scallop height (measured normal to the local surface) for a given stepover will depend on the concavity or convexity of the surface, much less the slope. Do CAM programs take into account the actual surface being machined, or do the calculation based on flat/level surface (at which point it is equivalent to calculating the sagitta of a telescope mirror…)?

    Randy

  4. Robert on July 31st, 2007 11:58 am

    Generally no, they don’t account for the surface shape. Higher-quality (more expensive) programs that are used in the mold industry or other high-end applications do account for the surface but they usually give it a more impressive name than “parallel finishing.” I’ve never tried to write one of these but I’m told it’s a big can of worms to make it work reliably on any surface.