fix: QFN footprint pad sizing to match KiCad IPC standards #416
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