@tscircuit/schematic-trace-solver 0.0.192 → 0.0.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -5
- package/lib/solvers/UnroutedTraceRecoverySolver/UnroutedTraceRecoverySolver.ts +14 -3
- package/package.json +1 -1
- package/site/SchematicTracePipelineSolver/repro-core-vertical-passive-ground-label-overlap.page.tsx +4 -0
- package/site/SchematicTracePipelineSolver/repro173-boost-drv8711-ground-label-overlap.page.tsx +7 -0
- package/tests/bug-reports/bug-report-20260707T092615Z/__snapshots__/bug-report-20260707T092615Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260724T175257Z/__snapshots__/bug-report-20260724T175257Z.snap.svg +35 -35
- package/tests/examples/__snapshots__/example08.snap.svg +29 -29
- package/tests/examples/__snapshots__/example32.snap.svg +2 -2
- package/tests/examples/__snapshots__/example46.snap.svg +12 -21
- package/tests/repros/__snapshots__/board-1273-trace-overlap-cycle.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-core-vertical-passive-ground-label-overlap.snap.svg +135 -0
- package/tests/repros/__snapshots__/repro-esp12f-section.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-ina237-current-monitor.snap.svg +17 -17
- package/tests/repros/__snapshots__/repro-manual-placement-detour.snap.svg +249 -0
- package/tests/repros/__snapshots__/repro-netlabel-overlap-trace.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-pmp11282-isolated-dcdc.snap.svg +89 -98
- package/tests/repros/__snapshots__/repro173-boost-drv8711-ground-label-overlap.snap.svg +307 -0
- package/tests/repros/__snapshots__/rtc-imu-microsd-section.snap.svg +286 -0
- package/tests/repros/assets/repro-core-vertical-passive-ground-label-overlap.input.json +353 -0
- package/tests/repros/assets/repro173-boost-drv8711-ground-label-overlap.input.json +865 -0
- package/tests/repros/assets/rtc-imu-microsd-section.input.json +894 -0
- package/tests/repros/repro-core-vertical-passive-ground-label-overlap.test.ts +39 -0
- package/tests/repros/repro-manual-placement-detour.input.json +853 -0
- package/tests/repros/repro-manual-placement-detour.test.ts +39 -0
- package/tests/repros/repro-pmp11282-isolated-dcdc.test.ts +10 -3
- package/tests/repros/repro173-boost-drv8711-ground-label-overlap.test.ts +41 -0
- package/tests/repros/rtc-imu-microsd-section.test.ts +28 -0
- package/tests/solvers/UnroutedTraceRecoverySolver/local-elbow-obstacles.test.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -13084,11 +13084,19 @@ var getPinConnectionCandidates = ({
|
|
|
13084
13084
|
const outerBounds = getOuterBounds(obstacles);
|
|
13085
13085
|
const horizontalChannels = [
|
|
13086
13086
|
outerBounds.minY - ROUTE_CLEARANCE,
|
|
13087
|
-
outerBounds.maxY + ROUTE_CLEARANCE
|
|
13087
|
+
outerBounds.maxY + ROUTE_CLEARANCE,
|
|
13088
|
+
...obstacles.flatMap((obstacle) => [
|
|
13089
|
+
obstacle.minY - ROUTE_CLEARANCE,
|
|
13090
|
+
obstacle.maxY + ROUTE_CLEARANCE
|
|
13091
|
+
])
|
|
13088
13092
|
];
|
|
13089
13093
|
const verticalChannels = [
|
|
13090
13094
|
outerBounds.minX - ROUTE_CLEARANCE,
|
|
13091
|
-
outerBounds.maxX + ROUTE_CLEARANCE
|
|
13095
|
+
outerBounds.maxX + ROUTE_CLEARANCE,
|
|
13096
|
+
...obstacles.flatMap((obstacle) => [
|
|
13097
|
+
obstacle.minX - ROUTE_CLEARANCE,
|
|
13098
|
+
obstacle.maxX + ROUTE_CLEARANCE
|
|
13099
|
+
])
|
|
13092
13100
|
];
|
|
13093
13101
|
const candidates = [
|
|
13094
13102
|
calculateElbow3(
|
|
@@ -13097,7 +13105,7 @@ var getPinConnectionCandidates = ({
|
|
|
13097
13105
|
{ overshoot: ROUTE_CLEARANCE }
|
|
13098
13106
|
)
|
|
13099
13107
|
];
|
|
13100
|
-
for (const channelY of horizontalChannels) {
|
|
13108
|
+
for (const channelY of new Set(horizontalChannels)) {
|
|
13101
13109
|
candidates.push(
|
|
13102
13110
|
removeConsecutiveDuplicatePoints([
|
|
13103
13111
|
firstPin,
|
|
@@ -13109,7 +13117,7 @@ var getPinConnectionCandidates = ({
|
|
|
13109
13117
|
])
|
|
13110
13118
|
);
|
|
13111
13119
|
}
|
|
13112
|
-
for (const channelX of verticalChannels) {
|
|
13120
|
+
for (const channelX of new Set(verticalChannels)) {
|
|
13113
13121
|
candidates.push(
|
|
13114
13122
|
removeConsecutiveDuplicatePoints([
|
|
13115
13123
|
firstPin,
|
|
@@ -13420,7 +13428,9 @@ var UnroutedTraceRecoverySolver = class extends BaseSolver {
|
|
|
13420
13428
|
connectionPair,
|
|
13421
13429
|
obstacles
|
|
13422
13430
|
});
|
|
13423
|
-
const candidates = [...junctionCandidates, ...pinConnectionCandidates]
|
|
13431
|
+
const candidates = [...junctionCandidates, ...pinConnectionCandidates].sort(
|
|
13432
|
+
(firstPath, secondPath) => getPathLength5(firstPath) - getPathLength5(secondPath)
|
|
13433
|
+
);
|
|
13424
13434
|
const rejectComponentBoundaryTravel = hasParallelFailedConnection({
|
|
13425
13435
|
connectionPair,
|
|
13426
13436
|
failedConnectionPairs: this.failedConnectionPairs
|
|
@@ -107,10 +107,18 @@ const getPinConnectionCandidates = ({
|
|
|
107
107
|
const horizontalChannels = [
|
|
108
108
|
outerBounds.minY - ROUTE_CLEARANCE,
|
|
109
109
|
outerBounds.maxY + ROUTE_CLEARANCE,
|
|
110
|
+
...obstacles.flatMap((obstacle) => [
|
|
111
|
+
obstacle.minY - ROUTE_CLEARANCE,
|
|
112
|
+
obstacle.maxY + ROUTE_CLEARANCE,
|
|
113
|
+
]),
|
|
110
114
|
]
|
|
111
115
|
const verticalChannels = [
|
|
112
116
|
outerBounds.minX - ROUTE_CLEARANCE,
|
|
113
117
|
outerBounds.maxX + ROUTE_CLEARANCE,
|
|
118
|
+
...obstacles.flatMap((obstacle) => [
|
|
119
|
+
obstacle.minX - ROUTE_CLEARANCE,
|
|
120
|
+
obstacle.maxX + ROUTE_CLEARANCE,
|
|
121
|
+
]),
|
|
114
122
|
]
|
|
115
123
|
// Recovery uses actual text bounds, so try local elbows before the perimeter.
|
|
116
124
|
const candidates: Point[][] = [
|
|
@@ -121,7 +129,7 @@ const getPinConnectionCandidates = ({
|
|
|
121
129
|
),
|
|
122
130
|
]
|
|
123
131
|
|
|
124
|
-
for (const channelY of horizontalChannels) {
|
|
132
|
+
for (const channelY of new Set(horizontalChannels)) {
|
|
125
133
|
candidates.push(
|
|
126
134
|
removeConsecutiveDuplicatePoints([
|
|
127
135
|
firstPin,
|
|
@@ -134,7 +142,7 @@ const getPinConnectionCandidates = ({
|
|
|
134
142
|
)
|
|
135
143
|
}
|
|
136
144
|
|
|
137
|
-
for (const channelX of verticalChannels) {
|
|
145
|
+
for (const channelX of new Set(verticalChannels)) {
|
|
138
146
|
candidates.push(
|
|
139
147
|
removeConsecutiveDuplicatePoints([
|
|
140
148
|
firstPin,
|
|
@@ -538,7 +546,10 @@ export class UnroutedTraceRecoverySolver extends BaseSolver {
|
|
|
538
546
|
connectionPair,
|
|
539
547
|
obstacles,
|
|
540
548
|
})
|
|
541
|
-
const candidates = [...junctionCandidates, ...pinConnectionCandidates]
|
|
549
|
+
const candidates = [...junctionCandidates, ...pinConnectionCandidates].sort(
|
|
550
|
+
(firstPath, secondPath) =>
|
|
551
|
+
getPathLength(firstPath) - getPathLength(secondPath),
|
|
552
|
+
)
|
|
542
553
|
const rejectComponentBoundaryTravel = hasParallelFailedConnection({
|
|
543
554
|
connectionPair,
|
|
544
555
|
failedConnectionPairs: this.failedConnectionPairs,
|
package/package.json
CHANGED
package/site/SchematicTracePipelineSolver/repro173-boost-drv8711-ground-label-overlap.page.tsx
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InputProblem } from "lib/types/InputProblem"
|
|
2
|
+
import { PipelineDebugger } from "site/components/PipelineDebugger"
|
|
3
|
+
import inputProblem from "../../tests/repros/assets/repro173-boost-drv8711-ground-label-overlap.input.json"
|
|
4
|
+
|
|
5
|
+
export default () => (
|
|
6
|
+
<PipelineDebugger inputProblem={inputProblem as unknown as InputProblem} />
|
|
7
|
+
)
|