fix: QFN footprint pad sizing to match KiCad IPC standards#416
Draft
RaghavArora14 wants to merge 2 commits intotscircuit:mainfrom
Draft
fix: QFN footprint pad sizing to match KiCad IPC standards#416RaghavArora14 wants to merge 2 commits intotscircuit:mainfrom
RaghavArora14 wants to merge 2 commits intotscircuit:mainfrom
Conversation
7bf9e7d to
7c9fc5d
Compare
- Update QFN pad dimensions to use 0.8mm length (not 2x pitch) - Set pad width to 0.5x pitch as per IPC standards - Add padoffset parameter to quad function for fine-tuning pad position - Position QFN pads to extend 0.35mm beyond package edge for proper soldering - Add QFN32 KiCad parity test (now passes with <5% difference) - Update QFN16 snapshot with corrected pad dimensions Fixes tscircuit#413
1d607ed to
716dfeb
Compare
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.
Fix QFN Footprint Pad Sizing to Match KiCad IPC Standards
Fixes #413
The Issue
QFN (Quad Flat No-lead) footprints were generating pads that were significantly too small compared to KiCad IPC standards:
The undersized pads would cause manufacturing and soldering issues, as QFN packages require pads that extend beyond the package edge for proper solder joint formation.
The Fixes
1. Updated QFN Pad Dimensions (
src/fn/qfn.ts)Applied KiCad IPC standards for QFN packages:
0.5 × pitch(e.g., 0.2mm for 0.4mm pitch, 0.325mm for 0.65mm pitch)0.8mm(fixed, not pitch-dependent)2. Added Pad Offset Support (
src/fn/quad.ts)padoffsetparameter to the quad function3. Added KiCad Parity Test
tests/kicad-parity/qfn32_kicad_parity.test.ts📸 Visual Snapshots
Before (Incorrect - Pads Too Small)
Pads: 0.2mm × 0.2mm at -1.6mm position - way too small and not extending beyond package

After (Correct - Matches KiCad)
Pads: 0.8mm × 0.2mm at -1.95mm position - proper size with 0.35mm extension beyond package edge

KiCad Parity Comparison
Boolean difference visualization showing near-perfect alignment with KiCad footprint

###References
https://tscircuit.github.io/kicad-viewer/#Package_DFN_QFN.pretty/QFN-32-1EP_4x4mm_P0.4mm_EP2.65x2.65mm.kicad_mod