Files

23 lines
1.2 KiB
Python
Raw Permalink Normal View History

2026-11-09 11:51:56 -06:00
"""TEMPLATE figures for an INS. Wireframe style: ink linework on a faint grid, gold for the part
being installed, red for warnings, dimensions in JetBrains Mono. See INS-LT-15R-01/source/figs.py
for a full set (drill template, sections, wiring diagrams)."""
from mpmdoc.figkit import T, svg_open, INK, KICK, GOLD, MUTE, CREAM
def part():
W, H = 300, 260
o = [svg_open(W, H, grid=True)]
o.append(f'<rect x="110" y="30" width="80" height="200" rx="3" fill="{CREAM}" stroke="{INK}" stroke-width="1.4"/>')
for i, (lab, y) in enumerate([("A", 60), ("B", 140), ("C", 200)]):
o.append(f'<circle cx="150" cy="{y}" r="6" fill="#fff" stroke="{INK}" stroke-width="1.2"/>')
o.append(f'<circle cx="86" cy="{y}" r="9" fill="{GOLD}"/>')
o.append(T(86, y + 3.5, lab, size=9, w=800, anchor="middle", ls=0))
o.append(f'<line x1="150" y1="18" x2="150" y2="244" stroke="{KICK}" stroke-width=".9" stroke-dasharray="14 3 2 3"/>')
o.append(T(150, 14, "CL", size=8, w=700, fill=KICK, anchor="middle"))
o.append(T(214, 135, "PLUMB", size=8, w=700))
o.append(T(214, 147, "level on edge", size=7.5, w=500, fill=MUTE, fam="Open Sans", ls=0))
o.append("</svg>")
return "".join(o)
FIGS = {"part": part}