Issue:
How to understand and optimize toolpath generation in Fusion and HSM CAM products for performance. The information detailed in this article may be helpful when experiencing the symptoms in Fusion or an HSM CAM:
- Slow toolpath generation.
- Lagging and black rectangles on screen when working in the CAM workspace.
- Fusion or HSM CAM becoming unresponsive when generating toolpaths.
- Software crashing during toolpath generation.
- 2D profile toolpath generation taking lot of time.
Causes:
It is important to understand the key parameters effecting toolpath generation in Fusion. An understanding of these concepts gives better results, quicker calculation times, and results in less difficulty when working with large data sets in the CAM workspace.
Solution:
Toolpath calculations and generation
Fusion uses three steps to generate toolpaths:
-
Cutting passes are generated.
-
The cutting passes are ordered.
-
The cutting passes are linked together.
- Fusion uses both threaded (using all cores of the computer) and nonthreaded calculations to perform these tasks. While all toolpaths can perform threaded calculations, the degree to which all cores of the computer are used can vary greatly with different operation types.
- This variance can result in slow performance when generating certain toolpaths, as not all the available processing power of the computer is used.
Toolpaths that do not use all cores of the computer:
-
Adaptive Clearing operations
-
Scallop operations
Toolpaths that readily use all cores of the computer:
These toolpaths are recommended to avoid long toolpath generation times when working with large data sets.
-
Pocket operations
- Parallel operations
Key toolpath parameters for toolpath generation
- Certain toolpath parameters can have a large effect on toolpath generation times in Fusion and HSM products.
- When beginning to develop toolpaths, start with a larger stepdown/over to allow the toolpaths to generate more quickly - this reduces the loading during each internal step of the toolpath calculation.
- "Previewing" potential toolpaths with a larger stepdown/over can make it easier to initially develop cutting strategies, and the smaller stepdown/overs can be applied once the toolpath looks correct.
- This workflow can help allow for only one time-consuming toolpath generation when experimenting with different cutting strategies.
- Beyond reducing the number of cutting passes and linking moves, certain toolpath parameters can have a large effect on calculation times.
- These parameters include tolerance and smoothing settings, Rest Machining settings, and Adaptive Clearing Stay-Down levels.
Tolerance Settings:
- The settings for toolpath tolerance and smoothing (accessed in the "Passes" tab for most operations) can also have a great effect on toolpath calculation times.
- These settings control how the toolpath is generated in relation to model geometry.
- CAM toolpaths approximate model geometry by using small linear segments to work around curves.
- The toolpath tolerance defines the maximum allowable chord distance between the linear segments of the generated toolpath and the actual model geometry.
- This is visually clear in the Fusion Tolerance tool tip:
- Since a toolpath with tight (numerically smaller) tolerance to curved surfaces must create many linear segments, tighter tolerances require longer toolpath calculation times and create larger program files (as more lines of code are required), but will result in more accurate (true to model geometry) cutting path.
- This can be seen in the following image:
- In the screenshot image, the tolerance is set to 0.01 mm, the default setting in Fusion. The toolpath accurately linearizes the model geometry.
- The black dots are showing the toolpath points at which the linear segments begin and end, and the size of the g-code program for this operation is 40.4 KB.
- Compare this to the following screenshot, in which the tolerance is set to 1 mm as an exaggerated example:
- This toolpath generated much more quickly than the one with a tighter tolerance and the size of the G-code program is reduced to 7.5 KB, as the toolpath is allowed to create longer linear segments for the cutting motion.
- However, this results in reduced accuracy because the chord length from the toolpath to the model geometry can vary by a greater distance.
Spun Profile Tolerance
- Some turned parts require subsequent milling operations.
- If the turning part has cross holes, cross slots or undercuts, use the Spun Profile option to approximate a 2D profile for two axis turning operations (See: How to create a CAM turning spun profile in Fusion 360. )
- 'Spun Profile Tolerance' specifies the tolerance for the spun profile generation.
- 'Spun Profile Smoothing' smooths the profile.
Setting tolerances depends on operation surface requirements, machine tool dynamics, feed-rate expectation, and machine tool look ahead capabilities. In Fusion and HSM CAM programs, it is recommended to start with a tight enough tolerance to accurately capture the model geometry and then apply smoothing to the toolpath to reduce the g-code program size.
Smoothing Settings:
- Smoothing works to fit G2 and G3 arc moves into the toolpath in place of linear moves when possible, which can shorten the size of the post processed code.
- The smoothing tolerance defines the amount that arc moves may vary from the toolpath, meaning that the total allowed variance from the model position is the numerical sum of the tolerance and the smoothing tolerance.
- As an example of how smoothing works, refer to the following screenshot, which has applied a 0.01mm smoothing tolerance to the same toolpath shown previously with the 0.01mm cut tolerance:
- The number of points has been greatly reduced, which correlated to the change in toolpath size. By enabling smoothing, the g-code program size is now 12 KB, compared to the previous toolpath in which the size was 40.4 KB.
- It is recommended to use a 1:1 tolerance to smoothing ratio to optimize both toolpath generation times and file sizes when working in Fusion.
- Refer to the forum thread linked for more information on how the tolerance/smoothing ratio effects g-code program sizes and toolpath generations times: Understanding Smoothing
It is important to remember that not all machines support arc moves outside the XY plane.
- Some post processors (like Fanuc) have the option to allow 3D arcs available in the Post Process dialogue box, but many do not.
- To reduce the size of the program file using smoothing, set up toolpaths that use arc moves along the axes allowed by the machine.
- If applying smoothing to arcs that cannot be done by the machine, the post processor will use its built-in tolerance (also in the post properties) to post code, but the program may be larger than is shown in Fusion.
Rest Machining:
- Applying rest machining to a toolpath can effect toolpath generation times by forcing calculations to be sequential.
- Rest machining limits operations to only remove material left behind by previous operations, one operation must be generated before the other, preventing the operations from being generated simultaneously.
- This can negate the advantages when using Distributed CAM, as sequential toolpaths must be generated one after the other and one the same machine.
- One way to enable rest machining and avoid forcing sequential toolpath generations is to use the Rest Machining from Tool option. All 2D operations with rest machining default to this option. The following 3D toolpaths include this option:
- Parallel
- Contour
- Pencil
- Scallop
- Spiral
- Radial
- Morphed Spiral
- Project
- Morph
- After setting the Source for rest machining as "From Tool", enter the tool parameters used in the previous clearing operation as shown in the following screenshot:
- Fusion will assume that the machining boundary defined in the operation will have already been cleared with the tool defined here and the toolpath will only generate in areas in which stock may have been left over by initial (larger diameter) roughing tool.
- This will give the option to limit toolpaths to only clear the remaining stock left by a larger tool without making the toolpath calculation dependent on previous operations.
Adaptive Stay-Down Level:
- Found in the "Linking" tab in both 2D and 3D Adaptive Clearing operations, the Adaptive Stay-down level works to determine how long of a cutting path is allowed before a retract move.
- Fusion will look for paths that the tool could safely continue cutting along up to the shorter length defined by either the Maximum Stay-Down Distance or the Stay-Down Level.
- When calculating the linking moves for an Adaptive Clearing operation, Fusion will first calculate the distance of a rapid retract move to the next pass. It will then look for any safe paths along which the tool could remain down and continue cutting up to the shorter length defined either by the Maximum Stay-Down Distance or by the Stay-Down level percentage.
- The Stay-Down level correlates to a ratio of the rapid distance required for the linking move - at 50% the distance allowed for Stay-Down moves is equal to the rapid distance. The following screenshot illustrates a toolpath with "Least" Stay down Level:
- The tool retracts over the top of the part instead of staying down to move to the beginning of its next cutting move.
- In the following screenshot, the Stay-Down Level is set to "Most." The tool will stay down instead of retracting for all the linking moves.
- This toolpath will take longer to generate than the previous one. The linking moves must be calculated until they find the longest possible safe path rather than retracting between cutting passes.
- Increasing the Stay-Down Level percentage will increase toolpath generation times. This is because the cutting pass generation will continue looking for longer safe paths to take instead of retracting and using a rapid move.
- The recommended amount of Stay-Down Level to use to balance forcing the tool to stay down and toolpath generation times is 20-30%. It is rare that a Stay-Down Level of greater than 50% will result in a faster machining time, but higher Stay-Down Level percentages will always result in slower toolpath generation times.
Use circular and rectangle pattern
For the toolpath that has a equal distance machining use rectangular or circular pattern option in the manufacturing workspace.
