Skip to content

fix: support jst_ph_N format and dynamic PH silkscreen sizing#518

Open
lucaferri-dev wants to merge 2 commits intotscircuit:mainfrom
lucaferri-dev:fix-jst-ph-pin-count
Open

fix: support jst_ph_N format and dynamic PH silkscreen sizing#518
lucaferri-dev wants to merge 2 commits intotscircuit:mainfrom
lucaferri-dev:fix-jst-ph-pin-count

Conversation

@lucaferri-dev
Copy link

Summary

  • Support jst_ph_4, jst_ph_6, etc. format (trailing pin count after variant)
  • Compute PH silkscreen body width dynamically from pin count instead of hardcoding fixed dimensions
  • Add test for jst_ph_4 generating 4 pads

Closes #495

Test plan

  • jst_ph_4 generates 4 plated holes
  • jst_ph_6 generates 6 plated holes
  • Existing formats (jst4_ph, jst2_ph) still work
  • All 376 tests pass

🤖 Generated with Claude Code

Parse trailing pin count from footprint strings like jst_ph_4, jst_ph_6.
Also compute PH silkscreen body width from pin count instead of hardcoding.

Closes tscircuit#495

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Member

@techmannih techmannih left a comment

Choose a reason for hiding this comment

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

Add kicad parity test

Add kicad parity test comparing jst_ph_4 against
JST_PH_B4B-PH-K_1x04_P2.00mm_Vertical from KiCad library.
Also fix biome formatting in jst_ph_4.test.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lucaferri-dev
Copy link
Author

Added a KiCad parity test for jst_ph_4 comparing against JST_PH_B4B-PH-K_1x04_P2.00mm_Vertical from the KiCad library. Also fixed the biome formatting issue.

@lucaferri-dev
Copy link
Author

Already added in commit 022a391 — the kicad parity test for jst_ph_4 is at tests/kicad-parity/jst_ph4_kicad_parity.test.ts with snapshots. CI needs maintainer approval to run the workflow.

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.

jst_ph_4 footprint generates only 2 pads instead of 4

2 participants