Skip to content

feat: add SameNetTraceMergeSolver to merge close same-net trace segments#159

Open
drmabus wants to merge 2 commits intotscircuit:mainfrom
drmabus:same-net-trace-merge
Open

feat: add SameNetTraceMergeSolver to merge close same-net trace segments#159
drmabus wants to merge 2 commits intotscircuit:mainfrom
drmabus:same-net-trace-merge

Conversation

@drmabus
Copy link
Copy Markdown

@drmabus drmabus commented Apr 4, 2026

Closes #29

Adds SameNetTraceMergeSolver to merge close same-net trace segments.

Changes

  • Introduced SameNetTraceMergeSolver
  • Groups traces by globalConnNetId
  • Merges close parallel overlapping segments
  • Simplifies paths using simplifyPath
  • Inserted into pipeline after traceOverlapShiftSolver and before netLabelPlacementSolver

Why
Improves routing cleanliness and reduces redundant trace segments in the solver output.

Validation

  • npm run build
  • npm run format:check

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 4, 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 4, 2026 0:30am

Request Review

Copy link
Copy Markdown

@rushabhcodes rushabhcodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add snapshot proof

@drmabus
Copy link
Copy Markdown
Author

drmabus commented Apr 4, 2026

Added snapshot proof.

Snapshot:

After

The SameNetTraceMergeSolver improves merging of close same net segments internally. The effect is more evident in test validation rather than large visual differences in this example.

Validation:

  • bun test tests/examples/example29.test.ts
  • bun test

Both are passing, including example29 which previously failed due to over merging.

@drmabus drmabus requested a review from rushabhcodes April 4, 2026 16:02
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.

New Phase To combine same-net trace segments that are close together

2 participants