@tscircuit/schematic-trace-solver 0.0.91 → 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.
@@ -0,0 +1,62 @@
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="11,8.399999999999999 9.1,6.8" data-type="line" data-label="" points="325.8571826217351,133.83206560019448 103.28424299580593,321.2619094957138" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="11,9 12.03,5.3500000000000005" data-type="line" data-label="" points="325.8571826217351,63.54587413937452 446.51514462947557,491.12020552602803" fill="none" stroke="hsl(87, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="9.700000000000001,6.8 8.93,5.3500000000000005" data-type="line" data-label="" points="173.57043445662566,321.2619094957138 83.36982208190693,491.12020552602803" fill="none" stroke="hsl(56, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="9.870000000000001,5.3500000000000005 12.97,5.3500000000000005" data-type="line" data-label="" points="193.48485537052466,491.12020552602803 556.6301779180933,491.12020552602803" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="9.700000000000001,6.8 9.900000000000002,6.8 9.900000000000002,6.075 8.73,6.075 8.73,5.3500000000000005 8.93,5.3500000000000005" data-type="line" data-label="" points="173.57043445662566,321.2619094957138 196.9991649435658,321.2619094957138 196.9991649435658,406.1910575108709 59.94109159496702,406.1910575108709 59.94109159496702,491.12020552602803 83.36982208190693,491.12020552602803" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="11,8.399999999999999 11,7.6 8.9,7.6 8.9,6.8 9.1,6.8" data-type="line" data-label="" points="325.8571826217351,133.83206560019448 325.8571826217351,227.54698754795413 79.85551250886601,227.54698754795413 79.85551250886601,321.2619094957138 103.28424299580593,321.2619094957138" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="9.870000000000001,5.3500000000000005 10.07,5.3500000000000005 10.07,4.840544650000001 13.17,4.840544650000001 13.17,5.3500000000000005 12.97,5.3500000000000005" data-type="line" data-label="" points="193.48485537052466,491.12020552602803 216.91358585746457,491.12020552602803 216.91358585746457,550.7996659774262 580.0589084050332,550.7996659774262 580.0589084050332,491.12020552602803 556.6301779180933,491.12020552602803" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="11,9 11,9.100999999999999 10.549000000000001,9.100999999999999" data-type="line" data-label="" points="325.8571826217351,63.54587413937452 325.8571826217351,51.714365243469956 273.0253953736858,51.714365243469956" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="11.095" data-y="8.7" x="273.1425390261203" y="63.54587413937452" width="127.68658115382254" height="70.28619146081996" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="9.4" data-y="6.8" x="103.28424299580593" y="281.43306766791596" width="70.28619146081974" height="79.65768365559563" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="9.4" data-y="5.4" x="83.36982208190693" y="443.15511031809996" width="110.11503328861772" height="84.21582517238642" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="12.5" data-y="5.4" x="446.51514462947557" y="443.15511031809996" width="110.11503328861772" height="84.21582517238642" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="netId: V3V3
2
+ globalConnNetId: connectivity_net0" data-x="9.95" data-y="7.81" x="167.71325183489057" y="178.3466535253802" width="70.28619146081974" height="49.200334022573884" fill="#ef444466" stroke="#ef4444" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="netId: RESET
3
+ globalConnNetId: connectivity_net1" data-x="10.189000000000002" data-y="9.100999999999999" x="188.68196562070204" y="40.000000000000114" width="84.34342975298364" height="23.428730486939685" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="netId: RESET
4
+ globalConnNetId: connectivity_net1" data-x="11.669" data-y="5.3500000000000005" x="362.05457122405744" y="479.40584028255813" width="84.34342975298364" height="23.4287304869398" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="netId: USBOOT
5
+ globalConnNetId: connectivity_net2" data-x="10.320000000000002" data-y="6.8" x="196.9991649435658" y="309.5475442522439" width="98.40066804514754" height="23.4287304869398" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="netId: GND
6
+ globalConnNetId: connectivity_net3" data-x="10.07" data-y="4.630544650000001" x="188.79910927313665" y="550.7996659774262" width="56.228953168655835" height="49.200334022573884" fill="#00000066" stroke="#000000" stroke-width="0.008536527410714282"/></g><g><circle data-type="point" data-label="R3.1
7
+ y-" data-x="11" data-y="8.399999999999999" cx="325.8571826217351" cy="133.83206560019448" r="3" fill="hsl(348, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R3.2
8
+ y+" data-x="11" data-y="9" cx="325.8571826217351" cy="63.54587413937452" r="3" fill="hsl(349, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.1
9
+ x-" data-x="9.1" data-y="6.8" cx="103.28424299580593" cy="321.2619094957138" r="3" fill="hsl(107, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.2
10
+ x+" data-x="9.700000000000001" data-y="6.8" cx="173.57043445662566" cy="321.2619094957138" r="3" fill="hsl(108, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW3.1
11
+ x-" data-x="8.93" data-y="5.3500000000000005" cx="83.36982208190693" cy="491.12020552602803" r="3" fill="hsl(226, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW3.2
12
+ x+" data-x="9.870000000000001" data-y="5.3500000000000005" cx="193.48485537052466" cy="491.12020552602803" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW2.1
13
+ x-" data-x="12.03" data-y="5.3500000000000005" cx="446.51514462947557" cy="491.12020552602803" r="3" fill="hsl(345, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW2.2
14
+ x+" data-x="12.97" data-y="5.3500000000000005" cx="556.6301779180933" cy="491.12020552602803" r="3" fill="hsl(346, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
15
+ orientation: y+" data-x="9.95" data-y="7.6" cx="202.85634756530044" cy="227.54698754795413" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
16
+ orientation: x-" data-x="10.549000000000001" data-y="9.100999999999999" cx="273.0253953736858" cy="51.714365243469956" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
17
+ orientation: x-" data-x="12.03" data-y="5.3500000000000005" cx="446.51514462947557" cy="491.12020552602803" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
18
+ orientation: x+" data-x="9.900000000000002" data-y="6.8" cx="196.9991649435658" cy="321.2619094957138" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
19
+ orientation: y-" data-x="10.07" data-y="4.840544650000001" cx="216.91358585746457" cy="550.7996659774262" 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[
20
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
21
+ const svg = e.currentTarget;
22
+ const rect = svg.getBoundingClientRect();
23
+ const x = e.clientX - rect.left;
24
+ const y = e.clientY - rect.top;
25
+ const crosshair = svg.getElementById('crosshair');
26
+ const h = svg.getElementById('crosshair-h');
27
+ const v = svg.getElementById('crosshair-v');
28
+ const coords = svg.getElementById('coordinates');
29
+
30
+ crosshair.style.display = 'block';
31
+ h.setAttribute('x1', '0');
32
+ h.setAttribute('x2', '640');
33
+ h.setAttribute('y1', y);
34
+ h.setAttribute('y2', y);
35
+ v.setAttribute('x1', x);
36
+ v.setAttribute('x2', x);
37
+ v.setAttribute('y1', '0');
38
+ v.setAttribute('y2', '640');
39
+
40
+ // Calculate real coordinates using inverse transformation
41
+ const matrix = {"a":117.1436524346996,"c":0,"e":-962.7229941599605,"b":0,"d":-117.1436524346996,"f":1117.838746051671};
42
+ // Manually invert and apply the affine transform
43
+ // Since we only use translate and scale, we can directly compute:
44
+ // x' = (x - tx) / sx
45
+ // y' = (y - ty) / sy
46
+ const sx = matrix.a;
47
+ const sy = matrix.d;
48
+ const tx = matrix.e;
49
+ const ty = matrix.f;
50
+ const realPoint = {
51
+ x: (x - tx) / sx,
52
+ y: (y - ty) / sy // Flip y back since we used negative scale
53
+ }
54
+
55
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
56
+ coords.setAttribute('x', (x + 5).toString());
57
+ coords.setAttribute('y', (y - 5).toString());
58
+ });
59
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
60
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
61
+ });
62
+ ]]></script></svg>
@@ -0,0 +1,60 @@
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="-4.475,2.9699999999999998 -2.38,3" data-type="line" data-label="" points="106.69131238447312,232.0887245841036 416.4879852125693,227.65249537892794" fill="none" stroke="hsl(192, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-3.5250000000000004,2.9699999999999998 -2.7,1.5" data-type="line" data-label="" points="247.17190388170047,232.0887245841036 369.1682070240295,449.463955637708" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.62,3 -3.3,1.5" data-type="line" data-label="" points="528.8724584103511,227.65249537892794 280.4436229205175,449.463955637708" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-3.5250000000000004,2.9699999999999998 -2.5,2.9699999999999998 -2.5,1.5 -2.7,1.5" data-type="line" data-label="" points="247.17190388170047,232.0887245841036 398.74306839186687,232.0887245841036 398.74306839186687,449.463955637708 369.1682070240295,449.463955637708" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.62,3 -1.3790000000000002,3 -1.3790000000000002,3.251" data-type="line" data-label="" points="528.8724584103511,227.65249537892794 564.5101663585951,227.65249537892794 564.5101663585951,190.5360443622921" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-3.3,1.5 -3.541,1.5 -3.541,1.9509999999999998" data-type="line" data-label="" points="280.4436229205175,449.463955637708 244.8059149722735,449.463955637708 244.8059149722735,382.77264325323483" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="-4" data-y="3" x="106.69131238447312" y="206.21072088724588" width="140.48059149722735" height="42.88354898336411" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="-2" data-y="3" x="416.48798521256936" y="190.68391866913123" width="112.3844731977818" height="73.93715341959341" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="-3" data-y="1.5" x="280.4436229205175" y="387.35674676524957" width="88.72458410351203" height="124.21441774491683" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="netId: .B1 &gt; .pin1 to .SW1 &gt; .pin1
2
+ globalConnNetId: connectivity_net0" data-x="-4.701" data-y="2.9699999999999998" x="40" y="217.3012939001849" width="66.54343807763394" height="29.5748613678374" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="netId: .B1 &gt; .pin1 to .SW1 &gt; .pin1
3
+ globalConnNetId: connectivity_net0" data-x="-2.606" data-y="3" x="349.79667282809606" y="212.86506469500927" width="66.54343807763405" height="29.574861367837343" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="netId: GND
4
+ globalConnNetId: connectivity_net1" data-x="-3.2250000000000005" data-y="2.76" x="256.0443622920516" y="232.0887245841036" width="70.97966728280971" height="62.107208872458386" fill="#00000066" stroke="#000000" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="netId: VCC
5
+ globalConnNetId: connectivity_net2" data-x="-1.3790000000000002" data-y="3.461" x="529.0203327171903" y="128.4288354898337" width="70.97966728280971" height="62.10720887245844" fill="#ef444466" stroke="#ef4444" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="netId: VCC
6
+ globalConnNetId: connectivity_net2" data-x="-3.541" data-y="2.161" x="209.31608133086874" y="320.6654343807764" width="70.97966728280954" height="62.107208872458386" fill="#ef444466" stroke="#ef4444" stroke-width="0.0067624999999999985"/></g><g><circle data-type="point" data-label="B1.1
7
+ x-" data-x="-4.475" data-y="2.9699999999999998" cx="106.69131238447312" cy="232.0887245841036" r="3" fill="hsl(210, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="B1.2
8
+ x+" data-x="-3.5250000000000004" data-y="2.9699999999999998" cx="247.17190388170047" cy="232.0887245841036" r="3" fill="hsl(211, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW1.1
9
+ x-" data-x="-2.38" data-y="3" cx="416.4879852125693" cy="227.65249537892794" r="3" fill="hsl(104, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW1.2
10
+ x+" data-x="-1.62" data-y="3" cx="528.8724584103511" cy="227.65249537892794" r="3" fill="hsl(105, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C3.1
11
+ x-" data-x="-3.3" data-y="1.5" cx="280.4436229205175" cy="449.463955637708" r="3" fill="hsl(243, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C3.2
12
+ x+" data-x="-2.7" data-y="1.5" cx="369.1682070240295" cy="449.463955637708" r="3" fill="hsl(244, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
13
+ orientation: x-" data-x="-4.475" data-y="2.9699999999999998" cx="106.69131238447312" cy="232.0887245841036" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
14
+ orientation: x-" data-x="-2.38" data-y="3" cx="416.4879852125693" cy="227.65249537892794" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
15
+ orientation: y-" data-x="-3.2250000000000005" data-y="2.9699999999999998" cx="291.53419593345643" cy="232.0887245841036" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
16
+ orientation: y+" data-x="-1.3790000000000002" data-y="3.251" cx="564.5101663585951" cy="190.5360443622921" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
17
+ orientation: y+" data-x="-3.541" data-y="1.9509999999999998" cx="244.8059149722735" cy="382.77264325323483" 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[
18
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
19
+ const svg = e.currentTarget;
20
+ const rect = svg.getBoundingClientRect();
21
+ const x = e.clientX - rect.left;
22
+ const y = e.clientY - rect.top;
23
+ const crosshair = svg.getElementById('crosshair');
24
+ const h = svg.getElementById('crosshair-h');
25
+ const v = svg.getElementById('crosshair-v');
26
+ const coords = svg.getElementById('coordinates');
27
+
28
+ crosshair.style.display = 'block';
29
+ h.setAttribute('x1', '0');
30
+ h.setAttribute('x2', '640');
31
+ h.setAttribute('y1', y);
32
+ h.setAttribute('y2', y);
33
+ v.setAttribute('x1', x);
34
+ v.setAttribute('x2', x);
35
+ v.setAttribute('y1', '0');
36
+ v.setAttribute('y2', '640');
37
+
38
+ // Calculate real coordinates using inverse transformation
39
+ const matrix = {"a":147.87430683918672,"c":0,"e":768.4288354898337,"b":0,"d":-147.87430683918672,"f":671.2754158964881};
40
+ // Manually invert and apply the affine transform
41
+ // Since we only use translate and scale, we can directly compute:
42
+ // x' = (x - tx) / sx
43
+ // y' = (y - ty) / sy
44
+ const sx = matrix.a;
45
+ const sy = matrix.d;
46
+ const tx = matrix.e;
47
+ const ty = matrix.f;
48
+ const realPoint = {
49
+ x: (x - tx) / sx,
50
+ y: (y - ty) / sy // Flip y back since we used negative scale
51
+ }
52
+
53
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
54
+ coords.setAttribute('x', (x + 5).toString());
55
+ coords.setAttribute('y', (y - 5).toString());
56
+ });
57
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
58
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
59
+ });
60
+ ]]></script></svg>
@@ -0,0 +1,58 @@
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.54,-0.0050000000000000044 -0.5000000000000002,1.3494553499999995" data-type="line" data-label="" points="79.25233644859813,395.52511635514014 84.48598130841118,218.30665934579443" fill="none" stroke="hsl(168, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5399999999999998,1.3494553499999995 3.14,0.004999999999999413" data-type="line" data-label="" points="220.56074766355135,218.30665934579443 560.7476635514018,394.21670514018695" fill="none" stroke="hsl(128, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5399999999999998,1.3494553499999995 1.84,0.004999999999999857" data-type="line" data-label="" points="220.56074766355135,218.30665934579443 390.65420560747657,394.2167051401869" fill="none" stroke="hsl(128, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.54,0.0049999999999999975 2.5400000000000005,0.004999999999999486" data-type="line" data-label="" points="220.56074766355138,394.2167051401869 482.24299065420564,394.21670514018695" fill="none" stroke="hsl(136, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.54,0.0049999999999999975 1.24,0.00499999999999993" data-type="line" data-label="" points="220.56074766355138,394.2167051401869 312.14953271028037,394.2167051401869" fill="none" stroke="hsl(136, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-0.54,-0.0050000000000000044 -0.74,-0.0050000000000000044 -0.74,1.3494553499999995 -0.5000000000000002,1.3494553499999995" data-type="line" data-label="" points="79.25233644859813,395.52511635514014 53.084112149532714,395.52511635514014 53.084112149532714,218.30665934579443 84.48598130841118,218.30665934579443" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.14,0.004999999999999413 3.3400000000000003,0.004999999999999413 3.3400000000000003,-0.5350000000000006 2.04,-0.5350000000000006 2.04,0.004999999999999857 1.84,0.004999999999999857" data-type="line" data-label="" points="560.7476635514018,394.21670514018695 586.9158878504672,394.21670514018695 586.9158878504672,464.8709107476636 416.82242990654197,464.8709107476636 416.82242990654197,394.2167051401869 390.65420560747657,394.2167051401869" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5399999999999998,1.3494553499999995 2.04,1.3494553499999995 2.04,0.004999999999999857 1.84,0.004999999999999857" data-type="line" data-label="" points="220.56074766355135,218.30665934579443 416.82242990654197,218.30665934579443 416.82242990654197,394.2167051401869 390.65420560747657,394.2167051401869" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.54,0.0049999999999999975 1.24,0.00499999999999993" data-type="line" data-label="" points="220.56074766355138,394.2167051401869 312.14953271028037,394.2167051401869" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.5400000000000005,0.004999999999999486 2.3400000000000007,0.004999999999999486 2.3400000000000007,-0.6150000000000001 1.04,-0.6150000000000001 1.04,0.00499999999999993 1.24,0.00499999999999993" data-type="line" data-label="" points="482.24299065420564,394.21670514018695 456.07476635514024,394.21670514018695 456.07476635514024,475.33820046728965 285.98130841121497,475.33820046728965 285.98130841121497,394.2167051401869 312.14953271028037,394.2167051401869" 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="79.25233644859813" y="341.2973135514019" width="141.30841121495325" height="107.14719439252326" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="0.019999999999999796" data-y="1.4194553499999993" x="84.48598130841117" y="164.66179953271038" width="136.07476635514018" height="88.9719626168224" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="2.8400000000000003" data-y="0.004999999999999449" x="482.2429906542056" y="349.7307238317758" width="78.5046728971962" height="88.9719626168224" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="1.54" data-y="0.004999999999999893" x="312.14953271028037" y="339.2634341121495" width="78.5046728971962" height="109.90654205607473" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="netId: .V1 &gt; .pin1 to .D1 &gt; .anode
2
+ globalConnNetId: connectivity_net0" data-x="-0.74" data-y="-0.23" x="40.00000000000001" y="395.52511635514014" width="26.168224299065415" height="58.87850467289718" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="netId: .V1 &gt; .pin2 to .C1 &gt; .pin2
3
+ globalConnNetId: connectivity_net2" data-x="0.89" data-y="0.22999999999999998" x="253.27102803738313" y="335.3382004672897" width="26.16822429906543" height="58.87850467289718" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="netId: .D1 &gt; .cathode to .R1 &gt; .pin1
4
+ globalConnNetId: connectivity_net1" data-x="3.3400000000000003" data-y="0.22999999999999943" x="573.8317757009345" y="335.33820046728977" width="26.1682242990654" height="58.87850467289718" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.007642857142857144"/></g><g><circle data-type="point" data-label="V1.1
5
+ x-" data-x="-0.54" data-y="-0.0050000000000000044" cx="79.25233644859813" cy="395.52511635514014" r="3" fill="hsl(230, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="V1.2
6
+ x+" data-x="0.54" data-y="0.0049999999999999975" cx="220.56074766355138" cy="394.2167051401869" r="3" fill="hsl(231, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="D1.1
7
+ x-" data-x="-0.5000000000000002" data-y="1.3494553499999995" cx="84.48598130841118" cy="218.30665934579443" r="3" fill="hsl(32, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="D1.2
8
+ x+" data-x="0.5399999999999998" data-y="1.3494553499999995" cx="220.56074766355135" cy="218.30665934579443" r="3" fill="hsl(33, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R1.1
9
+ x+" data-x="3.14" data-y="0.004999999999999413" cx="560.7476635514018" cy="394.21670514018695" r="3" fill="hsl(226, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R1.2
10
+ x-" data-x="2.5400000000000005" data-y="0.004999999999999486" cx="482.24299065420564" cy="394.21670514018695" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C1.1
11
+ x+" data-x="1.84" data-y="0.004999999999999857" cx="390.65420560747657" cy="394.2167051401869" r="3" fill="hsl(121, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C1.2
12
+ x-" data-x="1.24" data-y="0.00499999999999993" cx="312.14953271028037" cy="394.2167051401869" r="3" fill="hsl(122, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
13
+ orientation: y-" data-x="-0.74" data-y="-0.0050000000000000044" cx="53.084112149532714" cy="395.52511635514014" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
14
+ orientation: y+" data-x="0.89" data-y="0.004999999999999964" cx="266.35514018691583" cy="394.2167051401869" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
15
+ orientation: y+" data-x="3.3400000000000003" data-y="0.004999999999999413" cx="586.9158878504672" cy="394.21670514018695" 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[
16
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
17
+ const svg = e.currentTarget;
18
+ const rect = svg.getBoundingClientRect();
19
+ const x = e.clientX - rect.left;
20
+ const y = e.clientY - rect.top;
21
+ const crosshair = svg.getElementById('crosshair');
22
+ const h = svg.getElementById('crosshair-h');
23
+ const v = svg.getElementById('crosshair-v');
24
+ const coords = svg.getElementById('coordinates');
25
+
26
+ crosshair.style.display = 'block';
27
+ h.setAttribute('x1', '0');
28
+ h.setAttribute('x2', '640');
29
+ h.setAttribute('y1', y);
30
+ h.setAttribute('y2', y);
31
+ v.setAttribute('x1', x);
32
+ v.setAttribute('x2', x);
33
+ v.setAttribute('y1', '0');
34
+ v.setAttribute('y2', '640');
35
+
36
+ // Calculate real coordinates using inverse transformation
37
+ const matrix = {"a":130.8411214953271,"c":0,"e":149.90654205607476,"b":0,"d":-130.8411214953271,"f":394.8709107476635};
38
+ // Manually invert and apply the affine transform
39
+ // Since we only use translate and scale, we can directly compute:
40
+ // x' = (x - tx) / sx
41
+ // y' = (y - ty) / sy
42
+ const sx = matrix.a;
43
+ const sy = matrix.d;
44
+ const tx = matrix.e;
45
+ const ty = matrix.f;
46
+ const realPoint = {
47
+ x: (x - tx) / sx,
48
+ y: (y - ty) / sy // Flip y back since we used negative scale
49
+ }
50
+
51
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
52
+ coords.setAttribute('x', (x + 5).toString());
53
+ coords.setAttribute('y', (y - 5).toString());
54
+ });
55
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
56
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
57
+ });
58
+ ]]></script></svg>
@@ -0,0 +1,155 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 11.095,
7
+ "y": 8.7
8
+ },
9
+ "width": 1.0899999999999999,
10
+ "height": 0.6000000000000014,
11
+ "pins": [
12
+ {
13
+ "pinId": "R3.1",
14
+ "x": 11,
15
+ "y": 8.399999999999999,
16
+ "_facingDirection": "y-"
17
+ },
18
+ {
19
+ "pinId": "R3.2",
20
+ "x": 11,
21
+ "y": 9,
22
+ "_facingDirection": "y+"
23
+ }
24
+ ],
25
+ "sectionId": "boot"
26
+ },
27
+ {
28
+ "chipId": "schematic_component_1",
29
+ "center": {
30
+ "x": 9.4,
31
+ "y": 6.8
32
+ },
33
+ "width": 0.6000000000000014,
34
+ "height": 0.6799999999999997,
35
+ "pins": [
36
+ {
37
+ "pinId": "R2.1",
38
+ "x": 9.1,
39
+ "y": 6.8,
40
+ "_facingDirection": "x-"
41
+ },
42
+ {
43
+ "pinId": "R2.2",
44
+ "x": 9.700000000000001,
45
+ "y": 6.8,
46
+ "_facingDirection": "x+"
47
+ }
48
+ ],
49
+ "sectionId": "boot"
50
+ },
51
+ {
52
+ "chipId": "schematic_component_2",
53
+ "center": {
54
+ "x": 9.4,
55
+ "y": 5.4
56
+ },
57
+ "width": 0.9400000000000013,
58
+ "height": 0.7189106999999986,
59
+ "pins": [
60
+ {
61
+ "pinId": "SW3.1",
62
+ "x": 8.93,
63
+ "y": 5.3500000000000005,
64
+ "_facingDirection": "x-"
65
+ },
66
+ {
67
+ "pinId": "SW3.2",
68
+ "x": 9.870000000000001,
69
+ "y": 5.3500000000000005,
70
+ "_facingDirection": "x+"
71
+ }
72
+ ],
73
+ "sectionId": "boot"
74
+ },
75
+ {
76
+ "chipId": "schematic_component_3",
77
+ "center": {
78
+ "x": 12.5,
79
+ "y": 5.4
80
+ },
81
+ "width": 0.9400000000000013,
82
+ "height": 0.7189106999999986,
83
+ "pins": [
84
+ {
85
+ "pinId": "SW2.1",
86
+ "x": 12.03,
87
+ "y": 5.3500000000000005,
88
+ "_facingDirection": "x-"
89
+ },
90
+ {
91
+ "pinId": "SW2.2",
92
+ "x": 12.97,
93
+ "y": 5.3500000000000005,
94
+ "_facingDirection": "x+"
95
+ }
96
+ ],
97
+ "sectionId": "boot"
98
+ }
99
+ ],
100
+ "directConnections": [],
101
+ "netConnections": [
102
+ {
103
+ "netId": "V3V3",
104
+ "pinIds": [
105
+ "R3.1",
106
+ "R2.1"
107
+ ],
108
+ "netLabelWidth": 0.42,
109
+ "netLabelHeight": 0.6
110
+ },
111
+ {
112
+ "netId": "RESET",
113
+ "pinIds": [
114
+ "R3.2",
115
+ "SW2.1"
116
+ ],
117
+ "netLabelWidth": 0.72
118
+ },
119
+ {
120
+ "netId": "USBOOT",
121
+ "pinIds": [
122
+ "R2.2",
123
+ "SW3.1"
124
+ ],
125
+ "netLabelWidth": 0.84
126
+ },
127
+ {
128
+ "netId": "GND",
129
+ "pinIds": [
130
+ "SW3.2",
131
+ "SW2.2"
132
+ ],
133
+ "netLabelWidth": 0.42,
134
+ "netLabelHeight": 0.48
135
+ }
136
+ ],
137
+ "textBoxes": [],
138
+ "availableNetLabelOrientations": {
139
+ "V3V3": [
140
+ "y+"
141
+ ],
142
+ "RESET": [
143
+ "x-",
144
+ "x+"
145
+ ],
146
+ "USBOOT": [
147
+ "x-",
148
+ "x+"
149
+ ],
150
+ "GND": [
151
+ "y-"
152
+ ]
153
+ },
154
+ "maxMspPairDistance": 2.4
155
+ }
@@ -0,0 +1,115 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": -4,
7
+ "y": 3
8
+ },
9
+ "width": 0.9499999999999997,
10
+ "height": 0.29000000000000004,
11
+ "pins": [
12
+ {
13
+ "pinId": "B1.1",
14
+ "x": -4.45,
15
+ "y": 2.9699999999999998,
16
+ "_facingDirection": "x-"
17
+ },
18
+ {
19
+ "pinId": "B1.2",
20
+ "x": -3.55,
21
+ "y": 2.9699999999999998,
22
+ "_facingDirection": "x+"
23
+ }
24
+ ],
25
+ "sectionId": "power"
26
+ },
27
+ {
28
+ "chipId": "schematic_component_1",
29
+ "center": {
30
+ "x": -2,
31
+ "y": 3
32
+ },
33
+ "width": 0.7599999999999998,
34
+ "height": 0.5,
35
+ "pins": [
36
+ {
37
+ "pinId": "SW1.1",
38
+ "x": -2.38,
39
+ "y": 3,
40
+ "_facingDirection": "x-"
41
+ },
42
+ {
43
+ "pinId": "SW1.2",
44
+ "x": -1.62,
45
+ "y": 3,
46
+ "_facingDirection": "x+"
47
+ }
48
+ ],
49
+ "sectionId": "power"
50
+ },
51
+ {
52
+ "chipId": "schematic_component_2",
53
+ "center": {
54
+ "x": -3,
55
+ "y": 1.5
56
+ },
57
+ "width": 0.5999999999999996,
58
+ "height": 0.8399999999999999,
59
+ "pins": [
60
+ {
61
+ "pinId": "C3.1",
62
+ "x": -3.3,
63
+ "y": 1.5,
64
+ "_facingDirection": "x-"
65
+ },
66
+ {
67
+ "pinId": "C3.2",
68
+ "x": -2.7,
69
+ "y": 1.5,
70
+ "_facingDirection": "x+"
71
+ }
72
+ ],
73
+ "sectionId": "power"
74
+ }
75
+ ],
76
+ "directConnections": [
77
+ {
78
+ "pinIds": [
79
+ "B1.1",
80
+ "SW1.1"
81
+ ],
82
+ "netId": ".B1 > .pin1 to .SW1 > .pin1"
83
+ }
84
+ ],
85
+ "netConnections": [
86
+ {
87
+ "netId": "GND",
88
+ "pinIds": [
89
+ "B1.2",
90
+ "C3.2"
91
+ ],
92
+ "netLabelWidth": 0.42,
93
+ "netLabelHeight": 0.48
94
+ },
95
+ {
96
+ "netId": "VCC",
97
+ "pinIds": [
98
+ "SW1.2",
99
+ "C3.1"
100
+ ],
101
+ "netLabelWidth": 0.42,
102
+ "netLabelHeight": 0.48
103
+ }
104
+ ],
105
+ "textBoxes": [],
106
+ "availableNetLabelOrientations": {
107
+ "VCC": [
108
+ "y+"
109
+ ],
110
+ "GND": [
111
+ "y-"
112
+ ]
113
+ },
114
+ "maxMspPairDistance": 2.4
115
+ }
@@ -0,0 +1,137 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 0,
7
+ "y": 0
8
+ },
9
+ "width": 1.08,
10
+ "height": 0.818910699999999,
11
+ "pins": [
12
+ {
13
+ "pinId": "V1.1",
14
+ "x": -0.54,
15
+ "y": -0.0050000000000000044,
16
+ "_facingDirection": "x-"
17
+ },
18
+ {
19
+ "pinId": "V1.2",
20
+ "x": 0.54,
21
+ "y": 0.0049999999999999975,
22
+ "_facingDirection": "x+"
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "chipId": "schematic_component_1",
28
+ "center": {
29
+ "x": 0.019999999999999796,
30
+ "y": 1.4194553499999993
31
+ },
32
+ "width": 1.04,
33
+ "height": 0.6799999999999999,
34
+ "pins": [
35
+ {
36
+ "pinId": "D1.1",
37
+ "x": -0.5000000000000002,
38
+ "y": 1.3494553499999995,
39
+ "_facingDirection": "x-"
40
+ },
41
+ {
42
+ "pinId": "D1.2",
43
+ "x": 0.5399999999999998,
44
+ "y": 1.3494553499999995,
45
+ "_facingDirection": "x+"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "chipId": "schematic_component_2",
51
+ "center": {
52
+ "x": 2.8400000000000003,
53
+ "y": 0.004999999999999449
54
+ },
55
+ "width": 0.5999999999999996,
56
+ "height": 0.6799999999999999,
57
+ "pins": [
58
+ {
59
+ "pinId": "R1.1",
60
+ "x": 3.14,
61
+ "y": 0.004999999999999413,
62
+ "_facingDirection": "x+"
63
+ },
64
+ {
65
+ "pinId": "R1.2",
66
+ "x": 2.5400000000000005,
67
+ "y": 0.004999999999999486,
68
+ "_facingDirection": "x-"
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "chipId": "schematic_component_3",
74
+ "center": {
75
+ "x": 1.54,
76
+ "y": 0.004999999999999893
77
+ },
78
+ "width": 0.6000000000000001,
79
+ "height": 0.84,
80
+ "pins": [
81
+ {
82
+ "pinId": "C1.1",
83
+ "x": 1.84,
84
+ "y": 0.004999999999999857,
85
+ "_facingDirection": "x+"
86
+ },
87
+ {
88
+ "pinId": "C1.2",
89
+ "x": 1.24,
90
+ "y": 0.00499999999999993,
91
+ "_facingDirection": "x-"
92
+ }
93
+ ]
94
+ }
95
+ ],
96
+ "directConnections": [
97
+ {
98
+ "pinIds": [
99
+ "V1.1",
100
+ "D1.1"
101
+ ],
102
+ "netId": ".V1 > .pin1 to .D1 > .anode"
103
+ },
104
+ {
105
+ "pinIds": [
106
+ "D1.2",
107
+ "R1.1"
108
+ ],
109
+ "netId": ".D1 > .cathode to .R1 > .pin1"
110
+ },
111
+ {
112
+ "pinIds": [
113
+ "D1.2",
114
+ "C1.1"
115
+ ],
116
+ "netId": ".D1 > .cathode to .C1 > .pin1"
117
+ },
118
+ {
119
+ "pinIds": [
120
+ "V1.2",
121
+ "R1.2"
122
+ ],
123
+ "netId": ".V1 > .pin2 to .R1 > .pin2"
124
+ },
125
+ {
126
+ "pinIds": [
127
+ "V1.2",
128
+ "C1.2"
129
+ ],
130
+ "netId": ".V1 > .pin2 to .C1 > .pin2"
131
+ }
132
+ ],
133
+ "netConnections": [],
134
+ "textBoxes": [],
135
+ "availableNetLabelOrientations": {},
136
+ "maxMspPairDistance": 10
137
+ }
@@ -0,0 +1,14 @@
1
+ import { expect, test } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "./assets/repro-missing-trace-netlabel.input.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ // Regression (from @tscircuit/core repro148): the RESET connection between R3 and
7
+ // SW2 used to route as a trace but now falls back to two net labels.
8
+ test("repro148 missing trace becomes net labels", () => {
9
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
10
+
11
+ solver.solve()
12
+
13
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
14
+ })