-
Notifications
You must be signed in to change notification settings - Fork 107
fix(to220): standard 2.54mm lead pitch and KiCad TO-220-3 pads #791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zkasuran
wants to merge
2
commits into
tscircuit:main
Choose a base branch
from
zkasuran:fix/to220-kicad-pitch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add KiCad tests for the footprints you changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
tests/kicad-parity/to220_4_kicad_parity.test.tsin db11e19, matching theto220_3parity that was already in the PR. AgainstPackage_TO_SOT_THT.pretty/TO-220-4_Verticalthe copper matches KiCad exactly (avgRelDiff 0.00%) with courtyardDiffPercent 11.77%, the same residual body-outline delta asto220_3, so it reuses the same< 13courtyard threshold and ships the SVG plus boolean-difference snapshots.That gives KiCad parity for both fixed 2.54mm-grid variants (
to220_3andto220_4). I deliberately did not add parity for the other two changed footprints, because their KiCad references are not on a 2.54mm pitch and a passing assertion there would need a threshold that certifies nothing:TO-220-2_Verticalis a 5.08mm land (the two outer leads of the frame), so the fixed 2.54mm part measures avgRelDiff 29.40% / courtyardDiffPercent 17.15% against it.TO-220-5_Verticalis the 1.7mm Multiwatt land, so 2.54mm measures avgRelDiff 36.03% / courtyardDiffPercent 24.30%.Both keep their render snapshots in
tests/to220.test.ts. If you want real KiCad parity across every pin count I can follow up with a per-pin-count pitch (5.08mm for the 2-pin, 1.7mm for the 5-pin) soto220_2andto220_5land on their KiCad packages too. That is wider than #790, which is why I scoped this PR to the 2.54mm land. Happy to fold it in here or open a separate PR, your call.bun teston the to220 files is green (9 pass) andbun run buildsucceeds.