CAM Development Roadmap
Purpose
This page discusses the strategic objectives for the CAM Workbench. This shouldn’t be a list of features to implement but broader objectives that will steer the overall direction of CAM development.
The authoritative roadmap is maintained in the source tree at src/Mod/CAM/Roadmap/ (README.md, Functionality/, Epics/, ADR/). This page summarizes it; propose changes as pull requests against those files. This page reflects src/Mod/CAM/Roadmap as of FreeCAD 26.3dev.
Vision
A robust, intuitive and industry-ready CAM solution that integrates with the FreeCAD modeling workflow, unit schemas and translation; supports professional CNC workflows; is usable by hobbyists; embraces open standards; and is extensible through Python.
Functionality areas
The roadmap organizes the workbench into these functionality areas:
-
Tool Management
-
Stock and Work-piece Setup
-
Job Management
-
Operation Configuration
-
Simulation and Verification
-
Output Generation
-
Scripting and automation
Initiatives (Epics)
-
Fixing user pain points (active)
-
Better Tool Library (active)
-
Improve Circular Holes (active)
-
Improve Core Dressups (active)
-
Clipper 2 Upgrade (active)
-
Improve Postprocessors (active)
-
Feeds and Speeds (proposed)
-
Improve Adaptive Operation (closed)
Pain points
-
Climb vs conventional terminology not consistent
-
Safe Height vs Clearance Height confusing
-
First rapid move visualization suggests a return to origin
-
Arrays of similar G-code
-
Lack of feeds and speeds calculation (addressed by the Feeds and Speeds Wizard in 26.3)
-
Selecting Tool Controllers is cumbersome
Pull request priorities
-
Regression fixes.
-
Changes related to active epics.
-
Other bug fixes.
-
Other new features (receive additional scrutiny).
Architecture Decision Records
Kept in src/Mod/CAM/Roadmap/ADR/:
-
ADR-000 Ubiquitous Language (glossary of Job, Operation, Strategy, Base Geometry, Tool Bit, Tool Controller, Machine and related terms)
-
ADR-002 Internal representation of tool path (Legacy)
-
ADR-007 Add semantic information to Path Command (Draft)
-
ADR-008 Terminology for heights and depths offsets (Draft)
-
ADR-009 Terminology consistency for Material Allowance (Draft)
Core Objectives
These things make CAM a reliable, useful, and flexible tool. Work in this area is never-ending and always high priority. New Developers should consider helping here before developing new features.
-
Broad test coverage
-
DRY and well documented code base
-
Bug fixes
-
Support for many CNC machines (postprocessors)
Workflow
The goal is a workflow that is efficient and resists human errors. However, the specific workflow can vary depending on the type of machine the user is working with and the type of geometry they are working on.
Job Types
CAM is optimized for 2.5D milling. It needs the concept of job 'types' to handle other kinds of workflows like Lathe, 4th Axis, and pure 2D machines. Additional job types would help narrow the choices a user must make and eliminate the visual noise and confusion that comes from options that don’t apply to the desired task.
Selection of Job Type should be something the user can add to a Job Template so that the selection can be automatic.
Since 26.3 a Job references a Machine definition that describes axes and rotary kinematics; job-type specialization (lathe, pure 2D) remains open.
2D workflow
2D workflows like laser/waterjet/plasma have some unique requirements.
-
Piercing and lead-in from scrap, and lead-out to scrap before stopping (manually covered now)
-
Nesting of parts into cut sheets
-
Marking for part ID, fold lines, stitching, etc.
-
Efficient import from DXF
Additional 2D strategies
-
Engrave - Engrave by following a set of 2D edges. We support this partly now, but the workflow is rough, and keeping the 2D elements oriented with the shape is nearly impossible.
-
Hatch Fill - Fill an arbitrary boundary with a hatching pattern
Lathe Workflow
Lathe setup is different from milling. The user is generally viewing the coordinate system with Z axis pointing right and X-axis pointing toward the user. Toolpaths are viewed as 2D relative to one side of the work or relative to the end for facing operations. Often the user can specify the tool tip orientation in at least 45 degree increments using a number from 0-9.
Lathe operations
-
Center Drill and Drill to Depth (with or w/o peck drilling)
-
Boring (auto-cycle to diameter)
-
Facing (and back-facing) including tapers, chamfers, etc.
-
Turning (inside and outside) including tapers, chamfers, etc.
-
Threading (external & internal)
-
Grooving (external & internal)
-
Trepanning (and back-trepanning)
-
Contour Roughing - Auto-remove material to approximate
-
Contour Finishing - Auto-contour finishing pass
4/5 axis workflow
Multi-axis is the broad category of strategies that involve working on a model from directions other than the typical top-down orientation in 2.5D strategies.
Multi-axis can be broken into two more narrow categories.
Indexed Multi-axis is where the part is rotated to a specific orientation and then held in place while traditional 2.5D operations are performed. 4th axis rotation means a single additional degree-of-freedom is added to allow the part to rotate, usually around the X-axis (A rotation) or Y-axis (B rotation).
Continuous 4 and 5 axis rotations mean that the part is rotating while the cutter is engaged in the material. These kinds of operations will need to visualize the toolpath relative to the part. Continuous 4/5 axis operations will require vastly new operations and toolpath generation logic. Indexed 3+2 positioning is provided by the Machine-driven rotation solver (Path/Base/Generator/rotation.py). Continuous 4-axis surfacing is available experimentally through Rotary Surface; continuous 5-axis remains out of scope.
2.5D (milling) workflow
This is CAM’s strongest area. But there’s room to improve.
Additional strategies
-
Threading - Thread Milling and the Drilling Tapping Strategy now cover this
-
Boring - Straightline Boring Canned operation (G85/G89)
-
Slitting Saw - Slot cutting with saw tool on the side of the work; a dedicated slitting-saw Operation is still missing although the
slittingsawTool Shape ships
Multi-Job Context
Some parts require multiple setups to complete. Each setup is represented by a separate job but no structure links them together other than the top-level document. This is insufficient because the document may contain multiple parts that have completely independent manufacturing steps/jobs/setups.
Commercial CNC users usually produce a document called a 'setup sheet' which describes to the CNC operator how to set up the machine in order to manufacture the part. This 'setup sheet' is not at all related to the CAM setupsheet concept. It is a human-readable document meant to communicate assumptions and notes required to correctly execute the gcode. The setup sheet usually contains the following information:
-
tools required
-
lowest z level
-
Part name/number/version
-
customer
-
rough stock or starting condition
-
operations
-
estimated run time
-
critical dimensions and inspection criteria
-
notes about previous runs
-
gcode program name
-
Fixtures and workholding information
CAM Sanity is CAM’s solution to the 'setup sheet'. Sanity Check is a standard command and the Post Process dialog can include its HTML report.
Low Level Libraries
CAM makes use of several libraries to generate toolpaths based on part geometry. These include libarea/patharea/clipper, Open CASCADE Technology, and OpenCamLib. Other libraries are available and more will likely be written in the future. We should include these whenever possible and when a native (OCCT) solution is unavailable.
Deepnest or an equivalent nesting/bin packing library would allow us to efficiently arrange parts in a cut-sheet to minimize stock usage.
The active Clipper 2 Upgrade epic replaces the obsolete Clipper 1, libarea and kurve dependencies. Cavalier Contours, a modern 2D offsetting library written in Rust, was considered as an alternative.
CAM Modifications
Some of the operations/strategies offer features and tools that are useful but not available for other op/strategies. We should work to make things more consistent.
Extensions (the boundary extension tool) are available in Pocket Shape and Adaptive; extending them to Surface and Waterline remains open.
Representation of remaining material
CAM should have a more robust state for the remaining material. This would be useful for visualization, collision avoidance, and rest milling. Adaptive supports rest machining (UseRestMachining, introduced in 26.3); a general remaining-material model for visualization and collision avoidance is still open.
Post Processing & Advanced Gcode
Post-processing moved to a machine-based framework in 26.3 (Path/Post/Processor.py with MachineState); legacy scripts remain as *_legacy_post.py. Open items:
-
modular output for older machines with limited memory.
Many old machines have an extremely limited capacity for gcode. While physically able to produce more complex paths, the very large output from surfacing and adaptive toolpaths make them unusable. It would be useful to post-process the output with an eye on the size of the resulting file. As a file reaches a maximum size, the post-processor could insert a spindle retraction and stop gracefully, then the next file could continue. Output files would be numbered to indicate sequence.
-
Support for Macros, subprograms, variables.
CAM Analysis
-
Tip up Prediction / avoidance
When 2D cutting (laser/waterjet/plasma) of material supported on a grating, small parts cut out of the main stock can 'tip up' creating a crash hazard for the cutting tool during subsequent moves. Being able to predict these events or avoid them by ordering paths would be desirable. (Further reading)
-
Visualization of remaining material after each operation could be improved
List of shortcomings
The following list is not individual bugs but shows how CAM is inconsistent in its application of concepts.
-
Inconsistent use of cut direction. We should be talking about climb/conventional everywhere and not using language like CW/CCW.
-
Inconsistent use of stepover. We use 'stepdown' and 'stepover' but inconsistently apply it: sometimes it is an absolute value and other times a percent of cutter diameter. Terminology for depths, heights and material allowance is being standardized in ADR-000, ADR-008 and ADR-009.
-
Finishing Passes. I think we should add an additional ObjectOp.Feature for FeatureFinishPass. This would give a new tab where a user could configure the final finishing pass with a different tool controller, direction, etc.
-
Inconsistent control of performance vs. accuracy. Many operations have poorly named or inconsistent controls for tolerance. At a minimum these could be grouped into a consistently named property group.
-
Inconsistent use of stock shapes and extensions.
-
No high level path optimization / automatic grouping of disjunct cutting areas.
-
G17, G18, G19 not supported, G17 is active by default (circles and arcs must be in XY-plane). This not only prevents milling in G18 and G19 modes (circles and arcs in XZ-plane and YZ-plane, respectively), but is an obstacle to lathe CAM, which requires G18 (see the list of supported G-codes in CAM scripting).