Skip to content

fix(schematic): skip junction dots for different-net T-junctions (#2553)#2556

Open
rovidev95 wants to merge 3 commits into
tscircuit:mainfrom
rovidev95:fix/2553-junction-different-nets
Open

fix(schematic): skip junction dots for different-net T-junctions (#2553)#2556
rovidev95 wants to merge 3 commits into
tscircuit:mainfrom
rovidev95:fix/2553-junction-different-nets

Conversation

@rovidev95

Copy link
Copy Markdown

Summary

Fixes #2553

Different nets that meet at a T-junction were incorrectly getting schematic junction dots, making them look electrically connected.

computeJunctions now only creates endpoint junctions when both traces share the same connectivity_key. Crossings between different nets continue to be handled by computeCrossings() (is_crossing segments) without junction dots.

Changes

  • compute-junctions.ts: restrict endpoint junction blocks to same-net pairs
  • compute-junctions.test.ts: regression tests for same-net vs different-net T-junctions

Verification

bun test tests/components/primitive-components/Group/compute-junctions.test.ts
bun test tests/repros/repro51-overlap-junction-crossing.test.tsx

/attempt #2553

…ircuit#2553)

Endpoint junction logic in computeJunctions only applies within the same
connectivity_key. Different nets crossing at a T still get is_crossing
segments from computeCrossings, but no longer show a shared junction dot
that implies they are electrically connected.

Adds focused unit tests for same-net vs different-net T-junctions.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Jul 2, 2026 9:04am

Request Review

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

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.

Junction bug

1 participant