Skip to content

fix: jst_ph_N footprint pads and silkscreen scaling#633

Open
zzhang82 wants to merge 1 commit into
tscircuit:mainfrom
zzhang82:fix-jst-ph-pads-and-scaling
Open

fix: jst_ph_N footprint pads and silkscreen scaling#633
zzhang82 wants to merge 1 commit into
tscircuit:mainfrom
zzhang82:fix-jst-ph-pads-and-scaling

Conversation

@zzhang82
Copy link
Copy Markdown

/claim #495

This PR fixes the issue where jst_ph_4 (and other PH variants using the underscore format) generated only 2 pads instead of the requested number.

Changes

  • Improved Regex: Added support for jst_ph_N and jst_sh_N string formats in src/fn/jst.ts.
  • Dynamic Silkscreen: Updated the PH silkscreen body to scale dynamically with the number of pins and pitch. This replaces the previous hardcoded 6x5mm box, ensuring the body correctly encompasses all pads for headers with more than 2 pins.
  • Updated Snapshots: Updated SVG snapshots for JST PH variants to reflect the improved silkscreen dimensions.

Validation

  • Verified that jst_ph_4 (pretransform) test in tests/jst.test.ts now passes (it was previously failing to parse the pin count).
  • Ran all tests (bun test), all 414 tests pass.
  • Verified code formatting with Biome (bun run format).

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.

2 participants