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

Module geom

Module geom 

Source
Expand description

Whole-nanometre (i64), +Y-up canonical geometry and fabrication records.

Structs§

ChamferCorners
Chamfered rectangle corner flags (+Y up).
CoordNm
Whole-nanometre 2D coordinate (+Y up).
FabArea
One filled area item (zone pour, custom pad polygon, filled graphic, text outline).
FabComponent
One placed component summary (for PnP, BOM, IPC-2581, and virtual layers).
FabDrillPair
Drill pair span (through, blind, buried, microvia).
FabHole
One drilled hole or routed oval slot.
FabLand
One flashed pad or via land.
FabLayer
Layer descriptor in stackup order.
FabLayerItems
All items on one canonical layer.
FabProfile
Closed board outline + interior cutouts (outer CCW, cutouts CW).
FabStackRow
Physical stackup row.
FabStroke
One swept stroke item (track, graphic line/arc, text glyph stroke).
Placement2D
Rigid translation + CCW rotation (+Y up) in whole nanometres.
Ring2D
Closed 2D ring in whole nanometres (+Y up).

Enums§

AreaKind
Kind of a filled area item.
AreaShape
Analytic 2D area shape (in local coordinates, +Y up, whole nm).
LandKind
Kind of a fabrication land item.
LandRole
Role of a flashed pad or via land.
LayerRole
Board layer metadata.
LayerSide
Board side classification.
RingSeg
Closed ring segment kind (straight line or circular arc).
StrokeKind
Kind of a swept stroke item.
StrokePath
Swept line or circular arc path (round caps/joins, whole nm, +Y up).

Constants§

DOT_NM
Maximum stroke centreline length / arc diameter (100 nm) treated as a dot disk, matching Python kicad_monkey.fab.geometry.placed.DOT_NM.
MM_TO_NM
Millimetres to whole nanometres multiplier.

Functions§

append_arc_interior_points
Append intermediate chord points along a circular arc (excluding p0 and p1).
circle_from_3pts
Compute circumcircle ((cx, cy), radius, ccw) from 3 points in +Y-up nm.
fp_local_to_board_mm
Transform footprint-local KiCad mm (+Y down) to board-space KiCad mm (+Y down).
mm_to_nm
Convert KiCad millimetres to whole nanometres.
pt_up
Convert KiCad board coordinates (+Y down, mm) to FabView coordinates (+Y up, whole nm).
signed_area_2x
Twice the signed area of a closed polygon in nm^2.