Skip to content

feat: implement PDIP-8 footprint via pdip/spdip aliases#655

Open
Guciolek wants to merge 1 commit into
tscircuit:mainfrom
Guciolek:feat/pdip-spdip-aliases
Open

feat: implement PDIP-8 footprint via pdip/spdip aliases#655
Guciolek wants to merge 1 commit into
tscircuit:mainfrom
Guciolek:feat/pdip-spdip-aliases

Conversation

@Guciolek

@Guciolek Guciolek commented Jun 7, 2026

Copy link
Copy Markdown

Summary

Closes #371

Adds pdip and spdip as aliases for the existing dip footprint implementation, so that strings like pdip8, PDIP8, spdip16, pdip8_p1.27mm all resolve to the same underlying DIP footprint.

Changes

  • src/footprinter.ts: Add two regex aliases in normalizeDefinition:
    • ^pdip(?=[\d_]|$)dip
    • ^spdip(?=[\d_]|$)dip
  • tests/dip.test.ts: Add 4 test cases covering:
    • Lowercase pdip8 resolves to dip8
    • Lowercase spdip16 resolves to dip16
    • Uppercase PDIP8 resolves to dip8 (case-insensitive)
    • Parameterized pdip8_p1.27mm resolves to dip8_p1.27mm

Why aliases (not a new function)

PDIP (Plastic DIP) and SPDIP (Shrink Plastic DIP) are package name variants of the standard DIP family:

  • PDIP: Same through-hole pad layout and 2.54mm row pitch as standard DIP — only the body material differs (plastic vs ceramic).
  • SPDIP: Same row pitch as DIP (2.54mm / 0.1in) — slightly narrower body width but pin row spacing is preserved.

For PCB footprint purposes (KiCad JLCPCB libraries, IPC-2221 conventions), they are identical to standard DIP and re-using the existing implementation:

  • Keeps the code surface minimal (no duplication of pad geometry)
  • Avoids drift between DIP/PDIP/SPDIP implementations
  • Matches how KiCad/Altium/Eagle typically treat these as variants of the same footprint

Verification

All 416 existing tests in the footprinter repo pass:

$ bun test
 416 pass
 0 fail
 3 snapshots, 1040 expect() calls

Plus 4 new test cases for the aliases.

/claim #371

- pdip (Plastic DIP) is electrically identical to DIP — same through-hole pads, same pitch
- spdip (Shrink Plastic DIP) is also a DIP variant with same row spacing
- Add aliases via normalizeDefinition regex
- Add 4 test cases covering uppercase, lowercase, and parameterized variants
- All existing 416 tests still pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement PDIP-8

1 participant