Skip to content

Use active breakout bounds for copper pours - #3397

Open
ShiboSoftwareDev wants to merge 1 commit into
repro/active-breakout-copper-pour-boundsfrom
fix/active-breakout-copper-pour-bounds
Open

Use active breakout bounds for copper pours#3397
ShiboSoftwareDev wants to merge 1 commit into
repro/active-breakout-copper-pour-boundsfrom
fix/active-breakout-copper-pour-bounds

Conversation

@ShiboSoftwareDev

@ShiboSoftwareDev ShiboSoftwareDev commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • let SRJ construction select the active routing PCB group explicitly
  • replace only copper-pour obstacles at the shared custom-breakout phase boundary
  • preserve the phase's existing non-pour obstacles, connections, and already-routed traces
  • make the regression fixture expect the right breakout's pours at x = 10 instead of the left breakout's x = -10

Why this fix is needed

Outline-less unbroken pours are converted into rectangular routing obstacles. On a board with multiple custom breakouts, those rectangles must use the group being routed now; otherwise an autorouter can treat a sibling breakout as occupied copper while treating its own actual plane area as empty. That can make a route avoid a nonexistent obstacle or enter copper belonging to another net.

The phase-local correction belongs at Core's phased-routing handoff because the base SRJ deliberately remains board-wide and the active routingPcbGroupId is known only while a phase is being prepared. The substitution runs for every initial custom-breakout phase, not only connection-reroute phases. It regenerates the active group's pours and replaces just obstacles marked isCopperPour; all fixed component obstacles, phase connections, and prior routed traces remain exactly as selected by the existing phase filter.

This is a stacked, tested alternative to #3389. The competing PR's current placement inside isConnectionReroutePhase leaves ordinary custom breakout phases unfixed; the exact repro in the base PR exercises that missing path.

Test plan

  • bun test tests/breakout/active-breakout-copper-pour-bounds.test.tsx

  • bun test tests/utils/autorouting/simple-route-json-unbroken-copper-pour-obstacles.test.tsx tests/repros/repro-offset-board-copper-pour-bounds.test.tsx tests/subcircuits/subcircuit-exposed-nets-copper-pour01.test.tsx tests/subcircuits/subcircuit-exposed-nets-copper-pour02.test.tsx tests/breakout/custom-implicit-breakout-point-solver.test.tsx tests/breakout/active-breakout-copper-pour-bounds.test.tsx

  • bunx biome check lib/components/primitive-components/Group/Group.ts lib/utils/autorouting/getSimpleRouteJsonFromCircuitJson.ts tests/breakout/active-breakout-copper-pour-bounds.test.tsx

  • bunx tsc --noEmit (GitHub Actions)

@vercel

vercel Bot commented Aug 24, 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 24, 2026 4:38am

Request Review

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.

1 participant