@tscircuit/schematic-trace-solver 0.0.25 → 0.0.27
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.
- package/.github/workflows/bun-test.yml +8 -0
- package/README.md +28 -0
- package/bunfig.toml +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +31 -6136
- package/lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver.ts +0 -1
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver.ts +11 -0
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver_visualize.ts +0 -1
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver.ts +0 -2
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver/SchematicTraceSingleLineSolver.ts +0 -1
- package/lib/solvers/TraceOverlapShiftSolver/TraceOverlapIssueSolver/TraceOverlapIssueSolver.ts +0 -2
- package/lib/solvers/TraceOverlapShiftSolver/TraceOverlapShiftSolver.ts +0 -1
- package/package.json +6 -7
- package/site/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver01.page.tsx +574 -0
- package/site/components/DownloadDropdown.tsx +4 -2
- package/site/examples/example01-basic.page.tsx +1 -1
- package/site/examples/example02.page.tsx +1 -1
- package/site/examples/example03.page.tsx +1 -1
- package/site/examples/example04-single-symbol.page.tsx +1 -1
- package/site/examples/example05.page.tsx +1 -1
- package/site/examples/example06.page.tsx +1 -1
- package/site/examples/example07.page.tsx +1 -1
- package/site/examples/example08.page.tsx +1 -1
- package/site/examples/example09.page.tsx +1 -1
- package/site/examples/example10.page.tsx +1 -1
- package/site/examples/example11.page.tsx +1 -1
- package/site/examples/example12.page.tsx +1 -1
- package/site/examples/example13.page.tsx +219 -0
- package/site/examples/example14.page.tsx +210 -0
- package/tests/__snapshots__/svg.snap.svg +3 -0
- package/tests/examples/__snapshots__/example01.snap.svg +157 -0
- package/tests/examples/__snapshots__/example02.snap.svg +262 -0
- package/tests/examples/__snapshots__/example03.snap.svg +282 -0
- package/tests/examples/__snapshots__/example04.snap.svg +87 -0
- package/tests/examples/__snapshots__/example05.snap.svg +190 -0
- package/tests/examples/__snapshots__/example06.snap.svg +94 -0
- package/tests/examples/__snapshots__/example07.snap.svg +204 -0
- package/tests/examples/__snapshots__/example08.snap.svg +136 -0
- package/tests/examples/__snapshots__/example09.snap.svg +484 -0
- package/tests/examples/__snapshots__/example10.snap.svg +135 -0
- package/tests/examples/__snapshots__/example11.snap.svg +162 -0
- package/tests/examples/__snapshots__/example12.snap.svg +145 -0
- package/tests/examples/__snapshots__/example13.snap.svg +316 -0
- package/tests/examples/__snapshots__/example14.snap.svg +213 -0
- package/tests/examples/example01.test.ts +12 -0
- package/tests/examples/example02.test.ts +12 -0
- package/tests/examples/example03.test.ts +12 -0
- package/tests/examples/example04.test.ts +12 -0
- package/tests/examples/example05.test.ts +12 -0
- package/tests/examples/example06.test.ts +12 -0
- package/tests/examples/example07.test.ts +12 -0
- package/tests/examples/example08.test.ts +12 -0
- package/tests/examples/example09.test.ts +12 -0
- package/tests/examples/example10.test.ts +12 -0
- package/tests/examples/example11.test.tsx +12 -0
- package/tests/examples/example12.test.tsx +12 -0
- package/tests/examples/example13.test.tsx +12 -0
- package/tests/examples/example14.test.tsx +12 -0
- package/tests/fixtures/matcher.ts +62 -0
- package/tests/fixtures/preload.ts +1 -0
- package/tests/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver01.test.ts +13 -0
- package/tests/svg.test.ts +11 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="100%" height="100%" fill="white" />
|
|
3
|
+
<g>
|
|
4
|
+
<circle data-type="point" data-label="U1.1
|
|
5
|
+
x-" data-x="-0.8" data-y="0.2" cx="422.5742574257426" cy="297.8217821782178" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
|
|
6
|
+
</g>
|
|
7
|
+
<g>
|
|
8
|
+
<circle data-type="point" data-label="U1.2
|
|
9
|
+
x-" data-x="-0.8" data-y="0" cx="422.5742574257426" cy="320" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
|
|
10
|
+
</g>
|
|
11
|
+
<g>
|
|
12
|
+
<circle data-type="point" data-label="U1.3
|
|
13
|
+
x-" data-x="-0.8" data-y="-0.2" cx="422.5742574257426" cy="342.1782178217822" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<circle data-type="point" data-label="U1.4
|
|
17
|
+
x+" data-x="0.8" data-y="-0.2" cx="600" cy="342.1782178217822" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
|
|
18
|
+
</g>
|
|
19
|
+
<g>
|
|
20
|
+
<circle data-type="point" data-label="U1.5
|
|
21
|
+
x+" data-x="0.8" data-y="0" cx="600" cy="320" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
24
|
+
<circle data-type="point" data-label="U1.6
|
|
25
|
+
x+" data-x="0.8" data-y="0.2" cx="600" cy="297.8217821782178" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
<circle data-type="point" data-label="C1.1
|
|
29
|
+
y+" data-x="-2" data-y="0.5" cx="289.50495049504957" cy="264.55445544554453" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
|
|
30
|
+
</g>
|
|
31
|
+
<g>
|
|
32
|
+
<circle data-type="point" data-label="C1.2
|
|
33
|
+
y-" data-x="-2" data-y="-0.5" cx="289.50495049504957" cy="375.44554455445547" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g>
|
|
36
|
+
<circle data-type="point" data-label="C2.1
|
|
37
|
+
y+" data-x="-4" data-y="0.5" cx="67.72277227722776" cy="264.55445544554453" r="3" fill="hsl(2, 100%, 50%, 0.8)" />
|
|
38
|
+
</g>
|
|
39
|
+
<g>
|
|
40
|
+
<circle data-type="point" data-label="C2.2
|
|
41
|
+
y-" data-x="-4" data-y="-0.5" cx="67.72277227722776" cy="375.44554455445547" r="3" fill="hsl(3, 100%, 50%, 0.8)" />
|
|
42
|
+
</g>
|
|
43
|
+
<g>
|
|
44
|
+
<circle data-type="point" data-label="" data-x="-1.4" data-y="0.7" cx="356.0396039603961" cy="242.3762376237624" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
45
|
+
</g>
|
|
46
|
+
<g>
|
|
47
|
+
<circle data-type="point" data-label="" data-x="-0.8" data-y="0" cx="422.5742574257426" cy="320" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
48
|
+
</g>
|
|
49
|
+
<g>
|
|
50
|
+
<circle data-type="point" data-label="" data-x="-4" data-y="0.5" cx="67.72277227722776" cy="264.55445544554453" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
51
|
+
</g>
|
|
52
|
+
<g>
|
|
53
|
+
<circle data-type="point" data-label="" data-x="-1.4" data-y="-0.7" cx="356.0396039603961" cy="397.6237623762376" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
54
|
+
</g>
|
|
55
|
+
<g>
|
|
56
|
+
<polyline data-points="-0.8,0.2 -2,0.5" data-type="line" data-label="" points="422.5742574257426,297.8217821782178 289.50495049504957,264.55445544554453" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" />
|
|
57
|
+
</g>
|
|
58
|
+
<g>
|
|
59
|
+
<polyline data-points="-0.8,0 -4,0.5" data-type="line" data-label="" points="422.5742574257426,320 67.72277227722776,264.55445544554453" fill="none" stroke="hsl(57, 100%, 50%, 0.8)" stroke-width="1" />
|
|
60
|
+
</g>
|
|
61
|
+
<g>
|
|
62
|
+
<polyline data-points="-0.8,-0.2 -4,-0.5" data-type="line" data-label="" points="422.5742574257426,342.1782178217822 67.72277227722776,375.44554455445547" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
63
|
+
</g>
|
|
64
|
+
<g>
|
|
65
|
+
<polyline data-points="-0.8,-0.2 -2,-0.5" data-type="line" data-label="" points="422.5742574257426,342.1782178217822 289.50495049504957,375.44554455445547" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
66
|
+
</g>
|
|
67
|
+
<g>
|
|
68
|
+
<polyline data-points="-4,-0.5 -2,-0.5" data-type="line" data-label="" points="67.72277227722776,375.44554455445547 289.50495049504957,375.44554455445547" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
69
|
+
</g>
|
|
70
|
+
<g>
|
|
71
|
+
<polyline data-points="-0.8,0.20000000000000018 -1.4,0.20000000000000018 -1.4,0.7 -2,0.7 -2,0.5" data-type="line" data-label="" points="422.5742574257426,297.8217821782178 356.0396039603961,297.8217821782178 356.0396039603961,242.3762376237624 289.50495049504957,242.3762376237624 289.50495049504957,264.55445544554453" fill="none" stroke="purple" stroke-width="1" />
|
|
72
|
+
</g>
|
|
73
|
+
<g>
|
|
74
|
+
<polyline data-points="-0.8,-0.20000000000000018 -1.4,-0.20000000000000018 -1.4,-0.7 -2,-0.7 -2,-0.5" data-type="line" data-label="" points="422.5742574257426,342.1782178217822 356.0396039603961,342.1782178217822 356.0396039603961,397.6237623762376 289.50495049504957,397.6237623762376 289.50495049504957,375.44554455445547" fill="none" stroke="purple" stroke-width="1" />
|
|
75
|
+
</g>
|
|
76
|
+
<g>
|
|
77
|
+
<polyline data-points="-4,-0.5 -4,-0.7000000000000002 -2,-0.7000000000000002 -2,-0.5" data-type="line" data-label="" points="67.72277227722776,375.44554455445547 67.72277227722776,397.62376237623766 289.50495049504957,397.62376237623766 289.50495049504957,375.44554455445547" fill="none" stroke="purple" stroke-width="1" />
|
|
78
|
+
</g>
|
|
79
|
+
<g>
|
|
80
|
+
<rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="422.5742574257426" y="286.73267326732673" width="177.4257425742574" height="66.53465346534654" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009017857142857143" />
|
|
81
|
+
</g>
|
|
82
|
+
<g>
|
|
83
|
+
<rect data-type="rect" data-label="C1" data-x="-2" data-y="0" x="261.7821782178218" y="264.55445544554453" width="55.445544554455466" height="110.89108910891093" fill="hsl(326, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009017857142857143" />
|
|
84
|
+
</g>
|
|
85
|
+
<g>
|
|
86
|
+
<rect data-type="rect" data-label="C2" data-x="-4" data-y="0" x="40.00000000000006" y="264.55445544554453" width="55.44554455445541" height="110.89108910891093" fill="hsl(327, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009017857142857143" />
|
|
87
|
+
</g>
|
|
88
|
+
<g>
|
|
89
|
+
<rect data-type="rect" data-label="" data-x="-1.4" data-y="0.9249999999999999" x="344.950495049505" y="192.4752475247525" width="22.178217821782198" height="49.9009900990099" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009017857142857143" />
|
|
90
|
+
</g>
|
|
91
|
+
<g>
|
|
92
|
+
<rect data-type="rect" data-label="" data-x="-1.026" data-y="0" x="372.56237623762377" y="308.91089108910893" width="49.90099009900996" height="22.17821782178214" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009017857142857143" />
|
|
93
|
+
</g>
|
|
94
|
+
<g>
|
|
95
|
+
<rect data-type="rect" data-label="" data-x="-4" data-y="0.726" x="56.63366336633669" y="214.54257425742574" width="22.17821782178214" height="49.90099009900993" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009017857142857143" />
|
|
96
|
+
</g>
|
|
97
|
+
<g>
|
|
98
|
+
<rect data-type="rect" data-label="" data-x="-1.4" data-y="-0.9249999999999999" x="344.950495049505" y="397.6237623762376" width="22.178217821782198" height="49.9009900990099" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009017857142857143" />
|
|
99
|
+
</g>
|
|
100
|
+
<g id="crosshair" style="display: none">
|
|
101
|
+
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
102
|
+
<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>
|
|
103
|
+
</g>
|
|
104
|
+
<script>
|
|
105
|
+
<![CDATA[
|
|
106
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
107
|
+
const svg = e.currentTarget;
|
|
108
|
+
const rect = svg.getBoundingClientRect();
|
|
109
|
+
const x = e.clientX - rect.left;
|
|
110
|
+
const y = e.clientY - rect.top;
|
|
111
|
+
const crosshair = svg.getElementById('crosshair');
|
|
112
|
+
const h = svg.getElementById('crosshair-h');
|
|
113
|
+
const v = svg.getElementById('crosshair-v');
|
|
114
|
+
const coords = svg.getElementById('coordinates');
|
|
115
|
+
|
|
116
|
+
crosshair.style.display = 'block';
|
|
117
|
+
h.setAttribute('x1', '0');
|
|
118
|
+
h.setAttribute('x2', '640');
|
|
119
|
+
h.setAttribute('y1', y);
|
|
120
|
+
h.setAttribute('y2', y);
|
|
121
|
+
v.setAttribute('x1', x);
|
|
122
|
+
v.setAttribute('x2', x);
|
|
123
|
+
v.setAttribute('y1', '0');
|
|
124
|
+
v.setAttribute('y2', '640');
|
|
125
|
+
|
|
126
|
+
// Calculate real coordinates using inverse transformation
|
|
127
|
+
const matrix = {
|
|
128
|
+
"a": 110.89108910891089,
|
|
129
|
+
"c": 0,
|
|
130
|
+
"e": 511.2871287128713,
|
|
131
|
+
"b": 0,
|
|
132
|
+
"d": -110.89108910891089,
|
|
133
|
+
"f": 320
|
|
134
|
+
};
|
|
135
|
+
// Manually invert and apply the affine transform
|
|
136
|
+
// Since we only use translate and scale, we can directly compute:
|
|
137
|
+
// x' = (x - tx) / sx
|
|
138
|
+
// y' = (y - ty) / sy
|
|
139
|
+
const sx = matrix.a;
|
|
140
|
+
const sy = matrix.d;
|
|
141
|
+
const tx = matrix.e;
|
|
142
|
+
const ty = matrix.f;
|
|
143
|
+
const realPoint = {
|
|
144
|
+
x: (x - tx) / sx,
|
|
145
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
149
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
150
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
151
|
+
});
|
|
152
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
153
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
154
|
+
});
|
|
155
|
+
]]>
|
|
156
|
+
</script>
|
|
157
|
+
</svg>
|
|
@@ -0,0 +1,262 @@
|
|
|
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="C6.1
|
|
5
|
+
y+" data-x="-1.9148566499999995" data-y="1.1024186000000005" cx="253.50330794975545" cy="239.34995906700078" r="3" fill="hsl(246, 100%, 50%, 0.8)" />
|
|
6
|
+
</g>
|
|
7
|
+
<g>
|
|
8
|
+
<circle data-type="point" data-label="C6.2
|
|
9
|
+
y-" data-x="-1.9143099500000003" data-y="0" cx="253.54957777529776" cy="332.6528972353812" r="3" fill="hsl(247, 100%, 50%, 0.8)" />
|
|
10
|
+
</g>
|
|
11
|
+
<g>
|
|
12
|
+
<circle data-type="point" data-label="C1.1
|
|
13
|
+
y+" data-x="-4.173189849999999" data-y="1.1024186000000002" cx="62.36981027183117" cy="239.3499590670008" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<circle data-type="point" data-label="C1.2
|
|
17
|
+
y-" data-x="-4.17264315" data-y="-2.220446049250313e-16" cx="62.41608009737348" cy="332.6528972353812" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
|
|
18
|
+
</g>
|
|
19
|
+
<g>
|
|
20
|
+
<circle data-type="point" data-label="C2.1
|
|
21
|
+
y+" data-x="-3.0440232499999995" data-y="1.1024186000000002" cx="157.93655911079327" cy="239.3499590670008" r="3" fill="hsl(2, 100%, 50%, 0.8)" />
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
24
|
+
<circle data-type="point" data-label="C2.2
|
|
25
|
+
y-" data-x="-3.0434765500000003" data-y="-2.220446049250313e-16" cx="157.98282893633558" cy="332.6528972353812" r="3" fill="hsl(3, 100%, 50%, 0.8)" />
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
<circle data-type="point" data-label="C5.1
|
|
29
|
+
y+" data-x="1.9143099500000003" data-y="0.09999999999999964" cx="577.5839199026265" cy="324.189420823755" r="3" fill="hsl(5, 100%, 50%, 0.8)" />
|
|
30
|
+
</g>
|
|
31
|
+
<g>
|
|
32
|
+
<circle data-type="point" data-label="C5.2
|
|
33
|
+
y-" data-x="1.9148566499999995" data-y="-1.0024186000000008" cx="577.6301897281687" cy="417.4923589921354" r="3" fill="hsl(6, 100%, 50%, 0.8)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g>
|
|
36
|
+
<circle data-type="point" data-label="U1.1
|
|
37
|
+
x-" data-x="-1" data-y="0.2" cx="330.93198472269955" cy="315.7259444121287" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
|
|
38
|
+
</g>
|
|
39
|
+
<g>
|
|
40
|
+
<circle data-type="point" data-label="U1.2
|
|
41
|
+
x-" data-x="-1" data-y="0" cx="330.93198472269955" cy="332.6528972353812" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
|
|
42
|
+
</g>
|
|
43
|
+
<g>
|
|
44
|
+
<circle data-type="point" data-label="U1.3
|
|
45
|
+
x-" data-x="-1" data-y="-0.2" cx="330.93198472269955" cy="349.5798500586337" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
|
|
46
|
+
</g>
|
|
47
|
+
<g>
|
|
48
|
+
<circle data-type="point" data-label="U1.4
|
|
49
|
+
x+" data-x="1" data-y="-0.1" cx="500.20151295522464" cy="341.11637364700744" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
|
|
50
|
+
</g>
|
|
51
|
+
<g>
|
|
52
|
+
<circle data-type="point" data-label="U1.5
|
|
53
|
+
x+" data-x="1" data-y="0.1" cx="500.20151295522464" cy="324.189420823755" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
|
|
54
|
+
</g>
|
|
55
|
+
<g>
|
|
56
|
+
<circle data-type="point" data-label="" data-x="-1.4574283249999997" data-y="1.3024186000000004" cx="292.2176463362275" cy="222.4230062437483" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
57
|
+
</g>
|
|
58
|
+
<g>
|
|
59
|
+
<circle data-type="point" data-label="" data-x="-3.0434765500000003" data-y="-0.2000000000000004" cx="157.98282893633558" cy="349.5798500586337" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
60
|
+
</g>
|
|
61
|
+
<g>
|
|
62
|
+
<circle data-type="point" data-label="" data-x="1.9148566499999995" data-y="-1.0024186000000008" cx="577.6301897281687" cy="417.4923589921354" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
63
|
+
</g>
|
|
64
|
+
<g>
|
|
65
|
+
<circle data-type="point" data-label="" data-x="1.4571549750000001" data-y="0.1" cx="538.8927164289255" cy="324.189420823755" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
66
|
+
</g>
|
|
67
|
+
<g>
|
|
68
|
+
<polyline data-points="-1,0.2 -1.9148566499999995,1.1024186000000005" data-type="line" data-label="" points="330.93198472269955,315.7259444121287 253.50330794975545,239.34995906700078" fill="none" stroke="hsl(248, 100%, 50%, 0.8)" stroke-width="1" />
|
|
69
|
+
</g>
|
|
70
|
+
<g>
|
|
71
|
+
<polyline data-points="-1,0.2 -4.173189849999999,1.1024186000000002" data-type="line" data-label="" points="330.93198472269955,315.7259444121287 62.36981027183117,239.3499590670008" fill="none" stroke="hsl(248, 100%, 50%, 0.8)" stroke-width="1" />
|
|
72
|
+
</g>
|
|
73
|
+
<g>
|
|
74
|
+
<polyline data-points="-1,0.2 -3.0440232499999995,1.1024186000000002" data-type="line" data-label="" points="330.93198472269955,315.7259444121287 157.93655911079327,239.3499590670008" fill="none" stroke="hsl(248, 100%, 50%, 0.8)" stroke-width="1" />
|
|
75
|
+
</g>
|
|
76
|
+
<g>
|
|
77
|
+
<polyline data-points="-1,0 -1.9143099500000003,0" data-type="line" data-label="" points="330.93198472269955,332.6528972353812 253.54957777529776,332.6528972353812" fill="none" stroke="hsl(248, 100%, 50%, 0.8)" stroke-width="1" />
|
|
78
|
+
</g>
|
|
79
|
+
<g>
|
|
80
|
+
<polyline data-points="-1,0 -4.17264315,-2.220446049250313e-16" data-type="line" data-label="" points="330.93198472269955,332.6528972353812 62.41608009737348,332.6528972353812" fill="none" stroke="hsl(248, 100%, 50%, 0.8)" stroke-width="1" />
|
|
81
|
+
</g>
|
|
82
|
+
<g>
|
|
83
|
+
<polyline data-points="-1,0 -3.0434765500000003,-2.220446049250313e-16" data-type="line" data-label="" points="330.93198472269955,332.6528972353812 157.98282893633558,332.6528972353812" fill="none" stroke="hsl(248, 100%, 50%, 0.8)" stroke-width="1" />
|
|
84
|
+
</g>
|
|
85
|
+
<g>
|
|
86
|
+
<polyline data-points="-1,-0.2 -1,0.2" data-type="line" data-label="" points="330.93198472269955,349.5798500586337 330.93198472269955,315.7259444121287" fill="none" stroke="hsl(208, 100%, 50%, 0.8)" stroke-width="1" />
|
|
87
|
+
</g>
|
|
88
|
+
<g>
|
|
89
|
+
<polyline data-points="1,0.1 1.9143099500000003,0.09999999999999964" data-type="line" data-label="" points="500.20151295522464,324.189420823755 577.5839199026265,324.189420823755" fill="none" stroke="hsl(48, 100%, 50%, 0.8)" stroke-width="1" />
|
|
90
|
+
</g>
|
|
91
|
+
<g>
|
|
92
|
+
<polyline data-points="-1.9148566499999995,1.1024186000000005 -4.173189849999999,1.1024186000000002" data-type="line" data-label="" points="253.50330794975545,239.34995906700078 62.36981027183117,239.3499590670008" fill="none" stroke="hsl(71, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
93
|
+
</g>
|
|
94
|
+
<g>
|
|
95
|
+
<polyline data-points="-1.9148566499999995,1.1024186000000005 -3.0440232499999995,1.1024186000000002" data-type="line" data-label="" points="253.50330794975545,239.34995906700078 157.93655911079327,239.3499590670008" fill="none" stroke="hsl(71, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
96
|
+
</g>
|
|
97
|
+
<g>
|
|
98
|
+
<polyline data-points="-1.9148566499999995,1.1024186000000005 -1,0.2" data-type="line" data-label="" points="253.50330794975545,239.34995906700078 330.93198472269955,315.7259444121287" fill="none" stroke="hsl(71, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
99
|
+
</g>
|
|
100
|
+
<g>
|
|
101
|
+
<polyline data-points="-1.9148566499999995,1.1024186000000005 -1,-0.2" data-type="line" data-label="" points="253.50330794975545,239.34995906700078 330.93198472269955,349.5798500586337" fill="none" stroke="hsl(71, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
102
|
+
</g>
|
|
103
|
+
<g>
|
|
104
|
+
<polyline data-points="-4.173189849999999,1.1024186000000002 -3.0440232499999995,1.1024186000000002" data-type="line" data-label="" points="62.36981027183117,239.3499590670008 157.93655911079327,239.3499590670008" fill="none" stroke="hsl(71, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
105
|
+
</g>
|
|
106
|
+
<g>
|
|
107
|
+
<polyline data-points="-4.173189849999999,1.1024186000000002 -1,0.2" data-type="line" data-label="" points="62.36981027183117,239.3499590670008 330.93198472269955,315.7259444121287" fill="none" stroke="hsl(71, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
108
|
+
</g>
|
|
109
|
+
<g>
|
|
110
|
+
<polyline data-points="-4.173189849999999,1.1024186000000002 -1,-0.2" data-type="line" data-label="" points="62.36981027183117,239.3499590670008 330.93198472269955,349.5798500586337" fill="none" stroke="hsl(71, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
111
|
+
</g>
|
|
112
|
+
<g>
|
|
113
|
+
<polyline data-points="-3.0440232499999995,1.1024186000000002 -1,0.2" data-type="line" data-label="" points="157.93655911079327,239.3499590670008 330.93198472269955,315.7259444121287" fill="none" stroke="hsl(71, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
114
|
+
</g>
|
|
115
|
+
<g>
|
|
116
|
+
<polyline data-points="-3.0440232499999995,1.1024186000000002 -1,-0.2" data-type="line" data-label="" points="157.93655911079327,239.3499590670008 330.93198472269955,349.5798500586337" fill="none" stroke="hsl(71, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
117
|
+
</g>
|
|
118
|
+
<g>
|
|
119
|
+
<polyline data-points="-1,0.2 -1,-0.2" data-type="line" data-label="" points="330.93198472269955,315.7259444121287 330.93198472269955,349.5798500586337" fill="none" stroke="hsl(71, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
120
|
+
</g>
|
|
121
|
+
<g>
|
|
122
|
+
<polyline data-points="-1.9143099500000003,0 -4.17264315,-2.220446049250313e-16" data-type="line" data-label="" points="253.54957777529776,332.6528972353812 62.41608009737348,332.6528972353812" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
123
|
+
</g>
|
|
124
|
+
<g>
|
|
125
|
+
<polyline data-points="-1.9143099500000003,0 -3.0434765500000003,-2.220446049250313e-16" data-type="line" data-label="" points="253.54957777529776,332.6528972353812 157.98282893633558,332.6528972353812" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
126
|
+
</g>
|
|
127
|
+
<g>
|
|
128
|
+
<polyline data-points="-1.9143099500000003,0 1.9148566499999995,-1.0024186000000008" data-type="line" data-label="" points="253.54957777529776,332.6528972353812 577.6301897281687,417.4923589921354" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
129
|
+
</g>
|
|
130
|
+
<g>
|
|
131
|
+
<polyline data-points="-1.9143099500000003,0 -1,0" data-type="line" data-label="" points="253.54957777529776,332.6528972353812 330.93198472269955,332.6528972353812" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
132
|
+
</g>
|
|
133
|
+
<g>
|
|
134
|
+
<polyline data-points="-4.17264315,-2.220446049250313e-16 -3.0434765500000003,-2.220446049250313e-16" data-type="line" data-label="" points="62.41608009737348,332.6528972353812 157.98282893633558,332.6528972353812" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
135
|
+
</g>
|
|
136
|
+
<g>
|
|
137
|
+
<polyline data-points="-4.17264315,-2.220446049250313e-16 1.9148566499999995,-1.0024186000000008" data-type="line" data-label="" points="62.41608009737348,332.6528972353812 577.6301897281687,417.4923589921354" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
138
|
+
</g>
|
|
139
|
+
<g>
|
|
140
|
+
<polyline data-points="-4.17264315,-2.220446049250313e-16 -1,0" data-type="line" data-label="" points="62.41608009737348,332.6528972353812 330.93198472269955,332.6528972353812" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
141
|
+
</g>
|
|
142
|
+
<g>
|
|
143
|
+
<polyline data-points="-3.0434765500000003,-2.220446049250313e-16 1.9148566499999995,-1.0024186000000008" data-type="line" data-label="" points="157.98282893633558,332.6528972353812 577.6301897281687,417.4923589921354" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
144
|
+
</g>
|
|
145
|
+
<g>
|
|
146
|
+
<polyline data-points="-3.0434765500000003,-2.220446049250313e-16 -1,0" data-type="line" data-label="" points="157.98282893633558,332.6528972353812 330.93198472269955,332.6528972353812" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
147
|
+
</g>
|
|
148
|
+
<g>
|
|
149
|
+
<polyline data-points="1.9148566499999995,-1.0024186000000008 -1,0" data-type="line" data-label="" points="577.6301897281687,417.4923589921354 330.93198472269955,332.6528972353812" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
150
|
+
</g>
|
|
151
|
+
<g>
|
|
152
|
+
<polyline data-points="1.9143099500000003,0.09999999999999964 1,0.1" data-type="line" data-label="" points="577.5839199026265,324.189420823755 500.20151295522464,324.189420823755" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
153
|
+
</g>
|
|
154
|
+
<g>
|
|
155
|
+
<polyline data-points="-3.0440232499999995,1.1024186000000002 -3.0440232499999995,1.3024186000000004 -4.173189849999999,1.3024186000000004 -4.173189849999999,1.1024186000000002" data-type="line" data-label="" points="157.93655911079327,239.3499590670008 157.93655911079327,222.4230062437483 62.36981027183117,222.4230062437483 62.36981027183117,239.3499590670008" fill="none" stroke="purple" stroke-width="1" />
|
|
156
|
+
</g>
|
|
157
|
+
<g>
|
|
158
|
+
<polyline data-points="-1.9148566499999995,1.1024186000000002 -1.9148566499999995,1.3024186000000004 -3.0440232499999995,1.3024186000000004 -3.0440232499999995,1.1024186000000002" data-type="line" data-label="" points="253.50330794975545,239.3499590670008 253.50330794975545,222.4230062437483 157.93655911079327,222.4230062437483 157.93655911079327,239.3499590670008" fill="none" stroke="purple" stroke-width="1" />
|
|
159
|
+
</g>
|
|
160
|
+
<g>
|
|
161
|
+
<polyline data-points="-1,0.20000000000000018 -1.4574283249999997,0.20000000000000018 -1.4574283249999997,1.3024186000000004 -1.9148566499999995,1.3024186000000004 -1.9148566499999995,1.1024186000000005" data-type="line" data-label="" points="330.93198472269955,315.7259444121287 292.2176463362275,315.7259444121287 292.2176463362275,222.4230062437483 253.50330794975545,222.4230062437483 253.50330794975545,239.34995906700078" fill="none" stroke="purple" stroke-width="1" />
|
|
162
|
+
</g>
|
|
163
|
+
<g>
|
|
164
|
+
<polyline data-points="-1,-0.2 -1.3,-0.2 -1.3,0.2 -1,0.2" data-type="line" data-label="" points="330.93198472269955,349.5798500586337 305.5415554878208,349.5798500586337 305.5415554878208,315.7259444121287 330.93198472269955,315.7259444121287" fill="none" stroke="purple" stroke-width="1" />
|
|
165
|
+
</g>
|
|
166
|
+
<g>
|
|
167
|
+
<polyline data-points="-3.0434765500000003,-2.220446049250313e-16 -3.0434765500000003,-0.2000000000000004 -4.17264315,-0.2000000000000004 -4.17264315,-2.220446049250313e-16" data-type="line" data-label="" points="157.98282893633558,332.6528972353812 157.98282893633558,349.5798500586337 62.41608009737348,349.5798500586337 62.41608009737348,332.6528972353812" fill="none" stroke="purple" stroke-width="1" />
|
|
168
|
+
</g>
|
|
169
|
+
<g>
|
|
170
|
+
<polyline data-points="-1.9143099500000003,-2.220446049250313e-16 -1.9143099500000003,-0.2000000000000004 -3.0434765500000003,-0.2000000000000004 -3.0434765500000003,-2.220446049250313e-16" data-type="line" data-label="" points="253.54957777529776,332.6528972353812 253.54957777529776,349.5798500586337 157.98282893633558,349.5798500586337 157.98282893633558,332.6528972353812" fill="none" stroke="purple" stroke-width="1" />
|
|
171
|
+
</g>
|
|
172
|
+
<g>
|
|
173
|
+
<polyline data-points="-1,0 -1.0999999999999999,0 -1.0999999999999999,-0.09999999999999995 -1.9143099500000003,-0.09999999999999995 -1.9143099500000003,0" data-type="line" data-label="" points="330.93198472269955,332.6528972353812 322.4685083110733,332.6528972353812 322.4685083110733,341.11637364700744 253.54957777529776,341.11637364700744 253.54957777529776,332.6528972353812" fill="none" stroke="purple" stroke-width="1" />
|
|
174
|
+
</g>
|
|
175
|
+
<g>
|
|
176
|
+
<polyline data-points="1,0.1 1.9143099500000003,0.1" data-type="line" data-label="" points="500.20151295522464,324.189420823755 577.5839199026265,324.189420823755" fill="none" stroke="purple" stroke-width="1" />
|
|
177
|
+
</g>
|
|
178
|
+
<g>
|
|
179
|
+
<rect data-type="rect" data-label="schematic_component_0" data-x="-1.9145832999999999" data-y="0.5512093000000002" x="231.13349767792428" y="239.34995906700078" width="44.78589036920462" height="93.30293816838042" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011815475714285715" />
|
|
180
|
+
</g>
|
|
181
|
+
<g>
|
|
182
|
+
<rect data-type="rect" data-label="schematic_component_1" data-x="-4.1729164999999995" data-y="0.5512093" x="40" y="239.3499590670008" width="44.78589036920465" height="93.3029381683804" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011815475714285715" />
|
|
183
|
+
</g>
|
|
184
|
+
<g>
|
|
185
|
+
<rect data-type="rect" data-label="schematic_component_2" data-x="-3.0437499" data-y="0.5512093" x="135.5667488389621" y="239.3499590670008" width="44.78589036920465" height="93.3029381683804" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011815475714285715" />
|
|
186
|
+
</g>
|
|
187
|
+
<g>
|
|
188
|
+
<rect data-type="rect" data-label="schematic_component_3" data-x="1.9145832999999999" data-y="-0.4512093000000006" x="555.2141096307953" y="324.189420823755" width="44.785890369204594" height="93.30293816838042" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011815475714285715" />
|
|
189
|
+
</g>
|
|
190
|
+
<g>
|
|
191
|
+
<rect data-type="rect" data-label="schematic_component_4" data-x="0" data-y="0" x="330.93198472269955" y="298.7989915888762" width="169.2695282325251" height="67.70781129300997" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011815475714285715" />
|
|
192
|
+
</g>
|
|
193
|
+
<g>
|
|
194
|
+
<rect data-type="rect" data-label="" data-x="-1.4574283249999997" data-y="1.5274186000000005" x="283.75416992460123" y="184.33736239143013" width="16.926952823252577" height="38.08564385231816" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011815475714285715" />
|
|
195
|
+
</g>
|
|
196
|
+
<g>
|
|
197
|
+
<rect data-type="rect" data-label="" data-x="-3.0434765500000003" data-y="-0.4250000000000004" x="149.51935252470935" y="349.5798500586337" width="16.926952823252492" height="38.085643852318185" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011815475714285715" />
|
|
198
|
+
</g>
|
|
199
|
+
<g>
|
|
200
|
+
<rect data-type="rect" data-label="" data-x="1.9148566499999995" data-y="-1.2284186000000008" x="569.1667133165424" y="417.5769937562517" width="16.926952823252577" height="38.08564385231813" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011815475714285715" />
|
|
201
|
+
</g>
|
|
202
|
+
<g>
|
|
203
|
+
<rect data-type="rect" data-label="" data-x="1.4571549750000001" data-y="0.325" x="530.4292400172993" y="286.1037769714368" width="16.926952823252464" height="38.085643852318185" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011815475714285715" />
|
|
204
|
+
</g>
|
|
205
|
+
<g id="crosshair" style="display: none">
|
|
206
|
+
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
207
|
+
<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>
|
|
208
|
+
</g>
|
|
209
|
+
<script>
|
|
210
|
+
<![CDATA[
|
|
211
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
212
|
+
const svg = e.currentTarget;
|
|
213
|
+
const rect = svg.getBoundingClientRect();
|
|
214
|
+
const x = e.clientX - rect.left;
|
|
215
|
+
const y = e.clientY - rect.top;
|
|
216
|
+
const crosshair = svg.getElementById('crosshair');
|
|
217
|
+
const h = svg.getElementById('crosshair-h');
|
|
218
|
+
const v = svg.getElementById('crosshair-v');
|
|
219
|
+
const coords = svg.getElementById('coordinates');
|
|
220
|
+
|
|
221
|
+
crosshair.style.display = 'block';
|
|
222
|
+
h.setAttribute('x1', '0');
|
|
223
|
+
h.setAttribute('x2', '640');
|
|
224
|
+
h.setAttribute('y1', y);
|
|
225
|
+
h.setAttribute('y2', y);
|
|
226
|
+
v.setAttribute('x1', x);
|
|
227
|
+
v.setAttribute('x2', x);
|
|
228
|
+
v.setAttribute('y1', '0');
|
|
229
|
+
v.setAttribute('y2', '640');
|
|
230
|
+
|
|
231
|
+
// Calculate real coordinates using inverse transformation
|
|
232
|
+
const matrix = {
|
|
233
|
+
"a": 84.63476411626253,
|
|
234
|
+
"c": 0,
|
|
235
|
+
"e": 415.5667488389621,
|
|
236
|
+
"b": 0,
|
|
237
|
+
"d": -84.63476411626253,
|
|
238
|
+
"f": 332.6528972353812
|
|
239
|
+
};
|
|
240
|
+
// Manually invert and apply the affine transform
|
|
241
|
+
// Since we only use translate and scale, we can directly compute:
|
|
242
|
+
// x' = (x - tx) / sx
|
|
243
|
+
// y' = (y - ty) / sy
|
|
244
|
+
const sx = matrix.a;
|
|
245
|
+
const sy = matrix.d;
|
|
246
|
+
const tx = matrix.e;
|
|
247
|
+
const ty = matrix.f;
|
|
248
|
+
const realPoint = {
|
|
249
|
+
x: (x - tx) / sx,
|
|
250
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
254
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
255
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
256
|
+
});
|
|
257
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
258
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
259
|
+
});
|
|
260
|
+
]]>
|
|
261
|
+
</script>
|
|
262
|
+
</svg>
|