diff options
Diffstat (limited to 'knowledge/tooling/height-check.md')
| -rw-r--r-- | knowledge/tooling/height-check.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/knowledge/tooling/height-check.md b/knowledge/tooling/height-check.md new file mode 100644 index 0000000..f64fcff --- /dev/null +++ b/knowledge/tooling/height-check.md @@ -0,0 +1,22 @@ +# Height check + +`tools/height_check.py` checks every top-side part of a DIN-rail board against the height limits of the printed housing ([DIN-rail board format](../topics/din-rail-format.md)). + +``` sh +tools/router/.venv/bin/python tools/height_check.py myboard/myboard.kicad_pcb +``` + +- **Housing footprint:** the board must carry `HW:DIN_Housing_<k>TE` (from `tools/din_template.py`). Its position is the housing centre, and `k` selects the dimensions. The limits come from `dims()` in `tools/din_template.py`, so the check, the footprint notes and the templates share one source. +- **Limits:** + - inside the front-cap box: `h_tall` (45.8 mm); + - elsewhere: `h_low` (31.8 mm, the bottom of the front-cap lip); + - outside the step lines (|y| > 33): the 45° shoulder slope applies, 19 mm at the line, 1 mm less per mm outward, 9.5 mm at the PCB edge. +- **Method:** each 3D-model vertex is checked against the limit at its place, using the same model transform as [Model check](model-check.md) plus the footprint's position and rotation. +- **Edge connectors:** parts that reach past the PCB edge are listed with "needs a notch through the slope" and not judged; their notch is cut up through the slope. +- **Assembly STEP files:** these cannot be placed without their transforms. The F.CrtYd outline at the model's top height is used instead, flagged "approx". +- **Not checked:** parts without a STEP model are listed as not checked, and bottom-side parts are not checked yet. +- **Exit code** 1 when a part is too tall. + +The model paths resolve `${HW_LIB}` to `libraries/` in the repo and the KiCad stock models through [kicad_paths.py](../../tools/kicad_paths.py). + +For the openings and the spacer frame: [Housing inputs](housing-inputs.md). |
