Designing a small cabinet using FreeCAD and spreadsheets

FreeCAD incorporates a spreadsheet workbench that allows you to create a spreadsheet of design parameters that can be used in your models. The spreadsheets can be imported and exported allowing them to be shared between projects and models, allowing reuse and consistency between designs.

This article will describe how I used Excel and FreeCAD's Spreadsheet Workbench to design a small cabinet. This is a follow-up article to my Designing with spreadsheets in FreeCAD article.

I wanted to understand the extents to which I could use an Excel spreadsheet in FreeCAD before it started to become too unwieldy. A small cabinet would give me a sufficiently complex project to understand the pro's and con's of this method.

Designing the Cabinet

I have seen mixed results with the BIMDAS rules in FreeCAD's Spreadsheet Workbench so I explicitly insert parentheses in every formula when I have mixed multiplication/division and addition/subtraction operations. Excel seems to deal with it correctly, but FreeCAD doesn't always.

I wanted to explore how the Spreadsheet Workbench could be used in my furniture design workflow because it may help to increase my productivity. I didn't want to design one-off components so I chose to design a cabinet that is relatively simple in appearance but has a lot of design elements from in practice.

The cabinet I designed has:

  1. Two graduated drawers;
  2. A cupboard with a door;
  3. A display area;

I chose to design most of the detail that goes into the construction of the cabinet to understand the time required to do so, but I discovered that most of the components do not need to be modelled to that degree. For example, I modelled the dovetails used to join the sides of the cabinet to the top and bottom, but this consumed a fair bit of time. A better option would have been to simply model the top, bottom, and sides as a solid board and leave the placement of the dovetails to the construction of the cabinet.

Note

Designing the joinery without much detail may not be appropriate if you are modelling components that are going to be produced by a third party or on say a CNC machine. You would probably be better off modelling all the details in these situations as it will provide more information to the manufacturer.

Preparing the spreadsheet

Warning

You need name the Spreadsheet cells that you want to use in FreeCAD otherwise you will not be able to use them. Unfortunately, there is NO EASY WAY to have Excel show that you have not named a cell. The FreeCAD Spreadsheet Workbench highlights them in yellow which makes them easy to identify.

I started by creating an Excel spreadsheet which I listed all the design parameters that I thought were required. I split the parameters into logical groups so that I could keep related parameters together.

For many years I have setup my spreadsheets so that cells which I expect the user to enter values have a grey background as it makes it easier for people to see. I entered all the design parameters that I expected to be "hard" values such as:

  • Overall cabinet height and width;
  • Thickness of the cabinet sides;
  • Ratio of the size of the drawer box to the overall height of the cabinet;
  • Ratio of the size of the cupboard to the overall width of the cabinet;

Note

The number of functions available in Excel greatly exceeds those available in FreeCAD's Spreadsheet Workbench, AND they don't always take the same number of parameters.

I then started to create the formulae that will compute the parameters that would be used in the design. For the most part I create simple formulas that utilise multiplication, division, addition and subtraction, because these are imported into FreeCAD.

I prefer to use the trunc() function to convert an number to an integer because it is available in both software packages, AND it takes the same number of parameters. The round() function is available in both packages but doesn't take the same number of parameters which is why I don't tend to use it.

Important

I have seen mixed results with the BIMDAS rules in FreeCAD's Spreadsheet Workbench so I explicitly insert parentheses in every formula when I have mixed multiplication/division and addition/subtraction operations. Excel seems to deal with it correctly, but FreeCAD doesn't always.

What did I learn?

Overall the design process worked well, the limitations of the FreeCAD Spreadsheet Workbench not withstanding. It was a bit painful to have to fix the imported spreadsheet each time but it was not an insurmountable problem.

Designing the joinery without much detail may not be appropriate if you are modelling components that are going to be produced by a third party or on say a CNC machine. You would probably be better off modelling all the details in these situations as it will provide more information to the manufacturer.

Benefits

  1. Component dimensions are consistent between models;
  2. Models can be easily created from the spreadsheet;

Disadvantages

  1. Spreadsheets are not linked to the model meaning that any change must be made in all models using the spreadsheet.
  2. Function names are imported in uppercase causing an error to occur.
  3. Functions may have different numbers of parameters causing an error to occur.
  4. Excel does not show that a cell has been named making it easy to forget to name a cell which is then not available for use in the FreeCAD model.

Conclusion

Let me know your thoughts in the comments below.