Skip to content

Fix overlap offset selection to minimize crossings#325

Open
theRadicalSoftware wants to merge 1 commit into
tscircuit:mainfrom
theRadicalSoftware:fix-overlap-offset-crossings
Open

Fix overlap offset selection to minimize crossings#325
theRadicalSoftware wants to merge 1 commit into
tscircuit:mainfrom
theRadicalSoftware:fix-overlap-offset-crossings

Conversation

@theRadicalSoftware
Copy link
Copy Markdown

Fixes #83

/claim #83

Summary

Updates TraceOverlapIssueSolver so overlapping parallel traces evaluate both offset
directions and choose the direction with fewer cross-net trace segment intersections.

This prevents the solver from picking a backward/suboptimal offset purely because of net
iteration order.

Also adds a focused regression test and updates affected SVG snapshots for the improved
routing output.

Tests

  • bun test - 58 pass, 4 skip, 0 fail
  • bunx tsc --noEmit
  • bun run format:check

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

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

Project Deployment Actions Updated (UTC)
schematic-trace-solver Ready Ready Preview, Comment May 12, 2026 11:23pm

Request Review

@theRadicalSoftware
Copy link
Copy Markdown
Author

Hi @seveibar, checking in on this when you have a chance.

All checks are passing, Algora picked up the /claim #83, and the patch includes a focused
regression test plus updated snapshots for the improved routing output.

Happy to adjust the offset heuristic or narrow the snapshot changes if you prefer a
different approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In the case of multiple overlaps on a parallel line, choose to offset to minimize crossings

1 participant