FreeCAD CAM Tutorial 2026: Generate CNC Toolpaths & G-Code
Learn how to use FreeCAD CAM to create CNC toolpaths from 3D models. Explore machining operations, tool selection, simulation, G-code export, and common mistakes.
Want to turn a 3D CAD model into a real mechanical component using a CNC machine? With FreeCAD, you can move beyond 3D modeling and explore computer-aided manufacturing (CAM) without purchasing expensive commercial CAD/CAM software.
FreeCAD includes a CAM Workbench that helps you create machining operations, generate toolpaths, simulate cutting processes, and export machine instructions in G-code format. Older tutorials and documentation may refer to this workbench as the Path Workbench. The exact interface and available operations depend on your installed FreeCAD version.
01 What Is CAM in FreeCAD?
CAM stands for Computer-Aided Manufacturing. It connects a digital CAD model with the machining instructions required to manufacture a physical part.
The FreeCAD CAM Workbench allows you to define the raw material, select cutting tools, configure machining operations, and generate toolpaths for supported manufacturing workflows.
FreeCAD's CAM workflow uses a machine-independent toolpath representation before a postprocessor translates it into instructions for a particular CNC controller.
02 What You Need Before Starting
- •FreeCAD: A version with the CAM Workbench available.
- •3D CAD model: A valid mechanical component created in FreeCAD or imported from a compatible CAD format.
- •Stock material: The raw block or material from which the part will be machined.
- •Cutting tools: Appropriate end mills, drills, or other tools for your intended operations.
- •Machine information: Your CNC machine's work envelope, coordinate system, and supported controller format.
- •Postprocessor: A suitable postprocessor for your CNC controller.
1 Step 1: Create or Import Your 3D Model
Begin by opening FreeCAD and creating a new document. You can model your component using the Part Design or Part workbench, or import an existing model if its geometry is suitable for CAM operations.
- A flat top surface.
- A central rectangular pocket.
- Four mounting holes.
- Clearly defined outer edges.
You can create the model using a sketch, Pad, Pocket, and Hole operations. Before proceeding, check the model for invalid or overlapping geometry. A clean, valid solid makes it easier to select machining features and generate reliable toolpaths.
2 Step 2: Open the CAM Workbench
Switch to the CAM Workbench using the workbench selector in FreeCAD. Depending on your version, the interface may display CAM-related commands, operations, tool libraries, simulation options, and post-processing tools. Review the available tools before beginning the job.
Common machining operations include:
3 Step 3: Create a CAM Job
Select the appropriate Job command in the CAM Workbench. The CAM job organizes information required to generate the machining program, including model, stock, tools, operations, and postprocessor configuration.
Configure the stock material
Stock represents the raw material that will be machined into your final component. For example, if your finished component measures 100 × 60 × 10 mm, raw stock could be 104 × 64 × 12 mm. Incorrect stock dimensions or alignment can cause toolpaths to start in unexpected locations.
Set the machining origin
Define the work coordinate origin according to your intended CNC setup (commonly the top surface near one corner). Your coordinate system, stock placement, work offset, and machine setup must agree.
4 Step 4: Select Cutting Tools and Configure Parameters
Choose the tools needed for your operations. For a simple plate, you might use an end mill for facing, pocketing, and contouring, along with a suitable drill or milling strategy for mounting holes.
Do not copy arbitrary feed rates or spindle speeds from another project. Use verified cutting data appropriate for your setup, material, and machine rigidity.
5 Step 5: Generate the CNC Toolpaths
With stock and tools configured, add machining operations in the intended order (Facing, Pocket Milling, Drilling, and External Contouring). Recalculate paths and verify geometry selection.
6 Step 6: Simulate the Machining Process
Never assume a generated toolpath is safe simply because FreeCAD created it successfully. Use simulation tools to check for unexpected cuts, rapid collision risks, and correct depths.
7 Step 7: Export G-Code Using the Correct Postprocessor
Post-processing converts FreeCAD's internal toolpath representation into G-code appropriate for a particular CNC controller. Verify units, coordinate conventions, work offsets, and safety moves before saving the output.
Common FreeCAD CAM Problems & Solutions
| Problem | Possible Cause | What to Check |
|---|---|---|
| Toolpath does not generate | Invalid geometry or unsuitable operation settings | Check geometry, feature selection, and parameters |
| Toolpath in wrong position | Incorrect stock alignment or origin | Review job placement and coordinate system |
| Pocket is not fully machined | Incorrect depth, boundary selection, or tool access | Check pocket geometry, depth, and tool diameter |
| Wrong machining units | Inconsistent unit or postprocessor settings | Verify input values and generated G-code units |
| Tool collision risk | Poor clearances, incorrect heights, missing fixtures | Inspect rapid moves, retract heights, and setup |
| G-code rejected by machine | Incompatible postprocessor or unsupported commands | Check controller dialect and post configuration |
FreeCAD CAM vs. Traditional CAD Modeling
CAD Modeling
- Defines the component's geometry
- Uses sketches and 3D features
- Produces a digital design model
- Focuses on design intent and dimensions
CAM Programming
- Defines how the component will be machined
- Uses tools, stock, and machining operations
- Produces toolpaths and machine instructions
- Focuses on material removal & manufacturing setup
Best Practices for CNC Toolpath Generation
Is FreeCAD CAM Worth Learning in 2026?
FreeCAD CAM is worth exploring if you want to connect mechanical design with CNC manufacturing using an open-source CAD environment. It provides a useful learning path for students, hobbyists, makers, and engineers.
Start with a simple component, learn how each machining operation works, and gradually move toward more complex parts.
Frequently Asked Questions
Yes. FreeCAD's CAM Workbench can generate toolpaths and export machine instructions through an appropriate postprocessor. The resulting G-code must match the target CNC controller.
FreeCAD is open-source software available without a commercial software license fee. You should still account for any costs associated with machine tools, hardware, tooling, and manufacturing equipment.
Yes. The CAM Workbench includes milling operations such as facing, pocketing, profiling, and drilling, although specific capabilities depend on the installed version and operation support.
A postprocessor converts FreeCAD's internal toolpath representation into a G-code dialect compatible with a particular CNC controller.
Yes. Simulation and code inspection help identify potential programming problems. However, they do not replace machine-specific verification, workholding checks, or safe operating procedures.
It may suit some hobby, educational, and manufacturing workflows. Whether it can replace a commercial CAM package depends on your machining requirements, required strategies, controller support, and production needs.