Skip to content

Fix short schematic trace routing#638

Open
mohan-bee wants to merge 19 commits into
tscircuit:mainfrom
mohan-bee:fix-short
Open

Fix short schematic trace routing#638
mohan-bee wants to merge 19 commits into
tscircuit:mainfrom
mohan-bee:fix-short

Conversation

@mohan-bee

@mohan-bee mohan-bee commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Very short schematic connections between nearby pins could route with unnecessary elbow overshoot, or fail entirely when one endpoint sat slightly inside a neighboring component's obstacle — causing a fallback net label to appear instead of a short trace.

Change

Add a short-distance path case in SchematicTraceSingleLineSolver2, checked before elbow routing (gated by MAX_SHORT_TRACE_DISTANCE).
Normal-distance traces are unaffected — they still go through the existing elbow/collision search path.

BEFORE:

image

AFTER:

image

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
schematic-trace-solver Ready Ready Preview, Comment Jul 8, 2026 4:29pm

Request Review

@mohan-bee mohan-bee marked this pull request as ready for review July 8, 2026 14:25

@MustafaMulla29 MustafaMulla29 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we need this(this feels like over-engineering), I feel like its a placement issue. Is that inductor manually placed or auto placed?

@seveibar seveibar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you moce this logic inside the schematic trace solver? Algorithms dont belong in core- it makes it hard to send reproductions to the algo repo

@mohan-bee

mohan-bee commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

I dont think we need this(this feels like over-engineering), I feel like its a placement issue. Is that inductor manually placed or auto placed?

inductor is placed manually,, but if feel like having a four unnecessary netlabels that is making a complete mess... , actually schematic-trace-solver is not handling the short distance connection, it fall backs to netlabel, why when two components placed so close having netlabel is won't be good ig,

@MustafaMulla29

Comment thread package.json Outdated

@seveibar seveibar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Dont clutter classes with instance methods that dont need to be instance methods (no state or primarily not state mutating)
  2. Proof that this works? I dont see it in the snapshot working

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.

3 participants