Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add the typed fp.utdfn(...) API entry before approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Implements UDFN/UTDFN exposed-pad footprint generation with DFN-compatible defaults, alias normalization, and tests.
Changes:
- Added configurable
utdfngeneration and exposed-pad geometry. - Exported the generator and normalized package aliases.
- Added geometry, pin-count, and SVG snapshot tests.
| File | Summary |
|---|---|
tests/utdfn.test.ts |
Adds geometry and pin-count coverage. |
tests/__snapshots__/utdfn4ep.snap.svg |
Adds the visual regression snapshot. |
src/footprinter.ts |
Handles UDFN/UTDFN name normalization. |
src/fn/utdfn.ts |
Implements the exposed-pad generator. |
src/fn/index.ts |
Exports utdfn; the typed Footprinter entry is still needed. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| export { sot23 } from "./sot23" | ||
| export { sot25 } from "./sot25" | ||
| export { dfn } from "./dfn" | ||
| export { utdfn } from "./utdfn" |
Comment on lines
+50
to
+54
| const soup = fp.string("utdfn6").circuitJson() | ||
| const signalPads = soup.filter( | ||
| (e): e is PcbSmtPad => e.type === "pcb_smtpad" && isSignalPad(e), | ||
| ) | ||
| expect(signalPads).toHaveLength(6) |
This branch has not been deployed
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.


Implements #183 —
UTDFN-4-EP(1x1)(JLCPCB package name) and the UDFN/UTDFN exposed-pad family.utdfndelegates todfnwith the KiCadUDFN-4-1EP_1x1mm_P0.65mm_EP0.48x0.48mmdefaults: four 0.22mm x 0.25mm signal pads at x=+-0.54mm on 0.65mm pitch (overall width incl. terminals 1.3mm) and a 0.48mm x 0.48mm center exposed pad.num_pinsand every DFN parameter stay overridable for other UDFN variants.Name handling:
utdfn4epresolves through the${fn}${pins}lookup withnum_pins=4;normalizeDefinitionrewritesUTDFN-4-EP/utdfn-4-ep(1x1)/UDFN-4-EPtoutdfn4ep.Tests (
tests/utdfn.test.ts, includes the required SVG snapshot attests/__snapshots__/utdfn4ep.snap.svg):utdfn4epemits exactly the four KiCad pad positions/sizes plus the 0.48mm x 0.48mm EP, asserted numerically.utdfn6produces six signal pads.bun testgreen (580 tests incl. kicad-parity suite),biome formatclean,tsc --noEmitadds zero new errors (the repo has pre-existing ones).