Skip to content

quad corner silkscreen is drawn over the pads on narrow-body variants (tqfp32_w7, tqfp48_w7) #734

Description

@DPS0340

What happens

On narrow-body quad variants the corner silkscreen marks are drawn on top of the pads, not near them:

fp.string("tqfp32_w7").circuitJson()
// pcb_silkscreen_path_top-left route: [[-2.4, 3.5], [-3.5, 3.5], [-3.5, 2.4]]
// pad 32:                             x[-3.075, -2.525] y[3.400, 4.875]

The horizontal arm runs from x = -3.5 to x = -2.4 at y = 3.5. Pad 32 occupies x[-3.075, -2.525], and y = 3.5 is inside its y[3.400, 4.875] span — so the silkscreen passes straight through copper. Measuring segment-to-pad distance minus half the stroke width:

footprint min silk-to-pad clearance
tqfp32_w7 −0.050 mm (overlap)
tqfp48_w7 −0.050 mm (overlap)
tqfp32 (default) 0.575 mm
lqfp32 0.450 mm
qfn32 0.583 mm

Cause

In src/fn/quad.ts the corner is placed at (±w/2, ±h/2) — the pad-row centre line — and each arm is a fixed csz = pw * 2 long:

const corner_x = (parameters.w / 2) * dx
const corner_y = (parameters.h / 2) * dy
const csz = parameters.pw * 2
route: [{ x: corner_x - csz * dx, y: corner_y }, { x: corner_x, y: corner_y }, ...]

Because the corner sits on the centre line, an arm running inward along one axis always passes through the band the outer pads occupy on the perpendicular side. It only escapes when the arm happens to be short enough to stop before the outermost pad — which is why the default tqfp32 (body 10 mm, arm ends at x = -3.7, outermost pad starts at x = -3.075) looks fine while the 7 mm-body variant does not. The arm length never consults the pads.

KiCad reference

KiCad's TQFP-32_7x7mm_P0.8mm puts the corner at (-3.61, 3.61) with arms only 0.275 mm long, leaving exactly 0.200 mm to the nearest pad. Same for TQFP-48, TSSOP-10, SOT-457T — all measure exactly 0.200 mm, i.e. IPC silk-to-pad clearance.

Why no test catches it

tests/kicad-parity/tqfp32_kicad_parity.test.ts compares copper via boolean difference and asserts courtyardDiffPercent. Both are blind to silkscreen, so it reports Diff: 0.00% while the silkscreen sits on the pads. This is the same blind spot as #732 — I found this one by extending that scan across all 90 parity footprints.

Other findings from the same scan

Reporting these separately so they can be triaged independently — this issue is only about the quad corners:

Happy to submit PRs for the rest if the approach in the quad fix looks right.

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