Zone-fill oracles from KiCad 10.0.5 itself
Nothing here was typed by us. Each file is what the installed KiCad 10.0.5
(kicad-cli, or the pcbnew Python module for the Clipper2 cases) produced
on this machine, so a test against it compares our fill with KiCad's, not
with our own reading of the C++.
| file | what it is |
|---|---|
hatch40_kicad_cli.kicad_pcb |
a 40 mm square GND zone, hatch pattern (1 mm web, 2 mm gap), filled by kicad-cli pcb drc --refill-zones --save-board |
ecc83-pp_kicad_cli.kicad_pcb |
KiCad's own ecc83-pp demo, refilled the same way; ecc83-pp.kicad_pro is its project |
clipper2_kicad_cases.json |
120 boolean / Inflate cases run through SHAPE_POLY_SET in KiCad's Python API: random polygons, and unions of a hundred overlapping knockouts |
clipper2_kicad_cases.py |
the generator of those cases (python3 clipper2_kicad_cases.py <seed> <count> <out>) |
kicad_cli_refill.py |
the refill script: copies <stem>.kicad_pcb beside its project, refills with kicad-cli, and removes ~/.config/kicad/10.0/kicad_advanced first so the fill runs with the stock advanced settings |
The refill is done by kicad-cli and not by the Python module on purpose:
ADVANCED_CFG only loads under a wxApp, and one of its settings —
EnableCacheFriendlyFracture — chooses which of two fracture algorithms
threads a filled polygon's holes onto its outline. The GUI and the CLI run the
cache-friendly one.
A useful property of the CLI: with DebugZoneFiller=1 in kicad_advanced, a
zone put on F.Cu and In1.Cu…In19.Cu gets each inner layer's fill
replaced by one intermediate poly set of the F.Cu fill
(DUMP_POLYS_TO_COPPER_LAYER in zone_filler.cpp), which is how the
pipeline was matched stage by stage.
-
StickHub_kicad_cli.kicad_pcb+StickHub.kicad_pro: the StickHub demo board refilled bykicad-cli pcb drc --refill-zones --save-board. Five zones on F.Cu/B.Cu with fillet smoothing (radius 0.5 mm), a board outline with arcs, arc tracks, and copper below the pour that the bounding-box guards must skip. -
hatchpads_kicad_cli.kicad_pcb,hatchfull_kicad_cli.kicad_pcb,hatchsmall_kicad_cli.kicad_pcb: the hatch40 zone with a footprint of through-hole, oval, rect and roundrect pads (GND, one SIG, onezone_connect 0, onezone_connect 2) and vias, refilled by kicad-cli — thermal (hatchpads); 0.3 mm gap / 0.3 mm bridge / 3 mm hatch gap with 0.5 mm vias at hatch-hole centres (hatchsmall); and that same layout withconnect_pads yes(hatchfull). Built by hand from hatch40; no project file, so KiCad's design-rule defaults apply. -
custompads_kicad_cli.kicad_pcb: the hatchpads board poured SOLID with five custom pads added — a polygon off-centre of its anchor, a rotated one with(clearance convexhull), one on another net, a rect with stroked lines, and one withgr_vectorspoke templates — two that cross the relief, one lying outside the pad, and one grazing a corner so that one of its edge lines misses the pad and the spoke is dropped. Refilled by kicad-cli. -
blindvias_kicad_cli.kicad_pcb,blindvias2_kicad_cli.kicad_pcb: a four-layer board with a GND pour on B.Cu split in two by a 2 mm SIG track, where the only GND copper on the right half is a via. Inblindviasit is a BLIND via (F.Cu–In1.Cu): it neither knocks out the pour nor connects the island, so KiCad drops the right half. Inblindvias2the same via is through, and the right half stays. Both carry a SIG blind/buried/blind via chain, of which only the In2.Cu–B.Cu one reaches the pour. Refilled by kicad-cli. -
waveorder_kicad_cli.kicad_pcb: seven same-priority zones on seven nets, staggered diagonally so each pair's bounding boxes lie within the worst clearance but their outlines do not collide — so none waits for another and all seven go into one fill wave. Which of them see a higher zone's fill (and so getpostKnockoutMinWidthPrune) depends on the order the thread pool pops them: libstdc++'sstd::priority_queueon equal priorities pops 0, 2, 5, 6, 4, 1, 3 — pruning N1, N3 and N4 — where board order would prune none. Refilled by kicad-cli withMaximumThreads=1; eight of eight single-threaded runs gave this (a six-zone version of the board showed the worker can start popping before every task is queued, which prunes N2 and N4 instead), and multi-threaded runs vary further. -
waveorder_1006_kicad_cli.kicad_pcb: the same board refilled by KiCad 10.0.6 (kicad-cli pcb drc --refill-zones --save-board,MaximumThreads=1). 10.0.6'sFillno longer runs the zones in waves: it walks the dependency DAG and releases a zone's dependents the moment its fill publishes, so three of the seven zone-layers differ from the 10.0.5 file above. Every other board here refills byte-identically under 10.0.6. The live-BOARD pour (zone_fill_kicad_exact_live.test.ts) is held to this one; the 10.0.5 file stays for the view pour's test until that pour is deleted. -
fillpaths_kicad_cli.kicad_pcb+make_fillpaths_board.py: one area per path ofZONE_FILLER::Fillthat neither these boards nor thirteen demo boards take (each was a surviving mutant): a via whose flashing the after-pour re-check (issue 22010) takes back, a same-net higher-priority pour with a larger clearance (outline subtraction, then the same-net refill seed of issue 23790), a pour on a net with nothing else on it, and a lower-priority pour listed before the different-net pour it must wait for. Built through KiCad's pcbnew module, refilled by kicad-cli 10.0.6 withMaximumThreads=1. -
flashing_kicad_cli.kicad_pcb+make_flashing_board.py: the conditional via/pad flashing fixture. The script builds the board through KiCad's ownpcbnewPython module and the refill iskicad-cli pcb drc --refill-zones --save-board, so every(zone_layer_connections …)in the result was written byZONE_FILLER::Fillitself. One item per branch of the determination — the hole-radius arm of the via's outline test, the "matching netcode" arm and the priority floor offindHighestPriorityZone, the START_END_ONLY drill-span arm, a zone-fill keepout and a rule area that is not one, and a pad whose start/end layers are kept.qa/unittests/pcbnew/ zone_flashing.test.tscompares against it;qa/perf/zone_flashing_oracle.mtsruns the same comparison over a board given on the command line, which is how vme-wren (4370 items) and jetson-agx-thor (466) were checked.Two traps the script hit, both silent:
ZONE::SetOutline( SHAPE_POLY_SET* )ism_Poly = aOutline, so the Python object must be disowned or the save segfaults; andBOARD::Addtakes ownership of every item, so anything built inside a helper needsthisown = 0before the helper returns.