Mastercam Algorithms: Power Under the Hood

When shopping for a CAM program, it's important to look beyond the toolpath options, GUIs, and libraries to make sure the algorithms can take you the distance.

When shopping for a CAM program, it's important to look beyond the toolpath options, GUIs, and libraries to make sure the algorithms can take you the distance.

By William Bentrup

The last time I visited an automobile showroom, I was struck by the fact that the salespeople aren’t interested in showing you what’s under the hood anymore. Have you noticed?

 
Mastercam Algorithms: Power Under the Hood
Mastercam’s new Dynamic Mill algorithm (available in Mastercam X4) gives users the ability to use the entire flute length of the cutting tool while maintaining more consistent cutting conditions.

It seems that what’s under the hood is a side issue that might divert you from buying a car. After all, you might be simply looking for safe, cost-effective transportation or a dsplay of your good taste and economic status. So the salesman gets right to the ownership experience.

  Like automobiles, CAM (computer-aided manufacturing)  software will get you from point A to point B in your manufacturing process with varying degrees of smoothness, precision, speed, and safety (for your equipment and product), depending on the model you happen to drive. If I wanted to sell you a CAM system today, I might list all of the features—libraries,  toolpath options, graphic user interfaces, etc.—that will contribute to your CAM user experience, but not get into what’s under the hood.

  But rather than sell you a CAM system, I’d like to point out something elemental about CAM software, so you’ll be able to look under the hood yourself. What you’ll find is quite relevant to whether the product will meet your needs today, and for years to come; it’s the algorithms.

Recipes for CNC Success
There’s a vast sea of numbers in there—math functions that seem to stretch on for eternity—that are organized into groups that serve as recipes to tell the CAM system how it is to go about performing all its various functions. A modern CAM system has hundreds of algorithms—large and small.

 
   
Mastercam Algorithms: Power Under the Hood Mastercam Algorithms: Power Under the Hood
Before (left) and after (right) toolpath refinement. The 3D toolpath refinement algorithm used in Mastercam X4 allows unsurpassed control on surface toolpaths, resulting in optimized cycle times and better finishes.

Algorithms govern every phase of CAM from the clean importation of any number of CAD models for programming to the ultimate postprocessing of CNC programs for efficient manufacturing on specific equipment. Of course, the algorithms of most interest to machinists and manufacturing engineers are the ones that govern CNC toolpaths. The care with which these algorithms are created has a direct bearing on the ability to meet tolerances and machining-throughput goals, answering the all-important questions: Can I do the job? and If so, will it be profitable?

  Some toolpath algorithms are quite simple—a 2D zigzag pocket might only take into consideration the pocket shape, the cutter shape, and a fixed stepover parameter. The algorithm might be short, involving only a few steps and a brisk calculation time. A three-axis toolpath algorithm might also be relatively simple; it might be a 2D pattern projected along the tool axis to pick up the Z motion. The Z projection step can add to the toolpath calculation time, especially if many surfaces or solid faces are involved. A three-axis toolpath algorithm might be complex if the 3D passes are truly calculated in 3D (a must to yield smaller cusps in steep areas). And five-axis toolpaths usually have all the complexity of a three-axis toolpath and require more work as both the tool tip and tool axis change from location to location. These are just the building block algorithms for a growing variety of advanced roughing and finishing toolpath functions.

  A new trend in toolpath algorithm development is a push to take advantage of multiprocessor machines. One way to exploit multiple processors is to run the old single-processor algorithms in a separate thread behind the scenes. This leaves the user free to continue working while that toolpath calculates. Another way to exploit multiple processors is to modify the algorithm so that certain steps can be calculated simultaneously. The next step in the recipe waits until all the spawned threads complete.

 Increasing Complexity
As a software engineer, I spend a good part of my life developing these algorithms, stringing many of them together to perform specific machining functions and then testing them to see if they actually do what was intended. I also have to make sure these algorithms play well with a myriad of data sources as well as other algorithms with which they must interact. At CNC Software, Inc. of Tolland, CT, another 34 individuals do work similar to mine—all in support of our Mastercam CAD/CAM software line.

  The algorithms we write must be flexible so that they can be used over and over again in a variety of ways. They become the building blocks for the CAM functionality of the future. Great care must be taken to get it right the first time, because of the long-term implications. As a result,  creating useful algorithms can be very time consuming. For example, Mastercam’s toolpath refinement algorithm for generating improved surface finish took nearly a year to develop.

  Development time for toolpath algorithms can increase when more variables are added to the list of ingredients. It is quite common now for toolpath algorithms to take into consideration more than just the part and cutter shapes and a few simple control parameters. Toolpath algorithms now consider the aspects of the cutter (number of teeth, flute length, special material entry needs for toroidal cutters), and aspects of the material (for chip management, for feeds and speeds). Toolpath algorithms also allow users to specify one stepover for steep areas and another for shallow areas.

  Toolpath algorithms today are beginning to manage the material load on the tool, easing its transition to full load and building cutter passes based on material, not solely part shape. Toolpath algorithms now also consider the dynamics of the machine. Small but important changes can be made to help the machine make more gradual direction changes and smoother moves overall.

  The good news for me is that if I continue to do my job well, there appears to be good job security in the field of CAM software algorithm development. While my company has just released the latest version of its software, my co-workers and I are already writing and testing algorithms for the next release. The work we are doing today will have to dovetail with a roadmap for the product that looks out at least five years.

What It Means To You
While you might not care about my job security, you should understand the algorithms behind your manufacturing software. Here are three reasons: 

  1. All algorithms are not alike. Most CAM systems have functions that sound similar, but in everyday use, there can be a world of difference. For example, some algorithms are like road maps that show only the main highways, while others also facilitate travel on all of the side streets. The latter gives users the flexibility to alter or exchange toolpaths as needed to meet their unique manufacturing requirements.

  2. The CAM systems of tomorrow are built on the shoulders of the CAM systems in use today. If your CAM vendor does not have a significant investment in algorithm development, the improved functionality you will need to stay competitive and profitable may not be forthcoming.

  3. Compared to CAD software, which is relatively mature, CAM software is still an emerging technology. So you ain’t seen nothin’ yet. Perhaps you are frustrated because the special functionality you crave has yet to materialize. If it is possible and worth doing, you can bet that some CAM developer out there is probably working on it under the hood and has a plan for launching the algorithms as soon as they are dependable. Find out who he is and take a peek over his shoulder.

More Info:
CNC Software, Inc.


William Bentrup is a software engineer at CNC Software, Inc. Send comments about this story to [email protected].

Share This Article

Subscribe to our FREE magazine, FREE email newsletters or both!

Join over 90,000 engineering professionals who get fresh engineering news as soon as it is published.


About the Author

DE Editors's avatar
DE Editors

DE’s editors contribute news and new product announcements to Digital Engineering.
Press releases may be sent to them via [email protected].

Follow DE
#4720