@tscircuit/schematic-trace-solver 0.0.106 → 0.0.107

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.
@@ -0,0 +1,221 @@
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="U2.1
5
+ x+" data-x="1.65" data-y="0.09999999999999998" cx="358.0428134556575" cy="333.06104831804277" r="3" fill="hsl(200, 100%, 50%, 0.8)" />
6
+ </g>
7
+ <g>
8
+ <circle data-type="point" data-label="U2.2
9
+ x-" data-x="-1.65" data-y="-0.1" cx="196.5749235474006" cy="342.84698103975535" r="3" fill="hsl(201, 100%, 50%, 0.8)" />
10
+ </g>
11
+ <g>
12
+ <circle data-type="point" data-label="U2.3
13
+ x+" data-x="1.65" data-y="-0.30000000000000004" cx="358.0428134556575" cy="352.6329137614679" r="3" fill="hsl(202, 100%, 50%, 0.8)" />
14
+ </g>
15
+ <g>
16
+ <circle data-type="point" data-label="U2.4
17
+ x-" data-x="-1.65" data-y="0.1" cx="196.5749235474006" cy="333.06104831804277" r="3" fill="hsl(203, 100%, 50%, 0.8)" />
18
+ </g>
19
+ <g>
20
+ <circle data-type="point" data-label="U2.5
21
+ x+" data-x="1.65" data-y="0.30000000000000004" cx="358.0428134556575" cy="323.27511559633024" r="3" fill="hsl(204, 100%, 50%, 0.8)" />
22
+ </g>
23
+ <g>
24
+ <circle data-type="point" data-label="U2.6
25
+ x+" data-x="1.65" data-y="-0.10000000000000003" cx="358.0428134556575" cy="342.84698103975535" r="3" fill="hsl(205, 100%, 50%, 0.8)" />
26
+ </g>
27
+ <g>
28
+ <circle data-type="point" data-label="L4.1
29
+ x-" data-x="3.5720874999999994" data-y="1.3026245499999998" cx="452.0899082568807" cy="274.2170336391437" r="3" fill="hsl(43, 100%, 50%, 0.8)" />
30
+ </g>
31
+ <g>
32
+ <circle data-type="point" data-label="L4.2
33
+ x+" data-x="4.6279125" data-y="1.2973754500000003" cx="503.7510703363914" cy="274.47387033639137" r="3" fill="hsl(44, 100%, 50%, 0.8)" />
34
+ </g>
35
+ <g>
36
+ <circle data-type="point" data-label="C25.1
37
+ y+" data-x="-4.4" data-y="0.38" cx="62.0183486238532" cy="319.3607425076452" r="3" fill="hsl(265, 100%, 50%, 0.8)" />
38
+ </g>
39
+ <g>
40
+ <circle data-type="point" data-label="C25.2
41
+ y-" data-x="-4.4" data-y="-0.38" cx="62.0183486238532" cy="356.5472868501529" r="3" fill="hsl(266, 100%, 50%, 0.8)" />
42
+ </g>
43
+ <g>
44
+ <circle data-type="point" data-label="C26.1
45
+ y+" data-x="6" data-y="0.38" cx="570.8868501529053" cy="319.3607425076452" r="3" fill="hsl(146, 100%, 50%, 0.8)" />
46
+ </g>
47
+ <g>
48
+ <circle data-type="point" data-label="C26.2
49
+ y-" data-x="6" data-y="-0.38" cx="570.8868501529053" cy="356.5472868501529" r="3" fill="hsl(147, 100%, 50%, 0.8)" />
50
+ </g>
51
+ <g>
52
+ <circle data-type="point" data-label="anchorPoint
53
+ orientation: y+" data-x="6" data-y="1.2973754500000003" cx="570.8868501529053" cy="274.47387033639137" 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="-4.4" data-y="0.5800000000000002" cx="62.0183486238532" cy="309.5748097859327" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
58
+ </g>
59
+ <g>
60
+ <circle data-type="point" data-label="anchorPoint
61
+ orientation: y-" data-x="-4.4" data-y="-0.5800000000000002" cx="62.0183486238532" cy="366.3332195718654" 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="2.6110437499999994" data-y="0.30000000000000004" cx="405.06636085626906" cy="323.27511559633024" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
66
+ </g>
67
+ <g>
68
+ <polyline data-points="1.65,0.09999999999999998 1.65,-0.10000000000000003" data-type="line" data-label="" points="358.0428134556575,333.06104831804277 358.0428134556575,342.84698103975535" fill="none" stroke="hsl(100, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
69
+ </g>
70
+ <g>
71
+ <polyline data-points="1.65,0.09999999999999998 4.6279125,1.2973754500000003" data-type="line" data-label="" points="358.0428134556575,333.06104831804277 503.7510703363914,274.47387033639137" fill="none" stroke="hsl(100, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
72
+ </g>
73
+ <g>
74
+ <polyline data-points="1.65,0.09999999999999998 6,0.38" data-type="line" data-label="" points="358.0428134556575,333.06104831804277 570.8868501529053,319.3607425076452" fill="none" stroke="hsl(100, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
75
+ </g>
76
+ <g>
77
+ <polyline data-points="1.65,-0.10000000000000003 4.6279125,1.2973754500000003" data-type="line" data-label="" points="358.0428134556575,342.84698103975535 503.7510703363914,274.47387033639137" fill="none" stroke="hsl(100, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
78
+ </g>
79
+ <g>
80
+ <polyline data-points="1.65,-0.10000000000000003 6,0.38" data-type="line" data-label="" points="358.0428134556575,342.84698103975535 570.8868501529053,319.3607425076452" fill="none" stroke="hsl(100, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
81
+ </g>
82
+ <g>
83
+ <polyline data-points="4.6279125,1.2973754500000003 6,0.38" data-type="line" data-label="" points="503.7510703363914,274.47387033639137 570.8868501529053,319.3607425076452" fill="none" stroke="hsl(100, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
84
+ </g>
85
+ <g>
86
+ <polyline data-points="-1.65,-0.1 -1.65,0.1" data-type="line" data-label="" points="196.5749235474006,342.84698103975535 196.5749235474006,333.06104831804277" fill="none" stroke="hsl(261, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
87
+ </g>
88
+ <g>
89
+ <polyline data-points="-1.65,-0.1 -4.4,0.38" data-type="line" data-label="" points="196.5749235474006,342.84698103975535 62.0183486238532,319.3607425076452" fill="none" stroke="hsl(261, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
90
+ </g>
91
+ <g>
92
+ <polyline data-points="-1.65,0.1 -4.4,0.38" data-type="line" data-label="" points="196.5749235474006,333.06104831804277 62.0183486238532,319.3607425076452" fill="none" stroke="hsl(261, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
93
+ </g>
94
+ <g>
95
+ <polyline data-points="1.65,-0.30000000000000004 -4.4,-0.38" data-type="line" data-label="" points="358.0428134556575,352.6329137614679 62.0183486238532,356.5472868501529" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
96
+ </g>
97
+ <g>
98
+ <polyline data-points="1.65,-0.30000000000000004 6,-0.38" data-type="line" data-label="" points="358.0428134556575,352.6329137614679 570.8868501529053,356.5472868501529" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
99
+ </g>
100
+ <g>
101
+ <polyline data-points="-4.4,-0.38 6,-0.38" data-type="line" data-label="" points="62.0183486238532,356.5472868501529 570.8868501529053,356.5472868501529" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
102
+ </g>
103
+ <g>
104
+ <polyline data-points="1.65,0.30000000000000004 3.5720874999999994,1.3026245499999998" data-type="line" data-label="" points="358.0428134556575,323.27511559633024 452.0899082568807,274.2170336391437" fill="none" stroke="hsl(56, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
105
+ </g>
106
+ <g>
107
+ <polyline data-points="4.6279125,1.2973754500000003 6,1.2973754500000003 6,0.38" data-type="line" data-label="" points="503.7510703363914,274.47387033639137 570.8868501529053,274.47387033639137 570.8868501529053,319.3607425076452" fill="none" stroke="purple" stroke-width="1" />
108
+ </g>
109
+ <g>
110
+ <polyline data-points="1.65,0.09999999999999998 4.8279125,0.09999999999999998 4.8279125,1.2973754500000003 4.6279125,1.2973754500000003" data-type="line" data-label="" points="358.0428134556575,333.06104831804277 513.537003058104,333.06104831804277 513.537003058104,274.47387033639137 503.7510703363914,274.47387033639137" fill="none" stroke="purple" stroke-width="1" />
111
+ </g>
112
+ <g>
113
+ <polyline data-points="1.65,-0.10000000000000003 1.8499999999999999,-0.10000000000000003 1.8499999999999999,0.09999999999999998 1.65,0.09999999999999998" data-type="line" data-label="" points="358.0428134556575,342.84698103975535 367.82874617737,342.84698103975535 367.82874617737,333.06104831804277 358.0428134556575,333.06104831804277" fill="none" stroke="purple" stroke-width="1" />
114
+ </g>
115
+ <g>
116
+ <polyline data-points="-1.65,0.09999999999999976 -1.8499999999999999,0.09999999999999976 -1.8499999999999999,0.5800000000000002 -4.4,0.5800000000000002 -4.4,0.38" data-type="line" data-label="" points="196.5749235474006,333.0610483180428 186.78899082568807,333.0610483180428 186.78899082568807,309.5748097859327 62.0183486238532,309.5748097859327 62.0183486238532,319.3607425076452" fill="none" stroke="purple" stroke-width="1" />
117
+ </g>
118
+ <g>
119
+ <polyline data-points="-1.65,-0.1 -1.8499999999999999,-0.1 -1.8499999999999999,0.1 -1.65,0.1" data-type="line" data-label="" points="196.5749235474006,342.84698103975535 186.78899082568807,342.84698103975535 186.78899082568807,333.06104831804277 196.5749235474006,333.06104831804277" fill="none" stroke="purple" stroke-width="1" />
120
+ </g>
121
+ <g>
122
+ <polyline data-points="1.6500000000000004,-0.29999999999999993 1.8500000000000005,-0.29999999999999993 1.8500000000000005,-0.5800000000000002 -4.4,-0.5800000000000002 -4.4,-0.38" data-type="line" data-label="" points="358.0428134556575,352.6329137614679 367.82874617737,352.6329137614679 367.82874617737,366.3332195718654 62.0183486238532,366.3332195718654 62.0183486238532,356.5472868501529" fill="none" stroke="purple" stroke-width="1" />
123
+ </g>
124
+ <g>
125
+ <polyline data-points="6,-0.38 6,-0.5800000000000001 3.825,-0.5800000000000001 3.825,-0.30000000000000004 1.65,-0.30000000000000004" data-type="line" data-label="" points="570.8868501529053,356.5472868501529 570.8868501529053,366.3332195718654 464.46483180428135,366.3332195718654 464.46483180428135,352.6329137614679 358.0428134556575,352.6329137614679" fill="none" stroke="purple" stroke-width="1" />
126
+ </g>
127
+ <g>
128
+ <polyline data-points="1.65,0.30000000000000004 2.6110437499999994,0.30000000000000004 2.6110437499999994,1.3026245499999998 3.5720874999999994,1.3026245499999998" data-type="line" data-label="" points="358.0428134556575,323.27511559633024 405.06636085626906,323.27511559633024 405.06636085626906,274.2170336391437 452.0899082568807,274.2170336391437" fill="none" stroke="purple" stroke-width="1" />
129
+ </g>
130
+ <g>
131
+ <rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="196.5749235474006" y="313.4891828746177" width="161.4678899082569" height="48.92966360856269" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0204375" />
132
+ </g>
133
+ <g>
134
+ <rect data-type="rect" data-label="schematic_component_1" data-x="4.1" data-y="1.3" x="452.0899082568807" y="253.1163217125382" width="51.661162079510746" height="42.458260550458704" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0204375" />
135
+ </g>
136
+ <g>
137
+ <rect data-type="rect" data-label="schematic_component_2" data-x="-4.327500000000001" data-y="0" x="39.99999999999997" y="319.3607425076452" width="51.131498470948" height="37.18654434250766" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0204375" />
138
+ </g>
139
+ <g>
140
+ <rect data-type="rect" data-label="schematic_component_3" data-x="6.0725" data-y="0" x="548.8685015290519" y="319.3607425076452" width="51.131498470948145" height="37.18654434250766" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0204375" />
141
+ </g>
142
+ <g>
143
+ <rect data-type="rect" data-label="TPS61222DCKT" data-x="-0.53" data-y="-0.63" x="216.14678899082568" y="364.3760330275229" width="70.45871559633028" height="8.807339449541303" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.0204375" />
144
+ </g>
145
+ <g>
146
+ <rect data-type="rect" data-label="U2" data-x="-1.13" data-y="0.615" x="213.21100917431193" y="301.7460636085627" width="17.614678899082577" height="12.232415902140644" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.0204375" />
147
+ </g>
148
+ <g>
149
+ <rect data-type="rect" data-label="netId: VIN_3V3
150
+ globalConnNetId: connectivity_net0" data-x="6" data-y="1.5073754500000003" x="547.4006116207951" y="253.92341162079506" width="46.97247706422024" height="20.550458715596307" fill="#ef444466" stroke="#ef4444" stroke-width="0.0204375" />
151
+ </g>
152
+ <g>
153
+ <rect data-type="rect" data-label="netId: VIN_5V
154
+ globalConnNetId: connectivity_net1" data-x="-4.4" data-y="0.7900000000000001" x="41.467889908256865" y="289.02435107033637" width="41.10091743119264" height="20.550458715596335" fill="#ef444466" stroke="#ef4444" stroke-width="0.0204375" />
155
+ </g>
156
+ <g>
157
+ <rect data-type="rect" data-label="netId: GND
158
+ globalConnNetId: connectivity_net2" data-x="-4.4" data-y="-0.7900000000000001" x="50.27522935779814" y="366.3332195718654" width="23.486238532110093" height="20.550458715596335" fill="#00000066" stroke="#000000" stroke-width="0.0204375" />
159
+ </g>
160
+ <g>
161
+ <rect data-type="rect" data-label="netId: BOOST_SW
162
+ globalConnNetId: connectivity_net3" data-x="3.1510437499999995" data-y="0.30000000000000004" x="405.06636085626906" y="318.382149235474" width="52.8440366972477" height="9.785932721712527" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.0204375" />
163
+ </g>
164
+ <g id="crosshair" style="display: none">
165
+ <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
166
+ <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>
167
+ </g>
168
+ <script>
169
+ <![CDATA[
170
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
171
+ const svg = e.currentTarget;
172
+ const rect = svg.getBoundingClientRect();
173
+ const x = e.clientX - rect.left;
174
+ const y = e.clientY - rect.top;
175
+ const crosshair = svg.getElementById('crosshair');
176
+ const h = svg.getElementById('crosshair-h');
177
+ const v = svg.getElementById('crosshair-v');
178
+ const coords = svg.getElementById('coordinates');
179
+
180
+ crosshair.style.display = 'block';
181
+ h.setAttribute('x1', '0');
182
+ h.setAttribute('x2', '640');
183
+ h.setAttribute('y1', y);
184
+ h.setAttribute('y2', y);
185
+ v.setAttribute('x1', x);
186
+ v.setAttribute('x2', x);
187
+ v.setAttribute('y1', '0');
188
+ v.setAttribute('y2', '640');
189
+
190
+ // Calculate real coordinates using inverse transformation
191
+ const matrix = {
192
+ "a": 48.92966360856269,
193
+ "c": 0,
194
+ "e": 277.30886850152905,
195
+ "b": 0,
196
+ "d": -48.92966360856269,
197
+ "f": 337.95401467889906
198
+ };
199
+ // Manually invert and apply the affine transform
200
+ // Since we only use translate and scale, we can directly compute:
201
+ // x' = (x - tx) / sx
202
+ // y' = (y - ty) / sy
203
+ const sx = matrix.a;
204
+ const sy = matrix.d;
205
+ const tx = matrix.e;
206
+ const ty = matrix.f;
207
+ const realPoint = {
208
+ x: (x - tx) / sx,
209
+ y: (y - ty) / sy // Flip y back since we used negative scale
210
+ }
211
+
212
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
213
+ coords.setAttribute('x', (x + 5).toString());
214
+ coords.setAttribute('y', (y - 5).toString());
215
+ });
216
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
217
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
218
+ });
219
+ ]]>
220
+ </script>
221
+ </svg>
@@ -1,4 +1,4 @@
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="0.6499999999999999,0.825 -0.6499999999999999,-0.825" data-type="line" data-label="" points="419.0769230769231,177.84615384615384 195.0769230769231,462.1538461538462" fill="none" stroke="hsl(224, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.25,0.825 -1.25,-0.825" data-type="line" data-label="" points="522.4615384615386,177.84615384615384 91.69230769230768,462.1538461538462" fill="none" stroke="hsl(224, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.49999999999999994,-0.725 -1.25,0.825" data-type="line" data-label="" points="393.2307692307692,444.9230769230769 91.69230769230768,177.84615384615384" fill="none" stroke="hsl(168, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.4,-0.725 -0.6499999999999999,0.825" data-type="line" data-label="" points="548.3076923076924,444.9230769230769 195.0769230769231,177.84615384615384" fill="none" stroke="hsl(168, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.6499999999999999,0.825 0,0.825 0,-0.825 -0.6499999999999999,-0.825" data-type="line" data-label="" points="419.0769230769231,177.84615384615384 307.0769230769231,177.84615384615384 307.0769230769231,462.1538461538462 195.0769230769231,462.1538461538462" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.25,0.825 1.4500000000000002,0.825 1.4500000000000002,0 -1.3499999999999999,0 -1.3499999999999999,-0.825 -1.25,-0.825" data-type="line" data-label="" points="522.4615384615386,177.84615384615384 556.923076923077,177.84615384615384 556.923076923077,320 74.46153846153848,320 74.46153846153848,462.1538461538462 91.69230769230768,462.1538461538462" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,-0.725 0.2,-0.725 0.2,-1.365 -1.55,-1.365 -1.55,0.825 -1.25,0.825" data-type="line" data-label="" points="393.2307692307693,444.9230769230769 341.53846153846155,444.9230769230769 341.53846153846155,555.2 40,555.2 40,177.84615384615384 91.69230769230768,177.84615384615384" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.4,-0.725 1.5999999999999999,-0.725 1.5999999999999999,1.365 -0.1,1.365 -0.1,0.825 -0.6499999999999999,0.825" data-type="line" data-label="" points="548.3076923076924,444.9230769230769 582.7692307692307,444.9230769230769 582.7692307692307,84.79999999999998 289.84615384615387,84.79999999999998 289.84615384615387,177.84615384615384 195.0769230769231,177.84615384615384" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="-0.95" data-y="0.825" x="91.69230769230768" y="119.26153846153844" width="103.38461538461542" height="117.16923076923081" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="0.95" data-y="0.825" x="419.0769230769231" y="119.26153846153844" width="103.38461538461547" height="117.16923076923081" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="-0.95" data-y="-0.825" x="91.69230769230768" y="403.5692307692308" width="103.38461538461542" height="117.16923076923081" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="0.95" data-y="-0.825" x="393.2307692307693" y="414.2732025415385" width="155.07692307692315" height="95.76128722461533" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="netId: .J1 &gt; .pin1 to .R1 &gt; .pin1
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="0.6499999999999999,0.825 -0.6499999999999999,-0.825" data-type="line" data-label="" points="419.0769230769231,177.84615384615384 195.0769230769231,462.1538461538462" fill="none" stroke="hsl(224, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.25,0.825 -1.25,-0.825" data-type="line" data-label="" points="522.4615384615386,177.84615384615384 91.69230769230768,462.1538461538462" fill="none" stroke="hsl(224, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.49999999999999994,-0.725 -1.25,0.825" data-type="line" data-label="" points="393.2307692307692,444.9230769230769 91.69230769230768,177.84615384615384" fill="none" stroke="hsl(168, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.4,-0.725 -0.6499999999999999,0.825" data-type="line" data-label="" points="548.3076923076924,444.9230769230769 195.0769230769231,177.84615384615384" fill="none" stroke="hsl(168, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.6499999999999999,0.825 0,0.825 0,-0.825 -0.6499999999999999,-0.825" data-type="line" data-label="" points="419.0769230769231,177.84615384615384 307.0769230769231,177.84615384615384 307.0769230769231,462.1538461538462 195.0769230769231,462.1538461538462" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.25,0.825 1.4500000000000002,0.825 1.4500000000000002,-0.18893936762499997 0.050000000000000155,-0.18893936762499997 0.050000000000000155,-1.2028787352499999 -1.3499999999999999,-1.2028787352499999 -1.3499999999999999,-0.825 -1.25,-0.825" data-type="line" data-label="" points="522.4615384615386,177.84615384615384 556.923076923077,177.84615384615384 556.923076923077,352.55570642153845 315.69230769230774,352.55570642153845 315.69230769230774,527.2652589969231 74.46153846153848,527.2652589969231 74.46153846153848,462.1538461538462 91.69230769230768,462.1538461538462" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,-0.725 0.2,-0.725 0.2,-1.365 -1.55,-1.365 -1.55,0.825 -1.25,0.825" data-type="line" data-label="" points="393.2307692307693,444.9230769230769 341.53846153846155,444.9230769230769 341.53846153846155,555.2 40,555.2 40,177.84615384615384 91.69230769230768,177.84615384615384" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.4,-0.725 1.5999999999999999,-0.725 1.5999999999999999,1.365 -0.1,1.365 -0.1,0.825 -0.6499999999999999,0.825" data-type="line" data-label="" points="548.3076923076924,444.9230769230769 582.7692307692307,444.9230769230769 582.7692307692307,84.79999999999998 289.84615384615387,84.79999999999998 289.84615384615387,177.84615384615384 195.0769230769231,177.84615384615384" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="-0.95" data-y="0.825" x="91.69230769230768" y="119.26153846153844" width="103.38461538461542" height="117.16923076923081" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="0.95" data-y="0.825" x="419.0769230769231" y="119.26153846153844" width="103.38461538461547" height="117.16923076923081" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="-0.95" data-y="-0.825" x="91.69230769230768" y="403.5692307692308" width="103.38461538461542" height="117.16923076923081" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="0.95" data-y="-0.825" x="393.2307692307693" y="414.2732025415385" width="155.07692307692315" height="95.76128722461533" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="netId: .J1 &gt; .pin1 to .R1 &gt; .pin1
2
2
  globalConnNetId: connectivity_net2" data-x="0.35" data-y="-0.5" x="350.1538461538462" y="367.3846153846155" width="34.46153846153845" height="77.53846153846149" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="netId: .J1 &gt; .pin3 to .R1 &gt; .pin2
3
3
  globalConnNetId: connectivity_net3" data-x="1.5999999999999999" data-y="-0.95" x="565.5384615384614" y="444.92307692307696" width="34.46153846153845" height="77.53846153846155" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="netId: .R2 &gt; .pin1 to .R3 &gt; .pin2
4
4
  globalConnNetId: connectivity_net0" data-x="0.32499999999999996" data-y="1.05" x="345.84615384615387" y="100.30769230769229" width="34.46153846153845" height="77.53846153846155" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005803571428571428"/></g><g><rect data-type="rect" data-label="netId: .R2 &gt; .pin2 to .R3 &gt; .pin1
@@ -0,0 +1,200 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 0,
7
+ "y": 0
8
+ },
9
+ "width": 2.5,
10
+ "height": 1,
11
+ "pins": [
12
+ {
13
+ "pinId": "U2.1",
14
+ "x": 1.65,
15
+ "y": 0.09999999999999998,
16
+ "_facingDirection": "x+"
17
+ },
18
+ {
19
+ "pinId": "U2.2",
20
+ "x": -1.65,
21
+ "y": -0.1,
22
+ "_facingDirection": "x-"
23
+ },
24
+ {
25
+ "pinId": "U2.3",
26
+ "x": 1.65,
27
+ "y": -0.30000000000000004,
28
+ "_facingDirection": "x+"
29
+ },
30
+ {
31
+ "pinId": "U2.4",
32
+ "x": -1.65,
33
+ "y": 0.1,
34
+ "_facingDirection": "x-"
35
+ },
36
+ {
37
+ "pinId": "U2.5",
38
+ "x": 1.65,
39
+ "y": 0.30000000000000004,
40
+ "_facingDirection": "x+"
41
+ },
42
+ {
43
+ "pinId": "U2.6",
44
+ "x": 1.65,
45
+ "y": -0.10000000000000003,
46
+ "_facingDirection": "x+"
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "chipId": "schematic_component_1",
52
+ "center": {
53
+ "x": 4.1,
54
+ "y": 1.3
55
+ },
56
+ "width": 1.0555194999999995,
57
+ "height": 0.8677407000000001,
58
+ "pins": [
59
+ {
60
+ "pinId": "L4.1",
61
+ "x": 3.5720874999999994,
62
+ "y": 1.3026245499999998,
63
+ "_facingDirection": "x-"
64
+ },
65
+ {
66
+ "pinId": "L4.2",
67
+ "x": 4.6279125,
68
+ "y": 1.2973754500000003,
69
+ "_facingDirection": "x+"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "chipId": "schematic_component_2",
75
+ "center": {
76
+ "x": -4.327500000000001,
77
+ "y": 0
78
+ },
79
+ "width": 1.0450000000000004,
80
+ "height": 0.76,
81
+ "pins": [
82
+ {
83
+ "pinId": "C25.1",
84
+ "x": -4.4,
85
+ "y": 0.3,
86
+ "_facingDirection": "y+"
87
+ },
88
+ {
89
+ "pinId": "C25.2",
90
+ "x": -4.4,
91
+ "y": -0.3,
92
+ "_facingDirection": "y-"
93
+ }
94
+ ]
95
+ },
96
+ {
97
+ "chipId": "schematic_component_3",
98
+ "center": {
99
+ "x": 6.0725,
100
+ "y": 0
101
+ },
102
+ "width": 1.0450000000000008,
103
+ "height": 0.76,
104
+ "pins": [
105
+ {
106
+ "pinId": "C26.1",
107
+ "x": 6,
108
+ "y": 0.3,
109
+ "_facingDirection": "y+"
110
+ },
111
+ {
112
+ "pinId": "C26.2",
113
+ "x": 6,
114
+ "y": -0.3,
115
+ "_facingDirection": "y-"
116
+ }
117
+ ]
118
+ }
119
+ ],
120
+ "directConnections": [],
121
+ "netConnections": [
122
+ {
123
+ "netId": "VIN_3V3",
124
+ "pinIds": [
125
+ "U2.1",
126
+ "U2.6",
127
+ "L4.2",
128
+ "C26.1"
129
+ ],
130
+ "netLabelWidth": 0.42,
131
+ "netLabelHeight": 0.96
132
+ },
133
+ {
134
+ "netId": "VIN_5V",
135
+ "pinIds": [
136
+ "U2.2",
137
+ "U2.4",
138
+ "C25.1"
139
+ ],
140
+ "netLabelWidth": 0.42,
141
+ "netLabelHeight": 0.84
142
+ },
143
+ {
144
+ "netId": "GND",
145
+ "pinIds": [
146
+ "U2.3",
147
+ "C25.2",
148
+ "C26.2"
149
+ ],
150
+ "netLabelWidth": 0.42,
151
+ "netLabelHeight": 0.48
152
+ },
153
+ {
154
+ "netId": "BOOST_SW",
155
+ "pinIds": [
156
+ "U2.5",
157
+ "L4.1"
158
+ ],
159
+ "netLabelWidth": 1.08
160
+ }
161
+ ],
162
+ "textBoxes": [
163
+ {
164
+ "chipId": "schematic_component_0",
165
+ "center": {
166
+ "x": -0.53,
167
+ "y": -0.63
168
+ },
169
+ "width": 1.44,
170
+ "height": 0.17999999999999994,
171
+ "text": "TPS61222DCKT"
172
+ },
173
+ {
174
+ "chipId": "schematic_component_0",
175
+ "center": {
176
+ "x": -1.13,
177
+ "y": 0.615
178
+ },
179
+ "width": 0.3600000000000001,
180
+ "height": 0.25,
181
+ "text": "U2"
182
+ }
183
+ ],
184
+ "availableNetLabelOrientations": {
185
+ "VIN_3V3": [
186
+ "y+"
187
+ ],
188
+ "VIN_5V": [
189
+ "y+"
190
+ ],
191
+ "GND": [
192
+ "y-"
193
+ ],
194
+ "BOOST_SW": [
195
+ "x-",
196
+ "x+"
197
+ ]
198
+ },
199
+ "maxMspPairDistance": 20
200
+ }
@@ -0,0 +1,14 @@
1
+ import { expect, test } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import "tests/fixtures/matcher"
4
+ import inputProblem from "./assets/repro-tps61222-trace-intersection.input.json"
5
+
6
+ // Extracted from https://github.com/tscircuit/core/pull/2785 with
7
+ // DEBUG=Group_doInitialSchematicTraceRender.
8
+ test("repro TPS61222 schematic trace intersection", () => {
9
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
10
+
11
+ solver.solve()
12
+
13
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
14
+ })
@@ -44,6 +44,12 @@ test("repro47: endpoint obstacle detours route around nearby components", () =>
44
44
  traceById.get("R2.1-R3.2")!.tracePath,
45
45
  ),
46
46
  ).toBe(0)
47
+ expect(
48
+ countPathIntersections(
49
+ traceById.get("R2.1-R3.2")!.tracePath,
50
+ traceById.get("R2.2-R3.1")!.tracePath,
51
+ ),
52
+ ).toBe(0)
47
53
 
48
54
  expect(solver).toMatchSolverSnapshot(import.meta.path)
49
55
  })