@tscircuit/schematic-trace-solver 0.0.47 → 0.0.49

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.
Files changed (164) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +51 -1
  3. package/dist/index.js +750 -49
  4. package/lib/solvers/Example28Solver/Example28Solver.ts +182 -0
  5. package/lib/solvers/Example28Solver/geometry.ts +246 -0
  6. package/lib/solvers/Example28Solver/labelMovement.ts +82 -0
  7. package/lib/solvers/Example28Solver/reroute.ts +368 -0
  8. package/lib/solvers/Example28Solver/types.ts +47 -0
  9. package/lib/solvers/Example28Solver/visualize.ts +96 -0
  10. package/lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver.ts +2 -0
  11. package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver_visualize.ts +12 -0
  12. package/lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +16 -0
  13. package/package.json +1 -1
  14. package/site/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2_01-example17-d1_1-u1_1.page.tsx +2 -0
  15. package/site/TraceCleanupSolver/TraceCleanupSolver.page.tsx +23 -0
  16. package/site/TraceLabelOverlapAvoidanceSolver/MergedNetLabelObstacles.page.tsx +18 -0
  17. package/site/TraceLabelOverlapAvoidanceSolver/OverlapAvoidanceStepSolver.page.tsx +24 -0
  18. package/site/TraceLabelOverlapAvoidanceSolver/SingleOverlapSolver.page.tsx +10 -0
  19. package/site/TraceLabelOverlapAvoidanceSolver/TraceLabelOverlapAvoidanceSolver.page.tsx +146 -0
  20. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView01.page.tsx +32 -0
  21. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView02.page.tsx +32 -0
  22. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView03.page.tsx +35 -0
  23. package/site/examples/example01.page.tsx +6 -0
  24. package/site/examples/example02.page.tsx +4 -180
  25. package/site/examples/example03.page.tsx +3 -212
  26. package/site/examples/example04.page.tsx +6 -0
  27. package/site/examples/example05.page.tsx +3 -179
  28. package/site/examples/example06.page.tsx +3 -57
  29. package/site/examples/example07.page.tsx +3 -132
  30. package/site/examples/example08.page.tsx +3 -91
  31. package/site/examples/example09.page.tsx +3 -414
  32. package/site/examples/example10.page.tsx +3 -75
  33. package/site/examples/example11.page.tsx +3 -116
  34. package/site/examples/example12.page.tsx +3 -94
  35. package/site/examples/example13.page.tsx +3 -216
  36. package/site/examples/example14.page.tsx +3 -207
  37. package/site/examples/example15.page.tsx +6 -0
  38. package/site/examples/example16.page.tsx +6 -0
  39. package/site/examples/example17.page.tsx +6 -0
  40. package/site/examples/example18.page.tsx +3 -178
  41. package/site/examples/example19.page.tsx +3 -166
  42. package/site/examples/example20.page.tsx +3 -100
  43. package/site/examples/example21.page.tsx +3 -174
  44. package/site/examples/example22.page.tsx +3 -105
  45. package/site/examples/example23.page.tsx +3 -134
  46. package/site/examples/example24.page.tsx +3 -125
  47. package/site/examples/example25.page.tsx +2 -0
  48. package/site/examples/example26.page.tsx +2 -0
  49. package/site/examples/example27.page.tsx +2 -0
  50. package/site/examples/example28.page.tsx +6 -0
  51. package/site/examples/example29.page.tsx +6 -0
  52. package/site/examples/example30.page.tsx +6 -0
  53. package/site/examples/example31.page.tsx +4 -0
  54. package/tests/assets/example01.json +109 -0
  55. package/tests/assets/example02.json +178 -0
  56. package/tests/assets/example03.json +210 -0
  57. package/tests/assets/example04.json +41 -0
  58. package/tests/assets/example05.json +175 -0
  59. package/tests/assets/example06.json +55 -0
  60. package/tests/assets/example07.json +130 -0
  61. package/tests/assets/example08.json +89 -0
  62. package/tests/assets/example09.json +412 -0
  63. package/tests/assets/example10.json +73 -0
  64. package/tests/assets/example11.json +114 -0
  65. package/tests/assets/example12.json +92 -0
  66. package/tests/assets/example13.json +214 -0
  67. package/tests/assets/example14.json +205 -0
  68. package/tests/assets/example15.json +618 -0
  69. package/tests/assets/example16.json +102 -0
  70. package/tests/assets/example17.json +160 -0
  71. package/tests/assets/example18.json +176 -0
  72. package/tests/assets/example19.json +164 -0
  73. package/tests/assets/example20.json +98 -0
  74. package/tests/assets/example21.json +172 -0
  75. package/tests/assets/example22.json +103 -0
  76. package/tests/assets/example23.json +132 -0
  77. package/tests/assets/example24.json +123 -0
  78. package/tests/assets/example25.json +146 -33
  79. package/tests/assets/example26.json +51 -1134
  80. package/tests/assets/example27.json +151 -91
  81. package/tests/assets/example28.json +56 -0
  82. package/tests/assets/example29.json +1206 -0
  83. package/tests/assets/example30.json +168 -0
  84. package/tests/assets/example31.json +46 -0
  85. package/tests/examples/__snapshots__/example01.snap.svg +12 -6
  86. package/tests/examples/__snapshots__/example02.snap.svg +16 -8
  87. package/tests/examples/__snapshots__/example03.snap.svg +36 -18
  88. package/tests/examples/__snapshots__/example04.snap.svg +8 -4
  89. package/tests/examples/__snapshots__/example05.snap.svg +4 -2
  90. package/tests/examples/__snapshots__/example06.snap.svg +4 -2
  91. package/tests/examples/__snapshots__/example07.snap.svg +20 -10
  92. package/tests/examples/__snapshots__/example08.snap.svg +16 -8
  93. package/tests/examples/__snapshots__/example09.snap.svg +80 -40
  94. package/tests/examples/__snapshots__/example10.snap.svg +16 -8
  95. package/tests/examples/__snapshots__/example11.snap.svg +24 -12
  96. package/tests/examples/__snapshots__/example12.snap.svg +16 -8
  97. package/tests/examples/__snapshots__/example13.snap.svg +32 -16
  98. package/tests/examples/__snapshots__/example14.snap.svg +115 -48
  99. package/tests/examples/__snapshots__/example15.snap.svg +36 -18
  100. package/tests/examples/__snapshots__/example16.snap.svg +16 -8
  101. package/tests/examples/__snapshots__/example17.snap.svg +16 -8
  102. package/tests/examples/__snapshots__/example18.snap.svg +20 -10
  103. package/tests/examples/__snapshots__/example19.snap.svg +16 -8
  104. package/tests/examples/__snapshots__/example20.snap.svg +43 -135
  105. package/tests/examples/__snapshots__/example21.snap.svg +34 -18
  106. package/tests/examples/__snapshots__/example22.snap.svg +37 -23
  107. package/tests/examples/__snapshots__/example23.snap.svg +62 -26
  108. package/tests/examples/__snapshots__/example24.snap.svg +50 -28
  109. package/tests/examples/__snapshots__/example25.snap.svg +175 -49
  110. package/tests/examples/__snapshots__/example26.snap.svg +16 -8
  111. package/tests/examples/__snapshots__/example27.snap.svg +24 -12
  112. package/tests/examples/__snapshots__/example28.snap.svg +29 -189
  113. package/tests/examples/__snapshots__/example29.snap.svg +184 -92
  114. package/tests/examples/__snapshots__/example30.snap.svg +48 -24
  115. package/tests/examples/__snapshots__/example31.snap.svg +88 -0
  116. package/tests/examples/example01.test.ts +2 -2
  117. package/tests/examples/example02.test.ts +2 -2
  118. package/tests/examples/example03.test.ts +2 -2
  119. package/tests/examples/example04.test.ts +2 -2
  120. package/tests/examples/example05.test.ts +2 -2
  121. package/tests/examples/example06.test.ts +2 -2
  122. package/tests/examples/example07.test.ts +2 -2
  123. package/tests/examples/example08.test.ts +2 -2
  124. package/tests/examples/example09.test.ts +2 -2
  125. package/tests/examples/example10.test.ts +2 -2
  126. package/tests/examples/{example11.test.tsx → example11.test.ts} +2 -2
  127. package/tests/examples/{example12.test.tsx → example12.test.ts} +2 -2
  128. package/tests/examples/{example13.test.tsx → example13.test.ts} +2 -2
  129. package/tests/examples/example14.test.ts +12 -0
  130. package/tests/examples/example15.test.ts +12 -0
  131. package/tests/examples/example16.test.ts +12 -0
  132. package/tests/examples/example17.test.ts +12 -0
  133. package/tests/examples/example18.test.ts +12 -0
  134. package/tests/examples/example19.test.ts +12 -0
  135. package/tests/examples/example20.test.ts +12 -0
  136. package/tests/examples/example21.test.ts +12 -0
  137. package/tests/examples/example22.test.ts +12 -0
  138. package/tests/examples/example23.test.ts +12 -0
  139. package/tests/examples/example24.test.ts +12 -0
  140. package/tests/examples/example25.test.ts +12 -0
  141. package/tests/examples/example26.test.ts +12 -0
  142. package/tests/examples/example27.test.ts +3 -232
  143. package/tests/examples/example28.test.ts +1 -2
  144. package/tests/examples/example29.test.ts +1 -2
  145. package/tests/examples/example30.test.ts +2 -2
  146. package/tests/examples/example31.test.ts +12 -0
  147. package/site/examples/example01-basic.page.tsx +0 -105
  148. package/site/examples/example04-single-symbol.page.tsx +0 -46
  149. package/site/examples/example15-rp2040-caps.page.tsx +0 -623
  150. package/site/examples/example16-core-repro51.page.tsx +0 -107
  151. package/site/examples/example17-straight-line-trace.page.tsx +0 -165
  152. package/tests/examples/example14.test.tsx +0 -11
  153. package/tests/examples/example15.test.tsx +0 -629
  154. package/tests/examples/example16.test.tsx +0 -113
  155. package/tests/examples/example17.test.tsx +0 -171
  156. package/tests/examples/example18.test.tsx +0 -187
  157. package/tests/examples/example19.test.tsx +0 -175
  158. package/tests/examples/example20.test.tsx +0 -190
  159. package/tests/examples/example21.test.tsx +0 -183
  160. package/tests/examples/example22.test.tsx +0 -109
  161. package/tests/examples/example23.test.tsx +0 -109
  162. package/tests/examples/example24.test.tsx +0 -114
  163. package/tests/examples/example25.test.tsx +0 -143
  164. package/tests/examples/example26.test.tsx +0 -134
@@ -1,417 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example09.json"
3
3
 
4
- export const inputProblem: InputProblem = {
5
- chips: [
6
- {
7
- chipId: "schematic_component_0",
8
- center: {
9
- x: 0,
10
- y: 0,
11
- },
12
- width: 2.3,
13
- height: 1.7999999999999998,
14
- pins: [
15
- {
16
- pinId: "U1.1",
17
- x: -1.15,
18
- y: 0.7,
19
- },
20
- {
21
- pinId: "U1.2",
22
- x: -1.15,
23
- y: 0.49999999999999994,
24
- },
25
- {
26
- pinId: "U1.3",
27
- x: -1.15,
28
- y: 0.29999999999999993,
29
- },
30
- {
31
- pinId: "U1.4",
32
- x: -1.15,
33
- y: 0.09999999999999987,
34
- },
35
- {
36
- pinId: "U1.5",
37
- x: -1.15,
38
- y: -0.10000000000000009,
39
- },
40
- {
41
- pinId: "U1.6",
42
- x: -1.15,
43
- y: -0.30000000000000004,
44
- },
45
- {
46
- pinId: "U1.7",
47
- x: -1.15,
48
- y: -0.5,
49
- },
50
- {
51
- pinId: "U1.8",
52
- x: -1.15,
53
- y: -0.7,
54
- },
55
- {
56
- pinId: "U1.9",
57
- x: 1.15,
58
- y: -0.7,
59
- },
60
- {
61
- pinId: "U1.10",
62
- x: 1.15,
63
- y: -0.49999999999999994,
64
- },
65
- {
66
- pinId: "U1.11",
67
- x: 1.15,
68
- y: -0.29999999999999993,
69
- },
70
- {
71
- pinId: "U1.12",
72
- x: 1.15,
73
- y: -0.09999999999999987,
74
- },
75
- {
76
- pinId: "U1.13",
77
- x: 1.15,
78
- y: 0.10000000000000009,
79
- },
80
- {
81
- pinId: "U1.14",
82
- x: 1.15,
83
- y: 0.30000000000000004,
84
- },
85
- {
86
- pinId: "U1.15",
87
- x: 1.15,
88
- y: 0.5,
89
- },
90
- {
91
- pinId: "U1.16",
92
- x: 1.15,
93
- y: 0.7,
94
- },
95
- ],
96
- },
97
- {
98
- chipId: "schematic_component_1",
99
- center: {
100
- x: -4,
101
- y: -3,
102
- },
103
- width: 1.102581400000001,
104
- height: 0.388910699999999,
105
- pins: [
106
- {
107
- pinId: "R1.1",
108
- x: -4.551290700000001,
109
- y: -2.9997267500000007,
110
- },
111
- {
112
- pinId: "R1.2",
113
- x: -3.4487092999999995,
114
- y: -3.0002732499999993,
115
- },
116
- ],
117
- },
118
- {
119
- chipId: "schematic_component_2",
120
- center: {
121
- x: -4,
122
- y: -2,
123
- },
124
- width: 1.102581400000001,
125
- height: 0.388910699999999,
126
- pins: [
127
- {
128
- pinId: "R2.1",
129
- x: -4.551290700000001,
130
- y: -1.9997267500000007,
131
- },
132
- {
133
- pinId: "R2.2",
134
- x: -3.4487092999999995,
135
- y: -2.0002732499999993,
136
- },
137
- ],
138
- },
139
- {
140
- chipId: "schematic_component_3",
141
- center: {
142
- x: -4,
143
- y: -1,
144
- },
145
- width: 1.102581400000001,
146
- height: 0.388910699999999,
147
- pins: [
148
- {
149
- pinId: "R3.1",
150
- x: -4.551290700000001,
151
- y: -0.9997267500000007,
152
- },
153
- {
154
- pinId: "R3.2",
155
- x: -3.4487092999999995,
156
- y: -1.0002732499999993,
157
- },
158
- ],
159
- },
160
- {
161
- chipId: "schematic_component_4",
162
- center: {
163
- x: -4,
164
- y: 0,
165
- },
166
- width: 1.102581400000001,
167
- height: 0.388910699999999,
168
- pins: [
169
- {
170
- pinId: "R4.1",
171
- x: -4.551290700000001,
172
- y: 0.0002732499999993365,
173
- },
174
- {
175
- pinId: "R4.2",
176
- x: -3.4487092999999995,
177
- y: -0.0002732499999993365,
178
- },
179
- ],
180
- },
181
- {
182
- chipId: "schematic_component_5",
183
- center: {
184
- x: -4,
185
- y: 1,
186
- },
187
- width: 1.102581400000001,
188
- height: 0.388910699999999,
189
- pins: [
190
- {
191
- pinId: "R5.1",
192
- x: -4.551290700000001,
193
- y: 1.0002732499999993,
194
- },
195
- {
196
- pinId: "R5.2",
197
- x: -3.4487092999999995,
198
- y: 0.9997267500000007,
199
- },
200
- ],
201
- },
202
- {
203
- chipId: "schematic_component_6",
204
- center: {
205
- x: -4,
206
- y: 2,
207
- },
208
- width: 1.102581400000001,
209
- height: 0.388910699999999,
210
- pins: [
211
- {
212
- pinId: "R6.1",
213
- x: -4.551290700000001,
214
- y: 2.0002732499999993,
215
- },
216
- {
217
- pinId: "R6.2",
218
- x: -3.4487092999999995,
219
- y: 1.9997267500000007,
220
- },
221
- ],
222
- },
223
- {
224
- chipId: "schematic_component_7",
225
- center: {
226
- x: 4,
227
- y: -3,
228
- },
229
- width: 1.1025814,
230
- height: 0.388910699999999,
231
- pins: [
232
- {
233
- pinId: "R7.1",
234
- x: 3.4487093,
235
- y: -2.9997267500000007,
236
- },
237
- {
238
- pinId: "R7.2",
239
- x: 4.5512907,
240
- y: -3.0002732499999993,
241
- },
242
- ],
243
- },
244
- {
245
- chipId: "schematic_component_8",
246
- center: {
247
- x: 4,
248
- y: -2,
249
- },
250
- width: 1.1025814,
251
- height: 0.388910699999999,
252
- pins: [
253
- {
254
- pinId: "R8.1",
255
- x: 3.4487093,
256
- y: -1.9997267500000007,
257
- },
258
- {
259
- pinId: "R8.2",
260
- x: 4.5512907,
261
- y: -2.0002732499999993,
262
- },
263
- ],
264
- },
265
- {
266
- chipId: "schematic_component_9",
267
- center: {
268
- x: 4,
269
- y: -1,
270
- },
271
- width: 1.1025814,
272
- height: 0.388910699999999,
273
- pins: [
274
- {
275
- pinId: "R9.1",
276
- x: 3.4487093,
277
- y: -0.9997267500000007,
278
- },
279
- {
280
- pinId: "R9.2",
281
- x: 4.5512907,
282
- y: -1.0002732499999993,
283
- },
284
- ],
285
- },
286
- {
287
- chipId: "schematic_component_10",
288
- center: {
289
- x: 4,
290
- y: 0,
291
- },
292
- width: 1.1025814,
293
- height: 0.388910699999999,
294
- pins: [
295
- {
296
- pinId: "R10.1",
297
- x: 3.4487093,
298
- y: 0.0002732499999993365,
299
- },
300
- {
301
- pinId: "R10.2",
302
- x: 4.5512907,
303
- y: -0.0002732499999993365,
304
- },
305
- ],
306
- },
307
- {
308
- chipId: "schematic_component_11",
309
- center: {
310
- x: 4,
311
- y: 1,
312
- },
313
- width: 1.1025814,
314
- height: 0.388910699999999,
315
- pins: [
316
- {
317
- pinId: "R11.1",
318
- x: 3.4487093,
319
- y: 1.0002732499999993,
320
- },
321
- {
322
- pinId: "R11.2",
323
- x: 4.5512907,
324
- y: 0.9997267500000007,
325
- },
326
- ],
327
- },
328
- {
329
- chipId: "schematic_component_12",
330
- center: {
331
- x: 4,
332
- y: 2,
333
- },
334
- width: 1.1025814,
335
- height: 0.388910699999999,
336
- pins: [
337
- {
338
- pinId: "R12.1",
339
- x: 3.4487093,
340
- y: 2.0002732499999993,
341
- },
342
- {
343
- pinId: "R12.2",
344
- x: 4.5512907,
345
- y: 1.9997267500000007,
346
- },
347
- ],
348
- },
349
- ],
350
- directConnections: [
351
- {
352
- pinIds: ["R1.2", "U1.1"],
353
- netId: ".R1 > .pin2 to .U1 > .IN1",
354
- },
355
- {
356
- pinIds: ["R2.2", "U1.3"],
357
- netId: ".R2 > .pin2 to .U1 > .IN3",
358
- },
359
- {
360
- pinIds: ["R3.2", "U1.4"],
361
- netId: ".R3 > .pin2 to .U1 > .IN4",
362
- },
363
- {
364
- pinIds: ["R4.2", "U1.6"],
365
- netId: ".R4 > .pin2 to .U1 > .IN6",
366
- },
367
- {
368
- pinIds: ["R5.2", "U1.7"],
369
- netId: ".R5 > .pin2 to .U1 > .IN7",
370
- },
371
- {
372
- pinIds: ["R6.2", "U1.8"],
373
- netId: ".R6 > .pin2 to .U1 > .IN8",
374
- },
375
- {
376
- pinIds: ["R7.1", "U1.16"],
377
- netId: ".R7 > .pin1 to .U1 > .OUT8",
378
- },
379
- {
380
- pinIds: ["R8.1", "U1.14"],
381
- netId: ".R8 > .pin1 to .U1 > .OUT6",
382
- },
383
- {
384
- pinIds: ["R9.1", "U1.13"],
385
- netId: ".R9 > .pin1 to .U1 > .OUT5",
386
- },
387
- {
388
- pinIds: ["R10.1", "U1.12"],
389
- netId: ".R10 > .pin1 to .U1 > .OUT4",
390
- },
391
- {
392
- pinIds: ["R11.1", "U1.10"],
393
- netId: ".R11 > .pin1 to .U1 > .OUT2",
394
- },
395
- {
396
- pinIds: ["R12.1", "U1.9"],
397
- netId: ".R12 > .pin1 to .U1 > .OUT1",
398
- },
399
- {
400
- pinIds: ["R1.1", "R12.2"],
401
- netId: ".R1 > .pin1 to .R12 > .pin2",
402
- },
403
- {
404
- pinIds: ["R3.1", "R10.2"],
405
- netId: ".R3 > .pin1 to .R10 > .pin2",
406
- },
407
- {
408
- pinIds: ["R5.1", "R8.2"],
409
- netId: ".R5 > .pin1 to .R8 > .pin2",
410
- },
411
- ],
412
- netConnections: [],
413
- availableNetLabelOrientations: {},
414
- maxMspPairDistance: 5,
415
- }
4
+ export { inputProblem }
416
5
 
417
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -1,78 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example10.json"
3
3
 
4
- export const inputProblem: InputProblem = {
5
- chips: [
6
- {
7
- chipId: "schematic_component_0",
8
- center: {
9
- x: -2,
10
- y: 0,
11
- },
12
- width: 0.8122621299999988,
13
- height: 1.1038501999999986,
14
- pins: [
15
- {
16
- pinId: "Q1_NPN.1",
17
- x: -2.2855604555,
18
- y: -0.5519250999999993,
19
- },
20
- {
21
- pinId: "Q1_NPN.2",
22
- x: -2.2855604555000015,
23
- y: 0.5519250999999993,
24
- },
25
- {
26
- pinId: "Q1_NPN.3",
27
- x: -1.5938689350000006,
28
- y: 0.004526300000001031,
29
- },
30
- ],
31
- },
32
- {
33
- chipId: "schematic_component_1",
34
- center: {
35
- x: 3.5,
36
- y: 0,
37
- },
38
- width: 0.8122621299999988,
39
- height: 1.1038501999999986,
40
- pins: [
41
- {
42
- pinId: "Q2_PNP.1",
43
- x: 3.2144395445,
44
- y: -0.5519250999999993,
45
- },
46
- {
47
- pinId: "Q2_PNP.2",
48
- x: 3.2144395444999985,
49
- y: 0.5519250999999993,
50
- },
51
- {
52
- pinId: "Q2_PNP.3",
53
- x: 3.9061310649999994,
54
- y: 0.004526300000001031,
55
- },
56
- ],
57
- },
58
- ],
59
- directConnections: [],
60
- netConnections: [
61
- {
62
- netId: "collector",
63
- pinIds: ["Q1_NPN.1", "Q2_PNP.1"],
64
- },
65
- {
66
- netId: "emitter",
67
- pinIds: ["Q1_NPN.2", "Q2_PNP.2"],
68
- },
69
- {
70
- netId: "base",
71
- pinIds: ["Q1_NPN.3", "Q2_PNP.3"],
72
- },
73
- ],
74
- availableNetLabelOrientations: {},
75
- maxMspPairDistance: 2,
76
- }
4
+ export { inputProblem }
77
5
 
78
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -1,119 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example11.json"
3
3
 
4
- export const inputProblem: InputProblem = {
5
- chips: [
6
- {
7
- chipId: "schematic_component_0",
8
- center: {
9
- x: -1.03,
10
- y: 0.765,
11
- },
12
- width: 1.06,
13
- height: 0.388910699999999,
14
- pins: [
15
- {
16
- pinId: "R1.1",
17
- x: -1.58,
18
- y: 0.765,
19
- },
20
- {
21
- pinId: "R1.2",
22
- x: -0.48,
23
- y: 0.765,
24
- },
25
- ],
26
- },
27
- {
28
- chipId: "schematic_component_1",
29
- center: {
30
- x: 1.03,
31
- y: 0.765,
32
- },
33
- width: 1.06,
34
- height: 0.388910699999999,
35
- pins: [
36
- {
37
- pinId: "R2.1",
38
- x: 0.48,
39
- y: 0.765,
40
- },
41
- {
42
- pinId: "R2.2",
43
- x: 1.58,
44
- y: 0.765,
45
- },
46
- ],
47
- },
48
- {
49
- chipId: "schematic_component_2",
50
- center: {
51
- x: -1.03,
52
- y: -0.765,
53
- },
54
- width: 1.06,
55
- height: 0.388910699999999,
56
- pins: [
57
- {
58
- pinId: "R3.1",
59
- x: -1.58,
60
- y: -0.765,
61
- },
62
- {
63
- pinId: "R3.2",
64
- x: -0.48,
65
- y: -0.765,
66
- },
67
- ],
68
- },
69
- {
70
- chipId: "schematic_component_3",
71
- center: {
72
- x: 1.03,
73
- y: -0.765,
74
- },
75
- width: 0.88,
76
- height: 0.53,
77
- pins: [
78
- {
79
- pinId: "J1.1",
80
- x: 0.5800000000000001,
81
- y: -0.665,
82
- },
83
- {
84
- pinId: "J1.2",
85
- x: 1.03,
86
- y: -1.0150000000000001,
87
- },
88
- {
89
- pinId: "J1.3",
90
- x: 1.48,
91
- y: -0.665,
92
- },
93
- ],
94
- },
95
- ],
96
- directConnections: [
97
- {
98
- pinIds: ["R2.1", "R3.2"],
99
- netId: ".R2 > .pin1 to .R3 > .pin2",
100
- },
101
- {
102
- pinIds: ["R2.2", "R3.1"],
103
- netId: ".R2 > .pin2 to .R3 > .pin1",
104
- },
105
- {
106
- pinIds: ["J1.1", "R1.1"],
107
- netId: ".J1 > .pin1 to .R1 > .pin1",
108
- },
109
- {
110
- pinIds: ["J1.3", "R1.2"],
111
- netId: ".J1 > .pin3 to .R1 > .pin2",
112
- },
113
- ],
114
- netConnections: [],
115
- availableNetLabelOrientations: {},
116
- maxMspPairDistance: 5,
117
- }
4
+ export { inputProblem }
118
5
 
119
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -1,97 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example12.json"
3
3
 
4
- export const inputProblem: InputProblem = {
5
- chips: [
6
- {
7
- chipId: "schematic_component_0",
8
- center: {
9
- x: 0,
10
- y: 0,
11
- },
12
- width: 1.4000000000000001,
13
- height: 0.8,
14
- pins: [
15
- {
16
- pinId: "J1.1",
17
- x: 1.1,
18
- y: 0.2,
19
- },
20
- {
21
- pinId: "J1.2",
22
- x: 1.1,
23
- y: 0,
24
- },
25
- {
26
- pinId: "J1.3",
27
- x: 1.1,
28
- y: -0.2,
29
- },
30
- ],
31
- },
32
- {
33
- chipId: "schematic_component_1",
34
- center: {
35
- x: 1.0999999999999996,
36
- y: -1.7944553499999996,
37
- },
38
- width: 1.06,
39
- height: 0.388910699999999,
40
- pins: [
41
- {
42
- pinId: "R1.1",
43
- x: 0.5499999999999996,
44
- y: -1.7944553499999996,
45
- },
46
- {
47
- pinId: "R1.2",
48
- x: 1.6499999999999997,
49
- y: -1.7944553499999996,
50
- },
51
- ],
52
- },
53
- {
54
- chipId: "schematic_component_2",
55
- center: {
56
- x: 2.86,
57
- y: 0.01999999999999985,
58
- },
59
- width: 1.06,
60
- height: 0.84,
61
- pins: [
62
- {
63
- pinId: "C1.1",
64
- x: 2.3099999999999996,
65
- y: 0.01999999999999985,
66
- },
67
- {
68
- pinId: "C1.2",
69
- x: 3.41,
70
- y: 0.01999999999999985,
71
- },
72
- ],
73
- },
74
- ],
75
- directConnections: [],
76
- netConnections: [
77
- {
78
- netId: "VCC",
79
- pinIds: ["J1.1", "C1.1"],
80
- },
81
- {
82
- netId: "OUT",
83
- pinIds: ["J1.2", "R1.1"],
84
- },
85
- {
86
- netId: "GND",
87
- pinIds: ["J1.3", "R1.2", "C1.2"],
88
- },
89
- ],
90
- availableNetLabelOrientations: {
91
- VCC: ["y+"],
92
- GND: ["y-"],
93
- },
94
- maxMspPairDistance: 5,
95
- }
4
+ export { inputProblem }
96
5
 
97
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />