Our look at running a CNC milling machine using open-source software led me to another tool worth looking at: FreeCAD. I wasn’t previously familiar with the program, so I decided to check it out. In this article I will walk through my experiences with using FreeCAD for the first time to do a variety of CNC-related tasks I normally would have used a commercial product for. I had varying degrees of success in my endeavors, but in the end came away with a positive opinion.
FreeCAD is an LGPL v2+ licensed CAD and CAM program written in Python. The first release of the project was in 2002, and its last stable version 0.18.4 was released in October 2019. The project’s GitHub page indicates that it has 271 contributors with new commits happening often (generally more than 50 a week). Beyond code contributions, FreeCAD has a welcoming community with active forums to answer any questions users might have along the way. FreeCAD is designed to be cross-platform, supporting Linux, macOS, and Windows, with binary releases provided by the OS-independent package and environment management system Conda.
I decided to take on a relatively simple CNC project: milling a new street-address sign for my home. The plan called for a 700mm x 150mm sign, and I decided to mill it out of a plank of maple wood. The design I have in mind is pretty straightforward, so it should be a great way to put FreeCAD through a test on a real project. I also looked at using FreeCAD for taking existing models that are available online with an open license and importing them for milling (in this case, a wooden spoon).
It is worth noting that before this effort I had never used FreeCAD before. My personal goal is to become fluent enough with FreeCAD that I can replace my dependence on the commercial CAD software I presently use in my design work. The goal of this article, however, is to share what my experience with FreeCAD was, and provide a glimpse of FreeCAD from the perspective of an inexperienced user.
Getting FreeCAD
FreeCAD is available for download on the FreeCAD project website, along with development builds for the upcoming 0.19.0 release. One thing I learned as I went, however, was that I was much better off using development snapshots than I was using the pre-compiled binaries from the releases. The stable release worked fine, but I quickly realized that features I would have expected to be in the project only exist in 0.18.4 as “experimental” features requiring special effort to enable. Specifically, 3D surface-path generation was a key technology I simply had to have to consider a switch. For unfamiliar readers, this feature allows you to carve a model’s outer shell out of a piece of stock material using a CNC — in a way similar to carving a statue out of a block of marble. I discovered on the forums that the Path Workbench for FreeCAD is under active development for 0.19, including 3D surface-paths, and {“}many bug fixes and new features{“} related to path generation are in the upcoming release.
Thankfully, FreeCAD provides a pretty easy-to-use package system to install regular development snapshots. With a few commands and a little patience, I was able to get a development-tree build of FreeCAD 0.19 running on my laptop with little hassle.
My first test: a spoon
Before I decided to try making something from scratch using FreeCAD, I wanted to try a pretty common workflow in the open-source maker world: download a model someone else has created, and make it. For me this meant taking an STL file I had handy for a spoon and trying to use FreeCAD to design the tool paths to carve it out. As simple as a spoon is, carving one on a CNC is a fairly complicated effort and a good test of the project’s capabilities. To succeed, you have to carve the top of the wood stock, flip the wood over, and then carve the bottom as a separate job. This experiment introduced me to several of FreeCAD’s features: importing the STL, editing the model, setting up a CNC job, building tool paths for both the top and bottom, and finally generating G-code. Regrettably, my experiment did not work as well as I would have hoped since I ran into multiple problems.
The first problem I encountered was an overwhelming amount of somewhat disorganized (or even incorrect) documentation. The FreeCAD project has a pretty massive wiki dedicated to documentation on using the application. For someone who knew nothing (me), it took a great deal of reading and effort just to get any sense at all of how to accomplish things that are fairly straightforward in other tools. One of the places I found the documentation most lacking was a clear explanation of the multitude of FreeCAD workbenches. These workbenches are at the heart of any design work being done in FreeCAD, but conceptually their function and interoperability with each other were not clearly explained. As a result, getting to the point where I had a basic understanding to even attempt to make my spoon was more difficult than I had otherwise hoped.
When trying to use FreeCAD, readers should be prepared to spend a considerable amount of effort gaining an understanding of the program’s foundational concepts, how those concepts map to the workbenches, and to struggle early on doing even simple tasks. For example, if the goal is resizing an STL model imported via the Mesh Workbench, you will find that the tools to do so don’t exist in that workbench. Instead, the imported mesh must first be converted to a “shape”, then a “solid” using the Part Workbench. Once it is a solid, you must create a clone of it using the Draft Workbench (strangely billed as a tool for 2D work). This clone, once created through these many steps, then can finally be resized as needed. Coming from previous experience of clicking on an STL and then simply resizing it at will, I found the FreeCAD process to do the same felt incredibly burdensome.
After a good amount of searching online, watching videos, and reading forum posts, I did succeed in importing the STL file of my spoon. Ultimately I roughly followed the process outlined here. That said, I quickly learned that FreeCAD is considerably less capable than other options when it comes to working with complex STL meshes; the processing time between actions taken in my tests was often measured in minutes. This is, for example, compared to the much simpler CAMLab browser-based CAM system that was able to load and work with the same model in seconds. It’s unclear exactly where the performance issues are. Ultimately I was able to side-step the issue by reducing the complexity of my STL spoon model using online tools — at the cost of detail in the final output.
In the end, I abandoned my attempt to make a spoon after I encountered a problem with the 3D surface-path tool and decided to move on to my more straightforward street-address sign. In my questions to the FreeCAD forum, another user indicated they weren’t able to reproduce the problem I experienced, saying {“}I suspect you had been working on the same file for awhile, and eventually ‘stuff’ builds up.{“} Working on a file for long periods of time shouldn’t break things, but working from a development branch of the project, those sorts of issues are to be expected. Despite the problems I had, many of which can certainly be chalked up to my lack of understanding, it is worth noting that the FreeCAD community was both engaged and extremely helpful to me as a newcomer. I will certainly be revisiting my quest for a milled-at-home cooking spoon using FreeCAD in the future to see if perhaps a fresh start with more knowledge might fix my problems.
Take two: a street-address sign
For my second experiment, I decided to start from scratch and try to make a street-address sign for my home. Unlike the spoon experiment, requiring complex tool paths over a curved 3D surface (on two sides), my sign design was much more straightforward; the sign only needed to be milled on one side to create a relief of the street-address text in the center.
This project allowed me to try to use the CAD portions of FreeCAD to make this simple 3D model. The basic steps to build the model were: create a properly-sized 3D-rectangle 19mm thick (the size of my board), create an indentation (or “pocket”) with a 10mm border, and then add the raised address centered in the middle.
Again, as was the case with trying to import an STL file, I found myself jumping back and forth between multiple workbenches to design my model. I was able to follow this tutorial to get an understanding of how most of the steps were done and to apply them to my specific project. While I ultimately did succeed in creating my model, doing so felt much more complicated than my experiences with other tools. For the sign, here’s what I ended up with (replacing the real street-address with “LWN”):
Everything in FreeCAD is stored as an object with properties in a hierarchy of dependencies, and the various workbenches allow you to modify different aspects of that hierarchy. When you modify a model, the changes propagate throughout the hierarchy. This makes building models more complicated up front, but also makes them quite flexible once they are designed.
For example, once my sign was complete, changing my real street-address to “LWN” for the screenshot above required only modifying a single text property and adjusting the alignment to re-center it in the sign. Experienced FreeCAD users may point out that I would have also been able to use constraints to auto-center my text, but in my case, I was satisfied to simply eyeball it. Had I used constraints, I likely would have only needed to modify the text to create an entirely new sign properly centered. This approach to modeling, while complicated, is one of the more important conceptual features of FreeCAD: because models are built up based on properties of other models in a hierarchy, it is possible to create a “sign” model that can be quickly changed for the need at hand (different text, different size, etc.) If I were to be designing a sign to sell, for example, it would be a huge time-saver to simply modify one property with a new address to make that new sign.
Path generation
With the model made, it was time to try using the FreeCAD path-generation tooling via the Path Workbench. This is, as previously mentioned, a focus of active development by the FreeCAD community for the 0.19 release.
The Path Workbench’s primary purpose is to generate tool paths based on a 3D-model for my CNC router to follow as it cuts the wood. Tool paths come in various types, and which of them makes sense to use depends on many different variables. Based on the model I was attempting to mill, I selected two primary tool path types: pocket paths and profile paths. Pocket paths cut a “pocket” into the material (such as the two empty spaces in the number “8”), and profile paths trace the edge of a model — primarily used to cut the model out of a piece of stock.
As is common with other CAM software packages, FreeCAD provides a tool manager where users can store the details of the various cutting end mills they have available for their CNC. These tools can then be imported into a job object, to be used during tool path operations that are to be generated. For my project (the name of my street has no closed-loops), I needed to create five separate pocket tool path operations — four for the street numbers “9”, “8” (two pockets), and “4” in my address, and one for the large pocket of the sign itself (the rest of the street address).
I also needed to create a profile tool path operation to cut my sign out of the larger wood stock it was being carved from. When cutting out a model using this sort of method, it is common to create “tabs” that keep the thing being cut out attached to the stock. Without them, as the part was cut out it would begin to loosen or detach completely from the stock in the middle of cutting it. For FreeCAD, this again highlights the object-hierarchy philosophy of the tool. First, the profile-tool path object is created without these cut-out tabs, then the profile-path object is replaced with what FreeCAD calls a “dressup“, based on the original profile-path object as a dependency. There are many different dressups available for a profile-tool path; I used the “tag” dressup. This modification to the profile adds cut-out tabs at reasonably spaced locations on the model. Here is the address sign, complete with all of the generated tool paths needed to carve it out from the stock wood using “LWN” as the sign text:
G-code generation and simulation
Once all the tool paths are created, it is now time to take those tool paths and convert them to a language the CNC controller will understand: G-code. For FreeCAD, this is one of the most impressive aspects of the project I have explored so far. According to the documentation, FreeCAD represents paths in an internal format of G-code and then converts that format into a specific G-code dialect used by a machine in a process the project calls “post-processing”. While in this internal state, however, it can be simulated within FreeCAD to see exactly how the material will be removed from the stock. The simulations help when trying to make sure that the way the CNC will cut things is exactly what you expect it to be — before actually cutting anything. In my project, I frequently ran the simulator to test different settings in my tool paths to find the ones that worked best for the job. Various G-code simulation tools exist, but having one built in and just a click away was nice.
When it is time to export the job to G-code to be sent to the CNC for actual cutting, FreeCAD supports eleven different G-code dialect post-processors along with the ability to add your own. These post-processors take the internal G-code format of FreeCAD and translate it into a G-code dialect compatible with the controller being used. In my case, my CNC runs Grbl on the controller, which is supported by FreeCAD.
Wrapping up
In the end, I would consider the experiments using FreeCAD as my go-to CAD and CAM tool to be a success. While I have various gripes, in fairness I discovered what the project freely admits: FreeCAD’s {“}learning curve can be steep{“}. Part of the reason that the program is difficult to learn is that it has so many capabilities, being suitable for a large array of varying CAD tasks. There are many other features we simply don’t have time to cover, such as being able to write Python scripts to perform tasks, create architectural diagrams, and 2D drafting. With all of these features and complexity, it’s easy to get stuck, but the active FreeCAD community proved itself welcoming and willing to help when it happened to me. For those of us who seek out open-source alternatives, FreeCAD is certainly worth a look if you do any modeling work.