-
Notifications
You must be signed in to change notification settings - Fork 42
Fix extra trace lines in post-processing step #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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 ✓
