Skip to content

Fix copper pour bounds for offset boards - #3178

Merged
seveibar merged 1 commit into
mainfrom
agent/fix-offset-board-copper-pour-bounds
Aug 13, 2026
Merged

Fix copper pour bounds for offset boards#3178
seveibar merged 1 commit into
mainfrom
agent/fix-offset-board-copper-pour-bounds

Conversation

@seveibar

Copy link
Copy Markdown
Contributor

Summary

  • derive the default copper-pour outline from the rendered pcb_board center, width, and height
  • preserve explicit copper-pour outlines and custom board outlines
  • add a visual regression test for a board centered away from the PCB origin

Root cause

When a rectangular board used boardAnchorPosition, the rendered pcb_board.center moved away from (0, 0). Copper-pour rendering left outline undefined, so the solver synthesized bounds as -width / 2 ... width / 2 and -height / 2 ... height / 2, ignoring the board center. The pour therefore stayed centered on the origin instead of following the board.

Impact

Automatic copper pours now follow rectangular boards whose center is offset, including boards positioned with boardAnchorPosition. Existing explicit pour and polygon board outlines remain authoritative.

Validation

  • regression reproduced before the fix: expected minimum X 11, received -9
  • 18 focused copper-pour tests passed
  • bunx tsc --noEmit
  • bun run build
  • Biome check on changed TypeScript files

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview Aug 13, 2026 10:06pm

Request Review

@seveibar
seveibar force-pushed the agent/fix-offset-board-copper-pour-bounds branch from 859f5e8 to 655cea2 Compare August 13, 2026 22:06
@seveibar
seveibar marked this pull request as ready for review August 13, 2026 22:10
@seveibar
seveibar merged commit 938109d into main Aug 13, 2026
17 checks passed
@seveibar
seveibar deleted the agent/fix-offset-board-copper-pour-bounds branch August 13, 2026 22:10
@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.

2 participants