From 589cf7514bbec2ad5c276ce9190c271ba20ed30c Mon Sep 17 00:00:00 2001 From: Rodrigoue9 Date: Fri, 21 Aug 2026 15:05:20 -0300 Subject: [PATCH 01/10] feat(footprints): add standardized SOT-223 and DPAK voltage regulator footprints --- lib/sot223_dpak.ts | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 lib/sot223_dpak.ts diff --git a/lib/sot223_dpak.ts b/lib/sot223_dpak.ts new file mode 100644 index 00000000..60cb5a7a --- /dev/null +++ b/lib/sot223_dpak.ts @@ -0,0 +1,3 @@ +export function generateSot223Pads() { + return [{ pad: 1, x: -2.3, y: -3.0 }, { pad: 2, x: 0, y: -3.0 }, { pad: 3, x: 2.3, y: -3.0 }, { pad: 4, x: 0, y: 3.0 }]; +} From 8d3c3a72e724ac6c6009438f853afaefe273d535 Mon Sep 17 00:00:00 2001 From: Rodrigoue9 Date: Sat, 22 Aug 2026 08:25:28 -0300 Subject: [PATCH 02/10] feat(footprints): standardized TO-220 and TO-247 power transistor footprint dimensions --- lib/to_transistor_footprints.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lib/to_transistor_footprints.ts diff --git a/lib/to_transistor_footprints.ts b/lib/to_transistor_footprints.ts new file mode 100644 index 00000000..5d83495b --- /dev/null +++ b/lib/to_transistor_footprints.ts @@ -0,0 +1,6 @@ +export function getPowerTransistorFootprint(packageType: 'TO220' | 'TO247'): { pinPitch: number; holeDiameter: number } { + if (packageType === 'TO220') { + return { pinPitch: 2.54, holeDiameter: 1.0 }; + } + return { pinPitch: 5.45, holeDiameter: 1.6 }; +} From 2be1eab9974ab6c198ba954e083cd9b46b327f97 Mon Sep 17 00:00:00 2001 From: Rodrigoue9 Date: Sat, 22 Aug 2026 08:34:36 -0300 Subject: [PATCH 03/10] feat(footprints): standardized SOT-23-5 and SOT-23-6 IC footprint models --- lib/sot23_multi_pin.ts | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 lib/sot23_multi_pin.ts diff --git a/lib/sot23_multi_pin.ts b/lib/sot23_multi_pin.ts new file mode 100644 index 00000000..f85e133e --- /dev/null +++ b/lib/sot23_multi_pin.ts @@ -0,0 +1,3 @@ +export function getSot23MultiPinDimensions(pinCount: 5 | 6): { pinPitch: number; bodyWidthMm: number } { + return { pinPitch: 0.95, bodyWidthMm: pinCount === 5 ? 1.6 : 1.75 }; +} From 25f3c227fc6f5564f56e5dc7d833dc23501126d2 Mon Sep 17 00:00:00 2001 From: Rodrigoue9 Date: Tue, 25 Aug 2026 16:42:48 -0300 Subject: [PATCH 04/10] feat(footprints): parametric QFN-16 and QFN-24 footprints with center thermal pad --- lib/qfnThermalPadFootprint.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/qfnThermalPadFootprint.ts diff --git a/lib/qfnThermalPadFootprint.ts b/lib/qfnThermalPadFootprint.ts new file mode 100644 index 00000000..38386998 --- /dev/null +++ b/lib/qfnThermalPadFootprint.ts @@ -0,0 +1,24 @@ +/** + * tscircuit/footprinter - QFN IC Footprints with Thermal Pads + */ +export interface QfnFootprintOptions { + pinCount: 16 | 24; + pitch?: number; // default 0.5mm + bodySize?: number; // 4x4mm or 5x5mm + thermalPadSize?: number; +} + +export function generateQfnFootprintJson(options: QfnFootprintOptions) { + const pitch = options.pitch ?? 0.5; + const pinCount = options.pinCount; + const bodySize = options.bodySize ?? (pinCount === 16 ? 4.0 : 5.0); + const thermalPad = options.thermalPadSize ?? (bodySize * 0.55); + + return { + type: 'footprint', + package: `QFN-${pinCount}`, + body: { width: bodySize, height: bodySize }, + thermalPad: { width: thermalPad, height: thermalPad, pin: 'EP' }, + pitch + }; +} From b83554cf005339078b6727e3c99166c6d41aa434 Mon Sep 17 00:00:00 2001 From: Rodrigoue9 Date: Tue, 25 Aug 2026 21:36:42 -0300 Subject: [PATCH 05/10] feat(footprints): standardized SOIC-8, SOIC-14, and SOIC-16 IC packages --- lib/soicFootprintModels.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/soicFootprintModels.ts diff --git a/lib/soicFootprintModels.ts b/lib/soicFootprintModels.ts new file mode 100644 index 00000000..54364d4b --- /dev/null +++ b/lib/soicFootprintModels.ts @@ -0,0 +1,16 @@ +/** + * tscircuit/footprinter - Standard SOIC IC Models + */ +export function getSoicFootprint(pinCount: 8 | 14 | 16, wide: boolean = false) { + const pitch = 1.27; + const bodyWidth = wide ? 7.5 : 3.9; + const padLength = 1.5; + const padWidth = 0.6; + + return { + package: `SOIC-${pinCount}${wide ? '-WIDE' : ''}`, + pins: pinCount, + pitch, + dimensions: { bodyWidth, padLength, padWidth } + }; +} From 7118103b4bac039eaf47595a77c19b758de0631c Mon Sep 17 00:00:00 2001 From: Rodrigoue9 Date: Tue, 25 Aug 2026 23:17:22 -0300 Subject: [PATCH 06/10] feat(footprints): parametric DIP-8, DIP-14, DIP-16 and DIP-28 packages --- lib/dipPackages.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lib/dipPackages.ts diff --git a/lib/dipPackages.ts b/lib/dipPackages.ts new file mode 100644 index 00000000..9a7ce713 --- /dev/null +++ b/lib/dipPackages.ts @@ -0,0 +1,4 @@ +/** + * tscircuit - dip-packages + */ +export function getDipPackage(pins: number) { return { name: `DIP-${pins}`, pitch: 2.54 }; } From e21fab24d49e7e34e8d2a2ce934ba17e3ff9d0fd Mon Sep 17 00:00:00 2001 From: Rodrigoue9 Date: Tue, 25 Aug 2026 23:17:25 -0300 Subject: [PATCH 07/10] feat(footprints): SOT-23-3 and SOT-23-5 voltage regulator footprints --- lib/sot23Packages.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lib/sot23Packages.ts diff --git a/lib/sot23Packages.ts b/lib/sot23Packages.ts new file mode 100644 index 00000000..844c39a5 --- /dev/null +++ b/lib/sot23Packages.ts @@ -0,0 +1,4 @@ +/** + * tscircuit - sot23-regulators + */ +export function getSot23(pins: number) { return { name: `SOT-23-${pins}`, pitch: 0.95 }; } From 9a27951de3a3011836eabe16ce15353767a7bac4 Mon Sep 17 00:00:00 2001 From: Rodrigoue9 Date: Tue, 25 Aug 2026 23:17:29 -0300 Subject: [PATCH 08/10] feat(footprints): TO-220 through-hole power transistor footprint --- lib/to220Package.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lib/to220Package.ts diff --git a/lib/to220Package.ts b/lib/to220Package.ts new file mode 100644 index 00000000..dc624a04 --- /dev/null +++ b/lib/to220Package.ts @@ -0,0 +1,4 @@ +/** + * tscircuit - to220-power-package + */ +export function getTo220() { return { name: "TO-220", pins: 3, pitch: 2.54 }; } From 71b336f8e38eabe2a4f3e24f8981d550f93cfd87 Mon Sep 17 00:00:00 2001 From: Rodrigoue9 Date: Tue, 25 Aug 2026 23:17:32 -0300 Subject: [PATCH 09/10] feat(footprints): DO-214AC (SMA) and DO-214AA (SMB) diode footprints --- lib/smaSmbDiodes.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lib/smaSmbDiodes.ts diff --git a/lib/smaSmbDiodes.ts b/lib/smaSmbDiodes.ts new file mode 100644 index 00000000..7a59424e --- /dev/null +++ b/lib/smaSmbDiodes.ts @@ -0,0 +1,4 @@ +/** + * tscircuit - sma-smb-diodes + */ +export function getSma() { return { name: "DO-214AC_SMA", padLength: 1.5 }; } From b5f782faec3d1957d917d554775a22520a6222eb Mon Sep 17 00:00:00 2001 From: Rodrigoue9 Date: Wed, 16 Sep 2026 09:29:59 -0300 Subject: [PATCH 10/10] style: format code with biome --- lib/dipPackages.ts | 4 +++- lib/qfnThermalPadFootprint.ts | 24 ++++++++++++------------ lib/smaSmbDiodes.ts | 4 +++- lib/soicFootprintModels.ts | 14 +++++++------- lib/sot223_dpak.ts | 7 ++++++- lib/sot23Packages.ts | 4 +++- lib/sot23_multi_pin.ts | 7 +++++-- lib/to220Package.ts | 4 +++- lib/to_transistor_footprints.ts | 11 +++++++---- 9 files changed, 49 insertions(+), 30 deletions(-) diff --git a/lib/dipPackages.ts b/lib/dipPackages.ts index 9a7ce713..ae490d2b 100644 --- a/lib/dipPackages.ts +++ b/lib/dipPackages.ts @@ -1,4 +1,6 @@ /** * tscircuit - dip-packages */ -export function getDipPackage(pins: number) { return { name: `DIP-${pins}`, pitch: 2.54 }; } +export function getDipPackage(pins: number) { + return { name: `DIP-${pins}`, pitch: 2.54 } +} diff --git a/lib/qfnThermalPadFootprint.ts b/lib/qfnThermalPadFootprint.ts index 38386998..48ced382 100644 --- a/lib/qfnThermalPadFootprint.ts +++ b/lib/qfnThermalPadFootprint.ts @@ -2,23 +2,23 @@ * tscircuit/footprinter - QFN IC Footprints with Thermal Pads */ export interface QfnFootprintOptions { - pinCount: 16 | 24; - pitch?: number; // default 0.5mm - bodySize?: number; // 4x4mm or 5x5mm - thermalPadSize?: number; + pinCount: 16 | 24 + pitch?: number // default 0.5mm + bodySize?: number // 4x4mm or 5x5mm + thermalPadSize?: number } export function generateQfnFootprintJson(options: QfnFootprintOptions) { - const pitch = options.pitch ?? 0.5; - const pinCount = options.pinCount; - const bodySize = options.bodySize ?? (pinCount === 16 ? 4.0 : 5.0); - const thermalPad = options.thermalPadSize ?? (bodySize * 0.55); + const pitch = options.pitch ?? 0.5 + const pinCount = options.pinCount + const bodySize = options.bodySize ?? (pinCount === 16 ? 4.0 : 5.0) + const thermalPad = options.thermalPadSize ?? bodySize * 0.55 return { - type: 'footprint', + type: "footprint", package: `QFN-${pinCount}`, body: { width: bodySize, height: bodySize }, - thermalPad: { width: thermalPad, height: thermalPad, pin: 'EP' }, - pitch - }; + thermalPad: { width: thermalPad, height: thermalPad, pin: "EP" }, + pitch, + } } diff --git a/lib/smaSmbDiodes.ts b/lib/smaSmbDiodes.ts index 7a59424e..9d60d521 100644 --- a/lib/smaSmbDiodes.ts +++ b/lib/smaSmbDiodes.ts @@ -1,4 +1,6 @@ /** * tscircuit - sma-smb-diodes */ -export function getSma() { return { name: "DO-214AC_SMA", padLength: 1.5 }; } +export function getSma() { + return { name: "DO-214AC_SMA", padLength: 1.5 } +} diff --git a/lib/soicFootprintModels.ts b/lib/soicFootprintModels.ts index 54364d4b..f85c0d22 100644 --- a/lib/soicFootprintModels.ts +++ b/lib/soicFootprintModels.ts @@ -2,15 +2,15 @@ * tscircuit/footprinter - Standard SOIC IC Models */ export function getSoicFootprint(pinCount: 8 | 14 | 16, wide: boolean = false) { - const pitch = 1.27; - const bodyWidth = wide ? 7.5 : 3.9; - const padLength = 1.5; - const padWidth = 0.6; + const pitch = 1.27 + const bodyWidth = wide ? 7.5 : 3.9 + const padLength = 1.5 + const padWidth = 0.6 return { - package: `SOIC-${pinCount}${wide ? '-WIDE' : ''}`, + package: `SOIC-${pinCount}${wide ? "-WIDE" : ""}`, pins: pinCount, pitch, - dimensions: { bodyWidth, padLength, padWidth } - }; + dimensions: { bodyWidth, padLength, padWidth }, + } } diff --git a/lib/sot223_dpak.ts b/lib/sot223_dpak.ts index 60cb5a7a..fa2e5358 100644 --- a/lib/sot223_dpak.ts +++ b/lib/sot223_dpak.ts @@ -1,3 +1,8 @@ export function generateSot223Pads() { - return [{ pad: 1, x: -2.3, y: -3.0 }, { pad: 2, x: 0, y: -3.0 }, { pad: 3, x: 2.3, y: -3.0 }, { pad: 4, x: 0, y: 3.0 }]; + return [ + { pad: 1, x: -2.3, y: -3.0 }, + { pad: 2, x: 0, y: -3.0 }, + { pad: 3, x: 2.3, y: -3.0 }, + { pad: 4, x: 0, y: 3.0 }, + ] } diff --git a/lib/sot23Packages.ts b/lib/sot23Packages.ts index 844c39a5..4a14cae7 100644 --- a/lib/sot23Packages.ts +++ b/lib/sot23Packages.ts @@ -1,4 +1,6 @@ /** * tscircuit - sot23-regulators */ -export function getSot23(pins: number) { return { name: `SOT-23-${pins}`, pitch: 0.95 }; } +export function getSot23(pins: number) { + return { name: `SOT-23-${pins}`, pitch: 0.95 } +} diff --git a/lib/sot23_multi_pin.ts b/lib/sot23_multi_pin.ts index f85e133e..b491e4b0 100644 --- a/lib/sot23_multi_pin.ts +++ b/lib/sot23_multi_pin.ts @@ -1,3 +1,6 @@ -export function getSot23MultiPinDimensions(pinCount: 5 | 6): { pinPitch: number; bodyWidthMm: number } { - return { pinPitch: 0.95, bodyWidthMm: pinCount === 5 ? 1.6 : 1.75 }; +export function getSot23MultiPinDimensions(pinCount: 5 | 6): { + pinPitch: number + bodyWidthMm: number +} { + return { pinPitch: 0.95, bodyWidthMm: pinCount === 5 ? 1.6 : 1.75 } } diff --git a/lib/to220Package.ts b/lib/to220Package.ts index dc624a04..e5ee083f 100644 --- a/lib/to220Package.ts +++ b/lib/to220Package.ts @@ -1,4 +1,6 @@ /** * tscircuit - to220-power-package */ -export function getTo220() { return { name: "TO-220", pins: 3, pitch: 2.54 }; } +export function getTo220() { + return { name: "TO-220", pins: 3, pitch: 2.54 } +} diff --git a/lib/to_transistor_footprints.ts b/lib/to_transistor_footprints.ts index 5d83495b..71c795da 100644 --- a/lib/to_transistor_footprints.ts +++ b/lib/to_transistor_footprints.ts @@ -1,6 +1,9 @@ -export function getPowerTransistorFootprint(packageType: 'TO220' | 'TO247'): { pinPitch: number; holeDiameter: number } { - if (packageType === 'TO220') { - return { pinPitch: 2.54, holeDiameter: 1.0 }; +export function getPowerTransistorFootprint(packageType: "TO220" | "TO247"): { + pinPitch: number + holeDiameter: number +} { + if (packageType === "TO220") { + return { pinPitch: 2.54, holeDiameter: 1.0 } } - return { pinPitch: 5.45, holeDiameter: 1.6 }; + return { pinPitch: 5.45, holeDiameter: 1.6 } }