Skip to content

feat: merge collinear same-net trace lines on same X or Y axis#128

Open
noorbalaum wants to merge 1 commit intotscircuit:mainfrom
noorbalaum:fix/merge-same-net-trace-lines
Open

feat: merge collinear same-net trace lines on same X or Y axis#128
noorbalaum wants to merge 1 commit intotscircuit:mainfrom
noorbalaum:fix/merge-same-net-trace-lines

Conversation

@noorbalaum
Copy link

@noorbalaum noorbalaum commented Mar 13, 2026

/claim #34

Fixes #34

Trace lines on the same net that land on the same X or Y axis were staying as separate segments instead of being one clean line. This adds a merge step to fix that.

What I did

  • Added mergeSameNetTraceLines in merge-same-net-trace-lines.ts
  • Groups trace lines by net, then merges any that are collinear and overlapping or touching on the same axis
  • Plugged it into the pipeline right after SchematicTraceLinesSolver finishes
  • Added a test to cover the merge behavior ✅

Tested

  • bun test tests/functions/merge-same-net-trace-lines.test.ts
  • tsc --noEmit
  • biome check on changed files ✅

@vercel
Copy link

vercel bot commented Mar 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 Mar 13, 2026 3:30pm

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