Auto-route the whole netlist

Place a small board with the placement helpers — rightOf, below, sameAs — then let the router connect every net. No manual tracks.

Click through the files — it's the whole project

Auto-route the whole netlist — Visual Studio Code
Select a file from the explorer
2 layers · 3 nets placement helpers · route

What's going on

  • No hard-coded millimeters: the connector is 4 mm in from the left edge, the resistor sits right of it, the LED follows the resistor, and the bleed resistor drops below the LED. Gaps are courtyard edge to courtyard edge.
  • Every net is built with named() and passed to route() — the router connects each one, choosing layers and dropping vias per the board's via policy.
  • Trace width and clearance aren't in the file because they come from the board's design rules — the JLCPCB no-surcharge standard unless you change them.
  • When the router picks something you don't like, override the net: typecad.route(net, { width: 0.5 }), or route it by hand with track() instead.

Build and check

terminal
cd my-project/hw
npx @typecad/pcb build
terminal
npx typecad-pcb drc

  [DRC] 12 checks passed, 0 violations

Open the board in the VS Code board viewer to see the routes — click copper to light up a net and check the router's work.

Where to go next

  • Routing — route options, powerInfo widths, and the manual TrackBuilder
  • Placement — the relational verbs and live arithmetic used in this file
  • Board Layout — where the default width and clearance come from
© 2026 typeCAD — code-defined electronics github