kicad monkey v2026.11.30
On This Page (10)

Fabrication & Enriched SVG Wire Formats

Beyond JSON wire contracts, kicad-monkey emits industry-standard manufacturing packages (Gerber RS-274X/X2, Excellon NC Drill, IPC-2581 Rev B, ISO 10303-21 Micro-STEP) and enriched review SVGs designed for interactive web viewers and automated design-review pipelines.

Every fabrication output is lowered from a single normalized whole-nanometre (+Y up) board view (KiCadFabView in Python, FabViewData in Rust), preventing geometric drift between copper Gerbers, drill files, IPC-2581 stackups, and alignment STEP solids.


1. Gerber RS-274X / X2

Both Python (fab.to_gerbers(...)) and Rust (KiCadFab::to_gerbers(...)) emit Ucamco Gerber Layer Format Specification 2026.05 files on an exact 1 nm metric grid (%FSLAX46Y46*%, %MOMM*%).

X2 Attributes & File Polarity

When Gerber X2 is enabled (the default; pass x2=False or --x1 for strict RS-274X), every file carries standard attribute headers:

PROFILE (.GM1) Convention & Extension Collisions


2. Excellon NC Drill

fab.to_nc_drill(...) / KiCadFab::to_nc_drill(...) emits unambiguous, explicit-decimal Excellon files that avoid leading/trailing zero ambiguity across CAM viewers:


3. IPC-2581 Rev B (.cvg)

fab.to_ipc2581(...) / KiCadFab::to_ipc2581() emits a single self-contained, schema-valid IPC-2581 Rev B .cvg XML file:


4. Micro-STEP (ISO 10303-21 AP242 / AP214)

fab.to_micro_step(...), KiCadFab::to_micro_step(), and kcr pcb-layer-step / k3 pcb-layer-step emit valid ISO 10303-21 STEP AP242 / AP214 3D CAD files with zero OpenCASCADE (OCCT) or Geometer runtime dependency:


5. Enriched PCB & Schematic SVG Formats

KiCad Monkey supports two distinct SVG profiles:

Enriched PCB SVG (pcb_svg_enrichment_a0.schema.json)

Document-level JSON metadata lives inside:

xml
<metadata id="pcb-enrichment-a0" data-schema="kicad_monkey.pcb.svg.enrichment.a0">
  { ... }
</metadata>

Root SVG discovery attributes include data-stage, data-group-mode, data-enrichment-schema, data-view-kind, data-profile, data-source, and data-included-layers. Element-level <g> wrappers carry:

Attribute GroupKey AttributesNotes
Primitive & source kinddata-primitive (track, arc, via, via-hole, zone, footprint, pad, pad-hole, graphic, text, dimension, footprint-graphic), data-ref (property, fp_text, fp_text_box, fp_line, fp_arc, fp_circle, fp_rect, fp_poly), data-kind, data-geometry-sourceIdentifies both the normalized review primitive and its originating KiCad source item or derived geometry source (e.g., STEP HLR vs. native F.Fab vs. pad envelope).
Layersdata-layer-name, data-layer-names, data-layer-role, data-layer-rolesUses canonical KiCad layer names (F.Cu, In1.Cu, F.SilkS); UI display aliases live in layers.layer_name_to_display_name.
Electrical & componentsdata-net, data-net-id, data-net-index, data-net-class, data-net-classes, data-component, data-component-uid, data-component-uuid, data-footprint, data-pad-number, data-pad-designator, data-pad-type, data-pad-shapeEnables instant net highlighting and component cross-probing without reparsing .kicad_pcb.
Drills & viasdata-hole-owner, data-hole-kind (round/slot), data-hole-plating (plated/non_plated/unknown), data-hole-diameter-mm, data-hole-width-mm, data-hole-height-mm, data-via-type, data-via-drill-mm, data-via-size-mm, data-ipc4761-*Copper-flash scope (via_aperture / pad flash) and physical drill scope (via_drill / pad-hole) are kept strictly separate so removed internal annuli never hide through-board drills.

Enriched Schematic SVG (schematic_svg_enrichment_a0.schema.json)

Document-level JSON metadata lives inside:

xml
<metadata id="schematic-enrichment-a0" data-schema="kicad_monkey.schematic.svg.enrichment.a0">
  { ... }
</metadata>

Element-level <g> wrappers carry data-ref (source KiCad record kind such as symbol_pin, sheet_pin) and data-primitive (symbol, power-symbol, sheet-symbol, port, sheet-entry, pin).

For interactive single-page highlighting, consumers should read view_indexes (svg_to_net, svg_to_nets, net_to_svg, net_uid_to_svg) first rather than walking the full embedded design payload or guessing connectivity from DOM nesting.

Compiled-Graph Selector Linkage

When rendered alongside a CompiledSchematicGraph, the enrichment payload additively includes compiled_schematic_graph_view (kicad_monkey.schematic.svg.compiled_graph_view.a0) with linkage contract kicad_monkey.schematic.svg.compiled_graph_linkage.a0:


kicad-monkey v2026.11.30·Docs updated 2026.12.01 15:43 UTC (fd9b75b)