feat: implement PDIP and SPDIP footprints#509
Open
z5005z-hue wants to merge 1 commit intotscircuit:mainfrom
Open
feat: implement PDIP and SPDIP footprints#509z5005z-hue wants to merge 1 commit intotscircuit:mainfrom
z5005z-hue wants to merge 1 commit intotscircuit:mainfrom
Conversation
PDIP (Plastic Dual In-line Package): - Delegates to existing dip() with standard 300mil (7.62mm) row spacing - 100mil (2.54mm) pitch - Auto-selects 600mil width for 40+ pin variants - Supports: pdip8, pdip14, pdip16, pdip28, pdip40 etc. SPDIP (Shrink Plastic Dual In-line Package): - 70mil (1.778mm) pitch (narrower than standard DIP) - 600mil (15.24mm) row spacing - Primary target: SPDIP-28 (closes tscircuit#180) Both footprints added to fn/index.ts for automatic registration. Closes tscircuit#371 (PDIP-8) Closes tscircuit#180 (SPDIP-28)
Comment on lines
+6
to
+45
| test("pdip8", () => { | ||
| const circuitJson = fp.string("pdip8").circuitJson() as AnyCircuitElement[] | ||
| const svgContent = convertCircuitJsonToPcbSvg(circuitJson) | ||
| expect(svgContent).toMatchSvgSnapshot(import.meta.path, "pdip8") | ||
| }) | ||
|
|
||
| test("pdip14", () => { | ||
| const circuitJson = fp.string("pdip14").circuitJson() as AnyCircuitElement[] | ||
| const svgContent = convertCircuitJsonToPcbSvg(circuitJson) | ||
| expect(svgContent).toMatchSvgSnapshot(import.meta.path, "pdip14") | ||
| }) | ||
|
|
||
| test("pdip16", () => { | ||
| const circuitJson = fp.string("pdip16").circuitJson() as AnyCircuitElement[] | ||
| const svgContent = convertCircuitJsonToPcbSvg(circuitJson) | ||
| expect(svgContent).toMatchSvgSnapshot(import.meta.path, "pdip16") | ||
| }) | ||
|
|
||
| test("pdip8 parameters", () => { | ||
| const json = fp.string("pdip8").json() | ||
| expect(json.num_pins).toBe(8) | ||
| expect(json.p).toBe(2.54) | ||
| expect(json.w).toBe(7.62) | ||
| }) | ||
|
|
||
| // SPDIP tests | ||
| test("spdip28", () => { | ||
| const circuitJson = fp.string("spdip28").circuitJson() as AnyCircuitElement[] | ||
| const svgContent = convertCircuitJsonToPcbSvg(circuitJson) | ||
| expect(svgContent).toMatchSvgSnapshot(import.meta.path, "spdip28") | ||
| }) | ||
|
|
||
| test("spdip28 parameters", () => { | ||
| const json = fp.string("spdip28").json() | ||
| expect(json.num_pins).toBe(28) | ||
| // 70mil pitch | ||
| expect(json.p).toBeCloseTo(1.778, 2) | ||
| // 600mil row spacing | ||
| expect(json.w).toBeCloseTo(15.24, 1) | ||
| }) |
Contributor
There was a problem hiding this comment.
This test file contains 6 test() calls (pdip8, pdip14, pdip16, pdip8 parameters, spdip28, spdip28 parameters), but the rule states that a *.test.ts file may have AT MOST one test(...). After the first test, the user should split into multiple, numbered files. To fix this, split the tests into separate files like pdip1.test.ts, pdip2.test.ts, etc., with each file containing only one test() call.
Suggested change
| test("pdip8", () => { | |
| const circuitJson = fp.string("pdip8").circuitJson() as AnyCircuitElement[] | |
| const svgContent = convertCircuitJsonToPcbSvg(circuitJson) | |
| expect(svgContent).toMatchSvgSnapshot(import.meta.path, "pdip8") | |
| }) | |
| test("pdip14", () => { | |
| const circuitJson = fp.string("pdip14").circuitJson() as AnyCircuitElement[] | |
| const svgContent = convertCircuitJsonToPcbSvg(circuitJson) | |
| expect(svgContent).toMatchSvgSnapshot(import.meta.path, "pdip14") | |
| }) | |
| test("pdip16", () => { | |
| const circuitJson = fp.string("pdip16").circuitJson() as AnyCircuitElement[] | |
| const svgContent = convertCircuitJsonToPcbSvg(circuitJson) | |
| expect(svgContent).toMatchSvgSnapshot(import.meta.path, "pdip16") | |
| }) | |
| test("pdip8 parameters", () => { | |
| const json = fp.string("pdip8").json() | |
| expect(json.num_pins).toBe(8) | |
| expect(json.p).toBe(2.54) | |
| expect(json.w).toBe(7.62) | |
| }) | |
| // SPDIP tests | |
| test("spdip28", () => { | |
| const circuitJson = fp.string("spdip28").circuitJson() as AnyCircuitElement[] | |
| const svgContent = convertCircuitJsonToPcbSvg(circuitJson) | |
| expect(svgContent).toMatchSvgSnapshot(import.meta.path, "spdip28") | |
| }) | |
| test("spdip28 parameters", () => { | |
| const json = fp.string("spdip28").json() | |
| expect(json.num_pins).toBe(28) | |
| // 70mil pitch | |
| expect(json.p).toBeCloseTo(1.778, 2) | |
| // 600mil row spacing | |
| expect(json.w).toBeCloseTo(15.24, 1) | |
| }) | |
| test("pdip8", () => { | |
| const circuitJson = fp.string("pdip8").circuitJson() as AnyCircuitElement[] | |
| const svgContent = convertCircuitJsonToPcbSvg(circuitJson) | |
| expect(svgContent).toMatchSvgSnapshot(import.meta.path, "pdip8") | |
| }) |
Spotted by Graphite Agent (based on custom rule: Custom rule)
Is this helpful? React 👍 or 👎 to let us know.
rushabhcodes
requested changes
Feb 23, 2026
Contributor
rushabhcodes
left a comment
There was a problem hiding this comment.
add kicad parity test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements two new footprint families: PDIP and SPDIP.
PDIP (Plastic Dual In-line Package)
PDIP is the standard plastic through-hole DIP package. It delegates to the existing
dip()implementation with canonical dimensions:pdip8,pdip14,pdip16,pdip28,pdip40, etc.Closes #371
SPDIP (Shrink Plastic Dual In-line Package)
SPDIP uses a tighter 70mil pitch — common in PIC microcontrollers and similar ICs:
spdip28Closes #180
Tests
All 6 tests pass, SVG snapshots generated: