@tscircuit/schematic-trace-solver 0.0.119 → 0.0.121
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.js +156 -52
- package/lib/solvers/AvailableNetOrientationSolver/AvailableNetOrientationSolver.ts +3 -3
- package/lib/solvers/TraceCleanupSolver/sameNetRailAlignment/evaluateRailGroup.ts +79 -59
- package/lib/solvers/TraceCleanupSolver/sameNetRailAlignment/getRailAlignmentFallbackCoordinates.ts +96 -0
- package/lib/utils/doesPathCoincideWithTraces.ts +71 -1
- package/package.json +1 -1
- package/tests/bug-reports/bug-report-20260707T092615Z/__snapshots__/bug-report-20260707T092615Z.snap.svg +3 -3
- package/tests/bug-reports/bug-report-20260728T225606Z/__snapshots__/bug-report-20260728T225606Z.snap.svg +3 -3
- package/tests/repros/__snapshots__/repro-atmega328p-missing-gnd-netlabel.snap.svg +3 -3
- package/tests/repros/__snapshots__/repro-bq25895-cross-net-trace-overlap.snap.svg +101 -0
- package/tests/repros/__snapshots__/repro-ground-label-on-lower-rail-end.snap.svg +58 -0
- package/tests/repros/assets/repro-bq25895-cross-net-trace-overlap.input.json +498 -0
- package/tests/repros/repro-bq25895-cross-net-trace-overlap.test.ts +75 -0
- package/tests/repros/repro-ground-label-on-lower-rail-end.test.ts +84 -0
- package/tests/solvers/TraceCleanupSolver/alignSameNetRails-trace-clearance.test.ts +68 -0
|
@@ -0,0 +1,101 @@
|
|
|
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="-2.2,-0.04999999999999997 -1.7000000000000002,-0.04999999999999982" data-type="line" data-label="" points="356.6961573612885,321.61579672123105 372.8541245735991,321.61579672123105" fill="none" stroke="hsl(96, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-9.65,-3.35 -5.8,-2.65" data-type="line" data-label="" points="115.94244589786001,428.2583803224813 240.3587934326519,405.63722622524637" fill="none" stroke="hsl(280, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-5.8,-2.65 -1.7000000000000002,-2.1000000000000005" data-type="line" data-label="" points="240.3587934326519,405.63722622524637 372.8541245735991,387.8634622917047" fill="none" stroke="hsl(64, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-9.65,-3.55 -1.7000000000000002,-2.3500000000000005" data-type="line" data-label="" points="115.94244589786001,434.72156720740554 372.8541245735991,395.94244589786" fill="none" stroke="hsl(216, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-9.65,-3.75 -1.7000000000000002,-2.6000000000000005" data-type="line" data-label="" points="115.94244589786001,441.1847540923298 372.8541245735991,404.0214295040153" fill="none" stroke="hsl(184, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-4.65,-0.44999999999999996 4.8779125,3.24737545" data-type="line" data-label="" points="277.52211802096633,334.54217049107956 585.4255135744958,215.058027905675" fill="none" stroke="hsl(256, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.7000000000000002,0.5549999999999997 -9.600000000000001,1.0999999999999999" data-type="line" data-label="" points="482.7283016173115,302.0646563943352 117.558242619091,284.4524721329166" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.7000000000000002,0.5549999999999997 -3.4,3.9499999999999997" data-type="line" data-label="" points="482.7283016173115,302.0646563943352 317.91703605174297,192.35205902274598" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.7000000000000002,0.5549999999999997 -6,1.07" data-type="line" data-label="" points="482.7283016173115,302.0646563943352 233.89560654772765,285.42195016565523" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.7000000000000002,0.5549999999999997 -2.7,3.68" data-type="line" data-label="" points="482.7283016173115,302.0646563943352 340.53819014897783,201.0773613173937" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.7000000000000002,0.5549999999999997 -2.8,-0.05000000000000004" data-type="line" data-label="" points="482.7283016173115,302.0646563943352 337.30659670651573,321.61579672123105" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-9.600000000000001,1.0999999999999999 -3.4,3.9499999999999997" data-type="line" data-label="" points="117.558242619091,284.4524721329166 317.91703605174297,192.35205902274598" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-9.600000000000001,1.0999999999999999 -6,1.07" data-type="line" data-label="" points="117.558242619091,284.4524721329166 233.89560654772765,285.42195016565523" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-9.600000000000001,1.0999999999999999 -2.7,3.68" data-type="line" data-label="" points="117.558242619091,284.4524721329166 340.53819014897783,201.0773613173937" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-9.600000000000001,1.0999999999999999 -2.8,-0.05000000000000004" data-type="line" data-label="" points="117.558242619091,284.4524721329166 337.30659670651573,321.61579672123105" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-3.4,3.9499999999999997 -6,1.07" data-type="line" data-label="" points="317.91703605174297,192.35205902274598 233.89560654772765,285.42195016565523" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-3.4,3.9499999999999997 -2.7,3.68" data-type="line" data-label="" points="317.91703605174297,192.35205902274598 340.53819014897783,201.0773613173937" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-3.4,3.9499999999999997 -2.8,-0.05000000000000004" data-type="line" data-label="" points="317.91703605174297,192.35205902274598 337.30659670651573,321.61579672123105" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-6,1.07 -2.7,3.68" data-type="line" data-label="" points="233.89560654772765,285.42195016565523 340.53819014897783,201.0773613173937" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-6,1.07 -2.8,-0.05000000000000004" data-type="line" data-label="" points="233.89560654772765,285.42195016565523 337.30659670651573,321.61579672123105" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.7,3.68 -2.8,-0.05000000000000004" data-type="line" data-label="" points="340.53819014897783,201.0773613173937 337.30659670651573,321.61579672123105" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-9.65,-2.75 -5.8,-2.0500000000000003" data-type="line" data-label="" points="115.94244589786001,408.8688196677085 240.3587934326519,386.2476655704736" fill="none" stroke="hsl(277, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.2,-0.04999999999999997 -1.7000000000000002,-0.04999999999999982" data-type="line" data-label="" points="356.6961573612885,321.61579672123105 372.8541245735991,321.61579672123105" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-5.8,-2.65 -5.8,-3.35 -9.65,-3.35" data-type="line" data-label="" points="240.3587934326519,405.63722622524637 240.3587934326519,428.2583803224813 115.94244589786001,428.2583803224813" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.7000000000000002,-2.1 -3.7499999999999996,-2.1 -3.7499999999999996,-2.85 -5.8,-2.85 -5.8,-2.65" data-type="line" data-label="" points="372.8541245735991,387.86346229170465 306.60645900312556,387.86346229170465 306.60645900312556,412.1004131101706 240.3587934326519,412.1004131101706 240.3587934326519,405.63722622524637" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-9.65,-3.55 -3.5300000000000002,-3.55 -3.5300000000000002,-2.3500000000000005 -1.7000000000000002,-2.3500000000000005" data-type="line" data-label="" points="115.94244589786001,434.72156720740554 313.7159645765422,434.72156720740554 313.7159645765422,395.94244589786 372.8541245735991,395.94244589786" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-9.65,-3.75 -3.33,-3.75 -3.33,-2.6000000000000005 -1.7000000000000002,-2.6000000000000005" data-type="line" data-label="" points="115.94244589786001,441.1847540923298 320.17915146146646,441.1847540923298 320.17915146146646,404.0214295040153 372.8541245735991,404.0214295040153" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.8,-0.05000000000000004 -3.27,-0.05000000000000004 -3.27,-4.17 1.9000000000000004,-4.17 1.9000000000000004,0.5549999999999997 1.7000000000000002,0.5549999999999997" data-type="line" data-label="" points="337.30659670651573,321.61579672123105 322.11810752694373,321.61579672123105 322.11810752694373,454.7574465506707 489.19148850223576,454.7574465506707 489.19148850223576,302.0646563943352 482.7283016173115,302.0646563943352" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.7,3.68 -2.7,3.8800000000000003 -3.27,3.8800000000000003 -3.27,-0.05000000000000004 -2.8,-0.05000000000000004" data-type="line" data-label="" points="340.53819014897783,201.0773613173937 340.53819014897783,194.61417443246944 322.11810752694373,194.61417443246944 322.11810752694373,321.61579672123105 337.30659670651573,321.61579672123105" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-3.4,3.9499999999999997 -2.7,3.9499999999999997 -2.7,3.68" data-type="line" data-label="" points="317.91703605174297,192.35205902274598 340.53819014897783,192.35205902274598 340.53819014897783,201.0773613173937" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-9.600000000000001,1.0999999999999999 -7.800000000000001,1.0999999999999999 -7.800000000000001,0.8700000000000001 -6,0.8700000000000001 -6,1.07" data-type="line" data-label="" points="117.558242619091,284.4524721329166 175.72692458340933,284.4524721329166 175.72692458340933,291.8851370505795 233.89560654772765,291.8851370505795 233.89560654772765,285.42195016565523" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-9.65,-2.75 -7.725,-2.75 -7.725,-1.8500000000000003 -5.8,-1.8500000000000003 -5.8,-2.0500000000000003" data-type="line" data-label="" points="115.94244589786001,408.8688196677085 178.15061966525596,408.8688196677085 178.15061966525596,379.78447868554935 240.3587934326519,379.78447868554935 240.3587934326519,386.2476655704736" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-6,1.07 -6,0.8700000000000001 -3.27,0.8700000000000001 -3.27,-0.050000000000000266 -2.8,-0.050000000000000266" data-type="line" data-label="" points="233.89560654772765,285.42195016565523 233.89560654772765,291.8851370505795 322.11810752694373,291.8851370505795 322.11810752694373,321.61579672123105 337.30659670651573,321.61579672123105" 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="372.8541245735991" y="198.8152459076702" width="109.8741770437124" height="242.3695081846596" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="-10.8" data-y="1.4" x="40.00000000000003" y="258.59972459321955" width="77.558242619091" height="32.31593442462133" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="-4.5" data-y="4.05" x="246.8219803175762" y="179.4256852528975" width="71.0950557341668" height="19.389560654772737" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="-5.9875" data-y="1.45" x="219.35343605664806" y="260.86184000294304" width="29.8922393427747" height="24.560110162712192" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="-2.6375" data-y="3.3" x="325.9960196578983" y="201.0773613173937" width="33.1238327852368" height="24.560110162712192" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="-10.8" data-y="-3.25" x="41.61579672123105" y="402.4056327827842" width="74.32664917662896" height="45.242308194469786" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="schematic_component_6" data-x="-2.5" data-y="-0.05000000000000002" x="337.30659670651573" y="310.6283790168598" width="19.389560654772765" height="21.97483540874248" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="schematic_component_7" data-x="-5.705" data-y="-2.35" x="225.81662294157232" y="386.2476655704736" width="35.22436852283721" height="19.389560654772765" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="schematic_component_8" data-x="-4.495" data-y="-0.75" x="262.9799475298868" y="334.54217049107956" width="39.10228065379181" height="19.389560654772765" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="schematic_component_9" data-x="4.35" data-y="3.25" x="551.30554211062" y="200.9522873405934" width="34.1199714638758" height="28.041851558774994" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="BQ25895RTWR" data-x="-0.6400000000000001" data-y="-3.88" x="385.7804983434477" y="442.4773914693146" width="42.65703344050007" height="5.816868196431869" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="U1" data-x="-1.1800000000000002" data-y="3.865" x="383.84154227797035" y="191.05942164576106" width="11.633736392863682" height="8.078983606155333" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="USB Input" data-x="-11.060000000000002" data-y="0.7699999999999999" x="52.92637376984848" y="292.20829639482577" width="34.90120917859093" height="5.8168681964318125" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="J1" data-x="-11.48" data-y="2.015" x="50.98741770437124" y="250.8439003313105" width="11.633736392863625" height="8.078983606155305" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="Phone OTG" data-x="-4.66" data-y="3.62" x="259.7483540874247" y="200.10788328465506" width="34.90120917859099" height="5.8168681964318125" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="J2" data-x="-5.08" data-y="4.465" x="257.80939802194735" y="171.66986099098835" width="11.633736392863682" height="8.078983606155305" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="Host" data-x="-11.31" data-y="-4.08" x="54.54217049107953" y="448.94057835423894" width="15.511648523818224" height="5.816868196431756" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="J3" data-x="-11.43" data-y="-2.4349999999999996" x="52.60321442560232" y="394.6498085208751" width="11.633736392863682" height="8.078983606155361" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="netId: R4.pin2 to U1.INT
|
|
2
|
+
globalConnNetId: connectivity_net1" data-x="-2.7249999999999996" data-y="-1.875" x="336.49869834590027" y="373.3212918006251" width="6.463186884924255" height="14.54217049107956" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="netId: J3.pin6 to U1.CE
|
|
3
|
+
globalConnNetId: connectivity_net3" data-x="-6.49" data-y="-3.975" x="214.8292052372011" y="441.1847540923298" width="6.463186884924227" height="14.54217049107956" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="netId: R1.pin1 to U1.ILIM
|
|
4
|
+
globalConnNetId: connectivity_net0" data-x="-1.9500000000000002" data-y="0.1750000000000001" x="361.5435475249817" y="307.0736262301515" width="6.463186884924255" height="14.54217049107956" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
5
|
+
globalConnNetId: connectivity_net5" data-x="-3" data-y="-4.38" x="323.08758555968234" y="454.7574465506707" width="15.51164852381828" height="13.572692458340953" fill="#00000066" stroke="#000000" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="netId: VREF
|
|
6
|
+
globalConnNetId: connectivity_net6" data-x="-5.8" data-y="-1.6400000000000003" x="230.66401310526552" y="366.21178622720845" width="19.389560654772765" height="13.572692458340896" fill="#ef444466" stroke="#ef4444" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="netId: R5.pin1 to L1.pin2
|
|
7
|
+
globalConnNetId: connectivity_net4" data-x="-4.65" data-y="-0.22399999999999995" x="274.29052457850423" y="319.9676840655754" width="6.463186884924255" height="14.54217049107956" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.03094448660714286"/></g><g><rect data-type="rect" data-label="netId: R5.pin1 to L1.pin2
|
|
8
|
+
globalConnNetId: connectivity_net4" data-x="5.1039125" data-y="3.24737545" x="585.4578295089203" y="211.82643446321288" width="14.54217049107956" height="6.463186884924255" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.03094448660714286"/></g><g><circle data-type="point" data-label="schematic_port_0
|
|
9
|
+
x-" data-x="-1.7000000000000002" data-y="1.5000000000000004" cx="372.8541245735991" cy="271.52609836306806" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_1
|
|
10
|
+
x-" data-x="-1.7000000000000002" data-y="0.7500000000000004" cx="372.8541245735991" cy="295.76304918153403" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_2
|
|
11
|
+
x-" data-x="-1.7000000000000002" data-y="0.5000000000000004" cx="372.8541245735991" cy="303.84203278768933" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_3
|
|
12
|
+
x-" data-x="-1.7000000000000002" data-y="-0.9500000000000002" cx="372.8541245735991" cy="350.7001377033902" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_4
|
|
13
|
+
x-" data-x="-1.7000000000000002" data-y="-1.8500000000000005" cx="372.8541245735991" cy="379.7844786855494" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_5
|
|
14
|
+
x-" data-x="-1.7000000000000002" data-y="-1.6000000000000005" cx="372.8541245735991" cy="371.70549507939404" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_6
|
|
15
|
+
x-" data-x="-1.7000000000000002" data-y="-2.1000000000000005" cx="372.8541245735991" cy="387.8634622917047" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_7
|
|
16
|
+
x-" data-x="-1.7000000000000002" data-y="-2.3500000000000005" cx="372.8541245735991" cy="395.94244589786" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_8
|
|
17
|
+
x-" data-x="-1.7000000000000002" data-y="-2.6000000000000005" cx="372.8541245735991" cy="404.0214295040153" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_9
|
|
18
|
+
x-" data-x="-1.7000000000000002" data-y="-0.04999999999999982" cx="372.8541245735991" cy="321.61579672123105" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_10
|
|
19
|
+
x+" data-x="1.7000000000000002" data-y="-2.6950000000000003" cx="482.7283016173115" cy="407.09144327435433" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_11
|
|
20
|
+
x+" data-x="1.7000000000000002" data-y="-1.5450000000000004" cx="482.7283016173115" cy="369.92811868603985" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_12
|
|
21
|
+
x+" data-x="1.7000000000000002" data-y="-0.8950000000000005" cx="482.7283016173115" cy="348.92276131003604" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_13
|
|
22
|
+
x+" data-x="1.7000000000000002" data-y="-0.24500000000000055" cx="482.7283016173115" cy="327.9174039340322" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_14
|
|
23
|
+
x+" data-x="1.7000000000000002" data-y="0.5549999999999997" cx="482.7283016173115" cy="302.0646563943352" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_15
|
|
24
|
+
x+" data-x="1.7000000000000002" data-y="2.6950000000000003" cx="482.7283016173115" cy="232.90855672564567" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_16
|
|
25
|
+
x+" data-x="1.7000000000000002" data-y="1.505" cx="482.7283016173115" cy="271.364518690945" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_17
|
|
26
|
+
x+" data-x="1.7000000000000002" data-y="1.255" cx="482.7283016173115" cy="279.4435022971003" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_18
|
|
27
|
+
x-" data-x="-1.7000000000000002" data-y="2.6000000000000005" cx="372.8541245735991" cy="235.97857049598468" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_19
|
|
28
|
+
x+" data-x="-9.600000000000001" data-y="1.7" cx="117.558242619091" cy="265.06291147814386" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_20
|
|
29
|
+
x+" data-x="-9.600000000000001" data-y="1.5" cx="117.558242619091" cy="271.52609836306806" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_21
|
|
30
|
+
x+" data-x="-9.600000000000001" data-y="1.2999999999999998" cx="117.558242619091" cy="277.98928524799237" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_22
|
|
31
|
+
x+" data-x="-9.600000000000001" data-y="1.0999999999999999" cx="117.558242619091" cy="284.4524721329166" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_23
|
|
32
|
+
x+" data-x="-3.4" data-y="4.1499999999999995" cx="317.91703605174297" cy="185.88887213782172" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_24
|
|
33
|
+
x+" data-x="-3.4" data-y="3.9499999999999997" cx="317.91703605174297" cy="192.35205902274598" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_25
|
|
34
|
+
y+" data-x="-6" data-y="1.8299999999999998" cx="233.89560654772765" cy="260.86184000294304" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_26
|
|
35
|
+
y-" data-x="-6" data-y="1.07" cx="233.89560654772765" cy="285.42195016565523" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_27
|
|
36
|
+
y-" data-x="-2.7" data-y="2.9199999999999995" cx="340.53819014897783" cy="225.6374714801059" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_28
|
|
37
|
+
y+" data-x="-2.7" data-y="3.68" cx="340.53819014897783" cy="201.0773613173937" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_29
|
|
38
|
+
x+" data-x="-9.65" data-y="-2.75" cx="115.94244589786001" cy="408.8688196677085" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_30
|
|
39
|
+
x+" data-x="-9.65" data-y="-2.95" cx="115.94244589786001" cy="415.3320065526328" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_31
|
|
40
|
+
x+" data-x="-9.65" data-y="-3.15" cx="115.94244589786001" cy="421.79519343755703" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_32
|
|
41
|
+
x+" data-x="-9.65" data-y="-3.35" cx="115.94244589786001" cy="428.2583803224813" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_33
|
|
42
|
+
x+" data-x="-9.65" data-y="-3.55" cx="115.94244589786001" cy="434.72156720740554" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_34
|
|
43
|
+
x+" data-x="-9.65" data-y="-3.75" cx="115.94244589786001" cy="441.1847540923298" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_35
|
|
44
|
+
x+" data-x="-2.2" data-y="-0.04999999999999997" cx="356.6961573612885" cy="321.61579672123105" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_36
|
|
45
|
+
x-" data-x="-2.8" data-y="-0.05000000000000004" cx="337.30659670651573" cy="321.61579672123105" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_37
|
|
46
|
+
y+" data-x="-5.8" data-y="-2.0500000000000003" cx="240.3587934326519" cy="386.2476655704736" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_38
|
|
47
|
+
y-" data-x="-5.8" data-y="-2.65" cx="240.3587934326519" cy="405.63722622524637" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_39
|
|
48
|
+
y+" data-x="-4.65" data-y="-0.44999999999999996" cx="277.52211802096633" cy="334.54217049107956" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_40
|
|
49
|
+
y-" data-x="-4.65" data-y="-1.05" cx="277.52211802096633" cy="353.9317311458523" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_41
|
|
50
|
+
x-" data-x="3.8220874999999994" data-y="3.2526245499999993" cx="551.30554211062" cy="214.88839833428673" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_42
|
|
51
|
+
x+" data-x="4.8779125" data-y="3.24737545" cx="585.4255135744958" cy="215.058027905675" r="3" fill="hsl(184, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
52
|
+
orientation: y+" data-x="-2.7249999999999996" data-y="-2.1" cx="339.73029178836236" cy="387.86346229170465" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
53
|
+
orientation: y-" data-x="-6.49" data-y="-3.75" cx="218.0607986796632" cy="441.1847540923298" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
54
|
+
orientation: y+" data-x="-1.9500000000000002" data-y="-0.04999999999999989" cx="364.7751409674438" cy="321.61579672123105" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
55
|
+
orientation: y-" data-x="-3" data-y="-4.17" cx="330.8434098215915" cy="454.7574465506707" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
56
|
+
orientation: y+" data-x="-5.8" data-y="-1.8500000000000003" cx="240.3587934326519" cy="379.78447868554935" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
57
|
+
orientation: y+" data-x="-4.65" data-y="-0.44999999999999996" cx="277.52211802096633" cy="334.54217049107956" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
58
|
+
orientation: x+" data-x="4.8779125" data-y="3.24737545" cx="585.4255135744958" cy="215.058027905675" 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[
|
|
59
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
60
|
+
const svg = e.currentTarget;
|
|
61
|
+
const rect = svg.getBoundingClientRect();
|
|
62
|
+
const x = e.clientX - rect.left;
|
|
63
|
+
const y = e.clientY - rect.top;
|
|
64
|
+
const crosshair = svg.getElementById('crosshair');
|
|
65
|
+
const h = svg.getElementById('crosshair-h');
|
|
66
|
+
const v = svg.getElementById('crosshair-v');
|
|
67
|
+
const coords = svg.getElementById('coordinates');
|
|
68
|
+
|
|
69
|
+
crosshair.style.display = 'block';
|
|
70
|
+
h.setAttribute('x1', '0');
|
|
71
|
+
h.setAttribute('x2', '640');
|
|
72
|
+
h.setAttribute('y1', y);
|
|
73
|
+
h.setAttribute('y2', y);
|
|
74
|
+
v.setAttribute('x1', x);
|
|
75
|
+
v.setAttribute('x2', x);
|
|
76
|
+
v.setAttribute('y1', '0');
|
|
77
|
+
v.setAttribute('y2', '640');
|
|
78
|
+
|
|
79
|
+
// Calculate real coordinates using inverse transformation
|
|
80
|
+
const matrix = {"a":32.315934424621275,"c":0,"e":427.7912130954553,"b":0,"d":-32.315934424621275,"f":320};
|
|
81
|
+
// Manually invert and apply the affine transform
|
|
82
|
+
// Since we only use translate and scale, we can directly compute:
|
|
83
|
+
// x' = (x - tx) / sx
|
|
84
|
+
// y' = (y - ty) / sy
|
|
85
|
+
const sx = matrix.a;
|
|
86
|
+
const sy = matrix.d;
|
|
87
|
+
const tx = matrix.e;
|
|
88
|
+
const ty = matrix.f;
|
|
89
|
+
const realPoint = {
|
|
90
|
+
x: (x - tx) / sx,
|
|
91
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
95
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
96
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
97
|
+
});
|
|
98
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
99
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
100
|
+
});
|
|
101
|
+
]]></script></svg>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="1.05,0.2 -1.05,-0.1" data-type="line" data-label="" points="331.8763479511143,334.0570333093698 190.9705248023005,354.1864366163432" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.05,0.2 -2.7,-2" data-type="line" data-label="" points="331.8763479511143,334.0570333093698 80.2588066139468,481.672657560508" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.05,0.2 3.3,-1.5" data-type="line" data-label="" points="331.8763479511143,334.0570333093698 482.8468727534148,448.1236520488857" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.05,0.2 3.3,0" data-type="line" data-label="" points="331.8763479511143,334.0570333093698 482.8468727534148,347.4766355140187" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.05,0.2 4.565,3" data-type="line" data-label="" points="331.8763479511143,334.0570333093698 567.7258566978194,146.18260244428473" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.05,-0.1 -2.7,-2" data-type="line" data-label="" points="190.9705248023005,354.1864366163432 80.2588066139468,481.672657560508" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.05,-0.1 3.3,-1.5" data-type="line" data-label="" points="190.9705248023005,354.1864366163432 482.8468727534148,448.1236520488857" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.05,-0.1 3.3,0" data-type="line" data-label="" points="190.9705248023005,354.1864366163432 482.8468727534148,347.4766355140187" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.05,-0.1 4.565,3" data-type="line" data-label="" points="190.9705248023005,354.1864366163432 567.7258566978194,146.18260244428473" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.7,-2 3.3,-1.5" data-type="line" data-label="" points="80.2588066139468,481.672657560508 482.8468727534148,448.1236520488857" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.7,-2 3.3,0" data-type="line" data-label="" points="80.2588066139468,481.672657560508 482.8468727534148,347.4766355140187" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.7,-2 4.565,3" data-type="line" data-label="" points="80.2588066139468,481.672657560508 567.7258566978194,146.18260244428473" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.3,-1.5 3.3,0" data-type="line" data-label="" points="482.8468727534148,448.1236520488857 482.8468727534148,347.4766355140187" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.3,-1.5 4.565,3" data-type="line" data-label="" points="482.8468727534148,448.1236520488857 567.7258566978194,146.18260244428473" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.3,0 4.565,3" data-type="line" data-label="" points="482.8468727534148,347.4766355140187 567.7258566978194,146.18260244428473" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.3,0 3.5,0 3.5,-1.5 3.3,-1.5" data-type="line" data-label="" points="482.8468727534148,347.4766355140187 496.2664749580637,347.4766355140187 496.2664749580637,448.1236520488857 482.8468727534148,448.1236520488857" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.0500000000000005,0.2 1.2500000000000007,0.2 1.2500000000000007,0.7 -1.25,0.7 -1.25,-0.1 -1.05,-0.1" data-type="line" data-label="" points="331.8763479511143,334.0570333093698 345.2959501557633,334.0570333093698 345.2959501557633,300.50802779774745 177.55092259765155,300.50802779774745 177.55092259765155,354.1864366163432 190.9705248023005,354.1864366163432" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.2500000000000007,0.2 1.5400000000000007,0.2 1.5400000000000007,0.199" data-type="line" data-label="" points="345.2959501557633,334.0570333093698 364.7543733525042,334.0570333093698 364.7543733525042,334.124131320393" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.7,-2 -2.459,-2 -2.459,-2.351" data-type="line" data-label="" points="80.2588066139468,481.672657560508 96.42942727054876,481.672657560508 96.42942727054876,505.2240594296669" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.5,-1.5 3.79,-1.5" data-type="line" data-label="" points="496.2664749580637,448.1236520488857 515.7248981548047,448.1236520488857" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="4.565,3 4.806000000000001,3 4.806000000000001,2.649" data-type="line" data-label="" points="567.7258566978194,146.18260244428473 583.8964773544213,146.18260244428473 583.8964773544213,169.7340043134436" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="PWR1" data-x="0" data-y="0" x="190.97052480230047" y="313.92763000239637" width="140.90582314881382" height="67.09801102324468" fill="hsl(238, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01490357142857143"/></g><g><rect data-type="rect" data-label="R7" data-x="-3" data-y="-2" x="40.000000000000014" y="458.85933381260486" width="40.2588066139468" height="45.62664749580637" fill="hsl(77, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01490357142857143"/></g><g><rect data-type="rect" data-label="C6" data-x="3" data-y="-1.5" x="442.58806613946797" y="419.9424874191229" width="40.25880661394683" height="56.36232925952555" fill="hsl(331, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01490357142857143"/></g><g><rect data-type="rect" data-label="C7" data-x="3" data-y="0" x="442.58806613946797" y="319.29547088425596" width="40.25880661394683" height="56.362329259525495" fill="hsl(332, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01490357142857143"/></g><g><rect data-type="rect" data-label="LED1" data-x="4" data-y="3.1325" x="491.90510424155275" y="106.59477594057037" width="75.82075245626658" height="61.39468008626886" fill="hsl(142, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01490357142857143"/></g><g><rect data-type="rect" data-label="netId: gnd
|
|
2
|
+
globalConnNetId: connectivity_net0" data-x="1.5400000000000007" data-y="-0.010999999999999982" x="348.6508507069255" y="334.124131320393" width="32.20704529115744" height="28.181164629762748" fill="#00000066" stroke="#000000" stroke-width="0.01490357142857143"/></g><g><rect data-type="rect" data-label="netId: gnd
|
|
3
|
+
globalConnNetId: connectivity_net0" data-x="-2.459" data-y="-2.561" x="80.32590462497005" y="505.22405942966685" width="32.207045291157414" height="28.181164629762748" fill="#00000066" stroke="#000000" stroke-width="0.01490357142857143"/></g><g><rect data-type="rect" data-label="netId: gnd
|
|
4
|
+
globalConnNetId: connectivity_net0" data-x="3.79" data-y="-1.71" x="499.62137550922597" y="448.1236520488857" width="32.20704529115744" height="28.181164629762804" fill="#00000066" stroke="#000000" stroke-width="0.01490357142857143"/></g><g><rect data-type="rect" data-label="netId: gnd
|
|
5
|
+
globalConnNetId: connectivity_net0" data-x="4.806000000000001" data-y="2.439" x="567.7929547088427" y="169.7340043134436" width="32.20704529115733" height="28.181164629762748" fill="#00000066" stroke="#000000" stroke-width="0.01490357142857143"/></g><g><circle data-type="point" data-label="PWR1.EP
|
|
6
|
+
x+" data-x="1.05" data-y="0.2" cx="331.8763479511143" cy="334.0570333093698" r="3" fill="hsl(43, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="PWR1.GND
|
|
7
|
+
x-" data-x="-1.05" data-y="-0.1" cx="190.9705248023005" cy="354.1864366163432" r="3" fill="hsl(21, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R7.2
|
|
8
|
+
x+" data-x="-2.7" data-y="-2" cx="80.2588066139468" cy="481.672657560508" r="3" fill="hsl(233, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C6.neg
|
|
9
|
+
x+" data-x="3.3" data-y="-1.5" cx="482.8468727534148" cy="448.1236520488857" r="3" fill="hsl(181, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C7.neg
|
|
10
|
+
x+" data-x="3.3" data-y="0" cx="482.8468727534148" cy="347.4766355140187" r="3" fill="hsl(302, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="LED1.neg
|
|
11
|
+
x+" data-x="4.565" data-y="3" cx="567.7258566978194" cy="146.18260244428473" r="3" fill="hsl(352, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
12
|
+
orientation: y-" data-x="1.5400000000000007" data-y="0.199" cx="364.7543733525042" cy="334.124131320393" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
13
|
+
orientation: y-" data-x="-2.459" data-y="-2.351" cx="96.42942727054876" cy="505.2240594296669" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
14
|
+
orientation: y-" data-x="3.79" data-y="-1.5" cx="515.7248981548047" cy="448.1236520488857" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
15
|
+
orientation: y-" data-x="4.806000000000001" data-y="2.649" cx="583.8964773544213" cy="169.7340043134436" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
|
|
16
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
17
|
+
const svg = e.currentTarget;
|
|
18
|
+
const rect = svg.getBoundingClientRect();
|
|
19
|
+
const x = e.clientX - rect.left;
|
|
20
|
+
const y = e.clientY - rect.top;
|
|
21
|
+
const crosshair = svg.getElementById('crosshair');
|
|
22
|
+
const h = svg.getElementById('crosshair-h');
|
|
23
|
+
const v = svg.getElementById('crosshair-v');
|
|
24
|
+
const coords = svg.getElementById('coordinates');
|
|
25
|
+
|
|
26
|
+
crosshair.style.display = 'block';
|
|
27
|
+
h.setAttribute('x1', '0');
|
|
28
|
+
h.setAttribute('x2', '640');
|
|
29
|
+
h.setAttribute('y1', y);
|
|
30
|
+
h.setAttribute('y2', y);
|
|
31
|
+
v.setAttribute('x1', x);
|
|
32
|
+
v.setAttribute('x2', x);
|
|
33
|
+
v.setAttribute('y1', '0');
|
|
34
|
+
v.setAttribute('y2', '640');
|
|
35
|
+
|
|
36
|
+
// Calculate real coordinates using inverse transformation
|
|
37
|
+
const matrix = {"a":67.09801102324467,"c":0,"e":261.4234363767074,"b":0,"d":-67.09801102324467,"f":347.4766355140187};
|
|
38
|
+
// Manually invert and apply the affine transform
|
|
39
|
+
// Since we only use translate and scale, we can directly compute:
|
|
40
|
+
// x' = (x - tx) / sx
|
|
41
|
+
// y' = (y - ty) / sy
|
|
42
|
+
const sx = matrix.a;
|
|
43
|
+
const sy = matrix.d;
|
|
44
|
+
const tx = matrix.e;
|
|
45
|
+
const ty = matrix.f;
|
|
46
|
+
const realPoint = {
|
|
47
|
+
x: (x - tx) / sx,
|
|
48
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
52
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
53
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
54
|
+
});
|
|
55
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
56
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
57
|
+
});
|
|
58
|
+
]]></script></svg>
|