Skip to content

feat: add sc70 footprint as JEDEC MO-203 / SOT-323 alias with correct defaults#550

Open
victorjzq wants to merge 2 commits intotscircuit:mainfrom
victorjzq:feat/sc70-alias
Open

feat: add sc70 footprint as JEDEC MO-203 / SOT-323 alias with correct defaults#550
victorjzq wants to merge 2 commits intotscircuit:mainfrom
victorjzq:feat/sc70-alias

Conversation

@victorjzq
Copy link
Contributor

Summary

Adds sc70 as a dedicated footprint for the JEDEC MO-203 package (also known as SC-70 / SOT-323).

  • Adds src/fn/sc70.ts — wraps sot323 with SC-70-specific defaults
  • SC-70 defaults: body 2.0mm × 1.25mm, pitch 1.1mm (0.65mm lead pitch), pad 0.6mm × 0.35mm
  • Supports the same parameter overrides as sot323 (w, h, p, pl, pw)
  • Exported from src/fn/index.ts and typed in src/footprinter.ts

Usage

sc70              → SC-70-3 with JEDEC defaults
sc70_w2.0mm_h1.25mm_p0.65mm  → explicit dimensions

Why a separate footprint?

SC-70 is the JEDEC name (MO-203) for the same package that NXP calls SOT-323.
Designers searching for "SC-70" would not find sot323, so a dedicated alias with the correct JEDEC default dimensions is useful.

Test plan

  • bun test tests/sc70.test.ts — 3 variants pass with snapshot generation
  • bun test tests/footprint-completeness.test.ts — completeness check passes
  • bun test — full suite passes (382 tests, 0 fail)

Closes #2 (sc70_w2.0_h1.25_p0.65mm checklist item)

SC-70 (SC-70-3) is the same physical package as SOT-323.
Adds a dedicated sc70 function with the correct JEDEC MO-203 defaults:
  body 2.0mm x 1.25mm, 0.65mm pitch, pad 0.6mm x 0.35mm.

Closes tscircuit#2 (sc70_w2.0_h1.25_p0.65mm checklist item)
Comment on lines +5 to +23
test("sc70", () => {
const circuitJson = fp.string("sc70").circuitJson()
const svgContent = convertCircuitJsonToPcbSvg(circuitJson)
expect(svgContent).toMatchSvgSnapshot(import.meta.path, "sc70")
})

test("sc70_3", () => {
const circuitJson = fp.string("sc70_3").circuitJson()
const svgContent = convertCircuitJsonToPcbSvg(circuitJson)
expect(svgContent).toMatchSvgSnapshot(import.meta.path, "sc70_3")
})

test("sc70 custom params", () => {
const circuitJson = fp
.string("sc70_w2.0mm_h1.25mm_p0.65mm")
.circuitJson()
const svgContent = convertCircuitJsonToPcbSvg(circuitJson)
expect(svgContent).toMatchSvgSnapshot(import.meta.path, "sc70_custom")
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test file contains 3 test() calls (lines 5, 11, and 17), which violates the rule that a *.test.ts file may have AT MOST one test(...). After that, the user should split into multiple, numbered files. This file should be split into separate files like sc701.test.ts, sc702.test.ts, and sc703.test.ts, with each file containing only one test() call.

Spotted by Graphite (based on custom rule: Custom rule)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor

@rushabhcodes rushabhcodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add kicad parity test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breadth of Footprints Supported

3 participants