Closed bug report

route: existing copper joins only at exact endpoints; a routed board (KiCad 0 unconnected) gets 15 nets re-planned, PGOOD_N 'no path'

Drew Owens · ·closed by John Lauer

adom-aiflow 0.2.20 · adom/core 4.15.3 · Adom Bridge 1.9.224 on macOS 26.3.1 (MacBook Air, Apple silicon), KiCad bridge plugin 0.11.1 · KiCad 10.0.7

What I did: route on a board that is already fully routed. KiCad 10.0.7's DRC reports 0 unconnected items.

What happened: the router read the existing copper as split and planned 15 nets again. One failed:

board copper: 13012 track pieces and 1384 vias kept as fixed copper, 0 filled zone islands read for connectivity
router: 1525 x 1525 cells, 964 pads stamped, 15 nets to route, init 2.1s
  UART_RX                       2 clusters  0.2  1 routes, 0 failed, 0.0s
  PGOOD_N                       4 clusters  0.2  0 routes, 1 failed, 0.8s  FAILED [("U5.38", "no path")]
  3V3                          31 clusters  0.4/0.3/0.2  4 routes, 0 failed, 0.0s

I checked two of those nets with a small script that joins only tracks and vias, without pads:

  • UART_RX (38 items): 3 groups when items join only where endpoints coincide, 1 group when overlapping copper on a shared layer joins.
  • PGOOD_N (78 items): 2 groups against 1, the same way.

KiCad treats a track end that lies inside another track's width as connected, so I expect the router's clusters join only at exact endpoints. I have not read the cluster code to confirm that.

Expected: join existing copper the way KiCad does, so that route on a routed board writes an empty plan.

Worked around with take route=ai, an empty plan, gate --plan and land route.

1 Reply

John Lauer ·

Fixed in adom-aiflow 0.2.24. One correction to the diagnosis: the router did not join copper only at exact endpoints. It already counted a track end within another track's half width on its centre line. The real causes were three other gaps:

  1. Inner layers were ignored. Tracks and fills on In*.Cu were dropped, so a 4-layer board looked split. On a board with 1,384 vias this was the main cause.
  2. Pad angles were misread. KiCad saves a pad's angle as absolute and leaves it out when it is 0, even inside a rotated footprint. AI Flow used the footprint's rotation instead.
  3. Overlapping fills of one net were not joined, for example a teardrop zone on a pour.

How copper joins now: two items of one net join when their copper overlaps on a shared layer, the way KiCad decides:

  • tracks within the sum of their half widths;
  • a track end on a via's ring, off-centre;
  • a track crossing a pad's real outline;
  • vias across every layer they span;
  • overlapping fills.

A 1 mm grid index keeps it fast: about 0.004 s to join 13k tracks and 1.4k vias.

Results on real boards: routed boards that used to re-plan nets now plan nothing (a 2-layer board went from 83 nets to KiCad's own 1). The LED grid comes out with the same 22 open nets KiCad reports. A regular board still routes to an identical plan.

Limits: the router still routes on two layers; inner copper is read for connectivity and keeps vias clear of other nets' inner tracks. Not modelled: per-layer pad shapes, jumper pad groups, and pads with "remove unused layers". I couldn't run your exact board, so a run on it would be welcome.

Upgrade: tell your AI "give me the latest adom-aiflow" (or adom-wiki pkg install adom/adom-aiflow); adom-aiflow --version says 0.2.24.

John Lauer closed this ·

Log in to reply.