Skip to content

Add support for oval hole shape in Hole component and corresponding tests#2392

Closed
rushabhcodes wants to merge 6 commits into
tscircuit:mainfrom
rushabhcodes:add-hole-types
Closed

Add support for oval hole shape in Hole component and corresponding tests#2392
rushabhcodes wants to merge 6 commits into
tscircuit:mainfrom
rushabhcodes:add-hole-types

Conversation

@rushabhcodes
Copy link
Copy Markdown
Contributor

This pull request adds support for oval-shaped PCB holes to the codebase, ensuring that the Hole component, circuit JSON parsing, and testing infrastructure all recognize and handle the new "oval" shape. The main changes include updates to the Hole component logic, the circuit JSON component creation utility, and the addition of a dedicated test.

Oval Hole Support

  • Updated the Hole component in Hole.ts to recognize and handle the "oval" shape, both in dimension calculation and when inserting into the database. ([[1]](https://github.com/tscircuit/core/pull/2392/files#diff-a1e24807489838518cf5a06f03f4650aeee566fe9ba1350d2c7c7d6b2165f6d7L3-R9), [[2]](https://github.com/tscircuit/core/pull/2392/files#diff-a1e24807489838518cf5a06f03f4650aeee566fe9ba1350d2c7c7d6b2165f6d7R27-R29), [[3]](https://github.com/tscircuit/core/pull/2392/files#diff-a1e24807489838518cf5a06f03f4650aeee566fe9ba1350d2c7c7d6b2165f6d7R90-R104))
  • Modified the createComponentsFromCircuitJson.ts utility to construct Hole components with the "oval" shape when parsing circuit JSON. ([lib/utils/createComponentsFromCircuitJson.tsR248-R257](https://github.com/tscircuit/core/pull/2392/files#diff-7ad9fac440629299aada6cdd6a7e3b3f17a2a159e81c275ce59100b472cdc352R248-R257))

Testing

  • Added a new test hole-oval.test.tsx to verify correct creation, storage, and rendering of oval-shaped PCB holes. ([tests/components/primitive-components/hole-oval.test.tsxR1-R26](https://github.com/tscircuit/core/pull/2392/files#diff-8d816351d93ef4353a273fd5bf21da3849fdf85e5a1345ae4bdf8aadd7632eb8R1-R26))

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

vercel Bot commented Jun 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Jun 4, 2026 12:46pm

Request Review

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

@imrishabh18 imrishabh18 left a comment

Choose a reason for hiding this comment

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

where is the snapshot?

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