@tscircuit/schematic-trace-solver 0.0.149 → 0.0.150
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/.agents/skills/schematic-trace-visualization/SKILL.md +7 -2
- package/dist/index.d.ts +28 -1
- package/dist/index.js +26 -4
- package/lib/solvers/InlineNetLabelSolver/InlineNetLabelSolver.ts +14 -4
- package/lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver.ts +17 -1
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver.ts +2 -0
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/solvePortOnlyPin.ts +2 -0
- package/lib/types/InputProblem.ts +27 -1
- package/package.json +8 -1
- package/tests/bug-reports/bug-report-20260706T213649Z/__snapshots__/bug-report-20260706T213649Z.snap.svg +751 -5
- package/tests/bug-reports/bug-report-20260706T220324Z/__snapshots__/bug-report-20260706T220324Z.snap.svg +660 -5
- package/tests/bug-reports/bug-report-20260707T020342Z/__snapshots__/bug-report-20260707T020342Z.snap.svg +44 -5
- package/tests/bug-reports/bug-report-20260707T092615Z/__snapshots__/bug-report-20260707T092615Z.snap.svg +394 -5
- package/tests/bug-reports/bug-report-20260707T134549Z/__snapshots__/bug-report-20260707T134549Z.snap.svg +170 -5
- package/tests/bug-reports/bug-report-20260707T134722Z/__snapshots__/bug-report-20260707T134722Z.snap.svg +79 -5
- package/tests/bug-reports/bug-report-20260707T140410Z/__snapshots__/bug-report-20260707T140410Z.snap.svg +219 -5
- package/tests/bug-reports/bug-report-20260707T141025Z/__snapshots__/bug-report-20260707T141025Z.snap.svg +65 -5
- package/tests/bug-reports/bug-report-20260707T141421Z/__snapshots__/bug-report-20260707T141421Z.snap.svg +142 -5
- package/tests/bug-reports/bug-report-20260707T230831Z/__snapshots__/bug-report-20260707T230831Z.snap.svg +100 -5
- package/tests/bug-reports/bug-report-20260708T053736Z/__snapshots__/bug-report-20260708T053736Z.snap.svg +23 -5
- package/tests/bug-reports/bug-report-20260708T055430Z/__snapshots__/bug-report-20260708T055430Z.snap.svg +58 -5
- package/tests/bug-reports/bug-report-20260708T095725Z/__snapshots__/bug-report-20260708T095725Z.snap.svg +86 -5
- package/tests/bug-reports/bug-report-20260716T144856Z/__snapshots__/bug-report-20260716T144856Z.snap.svg +226 -5
- package/tests/bug-reports/bug-report-20260717T022934Z/__snapshots__/bug-report-20260717T022934Z.snap.svg +191 -5
- package/tests/bug-reports/bug-report-20260717T031704Z/__snapshots__/bug-report-20260717T031704Z.snap.svg +30 -5
- package/tests/bug-reports/bug-report-20260717T042845Z/__snapshots__/bug-report-20260717T042845Z.snap.svg +37 -5
- package/tests/bug-reports/bug-report-20260721T221026Z/__snapshots__/bug-report-20260721T221026Z.snap.svg +580 -2
- package/tests/bug-reports/bug-report-20260724T175257Z/__snapshots__/bug-report-20260724T175257Z.snap.svg +44 -5
- package/tests/bug-reports/bug-report-20260728T144234Z/__snapshots__/bug-report-20260728T144234Z.snap.svg +107 -5
- package/tests/bug-reports/bug-report-20260728T225606Z/__snapshots__/bug-report-20260728T225606Z.snap.svg +114 -5
- package/tests/bug-reports/bug-report-20260730T061837Z/__snapshots__/bug-report-20260730T061837Z.snap.svg +121 -5
- package/tests/bug-reports/bug-report-20260731T052229Z/__snapshots__/bug-report-20260731T052229Z.snap.svg +51 -5
- package/tests/bug-reports/bug-report-20260804T095800Z/__snapshots__/bug-report-20260804T095800Z.snap.svg +212 -5
- package/tests/bug-reports/bug-report-20260804T171919Z/__snapshots__/bug-report-20260804T171919Z.snap.svg +569 -5
- package/tests/bug-reports/bug-report-20260804T225912Z/__snapshots__/bug-report-20260804T225912Z.snap.svg +37 -5
- package/tests/bug-reports/bug-report-20260805T061316Z/__snapshots__/bug-report-20260805T061316Z.snap.svg +289 -5
- package/tests/bug-reports/bug-report-20260806T061548Z/__snapshots__/bug-report-20260806T061548Z.snap.svg +289 -5
- package/tests/bug-reports/bug-report-20260806T093501Z/__snapshots__/bug-report-20260806T093501Z.snap.svg +149 -5
- package/tests/bug-reports/bug-report-20260811T075142Z/__snapshots__/bug-report-20260811T075142Z.snap.svg +93 -5
- package/tests/bug-reports/bug-report-20260815T073240Z/__snapshots__/bug-report-20260815T073240Z.snap.svg +79 -5
- package/tests/bug-reports/bug-report-20260819T091818Z/__snapshots__/bug-report-20260819T091818Z.snap.svg +244 -2
- package/tests/examples/__snapshots__/example01.snap.svg +44 -5
- package/tests/examples/__snapshots__/example02.snap.svg +51 -5
- package/tests/examples/__snapshots__/example03.snap.svg +86 -5
- package/tests/examples/__snapshots__/example04.snap.svg +30 -5
- package/tests/examples/__snapshots__/example05.snap.svg +30 -5
- package/tests/examples/__snapshots__/example06.snap.svg +30 -5
- package/tests/examples/__snapshots__/example07.snap.svg +58 -5
- package/tests/examples/__snapshots__/example08.snap.svg +37 -5
- package/tests/examples/__snapshots__/example09.snap.svg +149 -5
- package/tests/examples/__snapshots__/example10.snap.svg +65 -5
- package/tests/examples/__snapshots__/example11.snap.svg +51 -5
- package/tests/examples/__snapshots__/example12.snap.svg +51 -5
- package/tests/examples/__snapshots__/example13.snap.svg +72 -5
- package/tests/examples/__snapshots__/example14.snap.svg +79 -5
- package/tests/examples/__snapshots__/example15.snap.svg +86 -5
- package/tests/examples/__snapshots__/example16.snap.svg +51 -5
- package/tests/examples/__snapshots__/example17.snap.svg +51 -5
- package/tests/examples/__snapshots__/example18.snap.svg +58 -5
- package/tests/examples/__snapshots__/example19.snap.svg +44 -5
- package/tests/examples/__snapshots__/example20.snap.svg +44 -5
- package/tests/examples/__snapshots__/example21.snap.svg +72 -5
- package/tests/examples/__snapshots__/example22.snap.svg +51 -5
- package/tests/examples/__snapshots__/example23.snap.svg +51 -5
- package/tests/examples/__snapshots__/example24.snap.svg +51 -5
- package/tests/examples/__snapshots__/example25.snap.svg +86 -5
- package/tests/examples/__snapshots__/example26.snap.svg +51 -5
- package/tests/examples/__snapshots__/example27.snap.svg +72 -5
- package/tests/examples/__snapshots__/example28.snap.svg +44 -5
- package/tests/examples/__snapshots__/example29.snap.svg +324 -5
- package/tests/examples/__snapshots__/example30.snap.svg +107 -5
- package/tests/examples/__snapshots__/example31.snap.svg +37 -5
- package/tests/examples/__snapshots__/example32.snap.svg +149 -5
- package/tests/examples/__snapshots__/example33.snap.svg +93 -5
- package/tests/examples/__snapshots__/example34.snap.svg +51 -5
- package/tests/examples/__snapshots__/example35.snap.svg +58 -5
- package/tests/examples/__snapshots__/example36.snap.svg +44 -5
- package/tests/examples/__snapshots__/example37.snap.svg +72 -5
- package/tests/examples/__snapshots__/example38.snap.svg +30 -5
- package/tests/examples/__snapshots__/example39.snap.svg +37 -5
- package/tests/examples/__snapshots__/example40.snap.svg +100 -5
- package/tests/examples/__snapshots__/example41.snap.svg +44 -5
- package/tests/examples/__snapshots__/example42.snap.svg +65 -5
- package/tests/examples/__snapshots__/example43.snap.svg +58 -5
- package/tests/examples/__snapshots__/example44.snap.svg +107 -5
- package/tests/examples/__snapshots__/example45.snap.svg +51 -5
- package/tests/examples/__snapshots__/example46.snap.svg +93 -5
- package/tests/examples/__snapshots__/example47.snap.svg +93 -5
- package/tests/examples/__snapshots__/example48.snap.svg +65 -5
- package/tests/examples/__snapshots__/example49.snap.svg +177 -5
- package/tests/examples/__snapshots__/example50.snap.svg +93 -5
- package/tests/examples/__snapshots__/example51.snap.svg +590 -5
- package/tests/fixtures/convertSolverOutputToCircuitJson.test.ts +219 -0
- package/tests/fixtures/convertSolverOutputToCircuitJson.ts +1058 -0
- package/tests/fixtures/matcher.ts +45 -8
- package/tests/repros/__snapshots__/board-1273-trace-overlap-cycle.snap.svg +762 -2
- package/tests/repros/__snapshots__/board-15984-same-net-junction.snap.svg +111 -2
- package/tests/repros/__snapshots__/board1096-usb-label-overlap-iteration.snap.svg +167 -2
- package/tests/repros/__snapshots__/bugreport-001-gnd-overlap.snap.svg +65 -5
- package/tests/repros/__snapshots__/manufacturePartNumber-text-box.snap.svg +30 -5
- package/tests/repros/__snapshots__/netlabel-connector-through-rail-label.snap.svg +79 -5
- package/tests/repros/__snapshots__/repro-atmega328p-fault-pullup.snap.svg +65 -5
- package/tests/repros/__snapshots__/repro-atmega328p-missing-gnd-netlabel.snap.svg +149 -5
- package/tests/repros/__snapshots__/repro-board-589-regulator-section.snap.svg +55 -2
- package/tests/repros/__snapshots__/repro-board-648-esp12f-section.snap.svg +160 -2
- package/tests/repros/__snapshots__/repro-bq24074-battery-charger.snap.svg +135 -5
- package/tests/repros/__snapshots__/repro-bq25895-cross-net-trace-overlap.snap.svg +69 -2
- package/tests/repros/__snapshots__/repro-cc2340r5.snap.svg +86 -5
- package/tests/repros/__snapshots__/repro-core-555-power-cross-net-overlap.snap.svg +44 -5
- package/tests/repros/__snapshots__/repro-core-subcircuit-missing-ground.snap.svg +44 -5
- package/tests/repros/__snapshots__/repro-core-tb67s579ftg-inline-label-routing.snap.svg +30 -5
- package/tests/repros/__snapshots__/repro-example35-minimize-trace-crossing.snap.svg +335 -2
- package/tests/repros/__snapshots__/repro-ground-label-on-lower-rail-end.snap.svg +48 -2
- package/tests/repros/__snapshots__/repro-ina237-current-monitor.snap.svg +149 -5
- package/tests/repros/__snapshots__/repro-missing-trace-netlabel.snap.svg +72 -5
- package/tests/repros/__snapshots__/repro-netlabel-collision-687.snap.svg +100 -5
- package/tests/repros/__snapshots__/repro-netlabel-overlap-trace.snap.svg +51 -5
- package/tests/repros/__snapshots__/repro-nrf52810-clock-routing.snap.svg +90 -2
- package/tests/repros/__snapshots__/repro-power-group-rail-labels.snap.svg +37 -5
- package/tests/repros/__snapshots__/repro-rectifier-trace-overlap.snap.svg +44 -5
- package/tests/repros/__snapshots__/repro-rp2040-gamepad-trace-alignment.snap.svg +237 -2
- package/tests/repros/__snapshots__/repro-rp2040-usb-cc2-ground-overlap.snap.svg +72 -5
- package/tests/repros/__snapshots__/repro-rp2040-v3v3-label-placement.snap.svg +51 -5
- package/tests/repros/__snapshots__/repro-rp2040-zero-crystal-fallback-netlabels.snap.svg +30 -5
- package/tests/repros/__snapshots__/repro-ti-power-output-section.snap.svg +79 -5
- package/tests/repros/__snapshots__/repro-tida010076-j4-ground-bus.snap.svg +27 -2
- package/tests/repros/__snapshots__/repro-tida010076-page02.snap.svg +1150 -5
- package/tests/repros/__snapshots__/repro-tps61222-trace-intersection.snap.svg +51 -5
- package/tests/repros/__snapshots__/repro-type-c-16pin-self-connection.snap.svg +30 -5
- package/tests/repros/__snapshots__/repro-type-c-16pin-to-resistor.snap.svg +30 -5
- package/tests/repros/__snapshots__/repro-type-c-vbus-led-ground-label.snap.svg +44 -5
- package/tests/repros/__snapshots__/repro-usb-power-vbus-label-detour.snap.svg +685 -2
- package/tests/repros/__snapshots__/repro-vcc-pin1-detour.snap.svg +27 -2
- package/tests/repros/__snapshots__/repro129-host-custom-symbol-passives.snap.svg +51 -5
- package/tests/repros/__snapshots__/repro130-bq27441-fuel-gauge-trace-through-c1.snap.svg +100 -5
- package/tests/repros/__snapshots__/repro161-power-section-autolayout.snap.svg +107 -5
- package/tests/repros/__snapshots__/repro47-endpoint-obstacle-detour.snap.svg +51 -5
- package/tests/repros/__snapshots__/repro48-555-timer-vcc-rail-label.snap.svg +104 -2
- package/tests/repros/__snapshots__/repro5-escape-padded-text-obstacles.snap.svg +30 -5
- package/tests/repros/__snapshots__/repro51-overlap-junction-crossing.snap.svg +65 -5
- package/tests/repros/__snapshots__/repro84-stacked-gnd-label-orientation.snap.svg +27 -2
- package/tests/repros/__snapshots__/small-variant-resistor-facing-direction.snap.svg +58 -5
- package/tests/repros/__snapshots__/trace-overlap-box-resistor.snap.svg +37 -5
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/fallback-net-label-width.snap.svg +25 -7
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-anchored-label-clearance.snap.svg +34 -2
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-port-stub.snap.svg +23 -5
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-two-pin-net.snap.svg +23 -5
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label01.snap.svg +23 -5
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label02.snap.svg +23 -5
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/terminal-stub-trace-clearance.snap.svg +23 -5
- package/tests/solvers/InlineNetLabelSolver/fallback-net-label-width.test.ts +10 -1
- package/tests/solvers/SchematicTraceSingleLineSolver2/__snapshots__/SchematicTraceSingleLineSolver2_01-example17-d1_1-u1_1.snap.svg +23 -5
- package/tests/solvers/SchematicTraceSingleLineSolver2/__snapshots__/SchematicTraceSingleLineSolver2_repro47-short-opposing-pins.snap.svg +20 -2
- package/tests/solvers/TraceCleanupSolver/__snapshots__/TraceCleanupSolver.snap.svg +44 -5
- package/tests/solvers/TraceLabelOverlapAvoidanceSolver/__snapshots__/TraceLabelOverlapAvoidanceSolver.snap.svg +79 -5
- package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/MergedNetLabelObstacles.snap.svg +44 -5
- package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/OverlapAvoidanceStepSolver.snap.svg +23 -5
- package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/SingleOverlapSolver.snap.svg +30 -5
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="2416" height="1200" viewBox="0 0 2416 1200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on the left and Circuit JSON schematic on the right">
|
|
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.7,0.2 -1.3290000000000002,0.2" data-type="line" data-label="" points="337.7926421404682,320 219.98662207357856,320" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.7,0.4 -1.3290000000000002,0.4" data-type="line" data-label="" points="337.7926421404682,282.54180602006693 219.98662207357856,282.54180602006693" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.7,0 -1.38,0" data-type="line" data-label="" points="337.7926421404682,357.4581939799331 210.43478260869568,357.4581939799331" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0.2" x="337.79264214046816" y="226.35451505016724" width="262.2073578595318" height="187.29096989966553" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005339285714285715"/></g><g><rect data-type="rect" data-label="netId: D_MINUS
|
|
2
4
|
globalConnNetId: connectivity_net0" data-x="-1.81" data-y="0.4" x="40" y="263.81270903010034" width="179.79933110367892" height="37.45819397993313" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005339285714285715"/></g><g><rect data-type="rect" data-label="netId: D_PLUS
|
|
3
5
|
globalConnNetId: connectivity_net1" data-x="-1.75" data-y="0.2" x="62.474916387959894" y="301.2709030100334" width="157.324414715719" height="37.45819397993313" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005339285714285715"/></g><g><rect data-type="rect" data-label="INLINE netId: SWCLK
|
|
4
6
|
axis: x
|
|
@@ -51,4 +53,34 @@ SWCLK" data-x="-1.04" data-y="0" cx="274.11371237458195" cy="357.4581939799331"
|
|
|
51
53
|
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
52
54
|
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
53
55
|
});
|
|
54
|
-
]]></script
|
|
56
|
+
]]></script>
|
|
57
|
+
</g>
|
|
58
|
+
<g transform="translate(1216, 200)">
|
|
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 701.83582722934 400.00000000004 L 492.9389841141597 400.00000000004" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="53.137511762208px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 701.83582722934 400.00000000004 L 492.9389841141597 400.00000000004" stroke="rgb(0, 150, 0)" fill="none" stroke-width="6.642188970276px" 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 701.83582722934 333.57811029728 L 492.9389841141597 333.57811029728" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="53.137511762208px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 701.83582722934 333.57811029728 L 492.9389841141597 333.57811029728" stroke="rgb(0, 150, 0)" fill="none" stroke-width="6.642188970276px" 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_2__stack1"><path d="M 701.83582722934 466.4218897028 L 476.00140223995606 466.4218897028" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="53.137511762208px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 701.83582722934 466.4218897028 L 476.00140223995606 466.4218897028" stroke="rgb(0, 150, 0)" fill="none" stroke-width="6.642188970276px" 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="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_1__stack1"/><g class="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_2__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="834.67960663486" y="233.94527574314003" width="199.26566910828" height="332.1094485137999" stroke-width="6.642188970276px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="834.67960663486" y="233.94527574314003" width="199.26566910828" height="332.1094485137999" fill="transparent"/><text class="sch-text" x="934.312441189" y="400.00000000004" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="59.779700732483995px" transform="rotate(0, 934.312441189, 400.00000000004)">U1</text><line class="component-pin sch-component-pin sch-port-line" x1="834.67960663486" y1="333.57811029728" x2="701.83582722934" y2="333.57811029728" stroke-width="6.642188970276px"/><g class="sch-port" data-schematic-port-id="source_port_0_0__stack1"><rect x="695.193638259064" y="326.935921327004" width="13.284377940552" height="13.284377940552" opacity="0"/></g><text class="pin-number sch-pin-number" x="768.2577169321" y="326.935921327004" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="49.816417277069995px" transform=""></text><text class="pin-number sch-pin-label" x="867.8905514862399" y="333.57811029728" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="49.816417277069995px" transform="">minus</text><line class="component-pin sch-component-pin sch-port-line" x1="834.67960663486" y1="400.00000000004" x2="701.83582722934" y2="400.00000000004" stroke-width="6.642188970276px"/><g class="sch-port" data-schematic-port-id="source_port_0_1__stack1"><rect x="695.193638259064" y="393.35781102976404" width="13.284377940552" height="13.284377940552" opacity="0"/></g><text class="pin-number sch-pin-number" x="768.2577169321" y="393.357811029764" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="49.816417277069995px" transform=""></text><text class="pin-number sch-pin-label" x="867.8905514862399" y="400.00000000004" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="49.816417277069995px" transform="">plus</text><line class="component-pin sch-component-pin sch-port-line" x1="834.67960663486" y1="466.4218897028" x2="701.83582722934" y2="466.4218897028" stroke-width="6.642188970276px"/><g class="sch-port" data-schematic-port-id="source_port_0_2__stack1"><rect x="695.193638259064" y="459.779700732524" width="13.284377940552" height="13.284377940552" opacity="0"/></g><text class="pin-number sch-pin-number" x="768.2577169321" y="459.779700732524" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="49.816417277069995px" transform=""></text><text class="pin-number sch-pin-label" x="867.8905514862399" y="466.4218897028" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="49.816417277069995px" transform="">swclk</text></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_0__stack1"><circle cx="701.83582722934" cy="333.57811029728" r="13.284377940552" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_1__stack1"><circle cx="701.83582722934" cy="400.00000000004" r="13.284377940552" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_2__stack1"><circle cx="701.83582722934" cy="466.4218897028" r="13.284377940552" 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 492.9389841141597,333.57811029728
|
|
72
|
+
L 475.0050738944145,366.78905514866
|
|
73
|
+
L 166.0547242569769,366.78905514865994
|
|
74
|
+
L 166.0547242569769,300.36716544589996
|
|
75
|
+
L 475.0050738944145,300.36716544589996
|
|
76
|
+
Z
|
|
77
|
+
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="6.642188970276px"/><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="463.0491337479177" y="333.57811029728" fill="rgb(132, 0, 0)" text-anchor="end" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="59.779700732483995px" transform="">XXXXXXX</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 492.9389841141597,400.00000000004
|
|
79
|
+
L 475.0050738944145,433.21094485142004
|
|
80
|
+
L 205.06651414239792,433.21094485142
|
|
81
|
+
L 205.06651414239792,366.78905514866
|
|
82
|
+
L 475.0050738944145,366.78905514866
|
|
83
|
+
Z
|
|
84
|
+
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="6.642188970276px"/><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="463.0491337479177" y="400.00000000004" fill="rgb(132, 0, 0)" text-anchor="end" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="59.779700732483995px" transform="">XXXXXX</text><text class="sch-text" x="588.9186147346479" y="429.889850366282" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="39.853133821655994px" transform="rotate(0, 588.9186147346479, 429.889850366282)">XXXXX</text>
|
|
85
|
+
</g>
|
|
86
|
+
</svg>
|
package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-port-stub.snap.svg
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="2416" height="1200" viewBox="0 0 2416 1200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on the left and Circuit JSON schematic on the right">
|
|
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.5,0.3 -2.3499999999999996,0.3" data-type="line" data-label="" points="262.79569892473114,271.8279569892473 40,271.8279569892473" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,-0.2 2.3,-0.2" data-type="line" data-label="" points="383.2258064516129,332.04301075268813 600,332.04301075268813" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.5,-0.1 -2.3499999999999996,-0.1" data-type="line" data-label="" points="262.79569892473114,320 40,320" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.2,0.5 -0.2,1.45" data-type="line" data-label="" points="298.9247311827957,247.74193548387095 298.9247311827957,133.33333333333331" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.2,-0.5 0.2,-1.65" data-type="line" data-label="" points="347.09677419354836,368.17204301075265 347.09677419354836,506.66666666666663" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="262.79569892473114" y="247.74193548387098" width="120.43010752688178" height="120.4301075268817" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008303571428571428"/></g><g><rect data-type="rect" data-label="INLINE netId: NET_PRU0_MII_TX_CLK1
|
|
2
4
|
axis: x
|
|
3
5
|
side: y+" data-x="-1.4249999999999998" data-y="0.41" x="52.04301075268816" y="251.35483870967738" width="198.70967741935488" height="14.451612903225822" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008303571428571428"/></g><g><rect data-type="rect" data-label="INLINE netId: NET_PRU0_MII_RXLINK1
|
|
4
6
|
axis: x
|
|
@@ -28,7 +30,7 @@ NET_BOTTOM" data-x="0.2" data-y="-1.075" cx="347.09677419354836" cy="437.4193548
|
|
|
28
30
|
const h = svg.getElementById('crosshair-h');
|
|
29
31
|
const v = svg.getElementById('crosshair-v');
|
|
30
32
|
const coords = svg.getElementById('coordinates');
|
|
31
|
-
|
|
33
|
+
|
|
32
34
|
crosshair.style.display = 'block';
|
|
33
35
|
h.setAttribute('x1', '0');
|
|
34
36
|
h.setAttribute('x2', '640');
|
|
@@ -47,13 +49,13 @@ NET_BOTTOM" data-x="0.2" data-y="-1.075" cx="347.09677419354836" cy="437.4193548
|
|
|
47
49
|
// y' = (y - ty) / sy
|
|
48
50
|
const sx = matrix.a;
|
|
49
51
|
const sy = matrix.d;
|
|
50
|
-
const tx = matrix.e;
|
|
52
|
+
const tx = matrix.e;
|
|
51
53
|
const ty = matrix.f;
|
|
52
54
|
const realPoint = {
|
|
53
55
|
x: (x - tx) / sx,
|
|
54
56
|
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
55
57
|
}
|
|
56
|
-
|
|
58
|
+
|
|
57
59
|
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
58
60
|
coords.setAttribute('x', (x + 5).toString());
|
|
59
61
|
coords.setAttribute('y', (y - 5).toString());
|
|
@@ -61,4 +63,20 @@ NET_BOTTOM" data-x="0.2" data-y="-1.075" cx="347.09677419354836" cy="437.4193548
|
|
|
61
63
|
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
62
64
|
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
63
65
|
});
|
|
64
|
-
]]></script
|
|
66
|
+
]]></script>
|
|
67
|
+
</g>
|
|
68
|
+
<g transform="translate(1216, 200)">
|
|
69
|
+
<style>
|
|
70
|
+
.boundary { fill: rgb(245, 241, 237); }
|
|
71
|
+
.schematic-boundary { fill: none; stroke: #fff; }
|
|
72
|
+
.component { fill: none; stroke: rgb(132, 0, 0); }
|
|
73
|
+
.chip { fill: rgb(255, 255, 194); stroke: rgb(132, 0, 0); }
|
|
74
|
+
.component-pin { fill: none; stroke: rgb(132, 0, 0); }
|
|
75
|
+
.text { font-family: sans-serif; fill: rgb(0, 150, 0); }
|
|
76
|
+
.pin-number { fill: rgb(169, 0, 0); }
|
|
77
|
+
.port-label { fill: rgb(0, 100, 100); }
|
|
78
|
+
.component-name { fill: rgb(0, 100, 100); }
|
|
79
|
+
|
|
80
|
+
</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 512.8571428571 323.80952380954 L 160.47619047613006 323.80952380954" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="30.476190476192002px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 512.8571428571 323.80952380954 L 160.47619047613006 323.80952380954" stroke="rgb(0, 150, 0)" fill="none" stroke-width="3.8095238095240003px" 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 703.3333333333 419.04761904764 L 1046.19047619046 419.04761904764" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="30.476190476192002px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 703.3333333333 419.04761904764 L 1046.19047619046 419.04761904764" stroke="rgb(0, 150, 0)" fill="none" stroke-width="3.8095238095240003px" 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_2__stack1"><path d="M 512.8571428571 400.00000000002 L 160.47619047613006 400.00000000002" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="30.476190476192002px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 512.8571428571 400.00000000002 L 160.47619047613006 400.00000000002" stroke="rgb(0, 150, 0)" fill="none" stroke-width="3.8095238095240003px" 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_3__stack1"><path d="M 569.99999999996 285.7142857143 L 569.99999999996 104.76190476190999" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="30.476190476192002px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 569.99999999996 285.7142857143 L 569.99999999996 104.76190476190999" stroke="rgb(0, 150, 0)" fill="none" stroke-width="3.8095238095240003px" 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_4__stack1"><path d="M 646.19047619044 476.1904761905 L 646.19047619044 695.23809523813" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="30.476190476192002px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 646.19047619044 476.1904761905 L 646.19047619044 695.23809523813" stroke="rgb(0, 150, 0)" fill="none" stroke-width="3.8095238095240003px" 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="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_1__stack1"/><g class="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_2__stack1"/><g class="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_3__stack1"/><g class="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_4__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="589.04761904758" y="361.90476190478" width="38.09523809523989" height="38.095238095240006" stroke-width="3.8095238095240003px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="589.04761904758" y="361.90476190478" width="38.09523809523989" height="38.095238095240006" fill="transparent"/><text class="sch-text" x="608.0952380952" y="380.9523809524" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="34.285714285716px" transform="rotate(0, 608.0952380952, 380.9523809524)">U1</text><line class="component-pin sch-component-pin sch-port-line" x1="589.04761904758" y1="323.80952380954" x2="512.8571428571" y2="323.80952380954" stroke-width="3.8095238095240003px"/><g class="sch-port" data-schematic-port-id="source_port_0_0__stack1"><rect x="509.047619047576" y="320.000000000016" width="7.6190476190480005" height="7.6190476190480005" opacity="0"/></g><text class="pin-number sch-pin-number" x="550.95238095234" y="320.00000000001603" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="28.57142857143px" transform="">1</text><line class="component-pin sch-component-pin sch-port-line" x1="627.1428571428199" y1="419.04761904764" x2="703.3333333333" y2="419.04761904764" stroke-width="3.8095238095240003px"/><g class="sch-port" data-schematic-port-id="source_port_0_1__stack1"><rect x="699.523809523776" y="415.238095238116" width="7.6190476190480005" height="7.6190476190480005" opacity="0"/></g><text class="pin-number sch-pin-number" x="665.2380952380599" y="415.238095238116" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="28.57142857143px" transform="">2</text><line class="component-pin sch-component-pin sch-port-line" x1="589.04761904758" y1="400.00000000002" x2="512.8571428571" y2="400.00000000002" stroke-width="3.8095238095240003px"/><g class="sch-port" data-schematic-port-id="source_port_0_2__stack1"><rect x="509.047619047576" y="396.190476190496" width="7.6190476190480005" height="7.6190476190480005" opacity="0"/></g><text class="pin-number sch-pin-number" x="550.95238095234" y="396.190476190496" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="28.57142857143px" transform="">3</text><line class="component-pin sch-component-pin sch-port-line" x1="569.99999999996" y1="361.90476190478" x2="569.99999999996" y2="285.7142857143" stroke-width="3.8095238095240003px"/><g class="sch-port" data-schematic-port-id="source_port_0_3__stack1"><rect x="566.190476190436" y="281.90476190477597" width="7.6190476190480005" height="7.6190476190480005" opacity="0"/></g><text class="pin-number sch-pin-number" x="566.190476190436" y="323.80952380954" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="28.57142857143px" transform="rotate(-90 566.190476190436 323.80952380954)">4</text><line class="component-pin sch-component-pin sch-port-line" x1="646.19047619044" y1="400.00000000002" x2="646.19047619044" y2="476.1904761905" stroke-width="3.8095238095240003px"/><g class="sch-port" data-schematic-port-id="source_port_0_4__stack1"><rect x="642.380952380916" y="472.380952380976" width="7.6190476190480005" height="7.6190476190480005" opacity="0"/></g><text class="pin-number sch-pin-number" x="642.380952380916" y="438.09523809526" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="28.57142857143px" transform="rotate(-90 642.380952380916 438.09523809526)">5</text></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_0__stack1"><circle cx="512.8571428571" cy="323.80952380954" r="7.6190476190480005" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_1__stack1"><circle cx="703.3333333333" cy="419.04761904764" r="7.6190476190480005" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_2__stack1"><circle cx="512.8571428571" cy="400.00000000002" r="7.6190476190480005" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_3__stack1"><circle cx="569.99999999996" cy="285.7142857143" r="7.6190476190480005" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_4__stack1"><circle cx="646.19047619044" cy="476.1904761905" r="7.6190476190480005" fill="red" opacity="0"/></g><text class="sch-text" x="336.666666666615" y="302.857142857158" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="22.857142857143998px" transform="rotate(0, 336.666666666615, 302.857142857158)">XXXXXXXXXXXXXXXXXXXX</text><text class="sch-text" x="874.76190476188" y="398.095238095258" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="22.857142857143998px" transform="rotate(0, 874.76190476188, 398.095238095258)">XXXXXXXXXXXXXXXXXXX</text><text class="sch-text" x="431.904761904715" y="379.047619047638" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="22.857142857143998px" transform="rotate(0, 431.904761904715, 379.047619047638)">XXXXXXX</text><text class="sch-text" x="549.047619047578" y="195.23809523810502" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="22.857142857143998px" transform="rotate(-90, 549.047619047578, 195.23809523810502)">XXXXXXXX</text><text class="sch-text" x="625.238095238058" y="585.714285714315" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="22.857142857143998px" transform="rotate(-90, 625.238095238058, 585.714285714315)">XXXXXXXXXXX</text>
|
|
81
|
+
</g>
|
|
82
|
+
</svg>
|
package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-two-pin-net.snap.svg
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="2416" height="1200" viewBox="0 0 2416 1200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on the left and Circuit JSON schematic on the right">
|
|
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.5,1 0.5,1" data-type="line" data-label="" points="264,208 376,208" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-0.5,1 0.5,1" data-type="line" data-label="" points="264,208 376,208" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.5,-1 -0.19999999999999996,-1" data-type="line" data-label="" points="152,432 297.6,432" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.5,-1 0.19999999999999996,-1" data-type="line" data-label="" points="488,432 342.4,432" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="-1" data-y="1" x="152" y="152" width="112" height="112" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="U2" data-x="1" data-y="1" x="376" y="152" width="112" height="112" fill="hsl(165, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="U3" data-x="-2" data-y="-1" x="40" y="376" width="112" height="112" fill="hsl(166, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="U4" data-x="2" data-y="-1" x="488" y="376" width="112" height="112" fill="hsl(167, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="INLINE netId: NET_ROUTED
|
|
2
4
|
axis: x
|
|
3
5
|
side: y+" data-x="0" data-y="1.11" x="269.6" y="188.96" width="100.79999999999995" height="13.439999999999998" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="INLINE netId: NET_SECTIONED
|
|
4
6
|
axis: x
|
|
@@ -21,7 +23,7 @@ NET_SECTIONED" data-x="0.85" data-y="-1" cx="415.2" cy="432" r="3" fill="green"/
|
|
|
21
23
|
const h = svg.getElementById('crosshair-h');
|
|
22
24
|
const v = svg.getElementById('crosshair-v');
|
|
23
25
|
const coords = svg.getElementById('coordinates');
|
|
24
|
-
|
|
26
|
+
|
|
25
27
|
crosshair.style.display = 'block';
|
|
26
28
|
h.setAttribute('x1', '0');
|
|
27
29
|
h.setAttribute('x2', '640');
|
|
@@ -40,13 +42,13 @@ NET_SECTIONED" data-x="0.85" data-y="-1" cx="415.2" cy="432" r="3" fill="green"/
|
|
|
40
42
|
// y' = (y - ty) / sy
|
|
41
43
|
const sx = matrix.a;
|
|
42
44
|
const sy = matrix.d;
|
|
43
|
-
const tx = matrix.e;
|
|
45
|
+
const tx = matrix.e;
|
|
44
46
|
const ty = matrix.f;
|
|
45
47
|
const realPoint = {
|
|
46
48
|
x: (x - tx) / sx,
|
|
47
49
|
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
48
50
|
}
|
|
49
|
-
|
|
51
|
+
|
|
50
52
|
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
51
53
|
coords.setAttribute('x', (x + 5).toString());
|
|
52
54
|
coords.setAttribute('y', (y - 5).toString());
|
|
@@ -54,4 +56,20 @@ NET_SECTIONED" data-x="0.85" data-y="-1" cx="415.2" cy="432" r="3" fill="green"/
|
|
|
54
56
|
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
55
57
|
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
56
58
|
});
|
|
57
|
-
]]></script
|
|
59
|
+
]]></script>
|
|
60
|
+
</g>
|
|
61
|
+
<g transform="translate(1216, 200)">
|
|
62
|
+
<style>
|
|
63
|
+
.boundary { fill: rgb(245, 241, 237); }
|
|
64
|
+
.schematic-boundary { fill: none; stroke: #fff; }
|
|
65
|
+
.component { fill: none; stroke: rgb(132, 0, 0); }
|
|
66
|
+
.chip { fill: rgb(255, 255, 194); stroke: rgb(132, 0, 0); }
|
|
67
|
+
.component-pin { fill: none; stroke: rgb(132, 0, 0); }
|
|
68
|
+
.text { font-family: sans-serif; fill: rgb(0, 150, 0); }
|
|
69
|
+
.pin-number { fill: rgb(169, 0, 0); }
|
|
70
|
+
.port-label { fill: rgb(0, 100, 100); }
|
|
71
|
+
.component-name { fill: rgb(0, 100, 100); }
|
|
72
|
+
|
|
73
|
+
</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 200 L 700 200" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="32px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 500 200 L 700 200" stroke="rgb(0, 150, 0)" fill="none" stroke-width="4px" 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 300 600 L 560 600" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="32px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 300 600 L 560 600" stroke="rgb(0, 150, 0)" fill="none" stroke-width="4px" 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_2__stack1"><path d="M 900 600 L 640 600" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="32px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 900 600 L 640 600" stroke="rgb(0, 150, 0)" fill="none" stroke-width="4px" 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="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_1__stack1"/><g class="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_2__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="380" y="100" width="40" height="200" stroke-width="4px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="380" y="100" width="40" height="200" fill="transparent"/><text class="sch-text" x="400" y="200" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="36px" transform="rotate(0, 400, 200)">U1</text><line class="component-pin sch-component-pin sch-port-line" x1="420" y1="200" x2="500" y2="200" stroke-width="4px"/><g class="sch-port" data-schematic-port-id="source_port_0_0__stack1"><rect x="496" y="196" width="8" height="8" opacity="0"/></g><text class="pin-number sch-pin-number" x="460" y="196" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="30px" transform="">1</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="780" y="100" width="40" height="200" stroke-width="4px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="780" y="100" width="40" height="200" fill="transparent"/><text class="sch-text" x="800" y="200" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="36px" transform="rotate(0, 800, 200)">U2</text><line class="component-pin sch-component-pin sch-port-line" x1="780" y1="200" x2="700" y2="200" stroke-width="4px"/><g class="sch-port" data-schematic-port-id="source_port_1_0__stack1"><rect x="696" y="196" width="8" height="8" opacity="0"/></g><text class="pin-number sch-pin-number" x="740" y="196" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="30px" transform="">1</text></g><g class="sch-component" data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_2__stack1"><rect class="component chip sch-component-body" x="180" y="500" width="40" height="200" stroke-width="4px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="180" y="500" width="40" height="200" fill="transparent"/><text class="sch-text" x="200" y="600" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="36px" transform="rotate(0, 200, 600)">U3</text><line class="component-pin sch-component-pin sch-port-line" x1="220" y1="600" x2="300" y2="600" stroke-width="4px"/><g class="sch-port" data-schematic-port-id="source_port_2_0__stack1"><rect x="296" y="596" width="8" height="8" opacity="0"/></g><text class="pin-number sch-pin-number" x="260" y="596" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="30px" transform="">1</text></g><g class="sch-component" data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_3__stack1"><rect class="component chip sch-component-body" x="980" y="500" width="40" height="200" stroke-width="4px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="980" y="500" width="40" height="200" fill="transparent"/><text class="sch-text" x="1000" y="600" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="36px" transform="rotate(0, 1000, 600)">U4</text><line class="component-pin sch-component-pin sch-port-line" x1="980" y1="600" x2="900" y2="600" stroke-width="4px"/><g class="sch-port" data-schematic-port-id="source_port_3_0__stack1"><rect x="896" y="596" width="8" height="8" opacity="0"/></g><text class="pin-number sch-pin-number" x="940" y="596" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="30px" transform="">1</text></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_0__stack1"><circle cx="500" cy="200" r="8" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_1_0__stack1"><circle cx="700" cy="200" r="8" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_2_0__stack1"><circle cx="300" cy="600" r="8" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_3_0__stack1"><circle cx="900" cy="600" r="8" fill="red" opacity="0"/></g><text class="sch-text" x="600" y="177.99999999999997" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="24px" transform="rotate(0, 600, 177.99999999999997)">XXXXXXXXXX</text><text class="sch-text" x="430" y="578" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="24px" transform="rotate(0, 430, 578)">XXXXXXXXXXXXX</text><text class="sch-text" x="770" y="578" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="24px" transform="rotate(0, 770, 578)">XXXXXXXXXXXXX</text>
|
|
74
|
+
</g>
|
|
75
|
+
</svg>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="2416" height="1200" viewBox="0 0 2416 1200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on the left and Circuit JSON schematic on the right">
|
|
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.5,0 2.5,0" data-type="line" data-label="" points="214.33962264150944,71.69811320754715 425.66037735849056,71.69811320754715" fill="none" stroke="hsl(48, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0,-2.5 0,-4" data-type="line" data-label="" points="161.50943396226415,335.84905660377353 161.50943396226415,494.33962264150944" fill="none" stroke="hsl(136, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5,0 2.5,0" data-type="line" data-label="" points="214.33962264150944,71.69811320754715 425.66037735849056,71.69811320754715" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0,-2.5 0,-4" data-type="line" data-label="" points="161.50943396226415,335.84905660377353 161.50943396226415,494.33962264150944" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="108.67924528301887" y="39.999999999999986" width="105.66037735849056" height="63.39622641509433" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U2" data-x="3" data-y="0" x="425.66037735849056" y="39.999999999999986" width="105.66037735849056" height="63.39622641509433" fill="hsl(165, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U3" data-x="0" data-y="-2" x="129.81132075471697" y="230.18867924528303" width="63.39622641509436" height="105.66037735849054" fill="hsl(166, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U4" data-x="0" data-y="-4.5" x="129.81132075471697" y="494.3396226415094" width="63.39622641509436" height="105.66037735849056" fill="hsl(167, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="INLINE netId: USER_LED_ANODE
|
|
2
4
|
axis: x
|
|
3
5
|
side: y+" data-x="1.5" data-y="0.14" x="224.90566037735852" y="47.39622641509432" width="190.18867924528297" height="19.01886792452831" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="INLINE netId: SPI_SCK
|
|
4
6
|
axis: y
|
|
@@ -18,7 +20,7 @@ SPI_SCK" data-x="0" data-y="-3.25" cx="161.50943396226415" cy="415.0943396226415
|
|
|
18
20
|
const h = svg.getElementById('crosshair-h');
|
|
19
21
|
const v = svg.getElementById('crosshair-v');
|
|
20
22
|
const coords = svg.getElementById('coordinates');
|
|
21
|
-
|
|
23
|
+
|
|
22
24
|
crosshair.style.display = 'block';
|
|
23
25
|
h.setAttribute('x1', '0');
|
|
24
26
|
h.setAttribute('x2', '640');
|
|
@@ -37,13 +39,13 @@ SPI_SCK" data-x="0" data-y="-3.25" cx="161.50943396226415" cy="415.0943396226415
|
|
|
37
39
|
// y' = (y - ty) / sy
|
|
38
40
|
const sx = matrix.a;
|
|
39
41
|
const sy = matrix.d;
|
|
40
|
-
const tx = matrix.e;
|
|
42
|
+
const tx = matrix.e;
|
|
41
43
|
const ty = matrix.f;
|
|
42
44
|
const realPoint = {
|
|
43
45
|
x: (x - tx) / sx,
|
|
44
46
|
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
45
47
|
}
|
|
46
|
-
|
|
48
|
+
|
|
47
49
|
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
48
50
|
coords.setAttribute('x', (x + 5).toString());
|
|
49
51
|
coords.setAttribute('y', (y - 5).toString());
|
|
@@ -51,4 +53,20 @@ SPI_SCK" data-x="0" data-y="-3.25" cx="161.50943396226415" cy="415.0943396226415
|
|
|
51
53
|
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
52
54
|
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
53
55
|
});
|
|
54
|
-
]]></script
|
|
56
|
+
]]></script>
|
|
57
|
+
</g>
|
|
58
|
+
<g transform="translate(1216, 200)">
|
|
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 486.2878696872 108.4745762712 L 757.4743103651999 108.4745762712" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="21.69491525424px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 486.2878696872 108.4745762712 L 757.4743103651999 108.4745762712" stroke="rgb(0, 150, 0)" fill="none" stroke-width="2.71186440678px" 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 418.4912595177 447.4576271187 L 418.4912595177 650.8474576272" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="21.69491525424px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 418.4912595177 447.4576271187 L 418.4912595177 650.8474576272" stroke="rgb(0, 150, 0)" fill="none" stroke-width="2.71186440678px" 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="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 chip sch-component-body" x="404.93193748379997" y="67.79661016949998" width="27.118644067800005" height="81.35593220340002" stroke-width="2.71186440678px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="404.93193748379997" y="67.79661016949998" width="27.118644067800005" height="81.35593220340002" fill="transparent"/><text class="sch-text" x="418.4912595177" y="108.4745762712" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="24.40677966102px" transform="rotate(0, 418.4912595177, 108.4745762712)">U1</text><line class="component-pin sch-component-pin sch-port-line" x1="432.0505815516" y1="108.4745762712" x2="486.2878696872" y2="108.4745762712" stroke-width="2.71186440678px"/><g class="sch-port" data-schematic-port-id="source_port_0_0__stack1"><rect x="483.57600528041996" y="105.76271186442" width="5.42372881356" height="5.42372881356" opacity="0"/></g><text class="pin-number sch-pin-number" x="459.1692256194" y="105.76271186442" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="20.33898305085px" transform="">1</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="811.7115985007999" y="67.79661016949998" width="27.118644067800005" height="81.35593220340002" stroke-width="2.71186440678px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="811.7115985007999" y="67.79661016949998" width="27.118644067800005" height="81.35593220340002" fill="transparent"/><text class="sch-text" x="825.2709205346999" y="108.4745762712" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="24.40677966102px" transform="rotate(0, 825.2709205346999, 108.4745762712)">U2</text><line class="component-pin sch-component-pin sch-port-line" x1="811.7115985007999" y1="108.4745762712" x2="757.4743103651999" y2="108.4745762712" stroke-width="2.71186440678px"/><g class="sch-port" data-schematic-port-id="source_port_1_0__stack1"><rect x="754.7624459584199" y="105.76271186442" width="5.42372881356" height="5.42372881356" opacity="0"/></g><text class="pin-number sch-pin-number" x="784.5929544329999" y="105.76271186442" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="20.33898305085px" transform="">1</text></g><g class="sch-component" data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_2__stack1"><rect class="component chip sch-component-body" x="377.81329341599996" y="366.10169491529996" width="81.35593220340002" height="27.118644067800005" stroke-width="2.71186440678px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="377.81329341599996" y="366.10169491529996" width="81.35593220340002" height="27.118644067800005" fill="transparent"/><text class="sch-text" x="418.4912595177" y="379.66101694919996" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="24.40677966102px" transform="rotate(0, 418.4912595177, 379.66101694919996)">U3</text><line class="component-pin sch-component-pin sch-port-line" x1="418.4912595177" y1="393.22033898309996" x2="418.4912595177" y2="447.4576271187" stroke-width="2.71186440678px"/><g class="sch-port" data-schematic-port-id="source_port_2_0__stack1"><rect x="415.77939511091995" y="444.74576271191995" width="5.42372881356" height="5.42372881356" opacity="0"/></g><text class="pin-number sch-pin-number" x="415.77939511091995" y="420.33898305089997" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="20.33898305085px" transform="rotate(-90 415.77939511091995 420.33898305089997)">1</text></g><g class="sch-component" data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_3__stack1"><rect class="component chip sch-component-body" x="377.81329341599996" y="705.0847457628" width="81.35593220340002" height="27.11864406779989" stroke-width="2.71186440678px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="377.81329341599996" y="705.0847457628" width="81.35593220340002" height="27.11864406779989" fill="transparent"/><text class="sch-text" x="418.4912595177" y="718.6440677967" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="24.40677966102px" transform="rotate(0, 418.4912595177, 718.6440677967)">U4</text><line class="component-pin sch-component-pin sch-port-line" x1="418.4912595177" y1="705.0847457628" x2="418.4912595177" y2="650.8474576272" stroke-width="2.71186440678px"/><g class="sch-port" data-schematic-port-id="source_port_3_0__stack1"><rect x="415.77939511091995" y="648.13559322042" width="5.42372881356" height="5.42372881356" opacity="0"/></g><text class="pin-number sch-pin-number" x="415.77939511091995" y="677.966101695" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="20.33898305085px" transform="rotate(-90 415.77939511091995 677.966101695)">1</text></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_0__stack1"><circle cx="486.2878696872" cy="108.4745762712" r="5.42372881356" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_1_0__stack1"><circle cx="757.4743103651999" cy="108.4745762712" r="5.42372881356" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_2_0__stack1"><circle cx="418.4912595177" cy="447.4576271187" r="5.42372881356" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_3_0__stack1"><circle cx="418.4912595177" cy="650.8474576272" r="5.42372881356" fill="red" opacity="0"/></g><text class="sch-text" x="621.8810900261999" y="89.49152542373999" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="24.40677966102px" transform="rotate(0, 621.8810900261999, 89.49152542373999)">XXXXXXXXXXXXXX</text><text class="sch-text" x="399.50820867024" y="549.1525423729499" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="24.40677966102px" transform="rotate(-90, 399.50820867024, 549.1525423729499)">XXXXXXX</text>
|
|
71
|
+
</g>
|
|
72
|
+
</svg>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="2416" height="1200" viewBox="0 0 2416 1200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on the left and Circuit JSON schematic on the right">
|
|
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.6000000000000001,-0.30000000000000004 2.435,0" data-type="line" data-label="" points="201.34453781512605,376.47058823529414 448.06722689075633,336.1344537815126" fill="none" stroke="hsl(48, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.6000000000000001,-0.30000000000000004 1.5175,-0.30000000000000004 1.5175,0 2.435,0" data-type="line" data-label="" points="201.34453781512605,376.47058823529414 324.7058823529412,376.47058823529414 324.7058823529412,336.1344537815126 448.06722689075633,336.1344537815126" 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="40" y="268.9075630252101" width="161.34453781512605" height="134.45378151260502" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0074375"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="3" data-y="0.13249999999999998" x="448.0672268907564" y="256.8067226890756" width="151.93277310924367" height="123.02521008403363" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0074375"/></g><g><rect data-type="rect" data-label="U1" data-x="-0.08000000000000002" data-y="0.615" x="85.7142857142857" y="236.6386554621849" width="48.40336134453783" height="33.613445378151255" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.0074375"/></g><g><rect data-type="rect" data-label="INLINE netId: USER_LED_ANODE
|
|
2
4
|
axis: x
|
|
3
5
|
side: y+" data-x="1.5175" data-y="0.14" x="203.69747899159668" y="305.21008403361344" width="242.01680672268907" height="24.201680672268935" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.0074375"/></g><text data-type="text" data-label="USER_LED_ANODE" data-x="1.5175" data-y="0.14" x="324.7058823529412" y="317.3109243697479" fill="green" font-size="24.201680672268907" font-family="sans-serif" text-anchor="middle" dominant-baseline="central">USER_LED_ANODE</text><g><circle data-type="point" data-label="schematic_port_0
|
|
4
6
|
x-" data-x="-0.6000000000000001" data-y="0.30000000000000004" cx="39.999999999999986" cy="295.79831932773106" r="3" fill="hsl(248, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_port_1
|
|
@@ -21,7 +23,7 @@ USER_LED_ANODE" data-x="1.5175" data-y="0" cx="324.7058823529412" cy="336.134453
|
|
|
21
23
|
const h = svg.getElementById('crosshair-h');
|
|
22
24
|
const v = svg.getElementById('crosshair-v');
|
|
23
25
|
const coords = svg.getElementById('coordinates');
|
|
24
|
-
|
|
26
|
+
|
|
25
27
|
crosshair.style.display = 'block';
|
|
26
28
|
h.setAttribute('x1', '0');
|
|
27
29
|
h.setAttribute('x2', '640');
|
|
@@ -40,13 +42,13 @@ USER_LED_ANODE" data-x="1.5175" data-y="0" cx="324.7058823529412" cy="336.134453
|
|
|
40
42
|
// y' = (y - ty) / sy
|
|
41
43
|
const sx = matrix.a;
|
|
42
44
|
const sy = matrix.d;
|
|
43
|
-
const tx = matrix.e;
|
|
45
|
+
const tx = matrix.e;
|
|
44
46
|
const ty = matrix.f;
|
|
45
47
|
const realPoint = {
|
|
46
48
|
x: (x - tx) / sx,
|
|
47
49
|
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
48
50
|
}
|
|
49
|
-
|
|
51
|
+
|
|
50
52
|
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
51
53
|
coords.setAttribute('x', (x + 5).toString());
|
|
52
54
|
coords.setAttribute('y', (y - 5).toString());
|
|
@@ -54,4 +56,20 @@ USER_LED_ANODE" data-x="1.5175" data-y="0" cx="324.7058823529412" cy="336.134453
|
|
|
54
56
|
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
55
57
|
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
56
58
|
});
|
|
57
|
-
]]></script
|
|
59
|
+
]]></script>
|
|
60
|
+
</g>
|
|
61
|
+
<g transform="translate(1216, 200)">
|
|
62
|
+
<style>
|
|
63
|
+
.boundary { fill: rgb(245, 241, 237); }
|
|
64
|
+
.schematic-boundary { fill: none; stroke: #fff; }
|
|
65
|
+
.component { fill: none; stroke: rgb(132, 0, 0); }
|
|
66
|
+
.chip { fill: rgb(255, 255, 194); stroke: rgb(132, 0, 0); }
|
|
67
|
+
.component-pin { fill: none; stroke: rgb(132, 0, 0); }
|
|
68
|
+
.text { font-family: sans-serif; fill: rgb(0, 150, 0); }
|
|
69
|
+
.pin-number { fill: rgb(169, 0, 0); }
|
|
70
|
+
.port-label { fill: rgb(0, 100, 100); }
|
|
71
|
+
.component-name { fill: rgb(0, 100, 100); }
|
|
72
|
+
|
|
73
|
+
</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 461.18251928022 464.78149100256 L 602.6992287917735 464.78149100256 L 602.6992287917735 418.5089974293 L 744.215938303327 418.5089974293" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="24.678663239071998px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 461.18251928022 464.78149100256 L 602.6992287917735 464.78149100256 L 602.6992287917735 418.5089974293 L 744.215938303327 418.5089974293" stroke="rgb(0, 150, 0)" fill="none" stroke-width="3.0848329048839997px" 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="337.78920308486" y="341.3881748072" width="61.69665809768003" height="154.24164524419996" stroke-width="3.0848329048839997px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="337.78920308486" y="341.3881748072" width="61.69665809768003" height="154.24164524419996" fill="transparent"/><text class="sch-text" x="368.6375321337" y="418.5089974293" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="27.763496143955997px" transform="rotate(0, 368.6375321337, 418.5089974293)">schematic_component_0</text><line class="component-pin sch-component-pin sch-port-line" x1="337.78920308486" y1="372.23650385604" x2="279.177377892064" y2="372.23650385604" stroke-width="3.0848329048839997px"/><g class="sch-port" data-schematic-port-id="source_port_0_0__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="276.09254498718" cy="372.23650385604" r="3.0848329048839997" stroke-width="3.0848329048839997px"/><rect x="273.007712082296" y="369.15167095115595" width="6.1696658097679995" height="6.1696658097679995" opacity="0"/></g><text class="pin-number sch-pin-number" x="306.94087403602" y="369.151670951156" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="23.136246786629997px" transform=""></text><text class="pin-number sch-pin-label" x="353.21336760928" y="372.23650385604" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="23.136246786629997px" transform="">schematic_port_0</text><line class="component-pin sch-component-pin sch-port-line" x1="337.78920308486" y1="403.08483290488" x2="279.177377892064" y2="403.08483290488" stroke-width="3.0848329048839997px"/><g class="sch-port" data-schematic-port-id="source_port_0_1__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="276.09254498718" cy="403.08483290488" r="3.0848329048839997" stroke-width="3.0848329048839997px"/><rect x="273.007712082296" y="399.99999999999596" width="6.1696658097679995" height="6.1696658097679995" opacity="0"/></g><text class="pin-number sch-pin-number" x="306.94087403602" y="399.999999999996" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="23.136246786629997px" transform=""></text><text class="pin-number sch-pin-label" x="353.21336760928" y="403.08483290488" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="23.136246786629997px" transform="">schematic_port_1</text><line class="component-pin sch-component-pin sch-port-line" x1="337.78920308486" y1="433.93316195372" x2="279.177377892064" y2="433.93316195372" stroke-width="3.0848329048839997px"/><g class="sch-port" data-schematic-port-id="source_port_0_2__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="276.09254498718" cy="433.93316195372" r="3.0848329048839997" stroke-width="3.0848329048839997px"/><rect x="273.007712082296" y="430.848329048836" width="6.1696658097679995" height="6.1696658097679995" opacity="0"/></g><text class="pin-number sch-pin-number" x="306.94087403602" y="430.848329048836" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="23.136246786629997px" transform=""></text><text class="pin-number sch-pin-label" x="353.21336760928" y="433.93316195372" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="23.136246786629997px" transform="">schematic_port_2</text><line class="component-pin sch-component-pin sch-port-line" x1="337.78920308486" y1="464.78149100256" x2="279.177377892064" y2="464.78149100256" stroke-width="3.0848329048839997px"/><g class="sch-port" data-schematic-port-id="source_port_0_3__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="276.09254498718" cy="464.78149100256" r="3.0848329048839997" stroke-width="3.0848329048839997px"/><rect x="273.007712082296" y="461.696658097676" width="6.1696658097679995" height="6.1696658097679995" opacity="0"/></g><text class="pin-number sch-pin-number" x="306.94087403602" y="461.696658097676" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="23.136246786629997px" transform=""></text><text class="pin-number sch-pin-label" x="353.21336760928" y="464.78149100256" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="23.136246786629997px" transform="">schematic_port_3</text><line class="component-pin sch-component-pin sch-port-line" x1="399.48586118254" y1="464.78149100256" x2="461.18251928022" y2="464.78149100256" stroke-width="3.0848329048839997px"/><g class="sch-port" data-schematic-port-id="source_port_0_4__stack1"><rect x="458.09768637533597" y="461.696658097676" width="6.1696658097679995" height="6.1696658097679995" opacity="0"/></g><text class="pin-number sch-pin-number" x="430.33419023138003" y="461.696658097676" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="23.136246786629997px" transform=""></text><text class="pin-number sch-pin-label" x="384.06169665812" y="464.78149100256" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="23.136246786629997px" transform="">schematic_port_4</text><line class="component-pin sch-component-pin sch-port-line" x1="399.48586118254" y1="433.93316195372" x2="458.097686375336" y2="433.93316195372" stroke-width="3.0848329048839997px"/><g class="sch-port" data-schematic-port-id="source_port_0_5__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="461.18251928022" cy="433.93316195372" r="3.0848329048839997" stroke-width="3.0848329048839997px"/><rect x="458.09768637533597" y="430.848329048836" width="6.1696658097679995" height="6.1696658097679995" opacity="0"/></g><text class="pin-number sch-pin-number" x="430.33419023138003" y="430.848329048836" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="23.136246786629997px" transform=""></text><text class="pin-number sch-pin-label" x="384.06169665812" y="433.93316195372" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="23.136246786629997px" transform="">schematic_port_5</text><line class="component-pin sch-component-pin sch-port-line" x1="399.48586118254" y1="403.08483290488" x2="458.097686375336" y2="403.08483290488" stroke-width="3.0848329048839997px"/><g class="sch-port" data-schematic-port-id="source_port_0_6__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="461.18251928022" cy="403.08483290488" r="3.0848329048839997" stroke-width="3.0848329048839997px"/><rect x="458.09768637533597" y="399.99999999999596" width="6.1696658097679995" height="6.1696658097679995" opacity="0"/></g><text class="pin-number sch-pin-number" x="430.33419023138003" y="399.999999999996" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="23.136246786629997px" transform=""></text><text class="pin-number sch-pin-label" x="384.06169665812" y="403.08483290488" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="23.136246786629997px" transform="">schematic_port_6</text><line class="component-pin sch-component-pin sch-port-line" x1="399.48586118254" y1="372.23650385604" x2="458.097686375336" y2="372.23650385604" stroke-width="3.0848329048839997px"/><g class="sch-port" data-schematic-port-id="source_port_0_7__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="461.18251928022" cy="372.23650385604" r="3.0848329048839997" stroke-width="3.0848329048839997px"/><rect x="458.09768637533597" y="369.15167095115595" width="6.1696658097679995" height="6.1696658097679995" opacity="0"/></g><text class="pin-number sch-pin-number" x="430.33419023138003" y="369.151670951156" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="23.136246786629997px" transform=""></text><text class="pin-number sch-pin-label" x="384.06169665812" y="372.23650385604" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="23.136246786629997px" transform="">schematic_port_7</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="805.912596401007" y="327.506426735222" width="50.899742930585944" height="141.13110539844297" stroke-width="3.0848329048839997px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="805.912596401007" y="327.506426735222" width="50.899742930585944" height="141.13110539844297" fill="transparent"/><text class="sch-text" x="831.3624678663" y="398.0719794344435" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="27.763496143955997px" transform="rotate(0, 831.3624678663, 398.0719794344435)">schematic_component_1</text><line class="component-pin sch-component-pin sch-port-line" x1="805.912596401007" y1="418.5089974293" x2="744.215938303327" y2="418.5089974293" stroke-width="3.0848329048839997px"/><g class="sch-port" data-schematic-port-id="source_port_1_0__stack1"><rect x="741.131105398443" y="415.42416452441597" width="6.1696658097679995" height="6.1696658097679995" opacity="0"/></g><text class="pin-number sch-pin-number" x="775.064267352167" y="415.42416452441597" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="23.136246786629997px" transform=""></text><text class="pin-number sch-pin-label" x="821.3367609254269" y="418.5089974293" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="23.136246786629997px" transform="">schematic_port_8</text><line class="component-pin sch-component-pin sch-port-line" x1="856.812339331593" y1="418.5089974293" x2="915.424164524389" y2="418.5089974293" stroke-width="3.0848329048839997px"/><g class="sch-port" data-schematic-port-id="source_port_1_1__stack1"><circle class="component-pin sch-component-pin sch-port-terminal" cx="918.508997429273" cy="418.5089974293" r="3.0848329048839997" stroke-width="3.0848329048839997px"/><rect x="915.424164524389" y="415.42416452441597" width="6.1696658097679995" height="6.1696658097679995" opacity="0"/></g><text class="pin-number sch-pin-number" x="887.660668380433" y="415.42416452441597" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="23.136246786629997px" transform=""></text><text class="pin-number sch-pin-label" x="841.388174807173" y="418.5089974293" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="23.136246786629997px" transform="">schematic_port_9</text></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_0__stack1"><circle cx="276.09254498718" cy="372.23650385604" r="6.1696658097679995" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_1__stack1"><circle cx="276.09254498718" cy="403.08483290488" r="6.1696658097679995" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_2__stack1"><circle cx="276.09254498718" cy="433.93316195372" r="6.1696658097679995" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_3__stack1"><circle cx="276.09254498718" cy="464.78149100256" r="6.1696658097679995" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_4__stack1"><circle cx="461.18251928022" cy="464.78149100256" r="6.1696658097679995" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_5__stack1"><circle cx="461.18251928022" cy="433.93316195372" r="6.1696658097679995" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_6__stack1"><circle cx="461.18251928022" cy="403.08483290488" r="6.1696658097679995" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_7__stack1"><circle cx="461.18251928022" cy="372.23650385604" r="6.1696658097679995" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_1_0__stack1"><circle cx="744.215938303327" cy="418.5089974293" r="6.1696658097679995" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_1_1__stack1"><circle cx="918.508997429273" cy="418.5089974293" r="6.1696658097679995" fill="red" opacity="0"/></g><text class="sch-text" x="356.298200514164" y="323.650385604117" fill="#7e22ce" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="27.763496143955997px" transform="rotate(0, 356.298200514164, 323.650385604117)">U1</text><text class="sch-text" x="602.6992287917735" y="396.915167095112" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="27.763496143955997px" transform="rotate(0, 602.6992287917735, 396.915167095112)">XXXXXXXXXXXXXX</text><rect class="schematic-box sch-box" x="328.53470437020803" y="304.370179948592" width="55.52699228791198" height="38.56041131105002" stroke-width="3.0848329048839997px" stroke="rgb(132, 0, 0)" fill="transparent" stroke-dasharray="24.678663239071998 12.339331619535999"/>
|
|
74
|
+
</g>
|
|
75
|
+
</svg>
|
package/tests/solvers/InlineNetLabelSolver/__snapshots__/terminal-stub-trace-clearance.snap.svg
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="2416" height="1200" viewBox="0 0 2416 1200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on the left and Circuit JSON schematic on the right">
|
|
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.5,-0.1 1,-0.1 1,0.5" data-type="line" data-label="" points="413.33333333333337,394.66666666666663 600,394.66666666666663 600,170.66666666666666" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,0.3 0.95,0.3" data-type="line" data-label="" points="413.33333333333337,245.33333333333331 581.3333333333333,245.33333333333331" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,0.1 0.95,0.1" data-type="line" data-label="" points="413.33333333333337,320 581.3333333333333,320" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0.1" x="40" y="170.66666666666669" width="373.33333333333337" height="298.66666666666663" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0026785714285714286"/></g><g><rect data-type="rect" data-label="INLINE netId: SCL
|
|
2
4
|
axis: x
|
|
3
5
|
side: y+" data-x="0.725" data-y="0.41" x="441.33333333333337" y="181.86666666666667" width="111.99999999999994" height="44.79999999999998" fill="hsl(196, 100%, 50%, 0.35)" stroke="black" stroke-width="0.0026785714285714286"/></g><g><rect data-type="rect" data-label="INLINE netId: SDA
|
|
4
6
|
axis: x
|
|
@@ -17,7 +19,7 @@ SDA" data-x="0.725" data-y="0.1" cx="497.3333333333333" cy="320" r="3" fill="gre
|
|
|
17
19
|
const h = svg.getElementById('crosshair-h');
|
|
18
20
|
const v = svg.getElementById('crosshair-v');
|
|
19
21
|
const coords = svg.getElementById('coordinates');
|
|
20
|
-
|
|
22
|
+
|
|
21
23
|
crosshair.style.display = 'block';
|
|
22
24
|
h.setAttribute('x1', '0');
|
|
23
25
|
h.setAttribute('x2', '640');
|
|
@@ -36,13 +38,13 @@ SDA" data-x="0.725" data-y="0.1" cx="497.3333333333333" cy="320" r="3" fill="gre
|
|
|
36
38
|
// y' = (y - ty) / sy
|
|
37
39
|
const sx = matrix.a;
|
|
38
40
|
const sy = matrix.d;
|
|
39
|
-
const tx = matrix.e;
|
|
41
|
+
const tx = matrix.e;
|
|
40
42
|
const ty = matrix.f;
|
|
41
43
|
const realPoint = {
|
|
42
44
|
x: (x - tx) / sx,
|
|
43
45
|
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
44
46
|
}
|
|
45
|
-
|
|
47
|
+
|
|
46
48
|
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
47
49
|
coords.setAttribute('x', (x + 5).toString());
|
|
48
50
|
coords.setAttribute('y', (y - 5).toString());
|
|
@@ -50,4 +52,20 @@ SDA" data-x="0.725" data-y="0.1" cx="497.3333333333333" cy="320" r="3" fill="gre
|
|
|
50
52
|
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
51
53
|
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
52
54
|
});
|
|
53
|
-
]]></script
|
|
55
|
+
]]></script>
|
|
56
|
+
</g>
|
|
57
|
+
<g transform="translate(1216, 200)">
|
|
58
|
+
<style>
|
|
59
|
+
.boundary { fill: rgb(245, 241, 237); }
|
|
60
|
+
.schematic-boundary { fill: none; stroke: #fff; }
|
|
61
|
+
.component { fill: none; stroke: rgb(132, 0, 0); }
|
|
62
|
+
.chip { fill: rgb(255, 255, 194); stroke: rgb(132, 0, 0); }
|
|
63
|
+
.component-pin { fill: none; stroke: rgb(132, 0, 0); }
|
|
64
|
+
.text { font-family: sans-serif; fill: rgb(0, 150, 0); }
|
|
65
|
+
.pin-number { fill: rgb(169, 0, 0); }
|
|
66
|
+
.port-label { fill: rgb(0, 100, 100); }
|
|
67
|
+
.component-name { fill: rgb(0, 100, 100); }
|
|
68
|
+
|
|
69
|
+
</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 628.1081081080999 497.29729729734 L 844.3243243243 497.29729729734 L 844.3243243243 237.8378378379" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="69.189189189184px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 628.1081081080999 497.29729729734 L 844.3243243243 497.29729729734 L 844.3243243243 237.8378378379" stroke="rgb(0, 150, 0)" fill="none" stroke-width="8.648648648648px" 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 628.1081081080999 324.32432432438 L 822.70270270268 324.32432432438" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="69.189189189184px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 628.1081081080999 324.32432432438 L 822.70270270268 324.32432432438" stroke="rgb(0, 150, 0)" fill="none" stroke-width="8.648648648648px" 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_2__stack1"><path d="M 628.1081081080999 410.81081081086 L 822.70270270268 410.81081081086" class="trace-invisible-hover-outline sch-trace-hitbox" stroke="rgb(0, 150, 0)" fill="none" stroke-width="69.189189189184px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path class="sch-trace-path" d="M 628.1081081080999 410.81081081086 L 822.70270270268 410.81081081086" stroke="rgb(0, 150, 0)" fill="none" stroke-width="8.648648648648px" 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="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_1__stack1"/><g class="trace-overlays sch-trace-overlays" data-layer="overlay" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_2__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="368.64864864866" y="237.8378378379" width="86.48648648647998" height="345.94594594592" stroke-width="8.648648648648px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay sch-component-overlay" x="368.64864864866" y="237.8378378379" width="86.48648648647998" height="345.94594594592" fill="transparent"/><text class="sch-text" x="411.8918918919" y="410.81081081086" fill="#0f172a" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="77.837837837832px" transform="rotate(0, 411.8918918919, 410.81081081086)">U1</text><line class="component-pin sch-component-pin sch-port-line" x1="455.13513513514" y1="324.32432432438" x2="628.1081081080999" y2="324.32432432438" stroke-width="8.648648648648px"/><g class="sch-port" data-schematic-port-id="source_port_0_0__stack1"><rect x="619.459459459452" y="315.67567567573195" width="17.297297297296" height="17.297297297296" opacity="0"/></g><text class="pin-number sch-pin-number" x="541.62162162162" y="315.675675675732" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="64.86486486486px" transform=""></text><text class="pin-number sch-pin-label" x="411.8918918919" y="324.32432432438" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="64.86486486486px" transform="">scl</text><line class="component-pin sch-component-pin sch-port-line" x1="455.13513513514" y1="410.81081081086" x2="628.1081081080999" y2="410.81081081086" stroke-width="8.648648648648px"/><g class="sch-port" data-schematic-port-id="source_port_0_1__stack1"><rect x="619.459459459452" y="402.162162162212" width="17.297297297296" height="17.297297297296" opacity="0"/></g><text class="pin-number sch-pin-number" x="541.62162162162" y="402.162162162212" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="64.86486486486px" transform=""></text><text class="pin-number sch-pin-label" x="411.8918918919" y="410.81081081086" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="64.86486486486px" transform="">sda</text><line class="component-pin sch-component-pin sch-port-line" x1="455.13513513514" y1="497.29729729734" x2="628.1081081080999" y2="497.29729729734" stroke-width="8.648648648648px"/><g class="sch-port" data-schematic-port-id="source_port_0_2__stack1"><rect x="619.459459459452" y="488.64864864869196" width="17.297297297296" height="17.297297297296" opacity="0"/></g><text class="pin-number sch-pin-number" x="541.62162162162" y="488.648648648692" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="64.86486486486px" transform=""></text><text class="pin-number sch-pin-label" x="411.8918918919" y="497.29729729734" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="64.86486486486px" transform="">vcc</text></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_0__stack1"><circle cx="628.1081081080999" cy="324.32432432438" r="17.297297297296" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_1__stack1"><circle cx="628.1081081080999" cy="410.81081081086" r="17.297297297296" fill="red" opacity="0"/></g><g class="schematic-port-hover sch-port-hover" data-schematic-port-id="source_port_0_2__stack1"><circle cx="628.1081081080999" cy="497.29729729734" r="17.297297297296" fill="red" opacity="0"/></g><text class="sch-text" x="725.40540540539" y="276.756756756816" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="51.891891891887994px" transform="rotate(0, 725.40540540539, 276.756756756816)">XXX</text><text class="sch-text" x="725.40540540539" y="363.243243243296" fill="#047857" text-anchor="middle" dominant-baseline="middle" font-family="sans-serif" font-size="51.891891891887994px" transform="rotate(0, 725.40540540539, 363.243243243296)">XXX</text>
|
|
70
|
+
</g>
|
|
71
|
+
</svg>
|
|
@@ -11,8 +11,10 @@ const inlineConnection = (
|
|
|
11
11
|
pinIds: [string, string],
|
|
12
12
|
fallbackNetLabelWidth: number,
|
|
13
13
|
inlineNetLabelWidth: number,
|
|
14
|
+
netLabelText?: string,
|
|
14
15
|
): InputDirectConnection => ({
|
|
15
16
|
netId,
|
|
17
|
+
netLabelText,
|
|
16
18
|
pinIds,
|
|
17
19
|
allowInlineNetLabel: true,
|
|
18
20
|
fallbackNetLabelWidth,
|
|
@@ -52,7 +54,7 @@ const routedInputProblem: InputProblem = {
|
|
|
52
54
|
},
|
|
53
55
|
],
|
|
54
56
|
directConnections: [
|
|
55
|
-
inlineConnection("OUT_A_P", ["J4.1", "U1.4"], 0.96, 0.64),
|
|
57
|
+
inlineConnection("OUT_A_P", ["J4.1", "U1.4"], 0.96, 0.64, "OUT A+"),
|
|
56
58
|
inlineConnection("OUT_A_N", ["J4.2", "U1.6"], 0.96, 0.64),
|
|
57
59
|
inlineConnection("OUT_B_N", ["J4.3", "U1.7"], 0.96, 0.64),
|
|
58
60
|
inlineConnection("OUT_B_P", ["J4.4", "U1.9"], 0.96, 0.64),
|
|
@@ -104,6 +106,11 @@ test("fallback label width does not split routable inline connections", () => {
|
|
|
104
106
|
(placement) => placement.stubTracePath === undefined,
|
|
105
107
|
),
|
|
106
108
|
).toBe(true)
|
|
109
|
+
expect(
|
|
110
|
+
output.inlineNetLabelPlacements.find(
|
|
111
|
+
(placement) => placement.netId === "OUT_A_P",
|
|
112
|
+
)?.netLabelText,
|
|
113
|
+
).toBe("OUT A+")
|
|
107
114
|
|
|
108
115
|
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
109
116
|
})
|
|
@@ -129,6 +136,7 @@ test("fallback label width sizes anchored labels when routing is skipped", () =>
|
|
|
129
136
|
directConnections: [
|
|
130
137
|
{
|
|
131
138
|
netId: "SIGNAL",
|
|
139
|
+
netLabelText: "User-facing signal",
|
|
132
140
|
pinIds: ["U1.1", "U2.1"],
|
|
133
141
|
allowInlineNetLabel: true,
|
|
134
142
|
fallbackNetLabelWidth: 0.96,
|
|
@@ -149,4 +157,5 @@ test("fallback label width sizes anchored labels when routing is skipped", () =>
|
|
|
149
157
|
expect(Math.max(fallbackPlacement!.width, fallbackPlacement!.height)).toBe(
|
|
150
158
|
0.96,
|
|
151
159
|
)
|
|
160
|
+
expect(fallbackPlacement!.netLabelText).toBe("User-facing signal")
|
|
152
161
|
})
|