Add diagonal_win.dsn: a 45-degree pin-to-pin net with a keepout placed inside the diagonal's bounding box but clear of the true thin copper. Orthogonal routing connects it with a Manhattan-length staircase (1600000); diagonal routing replaces that with a single 45-degree trace at the ideal hypotenuse length (1131371) -- a 29% reduction -- DRC-clean via the search tree and via an independent reconstruction of the emitted 45-degree copper's clearance octagon. test_exact_clearance_is_load_bearing shows the keepout overlaps the coarse bounding box but not the exact octagon, so the exact clearance (not the box) is what lets the diagonal route. Determinism, endpoints-on-pads, valid SES, and diagonal-off-equals-orthogonal (additive, over four fixtures) are covered.
freeroute
A native Python PCB autorouter — a Java-free port of the FreeRouting engine.
Why
kicad-mcp currently autoroutes by shelling out to freerouting.jar, which
drags in a JVM dependency. freeroute reimplements the routing engine in
pure Python so the toolchain needs no Java at all.
The contract
The entire integration surface is two Specctra files:
board.dsn ──▶ freeroute ──▶ board.ses
(unrouted) (routed session: traces + vias)
kicad-cli already exports .dsn and imports .ses, so freeroute is a
drop-in replacement for the JAR step — nothing else in the pipeline changes.
Status
Pre-alpha. Under active development. See docs/PORTING_PLAN.md
for the architecture and porting roadmap.
Usage (target)
freeroute board.dsn -o board.ses
Development
uv sync
uv run pytest
uv run ruff check src/ tests/
License
GPL-3.0-or-later, matching the FreeRouting source it is ported from.
Languages
Python
100%