Understanding Cut and Smoothing Tolerances

CNC machine contouring motion is controlled using line (G1) and arc (G2/G3) commands. To accommodate this, CAM approximates spline and surface toolpaths by linearizing them –creating many short line segments to approximate the desired shape. How accurately the toolpath matches the desired shape depends largely on the number of lines used. More lines result in a toolpath that closer approximates the nominal shape of the spline or surface, as illustrated in Figure 1.


Figure 1: Tolerances (Toolpath Centerline)


In HSMWorks the Tolerance setting controls the maximum chordal deviation of the linearized toolpath from the nominal shape. For example, a value of .0004in means the linearized toolpath can deviate from the original shape by as much as .0004in to either side of the nominal path. In fact, very loose tolerances may result in a highly faceted finish (think: disco ball).


Figure 2: HSMWorks Tolerance Setting

Data Starving

It is tempting to always use very tight tolerances but there are trade-offs including longer toolpath calculation times, large G-code files and very short line moves. The first two are not much of a problem because HSMWorks calculates very fast and most modern controls have at least 1MB of RAM. However, short line moves, coupled with high feedrates, may result in a phenomenon known as data starving.

Data starving happens when the control becomes so overwhelmed with data that it cannot keep up. CNC controls can only process a finite number of lines of code (blocks) per second. That can be as few as 40blocks/second on older machines and 1,000blocks/second or more on a newer machine like the Haas Automation control. Short line moves and high feedrates can force the processing rate beyond what the control can handle. When that happens, the machine must pause after each move and wait for the next servo command from the control.

The effect is akin to alternately mashing on the accelerator and brake in your car hundreds or thousands of times per second. The effect may or may not be subtle, depending on the control. In some cases the machine may actually shudder noticeably. This is not only hard on equipment but it leaves a poor surface finish on the part.

At the very least you will observe the actual feedrate on the machine is far less than the programmed feedrate. This is because the machine is constantly accelerating and decelerating and thus never achieving the full programmed feedrate.

Smoothing Tolerance

One way to reduce code size without sacrificing accuracy is to use the HSMWorks Smoothing function. Smoothing works by replacing collinear lines with one line and tangent arcs to replace multiple line in curved areas. Activate Smoothing by checking the Smoothing tolerance in the Passes tab of any toolpath.


Figure 3: Smoothing Tolerance


Figure 4: Result of Smoothing

The effects of smoothing can be dramatic. G-code file size may be reduced by as much as 50% or more. The machine will run faster and more smoothly and surface finish improves. The amount of code reduction depends on how well the toolpath lends itself to smoothing. Toolpaths that lay primarily in a major plane (XY, XZ, YZ) like the parallel paths shown in Figure 5, filter well. Those that do not, such as 3D Scallop, will be reduced less.


Recommended Settings

Smoothing works best when the Tolerance (the accuracy with which the original linearized path is generated) is equal or greater than the Smoothing (line/arc fitting) tolerance. In other words, the more accurate the data sent to the Smoothing "filter" the better job it does –up to a point. A good rule is to set the cut Tolerance between 1 to 4 times greater than the Smoothing tolerance.

Table 1 shows the results of different Tolerance and Smoothing settings for a 2D spline. For this part (and this will not always be the case) increasing the cut Tolerance, while leaving the Smoothing tolerance the same, resulted in progressively less code as HSMWorks was able to maintain Tolerance with fewer and fewer lines and arcs. However, tolerances below .0001in resulted in no further reduction of code.


Table 1: Tolerance + Smoothing Tolerance vs. G-Code File Size

The default Tolerance and Smoothing values in HSMWorks work very well for most parts. You can adjust them and it is worth experimenting with on different parts and toolpaths. Simply post the file and note the total number of blocks of code that are produced. Change a setting, re-post the file and see how much the file size changed.

Note: Total tolerance, or the distance the toolpath can stray from the ideal spline or surface shape, is the sum of the cut Tolerance and Smoothing Tolerance. For example, setting a cut Tolerance of .0004in and Smoothing Tolerance of .0004in means the toolpath can vary from the original spline or surface by as much as .0008in from the ideal path.

  • Tags: High Speed Machining, Tolerances, ToolPath Quality

Categories: HSM Tips and Tricks

Leave a comment

You are commenting as guest.