Skip to content

feat: implement linear layout for decoupling capacitor partitions#115

Open
Ojas2095 wants to merge 1 commit into
tscircuit:mainfrom
Ojas2095:fix-decap-linear-layout
Open

feat: implement linear layout for decoupling capacitor partitions#115
Ojas2095 wants to merge 1 commit into
tscircuit:mainfrom
Ojas2095:fix-decap-linear-layout

Conversation

@Ojas2095
Copy link
Copy Markdown

Summary

Closes #12
Closes #15
Closes #11

This PR implements a custom linear layout logic for decoupling_caps partitions in SingleInnerPartitionPackingSolver.ts.

Previously, PackSolver2 was used for all partition types, resulting in haphazard layouts for decoupling capacitors which are often better arranged linearly alongside their target IC.

Changes

  • Implemented createLinearLayout() to position components aligned linearly.
  • Added a condition in _step() to use createLinearLayout() if partitionType === "decoupling_caps".

This directly fixes the bad layout reproduction shown in #11 by properly orienting decoupling cap partitions in a tidy stack, allowing subsequent solvers to place this tidy group flush with the IC.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specialized Layout for Decoupling Capacitors Propose/implement a solution to bad layout

1 participant