On This Page (84)
- AssemblyDesignatorLayerOptions
- AssemblyHlrCache
- AssemblyOutlineLayerOptions
- AssemblyOutlineOverride
- BakeFootprintVirtualLayersOptions
- BakeFootprintVirtualLayersReport
- BakeLayerReport
- BakeVirtualLayersOptions
- BakeVirtualLayersReport
- BomOptions
- CapacitorLayerOptions
- CapacitorOverride
- ComponentVisibilityOverride
- ComponentVisibilityPolicy
- ContextOptions
- CutoutLayerOptions
- DiodeLayerOptions
- DiodeOverride
- Fab
- FabFile
- FabMicroStepOptions
- FabOmitted
- FabOutput
- FabView
- GerberOptions
- HlrProjectedArc
- HlrProjectedGeometry
- InductorLayerOptions
- InductorOverride
- Ipc2581Options
- JsonFabView
- KiCadFabView
- MicroStepStats
- NcDrillOptions
- PadLabelLayerOptions
- Pin1LayerOptions
- Pin1Override
- PnpOptions
- ResistorLayerOptions
- ResistorOverride
- SvgOptions
- UserLayerCollision
- ViewOptions
- VirtualItemStyle
- VirtualLayerOptions
- VirtualLayerResult
- VirtualLayerSpec
- AssemblyOutlineDetail
- bake_virtual_layers_to_footprint
- bake_virtual_layers_to_pcb
- build_virtual_layer
- canonical_footprint_virtual_layer_key
- canonical_virtual_layer_key
- clear_baked_virtual_layers
- Copies
- CutoutScope
- DEFAULT_FOOTPRINT_VIRTUAL_LAYERS
- DEFAULT_KICAD_VIRTUAL_LAYER_MAP
- DEFAULT_VDOC_LAYER_PRESET
- DEFAULT_VIRTUAL_EXTENSIONS
- detect_footprint_layer_collisions
- detect_user_layer_collisions
- DiodeColorMode
- DiodeType
- FOOTPRINT_SUPPORTED_VIRTUAL_LAYERS
- Geometry
- is_virtual_layer_key
- normalize_vdoc_preset
- PadLabelOrientation
- Pin1Style
- ResistorStyle
- resolve_kicad_layer_map
- resolve_vdoc_preset_layer_map
- VariantUse
- VDOC_LAYER_PRESETS
- VIRTUAL_LAYER_ALIASES
- VIRTUAL_LAYER_KEYS
- virtual_layer_spec
- VIRTUAL_LAYER_SPECS
- VirtualColorMode
- VirtualDnpMode
- VirtualFontMode
- VirtualStrokeFont
- VirtualVisibilityMode
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
classfrom 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
classfrom kicad_monkey.fab import AssemblyHlrCache
class AssemblyHlrCache(*args, **kwargs)
Persistent cache hook for Geometer STEP HLR projections.
Members (2)
| Member | Kind | Signature | Summary |
|---|---|---|---|
load | method | (self, model_hash: 'str', side: "Literal['top', 'bottom']", pose_signature: 'tuple[float, ...]') -> 'HlrProjectedGeometry | None' | |
store | method | (self, model_hash: 'str', side: "Literal['top', 'bottom']", pose_signature: 'tuple[float, ...]', geometry: 'HlrProjectedGeometry') -> 'None' |
AssemblyOutlineLayerOptions
classfrom 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
classfrom 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
classfrom 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
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
total_items_written | property | -> 'int' |
BakeLayerReport
classfrom 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
classfrom 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
classfrom kicad_monkey.fab import BakeVirtualLayersReport
class BakeVirtualLayersReport(layers: 'tuple[BakeLayerReport, ...]', collisions: 'tuple[UserLayerCollision, ...]' = ()) -> 'None'
Aggregate report for a KiCad virtual-layer bake run.
BomOptions
classfrom kicad_monkey.fab import BomOptions
class BomOptions
The keywords of ``FabBomOptions``, each optional.
Members (2)
| Member | Kind | Signature | Summary |
|---|---|---|---|
bom_rules | option | : ForwardRef('BomRules', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.BomOptions'>) | |
panel | option | : ForwardRef('PanelOptions', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.BomOptions'>) |
CapacitorLayerOptions
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
effective_visibility_mode | property | -> 'VirtualPolarityVisibilityMode' |
CapacitorOverride
classfrom 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
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
for_feature | method | (self, feature: 'VisibilityFeature') -> 'bool | None' |
ComponentVisibilityPolicy
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
parameter_name | method | (self, feature: 'VisibilityFeature') -> 'str' |
ContextOptions
classfrom kicad_monkey.fab import ContextOptions
class ContextOptions
The keywords of ``FabContextOptions``, each optional.
Members (10)
| Member | Kind | Signature | Summary |
|---|---|---|---|
project | option | : ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>) | |
parameters | option | : ForwardRef('dict[str, str]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>) | |
variant | option | : ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>) | |
moment | option | : ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>) | |
build_number | option | : ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>) | |
fonts | option | : ForwardRef('FontOptions', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>) | |
mask_shapes_without_region | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>) | |
backdrill_start_lands | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>) | |
keepout_texts | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>) | |
omit_drilled_away_inner_lands | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ContextOptions'>) |
CutoutLayerOptions
classfrom 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
classfrom 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
classfrom 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
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
from_pcb | classmethod | (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_bom | method | (self, **options: 'Unpack[BomOptions]') -> 'FabOutput' | Render Bill of Materials CSV from ``view.bom()``. |
to_gerbers | method | (self, *, virtual_options: 'VirtualLayerOptions | None' = None, **options: 'Unpack[GerberOptions]') -> 'FabOutput' | Render Ucamco Gerber X2/X1 files for physical and virtual layers. |
to_ipc2581 | method | (self, *, virtual_options: 'VirtualLayerOptions | None' = None, **options: 'Unpack[Ipc2581Options]') -> 'FabOutput' | Render schema-valid IPC-2581 Rev B ``.cvg`` XML. |
to_layer_svgs | method | (self, *, virtual_options: 'VirtualLayerOptions | None' = None, **options: 'Unpack[SvgOptions]') -> 'FabOutput' | Render one SVG per selected layer (physical and/or virtual). |
to_micro_step | method | (self, output_path: 'str | Path', options: 'FabMicroStepOptions | None' = None) -> 'MicroStepStats' | Write a compact, instanced AP242/AP214 Micro-STEP file directly from ``FabView``. |
to_nc_drill | method | (self, **options: 'Unpack[NcDrillOptions]') -> 'FabOutput' | Render Excellon NC drill and optional board-edge rout files. |
to_pnp | method | (self, **options: 'Unpack[PnpOptions]') -> 'FabOutput' | Render Pick-and-Place CSV from ``view.components()``. |
to_svg | method | (self, *, virtual_options: 'VirtualLayerOptions | None' = None, **options: 'Unpack[SvgOptions]') -> 'FabOutput' | Render a composite board SVG from the normalized ``FabView``. |
view | method | (self, **options: 'Unpack[ViewRequestOptions]') -> 'FabView' | Return the normalized ``FabView`` for custom lowerings. |
FabFile
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
text | property | -> 'str' | The file's bytes decoded with ``encoding`` (UTF-8 by default; |
FabMicroStepOptions
classfrom 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
classfrom 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
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
diagnostics | property | -> 'tuple[FabDiagnostic, ...]' | Every file's diagnostics, in file order, then the output's own. |
omitted | property | -> 'tuple[FabOmitted, ...]' | The files the output leaves out, each with why. |
status | property | -> "Literal['written', 'partial', 'empty']" | ``partial`` where an error diagnostic names something left out, |
write | method | (self, directory: 'str | PathLike[str]', *, overwrite: 'bool' = False) -> 'tuple[Path, ...]' | Write every file that was made (not ``unavailable``) into |
FabView
classfrom kicad_monkey.fab import FabView
class FabView()
Base interface for a normalized, read-only fabrication view of a PCB or footprint.
Members (32)
| Member | Kind | Signature | Summary |
|---|---|---|---|
appearance | method | (self) -> 'FabAppearance | None' | |
board | method | (self) -> 'FabBoard' | |
bodies | method | (self) -> 'tuple[FabBody, ...]' | |
bom | method | (self) -> 'tuple[FabBomLine, ...]' | |
child | method | (self, step: 'str') -> 'FabView | None' | |
components | method | (self) -> 'tuple[FabComponent, ...]' | |
context | method | (self) -> 'FabViewContext' | |
counterholes | method | (self) -> 'tuple[FabCounterhole, ...]' | |
diagnostics | method | (self, scope: 'str | None' = None) -> 'tuple[FabDiagnostic, ...]' | |
drill_pairs | method | (self) -> 'tuple[FabDrillPair, ...]' | |
fonts | method | (self) -> 'FabFontReport' | |
from_file | classmethod | (cls, path: 'str | PathLike[str]') -> 'JsonFabView' | Load a ``JsonFabView`` from a JSON dump file. |
from_json | classmethod | (cls, raw: 'bytes | str') -> 'JsonFabView' | Reconstruct a read-only ``JsonFabView`` from JSON bytes or text. |
holes | method | (self) -> 'tuple[FabHole, ...]' | |
layer | method | (self, key: 'str') -> 'FabLayerItems' | |
layer_all_films | method | (self, key: 'str') -> 'FabLayerItems' | Mask or paste layer items across all films (default: same as ``layer``). |
layers | method | (self) -> 'tuple[FabLayer, ...]' | |
model_bytes | method | (self, model_id: 'str') -> 'bytes | None' | |
models | method | (self) -> 'tuple[FabModel, ...]' | |
nets | method | (self) -> 'tuple[FabNet, ...]' | |
owners | method | (self) -> 'tuple[FabOwner, ...]' | |
packages | method | (self) -> 'tuple[FabPackage, ...]' | |
padstacks | method | (self) -> 'tuple[FabPadstack, ...]' | |
placements | method | (self) -> 'tuple[FabComponent, ...]' | |
profile | method | (self) -> 'FabProfile | None' | |
regions | method | (self) -> 'tuple[FabBoardRegion, ...]' | |
repeats | method | (self) -> 'tuple[FabRepeat, ...]' | |
stackup | method | (self) -> 'FabStackup' | |
to_dump | method | (self) -> 'FabViewA0' | Serialize every answered query of this view into a ``FabViewA0``. |
to_json | method | (self) -> 'bytes' | Serialize this view to canonical UTF-8 JSON bytes. |
to_step_data | method | (self) -> 'FabStepData' | Materialize this step's answers as a ``FabStepData`` struct. |
virtual_layer | method | (self, key: 'str', options: 'VirtualLayerOptions | None' = None) -> 'VirtualLayerResult' | Compute one on-demand virtual layer for this view. |
GerberOptions
classfrom kicad_monkey.fab import GerberOptions
class GerberOptions
The keywords of ``FabGerberOptions``, each optional.
Members (18)
| Member | Kind | Signature | Summary |
|---|---|---|---|
x2_attributes | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
datum | option | : ForwardRef('FabDatum', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
offset_nm | option | : ForwardRef('tuple[SignedLengthNm, SignedLengthNm]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
decimal_digits | option | : ForwardRef('FabDecimalDigits', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
stem | option | : ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
same_coordinates | option | : ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
creation_date | option | : ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
degenerate_strokes | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
unconnected_inner_lands | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
pad_masters | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
drill_guide | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
drill_drawing | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
keepout | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
profile | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
mechanical_layers | option | : ForwardRef('Sequence[FabLayerKey]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
extensions | option | : ForwardRef('dict[str, str]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
virtual_layers | option | : ForwardRef('Sequence[FabLayerKey]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) | |
profile_cutouts | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.GerberOptions'>) |
HlrProjectedArc
classfrom 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
classfrom 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
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
effective_visibility_mode | property | -> 'VirtualPolarityVisibilityMode' |
InductorOverride
classfrom 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
classfrom kicad_monkey.fab import Ipc2581Options
class Ipc2581Options
The keywords of ``FabIpc2581Options``, each optional.
Members (11)
| Member | Kind | Signature | Summary |
|---|---|---|---|
stem | option | : ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) | |
creation_date | option | : ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) | |
degenerate_strokes | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) | |
outline_arcs | option | : ForwardRef('FabOutlineArcs', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) | |
merge_net_ties | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) | |
negative_standoffs | option | : ForwardRef('FabNegativeStandoffs', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) | |
edge_cutouts | option | : ForwardRef('FabEdgeCutouts', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) | |
bom_rules | option | : ForwardRef('BomRules', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) | |
panel | option | : ForwardRef('PanelOptions', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) | |
document_layers | option | : ForwardRef('Sequence[FabLayerKey]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) | |
virtual_layers | option | : ForwardRef('Sequence[FabLayerKey]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.Ipc2581Options'>) |
JsonFabView
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
appearance | method | (self) -> 'FabAppearance | None' | |
board | method | (self) -> 'FabBoard' | |
bodies | method | (self) -> 'tuple[FabBody, ...]' | |
bom | method | (self) -> 'tuple[FabBomLine, ...]' | |
child | method | (self, step: 'str') -> 'FabView | None' | |
components | method | (self) -> 'tuple[FabComponent, ...]' | |
context | method | (self) -> 'FabViewContext' | |
counterholes | method | (self) -> 'tuple[FabCounterhole, ...]' | |
diagnostics | method | (self, scope: 'str | None' = None) -> 'tuple[FabDiagnostic, ...]' | |
drill_pairs | method | (self) -> 'tuple[FabDrillPair, ...]' | |
fonts | method | (self) -> 'FabFontReport' | |
holes | method | (self) -> 'tuple[FabHole, ...]' | |
layer | method | (self, key: 'str') -> 'FabLayerItems' | |
layers | method | (self) -> 'tuple[FabLayer, ...]' | |
model_bytes | method | (self, model_id: 'str') -> 'bytes | None' | |
models | method | (self) -> 'tuple[FabModel, ...]' | |
nets | method | (self) -> 'tuple[FabNet, ...]' | |
owners | method | (self) -> 'tuple[FabOwner, ...]' | |
packages | method | (self) -> 'tuple[FabPackage, ...]' | |
padstacks | method | (self) -> 'tuple[FabPadstack, ...]' | |
profile | method | (self) -> 'FabProfile | None' | |
regions | method | (self) -> 'tuple[FabBoardRegion, ...]' | |
repeats | method | (self) -> 'tuple[FabRepeat, ...]' | |
stackup | method | (self) -> 'FabStackup' |
KiCadFabView
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
board | method | (self) -> 'FabBoard' | |
bodies | method | (self) -> 'tuple[FabBody, ...]' | |
body_scale | method | (self, body_id: 'str') -> 'tuple[float, float, float]' | Return ``(sx, sy, sz)`` scale for a KiCad 3D body (unit by default). |
bom | method | (self) -> 'tuple[FabBomLine, ...]' | |
components | method | (self) -> 'tuple[FabComponent, ...]' | |
context | method | (self) -> 'FabViewContext' | |
custom_pad_role | method | (self, source: 'object') -> 'str | None' | Return the pad role (``smd_pad``, ``plated_pad``, ``non_plated_pad``) for custom pad primitives. |
cutout_source_metadata | method | (self) -> 'tuple[tuple[tuple[str, ...], tuple[str, ...]], ...]' | Return ``(sorted_kinds, unique_uuids)`` per profile cutout in ``profile().cutouts`` order. |
drill_pairs | method | (self) -> 'tuple[FabDrillPair, ...]' | |
holes | method | (self) -> 'tuple[FabHole, ...]' | |
is_designator_source | method | (self, source: 'object') -> 'bool' | Return True when ``source`` belongs to a footprint Reference designator text item. |
layer | method | (self, key: 'str') -> 'FabLayerItems' | |
layer_key_for_kicad | method | (self, layer_name: 'str') -> 'str | None' | Resolve a KiCad layer name (e.g. ``F.Cu``, ``F.SilkS``) to its canonical FabView key. |
layers | method | (self) -> 'tuple[FabLayer, ...]' | |
model_bytes | method | (self, model_id: 'str') -> 'bytes | None' | |
models | method | (self) -> 'tuple[FabModel, ...]' | |
nets | method | (self) -> 'tuple[FabNet, ...]' | |
profile | method | (self) -> 'FabProfile | None' | |
stackup | method | (self) -> 'FabStackup' |
MicroStepStats
classfrom 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
classfrom kicad_monkey.fab import NcDrillOptions
class NcDrillOptions
The keywords of ``FabNcDrillOptions``, each optional.
Members (6)
| Member | Kind | Signature | Summary |
|---|---|---|---|
stem | option | : ForwardRef('str', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>) | |
datum | option | : ForwardRef('FabDatum', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>) | |
offset_nm | option | : ForwardRef('tuple[SignedLengthNm, SignedLengthNm]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>) | |
decimal_digits | option | : ForwardRef('FabDecimalDigits', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>) | |
board_edge_rout | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>) | |
board_edge_rout_tool | option | : ForwardRef('LengthNm', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.NcDrillOptions'>) |
PadLabelLayerOptions
classfrom 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
classfrom 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
classfrom 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
classfrom kicad_monkey.fab import PnpOptions
class PnpOptions
The keywords of ``FabPnpOptions``, each optional.
Members (2)
| Member | Kind | Signature | Summary |
|---|---|---|---|
units | option | : ForwardRef('FabPnpUnits', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.PnpOptions'>) | |
panel | option | : ForwardRef('PanelOptions', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.PnpOptions'>) |
ResistorLayerOptions
classfrom 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
classfrom 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
classfrom kicad_monkey.fab import SvgOptions
class SvgOptions
The keywords of ``FabSvgOptions``, each optional.
Members (10)
| Member | Kind | Signature | Summary |
|---|---|---|---|
layers | option | : ForwardRef('Sequence[FabLayerKey]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>) | |
layer_colours | option | : ForwardRef('dict[str, str]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>) | |
scale | option | : ForwardRef('float', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>) | |
hidden_component_texts | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>) | |
degenerate_strokes | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>) | |
mirror | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>) | |
clip_to_outline | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>) | |
clip_holes | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>) | |
metadata | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>) | |
annotations | option | : ForwardRef('Sequence[FabSvgAnnotation]', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.SvgOptions'>) |
UserLayerCollision
classfrom 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
classfrom kicad_monkey.fab import ViewOptions
class ViewOptions
The keywords of ``FabViewRequestOptions``, each optional.
Members (11)
| Member | Kind | Signature | Summary |
|---|---|---|---|
geometry | option | : ForwardRef('FabGeometry', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) | |
copies | option | : ForwardRef('FabCopies', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) | |
variant | option | : ForwardRef('FabVariantUse', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) | |
variations | option | : ForwardRef('FabVariations', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) | |
degenerate_strokes | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) | |
unconnected_inner_lands | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) | |
hidden_component_texts | option | : ForwardRef('FabDrawOrOmit', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) | |
board_edge_rout_tool | option | : ForwardRef('LengthNm', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) | |
outline_arcs | option | : ForwardRef('FabOutlineArcs', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) | |
merge_net_ties | option | : ForwardRef('bool', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) | |
edge_cutouts | option | : ForwardRef('FabEdgeCutouts', module='kicad_monkey.fab_view_contracts.generated.models', owner=<class 'kicad_monkey.fab_view_contracts.generated.models.ViewRequestOptions'>) |
VirtualItemStyle
classfrom 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
classfrom 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
classfrom 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)
| Member | Kind | Signature | Summary |
|---|---|---|---|
to_fab_layer_items | method | (self) -> 'FabLayerItems' | Convert placed virtual items to a ``FabLayerItems`` contract payload. |
VirtualLayerSpec
classfrom 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
functionfrom kicad_monkey.fab import AssemblyOutlineDetail
def AssemblyOutlineDetail(*args, **kwargs)
bake_virtual_layers_to_footprint
functionfrom 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
functionfrom 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
functionfrom 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
functionfrom 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
functionfrom 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
functionfrom 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
functionfrom 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
functionfrom kicad_monkey.fab import CutoutScope
def CutoutScope(*args, **kwargs)
DEFAULT_FOOTPRINT_VIRTUAL_LAYERS
constantfrom 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
constantfrom 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
constantfrom 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
constantfrom 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
functionfrom 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
functionfrom 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
functionfrom kicad_monkey.fab import DiodeColorMode
def DiodeColorMode(*args, **kwargs)
DiodeType
functionfrom kicad_monkey.fab import DiodeType
def DiodeType(*args, **kwargs)
FOOTPRINT_SUPPORTED_VIRTUAL_LAYERS
constantfrom 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
functionfrom 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
functionfrom 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
functionfrom 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
functionfrom kicad_monkey.fab import PadLabelOrientation
def PadLabelOrientation(*args, **kwargs)
Pin1Style
functionfrom kicad_monkey.fab import Pin1Style
def Pin1Style(*args, **kwargs)
ResistorStyle
functionfrom kicad_monkey.fab import ResistorStyle
def ResistorStyle(*args, **kwargs)
resolve_kicad_layer_map
functionfrom 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
functionfrom 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
functionfrom 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
constantfrom 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
constantfrom 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
constantfrom 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
functionfrom 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
constantfrom 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
functionfrom kicad_monkey.fab import VirtualColorMode
def VirtualColorMode(*args, **kwargs)
VirtualDnpMode
functionfrom kicad_monkey.fab import VirtualDnpMode
def VirtualDnpMode(*args, **kwargs)
VirtualFontMode
functionfrom kicad_monkey.fab import VirtualFontMode
def VirtualFontMode(*args, **kwargs)
VirtualStrokeFont
functionfrom kicad_monkey.fab import VirtualStrokeFont
def VirtualStrokeFont(*args, **kwargs)
VirtualVisibilityMode
functionfrom kicad_monkey.fab import VirtualVisibilityMode
def VirtualVisibilityMode(*args, **kwargs)