Math
A field doesn't have to hold a fixed number — it can hold a formula. Same idea as a spreadsheet cell: type a formula instead of a number.
Use another value
cabinetWidth - 36 // follows the cabinet width
height / 2 // exactly half the height
boards * thickness + (boards - 1) * gapArithmetic
| Write | Means |
|---|---|
+ - | add, subtract |
* / | multiply, divide |
% | remainder |
** | power — width ** 2 |
( ) | group — (a + b) / 2 |
Compare and choose
doorCount > 1 ? 2 : 1 // two handles on a double door, else one
width > 800 ? 3 : 2 // an extra shelf on wide cabinetsReady-made helpers
| Helper | Gives |
|---|---|
Math.max(a, b) | the bigger of two numbers |
Math.min(a, b) | the smaller — cap a size |
Math.round(x) | nearest whole number |
Math.sqrt(a*a + b*b) | diagonal length |
Curve.length(edge) | length of a line you drew |
Everyday recipes
| You want | Formula |
|---|---|
| Half of something | width / 2 |
| Inside width (two walls) | width - 2 * thickness |
| Equal gaps | (width - parts * board) / (parts + 1) |
| Cap a maximum | Math.min(width, 1200) |
| Switch a part off | hasBack ? thickness : 0 |
Need lists or rules that pick faces/edges? That's Expression.