@tscircuit/schematic-trace-solver 0.0.78 → 0.0.79
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.d.ts +5 -0
- package/dist/index.js +65 -0
- package/lib/solvers/NetLabelTraceCollisionSolver/NetLabelTraceCollisionSolver.ts +87 -1
- package/package.json +1 -1
- package/site/examples/example46.page.tsx +4 -0
- package/site/examples/example47.page.tsx +4 -0
- package/site/examples/example48.page.tsx +4 -0
- package/site/examples/example49.page.tsx +4 -0
- package/tests/assets/example46.json +236 -0
- package/tests/assets/example47.json +206 -0
- package/tests/assets/example48.json +104 -0
- package/tests/assets/example49.json +390 -0
- package/tests/examples/__snapshots__/example46.snap.svg +343 -0
- package/tests/examples/__snapshots__/example47.snap.svg +324 -0
- package/tests/examples/__snapshots__/example48.snap.svg +168 -0
- package/tests/examples/__snapshots__/example49.snap.svg +566 -0
- package/tests/examples/example46.test.ts +12 -0
- package/tests/examples/example47.test.ts +12 -0
- package/tests/examples/example48.test.ts +12 -0
- package/tests/examples/example49.test.ts +12 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chips": [
|
|
3
|
+
{
|
|
4
|
+
"chipId": "schematic_component_0",
|
|
5
|
+
"center": {
|
|
6
|
+
"x": 0,
|
|
7
|
+
"y": 0
|
|
8
|
+
},
|
|
9
|
+
"width": 1.6,
|
|
10
|
+
"height": 1,
|
|
11
|
+
"pins": [
|
|
12
|
+
{
|
|
13
|
+
"pinId": "U1.1",
|
|
14
|
+
"x": 1.2000000000000002,
|
|
15
|
+
"y": -0.30000000000000004
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"pinId": "U1.2",
|
|
19
|
+
"x": -1.2000000000000002,
|
|
20
|
+
"y": -0.30000000000000004
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"pinId": "U1.3",
|
|
24
|
+
"x": 1.2000000000000002,
|
|
25
|
+
"y": 0.09999999999999998
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"pinId": "U1.4",
|
|
29
|
+
"x": -1.2000000000000002,
|
|
30
|
+
"y": 0.30000000000000004
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"pinId": "U1.5",
|
|
34
|
+
"x": -1.2000000000000002,
|
|
35
|
+
"y": 0.10000000000000003
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"pinId": "U1.6",
|
|
39
|
+
"x": -1.2000000000000002,
|
|
40
|
+
"y": -0.09999999999999998
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"pinId": "U1.7",
|
|
44
|
+
"x": 1.2000000000000002,
|
|
45
|
+
"y": -0.10000000000000003
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"pinId": "U1.8",
|
|
49
|
+
"x": 1.2000000000000002,
|
|
50
|
+
"y": 0.30000000000000004
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"chipId": "schematic_component_1",
|
|
56
|
+
"center": {
|
|
57
|
+
"x": 2.7,
|
|
58
|
+
"y": 2.3049999999999997
|
|
59
|
+
},
|
|
60
|
+
"width": 1.4000000000000004,
|
|
61
|
+
"height": 0.7999999999999998,
|
|
62
|
+
"pins": [
|
|
63
|
+
{
|
|
64
|
+
"pinId": "J1.1",
|
|
65
|
+
"x": 1.6,
|
|
66
|
+
"y": 2.505
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"pinId": "J1.2",
|
|
70
|
+
"x": 1.6,
|
|
71
|
+
"y": 2.3049999999999997
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"pinId": "J1.3",
|
|
75
|
+
"x": 1.6,
|
|
76
|
+
"y": 2.1049999999999995
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"directConnections": [],
|
|
82
|
+
"netConnections": [
|
|
83
|
+
{
|
|
84
|
+
"netId": "GND",
|
|
85
|
+
"pinIds": ["U1.1", "J1.3"],
|
|
86
|
+
"netLabelWidth": 0.48
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"netId": "OUT",
|
|
90
|
+
"pinIds": ["U1.3", "J1.2"],
|
|
91
|
+
"netLabelWidth": 0.48
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"netId": "VCC",
|
|
95
|
+
"pinIds": ["U1.8", "J1.1"],
|
|
96
|
+
"netLabelWidth": 0.48
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"availableNetLabelOrientations": {
|
|
100
|
+
"VCC": ["y+"],
|
|
101
|
+
"GND": ["y-"]
|
|
102
|
+
},
|
|
103
|
+
"maxMspPairDistance": 2.4
|
|
104
|
+
}
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chips": [
|
|
3
|
+
{
|
|
4
|
+
"chipId": "schematic_component_0",
|
|
5
|
+
"center": {
|
|
6
|
+
"x": -0.51,
|
|
7
|
+
"y": -0.8850000000000002
|
|
8
|
+
},
|
|
9
|
+
"width": 2.4000000000000004,
|
|
10
|
+
"height": 1.2000000000000002,
|
|
11
|
+
"pins": [
|
|
12
|
+
{
|
|
13
|
+
"pinId": "U4.1",
|
|
14
|
+
"x": -1.7100000000000002,
|
|
15
|
+
"y": -0.6850000000000003
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"pinId": "U4.2",
|
|
19
|
+
"x": -1.7100000000000002,
|
|
20
|
+
"y": -0.8850000000000002
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"pinId": "U4.3",
|
|
24
|
+
"x": -1.7100000000000002,
|
|
25
|
+
"y": -1.0850000000000004
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"pinId": "U4.4",
|
|
29
|
+
"x": -1.7100000000000002,
|
|
30
|
+
"y": -1.2850000000000001
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"pinId": "U4.5",
|
|
34
|
+
"x": 0.6900000000000003,
|
|
35
|
+
"y": -1.2850000000000001
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"pinId": "U4.6",
|
|
39
|
+
"x": 0.6900000000000003,
|
|
40
|
+
"y": -0.4850000000000002
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"pinId": "U4.7",
|
|
44
|
+
"x": 0.6900000000000003,
|
|
45
|
+
"y": -0.8850000000000002
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"pinId": "U4.8",
|
|
49
|
+
"x": 0.6900000000000003,
|
|
50
|
+
"y": -0.6850000000000002
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"pinId": "U4.9",
|
|
54
|
+
"x": 0.6900000000000003,
|
|
55
|
+
"y": -1.0850000000000002
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"pinId": "U4.10",
|
|
59
|
+
"x": -1.7100000000000002,
|
|
60
|
+
"y": -0.4850000000000002
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"sectionId": "driver"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"chipId": "schematic_component_1",
|
|
67
|
+
"center": {
|
|
68
|
+
"x": -2.9519553499999995,
|
|
69
|
+
"y": -0.585
|
|
70
|
+
},
|
|
71
|
+
"width": 1.093910699999999,
|
|
72
|
+
"height": 1.1,
|
|
73
|
+
"pins": [
|
|
74
|
+
{
|
|
75
|
+
"pinId": "R6.1",
|
|
76
|
+
"x": -3.3044553499999996,
|
|
77
|
+
"y": -0.03499999999999992
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"pinId": "R6.2",
|
|
81
|
+
"x": -3.3044553499999996,
|
|
82
|
+
"y": -1.135
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"sectionId": "driver"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"chipId": "schematic_component_2",
|
|
89
|
+
"center": {
|
|
90
|
+
"x": -1.0889851166666666,
|
|
91
|
+
"y": -3.64
|
|
92
|
+
},
|
|
93
|
+
"width": 1.093910699999999,
|
|
94
|
+
"height": 1.1000000000000005,
|
|
95
|
+
"pins": [
|
|
96
|
+
{
|
|
97
|
+
"pinId": "R7.1",
|
|
98
|
+
"x": -1.4414851166666667,
|
|
99
|
+
"y": -3.09
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"pinId": "R7.2",
|
|
103
|
+
"x": -1.4414851166666667,
|
|
104
|
+
"y": -4.19
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"sectionId": "driver"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"chipId": "schematic_component_3",
|
|
111
|
+
"center": {
|
|
112
|
+
"x": -2.5469553499999993,
|
|
113
|
+
"y": 1.725
|
|
114
|
+
},
|
|
115
|
+
"width": 1.0939106999999992,
|
|
116
|
+
"height": 1.1000000000000003,
|
|
117
|
+
"pins": [
|
|
118
|
+
{
|
|
119
|
+
"pinId": "R8.1",
|
|
120
|
+
"x": -2.8994553499999993,
|
|
121
|
+
"y": 2.2750000000000004
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"pinId": "R8.2",
|
|
125
|
+
"x": -2.8994553499999993,
|
|
126
|
+
"y": 1.1749999999999998
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"sectionId": "driver"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"chipId": "schematic_component_4",
|
|
133
|
+
"center": {
|
|
134
|
+
"x": 3.0649999999999995,
|
|
135
|
+
"y": 1.5044553500000009
|
|
136
|
+
},
|
|
137
|
+
"width": 1.0999999999999996,
|
|
138
|
+
"height": 0.7789106999999991,
|
|
139
|
+
"pins": [
|
|
140
|
+
{
|
|
141
|
+
"pinId": "R9.1",
|
|
142
|
+
"x": 2.5149999999999997,
|
|
143
|
+
"y": 1.5044553500000009
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"pinId": "R9.2",
|
|
147
|
+
"x": 3.6149999999999993,
|
|
148
|
+
"y": 1.5044553500000009
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"sectionId": "driver"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"chipId": "schematic_component_5",
|
|
155
|
+
"center": {
|
|
156
|
+
"x": 3.5149999999999997,
|
|
157
|
+
"y": -0.6849999999999987
|
|
158
|
+
},
|
|
159
|
+
"width": 2,
|
|
160
|
+
"height": 0.39999999999999997,
|
|
161
|
+
"pins": [
|
|
162
|
+
{
|
|
163
|
+
"pinId": "Q1.1",
|
|
164
|
+
"x": 2.5149999999999997,
|
|
165
|
+
"y": -0.7849999999999987
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"pinId": "Q1.2",
|
|
169
|
+
"x": 4.515,
|
|
170
|
+
"y": -0.6849999999999987
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"pinId": "Q1.3",
|
|
174
|
+
"x": 2.5149999999999997,
|
|
175
|
+
"y": -0.5849999999999987
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"sectionId": "driver"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"chipId": "schematic_component_6",
|
|
182
|
+
"center": {
|
|
183
|
+
"x": 2.6899999999999995,
|
|
184
|
+
"y": -3.0099999999999985
|
|
185
|
+
},
|
|
186
|
+
"width": 0.8599999999999999,
|
|
187
|
+
"height": 1.04,
|
|
188
|
+
"pins": [
|
|
189
|
+
{
|
|
190
|
+
"pinId": "D2.1",
|
|
191
|
+
"x": 2.8499999999999996,
|
|
192
|
+
"y": -3.5299999999999985
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"pinId": "D2.2",
|
|
196
|
+
"x": 2.8499999999999996,
|
|
197
|
+
"y": -2.4899999999999984
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"sectionId": "driver"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"chipId": "schematic_component_7",
|
|
204
|
+
"center": {
|
|
205
|
+
"x": 6.3,
|
|
206
|
+
"y": -1.5674999999999986
|
|
207
|
+
},
|
|
208
|
+
"width": 1.1600000000000001,
|
|
209
|
+
"height": 0.8199999999999998,
|
|
210
|
+
"pins": [
|
|
211
|
+
{
|
|
212
|
+
"pinId": "L2.1",
|
|
213
|
+
"x": 5.72,
|
|
214
|
+
"y": -1.5874999999999986
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"pinId": "L2.2",
|
|
218
|
+
"x": 6.88,
|
|
219
|
+
"y": -1.5974999999999986
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"sectionId": "driver"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"chipId": "schematic_component_8",
|
|
226
|
+
"center": {
|
|
227
|
+
"x": 0.7774999999999997,
|
|
228
|
+
"y": 1.335
|
|
229
|
+
},
|
|
230
|
+
"width": 1.015,
|
|
231
|
+
"height": 1.1,
|
|
232
|
+
"pins": [
|
|
233
|
+
{
|
|
234
|
+
"pinId": "C7.1",
|
|
235
|
+
"x": 0.6899999999999998,
|
|
236
|
+
"y": 0.7849999999999999
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"pinId": "C7.2",
|
|
240
|
+
"x": 0.6899999999999998,
|
|
241
|
+
"y": 1.885
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"sectionId": "driver"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"chipId": "schematic_component_9",
|
|
248
|
+
"center": {
|
|
249
|
+
"x": -3.4534404666666663,
|
|
250
|
+
"y": -2.895
|
|
251
|
+
},
|
|
252
|
+
"width": 1.2350000000000003,
|
|
253
|
+
"height": 1.1000000000000005,
|
|
254
|
+
"pins": [
|
|
255
|
+
{
|
|
256
|
+
"pinId": "C8.1",
|
|
257
|
+
"x": -3.6509404666666665,
|
|
258
|
+
"y": -2.3449999999999998
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"pinId": "C8.2",
|
|
262
|
+
"x": -3.6509404666666665,
|
|
263
|
+
"y": -3.4450000000000003
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"sectionId": "driver"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"chipId": "schematic_component_10",
|
|
270
|
+
"center": {
|
|
271
|
+
"x": 0.7549999999999997,
|
|
272
|
+
"y": -3.4744553499999995
|
|
273
|
+
},
|
|
274
|
+
"width": 1.1000000000000003,
|
|
275
|
+
"height": 0.7789106999999991,
|
|
276
|
+
"pins": [
|
|
277
|
+
{
|
|
278
|
+
"pinId": "R10.1",
|
|
279
|
+
"x": 0.20499999999999952,
|
|
280
|
+
"y": -3.4744553499999995
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"pinId": "R10.2",
|
|
284
|
+
"x": 1.3049999999999997,
|
|
285
|
+
"y": -3.4744553499999995
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"sectionId": "driver"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"chipId": "schematic_component_11",
|
|
292
|
+
"center": {
|
|
293
|
+
"x": 5.2075,
|
|
294
|
+
"y": -3.7324999999999986
|
|
295
|
+
},
|
|
296
|
+
"width": 1.2349999999999994,
|
|
297
|
+
"height": 1.1000000000000005,
|
|
298
|
+
"pins": [
|
|
299
|
+
{
|
|
300
|
+
"pinId": "C9.1",
|
|
301
|
+
"x": 5.01,
|
|
302
|
+
"y": -3.1824999999999983
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"pinId": "C9.2",
|
|
306
|
+
"x": 5.01,
|
|
307
|
+
"y": -4.282499999999999
|
|
308
|
+
}
|
|
309
|
+
],
|
|
310
|
+
"sectionId": "driver"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"directConnections": [
|
|
314
|
+
{
|
|
315
|
+
"pinIds": ["C7.1", "U4.9"],
|
|
316
|
+
"netId": ".C7 > .pin1 to U4.VCC"
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"netConnections": [
|
|
320
|
+
{
|
|
321
|
+
"netId": "UVLO",
|
|
322
|
+
"pinIds": ["U4.1", "R6.2", "R7.1"],
|
|
323
|
+
"netLabelWidth": 0.6
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"netId": "IADJ",
|
|
327
|
+
"pinIds": ["U4.2"],
|
|
328
|
+
"netLabelWidth": 0.6
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"netId": "DIM_PWM",
|
|
332
|
+
"pinIds": ["U4.3"],
|
|
333
|
+
"netLabelWidth": 0.96
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"netId": "COFF",
|
|
337
|
+
"pinIds": ["U4.4", "C8.1", "R10.2"],
|
|
338
|
+
"netLabelWidth": 0.6
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"netId": "LED_MINUS",
|
|
342
|
+
"pinIds": ["U4.5", "R7.2", "D2.1", "C8.2", "C9.2"],
|
|
343
|
+
"netLabelWidth": 1.2
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"netId": "PGATE",
|
|
347
|
+
"pinIds": ["U4.6", "Q1.1"],
|
|
348
|
+
"netLabelWidth": 0.72
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"netId": "CSN",
|
|
352
|
+
"pinIds": ["U4.7", "R9.2", "Q1.3"],
|
|
353
|
+
"netLabelWidth": 0.48
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"netId": "CSP",
|
|
357
|
+
"pinIds": ["U4.8", "R8.2", "R9.1"],
|
|
358
|
+
"netLabelWidth": 0.48
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"netId": "VIN_LED",
|
|
362
|
+
"pinIds": ["U4.10", "R6.1", "R8.1", "C7.2"],
|
|
363
|
+
"netLabelWidth": 0.96
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"netId": "SW",
|
|
367
|
+
"pinIds": ["Q1.2", "D2.2", "L2.1"],
|
|
368
|
+
"netLabelWidth": 0.36
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"netId": "LED_PLUS",
|
|
372
|
+
"pinIds": ["L2.2", "R10.1", "C9.1"],
|
|
373
|
+
"netLabelWidth": 1.08
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"availableNetLabelOrientations": {
|
|
377
|
+
"VIN_LED": ["y+"],
|
|
378
|
+
"LED_PLUS": ["x-", "x+"],
|
|
379
|
+
"LED_MINUS": ["x-", "x+"],
|
|
380
|
+
"SW": ["x-", "x+"],
|
|
381
|
+
"PGATE": ["x-", "x+"],
|
|
382
|
+
"CSP": ["x-", "x+"],
|
|
383
|
+
"CSN": ["x-", "x+"],
|
|
384
|
+
"IADJ": ["x-", "x+"],
|
|
385
|
+
"DIM_PWM": ["x-", "x+"],
|
|
386
|
+
"COFF": ["x-", "x+"],
|
|
387
|
+
"UVLO": ["x-", "x+"]
|
|
388
|
+
},
|
|
389
|
+
"maxMspPairDistance": 2.4
|
|
390
|
+
}
|