Skip to content

Add explicit SOIC body dimensions for courtyard generation - #866

Open
pokemongo1027 wants to merge 2 commits into
tscircuit:mainfrom
pokemongo1027:fix/soic-body-courtyard
Open

pokemongo1027 wants to merge 2 commits into
tscircuit:mainfrom
pokemongo1027:fix/soic-body-courtyard

Conversation

@pokemongo1027

Copy link
Copy Markdown

SOIC courtyards infer the component body from the pad layout and silkscreen height. This prevents expressing the physical body independently of the land pattern.

Add optional positive finite bodywidth and bodyheight parameters to SOIC strings and the fluent builder. With either parameter supplied, the courtyard encloses the body and copper envelopes with 0.25mm clearance, including containment and offset thermal-pad cases. Existing footprints retain their current output when neither parameter is supplied. Pad placement, pad sizes and silkscreen remain unchanged.

The SOIC-8 parity test now specifies the actual reference land pattern: 1.95 x 0.6mm pads at x = +/-2.475mm, a 6.9mm pad-tip span, and a 3.9 x 4.9mm body. The old test used different pad dimensions. Correcting those inputs and supplying the new body dimensions changes courtyard overlap from 85.76% to 99.9221%. The remaining 0.0779% difference comes from KiCad rounding the 2.455mm clearance boundary outward to 2.46mm.

Relates to #731, scoped to the SOIC-8 comparison. This does not close the remaining SOIC-20, SOIC-24 and QFN-32 items.

Validation

  • Focused SOIC tests: 11 passed, 0 failed, 63 assertions.
  • All 6 new regression tests fail against the unchanged upstream source and pass with this change.
  • Package and TypeScript declaration build passed.
  • Repository formatting check passed.
  • Full suite: 567 passed, 3 failed. Unchanged upstream at d0d2ee19b261781af97d405400eb88402598ac92 has the same 3 failures: smf, parity/sod523, and diode-kicad-parity/sod523 (561 passed). Tested on Windows with Bun 1.4.2 and Node 22.14.0.
  • Six new SVG snapshots checked visually. Existing output was independently compared for 10 SOIC and related legacy forms, with no differences.

Reference: https://gitlab.com/kicad/libraries/kicad-footprints/-/blob/master/Package_SO.pretty/SOIC-8_3.9x4.9mm_P1.27mm.kicad_mod

Prepared with AI assistance, local regression testing and an independent review of the geometry and existing behavior.

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