Skip to content

fix: honor length units in SOD pad dimensions - #887

Open
santosh-kumar-git wants to merge 1 commit into
tscircuit:mainfrom
santosh-kumar-git:fix/sod-length-units
Open

santosh-kumar-git wants to merge 1 commit into
tscircuit:mainfrom
santosh-kumar-git:fix/sod-length-units

Conversation

@santosh-kumar-git

Copy link
Copy Markdown

SOD pad dimensions and pitch currently discard unit suffixes with Number.parseFloat. For example, fp.string("sod123_pl0.02in_pw0.01in_p0.1in") produces 0.02 × 0.01 mm pads at x = ±0.05 mm instead of 0.508 × 0.254 mm pads at x = ±1.27 mm.

Use the existing length.parse conversion for pad length, width and pitch in the 12 affected SOD generators. Existing millimeter defaults remain unchanged. Add literal dimension assertions and SVG snapshots for each affected variant, plus a public string-parser regression using mils.

Validation:

  • All 13 new regression cases failed before the fix; all 32 SOD tests pass after it.
  • bun run build and biome format . pass.
  • Full suite: 576 pass, 1 fail. The unrelated parity/qfn32_thermalpad3.1x3.1mm snapshot failure also reproduces on unchanged upstream d0d2ee1 with the same dependencies.
  • tsc --noEmit reports 264 existing errors; its complete output is identical on unchanged upstream.

Tested with Bun 1.4.2; all 12 new SVG snapshots were visually inspected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant