fix: scale JST PH silkscreen body dynamically with pin count#636
Open
tungnguyentu wants to merge 1 commit into
Open
fix: scale JST PH silkscreen body dynamically with pin count#636tungnguyentu wants to merge 1 commit into
tungnguyentu wants to merge 1 commit into
Conversation
The PH silkscreen body was hardcoded to a fixed ±3mm width, which only fits a 2-pin connector. For connectors with more pins (e.g. jst_ph_4), the pads extend beyond the silkscreen outline. Scale the body width using the same formula as the ZH variant: bodyLeft/Right = ±(pinSpan/2 + 1.5), keeping the connector housing depth (Y: -2 to +3) fixed for all PH variants. Fixes tscircuit#495
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.
Problem
The PH silkscreen body in
generateSilkscreenBodywas hardcoded to a fixed ±3mm width regardless of pin count. For ajst_ph_2this works fine, but forjst_ph_4(pitch 2.2mm) the pad span is 6.6mm and extends beyond the 6mm-wide hardcoded silkscreen outline.Fix
Scale the PH silkscreen width using the same dynamic formula already used by the ZH variant:
The Y dimensions (-2 to +3) remain fixed — they represent the connector housing depth, which is the same for all PH variants.
Verification
jst2_ph— silkscreen unchanged for 2-pin (same ±3mm)jst_ph_4— silkscreen now correctly spans all 4 pads/claim #495