Skip to content

feat: merge same-net trace lines by enabling rail alignment in default operations#684

Open
singularitycurse26-svg wants to merge 1 commit into
tscircuit:mainfrom
singularitycurse26-svg:merge-same-net-traces
Open

feat: merge same-net trace lines by enabling rail alignment in default operations#684
singularitycurse26-svg wants to merge 1 commit into
tscircuit:mainfrom
singularitycurse26-svg:merge-same-net-traces

Conversation

@singularitycurse26-svg

Copy link
Copy Markdown

Summary

Enables same-net trace line merging by adding aligning_same_net_rails to the DEFAULT_OPERATIONS in TraceCleanupSolver.

Problem

Same-net trace lines that run close together but at slightly different Y or X coordinates were not being aligned during the first cleanup pass. The aligning_same_net_rails operation existed but was only used in the second cleanup pass (traceCleanupSolver2), which has restricted eligibility.

Solution

Add aligning_same_net_rails to DEFAULT_OPERATIONS so that same-net trace lines get aligned to the same Y or X coordinate during the first cleanup pass, making parallel same-net traces share a common coordinate.

Changes

  • lib/solvers/TraceCleanupSolver/TraceCleanupSolver.ts: Added "aligning_same_net_rails" to DEFAULT_OPERATIONS
  • tests/solvers/TraceCleanupSolver/mergeSameNetTraces.test.ts: Added tests verifying same-net traces get aligned to the same coordinate

Closes #34

/claim #34

…t operations

Add 'aligning_same_net_rails' to DEFAULT_OPERATIONS in TraceCleanupSolver
so same-net trace lines that are close together get aligned to the same
Y or X coordinate during the first cleanup pass.

Previously this operation was only run in the second cleanup pass
(traceCleanupSolver2), meaning traces could remain unaligned after the
first pass if the second pass didn't run or had restricted eligibility.

Closes tscircuit#34

/claim tscircuit#34
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
schematic-trace-solver Ready Ready Preview, Comment Jul 19, 2026 8:19am

Request Review

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.

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

1 participant