fix(lga): prevent corner pad overlap with derived body size - #796
Open
w1ne wants to merge 1 commit into
Open
Conversation
The default LGA body width/height were derived as (grid-1)*pitch + 2*pl, which places the inner edge of the left/right pads exactly on the center line of the outermost top/bottom pads (and vice versa). For rectangular grids such as lga14 (4x3) and lga8 (2x2) the corner pads therefore overlapped with 0mm clearance, tripping pad-to-pad DRC inside the footprint. Add a corner allowance (pw + 2*0.2mm clearance) to the derived body size when pads exist on adjacent sides, giving 0.2mm corner clearance. Explicitly provided w/h are unchanged, as are two-sided grids (e.g. lga6_grid3x0). Adds a regression test asserting pad-to-pad clearance for lga14/lga8 with SVG snapshots.
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
For LGA footprints where the body size is derived (i.e.
w/hare not given explicitly), corner pads overlap with 0mm clearance, tripping pad-to-pad DRC inside the footprint itself and blocking the autorouter.Repro:
Root cause
In
src/fn/lga.tsthe default body size was derived as:The inner edge of the left/right pads sits at
(width - 2*pl) / 2 = (grid.y - 1) * p / 2, which is exactly the center line of the outermost top/bottom pads (and vice versa for height). The corner pads on perpendicular sides therefore overlap bypw/2in both axes — edge-to-edge clearance is 0.Measured before (default
p=0.5mm,pw=0.28mm,pl=0.7mm):lga14(4x3 grid): pad 1 at (-0.85, 0.75) 0.7x0.28 vs pad 14 at (-0.5, 1.1) 0.28x0.7 → 0.00mm clearancelga8(2x2 grid): pad 1 at (-0.6, 0.25) vs pad 8 at (-0.25, 0.6) → 0.00mm clearanceFix
Add a corner allowance of
pw + 2 * 0.2mmto the derived body size when pads exist on adjacent sides, so corner pads get 0.2mm clearance:lga14: derived body 2.40x2.90mm → 3.08x3.58mm; min pad-to-pad clearance 0.00mm → 0.22mm (corner clearance 0.20mm)lga8: derived body 1.90x1.90mm → 2.58x2.58mm; min pad-to-pad clearance 0.00mm → 0.22mm (corner clearance 0.20mm)Explicitly provided
w/hare untouched, and two-sided grids likelga6_grid3x0(no adjacent-side pads) keep their previous derived size, so no existing snapshots change.Tests
lga14 and lga8 keep clearance between corner padsasserts min pad-to-pad clearance > 0.1mm for both default footprints, with SVG snapshots per repo convention.