autoroute_pcb
Autoroute PCB traces using the Freerouting autorouter.
Instructions
Autoroute PCB traces using the Freerouting autorouter.
Exports the board to Specctra DSN format, runs Freerouting for automated
trace routing, and imports the results into a new PCB file. The original
board is never modified.
Requires KiCad's pcbnew Python bindings, whose major version has to match
the board's format era, and Java 25+ for the Freerouting build it
downloads. Unless FREEROUTING_JAR names a Freerouting jar, the first run
downloads Freerouting 2.5.0 (65 MB) from GitHub, checks its SHA-256 and
caches it.
Args:
pcb_path: Path to .kicad_pcb file. Optional; omit to use the configured default.
max_passes: Maximum autorouter optimization passes
num_threads: Thread count for routing. Defaults to 1 because
freerouting prints "Multi-threaded route optimization is broken
and it is known to generate clearance violations" on every run.
Raise it only if you are willing to DRC the result carefully.
timeout: Max seconds to wait for routing (default: 600)
output_dir: Directory for output files (default: same as PCB).
Optional; omit to use the configured default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | ||
| pcb_path | No | ||
| max_passes | No | ||
| output_dir | No | ||
| num_threads | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| warnings | No | ||
| vias_added | Yes | ||
| routed_path | Yes | ||
| traces_added | Yes | ||
| drc_violations | No | ||
| drc_unconnected | No | ||
| keepouts_promoted | No | ||
| text_fields_fixed | Yes |