# Wall-relative design

A slatwall is rows of slots, one above the other. Every brand makes them a little differently: the slot is taller or shorter, the lip in front of the pocket thicker or thinner. A part printed for one wall can jam or rattle on another. Slatfinity solves this once, in the bricks, so that one design fits every wall it claims.

## What you set, and what you never set

You set intent:

- what the part holds and its sizes: reach, width, depth, how many;
- its angles;
- what it should hold (the studio calculates the load).

You never set anything that depends on one wall or one printer:

- No wall numbers. When a shape has to follow the wall, use a formula that reads it, like `=wall.pitch` for one slot to the next.
- No clearances. Every gap your design makes between two printed parts comes from a formula on the printer fit, like `=fit.dovetail`, plus a margin if a joint needs one. A plain number under 0.5 mm is refused (R6).
- No mechanism numbers. The key's heights, the guide and the lock's grip come from the mount brick and the wall. The print-tested lock profile is fixed; the expert lock settings change only when an engagement fix names them (see [core.md](core.md)).

## The wall's numbers

Each wall preset gives these fields, and each number says where it came from: measured, published, inferred, patent or assumed.

Measurements, which a design's formulas can read as `wall.*`:

- `pitch` (`wall.pitch`): the distance from one slot to the next. The fit check uses it to find the slots above and below; the slat face between two slots is the pitch less the slot opening. The cam-lock mount's geometry follows it.
- `slot_opening` (`wall.slot_opening`): the height of the gap the mount goes into. The key's heights and the guide are made from it (below), and each brick's slot range is checked against it. The cam-lock mount's geometry follows it.
- `lip_thickness` (`wall.lip_thickness`): how deep the lip in front of the pocket is: how far the mount reaches in before the key turns, and how deep the top wedge sits. Each brick's lip range is checked against it. The cam-lock mount's geometry follows it.
- `undercut_depth` (`wall.undercut_depth`): the room behind the lip. The fit check measures how far the mount reaches behind the lip against it. `vevor`, `handiwall` and `flowwall` don't give it, so a formula that reads it fails to build there, and the design still claims those walls: don't read it in a design.
- `panel_depth` (`wall.panel_depth`): the whole panel's depth. It sizes the back panel drawn on the engagement sheet, and no check reads it: everything behind the face is wall for R2, and the mount's reach is checked against `undercut_depth`.

Shape fields, which the fit check and the engagement sheet use. Formulas can't read them:

- `pocket_above`: how far the pocket rises behind the lip above the slot, from the slot's top edge. The fit check measures how far the mount rises behind the lip against it, on every wall: where a wall doesn't give it, against the drawn default, and then it only warns. Not given by `vevor`, `storewall`, `handiwall` and `flowwall`.
- `pocket_below`: how far the pocket drops behind the slot floor; 0 is a flat floor, the L most walls have. The fit check measures how far the mount reaches down behind the lip against it, on every wall: a part that hooks down into a flat floor is in the slat. Not given by `handiwall` and `flowwall`.
- `lip_front_radius`: the rounded edge where the face meets the slot's floor. When a wall gives it, the fit check shapes the slat's edges with it, and the sheet draws it. Not given by `vevor`, `storewall`, `handiwall`, `mdf`, `flowwall` and `gladiator`.
- `slot_edge_radius`: the rounded edge where the face meets the underside of the lip above the slot. When a wall gives it, the fit check shapes the slat's edges with it, and the sheet draws it. Not given by `vevor`, `storewall`, `handiwall`, `mdf`, `flowwall` and `gladiator`.
- `lip_tip_radius`: the rounded back edge of the lip above the slot, and of the slot floor where the wall has room below. When a wall gives it, the fit check shapes the slat's edges with it, and the sheet draws it. Not given by `vevor`, `storewall`, `handiwall`, `mdf`, `flowwall` and `gladiator`.

## What the mount works out for each wall

The cam-lock mount sizes its key and guide from the wall's slot opening, with the relations the lock was print-tested with:

- `unlock_h` = `slot_opening` − 0.18 mm: the key's height across the slot turned to unlocked, as it goes in.
- `lock_h` = `slot_opening` + 0.22 mm: the key's height once turned to locked: it grips the slot's edges.
- `peak_h` = `slot_opening` + 0.3 mm: the key's greatest height on the way to locked: the click you feel.
- `guide_h` = `slot_opening` − 0.18 mm: the guide beside the key, which keeps the mount square in the slot.

On every wall the studio offers:

| Wall                      | id          | `pitch` | `slot_opening` | `lip_thickness` | `unlock_h` | `lock_h` | `peak_h` | `guide_h` |
| ------------------------- | ----------- | ------- | -------------- | --------------- | ---------- | -------- | -------- | --------- |
| VEVOR PVC slatwall        | `vevor`     | 75.38   | 9.58           | 6.7             | 9.4        | 9.8      | 9.88     | 9.4       |
| StoreWall                 | `storewall` | 76.2    | 9.53           | 6.35            | 9.35       | 9.75     | 9.83     | 9.35      |
| Handiwall                 | `handiwall` | 76.2    | 9.53           | 6.35            | 9.35       | 9.75     | 9.83     | 9.35      |
| Trusscore SlatWall        | `trusscore` | 76.2    | 9.5            | 7.4             | 9.32       | 9.72     | 9.8      | 9.32      |
| Retail MDF slatwall, 3 in | `mdf`       | 76.2    | 9.53           | 6.35            | 9.35       | 9.75     | 9.83     | 9.35      |
| Flow Wall                 | `flowwall`  | 76.2    | 9.53           | 6.35            | 9.35       | 9.75     | 9.83     | 9.35      |
| Gladiator GearWall        | `gladiator` | 76.2    | 17             | 7               | none       | none     | none     | none      |

On Gladiator GearWall the `cam-lock-mount` makes no key: Won't fit this wall: its slot opening is 17 mm, and the cam-lock mount needs a slot opening from 8.5 to 11 mm.

## Every claimed wall, automatically

A design claims every wall that all of its bricks accept ([bricks.md](bricks.md) shows which walls each brick takes). For each claimed wall, the studio rebuilds the same design with that wall's numbers: the mount, its key and the slot it fits are made for that wall. Nothing in the design changes.

- The quick check after every `create_draft` and `update_draft` builds the defaults on one wall: the draft's wall, kept for its life. The change report still has a fit row for every wall.
- `validate_draft` with scope "full" builds every claimed wall, every brick state, and the corners of the settings (see [presets-and-checks.md](presets-and-checks.md)).
- The engagement sheet (`inspect_draft` with "engagement") draws how the part sits in each wall's slot, one picture for every wall.

How sure a fit row is depends on where the wall's numbers came from. Only measured or published numbers can make a fit finding an error (won't fit). A finding that rests on inferred, patent, assumed or user numbers, or on a number the wall doesn't give, is a warning: it names the field and asks for a slot-gauge print. A brick's own slot or lip range refuses a wall whatever the basis. The row's `basis` and notes say which numbers it read.

## Printer fit, automatically

The person picks a printer fit, and every gap a brick or the design takes from `fit.*` follows it. A brick's own fixed clearances (some label clearances, for example) don't; [bricks.md](bricks.md) marks the ones you may set.

| Fit                     | `fit.dovetail` | `fit.print_in_place` | `fit.bore` | `fit.axial` |
| ----------------------- | -------------- | -------------------- | ---------- | ----------- |
| Tight                   | 0.08           | 0.25                 | 0.12       | 0.25        |
| Standard (print-tested) | 0.1            | 0.3                  | 0.15       | 0.3         |
| Loose                   | 0.15           | 0.4                  | 0.2        | 0.4         |

A setting with one of these names is a clearance, and takes the matching fit: `dt_fit` → `fit.dovetail`, `sock_fit` → `fit.dovetail`, `fit` → `fit.dovetail`, `wedge_clear` → `fit.print_in_place`, `bore_clear` → `fit.bore` and `axial_gap` → `fit.axial`.

You don't pick the fit and you don't test it in the design. The change report's `test_fit` says which test piece to print first (the slot gauge and lock test, or the fit coupon).
