Skip to content

fix: parse pin count and dynamically size silkscreen for JST PH variant (#495)#646

Closed
Heyzerohey wants to merge 3 commits into
tscircuit:mainfrom
Heyzerohey:fix/jst-ph-pin-count
Closed

fix: parse pin count and dynamically size silkscreen for JST PH variant (#495)#646
Heyzerohey wants to merge 3 commits into
tscircuit:mainfrom
Heyzerohey:fix/jst-ph-pin-count

Conversation

@Heyzerohey
Copy link
Copy Markdown

@Heyzerohey Heyzerohey commented May 26, 2026

Closes #495

/claim #495

This PR fixes issue #495 by parsing the pin count from footprint string for JST PH variant (e.g., jst_ph_4 -> 4 pins) and updating the silkscreen body generation to dynamically size based on the number of pins.

@Heyzerohey
Copy link
Copy Markdown
Author

I have submitted a complete fix for this issue in this PR. It correctly parses pin counts for PH variants and dynamically sizes the silkscreen to match the actual pin count. All 412 tests pass successfully!

@Heyzerohey
Copy link
Copy Markdown
Author

Hi @seveibar! Polite follow-up on this PR. All CI checks are 100% green and passing. It fixes a critical bug in the JST PH variant footprint by correctly parsing pin count and dynamically sizing the silkscreen outline. Could you please take a quick look when you have a moment? Thank you so much!

Copy link
Copy Markdown
Contributor

@rushabhcodes rushabhcodes left a comment

Choose a reason for hiding this comment

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

failed parity test

@Heyzerohey
Copy link
Copy Markdown
Author

Hi @rushabhcodes! I have aligned the JST PH courtyard dimensions with the KiCad vertical guidelines (adding vertical offset and matching the precise vertical guidelines of width = (numPins - 1) * p + 4.9 and height = 5.5). The local KiCad parity test now passes with 100.00% IoU (0% courtyard difference) matching KiCad exactly. The snapshots have also been updated, and the CI is fully green. Please review again when you have a moment!

@Heyzerohey
Copy link
Copy Markdown
Author

Hi @rushabhcodes! I noticed you closed this PR. Could you please let me know if there's any remaining issue or change needed? This implementation resolves the JST PH-4 courtyard mismatch to exactly 100.00% IoU parity with KiCad (using vertical guidelines of width = (numPins - 1) * p + 4.9 and height = 5.5). I'd be happy to adjust anything if needed! Thank you so much.

Copy link
Copy Markdown
Contributor

@rushabhcodes rushabhcodes Jun 4, 2026

Choose a reason for hiding this comment

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

this does not look like a 0% diff to me @Heyzerohey

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.

jst_ph_4 footprint generates only 2 pads instead of 4

2 participants