@tscircuit/schematic-trace-solver 0.0.90 → 0.0.92

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 (33) hide show
  1. package/dist/index.js +121 -2
  2. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2.ts +20 -14
  3. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/calculateDirectShortPath.ts +161 -0
  4. package/lib/solvers/SchematicTracePipelineSolver/correctPinsInsideChip.ts +19 -0
  5. package/package.json +1 -1
  6. package/site/bug-reports/bug-report-20260707T230831Z.page.tsx +4 -0
  7. package/site/bug-reports/bug-report-20260708T053736Z.page.tsx +4 -0
  8. package/site/bug-reports/bug-report-20260708T055430Z.page.tsx +4 -0
  9. package/site/bug-reports/bug-report-20260708T095725Z.page.tsx +4 -0
  10. package/tests/bug-reports/bug-report-20260707T230831Z/__snapshots__/bug-report-20260707T230831Z.snap.svg +88 -0
  11. package/tests/bug-reports/bug-report-20260707T230831Z/bug-report-20260707T230831Z.json +347 -0
  12. package/tests/bug-reports/bug-report-20260707T230831Z/bug-report-20260707T230831Z.test.ts +12 -0
  13. package/tests/bug-reports/bug-report-20260708T053736Z/__snapshots__/bug-report-20260708T053736Z.snap.svg +52 -0
  14. package/tests/bug-reports/bug-report-20260708T053736Z/bug-report-20260708T053736Z.json +59 -0
  15. package/tests/bug-reports/bug-report-20260708T053736Z/bug-report-20260708T053736Z.test.ts +12 -0
  16. package/tests/bug-reports/bug-report-20260708T055430Z/__snapshots__/bug-report-20260708T055430Z.snap.svg +88 -0
  17. package/tests/bug-reports/bug-report-20260708T055430Z/bug-report-20260708T055430Z.json +263 -0
  18. package/tests/bug-reports/bug-report-20260708T055430Z/bug-report-20260708T055430Z.test.ts +12 -0
  19. package/tests/bug-reports/bug-report-20260708T095725Z/__snapshots__/bug-report-20260708T095725Z.snap.svg +87 -0
  20. package/tests/bug-reports/bug-report-20260708T095725Z/bug-report-20260708T095725Z.json +277 -0
  21. package/tests/bug-reports/bug-report-20260708T095725Z/bug-report-20260708T095725Z.test.ts +12 -0
  22. package/tests/repros/__snapshots__/repro-missing-trace-netlabel.snap.svg +62 -0
  23. package/tests/repros/__snapshots__/repro-netlabel-overlap-trace.snap.svg +60 -0
  24. package/tests/repros/__snapshots__/repro-rectifier-trace-overlap.snap.svg +58 -0
  25. package/tests/repros/__snapshots__/small-variant-resistor-facing-direction.snap.svg +86 -0
  26. package/tests/repros/assets/repro-missing-trace-netlabel.input.json +155 -0
  27. package/tests/repros/assets/repro-netlabel-overlap-trace.input.json +115 -0
  28. package/tests/repros/assets/repro-rectifier-trace-overlap.input.json +137 -0
  29. package/tests/repros/assets/small-variant-resistor-facing-direction.input.json +297 -0
  30. package/tests/repros/repro-missing-trace-netlabel.test.ts +14 -0
  31. package/tests/repros/repro-netlabel-overlap-trace.test.ts +14 -0
  32. package/tests/repros/repro-rectifier-trace-overlap.test.ts +14 -0
  33. package/tests/repros/small-variant-resistor-facing-direction.test.ts +35 -0
@@ -0,0 +1,263 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 10,
7
+ "y": 14
8
+ },
9
+ "width": 2.1999999999999993,
10
+ "height": 3.3999999999999986,
11
+ "pins": [
12
+ {
13
+ "pinId": "U_MCU.1",
14
+ "x": 8.9,
15
+ "y": 15.5
16
+ },
17
+ {
18
+ "pinId": "U_MCU.2",
19
+ "x": 8.9,
20
+ "y": 15.3
21
+ },
22
+ {
23
+ "pinId": "U_MCU.3",
24
+ "x": 8.9,
25
+ "y": 15.1
26
+ },
27
+ {
28
+ "pinId": "U_MCU.4",
29
+ "x": 8.9,
30
+ "y": 14.9
31
+ },
32
+ {
33
+ "pinId": "U_MCU.5",
34
+ "x": 8.9,
35
+ "y": 14.7
36
+ },
37
+ {
38
+ "pinId": "U_MCU.6",
39
+ "x": 8.9,
40
+ "y": 14.5
41
+ },
42
+ {
43
+ "pinId": "U_MCU.7",
44
+ "x": 8.9,
45
+ "y": 14.3
46
+ },
47
+ {
48
+ "pinId": "U_MCU.8",
49
+ "x": 8.9,
50
+ "y": 14.1
51
+ },
52
+ {
53
+ "pinId": "U_MCU.9",
54
+ "x": 8.9,
55
+ "y": 13.9
56
+ },
57
+ {
58
+ "pinId": "U_MCU.10",
59
+ "x": 8.9,
60
+ "y": 13.700000000000001
61
+ },
62
+ {
63
+ "pinId": "U_MCU.11",
64
+ "x": 8.9,
65
+ "y": 13.5
66
+ },
67
+ {
68
+ "pinId": "U_MCU.12",
69
+ "x": 8.9,
70
+ "y": 13.3
71
+ },
72
+ {
73
+ "pinId": "U_MCU.13",
74
+ "x": 8.9,
75
+ "y": 13.1
76
+ },
77
+ {
78
+ "pinId": "U_MCU.14",
79
+ "x": 8.9,
80
+ "y": 12.9
81
+ },
82
+ {
83
+ "pinId": "U_MCU.15",
84
+ "x": 8.9,
85
+ "y": 12.7
86
+ },
87
+ {
88
+ "pinId": "U_MCU.16",
89
+ "x": 8.9,
90
+ "y": 12.5
91
+ },
92
+ {
93
+ "pinId": "U_MCU.17",
94
+ "x": 11.1,
95
+ "y": 12.5
96
+ },
97
+ {
98
+ "pinId": "U_MCU.18",
99
+ "x": 11.1,
100
+ "y": 12.7
101
+ },
102
+ {
103
+ "pinId": "U_MCU.19",
104
+ "x": 11.1,
105
+ "y": 12.9
106
+ },
107
+ {
108
+ "pinId": "U_MCU.20",
109
+ "x": 11.1,
110
+ "y": 13.1
111
+ },
112
+ {
113
+ "pinId": "U_MCU.21",
114
+ "x": 11.1,
115
+ "y": 13.3
116
+ },
117
+ {
118
+ "pinId": "U_MCU.22",
119
+ "x": 11.1,
120
+ "y": 13.5
121
+ },
122
+ {
123
+ "pinId": "U_MCU.23",
124
+ "x": 11.1,
125
+ "y": 13.7
126
+ },
127
+ {
128
+ "pinId": "U_MCU.24",
129
+ "x": 11.1,
130
+ "y": 13.9
131
+ },
132
+ {
133
+ "pinId": "U_MCU.25",
134
+ "x": 11.1,
135
+ "y": 14.1
136
+ },
137
+ {
138
+ "pinId": "U_MCU.26",
139
+ "x": 11.1,
140
+ "y": 14.299999999999999
141
+ },
142
+ {
143
+ "pinId": "U_MCU.27",
144
+ "x": 11.1,
145
+ "y": 14.5
146
+ },
147
+ {
148
+ "pinId": "U_MCU.28",
149
+ "x": 11.1,
150
+ "y": 14.7
151
+ },
152
+ {
153
+ "pinId": "U_MCU.29",
154
+ "x": 11.1,
155
+ "y": 14.9
156
+ },
157
+ {
158
+ "pinId": "U_MCU.30",
159
+ "x": 11.1,
160
+ "y": 15.1
161
+ },
162
+ {
163
+ "pinId": "U_MCU.31",
164
+ "x": 11.1,
165
+ "y": 15.3
166
+ },
167
+ {
168
+ "pinId": "U_MCU.32",
169
+ "x": 11.1,
170
+ "y": 15.5
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ "chipId": "schematic_component_1",
176
+ "center": {
177
+ "x": 14,
178
+ "y": 10
179
+ },
180
+ "width": 1.6799999999999997,
181
+ "height": 0.6799999999999997,
182
+ "pins": [
183
+ {
184
+ "pinId": "R_FAULT_PULLUP.1",
185
+ "x": 13.7,
186
+ "y": 9.66
187
+ },
188
+ {
189
+ "pinId": "R_FAULT_PULLUP.2",
190
+ "x": 14.3,
191
+ "y": 9.66
192
+ }
193
+ ]
194
+ }
195
+ ],
196
+ "directConnections": [],
197
+ "netConnections": [
198
+ {
199
+ "netId": "GND",
200
+ "pinIds": [
201
+ "U_MCU.3",
202
+ "U_MCU.5",
203
+ "U_MCU.21"
204
+ ],
205
+ "netLabelWidth": 0.42,
206
+ "netLabelHeight": 0.48
207
+ },
208
+ {
209
+ "netId": "VCC_3V3",
210
+ "pinIds": [
211
+ "U_MCU.4",
212
+ "U_MCU.6",
213
+ "U_MCU.18",
214
+ "R_FAULT_PULLUP.1"
215
+ ],
216
+ "netLabelWidth": 0.42,
217
+ "netLabelHeight": 0.96
218
+ },
219
+ {
220
+ "netId": "FAULT",
221
+ "pinIds": [
222
+ "U_MCU.32",
223
+ "R_FAULT_PULLUP.2"
224
+ ],
225
+ "netLabelWidth": 0.72
226
+ }
227
+ ],
228
+ "textBoxes": [
229
+ {
230
+ "chipId": "schematic_component_0",
231
+ "center": {
232
+ "x": 10.080000000000002,
233
+ "y": 12.17
234
+ },
235
+ "width": 1.5600000000000005,
236
+ "height": 0.17999999999999972,
237
+ "text": "ATMEGA328P_AU"
238
+ },
239
+ {
240
+ "chipId": "schematic_component_0",
241
+ "center": {
242
+ "x": 9.600000000000001,
243
+ "y": 15.815
244
+ },
245
+ "width": 0.7200000000000006,
246
+ "height": 0.25,
247
+ "text": "U_MCU"
248
+ }
249
+ ],
250
+ "availableNetLabelOrientations": {
251
+ "VCC_3V3": [
252
+ "y+"
253
+ ],
254
+ "GND": [
255
+ "y-"
256
+ ],
257
+ "FAULT": [
258
+ "x-",
259
+ "x+"
260
+ ]
261
+ },
262
+ "maxMspPairDistance": 2.4
263
+ }
@@ -0,0 +1,12 @@
1
+ import { expect, test } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "./bug-report-20260708T055430Z.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("bug-report-20260708T055430Z", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,87 @@
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="1.05,0.20000000000000007 -12,-1.6999999999999993" data-type="line" data-label="" points="325.95072409253333,329.4369005078052 51.05886778258409,369.45946962572884" fill="none" stroke="hsl(112, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.05,0.4 -12,0.1100000000000021" data-type="line" data-label="" points="325.95072409253333,325.22399849539215 51.05886778258409,331.332706413391" fill="none" stroke="hsl(24, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-1.05,-0.5 -12,1.9750000000000014" data-type="line" data-label="" points="281.71525296219664,344.18205755125075 51.05886778258409,292.04739514763963" fill="none" stroke="hsl(328, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.05,1.1102230246251565e-16 11.7,-1" data-type="line" data-label="" points="325.95072409253333,333.6498025202182 550.2877562535264,354.7143125822833" fill="none" stroke="hsl(8, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="12.3,-1 13.3,-0.9999999999999996" data-type="line" data-label="" points="562.9264622907654,354.7143125822833 583.9909723528306,354.71431258228324" fill="none" stroke="hsl(176, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-12,-2.3000000000000007 -12,-0.4899999999999993" data-type="line" data-label="" points="51.05886778258409,382.0981756629679 51.05886778258409,343.97141245063005" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-12,-2.3000000000000007 -12,1.375" data-type="line" data-label="" points="51.05886778258409,382.0981756629679 51.05886778258409,304.68610118487874" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-12,-2.3000000000000007 13.3,-1.600000000000001" data-type="line" data-label="" points="51.05886778258409,382.0981756629679 583.9909723528306,367.35301861952235" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-12,-0.4899999999999993 -12,1.375" data-type="line" data-label="" points="51.05886778258409,343.97141245063005 51.05886778258409,304.68610118487874" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-12,-0.4899999999999993 13.3,-1.600000000000001" data-type="line" data-label="" points="51.05886778258409,343.97141245063005 583.9909723528306,367.35301861952235" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-12,1.375 13.3,-1.600000000000001" data-type="line" data-label="" points="51.05886778258409,304.68610118487874 583.9909723528306,367.35301861952235" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="12.3,-1 12.8,-1 12.8,-0.7999999999999996 13.3,-0.7999999999999996 13.3,-0.9999999999999996" data-type="line" data-label="" points="562.9264622907654,354.7143125822833 573.458717321798,354.7143125822833 573.458717321798,350.50141056987025 583.9909723528306,350.50141056987025 583.9909723528306,354.71431258228324" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-12,-0.4899999999999993 -12,-0.6899999999999986 -12.524999999999999,-0.6899999999999986 -12.524999999999999,1.1749999999999998 -12,1.1749999999999998 -12,1.3749999999999991" data-type="line" data-label="" points="51.05886778258409,343.97141245063005 51.05886778258409,348.18431446304305 39.99999999999994,348.18431446304305 39.99999999999994,308.89900319729173 51.05886778258409,308.89900319729173 51.05886778258409,304.68610118487874" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-12,-2.3000000000000007 -12,-2.5 -12.524999999999999,-2.5 -12.524999999999999,-0.6899999999999977 -12,-0.6899999999999977 -12,-0.48999999999999844" data-type="line" data-label="" points="51.05886778258409,382.0981756629679 51.05886778258409,386.3110776753809 39.99999999999994,386.3110776753809 39.99999999999994,348.18431446304305 51.05886778258409,348.18431446304305 51.05886778258409,343.97141245063005" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.0500000000000007,0.39999999999999947 1.25,0.39999999999999947 1.25,1.0999999999999999 -12,1.0999999999999999 -12,0.1100000000000021" data-type="line" data-label="" points="325.95072409253333,325.2239984953922 330.16362610494633,325.2239984953922 330.16362610494633,310.4788414519466 51.05886778258409,310.4788414519466 51.05886778258409,331.332706413391" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.0500000000000007,0.1999999999999993 1.25,0.1999999999999993 1.25,-1.0999999999999999 -12,-1.0999999999999999 -12,-1.6999999999999993" data-type="line" data-label="" points="325.95072409253333,329.4369005078052 330.16362610494633,329.4369005078052 330.16362610494633,356.8207635884898 51.05886778258409,356.8207635884898 51.05886778258409,369.45946962572884" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="281.71525296219664" y="314.69174346435966" width="44.23547113033669" height="37.91611811171708" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="-11.782499999999999" data-y="-2" x="44.212902012412954" y="369.45946962572884" width="22.854993417340637" height="12.638706037239047" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="-11.782499999999999" data-y="-0.18999999999999861" x="44.212902012412954" y="331.33270641339107" width="22.854993417340637" height="12.638706037239047" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="-11.7225" data-y="1.6750000000000007" x="44.21290201241294" y="292.04739514763963" width="25.382734624788384" height="12.638706037239103" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="12" data-y="-1" x="550.2877562535264" y="345.867218356216" width="12.63870603723899" height="17.694188452134654" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="13.517500000000002" data-y="-1.3000000000000003" x="577.1450065826593" y="354.71431258228324" width="22.854993417340665" height="12.638706037239103" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="TPS923655DMTR" data-x="0.13" data-y="-1.0299999999999998" x="290.1410569870227" y="353.45044197855935" width="32.86063569682153" height="3.7916118111717196" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="U1" data-x="-0.53" data-y="1.0150000000000001" x="288.87718638329886" y="309.636261049464" width="7.583223622343382" height="5.2661275155163025" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.FAULT to RFAULT.pin1
2
+ globalConnNetId: connectivity_net2" data-x="-2.171" data-y="-0.5" x="234.50968591310885" y="342.07560654504425" width="47.18450253902577" height="4.2129020124129966" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.FAULT to RFAULT.pin1
3
+ globalConnNetId: connectivity_net2" data-x="-12" data-y="3.0960000000000014" x="48.95241677637759" y="244.84182809855184" width="4.2129020124129966" height="47.18450253902574" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.COMP to CCOMP.pos
4
+ globalConnNetId: connectivity_net3" data-x="2.031" data-y="1.1102230246251565e-16" x="325.9717886025953" y="331.5433515140117" width="41.28643972164758" height="4.2129020124129966" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.COMP to CCOMP.pos
5
+ globalConnNetId: connectivity_net3" data-x="10.719" data-y="-1" x="508.9802520218167" y="352.60786157607674" width="41.28643972164758" height="4.212902012413053" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.FSET to RFSET.pin1
6
+ globalConnNetId: connectivity_net0" data-x="2.275" data-y="0.1999999999999993" x="330.1636261049464" y="327.3304495015987" width="43.182245627233385" height="4.2129020124129966" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.TEMP to RTEMP.pin1
7
+ globalConnNetId: connectivity_net1" data-x="2.275" data-y="0.39999999999999947" x="330.1636261049464" y="323.11754748918565" width="43.182245627233385" height="4.212902012413053" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: GND
8
+ globalConnNetId: connectivity_net5" data-x="-12" data-y="-2.71" x="46.00338536768845" y="386.31107767538094" width="10.110964829791271" height="8.847094226067327" fill="#00000066" stroke="#000000" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: GND
9
+ globalConnNetId: connectivity_net5" data-x="13.3" data-y="-1.8110000000000008" x="578.935489937935" y="367.3740831295844" width="10.110964829791214" height="8.847094226067327" fill="#00000066" stroke="#000000" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: CCOMP.neg to RCOMP.pin1
10
+ globalConnNetId: connectivity_net4" data-x="12.55" data-y="-0.775" x="566.0861388000752" y="345.235283054354" width="4.2129020124129966" height="9.479029527929299" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><circle data-type="point" data-label="U1.1
11
+ x-" data-x="-1.05" data-y="0.7" cx="281.71525296219664" cy="318.90464547677266" r="3" fill="hsl(319, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.2
12
+ x-" data-x="-1.05" data-y="0.49999999999999994" cx="281.71525296219664" cy="323.11754748918565" r="3" fill="hsl(320, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.3
13
+ x-" data-x="-1.05" data-y="0.29999999999999993" cx="281.71525296219664" cy="327.3304495015987" r="3" fill="hsl(321, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.4
14
+ x-" data-x="-1.05" data-y="0.09999999999999987" cx="281.71525296219664" cy="331.5433515140117" r="3" fill="hsl(322, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.5
15
+ x-" data-x="-1.05" data-y="-0.10000000000000009" cx="281.71525296219664" cy="335.7562535264247" r="3" fill="hsl(323, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.6
16
+ x-" data-x="-1.05" data-y="-0.30000000000000004" cx="281.71525296219664" cy="339.96915553883775" r="3" fill="hsl(324, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.7
17
+ x-" data-x="-1.05" data-y="-0.5" cx="281.71525296219664" cy="344.18205755125075" r="3" fill="hsl(325, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.8
18
+ x-" data-x="-1.05" data-y="-0.7" cx="281.71525296219664" cy="348.39495956366375" r="3" fill="hsl(326, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.9
19
+ x+" data-x="1.05" data-y="-0.6" cx="325.95072409253333" cy="346.28850855745725" r="3" fill="hsl(327, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.10
20
+ x+" data-x="1.05" data-y="-0.39999999999999997" cx="325.95072409253333" cy="342.07560654504425" r="3" fill="hsl(217, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.11
21
+ x+" data-x="1.05" data-y="-0.19999999999999996" cx="325.95072409253333" cy="337.8627045326312" r="3" fill="hsl(218, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.12
22
+ x+" data-x="1.05" data-y="1.1102230246251565e-16" cx="325.95072409253333" cy="333.6498025202182" r="3" fill="hsl(219, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.13
23
+ x+" data-x="1.05" data-y="0.20000000000000007" cx="325.95072409253333" cy="329.4369005078052" r="3" fill="hsl(220, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.14
24
+ x+" data-x="1.05" data-y="0.4" cx="325.95072409253333" cy="325.22399849539215" r="3" fill="hsl(221, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.15
25
+ x+" data-x="1.05" data-y="0.6" cx="325.95072409253333" cy="321.01109648297916" r="3" fill="hsl(222, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RFSET.1
26
+ y+" data-x="-12" data-y="-1.6999999999999993" cx="51.05886778258409" cy="369.45946962572884" r="3" fill="hsl(273, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RFSET.2
27
+ y-" data-x="-12" data-y="-2.3000000000000007" cx="51.05886778258409" cy="382.0981756629679" r="3" fill="hsl(274, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RTEMP.1
28
+ y+" data-x="-12" data-y="0.1100000000000021" cx="51.05886778258409" cy="331.332706413391" r="3" fill="hsl(97, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RTEMP.2
29
+ y-" data-x="-12" data-y="-0.4899999999999993" cx="51.05886778258409" cy="343.97141245063005" r="3" fill="hsl(98, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RFAULT.1
30
+ y+" data-x="-12" data-y="1.9750000000000014" cx="51.05886778258409" cy="292.04739514763963" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RFAULT.2
31
+ y-" data-x="-12" data-y="1.375" cx="51.05886778258409" cy="304.68610118487874" r="3" fill="hsl(228, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="CCOMP.1
32
+ x-" data-x="11.7" data-y="-1" cx="550.2877562535264" cy="354.7143125822833" r="3" fill="hsl(165, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="CCOMP.2
33
+ x+" data-x="12.3" data-y="-1" cx="562.9264622907654" cy="354.7143125822833" r="3" fill="hsl(166, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RCOMP.1
34
+ y+" data-x="13.3" data-y="-0.9999999999999996" cx="583.9909723528306" cy="354.71431258228324" r="3" fill="hsl(180, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RCOMP.2
35
+ y-" data-x="13.3" data-y="-1.600000000000001" cx="583.9909723528306" cy="367.35301861952235" r="3" fill="hsl(181, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
36
+ orientation: x-" data-x="-1.05" data-y="-0.5" cx="281.71525296219664" cy="344.18205755125075" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
37
+ orientation: y+" data-x="-12" data-y="1.9750000000000014" cx="51.05886778258409" cy="292.04739514763963" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
38
+ orientation: x+" data-x="1.05" data-y="1.1102230246251565e-16" cx="325.95072409253333" cy="333.6498025202182" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
39
+ orientation: x-" data-x="11.7" data-y="-1" cx="550.2877562535264" cy="354.7143125822833" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
40
+ orientation: x+" data-x="1.25" data-y="0.1999999999999993" cx="330.16362610494633" cy="329.4369005078052" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
41
+ orientation: x+" data-x="1.25" data-y="0.39999999999999947" cx="330.16362610494633" cy="325.2239984953922" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
42
+ orientation: y-" data-x="-12" data-y="-2.5" cx="51.05886778258409" cy="386.3110776753809" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
43
+ orientation: y-" data-x="13.3" data-y="-1.600000000000001" cx="583.9909723528306" cy="367.35301861952235" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
44
+ orientation: y+" data-x="12.55" data-y="-1" cx="568.1925898062817" cy="354.7143125822833" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
45
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
46
+ const svg = e.currentTarget;
47
+ const rect = svg.getBoundingClientRect();
48
+ const x = e.clientX - rect.left;
49
+ const y = e.clientY - rect.top;
50
+ const crosshair = svg.getElementById('crosshair');
51
+ const h = svg.getElementById('crosshair-h');
52
+ const v = svg.getElementById('crosshair-v');
53
+ const coords = svg.getElementById('coordinates');
54
+
55
+ crosshair.style.display = 'block';
56
+ h.setAttribute('x1', '0');
57
+ h.setAttribute('x2', '640');
58
+ h.setAttribute('y1', y);
59
+ h.setAttribute('y2', y);
60
+ v.setAttribute('x1', x);
61
+ v.setAttribute('x2', x);
62
+ v.setAttribute('y1', '0');
63
+ v.setAttribute('y2', '640');
64
+
65
+ // Calculate real coordinates using inverse transformation
66
+ const matrix = {"a":21.064510062065075,"c":0,"e":303.832988527365,"b":0,"d":-21.064510062065075,"f":333.6498025202182};
67
+ // Manually invert and apply the affine transform
68
+ // Since we only use translate and scale, we can directly compute:
69
+ // x' = (x - tx) / sx
70
+ // y' = (y - ty) / sy
71
+ const sx = matrix.a;
72
+ const sy = matrix.d;
73
+ const tx = matrix.e;
74
+ const ty = matrix.f;
75
+ const realPoint = {
76
+ x: (x - tx) / sx,
77
+ y: (y - ty) / sy // Flip y back since we used negative scale
78
+ }
79
+
80
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
81
+ coords.setAttribute('x', (x + 5).toString());
82
+ coords.setAttribute('y', (y - 5).toString());
83
+ });
84
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
85
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
86
+ });
87
+ ]]></script></svg>
@@ -0,0 +1,277 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 0,
7
+ "y": 0
8
+ },
9
+ "width": 2.1,
10
+ "height": 1.7999999999999998,
11
+ "pins": [
12
+ {
13
+ "pinId": "U1.1",
14
+ "x": -1.05,
15
+ "y": 0.7
16
+ },
17
+ {
18
+ "pinId": "U1.2",
19
+ "x": -1.05,
20
+ "y": 0.49999999999999994
21
+ },
22
+ {
23
+ "pinId": "U1.3",
24
+ "x": -1.05,
25
+ "y": 0.29999999999999993
26
+ },
27
+ {
28
+ "pinId": "U1.4",
29
+ "x": -1.05,
30
+ "y": 0.09999999999999987
31
+ },
32
+ {
33
+ "pinId": "U1.5",
34
+ "x": -1.05,
35
+ "y": -0.10000000000000009
36
+ },
37
+ {
38
+ "pinId": "U1.6",
39
+ "x": -1.05,
40
+ "y": -0.30000000000000004
41
+ },
42
+ {
43
+ "pinId": "U1.7",
44
+ "x": -1.05,
45
+ "y": -0.5
46
+ },
47
+ {
48
+ "pinId": "U1.8",
49
+ "x": -1.05,
50
+ "y": -0.7
51
+ },
52
+ {
53
+ "pinId": "U1.9",
54
+ "x": 1.05,
55
+ "y": -0.6
56
+ },
57
+ {
58
+ "pinId": "U1.10",
59
+ "x": 1.05,
60
+ "y": -0.39999999999999997
61
+ },
62
+ {
63
+ "pinId": "U1.11",
64
+ "x": 1.05,
65
+ "y": -0.19999999999999996
66
+ },
67
+ {
68
+ "pinId": "U1.12",
69
+ "x": 1.05,
70
+ "y": 1.1102230246251565e-16
71
+ },
72
+ {
73
+ "pinId": "U1.13",
74
+ "x": 1.05,
75
+ "y": 0.20000000000000007
76
+ },
77
+ {
78
+ "pinId": "U1.14",
79
+ "x": 1.05,
80
+ "y": 0.4
81
+ },
82
+ {
83
+ "pinId": "U1.15",
84
+ "x": 1.05,
85
+ "y": 0.6
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "chipId": "schematic_component_1",
91
+ "center": {
92
+ "x": -11.782499999999999,
93
+ "y": -2
94
+ },
95
+ "width": 1.084999999999999,
96
+ "height": 0.6000000000000014,
97
+ "pins": [
98
+ {
99
+ "pinId": "RFSET.1",
100
+ "x": -12,
101
+ "y": -1.6999999999999993
102
+ },
103
+ {
104
+ "pinId": "RFSET.2",
105
+ "x": -12,
106
+ "y": -2.3000000000000007
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "chipId": "schematic_component_2",
112
+ "center": {
113
+ "x": -11.782499999999999,
114
+ "y": -0.18999999999999861
115
+ },
116
+ "width": 1.084999999999999,
117
+ "height": 0.6000000000000014,
118
+ "pins": [
119
+ {
120
+ "pinId": "RTEMP.1",
121
+ "x": -12,
122
+ "y": 0.1100000000000021
123
+ },
124
+ {
125
+ "pinId": "RTEMP.2",
126
+ "x": -12,
127
+ "y": -0.4899999999999993
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "chipId": "schematic_component_3",
133
+ "center": {
134
+ "x": -11.7225,
135
+ "y": 1.6750000000000007
136
+ },
137
+ "width": 1.205,
138
+ "height": 0.6000000000000014,
139
+ "pins": [
140
+ {
141
+ "pinId": "RFAULT.1",
142
+ "x": -12,
143
+ "y": 1.9750000000000014
144
+ },
145
+ {
146
+ "pinId": "RFAULT.2",
147
+ "x": -12,
148
+ "y": 1.375
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "chipId": "schematic_component_4",
154
+ "center": {
155
+ "x": 12,
156
+ "y": -1
157
+ },
158
+ "width": 0.6000000000000014,
159
+ "height": 0.8399999999999999,
160
+ "pins": [
161
+ {
162
+ "pinId": "CCOMP.1",
163
+ "x": 11.7,
164
+ "y": -1
165
+ },
166
+ {
167
+ "pinId": "CCOMP.2",
168
+ "x": 12.3,
169
+ "y": -1
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "chipId": "schematic_component_5",
175
+ "center": {
176
+ "x": 13.517500000000002,
177
+ "y": -1.3000000000000003
178
+ },
179
+ "width": 1.084999999999999,
180
+ "height": 0.6000000000000014,
181
+ "pins": [
182
+ {
183
+ "pinId": "RCOMP.1",
184
+ "x": 13.3,
185
+ "y": -0.9999999999999996
186
+ },
187
+ {
188
+ "pinId": "RCOMP.2",
189
+ "x": 13.3,
190
+ "y": -1.600000000000001
191
+ }
192
+ ]
193
+ }
194
+ ],
195
+ "directConnections": [
196
+ {
197
+ "pinIds": [
198
+ "U1.13",
199
+ "RFSET.1"
200
+ ],
201
+ "netId": "U1.FSET to RFSET.pin1",
202
+ "netLabelWidth": 2.05
203
+ },
204
+ {
205
+ "pinIds": [
206
+ "U1.14",
207
+ "RTEMP.1"
208
+ ],
209
+ "netId": "U1.TEMP to RTEMP.pin1",
210
+ "netLabelWidth": 2.05
211
+ },
212
+ {
213
+ "pinIds": [
214
+ "U1.7",
215
+ "RFAULT.1"
216
+ ],
217
+ "netId": "U1.FAULT to RFAULT.pin1",
218
+ "netLabelWidth": 2.24
219
+ },
220
+ {
221
+ "pinIds": [
222
+ "U1.12",
223
+ "CCOMP.1"
224
+ ],
225
+ "netId": "U1.COMP to CCOMP.pos",
226
+ "netLabelWidth": 1.96
227
+ },
228
+ {
229
+ "pinIds": [
230
+ "CCOMP.2",
231
+ "RCOMP.1"
232
+ ],
233
+ "netId": "CCOMP.neg to RCOMP.pin1"
234
+ }
235
+ ],
236
+ "netConnections": [
237
+ {
238
+ "netId": "GND",
239
+ "pinIds": [
240
+ "RFSET.2",
241
+ "RTEMP.2",
242
+ "RFAULT.2",
243
+ "RCOMP.2"
244
+ ],
245
+ "netLabelWidth": 0.42,
246
+ "netLabelHeight": 0.48
247
+ }
248
+ ],
249
+ "textBoxes": [
250
+ {
251
+ "chipId": "schematic_component_0",
252
+ "center": {
253
+ "x": 0.13,
254
+ "y": -1.0299999999999998
255
+ },
256
+ "width": 1.56,
257
+ "height": 0.18000000000000005,
258
+ "text": "TPS923655DMTR"
259
+ },
260
+ {
261
+ "chipId": "schematic_component_0",
262
+ "center": {
263
+ "x": -0.53,
264
+ "y": 1.0150000000000001
265
+ },
266
+ "width": 0.35999999999999993,
267
+ "height": 0.2500000000000002,
268
+ "text": "U1"
269
+ }
270
+ ],
271
+ "availableNetLabelOrientations": {
272
+ "GND": [
273
+ "y-"
274
+ ]
275
+ },
276
+ "maxMspPairDistance": 2.4
277
+ }
@@ -0,0 +1,12 @@
1
+ import { expect, test } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "./bug-report-20260708T095725Z.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("bug-report-20260708T095725Z", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })