@tscircuit/schematic-trace-solver 0.0.162 → 0.0.164
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/dist/index.d.ts +2 -1
- package/dist/index.js +21 -6
- package/lib/solvers/AvailableNetOrientationSolver/AvailableNetOrientationSolver.ts +21 -3
- package/lib/solvers/AvailableNetOrientationSolver/types.ts +1 -0
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2.ts +15 -4
- package/package.json +1 -1
- package/tests/bug-reports/bug-report-20260730T061837Z/__snapshots__/bug-report-20260730T061837Z.snap.svg +166 -166
- package/tests/repros/__snapshots__/board-1273-trace-overlap-cycle.snap.svg +26 -26
- package/tests/repros/__snapshots__/repro-isolated-rs485-isow7841.snap.svg +308 -0
- package/tests/repros/__snapshots__/repro-normal-net-label-branch-from-junction.snap.svg +93 -0
- package/tests/repros/__snapshots__/repro-pmp11282-endpoint-trace-through-component-text.snap.svg +76 -0
- package/tests/repros/__snapshots__/repro-pmp11282-isolated-dcdc.snap.svg +131 -113
- package/tests/repros/__snapshots__/repro-tida010076-page02.snap.svg +1681 -1690
- package/tests/repros/assets/repro-isolated-rs485-isow7841.input.json +1992 -0
- package/tests/repros/repro-isolated-rs485-isow7841.test.ts +21 -0
- package/tests/repros/repro-normal-net-label-branch-from-junction.test.ts +73 -0
- package/tests/repros/repro-pmp11282-endpoint-trace-through-component-text.test.ts +82 -0
- package/tests/repros/repro-pmp11282-isolated-dcdc.test.ts +5 -5
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<svg width="1200" height="2016" viewBox="0 0 1200 2016" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on top and Circuit JSON schematic on the bottom">
|
|
2
|
+
<g transform="translate(0, 0) scale(1.875, 1.875) translate(0, 0)">
|
|
3
|
+
<rect width="100%" height="100%" fill="white"/><g><polyline data-points="-6.7,-19 -4.7,-19" data-type="line" data-label="" points="261.6314199395772,335.8418017028289 569.2392199945072,335.8418017028289" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-6.7,-19 -6.5,-19 -6.5,-19.525 -4.5,-19.525 -4.5,-19 -4.7,-19" data-type="line" data-label="" points="261.6314199395772,335.8418017028289 292.39219994507016,335.8418017028289 292.39219994507016,416.588849217248 600.0000000000001,416.588849217248 600.0000000000001,335.8418017028289 569.2392199945072,335.8418017028289" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-6.5,-19 -6.5,-19.05 -6.34,-19.05 -6.34,-18.749" data-type="line" data-label="" points="292.39219994507016,335.8418017028289 292.39219994507016,343.53199670420236 317.0008239494646,343.53199670420236 317.0008239494646,297.237022795935" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="R8" data-x="-7" data-y="-19" x="169.34907992309832" y="285.8555341939027" width="92.28234001647888" height="99.97253501785235" fill="hsl(78, 100%, 50%, 0.8)" stroke="black" stroke-width="0.006501785714285714"/></g><g><rect data-type="rect" data-label="R7" data-x="-5" data-y="-19" x="476.9568799780281" y="285.8555341939027" width="92.282340016479" height="99.97253501785235" fill="hsl(77, 100%, 50%, 0.8)" stroke="black" stroke-width="0.006501785714285714"/></g><g><rect data-type="rect" data-label="netId: U1_IO22
|
|
4
|
+
globalConnNetId: connectivity_net1" data-x="-7.721" data-y="-19" x="40.00000000000034" y="303.54298269706123" width="129.1952760230704" height="64.59763801153531" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.006501785714285714"/></g><g><rect data-type="rect" data-label="netId: V3V3
|
|
5
|
+
globalConnNetId: connectivity_net0" data-x="-6.34" data-y="-18.509" x="284.7020049436969" y="223.41115078275243" width="64.59763801153531" height="73.82587201318256" fill="#ef444466" stroke="#ef4444" stroke-width="0.006501785714285714"/></g><g><rect data-type="rect" data-label="netId: U1_IO21
|
|
6
|
+
globalConnNetId: connectivity_net2" data-x="-5.801" data-y="-19" x="322.99917605053565" y="303.54298269706123" width="153.80390002746503" height="64.59763801153531" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.006501785714285714"/></g><g><circle data-type="point" data-label="R8.pin1
|
|
7
|
+
x-" data-x="-7.3" data-y="-19" cx="169.34907992309832" cy="335.8418017028289" r="3" fill="hsl(140, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R8.pin2
|
|
8
|
+
x+" data-x="-6.7" data-y="-19" cx="261.6314199395772" cy="335.8418017028289" r="3" fill="hsl(141, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R7.pin1
|
|
9
|
+
x-" data-x="-5.3" data-y="-19" cx="476.95687997802816" cy="335.8418017028289" r="3" fill="hsl(349, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R7.pin2
|
|
10
|
+
x+" data-x="-4.7" data-y="-19" cx="569.2392199945072" cy="335.8418017028289" r="3" fill="hsl(350, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
11
|
+
orientation: x-" data-x="-7.3" data-y="-19" cx="169.34907992309832" cy="335.8418017028289" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
12
|
+
orientation: y+" data-x="-6.34" data-y="-18.749" cx="317.0008239494646" cy="297.237022795935" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
13
|
+
orientation: x-" data-x="-5.3" data-y="-19" cx="476.95687997802816" cy="335.8418017028289" 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":153.80390002746498,"c":0,"e":1292.1175501235925,"b":0,"d":-153.80390002746498,"f":-2586.4322988190056};
|
|
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>
|
|
57
|
+
</g>
|
|
58
|
+
<g transform="translate(0, 1216)">
|
|
59
|
+
<style>
|
|
60
|
+
.boundary { fill: rgb(245, 241, 237); }
|
|
61
|
+
.schematic-boundary { fill: none; stroke: #fff; }
|
|
62
|
+
.component { fill: none; stroke: rgb(132, 0, 0); }
|
|
63
|
+
.chip { fill: rgb(255, 255, 194); stroke: rgb(132, 0, 0); }
|
|
64
|
+
.component-pin { fill: none; stroke: rgb(132, 0, 0); }
|
|
65
|
+
.text { font-family: sans-serif; fill: rgb(0, 150, 0); }
|
|
66
|
+
.pin-number { fill: rgb(169, 0, 0); }
|
|
67
|
+
.port-label { fill: rgb(0, 100, 100); }
|
|
68
|
+
.component-name { fill: rgb(0, 100, 100); }
|
|
69
|
+
|
|
70
|
+
</style><rect class="boundary" x="0" y="0" width="1200" height="800"/><g class="trace sch-trace" data-layer="base" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_0__stack1"><path d="M 500.98568079765005 434.0441155701001 L 551.8230858305501 434.0441155701001 L 551.8230858305501 567.4923037814624 L 1060.1971361595502 567.4923037814624 L 1060.1971361595502 434.0441155701001 L 1009.3597311266501 434.0441155701001" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="40.669924026320004px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 500.98568079765005 434.0441155701001 L 551.8230858305501 434.0441155701001 L 551.8230858305501 567.4923037814624 L 1060.1971361595502 567.4923037814624 L 1060.1971361595502 434.0441155701001 L 1009.3597311266501 434.0441155701001" stroke="rgb(0, 150, 0)" fill="none" stroke-width="5.0837405032900005px" stroke-linecap="round" stroke-linejoin="round"/></g><g class="trace sch-trace" data-layer="base" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_1__stack1"><path d="M 551.8230858305501 434.0441155701001 L 551.8230858305501 446.75346682832514 L 592.49300985687 446.75346682832514 L 592.49300985687 370.24317225381037" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="40.669924026320004px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 551.8230858305501 434.0441155701001 L 551.8230858305501 446.75346682832514 L 592.49300985687 446.75346682832514 L 592.49300985687 370.24317225381037" stroke="rgb(0, 150, 0)" fill="none" stroke-width="5.0837405032900005px" stroke-linecap="round" stroke-linejoin="round"/></g><g class="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_0__stack1"><circle cx="551.8230858305501" cy="434.0441155701001" r="7.625610754935" class="trace-junction sch-trace-junction" fill="rgb(0, 150, 0)"/></g><g class="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_1__stack1"/><g class="sch-component" data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_0__stack1"><rect class="component-overlay sch-component-overlay" x="348.4734656989501" y="413.7142372974434" width="152.51221509869993" height="40.65975654531337" fill="transparent"/><path class="sch-component-symbol-path" d="M 348.4734656989501 434.0441155701001 L 373.8972519559034 434.0441155701001" stroke="rgb(132, 0, 0)" fill="none" stroke-width="5.0837405032900005px" stroke-linecap="round"/><path class="sch-component-symbol-path" d="M 475.56189454069676 434.0441155701001 L 500.98568079765005 434.0441155701001" stroke="rgb(132, 0, 0)" fill="none" stroke-width="5.0837405032900005px" stroke-linecap="round"/><path class="sch-component-symbol-path" d="M 373.8972519559034 413.7142372974434 L 475.56189454069676 413.7142372974434 L 475.56189454069676 454.37399384275676 L 373.8972519559034 454.37399384275676 L 373.8972519559034 413.7142372974434" stroke="rgb(132, 0, 0)" fill="none" stroke-width="5.0837405032900005px" stroke-linecap="round"/><text class="sch-component-name sch-component-text" x="424.7295732483001" y="393.3741915437801" stroke="rgb(245, 241, 237)" stroke-width="5.0837405032900005px" paint-order="stroke" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="ideographic" font-size="45.75366452961px">R8</text><text class="sch-component-text" x="424.7295732483001" y="474.71403959642004" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="hanging" font-size="45.75366452961px"></text><circle class="component-pin sch-component-pin" cx="348.4734656989501" cy="434.0441155701001" r="5.0837405032900005px" stroke-width="5.0837405032900005px" fill="none" stroke="rgb(132, 0, 0)"/></g><g class="sch-component" data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_1__stack1"><rect class="component-overlay sch-component-overlay" x="856.8475160279502" y="413.7142372974434" width="152.51221509869993" height="40.65975654531337" fill="transparent"/><path class="sch-component-symbol-path" d="M 856.8475160279502 434.0441155701001 L 882.2713022849034 434.0441155701001" stroke="rgb(132, 0, 0)" fill="none" stroke-width="5.0837405032900005px" stroke-linecap="round"/><path class="sch-component-symbol-path" d="M 983.9359448696969 434.0441155701001 L 1009.3597311266501 434.0441155701001" stroke="rgb(132, 0, 0)" fill="none" stroke-width="5.0837405032900005px" stroke-linecap="round"/><path class="sch-component-symbol-path" d="M 882.2713022849034 413.7142372974434 L 983.9359448696969 413.7142372974434 L 983.9359448696969 454.37399384275676 L 882.2713022849034 454.37399384275676 L 882.2713022849034 413.7142372974434" stroke="rgb(132, 0, 0)" fill="none" stroke-width="5.0837405032900005px" stroke-linecap="round"/><text class="sch-component-name sch-component-text" x="933.1036235773001" y="393.3741915437801" stroke="rgb(245, 241, 237)" stroke-width="5.0837405032900005px" paint-order="stroke" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="ideographic" font-size="45.75366452961px">R7</text><text class="sch-component-text" x="933.1036235773001" y="474.71403959642004" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="hanging" font-size="45.75366452961px"></text><circle class="component-pin sch-component-pin" cx="856.8475160279502" cy="434.0441155701001" r="5.0837405032900005px" stroke-width="5.0837405032900005px" fill="none" stroke="rgb(132, 0, 0)"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_0__stack1"><circle cx="348.4734656989501" cy="434.0441155701001" r="10.167481006580001" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_1__stack1"><circle cx="500.98568079765005" cy="434.0441155701001" r="10.167481006580001" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_1_0__stack1"><circle cx="856.8475160279502" cy="434.0441155701001" r="10.167481006580001" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_1_1__stack1"><circle cx="1009.3597311266501" cy="434.0441155701001" r="10.167481006580001" fill="red" opacity="0"/></g><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_0__stack1" d="
|
|
71
|
+
M 348.4734656989501,434.0441155701001
|
|
72
|
+
L 334.7473663400671,459.4628180865501
|
|
73
|
+
L 127.09351258234827,459.46281808655004
|
|
74
|
+
L 127.09351258234827,408.62541305365005
|
|
75
|
+
L 334.7473663400671,408.62541305365005
|
|
76
|
+
Z
|
|
77
|
+
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="5.0837405032900005px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_0__stack1" x="325.59663343414513" y="434.0441155701001" fill="rgb(132, 0, 0)" text-anchor="end" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="45.75366452961px" transform="">U1_IO22</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_1__stack1" d="
|
|
78
|
+
M 592.49300985687,370.24317225381037
|
|
79
|
+
L 567.07430734042,356.51707289492737
|
|
80
|
+
L 567.07430734042,219.79834495978162
|
|
81
|
+
L 617.91171237332,219.79834495978162
|
|
82
|
+
L 617.91171237332,356.51707289492737
|
|
83
|
+
Z
|
|
84
|
+
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="5.0837405032900005px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_1__stack1" x="592.49300985687" y="347.3663399890054" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="45.75366452961px" transform="rotate(-90 592.49300985687 347.3663399890054)">V3V3</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_2__stack1" d="
|
|
85
|
+
M 856.8475160279502,434.0441155701001
|
|
86
|
+
L 843.1214166690672,459.4628180865501
|
|
87
|
+
L 635.4675629113483,459.46281808655004
|
|
88
|
+
L 635.4675629113483,408.62541305365005
|
|
89
|
+
L 843.1214166690672,408.62541305365005
|
|
90
|
+
Z
|
|
91
|
+
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="5.0837405032900005px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_2__stack1" x="833.9706837631452" y="434.0441155701001" fill="rgb(132, 0, 0)" text-anchor="end" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="45.75366452961px" transform="">U1_IO21</text>
|
|
92
|
+
</g>
|
|
93
|
+
</svg>
|
package/tests/repros/__snapshots__/repro-pmp11282-endpoint-trace-through-component-text.snap.svg
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<svg width="1200" height="2016" viewBox="0 0 1200 2016" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on top and Circuit JSON schematic on the bottom">
|
|
2
|
+
<g transform="translate(0, 0) scale(1.875, 1.875) translate(0, 0)">
|
|
3
|
+
<rect width="100%" height="100%" fill="white"/><g><polyline data-points="-0.3094999999999999,-2.0075 -0.9035,-2.0075 -0.9035,-2.8125 -3.9875000000000003,-2.8125 -3.9875000000000003,-1.7425 -3.7875,-1.7425" data-type="line" data-label="" points="483.8487231979313,326.03383256114637 412.16679237151175,326.03383256114637 412.16679237151175,423.1785367956039 40,423.1785367956039 40,294.0545199870703 64.13533024458576,294.0545199870703" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U503" data-x="-2.7375" data-y="-1.6425" x="64.13533024458573" y="245.7838594978989" width="253.42096756815005" height="72.40599073375719" fill="hsl(267, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008286607142857144"/></g><g><rect data-type="rect" data-label="TP502" data-x="0.17175" data-y="-2.0075" x="483.84872319793135" y="313.9661674388535" width="116.15127680206871" height="24.13533024458576" fill="hsl(75, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008286607142857144"/></g><g><rect data-type="rect" data-label="PC817X4NSZ0F" data-x="-2.6675" data-y="-2.0725" x="112.40599073375719" y="323.0169162805731" width="173.7743777610171" height="21.721797220127144" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.008286607142857144"/></g><g><rect data-type="rect" data-label="U503" data-x="-3.1475" data-y="-1.2275" x="105.16539166038149" y="216.82146320439608" width="72.40599073375711" height="30.169162805732128" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.008286607142857144"/></g><g><rect data-type="rect" data-label="netId: TP502.pin1 to U503.pin2
|
|
4
|
+
globalConnNetId: connectivity_net0" data-x="-0.6064999999999999" data-y="-1.7824999999999998" x="435.94009266242864" y="271.7293395108286" width="24.135330244585703" height="54.30449305031783" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008286607142857144"/></g><g><circle data-type="point" data-label="U503.pin1
|
|
5
|
+
x-" data-x="-3.7875" data-y="-1.5425" cx="64.13533024458576" cy="269.9191897424846" r="3" fill="hsl(239, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U503.pin2
|
|
6
|
+
x-" data-x="-3.7875" data-y="-1.7425" cx="64.13533024458576" cy="294.0545199870703" r="3" fill="hsl(240, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U503.pin3
|
|
7
|
+
x+" data-x="-1.6874999999999996" data-y="-1.7425" cx="317.5562978127358" cy="294.0545199870703" r="3" fill="hsl(241, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U503.pin4
|
|
8
|
+
x+" data-x="-1.6874999999999996" data-y="-1.5425" cx="317.5562978127358" cy="269.9191897424846" r="3" fill="hsl(242, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="TP502.pin1
|
|
9
|
+
x-" data-x="-0.3095" data-y="-2.0075" cx="483.8487231979313" cy="326.03383256114637" r="3" fill="hsl(47, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
10
|
+
orientation: y+" data-x="-0.6064999999999999" data-y="-2.0075" cx="448.0077577847215" cy="326.03383256114637" 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[
|
|
11
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
12
|
+
const svg = e.currentTarget;
|
|
13
|
+
const rect = svg.getBoundingClientRect();
|
|
14
|
+
const x = e.clientX - rect.left;
|
|
15
|
+
const y = e.clientY - rect.top;
|
|
16
|
+
const crosshair = svg.getElementById('crosshair');
|
|
17
|
+
const h = svg.getElementById('crosshair-h');
|
|
18
|
+
const v = svg.getElementById('crosshair-v');
|
|
19
|
+
const coords = svg.getElementById('coordinates');
|
|
20
|
+
|
|
21
|
+
crosshair.style.display = 'block';
|
|
22
|
+
h.setAttribute('x1', '0');
|
|
23
|
+
h.setAttribute('x2', '640');
|
|
24
|
+
h.setAttribute('y1', y);
|
|
25
|
+
h.setAttribute('y2', y);
|
|
26
|
+
v.setAttribute('x1', x);
|
|
27
|
+
v.setAttribute('x2', x);
|
|
28
|
+
v.setAttribute('y1', '0');
|
|
29
|
+
v.setAttribute('y2', '640');
|
|
30
|
+
|
|
31
|
+
// Calculate real coordinates using inverse transformation
|
|
32
|
+
const matrix = {"a":120.67665122292856,"c":0,"e":521.1981467514277,"b":0,"d":-120.67665122292856,"f":83.77545523111735};
|
|
33
|
+
// Manually invert and apply the affine transform
|
|
34
|
+
// Since we only use translate and scale, we can directly compute:
|
|
35
|
+
// x' = (x - tx) / sx
|
|
36
|
+
// y' = (y - ty) / sy
|
|
37
|
+
const sx = matrix.a;
|
|
38
|
+
const sy = matrix.d;
|
|
39
|
+
const tx = matrix.e;
|
|
40
|
+
const ty = matrix.f;
|
|
41
|
+
const realPoint = {
|
|
42
|
+
x: (x - tx) / sx,
|
|
43
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
47
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
48
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
49
|
+
});
|
|
50
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
51
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
52
|
+
});
|
|
53
|
+
]]></script>
|
|
54
|
+
</g>
|
|
55
|
+
<g transform="translate(0, 1216)">
|
|
56
|
+
<style>
|
|
57
|
+
.boundary { fill: rgb(245, 241, 237); }
|
|
58
|
+
.schematic-boundary { fill: none; stroke: #fff; }
|
|
59
|
+
.component { fill: none; stroke: rgb(132, 0, 0); }
|
|
60
|
+
.chip { fill: rgb(255, 255, 194); stroke: rgb(132, 0, 0); }
|
|
61
|
+
.component-pin { fill: none; stroke: rgb(132, 0, 0); }
|
|
62
|
+
.text { font-family: sans-serif; fill: rgb(0, 150, 0); }
|
|
63
|
+
.pin-number { fill: rgb(169, 0, 0); }
|
|
64
|
+
.port-label { fill: rgb(0, 100, 100); }
|
|
65
|
+
.component-name { fill: rgb(0, 100, 100); }
|
|
66
|
+
|
|
67
|
+
</style><rect class="boundary" x="0" y="0" width="1200" height="800"/><g class="trace sch-trace" data-layer="base" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_0__stack1"><path d="M 929.3584283555862 405.49526033788726 L 798.7910427257159 405.49526033788726 L 798.7910427257159 582.4426432201188 L 120.89572743527867 582.4426432201188 L 120.89572743527867 347.24550075553776 L 164.8578101389387 347.24550075553776" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="35.169666162928px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 929.3584283555862 405.49526033788726 L 798.7910427257159 405.49526033788726 L 798.7910427257159 582.4426432201188 L 120.89572743527867 582.4426432201188 L 120.89572743527867 347.24550075553776 L 164.8578101389387 347.24550075553776" stroke="rgb(0, 150, 0)" fill="none" stroke-width="4.396208270366px" stroke-linecap="round" stroke-linejoin="round"/></g><g class="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_0__stack1"/><g class="sch-component" data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_0__stack1"><rect class="component chip sch-component-body" x="252.78197554625865" y="259.3213353482178" width="285.75353757379014" height="131.88624811097998" stroke-width="4.396208270366px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="252.78197554625865" y="259.3213353482178" width="285.75353757379014" height="131.88624811097998" fill="transparent"/><text class="sch-text" x="395.6587443331538" y="325.2644594037078" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="39.565874433294px" transform="rotate(0, 395.6587443331538, 325.2644594037078)">U503</text><line class="component-pin sch-component-pin sch-port-line" x1="252.78197554625865" y1="303.2834180518778" x2="169.25401840930465" y2="303.2834180518778" stroke-width="4.396208270366px"/><g class="sch-port" data-schematic-port-id="source_port_0_0__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="164.8578101389387" cy="303.2834180518778" r="4.396208270366" stroke-width="4.396208270366px"/><rect x="160.4616018685727" y="298.8872097815118" width="8.792416540732" height="8.792416540732" opacity="0"/></g><text class="pin-number sch-pin-number" x="208.81989284259873" y="298.8872097815118" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="32.971562027745px" transform=""></text><text class="pin-number sch-pin-label" x="274.7630168980887" y="303.2834180518778" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="32.971562027745px" transform="">pin1</text><line class="component-pin sch-component-pin sch-port-line" x1="252.78197554625865" y1="347.24550075553776" x2="164.8578101389387" y2="347.24550075553776" stroke-width="4.396208270366px"/><g class="sch-port" data-schematic-port-id="source_port_0_1__stack1"><rect x="160.4616018685727" y="342.84929248517176" width="8.792416540732" height="8.792416540732" opacity="0"/></g><text class="pin-number sch-pin-number" x="208.81989284259873" y="342.84929248517176" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="32.971562027745px" transform=""></text><text class="pin-number sch-pin-label" x="274.7630168980887" y="347.24550075553776" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="32.971562027745px" transform="">pin2</text><line class="component-pin sch-component-pin sch-port-line" x1="538.5355131200488" y1="347.24550075553776" x2="622.0634702570028" y2="347.24550075553776" stroke-width="4.396208270366px"/><g class="sch-port" data-schematic-port-id="source_port_0_2__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="626.4596785273689" cy="347.24550075553776" r="4.396208270366" stroke-width="4.396208270366px"/><rect x="622.0634702570029" y="342.84929248517176" width="8.792416540732" height="8.792416540732" opacity="0"/></g><text class="pin-number sch-pin-number" x="582.4975958237088" y="342.84929248517176" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="32.971562027745px" transform=""></text><text class="pin-number sch-pin-label" x="516.5544717682188" y="347.24550075553776" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="32.971562027745px" transform="">pin3</text><line class="component-pin sch-component-pin sch-port-line" x1="538.5355131200488" y1="303.2834180518778" x2="622.0634702570028" y2="303.2834180518778" stroke-width="4.396208270366px"/><g class="sch-port" data-schematic-port-id="source_port_0_3__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="626.4596785273689" cy="303.2834180518778" r="4.396208270366" stroke-width="4.396208270366px"/><rect x="622.0634702570029" y="298.8872097815118" width="8.792416540732" height="8.792416540732" opacity="0"/></g><text class="pin-number sch-pin-number" x="582.4975958237088" y="298.8872097815118" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="32.971562027745px" transform=""></text><text class="pin-number sch-pin-label" x="516.5544717682188" y="303.2834180518778" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="32.971562027745px" transform="">pin4</text></g><g class="sch-component" data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_1__stack1"><rect class="component chip sch-component-body" x="1017.2825937629061" y="383.51421898605724" width="35.719192196723725" height="43.96208270366003" stroke-width="4.396208270366px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="1017.2825937629061" y="383.51421898605724" width="35.719192196723725" height="43.96208270366003" fill="transparent"/><text class="sch-text" x="1035.142189861268" y="405.49526033788726" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="21.98104135183px" transform="rotate(0, 1035.142189861268, 405.49526033788726)">TP502</text><line class="component-pin sch-component-pin sch-port-line" x1="1017.2825937629061" y1="405.49526033788726" x2="929.3584283555862" y2="405.49526033788726" stroke-width="4.396208270366px"/><g class="sch-port" data-schematic-port-id="source_port_1_0__stack1"><rect x="924.9622200852202" y="401.09905206752126" width="8.792416540732" height="8.792416540732" opacity="0"/></g><text class="pin-number sch-pin-number" x="973.3205110592461" y="401.09905206752126" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="32.971562027745px" transform=""></text><text class="pin-number sch-pin-label" x="1039.2636351147362" y="405.49526033788726" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="32.971562027745px" transform="">pin1</text></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_0__stack1"><circle cx="164.8578101389387" cy="303.2834180518778" r="8.792416540732" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_1__stack1"><circle cx="164.8578101389387" cy="347.24550075553776" r="8.792416540732" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_2__stack1"><circle cx="626.4596785273689" cy="347.24550075553776" r="8.792416540732" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_3__stack1"><circle cx="626.4596785273689" cy="303.2834180518778" r="8.792416540732" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_1_0__stack1"><circle cx="929.3584283555862" cy="405.49526033788726" r="8.792416540732" fill="red" opacity="0"/></g><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_0__stack1" d="
|
|
68
|
+
M 864.0747355406511,405.49526033788726
|
|
69
|
+
L 842.0936941888211,393.62549800789907
|
|
70
|
+
L 842.0936941888211,318.24518019869004
|
|
71
|
+
L 886.055776892481,318.24518019869004
|
|
72
|
+
L 886.055776892481,393.62549800789907
|
|
73
|
+
Z
|
|
74
|
+
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="4.396208270366px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_0__stack1" x="864.0747355406511" y="385.7123231212403" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="39.565874433294px" transform="rotate(-90 864.0747355406511 385.7123231212403)">XX</text><text class="sch-text" x="411.04547327943476" y="419.7829372165767" fill="#7e22ce" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="39.565874433294px" transform="rotate(0, 411.04547327943476, 419.7829372165767)">PC817X4NSZ0F</text><text class="sch-text" x="305.5364747906507" y="234.04313779361328" fill="#7e22ce" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="39.565874433294px" transform="rotate(0, 305.5364747906507, 234.04313779361328)">U503</text><rect class="schematic-box sch-box" x="252.78197554625865" y="399.99999999992974" width="316.526995466352" height="39.56587443329397" stroke-width="4.396208270366px" stroke="rgb(132, 0, 0)" fill="transparent" stroke-dasharray="35.169666162928 17.584833081464"/><rect class="schematic-box sch-box" x="239.5933507351607" y="206.56683610382578" width="131.8862481109801" height="54.95260337957501" stroke-width="4.396208270366px" stroke="rgb(132, 0, 0)" fill="transparent" stroke-dasharray="35.169666162928 17.584833081464"/>
|
|
75
|
+
</g>
|
|
76
|
+
</svg>
|