Expand description
Virtual diode orientation layers (DIODES_TOP, DIODES_BOTTOM).
Full pure-Rust parity with Python’s kicad_monkey.fab.virtual._diodes:
Resolution precedence per fitted component on the requested side:
- Per-component config override (
DiodeOptions.overrides.<ref>) - Footprint parameters on
FabComponent.parameters:CATHODE_PAD(if present, skips auto-detection heuristics; value"none"/"false"/"off"/"no"/"0"/"disable"/"disabled"suppresses)- optional
ANODE_PAD - optional
DIODE_TYPE(normal,led,schottky,zener,tvs) - optional
DIODE_COLOR(hex#RRGGBBor named color for SVG shading) - optional
DIODE_SYMBOLvisibility boolean
- Auto-detection heuristics (only when neither override nor
CATHODE_PADdecided):- 2-terminal fitted part matching
designator_prefixes(e.g.D,LED) or ASCII word-boundarykeywordsacross designator, description, value, footprint, and parameters (blocked when prefix belongs to another passive family such asC/L/R) - Pad name polarity hints (
K/C/CATHODE/CAT/-vsA/ANODE/ANO/+), falling back todefault_cathode_pad(default"2")
- 2-terminal fitted part matching
Glyph geometry follows PCBE’s terminal_presentation_geometry.rs:
axis shaft, filled triangle pointing anode -> cathode, subtype-specific
cathode bar (straight / Schottky S-hook / Zener & TVS angled wings), and
LED light-ray arrows.
Structs§
- Diode
Glyph - Complete styled vector geometry of one diode symbol (
+Yup, whole nm). - Diode
Glyph Stroke - One straight stroke segment in a diode glyph (
+Yup, whole nm). - Diode
Options - Configuration for
DIODES_TOPandDIODES_BOTTOMdetection and rendering. - Diode
Override - Per-component diode polarity and style override.
- Resolved
Diode - Resolved diode polarity, subtype, and shading palette for one component.
Enums§
- Diode
Color Mode - SVG color rendering mode for virtual diode overlays.
- Diode
Stroke Kind - Semantic kind of one stroke inside a diode glyph.
- Diode
Type - Canonical diode subtype.
- Diode
Visibility Mode - Visibility mode for diode virtual layers.
Functions§
- build_
diode_ glyphs - Build full styled diode glyphs on
sidefor SVG or Gerber lowering. - build_
diodes_ layer - Build canonical monochrome
FabLayerItemsforDIODES_TOPorDIODES_BOTTOM. - darken_
hex - Darken a
#RRGGBBhex color byfactor(matching Python_darken_hex). - resolve_
diodes - Resolve all visible diode components on
side.