feat: specialized linear layout for decoupling capacitor partitions#107
Open
voltrace-io wants to merge 1 commit into
Open
feat: specialized linear layout for decoupling capacitor partitions#107voltrace-io wants to merge 1 commit into
voltrace-io wants to merge 1 commit into
Conversation
Adds a dedicated horizontal row layout for partitions of type decoupling_caps in SingleInnerPartitionPackingSolver. Instead of using the generic PackSolver2, decoupling capacitors are arranged in a clean horizontal row, sorted by chipId for deterministic output, centered at the origin, with configurable gap via decouplingCapsGap. Addresses tscircuit#15 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
@voltrace-io is attempting to deploy a commit to the tscircuit Team on Vercel. A member of the Team first needs to authorize it. |
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
Replaces the generic
PackSolver2with a dedicated horizontal row layout for partitions of typedecoupling_capsinSingleInnerPartitionPackingSolver.Before: Decoupling capacitors are packed using the generic algorithm, which produces cluttered/chaotic arrangements.
After: Decoupling capacitors are arranged in a clean horizontal row:
Implementation
Only one source file changed —
SingleInnerPartitionPackingSolver.ts:partitionType === "decoupling_caps", the solver useslayoutDecouplingCapsLinear()instead ofPackSolver2chipId(lexicographic) for deterministic outputx=0, y=0decouplingCapsGap(falls back tochipGap, then0.2)ccwRotationDegrees=0(upright orientation)PackSolver2path unchanged for non-decoupling partitionsTests
6 new tests added, all passing:
decouplingCapsGapFull suite: 23 pass, 1 skip, 0 new failures.
Addresses #15
/claim #15
Review & Testing Checklist for Human
PackSolver2for decoupling capsPackSolver2pathbun test— all tests should pass (23 pass, 1 skip; the pre-existingIdentifyDecouplingCapsSolver06error is fromcircuit-to-svg)Notes
IdentifyDecouplingCapsSolver06.test.tsis caused by a missing export incircuit-to-svgand exists onmain— not related to this PR.