@tscircuit/schematic-trace-solver 0.0.48 → 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 (162) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +51 -1
  3. package/dist/index.js +730 -43
  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/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +16 -0
  11. package/package.json +1 -1
  12. package/site/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2_01-example17-d1_1-u1_1.page.tsx +2 -0
  13. package/site/TraceCleanupSolver/TraceCleanupSolver.page.tsx +23 -0
  14. package/site/TraceLabelOverlapAvoidanceSolver/MergedNetLabelObstacles.page.tsx +18 -0
  15. package/site/TraceLabelOverlapAvoidanceSolver/OverlapAvoidanceStepSolver.page.tsx +24 -0
  16. package/site/TraceLabelOverlapAvoidanceSolver/SingleOverlapSolver.page.tsx +10 -0
  17. package/site/TraceLabelOverlapAvoidanceSolver/TraceLabelOverlapAvoidanceSolver.page.tsx +146 -0
  18. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView01.page.tsx +32 -0
  19. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView02.page.tsx +32 -0
  20. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView03.page.tsx +35 -0
  21. package/site/examples/example01.page.tsx +6 -0
  22. package/site/examples/example02.page.tsx +4 -180
  23. package/site/examples/example03.page.tsx +3 -212
  24. package/site/examples/example04.page.tsx +6 -0
  25. package/site/examples/example05.page.tsx +3 -179
  26. package/site/examples/example06.page.tsx +3 -57
  27. package/site/examples/example07.page.tsx +3 -132
  28. package/site/examples/example08.page.tsx +3 -91
  29. package/site/examples/example09.page.tsx +3 -414
  30. package/site/examples/example10.page.tsx +3 -75
  31. package/site/examples/example11.page.tsx +3 -116
  32. package/site/examples/example12.page.tsx +3 -94
  33. package/site/examples/example13.page.tsx +3 -216
  34. package/site/examples/example14.page.tsx +3 -207
  35. package/site/examples/example15.page.tsx +6 -0
  36. package/site/examples/example16.page.tsx +6 -0
  37. package/site/examples/example17.page.tsx +6 -0
  38. package/site/examples/example18.page.tsx +3 -178
  39. package/site/examples/example19.page.tsx +3 -166
  40. package/site/examples/example20.page.tsx +3 -100
  41. package/site/examples/example21.page.tsx +3 -174
  42. package/site/examples/example22.page.tsx +3 -105
  43. package/site/examples/example23.page.tsx +3 -134
  44. package/site/examples/example24.page.tsx +3 -125
  45. package/site/examples/example25.page.tsx +2 -0
  46. package/site/examples/example26.page.tsx +2 -0
  47. package/site/examples/example27.page.tsx +2 -0
  48. package/site/examples/example28.page.tsx +3 -58
  49. package/site/examples/example29.page.tsx +6 -0
  50. package/site/examples/example30.page.tsx +6 -0
  51. package/site/examples/example31.page.tsx +4 -0
  52. package/tests/assets/example01.json +109 -0
  53. package/tests/assets/example02.json +178 -0
  54. package/tests/assets/example03.json +210 -0
  55. package/tests/assets/example04.json +41 -0
  56. package/tests/assets/example05.json +175 -0
  57. package/tests/assets/example06.json +55 -0
  58. package/tests/assets/example07.json +130 -0
  59. package/tests/assets/example08.json +89 -0
  60. package/tests/assets/example09.json +412 -0
  61. package/tests/assets/example10.json +73 -0
  62. package/tests/assets/example11.json +114 -0
  63. package/tests/assets/example12.json +92 -0
  64. package/tests/assets/example13.json +214 -0
  65. package/tests/assets/example14.json +205 -0
  66. package/tests/assets/example15.json +618 -0
  67. package/tests/assets/example16.json +102 -0
  68. package/tests/assets/example17.json +160 -0
  69. package/tests/assets/example18.json +176 -0
  70. package/tests/assets/example19.json +164 -0
  71. package/tests/assets/example20.json +98 -0
  72. package/tests/assets/example21.json +172 -0
  73. package/tests/assets/example22.json +103 -0
  74. package/tests/assets/example23.json +132 -0
  75. package/tests/assets/example24.json +123 -0
  76. package/tests/assets/example25.json +146 -33
  77. package/tests/assets/example26.json +51 -1134
  78. package/tests/assets/example27.json +151 -91
  79. package/tests/assets/example28.json +56 -0
  80. package/tests/assets/example29.json +1206 -0
  81. package/tests/assets/example30.json +168 -0
  82. package/tests/assets/example31.json +46 -0
  83. package/tests/examples/__snapshots__/example01.snap.svg +12 -6
  84. package/tests/examples/__snapshots__/example02.snap.svg +16 -8
  85. package/tests/examples/__snapshots__/example03.snap.svg +36 -18
  86. package/tests/examples/__snapshots__/example04.snap.svg +8 -4
  87. package/tests/examples/__snapshots__/example05.snap.svg +4 -2
  88. package/tests/examples/__snapshots__/example06.snap.svg +4 -2
  89. package/tests/examples/__snapshots__/example07.snap.svg +20 -10
  90. package/tests/examples/__snapshots__/example08.snap.svg +16 -8
  91. package/tests/examples/__snapshots__/example09.snap.svg +80 -40
  92. package/tests/examples/__snapshots__/example10.snap.svg +16 -8
  93. package/tests/examples/__snapshots__/example11.snap.svg +24 -12
  94. package/tests/examples/__snapshots__/example12.snap.svg +16 -8
  95. package/tests/examples/__snapshots__/example13.snap.svg +32 -16
  96. package/tests/examples/__snapshots__/example14.snap.svg +115 -48
  97. package/tests/examples/__snapshots__/example15.snap.svg +36 -18
  98. package/tests/examples/__snapshots__/example16.snap.svg +16 -8
  99. package/tests/examples/__snapshots__/example17.snap.svg +16 -8
  100. package/tests/examples/__snapshots__/example18.snap.svg +20 -10
  101. package/tests/examples/__snapshots__/example19.snap.svg +16 -8
  102. package/tests/examples/__snapshots__/example20.snap.svg +43 -135
  103. package/tests/examples/__snapshots__/example21.snap.svg +34 -18
  104. package/tests/examples/__snapshots__/example22.snap.svg +37 -23
  105. package/tests/examples/__snapshots__/example23.snap.svg +62 -26
  106. package/tests/examples/__snapshots__/example24.snap.svg +50 -28
  107. package/tests/examples/__snapshots__/example25.snap.svg +175 -49
  108. package/tests/examples/__snapshots__/example26.snap.svg +16 -8
  109. package/tests/examples/__snapshots__/example27.snap.svg +24 -12
  110. package/tests/examples/__snapshots__/example28.snap.svg +24 -18
  111. package/tests/examples/__snapshots__/example29.snap.svg +184 -92
  112. package/tests/examples/__snapshots__/example30.snap.svg +48 -24
  113. package/tests/examples/__snapshots__/example31.snap.svg +88 -0
  114. package/tests/examples/example01.test.ts +2 -2
  115. package/tests/examples/example02.test.ts +2 -2
  116. package/tests/examples/example03.test.ts +2 -2
  117. package/tests/examples/example04.test.ts +2 -2
  118. package/tests/examples/example05.test.ts +2 -2
  119. package/tests/examples/example06.test.ts +2 -2
  120. package/tests/examples/example07.test.ts +2 -2
  121. package/tests/examples/example08.test.ts +2 -2
  122. package/tests/examples/example09.test.ts +2 -2
  123. package/tests/examples/example10.test.ts +2 -2
  124. package/tests/examples/{example11.test.tsx → example11.test.ts} +2 -2
  125. package/tests/examples/{example12.test.tsx → example12.test.ts} +2 -2
  126. package/tests/examples/{example13.test.tsx → example13.test.ts} +2 -2
  127. package/tests/examples/example14.test.ts +12 -0
  128. package/tests/examples/example15.test.ts +12 -0
  129. package/tests/examples/example16.test.ts +12 -0
  130. package/tests/examples/example17.test.ts +12 -0
  131. package/tests/examples/example18.test.ts +12 -0
  132. package/tests/examples/example19.test.ts +12 -0
  133. package/tests/examples/example20.test.ts +12 -0
  134. package/tests/examples/example21.test.ts +12 -0
  135. package/tests/examples/example22.test.ts +12 -0
  136. package/tests/examples/example23.test.ts +12 -0
  137. package/tests/examples/example24.test.ts +12 -0
  138. package/tests/examples/example25.test.ts +12 -0
  139. package/tests/examples/example26.test.ts +12 -0
  140. package/tests/examples/example27.test.ts +3 -232
  141. package/tests/examples/example28.test.ts +2 -2
  142. package/tests/examples/example29.test.ts +1 -2
  143. package/tests/examples/example30.test.ts +2 -2
  144. package/tests/examples/example31.test.ts +12 -0
  145. package/site/examples/example01-basic.page.tsx +0 -105
  146. package/site/examples/example04-single-symbol.page.tsx +0 -46
  147. package/site/examples/example15-rp2040-caps.page.tsx +0 -623
  148. package/site/examples/example16-core-repro51.page.tsx +0 -107
  149. package/site/examples/example17-straight-line-trace.page.tsx +0 -165
  150. package/tests/examples/example14.test.tsx +0 -11
  151. package/tests/examples/example15.test.tsx +0 -629
  152. package/tests/examples/example16.test.tsx +0 -113
  153. package/tests/examples/example17.test.tsx +0 -171
  154. package/tests/examples/example18.test.tsx +0 -187
  155. package/tests/examples/example19.test.tsx +0 -175
  156. package/tests/examples/example20.test.tsx +0 -190
  157. package/tests/examples/example21.test.tsx +0 -183
  158. package/tests/examples/example22.test.tsx +0 -109
  159. package/tests/examples/example23.test.tsx +0 -109
  160. package/tests/examples/example24.test.tsx +0 -114
  161. package/tests/examples/example25.test.tsx +0 -143
  162. package/tests/examples/example26.test.tsx +0 -134
@@ -1,169 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example19.json"
3
3
 
4
- const inputProblem: InputProblem = {
5
- chips: [
6
- {
7
- chipId: "schematic_component_0",
8
- center: {
9
- x: 0,
10
- y: 0,
11
- },
12
- width: 0.4,
13
- height: 0.8,
14
- pins: [
15
- {
16
- pinId: "U1.6",
17
- x: 0.6000000000000001,
18
- y: -0.2,
19
- },
20
- {
21
- pinId: "U1.8",
22
- x: 0.6000000000000001,
23
- y: 0,
24
- },
25
- {
26
- pinId: "U1.1",
27
- x: 0.6000000000000001,
28
- y: 0.2,
29
- },
30
- ],
31
- },
32
- {
33
- chipId: "schematic_component_1",
34
- center: {
35
- x: 1.4,
36
- y: 0.55,
37
- },
38
- width: 0.5291665999999999,
39
- height: 1.0583333000000001,
40
- pins: [
41
- {
42
- pinId: "C2.1",
43
- x: 1.4002733499999995,
44
- y: -0.0012093000000001908,
45
- },
46
- {
47
- pinId: "C2.2",
48
- x: 1.3997266500000003,
49
- y: 1.1012093000000003,
50
- },
51
- ],
52
- },
53
- {
54
- chipId: "schematic_component_2",
55
- center: {
56
- x: 2.7,
57
- y: 1.3,
58
- },
59
- width: 1.0583332999999997,
60
- height: 0.388910699999999,
61
- pins: [
62
- {
63
- pinId: "R1.1",
64
- x: 2.1487093,
65
- y: 1.3002732499999994,
66
- },
67
- {
68
- pinId: "R1.2",
69
- x: 3.2512907000000006,
70
- y: 1.2997267500000007,
71
- },
72
- ],
73
- },
74
- {
75
- chipId: "schematic_component_3",
76
- center: {
77
- x: 4.4,
78
- y: 0,
79
- },
80
- width: 0.4,
81
- height: 0.4,
82
- pins: [
83
- {
84
- pinId: "JP5.1",
85
- x: 3.8000000000000003,
86
- y: 0,
87
- },
88
- ],
89
- },
90
- {
91
- chipId: "schematic_component_4",
92
- center: {
93
- x: 4.4,
94
- y: -0.9,
95
- },
96
- width: 0.4,
97
- height: 0.4,
98
- pins: [
99
- {
100
- pinId: "JP9.1",
101
- x: 3.8000000000000003,
102
- y: -0.9,
103
- },
104
- ],
105
- },
106
- {
107
- chipId: "schematic_component_5",
108
- center: {
109
- x: 2,
110
- y: -1.1,
111
- },
112
- width: 0.8843008999999997,
113
- height: 0.5299361999999987,
114
- pins: [
115
- {
116
- pinId: "JP8.1",
117
- x: 2.4458007999999998,
118
- y: -1.2015872704999997,
119
- },
120
- {
121
- pinId: "JP8.2",
122
- x: 2.0034928,
123
- y: -0.8474009705000005,
124
- },
125
- {
126
- pinId: "JP8.3",
127
- x: 1.5541992,
128
- y: -1.2014628704999997,
129
- },
130
- ],
131
- },
132
- ],
133
- directConnections: [
134
- {
135
- pinIds: ["C2.1", "U1.8"],
136
- netId: "capacitor.C2 > port.pin1 to .U1 > .pin8",
137
- },
138
- {
139
- pinIds: ["C2.2", "R1.1"],
140
- netId: "capacitor.C2 > port.pin2 to .R1 > .pin1",
141
- },
142
- {
143
- pinIds: ["R1.1", "U1.1"],
144
- netId: "resistor.R1 > port.pin1 to .U1 > .pin1",
145
- },
146
- {
147
- pinIds: ["JP5.1", "R1.2"],
148
- netId: "pinheader.JP5 > port.pin1 to .R1 > .pin2",
149
- },
150
- {
151
- pinIds: ["JP9.1", "R1.2"],
152
- netId: "pinheader.JP9 > port.pin1 to .R1 > .pin2",
153
- },
154
- {
155
- pinIds: ["JP8.2", "U1.6"],
156
- netId: "solderjumper.JP8 > port.pin2 to .U1 > .pin6",
157
- },
158
- ],
159
- netConnections: [
160
- {
161
- netId: "PAD",
162
- pinIds: ["R1.2", "JP5.1", "JP9.1"],
163
- },
164
- ],
165
- availableNetLabelOrientations: {},
166
- maxMspPairDistance: 5,
167
- }
4
+ export { inputProblem }
168
5
 
169
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -1,103 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example20.json"
3
3
 
4
- const inputProblem: InputProblem = {
5
- chips: [
6
- {
7
- chipId: "schematic_component_0",
8
- center: {
9
- x: 0,
10
- y: 0,
11
- },
12
- width: 2.4000000000000004,
13
- height: 1,
14
- pins: [
15
- {
16
- pinId: "U1.1",
17
- x: 1.2000000000000002,
18
- y: -0.30000000000000004,
19
- },
20
- {
21
- pinId: "U1.2",
22
- x: -1.2000000000000002,
23
- y: -0.30000000000000004,
24
- },
25
- {
26
- pinId: "U1.3",
27
- x: 1.2000000000000002,
28
- y: 0.09999999999999998,
29
- },
30
- {
31
- pinId: "U1.4",
32
- x: -1.2000000000000002,
33
- y: 0.30000000000000004,
34
- },
35
- {
36
- pinId: "U1.5",
37
- x: -1.2000000000000002,
38
- y: 0.10000000000000003,
39
- },
40
- {
41
- pinId: "U1.6",
42
- x: -1.2000000000000002,
43
- y: -0.09999999999999998,
44
- },
45
- {
46
- pinId: "U1.7",
47
- x: 1.2000000000000002,
48
- y: -0.10000000000000003,
49
- },
50
- {
51
- pinId: "U1.8",
52
- x: 1.2000000000000002,
53
- y: 0.30000000000000004,
54
- },
55
- ],
56
- },
57
- {
58
- chipId: "schematic_component_1",
59
- center: {
60
- x: 2.7,
61
- y: 1.9049999999999998,
62
- },
63
- width: 2.2,
64
- height: 0.8,
65
- pins: [
66
- {
67
- pinId: "J1.1",
68
- x: 1.6,
69
- y: 2.105,
70
- },
71
- {
72
- pinId: "J1.2",
73
- x: 1.6,
74
- y: 1.9049999999999998,
75
- },
76
- {
77
- pinId: "J1.3",
78
- x: 1.6,
79
- y: 1.7049999999999998,
80
- },
81
- ],
82
- },
83
- ],
84
- directConnections: [],
85
- netConnections: [
86
- {
87
- netId: "GND",
88
- pinIds: ["U1.1", "J1.3"],
89
- },
90
- {
91
- netId: "VCC",
92
- pinIds: ["U1.8", "J1.1"],
93
- },
94
- ],
95
- availableNetLabelOrientations: {
96
- VCC: ["y+"],
97
- OUT: ["x-", "x+"],
98
- GND: ["y-"],
99
- },
100
- maxMspPairDistance: 2.4,
101
- }
4
+ export { inputProblem }
102
5
 
103
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -1,177 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example21.json"
3
3
 
4
- const inputProblem: InputProblem = {
5
- chips: [
6
- {
7
- chipId: "schematic_component_0",
8
- center: {
9
- x: 0,
10
- y: 0,
11
- },
12
- width: 2,
13
- height: 2,
14
- pins: [
15
- {
16
- pinId: "CORNERS.1",
17
- x: -1.4,
18
- y: -0.6,
19
- },
20
- {
21
- pinId: "CORNERS.2",
22
- x: -1.4,
23
- y: 0.6,
24
- },
25
- {
26
- pinId: "CORNERS.3",
27
- x: 1.4,
28
- y: 0.6,
29
- },
30
- {
31
- pinId: "CORNERS.4",
32
- x: 1.4,
33
- y: -0.6,
34
- },
35
- ],
36
- },
37
- {
38
- chipId: "schematic_component_1",
39
- center: {
40
- x: 4.785,
41
- y: -0.3999999999999999,
42
- },
43
- width: 1.2000000000000002,
44
- height: 1,
45
- pins: [
46
- {
47
- pinId: "U100.1",
48
- x: 3.785,
49
- y: -0.29999999999999993,
50
- },
51
- {
52
- pinId: "U100.2",
53
- x: 4.785,
54
- y: -1.2999999999999998,
55
- },
56
- {
57
- pinId: "U100.3",
58
- x: 3.785,
59
- y: -0.4999999999999999,
60
- },
61
- {
62
- pinId: "U100.5",
63
- x: 5.785,
64
- y: -0.3999999999999999,
65
- },
66
- ],
67
- },
68
- {
69
- chipId: "schematic_component_2",
70
- center: {
71
- x: 6.7,
72
- y: -0.9499999999999993,
73
- },
74
- width: 0.53,
75
- height: 1.06,
76
- pins: [
77
- {
78
- pinId: "C101.1",
79
- x: 6.7,
80
- y: -0.39999999999999925,
81
- },
82
- {
83
- pinId: "C101.2",
84
- x: 6.7,
85
- y: -1.4999999999999993,
86
- },
87
- ],
88
- },
89
- {
90
- chipId: "schematic_component_3",
91
- center: {
92
- x: 2.8699999999999997,
93
- y: -1.75,
94
- },
95
- width: 0.53,
96
- height: 1.06,
97
- pins: [
98
- {
99
- pinId: "C100.1",
100
- x: 2.8699999999999997,
101
- y: -1.2,
102
- },
103
- {
104
- pinId: "C100.2",
105
- x: 2.8699999999999997,
106
- y: -2.3,
107
- },
108
- ],
109
- },
110
- {
111
- chipId: "schematic_component_4",
112
- center: {
113
- x: 2.9752723250000006,
114
- y: 0.050000000000000266,
115
- },
116
- width: 0.3194553499999995,
117
- height: 1.06,
118
- pins: [
119
- {
120
- pinId: "R100.1",
121
- x: 2.9752723250000006,
122
- y: 0.6000000000000001,
123
- },
124
- {
125
- pinId: "R100.2",
126
- x: 2.9752723250000006,
127
- y: -0.4999999999999998,
128
- },
129
- ],
130
- },
131
- ],
132
- directConnections: [
133
- {
134
- pinIds: ["C101.1", "U100.5"],
135
- netId: "group > capacitor.C101 > port.pin1 to U100.VOUT",
136
- },
137
- {
138
- pinIds: ["C100.1", "U100.1"],
139
- netId: "group > capacitor.C100 > port.pin1 to U100.VIN",
140
- },
141
- {
142
- pinIds: ["R100.2", "U100.3"],
143
- netId: "group > resistor.R100 > port.pin2 to U100.EN",
144
- },
145
- ],
146
- netConnections: [
147
- {
148
- netId: "GND",
149
- pinIds: ["CORNERS.1", "CORNERS.4", "U100.2", "C101.2", "C100.2"],
150
- netLabelWidth: 0.3,
151
- },
152
- {
153
- netId: "VIN",
154
- pinIds: ["CORNERS.2", "U100.1", "C100.1", "R100.1"],
155
- netLabelWidth: 0.3,
156
- },
157
- {
158
- netId: "VOUT",
159
- pinIds: ["CORNERS.3", "U100.5", "C101.1"],
160
- netLabelWidth: 0.4,
161
- },
162
- {
163
- netId: "LDO_EN",
164
- pinIds: ["U100.3", "R100.2"],
165
- netLabelWidth: 0.6,
166
- },
167
- ],
168
- availableNetLabelOrientations: {
169
- GND: ["y-"],
170
- VIN: ["y+"],
171
- VOUT: ["y+"],
172
- LDO_EN: ["x-", "x+"],
173
- },
174
- maxMspPairDistance: 2.4,
175
- } as InputProblem
4
+ export { inputProblem }
176
5
 
177
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -1,108 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example22.json"
3
3
 
4
- const inputProblem: InputProblem = {
5
- chips: [
6
- {
7
- chipId: "schematic_component_0",
8
- center: {
9
- x: 0,
10
- y: 0,
11
- },
12
- width: 2.4000000000000004,
13
- height: 1,
14
- pins: [
15
- {
16
- pinId: "U1.1",
17
- x: 1.2000000000000002,
18
- y: -0.30000000000000004,
19
- },
20
- {
21
- pinId: "U1.2",
22
- x: -1.2000000000000002,
23
- y: -0.30000000000000004,
24
- },
25
- {
26
- pinId: "U1.3",
27
- x: 1.2000000000000002,
28
- y: 0.09999999999999998,
29
- },
30
- {
31
- pinId: "U1.4",
32
- x: -1.2000000000000002,
33
- y: 0.30000000000000004,
34
- },
35
- {
36
- pinId: "U1.5",
37
- x: -1.2000000000000002,
38
- y: 0.10000000000000003,
39
- },
40
- {
41
- pinId: "U1.6",
42
- x: -1.2000000000000002,
43
- y: -0.09999999999999998,
44
- },
45
- {
46
- pinId: "U1.7",
47
- x: 1.2000000000000002,
48
- y: -0.10000000000000003,
49
- },
50
- {
51
- pinId: "U1.8",
52
- x: 1.2000000000000002,
53
- y: 0.30000000000000004,
54
- },
55
- ],
56
- },
57
- {
58
- chipId: "schematic_component_1",
59
- center: {
60
- x: 2.7,
61
- y: -2.0950000000000002, // Moved below component 0
62
- },
63
- width: 2.2,
64
- height: 0.8,
65
- pins: [
66
- {
67
- pinId: "J1.1",
68
- x: 1.6,
69
- y: -1.895, // Adjusted y position
70
- },
71
- {
72
- pinId: "J1.2",
73
- x: 1.6,
74
- y: -2.0950000000000002, // Adjusted y position
75
- },
76
- {
77
- pinId: "J1.3",
78
- x: 1.6,
79
- y: -2.295, // Adjusted y position
80
- },
81
- ],
82
- },
83
- ],
84
- directConnections: [],
85
- netConnections: [
86
- {
87
- netId: "GND",
88
- pinIds: ["U1.1", "J1.3"], // U1.1 connects to J1.3
89
- },
90
- {
91
- netId: "VCC",
92
- pinIds: ["U1.8", "J1.1"], // U1.8 connects to J1.1
93
- },
94
- {
95
- netId: "MMM",
96
- pinIds: ["J1.2"], // U1.8 connects to J1.1
97
- },
98
- ],
99
- availableNetLabelOrientations: {
100
- VCC: ["y-"], // Changed to y- since trace now goes downward
101
- OUT: ["x-", "x+"],
102
- GND: ["y-"], // Changed to y- since trace now goes downward
103
- MMM: ["x+", "x-"],
104
- },
105
- maxMspPairDistance: 2.4,
106
- }
4
+ export { inputProblem }
107
5
 
108
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -1,137 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example23.json"
3
3
 
4
- const inputProblem: InputProblem = {
5
- chips: [
6
- {
7
- chipId: "schematic_component_0",
8
- center: {
9
- x: -3,
10
- y: 0,
11
- },
12
- width: 2.4000000000000004,
13
- height: 1,
14
- pins: [
15
- {
16
- pinId: "U1.1",
17
- x: -1.8,
18
- y: -0.30000000000000004,
19
- },
20
- {
21
- pinId: "U1.2",
22
- x: -4.2,
23
- y: -0.30000000000000004,
24
- },
25
- {
26
- pinId: "U1.3",
27
- x: -1.8,
28
- y: 0.09999999999999998,
29
- },
30
- {
31
- pinId: "U1.4",
32
- x: -4.2,
33
- y: 0.30000000000000004,
34
- },
35
- {
36
- pinId: "U1.5",
37
- x: -4.2,
38
- y: 0.10000000000000003,
39
- },
40
- {
41
- pinId: "U1.6",
42
- x: -4.2,
43
- y: -0.09999999999999998,
44
- },
45
- {
46
- pinId: "U1.7",
47
- x: -1.8,
48
- y: -0.10000000000000003,
49
- },
50
- {
51
- pinId: "U1.8",
52
- x: -1.8,
53
- y: 0.30000000000000004,
54
- },
55
- ],
56
- },
57
- {
58
- chipId: "schematic_component_1",
59
- center: {
60
- x: 3,
61
- y: 0,
62
- },
63
- width: 2.2,
64
- height: 0.8,
65
- pins: [
66
- {
67
- pinId: "J1.1",
68
- x: 1.9,
69
- y: 0.2,
70
- },
71
- {
72
- pinId: "J1.2",
73
- x: 1.9,
74
- y: 0,
75
- },
76
- {
77
- pinId: "J1.3",
78
- x: 1.9,
79
- y: -0.2,
80
- },
81
- ],
82
- },
83
- {
84
- chipId: "schematic_component_2",
85
- center: {
86
- x: 0,
87
- y: -2, // Moved down so component body doesn't block horizontal traces
88
- },
89
- width: 1.2,
90
- height: 3,
91
- pins: [
92
- {
93
- pinId: "U2.1",
94
- x: -0.4,
95
- y: -0.5, // Top pin
96
- },
97
- {
98
- pinId: "U2.2",
99
- x: 0.4,
100
- y: -0.6,
101
- },
102
- {
103
- pinId: "U2.3",
104
- x: -0.4,
105
- y: -2.8, // Bottom pin
106
- },
107
- {
108
- pinId: "U2.4",
109
- x: 0.4,
110
- y: -2.8,
111
- },
112
- ],
113
- },
114
- ],
115
- directConnections: [
116
- {
117
- pinIds: ["U1.1", "J1.3"],
118
- },
119
- {
120
- pinIds: ["U1.8", "J1.1"],
121
- },
122
- ],
123
- netConnections: [
124
- {
125
- netId: "SIGNAL1",
126
- pinIds: ["U2.2"],
127
- },
128
- {
129
- netId: "SIGNAL2",
130
- pinIds: ["U2.1"],
131
- },
132
- ],
133
- availableNetLabelOrientations: {},
134
- maxMspPairDistance: 6.5,
135
- }
4
+ export { inputProblem }
136
5
 
137
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />