verify-pours / land pours cannot accept zones written offline (KiCad 10 SWIG cannot build zone outlines)

John Lauer · ·closed by John Lauer

adom-aiflow 0.2.1, KiCad 10.0.3 (Windows), board-from-scratch run.

Power zones that were written into the board file offline cannot be accepted by land pours or verify-pours, so finish cannot see the pours as landed even though the copper is on the board, filled and measured.

Why the zones were written offline. In KiCad 10.0.3's Python (pcbnew SWIG) on Windows, ZONE.Outline() returns a bare SwigPyObject (no NewOutline, no Append), and BOARD.Zones() / BOARD.GetArea(i) also return untyped objects, so a headless script cannot build a zone outline. The zones were therefore written into the .kicad_pcb as s-expressions (net, layer, name, priority, connect_pads yes with clearance 0.25, min_thickness 0.2, island_removal_mode 0, polygon) and then filled with pcbnew.ZONE_FILLER headlessly. The board was adopted with adopt-board (evidence file listing every zone) and later opened in KiCad for the live steps.

land pours refusal (live board open, bound with bind-remote-board):

ERROR: pour for zone-ownership refused by the preflight: "zone_ownership_conflict" {}

verify-pours --plan aiflow/run/plan-pours.json (the plan was regenerated by pour from spec.pours, whose polygons are exactly the zones' outlines in board coordinates, with clearance 0.25 and minThickness 0.2):

ERROR: saved pours do not match the plan: ["0: P3 5V0 power: expected one exact geometry/settings match, found 0", "1: P3 5V0 plane: ...", "2: ...", ... every zone ...]
Hint: Review the actual geometry and intended plan; never replay pours merely to restore evidence. No board or ownership was changed.

The polygon points in the plan and in the board file are identical (checked point by point). The plan carries only clearance, minThickness, priority, layers, net, name, polygon; the board zones also carry pad connection (solid), thermal gap 0.3, thermal bridge 0.4 and island removal mode 0, which the plan cannot express, so an exact settings match seems impossible for zones not landed by the flow.

Asks:

  1. Let verify-pours report which field differs per zone (geometry, net, layer, priority, clearance, min thickness, pad connection, thermal settings, islands).
  2. Let spec.pours carry pad connection (solid or thermal), thermal gap and bridge and island removal, so a reviewed plan can describe zones exactly.
  3. Or an adopt pours path: take ownership of existing filled zones that match the reviewed plan's geometry, recorded as adopted (not landed) so finish can proceed honestly.

I did not replay the pours to manufacture evidence. Copper was measured live with measure (KiCad's fills).

1 Reply

John Lauer ·

Added in adom-aiflow 0.2.3, all three asks.

  1. verify-pours names, per unmatched zone, the closest board zone and every differing field with both values (geometry, net, layer, priority, clearance, min thickness, pad connection, thermal gap and bridge, island removal, fill mode, keepout).
  2. spec.pours can carry connection (thermal, solid or none), thermalGap, thermalBridge, islandRemoval and islandAreaMin. land pours refuses settings the bridge cannot land (none, or islands kept) instead of landing something different.
  3. verify-pours --plan P --adopt --why "..." takes ownership of existing filled zones that pass the exact match, by their saved uuids, recorded as adopted. finish reports them as "adopted existing (not landed by this run)". One caveat: the adopted ids are the uuids in the saved file. If KiCad's live item ids differ, land pours treats the zones as unowned and refuses, which fails safe. Upgrade: adom-wiki pkg install adom/adom-aiflow, then adom-aiflow --version says 0.2.3.
John Lauer closed this ·
Colby Knox mentioned this in pull request #48 ·
Drew Owens mentioned this in pull request #66 ·

Log in to reply.