1
0
Fork 0

freecad
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Hamcha 2023-09-13 21:59:07 +02:00
parent 18ed10e433
commit 8a17d6b3d8
Signed by: hamcha
GPG Key ID: 1669C533B8CF6D89
16 changed files with 261 additions and 3 deletions

View File

@ -0,0 +1,255 @@
---
title: "Hobby CAD shootout: FreeCAD"
date: 2023-09-12T10:00:00+02:00
toc: true
tldr: |
I explore FreeCAD for hobbyist use.
FreeCAD is the most featureful of the FOSS options but it's incredibly frustrating to use and IMO not reliable enough for the time being.
However the team [seems to care](https://forum.freecad.org/viewtopic.php?t=75768) so I have hopes for the future.
---
After [looking at one of the best commercial options]({{< relref "cad-shootout-onshape.md" >}} "Hobby CAD shootout: Onshape") around I decided to check out the most prominent open source option.
I already made my point in the previous article on why an open source option is important, but I want to point out some other tools that were once reviled as "convoluted garbage" and either are or are becoming everyone's favorite option:
- [Blender](https://www.blender.org/) is finally giving commercial software a run for their money, it used to be considered the "vim of 3d modeling"
- [Open Broadcaster Software (OBS)](https://obsproject.com/) is *the* streaming (and screen recording) software, to the point that XSplit, its proprietary competitor and the ex de-facto streamer app, has basically pivoted to making OBS accessory software.
This is not exhaustive (there are many browsers, media players, etc.) but they are definitely the rockstars of open source and I wish for FreeCAD to enter that realm.
I'm saying this because I'm about to be say very bad things about it.
## FreeCAD
The name is self explanatory, FreeCAD is CAD software that's [Free software](https://en.wikipedia.org/wiki/Free_software). It uses a modular approach where every part of the application is a "workbench" and toggles part of the UI and contextual actions. The UI is very old fashioned and definitely the most jarring aspect of the first time experience.
Every other software seems to have a better idea of how to only show what's needed when it's needed. My first thought when looking at FreeCAD was "wow this looks so different and complicated, there's no way I can figure this out".
There are some forks of FreeCAD around, most notably [realthunder's FreeCAD Link](https://github.com/realthunder/FreeCAD) which includes an assembly workbench and a sleeker UI. I will however focus on vanilla FreeCAD (0.21 at the time of writing) and I have a note later on explaining why I don't like FreeCAD Link.
## Part & Part Design
Inside you there are two wolves, inside FreeCAD there are two ways to make parts.
I will focus on the "Part Design" workbench as it's the one meant to replicate a feature-based parametric CAD approach, while the "Part" workbench is a bit of a more generalized modeling that's based on CSG and more akin to 3D modeling software (e.g. Rhinoceros).
You are generally not meant to mix the two but you totally can, the FreeCAD wiki has a [document on Part vs Part design](https://wiki.freecad.org/Part_and_PartDesign) explaining in detail differences and caveats (with an example workflow in both).
### Naming conventions
FreeCAD uses different names than what I'm used to. Instead of "Extrude" and "Remove" we get "Pad" and "Pocket". For my own sake I will start using them almost interchangeably but I will favor FreeCAD terminology when I'm talking about their implementations and my own vocabulary when talking about workflow.
I don't know if this divergence is to distinguish Part Design functions from Part functions (Part has a "Extrude" function) but it makes googling solutions even more of a problem than it already is. It's a bit hard to nail this one down since both workflows have their distinct "Fillet" function but then there is inconsistency elsewhere (Revolve vs Revolution).
## Part design is a productivity nightmare
So you finally got to do your first sketch, you draw your surfaces, try to extrude and you get a message... "Wire is not closed", or "Multiple solids" and now the bottom half of your screen is full of red text with python tracebacks, what the heck?
![You're gonna see this a lot](/media/freecad/recompute.png)
### Part design is too principled
Every sketch must define exactly one closed surface, which is a super slow workflow compared to what you can achieve in other tools. Errors are very opaque (an message box during the extrude step will complain "Wire must be closed" with no indication of what to do).
I don't know if this is a technical limitation or design principle the FreeCAD developers are applying here, but it makes it incredibly frustrating to babysit the application because it can't handle more than one surface at a time.
The "one surface per sketch" leads to a bigger number of required sketches compared to other tools which amplifies how bad sketch cross-referencing is in FreeCAD. For example, any time you want to use existing geometry for constraint you have to use the aptly named "Constrain existing geometry" function instead of being able to just click on visible existing geometry. The fact that the existing geometry is also not considered part of the surface makes it very annoying to constraint surfaces that are mostly already just there (for doing cuts, for example).
### You are better off without some features
Sketch mirror outright just don't seem to work properly. Even if it did you can only mirror on the two sketch axis, not any arbitrary line. Even when you get it to mirror the sketch it seems the pad operation just doesn't care anyway.
### You are going to lose data
Several times during my experience with FreeCAD I had constraints just poof out of existance, entire lines just stopped having relations to each others. You **have** to expect this, you **have** to actively look out for this, because it will mess every other constraint you add and leave you with a line soup.
Undo is unreliable and sometimes undoes the wrong thing, breaking the stack and leading to ruined projects, **make backups regularly**.
### Something is wrong with keyboard shortcuts
During one of my recorded test I paused for 1 minute and 30 seconds trying to find how to turn a line from solid to construction. Wanna play that game too?
This is the sketcher's toolbar:
![The Sketcher workbench default toolbars in 3 rows](/media/freecad/toolbars.png)
Now thankfully you can learn keyboard shortcuts to not have to constantly go back and forward but after cycling through my inner hotkey muscle memories of Onshape/Solvespace/etc I was at a total loss for what even is the shortcut to toggle construction lines.
It's **G** followed by **N**.
![(it was this one by the way)](/media/freecad/construction.png)
The hotkey problem gets *worse*.
In FreeCAD, you can constraint by radius or diameter, which is actually pretty neat! You can see all the options tightly packed into a dropdown, selecting one will set it as the active button in the toolbar.
![The radius constraint dropdown, showing 3 different versions of the constraint](/media/freecad/radius.png)
All the constraints share the shortcut "R", and which one gets selected depends on which one is in the toolbar. Why is there such a relation??
Upon further inspection, it seems all tool actually have their own shortcut (K,O / K,S / K,R) but that's never advertised in the UI, the tooltip gives us the "R" key but you have to dig through the Customize menu to get the actual shortcuts:
![The tooltips in the constraint radius/diameter buttons](/media/freecad/tooltips.png)
![The customize menu showing the actual shortcuts](/media/freecad/customize.png)
I don't know wheter I'm at fault here or there is something wrong on how this software manages shortcuts.
## The trials
Lets run FreeCAD through its paces! You can check the [Onshape article](http://localhost:1313/posts/cad-shootout-onshape/#the-trials) for a description of what trials are and how it compares to other tools.
### Test drive: TooTallToby 21-03-07b-HALF SLEEVE
Today's test drive part is another of TooTallToby's practice drawing, specifically [21-03-07b-HALF SLEEVE](https://www.youtube.com/watch?v=lER6M9wOZnI).
Here's the video of my attempt:
{{< rawhtml >}}
<video controls>
<source src="/media/freecad/tootall.mp4" type='video/mp4; codecs="avc1.4D401E"' />
</video>
{{< /rawhtml >}}
There are many things to note, but let's start with the important ones:
#### 1. I do not actually reach the correct solution
This recording was something near my 15th attempt at this. I haven't saved recordings of all of them, but in many I had some bug that broke my flow completely while in others I forgot some details and it was basically impossible to go back and fix, if you don't believe me, here's one where I noticed missing one detail and went back to fix it, just to have the bottom tab sketch completely ruined and kept scrambling trying to understand why it wouldn't fully constrain:
{{< rawhtml >}}
<video controls>
<source src="/media/freecad/constrain.mp4" type='video/mp4; codecs="avc1.4D401E"' />
</video>
{{< /rawhtml >}}
Maybe it was a trivial issue but it really frustrates me when I try 10 times and each time something weird ruins everything.
After 15 or so tries I just gave up.
#### 2. The trim tool destroys constraints
The trim tool works pretty well, but it seems to delete constraints... but only sometimes! Like many tools in the sketcher it seems to cause different issues every time.
#### 3. Doing most things will over-constraint the drawing
I really don't get this. If I'm drawing a line that connects two already horizontally aligned dots, why does FreeCAD add a horizontal constraint *anyway*? It creates a redundant constraint that messes up everything and it seems so easy to avoid. These issues are everywhere and make the sketcher miserable to use.
#### 4. The camera is ass to control
I don't know what their problem is, but both Trackball and Turntables (they have two "turntable" options) orbit systems are very uncomfortable to use. Turntable completely blocks one axis of rotation and seems to always orbit from the wrong place (it places the origin in some imaginary spot at the center of the screen rather than say, the object) and trackball is just insanely finnicky.
I don't know what the others are doing right but if Solvespace can do orbit right then anyone should be able to.
#### 5. I purposely avoid using the sketcher's mirror tool as it is basically broken
Just in case someone wanted to point it out. It's broken and I mentioned sketcher tools generally having issues. I have at least two recordings where I try the mirror tool and while the sketch looks perfect the Pad tool just ignores the mirrored copy.
#### 6. I constantly move the view to the right every time I'm trying to reach something on the left
Now this is a problem with an addon called [Glass](https://github.com/triplus/Glass) that creates "transparent" tree overlays (akin to Fusion, Catia etc), but it's most notable in the realthunder's FreeCAD fork (told you I'd come back to it), so here's a screenshot from that version:
![Screenshot from FreeCAD Link](/media/freecad/realthunder.png)
This looks way better than vanilla FreeCAD, with all the floating transparent boxes wouldn't you think?
The problem lies in the way they work. They are floating and transparent visually, but actually are not transparent to mouse-clicks.
{{< rawhtml >}}
<video controls>
<source src="/media/freecad/fake-transparent.mp4" type='video/mp4; codecs="avc1.4D401E"' />
</video>
{{< /rawhtml >}}
This makes the software a nightmare to use because your instinct will be to click on a feature and half the time there's actually something preventing you to select it. I'm not docking FreeCAD points for this but given how prominent this addon is and how nice it looks I really wish they'd just implement it in the base software without this sort of problem.
### Real world part: Headphone stand
Oh god I committed to drawing TWO parts in this??
The project is simple, I have many monitor and mic stands in my desk and I would like something that clamps on one of them and keeps my headphone at desk level for me to put on and take off. I have the desk headphone stands but those are too easy to tip over (even with enough added weight).
This time even more than last I will very much spare you the video.
Behold:
![Half of something, semi-trasparent](/media/freecad/stand.png)
Something a bit unfortunate about FreeCAD is that there is no "show hidden lines" option for the 3D view, the only way to show inner details is to make the object partly transparent.
FreeCAD supports the major formats for 3D printing (STL, 3MF, STEP), I put all three side by side in PrusaSlicer and while the STEP is still above everything else (mostly because of the curve encoding) it's really hard to notice any difference, FreeCAD's defaults are very good!
![From left to right: STL, 3MF and STEP](/media/freecad/stl3mfstep.png)
The difference, even tho barely noticeable, is completely eliminated when slicing, even at 0.05mm layer height I can't really tell them apart.
![The three versions sliced at 0.05mm with a 0.4mm nozzle](/media/freecad/sliced.png)
File sizes seem pretty good too:
| File | Size |
| ---------- | --------: |
| stand.STL | 132.0 KiB |
| stand.3MF | 31.7 KiB |
| stand.STEP | 27.3 KiB |
### Making drawings
Making drawing is a breeze! Once again I'm happy to not be in charge of making any kind of technical drawing cause my career would be over instantly, but so far save for having to look up a couple things I can't really say I have had any trouble getting a page with 4 views and even a section view done!
Here's a really bad drawing of the part above, I want to stress that the fact that the quality is atricious is completely my fault and not the program's (also, colors were altered to avoid a flashbang effect, it's normally black on white):
![A ""Technical"" ""drawing"" of the headphone stand half-piece](/media/freecad/drawing.png)
When in the app the drawing is shown with tons of label and extra things which I assumed would end up in the final print but didn't. I guess they are just for reference and you're just supposed to put your own (which is good, because the built-in labels can't be positioned around much).
### Multi-part
You can have as many bodies as you want within a model file and you can import bodies from other files, it works OKish. While importing and adding bodies is quite seamless, you have to use [ShapeBinders](https://wiki.freecad.org/PartDesign_ShapeBinder) as soon as you need to have multi-body constraints and it becomes quite hairy... but still doable!
As an example this is the top half of a "keyboard controller" thingamajig I did a while ago, using Cherry MX mounts from an external file (also a FreeCAD project) applied to a surface:
![The "DJMAXX", soon to be replaced by the "DJMAXXX" which will be 18+ only](/media/freecad/djmaxx.png)
### Export options
FreeCAD has an enormous amount of export formats. I covered STL/3MF/STEP but there are many more, though I really doubt most of these see active use and might have rather been someone just adding it for the sake of it (VRML?? what year is this??)
Surprisingly the more CAD-y format from last time don't show up. The selection includes plenty of 3D modeling formats (Collada, OBJ, glTF) and 2D formats but the only CAD software format I could spot is .IV (Open Inventor) and... OpenSCAD? Sadly it's not some magic way to convert your part into a procedural OpenSCAD file as much as a hardcoded list of vertices.
I assume supporting the other formats might require access to proprietary SDKs or maybe they just haven't had anyone ask for them yet, I think supporting STEP is honestly more than enough for what I'll ever need anyway.
Oh, and you can export a body to... a self-contained HTML page with a ThreeJS script to have a orbit camera around it, and would you believe it even there the camera works better than in FreeCAD!
![The HTML export (with a darker background than normal)](/media/freecad/threejs.png)
### Assemblies
Assemblies in FreeCAD come in two ways: the "do it yourself" way and the "addon roulette of death" way. This is because FreeCAD does not come with an assembly system of its own, but the existing tools can be used somewhat to fake having one and there are multiple competing addons trying to be *the* Assembly workbench:
- ~~Assembly2~~ (unmaintained and old)
- [A2Plus](https://wiki.freecad.org/A2plus_Workbench)
- [Assembly3](https://wiki.freecad.org/Assembly3_Workbench)
- [Assembly4](https://wiki.freecad.org/Assembly4_Workbench)
Despite their names they are mostly unrelated and incompatible. Assembly3 is worthy of note because it's from realthunder and their fork has it built-in.
I briefly tried A2Plus and Assembly4 and both were quite confusing to me and even after a couple videotutorials I couldn't get a basic connection done (but then again I find struggling to mirror a part in this software sometimes). It might be that I just need to fiddle more and give it more time but I think I will just wait for FreeCAD to have a built-in assembly system before going back to it.
### Sheet metal
Hey it's that one thing I'm not good at again! Sheet metal is also not part of FreeCAD itself but there is a sheet metal add-on that's popular enough to have its [own section](https://wiki.freecad.org/SheetMetal_Workbench) in the wiki, so I'm considering it for this overview.
This time, I tried replicating [TooTallToby-21-01-02](https://www.youtube.com/watch?v=100hrS7OT0E) and... well I succeeded!
![Sheet metal part within tolerance!](/media/freecad/sm.png)
It turned out to be a bit more rough than with Onshape but I managed to keep it mostly hack free, it would have been much smoother with symmetry but I didn't wanna risk it so I took the long route.
You can even unfold it and generate proper drawings, though it's not as straightforward and it doesn't come with a neat list of bends like in Onshape.
## Conclusion: The pieces are there but hardly a reliable pick
FreeCAD shows promise and if their last [user meetup notes](https://forum.freecad.org/viewtopic.php?t=75768) are anything to go by, they care. It's just not there yet. I like to think of the current state of FreeCAD as the earlier versions of Blender (2.4 and earlier): buggy, missing core features, messy defaults (think right click select) and you had to adapt to their workflow instead of creating yours.
I'm sure the FreeCAD team can sort out the bugs, the bigger question is if they can make it not as frustrating to use in general, some of the problems are clearly due to their dogmatic approach and unpolished modular system and some hard to solve bug.
For professional use I think FreeCAD is a non-starter in its current phase, but if you're just doing this for fun like me then it might not be so unreasonable.
I will explore other open source solutions in the future, some I've used already (SolveSpace) some not (SALOME) but I can tell you right away FreeCAD sits at the top of the ones I've tried (spoilers, I guess) and unlike Onshape and Fusion it can't really get *worse*.

View File

@ -78,7 +78,7 @@ My trials will be as follows:
I'm not a speedmodeller but I could get this done easily, check my video here for the workflow:
{{< rawhtml >}}
<video controls width='100%'>
<video controls>
<source src="/media/onshape/tootall.webm" type='video/webm; codecs=av01.0.05M.08' />
<source src="/media/onshape/tootall.mp4" type='video/mp4; codecs="avc1.4D401E"' />
</video>
@ -127,7 +127,7 @@ I love assemblies in Onshape even though I use them in a very basic way, basical
The most complex use of assemblies is actually from my very first use of Onshape back in 2017 when I was planning a mini combat robot (which sadly never went anywhere). I modeled all the off the shelf parts and even set rotation hinges:
{{< rawhtml >}}
<video controls width='100%'>
<video controls>
<source src="/media/onshape/robot.mp4" type='video/mp4; codecs="avc1.4D401E"' />
</video>
{{< /rawhtml >}}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 KiB

BIN
static/media/freecad/sm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

View File

@ -95,6 +95,9 @@ $h3-color: #d1c5f8;
color: $caption-color;
margin-top: 0;
}
video {
max-width: 100%;
}
}
.toc {

View File

@ -6,7 +6,7 @@
{{ if .Title }}
<p>{{ .Title | markdownify }}</p>
{{ else if .Text }}
<p>{{ .Text }}</p>
<p>{{ .Text | htmlUnescape }}</p>
{{ end }}
</figcaption>
</figure>