Skip to content

fix: merge same-net collinear traces (#34)#180

Open
a25955813-cloud wants to merge 5 commits intotscircuit:mainfrom
a25955813-cloud:fix/merge-same-net-traces-34
Open

fix: merge same-net collinear traces (#34)#180
a25955813-cloud wants to merge 5 commits intotscircuit:mainfrom
a25955813-cloud:fix/merge-same-net-traces-34

Conversation

@a25955813-cloud
Copy link
Copy Markdown

@a25955813-cloud a25955813-cloud commented Apr 13, 2026

Fixes #34

What this does

Merges collinear trace segments that belong to the same net and share the same X or Y coordinate into a single segment.

Changes

  • Added lib/utils/mergeCollinearTraces.ts — core merge algorithm
  • Added lib/solvers/SameNetTraceMergeSolver.ts — solver class
  • Added tests/merge-collinear-traces.test.ts — 8 passing tests

How it works

  1. Groups segments by net ID
  2. Separates horizontal/vertical/diagonal segments
  3. Merges overlapping or touching segments on the same axis
  4. Leaves diagonal segments untouched

/attempt #34
/claim #34

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 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 13, 2026 9:39am

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)

2 participants