Skip to content

feat: merge same-net collinear traces#203

Open
Angelebeats wants to merge 4 commits intotscircuit:mainfrom
Angelebeats:feat-merge-same-net-traces
Open

feat: merge same-net collinear traces#203
Angelebeats wants to merge 4 commits intotscircuit:mainfrom
Angelebeats:feat-merge-same-net-traces

Conversation

@Angelebeats
Copy link
Copy Markdown

This PR implements merging of same-net traces that are collinear and touching at endpoints.

Changes

  • Enhanced mergeSameNetTraces to detect and combine collinear segments sharing an endpoint.
  • Added a snapping phase to align segments that are slightly off due to rounding errors before merging.
  • Uses simplifyTracePath to clean up the resulting merged paths.

Verification

Verified with ests/repro_issue_34.test.ts where two collinear 10-unit segments are merged into a single 20-unit segment.

Closes #34. /claim #34

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 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 Apr 22, 2026 1:39pm

Request Review

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.

Merge same-net trace lines that are close together (make at the same Y or same X)

1 participant