How to use FreeCAD with your CNC milling machine

FreeCAD is a fast-evolving open-source parametric 3D software supported by a community of more than 500 developers. It’s entirely free - but you can support the project here – and features a robust CAM section that will get you milling complex projects on your CNC with confidence. 


If you’re hesitating between some software, you can compare different CAD/CAM software here to make your choice and if you’re new to FreeCAD, you can download precompiled stable releases for Windows, macOS and Linux here.


Note : when writing this article, we first tried the macOS version, and it had numerous bugs that we were not able to overcome, we switched to the Windows version and everything went smooth.


In this tutorial, we’re going to go through the CAM section of FreeCAD in order to mill our usual clamp. By the end of this article, you should be familiar with FreeCAD CAM interface and basic functions, and how to use it with your Mekanika CNC Machine. Here's the structure of the article 

  1. FreeCAD Overview
  2. Quick setup tips
  3. CAM interface and setup
  4. Import your end mills and generate operations
  5. Simulate your job and export it
  6. Mill your part

1/ FreeCAD Overview

The interface of FreeCAD is pretty common to other 3D software, and features the following sections.


  1. A 3D view where you can see the objects you’re drawing and manipulating. You may have several views of the same document (or same objects), or several documents open at the same time, and switch between them from the tabs below the visual editor.
  2. A workbench selection that allows you to switch between Sketch, CAD, CAM and other work environment.
  3. The combo view with two tabs:
    • The Model tab shows you the contents and structure of your document above and the properties of the selected objects below.
    • The Tasks tab, where FreeCAD will prompt you for values specific to the workbench and tool you are currently using.
  4. A panel view with all the available tools in your work environment.


We’ll focus on the CAM workbench (called Path in FreeCAD), but if you want to go deeper in understanding the interface, you can find more resources on the FreeCAD Wiki.


In the context of this tutorial, we’ll import our clamp *.STEP file directly, without drawing it from scratch. You can find the file here:. If you whish to learn the basic concepts of CNC milling, we'd suggest you go through our tutorial series first before following this specific tutorial for FreeCAD.

2/ Quick setup tips

Before going any further, make sure you update your Preferences in the General Tab with “Metric small parts & CNC”, in order to be able to use the standard mm/min for your operations.


If you come from another software, make sure the navigation preferences are aligned to what you’re used to, it will highly improve your experience of the visual interface.

3/ CAM Interface and Setup

To access the CAM interface of FreeCAD, you have to select the Path workbench. When in the proper workbench, the panel toolbar of your environment should look like this:


First, we’re going to create a Job. It’s the default view that contains all the information of a specific CAM job, meaning you can program several operations in it, as well as the information on the tools you use and your feeds & speeds.


Let’s click on the first icon from the toolbar: Create Job. This will a new job in your combo view, as well as new information on the Tasks view.


We’ll start by adapting the stock parameter of our job in the Tasks tab :


  • Add additional stock on every axis to fit the woodblock we’re going to mill this clamp from. Here we're simply adding 1o mm to X and Y axis, and no additional stock on the Z axis.
  • Click on the corner that you want to use as origin for your code, and click on Set Origin to use it as the origin point, here we're using our general tutorial convention to put the Z0 on the bottom of our stock.



Note that creating a job generates a copy image of your model under the Job Tab, which appears semitransparent. You can always toggle the visibility of your original model as well as the one of the stock or of your job model, but you'll have to set your operations on the model inside your job.

Last but not least, before going further, make sure you assign the right postprocessor to your job. In the case of Mekanika machines, you can select LinuxCNC.


4/ Import your end mills and generate operations

Before going further, we need to create tool profiles that match what we have available for our machine. For this, click on the ToolBit Library Editor. If it’s the first time you set up the library, FreeCAD is going to ask you if you want to set up the folder.

  • I’d suggest you set it up on the standard path.
  • I’d also suggest you accept to have a copy of the example default tool geometry files, this will help you further to insert your own end mills.


Once created, you’ll arrive to a screen with existing end mills.


To add a new end mill, click on the Create Toolbit button, then select the type of shape for your end mill. After selecting the shape, FreeCAD will ask you to name your new tool before you can change its parameters. You can then double-click on the new tool and adapt its shape and attributes.


Back to our job, you can now click on Toolbit Dock to see your end mills appear next to the 3D environment.


Note that unlike some other CAM programs, FreeCAD doesn’t attach speeds & feeds to each tool in the library, they have to be added in our job

An additional tip before setting up your first operations: we like a useful AddOn that helps you calculate your feeds and speeds. It’s available here with the installation procedure depending on your computer setup, and will be visible under Path Addons once installed and FreeCAD restarted. 

You'll need basic knowledge of Feeds & Speeds to use this AddOn, to calculate the proper chipload, but it will allow you to store materials data and use them way faster.




Back to the Combo View, under your job you can now see a TC object (standing for Tool Controller) with the name of your mill and all its parameters, including feeds & speeds. If you didn't set them using the AddOn, you can modify the parameters and feeds & speeds of your Tool Controller for this job.




Now that we have our design, our tool and our feeds and speeds, we can start creating operations. For our clamp, we’re going to do three simple operations:

  • One pocket to mill the clamp front and the back hole, called Pocket Shape in FreeCAD 
  • Two contours to mill the oval pocket and shape the clamp, called Profile in FreeCAD


To create the pocket, we’ll use the Pocket Shape tool icon. A tab opens under the combo view with several interesting information :

  • The Base Geometry section allows you to select different geometry to add to your operations. Note that they need to be added one by one and FreeCAD doesn’t appear to detect fully connected contour as in other software, so this might get a bit tedious for complex parts. 
  • The Depth section will allow you to check the starting and ending depth of your operation, as well as modifying the single depth of cut and add a finishing step. Note that to modify greyed parameter, you need to modify them in their original setup, being here in your TC object.
  • The Height section allows you to modify clearance and safe heights.
  • Finally, the Operation section allows you to modify the direction of milling (conventional or climbing) as well as the pattern to optimize your milling time or finish aspects.




Once you’re done, click on Ok and the tool path should appear on the 3D viewer screen. We’ll be able to simulate it, but let’s first do the same for the first contour operation called Profile in FreeCAD: select all face of the internal contour in the Base Geometry section, as well as your preferred parameters in the other sections. 




In this case, we're going to have to select Internal in the operation section to mill the inside of the pocket


Let's then do the same for the second contour.



Depending on the work holding methods you’ll use, it’s worth adding tabs to your tool path. In the Combo View you can click Path > Path Dressup >Tag. This should automatically create 4 tabs. You can then adjust their dimensions, geometries and placement in the Holding Tags section.


5/ Simulate your job and export it

Once your operations are defined, a good practice is to simulate your full job before exporting anything to your machine. FreeCAD features a handy CAM Simulator Tool that allows you to check if everything works smoothly, and how your part should theoretically look after the milling.




After this final step, we're now ready to export our milling file. Before doing that, make sure the right post processor is selected in your Job, but check as well the export path of your G-Code files under Preferences.


You can now click on Post Process to generate your G-Code file and send it to your machine.


6/ Mill your part

We have another tutorial on how to use your Mekanika machine for the first time when you generate your G-Code, that you can find it here and is adapted to any software you'd use with your machine.



Share this post
Your Dynamic Snippet will be displayed here... This message is displayed because you did not provided both a filter and a template to use.