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 that have direct connections (traces).
// Nets connected solely via netConnections (net labels) should not
// produce MSP pairs – they receive net labels instead of traces.
const directNetIds = new Set(Object.keys(directConnMap.netMap))
this.queuedDcNetIds = Object.keys(netConnMap.netMap).filter((netId) => {
// A net qualifies for tracing if at least one of its pins appears
// in the direct-connection map under the same global net.
const allIds = netConnMap.getIdsConnectedToNet(netId) as string[]
const pins = allIds.filter((id) => !!this.pinMap[id])
return pins.some((pinId) => {
const dcNet = directConnMap.getNetConnectedToId(pinId)
return dcNet != null && directNetIds.has(dcNet)
})
})
}

override getConstructorParams(): ConstructorParameters<
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@react-hook/resize-observer": "^2.0.2",
"@tscircuit/math-utils": "^0.0.19",
"@types/bun": "^1.2.21",
"bun-match-svg": "^0.0.13",
"bun-match-svg": "^0.0.15",
"calculate-elbow": "^0.0.12",
"connectivity-map": "^1.0.0",
"flatbush": "^4.5.0",
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