Conversation
…rameter The lead pitch was derived from the plastic body width (2.6mm at the default w=13mm) instead of the fixed JEDEC TO-220 pitch of 0.1in / 2.54mm, and the declared p parameter was parsed but never read. Pitch is now fixed at 2.54mm (matching the sibling to220f, which already hardcodes 2.54mm to match KiCad), overridable via p, and independent of body width. Closes tscircuit#790
Author
|
Fresh local run of the regression suite (2026-09-20, bun 1.4.2, this branch): Covers the 2.54mm TO-220 pitch geometry: pin pitch, pad size, body offsets and the regression snapshot for |
This branch has not been deployed
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.
/claim #790
Problem
to220derived its lead pitch from the plastic body width:w=13mm, 3 pins → 2.6mm, 0.06mm off per step from the fixed JEDEC TO-220 pitch of 0.1in (2.54mm)pparameter (default"5.0mm") was parsed and never read —to220_p2.54mmhad no effectFix
Mirror the sibling
to220f, which already hardcodes2.54mmwith the comment "to match KiCad":pdefaults to2.54mmand is the single source of the pitch (const pitch = mm(parameters.p))parameters.preports the effective pitchTests (6 new, snapshot-free, deterministic)
to220_3default pitchp: "5mm"overridew: "25.4mm"bodyto220_4centeredto220_5pitchparameters.pSnapshots
The 4 affected
to220_*.snap.svgsnapshots were regenerated on ubuntu-latest CI (via a temporaryworkflow_dispatchhelper, removed before this PR) — no local-font drift can enter the pixel comparison. Every other snapshot in the repo is untouched (verified: diff touches exactly the 4 to220 SVGs).Note: #828 also targets this issue but bundles fixes for three unrelated issues (#786/#788 fpc/pad defaults, solderjumper) into one PR; this PR is scoped to #790 only and includes the pitch-regression tests above.