Skip to content

Reproduce arbitrary silkscreen rectangle rotation - #4274

Merged
seveibar merged 4 commits into
tscircuit:mainfrom
anil08607:repro/silkscreen-rect-pcb-rotation
Oct 2, 2026
Merged

seveibar merged 4 commits into
tscircuit:mainfrom
anil08607:repro/silkscreen-rect-pcb-rotation

Conversation

@anil08607

@anil08607 anil08607 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

A 6 × 2 mm <silkscreenrect> with pcbRotation={30} or pcbRotation={45} renders horizontally instead of following its requested rotation.

Adds a passing snapshot reproduction with explicit, labelled examples for 30°, 45°, 0°, 90° and 180°. Every rectangle has its props directly on the JSX component. The snapshot records the current output: the two incorrect arbitrary rotations alongside three working controls. There are no expected-failure tests or rotation assertions; the implementation fix can update the snapshot.

The current props types omit pcbRotation, so each requested rotation has a narrow @ts-expect-error comment. These comments can be removed when props support lands.

Requested in the review of props #884. This PR changes only the reproduction test and its snapshot. Proposed implementation: #4265. Converter mapping: tscircuit/circuit-json-to-tscircuit#119.

Validation: the reproduction and existing rectangle/rotation tests pass (4 tests), along with the targeted TypeScript check and Biome formatting. The existing snapshot passes unchanged.

@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
tscircuit-core-benchmarks Ready Ready Preview Oct 1, 2026 3:53pm UTC

Request Review

<silkscreenrect
width={6}
height={2}
// @ts-expect-error pcbRotation is missing from the current props types.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

API/props support tscircuit/props#884

Required for conversion tscircuit/circuit-json-to-tscircuit#119

@seveibar
seveibar merged commit 648c1d4 into tscircuit:main Oct 2, 2026
20 checks passed
seveibar added a commit that referenced this pull request Oct 2, 2026
@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


This branch was successfully deployed

1 active deployment
Preview — f6bc4253 Deployed Oct 1, 2026 by vercel[bot]
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