Pico’s Prints: FreeCAD Parametric Rescue

Pico Bolero
3 min readAug 18, 2023

--

Hello friends! I wanted to share something with you regarding #3Dprinting. I was browsing Mastodon in the Fediverse and came across a person expressing that they were frustrated and struggling using Blender to create a model. They posted a picture of a part they wanted as an STL (3d printable) file. “I can do that and teach them something too! Pico to the rescue!” After completing the model, I found out that I was too late to the party as the Mastodon client I was using did not bring in all the replies and I didn’t realize that they had already received the help that they needed! I thought to myself, “dang… whelp… might as well blog about it. People want to hear about the FreeCAD process and parametric models, right… right?” Quite a few people chimed in that CAD is what you want to use when you are designing parts and I heartily agree. The best part of CAD is parametric modeling. Simply put, you can change the model very easily by editing the parameters.

From left to right, a hand drawn image of a part; a spreadsheet with parameters; a FreeCAD rendering of the part.
From concept to implementation: original drawing; a spreadsheet with the dimensions; the FreeCAD Part Design workbench with rotated Sketch

Recently, I have been learning FreeCAD version 0.20.1. Given the price, I am a fan. It has some real frustrating idiosyncrasies that one must learn to work around. However, it is great at parametric modeling! One also has to embrace the workbenches and workflow instead of fight against them. The workflow looks like this: create a spreadsheet to hold the parameters; create master sketches for the different profiles; create parts and local sketches based on clones of the master sketches. The following workbenches are used:

  1. Spreadsheet — to name and set the parameters
  2. Sketcher — to draw the profiles in different dimensions
  3. Draft — this limited to making clones of master sketches;
  4. Part Design — turn the sketches into 3d shapes

A thing of beauty emerges when there is a fully constrained and parameterized sketch. You now have a flexible model that can be reconfigured with a couple of edits to a spreadsheet. A word of advice: do start with parameters first and keep fiddling with them to make sure your model doesn’t break. The example model has a simple and unsafe parameterization. It is really easy to get into a state where the model gets corrupted. To prevent this one must use additional expressions like min() in the spreadsheet so that negative values do not occur.

Multiple renderings of sketches and models using different parameters.
Multiple renderings of sketches and models using different parameters.

After you’re done with your model, you can post it to a model sharing website of choice or github to collaborate with friends. Thank you for reading!

I would like to take a small detour and share my thoughts on OpenSCAD. I started out with OpenSCAD as it looked like it would fit well with my programming skills. The drawbacks that turned me off to the project was the need to offset models by a fraction to join them together. That seemed to have a cumulative effect the more complicated the model became and tracking the offsets became burdensome. Then there is issue of variables: variables are bound to expressions and keep a single value during their entire lifetime. With a term like ‘variable’ I would expect them to be… variable.

You keep using that word, I do not think it means what you think it means. — Inigo Montoya

--

--

Pico Bolero

A person that wants to make the world a better place. Find me in the fediverse @pico_bolero@sunny.garden