Skip to main content
← Back to kicad-monkey Rust Docs kicad-monkey Rust Crate API Reference

Crate kicad_monkey_fab

Crate kicad_monkey_fab 

Source
Expand description

Pure-Rust fabrication output engine for KiCad >= 7 PCBs.

kicad-monkey-fab lowers a kicad_monkey_core::PcbView directly into a canonical whole-nanometre, +Y-up FabViewData model and writes manufacturing deliverables directly from that single semantic model:

  • Gerber X2 / X1 (.GTL, .GBL, .G1.., .GTS, .GBS, .GTP, .GBP, .GTO, .GBO, .GM1)
  • Excellon NC Drill (multi-span PTH/NPTH + G85 routed oval slots)
  • Analytic composite and per-layer SVGs
  • IPC-2581 Rev B (.cvg)
  • Pick-and-Place (centroid) CSV and grouped BOM CSV
  • Pure-Rust ISO 10303-21 Micro-STEP board substrate
  • All 17 canonical virtual fabrication layers

Re-exports§

pub use bake::BakeLayerReport;
pub use bake::BakeVirtualLayersOptions;
pub use bake::BakeVirtualLayersReport;
pub use bake::DEFAULT_VDOC_PCB_LAYERS;
pub use bake::PcbCleanOptions;
pub use bake::PcbCleanReport;
pub use bake::UserLayerCollision;
pub use bake::VIRTUAL_GROUP_PREFIX;
pub use bake::VdocLayerPreset;
pub use bake::bake_virtual_layers_source;
pub use bake::bake_virtual_layers_with_view;
pub use bake::clean_pcb_doc_layers_source;
pub use bake::clear_baked_virtual_layers;
pub use bake::default_kicad_layer_for_virtual;
pub use bake::default_kicad_layer_for_virtual_preset;
pub use bake::detect_user_layer_collisions;
pub use bake_footprint::BakeFootprintVirtualLayersOptions;
pub use bake_footprint::BakeFootprintVirtualLayersReport;
pub use bake_footprint::DEFAULT_FOOTPRINT_VIRTUAL_LAYERS;
pub use bake_footprint::FOOTPRINT_SUPPORTED_VIRTUAL_LAYERS;
pub use bake_footprint::bake_virtual_layers_to_footprint_source;
pub use bake_footprint::build_footprint_fab_view;
pub use bake_footprint::build_footprint_pad_outline;
pub use bake_footprint::clean_footprint_doc_layers_source;
pub use bake_footprint::detect_footprint_layer_collisions;
pub use bake_footprint::footprint_glob_match;
pub use bake_footprint::infer_synthetic_designator;
pub use bake_footprint::resolve_footprint_virtual_layer_key;
pub use designator_fit::DEFAULT_OBLIQUE_MIN_ASPECT_RATIO;
pub use designator_fit::DesignatorFit;
pub use designator_fit::DesignatorFitSession;
pub use designator_fit::normalize_designator_axis;
pub use designator_fit::pad_envelope;
pub use designator_fit::region_from_evenodd_layers;
pub use designator_fit::ring_polygon;
pub use designator_fit::subtract_cutouts;
pub use diodes::DiodeColorMode;
pub use diodes::DiodeGlyph;
pub use diodes::DiodeGlyphStroke;
pub use diodes::DiodeOptions;
pub use diodes::DiodeOverride;
pub use diodes::DiodeStrokeKind;
pub use diodes::DiodeType;
pub use diodes::DiodeVisibilityMode;
pub use diodes::ResolvedDiode;
pub use diodes::build_diode_glyphs;
pub use diodes::build_diodes_layer;
pub use diodes::resolve_diodes;
pub use drill::DrillOptions;
pub use drill::write_nc_drill;
pub use geom::AreaKind;
pub use geom::AreaShape;
pub use geom::ChamferCorners;
pub use geom::CoordNm;
pub use geom::DOT_NM;
pub use geom::FabArea;
pub use geom::FabComponent;
pub use geom::FabDrillPair;
pub use geom::FabHole;
pub use geom::FabLand;
pub use geom::FabLayer;
pub use geom::FabLayerItems;
pub use geom::FabProfile;
pub use geom::FabStackRow;
pub use geom::FabStroke;
pub use geom::LandKind;
pub use geom::LandRole;
pub use geom::LayerRole;
pub use geom::LayerSide;
pub use geom::Placement2D;
pub use geom::Ring2D;
pub use geom::RingSeg;
pub use geom::StrokeKind;
pub use geom::StrokePath;
pub use gerber::GerberOptions;
pub use gerber::render_virtual_gerber;
pub use gerber::write_gerbers;
pub use ipc2581::write_ipc2581;
pub use micro_step::LayerStepOptions;
pub use micro_step::LayerStepResult;
pub use micro_step::write_layer_step;
pub use micro_step::write_micro_step;
pub use passives::CapacitorOptions;
pub use passives::InductorOptions;
pub use passives::ResolvedCapacitor;
pub use passives::ResolvedInductor;
pub use passives::build_capacitors_layer;
pub use passives::build_capacitors_layer_with_options;
pub use passives::build_inductors_layer;
pub use passives::build_inductors_layer_with_options;
pub use passives::build_resistors_layer;
pub use passives::resolve_capacitor;
pub use passives::resolve_inductor;
pub use pin1::PadLabelOrientation;
pub use pin1::Pin1Marker;
pub use pin1::Pin1Options;
pub use pin1::Pin1Override;
pub use pin1::Pin1Role;
pub use pin1::build_pin1_layer;
pub use pin1::build_pin1_markers;
pub use pin1::is_grid_pad_designator;
pub use pose::BOARD_MODEL_Z_OFFSET_MM;
pub use pose::FabBody3D;
pub use pose::Matrix4;
pub use pose::flatten_row_major;
pub use pose::local_hlr_mm_to_board_nm;
pub use pose::local_pose_matrix;
pub use pose::normalize_scale;
pub use pose::turned_pose_matrix;
pub use svg::SvgOptions;
pub use svg::write_composite_svg;
pub use svg::write_layer_svgs;
pub use tabular::write_bom_csv;
pub use tabular::write_pnp_csv;
pub use view::FabViewData;
pub use virtual_layers::ALL_VIRTUAL_LAYERS;
pub use virtual_layers::build_virtual_layer;
pub use virtual_layers::resolve_virtual_layer_key;

Modules§

bake
Bake canonical virtual fabrication layers onto KiCad User.* PCB layers (kcr vdoc).
bake_footprint
Bake canonical FabView virtual layers into standalone KiCad .kicad_mod footprints.
designator_fit
Canonical source-neutral assembly-designator fitting shared by FabView virtual layers (ASSEMBLY_DESIGNATORS_*) and kcr pcb-svg / toon.
diodes
Virtual diode orientation layers (DIODES_TOP, DIODES_BOTTOM).
drill
Excellon NC Drill writer supporting multi-span PTH, NPTH, and G85 routed oval slots.
geom
Whole-nanometre (i64), +Y-up canonical geometry and fabrication records.
gerber
High-speed Gerber X2/X1 writer over canonical whole-nm +Y-up FabViewData.
ipc2581
IPC-2581 Rev B (.cvg) single-file manufacturing archive writer.
layer_map
KiCad layer stackup mapping to canonical FabView layer keys.
micro_step
Pure-Rust ISO 10303-21 Micro-STEP board substrate exporter (extruded profile + cutouts + holes).
passives
Full-parity passive orientation/symbol virtual layers: CAPACITORS_TOP/BOTTOM, INDUCTORS_TOP/BOTTOM, RESISTORS_TOP/BOTTOM.
pin1
Full-parity Pin 1 & Polarity virtual layer (PIN1_TOP, PIN1_BOTTOM).
pose
Canonical KiCad 3D model pose math and HLR-to-board coordinate mapping.
svg
Analytic composite and per-layer SVG writers over canonical FabViewData.
tabular
Pick-and-Place (centroid) CSV and grouped BOM CSV writers.
view
Canonical fabrication view construction over kicad-monkey-core::PcbView.
virtual_layers
All 17 canonical virtual fabrication layers (cutouts, pin-1, component classes, assembly, pad labels).

Structs§

FabAllOptions
Options controlling KiCadFab::write_all.
FabFile
One generated manufacturing file held in memory before writing to disk.
FabOutput
Result of a complete write_all fabrication run.
KiCadFab
High-level facade for pure-Rust KiCad fabrication output generation.

Enums§

FabError
Fabrication crate error.

Constants§

MIN_SUPPORTED_PCB_KICAD_MAJOR
Minimum supported KiCad PCB major version.