Creating a roadmap for CAM development (#22591)

* draft roadmap

* Update README.md

fix links

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* current state

* update

* Update Tool Management.md

drag knife

* Create ADR-003.md

* Update ADR-003.md

* Update ADR-003.md

* Update ADR-003.md

* Update Generators.md

* functionality

* adr-003

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* improve circular holes features

* Update ADR-003.md

Ambiguous term "Safe height" (safe for what?) shall be renamed OpRapidsHeight to indicate its function.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* relative gcode

* adding tables

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Survey.
Assessment of functionality

* Update Operation Configuration.md

* Update Operation Configuration.md

* Update Job Management.md

array

* Update README.md

short term priorities

* Update README.md

* Update README.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update README.md

* Update README.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update README.md

* Update README.md

* Update README.md

* renaming

* Update ADR-004.md

* Update README.md

* Update README.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update README.md

* Update README.md

ADR update

* Roadmap cleanup.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* @connor's changes

* Update README.md

* Update Operation Configuration.md

Drilling ops:
Don't ignore user selection on entry. Use auto if no selection.

* Update Operation Configuration.md

Fill in some place holders
Flesh out current state.

* safe operating planes
AR-003

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update ADR-003.md

language normalized

* Update ADR-003.md

* Remove current state

* Update ADR-002.md

* Update Operation Configuration.md

Retain starting position from hole to hole when set. 
ie retain starting angle on XY plane as determined by first hole. 
Minimising rapids between holes gains nothing over all and leads to rather arbitrary starting on subsequent holes.

* Update Operation Configuration.md

Pocket clearance. Fix and restore Spiral

* recomputes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update ADR-005.md

* Update ADR-005.md

* Update Output Generation.md

* Update Simulation and Verification.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update ADR-003.md

title change and cleanup

* Update README.md

ADR3 title change

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update Operation Configuration.md

* initiatives

* handling user selection draft ADR

* Update Output Generation.md

* update

* epics

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* changes

* cleanup

* meta data on path commands

---------

Co-authored-by: Ian Abreu <z0r0@shurikenlabs.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: J-Dunn <dunn@piments.com>
Co-authored-by: Brad Collette <bradcollette@pop-os.localdomain>
This commit is contained in:
sliptonic
2025-08-09 11:17:34 -05:00
committed by GitHub
parent 2cd1438a61
commit 4e59e3b0f4
12 changed files with 576 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
# ADR-002: Internal Representation of tool paths
## Status
Legacy
## Context
We require a data structure to hold the computed tool path data. The internal representation will be directly rendered into the 3D scene.
Tool paths may contain hundreds of thousands or even millions of elements so memory utilization should be considered. The tool paths will be converted into
g-code during post-processing.
## Decision
We will use an abbreviated subset of gcode as the internal representation. The intent is not to support the full range
of RS274 features but to provide enough to capture user intent and to efficiently render the tool paths visually.
The internal representation (Path Commands) resembles gcode but does not support all gcode features. It differs from gcode in significant ways.
| FreeCAD Path Commands | Gcode |
| --- | --- |
| always in FreeCAD native units (MM) | May be in MM or IN |
| velocity is represented in units per second | velocity is represented in units per minute |
| absolute coordinates are in the FreeCAD global coordinate system. No other coordinate systems exist. | absolute coordinates are relative to the active coordinate system |
| gcode command coordinates are always absolute | gcode coordinates may be either absolute or relative |
| no modal commands | some gcodes affect how subsequent gcodes are interpreted |
| machine agnostic | machine specific |
# List of currently supported G-code commands
| Command | Description | Supported Arguments | Displayed |
| ---- | ---- | ---- | ---- |
| G0, G00 | Rapid move | X,Y,Z,A,B,C | Red |
| G1, G01 | Normal interpolated move | X,Y,Z,A,B,C | Green |
| G2, G02 | Clockwise arc | X,Y,Z,A,B,C,I,J,K | Green |
| G3, G03 | Counterclockwise arc | X,Y,Z,A,B,C,I,J,K | Green |
| G73 | chipbreak drill operation | X,Y,Z,R,Q | Red/Green |
| G74 | left hand tapping operation | X,Y,Z,R,Q | Red/Green |
| G81 | drill operation | X,Y,Z,R,Q | Red/Green |
| G82 | drill operation with dwell | X,Y,Z,R,Q | Red/Green |
| G83 | drill operation with peck | X,Y,Z,R,Q | Red/Green |
| G84 | right hand tapping operation | X,Y,Z,R,Q | Red/Green |
| G38.2 | Straight probe move (used in probe operation) | Z,F | Yellow |
| M0, M00 | Compulsory stop | | |
| M1, M01 | Optional stop | | |
| M3, M03 | Spindle on (clockwise rotation) | S\<rounds per minute\> | |
| M4, M04 | Spindle on (counterclockwise rotation) | S\<rounds per minute\> | |
| M6, M06 | Tool change | T\<tool number\> | |
| (Message) | comment | | |
# Fixtures
FreeCAD Job setup allows operations to be conducted in multiple machine fixtures. Path commands for activating fixtures are supported for:
G54, G55, G56, G57, G58, G59, G59.1 G59.2, G59.3, G59.4, G59.5, G59.6, G59.7, G59.8, G59.9,
# Non-Conforming commands
These commands do not conform to this ADR and are subject to deprecation and should not be used.
| Command | Description | Supported Arguments |
| ------- | ----------------------------------------- | -------------------------------------- |
| G80 | cancel canned cycle | |
| G90 | absolute coordinates | |
| G91 | relative coordinates | |
| G41 | Tool radius compensation value | Radius compensation is done in FreeCAD |
| G42 | Tool radius compensation value | Radius compensation is done in FreeCAD |
| G98 | Return to initial Z level in canned cycle | |
| G99 | Return to R level in canned cycle | |
| G40 | Cancel tool compensation | |
| | | |
## Consequences
Advantages
- it is human readable
- it is memory efficient
- it is easily converted into final gcode
- it is extensible
Disadvantages
- Gcode is not explicit. A command contains semantics about where to move the
cutter *to* but not where it is coming *from*. Therefore the first move will always appear as a move from the origin
- Directly inspecting the path commands will not reflect either the document
unit schema or the selected output unit schema.

View File

@@ -0,0 +1,15 @@
# ADR-001: Use PostgreSQL instead of MongoDB
## Status
Accepted
## Context
We need a relational database to support complex joins and ACID transactions. We considered MongoDB for its flexible schema but it lacks transactional guarantees across documents.
## Decision
We'll use PostgreSQL.
## Consequences
- Gains: strong consistency, mature tooling, powerful query engine.
- Costs: more up-front schema design, learning curve for some devs.

View File

@@ -0,0 +1,16 @@
# Status
Active
# Why it is a priority
The decision was made to rework the current tool handling subsystem to be similar to the BTL (Better Tool Library) add-on. The new approach provider a better user experience but the work is unfinished and has introduced some regressions
# Scope
| In | Out |
| --------------------------- | ------------------------------------------------ |
| Resolve regressions. <br> | Rework UI/UX to reduce tool controller confusion |
| improve Tool Library Editor | |
# Related Epics
-

View File

@@ -0,0 +1,19 @@
# STATUS:
ACTIVE/PROPOSED/DELAYED/REJECTED
# Why it is a priority
*(Give some justification why this is important)*
-
# Scope
*(think about what's in and out to keep the scope narrow)*
| In | Out |
| --- | --- |
| | |
| | |
# Related Epics
*(list any other epics (draft, active, delayed) that relate)*
-

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,39 @@
# 🟩 Core Essentials
*Features present or expected in a basic CAM package and necessary to perform the required tasks*
| Feature | Description | Assessment |
| -------------------- | --------------------------------------------------------------- | ---------- |
| G-code Generation | Translate internal tool path to machine-specific G-code dialect | DONE |
| Output Customization | Line numbers, comments, units (G20/G21) | DONE |
| Output review & edit | After the gcode is generated, the user should have the option to review it and edit before saving. They should have the option of editing in an external editor of their choice | Output review is done. Only uses internal editor which is poor |
---
# 🟨 Professional Grade
*Features usually present or expected in the state-of-the-art applications*
| Feature | Description | Assessment |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Preflight Checks | Catch and flag obvious problems before generating output | Sanity check can catch some errors. Requires running the check manually. |
| Post-Processor Customization | Control modal vs explicit axes, tool change blocks, headers/footers | Customization with flags in the Job output tab. Posts are inconsistent. |
| Advanced Customizatoin | Allow customization of output beyond the trivial. Allow customizing the post with an editing/customization tool | Requires editing the python file.<br>Requires copying the post file to a specific location. Clunky and unintuitive |
| Subprogram Support | Generate G-code with subprograms and subroutines | NONE |
| Setup Page Generation | Instructions, checklists, warnings, and errors for the operator | DONE |
| G-code Decomposition | Break arcs/canned cycles into linear segments or explicit moves | NONE |
| Coordinate Conversion | Convert absolute to relative (G91), center arcs to relative (G91.1) | NONE |
| Coolant Control | Coolant control should be started at the most desirable point to avoid wasting coolant during a tool change or before it is actually needed. | Current coolant control turns on when the TC is loaded. Inefficient |
| Advanced g-code generation | It should be possible to write postprocessors to generate any valid gcode | Some gcode features are not possible |
---
# 🟦 Next-Level CAM
*Features that would exceed industry standard*
| Feature | Description | Assessment |
| ----------------------------- | --------------------------------------------------------- | ---------- |
| On-Machine Inspection | Generate code or triggers for probing/inspection routines | None |
| Multi-File Output | Support splitting G-code into multiple files | LImited |
| Tool Wear Compensation | Output tool wear adjustments via offsets or tables | None |
| Feedback Loop Integration | Closed-loop post processing using machine state | None |
| Direct-to-Machine Fabrication | Reimagine CAM → G-code → Machine as a seamless pipeline | None |

View File

@@ -0,0 +1,25 @@
# 🟩 Core Essentials
*Features present or expected in a basic CAM package and necessary to perform the required tasks*
| Feature | Description | Assessment |
| -------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Python/Macro Support | Allow scripting or automation via Python or macros | Limited.<br>Some CAM functions require the GUI to be loaded. <br>No examples shipped with FreeCAD.<br>No examples on the wiki |
---
# 🟨 Professional Grade
*Features usually present or expected in the state-of-the art applications*
| Feature | Description | Assessment |
| -------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Parametric Workflows | Operations update automatically in response to model changes | Partial. <br>Recomputes are inconsistent. Sometimes triggered when not needed. Sometimes require manual recompute.<br>Recomputes are inefficient. Cannot, for example, recompute just the dressup or just the finishing pass. |
---
# 🟦 Next-Level CAM
*Features that would exceed industry standard*
| Feature | Description | Assessment |
| ----------------------------- | ----------------------------------------------------- | ---------- |
| Headless Batch Jobs | Run toolpath generation/export without UI interaction | Limited |
| External Workflow Integration | Embed CAM pipeline into other automated systems | None |

View File

@@ -0,0 +1,35 @@
# 🟩 Core Essentials
*Features present or expected in a basic CAM package and necessary to perform the required tasks*
| Feature | Description | Assessment |
| ---------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Toolpath Visualization | Display toolpath in context of model and stock | Done. Arrow indicators on segments are too small to be useful. |
| Toolpath Inspection | Allow user to inspect/explore segments of the toolpath | Done. <br>Inspection shows the raw internal comands for the segments. These commands are not in the correct unit schema and do not reflect the postprocessed code. |
| | | |
---
# 🟨 Professional Grade
*Features usually present or expected in the state-of-the art applications*
| Feature | Description | Assessment |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| Job Origin Indicator | Visual reference showing origin of the job | Shows in the 3D scene if enabled.<br>Does not show in the simulators. |
| Simulation: Tool & Model | Realistically render tool, stock, and models | Partially done. <br>Tool representation is incomplete. |
| Simulation: Tool Motion | Show representative tool movement.<br>Movement is sufficient to verify the tool path accuracy but does not reflect every movement. For example, may not show every peck movement in a cycle. | DONE |
| Simulation: Material Removal | Show realistic material removal in simulation | DONE |
| Simulation Speed Control | Speed up or slow down simulation for inspection | DONE |
| Collision Detection | Detect collisions between tool, stock, and model | NO |
| Error Detection | Identify common errors like gouging, overcutting, missed areas | NO |
| Consistent UI/UX | The UI scene navigation (pan, zoom, rotate) should follow the application mouse model | Behavior is inconsistent |
---
# 🟦 Next-Level CAM
*Features that would exceed industry standard*
| Feature | Description | Assessment |
| ------------------ | ------------------------------------------------------------------- | ---------- |
| Machine Simulation | Simulation accurately reflects actual machine behavior and movement | |
| Job estimates | Estimates of tool path completion time are accurate to within 1% | |
| | | |

View File

@@ -0,0 +1,28 @@
# 🟩 Core Essentials
*Features necessary to perform the required function*
| Feature | Description | Assessment |
|--------|-------------|------------|
| Define Stock Geometry | Specify size, shape, and orientation of raw material | |
| Model Placement | Position and rotate models within the stock | |
| Set Work Origin | Define the work coordinate system origin | |
---
# 🟨 Professional Grade
*Features present in the state-of-the-art applications and expected*
| Feature | Description | Assessment |
|--------|-------------|------------|
| Define Stock Material | Specify material type (for feeds/speeds, simulation, etc.) | |
| Fixtures/Clamping | Optionally define fixtures or clamping constraints | |
| Machine Envelope Visualization | Show how the job fits within the machine's work volume | |
---
# 🟦 Next-Level CAM
*Features that would exceed industry standard*
| Feature | Description | Assessment |
|--------|-------------|------------|
| *(placeholder)* | *(Add advanced stock/setup ideas here)* | |

View File

@@ -0,0 +1,31 @@
# 🟩 Core Essentials
*Features necessary to perform the required function*
| Feature | Description | Assessment |
|--------|-------------|------------|
| Tool Definition | Define and manage tools such as end mills, drills, inserts | |
| Tool Numbering | Assign tool numbers for G-code output | |
---
# 🟨 Professional Grade
*Features usually present or expected in the state-of-the-art applications*
| Feature | Description | Assessment |
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| Tool Metadata | Define shapes, material, holding, and additional metadata | |
| Feeds & Speeds Suggestions | Recommend cutting parameters based on tool, material, and operation | |
| Tool Import/Export | Synchronize tool definitions with machine or external databases | |
| Tool Libraries | Manage sets of tools as reusable libraries | |
| Probe Tool Definition | Identify probe tools and suppress spindle start | |
| Drag Knife Support | Define drag-knife tool and generate accurate offset-aware toolpaths | |
| Separate tool preparation from tool loading | With larger machines, a tool magazine may take a significant amount of time to index in preparation for a tool change. <br>We should support separating the calls to 'call for a tool' from the call to 'load the tool'. | |
---
# 🟦 Next-Level CAM
*Features that would exceed industry standard*
| Feature | Description | Assessment |
|--------|-------------|------------|
| *(placeholder)* | *(Add cutting-edge tool management or smart tooling features here)* | |

View File

@@ -0,0 +1,79 @@
# 📍 FreeCAD CAM Workbench Road-map 2025 and Beyond
This document aims to guide the ongoing development of the CAM Workbench. It sets out shared goals, identifies pain points and opportunities, and invites discussion, collaboration, and contributions from the wider community.
FreeCAD is a volunteer-driven project. This road-map does not prescribe work or enforce deadlines — it is a living document to help focus effort and encourage alignment across developers, users, and stakeholders.
Like everyone, Maintainers only have so much time that they can allocate to FreeCAD. With many contributors submitting changes, it can be difficult to judge the relative importance of an individual contribution. This document establishes a shared vision of the direction of the workbench so maintainers have a framework for prioritizing review and approval.
# 🔭 Vision
*(this section establishes non-negotiable big-picture definition of what we are building)*
A robust, intuitive, and industry-ready CAM solution that:
- Integrates seamlessly with the FreeCAD modeling workflow, unit schemas, and translation
- Supports professional CNC workflows
- Is usable and intuitive for hobbyist and non-professionals
- Embraces open standards
- Encourages extensibility and script-ability via Python
## ⚙️ Functionality
*(this section describes expected functionality in agnostic terms. No FreeCAD-specific language)*
Any CAM application meeting the needs above must provide functionality in these areas:
- [Tool Management](<./Functionality/Tool Management.md>)
- [Stock and Work-piece Setup](<./Functionality/Stock and Work-piece Setup.md>)
- [Job Management](<./Functionality/Job Management.md>)
- [Operation Configuration](<./Functionality/Operation Configuration.md>)
- [Simulation and Verification](<./Functionality/Simulation and Verification.md>)
- [Output Generation](<./Functionality/Output Generation.md>)
- [Scripting and automation](<./Functionality/Scripting and automation.md>)
### ADR Log
*(ADRs - Architecture Decision Report)*
| ADR | Description | Status |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------- | ------ |
| [ADR-002](<./ADR/ADR-002.md>) | Internal representation of tool path | Legacy |
# ⚠️ Pain Points
*(this section functions like an FAQ. It helps keep users from creating duplicate issues. It gives new developers a first place to connect)*
Perennial complaints from users:
- Climb vs Conventional terminology not consistently used
- Safe Height vs Clearance Height confusing
- Visualization of first rapid move in operation makes it appear as though tool
returns to origin between ops (It doesn't)
- Arrays of similar gcode
- Lack of F & S calculation
- Selecting and using tools (tool controllers) is cumbersome
# 🚀 Initiatives and Projects (Epics)
*(this section will be a list of initiatives that have been collectively discussed.
We agree these things should get collective attention because they are larger than a single issue or pull request and have implications on the work of multiple people. )*
*(If you have an idea for a project, create a pull request adding it to this section. Changes will be discussed in the PR and at periodic meetups)*
*(To keep focused and moving forward, we should voluntarily limit this list to ~8-10 active items)*
*(Each project will have a corresponding GitHub project to connect related issues and pull requests)*
*(You may, of course, work on anything that you like and submit pull requests. However, be warned that pull requests will be judged on the priorities noted below and new features that are outside of the discussed projects will receive additional scrutiny)*
| Epic | Description | Status |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -------- |
| [Better Tool Library](Epics/Better%20Tool%20Library.md) | Implement the 'Better Tool Library' approach to tool management | Active |
# Priorities
*(When evaluating Pull Requests, the following priorities will be considered)*
| Priority | Change | Rationale |
| -------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Regression bug fixes | Regressions represents a step backward. They impact users and other developers. Regressions may slow development in other areas. |
| 2 | Changes related to the initiatives and projects | Projects are grouping together numerous issues including both features and bug fixes. Multiple people may be working collectively. Timely response to changes is necessary to avoid rework and conflict. |
| 3 | other bug fixes | Resolving bugs with existing functionality that is not part of a broader initiative. |
| 4 | other new features | One-off features are either small enough to be reviewed independently or are big enough to warrant discussion by a larger group. This can be time consuming.<br>New features that are not part of an existing epic may represent good functionality but will receive heightened scrutiny to ensure they are consistent with established goals. |