/claim #78

Root Cause

SchematicTraceLinesSolver solves each MSP connection pair independently. When two pairs in the same net share a pin, both route through the same physical segment near that shared endpoint — producing “extra trace lines” in the rendered schematic.

Fix

1. Cross-trace deduplication — removeNetSegmentDuplicates.ts (new)

Groups traces by net, finds segments that appear in more than one trace, and trims those redundant endpoint segments from later traces. The net remains visually connected through the first trace that claimed the segment.

Applied as input preprocessing in the TraceCleanupSolver constructor so all downstream cleanup steps (turn minimization, Z-shape balancing) operate on clean data from the start.

2. Within-trace deduplication — simplifyPath.ts

Added removeDuplicateConsecutivePoints called at the top of simplifyPath. This removes zero-length segments that UntangleTraceSubsolver can introduce at path-concatenation junctions.

Tests

  • 4 new unit tests in tests/solvers/TraceCleanupSolver/removeNetSegmentDuplicates.test.ts
  • Full pipeline regression test using OverlapAvoidanceStepSolver fixture asserting zero duplicate segments
  • Updated snapshots for examples 02, 13, 15 (now show cleaner trace output)
  • All 53 tests pass ✅

Claim

Total prize pool $75
Total paid $0
Status Pending
Submitted March 11, 2026
Last updated March 11, 2026

Contributors

NI

Nicolas Rozas

@Nicolas-Rozas

100%

Sponsors

TS

tscircuit

@tscircuit

$75