Skip to content

fix: remove duplicate points causing extra trace lines in post-processing#183

Open
inventelpk-cell wants to merge 1 commit intotscircuit:mainfrom
inventelpk-cell:fix-extra-trace-lines-postprocessing
Open

fix: remove duplicate points causing extra trace lines in post-processing#183
inventelpk-cell wants to merge 1 commit intotscircuit:mainfrom
inventelpk-cell:fix-extra-trace-lines-postprocessing

Conversation

@inventelpk-cell
Copy link
Copy Markdown

Summary

Fixes extra/overlapping trace lines caused by consecutive duplicate points (zero-length segments) in post-processing.

Root cause:

  1. simplifyPath() merged collinear segments but did not remove consecutive duplicate points
  2. _applyBestRoute() in UntangleTraceSubsolver produced duplicate points when splicing rerouted segments

Fix:

  • Added removeDuplicatePoints() in simplifyPath.ts to strip consecutive identical points
  • Applied dedup at splice site in UntangleTraceSubsolver._applyBestRoute()

Closes #78

Test plan

  • All 49 tests pass (0 failures)
  • No regressions in existing trace rendering

…sing

Added removeDuplicatePoints() in simplifyPath.ts to strip consecutive
identical points (zero-length segments). Applied dedup at splice site
in UntangleTraceSubsolver._applyBestRoute() to prevent duplicates
introduced during rerouting.

Closes tscircuit#78
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 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 Apr 13, 2026 1:14pm

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.

Fix extra trace lines in post-processing step

2 participants