Skip to content

feat: add UTDFN-4-EP footprint alias#640

Open
MINBBBIGcode wants to merge 2 commits into
tscircuit:mainfrom
MINBBBIGcode:codex/utdfn-4-ep-alias
Open

feat: add UTDFN-4-EP footprint alias#640
MINBBBIGcode wants to merge 2 commits into
tscircuit:mainfrom
MINBBBIGcode:codex/utdfn-4-ep-alias

Conversation

@MINBBBIGcode
Copy link
Copy Markdown

Refs #183.

Summary:

  • Add UTDFN-4-EP(1x1) and UDFN-4-EP(1x1) normalization.
  • Route the aliases to compact VSON-style 4-pin exposed-pad geometry.
  • Add regression coverage for the new footprint names.

Validation:

  • bun x biome format src/footprinter.ts tests/vson.test.ts --write
  • bun test tests/vson.test.ts tests/get-footprint-names.test.ts
  • bun test
  • bun run build
  • git diff --check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aeffaeed3e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/footprinter.ts Outdated
return def
.trim()
.replace(
/^(?:utdfn|udfn)-?(\d+)-ep\((\d+(?:\.\d+)?)x(\d+(?:\.\d+)?)(?:mm)?\)$/i,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow UTDFN alias with trailing options

The new normalization regex only matches when the entire string is exactly UTDFN/UDFN-…-EP(...) because it is anchored with $, so aliases stop working as soon as standard underscore options are appended (for example UTDFN-4-EP(1x1)_norefdes or _nosilkscreen). In those cases normalization is skipped, utdfn is treated as the footprint function, and downstream calls fail with an invalid footprint function error. Existing aliases in this file use (?=_|$) specifically to preserve these suffix options, so this new alias should follow the same pattern.

Useful? React with 👍 / 👎.

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.

1 participant