Skip to content

Fix hole orientation in StampBoard component#264

Merged
rushabhcodes merged 3 commits intotscircuit:mainfrom
rushabhcodes:fix-stampboard
Feb 2, 2026
Merged

Fix hole orientation in StampBoard component#264
rushabhcodes merged 3 commits intotscircuit:mainfrom
rushabhcodes:fix-stampboard

Conversation

@rushabhcodes
Copy link
Contributor

This pull request updates the calculation of pad and hole positions in the StampBoard component to fix orientation and alignment issues. It also updates the example usage to match the new footprint and lead counts. The most important changes are grouped below:

Pad and hole position corrections in StampBoard:

  • Fixed the calculation of x positions for right and left leads, swapping the sign and side to ensure pads and holes are placed on the correct board edges. [1] [2]
  • Corrected the calculation of y positions for top and bottom leads, flipping the direction so pads and holes are placed properly relative to the board center. [1] [2]

Example and footprint updates:

  • Updated the example in stampboard.example.tsx to use the new lead counts and footprint name, ensuring the demo matches the corrected layout.

Before

Screenshot_20260201_213344

After

Screenshot_20260201_213246

/fix #263

Copilot AI review requested due to automatic review settings February 1, 2026 16:06
@vercel
Copy link

vercel bot commented Feb 1, 2026

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

Project Deployment Actions Updated (UTC)
jscad-electronics Ready Ready Preview, Comment Feb 1, 2026 5:33pm

Request Review

Copy link

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.

Pull request overview

This pull request fixes the orientation of holes and pads in the StampBoard component by correcting the coordinate system calculations. The changes ensure that pads and holes are placed on the correct board edges according to standard coordinate conventions (positive x = right, negative x = left, positive y = top, negative y = bottom).

Changes:

  • Swapped x-coordinate calculations for left and right leads to place them on the correct sides of the board
  • Flipped y-coordinate calculations for top and bottom leads to position them properly relative to the board center
  • Updated the example to demonstrate the corrected layout with a different lead count configuration

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/stampboard.tsx Fixed x-coordinate calculations for right/left leads and y-coordinate calculations for top/bottom leads to correct hole and pad orientation
examples/stampboard.example.tsx Updated lead counts and footprint name to demonstrate the corrected layout

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Please add test for this.

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

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

can you improve the camera, maybe add a second view preset like "top_angled" that presents a more "top" view (but not completely the top, just a slight angled)

@rushabhcodes rushabhcodes merged commit 80fd25f into tscircuit:main Feb 2, 2026
6 checks passed
@rushabhcodes rushabhcodes deleted the fix-stampboard branch February 2, 2026 13:45
@tscircuitbot
Copy link


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.

The orientation of holes in stampboard is not correct

5 participants