Skip to content

Support multiple PCB contacts for one logical port#2144

Open
ShiboSoftwareDev wants to merge 3 commits intotscircuit:mainfrom
ShiboSoftwareDev:main
Open

Support multiple PCB contacts for one logical port#2144
ShiboSoftwareDev wants to merge 3 commits intotscircuit:mainfrom
ShiboSoftwareDev:main

Conversation

@ShiboSoftwareDev
Copy link
Copy Markdown
Contributor

Allows a single logical port to own multiple non-overlapping PCB pads or plated holes, so composite terminals like battery clips can route through any matching contact instead of being treated as ambiguous.

Adds per-contact pcb_port tracking on Port, attaches pads/holes to their specific PCB port, and updates trace-by-trace routing to choose the closest PCB contact candidate.

Updates footprint port matching to prefer raw pin hints like pin1 over aliases, and moves true multi-logical-port selector
ambiguity detection into trace port resolution.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 16, 2026

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

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Apr 16, 2026 5:35pm

Request Review

}

private _getMatchedPcbPortId(): string | undefined {
return this.matchedPort?.getPcbPortIdForMatchedComponent(this) ?? undefined
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.

too confusing

Copy link
Copy Markdown
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

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

a port has multiple port ids? No way- we would never be able to maintain this

@seveibar
Copy link
Copy Markdown
Contributor

This is not an easy problem to solve but we also can't hack it- otherwise we will never be able to fix this codebase. There are other solutions, for example introducing the concept of "internally connected ports"

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.

2 participants