CLI: PCB SVG, Toon & Design Review
These kcr and native Rust k3 commands generate declarative PCB SVG views, shaded 3D-projected Toon illustrations, and agent-first D0 design-review bundles. Every visual output lowers from the same KiCadFabView / FabViewData model, keeping documentation bit-consistent with your Gerbers and kcr vdoc layers.
Commands At A Glance
| Command | Config File | Purpose | Primary Inputs |
|---|---|---|---|
kcr pcb-svg | <stem>.pcb.svg.config / pcb.svg.config | Configurable multi-view PCB SVG compositor with physical layers, Geometer 3D HLR outlines, and all 17 virtual layers | .kicad_pcb, .kicad_pro |
kcr toon | toon.config | Shaded top/bottom illustrated PCB SVG presets with 8 solder-mask themes, --assembly, --footprint, and variants | .kicad_pcb, .kicad_pro |
kcr design (design-review, dr) | None | Agent-first D0 design-review bundle (schematic SVGs + .layout.json, compiled graph, BOM, PnP, PCB copper SVGs, manifest) | .kicad_pro, .kicad_sch |
kcr pcb-svg
Composes physical KiCad layers, board domain (BOARD_SUBSTRATE, SOLDERMASK_FILM_*, BOARD_OUTLINE, BOARD_CUTOUTS, DRILLS, SLOTS), Geometer 3D HLR outlines, translucent 3D illustrations, and all 17 canonical FabView virtual layers (VIRTUAL_CUTOUTS, PIN1_*, DIODES_*, CAPACITORS_*, INDUCTORS_*, RESISTORS_*, ASSEMBLY_OUTLINES_*, ASSEMBLY_DESIGNATORS_*, PAD_LABELS_*) in exact draw order:
# Render configured top/bottom assembly & diode views (auto-creates <stem>.pcb.svg.config on first run)
kcr pcb-svg board.kicad_pcb -o output/pcb-svg
# Render standalone per-layer SVGs (remember: --views layers enables layer_outputs!)
kcr pcb-svg board.kicad_pcb --layers F.Cu,DIODES_TOP,CAPACITORS_TOP,PAD_LABELS_TOP --views layers -o output/pcb-svg
# Enforce strict embedded-only 3D STEP models (portable CI mode)
kcr pcb-svg board.kicad_pcb --embedded-only -o output/pcb-svgSee kcr pcb-svg for the complete pcb.svg.config schema, component selector & style precedence ladders, projection rules, and the --views vs --layers trap.
kcr toon
Turnkey shaded top/bottom illustrated PCB SVG renderer built on the same pcb-svg compositor with 8 built-in solder-mask themes (saved, green, black, white, blue, red, purple, yellow), variant DNP filtering, single-footprint isolation (--footprint <REF>), and optional fitted assembly designators (--assembly).
Rendered from the bundled virtual_fab_layers.kicad_pcb example board (34 parts, 24 embedded STEP models, 7 cutouts):
kcr toon board.kicad_pcb -o output/toon
kcr toon board.kicad_pcb --side top --theme green -o output/toon
kcr toon board.kicad_pcb --side top --theme black --assembly -o output/toon
kcr toon board.kicad_pcb --footprint U1 -o output/toon
kcr toon board.kicad_pcb --embedded-only -o output/toonSee kcr toon for theme palettes, config auto-creation, --theme vs --soldermask-color rules, and path-containment guards.
3D Models in pcb-svg and toon Both pcb-svg and toon (Python kcr and Rust k3) prefer embedded kicad-embed:// STEP models and fall back to external STEP libraries automatically. Pass --embedded-only (or KCR_EMBEDDED_MODELS_ONLY=1) for portable CI runs, or embed external STEP models natively with kcr pcb embed-models — see Embedding 3D STEP Models.
kcr design (design-review, dr)
Generates an atomically published, agent-first D0 design-review bundle (./output/design_review by default) containing:
README.md,design_review_manifest.json(kicad_cruncher.design_review_manifest.d0),design_review_report.jsonreview_summary.json,compilation.json,bom.csv, andnotes.jsonschematics/<Sheet>.svgpaired with<Sheet>.layout.jsonSVG-space bounding-box sidecarspcb/(pnp.csv,board_summary.json,routing_context.json,manifest.json, andlayers/<LAYER>.svgcopper review plots)- Optional
source_documents/raw design & netlist dumps via--include-source-docs
kcr dr project.kicad_pro -o output/review
kcr dr project.kicad_pro --variant Proto --include-source-docs -o output/review
k3 dr project.kicad_pro -o output/reviewSee kcr design for auto-detection rules, flag interactions, and never-stop diagnostic behavior.