From cb3793d44de735ffce4b532a68030c25dc3f234f Mon Sep 17 00:00:00 2001 From: Birdup <34012548+birdup000@users.noreply.github.com> Date: Sat, 29 Aug 2026 09:51:44 -0500 Subject: [PATCH] fix: tqfp44 defaults to the JEDEC 0.8mm pitch with 0.55mm pads (#792) TQFP-44 is standardized as a 10x10mm body on 0.8mm pitch (JEDEC MS-026 BBA); KiCad's TQFP-44_10x10mm_P0.8mm and footprinter's own tqfp32 both use 0.8mm pitch with 1.475x0.55mm pads. tqfp44 emitted 0.5mm pitch with 0.30mm pads instead. Splits the pitch and pad-width switch cases so 44 follows the 0.8mm family while 48/64/80/100 keep 0.5mm. SVG snapshots updated; a regression test asserts the exact pitch, pad width, and length. Fixes #792 --- src/fn/tqfp.ts | 6 ++++++ tests/__snapshots__/tqfp44_w10.snap.svg | 2 +- tests/tqfp.test.ts | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/fn/tqfp.ts b/src/fn/tqfp.ts index 159cec69f..2af440e35 100644 --- a/src/fn/tqfp.ts +++ b/src/fn/tqfp.ts @@ -17,6 +17,10 @@ export const tqfp = ( raw_params.p = 0.8 break case 44: + // TQFP-44 is a 10x10mm body on 0.8mm pitch (JEDEC MS-026 BBA), + // matching the tqfp32 defaults. + raw_params.p = 0.8 + break case 48: raw_params.p = 0.5 break @@ -57,6 +61,8 @@ export const tqfp = ( raw_params.pw = 0.55 break case 44: + raw_params.pw = 0.55 + break case 48: case 64: case 80: diff --git a/tests/__snapshots__/tqfp44_w10.snap.svg b/tests/__snapshots__/tqfp44_w10.snap.svg index a2d0f41c8..6bc2666ca 100644 --- a/tests/__snapshots__/tqfp44_w10.snap.svg +++ b/tests/__snapshots__/tqfp44_w10.snap.svg @@ -1 +1 @@ -{REF} \ No newline at end of file +{REF} \ No newline at end of file diff --git a/tests/tqfp.test.ts b/tests/tqfp.test.ts index ae7e778fc..69ec42a2a 100644 --- a/tests/tqfp.test.ts +++ b/tests/tqfp.test.ts @@ -34,3 +34,18 @@ test("tqfp100_w14", () => { const svgContent = convertCircuitJsonToPcbSvg(soup) expect(svgContent).toMatchSvgSnapshot(import.meta.path, "tqfp100_w14") }) + +test("tqfp44 uses the JEDEC 0.8mm pitch with 0.55mm pads", () => { + const pads = fp + .string("tqfp44") + .circuitJson() + .filter((el: any) => el.type === "pcb_smtpad") as any[] + expect(pads.length).toBe(44) + + const maxX = Math.max(...pads.map((p) => p.x)) + const colPads = pads.filter((p) => Math.abs(p.x - maxX) < 0.01) + const col = colPads.map((p) => p.y).sort((a: number, b: number) => b - a) + expect(Math.round((col[0] - col[1]) * 1000) / 1000).toBe(0.8) + expect(colPads[0].height).toBe(0.55) + expect(colPads[0].width).toBe(1.475) +})