Fix extra trace lines in post-processing step#100
Fix extra trace lines in post-processing step#100lamb356 wants to merge 5 commits intotscircuit:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This fixes issue #100. The simplifyPath() function now removes duplicate consecutive points after untangling routes. Here's the visual diff showing the fix: |
|
nop, it's regressing. You could recreate the example from the issue and add it as a test case, and then try to solve it. |
|
Hi @techmannih, I tried to find issue #100 but: schematic-trace-solver/issues/100 returns 404 Could you link me to the specific issue with the example you'd like me to add as a test case? |


/claim #78
Problem
Extra trace lines were appearing in schematic diagrams after the post-processing step.
Root Cause
In
UntangleTraceSubsolver._applyBestRoute(), when replacing an L-shaped corner with a new route, the function was directly concatenating path segments without simplifying them. This could leave redundant collinear points or duplicate consecutive points.Solution
simplifyPathimmediately after rerouting - Added call tosimplifyPath()in_applyBestRoute()simplifyPathto handle duplicate points - Added preprocessing step to remove duplicate consecutive pointssimplifyPathFiles Changed
lib/solvers/TraceCleanupSolver/sub-solver/UntangleTraceSubsolver.tslib/solvers/TraceCleanupSolver/simplifyPath.tstests/functions/simplifyPath.test.ts(new)tests/examples/__snapshots__/example29.snap.svg(updated)Test Results
All 57 tests pass ✓
