@tscircuit/schematic-trace-solver 0.0.33 → 0.0.34
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 +22 -4
- package/lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver.ts +25 -4
- package/package.json +1 -1
- package/site/examples/example15-rp2040-caps.page.tsx +623 -0
- package/site/examples/example16-core-repro51.page.tsx +107 -0
- package/site/examples/example17-straight-line-trace.page.tsx +165 -0
- package/site/examples/example18.page.tsx +181 -0
- package/site/examples/example19.page.tsx +169 -0
- package/tests/examples/__snapshots__/example15.snap.svg +800 -71
- package/tests/examples/__snapshots__/example16.snap.svg +40 -86
- package/tests/examples/__snapshots__/example17.snap.svg +190 -0
- package/tests/examples/__snapshots__/example18.snap.svg +235 -0
- package/tests/examples/__snapshots__/example19.snap.svg +195 -0
- package/tests/examples/example15.test.tsx +524 -82
- package/tests/examples/example16.test.tsx +56 -118
- package/tests/examples/example17.test.tsx +171 -0
- package/tests/examples/example18.test.tsx +187 -0
- package/tests/examples/example19.test.tsx +175 -0
|
@@ -3,7 +3,7 @@ import { test } from "bun:test"
|
|
|
3
3
|
import { SchematicTracePipelineSolver, type InputProblem } from "lib/index"
|
|
4
4
|
import "tests/fixtures/matcher"
|
|
5
5
|
|
|
6
|
-
const inputProblem = {
|
|
6
|
+
const inputProblem: InputProblem = {
|
|
7
7
|
chips: [
|
|
8
8
|
{
|
|
9
9
|
chipId: "schematic_component_0",
|
|
@@ -11,162 +11,100 @@ const inputProblem = {
|
|
|
11
11
|
x: 0,
|
|
12
12
|
y: 0,
|
|
13
13
|
},
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
14
|
+
width: 2.4000000000000004,
|
|
15
|
+
height: 1,
|
|
16
16
|
pins: [
|
|
17
17
|
{
|
|
18
|
-
pinId: "U1.
|
|
19
|
-
x:
|
|
20
|
-
y: -0.
|
|
18
|
+
pinId: "U1.1",
|
|
19
|
+
x: 1.2000000000000002,
|
|
20
|
+
y: -0.30000000000000004,
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
pinId: "U1.
|
|
24
|
-
x:
|
|
25
|
-
y: 0,
|
|
23
|
+
pinId: "U1.2",
|
|
24
|
+
x: -1.2000000000000002,
|
|
25
|
+
y: -0.30000000000000004,
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
pinId: "U1.
|
|
29
|
-
x:
|
|
30
|
-
y: 0.
|
|
28
|
+
pinId: "U1.3",
|
|
29
|
+
x: 1.2000000000000002,
|
|
30
|
+
y: 0.09999999999999998,
|
|
31
31
|
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
chipId: "schematic_component_1",
|
|
36
|
-
center: {
|
|
37
|
-
x: 1.4,
|
|
38
|
-
y: 0.55,
|
|
39
|
-
},
|
|
40
|
-
width: 0.5291665999999999,
|
|
41
|
-
height: 1.0583333000000001,
|
|
42
|
-
pins: [
|
|
43
32
|
{
|
|
44
|
-
pinId: "
|
|
45
|
-
x: 1.
|
|
46
|
-
y:
|
|
33
|
+
pinId: "U1.4",
|
|
34
|
+
x: -1.2000000000000002,
|
|
35
|
+
y: 0.30000000000000004,
|
|
47
36
|
},
|
|
48
37
|
{
|
|
49
|
-
pinId: "
|
|
50
|
-
x: 1.
|
|
51
|
-
y:
|
|
38
|
+
pinId: "U1.5",
|
|
39
|
+
x: -1.2000000000000002,
|
|
40
|
+
y: 0.10000000000000003,
|
|
52
41
|
},
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
chipId: "schematic_component_2",
|
|
57
|
-
center: {
|
|
58
|
-
x: 2.7,
|
|
59
|
-
y: 1.3,
|
|
60
|
-
},
|
|
61
|
-
width: 1.0583332999999997,
|
|
62
|
-
height: 0.388910699999999,
|
|
63
|
-
pins: [
|
|
64
42
|
{
|
|
65
|
-
pinId: "
|
|
66
|
-
x:
|
|
67
|
-
y:
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
pinId: "R1.2",
|
|
71
|
-
x: 3.2512907000000006,
|
|
72
|
-
y: 1.2997267500000007,
|
|
43
|
+
pinId: "U1.6",
|
|
44
|
+
x: -1.2000000000000002,
|
|
45
|
+
y: -0.09999999999999998,
|
|
73
46
|
},
|
|
74
|
-
],
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
chipId: "schematic_component_3",
|
|
78
|
-
center: {
|
|
79
|
-
x: 4.4,
|
|
80
|
-
y: 0,
|
|
81
|
-
},
|
|
82
|
-
width: 0.4,
|
|
83
|
-
height: 0.4,
|
|
84
|
-
pins: [
|
|
85
47
|
{
|
|
86
|
-
pinId: "
|
|
87
|
-
x:
|
|
88
|
-
y: 0,
|
|
48
|
+
pinId: "U1.7",
|
|
49
|
+
x: 1.2000000000000002,
|
|
50
|
+
y: -0.10000000000000003,
|
|
89
51
|
},
|
|
90
|
-
],
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
chipId: "schematic_component_4",
|
|
94
|
-
center: {
|
|
95
|
-
x: 4.4,
|
|
96
|
-
y: -0.9,
|
|
97
|
-
},
|
|
98
|
-
width: 0.4,
|
|
99
|
-
height: 0.4,
|
|
100
|
-
pins: [
|
|
101
52
|
{
|
|
102
|
-
pinId: "
|
|
103
|
-
x:
|
|
104
|
-
y:
|
|
53
|
+
pinId: "U1.8",
|
|
54
|
+
x: 1.2000000000000002,
|
|
55
|
+
y: 0.30000000000000004,
|
|
105
56
|
},
|
|
106
57
|
],
|
|
107
58
|
},
|
|
108
59
|
{
|
|
109
|
-
chipId: "
|
|
60
|
+
chipId: "schematic_component_1",
|
|
110
61
|
center: {
|
|
111
|
-
x: 2,
|
|
112
|
-
y:
|
|
62
|
+
x: 2.7,
|
|
63
|
+
y: 1.9049999999999998,
|
|
113
64
|
},
|
|
114
|
-
width:
|
|
115
|
-
height: 0.
|
|
65
|
+
width: 2.2,
|
|
66
|
+
height: 0.8,
|
|
116
67
|
pins: [
|
|
117
68
|
{
|
|
118
|
-
pinId: "
|
|
119
|
-
x:
|
|
120
|
-
y:
|
|
69
|
+
pinId: "J1.1",
|
|
70
|
+
x: 1.6,
|
|
71
|
+
y: 2.105,
|
|
121
72
|
},
|
|
122
73
|
{
|
|
123
|
-
pinId: "
|
|
124
|
-
x:
|
|
125
|
-
y:
|
|
74
|
+
pinId: "J1.2",
|
|
75
|
+
x: 1.6,
|
|
76
|
+
y: 1.9049999999999998,
|
|
126
77
|
},
|
|
127
78
|
{
|
|
128
|
-
pinId: "
|
|
129
|
-
x: 1.
|
|
130
|
-
y:
|
|
79
|
+
pinId: "J1.3",
|
|
80
|
+
x: 1.6,
|
|
81
|
+
y: 1.7049999999999998,
|
|
131
82
|
},
|
|
132
83
|
],
|
|
133
84
|
},
|
|
134
85
|
],
|
|
135
|
-
directConnections: [
|
|
136
|
-
|
|
137
|
-
pinIds: ["C2.1", "U1.8"],
|
|
138
|
-
netId: "capacitor.C2 > port.pin1 to .U1 > .pin8",
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
pinIds: ["C2.2", "R1.1"],
|
|
142
|
-
netId: "capacitor.C2 > port.pin2 to .R1 > .pin1",
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
pinIds: ["R1.1", "U1.1"],
|
|
146
|
-
netId: "resistor.R1 > port.pin1 to .U1 > .pin1",
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
pinIds: ["JP5.1", "R1.2"],
|
|
150
|
-
netId: "pinheader.JP5 > port.pin1 to .R1 > .pin2",
|
|
151
|
-
},
|
|
86
|
+
directConnections: [],
|
|
87
|
+
netConnections: [
|
|
152
88
|
{
|
|
153
|
-
|
|
154
|
-
|
|
89
|
+
netId: "GND",
|
|
90
|
+
pinIds: ["U1.1", "J1.3"],
|
|
155
91
|
},
|
|
156
92
|
{
|
|
157
|
-
|
|
158
|
-
|
|
93
|
+
netId: "OUT",
|
|
94
|
+
pinIds: ["U1.3", "J1.2"],
|
|
159
95
|
},
|
|
160
|
-
],
|
|
161
|
-
netConnections: [
|
|
162
96
|
{
|
|
163
|
-
netId: "
|
|
164
|
-
pinIds: ["
|
|
97
|
+
netId: "VCC",
|
|
98
|
+
pinIds: ["U1.8", "J1.1"],
|
|
165
99
|
},
|
|
166
100
|
],
|
|
167
|
-
availableNetLabelOrientations: {
|
|
168
|
-
|
|
169
|
-
|
|
101
|
+
availableNetLabelOrientations: {
|
|
102
|
+
VCC: ["y+"],
|
|
103
|
+
OUT: ["x-", "x+"],
|
|
104
|
+
GND: ["y-"],
|
|
105
|
+
},
|
|
106
|
+
maxMspPairDistance: 2.4,
|
|
107
|
+
}
|
|
170
108
|
|
|
171
109
|
test("example16", () => {
|
|
172
110
|
const solver = new SchematicTracePipelineSolver(inputProblem)
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { expect } from "bun:test"
|
|
2
|
+
import { test } from "bun:test"
|
|
3
|
+
import { SchematicTracePipelineSolver, type InputProblem } from "lib/index"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
|
|
6
|
+
const inputProblem: InputProblem = {
|
|
7
|
+
chips: [
|
|
8
|
+
{
|
|
9
|
+
chipId: "schematic_component_0",
|
|
10
|
+
center: {
|
|
11
|
+
x: 0,
|
|
12
|
+
y: 0,
|
|
13
|
+
},
|
|
14
|
+
width: 2.3,
|
|
15
|
+
height: 1,
|
|
16
|
+
pins: [
|
|
17
|
+
{
|
|
18
|
+
pinId: "U1.1",
|
|
19
|
+
x: -1.15,
|
|
20
|
+
y: 0.30000000000000004,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
pinId: "U1.2",
|
|
24
|
+
x: -1.15,
|
|
25
|
+
y: 0.10000000000000003,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
pinId: "U1.3",
|
|
29
|
+
x: -1.15,
|
|
30
|
+
y: -0.09999999999999998,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
pinId: "U1.4",
|
|
34
|
+
x: -1.15,
|
|
35
|
+
y: -0.30000000000000004,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
pinId: "U1.5",
|
|
39
|
+
x: 1.15,
|
|
40
|
+
y: -0.30000000000000004,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
pinId: "U1.6",
|
|
44
|
+
x: 1.15,
|
|
45
|
+
y: -0.10000000000000003,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
pinId: "U1.7",
|
|
49
|
+
x: 1.15,
|
|
50
|
+
y: 0.09999999999999998,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
pinId: "U1.8",
|
|
54
|
+
x: 1.15,
|
|
55
|
+
y: 0.30000000000000004,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
chipId: "schematic_component_1",
|
|
61
|
+
center: {
|
|
62
|
+
x: -1.1500000000000004,
|
|
63
|
+
y: 1.6700000000000002,
|
|
64
|
+
},
|
|
65
|
+
width: 1.04,
|
|
66
|
+
height: 1.0400000000000005,
|
|
67
|
+
pins: [
|
|
68
|
+
{
|
|
69
|
+
pinId: "D1.1",
|
|
70
|
+
x: -1.1500000000000004,
|
|
71
|
+
y: 1.15,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
pinId: "D1.2",
|
|
75
|
+
x: -1.1500000000000004,
|
|
76
|
+
y: 2.1900000000000004,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
chipId: "schematic_component_2",
|
|
82
|
+
center: {
|
|
83
|
+
x: -2.37,
|
|
84
|
+
y: 0.10000000000000009,
|
|
85
|
+
},
|
|
86
|
+
width: 1.04,
|
|
87
|
+
height: 0.54,
|
|
88
|
+
pins: [
|
|
89
|
+
{
|
|
90
|
+
pinId: "D2.1",
|
|
91
|
+
x: -1.85,
|
|
92
|
+
y: 0.10000000000000002,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
pinId: "D2.2",
|
|
96
|
+
x: -2.89,
|
|
97
|
+
y: 0.10000000000000016,
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
chipId: "schematic_component_3",
|
|
103
|
+
center: {
|
|
104
|
+
x: 2.4,
|
|
105
|
+
y: -0.3000000000000007,
|
|
106
|
+
},
|
|
107
|
+
width: 1.1000000000000005,
|
|
108
|
+
height: 0.84,
|
|
109
|
+
pins: [
|
|
110
|
+
{
|
|
111
|
+
pinId: "C1.1",
|
|
112
|
+
x: 1.8499999999999996,
|
|
113
|
+
y: -0.3000000000000007,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
pinId: "C1.2",
|
|
117
|
+
x: 2.95,
|
|
118
|
+
y: -0.3000000000000007,
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
chipId: "schematic_component_4",
|
|
124
|
+
center: {
|
|
125
|
+
x: 4.2,
|
|
126
|
+
y: -0.3000000000000007,
|
|
127
|
+
},
|
|
128
|
+
width: 1.0999999999999996,
|
|
129
|
+
height: 0.84,
|
|
130
|
+
pins: [
|
|
131
|
+
{
|
|
132
|
+
pinId: "C2.1",
|
|
133
|
+
x: 3.6500000000000004,
|
|
134
|
+
y: -0.3000000000000007,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
pinId: "C2.2",
|
|
138
|
+
x: 4.75,
|
|
139
|
+
y: -0.3000000000000007,
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
directConnections: [
|
|
145
|
+
{
|
|
146
|
+
pinIds: ["U1.5", "C1.1"],
|
|
147
|
+
netId: ".U1 .VCC to .C1 .pin1",
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
pinIds: ["C1.2", "C2.1"],
|
|
151
|
+
netId: ".C1 .pin2 to .C2 .pin1",
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
pinIds: ["U1.1", "D1.1"],
|
|
155
|
+
netId: ".U1 .OUT1 to .D1 .pin1",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
pinIds: ["U1.2", "D2.1"],
|
|
159
|
+
netId: ".U1 .OUT2 to .D2 .pin1",
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
netConnections: [],
|
|
163
|
+
availableNetLabelOrientations: {},
|
|
164
|
+
maxMspPairDistance: 2.4,
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
test("example17", () => {
|
|
168
|
+
const solver = new SchematicTracePipelineSolver(inputProblem)
|
|
169
|
+
solver.solve()
|
|
170
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
171
|
+
})
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { expect } from "bun:test"
|
|
2
|
+
import { test } from "bun:test"
|
|
3
|
+
import { SchematicTracePipelineSolver, type InputProblem } from "lib/index"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
|
|
6
|
+
const inputProblem = {
|
|
7
|
+
chips: [
|
|
8
|
+
{
|
|
9
|
+
chipId: "schematic_component_0",
|
|
10
|
+
center: {
|
|
11
|
+
x: 0,
|
|
12
|
+
y: 0,
|
|
13
|
+
},
|
|
14
|
+
width: 2,
|
|
15
|
+
height: 1.4,
|
|
16
|
+
pins: [
|
|
17
|
+
{
|
|
18
|
+
pinId: "U3.8",
|
|
19
|
+
x: -1.4,
|
|
20
|
+
y: 0.42500000000000004,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
pinId: "U3.4",
|
|
24
|
+
x: -1.4,
|
|
25
|
+
y: -0.42500000000000004,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
pinId: "U3.1",
|
|
29
|
+
x: 1.4,
|
|
30
|
+
y: 0.5,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
pinId: "U3.6",
|
|
34
|
+
x: 1.4,
|
|
35
|
+
y: 0.30000000000000004,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
pinId: "U3.5",
|
|
39
|
+
x: 1.4,
|
|
40
|
+
y: 0.10000000000000009,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
pinId: "U3.2",
|
|
44
|
+
x: 1.4,
|
|
45
|
+
y: -0.09999999999999998,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
pinId: "U3.3",
|
|
49
|
+
x: 1.4,
|
|
50
|
+
y: -0.3,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
pinId: "U3.7",
|
|
54
|
+
x: 1.4,
|
|
55
|
+
y: -0.5,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
chipId: "schematic_component_1",
|
|
61
|
+
center: {
|
|
62
|
+
x: -2.3145833,
|
|
63
|
+
y: 0,
|
|
64
|
+
},
|
|
65
|
+
width: 0.5291665999999999,
|
|
66
|
+
height: 1.0583333000000001,
|
|
67
|
+
pins: [
|
|
68
|
+
{
|
|
69
|
+
pinId: "C20.1",
|
|
70
|
+
x: -2.3148566499999994,
|
|
71
|
+
y: 0.5512093000000002,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
pinId: "C20.2",
|
|
75
|
+
x: -2.31430995,
|
|
76
|
+
y: -0.5512093000000002,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
chipId: "schematic_component_2",
|
|
82
|
+
center: {
|
|
83
|
+
x: 1.7577928249999983,
|
|
84
|
+
y: 1.7512907000000002,
|
|
85
|
+
},
|
|
86
|
+
width: 0.3155856499999966,
|
|
87
|
+
height: 1.0583332999999997,
|
|
88
|
+
pins: [
|
|
89
|
+
{
|
|
90
|
+
pinId: "R11.1",
|
|
91
|
+
x: 1.7580660749999977,
|
|
92
|
+
y: 2.3025814000000002,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
pinId: "R11.2",
|
|
96
|
+
x: 1.757519574999999,
|
|
97
|
+
y: 1.2,
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
chipId: "schematic_component_3",
|
|
103
|
+
center: {
|
|
104
|
+
x: -1.7577928249999983,
|
|
105
|
+
y: -2.7512907000000002,
|
|
106
|
+
},
|
|
107
|
+
width: 0.3155856499999966,
|
|
108
|
+
height: 1.0583332999999997,
|
|
109
|
+
pins: [
|
|
110
|
+
{
|
|
111
|
+
pinId: "R12.1",
|
|
112
|
+
x: -1.7580660749999977,
|
|
113
|
+
y: -3.3025814000000002,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
pinId: "R12.2",
|
|
117
|
+
x: -1.757519574999999,
|
|
118
|
+
y: -2.2,
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
chipId: "schematic_component_4",
|
|
124
|
+
center: {
|
|
125
|
+
x: 1.7577928249999983,
|
|
126
|
+
y: -2.7512907000000002,
|
|
127
|
+
},
|
|
128
|
+
width: 0.3155856499999966,
|
|
129
|
+
height: 1.0583332999999997,
|
|
130
|
+
pins: [
|
|
131
|
+
{
|
|
132
|
+
pinId: "R13.1",
|
|
133
|
+
x: 1.7580660749999977,
|
|
134
|
+
y: -3.3025814000000002,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
pinId: "R13.2",
|
|
138
|
+
x: 1.757519574999999,
|
|
139
|
+
y: -2.2,
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
directConnections: [
|
|
145
|
+
{
|
|
146
|
+
pinIds: ["C20.1", "U3.8"],
|
|
147
|
+
netId: "capacitor.C20 > port.pin1 to .U3 > .VDD",
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
pinIds: ["C20.2", "U3.4"],
|
|
151
|
+
netId: "capacitor.C20 > port.pin2 to .U3 > .GND",
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
pinIds: ["R11.2", "U3.1"],
|
|
155
|
+
netId: "resistor.R11 > port.pin2 to .U3 > .N_CS",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
pinIds: ["R13.2", "R12.2"],
|
|
159
|
+
netId: "resistor.R11 > port.pin1 to resistor.R12 > port.pin1",
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
netConnections: [
|
|
163
|
+
{
|
|
164
|
+
netId: "V3_3",
|
|
165
|
+
pinIds: ["U3.8", "U3.3", "U3.7", "C20.1", "R11.1"],
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
netId: "GND",
|
|
169
|
+
pinIds: ["U3.4", "C20.2"],
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
netId: "FLASH_N_CS",
|
|
173
|
+
pinIds: ["U3.1", "R11.2"],
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
availableNetLabelOrientations: {
|
|
177
|
+
V3_3: ["y+"],
|
|
178
|
+
GND: ["y-"],
|
|
179
|
+
},
|
|
180
|
+
maxMspPairDistance: 5,
|
|
181
|
+
} as InputProblem
|
|
182
|
+
|
|
183
|
+
test("example18", () => {
|
|
184
|
+
const solver = new SchematicTracePipelineSolver(inputProblem)
|
|
185
|
+
solver.solve()
|
|
186
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
187
|
+
})
|