Skip to content

D104 — Relax, route, legalise

Decision

Relax, route, legalise: route/legalize.{hpp,cpp} moves the vertices of routed tracks and vias (topology fixed) until the clearances of the board's rules hold, by Gauss-Seidel projection over the pairs that are too close; --legalize applies it to every warm start (--warm-pcb, --state-in, ramp stages), --relax = ramp at 60 % and 80 % of the clearance with legalisation and breathing between the stages, until complete

Alternatives

Route at the board's rules on the lattice only; a sequential-LP compaction (HiGHS) in the engine

Reason

At 0.06 mm all six stuck srj20 boards complete in minutes, and their solutions can be made legal at 0.10 mm by moving vertices (071, 039, 103, 048 complete at the true rules, KiCad DRC clean, after hours of scratch search at 72-76 of 74-78); the lattice wastes room it cannot use. Projection needs no LP solver and gave about the same as the LP prototype. Only routes that pass the exact check are kept, so legality does not depend on the heuristic. Tests: legalisation and clearance ramp cases in tests/test_txn.cpp