fix: resolve #34 — This PR addresses issue #34 by implementing a heuristic to align closely#263
Closed
Ingenieralejo wants to merge 8 commits intotscircuit:mainfrom
Closed
fix: resolve #34 — This PR addresses issue #34 by implementing a heuristic to align closely#263Ingenieralejo wants to merge 8 commits intotscircuit:mainfrom
Ingenieralejo wants to merge 8 commits intotscircuit:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…cuit#34) - Add alignSameNetTraces heuristic that clusters horizontal/vertical segments within 0.3-unit threshold and shifts them to the median Y/X coordinate, reducing visual noise in dense schematic layouts. - Integrate alignment step into TraceCleanupSolver pipeline between untangling and minimizing_turns phases. - Only modify internal trace segments to preserve pin connections and orthogonal routing constraints. - Add reproduction test (issue-34-alignment.test.ts) with dual-chip obstacle scenario. - Update 8 example snapshots to reflect improved alignment geometry. Closes tscircuit#34
ba29670 to
77e6683
Compare
Author
Author
1 similar comment
Author
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
Resolves #34.
Changes
lib/solvers/TraceCleanupSolver/alignSameNetTraces.ts: Updated to address the issue requirementslib/solvers/TraceCleanupSolver/TraceCleanupSolver.ts: Updated to address the issue requirementstests/issue-34-alignment.test.ts: Updated to address the issue requirementstests/__snapshots__/issue-34-alignment.snap.svg: Updated to address the issue requirementstests/examples/__snapshots__/example02.snap.svg: Updated to address the issue requirementstests/examples/__snapshots__/example15.snap.svg: Updated to address the issue requirementstests/examples/__snapshots__/example18.snap.svg: Updated to address the issue requirementstests/examples/__snapshots__/example19.snap.svg: Updated to address the issue requirementstests/examples/__snapshots__/example20.snap.svg: Updated to address the issue requirementstests/examples/__snapshots__/example21.snap.svg: Updated to address the issue requirementstests/examples/__snapshots__/example28.snap.svg: Updated to address the issue requirementstests/examples/__snapshots__/example29.snap.svg: Updated to address the issue requirementsVerification
Context
This PR addresses issue #34 by implementing a heuristic to align closely situated trace segments of the same net.
Changes:
alignSameNetTracesheuristic that clusters horizontal/vertical segments within a 0.3-unit threshold and shifts them to their median coordinate.TraceCleanupSolverpipeline (after untangling and before turn minimization).