From 2e433fcd0d1afadd8ab786dd30d7d4546bdee43d Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 11 Nov 2026 10:08:41 +0100 Subject: hw-toolchain: placer, routers and KiCad helpers for agent-driven hardware work Rust placer (simulated annealing) and negotiated-congestion router for 2-layer KiCad boards, pnr.sh to place, route, DRC-check and install candidates, Python KiCad helpers, repo conventions (AGENTS.md) and the tool documentation under knowledge/. Konnect (KiCad MCP, AGPL) as a submodule. Co-Authored-By: Claude Opus 5.5 --- knowledge/tooling/height-check.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 knowledge/tooling/height-check.md (limited to 'knowledge/tooling/height-check.md') 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_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). -- cgit v1.3