Fix hole orientation in StampBoard component#264
Fix hole orientation in StampBoard component#264rushabhcodes merged 3 commits intotscircuit:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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.
seveibar
left a comment
There was a problem hiding this comment.
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)
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
This pull request updates the calculation of pad and hole positions in the
StampBoardcomponent 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:xpositions for right and left leads, swapping the sign and side to ensure pads and holes are placed on the correct board edges. [1] [2]ypositions 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:
stampboard.example.tsxto use the new lead counts and footprint name, ensuring the demo matches the corrected layout.Before
After
/fix #263