Add grouped same-net trace segment alignment#407
Open
blackblue1 wants to merge 1 commit into
Open
Conversation
The cleanup solver now runs a bounded alignment phase after untangling so close interior segments on the same net share the longest nearby axis before later simplification steps run. The phase leaves terminal segments anchored and rejects moves that would add chip, label, or different-net trace intersections. Constraint: Algora bounty issues tscircuit#29 and tscircuit#34 ask for close same-net trace segments to be combined/aligned without breaking pin attachments. Rejected: Move endpoint segments too | would detach traces from pins and labels. Rejected: Treat same-net traces as obstacles | would prevent the intended overlap/coalescing behavior. Confidence: medium Scope-risk: moderate Directive: Keep same-net alignment before turn minimization so later cleanup can simplify the adjusted paths. Tested: npx bun test Tested: npm exec --package typescript@5.9.3 -- tsc --noEmit Tested: npm run build Not-tested: Browser demo video capture in the Vercel/Cosmos UI.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
/claim #29
/claim #34
Summary
aligning_same_net_segmentsTraceCleanupSolver phase after untangling and before turn minimization.Proof / reproduction
AI assistance
This work was implemented with AI assistance and verified locally before submission.
Tests
npx biome check lib/solvers/TraceCleanupSolver/TraceCleanupSolver.ts lib/solvers/TraceCleanupSolver/alignSameNetTraceSegments.ts tests/solvers/TraceCleanupSolver/align-same-net-trace-segments.test.tsgit diff --checknpx bun test tests/solvers/TraceCleanupSolver/align-same-net-trace-segments.test.ts tests/solvers/TraceCleanupSolver tests/examples/example29.test.ts tests/examples/example34.test.tsnpm exec --package typescript@5.9.3 -- tsc --noEmitnpm run buildnpx bun test