kicad monkey v2026.11.30
On This Page (84)

Fabrication, FabView & Virtual Layers

Analytic KiCadFabView, all 17 virtual fab layers, Gerber X2/X1, NC Drill, IPC-2581B, Micro-STEP, and vdoc baking.

84 public symbols.

AssemblyDesignatorLayerOptions

class
from kicad_monkey.fab import AssemblyDesignatorLayerOptions
class AssemblyDesignatorLayerOptions(min_font_size_mm: 'float' = 0.08, max_font_size_mm: 'float' = 2.4, fill_ratio: 'float' = 0.78, oblique_min_aspect_ratio: 'float' = 1.2, overrides: 'Mapping[str, bool]' = <factory>, visibility_mode: 'VirtualBasicVisibilityMode' = 'all') -> 'None'

Options for ``ASSEMBLY_DESIGNATORS_TOP`` and ``ASSEMBLY_DESIGNATORS_BOTTOM``.

AssemblyHlrCache

class
from kicad_monkey.fab import AssemblyHlrCache
class AssemblyHlrCache(*args, **kwargs)

Persistent cache hook for Geometer STEP HLR projections.

Members (2)
MemberKindSignatureSummary
loadmethod(self, model_hash: 'str', side: "Literal['top', 'bottom']", pose_signature: 'tuple[float, ...]') -> 'HlrProjectedGeometry | None'
storemethod(self, model_hash: 'str', side: "Literal['top', 'bottom']", pose_signature: 'tuple[float, ...]', geometry: 'HlrProjectedGeometry') -> 'None'

AssemblyOutlineLayerOptions

class
from kicad_monkey.fab import AssemblyOutlineLayerOptions
class AssemblyOutlineLayerOptions(detail: 'AssemblyOutlineDetail' = 'simple', stroke_width_mm: 'float' = 0.12, detail_stroke_width_mm: 'float' = 0.08, dnp_crossout_stroke_width_mm: 'float | None' = None, overrides: 'Mapping[str, AssemblyOutlineOverride]' = <factory>, visibility_mode: 'VirtualBasicVisibilityMode' = 'all') -> 'None'

Options for ``ASSEMBLY_OUTLINES_TOP`` and ``ASSEMBLY_OUTLINES_BOTTOM``.

AssemblyOutlineOverride

class
from kicad_monkey.fab import AssemblyOutlineOverride
class AssemblyOutlineOverride(enabled: 'bool | None' = None, detail: 'AssemblyOutlineDetail | None' = None) -> 'None'

Per-component assembly outline visibility and detail override.

BakeFootprintVirtualLayersOptions

class
from kicad_monkey.fab import BakeFootprintVirtualLayersOptions
class BakeFootprintVirtualLayersOptions(layers: 'tuple[str, ...]' = ('ASSEMBLY_OUTLINES_TOP', 'PIN1_TOP', 'DIODES_TOP', 'CAPACITORS_TOP', 'INDUCTORS_TOP', 'RESISTORS_TOP'), layer_map: 'Mapping[str, str] | None' = None, virtual_options: 'VirtualLayerOptions | None' = None, force: 'bool' = False, library_name: 'str | None' = None, source_path: 'Path | None' = None, search_dirs: 'tuple[Path, ...]' = (), embedded_only: 'bool' = False, include_installed_kicad: 'bool' = True, synthetic_designator: 'str | None' = None, extra_parameters: 'Mapping[str, str]' = <factory>) -> 'None'

Options controlling ``bake_virtual_layers_to_footprint``.

BakeFootprintVirtualLayersReport

class
from kicad_monkey.fab import BakeFootprintVirtualLayersReport
class BakeFootprintVirtualLayersReport(footprint_name: 'str', layers: 'tuple[BakeLayerReport, ...]', collisions: 'tuple[UserLayerCollision, ...]' = (), synthetic_designator: 'str' = '', model_source: 'str' = 'none', warnings: 'tuple[str, ...]' = ()) -> 'None'

Result summary for baking virtual layers into one ``KiCadFootprint``.

Members (1)
MemberKindSignatureSummary
total_items_writtenproperty -> 'int'

BakeLayerReport

class
from kicad_monkey.fab import BakeLayerReport
class BakeLayerReport(virtual_key: 'str', kicad_layer: 'str', group_name: 'str', items_written: 'int', removed_previous: 'int') -> 'None'

Result summary for one baked virtual layer.

BakeVirtualLayersOptions

class
from kicad_monkey.fab import BakeVirtualLayersOptions
class BakeVirtualLayersOptions(layers: 'tuple[str, ...]' = ('CUTOUTS', 'PIN1_TOP', 'PIN1_BOTTOM', 'DIODES_TOP', 'DIODES_BOTTOM', 'CAPACITORS_TOP', 'CAPACITORS_BOTTOM', 'INDUCTORS_TOP', 'INDUCTORS_BOTTOM', 'RESISTORS_TOP', 'RESISTORS_BOTTOM', 'ASSEMBLY_OUTLINES_TOP', 'ASSEMBLY_OUTLINES_BOTTOM', 'ASSEMBLY_DESIGNATORS_TOP', 'ASSEMBLY_DESIGNATORS_BOTTOM'), layer_map: 'Mapping[str, str] | None' = None, virtual_options: 'VirtualLayerOptions | None' = None, clear_existing: 'bool' = True, force: 'bool' = False, rename_user_layers: 'bool' = True) -> 'None'

Options controlling ``bake_virtual_layers_to_pcb``.

BakeVirtualLayersReport

class
from kicad_monkey.fab import BakeVirtualLayersReport
class BakeVirtualLayersReport(layers: 'tuple[BakeLayerReport, ...]', collisions: 'tuple[UserLayerCollision, ...]' = ()) -> 'None'

Aggregate report for a KiCad virtual-layer bake run.

BomOptions

class
from kicad_monkey.fab import BomOptions
class BomOptions

The keywords of ``FabBomOptions``, each optional.

Members (2)
MemberKindSignatureSummary
bom_rulesoption: ForwardRef('BomRules', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.BomOptions'>)
paneloption: ForwardRef('PanelOptions', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.BomOptions'>)

CapacitorLayerOptions

class
from kicad_monkey.fab import CapacitorLayerOptions
class CapacitorLayerOptions(positive_parameter: 'str' = 'POSITIVE_PAD', negative_parameter: 'str' = 'NEGATIVE_PAD', type_parameter: 'str' = 'CAPACITOR_TYPE', color_parameter: 'str' = 'CAPACITOR_COLOR', default_positive_pad: 'str' = '1', include_non_polarized: 'bool' = False, show_plus_sign: 'bool' = True, color_mode: 'VirtualColorMode' = 'shaded', designator_prefixes: 'tuple[str, ...]' = ('C',), keywords: 'tuple[str, ...]' = ('capacitor', 'tantalum', 'tant', 'electrolytic', 'elec', 'supercap', 'polymer'), overrides: 'Mapping[str, CapacitorOverride]' = <factory>, visibility_mode: 'VirtualPolarityVisibilityMode | None' = None) -> 'None'

Options for ``CAPACITORS_TOP`` and ``CAPACITORS_BOTTOM``.

Members (1)
MemberKindSignatureSummary
effective_visibility_modeproperty -> 'VirtualPolarityVisibilityMode'

CapacitorOverride

class
from kicad_monkey.fab import CapacitorOverride
class CapacitorOverride(enabled: 'bool | None' = None, positive_pad: 'str | None' = None, negative_pad: 'str | None' = None, polarized: 'bool | None' = None, color: 'str | None' = None) -> 'None'

Per-component capacitor polarity and style override.

ComponentVisibilityOverride

class
from kicad_monkey.fab import ComponentVisibilityOverride
class ComponentVisibilityOverride(assembly_outline: 'bool | None' = None, assembly_designator: 'bool | None' = None, pin1: 'bool | None' = None, pad_labels: 'bool | None' = None, diodes: 'bool | None' = None, capacitors: 'bool | None' = None, inductors: 'bool | None' = None, resistors: 'bool | None' = None) -> 'None'

Per-component visibility overrides across all 8 component-scoped virtual layer families.

Members (1)
MemberKindSignatureSummary
for_featuremethod(self, feature: 'VisibilityFeature') -> 'bool | None'

ComponentVisibilityPolicy

class
from kicad_monkey.fab import ComponentVisibilityPolicy
class ComponentVisibilityPolicy(exclude_kinds: 'tuple[str, ...]' = ('graphical', 'net_tie'), exclude_designator_prefixes: 'tuple[str, ...]' = (), outline_parameter: 'str' = 'ASSEMBLY_OUTLINE', designator_parameter: 'str' = 'ASSEMBLY_DESIGNATOR', pin1_parameter: 'str' = 'PIN1_MARKER', pad_labels_parameter: 'str' = 'PAD_LABELS', diode_parameter: 'str' = 'DIODE_SYMBOL', capacitor_parameter: 'str' = 'CAPACITOR_SYMBOL', inductor_parameter: 'str' = 'INDUCTOR_SYMBOL', resistor_parameter: 'str' = 'RESISTOR_SYMBOL', overrides: 'Mapping[str, ComponentVisibilityOverride]' = <factory>, excluded_designators: 'frozenset[str]' = <factory>) -> 'None'

Shared component inclusion policy across all 8 component-scoped virtual layer families.

Members (1)
MemberKindSignatureSummary
parameter_namemethod(self, feature: 'VisibilityFeature') -> 'str'

ContextOptions

class
from kicad_monkey.fab import ContextOptions
class ContextOptions

The keywords of ``FabContextOptions``, each optional.

Members (10)
MemberKindSignatureSummary
projectoption: ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>)
parametersoption: ForwardRef('dict[str, str]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>)
variantoption: ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>)
momentoption: ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>)
build_numberoption: ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>)
fontsoption: ForwardRef('FontOptions', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>)
mask_shapes_without_regionoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>)
backdrill_start_landsoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>)
keepout_textsoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>)
omit_drilled_away_inner_landsoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>)

CutoutLayerOptions

class
from kicad_monkey.fab import CutoutLayerOptions
class CutoutLayerOptions(scope: 'CutoutScope' = 'interior', hatch: 'bool' = True, hatch_angle_deg: 'float' = 45.0, hatch_pitch_mm: 'float' = 1.0, label: 'str' = 'CUTOUT', on_profile: 'bool' = False, outline_width_mm: 'float' = 0.1, hatch_line_width_mm: 'float' = 0.075, label_max_font_size_mm: 'float' = 4.0, label_fill_ratio: 'float' = 0.72, label_rotation_min_gain: 'float' = 0.25, color_mode: 'VirtualColorMode' = 'shaded') -> 'None'

Options for the ``CUTOUTS`` virtual layer and optional ``.GM`` overlay.

DiodeLayerOptions

class
from kicad_monkey.fab import DiodeLayerOptions
class DiodeLayerOptions(cathode_parameter: 'str' = 'CATHODE_PAD', anode_parameter: 'str' = 'ANODE_PAD', type_parameter: 'str' = 'DIODE_TYPE', color_parameter: 'str' = 'DIODE_COLOR', default_cathode_pad: 'str' = '2', color_mode: 'VirtualColorMode' = 'shaded', designator_prefixes: 'tuple[str, ...]' = ('D', 'LED'), keywords: 'tuple[str, ...]' = ('diode', 'led', 'schottky', 'tvs', 'zener', '1n'), overrides: 'Mapping[str, DiodeOverride]' = <factory>, cathode_pad_names: 'tuple[str, ...]' = ('K', 'C', 'CATHODE', 'CAT', '-'), visibility_mode: 'VirtualBasicVisibilityMode' = 'all') -> 'None'

Options for ``DIODES_TOP`` and ``DIODES_BOTTOM``.

DiodeOverride

class
from kicad_monkey.fab import DiodeOverride
class DiodeOverride(enabled: 'bool | None' = None, cathode_pad: 'str | None' = None, anode_pad: 'str | None' = None, diode_type: 'str | None' = None, color: 'str | None' = None) -> 'None'

Per-component diode polarity and style override.

Fab

class
from kicad_monkey.fab import Fab
class Fab(view: 'FabView', *, stem: 'str | None' = None) -> 'None'

One KiCad board's fabrication outputs and normalized ``FabView``.

Members (10)
MemberKindSignatureSummary
from_pcbclassmethod(cls, pcb: 'Any', *, variant: 'str | None' = None, stem: 'str | None' = None, moment: 'datetime | None' = None) -> 'Fab'Build a shared ``Fab`` facade directly from a :class:`KiCadPcb`.
to_bommethod(self, **options: 'Unpack[BomOptions]') -> 'FabOutput'Render Bill of Materials CSV from ``view.bom()``.
to_gerbersmethod(self, *, virtual_options: 'VirtualLayerOptions | None' = None, **options: 'Unpack[GerberOptions]') -> 'FabOutput'Render Ucamco Gerber X2/X1 files for physical and virtual layers.
to_ipc2581method(self, *, virtual_options: 'VirtualLayerOptions | None' = None, **options: 'Unpack[Ipc2581Options]') -> 'FabOutput'Render schema-valid IPC-2581 Rev B ``.cvg`` XML.
to_layer_svgsmethod(self, *, virtual_options: 'VirtualLayerOptions | None' = None, **options: 'Unpack[SvgOptions]') -> 'FabOutput'Render one SVG per selected layer (physical and/or virtual).
to_micro_stepmethod(self, output_path: 'str | Path', options: 'FabMicroStepOptions | None' = None) -> 'MicroStepStats'Write a compact, instanced AP242/AP214 Micro-STEP file directly from ``FabView``.
to_nc_drillmethod(self, **options: 'Unpack[NcDrillOptions]') -> 'FabOutput'Render Excellon NC drill and optional board-edge rout files.
to_pnpmethod(self, **options: 'Unpack[PnpOptions]') -> 'FabOutput'Render Pick-and-Place CSV from ``view.components()``.
to_svgmethod(self, *, virtual_options: 'VirtualLayerOptions | None' = None, **options: 'Unpack[SvgOptions]') -> 'FabOutput'Render a composite board SVG from the normalized ``FabView``.
viewmethod(self, **options: 'Unpack[ViewRequestOptions]') -> 'FabView'Return the normalized ``FabView`` for custom lowerings.

FabFile

class
from kicad_monkey.fab import FabFile
class FabFile(name: 'str', data: 'bytes', key: 'str | None' = None, role: 'str | None' = None, status: 'FabFileStatus' = 'written', count: 'int | None' = None, cause: 'str | None' = None, diagnostics: 'tuple[FabDiagnostic, ...]' = (), plated: 'bool | None' = None, span: 'tuple[str, str] | None' = None, encoding: 'str' = 'utf-8') -> 'None'

One file of a Fab output.

- ``name``: the file name, no folder.
- ``data``: its bytes; empty for an ``unavailable`` file.
- ``key``: the layer key it draws, None for a file drawn from no layer
(the NC drill's files, the profile film's is ``PROFILE``).
- ``role``: what it holds: a layer's role, or an NC drill file's kind
(``round``, ``slot``, ``square``, ``board_edge_rout``,
``counterhole``).
- ``status``: ``written``; ``partial``, where an error diagnostic names
something it leaves out; ``empty``, written with nothing in it; or
``unavailable``, not made, with its ``cause``.
- ``count``: what it holds: a layer file's items written, an NC drill
file's holes or rout paths; None for an unavailable file.

Members (1)
MemberKindSignatureSummary
textproperty -> 'str'The file's bytes decoded with ``encoding`` (UTF-8 by default;

FabMicroStepOptions

class
from kicad_monkey.fab import FabMicroStepOptions
class FabMicroStepOptions(layer_key: 'str' = 'BOTTOM', schema: 'StepSchema' = 'ap242', origin_mode: 'OriginMode' = 'board_origin', outline_mode: 'OutlineMode' = 'solid', outline_frame_width_mm: 'float' = 0.25, include_cutouts: 'bool' = True, board_thickness_mm: 'float | None' = None, copper_thickness_mm: 'float' = 0.035, copper_z_mm: 'float | None' = None, pad_thickness_bias_mm: 'float' = 0.01, via_thickness_bias_mm: 'float' = 0.006, area_thickness_bias_mm: 'float' = 0.003, include_lands: 'bool' = True, include_strokes: 'bool' = True, include_areas: 'bool' = True, include_vias: 'bool' = True, include_designators: 'tuple[str, ...]' = (), drill_mode: 'DrillMode' = 'overlay', drill_overlay_ring_width_mm: 'float' = 0.08, drill_overlay_thickness_mm: 'float' = 0.06, drill_overlay_shape: "Literal['ring', 'solid']" = 'ring', drill_minimum_diameter_mm: 'float' = 0.0, drill_plated_color: 'RgbColor' = (0.88, 0.88, 0.9), drill_non_plated_color: 'RgbColor' = (0.22, 0.22, 0.25), fuse: 'bool' = False, highlight_test_points: 'bool' = False, highlight_designators: 'tuple[str, ...]' = (), highlight_color: 'RgbColor' = (0.95, 0.12, 0.12), virtual_layers: 'tuple[str, ...]' = (), virtual_layer_z_offset_mm: 'float' = 0.05, virtual_layer_thickness_mm: 'float' = 0.035, enable_instancing: 'bool' = True, min_instance_count: 'int' = 2, board_color: 'RgbColor | None' = None, copper_color: 'RgbColor' = (0.72, 0.45, 0.2), pad_color: 'RgbColor' = (0.82, 0.56, 0.24), via_color: 'RgbColor' = (0.76, 0.48, 0.22)) -> 'None'

Configuration for converting a ``FabView`` into a Micro-STEP model.

FabOmitted

class
from kicad_monkey.fab import FabOmitted
class FabOmitted(output: 'str', files: 'str', reason: 'str') -> 'None'

A file the output does not make for a layer the board uses: the
output, the file it would be, and why.

FabOutput

class
from kicad_monkey.fab import FabOutput
class FabOutput(files: 'Sequence[FabFile]', diagnostics: 'Sequence[FabDiagnostic]' = (), omitted: 'Sequence[FabOmitted]' = ()) -> 'None'

A Fab output's files by name, in the output's order, with its
diagnostics and the files it leaves out.

``diagnostics`` holds every file's own diagnostics, then the output's.
``status`` is ``partial`` where an error diagnostic names something left
out, ``empty`` where no file holds content, else ``written``.

Members (4)
MemberKindSignatureSummary
diagnosticsproperty -> 'tuple[FabDiagnostic, ...]'Every file's diagnostics, in file order, then the output's own.
omittedproperty -> 'tuple[FabOmitted, ...]'The files the output leaves out, each with why.
statusproperty -> "Literal['written', 'partial', 'empty']"``partial`` where an error diagnostic names something left out,
writemethod(self, directory: 'str | PathLike[str]', *, overwrite: 'bool' = False) -> 'tuple[Path, ...]'Write every file that was made (not ``unavailable``) into

FabView

class
from kicad_monkey.fab import FabView
class FabView()

Base interface for a normalized, read-only fabrication view of a PCB or footprint.

Members (32)
MemberKindSignatureSummary
appearancemethod(self) -> 'FabAppearance | None'
boardmethod(self) -> 'FabBoard'
bodiesmethod(self) -> 'tuple[FabBody, ...]'
bommethod(self) -> 'tuple[FabBomLine, ...]'
childmethod(self, step: 'str') -> 'FabView | None'
componentsmethod(self) -> 'tuple[FabComponent, ...]'
contextmethod(self) -> 'FabViewContext'
counterholesmethod(self) -> 'tuple[FabCounterhole, ...]'
diagnosticsmethod(self, scope: 'str | None' = None) -> 'tuple[FabDiagnostic, ...]'
drill_pairsmethod(self) -> 'tuple[FabDrillPair, ...]'
fontsmethod(self) -> 'FabFontReport'
from_fileclassmethod(cls, path: 'str | PathLike[str]') -> 'JsonFabView'Load a ``JsonFabView`` from a JSON dump file.
from_jsonclassmethod(cls, raw: 'bytes | str') -> 'JsonFabView'Reconstruct a read-only ``JsonFabView`` from JSON bytes or text.
holesmethod(self) -> 'tuple[FabHole, ...]'
layermethod(self, key: 'str') -> 'FabLayerItems'
layer_all_filmsmethod(self, key: 'str') -> 'FabLayerItems'Mask or paste layer items across all films (default: same as ``layer``).
layersmethod(self) -> 'tuple[FabLayer, ...]'
model_bytesmethod(self, model_id: 'str') -> 'bytes | None'
modelsmethod(self) -> 'tuple[FabModel, ...]'
netsmethod(self) -> 'tuple[FabNet, ...]'
ownersmethod(self) -> 'tuple[FabOwner, ...]'
packagesmethod(self) -> 'tuple[FabPackage, ...]'
padstacksmethod(self) -> 'tuple[FabPadstack, ...]'
placementsmethod(self) -> 'tuple[FabComponent, ...]'
profilemethod(self) -> 'FabProfile | None'
regionsmethod(self) -> 'tuple[FabBoardRegion, ...]'
repeatsmethod(self) -> 'tuple[FabRepeat, ...]'
stackupmethod(self) -> 'FabStackup'
to_dumpmethod(self) -> 'FabViewA0'Serialize every answered query of this view into a ``FabViewA0``.
to_jsonmethod(self) -> 'bytes'Serialize this view to canonical UTF-8 JSON bytes.
to_step_datamethod(self) -> 'FabStepData'Materialize this step's answers as a ``FabStepData`` struct.
virtual_layermethod(self, key: 'str', options: 'VirtualLayerOptions | None' = None) -> 'VirtualLayerResult'Compute one on-demand virtual layer for this view.

GerberOptions

class
from kicad_monkey.fab import GerberOptions
class GerberOptions

The keywords of ``FabGerberOptions``, each optional.

Members (18)
MemberKindSignatureSummary
x2_attributesoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
datumoption: ForwardRef('FabDatum', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
offset_nmoption: ForwardRef('tuple[SignedLengthNm, SignedLengthNm]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
decimal_digitsoption: ForwardRef('FabDecimalDigits', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
stemoption: ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
same_coordinatesoption: ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
creation_dateoption: ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
degenerate_strokesoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
unconnected_inner_landsoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
pad_mastersoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
drill_guideoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
drill_drawingoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
keepoutoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
profileoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
mechanical_layersoption: ForwardRef('Sequence[FabLayerKey]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
extensionsoption: ForwardRef('dict[str, str]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
virtual_layersoption: ForwardRef('Sequence[FabLayerKey]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)
profile_cutoutsoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>)

HlrProjectedArc

class
from kicad_monkey.fab import HlrProjectedArc
class HlrProjectedArc(start: 'tuple[float, float]', end: 'tuple[float, float]', center: 'tuple[float, float]', radius: 'float', extent_rad: 'float', ccw: 'bool', full_circle: 'bool') -> 'None'

One Geometer HLR projected arc in local component-relative millimetres.

HlrProjectedGeometry

class
from kicad_monkey.fab import HlrProjectedGeometry
class HlrProjectedGeometry(outline_segments: 'tuple[tuple[tuple[float, float], tuple[float, float]], ...]', outline_arcs: 'tuple[HlrProjectedArc, ...]', detail_segments: 'tuple[tuple[tuple[float, float], tuple[float, float]], ...]', detail_arcs: 'tuple[HlrProjectedArc, ...]') -> 'None'

Both outline (simple) and detail HLR linework for one STEP model pose.

InductorLayerOptions

class
from kicad_monkey.fab import InductorLayerOptions
class InductorLayerOptions(polarity_parameter: 'str' = 'INDUCTOR_POLARITY_PAD', pin1_fallback_parameter: 'str' = 'PIN1_PAD', type_parameter: 'str' = 'INDUCTOR_TYPE', color_parameter: 'str' = 'INDUCTOR_COLOR', include_non_polarized: 'bool' = False, color_mode: 'VirtualColorMode' = 'shaded', designator_prefixes: 'tuple[str, ...]' = ('L', 'FB', 'IND'), keywords: 'tuple[str, ...]' = ('inductor', 'choke', 'ferrite', 'coil'), overrides: 'Mapping[str, InductorOverride]' = <factory>, visibility_mode: 'VirtualPolarityVisibilityMode | None' = None) -> 'None'

Options for ``INDUCTORS_TOP`` and ``INDUCTORS_BOTTOM``.

Members (1)
MemberKindSignatureSummary
effective_visibility_modeproperty -> 'VirtualPolarityVisibilityMode'

InductorOverride

class
from kicad_monkey.fab import InductorOverride
class InductorOverride(enabled: 'bool | None' = None, polarity_pad: 'str | None' = None, polarized: 'bool | None' = None, color: 'str | None' = None) -> 'None'

Per-component inductor polarity and style override.

Ipc2581Options

class
from kicad_monkey.fab import Ipc2581Options
class Ipc2581Options

The keywords of ``FabIpc2581Options``, each optional.

Members (11)
MemberKindSignatureSummary
stemoption: ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)
creation_dateoption: ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)
degenerate_strokesoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)
outline_arcsoption: ForwardRef('FabOutlineArcs', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)
merge_net_tiesoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)
negative_standoffsoption: ForwardRef('FabNegativeStandoffs', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)
edge_cutoutsoption: ForwardRef('FabEdgeCutouts', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)
bom_rulesoption: ForwardRef('BomRules', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)
paneloption: ForwardRef('PanelOptions', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)
document_layersoption: ForwardRef('Sequence[FabLayerKey]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)
virtual_layersoption: ForwardRef('Sequence[FabLayerKey]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>)

JsonFabView

class
from kicad_monkey.fab import JsonFabView
class JsonFabView(dump: 'FabViewA0', *, step_index: 'int' = 0, model_payloads: 'Mapping[str, bytes] | None' = None) -> 'None'

Read-only ``FabView`` backed by a decoded ``FabViewA0`` dump.

Members (24)
MemberKindSignatureSummary
appearancemethod(self) -> 'FabAppearance | None'
boardmethod(self) -> 'FabBoard'
bodiesmethod(self) -> 'tuple[FabBody, ...]'
bommethod(self) -> 'tuple[FabBomLine, ...]'
childmethod(self, step: 'str') -> 'FabView | None'
componentsmethod(self) -> 'tuple[FabComponent, ...]'
contextmethod(self) -> 'FabViewContext'
counterholesmethod(self) -> 'tuple[FabCounterhole, ...]'
diagnosticsmethod(self, scope: 'str | None' = None) -> 'tuple[FabDiagnostic, ...]'
drill_pairsmethod(self) -> 'tuple[FabDrillPair, ...]'
fontsmethod(self) -> 'FabFontReport'
holesmethod(self) -> 'tuple[FabHole, ...]'
layermethod(self, key: 'str') -> 'FabLayerItems'
layersmethod(self) -> 'tuple[FabLayer, ...]'
model_bytesmethod(self, model_id: 'str') -> 'bytes | None'
modelsmethod(self) -> 'tuple[FabModel, ...]'
netsmethod(self) -> 'tuple[FabNet, ...]'
ownersmethod(self) -> 'tuple[FabOwner, ...]'
packagesmethod(self) -> 'tuple[FabPackage, ...]'
padstacksmethod(self) -> 'tuple[FabPadstack, ...]'
profilemethod(self) -> 'FabProfile | None'
regionsmethod(self) -> 'tuple[FabBoardRegion, ...]'
repeatsmethod(self) -> 'tuple[FabRepeat, ...]'
stackupmethod(self) -> 'FabStackup'

KiCadFabView

class
from kicad_monkey.fab import KiCadFabView
class KiCadFabView(pcb: 'KiCadPcb', *, variant: 'str | None' = None, name: 'str | None' = None, geometry: "Literal['plotted', 'saved']" = 'plotted', copies: "Literal['flatten', 'steps']" = 'flatten', moment: 'datetime | None' = None) -> 'None'

Analytic ``FabView`` adapter over a parsed :class:`KiCadPcb`.

Members (19)
MemberKindSignatureSummary
boardmethod(self) -> 'FabBoard'
bodiesmethod(self) -> 'tuple[FabBody, ...]'
body_scalemethod(self, body_id: 'str') -> 'tuple[float, float, float]'Return ``(sx, sy, sz)`` scale for a KiCad 3D body (unit by default).
bommethod(self) -> 'tuple[FabBomLine, ...]'
componentsmethod(self) -> 'tuple[FabComponent, ...]'
contextmethod(self) -> 'FabViewContext'
custom_pad_rolemethod(self, source: 'object') -> 'str | None'Return the pad role (``smd_pad``, ``plated_pad``, ``non_plated_pad``) for custom pad primitives.
cutout_source_metadatamethod(self) -> 'tuple[tuple[tuple[str, ...], tuple[str, ...]], ...]'Return ``(sorted_kinds, unique_uuids)`` per profile cutout in ``profile().cutouts`` order.
drill_pairsmethod(self) -> 'tuple[FabDrillPair, ...]'
holesmethod(self) -> 'tuple[FabHole, ...]'
is_designator_sourcemethod(self, source: 'object') -> 'bool'Return True when ``source`` belongs to a footprint Reference designator text item.
layermethod(self, key: 'str') -> 'FabLayerItems'
layer_key_for_kicadmethod(self, layer_name: 'str') -> 'str | None'Resolve a KiCad layer name (e.g. ``F.Cu``, ``F.SilkS``) to its canonical FabView key.
layersmethod(self) -> 'tuple[FabLayer, ...]'
model_bytesmethod(self, model_id: 'str') -> 'bytes | None'
modelsmethod(self) -> 'tuple[FabModel, ...]'
netsmethod(self) -> 'tuple[FabNet, ...]'
profilemethod(self) -> 'FabProfile | None'
stackupmethod(self) -> 'FabStackup'

MicroStepStats

class
from kicad_monkey.fab import MicroStepStats
class MicroStepStats(schema: 'StepSchema', entity_count: 'int', solid_count: 'int', prototype_count: 'int', instance_count: 'int', unique_solid_count: 'int', byte_length: 'int') -> 'None'

Summary metrics returned alongside emitted STEP text.

NcDrillOptions

class
from kicad_monkey.fab import NcDrillOptions
class NcDrillOptions

The keywords of ``FabNcDrillOptions``, each optional.

Members (6)
MemberKindSignatureSummary
stemoption: ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>)
datumoption: ForwardRef('FabDatum', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>)
offset_nmoption: ForwardRef('tuple[SignedLengthNm, SignedLengthNm]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>)
decimal_digitsoption: ForwardRef('FabDecimalDigits', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>)
board_edge_routoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>)
board_edge_rout_tooloption: ForwardRef('LengthNm', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>)

PadLabelLayerOptions

class
from kicad_monkey.fab import PadLabelLayerOptions
class PadLabelLayerOptions(font_mode: 'VirtualFontMode' = 'stroke', stroke_font: 'VirtualStrokeFont' = 'sans_serif', font_family: 'str' = 'Arial', font_bold: 'bool' = True, orientation: 'PadLabelOrientation' = 'pad', knockout: 'bool' = False, fill_ratio: 'float' = 0.7, min_height_nm: 'float' = 60000.0, max_height_nm: 'float' = 2000000.0, stroke_width_ratio: 'float' = 0.14, skip_empty_designators: 'bool' = True, skip_mechanical_pads: 'bool' = False, include_through_hole: 'bool' = True, visibility: 'ComponentVisibilityPolicy | None' = None, color_mode: 'VirtualColorMode' = 'shaded', overrides: 'Mapping[str, bool]' = <factory>, visibility_mode: 'VirtualBasicVisibilityMode' = 'all') -> 'None'

Options for ``PAD_LABELS_TOP`` and ``PAD_LABELS_BOTTOM``.

Pin1LayerOptions

class
from kicad_monkey.fab import Pin1LayerOptions
class Pin1LayerOptions(pad_parameter: 'str' = 'PIN1_PAD', exclude_designator_prefixes: 'tuple[str, ...]' = ('R', 'C', 'L', 'F', 'FB', 'FU', 'SW'), exclude_two_pin_prefixes: 'tuple[str, ...]' = ('X', 'Y'), exclude_single_pin: 'bool' = True, diode_ak_labels: 'bool' = True, overrides: 'Mapping[str, Pin1Override]' = <factory>, style: 'Pin1Style' = 'dot', knockout: 'bool' = False, grid_pad_fill: 'bool' = True, dot_diameter_mm: 'float | None' = None, min_dot_diameter_mm: 'float' = 0.4, max_dot_diameter_mm: 'float' = 0.9, positive_parameter: 'str' = 'POSITIVE_PAD', negative_parameter: 'str' = 'NEGATIVE_PAD', cap_polarity_labels: 'bool' = True, inductor_polarity_markers: 'bool' = True, label_orientation: 'PadLabelOrientation' = 'pad', color_mode: 'VirtualColorMode' = 'shaded', visibility_mode: 'VirtualBasicVisibilityMode' = 'all') -> 'None'

Options for ``PIN1_TOP`` and ``PIN1_BOTTOM``.

Pin1Override

class
from kicad_monkey.fab import Pin1Override
class Pin1Override(enabled: 'bool | None' = None, pad: 'str | None' = None, style: 'Pin1Style | None' = None, knockout: 'bool | None' = None, symbol: 'str | None' = None, positive_pad: 'str | None' = None, negative_pad: 'str | None' = None) -> 'None'

Per-component Pin 1 and polarity marker override.

PnpOptions

class
from kicad_monkey.fab import PnpOptions
class PnpOptions

The keywords of ``FabPnpOptions``, each optional.

Members (2)
MemberKindSignatureSummary
unitsoption: ForwardRef('FabPnpUnits', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.PnpOptions'>)
paneloption: ForwardRef('PanelOptions', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.PnpOptions'>)

ResistorLayerOptions

class
from kicad_monkey.fab import ResistorLayerOptions
class ResistorLayerOptions(style: 'ResistorStyle' = 'zigzag', style_parameter: 'str' = 'RESISTOR_STYLE', color_parameter: 'str' = 'RESISTOR_COLOR', color_mode: 'VirtualColorMode' = 'shaded', designator_prefixes: 'tuple[str, ...]' = ('R',), keywords: 'tuple[str, ...]' = ('resistor', 'shunt', 'thermistor', 'ntc', 'ptc', 'varistor'), overrides: 'Mapping[str, ResistorOverride]' = <factory>, visibility_mode: 'VirtualBasicVisibilityMode' = 'all') -> 'None'

Options for ``RESISTORS_TOP`` and ``RESISTORS_BOTTOM``.

ResistorOverride

class
from kicad_monkey.fab import ResistorOverride
class ResistorOverride(enabled: 'bool | None' = None, style: 'ResistorStyle | None' = None, color: 'str | None' = None) -> 'None'

Per-component resistor style and colour override.

SvgOptions

class
from kicad_monkey.fab import SvgOptions
class SvgOptions

The keywords of ``FabSvgOptions``, each optional.

Members (10)
MemberKindSignatureSummary
layersoption: ForwardRef('Sequence[FabLayerKey]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>)
layer_coloursoption: ForwardRef('dict[str, str]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>)
scaleoption: ForwardRef('float', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>)
hidden_component_textsoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>)
degenerate_strokesoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>)
mirroroption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>)
clip_to_outlineoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>)
clip_holesoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>)
metadataoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>)
annotationsoption: ForwardRef('Sequence[FabSvgAnnotation]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>)

UserLayerCollision

class
from kicad_monkey.fab import UserLayerCollision
class UserLayerCollision(virtual_key: 'str', kicad_layer: 'str', existing_count: 'int') -> 'None'

One occupied KiCad layer that contains non-virtual user artwork.

ViewOptions

class
from kicad_monkey.fab import ViewOptions
class ViewOptions

The keywords of ``FabViewRequestOptions``, each optional.

Members (11)
MemberKindSignatureSummary
geometryoption: ForwardRef('FabGeometry', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)
copiesoption: ForwardRef('FabCopies', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)
variantoption: ForwardRef('FabVariantUse', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)
variationsoption: ForwardRef('FabVariations', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)
degenerate_strokesoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)
unconnected_inner_landsoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)
hidden_component_textsoption: ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)
board_edge_rout_tooloption: ForwardRef('LengthNm', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)
outline_arcsoption: ForwardRef('FabOutlineArcs', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)
merge_net_tiesoption: ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)
edge_cutoutsoption: ForwardRef('FabEdgeCutouts', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>)

VirtualItemStyle

class
from kicad_monkey.fab import VirtualItemStyle
class VirtualItemStyle(fill: 'str | None' = None, stroke: 'str | None' = None, halo_color: 'str | None' = None, halo_width_nm: 'float | None' = None, opacity: 'float | None' = None, dash_array_nm: 'tuple[float, ...]' = ()) -> 'None'

Per-item SVG paint metadata used when a virtual layer renders in shaded mode.

Gerber lowering ignores this style metadata and renders pure monochrome
geometry from ``VirtualLayerResult.placed``.

VirtualLayerOptions

class
from kicad_monkey.fab import VirtualLayerOptions
class VirtualLayerOptions(font_mode: 'VirtualFontMode' = 'stroke', stroke_font: 'VirtualStrokeFont' = 'sans_serif', font_family: 'str' = 'Arial', font_bold: 'bool' = True, dnp_mode: 'VirtualDnpMode' = 'omit', visibility: 'ComponentVisibilityPolicy' = <factory>, cutouts: 'CutoutLayerOptions' = <factory>, pin1: 'Pin1LayerOptions' = <factory>, diodes: 'DiodeLayerOptions' = <factory>, assembly_outlines: 'AssemblyOutlineLayerOptions' = <factory>, assembly_designators: 'AssemblyDesignatorLayerOptions' = <factory>, hlr_cache: 'AssemblyHlrCache | None' = None, progress: 'GeometerProgressCallback | None' = None, capacitors: 'CapacitorLayerOptions' = <factory>, inductors: 'InductorLayerOptions' = <factory>, resistors: 'ResistorLayerOptions' = <factory>, pad_labels: 'PadLabelLayerOptions' = <factory>) -> 'None'

Shared virtual layer options consumed by Gerber, SVG, IPC-2581, and ``FabView``.

VirtualLayerResult

class
from kicad_monkey.fab import VirtualLayerResult
class VirtualLayerResult(key: 'str', layer: 'PlacedLayer', placed: 'tuple[PlacedItem, ...]' = (), styles: 'Mapping[str, VirtualItemStyle]' = <factory>, color_mode: 'VirtualColorMode' = 'monochrome', owners: 'Mapping[str, str]' = <factory>) -> 'None'

Resolved placed geometry and optional SVG styling of one virtual layer.

Members (1)
MemberKindSignatureSummary
to_fab_layer_itemsmethod(self) -> 'FabLayerItems'Convert placed virtual items to a ``FabLayerItems`` contract payload.

VirtualLayerSpec

class
from kicad_monkey.fab import VirtualLayerSpec
class VirtualLayerSpec(key: 'str', name: 'str', role: 'str', side: 'str', default_extension: 'str', default_colour: 'str') -> 'None'

Identity, default Gerber extension, Gerber X2/report role, side, and
default SVG colour of a virtual FabView layer.

AssemblyOutlineDetail

function
from kicad_monkey.fab import AssemblyOutlineDetail
def AssemblyOutlineDetail(*args, **kwargs)

bake_virtual_layers_to_footprint

function
from kicad_monkey.fab import bake_virtual_layers_to_footprint
def bake_virtual_layers_to_footprint(footprint: 'KiCadFootprint', options: 'BakeFootprintVirtualLayersOptions | None' = None, *, source_footprint: 'KiCadFootprint | None' = None) -> 'BakeFootprintVirtualLayersReport'

Bake selected virtual FabView layers into ``footprint`` in place.

Pass ``source_footprint`` (the pre-clean snapshot) when calling clean before
bake so ``KiCadFabView`` evaluates the footprint's untouched source metadata.

bake_virtual_layers_to_pcb

function
from kicad_monkey.fab import bake_virtual_layers_to_pcb
def bake_virtual_layers_to_pcb(pcb: 'KiCadPcb', view: 'FabView', options: 'BakeVirtualLayersOptions | None' = None) -> 'BakeVirtualLayersReport'

Bake selected virtual fab layers into ``pcb`` in place.

build_virtual_layer

function
from kicad_monkey.fab import build_virtual_layer
def build_virtual_layer(view: 'FabView', key: 'str', options: 'VirtualLayerOptions | None' = None) -> 'VirtualLayerResult'

Compute one on-demand virtual layer for ``view`` (resolving aliases).

canonical_footprint_virtual_layer_key

function
from kicad_monkey.fab import canonical_footprint_virtual_layer_key
def canonical_footprint_virtual_layer_key(raw_key: 'str') -> 'str | None'

Resolve a footprint virtual layer key (including side-agnostic aliases).

canonical_virtual_layer_key

function
from kicad_monkey.fab import canonical_virtual_layer_key
def canonical_virtual_layer_key(key: 'str') -> 'str | None'

Resolve ``key`` (case-insensitive, including aliases) to a canonical virtual layer key.

clear_baked_virtual_layers

function
from kicad_monkey.fab import clear_baked_virtual_layers
def clear_baked_virtual_layers(pcb: 'KiCadPcb', *, keys: 'Sequence[str] | None' = None) -> 'int'

Remove previously baked virtual-layer items and groups from ``pcb``.

Copies

function
from kicad_monkey.fab import Copies
def Copies(*args, **kwargs)

Runtime representation of an annotated type.

At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
with extra metadata. The alias behaves like a normal typing alias.
Instantiating is the same as instantiating the underlying type; binding
it to types is also the same.

The metadata itself is stored in a '__metadata__' attribute as a tuple.

CutoutScope

function
from kicad_monkey.fab import CutoutScope
def CutoutScope(*args, **kwargs)

DEFAULT_FOOTPRINT_VIRTUAL_LAYERS

constant
from kicad_monkey.fab import DEFAULT_FOOTPRINT_VIRTUAL_LAYERS
DEFAULT_FOOTPRINT_VIRTUAL_LAYERS = ('ASSEMBLY_OUTLINES_TOP', 'PIN1_TOP', 'DIODES_TOP', 'CAPACITORS_TOP', 'INDUCTORS_TOP', 'RESISTORS_TOP')

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple.
If iterable is specified the tuple is initialized from iterable's items.

If the argument is a tuple, the return value is the same object.

DEFAULT_KICAD_VIRTUAL_LAYER_MAP

constant
from kicad_monkey.fab import DEFAULT_KICAD_VIRTUAL_LAYER_MAP
DEFAULT_KICAD_VIRTUAL_LAYER_MAP = {'CUTOUTS': 'User.1', 'PIN1_TOP': 'User.2', 'PIN1_BOTTOM': 'User.3', 'DIODES_TOP': 'User.4', 'DIODES_BOTTOM': 'User.5', 

dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
d = {}
for k, v in iterable:
d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)

DEFAULT_VDOC_LAYER_PRESET

constant
from kicad_monkey.fab import DEFAULT_VDOC_LAYER_PRESET
DEFAULT_VDOC_LAYER_PRESET = 'fab'

str(object='') -> str
str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or
errors is specified, then the object must expose a data buffer
that will be decoded using the given encoding and error handler.
Otherwise, returns the result of object.__str__() (if defined)
or repr(object).
encoding defaults to 'utf-8'.
errors defaults to 'strict'.

DEFAULT_VIRTUAL_EXTENSIONS

constant
from kicad_monkey.fab import DEFAULT_VIRTUAL_EXTENSIONS
DEFAULT_VIRTUAL_EXTENSIONS = {'CUTOUTS': 'GCU', 'PIN1_TOP': 'GP1T', 'PIN1_BOTTOM': 'GP1B', 'DIODES_TOP': 'GDT', 'DIODES_BOTTOM': 'GDB', 'CAPACITORS_T

dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
d = {}
for k, v in iterable:
d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)

detect_footprint_layer_collisions

function
from kicad_monkey.fab import detect_footprint_layer_collisions
def detect_footprint_layer_collisions(footprint: 'KiCadFootprint', layers: 'Sequence[str]', layer_map: 'Mapping[str, str] | None' = None) -> 'tuple[UserLayerCollision, ...]'

Detect existing graphics sitting on any target layer of ``footprint``.

detect_user_layer_collisions

function
from kicad_monkey.fab import detect_user_layer_collisions
def detect_user_layer_collisions(pcb: 'KiCadPcb', layers: 'Sequence[str]', layer_map: 'Mapping[str, str] | None' = None) -> 'tuple[UserLayerCollision, ...]'

Detect non-virtual artwork already sitting on any target KiCad layer.

DiodeColorMode

function
from kicad_monkey.fab import DiodeColorMode
def DiodeColorMode(*args, **kwargs)

DiodeType

function
from kicad_monkey.fab import DiodeType
def DiodeType(*args, **kwargs)

FOOTPRINT_SUPPORTED_VIRTUAL_LAYERS

constant
from kicad_monkey.fab import FOOTPRINT_SUPPORTED_VIRTUAL_LAYERS
FOOTPRINT_SUPPORTED_VIRTUAL_LAYERS = frozenset({'DIODES_TOP', 'INDUCTORS_TOP', 'PIN1_TOP', 'ASSEMBLY_OUTLINES_TOP', 'RESISTORS_TOP', 'CAPACITORS_TOP', 'PAD_L

Build an immutable unordered collection of unique elements.

Geometry

function
from kicad_monkey.fab import Geometry
def Geometry(*args, **kwargs)

Runtime representation of an annotated type.

At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
with extra metadata. The alias behaves like a normal typing alias.
Instantiating is the same as instantiating the underlying type; binding
it to types is also the same.

The metadata itself is stored in a '__metadata__' attribute as a tuple.

is_virtual_layer_key

function
from kicad_monkey.fab import is_virtual_layer_key
def is_virtual_layer_key(key: 'str') -> 'bool'

Whether ``key`` names one of the on-demand virtual fab layers (or an alias).

normalize_vdoc_preset

function
from kicad_monkey.fab import normalize_vdoc_preset
def normalize_vdoc_preset(name: 'str | None') -> 'str'

Normalize a preset token (``fab``, ``fab_outlines``/``fab-outlines``, ``user_only``/``user-only``).

PadLabelOrientation

function
from kicad_monkey.fab import PadLabelOrientation
def PadLabelOrientation(*args, **kwargs)

Pin1Style

function
from kicad_monkey.fab import Pin1Style
def Pin1Style(*args, **kwargs)

ResistorStyle

function
from kicad_monkey.fab import ResistorStyle
def ResistorStyle(*args, **kwargs)

resolve_kicad_layer_map

function
from kicad_monkey.fab import resolve_kicad_layer_map
def resolve_kicad_layer_map(custom: 'Mapping[str, str] | None' = None) -> 'dict[str, str]'

resolve_vdoc_preset_layer_map

function
from kicad_monkey.fab import resolve_vdoc_preset_layer_map
def resolve_vdoc_preset_layer_map(preset: 'str | None' = None) -> 'dict[str, str]'

Return a copy of the full 17-layer map for ``preset``.

VariantUse

function
from kicad_monkey.fab import VariantUse
def VariantUse(*args, **kwargs)

Runtime representation of an annotated type.

At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
with extra metadata. The alias behaves like a normal typing alias.
Instantiating is the same as instantiating the underlying type; binding
it to types is also the same.

The metadata itself is stored in a '__metadata__' attribute as a tuple.

VDOC_LAYER_PRESETS

constant
from kicad_monkey.fab import VDOC_LAYER_PRESETS
VDOC_LAYER_PRESETS = {'fab': {'CUTOUTS': 'User.1', 'PIN1_TOP': 'User.2', 'PIN1_BOTTOM': 'User.3', 'DIODES_TOP': 'User.4', 'DIODES_BOTTOM': 'U

dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
d = {}
for k, v in iterable:
d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)

VIRTUAL_LAYER_ALIASES

constant
from kicad_monkey.fab import VIRTUAL_LAYER_ALIASES
VIRTUAL_LAYER_ALIASES = {'POLARITY_TOP': 'PIN1_TOP', 'POLARITY_BOTTOM': 'PIN1_BOTTOM', 'PIN_1_TOP': 'PIN1_TOP', 'PIN_1_BOTTOM': 'PIN1_BOTTOM'}

dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
d = {}
for k, v in iterable:
d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)

VIRTUAL_LAYER_KEYS

constant
from kicad_monkey.fab import VIRTUAL_LAYER_KEYS
VIRTUAL_LAYER_KEYS = frozenset({'DIODES_TOP', 'INDUCTORS_BOTTOM', 'ASSEMBLY_OUTLINES_BOTTOM', 'DIODES_BOTTOM', 'RESISTORS_TOP', 'PAD_LABELS_T

Build an immutable unordered collection of unique elements.

virtual_layer_spec

function
from kicad_monkey.fab import virtual_layer_spec
def virtual_layer_spec(key: 'str') -> 'VirtualLayerSpec'

Return the specification for ``key`` (case-insensitive, resolving aliases) or raise ValueError.

VIRTUAL_LAYER_SPECS

constant
from kicad_monkey.fab import VIRTUAL_LAYER_SPECS
VIRTUAL_LAYER_SPECS = {'CUTOUTS': VirtualLayerSpec(key='CUTOUTS', name='Board Cutouts', role='cutouts', side='board', default_extension='GCU',

dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
d = {}
for k, v in iterable:
d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)

VirtualColorMode

function
from kicad_monkey.fab import VirtualColorMode
def VirtualColorMode(*args, **kwargs)

VirtualDnpMode

function
from kicad_monkey.fab import VirtualDnpMode
def VirtualDnpMode(*args, **kwargs)

VirtualFontMode

function
from kicad_monkey.fab import VirtualFontMode
def VirtualFontMode(*args, **kwargs)

VirtualStrokeFont

function
from kicad_monkey.fab import VirtualStrokeFont
def VirtualStrokeFont(*args, **kwargs)

VirtualVisibilityMode

function
from kicad_monkey.fab import VirtualVisibilityMode
def VirtualVisibilityMode(*args, **kwargs)
kicad-monkey v2026.11.30·Docs updated 2026.12.01 15:43 UTC (fd9b75b)