A raw aluminum or PCB panel with auto-generated KiCad text works for bench testing, but Eurorack modules live on crowded racks where typography, jack grouping, input/output polarity cues, and panel-to-panel spacing determine daily playability. In this stage — captured in Session Traces 13-03d1c3c6 (prompts/13-03d1c3c6-how-do-i-build-a-faceplate-that.md), 15-ef99cb65 (prompts/15-ef99cb65-please-create-a-front-panel-for-this.md), and 16-cd7d0409 (prompts/16-cd7d0409-i-d-like-to-design-a-front.md) — you split mechanical panel generation from vector graphic design: first generate a precision blank-front KiCad panel with a machine-readable specification contract, then design custom Matte Black + ENIG Gold artwork in vectorcraft-cli, and finally fracture and import those SVG polygons back into KiCad 10 for full DRC and 3D verification.
flowchart LR
M["Main PCB<br/>envelope_follower.kicad_pcb"] --> S61["6.1 Catch Drill & Skill Gaps<br/>Dailywell 2MS1 = 5.2 mm"]
S61 --> S62["6.2 generate_eurorack_panel.py<br/>--blank-front + panel_svg_spec.md"]
S62 --> S63["6.3 vectorcraft-cli Art Loop<br/>--emit-commands + --postprocess-verify"]
S63 --> S64["6.4 import_svgs_to_kicad.py<br/>SHAPE_POLY_SET Fracture + ENIG Stackup"]Step 6.1: Exploratory Q&A, Skill Customization & KiCad Python 3.9 Compatibility
Rather than jumping straight to code generation, start with an exploratory conversation (Trace 13) asking how to build a blank-front Matte Black + ENIG Gold faceplate mated to envelope_follower.kicad_pcb. That audit immediately exposes three mechanical and tooling gaps that would otherwise only surface after fabrication:
- Dailywell
2MS1toggle drill mismatch (SW1,SW2): Standard Eurorack panel templates default to6.2 mmtoggle bushings (1/4-40), whereas the Dailywell2MS1sub-miniature SPDT toggle specified inStage 4uses a metric M5 (4.95 mm) threaded bushing. Leaving a6.2 mmhole allows the8.0 mmhex nut and locking washer to rock or pull through. Overriding the drill to5.2 mm(7.2 mmcopper pad,8.2 mmfront nut keepout) gives an exact slip fit. - Skill extension via
/agy-customizations(eurorack-panel): Existing panel generation scripts assumed auto-generatedF.SilkSlabels around every cutout. Using/agy-customizations(Trace 13, Turn 25) before running the updated script in Trace 15, extend.agents/skills/eurorack-panel/scripts/generate_eurorack_panel.pycleanly:- Add
--blank-front,--version,--url,--drill REF=MM, and--spec-mdCLI arguments, plus theswitch_subminicomponent class (5.2 mmdrill /7.2 mmpad /8.2 mmkeepout). - Extract module title and revision cleanly from the main board’s
(title_block ...)S-expression when omitted. - Implement a 2D Signed Distance Field (
plan_rear_silkscreen()) planner onB.SilkSso rear documentation (module title,Rev 1.0, rotated GitHub URL, and5.0 × 5.0 mmJLCPCB QR placeholder) places automatically inside the largest obstacle-free corridors clearingB.Maskrings, oval slots, and neighboring panel footprints.
- Add
- KiCad bundled Python 3.9 check + upstream skill sync: KiCad 10 on macOS bundles Python 3.9 inside
KiCad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3forpcbnew. Any Python>= 3.10syntax such aszip(a, b, strict=True)raisesTypeError: zip() takes no keyword argumentsinsidepcbnewscripts even when your project.venvruns Python 3.14. Validate modified skill scripts directly under KiCad’s Python 3.9 interpreter, runruff check/ruff format, and upstream/sync changes back to your shared skills repository (../skills/) verifying zero drift withdiff -ru.
Step 6.2: Generating the Blank-Front Panel & panel_svg_spec.md Contract
Once the extended eurorack-panel skill passes KiCad Python 3.9 checks, generate the mated blank-front KiCad board and machine-readable SVG contract in one pass:
python3 .agents/skills/eurorack-panel/scripts/generate_eurorack_panel.py \
--main-pcb envelope_follower.kicad_pcb \
--output envelope_follower_panel.kicad_pcb \
--blank-front \
--title "ENVELOPE FOLLOWER + SKEW LIMITER" \
--version "Rev 1.0" \
--url "github.com/domesticmouse/EnvelopeFollowerWithSkewLimiter" \
--spec-md panel_svg_spec.md \
--drc(The
switch_subminimatcher automatically detectsDailywell_2M/2MS1footprints and selects5.2 mmdrills; use--drill REF=MMwhenever you need an ad-hoc override on another cutout, or omit--blank-front/--spec-mdto produce a standard auto-labeled shop panel directly from KiCad footprints.)
Mechanical Alignment & Panel Cutouts (11 Controls + 2 M3 Slots)
Both PCBs share a 30.00 mm (6 HP Doepfer standard 30.00 mm panel width with 0.00 mm X-overhang vs the 30.00 × 108.00 mm main board) horizontal footprint, while the 128.50 mm Doepfer 3U panel height adds a symmetrical 10.25 mm top and bottom rail overhang (Y_panel = Y_pcb + 10.25 mm). KiCad sets AuxOrigin / GridOrigin at (100.00, 29.75) so panel-local coordinates (0..30.00, 0..128.50) align pixel-for-pixel with exported SVGs:
| Ref | Kind / MPN | Label / Role | Panel (X, Y) mm | KiCad Global (X, Y) mm | Drill / Slot Size | Hole Type | Nut Keepout / Mask Ring |
|---|---|---|---|---|---|---|---|
H1 | Eurorack Top Slot | M3 Mounting Slot | (7.50, 3.00) | (107.50, 32.75) | 5.50 × 3.20 mm oval | NPTH | Rail keepout Y = 0.0–6.5 mm |
H2 | Eurorack Bottom Slot | M3 Mounting Slot | (7.50, 125.50) | (107.50, 155.25) | 5.50 × 3.20 mm oval | NPTH | Rail keepout Y = 122.0–128.5 mm |
RV1 | Alpha RD901F A100K | GAIN | (15.00, 21.25) | (115.00, 51.00) | Ø 7.20 mm | PTH GND | 11.00 mm keepout (9.60 mm B.Mask), knob <= 14.0 mm |
RV2 | Alpha RD901F A1M | ATK (Attack) | (15.00, 36.75) | (115.00, 66.50) | Ø 7.20 mm | PTH GND | 11.00 mm keepout (9.60 mm B.Mask), knob <= 14.0 mm |
RV3 | Alpha RD901F A1M | REL (Release) | (15.00, 52.25) | (115.00, 82.00) | Ø 7.20 mm | PTH GND | 11.00 mm keepout (9.60 mm B.Mask), knob <= 14.0 mm |
RV4 | Alpha RD901F B10K (center-detent) | OFFSET | (15.00, 67.75) | (115.00, 97.50) | Ø 7.20 mm | PTH GND | 11.00 mm keepout (9.60 mm B.Mask), knob <= 14.0 mm |
SW1 | Dailywell 2MS1 SPDT | SMOOTH / RAW | (7.00, 82.25) | (107.00, 112.00) | Ø 5.20 mm | PTH GND | 8.20 mm nut keepout (7.20 mm F.Cu pad, tented front) |
LED1 | 3 mm T-1 Dual R/G | OUT Polarity LED | (15.00, 82.25) | (115.00, 112.00) | Ø 3.20 mm | NPTH | 5.20 mm bezel keepout (2.00 mm margin around edge) |
SW2 | Dailywell 2MS1 SPDT | FAST / SLOW | (23.00, 82.25) | (123.00, 112.00) | Ø 5.20 mm | PTH GND | 8.20 mm nut keepout (7.20 mm F.Cu pad, tented front) |
J1 | QingPu WQP-PJ398SM | IN (Signal In) | (8.00, 95.75) | (108.00, 125.50) | Ø 6.20 mm | PTH GND | 9.50 mm nut keepout (9.00 mm B.Mask, tented front) |
J2 | QingPu WQP-PJ398SM | SLEW IN (Normalled) | (22.00, 95.75) | (122.00, 125.50) | Ø 6.20 mm | PTH GND | 9.50 mm nut keepout (9.00 mm B.Mask, tented front) |
J3 | QingPu WQP-PJ398SM | OUT (+ Envelope) | (8.00, 110.75) | (108.00, 140.50) | Ø 6.20 mm | PTH GND | 9.50 mm nut keepout (9.00 mm B.Mask, tented front) |
J4 | QingPu WQP-PJ398SM | INV OUT (− Envelope) | (22.00, 110.75) | (122.00, 140.50) | Ø 6.20 mm | PTH GND | 9.50 mm nut keepout (9.00 mm B.Mask, tented front) |
Blank-Front Verification & KiCad 10 Project Hygiene
Inspecting the generated envelope_follower_panel.kicad_pcb and panel_svg_spec.md confirms:
- Blank front, documented back:
0entities onF.SilkSand0custom graphics onF.Mask;5automatically placedB.SilkSitems:- 3 stacked mirrored text lines centered as a block at
(15.00, 10.50)(clearance = 2.40 mm):ENVELOPE FOLLOWERat(15.00, 8.65),+ SKEW LIMITERat(15.00, 10.50), and6HP Rev 1.0at(15.00, 12.35). - Vertical
90°mirrored GitHub repository URL (github.com/domesticmouse/EnvelopeFollowerWithSkewLimiter) at(24.61, 39.47)(clearance = 3.25 mm). 5.00 × 5.00 mmfilledgr_rectJLCPCB QR blank centered at(22.50, 121.00)(clearance = 2.73 mm).
- 3 stacked mirrored text lines centered as a block at
- Copper fill & KiCad 10 inline nets: Both
F.CuandB.Cupour~95%solidGNDzones tied to the10plated control shells via KiCad 10 inline(net "GND")declarations on every hole pad, whileenvelope_follower_panel.kicad_prois generated and tracked alongside the PCB. - Specification contract (
panel_svg_spec.md): Documents exact safe artwork bounds (X = 0.50..29.50 mm,Y = 0.50..128.00 mm), rail keepouts (Y = 0..6.5 mmtop,122.0..128.5 mmbottom), cutout keepouts, rear mirror zones, and layer color semantics (#FFFFFFWhiteF.SilkS,#D4AF37ENIG GoldF.MaskoverF.Cu,#111111Matte Black soldermask background) (view the Panel SVG Spec on theENV / SKEWCompanion Site · source inEnvelopeFollowerWithSkewLimiter).
Step 6.3: VectorCraft Front Artwork & Clearance Audit
Armed with panel_svg_spec.md, open a dedicated artwork session (Trace 16) invoking /vectorcraft-cli and let the agent walk you through aesthetic requirements (visual vibe, gold-vs-silkscreen hierarchy, knob dial scale style, LED polarity markings, and header motif) before writing code. For this build, those design interviews converge on a Dark Techno / Brutalist aesthetic: #111111 Matte Black solder mask, bare F.Cu finished in #D4AF37 ENIG Gold for structural zone blocks and reversed knock-outs (OUT / INV OUT output bay, title accent slab, angular envelope follower peak over decaying kick-drum bars, asymmetric LED polarity ticks), and crisp #FFFFFF F.SilkS ticks, callouts, and labels (GAIN, ATK, REL, OFFSET, SMOOTH/RAW, FAST/SLOW, IN, SLEW IN).
Split Sandbox-Safe Batch Pipeline
Because vectorcraft-cli writes SVG exports outside typical sandbox assumptions or needs native macOS font services, split generation cleanly into three commands in panel_art/generate_panel_art.py (in EnvelopeFollowerWithSkewLimiter):
# 1. Emit VectorCraft JSON command queue (runs inside sandbox)
.venv/bin/python panel_art/generate_panel_art.py --emit-commands panel_art/build_steps.json
# 2. Execute headless VectorCraft CLI engine (exports .raw.svg + .vectorcraft)
/Users/brett/.local/bin/vectorcraft-cli run --commands panel_art/build_steps.json
# 3. Normalize pt->mm Plain SVGs, run 40 px/mm clearance audit, clean temp files
.venv/bin/python panel_art/generate_panel_art.py --postprocess-verifyKey VectorCraft CLI engineering lessons discovered and codified in generate_panel_art.py:
72 pt/incoordinate scaling: VectorCraft operates in PostScript points (1 pt = 25.4 / 72.0 mm). Convert every millimeter coordinate frompanel_svg_spec.mdwithMM_TO_PT = 72.0 / 25.4, emit an outer30.00 × 128.50 mm0.05 mmregistration_frame(align: "inside"), and rescale exportedviewBoxattributes back to exact1:1millimeters (0 0 30.0 128.5) during--postprocess-verify.- Omit
text.fontListfrom batch runs & guardresult: None: Enumerating system fonts on every rebuild adds startup latency and can clutter JSON step logs. Probe available fonts once (vectorcraft-cli run --command text.fontList), pin installed geometric faces (DIN Condensed,DIN Alternate, andMenlo), and guard command result lookups in Python when steps returnNone. - Outline & flatten every graphic primitive: Convert every label via
type.createOutlines, expand strokes viaobject.path.outlineStroke, and execute reversed mask cutouts (OUT,INV OUT, chamfered pills) viaobject.pathfinder.minusFrontrather than relying on white-on-gold overprints. Asserttext_nodes == 0andstroked_nodes == 0in--postprocess-verifyso KiCad imports pure closed fills.
40 px/mm (1016 PPI) Morphological Clearance Audit & Visual Critique
Rather than trusting visual spot-checks alone, --postprocess-verify rasterizes front_silkscreen.svg and front_soldermask.svg at AUDIT_PPI = 1016.0 (40 px/mm, 0.025 mm/px) using Pillow, NumPy, and SciPy Euclidean distance transforms, failing loudly unless every constraint passes with 0 px overlap:
- Silk-to-Mask minimum gap:
>= 0.20 mmrequired (achieved>= 0.60 mmacross all glyphs, tick marks, and the header envelope/kick-drum motif). F.Maskedge & NPTH pullback:>= 0.60 mmfrom PCB perimeter andLED1NPTH rim.F.SilkSboard-edge inset:>= 0.50 mmall around (X = 0.50..29.50 mm,Y = 0.50..128.00 mm).- Nut & Potentiometer Keepouts:
0 pxinside any8.20 mmswitch nut,9.50 mmjack nut,11.00 mmpot keepout, or5.20 mmLED1bezel keepout.
Render both panel_art/preview_clean.png (simulating Matte Black + ENIG Gold + White Silkscreen) and panel_art/preview_keepouts.png (overlaying magenta drill rings, cyan nut/knob boundaries, and top/bottom rail zones) and iterate through interactive human+AI critique rounds — aligning chamfered OFFSET accents horizontally, moving the decaying kick-drum transient bars underneath the angular envelope tail, and equalizing bar spacing — before touching KiCad:
Step 6.4: Importing SVGs into KiCad (SHAPE_POLY_SET + ENIG Stackup)
Exporting valid 1:1 mm SVGs is only half the battle: KiCad GUI SVG import requires manual clicks and lacks headless CI reproducibility, while KiCad gr_poly (PCB_SHAPE with SHAPE_T_POLY) objects only support a single outer boundary without inner holes. If you naively import glyphs containing counters (O, A, R, D, 0) or reversed mask pills (OUT, INV OUT), inner islands fill solid!
In panel_art/import_svgs_to_kicad.py (in EnvelopeFollowerWithSkewLimiter), solve both compound-path fracturing and stackup finish cleanly inside KiCad’s bundled Python 3.9 pcbnew runtime:
- Inject KiCad 10
(stackup ...)beforeLoadBoard(): Prepend the physical finish block (F.Mask/B.Mask"Black",F.SilkS/B.SilkS"White",copper_finish "ENIG",FR4dielectric) intoenvelope_follower_panel.kicad_pcbbeforepcbnew.LoadBoard(). Reloading and saving preserves it natively sokicad-cli pcb renderdisplays authentic Matte Black solder mask and brushed ENIG Gold pads. - Idempotent cleanup &
AuxOriginalignment: Delete any priorF.SilkSorF.Maskdrawings (while leaving all5B.SilkSrear markings untouched), readds.GetAuxOrigin()((100.00, 29.75)), and drop the30.00 × 128.50 mmregistration_frame<rect>. - Adaptive De Casteljau flattening +
BooleanXor()/Fracture(): Subdivide cubic (C/S) and quadratic (Q/T) SVG Bezier curves down toBEZIER_TOL_MM = 0.002 mm, combine nested subpaths usingpcbnew.SHAPE_POLY_SET.BooleanXor()(winding-agnostic even-odd decomposition), and callFracture()so KiCad automatically cuts hairline keyhole seams into zero-hole native outlines. Each fractured outline becomes one filledpcbnew.PCB_SHAPE(SHAPE_T_POLY,SetFilled(True),SetWidth(0)). - Refill zones & run DRC + static Gerber analysis: Run the importer with KiCad’s Python 3.9 interpreter, inspect the
104F.SilkSpolygons +33F.Maskgold polygons +5preservedB.SilkSmarkings, verify~95%GNDzone fill, and filter KiCad DRC (kicad-cli pcb drc --severity-all --format json) confirming0non-library violations (13expectedlib_footprint_issuesinfo markers from embeddedEurorack_Panel:*footprints):
/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3 \
panel_art/import_svgs_to_kicad.py
kicad-cli pcb drc --severity-all --format json --output /tmp/panel_drc.json envelope_follower_panel.kicad_pcb
kicad-cli pcb render --side top --width 900 --height 2400 --background transparent --quality high \
--output images/panel_front.png envelope_follower_panel.kicad_pcb
kicad-cli pcb render --side bottom --width 900 --height 2400 --background transparent --quality high \
--output images/panel_back.png envelope_follower_panel.kicad_pcbInspect both high-resolution raytraced KiCad 3D renders closely — checking every counter (O, A, R, D, 0), crisp F.Mask gold edges over F.Cu, Matte Black background uniformity, tented front holes around controls, and mirrored rear B.SilkS text and QR box — or toggle individual SVG and keepout layers live in the 4-layer Panel Inspector on the ENV / SKEW Companion Site before moving on to manufacturing files:
Pitfalls Caught in Stage 6
| Pitfall Discovered | Symptom | Fix Applied |
|---|---|---|
Generic 6.2 mm switch drill | Dailywell 2MS1 M5 (4.95 mm) bushing rattles inside a standard 6.2 mm toggle hole | Added --drill REF=MM & switch_submini (5.2 mm drill / 8.2 mm keepout) in generate_eurorack_panel.py |
Python >= 3.10 syntax inside pcbnew | zip(..., strict=True) raises TypeError under KiCad 10’s bundled Python 3.9 | Test all pcbnew scripts under KiCad.app/.../bin/python3 after editing skills |
SHAPE_POLY_SET holes inside gr_poly | KiCad PCB_SHAPE (SHAPE_T_POLY) only keeps a single hole-free outline; counters like O / A fill solid | Combine SVG subpaths with BooleanXor() and call Fracture() before SetPolyShape() |
VectorCraft 72 pt/in & live fonts | Imported artwork scales to 2.83× or leaves unclosed strokes/<text> tags | Scale by 25.4 / 72.0, outline all type & strokes, use pathfinder.minusFront, omit text.fontList from batches |
Missing KiCad 10 (stackup ...) | kicad-cli pcb render renders default green mask + silver HASL instead of Matte Black + ENIG Gold | Inject (stackup ...) (Black mask, White silk, ENIG) before pcbnew.LoadBoard() |
generate_eurorack_panel.py lib_footprint_issues | DRC exits non-zero if 13 embedded footprint library warnings aren’t distinguished from real errors | Filter lib_footprint_issues and assert 0 electrical, silk, mask, or copper-edge violations |
With both the main board (envelope_follower.kicad_pcb) and front panel (envelope_follower_panel.kicad_pcb) verified cleanly in 3D and DRC, you are ready for Stage 7: Fabrication, Visual Checklists, Orders & Patch Guides.