Parametric modeling means building a model from named values and relationships, such as shelf_width and shelf_count, instead of fixed dimensions, so changing one value rebuilds the whole part. The recipe in this guide: define five user parameters, add one derived value for the shelf spacing, constrain every sketch to those names, then pattern a single shelf with a count and a spacing taken from the parameters.
The steps work in Autodesk Fusion, Onshape and FreeCAD. Their menu names are checked against each vendor’s current documentation and listed side by side below. The example is a small open-front shelf unit sized for a desktop printer (180 x 150 x 100 mm, 3 mm walls, two shelves). Those numbers are examples, not recommendations: check them against your own bed and nozzle.
The consumer toolchanger 3D printer: the SnapSwap 4-toolhead system swaps heads in 5 seconds for true multi-color and multi-material printing, with smart calibration and auto filament loading.
- 4 toolheads · 5 s swap
- Up to 500 mm/s · 20,000 mm/s²
- 270 mm cube build volume
- Multi-color & multi-material

Resizable shelf in 7 steps
- Choose your parameters: width, height, depth, wall thickness and shelf count.
- Create them as user parameters (Fusion), variables (Onshape) or spreadsheet aliases (FreeCAD).
- Add one derived parameter for the spacing between shelves.
- Sketch the outer rectangle and extrude it. Constrain the dimensions with parameter names.
- Cut the cavity, leaving the walls.
- Add one shelf, then pattern it using the count and the spacing.
- Change each parameter and watch the model rebuild.
Plan the parameters first

Decide what must be adjustable and what follows from it. Five inputs are enough for the shelf; the spacing is calculated.
| Parameter | Example value | Type | Role |
|---|---|---|---|
| shelf_width | 180 mm | Length | Overall outside width |
| shelf_height | 150 mm | Length | Overall outside height |
| shelf_depth | 100 mm | Length | Front-to-back depth |
| wall | 3 mm | Length | Thickness of sides, top, bottom and every shelf |
| shelf_count | 2 | Plain number, no unit | Internal shelves, not counting top and bottom |
| shelf_pitch | (shelf_height – wall) / (shelf_count + 1) = 49 mm | Length, calculated | Distance from one shelf’s bottom face to the next |
Where does the pitch formula come from? The unit has shelf_count + 2 panels of thickness wall and shelf_count + 1 equal openings. Each opening is (shelf_height – (shelf_count + 2) x wall) / (shelf_count + 1). Add one panel thickness and you get the pitch, which simplifies to (shelf_height – wall) / (shelf_count + 1). With the example values, openings are 46 mm and the pitch is 49 mm. Shelf number k then has its bottom face k x shelf_pitch above the bottom of the unit.
Use descriptive names. Short names can collide with units or cell addresses: FreeCAD rejects an alias such as W because it is the unit for watts, and a name like AB123 because it looks like a cell address.
Where each program keeps its parameters
| Task | Fusion | Onshape | FreeCAD |
|---|---|---|---|
| Store the values | Modify > Change Parameters, then Add User Parameter: Name, Expression, Unit | Variable feature in a Part Studio: name, type (Length, Angle, Number, Any), value | Spreadsheet workbench: values in cells, each given an alias (Ctrl+Shift+A) |
| Use a value in a field | Type the name; Fusion suggests matching parameters | Type # and the name, for example #wall | Type = to open the expression editor, then Spreadsheet.wall |
| Derived value | Expression such as (shelf_height – wall) / (shelf_count + 1) | Same expression in the variable’s value field | Cell formula starting with =, using the aliases |
| Pattern tool | Rectangular Pattern: Axis, Distribution (Spacing or Extent), Quantity, Distance | Linear pattern: Direction, Distance between instances, Instance count | PartDesign LinearPattern: Mode Offset (v1.0) or Overall Length, Occurrences |
| Order matters? | Parameters follow the timeline order | Only variables earlier in the Feature list appear in autofill | Dependencies follow document objects, not just properties |
Names in Onshape may use English letters, digits and underscores, are case-sensitive and cannot start with a number. FreeCAD spreadsheet values should carry units, such as 180 mm; the shelf count is a plain number. Fusion requires a unique name for each parameter, and its reference advises against commas in expressions because they conflict with the decimal separator in some locales.
Step by step: building the shelf
- Create the parameters from the table above, in millimetres. Enter shelf_pitch last, with its formula, so it can reference the others.
- Outer block. Sketch a rectangle on the front plane. Constrain its width to shelf_width and its height to shelf_height, typing the names into the dimension fields. Extrude it by shelf_depth.
- Cavity. Sketch on the front face, centred. Constrain the inner rectangle to shelf_width – 2 * wall wide and shelf_height – 2 * wall high. Cut it through the full shelf_depth to leave an open frame. For a back panel, cut shelf_depth – wall instead.
- One shelf. On the same front plane, sketch a rectangle shelf_width – 2 * wall wide and wall high, with its bottom edge shelf_pitch above the bottom edge of the unit. Extrude it by shelf_depth and join it to the frame.
- Pattern. Pattern the shelf feature along the vertical direction. Set the count to shelf_count and the distance to shelf_pitch. In Fusion use the Spacing distribution; in Onshape the distance is the gap between instances; in FreeCAD use Mode Offset with Occurrences, or on older versions Overall Length = (shelf_count – 1) * shelf_pitch.
- Test. Change shelf_count to 3, then shelf_width to 240 mm, then wall to 2 mm. Check the result with a measure tool each time.
Because the pattern’s count and spacing come from the parameters, the model should adapt without you touching a sketch. Onshape’s own tech tip shows a linear pattern with distance and instance count both driven by variables. If a value does not update, type the name again instead of a number (see the pitfalls table below).
Check the numbers
| shelf_count | shelf_pitch | Clear opening (pitch – wall) | Shelf bottoms from the base |
|---|---|---|---|
| 1 | 73.5 mm | 70.5 mm | 73.5 |
| 2 | 49 mm | 46 mm | 49, 98 |
| 3 | 36.75 mm | 33.75 mm | 36.75, 73.5, 110.25 |
| 4 | 29.4 mm | 26.4 mm | 29.4, 58.8, 88.2, 117.6 |
All rows use shelf_height = 150 mm and wall = 3 mm. If your model’s openings differ from the third column, the pattern spacing is probably being read as a different distance than you assumed.
Let formulas do the thinking
Equations are the reason to bother with parameters. Fusion’s expression field accepts +, -, *, /, ^ and %, plus functions such as sqrt, min, max, round, floor and ceil. FreeCAD supports the same family of functions and units-aware arithmetic. A formula can make the count follow a rule instead of a number you type:
- Count from a minimum opening: if you want openings of at least 40 mm, use shelf_count = floor((shelf_height – wall) / (40 mm + wall)) – 1. With the example values that gives floor(3.42) – 1 = 2.
- Ratios: a depth that is always half the width is a depth parameter set to shelf_width / 2. Fusion’s help shows the form Length=Width*2.
- Limits: use min() and max() to stop a value going below a printable or sensible size.
Keep formulas short and keep each one in one place. A value defined twice will disagree with itself the day you change one of them.
Why parametric models break
| Symptom | Cause | Fix |
|---|---|---|
| Pattern ignores a new count or spacing | A plain number was typed in the pattern field instead of the parameter name. Onshape forum users report a similar effect with sketch patterns when the offset is not bound before the pattern is completed | Edit the field and enter the parameter name again; then change the parameter to confirm |
| Parameter missing from the list | In Onshape only variables earlier in the Feature list are offered | Move the variable up the feature list, before the features that use it |
| Feature fails at extreme values | A wall wider than half the width gives a negative cavity | Test the largest and smallest values you expect; add min() and max() limits |
| Expression rejected for units | FreeCAD does not add a plain number to a length, so 2mm + 4 is invalid; and 1/2mm means 1/(2mm) | Give every dimension a unit: use 4mm, and write 0.5 * 1mm instead of 1/2mm |
| Circular dependency error in FreeCAD | An object gets its size from a spreadsheet that also reports that object’s volume | Use one spreadsheet to drive the model and a second one to report results |
| Rename broke references | Other features still use the old name | In Onshape tick Update all references when renaming; elsewhere rename before building on the parameter |
| Sketch will not solve | Over-constrained (conflicting) or under-constrained (loose) sketch | Delete the dimension that duplicates another; fully define the sketch from the origin |
| Geometry jumps after an early edit | Later sketches reference faces or edges that changed | Attach sketches to origin planes and datum geometry rather than to faces of earlier features |
Save a version before changing an early feature. Prusa’s modelling guide recommends saving versions before merging or subtracting geometry, and the same habit protects a parametric history.
Keeping the model fast
- In Fusion, the Change Parameters dialog has an Automatic Compute checkbox. Untick it to pause updates while you edit several parameters, then click OK to recompute once.
- Pattern one feature rather than copying it by hand, as the shelf does.
- Keep a handful of parameters in one place and avoid chains of formulas that depend on each other for no reason.
- Split a large design into separate parts and combine them later. The same advice applies to the Boolean operations you use to merge parts.
From the model to a print
A parametric file is the source; the STL is just one output. Export a fresh STL after each change, then follow the export and slicing checklist. For the shelf, printing it on its back, with the depth axis vertical, keeps the walls and shelves as vertical plates, so there are no horizontal spans to bridge. The support-free design rules explain why, and the wall thickness guide helps you choose the wall value.
Already have a static model you would like to edit this way? Converting static models covers the rebuild. For choosing a program, see the free software comparison.
Frequently asked questions
What is a user parameter in CAD?
A user parameter is a named value you create yourself, such as wall = 3 mm, which you then type into sketch dimensions and feature dialogs. In Fusion it is added under Modify > Change Parameters; in Onshape it is a variable created in a Part Studio. Editing the value updates every feature that uses it.
Is there a free way to follow this tutorial?
Yes, but check the terms. Onshape’s Free plan is for non-commercial designs that are open-source and public online. FreeCAD is open-source software. Autodesk has personal-use licensing for Fusion with limits, so read its current terms before relying on it.
Why does my pattern not change when I change the shelf count?
The count field is usually holding a typed number instead of the parameter. Re-enter the parameter name in the pattern’s count and distance fields. Onshape forum threads describe this behaviour for patterns whose values were not bound at creation.
How many shelves can I add before the model fails?
The formula still works for any count, but the clear opening shrinks as pitch minus wall. When it falls below what you want to store, or below what your printer can bridge or print cleanly, stop. Compute the limit with a floor() formula on a minimum opening as shown above.



