Skip to content

fix: add same-net trace junction phase#363

Open
RYB-404 wants to merge 2 commits into
tscircuit:mainfrom
RYB-404:fix/same-net-segment-junctions-29
Open

fix: add same-net trace junction phase#363
RYB-404 wants to merge 2 commits into
tscircuit:mainfrom
RYB-404:fix/same-net-segment-junctions-29

Conversation

@RYB-404
Copy link
Copy Markdown

@RYB-404 RYB-404 commented May 17, 2026

Closes #29

Summary

  • Adds a focused SameNetTraceJunctionSolver pipeline phase after trace cleanup.
  • Snaps trace endpoints to nearby same-net axis-aligned segments and inserts a junction point into the target trace.
  • Preserves existing trace objects/metadata instead of collapsing traces together, so downstream label placement and pin metadata remain stable.

Why this approach

There are already broader attempts for this bounty. This PR keeps the change small and non-destructive: it connects close same-net segments by sharing a concrete point, without deleting traces or changing unrelated solver phases.

Tests

  • Added coverage for same-net endpoint snapping/junction insertion.
  • Added coverage that close different-net segments are not modified.

Local verification

  • npx @biomejs/biome@2.2.2 format --write ...
  • git diff --check

Could not run Bun tests locally because bun is not installed in this Windows environment. npm install --legacy-peer-deps --no-package-lock also failed while installing sharp due to ENOSPC/native build prerequisites, so I left dependency artifacts out of the PR.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 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 17, 2026 5:28am

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.

New Phase To combine same-net trace segments that are close together

1 participant