Parameters and formulas
Name the numbers that matter, tie the others to them with formulas, and your model becomes a family of designs you can reshape with a slider.
Follow along
Enclosure example
A Parameter is a named number such as wall_thickness = 2.4. Steps in the Recipe refer to it by name instead of repeating a raw value. Change it once, and everything that depends on it follows.
The big idea: decide once, use everywhere
Imagine a box that must hold a board 50 mm wide. Without parameters you type 52 in one sketch, 52 again in a lid, and 52 once more for a cutout. Next week the board turns out to be 51 mm, and you hunt for every 52.
With parameters:
board_width = 50
clearance = 1
inner_width = board_width + 2 * clearance
wall = 2.4
outer_width = inner_width + 2 * wallEvery dimension that depends on the board is now a formula. Change board_width and the box, lid and cutout all follow.
What a parameter has
| Property | What it does |
|---|---|
| Name | Lowercase letters, digits and underscores, starting with a letter or underscore, up to 48 characters. For example wall_thickness |
| Value | A number, or a formula using other parameters |
| Unit | Millimetres, degrees, a count, a ratio, or none |
| Slider range | Minimum, maximum and step, so the slider stays in a sensible range |
| Description | A plain sentence shown as a tooltip |
| Group | A heading that keeps the panel tidy |
| Source badge | Where the value came from: you, the agent, an image, a concept, a template, or a bought piece |
| Locked | Prevents accidental changes |
Some parameters are choices rather than numbers, such as board = "ESP32 DevKit V1". Choose an option and the dimensions that depend on it update.
Writing formulas
Anywhere a number goes, you can write a formula.
Operators: + - * / ^ % and parentheses.
Functions: min, max, abs, sqrt, round, floor, ceil, sin, cos, tan, asin, acos, atan, atan2, plus the constant pi. Trigonometric functions use degrees.
| Goal | Formula |
|---|---|
| Half the width | width / 2 |
| Inner size from outer size | outer_width - 2 * wall |
| Never thinner than 1.2 | max(wall, 1.2) |
| How many 40 mm slots fit | floor(length / 40) |
| Whole number of screws | ceil(length / spacing) |
| Height from an angle | base * tan(tilt_angle) |
| Fillet that never exceeds the wall | min(fillet_radius, wall * 0.8) |
Formulas can only use parameter names, numbers, these operators and these functions. Anything else is rejected with a clear message rather than silently doing the wrong thing.
What deserves to be a parameter
Not every number should be one. A good rule: make it a parameter if you might want to change it, or if other numbers depend on it.
Yes: overall size, wall thickness, hole diameters, fit clearance, tilt angles, counts of repeated features. Usually no: a one-off 0.5 mm chamfer that will never change.
Make fit a parameter
For printed parts, add a fit_clearance parameter (try 0.25 mm) and use it everywhere two parts meet. If your printer prints tight, you change one number and reprint.
Let the agent do the naming
You rarely need to create parameters by hand. The agent creates them as it builds, and tags them with a source badge. You can tell it what you want:
Make the wall thickness, the hole diameter and the lid clearance parameters. Group them under "Fit". Set the wall thickness slider between 1.2 and 4 mm.
Link the lid width to the box width so they always match.
Thing-level parameters
Parameters can also live on the Thing, shared by several pieces. A piece refers to one as thing.board_width. Use these when two pieces must agree, such as the box and the lid.
Common problems
| Symptom | Likely cause |
|---|---|
| A step turns red after a change | A formula produced an impossible value (a negative wall, a hole bigger than its plate). See A step turned red after I changed a parameter |
| "Expression error" | A typo, an unknown name, or an unsupported function |
| A slider cannot go higher | The parameter has a maximum. Ask for a bigger range |
| Changing one number moves too many things | A formula links them. That is by design. Check which ones in the Recipe |
Try it
On the Enclosure template, ask:
Make the enclosure size follow a board that is 52 mm by 28 mm with 1 mm clearance all around, and make sure the lid width always equals the box width.
Then drag the board_width slider and watch the box, the lid and the cutouts update together.
Did this help?
Keep reading
Ideas
Design intent: rules that stay true
Tell Solid Vibes what must always be true about your design, and it keeps checking after every change. Think of it as the 'why' that outlives the numbers.
Intermediate4 min readIdeas
The Recipe: your piece's readable history
Every piece is built from a list of plain-language steps. Learn to read it, edit it, and use it to understand any model, including ones you did not make.
Beginner4 min readTroubleshooting
Parts don't fit
A lid that is too tight or too loose, a screw that will not go in, a board that does not fit: diagnose whether it is the design, the printer, or the measurement.
Intermediate4 min read