Skip to content

feat: Add SameNetTraceMergeSolver for issue #29#197

Open
Wong789 wants to merge 4 commits intotscircuit:mainfrom
Wong789:fix/issue-29-same-net-trace-merge
Open

feat: Add SameNetTraceMergeSolver for issue #29#197
Wong789 wants to merge 4 commits intotscircuit:mainfrom
Wong789:fix/issue-29-same-net-trace-merge

Conversation

@Wong789
Copy link
Copy Markdown

@Wong789 Wong789 commented Apr 18, 2026

/claim #29

Summary

This PR implements a new pipeline phase (SameNetTraceMergeSolver) that combines same-net trace segments that are close together, as described in issue #29.

Changes

  1. New Solver: lib/solvers/SameNetTraceMergeSolver/SameNetTraceMergeSolver.ts

    • Identifies parallel segments (same direction, within GAP_THRESHOLD of 0.15)
    • Merges segments that share the same mspPairId
    • Runs as a new phase after raceCleanupSolver
  2. Pipeline Integration: Updated SchematicTracePipelineSolver.ts

    • Added sameNetTraceMergeSolver step after raceCleanupSolver
    • The solver processes traces after cleanup and before final label placement
  3. Tests: lib/solvers/SameNetTraceMergeSolver/SameNetTraceMergeSolver.test.ts

    • Tests for merging parallel same-net traces within gap threshold
    • Tests ensuring different nets are not merged

How It Works

The solver:

  1. Extracts segments from all traces
  2. Groups parallel segments (horizontal or vertical) that are within GAP_THRESHOLD (0.15)
  3. For segments that share the same mspPairId, combines them into a single longer segment
  4. Returns the merged trace set

Bounty

This PR claims the ** bounty** for issue #29 (New Phase To combine same-net trace segments that are close together).

Wong789 added 3 commits April 18, 2026 13:10
Add new pipeline phase to merge same-net trace segments that are close together.
This solver identifies parallel segments belonging to the same net and merges
them when they are within the GAP_THRESHOLD distance.
This commit adds the SameNetTraceMergeSolver as a new pipeline phase
after traceCleanupSolver to merge same-net trace segments that are
close together (within GAP_THRESHOLD of 0.15).
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

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

Project Deployment Actions Updated (UTC)
schematic-trace-solver Error Error Apr 18, 2026 6:03am

Request Review

@Wong789
Copy link
Copy Markdown
Author

Wong789 commented Apr 19, 2026

Hi @seveibar, my Vercel preview deployment seems to be failing (dpl_HgCtUaNweHs5cxoJ8pcmKbLRMaPg). I don't have access to the Vercel dashboard to check the logs. Could you help investigate, or is there anything I can do from my side to fix this? Thank you!

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.

1 participant