skidl.tools.kicad7.backend module¶
Concrete KiCad-9 implementation of the tool-agnostic SchematicBackend.
Every method here delegates VERBATIM to the existing functions in
sexp_schematic.py — this is a thin adapter so the agnostic decision layer
(schematics/decisions.py) can reach the KiCad render geometry and emission
primitives through the interface in schematics/backend.py without importing
skidl.tools.kicad9 directly. The KiCad coordinate math and S-expression
syntax stay in sexp_schematic.py; nothing here changes output.
- class skidl.tools.kicad7.backend.Kicad9Backend[source]¶
Bases:
objectAdapter exposing kicad9 geometry + emission as a SchematicBackend.
Interface status (honest): geometry queries (pin_render_pos, pin_render_dir, is_power_net_name, render_xy, label_bbox) are LIVE — consumed by schematics.decisions. Among emission primitives, emit_wire and emit_no_connect ARE on the live path; emit_label/emit_part/ emit_power_symbol/emit_junction are defined for completeness but the renderer still uses the module-level functions for those. solve_snap_tx is DEFERRED (raises; see doc P1b).
- apply_label_deconfliction(elements, node, sheet_tx)[source]¶
Read global_label/wire Sexps, run the agnostic deconfliction decision, then mutate label
atcoords + append connecting wires.The Sexp reading and mutation (tool-specific) stay here; the overlap detection + nudge-target decision lives in
schematics.decisions.deconflict_labels.
- emit_wire(x1, y1, x2, y2, *, net_name=None, uuid_seed=None)[source]¶
Build a bare wire Sexp at render-mm coords.
Mirrors the inline wire construction in the decision functions; the caller supplies the UUID seed so emitted UUIDs match the originals.
- label_bbox(text)[source]¶
Rendered net-label box size in mm.
Matches the fixed box that
_deconflict_labelsuses today (LABEL_W x LABEL_H), so the relocated deconfliction is byte-identical.
- pin_render_dir(pin, sheet_tx)[source]¶
Render-space pin direction ==
calc_pin_dir.Note: the present
calc_pin_dirignoressheet_tx(see the architecture doc, section 3 / section 6). Foldingsheet_txin would change output, so this adapter preserves the current behavior exactly.
- render_xy(lx, ly, part, sheet_tx)[source]¶
Render-mm of an arbitrary part-local point ==
_render_xy.
- supports_snap = True¶
