@tscircuit/schematic-trace-solver 0.0.114 → 0.0.115

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,54 @@
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="-1.3,-0.30000000000000004 1.3,-0.30000000000000004" data-type="line" data-label="" points="94.19354838709677,357.93548387096774 563.8709677419354,357.93548387096774" fill="none" stroke="hsl(8, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-1.3,-0.30000000000000004 -1.5,-0.30000000000000004 -1.5,-0.9199999999999999 1.5000000000000007,-0.9199999999999999 1.5000000000000007,-0.30000000000000004 1.3000000000000005,-0.30000000000000004" data-type="line" data-label="" points="94.19354838709677,357.93548387096774 58.064516129032256,357.93548387096774 58.064516129032256,469.9354838709677 600,469.9354838709677 600,357.93548387096774 563.8709677419355,357.93548387096774" 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="94.1935483870968" y="213.4193548387097" width="469.6774193548386" height="180.64516129032256" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005535714285714286"/></g><g><rect data-type="rect" data-label="TYPE_C_16PIN_2MD" data-x="0.06" data-y="-0.63" x="166.4516129032258" y="401.29032258064524" width="346.8387096774193" height="32.51612903225799" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.005535714285714286"/></g><g><rect data-type="rect" data-label="U1" data-x="-0.78" data-y="0.615" x="155.6129032258064" y="170.0645161290323" width="65.03225806451613" height="45.16129032258064" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.005535714285714286"/></g><g><rect data-type="rect" data-label="netId: .U1 &gt; .pin4 to U1.pin5
2
+ globalConnNetId: connectivity_net0" data-x="-1.5" data-y="0.17999999999999994" x="39.999999999999986" y="184.5161290322581" width="36.12903225806454" height="173.41935483870964" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005535714285714286"/></g><g><circle data-type="point" data-label="schematic_port_0
3
+ x-" data-x="-1.3" data-y="0.30000000000000004" cx="94.19354838709677" cy="249.5483870967742" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_1
4
+ x-" data-x="-1.3" data-y="0.10000000000000003" cx="94.19354838709677" cy="285.6774193548387" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_2
5
+ x-" data-x="-1.3" data-y="-0.09999999999999998" cx="94.19354838709677" cy="321.80645161290323" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_3
6
+ x-" data-x="-1.3" data-y="-0.30000000000000004" cx="94.19354838709677" cy="357.93548387096774" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_4
7
+ x+" data-x="1.3" data-y="-0.30000000000000004" cx="563.8709677419354" cy="357.93548387096774" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_5
8
+ x+" data-x="1.3" data-y="-0.10000000000000003" cx="563.8709677419354" cy="321.80645161290323" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_6
9
+ x+" data-x="1.3" data-y="0.09999999999999998" cx="563.8709677419354" cy="285.6774193548387" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_7
10
+ x+" data-x="1.3" data-y="0.30000000000000004" cx="563.8709677419354" cy="249.5483870967742" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
11
+ orientation: y+" data-x="-1.5" data-y="-0.30000000000000004" cx="58.064516129032256" cy="357.93548387096774" 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[
12
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
13
+ const svg = e.currentTarget;
14
+ const rect = svg.getBoundingClientRect();
15
+ const x = e.clientX - rect.left;
16
+ const y = e.clientY - rect.top;
17
+ const crosshair = svg.getElementById('crosshair');
18
+ const h = svg.getElementById('crosshair-h');
19
+ const v = svg.getElementById('crosshair-v');
20
+ const coords = svg.getElementById('coordinates');
21
+
22
+ crosshair.style.display = 'block';
23
+ h.setAttribute('x1', '0');
24
+ h.setAttribute('x2', '640');
25
+ h.setAttribute('y1', y);
26
+ h.setAttribute('y2', y);
27
+ v.setAttribute('x1', x);
28
+ v.setAttribute('x2', x);
29
+ v.setAttribute('y1', '0');
30
+ v.setAttribute('y2', '640');
31
+
32
+ // Calculate real coordinates using inverse transformation
33
+ const matrix = {"a":180.64516129032256,"c":0,"e":329.0322580645161,"b":0,"d":-180.64516129032256,"f":303.741935483871};
34
+ // Manually invert and apply the affine transform
35
+ // Since we only use translate and scale, we can directly compute:
36
+ // x' = (x - tx) / sx
37
+ // y' = (y - ty) / sy
38
+ const sx = matrix.a;
39
+ const sy = matrix.d;
40
+ const tx = matrix.e;
41
+ const ty = matrix.f;
42
+ const realPoint = {
43
+ x: (x - tx) / sx,
44
+ y: (y - ty) / sy // Flip y back since we used negative scale
45
+ }
46
+
47
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
48
+ coords.setAttribute('x', (x + 5).toString());
49
+ coords.setAttribute('y', (y - 5).toString());
50
+ });
51
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
52
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
53
+ });
54
+ ]]></script></svg>
@@ -0,0 +1,56 @@
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="1.3,-0.30000000000000004 -2.3,0" data-type="line" data-label="" points="559.0243902439025,348.6829268292683 67.31707317073176,307.7073170731707" fill="none" stroke="hsl(160, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.2999999999999998,-0.30000000000000004 1.5,-0.30000000000000004 1.5,-0.9199999999999999 -2.5,-0.9199999999999999 -2.5,0 -2.3,0" data-type="line" data-label="" points="559.0243902439024,348.6829268292683 586.3414634146342,348.6829268292683 586.3414634146342,433.3658536585366 40,433.3658536585366 40,307.7073170731707 67.31707317073176,307.7073170731707" 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="203.90243902439022" y="239.41463414634143" width="355.1219512195123" height="136.58536585365857" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007321428571428571"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="-2" data-y="0" x="67.31707317073173" y="261.2682926829268" width="81.95121951219511" height="92.8780487804878" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007321428571428571"/></g><g><rect data-type="rect" data-label="TYPE_C_16PIN_2MD" data-x="0.06" data-y="-0.63" x="258.5365853658536" y="381.4634146341464" width="262.24390243902445" height="24.585365853658516" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.007321428571428571"/></g><g><rect data-type="rect" data-label="U1" data-x="-0.78" data-y="0.615" x="250.34146341463418" y="206.6341463414634" width="49.17073170731703" height="34.146341463414615" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.007321428571428571"/></g><g><rect data-type="rect" data-label="netId: .U1 &gt; .pin5 to R1.pin1
2
+ globalConnNetId: connectivity_net0" data-x="1.5" data-y="0.17999999999999994" x="572.6829268292684" y="217.5609756097561" width="27.317073170731646" height="131.1219512195122" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.007321428571428571"/></g><g><circle data-type="point" data-label="schematic_port_0
3
+ x-" data-x="-1.3" data-y="0.30000000000000004" cx="203.90243902439025" cy="266.73170731707313" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_1
4
+ x-" data-x="-1.3" data-y="0.10000000000000003" cx="203.90243902439025" cy="294.04878048780483" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_2
5
+ x-" data-x="-1.3" data-y="-0.09999999999999998" cx="203.90243902439025" cy="321.3658536585366" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_3
6
+ x-" data-x="-1.3" data-y="-0.30000000000000004" cx="203.90243902439025" cy="348.6829268292683" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_4
7
+ x+" data-x="1.3" data-y="-0.30000000000000004" cx="559.0243902439025" cy="348.6829268292683" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_5
8
+ x+" data-x="1.3" data-y="-0.10000000000000003" cx="559.0243902439025" cy="321.3658536585366" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_6
9
+ x+" data-x="1.3" data-y="0.09999999999999998" cx="559.0243902439025" cy="294.04878048780483" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_7
10
+ x+" data-x="1.3" data-y="0.30000000000000004" cx="559.0243902439025" cy="266.73170731707313" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_8
11
+ x-" data-x="-2.3" data-y="0" cx="67.31707317073176" cy="307.7073170731707" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_9
12
+ x+" data-x="-1.7" data-y="0" cx="149.26829268292687" cy="307.7073170731707" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
13
+ orientation: y+" data-x="1.5" data-y="-0.30000000000000004" cx="586.3414634146342" cy="348.6829268292683" 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[
14
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
15
+ const svg = e.currentTarget;
16
+ const rect = svg.getBoundingClientRect();
17
+ const x = e.clientX - rect.left;
18
+ const y = e.clientY - rect.top;
19
+ const crosshair = svg.getElementById('crosshair');
20
+ const h = svg.getElementById('crosshair-h');
21
+ const v = svg.getElementById('crosshair-v');
22
+ const coords = svg.getElementById('coordinates');
23
+
24
+ crosshair.style.display = 'block';
25
+ h.setAttribute('x1', '0');
26
+ h.setAttribute('x2', '640');
27
+ h.setAttribute('y1', y);
28
+ h.setAttribute('y2', y);
29
+ v.setAttribute('x1', x);
30
+ v.setAttribute('x2', x);
31
+ v.setAttribute('y1', '0');
32
+ v.setAttribute('y2', '640');
33
+
34
+ // Calculate real coordinates using inverse transformation
35
+ const matrix = {"a":136.58536585365854,"c":0,"e":381.4634146341464,"b":0,"d":-136.58536585365854,"f":307.7073170731707};
36
+ // Manually invert and apply the affine transform
37
+ // Since we only use translate and scale, we can directly compute:
38
+ // x' = (x - tx) / sx
39
+ // y' = (y - ty) / sy
40
+ const sx = matrix.a;
41
+ const sy = matrix.d;
42
+ const tx = matrix.e;
43
+ const ty = matrix.f;
44
+ const realPoint = {
45
+ x: (x - tx) / sx,
46
+ y: (y - ty) / sy // Flip y back since we used negative scale
47
+ }
48
+
49
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
50
+ coords.setAttribute('x', (x + 5).toString());
51
+ coords.setAttribute('y', (y - 5).toString());
52
+ });
53
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
54
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
55
+ });
56
+ ]]></script></svg>
@@ -0,0 +1,87 @@
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="-1.12,-0.195 -2.19,-0.11500000000000021" data-type="line" data-label="" points="177.14887640449436,240.8567415730337 71.95224719101122,232.99157303370788" fill="none" stroke="hsl(296, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="2.27,0.595 1.2800000000000002,-0.3950000000000001" data-type="line" data-label="" points="510.435393258427,163.188202247191 413.1039325842697,260.5196629213483" fill="none" stroke="hsl(248, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.2800000000000002,-0.3950000000000001 1.9800000000000002,-0.39500000000000013" data-type="line" data-label="" points="413.1039325842697,260.5196629213483 481.92415730337086,260.5196629213483" fill="none" stroke="hsl(160, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.2800000000000002,-0.5950000000000001 -1.1449999999999996,-3.0799999999999996" data-type="line" data-label="" points="413.1039325842697,280.1825842696629 174.6910112359551,524.4943820224719" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2800000000000002,-0.5950000000000001 -2.19,-0.8750000000000002" data-type="line" data-label="" points="413.1039325842697,280.1825842696629 71.95224719101122,307.7106741573034" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2800000000000002,-0.5950000000000001 0.48,-3.3949999999999996" data-type="line" data-label="" points="413.1039325842697,280.1825842696629 334.4522471910112,555.4634831460673" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.1449999999999996,-3.0799999999999996 -2.19,-0.8750000000000002" data-type="line" data-label="" points="174.6910112359551,524.4943820224719 71.95224719101122,307.7106741573034" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.1449999999999996,-3.0799999999999996 0.48,-3.3949999999999996" data-type="line" data-label="" points="174.6910112359551,524.4943820224719 334.4522471910112,555.4634831460673" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.19,-0.8750000000000002 0.48,-3.3949999999999996" data-type="line" data-label="" points="71.95224719101122,307.7106741573034 334.4522471910112,555.4634831460673" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.12,-0.5950000000000001 -1.12,-0.395" data-type="line" data-label="" points="177.14887640449436,280.1825842696629 177.14887640449436,260.5196629213483" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.12,-0.5950000000000001 2.58,-0.39500000000000013" data-type="line" data-label="" points="177.14887640449436,280.1825842696629 540.9129213483146,260.5196629213483" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.12,-0.5950000000000001 -1.1449999999999996,-2.319999999999999" data-type="line" data-label="" points="177.14887640449436,280.1825842696629 174.6910112359551,449.7752808988763" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.12,-0.395 2.58,-0.39500000000000013" data-type="line" data-label="" points="177.14887640449436,260.5196629213483 540.9129213483146,260.5196629213483" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.12,-0.395 -1.1449999999999996,-2.319999999999999" data-type="line" data-label="" points="177.14887640449436,260.5196629213483 174.6910112359551,449.7752808988763" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.58,-0.39500000000000013 -1.1449999999999996,-2.319999999999999" data-type="line" data-label="" points="540.9129213483146,260.5196629213483 174.6910112359551,449.7752808988763" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2800000000000002,-0.19500000000000006 0.48,-3.1949999999999994" data-type="line" data-label="" points="413.1039325842697,240.8567415730337 334.4522471910112,535.8005617977527" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.12,0.0050000000000000044 1.2800000000000002,0.0050000000000000044" data-type="line" data-label="" points="177.14887640449436,221.1938202247191 413.1039325842697,221.1938202247191" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.12,0.0050000000000000044 2.27,1.1949999999999998" data-type="line" data-label="" points="177.14887640449436,221.1938202247191 510.435393258427,104.19943820224718" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.12,0.0050000000000000044 0.48,-2.994999999999999" data-type="line" data-label="" points="177.14887640449436,221.1938202247191 334.4522471910112,516.1376404494381" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2800000000000002,0.0050000000000000044 2.27,1.1949999999999998" data-type="line" data-label="" points="413.1039325842697,221.1938202247191 510.435393258427,104.19943820224718" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2800000000000002,0.0050000000000000044 0.48,-2.994999999999999" data-type="line" data-label="" points="413.1039325842697,221.1938202247191 334.4522471910112,516.1376404494381" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.27,1.1949999999999998 0.48,-2.994999999999999" data-type="line" data-label="" points="510.435393258427,104.19943820224718 334.4522471910112,516.1376404494381" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2800000000000002,-0.3950000000000001 1.9800000000000002,-0.39500000000000013" data-type="line" data-label="" points="413.1039325842697,260.5196629213483 481.92415730337086,260.5196629213483" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.27,0.595 2.27,0.09999999999999992 1.7800000000000002,0.09999999999999992 1.7800000000000002,-0.39500000000000013 1.9800000000000002,-0.39500000000000013" data-type="line" data-label="" points="510.435393258427,163.188202247191 510.435393258427,211.85393258426967 462.26123595505624,211.85393258426967 462.26123595505624,260.5196629213483 481.92415730337086,260.5196629213483" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.48,-3.3949999999999996 -1.1449999999999996,-3.3949999999999996 -1.1449999999999996,-3.0799999999999996" data-type="line" data-label="" points="334.4522471910112,555.4634831460673 174.6910112359551,555.4634831460673 174.6910112359551,524.4943820224719" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.12,-0.395 -1.32,-0.395 -1.32,-0.5950000000000001 -1.12,-0.5950000000000001" data-type="line" data-label="" points="177.14887640449436,260.5196629213483 157.48595505617976,260.5196629213483 157.48595505617976,280.1825842696629 177.14887640449436,280.1825842696629" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.1449999999999996,-2.319999999999999 -1.1449999999999996,-0.5950000000000002 -1.12,-0.5950000000000002" data-type="line" data-label="" points="174.6910112359551,449.7752808988763 174.6910112359551,280.1825842696629 177.14887640449436,280.1825842696629" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.27,1.1949999999999998 2.27,1.3949999999999998 1.7750000000000001,1.3949999999999998 1.7750000000000001,0.0050000000000000044 1.2800000000000002,0.0050000000000000044" data-type="line" data-label="" points="510.435393258427,104.19943820224718 510.435393258427,84.53651685393257 461.76966292134836,84.53651685393257 461.76966292134836,221.1938202247191 413.1039325842697,221.1938202247191" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.12,-0.19499999999999984 -1.3575,-0.19499999999999984 -1.3575,0.08499999999999974 -2.19,0.08499999999999974 -2.19,-0.11500000000000021" data-type="line" data-label="" points="177.14887640449436,240.85674157303367 153.79915730337078,240.85674157303367 153.79915730337078,213.32865168539328 71.95224719101122,213.32865168539328 71.95224719101122,232.99157303370788" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.2800000000000002,-0.5950000000000001 1.5210000000000001,-0.5950000000000001 1.5210000000000001,-0.8460000000000001" data-type="line" data-label="" points="413.1039325842697,280.1825842696629 436.7977528089888,280.1825842696629 436.7977528089888,304.85955056179773" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.48,-2.994999999999999 0.239,-2.994999999999999 0.239,-2.793999999999999" data-type="line" data-label="" points="334.4522471910112,516.1376404494381 310.7584269662921,516.1376404494381 310.7584269662921,496.376404494382" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="0.08000000000000007" data-y="-0.29500000000000004" x="177.14887640449433" y="201.53089887640448" width="235.95505617977537" height="98.31460674157307" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="2.3675" data-y="0.8949999999999999" x="478.4831460674158" y="104.1994382022472" width="83.07584269662914" height="58.98876404494381" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="2.2800000000000002" data-y="-0.39500000000000013" x="481.92415730337086" y="227.09269662921346" width="58.988764044943764" height="66.85393258426967" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="-1.0099999999999996" data-y="-2.6999999999999993" x="142.73876404494388" y="449.77528089887636" width="90.4494382022472" height="74.71910112359558" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="-2.0549999999999997" data-y="-0.4950000000000002" x="40" y="232.99157303370785" width="90.44943820224722" height="74.71910112359552" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="1.58" data-y="-3.1949999999999994" x="334.4522471910113" y="496.4747191011235" width="216.29213483146066" height="78.65168539325839" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="U1" data-x="-0.6" data-y="0.31999999999999995" x="210.5758426966292" y="177.93539325842696" width="35.39325842696633" height="24.578651685393254" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="J1" data-x="1" data-y="-2.6799999999999997" x="367.87921348314615" y="472.879213483146" width="35.39325842696627" height="24.57865168539331" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: GND
2
+ globalConnNetId: connectivity_net2" data-x="1.5210000000000001" data-y="-1.056" x="413.2022471910112" y="304.85955056179773" width="47.191011235955045" height="41.292134831460714" fill="#00000066" stroke="#000000" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: GND
3
+ globalConnNetId: connectivity_net2" data-x="-1.1449999999999996" data-y="-3.6049999999999995" x="151.09550561797758" y="555.4634831460673" width="47.191011235955045" height="41.29213483146077" fill="#00000066" stroke="#000000" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: GND
4
+ globalConnNetId: connectivity_net2" data-x="-2.19" data-y="-1.086" x="48.3567415730337" y="307.80898876404495" width="47.191011235955045" height="41.29213483146066" fill="#00000066" stroke="#000000" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: NODE
5
+ globalConnNetId: connectivity_net3" data-x="-1.4449999999999996" data-y="-1.4574999999999996" x="115.70224719101124" y="355.1474719101123" width="58.98876404494385" height="19.662921348314626" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: NODE
6
+ globalConnNetId: connectivity_net3" data-x="2.881" data-y="-0.39500000000000013" x="541.0112359550562" y="250.688202247191" width="58.988764044943764" height="19.662921348314597" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: OUT
7
+ globalConnNetId: connectivity_net4" data-x="1.5210000000000001" data-y="-0.19500000000000006" x="413.2022471910112" y="231.0252808988764" width="47.191011235955045" height="19.662921348314626" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: OUT
8
+ globalConnNetId: connectivity_net4" data-x="0.239" data-y="-3.1949999999999994" x="287.1629213483146" y="525.9691011235955" width="47.191011235955045" height="19.662921348314626" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: VCC
9
+ globalConnNetId: connectivity_net5" data-x="-1.331" data-y="0.0050000000000000044" x="135.75842696629212" y="211.3623595505618" width="41.29213483146066" height="19.662921348314597" fill="#ef444466" stroke="#ef4444" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: VCC
10
+ globalConnNetId: connectivity_net5" data-x="2.27" data-y="1.6049999999999998" x="486.83988764044943" y="43.24438202247191" width="47.191011235955045" height="41.29213483146066" fill="#ef444466" stroke="#ef4444" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: VCC
11
+ globalConnNetId: connectivity_net5" data-x="0.239" data-y="-2.583999999999999" x="287.1629213483146" y="455.08426966292126" width="47.191011235955045" height="41.29213483146066" fill="#ef444466" stroke="#ef4444" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: U1.CTRL to C2.pin1
12
+ globalConnNetId: connectivity_net0" data-x="-2.19" data-y="0.3099999999999997" x="62.12078651685391" y="169.0870786516854" width="19.662921348314626" height="44.24157303370788" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01017142857142857"/></g><g><rect data-type="rect" data-label="netId: U1.DISCH to R2.pin1
13
+ globalConnNetId: connectivity_net1" data-x="1.6300000000000003" data-y="-0.6200000000000001" x="437.682584269663" y="260.5196629213483" width="19.662921348314626" height="44.24157303370788" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01017142857142857"/></g><g><circle data-type="point" data-label="schematic_port_0
14
+ x+" data-x="1.2800000000000002" data-y="-0.5950000000000001" cx="413.1039325842697" cy="280.1825842696629" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_1
15
+ x-" data-x="-1.12" data-y="-0.5950000000000001" cx="177.14887640449436" cy="280.1825842696629" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_2
16
+ x+" data-x="1.2800000000000002" data-y="-0.19500000000000006" cx="413.1039325842697" cy="240.8567415730337" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_3
17
+ x-" data-x="-1.12" data-y="0.0050000000000000044" cx="177.14887640449436" cy="221.1938202247191" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_4
18
+ x-" data-x="-1.12" data-y="-0.195" cx="177.14887640449436" cy="240.8567415730337" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_5
19
+ x-" data-x="-1.12" data-y="-0.395" cx="177.14887640449436" cy="260.5196629213483" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_6
20
+ x+" data-x="1.2800000000000002" data-y="-0.3950000000000001" cx="413.1039325842697" cy="260.5196629213483" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_7
21
+ x+" data-x="1.2800000000000002" data-y="0.0050000000000000044" cx="413.1039325842697" cy="221.1938202247191" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_8
22
+ y+" data-x="2.27" data-y="1.1949999999999998" cx="510.435393258427" cy="104.19943820224718" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_9
23
+ y-" data-x="2.27" data-y="0.595" cx="510.435393258427" cy="163.188202247191" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_10
24
+ x-" data-x="1.9800000000000002" data-y="-0.39500000000000013" cx="481.92415730337086" cy="260.5196629213483" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_11
25
+ x+" data-x="2.58" data-y="-0.39500000000000013" cx="540.9129213483146" cy="260.5196629213483" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_12
26
+ y+" data-x="-1.1449999999999996" data-y="-2.319999999999999" cx="174.6910112359551" cy="449.7752808988763" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_13
27
+ y-" data-x="-1.1449999999999996" data-y="-3.0799999999999996" cx="174.6910112359551" cy="524.4943820224719" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_14
28
+ y+" data-x="-2.19" data-y="-0.11500000000000021" cx="71.95224719101122" cy="232.99157303370788" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_15
29
+ y-" data-x="-2.19" data-y="-0.8750000000000002" cx="71.95224719101122" cy="307.7106741573034" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_16
30
+ x-" data-x="0.48" data-y="-2.994999999999999" cx="334.4522471910112" cy="516.1376404494381" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_17
31
+ x-" data-x="0.48" data-y="-3.1949999999999994" cx="334.4522471910112" cy="535.8005617977527" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_18
32
+ x-" data-x="0.48" data-y="-3.3949999999999996" cx="334.4522471910112" cy="555.4634831460673" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
33
+ orientation: y-" data-x="1.5210000000000001" data-y="-0.8460000000000001" cx="436.7977528089888" cy="304.85955056179773" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
34
+ orientation: y-" data-x="-1.1449999999999996" data-y="-3.3949999999999996" cx="174.6910112359551" cy="555.4634831460673" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
35
+ orientation: y-" data-x="-2.19" data-y="-0.8750000000000002" cx="71.95224719101122" cy="307.7106741573034" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
36
+ orientation: x-" data-x="-1.1449999999999996" data-y="-1.4574999999999996" cx="174.6910112359551" cy="364.9789325842696" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
37
+ orientation: x+" data-x="2.58" data-y="-0.39500000000000013" cx="540.9129213483146" cy="260.5196629213483" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
38
+ orientation: x+" data-x="1.2800000000000002" data-y="-0.19500000000000006" cx="413.1039325842697" cy="240.8567415730337" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
39
+ orientation: x-" data-x="0.48" data-y="-3.1949999999999994" cx="334.4522471910112" cy="535.8005617977527" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
40
+ orientation: x-" data-x="-1.12" data-y="0.0050000000000000044" cx="177.14887640449436" cy="221.1938202247191" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
41
+ orientation: y+" data-x="2.27" data-y="1.3949999999999998" cx="510.435393258427" cy="84.53651685393257" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
42
+ orientation: y+" data-x="0.239" data-y="-2.793999999999999" cx="310.7584269662921" cy="496.376404494382" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
43
+ orientation: y+" data-x="-2.19" data-y="0.08499999999999974" cx="71.95224719101122" cy="213.32865168539328" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
44
+ orientation: y-" data-x="1.6300000000000003" data-y="-0.39500000000000013" cx="447.5140449438203" cy="260.5196629213483" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
45
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
46
+ const svg = e.currentTarget;
47
+ const rect = svg.getBoundingClientRect();
48
+ const x = e.clientX - rect.left;
49
+ const y = e.clientY - rect.top;
50
+ const crosshair = svg.getElementById('crosshair');
51
+ const h = svg.getElementById('crosshair-h');
52
+ const v = svg.getElementById('crosshair-v');
53
+ const coords = svg.getElementById('coordinates');
54
+
55
+ crosshair.style.display = 'block';
56
+ h.setAttribute('x1', '0');
57
+ h.setAttribute('x2', '640');
58
+ h.setAttribute('y1', y);
59
+ h.setAttribute('y2', y);
60
+ v.setAttribute('x1', x);
61
+ v.setAttribute('x2', x);
62
+ v.setAttribute('y1', '0');
63
+ v.setAttribute('y2', '640');
64
+
65
+ // Calculate real coordinates using inverse transformation
66
+ const matrix = {"a":98.31460674157304,"c":0,"e":287.2612359550562,"b":0,"d":-98.31460674157304,"f":221.68539325842696};
67
+ // Manually invert and apply the affine transform
68
+ // Since we only use translate and scale, we can directly compute:
69
+ // x' = (x - tx) / sx
70
+ // y' = (y - ty) / sy
71
+ const sx = matrix.a;
72
+ const sy = matrix.d;
73
+ const tx = matrix.e;
74
+ const ty = matrix.f;
75
+ const realPoint = {
76
+ x: (x - tx) / sx,
77
+ y: (y - ty) / sy // Flip y back since we used negative scale
78
+ }
79
+
80
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
81
+ coords.setAttribute('x', (x + 5).toString());
82
+ coords.setAttribute('y', (y - 5).toString());
83
+ });
84
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
85
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
86
+ });
87
+ ]]></script></svg>
@@ -0,0 +1,276 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 0.08000000000000007,
7
+ "y": -0.29500000000000004
8
+ },
9
+ "width": 2.4000000000000004,
10
+ "height": 1,
11
+ "pins": [
12
+ {
13
+ "pinId": "schematic_port_0",
14
+ "x": 1.2800000000000002,
15
+ "y": -0.5950000000000001
16
+ },
17
+ {
18
+ "pinId": "schematic_port_1",
19
+ "x": -1.12,
20
+ "y": -0.5950000000000001
21
+ },
22
+ {
23
+ "pinId": "schematic_port_2",
24
+ "x": 1.2800000000000002,
25
+ "y": -0.19500000000000006
26
+ },
27
+ {
28
+ "pinId": "schematic_port_3",
29
+ "x": -1.12,
30
+ "y": 0.0050000000000000044
31
+ },
32
+ {
33
+ "pinId": "schematic_port_4",
34
+ "x": -1.12,
35
+ "y": -0.195
36
+ },
37
+ {
38
+ "pinId": "schematic_port_5",
39
+ "x": -1.12,
40
+ "y": -0.395
41
+ },
42
+ {
43
+ "pinId": "schematic_port_6",
44
+ "x": 1.2800000000000002,
45
+ "y": -0.3950000000000001
46
+ },
47
+ {
48
+ "pinId": "schematic_port_7",
49
+ "x": 1.2800000000000002,
50
+ "y": 0.0050000000000000044
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "chipId": "schematic_component_1",
56
+ "center": {
57
+ "x": 2.3675,
58
+ "y": 0.8949999999999999
59
+ },
60
+ "width": 0.845,
61
+ "height": 0.5999999999999999,
62
+ "pins": [
63
+ {
64
+ "pinId": "schematic_port_8",
65
+ "x": 2.27,
66
+ "y": 1.1949999999999998,
67
+ "_facingDirection": "y+"
68
+ },
69
+ {
70
+ "pinId": "schematic_port_9",
71
+ "x": 2.27,
72
+ "y": 0.595,
73
+ "_facingDirection": "y-"
74
+ }
75
+ ]
76
+ },
77
+ {
78
+ "chipId": "schematic_component_2",
79
+ "center": {
80
+ "x": 2.2800000000000002,
81
+ "y": -0.39500000000000013
82
+ },
83
+ "width": 0.6000000000000001,
84
+ "height": 0.6799999999999999,
85
+ "pins": [
86
+ {
87
+ "pinId": "schematic_port_10",
88
+ "x": 1.9800000000000002,
89
+ "y": -0.39500000000000013
90
+ },
91
+ {
92
+ "pinId": "schematic_port_11",
93
+ "x": 2.58,
94
+ "y": -0.39500000000000013
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "chipId": "schematic_component_3",
100
+ "center": {
101
+ "x": -1.0099999999999996,
102
+ "y": -2.6999999999999993
103
+ },
104
+ "width": 0.9199999999999999,
105
+ "height": 0.7600000000000007,
106
+ "pins": [
107
+ {
108
+ "pinId": "schematic_port_12",
109
+ "x": -1.1449999999999996,
110
+ "y": -2.319999999999999,
111
+ "_facingDirection": "y+"
112
+ },
113
+ {
114
+ "pinId": "schematic_port_13",
115
+ "x": -1.1449999999999996,
116
+ "y": -3.0799999999999996,
117
+ "_facingDirection": "y-"
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "chipId": "schematic_component_4",
123
+ "center": {
124
+ "x": -2.0549999999999997,
125
+ "y": -0.4950000000000002
126
+ },
127
+ "width": 0.9200000000000004,
128
+ "height": 0.76,
129
+ "pins": [
130
+ {
131
+ "pinId": "schematic_port_14",
132
+ "x": -2.19,
133
+ "y": -0.11500000000000021,
134
+ "_facingDirection": "y+"
135
+ },
136
+ {
137
+ "pinId": "schematic_port_15",
138
+ "x": -2.19,
139
+ "y": -0.8750000000000002,
140
+ "_facingDirection": "y-"
141
+ }
142
+ ]
143
+ },
144
+ {
145
+ "chipId": "schematic_component_5",
146
+ "center": {
147
+ "x": 1.58,
148
+ "y": -3.1949999999999994
149
+ },
150
+ "width": 2.2,
151
+ "height": 0.7999999999999998,
152
+ "pins": [
153
+ {
154
+ "pinId": "schematic_port_16",
155
+ "x": 0.48,
156
+ "y": -2.994999999999999
157
+ },
158
+ {
159
+ "pinId": "schematic_port_17",
160
+ "x": 0.48,
161
+ "y": -3.1949999999999994
162
+ },
163
+ {
164
+ "pinId": "schematic_port_18",
165
+ "x": 0.48,
166
+ "y": -3.3949999999999996
167
+ }
168
+ ]
169
+ }
170
+ ],
171
+ "directConnections": [
172
+ {
173
+ "netId": "U1.CTRL to C2.pin1",
174
+ "pinIds": [
175
+ "schematic_port_4",
176
+ "schematic_port_14"
177
+ ]
178
+ },
179
+ {
180
+ "netId": "R1.pin2 to U1.DISCH",
181
+ "pinIds": [
182
+ "schematic_port_9",
183
+ "schematic_port_6"
184
+ ]
185
+ },
186
+ {
187
+ "netId": "U1.DISCH to R2.pin1",
188
+ "pinIds": [
189
+ "schematic_port_6",
190
+ "schematic_port_10"
191
+ ]
192
+ }
193
+ ],
194
+ "netConnections": [
195
+ {
196
+ "netId": "GND",
197
+ "netLabelWidth": 0.42,
198
+ "netLabelHeight": 0.48,
199
+ "pinIds": [
200
+ "schematic_port_0",
201
+ "schematic_port_13",
202
+ "schematic_port_15",
203
+ "schematic_port_18"
204
+ ]
205
+ },
206
+ {
207
+ "netId": "NODE",
208
+ "netLabelWidth": 0.6,
209
+ "pinIds": [
210
+ "schematic_port_1",
211
+ "schematic_port_5",
212
+ "schematic_port_11",
213
+ "schematic_port_12"
214
+ ]
215
+ },
216
+ {
217
+ "netId": "OUT",
218
+ "netLabelWidth": 0.48,
219
+ "pinIds": [
220
+ "schematic_port_2",
221
+ "schematic_port_17"
222
+ ]
223
+ },
224
+ {
225
+ "netId": "VCC",
226
+ "netLabelWidth": 0.42,
227
+ "netLabelHeight": 0.48,
228
+ "pinIds": [
229
+ "schematic_port_3",
230
+ "schematic_port_7",
231
+ "schematic_port_8",
232
+ "schematic_port_16"
233
+ ]
234
+ }
235
+ ],
236
+ "textBoxes": [
237
+ {
238
+ "chipId": "schematic_component_0",
239
+ "center": {
240
+ "x": -0.6,
241
+ "y": 0.31999999999999995
242
+ },
243
+ "width": 0.36000000000000004,
244
+ "height": 0.24999999999999994,
245
+ "text": "U1"
246
+ },
247
+ {
248
+ "chipId": "schematic_component_5",
249
+ "center": {
250
+ "x": 1,
251
+ "y": -2.6799999999999997
252
+ },
253
+ "width": 0.3600000000000001,
254
+ "height": 0.24999999999999956,
255
+ "text": "J1"
256
+ }
257
+ ],
258
+ "availableNetLabelOrientations": {
259
+ "VCC": [
260
+ "y+"
261
+ ],
262
+ "GND": [
263
+ "y-"
264
+ ],
265
+ "OUT": [
266
+ "x-",
267
+ "x+"
268
+ ],
269
+ "NODE": [
270
+ "x-",
271
+ "x+"
272
+ ]
273
+ },
274
+ "maxMspPairDistance": 2.4,
275
+ "_hideRatsNet": false
276
+ }
@@ -0,0 +1,97 @@
1
+ import { expect, test } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import type { InputProblem } from "lib/types/InputProblem"
4
+ import "tests/fixtures/matcher"
5
+
6
+ // Captured from @tscircuit/core for a TYPE_C_16PIN_2MD chip whose pin 4 is
7
+ // connected directly to pin 5 on the same schematic component.
8
+ const inputProblem: InputProblem = {
9
+ chips: [
10
+ {
11
+ chipId: "schematic_component_0",
12
+ center: { x: 0, y: 0 },
13
+ width: 2.6,
14
+ height: 1,
15
+ pins: [
16
+ {
17
+ pinId: "schematic_port_0",
18
+ x: -1.3,
19
+ y: 0.30000000000000004,
20
+ },
21
+ {
22
+ pinId: "schematic_port_1",
23
+ x: -1.3,
24
+ y: 0.10000000000000003,
25
+ },
26
+ {
27
+ pinId: "schematic_port_2",
28
+ x: -1.3,
29
+ y: -0.09999999999999998,
30
+ },
31
+ {
32
+ pinId: "schematic_port_3",
33
+ x: -1.3,
34
+ y: -0.30000000000000004,
35
+ },
36
+ {
37
+ pinId: "schematic_port_4",
38
+ x: 1.3,
39
+ y: -0.30000000000000004,
40
+ },
41
+ {
42
+ pinId: "schematic_port_5",
43
+ x: 1.3,
44
+ y: -0.10000000000000003,
45
+ },
46
+ {
47
+ pinId: "schematic_port_6",
48
+ x: 1.3,
49
+ y: 0.09999999999999998,
50
+ },
51
+ {
52
+ pinId: "schematic_port_7",
53
+ x: 1.3,
54
+ y: 0.30000000000000004,
55
+ },
56
+ ],
57
+ },
58
+ ],
59
+ directConnections: [
60
+ {
61
+ netId: ".U1 > .pin4 to U1.pin5",
62
+ netLabelWidth: 0.96,
63
+ pinIds: ["schematic_port_3", "schematic_port_4"],
64
+ },
65
+ ],
66
+ netConnections: [],
67
+ textBoxes: [
68
+ {
69
+ chipId: "schematic_component_0",
70
+ center: { x: 0.06, y: -0.63 },
71
+ width: 1.92,
72
+ height: 0.17999999999999994,
73
+ text: "TYPE_C_16PIN_2MD",
74
+ },
75
+ {
76
+ chipId: "schematic_component_0",
77
+ center: { x: -0.78, y: 0.615 },
78
+ width: 0.3599999999999999,
79
+ height: 0.25,
80
+ text: "U1",
81
+ },
82
+ ],
83
+ availableNetLabelOrientations: {},
84
+ maxMspPairDistance: 2.4,
85
+ _hideRatsNet: false,
86
+ }
87
+
88
+ test("TYPE_C_16PIN_2MD routes pin 4 to pin 5 on the same chip", () => {
89
+ const solver = new SchematicTracePipelineSolver(inputProblem)
90
+
91
+ solver.solve()
92
+
93
+ expect(solver.netLabelTraceCollisionSolver!.getOutput().traces).toHaveLength(
94
+ 1,
95
+ )
96
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
97
+ })