diff options
Diffstat (limited to 'knowledge/tooling/housing-inputs.md')
| -rw-r--r-- | knowledge/tooling/housing-inputs.md | 17 |
1 files changed, 17 insertions, 0 deletions
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_<k>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. |
