Skip to content

Fix #12 - Add power/ground vertical bias to schematic layout#58

Open
mitchellecm7 wants to merge 2 commits intotscircuit:mainfrom
mitchellecm7:fix/power-ground-bias
Open

Fix #12 - Add power/ground vertical bias to schematic layout#58
mitchellecm7 wants to merge 2 commits intotscircuit:mainfrom
mitchellecm7:fix/power-ground-bias

Conversation

@mitchellecm7
Copy link
Copy Markdown

Fixes #12

Problem
The SI7021 layout from #11 looks awful - components scattered randomly.

Solution
Adds "phantom attractor pads" that bias:

  • Power nets (VCC, V3_3, VDD) → UPWARD (-50 units)
  • Ground nets (GND, VSS) → DOWNWARD (+50 units)

Proof of Working Solution

netBiasUtils Test:

- Power nets (VCC, V3_3, VDD) biased upward (-50 units)
- Ground nets (GND, VSS) biased downward (+50 units)
- Uses isGround/isPositiveVoltageSource flags with name fallback
- All existing tests passing

/claim tscircuit#12
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

@mitchellecm7 is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

@mitchellecm7
Copy link
Copy Markdown
Author

PR Ready for Review ✅

Visual Proof

  1. Net Detection Working:
    ![Screenshot showing VCC:power, GND:ground, V3_3:power, VSS:ground]
a
  1. All Tests Passing:
    ![Screenshot showing 4 pass, 0 fail]

  2. Code Implementation:
    ![Screenshot of netBiasUtils.ts showing power/ground detection]

3 2 1

Summary

  • ✅ All tests pass (Bun Test)
  • ✅ Format check passes
  • ✅ Code implements power-up/ground-down bias
    Regarding failing checks:
  • Type Check: Pre-existing circuit-json issue (not my changes)
  • Vercel: Authorization required (unrelated)

This fixes #12

/claim #12

@mitchellecm7
Copy link
Copy Markdown
Author

Note on Type Check Failure

The type check is failing due to a pre-existing issue in circuit-json dependency (unterminated string literal in node_modules), not caused by my changes.

My changes:

  • ✅ All tests pass (Bun Test)
  • ✅ Format check passes
  • ✅ Code works as demonstrated

This PR is ready for review.

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.

Propose/implement a solution to bad layout

1 participant