@tscircuit/schematic-trace-solver 0.0.104 → 0.0.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ import { expect, test } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "./bug-report-20260721T221026Z.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("bug-report-20260721T221026Z", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -1,7 +1,7 @@
1
- <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="1.4002733499999995,-0.0012093000000001908 0.6000000000000001,0" data-type="line" data-label="" points="240.027335,339.4329900000001 160.00000000000003,339.31206000000003" fill="none" stroke="hsl(256, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.3997266500000003,1.1012093000000003 2.1487092999999997,1.3002732499999994" data-type="line" data-label="" points="239.97266500000006,229.19113 314.87093,209.2847350000001" fill="none" stroke="hsl(256, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="2.1487092999999997,1.3002732499999994 0.6000000000000001,0.2" data-type="line" data-label="" points="314.87093,209.2847350000001 160.00000000000003,319.31206000000003" fill="none" stroke="hsl(280, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="3.8000000000000003,0 3.2512907000000006,1.2997267500000007" data-type="line" data-label="" points="480,339.31206000000003 425.12907000000007,209.33938499999996" fill="none" stroke="hsl(336, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="3.8000000000000003,-0.9 3.2512907000000006,1.2997267500000007" data-type="line" data-label="" points="480,429.31206000000003 425.12907000000007,209.33938499999996" fill="none" stroke="hsl(336, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="2.0034928,-0.8350319000000007 0.6000000000000001,-0.2" data-type="line" data-label="" points="300.34928,422.8152500000001 160.00000000000003,359.31206000000003" fill="none" stroke="hsl(352, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="3.2512907000000006,1.2997267500000007 3.8000000000000003,0" data-type="line" data-label="" points="425.12907000000007,209.33938499999996 480,339.31206000000003" fill="none" stroke="hsl(123, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.2512907000000006,1.2997267500000007 3.8000000000000003,-0.9" data-type="line" data-label="" points="425.12907000000007,209.33938499999996 480,429.31206000000003" fill="none" stroke="hsl(123, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.8000000000000003,0 3.8000000000000003,-0.9" data-type="line" data-label="" points="480,339.31206000000003 480,429.31206000000003" fill="none" stroke="hsl(123, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.4002733499999995,-0.0012093000000001908 1.4002733499999995,-0.1012093000000002 1.0001366749999998,-0.1012093000000002 1.0001366749999998,0 0.6000000000000001,0" data-type="line" data-label="" points="240.027335,339.4329900000001 240.027335,349.4329900000001 200.0136675,349.4329900000001 200.0136675,339.31206000000003 160.00000000000003,339.31206000000003" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.1487092999999997,1.3002732499999994 1.3997266500000003,1.3002732499999994 1.3997266500000003,1.1012093000000003" data-type="line" data-label="" points="314.87093,209.2847350000001 239.97266500000006,209.2847350000001 239.97266500000006,229.19113" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.6000000000000001,0.2 0.9998633250000002,0.2 0.9998633250000002,1.3012093000000002 1.3997266500000003,1.3012093000000002 1.3997266500000003,1.1012093000000003" data-type="line" data-label="" points="160.00000000000003,319.31206000000003 199.98633250000006,319.31206000000003 199.98633250000006,209.19113000000002 239.97266500000006,209.19113000000002 239.97266500000006,229.19113" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.8000000000000003,-0.9 3.6000000000000005,-0.9 3.6000000000000005,0 3.8000000000000003,0" data-type="line" data-label="" points="480,429.31206000000003 460.0000000000001,429.31206000000003 460.0000000000001,339.31206000000003 480,339.31206000000003" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.2512907000000006,1.2997267500000007 3.5256453500000005,1.2997267500000007 3.5256453500000005,0 3.8000000000000003,0" data-type="line" data-label="" points="425.12907000000007,209.33938499999996 452.5645350000001,209.33938499999996 452.5645350000001,339.31206000000003 480,339.31206000000003" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.0034928,-0.8350319000000007 2.0034928,-0.2 0.6000000000000001,-0.2" data-type="line" data-label="" points="300.34928,422.8152500000001 300.34928,359.31206000000003 160.00000000000003,359.31206000000003" 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.00000000000003" y="299.31206000000003" width="120" height="80" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="1.4" data-y="0.55" x="213.54167" y="229.19113" width="52.916660000000036" height="110.24186000000009" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="2.7" data-y="1.3" x="314.87092999999993" y="189.86652500000008" width="110.25814000000008" height="38.8910699999999" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="4.4" data-y="0" x="480.0000000000001" y="319.31206000000003" width="120" height="40" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="4.4" data-y="-0.9" x="480.0000000000001" y="409.31206000000003" width="120" height="40" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="2" data-y="-1.1" x="255.41992" y="422.8152500000001" width="89.16015999999999" height="52.99361999999985" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="netId: solderjumper.JP8 &gt; port.pin2 to .U1 &gt; .pin6
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="1.4002733499999995,-0.0012093000000001908 0.6000000000000001,0" data-type="line" data-label="" points="240.027335,339.4329900000001 160.00000000000003,339.31206000000003" fill="none" stroke="hsl(256, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.3997266500000003,1.1012093000000003 2.1487092999999997,1.3002732499999994" data-type="line" data-label="" points="239.97266500000006,229.19113 314.87093,209.2847350000001" fill="none" stroke="hsl(256, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="2.1487092999999997,1.3002732499999994 0.6000000000000001,0.2" data-type="line" data-label="" points="314.87093,209.2847350000001 160.00000000000003,319.31206000000003" fill="none" stroke="hsl(280, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="3.8000000000000003,0 3.2512907000000006,1.2997267500000007" data-type="line" data-label="" points="480,339.31206000000003 425.12907000000007,209.33938499999996" fill="none" stroke="hsl(336, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="3.8000000000000003,-0.9 3.2512907000000006,1.2997267500000007" data-type="line" data-label="" points="480,429.31206000000003 425.12907000000007,209.33938499999996" fill="none" stroke="hsl(336, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="2.0034928,-0.8350319000000007 0.6000000000000001,-0.2" data-type="line" data-label="" points="300.34928,422.8152500000001 160.00000000000003,359.31206000000003" fill="none" stroke="hsl(352, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="3.2512907000000006,1.2997267500000007 3.8000000000000003,0" data-type="line" data-label="" points="425.12907000000007,209.33938499999996 480,339.31206000000003" fill="none" stroke="hsl(123, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.2512907000000006,1.2997267500000007 3.8000000000000003,-0.9" data-type="line" data-label="" points="425.12907000000007,209.33938499999996 480,429.31206000000003" fill="none" stroke="hsl(123, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.8000000000000003,0 3.8000000000000003,-0.9" data-type="line" data-label="" points="480,339.31206000000003 480,429.31206000000003" fill="none" stroke="hsl(123, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.4002733499999995,-0.0012093000000001908 1.4002733499999995,-0.1012093000000002 1.0001366749999998,-0.1012093000000002 1.0001366749999998,0 0.6000000000000001,0" data-type="line" data-label="" points="240.027335,339.4329900000001 240.027335,349.4329900000001 200.0136675,349.4329900000001 200.0136675,339.31206000000003 160.00000000000003,339.31206000000003" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.1487092999999997,1.3002732499999994 1.3997266500000003,1.3002732499999994 1.3997266500000003,1.1012093000000003" data-type="line" data-label="" points="314.87093,209.2847350000001 239.97266500000006,209.2847350000001 239.97266500000006,229.19113" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.6000000000000001,0.2 0.9998633250000002,0.2 0.9998633250000002,1.3012093000000002 1.3997266500000003,1.3012093000000002 1.3997266500000003,1.1012093000000003" data-type="line" data-label="" points="160.00000000000003,319.31206000000003 199.98633250000006,319.31206000000003 199.98633250000006,209.19113000000002 239.97266500000006,209.19113000000002 239.97266500000006,229.19113" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.8000000000000003,-0.9 3.6000000000000005,-0.9 3.6000000000000005,0 3.8000000000000003,0" data-type="line" data-label="" points="480,429.31206000000003 460.0000000000001,429.31206000000003 460.0000000000001,339.31206000000003 480,339.31206000000003" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.2512907000000006,1.2997267500000007 3.6,1.2997267500000007 3.6,0 3.8000000000000003,0" data-type="line" data-label="" points="425.12907000000007,209.33938499999996 460,209.33938499999996 460,339.31206000000003 480,339.31206000000003" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.0034928,-0.8350319000000007 2.0034928,-0.2 0.6000000000000001,-0.2" data-type="line" data-label="" points="300.34928,422.8152500000001 300.34928,359.31206000000003 160.00000000000003,359.31206000000003" 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.00000000000003" y="299.31206000000003" width="120" height="80" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="1.4" data-y="0.55" x="213.54167" y="229.19113" width="52.916660000000036" height="110.24186000000009" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="2.7" data-y="1.3" x="314.87092999999993" y="189.86652500000008" width="110.25814000000008" height="38.8910699999999" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="4.4" data-y="0" x="480.0000000000001" y="319.31206000000003" width="120" height="40" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="4.4" data-y="-0.9" x="480.0000000000001" y="409.31206000000003" width="120" height="40" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="2" data-y="-1.1" x="255.41992" y="422.8152500000001" width="89.16015999999999" height="52.99361999999985" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="netId: solderjumper.JP8 &gt; port.pin2 to .U1 &gt; .pin6
2
2
  globalConnNetId: connectivity_net3" data-x="2.2284928" data-y="-0.5175159500000004" x="300.34928" y="381.06365500000004" width="45" height="19.999999999999943" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="netId: resistor.R1 &gt; port.pin1 to .U1 &gt; .pin1
3
3
  globalConnNetId: connectivity_net1" data-x="1.3997266500000003" data-y="1.5262093000000003" x="229.97266500000006" y="164.19113" width="20.00000000000003" height="45.00000000000003" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01"/></g><g><rect data-type="rect" data-label="netId: PAD
4
- globalConnNetId: connectivity_net2" data-x="3.3884680250000008" data-y="1.5247267500000008" x="428.8468025000001" y="164.33938499999994" width="20" height="45.00000000000003" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01"/></g><g><circle data-type="point" data-label="U1.6
4
+ globalConnNetId: connectivity_net2" data-x="3.4256453500000004" data-y="1.5247267500000008" x="432.5645350000001" y="164.33938499999994" width="20" height="45.00000000000003" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01"/></g><g><circle data-type="point" data-label="U1.6
5
5
  x+" data-x="0.6000000000000001" data-y="-0.2" cx="160.00000000000003" cy="359.31206000000003" r="3" fill="hsl(324, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.8
6
6
  x+" data-x="0.6000000000000001" data-y="0" cx="160.00000000000003" cy="339.31206000000003" r="3" fill="hsl(326, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.1
7
7
  x+" data-x="0.6000000000000001" data-y="0.2" cx="160.00000000000003" cy="319.31206000000003" r="3" fill="hsl(319, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C2.1
@@ -16,7 +16,7 @@ y+" data-x="2.0034928" data-y="-0.8350319000000007" cx="300.34928" cy="422.81525
16
16
  x-" data-x="1.5541992" data-y="-1.2014628704999997" cx="255.41992000000002" cy="459.45834705" r="3" fill="hsl(247, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
17
17
  orientation: x+" data-x="2.0034928" data-y="-0.5175159500000004" cx="300.34928" cy="391.06365500000004" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
18
18
  orientation: y+" data-x="1.3997266500000003" data-y="1.3012093000000002" cx="239.97266500000006" cy="209.19113000000002" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
19
- orientation: y+" data-x="3.3884680250000008" data-y="1.2997267500000007" cx="438.8468025000001" cy="209.33938499999996" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
19
+ orientation: y+" data-x="3.4256453500000004" data-y="1.2997267500000007" cx="442.5645350000001" cy="209.33938499999996" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
20
20
  document.currentScript.parentElement.addEventListener('mousemove', (e) => {
21
21
  const svg = e.currentTarget;
22
22
  const rect = svg.getBoundingClientRect();
@@ -8,5 +8,9 @@ test("example19", () => {
8
8
 
9
9
  solver.solve()
10
10
 
11
+ const padTrace = solver
12
+ .netLabelTraceCollisionSolver!.getOutput()
13
+ .traces.find((trace) => trace.mspPairId === "R1.2-JP5.1")
14
+ expect(padTrace?.tracePath[1]?.x).toBeCloseTo(3.6)
11
15
  expect(solver).toMatchSolverSnapshot(import.meta.path)
12
16
  })
@@ -1,4 +1,4 @@
1
- <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="-2.6,2.2 -0.5,2" data-type="line" data-label="" points="84.13793103448276,230.89655172413794 200,241.93103448275863" fill="none" stroke="hsl(0, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5,2 2.45,1" data-type="line" data-label="" points="255.17241379310343,241.93103448275863 362.7586206896552,297.1034482758621" fill="none" stroke="hsl(304, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5,2 2.45,-1" data-type="line" data-label="" points="255.17241379310343,241.93103448275863 362.7586206896552,407.44827586206895" fill="none" stroke="hsl(304, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="3.55,1 5.45,1" data-type="line" data-label="" points="423.44827586206895,297.1034482758621 528.2758620689655,297.1034482758621" fill="none" stroke="hsl(312, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="3.55,-1 5.45,-1" data-type="line" data-label="" points="423.44827586206895,407.44827586206895 528.2758620689655,407.44827586206895" fill="none" stroke="hsl(320, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-2.6,1.8 6.55,1" data-type="line" data-label="" points="84.13793103448276,252.9655172413793 588.9655172413793,297.1034482758621" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.6,1.8 6.55,-1" data-type="line" data-label="" points="84.13793103448276,252.9655172413793 588.9655172413793,407.44827586206895" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="6.55,1 6.55,-1" data-type="line" data-label="" points="588.9655172413793,297.1034482758621 588.9655172413793,407.44827586206895" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.6,2.2 -1.55,2.2 -1.55,2 -0.5,2" data-type="line" data-label="" points="84.13793103448276,230.89655172413794 142.06896551724137,230.89655172413794 142.06896551724137,241.93103448275863 200,241.93103448275863" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.45,-1 2.25,-1 2.25,1 2.45,1" data-type="line" data-label="" points="362.7586206896552,407.44827586206895 351.7241379310345,407.44827586206895 351.7241379310345,297.1034482758621 362.7586206896552,297.1034482758621" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,2 1.475,2 1.475,1 2.45,1" data-type="line" data-label="" points="255.17241379310343,241.93103448275863 308.9655172413793,241.93103448275863 308.9655172413793,297.1034482758621 362.7586206896552,297.1034482758621" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.55,1 5.45,1" data-type="line" data-label="" points="423.44827586206895,297.1034482758621 528.2758620689655,297.1034482758621" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.55,-1 5.45,-1" data-type="line" data-label="" points="423.44827586206895,407.44827586206895 528.2758620689655,407.44827586206895" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="6.55,-1 6.75,-1 6.75,1 6.55,1" data-type="line" data-label="" points="588.9655172413793,407.44827586206895 600,407.44827586206895 600,297.1034482758621 588.9655172413793,297.1034482758621" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.6,1.8 -2.499,1.8 -2.499,1.5990000000000002" data-type="line" data-label="" points="84.13793103448276,252.9655172413793 89.7103448275862,252.9655172413793 89.7103448275862,264.0551724137931" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="BT1" data-x="-3" data-y="2" x="39.999999999999986" y="219.86206896551727" width="44.13793103448276" height="44.13793103448273" fill="hsl(199, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="SW1" data-x="0" data-y="2" x="200" y="219.86206896551727" width="55.17241379310343" height="44.13793103448273" fill="hsl(69, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="R1" data-x="3" data-y="1" x="362.75862068965523" y="286.3748772413793" width="60.68965517241378" height="21.45714206896554" fill="hsl(71, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="R2" data-x="3" data-y="-1" x="362.75862068965523" y="396.71970482758616" width="60.68965517241378" height="21.45714206896554" fill="hsl(72, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="D1" data-x="6" data-y="1" x="528.2758620689656" y="286.3748772413793" width="60.689655172413836" height="21.45714206896554" fill="hsl(357, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="D2" data-x="6" data-y="-1" x="528.2758620689656" y="396.71970482758616" width="60.689655172413836" height="21.45714206896554" fill="hsl(358, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="netId: BT1.plus to SW1.in
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="-2.6,2.2 -0.5,2" data-type="line" data-label="" points="84.13793103448276,230.89655172413794 200,241.93103448275863" fill="none" stroke="hsl(0, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5,2 2.45,1" data-type="line" data-label="" points="255.17241379310343,241.93103448275863 362.7586206896552,297.1034482758621" fill="none" stroke="hsl(304, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5,2 2.45,-1" data-type="line" data-label="" points="255.17241379310343,241.93103448275863 362.7586206896552,407.44827586206895" fill="none" stroke="hsl(304, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="3.55,1 5.45,1" data-type="line" data-label="" points="423.44827586206895,297.1034482758621 528.2758620689655,297.1034482758621" fill="none" stroke="hsl(312, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="3.55,-1 5.45,-1" data-type="line" data-label="" points="423.44827586206895,407.44827586206895 528.2758620689655,407.44827586206895" fill="none" stroke="hsl(320, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-2.6,1.8 6.55,1" data-type="line" data-label="" points="84.13793103448276,252.9655172413793 588.9655172413793,297.1034482758621" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.6,1.8 6.55,-1" data-type="line" data-label="" points="84.13793103448276,252.9655172413793 588.9655172413793,407.44827586206895" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="6.55,1 6.55,-1" data-type="line" data-label="" points="588.9655172413793,297.1034482758621 588.9655172413793,407.44827586206895" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-2.6,2.2 -1.55,2.2 -1.55,2 -0.5,2" data-type="line" data-label="" points="84.13793103448276,230.89655172413794 142.06896551724137,230.89655172413794 142.06896551724137,241.93103448275863 200,241.93103448275863" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.45,-1 2.25,-1 2.25,1 2.45,1" data-type="line" data-label="" points="362.7586206896552,407.44827586206895 351.7241379310345,407.44827586206895 351.7241379310345,297.1034482758621 362.7586206896552,297.1034482758621" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,2 2.25,2 2.25,1 2.45,1" data-type="line" data-label="" points="255.17241379310343,241.93103448275863 351.7241379310345,241.93103448275863 351.7241379310345,297.1034482758621 362.7586206896552,297.1034482758621" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.55,1 5.45,1" data-type="line" data-label="" points="423.44827586206895,297.1034482758621 528.2758620689655,297.1034482758621" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.55,-1 5.45,-1" data-type="line" data-label="" points="423.44827586206895,407.44827586206895 528.2758620689655,407.44827586206895" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="6.55,-1 6.75,-1 6.75,1 6.55,1" data-type="line" data-label="" points="588.9655172413793,407.44827586206895 600,407.44827586206895 600,297.1034482758621 588.9655172413793,297.1034482758621" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-2.6,1.8 -2.499,1.8 -2.499,1.5990000000000002" data-type="line" data-label="" points="84.13793103448276,252.9655172413793 89.7103448275862,252.9655172413793 89.7103448275862,264.0551724137931" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="BT1" data-x="-3" data-y="2" x="39.999999999999986" y="219.86206896551727" width="44.13793103448276" height="44.13793103448273" fill="hsl(199, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="SW1" data-x="0" data-y="2" x="200" y="219.86206896551727" width="55.17241379310343" height="44.13793103448273" fill="hsl(69, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="R1" data-x="3" data-y="1" x="362.75862068965523" y="286.3748772413793" width="60.68965517241378" height="21.45714206896554" fill="hsl(71, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="R2" data-x="3" data-y="-1" x="362.75862068965523" y="396.71970482758616" width="60.68965517241378" height="21.45714206896554" fill="hsl(72, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="D1" data-x="6" data-y="1" x="528.2758620689656" y="286.3748772413793" width="60.689655172413836" height="21.45714206896554" fill="hsl(357, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="D2" data-x="6" data-y="-1" x="528.2758620689656" y="396.71970482758616" width="60.689655172413836" height="21.45714206896554" fill="hsl(358, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="netId: BT1.plus to SW1.in
2
2
  globalConnNetId: connectivity_net0" data-x="-2.075" data-y="2.4250000000000003" x="107.58620689655172" y="206.06896551724137" width="11.034482758620712" height="24.82758620689657" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="netId: GND
3
3
  globalConnNetId: connectivity_net4" data-x="-2.499" data-y="1.3590000000000002" x="84.19310344827585" y="264.0551724137931" width="11.034482758620697" height="26.48275862068965" fill="#00000066" stroke="#000000" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="netId: GND
4
4
  globalConnNetId: connectivity_net4" data-x="6.65" data-y="-1.24" x="588.9655172413793" y="407.44827586206895" width="11.034482758620697" height="26.48275862068965" fill="#00000066" stroke="#000000" stroke-width="0.018125000000000002"/></g><g><rect data-type="rect" data-label="netId: SW1.out to R2.left
@@ -0,0 +1,56 @@
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="-2.65,0 2.75,-0.2" data-type="line" data-label="" points="182.64150943396226,325.811320754717 467.92452830188677,336.37735849056605" fill="none" stroke="hsl(288, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-2.65,-0.2 2.75,0" data-type="line" data-label="" points="182.64150943396226,336.37735849056605 467.92452830188677,325.811320754717" fill="none" stroke="hsl(344, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-2.65,0 0.050000000000000044,0 0.050000000000000044,-0.2 2.75,-0.2" data-type="line" data-label="" points="182.64150943396226,325.811320754717 325.2830188679245,325.811320754717 325.2830188679245,336.37735849056605 467.92452830188677,336.37735849056605" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="-4" data-y="0" x="40" y="304.6792452830189" width="142.64150943396226" height="42.2641509433962" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01892857142857143"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="4" data-y="0" x="467.92452830188677" y="304.6792452830189" width="132.07547169811323" height="42.2641509433962" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01892857142857143"/></g><g><rect data-type="rect" data-label="power" data-x="-4.65" data-y="0.53" x="61.13207547169809" y="293.0566037735849" width="31.698113207547152" height="9.509433962264097" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.01892857142857143"/></g><g><rect data-type="rect" data-label="load" data-x="3.3899999999999997" data-y="0.53" x="489.0566037735849" y="293.0566037735849" width="25.358490566037688" height="9.509433962264097" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.01892857142857143"/></g><g><rect data-type="rect" data-label="netId: .power &gt; .VOUT_3V3 to .load &gt; .3V3
2
+ globalConnNetId: connectivity_net0" data-x="-1.2999999999999998" data-y="0.225" x="248.67924528301884" y="302.0377358490566" width="10.56603773584908" height="23.773584905660357" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01892857142857143"/></g><g><rect data-type="rect" data-label="netId: .power &gt; .SEC_GND to .load &gt; .GND
3
+ globalConnNetId: connectivity_net1" data-x="-2.424" data-y="-0.2" x="182.6943396226415" y="331.09433962264154" width="23.773584905660385" height="10.56603773584908" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01892857142857143"/></g><g><rect data-type="rect" data-label="netId: .power &gt; .SEC_GND to .load &gt; .GND
4
+ globalConnNetId: connectivity_net1" data-x="2.524" data-y="0" x="444.0981132075471" y="320.52830188679246" width="23.773584905660414" height="10.566037735849022" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01892857142857143"/></g><g><circle data-type="point" data-label="schematic_component_0.1
5
+ x+" data-x="-2.65" data-y="0.2" cx="182.64150943396226" cy="315.2452830188679" r="3" fill="hsl(96, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_component_0.2
6
+ x+" data-x="-2.65" data-y="0" cx="182.64150943396226" cy="325.811320754717" r="3" fill="hsl(96, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_component_0.3
7
+ x+" data-x="-2.65" data-y="-0.2" cx="182.64150943396226" cy="336.37735849056605" r="3" fill="hsl(96, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_component_1.1
8
+ x-" data-x="2.75" data-y="0.2" cx="467.92452830188677" cy="315.2452830188679" r="3" fill="hsl(96, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_component_1.2
9
+ x-" data-x="2.75" data-y="0" cx="467.92452830188677" cy="325.811320754717" r="3" fill="hsl(96, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="schematic_component_1.3
10
+ x-" data-x="2.75" data-y="-0.2" cx="467.92452830188677" cy="336.37735849056605" r="3" fill="hsl(96, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
11
+ orientation: y+" data-x="-1.2999999999999998" data-y="0" cx="253.96226415094338" cy="325.811320754717" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
12
+ orientation: x+" data-x="-2.65" data-y="-0.2" cx="182.64150943396226" cy="336.37735849056605" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
13
+ orientation: x-" data-x="2.75" data-y="0" cx="467.92452830188677" cy="325.811320754717" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
14
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
15
+ const svg = e.currentTarget;
16
+ const rect = svg.getBoundingClientRect();
17
+ const x = e.clientX - rect.left;
18
+ const y = e.clientY - rect.top;
19
+ const crosshair = svg.getElementById('crosshair');
20
+ const h = svg.getElementById('crosshair-h');
21
+ const v = svg.getElementById('crosshair-v');
22
+ const coords = svg.getElementById('coordinates');
23
+
24
+ crosshair.style.display = 'block';
25
+ h.setAttribute('x1', '0');
26
+ h.setAttribute('x2', '640');
27
+ h.setAttribute('y1', y);
28
+ h.setAttribute('y2', y);
29
+ v.setAttribute('x1', x);
30
+ v.setAttribute('x2', x);
31
+ v.setAttribute('y1', '0');
32
+ v.setAttribute('y2', '640');
33
+
34
+ // Calculate real coordinates using inverse transformation
35
+ const matrix = {"a":52.83018867924528,"c":0,"e":322.64150943396226,"b":0,"d":-52.83018867924528,"f":325.811320754717};
36
+ // Manually invert and apply the affine transform
37
+ // Since we only use translate and scale, we can directly compute:
38
+ // x' = (x - tx) / sx
39
+ // y' = (y - ty) / sy
40
+ const sx = matrix.a;
41
+ const sy = matrix.d;
42
+ const tx = matrix.e;
43
+ const ty = matrix.f;
44
+ const realPoint = {
45
+ x: (x - tx) / sx,
46
+ y: (y - ty) / sy // Flip y back since we used negative scale
47
+ }
48
+
49
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
50
+ coords.setAttribute('x', (x + 5).toString());
51
+ coords.setAttribute('y', (y - 5).toString());
52
+ });
53
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
54
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
55
+ });
56
+ ]]></script></svg>