Skip to content

add oval hole interface and corresponding tests#689

Merged
rushabhcodes merged 1 commit into
tscircuit:mainfrom
rushabhcodes:add-oval-hole
Jun 4, 2026
Merged

add oval hole interface and corresponding tests#689
rushabhcodes merged 1 commit into
tscircuit:mainfrom
rushabhcodes:add-oval-hole

Conversation

@rushabhcodes
Copy link
Copy Markdown
Contributor

@rushabhcodes rushabhcodes commented Jun 4, 2026

This pull request adds support for a new "oval" hole type to the PCB layout components. The main changes involve defining the new OvalHoleProps interface, updating type unions and validation schemas, and adding tests to ensure correct behavior.

image

already supported in 3d viewer and circuit-json

Support for Oval Hole Type:

  • Added a new OvalHoleProps interface, including properties such as name, shape, width, height, solderMaskMargin, and coveredWithSolderMask to hole.ts.
  • Updated the HoleProps union type to include OvalHoleProps, allowing oval holes to be used wherever holes are accepted.
  • Created a new Zod validation schema ovalHoleProps for oval holes and included it in the overall holeProps union schema. [1] [2]

Testing:

  • Added a test to verify that oval holes require width and height, and that the properties are parsed and typed correctly.

Copilot AI review requested due to automatic review settings June 4, 2026 06:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copy link
Copy Markdown
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.

Any issue? any motivation for these props. please always try to link the issue which you working on

@rushabhcodes
Copy link
Copy Markdown
Contributor Author

@techmannih already supported in 3d viewer and circuit-json

@techmannih
Copy link
Copy Markdown
Member

@rushabhcodes we never match with circuit-json to props

@rushabhcodes
Copy link
Copy Markdown
Contributor Author

3d-viewer
tscircuit/3d-viewer#651

@techmannih
Copy link
Copy Markdown
Member

Please always try to discuss the proposed fix in the contributor channel before opening a PR

@rushabhcodes rushabhcodes merged commit 6f42f30 into tscircuit:main Jun 4, 2026
4 checks passed
@rushabhcodes rushabhcodes deleted the add-oval-hole branch June 4, 2026 06:55
@tscircuitbot
Copy link
Copy Markdown
Contributor


Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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.

5 participants