fix(pinrow): pitch-aware id/od defaults so 1.27 mm headers don't overlap#625
Open
gsdali wants to merge 1 commit into
Open
fix(pinrow): pitch-aware id/od defaults so 1.27 mm headers don't overlap#625gsdali wants to merge 1 commit into
gsdali wants to merge 1 commit into
Conversation
The previous hardcoded defaults `id="1.0mm"` and `od="1.5mm"` were
tuned for the standard 0.1in (2.54 mm) pitch. They produce
fab-breaking overlap on smaller pitches:
pitch 1.27 mm + od 1.5 mm = -0.23 mm copper-to-copper clearance
i.e. adjacent plated holes overlap by 0.23 mm. Visible on every
2x5 1.27 mm Cortex Debug header generated with the default
pinheader at the moment.
Make `id` and `od` optional in the schema; compute defaults from
pitch in the transform:
od_default = min(1.5 mm, p − 0.27 mm)
# 0.27 mm copper-to-copper minimum (matches generic
# JLCPCB 1.27 mm headers like ZX_PZ1_27_2_5PZZ)
id_default = min(1.0 mm, od − 0.4 mm)
# ≥ 0.5 mm annular ring (≥ IPC class 2 minimum)
At p=2.54 mm: od=1.5 / id=1.0 (unchanged — backward compatible).
At p=1.27 mm: od=1.0 / id=0.6 (matches Cortex Debug header standard).
At p=2.0 mm: od=1.5 / id=1.0 (still fits with 0.5 mm clearance).
User-supplied `id`/`od` are honoured at any pitch (no override of
explicit values).
Tests:
- All 25 existing pinrow tests pass unchanged (default-pitch
behaviour preserved).
- Add `tests/pinrow_pitch_aware_defaults.test.ts` with three cases:
default pitch backward-compat, 1.27 mm pitch defaults scale down,
explicit values override defaults at any pitch.
Hit while building an InsightSiP ISP3080-UX daughter board where
the only viable Cortex Debug header path was to import a JLCPCB
SKU. Default `<pinheader pitch="1.27mm" doubleRow>` was unusable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
pinrow's defaultid="1.0mm"/od="1.5mm"are tuned for the 0.1in (2.54 mm) pitch and produce fab-breaking overlap at smaller pitches. Concretely, at the standard ARM Cortex Debug pitch of 1.27 mm with defaultod=1.5mm, adjacent plated holes overlap by 0.23 mm.Fix
Make
idandodoptional in the schema; compute defaults from pitch in the transform:odidid/odat any pitchTest plan
tests/pinrow_pitch_aware_defaults.test.tsadds:p=2.54mm→id=1.0/od=1.5)p=1.27mm→od ≤ p − 0.2, annular ring ≥ 0.3 mm)id/odoverride defaults at any pitchbun test: 415 pass (one flaky timeout inslop1.test.tsunrelated to this change, passed on rerun)bun run format: cleanRepro
Before this PR,
tsci buildreports the resulting plated holes as 1.5 mm OD and they overlap. With this PR, defaults become 1.0 mm OD / 0.6 mm drill — same as the typical JLCPCB Cortex Debug header SKU.🤖 Generated with Claude Code