|
|
Subscribe / Log in / New account

Checking out FreeCAD

By John Coggeshall
August 5, 2020

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 and C++. 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"):

[FreeCAD Address Sign]

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:

[FreeCAD sign tool paths]

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.



to post comments

Checking out FreeCAD

Posted Aug 5, 2020 20:11 UTC (Wed) by halla (subscriber, #14185) [Link] (1 responses)

Thanks for this really interesting read :-) It introduced me to something I didn't know anything about -- CNC -- but I still have a hard time imagining a machine cut a wooden spoon, instead of a retired seaman near the fireplace!

Checking out FreeCAD

Posted Aug 6, 2020 7:20 UTC (Thu) by coogle (guest, #138507) [Link]

I'm glad you enjoyed it! If you're interested in CNC stuff more, I'd encourage you to check out the article I wrote linked in the opening paragraph as well. I'm quite serious about returning back to making some personalized cooking spoons - I think they'd both make great presents *and* help me clear out a bunch of scrap wood from my workshop.

Checking out FreeCAD

Posted Aug 5, 2020 21:25 UTC (Wed) by logang (subscriber, #127618) [Link] (2 responses)

I've tried FreeCAD a number of times and I'd really like to be able to use it. However, every time I try to design something relatively simple in it I spend hours just fighting with basic concepts and trying/failing to reproduce steps from the documentation or forums. I eventually get so frustrated that I just abandon the tool and do the job in Solidworks which takes a tiny fraction of the time and effort.

The learning curve being steep is a significant understatement. I want to use the open/free tool but just can't get over that hump for it to be useful. I think this is a huge problem for the project.

Mixing and matching...

Posted Aug 6, 2020 1:26 UTC (Thu) by michaelkjohnson (subscriber, #41438) [Link]

Since you mention Solidworks, here's some comparison from someone who has played with both and is expert in neither.

My son and I made an air hockey table together, primarily parametrically modeled in FreeCAD. He watched quite a series of tutorials and was able to guide me to things I missed as we worked together. We initially modeled all the 3D printed elements in OpenSCAD. I was not satisfied with our first attempt at modeling a goal in OpenSCAD, because it was unlikely to print well without supports, and tried another design in FreeCAD (due to fillets and chamfers being hard and typically computationally slow in OpenSCAD). However, an attempt to shell a filleted object caused an inscrutable (but apparently common) error in OpenCascade kernel in both the stable and development versions. Ultimately, we ended up making the same model in Solidworks successfully and printing it. Also, FreeCAD lost its mind when I tried to model the holes in the air hockey table surface; 1081 holes with a two-dimensional pattern feature was too much complexity. For the other holes we did drill with FreeCAD CAM, the GRBL post-processor had a bug in drill cycle processing that used a much too slow feed rate, so we fixed those up by hand afterwards.

So we ended up with quite the mish-mash:

* Hand-written python to write gcode to drill holes in the surface.
* FreeCAD for the main table design CAD and CAM, with manual fixes for drill cycles
* OpenSCAD for corner inserts
* Solidworks for goals and some pucks

I first learned FreeCAD, and then learned some Solidworks, and discovered that what I learned in Solidworks helped me in FreeCAD. For instance, I never guessed until after using Solidworks that the = key would bring up the equation editor without me having to click on a tiny button at the end of the entry widget until after I got in that habit in Solidworks.

One of the things I love in FreeCAD is the symmetric constraint. I keep finding that the symmetric constraint makes a lot of sketches easier that are rather fiddly in Solidworks. In Solidworks, I end up hunting for midpoints and drawing extra construction lines to create constraints that would be a trivial symmetric constraint in FreeCAD.

One of the things that I miss from Solidworks when I'm using FreeCAD is a sane naming system that makes cascading references usually work when modifying early parts of the design tree, and usually easy to repair when it doesn't guess right. By contrast, the FreeCAD tutorial and UI guides you through creating sketches on faces and then after you have a design fall apart, someone on the forums wonders why you didn't know about the "topological naming problem" page on the wiki which says that you shouldn't put sketches on faces and should instead jump through extra hoops to create reference planes for every new sketch. So for me, Solidworks has been much more effective for exploratory modeling; FreeCAD tends to fall apart when a later part of the design demonstrates the need for a change early in the design tree. Both work better if you have enough of an idea what you are trying to do to create a reference sketch or sketches at the top of the design tree.

Both FreeCAD and Solidworks train me to save early, save often. Crashes and unexpected oddities that go away on quit and restart are par for the course. Somewhat more often on FreeCAD, but then I use the development versions almost exclusively.

One of the nice FreeCAD surprises for me was that the TechDraw workbench, though it has its quirks, is actually quite capable, especially in the 0.19 development versions. I find its stacked dimensions to be really easy to manipulate relative to the competition, and I like designing parts for manual machining in FreeCAD because I've found TechDraw convenient for making drawings to work from. I have no engineering experience, so probably anyone who knows what they are doing would scoff at my drawings, but then I'm the only one who has to read them! ☺

Checking out FreeCAD

Posted Aug 14, 2020 0:55 UTC (Fri) by saxa (guest, #30413) [Link]

I completely agree with you. I have tried freeCAD in thepast and its quite some time from last time I used it. But I have to admit that it has a lot of potential, it is just a different concept in some things. I also like Solidworks and miss really
a tool like it in Linux. Thanks for the nice review.

Checking out FreeCAD

Posted Aug 5, 2020 22:48 UTC (Wed) by dgc (subscriber, #6611) [Link]

Hi John,

It seems your initial experience with FreeCAD matches mine, only I went through that learning curve more than 5 years ago. Not much in terms of "user experience" appears to have changed in the last 5 years.

FWIW, my talk at linux.conf.au back in 2016 might be relevant here: "Designing a Race car with Open Source Tools".

https://www.youtube.com/watch?v=VigVEbeTtXM

I used FreeCAD extensively, especially the python scripting capabilities to develop and test the chassis. I talk about integration with open source finite element analysis tools, exporting models and integrating with open source CFD tools, etc. I didn't get into the CNC side of things, because at the time the CAM capabilities were extremely rudimentary and I hadn't started to use them.

I eventually did use them to design (with FEA) and then make stuff like suspension bellcranks out of 7075 on my KX3:

https://flic.kr/p/DGvDaq
https://flic.kr/p/GJZrR2

FreeCAD didn't generate the specific dialect of gcode that my mill used - it generated something close, but they had to be hand-mangled to run correctly. As such, I found CAMotics was great for simulating the CAM paths that FreeCAD generated in software. I caught many errors (both mine and the tool path generator's) in simulation immediately after generating the toolpath from FreeCAD, long before it went anywhere near the CNC mill. Hence I highly recommend having some method of toolpath verification to avoid a bad toolpath crashing the CNC...

https://flic.kr/p/ZQ9uao

Unfortunately, none of the python scripts I wrote for these models work anymore. The saved build models don't even load in a modern FreeCAD build. That's because - as I talk about in the presentation - the internal object model of FreeCAD changes over time and it is directly exposed to users via the workbenchs and python scripting interfaces. So any time the object model changes, scripts break and models need reworking....

IMO, FreeCAD is like most open source software: very capable, features are always improving, but it is not very user friendly....

-Dave.

Checking out FreeCAD

Posted Aug 6, 2020 0:08 UTC (Thu) by gerdesj (subscriber, #5446) [Link] (1 responses)

"My first test: a spoon"

There is no spoon. Anyway, getting to grips with a decently complicated CAD app is never a trivial path. I know people who use CATIA and AutoCAD etc for multiple decades, who still find stuff out about their weapon of choice.

I'm a PHB and sysadmin (with a 3D printer, soldering iron, breadboards, wires etc on my WFH dining room table) and I can recall deploying CATIA workspaces via Zenworks a few years back for a customer. It took me as a consultant and the local IT boys several days to get all the environment variables sorted out and all the other customizations. We did a pretty decent job: add a user to a series of eDirectory groups and their CATIA would be delivered within a fag break with all the right things in place, even on the pile of shite (I wonder who get's that.) That's just to deploy the sodding thing, not use it!

I'll bet an invested reader of this comment didn't simply blow a few (*cough*) £1000 on CATIA, SolidWorks, AutoCAD or whatever, fire it up and start cranking out stuff.

You cannot sit down with FreeCAD or say Blender or the like and have a quickie (fnar). You need months or years to get to grips with the basics and proceed gently and gradually to puissance or something approaching expertise. There is no fast path.

Whilst you are at it don't forget LibreCAD and OpenSCAD.

Checking out FreeCAD

Posted Aug 6, 2020 10:23 UTC (Thu) by dottedmag (subscriber, #18590) [Link]

I respectfully disagree: UX matters a lot.

I have just started using CAD software for 3D modelling and printing.

I have tried using ($0, not open source) Autodesk Fusion 360 and FreeCAD, and Fusion 360 is so much less frustrating to use just due to a better UX.

FreeCAD shines when it comes to parameterisation of the models, but drafting 2D sketches in FreeCAD is infuriating pixel hunting, and I don't suppose it's going to change as I get more experience.

Minor point: C++ as well as Python

Posted Aug 6, 2020 6:10 UTC (Thu) by CChittleborough (subscriber, #60775) [Link] (1 responses)

I was surprised to read that FreeCAD was “written in Python”, so I took a look at FreeCAD’s GitHub page and found that they code in C++ as well as Python.

Minor point: C++ as well as Python

Posted Aug 6, 2020 7:09 UTC (Thu) by coogle (guest, #138507) [Link]

Thanks for pointing that out, I updated the article!

Checking out FreeCAD

Posted Aug 6, 2020 6:59 UTC (Thu) by hei8483j (guest, #124709) [Link] (1 responses)

I think it is worth mentioning that FreeCAD uses the Open Cascade Technology (OCCT) CAD kernel, which was initially a commercial CAD technology, open sourced in 1999.

I learned the basics of FreeCAD in the spring this year. My previous experience with CAD was a 2D CAD class during my studies a long time ago. Learning FreeCAD is hard if you just search youtube for learning videos, because there are a lot of them and most are outdated. Some basic concepts have changed in the last few releases. It is absolutely recommended to follow the project's own wiki pages and instructional videos. In particular it is worth mentioning that with the Part Design workbench, the idea of attaching sketches to datum planes instead of surfaces or external geometry became a thing in version 0.17. This is crucial for stable models where you can change details afterwards without the model disintegrating.

I also recommend trying out the 0.19 development version. It is quite stable (I haven't crashed it yet), it is faster and more complete. The appimage works fine on different Linux distributions. Personally I use the 0.19 nightly build Fedora Copr repository.

Checking out FreeCAD

Posted Aug 7, 2020 21:31 UTC (Fri) by sur5r (subscriber, #61490) [Link]

Regarding videos on YouTube, I found the ones by "Joko Engineeringhelp" very helpful, also because they are based on 0.18[.4].

Checking out FreeCAD

Posted Aug 11, 2020 15:27 UTC (Tue) by robert_s (subscriber, #42402) [Link]

If you wanted to continue this series it might be interesting to give solvespace a go.

Checking out FreeCAD

Posted Aug 18, 2020 15:27 UTC (Tue) by drmacro (guest, #140855) [Link]

As a long time user of FreeCAD and an even longer CAD professional (before retirement) here are some thoughts for new users.

FreeCAD is a parametric solid modeling package whose primary user base is mechanical types and architects. I.e. people who make rectangular/round things with holes and windows. It is not a mesh modeler. Therefore if you choose, as a first project, to make tableware (arguably a task better suited to Blender), don’t expect it to be easy.

Yes, the documentation is not user instruction or training material. Yes there are a plethora of workbenches. But, there are really only three workbenches (Part, Part Design, and Sketch) that the new users needs to get a grip on. (Possibly four if you include Draft, which is required for some things…) And you need to go to a couple different workbenches to accomplish some things. But, how would you present hundreds of functions to a user? If you have some of those that you feel should always be present, then it’s really easy to make you own workbench that includes those you want.

When I hear comments about struggling for hours, this is typically because of the plethora of videos that are long on the “do this” and not the “why do this”. And, preconceived notions of what it "should" do. (Not to mention, the choice of attempting to do meshy/curvy things as a first project.)

The concepts are pretty easy; you draw an outline of a lump of material you want to make and then give it depth or height to make it a 3D lump. Then you draw another outline of something you want to either add to the lump, or take away from the lump. Repeat until the resulting lump is shaped as you desire. The process of doing this is a bit different in Part and Part Design, but the concept is the same.

The path workbench is really a pretty new tool and is evolving daily, so if you want to do 5 axis CNC or even advanced 3 axis, then you might want to wait a while and export your model.

Oh, and don't install 0.18, 0.19 has been available for over a year and has had a LOT of improvements. (A few thousand commits, in software geek terms.) 0.19 is under heavy development and thus has not been deemed the stable release. I've used the daily build of 0.19 for over a year with no particular issues.


Copyright © 2020, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds