Skip to content

feat: Specialized Linear Layout for Decoupling Capacitors#81

Open
watcharaponthod-code wants to merge 27 commits into
tscircuit:mainfrom
watcharaponthod-code:main
Open

feat: Specialized Linear Layout for Decoupling Capacitors#81
watcharaponthod-code wants to merge 27 commits into
tscircuit:mainfrom
watcharaponthod-code:main

Conversation

@watcharaponthod-code
Copy link
Copy Markdown

Summary

This PR implements a specialized linear layout for decoupling capacitors, as requested in #15.

Previously, decoupling capacitors were packed using the general PackSolver2, which often resulted in messy or overlapping layouts. I have introduced a dedicated createLinearDecouplingCapLayout method within SingleInnerPartitionPackingSolver that detects decoupling_caps partitions and arranges the capacitors in a clean, horizontal row centered at the origin.

Changes

  • Specialized Packing Logic: In SingleInnerPartitionPackingSolver.ts, I added an early-return check for decoupling_caps partitions to use the new linear layout instead of the general solver.
  • Deterministic Alignment: Capacitors are sorted by chipId and spaced using the decouplingCapsGap parameter.
  • New Test Suite: Added tests/DecouplingCapsPacking.test.ts to verify the mathematical correctness and alignment of the new layout.

Verification

  • Verified that the capacitors are perfectly aligned along the X-axis (y=0).
  • Verified that the row is correctly centered relative to the partition origin.
  • Confirmed that the spacing respects the decouplingCapsGap configuration.

/claim #15

@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

@watcharaponthod-code is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant