Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion lib/solvers/MspConnectionPairSolver/MspConnectionPairSolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,20 @@ export class MspConnectionPairSolver extends BaseSolver {
}
}

this.queuedDcNetIds = Object.keys(netConnMap.netMap)
// Only queue nets where at least one pin appears in a directConnection.
// Nets that exist solely via netConnections (net labels like VCC/GND with no
// direct wire) should not generate routed traces — the net label itself
// represents the electrical connection.
const directlyWiredPinIds = new Set<string>()
for (const dc of inputProblem.directConnections) {
for (const pid of dc.pinIds) {
directlyWiredPinIds.add(pid)
}
}
this.queuedDcNetIds = Object.keys(netConnMap.netMap).filter((netId) => {
const connectedIds = netConnMap.getIdsConnectedToNet(netId) as string[]
return connectedIds.some((id) => directlyWiredPinIds.has(id))
})
}

override getConstructorParams(): ConstructorParameters<
Expand Down
9 changes: 6 additions & 3 deletions tests/examples/__snapshots__/example01.snap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 30 additions & 30 deletions tests/examples/__snapshots__/example12.snap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading