@tscircuit/schematic-trace-solver 0.0.28 → 0.0.29

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.
@@ -2,88 +2,85 @@
2
2
  <rect width="100%" height="100%" fill="white" />
3
3
  <g>
4
4
  <circle data-type="point" data-label="J1.1
5
- x+" data-x="1.1" data-y="0.2" cx="288.33702882483374" cy="207.43247369481963" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
5
+ x+" data-x="1.1" data-y="0.2" cx="307.24511930585686" cy="214.38286420824303" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
6
6
  </g>
7
7
  <g>
8
8
  <circle data-type="point" data-label="J1.2
9
- x+" data-x="1.1" data-y="0" cx="288.33702882483374" cy="230.00856722434997" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
9
+ x+" data-x="1.1" data-y="0" cx="307.24511930585686" cy="238.67787505423001" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
10
10
  </g>
11
11
  <g>
12
12
  <circle data-type="point" data-label="J1.3
13
- x+" data-x="1.1" data-y="-0.2" cx="288.33702882483374" cy="252.5846607538803" r="3" fill="hsl(220, 100%, 50%, 0.8)" />
13
+ x+" data-x="1.1" data-y="-0.2" cx="307.24511930585686" cy="262.972885900217" r="3" fill="hsl(220, 100%, 50%, 0.8)" />
14
14
  </g>
15
15
  <g>
16
16
  <circle data-type="point" data-label="R1.1
17
- x-" data-x="0.5499999999999996" data-y="-1.7944553499999996" cx="226.25277161862525" cy="432.5675263051804" r="3" fill="hsl(226, 100%, 50%, 0.8)" />
17
+ x-" data-x="0.5499999999999996" data-y="-1.7944553499999996" cx="240.4338394793926" cy="456.65943600867683" r="3" fill="hsl(226, 100%, 50%, 0.8)" />
18
18
  </g>
19
19
  <g>
20
20
  <circle data-type="point" data-label="R1.2
21
- x+" data-x="1.6499999999999997" data-y="-1.7944553499999996" cx="350.4212860310421" cy="432.5675263051804" r="3" fill="hsl(227, 100%, 50%, 0.8)" />
21
+ x+" data-x="1.6499999999999997" data-y="-1.7944553499999996" cx="374.05639913232096" cy="456.65943600867683" r="3" fill="hsl(227, 100%, 50%, 0.8)" />
22
22
  </g>
23
23
  <g>
24
24
  <circle data-type="point" data-label="C1.1
25
- x-" data-x="2.3099999999999996" data-y="0.01999999999999985" cx="424.9223946784922" cy="227.75095787139696" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
25
+ x-" data-x="2.3099999999999996" data-y="0.01999999999999985" cx="454.229934924078" cy="236.24837396963133" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
26
26
  </g>
27
27
  <g>
28
28
  <circle data-type="point" data-label="C1.2
29
- x+" data-x="3.41" data-y="0.01999999999999985" cx="549.090909090909" cy="227.75095787139696" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
29
+ x+" data-x="3.41" data-y="0.01999999999999985" cx="587.8524945770065" cy="236.24837396963133" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
30
30
  </g>
31
31
  <g>
32
- <circle data-type="point" data-label="" data-x="1.3" data-y="0.2" cx="310.9131223543641" cy="207.43247369481963" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
32
+ <circle data-type="point" data-label="" data-x="1.3" data-y="0.2" cx="331.5401301518438" cy="214.38286420824303" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
33
33
  </g>
34
34
  <g>
35
- <circle data-type="point" data-label="" data-x="1.3" data-y="-0.4486138374999999" cx="310.9131223543641" cy="280.6483069945576" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
35
+ <circle data-type="point" data-label="" data-x="1.2" data-y="-0.8972276749999998" cx="319.3926247288503" cy="347.6686555314534" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
36
36
  </g>
37
37
  <g>
38
- <circle data-type="point" data-label="" data-x="1.8499999999999996" data-y="-1.7944553499999996" cx="372.9973795605724" cy="432.5675263051804" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
38
+ <circle data-type="point" data-label="" data-x="1.5525" data-y="-1" cx="362.2125813449024" cy="360.15292928416494" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
39
39
  </g>
40
40
  <g>
41
- <circle data-type="point" data-label="" data-x="3.41" data-y="0.01999999999999985" cx="549.090909090909" cy="227.75095787139696" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
41
+ <polyline data-points="1.1,0.2 2.3099999999999996,0.01999999999999985" data-type="line" data-label="" points="307.24511930585686,214.38286420824303 454.229934924078,236.24837396963133" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
42
42
  </g>
43
43
  <g>
44
- <polyline data-points="1.1,0.2 2.3099999999999996,0.01999999999999985" data-type="line" data-label="" points="288.33702882483374,207.43247369481963 424.9223946784922,227.75095787139696" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
44
+ <polyline data-points="1.1,0 0.5499999999999996,-1.7944553499999996" data-type="line" data-label="" points="307.24511930585686,238.67787505423001 240.4338394793926,456.65943600867683" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
45
45
  </g>
46
46
  <g>
47
- <polyline data-points="1.1,0 0.5499999999999996,-1.7944553499999996" data-type="line" data-label="" points="288.33702882483374,230.00856722434997 226.25277161862525,432.5675263051804" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
47
+ <polyline data-points="1.1,-0.2 1.6499999999999997,-1.7944553499999996" data-type="line" data-label="" points="307.24511930585686,262.972885900217 374.05639913232096,456.65943600867683" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
48
48
  </g>
49
49
  <g>
50
- <polyline data-points="1.1,-0.2 1.6499999999999997,-1.7944553499999996" data-type="line" data-label="" points="288.33702882483374,252.5846607538803 350.4212860310421,432.5675263051804" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
50
+ <polyline data-points="1.1,-0.2 3.41,0.01999999999999985" data-type="line" data-label="" points="307.24511930585686,262.972885900217 587.8524945770065,236.24837396963133" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
51
51
  </g>
52
52
  <g>
53
- <polyline data-points="1.1,-0.2 3.41,0.01999999999999985" data-type="line" data-label="" points="288.33702882483374,252.5846607538803 549.090909090909,227.75095787139696" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
53
+ <polyline data-points="1.6499999999999997,-1.7944553499999996 3.41,0.01999999999999985" data-type="line" data-label="" points="374.05639913232096,456.65943600867683 587.8524945770065,236.24837396963133" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
54
54
  </g>
55
55
  <g>
56
- <polyline data-points="1.6499999999999997,-1.7944553499999996 3.41,0.01999999999999985" data-type="line" data-label="" points="350.4212860310421,432.5675263051804 549.090909090909,227.75095787139696" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
56
+ <polyline data-points="1.1,0.2 1.3,0.2 1.6049999999999998,0.2 1.6049999999999998,0.01999999999999985 2.1099999999999994,0.01999999999999985 2.3099999999999996,0.01999999999999985" data-type="line" data-label="" points="307.24511930585686,214.38286420824303 331.5401301518438,214.38286420824303 368.5900216919739,214.38286420824303 368.5900216919739,236.24837396963133 429.934924078091,236.24837396963133 454.229934924078,236.24837396963133" fill="none" stroke="purple" stroke-width="1" />
57
57
  </g>
58
58
  <g>
59
- <polyline data-points="1.1,0.2 1.3,0.2 1.7049999999999998,0.2 1.7049999999999998,0.01999999999999985 2.1099999999999994,0.01999999999999985 2.3099999999999996,0.01999999999999985" data-type="line" data-label="" points="288.33702882483374,207.43247369481963 310.9131223543641,207.43247369481963 356.62971175166297,207.43247369481963 356.62971175166297,227.75095787139696 402.34630114896186,227.75095787139696 424.9223946784922,227.75095787139696" fill="none" stroke="purple" stroke-width="1" />
59
+ <polyline data-points="1.1,0 1.2,0 1.2,-0.8972276749999998 0.34999999999999964,-0.8972276749999998 0.34999999999999964,-1.7944553499999996 0.5499999999999996,-1.7944553499999996" data-type="line" data-label="" points="307.24511930585686,238.67787505423001 319.3926247288503,238.67787505423001 319.3926247288503,347.6686555314534 216.1388286334056,347.6686555314534 216.1388286334056,456.65943600867683 240.4338394793926,456.65943600867683" fill="none" stroke="purple" stroke-width="1" />
60
60
  </g>
61
61
  <g>
62
- <polyline data-points="1.1,0 1.3,0 1.3,-0.8972276749999998 0.34999999999999964,-0.8972276749999998 0.34999999999999964,-1.7944553499999996 0.5499999999999996,-1.7944553499999996" data-type="line" data-label="" points="288.33702882483374,230.00856722434997 310.9131223543641,230.00856722434997 310.9131223543641,331.28804676476517 203.6766780890949,331.28804676476517 203.6766780890949,432.5675263051804 226.25277161862525,432.5675263051804" fill="none" stroke="purple" stroke-width="1" />
62
+ <polyline data-points="1.1,-0.2 1.805,-0.2 1.805,0.5399999999999998 3.5100000000000002,0.5399999999999998 3.5100000000000002,0.01999999999999985 3.41,0.01999999999999985" data-type="line" data-label="" points="307.24511930585686,262.972885900217 392.8850325379609,262.972885900217 392.8850325379609,173.08134577006518 600,173.08134577006518 600,236.24837396963133 587.8524945770065,236.24837396963133" fill="none" stroke="purple" stroke-width="1" />
63
63
  </g>
64
64
  <g>
65
- <polyline data-points="1.6499999999999997,-1.7944553499999996 1.8499999999999996,-1.7944553499999996 1.8499999999999996,-0.2 1.1,-0.2" data-type="line" data-label="" points="350.4212860310421,432.5675263051804 372.9973795605724,432.5675263051804 372.9973795605724,252.5846607538803 288.33702882483374,252.5846607538803" fill="none" stroke="purple" stroke-width="1" />
65
+ <polyline data-points="1.6499999999999997,-1.7944553499999996 1.7049999999999998,-1.7944553499999996 1.7049999999999998,-1 1.4000000000000001,-1 1.4000000000000001,-0.2 1.1,-0.2" data-type="line" data-label="" points="374.05639913232096,456.65943600867683 380.7375271149674,456.65943600867683 380.7375271149674,360.15292928416494 343.6876355748373,360.15292928416494 343.6876355748373,262.972885900217 307.24511930585686,262.972885900217" fill="none" stroke="purple" stroke-width="1" />
66
66
  </g>
67
67
  <g>
68
- <rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="40.000000000000014" y="184.8563801652893" width="248.33702882483374" height="90.30437411812136" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008858928571428573" />
68
+ <rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="40.00000000000003" y="190.08785336225606" width="267.24511930585686" height="97.18004338394792" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008232142857142858" />
69
69
  </g>
70
70
  <g>
71
- <rect data-type="rect" data-label="schematic_component_1" data-x="1.0999999999999996" data-y="-1.7944553499999996" x="226.25277161862525" y="410.61731546059264" width="124.16851441241684" height="43.90042168917546" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008858928571428573" />
71
+ <rect data-type="rect" data-label="schematic_component_1" data-x="1.0999999999999996" data-y="-1.7944553499999996" x="240.4338394793926" y="433.0379618221259" width="133.62255965292837" height="47.2429483731018" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008232142857142858" />
72
72
  </g>
73
73
  <g>
74
- <rect data-type="rect" data-label="schematic_component_2" data-x="2.86" data-y="0.01999999999999985" x="424.9223946784922" y="180.34116145938327" width="124.16851441241681" height="94.81959282402738" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008858928571428573" />
74
+ <rect data-type="rect" data-label="schematic_component_2" data-x="2.86" data-y="0.01999999999999985" x="454.229934924078" y="185.2288511930587" width="133.6225596529285" height="102.03904555314529" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008232142857142858" />
75
75
  </g>
76
76
  <g>
77
- <rect data-type="rect" data-label="" data-x="1.3" data-y="0.42500000000000004" x="299.62507558959885" y="156.6362632533764" width="22.57609352953034" height="50.796210441443236" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008858928571428573" />
77
+ <rect data-type="rect" data-label="" data-x="1.3" data-y="0.42500000000000004" x="319.3926247288503" y="159.71908980477232" width="24.295010845987008" height="54.66377440347071" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008232142857142858" />
78
78
  </g>
79
79
  <g>
80
- <rect data-type="rect" data-label="" data-x="1.5250000000000001" data-y="-0.4486138374999999" x="310.9131223543641" y="269.3602602297924" width="50.796210441443236" height="22.57609352953034" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008858928571428573" />
80
+ <rect data-type="rect" data-label="" data-x="1.2" data-y="-1.1222276749999998" x="307.2451193058568" y="347.6686555314534" width="24.295010845987008" height="54.66377440347071" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008232142857142858" />
81
81
  </g>
82
82
  <g>
83
- <rect data-type="rect" data-label="" data-x="1.8499999999999996" data-y="-2.0194553499999994" x="361.7093327958072" y="432.56752630518037" width="22.576093529530397" height="50.79621044144329" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008858928571428573" />
84
- </g>
85
- <g>
86
- <rect data-type="rect" data-label="" data-x="3.636" data-y="0.01999999999999985" x="549.2037895585568" y="216.4629111066318" width="50.796210441443236" height="22.57609352953034" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008858928571428573" />
83
+ <rect data-type="rect" data-label="" data-x="1.5525" data-y="-1.225" x="350.0650759219089" y="360.15292928416494" width="24.295010845987008" height="54.66377440347071" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008232142857142858" />
87
84
  </g>
88
85
  <g id="crosshair" style="display: none">
89
86
  <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
@@ -113,12 +110,12 @@ x+" data-x="3.41" data-y="0.01999999999999985" cx="549.090909090909" cy="227.750
113
110
 
114
111
  // Calculate real coordinates using inverse transformation
115
112
  const matrix = {
116
- "a": 112.88046764765167,
113
+ "a": 121.47505422993491,
117
114
  "c": 0,
118
- "e": 164.16851441241687,
115
+ "e": 173.62255965292843,
119
116
  "b": 0,
120
- "d": -112.88046764765167,
121
- "f": 230.00856722434997
117
+ "d": -121.47505422993491,
118
+ "f": 238.67787505423001
122
119
  };
123
120
  // Manually invert and apply the affine transform
124
121
  // Since we only use translate and scale, we can directly compute: