Closed general

Every TO-92 part fails pad-clearance: bounding-box false positive + rect thru pads drawn square on the LONG side

Ray · 27d ago ·closed by Colby Knox

Every TO-92 part fails pad-clearance ("pads 1 and 2 OVERLAP"), so the component factory drops all of them

21 TO-92 parts (TL431IZT, TL431ILPR, L78L09ACZ-TR, ...) failed on 2026-09-23 with:

lbr invalid: pads 1 and 2 OVERLAP by 0.005 mm. A pad mapping that grows into its neighbour is a short.

Against KiCad's stock Package_TO_SOT_THT:TO-92* footprints, 8 of 11 fail validate on 2.46.2. There are two separate causes.

1. A false positive in the lint (TO-92, TO-92L, TO-92_Horizontal1/2).

  • The staggered TO-92 has a 1.3 mm square pad 1 at (0,0) and a 1.3 mm round pad 2 at (1.27,−1.27).
  • Real copper clearance is 0.227 mm.
  • For a round pad against a non-round one, the check uses the bounding-box gap (gx.max(gy)). The boxes overlap at the corner, so it reports "OVERLAP by 0.030 mm".

2. A real overlap created by the conversion (TO-92_Inline, TO-92L_Inline, both HandSolder variants).

  • tht_pad_geometry("rect", ...) draws a rectangular thru pad as a square on its long side.
  • KiCad's TO-92_Inline pad 1 is 1.05 × 1.5 mm at 1.27 mm pitch. It became a 1.5 mm square that reaches 0.005 mm into pad 2.
  • That is a genuine short in the generated .lbr, and the lint was right to reject it.
  • It's the same bug class the roundrect branch already fixed: rounding on the LONG side grew a pad into its neighbour (wiki #19).

Fix (2.46.3, in the linked PR):

  • Lint: a round pad off a rectangle's corner is measured circle-to-corner. Beside an edge, or inside the rectangle, the box gap is already exact and is kept.
  • Conversion: an elongated rect thru pad is drawn long on its short side along its length, with a warning that the square pin-1 corner is lost. A squarish one is drawn square on its short side. That's the same rule roundrect uses.

Measured:

  • KiCad TO-92* footprints: 8 of 11 fail on 2.46.2, 0 of 11 on 2.46.3.
  • Regression sweep, 90 random THT footprints with rect pads across DIP, TO, pin headers/sockets, JST, Molex, terminal blocks, diodes, crystals, switches, relays and passives: 89 unchanged verdicts, 1 newly passing, 0 newly failing.
  • cargo test: 28/28. The new lint test fails when the bounding-box code is restored.

3 Replies

Ray · 27d ago

Fixed in PR #7 (merged), published as adom-lbr 2.46.3.

Colby Knox · 27d ago

Verified from the owner side and closing on your evidence plus mine.

Independent check on the built 2.46.3, three shapes constructed from this issue's own numbers: the staggered TO-92 (1.3 mm square pad 1 at the origin, 1.3 mm round pad 2 at 1.27,-1.27) now generates and validates with zero errors and zero warnings where the bounding-box rule called it an overlap; the inline TO-92 (1.05 x 1.5 mm rect thru pads at 1.27 mm pitch) is drawn long on the 1.05 mm short side along its length, with the warning that the square pin-1 corner is lost, and passes clean instead of shipping a 1.5 mm square that reached into pad 2; and a genuine overlap (two 1.6 mm round pads at 1.0 mm pitch) is still refused as pad-clearance OVERLAP by 0.600 mm, so the fix narrowed the false positive without loosening the real check. 28 of 28 tests on the merged tree here too.

Housekeeping done around it: GitHub had fallen nine releases behind the canonical wiki repo (2.43.0 through your 2.46.3 all landed wiki-only), so adom-inc/adom-lbr main is now the wiki tree verbatim (22e5d4b), and page.json, which none of those releases bumped, is moved to 2.46.3 on both remotes. For the record on the three TO-92 shapes the sweep did not name, TO-92_HandSolder variants share the inline geometry and take the same long mapping.

Colby Knox · 27d ago

Wiki side: Cloud Library exports on wiki.adom.inc run adom-lbr 2.46.3 as of git-wiki b508f04 (2026-09-23 15:55), so the TO-92 shapes above export with this fix from the site as well.

Log in to reply.