Add Schematic Wire
add_schematic_wireAdd electrical wires to a KiCad schematic by specifying coordinate waypoints. Snaps endpoints to pins for precise connections and supports routing around components with intermediate waypoints.
Instructions
Draws a wire on the schematic between two or more coordinate points. Always call get_schematic_pin_locations first to get the approximate pin coordinates, then pass them as the first and last waypoints. snapToPins (on by default) will correct any float imprecision by snapping endpoints to the exact nearest pin coordinate. To route around components, add intermediate waypoints between the start and end: e.g. [[x1,y1], [xMid,y1], [xMid,y2], [x2,y2]] routes horizontally then vertically. Intermediate waypoints are never snapped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| waypoints | Yes | Ordered list of [x, y] coordinates. Minimum 2 points. | |
| snapToPins | No | Snap the first and last waypoints to the nearest pin (default: true) | |
| schematicPath | Yes | Path to the .kicad_sch file | |
| snapTolerance | No | Maximum snap distance in mm (default: 1.0) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |