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/housing-inputs.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 knowledge/tooling/housing-inputs.md (limited to 'knowledge/tooling/housing-inputs.md') diff --git a/knowledge/tooling/housing-inputs.md b/knowledge/tooling/housing-inputs.md new file mode 100644 index 0000000..a0e38ae --- /dev/null +++ b/knowledge/tooling/housing-inputs.md @@ -0,0 +1,17 @@ +# Housing inputs + +`tools/housing_inputs.py` prints the numbers a board's DIN-rail housing needs: where each PCB tab is, what kind of opening each edge connector gets, and where the spacer frame must clear through-hole pins. + +``` sh +tools/router/.venv/bin/python tools/housing_inputs.py myboard/myboard.kicad_pcb +``` + +- **Housing coordinates:** origin at the `HW:DIN_Housing_TE` footprint, X = board x − centre, Y = centre − board y (Y up), so the numbers go straight into CAD box features. +- **Tabs:** the Edge.Cuts segments at |y| = PCB edge + 2 mm, per side, with their X ranges. Notch X = tab ± `notch_clr`. Frame tongue X = tab ± (`notch_clr` − `fit`). +- **Edge connectors:** the parts whose 3D model reaches past the PCB edge, as in [Height check](height-check.md), with the back of the body (|y|) and the height. The kind of opening: + - `TerminalBlock` footprints: screw terminal, notch from 0.5 mm behind the body; + - a body that fits under the slope with 1 mm to spare (≤ 8 mm tall): side-entry window in the end wall only; + - anything else: notch from the riser, with the back wall above the body if the body reaches under the riser. +- **Pin cutouts:** per footprint, the through-hole pads that lie under the frame, as a rectangle ± 1.5 mm. Cutouts closer than 1 mm are flagged for merging. +- **Bottom-side footprints** are listed; the frame does not account for them. +- **Constants:** the ones at the top (`FRAME_Y0`, `PIN_CLR`, …) copy the housing model's parameters. Change both together. -- cgit v1.3