Ryan Malloy 33cb196bc8 Add exact planar points and vectors
Ports the point/vector foundation of geometry/planar: Side and Signum
(three-valued signs), Limits, FloatPoint (approximate), and the exact
IntPoint/IntVector plus projective RationalPoint/RationalVector.

Arithmetic model per type is documented in each module. The key
simplification over the Java source: Python's unbounded int makes the
exact orientation determinants and rational (x,y,z) coordinates trivial,
so side_of is kept exact (upstream uses a double for speed) and no
BigInteger or CRIT_INT overflow promotion is needed. Rational points use
the projective triple with z=0 denoting the point at infinity.

Tests cover collinearity, determinants beyond Java long range, rational
equality/reduction, and integer/rational promotion.
2026-07-11 18:01:21 -06:00
2026-07-11 18:01:21 -06:00

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.

Description
Native Python PCB autorouter — a Java-free port of the FreeRouting engine (Specctra DSN in, SES out)
Readme GPL-3.0 391 KiB
Languages
Python 100%