Skip to content

fix: remove extra net label in repro61 by refining placement logic based on global connectivity#361

Open
pon024587-collab wants to merge 2 commits into
tscircuit:mainfrom
pon024587-collab:fix/repro61-extra-label-79
Open

fix: remove extra net label in repro61 by refining placement logic based on global connectivity#361
pon024587-collab wants to merge 2 commits into
tscircuit:mainfrom
pon024587-collab:fix/repro61-extra-label-79

Conversation

@pon024587-collab
Copy link
Copy Markdown

Summary

This PR fixes schematic-trace-solver#79 where redundant net labels were being placed even when components were already physically connected via traces or directConnections.

Changes

  • Modified NetLabelPlacementSolver.ts to differentiate between "globally connected" pins and "physically connected components" (those connected by traces/direct connections).
  • Introduced a check to only place a net label if a component is part of a global net but is not yet physically connected to all other parts of that net.
  • If a global net consists of only one physically connected component (like in repro61), the redundant net labels are now skipped.

Testing

Created a new test suite tests/solvers/SchematicTracePipelineSolver/repro61_extra_label.test.ts which covers:

  • Connected case: Verifies that 0 net labels are placed when a directConnection exists between pins on the same net.
  • Disconnected case: Verifies that net labels are correctly placed when no physical connection exists between pins on the same net.
  • Verified that existing tests (repro01, svg.test.ts) still pass.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
schematic-trace-solver Ready Ready Preview, Comment May 16, 2026 8:50pm

Request 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.

Fix extra net label in repro61, or remove trace

1 participant