Skip to content

Support pin-indexed SOT-343 pad geometry - #780

Open
Abse2001 wants to merge 8 commits into
tscircuit:mainfrom
Abse2001:agent/fix-sot343-c151520
Open

Support pin-indexed SOT-343 pad geometry#780
Abse2001 wants to merge 8 commits into
tscircuit:mainfrom
Abse2001:agent/fix-sot343-c151520

Conversation

@Abse2001

@Abse2001 Abse2001 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extend the existing sot343 family with compact per-pin geometry parameters:
    • p<number>w, p<number>h, p<number>x, and p<number>y
  • provide readable full aliases:
    • pad<number>width, pad<number>height, pad<number>centerx, and pad<number>centery
  • generate the runtime schemas and TypeScript builder keys from the SOT-343 pin numbers and property suffixes instead of declaring every combination
  • reject invalid pin numbers and conflicting compact/full values
  • narrowly extend footprint-string parsing for these names without changing grid5x3 or p1mm parsing
  • retain the real C151520 regression snapshot

Motivation

C151520 uses standard SOT-343 pin placement with asymmetric geometry on pad 2. A manufacturer-specific family is unnecessary.

The compact pNw / pNh / pNx / pNy form follows the convention already used by led2835. Full aliases keep generated footprint strings readable. The earlier padoverride selector was removed because no existing Footprinter family uses that abstraction.

Implementation

The SOT-343 definition declares its valid pins and the four compact properties once:

pins × [w, h, x, y]

Those definitions generate both compact and full parameter schemas. A template-literal type exposes the same generated names through the fluent builder, avoiding manually listed p1w, p2w, etc.

Compact C151520 example:

sot343_p0.4451958904109589mm_rowspan1.999996mm_pl0.6999986mm_pw0.6999986mm_p2w0.8999982mm_p2h0.6999986mm_p2x0.2953358904109589mm_p2y-0.999744mm_rounded0

Equivalent full-alias example:

sot343_p0.4451958904109589mm_rowspan1.999996mm_pl0.6999986mm_pw0.6999986mm_pad2width0.8999982mm_pad2height0.6999986mm_pad2centerx0.2953358904109589mm_pad2centery-0.999744mm_rounded0

pNx and pNy are absolute pad-center coordinates. Unspecified pin properties retain normal SOT-343 geometry.

Validation

  • C151520 compact parameters: 100% copper IoU
  • C151520 full aliases: 100% copper IoU
  • standard SOT-343 KiCad parity: 100%
  • bun test: 524 passed, 0 failed
  • bun run build: passed
  • focused SOT-343 and footprint-string parser regressions: passed

@Abse2001
Abse2001 marked this pull request as ready for review August 7, 2026 15:23
@Abse2001 Abse2001 changed the title Support asymmetric SOT-343 pad geometry Support per-pad SOT-343 geometry overrides Aug 7, 2026
@Abse2001 Abse2001 changed the title Support per-pad SOT-343 geometry overrides Select SOT-343 pad overrides by pin number Aug 9, 2026
@Abse2001 Abse2001 changed the title Select SOT-343 pad overrides by pin number Support pin-indexed SOT-343 pad geometry Aug 9, 2026
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