fix: remove extra trace lines from post-processing step#121
Open
makaiachildress-web wants to merge 1 commit intotscircuit:mainfrom
Open
fix: remove extra trace lines from post-processing step#121makaiachildress-web wants to merge 1 commit intotscircuit:mainfrom
makaiachildress-web wants to merge 1 commit intotscircuit:mainfrom
Conversation
Add duplicate consecutive point removal to UntangleTraceSubsolver._applyBestRoute() and enhance simplifyPath with duplicate point preprocessing. When _applyBestRoute() concatenates path segments after rerouting L-shaped corners, the junction points can produce duplicate consecutive coordinates that render as zero-length extra trace segments in the schematic output. Changes: - UntangleTraceSubsolver: remove duplicate consecutive points after path concatenation - simplifyPath: add removeDuplicateConsecutivePoints preprocessing before collinear removal - Add 9 unit tests for simplifyPath covering duplicates, collinear, and combined cases - Add NE555+J1 connector integration test verifying clean trace paths All 59 existing tests pass with zero snapshot regressions. /claim tscircuit#78 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #78
When
UntangleTraceSubsolver._applyBestRoute()reroutes L-shaped corners, it concatenates path segments:This can produce duplicate consecutive points at the junctions (where the old path meets the rerouted segment), which render as zero-length extra trace line segments in the schematic output.
Fix
UntangleTraceSubsolver: AddedremoveDuplicateConsecutivePoints()after path concatenation in_applyBestRoute()to strip duplicate junction pointssimplifyPath: Enhanced with duplicate consecutive point preprocessing before the existing collinear point removalKey difference from prior PRs (#100, #119)
Those PRs applied the full
simplifyPath(including collinear removal) in_applyBestRoute(), which changed the timing of path simplification relative to downstreamminimizeTurnsandbalanceZShapes— causing the example29 snapshot to change. This was seen as a regression.This PR applies only duplicate point removal in
_applyBestRoute(), which is the minimal fix needed. Collinear simplification still happens at the correct time downstream. Zero existing snapshots change.Tests
simplifyPathcovering duplicates, collinear points, and combined casesexample_issue78): NE555 timer circuit with J1 connector andmaxMspPairDistance=6, verifying all trace paths are clean (no duplicates, no collinear intermediate points)/claim #78
🤖 Generated with Claude Code
AI Disclosure: This PR was developed using Claude Code (claude-opus-4-6). All code was reviewed and tested before submission.