Skip to content

4 footprints are 13–16% off KiCad courtyard parity, and all 4 are exempt from the threshold #731

Description

@DPS0340

I measured courtyardDiffPercent for every footprint in tests/kicad-parity/ and the results cluster in a way that's worth surfacing: four footprints are 13–16% off KiCad, and all four are exempt from the threshold that the other 84 are held to.

Measurements

Ran compareFootprinterVsKicad against each parity test's own footprint/KiCad pair:

 15.98%  soic24_w7.5mm_p1.27mm_legsoutside
 15.33%  soic20_w7.6mm_p1.27mm_legsoutside
 14.24%  soic8_w3.9mm_p1.27mm_legsoutside
 13.08%  qfn32_thermalpad3.1x3.1mm
--------  (large gap)
  1.05%  lqfp64
  1.05%  lqfp64_pw0.3
  1.00%  hc49
  0.30%  son8_ep_…
  …84 more, all ≤ 1.05%

88 footprints measured. Only 4 are above 3%, and there is nothing between 1.05% and 13.08% — so this isn't a gradient, it's a distinct group.

Why CI is green

The thresholds aren't uniform:

42 tests   expect(courtyardDiffPercent).toBeLessThan(5)
28 tests   expect(courtyardDiffPercent).toBeLessThan(0.5)
 2 tests   expect(courtyardDiffPercent).toBeLessThan(16)   <- soic20, soic24
18 tests   no courtyardDiffPercent assertion at all        <- includes soic8, qfn32

So the four worst footprints are precisely the ones not held to a real bound: soic20/soic24 have a bespoke 16 ceiling, and soic8/qfn32 assert only snapshots. A snapshot passes as long as the output is stable, which it is — it's stably 14% off.

Suggested direction

Two separable pieces, and I'd rather ask than guess which you want:

  1. Fix the geometry so these four match KiCad the way the other 84 do, then bring their thresholds in line. Based on merged parity work like Fix SOT-89-3 KiCad parity #689 (SOT-89-3, 46.9% → 100% IoU) and Fix TO-92S KiCad pad parity #684 (TO-92S), this looks like the same class of problem.
  2. Make the exemptions visible — a comment on the 16 thresholds saying why, and either an assertion or an explicit note on the 18 tests that only snapshot.

I'm happy to take (1) starting with soic8 since it's the simplest of the four, if that's wanted. Wanted to check first rather than send a geometry change unprompted — the legsoutside variants may be intentionally different from the KiCad land pattern, in which case the right fix is documenting that instead.

Method, so it's reproducible: for each tests/kicad-parity/*.test.ts, extract the two compareFootprinterVsKicad arguments, call it directly, and read courtyardDiffPercent from the result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions