Skip to content

feat: specialized horizontal row layout for decoupling capacitor partitions#90

Open
adminlmz wants to merge 1 commit into
tscircuit:mainfrom
adminlmz:bounty/15-1778499631
Open

feat: specialized horizontal row layout for decoupling capacitor partitions#90
adminlmz wants to merge 1 commit into
tscircuit:mainfrom
adminlmz:bounty/15-1778499631

Conversation

@adminlmz
Copy link
Copy Markdown

Summary

When SingleInnerPartitionPackingSolver encounters a partition with partitionType === "decoupling_caps", this PR bypasses PackSolver2 and arranges capacitors in a clean horizontal row instead.

Changes

  • Added createDecouplingCapLayout() method to SingleInnerPartitionPackingSolver
  • Decoupling caps are placed in a single horizontal row with consistent 0° rotation
  • Even spacing using decouplingCapsGap (default 0.5mm)
  • Caps are centered around origin for clean alignment
  • General partitions still use PackSolver2 as before — no behavior change for non-decoupling partitions

Why this approach

The existing IdentifyDecouplingCapsSolver already identifies decoupling cap groups, and ChipPartitionsSolver already creates separate partitions with partitionType: "decoupling_caps". The missing piece was specialized packing logic for these partitions.

A horizontal row layout is the industry-standard approach for decoupling capacitors:

  • Clean, predictable placement
  • Easy to route power/ground traces
  • Matches the "official layout" shown in the issue

Testing

  • All 17 existing tests pass (1 skip, 1 pre-existing dependency error)
  • The LayoutPipelineSolver03 test (chip with multiple capacitors) passes successfully

Related

Closes #15

/claim #15

…itions

When SingleInnerPartitionPackingSolver encounters a partition with
partitionType === "decoupling_caps", bypass PackSolver2 and arrange
caps in a clean horizontal row instead.

Changes:
- Added createDecouplingCapLayout() method
- Caps are placed in a single row with consistent 0° rotation
- Even spacing using decouplingCapsGap (default 0.5)
- Centered around origin for clean alignment
- General partitions still use PackSolver2 as before

Closes tscircuit#15
@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

@adminlmz 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