Repository navigation
fix(testpoint): honor padDiameter on through-hole test points - #5907
siribi007-del wants to merge 2 commits into
Conversation
<testpoint footprintVariant="through_hole" padDiameter=... /> ignored padDiameter: the implied footprint was always `platedhole_d<hole>`, so the plated hole's outer_diameter fell back to 1.5x the hole diameter while the source_component still reported the requested pad_diameter. Pass padDiameter to the footprinter as `_pd<diameter>` when it is set. Seven autoroutingphase snapshots already set padDiameter on default (through-hole) test points; their pads now render at the requested size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
I tested this merged onto current
The last row now builds with no error or warning, but it produces a plated hole whose copper is smaller than its drill, so there's no annular ring at all. On The new test fails on |
A through-hole test point with padDiameter <= holeDiameter would now produce a plated hole whose copper is no wider than its drill (no annular ring). Report a source_invalid_component_property_error naming the test point and fall back to the default pad size instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for testing this. Good catch on the last row. Pushed 32ad8fa: when |
|
Retested 32ad8fa merged onto current
The SMD The last row is legal under the new rule, but it leaves a 0.025 mm annular ring. That's probably fine to leave to DRC rather than this prop check. |
padDiameteris documented as "Diameter of the copper pad (applies to both SMD pads and plated holes)", but through-hole test points ignore it:On main this produces a
pcb_plated_holewithouter_diameter: 1.5(footprinter's 1.5× hole default), whilesource_component.pad_diametersays2.5, so the generated PCB pad does not match the requested size and the Circuit JSON contradicts itself.Cause:
TestPoint._getImpliedFootprintString()always returnedplatedhole_d<hole>for the through-hole variant.Fix: when
padDiameteris set, returnplatedhole_d<hole>_pd<pad>(footprinter'splatedholealready parsespd). WithoutpadDiameterthe footprint string is unchanged.Tests
tests/components/normal-components/testpoint-through-hole-pad-diameter.test.tsx: fails on main (outer_diameter1.5, expected 2.5), passes with the fix.tests/features/autoroutingphase-*snapshots change: those tests already passpadDiameterto default (through-hole) test points, which was ignored. Their pads now use the requested size (e.g. 0.8mm instead of 0.75mm, 0.7mm infixed-pcb-path), the reference labels move with the pad edge, and routes are recomputed. All of their assertions still pass.bunx tsc --noEmitpasses, and the PR checker (tscircuit-pullrequest-deterministic-checks) reports 0 errors. Its 3 warnings are pre-existing repo-tooling ones.Before / after (hole 1mm, padDiameter 2.5mm):
Not addressed here: a
padDiameterthat is not larger than the hole is passed through as-is. That validation is a separate question.AI-assisted (Claude); I ran and verified the tests locally.