Skip to content

feat: enhance SOP-8 footprint definition and add tests for KiCad parity#430

Open
rushabhcodes wants to merge 3 commits intotscircuit:mainfrom
rushabhcodes:fix-sop8
Open

feat: enhance SOP-8 footprint definition and add tests for KiCad parity#430
rushabhcodes wants to merge 3 commits intotscircuit:mainfrom
rushabhcodes:fix-sop8

Conversation

@rushabhcodes
Copy link
Contributor

This pull request updates the SOP-8 footprint definition and improves type safety in the sop8 generator, while also adding a new test for KiCad parity. The main changes include specifying physical parameters for the SOP-8 package, updating type annotations for better clarity, and introducing a snapshot test to ensure the generated footprint matches KiCad's output.

SOP-8 footprint improvements:

  • Added explicit physical parameters (w, p, pw, pl) to the sop8_def definition to match SOP-8 package specifications.
  • Updated type annotations in the sop8 function and related arrays from AnySoupElement to AnyCircuitElement for improved type safety and clarity. [1] [2]

Testing enhancements:

  • Added a new snapshot test (sop8_kicad_parity.test.ts) to compare the generated SOP-8 footprint against KiCad's version, including SVG output and boolean difference checks.

Before and After

image

KiCad Parity

image

Copy link
Member

@techmannih techmannih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KiCad test is correct, but you still need to verify and use standard pad dimensions (length & width). Also, the ref text is not positioned correctly — when the CAD model is placed on top of the pads, the reference text should not be visible

@rushabhcodes
Copy link
Contributor Author

@techmannih
image

@techmannih
Copy link
Member

Silkscreen line should be a little bit upper

@rushabhcodes
Copy link
Contributor Author

image Is this correct

@techmannih
Copy link
Member

Yea also increase the distance between ref text and silkscreen line

@rushabhcodes
Copy link
Contributor Author

image @techmannih

@rushabhcodes
Copy link
Contributor Author

rushabhcodes commented Nov 22, 2025

Please review @techmannih

@techmannih
Copy link
Member

sorry for delay

Copy link

@baeoc baeoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rushabhcodes
Copy link
Contributor Author

rushabhcodes commented Nov 28, 2025

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.

3 participants