@tscircuit/schematic-trace-solver 0.0.86 → 0.0.88

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 (117) hide show
  1. package/.agents/skills/schematic-trace-visualization/SKILL.md +115 -0
  2. package/.github/scripts/import-json-bug-report.ts +15 -1
  3. package/.github/workflows/json-bug-report.yml +3 -2
  4. package/AGENTS.md +22 -0
  5. package/dist/index.js +86 -10
  6. package/lib/solvers/Example28Solver/Example28Solver.ts +46 -10
  7. package/lib/solvers/Example28Solver/countCrossingsWithOtherTraces.ts +19 -0
  8. package/lib/solvers/Example28Solver/scoreSolutionTracePath.ts +26 -0
  9. package/lib/testing/PipelineStageDebugRunner.ts +344 -0
  10. package/package.json +3 -2
  11. package/scripts/debug-pipeline-stages.ts +146 -0
  12. package/site/bug-reports/bug-report-20260706T220324Z.page.tsx +4 -0
  13. package/site/bug-reports/bug-report-20260707T020342Z.page.tsx +4 -0
  14. package/site/bug-reports/bug-report-20260707T092615Z.page.tsx +4 -0
  15. package/site/bug-reports/bug-report-20260707T134549Z.page.tsx +4 -0
  16. package/site/bug-reports/bug-report-20260707T134722Z.page.tsx +4 -0
  17. package/site/bug-reports/bug-report-20260707T140410Z.page.tsx +4 -0
  18. package/site/bug-reports/bug-report-20260707T141025Z.page.tsx +4 -0
  19. package/site/bug-reports/bug-report-20260707T141421Z.page.tsx +4 -0
  20. package/tests/bug-reports/bug-report-20260706T220324Z/__snapshots__/bug-report-20260706T220324Z.snap.svg +357 -3448
  21. package/tests/bug-reports/bug-report-20260707T020342Z/__snapshots__/bug-report-20260707T020342Z.snap.svg +64 -0
  22. package/tests/bug-reports/bug-report-20260707T020342Z/bug-report-20260707T020342Z.json +233 -0
  23. package/tests/bug-reports/bug-report-20260707T020342Z/bug-report-20260707T020342Z.test.ts +12 -0
  24. package/tests/bug-reports/bug-report-20260707T092615Z/__snapshots__/bug-report-20260707T092615Z.snap.svg +2098 -0
  25. package/tests/bug-reports/bug-report-20260707T092615Z/bug-report-20260707T092615Z.json +1392 -0
  26. package/tests/bug-reports/bug-report-20260707T092615Z/bug-report-20260707T092615Z.test.ts +12 -0
  27. package/tests/bug-reports/bug-report-20260707T134549Z/__snapshots__/bug-report-20260707T134549Z.snap.svg +857 -0
  28. package/tests/bug-reports/bug-report-20260707T134549Z/bug-report-20260707T134549Z.json +652 -0
  29. package/tests/bug-reports/bug-report-20260707T134549Z/bug-report-20260707T134549Z.test.ts +12 -0
  30. package/tests/bug-reports/bug-report-20260707T134722Z/__snapshots__/bug-report-20260707T134722Z.snap.svg +275 -0
  31. package/tests/bug-reports/bug-report-20260707T134722Z/bug-report-20260707T134722Z.json +265 -0
  32. package/tests/bug-reports/bug-report-20260707T134722Z/bug-report-20260707T134722Z.test.ts +12 -0
  33. package/tests/bug-reports/bug-report-20260707T140410Z/__snapshots__/bug-report-20260707T140410Z.snap.svg +950 -0
  34. package/tests/bug-reports/bug-report-20260707T140410Z/bug-report-20260707T140410Z.json +610 -0
  35. package/tests/bug-reports/bug-report-20260707T140410Z/bug-report-20260707T140410Z.test.ts +12 -0
  36. package/tests/bug-reports/bug-report-20260707T141025Z/__snapshots__/bug-report-20260707T141025Z.snap.svg +218 -0
  37. package/tests/bug-reports/bug-report-20260707T141025Z/bug-report-20260707T141025Z.json +185 -0
  38. package/tests/bug-reports/bug-report-20260707T141025Z/bug-report-20260707T141025Z.test.ts +12 -0
  39. package/tests/bug-reports/bug-report-20260707T141421Z/__snapshots__/bug-report-20260707T141421Z.snap.svg +613 -0
  40. package/tests/bug-reports/bug-report-20260707T141421Z/bug-report-20260707T141421Z.json +499 -0
  41. package/tests/bug-reports/bug-report-20260707T141421Z/bug-report-20260707T141421Z.test.ts +12 -0
  42. package/tests/examples/__snapshots__/example01.snap.svg +59 -162
  43. package/tests/examples/__snapshots__/example02.snap.svg +64 -273
  44. package/tests/examples/__snapshots__/example03.snap.svg +85 -290
  45. package/tests/examples/__snapshots__/example04.snap.svg +50 -94
  46. package/tests/examples/__snapshots__/example05.snap.svg +73 -191
  47. package/tests/examples/__snapshots__/example06.snap.svg +49 -95
  48. package/tests/examples/__snapshots__/example07.snap.svg +65 -218
  49. package/tests/examples/__snapshots__/example08.snap.svg +61 -143
  50. package/tests/examples/__snapshots__/example09.snap.svg +123 -493
  51. package/tests/examples/__snapshots__/example10.snap.svg +57 -136
  52. package/tests/examples/__snapshots__/example11.snap.svg +64 -173
  53. package/tests/examples/__snapshots__/example12.snap.svg +58 -159
  54. package/tests/examples/__snapshots__/example13.snap.svg +78 -348
  55. package/tests/examples/__snapshots__/example14.snap.svg +77 -293
  56. package/tests/examples/__snapshots__/example15.snap.svg +140 -984
  57. package/tests/examples/__snapshots__/example16.snap.svg +62 -162
  58. package/tests/examples/__snapshots__/example17.snap.svg +67 -198
  59. package/tests/examples/__snapshots__/example18.snap.svg +69 -249
  60. package/tests/examples/__snapshots__/example19.snap.svg +63 -202
  61. package/tests/examples/__snapshots__/example20.snap.svg +60 -148
  62. package/tests/examples/__snapshots__/example21.snap.svg +73 -298
  63. package/tests/examples/__snapshots__/example22.snap.svg +62 -156
  64. package/tests/examples/__snapshots__/example23.snap.svg +66 -172
  65. package/tests/examples/__snapshots__/example24.snap.svg +64 -164
  66. package/tests/examples/__snapshots__/example25.snap.svg +76 -299
  67. package/tests/examples/__snapshots__/example26.snap.svg +64 -164
  68. package/tests/examples/__snapshots__/example27.snap.svg +83 -300
  69. package/tests/examples/__snapshots__/example28.snap.svg +54 -115
  70. package/tests/examples/__snapshots__/example29.snap.svg +257 -1299
  71. package/tests/examples/__snapshots__/example30.snap.svg +91 -293
  72. package/tests/examples/__snapshots__/example31.snap.svg +47 -88
  73. package/tests/examples/__snapshots__/example32.snap.svg +107 -405
  74. package/tests/examples/__snapshots__/example33.snap.svg +71 -180
  75. package/tests/examples/__snapshots__/example34.snap.svg +55 -116
  76. package/tests/examples/__snapshots__/example35.snap.svg +69 -176
  77. package/tests/examples/__snapshots__/example36.snap.svg +65 -159
  78. package/tests/examples/__snapshots__/example37.snap.svg +75 -223
  79. package/tests/examples/__snapshots__/example38.snap.svg +46 -76
  80. package/tests/examples/__snapshots__/example39.snap.svg +51 -106
  81. package/tests/examples/__snapshots__/example40.snap.svg +83 -270
  82. package/tests/examples/__snapshots__/example41.snap.svg +54 -118
  83. package/tests/examples/__snapshots__/example42.snap.svg +67 -194
  84. package/tests/examples/__snapshots__/example43.snap.svg +62 -168
  85. package/tests/examples/__snapshots__/example44.snap.svg +86 -369
  86. package/tests/examples/__snapshots__/example45.snap.svg +60 -169
  87. package/tests/examples/__snapshots__/example46.snap.svg +80 -342
  88. package/tests/examples/__snapshots__/example47.snap.svg +82 -323
  89. package/tests/examples/__snapshots__/example48.snap.svg +64 -167
  90. package/tests/examples/__snapshots__/example49.snap.svg +120 -565
  91. package/tests/examples/__snapshots__/example50.snap.svg +71 -195
  92. package/tests/fixtures/getLastStepGraphicsObject.ts +38 -0
  93. package/tests/fixtures/getLastStepSvg.ts +9 -0
  94. package/tests/repros/__snapshots__/bugreport-001-gnd-overlap.snap.svg +67 -218
  95. package/tests/repros/__snapshots__/manufacturePartNumber-text-box.snap.svg +47 -87
  96. package/tests/repros/__snapshots__/netlabel-connector-through-rail-label.snap.svg +73 -272
  97. package/tests/repros/__snapshots__/repro-atmega328p-fault-pullup.snap.svg +284 -0
  98. package/tests/repros/__snapshots__/repro-atmega328p-missing-gnd-netlabel.snap.svg +470 -0
  99. package/tests/repros/__snapshots__/repro-bq24074-battery-charger.snap.svg +94 -395
  100. package/tests/repros/__snapshots__/repro-cc2340r5.snap.svg +88 -467
  101. package/tests/repros/__snapshots__/repro-ina237-current-monitor.snap.svg +109 -569
  102. package/tests/repros/__snapshots__/repro130-bq27441-fuel-gauge-trace-through-c1.snap.svg +95 -459
  103. package/tests/repros/__snapshots__/repro51-overlap-junction-crossing.snap.svg +64 -176
  104. package/tests/repros/__snapshots__/trace-overlap-box-resistor.snap.svg +51 -112
  105. package/tests/repros/assets/repro-atmega328p-fault-pullup.input.json +239 -0
  106. package/tests/repros/assets/repro-atmega328p-missing-gnd-netlabel.input.json +432 -0
  107. package/tests/repros/repro-atmega328p-fault-pullup.test.ts +11 -0
  108. package/tests/repros/repro-atmega328p-missing-gnd-netlabel.test.ts +16 -0
  109. package/tests/solvers/SchematicTraceSingleLineSolver2/__snapshots__/SchematicTraceSingleLineSolver2_01-example17-d1_1-u1_1.snap.svg +59 -159
  110. package/tests/solvers/TraceCleanupSolver/__snapshots__/TraceCleanupSolver.snap.svg +54 -118
  111. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/__snapshots__/TraceLabelOverlapAvoidanceSolver.snap.svg +58 -245
  112. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/renderComparisonView/__snapshots__/renderComparisonView01.snap.svg +73 -222
  113. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/renderComparisonView/__snapshots__/renderComparisonView02.snap.svg +65 -204
  114. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/renderComparisonView/__snapshots__/renderComparisonView03.snap.svg +65 -183
  115. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/MergedNetLabelObstacles.snap.svg +54 -139
  116. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/OverlapAvoidanceStepSolver.snap.svg +61 -215
  117. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/SingleOverlapSolver.snap.svg +54 -124
@@ -0,0 +1,218 @@
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="100%" height="100%" fill="white" />
3
+ <g>
4
+ <circle data-type="point" data-label="U1.1
5
+ x-" data-x="-1.6" data-y="1" cx="310.03656267490334" cy="290.82119656754486" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
6
+ </g>
7
+ <g>
8
+ <circle data-type="point" data-label="U1.2
9
+ x-" data-x="-1.6" data-y="-1" cx="310.03656267490334" cy="408.715351850192" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
10
+ </g>
11
+ <g>
12
+ <circle data-type="point" data-label="U1.3
13
+ x-" data-x="-1.6" data-y="0" cx="310.03656267490334" cy="349.76827420886843" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
14
+ </g>
15
+ <g>
16
+ <circle data-type="point" data-label="U1.5
17
+ x+" data-x="1.6" data-y="-0.7" cx="498.66721112713884" cy="391.0312285577949" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
18
+ </g>
19
+ <g>
20
+ <circle data-type="point" data-label="U1.6
21
+ x+" data-x="1.6" data-y="0.7" cx="498.66721112713884" cy="308.50531985994195" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
22
+ </g>
23
+ <g>
24
+ <circle data-type="point" data-label="V_IN.1
25
+ y+" data-x="-2.5747276749999997" data-y="2.7300000000000004" cx="252.57921473753154" cy="188.842752248055" r="3" fill="hsl(97, 100%, 50%, 0.8)" />
26
+ </g>
27
+ <g>
28
+ <circle data-type="point" data-label="V_IN.2
29
+ y-" data-x="-2.564727675" data-y="1.6500000000000004" cx="253.16868551394478" cy="252.5055961006845" r="3" fill="hsl(98, 100%, 50%, 0.8)" />
30
+ </g>
31
+ <g>
32
+ <circle data-type="point" data-label="V_ON.1
33
+ x-" data-x="-4.5" data-y="0" cx="139.09003751506492" cy="349.76827420886843" r="3" fill="hsl(283, 100%, 50%, 0.8)" />
34
+ </g>
35
+ <g>
36
+ <circle data-type="point" data-label="V_ON.2
37
+ x+" data-x="-2.3000000000000003" data-y="0" cx="268.77360832597685" cy="349.76827420886843" r="3" fill="hsl(284, 100%, 50%, 0.8)" />
38
+ </g>
39
+ <g>
40
+ <circle data-type="point" data-label="R_L.1
41
+ y+" data-x="2.6595915124999996" data-y="0.7000000000000004" cx="561.1270342825638" cy="308.5053198599419" r="3" fill="hsl(18, 100%, 50%, 0.8)" />
42
+ </g>
43
+ <g>
44
+ <circle data-type="point" data-label="R_L.2
45
+ y-" data-x="2.6595915124999996" data-y="-0.3999999999999997" cx="561.1270342825638" cy="373.34710526539783" r="3" fill="hsl(19, 100%, 50%, 0.8)" />
46
+ </g>
47
+ <g>
48
+ <circle data-type="point" data-label="anchorPoint
49
+ orientation: x-" data-x="-2.5747276749999997" data-y="2.9300000000000006" cx="252.57921473753154" cy="177.05333671979028" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
50
+ </g>
51
+ <g>
52
+ <circle data-type="point" data-label="anchorPoint
53
+ orientation: y-" data-x="-2.3000000000000003" data-y="-1" cx="268.77360832597685" cy="408.715351850192" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
54
+ </g>
55
+ <g>
56
+ <circle data-type="point" data-label="anchorPoint
57
+ orientation: y-" data-x="2.6595915124999996" data-y="-0.3999999999999997" cx="561.1270342825638" cy="373.34710526539783" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
58
+ </g>
59
+ <g>
60
+ <circle data-type="point" data-label="anchorPoint
61
+ orientation: x-" data-x="-4.5" data-y="0" cx="139.09003751506492" cy="349.76827420886843" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
62
+ </g>
63
+ <g>
64
+ <circle data-type="point" data-label="anchorPoint
65
+ orientation: x-" data-x="-1.6" data-y="0" cx="310.03656267490334" cy="349.76827420886843" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
66
+ </g>
67
+ <g>
68
+ <circle data-type="point" data-label="anchorPoint
69
+ orientation: y-" data-x="1.8" data-y="-0.7" cx="510.45662665540357" cy="391.0312285577949" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
70
+ </g>
71
+ <g>
72
+ <polyline data-points="-2.5747276749999997,2.7300000000000004 -1.6,1" data-type="line" data-label="" points="252.57921473753154,188.842752248055 310.03656267490334,290.82119656754486" fill="none" stroke="hsl(16, 100%, 50%, 0.8)" stroke-width="1" />
73
+ </g>
74
+ <g>
75
+ <polyline data-points="-4.5,0 -1.6,0" data-type="line" data-label="" points="139.09003751506492,349.76827420886843 310.03656267490334,349.76827420886843" fill="none" stroke="hsl(184, 100%, 50%, 0.8)" stroke-width="1" />
76
+ </g>
77
+ <g>
78
+ <polyline data-points="1.6,0.7 2.6595915124999996,0.7000000000000004" data-type="line" data-label="" points="498.66721112713884,308.50531985994195 561.1270342825638,308.5053198599419" fill="none" stroke="hsl(80, 100%, 50%, 0.8)" stroke-width="1" />
79
+ </g>
80
+ <g>
81
+ <polyline data-points="1.6,-0.7 1.6,0.7" data-type="line" data-label="" points="498.66721112713884,391.0312285577949 498.66721112713884,308.50531985994195" fill="none" stroke="hsl(144, 100%, 50%, 0.8)" stroke-width="1" />
82
+ </g>
83
+ <g>
84
+ <polyline data-points="-1.6,-1 -2.564727675,1.6500000000000004" data-type="line" data-label="" points="310.03656267490334,408.715351850192 253.16868551394478,252.5055961006845" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
85
+ </g>
86
+ <g>
87
+ <polyline data-points="-1.6,-1 -2.3000000000000003,0" data-type="line" data-label="" points="310.03656267490334,408.715351850192 268.77360832597685,349.76827420886843" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
88
+ </g>
89
+ <g>
90
+ <polyline data-points="-1.6,-1 2.6595915124999996,-0.3999999999999997" data-type="line" data-label="" points="310.03656267490334,408.715351850192 561.1270342825638,373.34710526539783" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
91
+ </g>
92
+ <g>
93
+ <polyline data-points="-2.564727675,1.6500000000000004 -2.3000000000000003,0" data-type="line" data-label="" points="253.16868551394478,252.5055961006845 268.77360832597685,349.76827420886843" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
94
+ </g>
95
+ <g>
96
+ <polyline data-points="-2.564727675,1.6500000000000004 2.6595915124999996,-0.3999999999999997" data-type="line" data-label="" points="253.16868551394478,252.5055961006845 561.1270342825638,373.34710526539783" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
97
+ </g>
98
+ <g>
99
+ <polyline data-points="-2.3000000000000003,0 2.6595915124999996,-0.3999999999999997" data-type="line" data-label="" points="268.77360832597685,349.76827420886843 561.1270342825638,373.34710526539783" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
100
+ </g>
101
+ <g>
102
+ <polyline data-points="1.6,0.7 2.12979575625,0.7 2.12979575625,0.9000000000000004 2.6595915124999996,0.9000000000000004 2.6595915124999996,0.7000000000000004" data-type="line" data-label="" points="498.66721112713884,308.50531985994195 529.8971227048513,308.50531985994195 529.8971227048513,296.71590433167717 561.1270342825638,296.71590433167717 561.1270342825638,308.5053198599419" fill="none" stroke="purple" stroke-width="1" />
103
+ </g>
104
+ <g>
105
+ <polyline data-points="1.6,-0.7 1.8,-0.7 1.8,0.7 1.6,0.7" data-type="line" data-label="" points="498.66721112713884,391.0312285577949 510.45662665540357,391.0312285577949 510.45662665540357,308.50531985994195 498.66721112713884,308.50531985994195" fill="none" stroke="purple" stroke-width="1" />
106
+ </g>
107
+ <g>
108
+ <polyline data-points="-2.5747276749999997,2.7300000000000004 -2.5747276749999997,2.9300000000000006 -2.0873638375,2.9300000000000006 -2.0873638375,0.9999999999999996 -1.6,0.9999999999999996" data-type="line" data-label="" points="252.57921473753154,188.842752248055 252.57921473753154,177.05333671979028 281.30788870621745,177.05333671979028 281.30788870621745,290.82119656754486 310.03656267490334,290.82119656754486" fill="none" stroke="purple" stroke-width="1" />
109
+ </g>
110
+ <g>
111
+ <polyline data-points="-2.3000000000000003,0 -2.3000000000000003,-1 -1.6,-1" data-type="line" data-label="" points="268.77360832597685,349.76827420886843 268.77360832597685,408.715351850192 310.03656267490334,408.715351850192" fill="none" stroke="purple" stroke-width="1" />
112
+ </g>
113
+ <g>
114
+ <polyline data-points="-2.564727675,1.6500000000000004 -2.564727675,0.8250000000000002 -2.3000000000000003,0.8250000000000002 -2.3000000000000003,0" data-type="line" data-label="" points="253.16868551394478,252.5055961006845 253.16868551394478,301.13693515477644 268.77360832597685,301.13693515477644 268.77360832597685,349.76827420886843" fill="none" stroke="purple" stroke-width="1" />
115
+ </g>
116
+ <g>
117
+ <rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="310.03656267490334" y="243.66353445448595" width="188.6306484522355" height="212.20947950876496" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.016964369397321426" />
118
+ </g>
119
+ <g>
120
+ <rect data-type="rect" data-label="schematic_component_1" data-x="-2.5697276749999998" data-y="2.1900000000000004" x="234.0269380434333" y="188.842752248055" width="37.69402416460974" height="63.66284385262949" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.016964369397321426" />
121
+ </g>
122
+ <g>
123
+ <rect data-type="rect" data-label="schematic_component_2" data-x="-3.4000000000000004" data-y="0" x="139.09003751506492" y="314.40002762407426" width="129.68357081091193" height="70.73649316958836" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.016964369397321426" />
124
+ </g>
125
+ <g>
126
+ <rect data-type="rect" data-label="schematic_component_3" data-x="2.9094553499999996" data-y="0.15000000000000036" x="551.7115546228707" y="308.5053198599419" width="48.28844537712928" height="64.84178540545594" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.016964369397321426" />
127
+ </g>
128
+ <g>
129
+ <rect data-type="rect" data-label="TPS22919DCKR" data-x="-0.48" data-y="-1.9300000000000002" x="333.6153937314328" y="458.23089706890386" width="84.88379180350597" height="10.610473975438197" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.016964369397321426" />
130
+ </g>
131
+ <g>
132
+ <rect data-type="rect" data-label="U1" data-x="-1.08" data-y="1.9300000000000002" x="333.6153937314328" y="230.69517737339478" width="14.147298633917671" height="10.610473975438225" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.016964369397321426" />
133
+ </g>
134
+ <g>
135
+ <rect data-type="rect" data-label="V_ON" data-x="-3.8600000000000003" data-y="0.73" x="162.66886857159434" y="301.4316705429831" width="28.294597267835343" height="10.610473975438197" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.016964369397321426" />
136
+ </g>
137
+ <g>
138
+ <rect data-type="rect" data-label="netId: V_IN.pin1 to U1.IN
139
+ globalConnNetId: connectivity_net0" data-x="-2.7997276749999997" data-y="2.9300000000000006" x="226.0530297989359" y="171.15862895565792" width="26.526184938595634" height="11.789415528264726" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.016964369397321426" />
140
+ </g>
141
+ <g>
142
+ <rect data-type="rect" data-label="netId: GND
143
+ globalConnNetId: connectivity_net3" data-x="-2.3000000000000003" data-y="-1.24" x="256.3947220212989" y="408.715351850192" width="24.757772609355868" height="28.294597267835343" fill="#00000066" stroke="#000000" stroke-width="0.016964369397321426" />
144
+ </g>
145
+ <g>
146
+ <rect data-type="rect" data-label="netId: GND
147
+ globalConnNetId: connectivity_net3" data-x="2.6595915124999996" data-y="-0.6409999999999997" x="548.7481479778859" y="373.40605234303916" width="24.75777260935581" height="28.294597267835343" fill="#00000066" stroke="#000000" stroke-width="0.016964369397321426" />
148
+ </g>
149
+ <g>
150
+ <rect data-type="rect" data-label="netId: V_ON.OUT to U1.ON
151
+ globalConnNetId: connectivity_net1" data-x="-5.341" data-y="0" x="40" y="343.87356644473607" width="99.03109043742359" height="11.789415528264726" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.016964369397321426" />
152
+ </g>
153
+ <g>
154
+ <rect data-type="rect" data-label="netId: V_ON.OUT to U1.ON
155
+ globalConnNetId: connectivity_net1" data-x="-2.441" data-y="0" x="210.94652515983842" y="343.87356644473607" width="99.03109043742359" height="11.789415528264726" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.016964369397321426" />
156
+ </g>
157
+ <g>
158
+ <rect data-type="rect" data-label="netId: U1.QOD to U1.OUT
159
+ globalConnNetId: connectivity_net2" data-x="1.8" data-y="-0.9249999999999999" x="504.5619188912712" y="391.0312285577949" width="11.78941552826467" height="26.526184938595634" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.016964369397321426" />
160
+ </g>
161
+ <g id="crosshair" style="display: none">
162
+ <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
163
+ <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>
164
+ </g>
165
+ <script>
166
+ <![CDATA[
167
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
168
+ const svg = e.currentTarget;
169
+ const rect = svg.getBoundingClientRect();
170
+ const x = e.clientX - rect.left;
171
+ const y = e.clientY - rect.top;
172
+ const crosshair = svg.getElementById('crosshair');
173
+ const h = svg.getElementById('crosshair-h');
174
+ const v = svg.getElementById('crosshair-v');
175
+ const coords = svg.getElementById('coordinates');
176
+
177
+ crosshair.style.display = 'block';
178
+ h.setAttribute('x1', '0');
179
+ h.setAttribute('x2', '640');
180
+ h.setAttribute('y1', y);
181
+ h.setAttribute('y2', y);
182
+ v.setAttribute('x1', x);
183
+ v.setAttribute('x2', x);
184
+ v.setAttribute('y1', '0');
185
+ v.setAttribute('y2', '640');
186
+
187
+ // Calculate real coordinates using inverse transformation
188
+ const matrix = {
189
+ "a": 58.94707764132359,
190
+ "c": 0,
191
+ "e": 404.3518869010211,
192
+ "b": 0,
193
+ "d": -58.94707764132359,
194
+ "f": 349.76827420886843
195
+ };
196
+ // Manually invert and apply the affine transform
197
+ // Since we only use translate and scale, we can directly compute:
198
+ // x' = (x - tx) / sx
199
+ // y' = (y - ty) / sy
200
+ const sx = matrix.a;
201
+ const sy = matrix.d;
202
+ const tx = matrix.e;
203
+ const ty = matrix.f;
204
+ const realPoint = {
205
+ x: (x - tx) / sx,
206
+ y: (y - ty) / sy // Flip y back since we used negative scale
207
+ }
208
+
209
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
210
+ coords.setAttribute('x', (x + 5).toString());
211
+ coords.setAttribute('y', (y - 5).toString());
212
+ });
213
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
214
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
215
+ });
216
+ ]]>
217
+ </script>
218
+ </svg>
@@ -0,0 +1,185 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 0,
7
+ "y": 0
8
+ },
9
+ "width": 3.2,
10
+ "height": 3.6,
11
+ "pins": [
12
+ {
13
+ "pinId": "U1.1",
14
+ "x": -1.6,
15
+ "y": 1
16
+ },
17
+ {
18
+ "pinId": "U1.2",
19
+ "x": -1.6,
20
+ "y": -1
21
+ },
22
+ {
23
+ "pinId": "U1.3",
24
+ "x": -1.6,
25
+ "y": 0
26
+ },
27
+ {
28
+ "pinId": "U1.5",
29
+ "x": 1.6,
30
+ "y": -0.7
31
+ },
32
+ {
33
+ "pinId": "U1.6",
34
+ "x": 1.6,
35
+ "y": 0.7
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "chipId": "schematic_component_1",
41
+ "center": {
42
+ "x": -2.5697276749999998,
43
+ "y": 2.1900000000000004
44
+ },
45
+ "width": 0.6394553499999995,
46
+ "height": 1.08,
47
+ "pins": [
48
+ {
49
+ "pinId": "V_IN.1",
50
+ "x": -2.5747276749999997,
51
+ "y": 2.7300000000000004
52
+ },
53
+ {
54
+ "pinId": "V_IN.2",
55
+ "x": -2.564727675,
56
+ "y": 1.6500000000000004
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ "chipId": "schematic_component_2",
62
+ "center": {
63
+ "x": -3.4000000000000004,
64
+ "y": 0
65
+ },
66
+ "width": 2.2,
67
+ "height": 1.2,
68
+ "pins": [
69
+ {
70
+ "pinId": "V_ON.1",
71
+ "x": -4.5,
72
+ "y": 0
73
+ },
74
+ {
75
+ "pinId": "V_ON.2",
76
+ "x": -2.3000000000000003,
77
+ "y": 0
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "chipId": "schematic_component_3",
83
+ "center": {
84
+ "x": 2.9094553499999996,
85
+ "y": 0.15000000000000036
86
+ },
87
+ "width": 0.8191830249999992,
88
+ "height": 1.1,
89
+ "pins": [
90
+ {
91
+ "pinId": "R_L.1",
92
+ "x": 2.6595915124999996,
93
+ "y": 0.7000000000000004
94
+ },
95
+ {
96
+ "pinId": "R_L.2",
97
+ "x": 2.6595915124999996,
98
+ "y": -0.3999999999999997
99
+ }
100
+ ]
101
+ }
102
+ ],
103
+ "directConnections": [
104
+ {
105
+ "pinIds": [
106
+ "V_IN.1",
107
+ "U1.1"
108
+ ],
109
+ "netId": "V_IN.pin1 to U1.IN"
110
+ },
111
+ {
112
+ "pinIds": [
113
+ "V_ON.1",
114
+ "U1.3"
115
+ ],
116
+ "netId": "V_ON.OUT to U1.ON",
117
+ "netLabelWidth": 1.68
118
+ },
119
+ {
120
+ "pinIds": [
121
+ "U1.6",
122
+ "R_L.1"
123
+ ],
124
+ "netId": "U1.OUT to R_L.pin1"
125
+ },
126
+ {
127
+ "pinIds": [
128
+ "U1.5",
129
+ "U1.6"
130
+ ],
131
+ "netId": "U1.QOD to U1.OUT"
132
+ }
133
+ ],
134
+ "netConnections": [
135
+ {
136
+ "netId": "GND",
137
+ "pinIds": [
138
+ "U1.2",
139
+ "V_IN.2",
140
+ "V_ON.2",
141
+ "R_L.2"
142
+ ],
143
+ "netLabelWidth": 0.48,
144
+ "netLabelHeight": 0.42
145
+ }
146
+ ],
147
+ "textBoxes": [
148
+ {
149
+ "chipId": "schematic_component_0",
150
+ "center": {
151
+ "x": -0.48,
152
+ "y": -1.9300000000000002
153
+ },
154
+ "width": 1.44,
155
+ "height": 0.17999999999999994,
156
+ "text": "TPS22919DCKR"
157
+ },
158
+ {
159
+ "chipId": "schematic_component_0",
160
+ "center": {
161
+ "x": -1.08,
162
+ "y": 1.9300000000000002
163
+ },
164
+ "width": 0.24,
165
+ "height": 0.17999999999999994,
166
+ "text": "U1"
167
+ },
168
+ {
169
+ "chipId": "schematic_component_2",
170
+ "center": {
171
+ "x": -3.8600000000000003,
172
+ "y": 0.73
173
+ },
174
+ "width": 0.48,
175
+ "height": 0.17999999999999994,
176
+ "text": "V_ON"
177
+ }
178
+ ],
179
+ "availableNetLabelOrientations": {
180
+ "GND": [
181
+ "y-"
182
+ ]
183
+ },
184
+ "maxMspPairDistance": 2.4
185
+ }
@@ -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-20260707T141025Z.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("bug-report-20260707T141025Z", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })