Skip to content

feat: add pdip and spdip aliases for dip footprint#673

Open
di3go04 wants to merge 5 commits into
tscircuit:mainfrom
di3go04:feat/pdip-spdip-aliases
Open

feat: add pdip and spdip aliases for dip footprint#673
di3go04 wants to merge 5 commits into
tscircuit:mainfrom
di3go04:feat/pdip-spdip-aliases

Conversation

@di3go04

@di3go04 di3go04 commented Jul 2, 2026

Copy link
Copy Markdown

Description

Fixes #371

Adds pdip and spdip as aliases for the existing dip footprint in the string normalizer. PDIP (Plastic Dual In-line Package) and SPDIP (Shrink Plastic DIP) are electrically and dimensionally identical to standard DIP — sharing 2.54mm pitch and 300mil row spacing.

Changes

  • src/footprinter.ts — Added regex normalization in
    ormalizeDefinition\ to map \pdip/\spdip\ (case-insensitive, with/without hyphen) to \dip\
  • tests/pdip.test.ts — 12 new tests covering:
    • Resolution of \pdip8, \PDIP-8, \Pdip8, \spdip8, \SPDIP-8\
    • JSON equality between \pdip8/\dip8\ and \spdip8/\dip8\
    • Width parameter passthrough (\pdip8_w300mil)
    • SVG snapshot identity vs equivalent \dip\ definitions
    • Individual SVG snapshots for \pdip8\ and \spdip8\
  • README.md — Added \pdip8\ and \spdip8\ to example footprinter strings

Verification

All 443 tests pass (0 failures).

Approach

Alias-based approach (recommended in the issue) to avoid dimensional divergence from DIP.

- Normalize pdip/PDIP/pdip-* to dip in normalizeDefinition
- Normalize spdip/SPDIP/spdip-* to dip in normalizeDefinition
- Add 12 tests covering resolution, case-insensitivity,
  hyphen variants, parameter passthrough, and SVG snapshots
- Update README examples with pdip8 and spdip8

Fixes tscircuit#371
di3go04 added 4 commits July 2, 2026 07:29
SPDIP (Shrink DIP) is now a first-class footprint function instead
of an alias to dip. Default pitch is 1.778mm (70mil).

Refs tscircuit#180
UTDFN is an Ultra Thin DFN package. Supports exposed pads
via the _epWxH string syntax (e.g. utdfn4_ep1x1).

Refs tscircuit#183
Add 5050 (5.0x5.0mm) and 2835 (2.8x3.5mm) LED package sizes
to the passive footprint sizes array.

Refs tscircuit#122
@di3go04

di3go04 commented Jul 2, 2026

Copy link
Copy Markdown
Author

This PR now also resolves:

Also fixed the biome format check failure.

All 456 tests pass locally.

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.

Implement PDIP-8

1 participant