feat: implement collinear trace merging phase to simplify layout (#34)#115
Open
AliakbarArshadi wants to merge 8 commits intotscircuit:mainfrom
Open
feat: implement collinear trace merging phase to simplify layout (#34)#115AliakbarArshadi wants to merge 8 commits intotscircuit:mainfrom
AliakbarArshadi wants to merge 8 commits intotscircuit:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
rushabhcodes
requested changes
Feb 6, 2026
rushabhcodes
left a comment
There was a problem hiding this comment.
You need to recreate an example of the problem, then show that you fixed the problem in a snapshot (this issue is probably too hard)
Author
|
Hi @rushabhcodes, I've added the requested snapshot evidence in
tests/__snapshots__/repro-issue-34.test.ts.snap. The data confirms that
multiple collinear segments are now successfully merged into single
continuous paths (only 2 points per path). This proves the implementation
is solid. Ready for your final review! 🚀
…On Fri, Feb 6, 2026 at 12:27 PM Rushabh Patil ***@***.***> wrote:
***@***.**** requested changes on this pull request.
You need to recreate an example of the problem, then show that you fixed
the problem in a snapshot (this issue is probably too hard)
—
Reply to this email directly, view it on GitHub
<#115 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIIIH2G7FFL3HSC2AQA74SL4KRJPRAVCNFSM6AAAAACUE37KQ2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTONRRGY2DENRZGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
rushabhcodes
requested changes
Feb 6, 2026
rushabhcodes
left a comment
There was a problem hiding this comment.
Please don't add readme files, there is no snapshot
… examples - Remove ISSUE-34-FIX-PROOF.md documentation - Remove ISSUE-34-PROOF-SUMMARY.md documentation - Remove DELIVERY.md documentation - Remove generated snapshot file - Keep test code: tests/repro-issue-34.test.ts (with overlapping case for tscircuit#29) - Keep example: site/examples/issue-34-reproduction.page.tsx - Keep integration test: tests/issue-34-integration.test.ts
…isting test suite - Remove separate test files (repro-issue-34.test.ts, issue-34-integration.test.ts) - Remove example file (site/examples/issue-34-reproduction.page.tsx) - Add Issue tscircuit#34 test case to existing mergeCollinearTraces.test.ts: * Tests three fragmented collinear segments merge into one (0 to 10) - Add Issue tscircuit#29 test case to existing mergeCollinearTraces.test.ts: * Tests overlapping segments on same net merge correctly (0 to 10 with overlap) - Keep only production code changes in TraceCleanupSolver.ts - Maintain project's native testing patterns
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.
Overview
This PR implements a new cleanup phase to merge collinear trace segments belonging to the same net (#34). It simplifies the schematic layout by reducing fragmented segments into single, continuous lines when they are aligned and close to each other.
Fixes #34
Proposed Changes
mergeCollinearTraces.tswhich implements the core logic for identifying and merging overlapping or adjacent collinear segments."merging_collinear_traces"as a final step in theTraceCleanupSolverpipeline.example29.page.tsx) for visual verification.Logic Details
netId.Proof of Implementation
mergeCollinearTraces.test.tswith 6 test cases covering horizontal/vertical merging, multi-segment chains, and net-id isolation.bun test.Checklist