wire_pins_to_net
Connects schematic pins to a named net with short wire stubs and net labels, refusing the whole call if any pin cannot be wired safely.
Instructions
Put each listed pin on the net named label_text, or refuse and write nothing.
Each pin gets a short wire stub pointing away from its symbol, with a net
label at the stub's end. When the stub would touch, overlap or cross
anything else on the sheet, or move a net into another net class, the
label goes on the pin end itself instead. No junction is ever written, and
a pin already on the net is left alone. The file is written once or not
at all.
The whole call is refused when any pin cannot be wired safely: its net may
already carry another name, it may reach something this tool cannot judge
(a bus, a sheet pin, a text variable, a copy of the pad on another sheet),
another part shares its reference, or every position is blocked. The
refusal lists every refused pin with a bracketed reason code such as
[names] or [touch], the obstacle, and a remedy. add_label and add_wires
check none of this, so they are no way around a refusal.
It places no PWR_FLAG: whether a net needs one depends on every driver on
the net, not on the pins in one call. Use add_power_symbol for that.
Args:
pins: List of {"reference": "R1", "pin": "1"} dicts
label_text: Net name (e.g. "GND", "VCC"), exactly as it should read: no surrounding
spaces, no leading "/", no text variable ("${...}"), no bus syntax, not a KiCad
auto name such as "Net-(R1-1)"
direction: Stub direction: "auto" (away from the symbol), "left", "right", "up", "down"
stub_length: Stub length in mm, a multiple of 1.27 up to 1000 (default 2.54)
schematic_path: Path to .kicad_sch file. Optional; omit to use the configured default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pins | Yes | ||
| direction | No | auto | |
| label_text | Yes | ||
| stub_length | No | ||
| schematic_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |