Amongst the built in col­lec­tion of FreeCAD work­bench­es, you may have noticed one for cre­at­ing and work­ing with spread­sheets. Whilst you could use this to track your expens­es, let’s look at an exam­ple project where a spread­sheet is real­ly use­ful! As a quick reminder, when we write tuto­ri­als we call tools by the tool tip names that appear when you rollover tools and show them as ital­ic text in the article.

The aim of the project is to cre­ate a trapez­i­um shaped sketch pat­tern for a pan­el or “gore” of a mod­er­ate­ly com­plex annu­lar para­chute. The para­chute project isn’t real­ly impor­tant, but it gives a good exam­ple of how a spread­sheet can be used in a para­met­ric design. When design­ing an annu­lar para­chute you make two fun­da­men­tal choic­es, one is the num­ber of ‘gores’ or pan­els you require and then a tar­get ‘design diam­e­ter’. All the oth­er dimen­sions for the indi­vid­ual gore pat­terns and the line lengths are then derived by sim­ple numer­i­cal cal­cu­la­tions using the gore num­ber and design diam­e­ter. Often the pan­els are cut using a laser cut­ter so being able to quick­ly gen­er­ate a sketch and then export the design as a .dxf or .svg file is real­ly useful.

To begin let’s cre­ate a new project in Part Design, click to cre­ate a body and then cre­ate a sketch in the XY plane. Next select the Cre­ate poly­line tool and draw a trapez­i­um with the base line coin­ci­dent to the X axis line. Click the Tog­gle con­struc­tion geom­e­try tool and then click the Cre­ate line tool and then lets draw a con­struc­tion line from the zero point con­nect­ed ver­ti­cal­ly to the top­most hor­i­zon­tal line. Final­ly let’s con­strain the upper and low­er hor­i­zon­tal line end points around the y axis line with the Con­strain Sym­met­ric tool.

Close the sketch and next let’s jump over to the spread­sheet work­bench. In the spread­sheet work­bench click the Cre­ate spread­sheet tool icon and you should see a new tab open with an emp­ty spread­sheet appear. In cell A1 and cell A2 we’ve added some text labels for Design Diam­e­ter and Num­ber of Gores and then we can input those val­ues in cells B1 and B2. We’ve put 1800 mm and 12 gores in for now, but when we return to this project to design spe­cif­ic para­chutes we can alter these values.

Below this we’ve added a lot of labels for all the dif­fer­ent dimen­sions which are cal­cu­lat­ed from the two main input para­me­ters. Most of these are just ratios of the Design Diam­e­ter para­me­ter or oth­er sim­ple cal­cu­la­tions. We can cre­ate these sim­ple cal­cu­la­tions by adding small expres­sions to each cell. So for exam­ple the height of each gore is a sim­ple ratio of the Design Diam­e­ter mul­ti­plied by 0.304 . To cal­cu­late this in cell B6 which we labelled for gore height we insert;

=B1 * 0.304

We then added sim­i­lar small for­mu­la for the dimen­sions need­ed by the sketch, these are the gore pan­el width at the top and bot­tom. The oth­er items in the spread­sheet are oth­er dimen­sions need­ed to cre­ate a para­chute of this design such as the var­i­ous line lengths etc. If you are inter­est­ed the FreeCAD project is over on this repos­i­to­ry.

With our for­mu­lae now return­ing the para­me­ters we need we can return to the sketch and use the spread­sheet val­ues loca­tions to cre­ate and update con­straints. We can click the upper hor­i­zon­tal line and apply a length con­straint. Instead of typ­ing a fixed val­ue into the “Insert Length” dia­logue box direct­ly we click the small expres­sion edi­tor but­ton that looks like a blue cir­cle with “f(x)” writ­ten inside. This launch­es the Expres­sions edi­tor dia­logue and in this we then type “Spreadsheet.B8” as the loca­tion of the val­ue for the length of this line. EDIT! Over on Mastodon Michael excel­lent­ly sug­gest­ed that instead of click­ing the “f(x)” but­ton sim­ply click­ing the “=” key in a con­straint dia­logue box direct­ly launch­es the Expres­sions edi­tor. Thanks Michael.

Click­ing OK we see that the val­ue cal­cu­lat­ed in cell B8 is now applied to this length con­straint. We repeat the process adding the loca­tions to the gore width at bot­tom and final­ly set a height val­ue for the con­struc­tion line we added ear­li­er link­ing to the cell B6. With the three con­straints set up with para­me­ters we see the sketch is ful­ly con­strained. Notice though that should we require a total­ly dif­fer­ent size annu­lar para­chute design with a total­ly dif­fer­ent num­ber of gore pan­els we sim­ply update the 2 orig­i­nal val­ues, the design diam­e­ter and the num­ber of gores and our new pat­tern is instant­ly cre­at­ed. We can close the sketch and then it’s sim­ple to export the sketch when it comes to want­i­ng to laser cut or print and cut­ting a gore or pattern.

Hope­ful­ly this served as a nice exam­ple of how sim­ple spread­sheets can aid para­met­ric design, that said, if any read­ers get into build­ing para­chutes using FreeCAD we’d love to hear about that as well!


Discover more from FreeCAD News

Subscribe to get the latest posts sent to your email.

5 responses to “Tutorial:Getting Started with Spreadsheets and Parametric Design”

  1. nieces3 Avatar

    Unless I’m real­ly con­fused (quite pos­si­ble), the text refers to B8, but the draw­ing has gore height (B1*.304) in B6.

    1. Jo Hinchliffe Avatar
      Jo Hinchliffe

      Erm so a lit­tle of both maybe! You are cor­rect that B6 is the gore height, but when I refer to B8 in the text I’ve explained that I am adding a con­straint to the upper hor­i­zon­tal line (the gore width at top) so it is correct.

      1. Jo Hinchliffe Avatar
        Jo Hinchliffe

        OH NO! You were cor­rect.. I see now I did say B8 ear­li­er in the text… I’ve cor­rect­ed it now! Thanks.

  2. Dirk Avatar
    Dirk

    I have two comments:
    1) I pre­fer to add the units of mea­sure­ment also in the cells eg. 100mm instead of just 100. Some for­mu­las get con­fused if you do not do that. It also get rid of pos­si­ble ambiguity.
    2) I do not refer to a spe­cif­ic cell eg. B8, but much rather give a descrip­tive name to the cell. In the for­mu­la I then refer to the descrip­tive name and not the cell. When you have many vari­ables it aids in read­abil­i­ty, but more impor­tant­ly, since FreeCAD “pre-empts” the object names as you are typ­ing it in the expres­sion edi­tor, it is quick­er to add new para­me­ters to your mod­el and you do not con­stant­ly have to revert back to the spread­sheet because you for­got the address…

    1. Jo Hinchliffe Avatar
      Jo Hinchliffe

      Hi Dirk, both of these are excel­lent ways of work­ing. For your first point though, I tend in this type of design to not assign units as then the spread­sheet works regard­less of the base units you have set in FreeCAD. As essen­tial­ly the spread­sheet returns frac­tion­al val­ues then you could work in any unit with no changes. As ever.. there’s no right way.. just lots of dif­fer­ent ways.

Discover more from FreeCAD News

Subscribe now to keep reading and get access to the full archive.

Continue reading