From b6f829de43c3b2dc559cb5b9e9a29b76559f4a59 Mon Sep 17 00:00:00 2001 From: nailoo Date: Tue, 27 Jan 2026 23:12:33 +0530 Subject: [PATCH] fix sot363 footprint --- src/fn/sot363.ts | 8 ++++---- tests/kicad-parity/__snapshots__/sot363.snap.svg | 2 +- .../__snapshots__/sot363_boolean_difference.snap.svg | 2 +- tests/kicad-parity/sot363_kicad_parity.test.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/fn/sot363.ts b/src/fn/sot363.ts index f1a4de23..6a584b08 100644 --- a/src/fn/sot363.ts +++ b/src/fn/sot363.ts @@ -11,8 +11,8 @@ export const sot363_def = base_def.extend({ w: z.string().default("3.1mm"), h: z.string().default("2.0mm"), p: z.string().default("0.65mm"), - pl: z.string().default("1.325mm"), - pw: z.string().default("0.4mm"), + pl: z.string().default("1.02mm"), + pw: z.string().default("0.35mm"), string: z.string().optional(), }) @@ -97,9 +97,9 @@ export const getSot363PadCoord = ( if (pn <= 3) { // Left side pins (1, 2, 3): x is negative, y goes from p to -p // Pin 1: y = p, Pin 2: y = 0, Pin 3: y = -p - return { x: -padCenterOffset, y: p - (pn - 1) * p } + return { x: -0.85, y: p - (pn - 1) * p } } // Right side pins (4, 5, 6): x is positive, y goes from -p to p // Pin 4: y = -p, Pin 5: y = 0, Pin 6: y = p - return { x: padCenterOffset, y: -p + (pn - 4) * p } + return { x: 0.85, y: -p + (pn - 4) * p } } diff --git a/tests/kicad-parity/__snapshots__/sot363.snap.svg b/tests/kicad-parity/__snapshots__/sot363.snap.svg index 5bef95d0..5563ac1c 100644 --- a/tests/kicad-parity/__snapshots__/sot363.snap.svg +++ b/tests/kicad-parity/__snapshots__/sot363.snap.svg @@ -1 +1 @@ -{REF}Diff: 19.27% \ No newline at end of file +{REF}Diff: 0.24% \ No newline at end of file diff --git a/tests/kicad-parity/__snapshots__/sot363_boolean_difference.snap.svg b/tests/kicad-parity/__snapshots__/sot363_boolean_difference.snap.svg index f02df673..f996ee95 100644 --- a/tests/kicad-parity/__snapshots__/sot363_boolean_difference.snap.svg +++ b/tests/kicad-parity/__snapshots__/sot363_boolean_difference.snap.svg @@ -1 +1 @@ -SOT-363_SC-70-6 - Alignment Analysis (Footprinter vs KiCad)sot363KiCad: SOT-363_SC-70-6Perfect alignment = complete overlap \ No newline at end of file +SOT-363_SC-70-6 - Alignment Analysis (Footprinter vs KiCad)sot363KiCad: SOT-363_SC-70-6Perfect alignment = complete overlap \ No newline at end of file diff --git a/tests/kicad-parity/sot363_kicad_parity.test.ts b/tests/kicad-parity/sot363_kicad_parity.test.ts index 979c8ee7..a5e951f3 100644 --- a/tests/kicad-parity/sot363_kicad_parity.test.ts +++ b/tests/kicad-parity/sot363_kicad_parity.test.ts @@ -15,4 +15,4 @@ test("parity/sot363", async () => { import.meta.path, "sot363_boolean_difference", ) -}) +}, 10000)