FreeCad – Parametric Design

FreeCAD with SettingsSheet

After seeing a project using a Spreadsheet for customization I did a little research, wrote ‘SettingSheet.py’, published this guide and a video on how to use it. This is an incredibly useful tool that promotes parametric design. Every FreeCAD designer should have it in their toolbox.

Overview

Changes in a design often involve multiple objects and many properties. Using the Gui it takes a lot of pointing and clicking to make a simple change. So I switched to writing macros. In macros I developed a dialog system to collect values from the user but I’ve always felt there was a better solution.

Unexpected Solution

I hadn’t seen using a Spreadsheet for customization in FreeCAD before. To better understand it I replace the dialog in one of my macros with a Spreadsheet.

This is a real game changer. The FreeCAD Gui suddenly became a Parametric Designer. It is rare to run across a simple solution that changes the landscape as much as this one.

Structure

A simple two column list covers all the bases. However, objects with properties present best using a Row/Column grid. ‘SettingsSheet.py’ handles both.

Automation

Laying out properties in a spreadsheet is quick, easy, and intuitive.

Shading can be applied quickly by selecting blocks of cells and changing the background color. Shading Row Labels and Column Headers one color, and value cells another creates a decent looking presentation.

Every value cell must be modified to assigned the correct alias. This can be a tedious task and is prone to user error. Changing a Row or Column label requires changing all of the cells in the row or column .

In summary, layout is quick and easy. Nothing to automate there. Shading can be applied to multiple cells and takes little time. This could be automated but is not significant by itself. There are significant benefits from automating assigning the alias names which justifies the effort of writing a macro.

Design

The task is to automate the assignment of alias names on a spreadsheet using row labels and column headers.

An additional task is to shade label cells and value cells.

Implementation

I have provided the ‘SettingsSheet.py’ macro with a complete guide on how to use it. The macro creates a ‘Settings’ spreadsheet and scans the content to pickup new properties or changes. Label and Value fields are shaded so it is clear they have been processed. Can be added to a project at any time.

FreeCAD with Settings Sheet with value changed

Author: Marc

Leave a Reply