@tscircuit/schematic-trace-solver 0.0.48 → 0.0.50

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 (168) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +128 -1
  3. package/dist/index.js +1450 -42
  4. package/lib/solvers/AvailableNetOrientationSolver/AvailableNetOrientationSolver.ts +682 -0
  5. package/lib/solvers/AvailableNetOrientationSolver/constants.ts +6 -0
  6. package/lib/solvers/AvailableNetOrientationSolver/geometry.ts +192 -0
  7. package/lib/solvers/AvailableNetOrientationSolver/traces.ts +43 -0
  8. package/lib/solvers/AvailableNetOrientationSolver/types.ts +44 -0
  9. package/lib/solvers/AvailableNetOrientationSolver/visualize.ts +123 -0
  10. package/lib/solvers/Example28Solver/Example28Solver.ts +182 -0
  11. package/lib/solvers/Example28Solver/geometry.ts +246 -0
  12. package/lib/solvers/Example28Solver/labelMovement.ts +82 -0
  13. package/lib/solvers/Example28Solver/reroute.ts +368 -0
  14. package/lib/solvers/Example28Solver/types.ts +47 -0
  15. package/lib/solvers/Example28Solver/visualize.ts +96 -0
  16. package/lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +30 -0
  17. package/package.json +1 -1
  18. package/site/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2_01-example17-d1_1-u1_1.page.tsx +2 -0
  19. package/site/TraceCleanupSolver/TraceCleanupSolver.page.tsx +23 -0
  20. package/site/TraceLabelOverlapAvoidanceSolver/MergedNetLabelObstacles.page.tsx +18 -0
  21. package/site/TraceLabelOverlapAvoidanceSolver/OverlapAvoidanceStepSolver.page.tsx +24 -0
  22. package/site/TraceLabelOverlapAvoidanceSolver/SingleOverlapSolver.page.tsx +10 -0
  23. package/site/TraceLabelOverlapAvoidanceSolver/TraceLabelOverlapAvoidanceSolver.page.tsx +146 -0
  24. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView01.page.tsx +32 -0
  25. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView02.page.tsx +32 -0
  26. package/site/TraceLabelOverlapAvoidanceSolver/renderComparisonView03.page.tsx +35 -0
  27. package/site/examples/example01.page.tsx +6 -0
  28. package/site/examples/example02.page.tsx +4 -180
  29. package/site/examples/example03.page.tsx +3 -212
  30. package/site/examples/example04.page.tsx +6 -0
  31. package/site/examples/example05.page.tsx +3 -179
  32. package/site/examples/example06.page.tsx +3 -57
  33. package/site/examples/example07.page.tsx +3 -132
  34. package/site/examples/example08.page.tsx +3 -91
  35. package/site/examples/example09.page.tsx +3 -414
  36. package/site/examples/example10.page.tsx +3 -75
  37. package/site/examples/example11.page.tsx +3 -116
  38. package/site/examples/example12.page.tsx +3 -94
  39. package/site/examples/example13.page.tsx +3 -216
  40. package/site/examples/example14.page.tsx +3 -207
  41. package/site/examples/example15.page.tsx +6 -0
  42. package/site/examples/example16.page.tsx +6 -0
  43. package/site/examples/example17.page.tsx +6 -0
  44. package/site/examples/example18.page.tsx +3 -178
  45. package/site/examples/example19.page.tsx +3 -166
  46. package/site/examples/example20.page.tsx +3 -100
  47. package/site/examples/example21.page.tsx +3 -174
  48. package/site/examples/example22.page.tsx +3 -105
  49. package/site/examples/example23.page.tsx +3 -134
  50. package/site/examples/example24.page.tsx +3 -125
  51. package/site/examples/example25.page.tsx +2 -0
  52. package/site/examples/example26.page.tsx +2 -0
  53. package/site/examples/example27.page.tsx +2 -0
  54. package/site/examples/example28.page.tsx +3 -58
  55. package/site/examples/example29.page.tsx +6 -0
  56. package/site/examples/example30.page.tsx +6 -0
  57. package/site/examples/example31.page.tsx +4 -0
  58. package/tests/assets/example01.json +109 -0
  59. package/tests/assets/example02.json +178 -0
  60. package/tests/assets/example03.json +210 -0
  61. package/tests/assets/example04.json +41 -0
  62. package/tests/assets/example05.json +175 -0
  63. package/tests/assets/example06.json +55 -0
  64. package/tests/assets/example07.json +130 -0
  65. package/tests/assets/example08.json +89 -0
  66. package/tests/assets/example09.json +412 -0
  67. package/tests/assets/example10.json +73 -0
  68. package/tests/assets/example11.json +114 -0
  69. package/tests/assets/example12.json +92 -0
  70. package/tests/assets/example13.json +214 -0
  71. package/tests/assets/example14.json +205 -0
  72. package/tests/assets/example15.json +618 -0
  73. package/tests/assets/example16.json +102 -0
  74. package/tests/assets/example17.json +160 -0
  75. package/tests/assets/example18.json +176 -0
  76. package/tests/assets/example19.json +164 -0
  77. package/tests/assets/example20.json +98 -0
  78. package/tests/assets/example21.json +172 -0
  79. package/tests/assets/example22.json +103 -0
  80. package/tests/assets/example23.json +132 -0
  81. package/tests/assets/example24.json +123 -0
  82. package/tests/assets/example25.json +146 -33
  83. package/tests/assets/example26.json +51 -1134
  84. package/tests/assets/example27.json +151 -91
  85. package/tests/assets/example28.json +56 -0
  86. package/tests/assets/example29.json +1206 -0
  87. package/tests/assets/example30.json +168 -0
  88. package/tests/assets/example31.json +46 -0
  89. package/tests/examples/__snapshots__/example01.snap.svg +12 -6
  90. package/tests/examples/__snapshots__/example02.snap.svg +16 -8
  91. package/tests/examples/__snapshots__/example03.snap.svg +36 -18
  92. package/tests/examples/__snapshots__/example04.snap.svg +8 -4
  93. package/tests/examples/__snapshots__/example05.snap.svg +4 -2
  94. package/tests/examples/__snapshots__/example06.snap.svg +4 -2
  95. package/tests/examples/__snapshots__/example07.snap.svg +20 -10
  96. package/tests/examples/__snapshots__/example08.snap.svg +16 -8
  97. package/tests/examples/__snapshots__/example09.snap.svg +80 -40
  98. package/tests/examples/__snapshots__/example10.snap.svg +16 -8
  99. package/tests/examples/__snapshots__/example11.snap.svg +24 -12
  100. package/tests/examples/__snapshots__/example12.snap.svg +41 -30
  101. package/tests/examples/__snapshots__/example13.snap.svg +38 -16
  102. package/tests/examples/__snapshots__/example14.snap.svg +121 -48
  103. package/tests/examples/__snapshots__/example15.snap.svg +36 -18
  104. package/tests/examples/__snapshots__/example16.snap.svg +41 -27
  105. package/tests/examples/__snapshots__/example17.snap.svg +16 -8
  106. package/tests/examples/__snapshots__/example18.snap.svg +20 -10
  107. package/tests/examples/__snapshots__/example19.snap.svg +16 -8
  108. package/tests/examples/__snapshots__/example20.snap.svg +45 -131
  109. package/tests/examples/__snapshots__/example21.snap.svg +93 -65
  110. package/tests/examples/__snapshots__/example22.snap.svg +43 -23
  111. package/tests/examples/__snapshots__/example23.snap.svg +62 -26
  112. package/tests/examples/__snapshots__/example24.snap.svg +50 -28
  113. package/tests/examples/__snapshots__/example25.snap.svg +175 -49
  114. package/tests/examples/__snapshots__/example26.snap.svg +16 -8
  115. package/tests/examples/__snapshots__/example27.snap.svg +24 -12
  116. package/tests/examples/__snapshots__/example28.snap.svg +24 -18
  117. package/tests/examples/__snapshots__/example29.snap.svg +184 -92
  118. package/tests/examples/__snapshots__/example30.snap.svg +48 -24
  119. package/tests/examples/__snapshots__/example31.snap.svg +88 -0
  120. package/tests/examples/example01.test.ts +2 -2
  121. package/tests/examples/example02.test.ts +2 -2
  122. package/tests/examples/example03.test.ts +2 -2
  123. package/tests/examples/example04.test.ts +2 -2
  124. package/tests/examples/example05.test.ts +2 -2
  125. package/tests/examples/example06.test.ts +2 -2
  126. package/tests/examples/example07.test.ts +2 -2
  127. package/tests/examples/example08.test.ts +2 -2
  128. package/tests/examples/example09.test.ts +2 -2
  129. package/tests/examples/example10.test.ts +2 -2
  130. package/tests/examples/{example11.test.tsx → example11.test.ts} +2 -2
  131. package/tests/examples/{example12.test.tsx → example12.test.ts} +2 -2
  132. package/tests/examples/{example13.test.tsx → example13.test.ts} +2 -2
  133. package/tests/examples/example14.test.ts +12 -0
  134. package/tests/examples/example15.test.ts +12 -0
  135. package/tests/examples/example16.test.ts +12 -0
  136. package/tests/examples/example17.test.ts +12 -0
  137. package/tests/examples/example18.test.ts +12 -0
  138. package/tests/examples/example19.test.ts +12 -0
  139. package/tests/examples/example20.test.ts +12 -0
  140. package/tests/examples/example21.test.ts +12 -0
  141. package/tests/examples/example22.test.ts +12 -0
  142. package/tests/examples/example23.test.ts +12 -0
  143. package/tests/examples/example24.test.ts +12 -0
  144. package/tests/examples/example25.test.ts +12 -0
  145. package/tests/examples/example26.test.ts +12 -0
  146. package/tests/examples/example27.test.ts +3 -232
  147. package/tests/examples/example28.test.ts +2 -2
  148. package/tests/examples/example29.test.ts +1 -2
  149. package/tests/examples/example30.test.ts +2 -2
  150. package/tests/examples/example31.test.ts +12 -0
  151. package/site/examples/example01-basic.page.tsx +0 -105
  152. package/site/examples/example04-single-symbol.page.tsx +0 -46
  153. package/site/examples/example15-rp2040-caps.page.tsx +0 -623
  154. package/site/examples/example16-core-repro51.page.tsx +0 -107
  155. package/site/examples/example17-straight-line-trace.page.tsx +0 -165
  156. package/tests/examples/example14.test.tsx +0 -11
  157. package/tests/examples/example15.test.tsx +0 -629
  158. package/tests/examples/example16.test.tsx +0 -113
  159. package/tests/examples/example17.test.tsx +0 -171
  160. package/tests/examples/example18.test.tsx +0 -187
  161. package/tests/examples/example19.test.tsx +0 -175
  162. package/tests/examples/example20.test.tsx +0 -190
  163. package/tests/examples/example21.test.tsx +0 -183
  164. package/tests/examples/example22.test.tsx +0 -109
  165. package/tests/examples/example23.test.tsx +0 -109
  166. package/tests/examples/example24.test.tsx +0 -114
  167. package/tests/examples/example25.test.tsx +0 -143
  168. package/tests/examples/example26.test.tsx +0 -134
@@ -1,210 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example14.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.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.45,
61
- y: -0.10000000000000009,
62
- },
63
- width: 1.0999999999999996,
64
- height: 0.388910699999999,
65
- pins: [
66
- {
67
- pinId: "R1.1",
68
- x: 3,
69
- y: -0.10000000000000016,
70
- },
71
- {
72
- pinId: "R1.2",
73
- x: 1.9000000000000004,
74
- y: -0.10000000000000002,
75
- },
76
- ],
77
- },
78
- {
79
- chipId: "schematic_component_2",
80
- center: {
81
- x: 0.6500000000000001,
82
- y: -1.2944553500000002,
83
- },
84
- width: 1.1,
85
- height: 0.388910699999999,
86
- pins: [
87
- {
88
- pinId: "R2.1",
89
- x: 1.2000000000000002,
90
- y: -1.2944553500000002,
91
- },
92
- {
93
- pinId: "R2.2",
94
- x: 0.10000000000000009,
95
- y: -1.2944553500000002,
96
- },
97
- ],
98
- },
99
- {
100
- chipId: "schematic_component_3",
101
- center: {
102
- x: -1.2000000000000002,
103
- y: -1.7000000000000002,
104
- },
105
- width: 1.06,
106
- height: 1.1,
107
- pins: [
108
- {
109
- pinId: "C1.1",
110
- x: -1.2000000000000002,
111
- y: -1.1500000000000001,
112
- },
113
- {
114
- pinId: "C1.2",
115
- x: -1.2000000000000002,
116
- y: -2.25,
117
- },
118
- ],
119
- },
120
- {
121
- chipId: "schematic_component_4",
122
- center: {
123
- x: -2.45,
124
- y: 0.10000000000000009,
125
- },
126
- width: 1.0999999999999996,
127
- height: 0.84,
128
- pins: [
129
- {
130
- pinId: "C2.1",
131
- x: -1.9000000000000004,
132
- y: 0.10000000000000002,
133
- },
134
- {
135
- pinId: "C2.2",
136
- x: -3,
137
- y: 0.10000000000000016,
138
- },
139
- ],
140
- },
141
- {
142
- chipId: "schematic_component_5",
143
- center: {
144
- x: 1.2000000000000002,
145
- y: 1.7000000000000002,
146
- },
147
- width: 1.06,
148
- height: 1.1,
149
- pins: [
150
- {
151
- pinId: "R3.1",
152
- x: 1.2000000000000002,
153
- y: 1.1500000000000001,
154
- },
155
- {
156
- pinId: "R3.2",
157
- x: 1.2000000000000002,
158
- y: 2.25,
159
- },
160
- ],
161
- },
162
- ],
163
- directConnections: [
164
- {
165
- pinIds: ["U1.5", "C2.1"],
166
- netId: "U1.CTRL to C2.pin1",
167
- },
168
- {
169
- pinIds: ["U1.6", "U1.2"],
170
- netId: "U1.THRES to U1.TRIG",
171
- },
172
- {
173
- pinIds: ["R1.2", "U1.7"],
174
- netId: "R1.pin2 to U1.DISCH",
175
- },
176
- {
177
- pinIds: ["U1.7", "R2.1"],
178
- netId: "U1.DISCH to R2.pin1",
179
- },
180
- {
181
- pinIds: ["R2.2", "U1.6"],
182
- netId: "R2.pin2 to U1.THRES",
183
- },
184
- {
185
- pinIds: ["U1.6", "C1.1"],
186
- netId: "U1.THRES to C1.pin1",
187
- },
188
- {
189
- pinIds: ["U1.3", "R3.1"],
190
- netId: "U1.OUT to R3.pin1",
191
- },
192
- ],
193
- netConnections: [
194
- {
195
- netId: "GND",
196
- pinIds: ["U1.1", "C1.2", "C2.2"],
197
- },
198
- {
199
- netId: "VCC",
200
- pinIds: ["U1.4", "U1.8", "R1.1"],
201
- },
202
- ],
203
- availableNetLabelOrientations: {
204
- VCC: ["y+"],
205
- GND: ["y-"],
206
- },
207
- maxMspPairDistance: 2.4,
208
- }
4
+ export { inputProblem }
209
5
 
210
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -0,0 +1,6 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import inputProblem from "../../tests/assets/example15.json"
3
+
4
+ export { inputProblem }
5
+
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -0,0 +1,6 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import inputProblem from "../../tests/assets/example16.json"
3
+
4
+ export { inputProblem }
5
+
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -0,0 +1,6 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import inputProblem from "../../tests/assets/example17.json"
3
+
4
+ export { inputProblem }
5
+
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -1,181 +1,6 @@
1
1
  import { PipelineDebugger } from "site/components/PipelineDebugger"
2
- import type { InputProblem } from "lib/types/InputProblem"
2
+ import inputProblem from "../../tests/assets/example18.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: 1.4,
14
- pins: [
15
- {
16
- pinId: "U3.8",
17
- x: -1.4,
18
- y: 0.42500000000000004,
19
- },
20
- {
21
- pinId: "U3.4",
22
- x: -1.4,
23
- y: -0.42500000000000004,
24
- },
25
- {
26
- pinId: "U3.1",
27
- x: 1.4,
28
- y: 0.5,
29
- },
30
- {
31
- pinId: "U3.6",
32
- x: 1.4,
33
- y: 0.30000000000000004,
34
- },
35
- {
36
- pinId: "U3.5",
37
- x: 1.4,
38
- y: 0.10000000000000009,
39
- },
40
- {
41
- pinId: "U3.2",
42
- x: 1.4,
43
- y: -0.09999999999999998,
44
- },
45
- {
46
- pinId: "U3.3",
47
- x: 1.4,
48
- y: -0.3,
49
- },
50
- {
51
- pinId: "U3.7",
52
- x: 1.4,
53
- y: -0.5,
54
- },
55
- ],
56
- },
57
- {
58
- chipId: "schematic_component_1",
59
- center: {
60
- x: -2.3145833,
61
- y: 0,
62
- },
63
- width: 0.5291665999999999,
64
- height: 1.0583333000000001,
65
- pins: [
66
- {
67
- pinId: "C20.1",
68
- x: -2.3148566499999994,
69
- y: 0.5512093000000002,
70
- },
71
- {
72
- pinId: "C20.2",
73
- x: -2.31430995,
74
- y: -0.5512093000000002,
75
- },
76
- ],
77
- },
78
- {
79
- chipId: "schematic_component_2",
80
- center: {
81
- x: 1.7577928249999983,
82
- y: 1.7512907000000002,
83
- },
84
- width: 0.3155856499999966,
85
- height: 1.0583332999999997,
86
- pins: [
87
- {
88
- pinId: "R11.1",
89
- x: 1.7580660749999977,
90
- y: 2.3025814000000002,
91
- },
92
- {
93
- pinId: "R11.2",
94
- x: 1.757519574999999,
95
- y: 1.2,
96
- },
97
- ],
98
- },
99
- {
100
- chipId: "schematic_component_3",
101
- center: {
102
- x: -1.7577928249999983,
103
- y: -2.7512907000000002,
104
- },
105
- width: 0.3155856499999966,
106
- height: 1.0583332999999997,
107
- pins: [
108
- {
109
- pinId: "R12.1",
110
- x: -1.7580660749999977,
111
- y: -3.3025814000000002,
112
- },
113
- {
114
- pinId: "R12.2",
115
- x: -1.757519574999999,
116
- y: -2.2,
117
- },
118
- ],
119
- },
120
- {
121
- chipId: "schematic_component_4",
122
- center: {
123
- x: 1.7577928249999983,
124
- y: -2.7512907000000002,
125
- },
126
- width: 0.3155856499999966,
127
- height: 1.0583332999999997,
128
- pins: [
129
- {
130
- pinId: "R13.1",
131
- x: 1.7580660749999977,
132
- y: -3.3025814000000002,
133
- },
134
- {
135
- pinId: "R13.2",
136
- x: 1.757519574999999,
137
- y: -2.2,
138
- },
139
- ],
140
- },
141
- ],
142
- directConnections: [
143
- {
144
- pinIds: ["C20.1", "U3.8"],
145
- netId: "capacitor.C20 > port.pin1 to .U3 > .VDD",
146
- },
147
- {
148
- pinIds: ["C20.2", "U3.4"],
149
- netId: "capacitor.C20 > port.pin2 to .U3 > .GND",
150
- },
151
- {
152
- pinIds: ["R11.2", "U3.1"],
153
- netId: "resistor.R11 > port.pin2 to .U3 > .N_CS",
154
- },
155
- {
156
- pinIds: ["R13.2", "R12.2"],
157
- netId: "resistor.R11 > port.pin1 to resistor.R12 > port.pin1",
158
- },
159
- ],
160
- netConnections: [
161
- {
162
- netId: "V3_3",
163
- pinIds: ["U3.8", "U3.3", "U3.7", "C20.1", "R11.1"],
164
- },
165
- {
166
- netId: "GND",
167
- pinIds: ["U3.4", "C20.2"],
168
- },
169
- {
170
- netId: "FLASH_N_CS",
171
- pinIds: ["U3.1", "R11.2"],
172
- },
173
- ],
174
- availableNetLabelOrientations: {
175
- V3_3: ["y+"],
176
- GND: ["y-"],
177
- },
178
- maxMspPairDistance: 5,
179
- }
4
+ export { inputProblem }
180
5
 
181
- export default () => <PipelineDebugger inputProblem={inputProblem} />
6
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -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} />