Skip to content

fix: Specialized Layout for Decoupling Capacitors#30

Open
GhadiSaab wants to merge 1 commit intotscircuit:mainfrom
GhadiSaab:fix/issue-15-bounty
Open

fix: Specialized Layout for Decoupling Capacitors#30
GhadiSaab wants to merge 1 commit intotscircuit:mainfrom
GhadiSaab:fix/issue-15-bounty

Conversation

@GhadiSaab
Copy link

This PR implements a specialized linear layout for decoupling capacitor partitions to make them less messy.

Changes

  • Added detection logic for partitionType === 'decoupling_caps'
  • Implemented createDecouplingCapsLayout() method with clean linear arrangement
  • Layout orientation (horizontal/vertical) based on chip aspect ratio
  • Consistent spacing using decouplingCapsGap with chipGap fallback
  • Deterministic ordering by sorting chips by ID
  • Results centered at (0, 0)
  • Added comprehensive tests

Testing

  • All existing tests pass (17 passing)
  • New tests added for decoupling caps layout functionality

Fixes #15

/claim #15

Implements createDecouplingCapsLayout() method to create clean linear
arrangements for decoupling capacitor partitions instead of messy layouts.

Changes:
- Added detection logic for partitionType === 'decoupling_caps'
- Implemented createDecouplingCapsLayout() with linear layout algorithm
- Layout orientation (horizontal/vertical) based on chip aspect ratio
- Consistent spacing using decouplingCapsGap or chipGap fallback
- Deterministic ordering by sorting chips by ID
- Centered result at (0, 0)
- Added tests for decoupling caps layout functionality

Fixes tscircuit#15
@vercel
Copy link

vercel bot commented Feb 6, 2026

@GhadiSaab 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.

Specialized Layout for Decoupling Capacitors

1 participant