@tscircuit/schematic-trace-solver 0.0.25 → 0.0.27

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 (62) hide show
  1. package/.github/workflows/bun-test.yml +8 -0
  2. package/README.md +28 -0
  3. package/bunfig.toml +2 -2
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +31 -6136
  6. package/lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver.ts +0 -1
  7. package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver.ts +11 -0
  8. package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver_visualize.ts +0 -1
  9. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver.ts +0 -2
  10. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver/SchematicTraceSingleLineSolver.ts +0 -1
  11. package/lib/solvers/TraceOverlapShiftSolver/TraceOverlapIssueSolver/TraceOverlapIssueSolver.ts +0 -2
  12. package/lib/solvers/TraceOverlapShiftSolver/TraceOverlapShiftSolver.ts +0 -1
  13. package/package.json +6 -7
  14. package/site/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver01.page.tsx +574 -0
  15. package/site/components/DownloadDropdown.tsx +4 -2
  16. package/site/examples/example01-basic.page.tsx +1 -1
  17. package/site/examples/example02.page.tsx +1 -1
  18. package/site/examples/example03.page.tsx +1 -1
  19. package/site/examples/example04-single-symbol.page.tsx +1 -1
  20. package/site/examples/example05.page.tsx +1 -1
  21. package/site/examples/example06.page.tsx +1 -1
  22. package/site/examples/example07.page.tsx +1 -1
  23. package/site/examples/example08.page.tsx +1 -1
  24. package/site/examples/example09.page.tsx +1 -1
  25. package/site/examples/example10.page.tsx +1 -1
  26. package/site/examples/example11.page.tsx +1 -1
  27. package/site/examples/example12.page.tsx +1 -1
  28. package/site/examples/example13.page.tsx +219 -0
  29. package/site/examples/example14.page.tsx +210 -0
  30. package/tests/__snapshots__/svg.snap.svg +3 -0
  31. package/tests/examples/__snapshots__/example01.snap.svg +157 -0
  32. package/tests/examples/__snapshots__/example02.snap.svg +262 -0
  33. package/tests/examples/__snapshots__/example03.snap.svg +282 -0
  34. package/tests/examples/__snapshots__/example04.snap.svg +87 -0
  35. package/tests/examples/__snapshots__/example05.snap.svg +190 -0
  36. package/tests/examples/__snapshots__/example06.snap.svg +94 -0
  37. package/tests/examples/__snapshots__/example07.snap.svg +204 -0
  38. package/tests/examples/__snapshots__/example08.snap.svg +136 -0
  39. package/tests/examples/__snapshots__/example09.snap.svg +484 -0
  40. package/tests/examples/__snapshots__/example10.snap.svg +135 -0
  41. package/tests/examples/__snapshots__/example11.snap.svg +162 -0
  42. package/tests/examples/__snapshots__/example12.snap.svg +145 -0
  43. package/tests/examples/__snapshots__/example13.snap.svg +316 -0
  44. package/tests/examples/__snapshots__/example14.snap.svg +213 -0
  45. package/tests/examples/example01.test.ts +12 -0
  46. package/tests/examples/example02.test.ts +12 -0
  47. package/tests/examples/example03.test.ts +12 -0
  48. package/tests/examples/example04.test.ts +12 -0
  49. package/tests/examples/example05.test.ts +12 -0
  50. package/tests/examples/example06.test.ts +12 -0
  51. package/tests/examples/example07.test.ts +12 -0
  52. package/tests/examples/example08.test.ts +12 -0
  53. package/tests/examples/example09.test.ts +12 -0
  54. package/tests/examples/example10.test.ts +12 -0
  55. package/tests/examples/example11.test.tsx +12 -0
  56. package/tests/examples/example12.test.tsx +12 -0
  57. package/tests/examples/example13.test.tsx +12 -0
  58. package/tests/examples/example14.test.tsx +12 -0
  59. package/tests/fixtures/matcher.ts +62 -0
  60. package/tests/fixtures/preload.ts +1 -0
  61. package/tests/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver01.test.ts +13 -0
  62. package/tests/svg.test.ts +11 -0
@@ -306,7 +306,6 @@ export class NetLabelPlacementSolver extends BaseSolver {
306
306
  graphics.lines!.push({
307
307
  points: trace.tracePath,
308
308
  strokeColor: "purple",
309
- strokeWidth: 0.005,
310
309
  })
311
310
  }
312
311
 
@@ -87,6 +87,17 @@ export class SingleNetLabelPlacementSolver extends BaseSolver {
87
87
  new ChipObstacleSpatialIndex(params.inputProblem.chips)
88
88
  }
89
89
 
90
+ override getConstructorParams(): ConstructorParameters<
91
+ typeof SingleNetLabelPlacementSolver
92
+ >[0] {
93
+ return {
94
+ inputProblem: this.inputProblem,
95
+ inputTraceMap: this.inputTraceMap,
96
+ overlappingSameNetTraceGroup: this.overlappingSameNetTraceGroup,
97
+ availableOrientations: this.availableOrientations,
98
+ }
99
+ }
100
+
90
101
  override _step() {
91
102
  if (this.netLabelPlacement) {
92
103
  this.solved = true
@@ -26,7 +26,6 @@ export function visualizeSingleNetLabelPlacementSolver(
26
26
  graphics.lines!.push({
27
27
  points: trace.tracePath,
28
28
  strokeColor: isHost ? groupStroke : groupFill,
29
- strokeWidth: isHost ? 0.006 : 0.003,
30
29
  strokeDash: isHost ? undefined : "4 2",
31
30
  } as any)
32
31
  }
@@ -132,7 +132,6 @@ export class SchematicTraceLinesSolver extends BaseSolver {
132
132
  for (const { mspPairId, tracePath } of this.solvedTracePaths) {
133
133
  graphics.lines!.push({
134
134
  points: tracePath,
135
- strokeWidth: 0.005,
136
135
  strokeColor: "green",
137
136
  })
138
137
  }
@@ -146,7 +145,6 @@ export class SchematicTraceLinesSolver extends BaseSolver {
146
145
  ],
147
146
  strokeColor: "red",
148
147
  strokeDash: "4 2",
149
- strokeWidth: 0.004,
150
148
  })
151
149
  }
152
150
 
@@ -241,7 +241,6 @@ export class SchematicTraceSingleLineSolver extends BaseSolver {
241
241
  graphics.lines!.push({
242
242
  points: this.queuedCandidatePaths[0],
243
243
  strokeColor: "orange",
244
- strokeWidth: boundsWidth * 0.005,
245
244
  })
246
245
  }
247
246
 
@@ -162,7 +162,6 @@ export class TraceOverlapIssueSolver extends BaseSolver {
162
162
  graphics.lines!.push({
163
163
  points: [segStart, segEnd],
164
164
  strokeColor: "red",
165
- strokeWidth: 0.006,
166
165
  })
167
166
  }
168
167
  }
@@ -173,7 +172,6 @@ export class TraceOverlapIssueSolver extends BaseSolver {
173
172
  points: trace.tracePath,
174
173
  strokeColor: "blue",
175
174
  strokeDash: "4 2",
176
- strokeWidth: 0.004,
177
175
  })
178
176
  }
179
177
 
@@ -255,7 +255,6 @@ export class TraceOverlapShiftSolver extends BaseSolver {
255
255
  graphics.lines!.push({
256
256
  points: trace.tracePath,
257
257
  strokeColor: "purple",
258
- strokeWidth: 0.005,
259
258
  })
260
259
  }
261
260
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tscircuit/schematic-trace-solver",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.25",
4
+ "version": "0.0.27",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "start": "cosmos",
8
- "build": "tsup lib/index.ts --format esm --dts",
8
+ "build": "tsup-node lib/index.ts --format esm --dts",
9
9
  "format": "biome format --write .",
10
10
  "format:check": "biome format ."
11
11
  },
@@ -13,21 +13,20 @@
13
13
  "@biomejs/biome": "^2.2.2",
14
14
  "@react-hook/resize-observer": "^2.0.2",
15
15
  "@tscircuit/math-utils": "^0.0.19",
16
- "@types/bun": "latest",
16
+ "@types/bun": "^1.2.21",
17
+ "bun-match-svg": "^0.0.13",
17
18
  "calculate-elbow": "^0.0.11",
18
19
  "connectivity-map": "^1.0.0",
19
20
  "flatbush": "^4.5.0",
20
21
  "graphics-debug": "^0.0.62",
22
+ "react": "^19.1.1",
21
23
  "react-cosmos": "^7.0.0",
22
24
  "react-cosmos-plugin-vite": "^7.0.0",
25
+ "react-dom": "^19.1.1",
23
26
  "tsup": "^8.5.0",
24
27
  "vite": "^7.1.3"
25
28
  },
26
29
  "peerDependencies": {
27
30
  "typescript": "^5"
28
- },
29
- "dependencies": {
30
- "react": "^19.1.1",
31
- "react-dom": "^19.1.1"
32
31
  }
33
32
  }
@@ -0,0 +1,574 @@
1
+ import { useMemo } from "react"
2
+ import { GenericSolverDebugger } from "../components/GenericSolverDebugger"
3
+ import { SingleNetLabelPlacementSolver } from "lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver"
4
+
5
+ export const input = {
6
+ inputProblem: {
7
+ chips: [
8
+ {
9
+ chipId: "schematic_component_0",
10
+ center: {
11
+ x: 0,
12
+ y: 0,
13
+ },
14
+ width: 2.4000000000000004,
15
+ height: 1,
16
+ pins: [
17
+ {
18
+ pinId: "U1.1",
19
+ x: 1.2000000000000002,
20
+ y: -0.30000000000000004,
21
+ },
22
+ {
23
+ pinId: "U1.2",
24
+ x: -1.2000000000000002,
25
+ y: -0.30000000000000004,
26
+ },
27
+ {
28
+ pinId: "U1.3",
29
+ x: 1.2000000000000002,
30
+ y: 0.09999999999999998,
31
+ },
32
+ {
33
+ pinId: "U1.4",
34
+ x: -1.2000000000000002,
35
+ y: 0.30000000000000004,
36
+ },
37
+ {
38
+ pinId: "U1.5",
39
+ x: -1.2000000000000002,
40
+ y: 0.10000000000000003,
41
+ },
42
+ {
43
+ pinId: "U1.6",
44
+ x: -1.2000000000000002,
45
+ y: -0.09999999999999998,
46
+ },
47
+ {
48
+ pinId: "U1.7",
49
+ x: 1.2000000000000002,
50
+ y: -0.10000000000000003,
51
+ },
52
+ {
53
+ pinId: "U1.8",
54
+ x: 1.2000000000000002,
55
+ y: 0.30000000000000004,
56
+ },
57
+ ],
58
+ },
59
+ {
60
+ chipId: "schematic_component_1",
61
+ center: {
62
+ x: 2.45,
63
+ y: -0.10000000000000009,
64
+ },
65
+ width: 1.0999999999999996,
66
+ height: 0.388910699999999,
67
+ pins: [
68
+ {
69
+ pinId: "R1.1",
70
+ x: 3,
71
+ y: -0.10000000000000016,
72
+ },
73
+ {
74
+ pinId: "R1.2",
75
+ x: 1.9000000000000004,
76
+ y: -0.10000000000000002,
77
+ },
78
+ ],
79
+ },
80
+ {
81
+ chipId: "schematic_component_2",
82
+ center: {
83
+ x: 0.6500000000000001,
84
+ y: -1.2944553500000002,
85
+ },
86
+ width: 1.1,
87
+ height: 0.388910699999999,
88
+ pins: [
89
+ {
90
+ pinId: "R2.1",
91
+ x: 1.2000000000000002,
92
+ y: -1.2944553500000002,
93
+ },
94
+ {
95
+ pinId: "R2.2",
96
+ x: 0.10000000000000009,
97
+ y: -1.2944553500000002,
98
+ },
99
+ ],
100
+ },
101
+ {
102
+ chipId: "schematic_component_3",
103
+ center: {
104
+ x: -1.2000000000000002,
105
+ y: -1.7000000000000002,
106
+ },
107
+ width: 1.06,
108
+ height: 1.1,
109
+ pins: [
110
+ {
111
+ pinId: "C1.1",
112
+ x: -1.2000000000000002,
113
+ y: -1.1500000000000001,
114
+ },
115
+ {
116
+ pinId: "C1.2",
117
+ x: -1.2000000000000002,
118
+ y: -2.25,
119
+ },
120
+ ],
121
+ },
122
+ {
123
+ chipId: "schematic_component_4",
124
+ center: {
125
+ x: -2.45,
126
+ y: 0.10000000000000009,
127
+ },
128
+ width: 1.0999999999999996,
129
+ height: 0.84,
130
+ pins: [
131
+ {
132
+ pinId: "C2.1",
133
+ x: -1.9000000000000004,
134
+ y: 0.10000000000000002,
135
+ },
136
+ {
137
+ pinId: "C2.2",
138
+ x: -3,
139
+ y: 0.10000000000000016,
140
+ },
141
+ ],
142
+ },
143
+ {
144
+ chipId: "schematic_component_5",
145
+ center: {
146
+ x: 1.2000000000000002,
147
+ y: 1.7000000000000002,
148
+ },
149
+ width: 1.06,
150
+ height: 1.1,
151
+ pins: [
152
+ {
153
+ pinId: "R3.1",
154
+ x: 1.2000000000000002,
155
+ y: 1.1500000000000001,
156
+ },
157
+ {
158
+ pinId: "R3.2",
159
+ x: 1.2000000000000002,
160
+ y: 2.25,
161
+ },
162
+ ],
163
+ },
164
+ ],
165
+ directConnections: [
166
+ {
167
+ pinIds: ["U1.5", "C2.1"],
168
+ netId: "U1.CTRL to C2.pin1",
169
+ },
170
+ {
171
+ pinIds: ["U1.6", "U1.2"],
172
+ netId: "U1.THRES to U1.TRIG",
173
+ },
174
+ {
175
+ pinIds: ["R1.2", "U1.7"],
176
+ netId: "R1.pin2 to U1.DISCH",
177
+ },
178
+ {
179
+ pinIds: ["U1.7", "R2.1"],
180
+ netId: "U1.DISCH to R2.pin1",
181
+ },
182
+ {
183
+ pinIds: ["R2.2", "U1.6"],
184
+ netId: "R2.pin2 to U1.THRES",
185
+ },
186
+ {
187
+ pinIds: ["U1.6", "C1.1"],
188
+ netId: "U1.THRES to C1.pin1",
189
+ },
190
+ {
191
+ pinIds: ["U1.3", "R3.1"],
192
+ netId: "U1.OUT to R3.pin1",
193
+ },
194
+ ],
195
+ netConnections: [
196
+ {
197
+ netId: "GND",
198
+ pinIds: ["U1.1", "C1.2", "C2.2"],
199
+ },
200
+ {
201
+ netId: "VCC",
202
+ pinIds: ["U1.4", "U1.8", "R1.1"],
203
+ },
204
+ ],
205
+ availableNetLabelOrientations: {
206
+ VCC: ["y+"],
207
+ GND: ["y-"],
208
+ },
209
+ maxMspPairDistance: 2.4,
210
+ },
211
+ inputTraceMap: {
212
+ "U1.5-C2.1": {
213
+ mspPairId: "U1.5-C2.1",
214
+ dcConnNetId: "connectivity_net0",
215
+ globalConnNetId: "connectivity_net0",
216
+ userNetId: "U1.CTRL to C2.pin1",
217
+ pins: [
218
+ {
219
+ pinId: "U1.5",
220
+ x: -1.2000000000000002,
221
+ y: 0.10000000000000003,
222
+ chipId: "schematic_component_0",
223
+ },
224
+ {
225
+ pinId: "C2.1",
226
+ x: -1.9000000000000004,
227
+ y: 0.10000000000000002,
228
+ chipId: "schematic_component_4",
229
+ },
230
+ ],
231
+ tracePath: [
232
+ {
233
+ x: -1.2000000000000002,
234
+ y: 0.10000000000000003,
235
+ },
236
+ {
237
+ x: -1.4000000000000001,
238
+ y: 0.10000000000000003,
239
+ },
240
+ {
241
+ x: -1.5500000000000003,
242
+ y: 0.10000000000000003,
243
+ },
244
+ {
245
+ x: -1.5500000000000003,
246
+ y: 0.10000000000000002,
247
+ },
248
+ {
249
+ x: -1.7000000000000004,
250
+ y: 0.10000000000000002,
251
+ },
252
+ {
253
+ x: -1.9000000000000004,
254
+ y: 0.10000000000000002,
255
+ },
256
+ ],
257
+ mspConnectionPairIds: ["U1.5-C2.1"],
258
+ pinIds: ["U1.5", "C2.1"],
259
+ },
260
+ "U1.2-C1.1": {
261
+ mspPairId: "U1.2-C1.1",
262
+ dcConnNetId: "connectivity_net1",
263
+ globalConnNetId: "connectivity_net1",
264
+ userNetId: "U1.THRES to U1.TRIG",
265
+ pins: [
266
+ {
267
+ pinId: "U1.2",
268
+ x: -1.2000000000000002,
269
+ y: -0.30000000000000004,
270
+ chipId: "schematic_component_0",
271
+ },
272
+ {
273
+ pinId: "C1.1",
274
+ x: -1.2000000000000002,
275
+ y: -1.1500000000000001,
276
+ chipId: "schematic_component_3",
277
+ },
278
+ ],
279
+ tracePath: [
280
+ {
281
+ x: -1.2000000000000002,
282
+ y: -0.30000000000000004,
283
+ },
284
+ {
285
+ x: -1.4000000000000001,
286
+ y: -0.30000000000000004,
287
+ },
288
+ {
289
+ x: -1.4000000000000001,
290
+ y: -0.7250000000000001,
291
+ },
292
+ {
293
+ x: -1.2000000000000002,
294
+ y: -0.7250000000000001,
295
+ },
296
+ {
297
+ x: -1.2000000000000002,
298
+ y: -1.1500000000000001,
299
+ },
300
+ ],
301
+ mspConnectionPairIds: ["U1.2-C1.1"],
302
+ pinIds: ["U1.2", "C1.1"],
303
+ },
304
+ "U1.6-U1.2": {
305
+ mspPairId: "U1.6-U1.2",
306
+ dcConnNetId: "connectivity_net1",
307
+ globalConnNetId: "connectivity_net1",
308
+ userNetId: "U1.THRES to C1.pin1",
309
+ pins: [
310
+ {
311
+ pinId: "U1.6",
312
+ x: -1.2000000000000002,
313
+ y: -0.09999999999999998,
314
+ chipId: "schematic_component_0",
315
+ },
316
+ {
317
+ pinId: "U1.2",
318
+ x: -1.2000000000000002,
319
+ y: -0.30000000000000004,
320
+ chipId: "schematic_component_0",
321
+ },
322
+ ],
323
+ tracePath: [
324
+ {
325
+ x: -1.2000000000000002,
326
+ y: -0.09999999999999998,
327
+ },
328
+ {
329
+ x: -1.4000000000000001,
330
+ y: -0.09999999999999998,
331
+ },
332
+ {
333
+ x: -1.4000000000000001,
334
+ y: -0.30000000000000004,
335
+ },
336
+ {
337
+ x: -1.2000000000000002,
338
+ y: -0.30000000000000004,
339
+ },
340
+ ],
341
+ mspConnectionPairIds: ["U1.6-U1.2"],
342
+ pinIds: ["U1.6", "U1.2"],
343
+ },
344
+ "R2.2-C1.1": {
345
+ mspPairId: "R2.2-C1.1",
346
+ dcConnNetId: "connectivity_net1",
347
+ globalConnNetId: "connectivity_net1",
348
+ userNetId: "R2.pin2 to U1.THRES",
349
+ pins: [
350
+ {
351
+ pinId: "R2.2",
352
+ x: 0.10000000000000009,
353
+ y: -1.2944553500000002,
354
+ chipId: "schematic_component_2",
355
+ },
356
+ {
357
+ pinId: "C1.1",
358
+ x: -1.2000000000000002,
359
+ y: -1.1500000000000001,
360
+ chipId: "schematic_component_3",
361
+ },
362
+ ],
363
+ tracePath: [
364
+ {
365
+ x: 0.09999999999999987,
366
+ y: -1.2944553500000002,
367
+ },
368
+ {
369
+ x: -0.55,
370
+ y: -1.2944553500000002,
371
+ },
372
+ {
373
+ x: -0.55,
374
+ y: -0.9500000000000002,
375
+ },
376
+ {
377
+ x: -1.2000000000000002,
378
+ y: -0.9500000000000002,
379
+ },
380
+ {
381
+ x: -1.2000000000000002,
382
+ y: -1.1500000000000001,
383
+ },
384
+ ],
385
+ mspConnectionPairIds: ["R2.2-C1.1"],
386
+ pinIds: ["R2.2", "C1.1"],
387
+ },
388
+ "U1.7-R1.2": {
389
+ mspPairId: "U1.7-R1.2",
390
+ dcConnNetId: "connectivity_net2",
391
+ globalConnNetId: "connectivity_net2",
392
+ userNetId: "U1.DISCH to R2.pin1",
393
+ pins: [
394
+ {
395
+ pinId: "U1.7",
396
+ x: 1.2000000000000002,
397
+ y: -0.10000000000000003,
398
+ chipId: "schematic_component_0",
399
+ },
400
+ {
401
+ pinId: "R1.2",
402
+ x: 1.9000000000000004,
403
+ y: -0.10000000000000002,
404
+ chipId: "schematic_component_1",
405
+ },
406
+ ],
407
+ tracePath: [
408
+ {
409
+ x: 1.2000000000000002,
410
+ y: -0.10000000000000003,
411
+ },
412
+ {
413
+ x: 1.4000000000000001,
414
+ y: -0.10000000000000003,
415
+ },
416
+ {
417
+ x: 1.5500000000000003,
418
+ y: -0.10000000000000003,
419
+ },
420
+ {
421
+ x: 1.5500000000000003,
422
+ y: -0.10000000000000002,
423
+ },
424
+ {
425
+ x: 1.7000000000000004,
426
+ y: -0.10000000000000002,
427
+ },
428
+ {
429
+ x: 1.9000000000000004,
430
+ y: -0.10000000000000002,
431
+ },
432
+ ],
433
+ mspConnectionPairIds: ["U1.7-R1.2"],
434
+ pinIds: ["U1.7", "R1.2"],
435
+ },
436
+ "R2.1-U1.7": {
437
+ mspPairId: "R2.1-U1.7",
438
+ dcConnNetId: "connectivity_net2",
439
+ globalConnNetId: "connectivity_net2",
440
+ userNetId: "U1.DISCH to R2.pin1",
441
+ pins: [
442
+ {
443
+ pinId: "R2.1",
444
+ x: 1.2000000000000002,
445
+ y: -1.2944553500000002,
446
+ chipId: "schematic_component_2",
447
+ },
448
+ {
449
+ pinId: "U1.7",
450
+ x: 1.2000000000000002,
451
+ y: -0.10000000000000003,
452
+ chipId: "schematic_component_0",
453
+ },
454
+ ],
455
+ tracePath: [
456
+ {
457
+ x: 1.2000000000000002,
458
+ y: -1.2944553500000002,
459
+ },
460
+ {
461
+ x: 1.4000000000000001,
462
+ y: -1.2944553500000002,
463
+ },
464
+ {
465
+ x: 1.4000000000000001,
466
+ y: -0.10000000000000003,
467
+ },
468
+ {
469
+ x: 1.2000000000000002,
470
+ y: -0.10000000000000003,
471
+ },
472
+ ],
473
+ mspConnectionPairIds: ["R2.1-U1.7"],
474
+ pinIds: ["R2.1", "U1.7"],
475
+ },
476
+ "U1.3-R3.1": {
477
+ mspPairId: "U1.3-R3.1",
478
+ dcConnNetId: "connectivity_net3",
479
+ globalConnNetId: "connectivity_net3",
480
+ userNetId: "U1.OUT to R3.pin1",
481
+ pins: [
482
+ {
483
+ pinId: "U1.3",
484
+ x: 1.2000000000000002,
485
+ y: 0.09999999999999998,
486
+ chipId: "schematic_component_0",
487
+ },
488
+ {
489
+ pinId: "R3.1",
490
+ x: 1.2000000000000002,
491
+ y: 1.1500000000000001,
492
+ chipId: "schematic_component_5",
493
+ },
494
+ ],
495
+ tracePath: [
496
+ {
497
+ x: 1.2000000000000002,
498
+ y: 0.09999999999999998,
499
+ },
500
+ {
501
+ x: 1.4000000000000001,
502
+ y: 0.09999999999999998,
503
+ },
504
+ {
505
+ x: 1.4000000000000001,
506
+ y: 0.625,
507
+ },
508
+ {
509
+ x: 1.2000000000000002,
510
+ y: 0.625,
511
+ },
512
+ {
513
+ x: 1.2000000000000002,
514
+ y: 1.1500000000000001,
515
+ },
516
+ ],
517
+ mspConnectionPairIds: ["U1.3-R3.1"],
518
+ pinIds: ["U1.3", "R3.1"],
519
+ },
520
+ "U1.8-R1.1": {
521
+ mspPairId: "U1.8-R1.1",
522
+ dcConnNetId: "connectivity_net5",
523
+ globalConnNetId: "connectivity_net5",
524
+ userNetId: "VCC",
525
+ pins: [
526
+ {
527
+ pinId: "U1.8",
528
+ x: 1.2000000000000002,
529
+ y: 0.30000000000000004,
530
+ chipId: "schematic_component_0",
531
+ },
532
+ {
533
+ pinId: "R1.1",
534
+ x: 3,
535
+ y: -0.10000000000000016,
536
+ chipId: "schematic_component_1",
537
+ },
538
+ ],
539
+ tracePath: [
540
+ {
541
+ x: 1.2000000000000002,
542
+ y: 0.30000000000000004,
543
+ },
544
+ {
545
+ x: 3.2,
546
+ y: 0.30000000000000004,
547
+ },
548
+ {
549
+ x: 3.2,
550
+ y: -0.10000000000000016,
551
+ },
552
+ {
553
+ x: 3,
554
+ y: -0.10000000000000016,
555
+ },
556
+ ],
557
+ mspConnectionPairIds: ["U1.8-R1.1"],
558
+ pinIds: ["U1.8", "R1.1"],
559
+ },
560
+ },
561
+ overlappingSameNetTraceGroup: {
562
+ globalConnNetId: "connectivity_net4",
563
+ netId: "GND",
564
+ portOnlyPinId: "U1.1",
565
+ },
566
+ availableOrientations: ["x+", "x-", "y+", "y-"],
567
+ }
568
+
569
+ export default () => {
570
+ const solver = useMemo(() => {
571
+ return new SingleNetLabelPlacementSolver(input as any)
572
+ }, [])
573
+ return <GenericSolverDebugger solver={solver} />
574
+ }