diff --git a/src/fn/tqfp.ts b/src/fn/tqfp.ts index 159cec69..2af440e3 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 a2d0f41c..6bc2666c 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 ae7e778f..69ec42a2 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) +})