@tscircuit/schematic-trace-solver 0.0.75 → 0.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6902,6 +6902,58 @@ var VccNetLabelCornerPlacementSolver = class extends BaseSolver {
6902
6902
  }
6903
6903
  };
6904
6904
 
6905
+ // lib/utils/dedupeOrientations.ts
6906
+ var dedupeOrientations = (orientations) => [
6907
+ ...new Set(orientations)
6908
+ ];
6909
+
6910
+ // lib/utils/dedupeStrings.ts
6911
+ var dedupeStrings = (values) => [
6912
+ ...new Set(values.filter((value) => value !== void 0))
6913
+ ];
6914
+
6915
+ // lib/utils/getOrientationConstraintKeys.ts
6916
+ var getOrientationConstraintKeys = (inputProblem, label) => dedupeStrings([
6917
+ label.netId,
6918
+ label.globalConnNetId,
6919
+ ...inputProblem.netConnections.filter(
6920
+ (connection) => label.pinIds.some((pinId) => connection.pinIds.includes(pinId))
6921
+ ).map((connection) => connection.netId)
6922
+ ]);
6923
+
6924
+ // lib/utils/normalizeFacingDirection.ts
6925
+ var normalizeFacingDirection = (value) => {
6926
+ switch (value) {
6927
+ case "x+":
6928
+ case "+x":
6929
+ return "x+";
6930
+ case "x-":
6931
+ case "-x":
6932
+ return "x-";
6933
+ case "y+":
6934
+ case "+y":
6935
+ return "y+";
6936
+ case "y-":
6937
+ case "-y":
6938
+ return "y-";
6939
+ }
6940
+ };
6941
+
6942
+ // lib/utils/getOrientationConstraint.ts
6943
+ var getOrientationConstraint = (inputProblem, label) => {
6944
+ const availableOrientations = inputProblem.availableNetLabelOrientations ?? {};
6945
+ for (const netId of getOrientationConstraintKeys(inputProblem, label)) {
6946
+ if (Object.hasOwn(availableOrientations, netId)) {
6947
+ return dedupeOrientations(
6948
+ (availableOrientations[netId] ?? []).map(normalizeFacingDirection).filter(
6949
+ (orientation) => orientation !== void 0
6950
+ )
6951
+ );
6952
+ }
6953
+ }
6954
+ return null;
6955
+ };
6956
+
6905
6957
  // lib/solvers/TraceAnchoredNetLabelOverlapSolver/geometry.ts
6906
6958
  var EPS10 = 1e-6;
6907
6959
  var TRACE_BOUNDARY_TOLERANCE2 = 1e-6;
@@ -7128,26 +7180,6 @@ var createCandidate = (params) => {
7128
7180
  selected: false
7129
7181
  };
7130
7182
  };
7131
- var getOrientationConstraint = (inputProblem, label) => {
7132
- const availableOrientations = inputProblem.availableNetLabelOrientations ?? {};
7133
- for (const netId of getOrientationConstraintKeys(inputProblem, label)) {
7134
- if (Object.hasOwn(availableOrientations, netId)) {
7135
- return dedupeOrientations(
7136
- (availableOrientations[netId] ?? []).map(normalizeFacingDirection).filter(
7137
- (orientation) => orientation !== void 0
7138
- )
7139
- );
7140
- }
7141
- }
7142
- return null;
7143
- };
7144
- var getOrientationConstraintKeys = (inputProblem, label) => dedupeStrings([
7145
- label.netId,
7146
- label.globalConnNetId,
7147
- ...inputProblem.netConnections.filter(
7148
- (connection) => label.pinIds.some((pinId) => connection.pinIds.includes(pinId))
7149
- ).map((connection) => connection.netId)
7150
- ]);
7151
7183
  var getUnconstrainedOrientations = (params) => {
7152
7184
  const { label, inputProblem, point } = params;
7153
7185
  return dedupeOrientations([
@@ -7286,28 +7318,6 @@ var getNetLabelHeight = (inputProblem, label) => {
7286
7318
  )?.netLabelHeight;
7287
7319
  };
7288
7320
  var roundDistance = (distance3) => Number(distance3.toFixed(6));
7289
- var dedupeOrientations = (orientations) => [
7290
- ...new Set(orientations)
7291
- ];
7292
- var normalizeFacingDirection = (value) => {
7293
- switch (value) {
7294
- case "x+":
7295
- case "+x":
7296
- return "x+";
7297
- case "x-":
7298
- case "-x":
7299
- return "x-";
7300
- case "y+":
7301
- case "+y":
7302
- return "y+";
7303
- case "y-":
7304
- case "-y":
7305
- return "y-";
7306
- }
7307
- };
7308
- var dedupeStrings = (values) => [
7309
- ...new Set(values.filter((value) => value !== void 0))
7310
- ];
7311
7321
  var isSamePlacement = (label, point, orientation) => Math.abs(point.x - label.anchorPoint.x) <= EPS10 && Math.abs(point.y - label.anchorPoint.y) <= EPS10 && orientation === label.orientation;
7312
7322
 
7313
7323
  // lib/solvers/TraceAnchoredNetLabelOverlapSolver/visualize.ts
@@ -5,7 +5,9 @@ import {
5
5
  } from "lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/geometry"
6
6
  import type { NetLabelPlacement } from "lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver"
7
7
  import type { InputProblem } from "lib/types/InputProblem"
8
+ import { dedupeOrientations } from "lib/utils/dedupeOrientations"
8
9
  import type { FacingDirection } from "lib/utils/dir"
10
+ import { getOrientationConstraint } from "lib/utils/getOrientationConstraint"
9
11
  import {
10
12
  EPS,
11
13
  getManhattanDistance,
@@ -145,41 +147,6 @@ const createCandidate = (params: {
145
147
  }
146
148
  }
147
149
 
148
- const getOrientationConstraint = (
149
- inputProblem: InputProblem,
150
- label: NetLabelPlacement,
151
- ): FacingDirection[] | null => {
152
- const availableOrientations = inputProblem.availableNetLabelOrientations ?? {}
153
- for (const netId of getOrientationConstraintKeys(inputProblem, label)) {
154
- if (Object.hasOwn(availableOrientations, netId)) {
155
- return dedupeOrientations(
156
- (availableOrientations[netId] ?? [])
157
- .map(normalizeFacingDirection)
158
- .filter(
159
- (orientation): orientation is FacingDirection =>
160
- orientation !== undefined,
161
- ),
162
- )
163
- }
164
- }
165
-
166
- return null
167
- }
168
-
169
- const getOrientationConstraintKeys = (
170
- inputProblem: InputProblem,
171
- label: NetLabelPlacement,
172
- ) =>
173
- dedupeStrings([
174
- label.netId,
175
- label.globalConnNetId,
176
- ...inputProblem.netConnections
177
- .filter((connection) =>
178
- label.pinIds.some((pinId) => connection.pinIds.includes(pinId)),
179
- )
180
- .map((connection) => connection.netId),
181
- ])
182
-
183
150
  const getUnconstrainedOrientations = (params: {
184
151
  label: NetLabelPlacement
185
152
  inputProblem: InputProblem
@@ -381,33 +348,6 @@ const getNetLabelHeight = (
381
348
 
382
349
  const roundDistance = (distance: number) => Number(distance.toFixed(6))
383
350
 
384
- const dedupeOrientations = (orientations: FacingDirection[]) => [
385
- ...new Set(orientations),
386
- ]
387
-
388
- const normalizeFacingDirection = (
389
- value: string,
390
- ): FacingDirection | undefined => {
391
- switch (value) {
392
- case "x+":
393
- case "+x":
394
- return "x+"
395
- case "x-":
396
- case "-x":
397
- return "x-"
398
- case "y+":
399
- case "+y":
400
- return "y+"
401
- case "y-":
402
- case "-y":
403
- return "y-"
404
- }
405
- }
406
-
407
- const dedupeStrings = (values: Array<string | undefined>) => [
408
- ...new Set(values.filter((value): value is string => value !== undefined)),
409
- ]
410
-
411
351
  const isSamePlacement = (
412
352
  label: NetLabelPlacement,
413
353
  point: Point,
@@ -0,0 +1,5 @@
1
+ import type { FacingDirection } from "./dir"
2
+
3
+ export const dedupeOrientations = (orientations: FacingDirection[]) => [
4
+ ...new Set(orientations),
5
+ ]
@@ -0,0 +1,3 @@
1
+ export const dedupeStrings = (values: Array<string | undefined>) => [
2
+ ...new Set(values.filter((value): value is string => value !== undefined)),
3
+ ]
@@ -0,0 +1,27 @@
1
+ import type { NetLabelPlacement } from "lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver"
2
+ import type { InputProblem } from "lib/types/InputProblem"
3
+ import { dedupeOrientations } from "./dedupeOrientations"
4
+ import type { FacingDirection } from "./dir"
5
+ import { getOrientationConstraintKeys } from "./getOrientationConstraintKeys"
6
+ import { normalizeFacingDirection } from "./normalizeFacingDirection"
7
+
8
+ export const getOrientationConstraint = (
9
+ inputProblem: InputProblem,
10
+ label: NetLabelPlacement,
11
+ ): FacingDirection[] | null => {
12
+ const availableOrientations = inputProblem.availableNetLabelOrientations ?? {}
13
+ for (const netId of getOrientationConstraintKeys(inputProblem, label)) {
14
+ if (Object.hasOwn(availableOrientations, netId)) {
15
+ return dedupeOrientations(
16
+ (availableOrientations[netId] ?? [])
17
+ .map(normalizeFacingDirection)
18
+ .filter(
19
+ (orientation): orientation is FacingDirection =>
20
+ orientation !== undefined,
21
+ ),
22
+ )
23
+ }
24
+ }
25
+
26
+ return null
27
+ }
@@ -0,0 +1,17 @@
1
+ import type { NetLabelPlacement } from "lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver"
2
+ import type { InputProblem } from "lib/types/InputProblem"
3
+ import { dedupeStrings } from "./dedupeStrings"
4
+
5
+ export const getOrientationConstraintKeys = (
6
+ inputProblem: InputProblem,
7
+ label: NetLabelPlacement,
8
+ ) =>
9
+ dedupeStrings([
10
+ label.netId,
11
+ label.globalConnNetId,
12
+ ...inputProblem.netConnections
13
+ .filter((connection) =>
14
+ label.pinIds.some((pinId) => connection.pinIds.includes(pinId)),
15
+ )
16
+ .map((connection) => connection.netId),
17
+ ])
@@ -0,0 +1,20 @@
1
+ import type { FacingDirection } from "./dir"
2
+
3
+ export const normalizeFacingDirection = (
4
+ value: string,
5
+ ): FacingDirection | undefined => {
6
+ switch (value) {
7
+ case "x+":
8
+ case "+x":
9
+ return "x+"
10
+ case "x-":
11
+ case "-x":
12
+ return "x-"
13
+ case "y+":
14
+ case "+y":
15
+ return "y+"
16
+ case "y-":
17
+ case "-y":
18
+ return "y-"
19
+ }
20
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/schematic-trace-solver",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.75",
4
+ "version": "0.0.76",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "start": "cosmos",
@@ -0,0 +1,4 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import inputProblem from "../../tests/assets/example44.json"
3
+
4
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -0,0 +1,4 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import inputProblem from "../../tests/assets/example45.json"
3
+
4
+ export default () => <PipelineDebugger inputProblem={inputProblem as any} />
@@ -0,0 +1,217 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 0,
7
+ "y": 0
8
+ },
9
+ "width": 1.3,
10
+ "height": 1,
11
+ "pins": [
12
+ {
13
+ "pinId": "PWR1.7",
14
+ "x": 1.05,
15
+ "y": 0.2
16
+ },
17
+ {
18
+ "pinId": "PWR1.6",
19
+ "x": 1.05,
20
+ "y": 0
21
+ },
22
+ {
23
+ "pinId": "PWR1.5",
24
+ "x": 1.05,
25
+ "y": -0.2
26
+ },
27
+ {
28
+ "pinId": "PWR1.4",
29
+ "x": -1.05,
30
+ "y": -0.30000000000000004
31
+ },
32
+ {
33
+ "pinId": "PWR1.3",
34
+ "x": -1.05,
35
+ "y": -0.09999999999999998
36
+ },
37
+ {
38
+ "pinId": "PWR1.2",
39
+ "x": -1.05,
40
+ "y": 0.10000000000000003
41
+ },
42
+ {
43
+ "pinId": "PWR1.1",
44
+ "x": -1.05,
45
+ "y": 0.30000000000000004
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "chipId": "schematic_component_1",
51
+ "center": {
52
+ "x": -3,
53
+ "y": 0
54
+ },
55
+ "width": 1.0999999999999996,
56
+ "height": 0.778910699999999,
57
+ "pins": [
58
+ {
59
+ "pinId": "R6.1",
60
+ "x": -3.55,
61
+ "y": 0
62
+ },
63
+ {
64
+ "pinId": "R6.2",
65
+ "x": -2.45,
66
+ "y": 0
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "chipId": "schematic_component_2",
72
+ "center": {
73
+ "x": -3,
74
+ "y": -2
75
+ },
76
+ "width": 1.0999999999999996,
77
+ "height": 0.7789106999999988,
78
+ "pins": [
79
+ {
80
+ "pinId": "R7.1",
81
+ "x": -3.55,
82
+ "y": -1.9999999999999998
83
+ },
84
+ {
85
+ "pinId": "R7.2",
86
+ "x": -2.45,
87
+ "y": -1.9999999999999998
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "chipId": "schematic_component_3",
93
+ "center": {
94
+ "x": -3,
95
+ "y": 2
96
+ },
97
+ "width": 1.0999999999999996,
98
+ "height": 0.7789106999999988,
99
+ "pins": [
100
+ {
101
+ "pinId": "R8.1",
102
+ "x": -3.55,
103
+ "y": 2
104
+ },
105
+ {
106
+ "pinId": "R8.2",
107
+ "x": -2.45,
108
+ "y": 2
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "chipId": "schematic_component_4",
114
+ "center": {
115
+ "x": 3,
116
+ "y": -1.5
117
+ },
118
+ "width": 1.0999999999999996,
119
+ "height": 1.2400000000000002,
120
+ "pins": [
121
+ {
122
+ "pinId": "C6.1",
123
+ "x": 2.45,
124
+ "y": -1.5
125
+ },
126
+ {
127
+ "pinId": "C6.2",
128
+ "x": 3.55,
129
+ "y": -1.5
130
+ }
131
+ ]
132
+ },
133
+ {
134
+ "chipId": "schematic_component_5",
135
+ "center": {
136
+ "x": 3,
137
+ "y": 0
138
+ },
139
+ "width": 1.0999999999999996,
140
+ "height": 1.24,
141
+ "pins": [
142
+ {
143
+ "pinId": "C7.1",
144
+ "x": 2.45,
145
+ "y": 0
146
+ },
147
+ {
148
+ "pinId": "C7.2",
149
+ "x": 3.55,
150
+ "y": 0
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "chipId": "schematic_component_6",
156
+ "center": {
157
+ "x": 4,
158
+ "y": 3.1325000000000003
159
+ },
160
+ "width": 1.1299999999999994,
161
+ "height": 0.9150000000000005,
162
+ "pins": [
163
+ {
164
+ "pinId": "LED1.1",
165
+ "x": 3.46,
166
+ "y": 3
167
+ },
168
+ {
169
+ "pinId": "LED1.2",
170
+ "x": 4.54,
171
+ "y": 3
172
+ }
173
+ ]
174
+ }
175
+ ],
176
+ "directConnections": [
177
+ {
178
+ "pinIds": ["R6.1", "PWR1.1"],
179
+ "netId": ".R6 > .pin1 to .PWR1 > .OUT"
180
+ },
181
+ {
182
+ "pinIds": ["LED1.1", "R8.2"],
183
+ "netId": ".LED1 > .pos to .R8 > .pin2"
184
+ },
185
+ {
186
+ "pinIds": ["PWR1.2", "R6.2"],
187
+ "netId": ".PWR1 > .FB to .R6 > .pin2"
188
+ },
189
+ {
190
+ "pinIds": ["PWR1.2", "R7.1"],
191
+ "netId": ".PWR1 > .FB to .R7 > .pin1"
192
+ }
193
+ ],
194
+ "netConnections": [
195
+ {
196
+ "netId": "gnd",
197
+ "pinIds": ["PWR1.7", "PWR1.3", "R7.2", "C6.2", "C7.2", "LED1.2"],
198
+ "netLabelWidth": 0.48
199
+ },
200
+ {
201
+ "netId": "v5",
202
+ "pinIds": ["PWR1.6", "PWR1.4", "C6.1"],
203
+ "netLabelWidth": 0.36
204
+ },
205
+ {
206
+ "netId": "v3_3",
207
+ "pinIds": ["PWR1.1", "R6.1", "R8.1", "C7.1"],
208
+ "netLabelWidth": 0.6
209
+ }
210
+ ],
211
+ "availableNetLabelOrientations": {
212
+ "v5": ["y+"],
213
+ "v3_3": ["y+"],
214
+ "gnd": ["y-"]
215
+ },
216
+ "maxMspPairDistance": 2.4
217
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 7,
7
+ "y": 0.7
8
+ },
9
+ "width": 1,
10
+ "height": 1,
11
+ "pins": [
12
+ {
13
+ "pinId": "IC2.15",
14
+ "x": 7.9,
15
+ "y": 0.7
16
+ }
17
+ ],
18
+ "sectionId": "mcu"
19
+ },
20
+ {
21
+ "chipId": "schematic_component_19",
22
+ "center": {
23
+ "x": 11.8,
24
+ "y": 0.19999999999999998
25
+ },
26
+ "width": 0.7699999999999996,
27
+ "height": 1,
28
+ "pins": [
29
+ {
30
+ "pinId": "CONN1.1",
31
+ "x": 11.015,
32
+ "y": 0.5
33
+ },
34
+ {
35
+ "pinId": "CONN1.2",
36
+ "x": 11.015,
37
+ "y": 0.30000000000000004
38
+ },
39
+ {
40
+ "pinId": "CONN1.3",
41
+ "x": 11.015,
42
+ "y": 0.10000000000000003
43
+ },
44
+ {
45
+ "pinId": "CONN1.4",
46
+ "x": 11.015,
47
+ "y": -0.10000000000000003
48
+ }
49
+ ],
50
+ "sectionId": "i2c"
51
+ },
52
+ {
53
+ "chipId": "schematic_component_20",
54
+ "center": {
55
+ "x": 9.6,
56
+ "y": 0.7
57
+ },
58
+ "width": 1.1000000000000014,
59
+ "height": 0.7789106999999991,
60
+ "pins": [
61
+ {
62
+ "pinId": "R10.1",
63
+ "x": 9.05,
64
+ "y": 0.7
65
+ },
66
+ {
67
+ "pinId": "R10.2",
68
+ "x": 10.15,
69
+ "y": 0.7
70
+ }
71
+ ],
72
+ "sectionId": "i2c"
73
+ },
74
+ {
75
+ "chipId": "schematic_component_21",
76
+ "center": {
77
+ "x": 9.6,
78
+ "y": -0.3
79
+ },
80
+ "width": 1.1000000000000014,
81
+ "height": 0.7789106999999987,
82
+ "pins": [
83
+ {
84
+ "pinId": "R11.1",
85
+ "x": 9.05,
86
+ "y": -0.3
87
+ },
88
+ {
89
+ "pinId": "R11.2",
90
+ "x": 10.15,
91
+ "y": -0.3
92
+ }
93
+ ],
94
+ "sectionId": "i2c"
95
+ }
96
+ ],
97
+ "directConnections": [],
98
+ "netConnections": [
99
+ {
100
+ "netId": "V3V3",
101
+ "pinIds": ["CONN1.2", "R10.1", "R11.1"],
102
+ "netLabelWidth": 0.6
103
+ },
104
+ {
105
+ "netId": "SDA",
106
+ "pinIds": ["IC2.15", "CONN1.3", "R10.2"],
107
+ "netLabelWidth": 0.48
108
+ },
109
+ {
110
+ "netId": "SCL",
111
+ "pinIds": ["CONN1.4", "R11.2"],
112
+ "netLabelWidth": 0.48
113
+ }
114
+ ],
115
+ "availableNetLabelOrientations": {
116
+ "V3V3": ["y+"],
117
+ "SDA": ["x-", "x+"],
118
+ "SCL": ["x-", "x+"]
119
+ },
120
+ "maxMspPairDistance": 2.4
121
+ }
@@ -0,0 +1,370 @@
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="100%" height="100%" fill="white" />
3
+ <g>
4
+ <circle data-type="point" data-label="PWR1.7
5
+ x+" data-x="1.05" data-y="0.2" cx="362.6371620850918" cy="342.67594388046086" r="3" fill="hsl(159, 100%, 50%, 0.8)" />
6
+ </g>
7
+ <g>
8
+ <circle data-type="point" data-label="PWR1.6
9
+ x+" data-x="1.05" data-y="0" cx="362.6371620850918" cy="355.4511235314247" r="3" fill="hsl(158, 100%, 50%, 0.8)" />
10
+ </g>
11
+ <g>
12
+ <circle data-type="point" data-label="PWR1.5
13
+ x+" data-x="1.05" data-y="-0.2" cx="362.6371620850918" cy="368.2263031823885" r="3" fill="hsl(157, 100%, 50%, 0.8)" />
14
+ </g>
15
+ <g>
16
+ <circle data-type="point" data-label="PWR1.4
17
+ x-" data-x="-1.05" data-y="-0.30000000000000004" cx="228.49777574997148" cy="374.61389300787044" r="3" fill="hsl(156, 100%, 50%, 0.8)" />
18
+ </g>
19
+ <g>
20
+ <circle data-type="point" data-label="PWR1.3
21
+ x-" data-x="-1.05" data-y="-0.09999999999999998" cx="228.49777574997148" cy="361.8387133569066" r="3" fill="hsl(155, 100%, 50%, 0.8)" />
22
+ </g>
23
+ <g>
24
+ <circle data-type="point" data-label="PWR1.2
25
+ x-" data-x="-1.05" data-y="0.10000000000000003" cx="228.49777574997148" cy="349.06353370594275" r="3" fill="hsl(154, 100%, 50%, 0.8)" />
26
+ </g>
27
+ <g>
28
+ <circle data-type="point" data-label="PWR1.1
29
+ x-" data-x="-1.05" data-y="0.30000000000000004" cx="228.49777574997148" cy="336.2883540549789" r="3" fill="hsl(153, 100%, 50%, 0.8)" />
30
+ </g>
31
+ <g>
32
+ <circle data-type="point" data-label="R6.1
33
+ x-" data-x="-3.55" data-y="0" cx="68.80803011292346" cy="355.4511235314247" r="3" fill="hsl(351, 100%, 50%, 0.8)" />
34
+ </g>
35
+ <g>
36
+ <circle data-type="point" data-label="R6.2
37
+ x+" data-x="-2.45" data-y="0" cx="139.07151819322456" cy="355.4511235314247" r="3" fill="hsl(352, 100%, 50%, 0.8)" />
38
+ </g>
39
+ <g>
40
+ <circle data-type="point" data-label="R7.1
41
+ x-" data-x="-3.55" data-y="-1.9999999999999998" cx="68.80803011292346" cy="483.20292004106307" r="3" fill="hsl(232, 100%, 50%, 0.8)" />
42
+ </g>
43
+ <g>
44
+ <circle data-type="point" data-label="R7.2
45
+ x+" data-x="-2.45" data-y="-1.9999999999999998" cx="139.07151819322456" cy="483.20292004106307" r="3" fill="hsl(233, 100%, 50%, 0.8)" />
46
+ </g>
47
+ <g>
48
+ <circle data-type="point" data-label="R8.1
49
+ x-" data-x="-3.55" data-y="2" cx="68.80803011292346" cy="227.69932702178625" r="3" fill="hsl(113, 100%, 50%, 0.8)" />
50
+ </g>
51
+ <g>
52
+ <circle data-type="point" data-label="R8.2
53
+ x+" data-x="-2.45" data-y="2" cx="139.07151819322456" cy="227.69932702178625" r="3" fill="hsl(114, 100%, 50%, 0.8)" />
54
+ </g>
55
+ <g>
56
+ <circle data-type="point" data-label="C6.1
57
+ x-" data-x="2.45" data-y="-1.5" cx="452.0634196418387" cy="451.2649709136535" r="3" fill="hsl(246, 100%, 50%, 0.8)" />
58
+ </g>
59
+ <g>
60
+ <circle data-type="point" data-label="C6.2
61
+ x+" data-x="3.55" data-y="-1.5" cx="522.3269077221398" cy="451.2649709136535" r="3" fill="hsl(247, 100%, 50%, 0.8)" />
62
+ </g>
63
+ <g>
64
+ <circle data-type="point" data-label="C7.1
65
+ x-" data-x="2.45" data-y="0" cx="452.0634196418387" cy="355.4511235314247" r="3" fill="hsl(127, 100%, 50%, 0.8)" />
66
+ </g>
67
+ <g>
68
+ <circle data-type="point" data-label="C7.2
69
+ x+" data-x="3.55" data-y="0" cx="522.3269077221398" cy="355.4511235314247" r="3" fill="hsl(128, 100%, 50%, 0.8)" />
70
+ </g>
71
+ <g>
72
+ <circle data-type="point" data-label="LED1.1
73
+ x-" data-x="3.4350000000000005" data-y="3" cx="514.9811794228357" cy="163.82342876696706" r="3" fill="hsl(57, 100%, 50%, 0.8)" />
74
+ </g>
75
+ <g>
76
+ <circle data-type="point" data-label="LED1.2
77
+ x+" data-x="4.5649999999999995" data-y="3" cx="587.1609444507812" cy="163.82342876696706" r="3" fill="hsl(58, 100%, 50%, 0.8)" />
78
+ </g>
79
+ <g>
80
+ <circle data-type="point" data-label="anchorPoint
81
+ orientation: y-" data-x="1.151" data-y="-0.5010000000000001" cx="369.08862780882856" cy="387.45294855708914" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
82
+ </g>
83
+ <g>
84
+ <circle data-type="point" data-label="anchorPoint
85
+ orientation: y-" data-x="-1.75" data-y="-1.9999999999999998" cx="183.78464697159802" cy="483.20292004106307" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
86
+ </g>
87
+ <g>
88
+ <circle data-type="point" data-label="anchorPoint
89
+ orientation: y-" data-x="3.75" data-y="-1.5" cx="535.1020873731037" cy="451.2649709136535" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
90
+ </g>
91
+ <g>
92
+ <circle data-type="point" data-label="anchorPoint
93
+ orientation: y-" data-x="4.6659999999999995" data-y="2.649" cx="593.6124101745181" cy="186.24386905440858" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
94
+ </g>
95
+ <g>
96
+ <circle data-type="point" data-label="anchorPoint
97
+ orientation: y+" data-x="1.4" data-y="0" cx="384.99372647427856" cy="355.4511235314247" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
98
+ </g>
99
+ <g>
100
+ <circle data-type="point" data-label="anchorPoint
101
+ orientation: y+" data-x="-2.3510000000000004" data-y="0.401" cx="145.39523212045165" cy="329.83688833124216" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
102
+ </g>
103
+ <g>
104
+ <circle data-type="point" data-label="anchorPoint
105
+ orientation: y+" data-x="-2.1" data-y="0" cx="161.4280825824113" cy="355.4511235314247" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
106
+ </g>
107
+ <g>
108
+ <circle data-type="point" data-label="anchorPoint
109
+ orientation: x-" data-x="-3.55" data-y="-1.9999999999999998" cx="68.80803011292346" cy="483.20292004106307" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
110
+ </g>
111
+ <g>
112
+ <circle data-type="point" data-label="anchorPoint
113
+ orientation: y+" data-x="-3.75" data-y="2" cx="56.03285046195958" cy="227.69932702178625" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
114
+ </g>
115
+ <g>
116
+ <circle data-type="point" data-label="anchorPoint
117
+ orientation: y+" data-x="-1.151" data-y="0.5010000000000001" cx="222.04631002623472" cy="323.4492985057602" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
118
+ </g>
119
+ <g>
120
+ <circle data-type="point" data-label="anchorPoint
121
+ orientation: y+" data-x="2.349" data-y="0.651" cx="445.611953918102" cy="313.8679137675374" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
122
+ </g>
123
+ <g>
124
+ <circle data-type="point" data-label="anchorPoint
125
+ orientation: y+" data-x="1.9637500000000003" data-y="3" cx="421.0037641154329" cy="163.82342876696706" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
126
+ </g>
127
+ <g>
128
+ <polyline data-points="-3.55,0 -1.05,0.30000000000000004" data-type="line" data-label="" points="68.80803011292346,355.4511235314247 228.49777574997148,336.2883540549789" fill="none" stroke="hsl(40, 100%, 50%, 0.8)" stroke-width="1" />
129
+ </g>
130
+ <g>
131
+ <polyline data-points="3.4350000000000005,3 -2.45,2" data-type="line" data-label="" points="514.9811794228357,163.82342876696706 139.07151819322456,227.69932702178625" fill="none" stroke="hsl(224, 100%, 50%, 0.8)" stroke-width="1" />
132
+ </g>
133
+ <g>
134
+ <polyline data-points="-1.05,0.10000000000000003 -2.45,0" data-type="line" data-label="" points="228.49777574997148,349.06353370594275 139.07151819322456,355.4511235314247" fill="none" stroke="hsl(272, 100%, 50%, 0.8)" stroke-width="1" />
135
+ </g>
136
+ <g>
137
+ <polyline data-points="-1.05,0.10000000000000003 -3.55,-1.9999999999999998" data-type="line" data-label="" points="228.49777574997148,349.06353370594275 68.80803011292346,483.20292004106307" fill="none" stroke="hsl(272, 100%, 50%, 0.8)" stroke-width="1" />
138
+ </g>
139
+ <g>
140
+ <polyline data-points="1.05,0.2 -1.05,-0.09999999999999998" data-type="line" data-label="" points="362.6371620850918,342.67594388046086 228.49777574997148,361.8387133569066" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
141
+ </g>
142
+ <g>
143
+ <polyline data-points="1.05,0.2 -2.45,-1.9999999999999998" data-type="line" data-label="" points="362.6371620850918,342.67594388046086 139.07151819322456,483.20292004106307" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
144
+ </g>
145
+ <g>
146
+ <polyline data-points="1.05,0.2 3.55,-1.5" data-type="line" data-label="" points="362.6371620850918,342.67594388046086 522.3269077221398,451.2649709136535" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
147
+ </g>
148
+ <g>
149
+ <polyline data-points="1.05,0.2 3.55,0" data-type="line" data-label="" points="362.6371620850918,342.67594388046086 522.3269077221398,355.4511235314247" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
150
+ </g>
151
+ <g>
152
+ <polyline data-points="1.05,0.2 4.5649999999999995,3" data-type="line" data-label="" points="362.6371620850918,342.67594388046086 587.1609444507812,163.82342876696706" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
153
+ </g>
154
+ <g>
155
+ <polyline data-points="-1.05,-0.09999999999999998 -2.45,-1.9999999999999998" data-type="line" data-label="" points="228.49777574997148,361.8387133569066 139.07151819322456,483.20292004106307" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
156
+ </g>
157
+ <g>
158
+ <polyline data-points="-1.05,-0.09999999999999998 3.55,-1.5" data-type="line" data-label="" points="228.49777574997148,361.8387133569066 522.3269077221398,451.2649709136535" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
159
+ </g>
160
+ <g>
161
+ <polyline data-points="-1.05,-0.09999999999999998 3.55,0" data-type="line" data-label="" points="228.49777574997148,361.8387133569066 522.3269077221398,355.4511235314247" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
162
+ </g>
163
+ <g>
164
+ <polyline data-points="-1.05,-0.09999999999999998 4.5649999999999995,3" data-type="line" data-label="" points="228.49777574997148,361.8387133569066 587.1609444507812,163.82342876696706" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
165
+ </g>
166
+ <g>
167
+ <polyline data-points="-2.45,-1.9999999999999998 3.55,-1.5" data-type="line" data-label="" points="139.07151819322456,483.20292004106307 522.3269077221398,451.2649709136535" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
168
+ </g>
169
+ <g>
170
+ <polyline data-points="-2.45,-1.9999999999999998 3.55,0" data-type="line" data-label="" points="139.07151819322456,483.20292004106307 522.3269077221398,355.4511235314247" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
171
+ </g>
172
+ <g>
173
+ <polyline data-points="-2.45,-1.9999999999999998 4.5649999999999995,3" data-type="line" data-label="" points="139.07151819322456,483.20292004106307 587.1609444507812,163.82342876696706" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
174
+ </g>
175
+ <g>
176
+ <polyline data-points="3.55,-1.5 3.55,0" data-type="line" data-label="" points="522.3269077221398,451.2649709136535 522.3269077221398,355.4511235314247" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
177
+ </g>
178
+ <g>
179
+ <polyline data-points="3.55,-1.5 4.5649999999999995,3" data-type="line" data-label="" points="522.3269077221398,451.2649709136535 587.1609444507812,163.82342876696706" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
180
+ </g>
181
+ <g>
182
+ <polyline data-points="3.55,0 4.5649999999999995,3" data-type="line" data-label="" points="522.3269077221398,355.4511235314247 587.1609444507812,163.82342876696706" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
183
+ </g>
184
+ <g>
185
+ <polyline data-points="1.05,0 -1.05,-0.30000000000000004" data-type="line" data-label="" points="362.6371620850918,355.4511235314247 228.49777574997148,374.61389300787044" fill="none" stroke="hsl(111, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
186
+ </g>
187
+ <g>
188
+ <polyline data-points="1.05,0 2.45,-1.5" data-type="line" data-label="" points="362.6371620850918,355.4511235314247 452.0634196418387,451.2649709136535" fill="none" stroke="hsl(111, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
189
+ </g>
190
+ <g>
191
+ <polyline data-points="-1.05,-0.30000000000000004 2.45,-1.5" data-type="line" data-label="" points="228.49777574997148,374.61389300787044 452.0634196418387,451.2649709136535" fill="none" stroke="hsl(111, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
192
+ </g>
193
+ <g>
194
+ <polyline data-points="-1.05,0.30000000000000004 -3.55,0" data-type="line" data-label="" points="228.49777574997148,336.2883540549789 68.80803011292346,355.4511235314247" fill="none" stroke="hsl(105, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
195
+ </g>
196
+ <g>
197
+ <polyline data-points="-1.05,0.30000000000000004 -3.55,2" data-type="line" data-label="" points="228.49777574997148,336.2883540549789 68.80803011292346,227.69932702178625" fill="none" stroke="hsl(105, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
198
+ </g>
199
+ <g>
200
+ <polyline data-points="-1.05,0.30000000000000004 2.45,0" data-type="line" data-label="" points="228.49777574997148,336.2883540549789 452.0634196418387,355.4511235314247" fill="none" stroke="hsl(105, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
201
+ </g>
202
+ <g>
203
+ <polyline data-points="-3.55,0 -3.55,2" data-type="line" data-label="" points="68.80803011292346,355.4511235314247 68.80803011292346,227.69932702178625" fill="none" stroke="hsl(105, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
204
+ </g>
205
+ <g>
206
+ <polyline data-points="-3.55,0 2.45,0" data-type="line" data-label="" points="68.80803011292346,355.4511235314247 452.0634196418387,355.4511235314247" fill="none" stroke="hsl(105, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
207
+ </g>
208
+ <g>
209
+ <polyline data-points="-3.55,2 2.45,0" data-type="line" data-label="" points="68.80803011292346,227.69932702178625 452.0634196418387,355.4511235314247" fill="none" stroke="hsl(105, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
210
+ </g>
211
+ <g>
212
+ <polyline data-points="-3.55,2 -3.75,2 -3.75,0 -3.55,0" data-type="line" data-label="" points="68.80803011292346,227.69932702178625 56.03285046195958,227.69932702178625 56.03285046195958,355.4511235314247 68.80803011292346,355.4511235314247" fill="none" stroke="purple" stroke-width="1" />
213
+ </g>
214
+ <g>
215
+ <polyline data-points="-2.45,0 -1.75,0 -1.75,0.10000000000000003 -1.05,0.10000000000000003" data-type="line" data-label="" points="139.07151819322456,355.4511235314247 183.78464697159802,355.4511235314247 183.78464697159802,349.06353370594275 228.49777574997148,349.06353370594275" fill="none" stroke="purple" stroke-width="1" />
216
+ </g>
217
+ <g>
218
+ <polyline data-points="3.55,0 3.75,0 3.75,-1.5 3.55,-1.5" data-type="line" data-label="" points="522.3269077221398,355.4511235314247 535.1020873731037,355.4511235314247 535.1020873731037,451.2649709136535 522.3269077221398,451.2649709136535" fill="none" stroke="purple" stroke-width="1" />
219
+ </g>
220
+ <g>
221
+ <polyline data-points="3.4350000000000005,3 0.49250000000000016,3 0.49250000000000016,2 -2.45,2" data-type="line" data-label="" points="514.9811794228357,163.82342876696706 327.0263488080301,163.82342876696706 327.0263488080301,227.69932702178625 139.07151819322456,227.69932702178625" fill="none" stroke="purple" stroke-width="1" />
222
+ </g>
223
+ <g>
224
+ <polyline data-points="-1.05,-0.09999999999999998 -1.75,-0.09999999999999998 -1.75,-1.9999999999999998 -2.45,-1.9999999999999998" data-type="line" data-label="" points="228.49777574997148,361.8387133569066 183.78464697159802,361.8387133569066 183.78464697159802,483.20292004106307 139.07151819322456,483.20292004106307" fill="none" stroke="purple" stroke-width="1" />
225
+ </g>
226
+ <g>
227
+ <polyline data-points="1.05,0 1.75,0 1.75,-1.5 2.45,-1.5" data-type="line" data-label="" points="362.6371620850918,355.4511235314247 407.35029086346526,355.4511235314247 407.35029086346526,451.2649709136535 452.0634196418387,451.2649709136535" fill="none" stroke="purple" stroke-width="1" />
228
+ </g>
229
+ <g>
230
+ <polyline data-points="1.05,0.2 1.151,0.2 1.151,-0.5010000000000001" data-type="line" data-label="" points="362.6371620850918,342.67594388046086 369.08862780882856,342.67594388046086 369.08862780882856,387.45294855708914" fill="none" stroke="purple" stroke-width="1" />
231
+ </g>
232
+ <g>
233
+ <polyline data-points="4.5649999999999995,3 4.6659999999999995,3 4.6659999999999995,2.649" data-type="line" data-label="" points="587.1609444507812,163.82342876696706 593.6124101745181,163.82342876696706 593.6124101745181,186.24386905440858" fill="none" stroke="purple" stroke-width="1" />
234
+ </g>
235
+ <g>
236
+ <polyline data-points="-1.05,-0.30000000000000004 -2.3510000000000004,-0.30000000000000004 -2.3510000000000004,0.401" data-type="line" data-label="" points="228.49777574997148,374.61389300787044 145.39523212045165,374.61389300787044 145.39523212045165,329.83688833124216" fill="none" stroke="purple" stroke-width="1" />
237
+ </g>
238
+ <g>
239
+ <polyline data-points="-1.05,0.30000000000000004 -1.151,0.30000000000000004 -1.151,0.5010000000000001" data-type="line" data-label="" points="228.49777574997148,336.2883540549789 222.04631002623472,336.2883540549789 222.04631002623472,323.4492985057602" fill="none" stroke="purple" stroke-width="1" />
240
+ </g>
241
+ <g>
242
+ <polyline data-points="2.45,0 2.349,0 2.349,0.651" data-type="line" data-label="" points="452.0634196418387,355.4511235314247 445.611953918102,355.4511235314247 445.611953918102,313.8679137675374" fill="none" stroke="purple" stroke-width="1" />
243
+ </g>
244
+ <g>
245
+ <rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="228.49777574997148" y="323.5131744040151" width="134.13938633512032" height="63.87589825481916" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01565535714285714" />
246
+ </g>
247
+ <g>
248
+ <rect data-type="rect" data-label="schematic_component_1" data-x="-3" data-y="0" x="68.80803011292346" y="330.5743132200297" width="70.2634880803011" height="49.75362062278998" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01565535714285714" />
249
+ </g>
250
+ <g>
251
+ <rect data-type="rect" data-label="schematic_component_2" data-x="-3" data-y="-2" x="68.80803011292346" y="458.32610972966813" width="70.2634880803011" height="49.75362062278998" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01565535714285714" />
252
+ </g>
253
+ <g>
254
+ <rect data-type="rect" data-label="schematic_component_3" data-x="-3" data-y="2" x="68.80803011292346" y="202.82251671039128" width="70.2634880803011" height="49.75362062278995" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01565535714285714" />
255
+ </g>
256
+ <g>
257
+ <rect data-type="rect" data-label="schematic_component_4" data-x="3" data-y="-1.5" x="452.0634196418387" y="411.6619139956656" width="70.2634880803011" height="79.20611383597583" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01565535714285714" />
258
+ </g>
259
+ <g>
260
+ <rect data-type="rect" data-label="schematic_component_5" data-x="3" data-y="0" x="452.0634196418387" y="315.8480666134368" width="70.2634880803011" height="79.20611383597577" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01565535714285714" />
261
+ </g>
262
+ <g>
263
+ <rect data-type="rect" data-label="schematic_component_6" data-x="4" data-y="3.1325000000000003" x="514.9811794228357" y="126.13664879662366" width="72.17976502794556" height="58.446446903159654" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01565535714285714" />
264
+ </g>
265
+ <g>
266
+ <rect data-type="rect" data-label="netId: gnd
267
+ globalConnNetId: connectivity_net3" data-x="1.151" data-y="-0.7410000000000001" x="362.7010379833466" y="387.45294855708914" width="12.775179650963878" height="30.660431162313216" fill="#00000066" stroke="#000000" stroke-width="0.01565535714285714" />
268
+ </g>
269
+ <g>
270
+ <rect data-type="rect" data-label="netId: gnd
271
+ globalConnNetId: connectivity_net3" data-x="-1.75" data-y="-2.2399999999999998" x="177.39705714611608" y="483.20292004106307" width="12.775179650963878" height="30.660431162313216" fill="#00000066" stroke="#000000" stroke-width="0.01565535714285714" />
272
+ </g>
273
+ <g>
274
+ <rect data-type="rect" data-label="netId: gnd
275
+ globalConnNetId: connectivity_net3" data-x="3.75" data-y="-1.74" x="528.7144975476217" y="451.2649709136535" width="12.775179650963878" height="30.660431162313273" fill="#00000066" stroke="#000000" stroke-width="0.01565535714285714" />
276
+ </g>
277
+ <g>
278
+ <rect data-type="rect" data-label="netId: gnd
279
+ globalConnNetId: connectivity_net3" data-x="4.6659999999999995" data-y="2.409" x="587.2248203490362" y="186.24386905440858" width="12.775179650963764" height="30.660431162313273" fill="#00000066" stroke="#000000" stroke-width="0.01565535714285714" />
280
+ </g>
281
+ <g>
282
+ <rect data-type="rect" data-label="netId: v5
283
+ globalConnNetId: connectivity_net4" data-x="1.4" data-y="0.18" x="378.6061366487966" y="332.4558001596898" width="12.775179650963821" height="22.995323371734912" fill="#ef444466" stroke="#ef4444" stroke-width="0.01565535714285714" />
284
+ </g>
285
+ <g>
286
+ <rect data-type="rect" data-label="netId: v5
287
+ globalConnNetId: connectivity_net4" data-x="-2.3510000000000004" data-y="0.581" x="139.0076422949697" y="306.84156495950725" width="12.77517965096385" height="22.995323371734912" fill="#ef444466" stroke="#ef4444" stroke-width="0.01565535714285714" />
288
+ </g>
289
+ <g>
290
+ <rect data-type="rect" data-label="netId: .PWR1 &gt; .FB to .R6 &gt; .pin2
291
+ globalConnNetId: connectivity_net2" data-x="-2.1" data-y="0.225" x="155.04049275692935" y="326.70696931675604" width="12.77517965096385" height="28.74415421466864" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01565535714285714" />
292
+ </g>
293
+ <g>
294
+ <rect data-type="rect" data-label="netId: .PWR1 &gt; .FB to .R7 &gt; .pin1
295
+ globalConnNetId: connectivity_net2" data-x="-3.776" data-y="-1.9999999999999998" x="40" y="476.8153302155812" width="28.74415421466864" height="12.775179650963821" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01565535714285714" />
296
+ </g>
297
+ <g>
298
+ <rect data-type="rect" data-label="netId: v3_3
299
+ globalConnNetId: connectivity_net0" data-x="-3.75" data-y="2.3" x="49.64526063647767" y="189.37378806889475" width="12.77517965096385" height="38.32553895289152" fill="#ef444466" stroke="#ef4444" stroke-width="0.01565535714285714" />
300
+ </g>
301
+ <g>
302
+ <rect data-type="rect" data-label="netId: v3_3
303
+ globalConnNetId: connectivity_net0" data-x="-1.151" data-y="0.8010000000000002" x="215.65872020075278" y="285.1237595528687" width="12.775179650963878" height="38.32553895289152" fill="#ef444466" stroke="#ef4444" stroke-width="0.01565535714285714" />
304
+ </g>
305
+ <g>
306
+ <rect data-type="rect" data-label="netId: v3_3
307
+ globalConnNetId: connectivity_net0" data-x="2.349" data-y="0.9510000000000001" x="439.22436409262" y="275.5423748146458" width="12.775179650963878" height="38.32553895289158" fill="#ef444466" stroke="#ef4444" stroke-width="0.01565535714285714" />
308
+ </g>
309
+ <g>
310
+ <rect data-type="rect" data-label="netId: .LED1 &gt; .pos to .R8 &gt; .pin2
311
+ globalConnNetId: connectivity_net1" data-x="1.9637500000000003" data-y="3.225" x="414.61617428995095" y="135.0792745522984" width="12.775179650963821" height="28.74415421466867" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01565535714285714" />
312
+ </g>
313
+ <g id="crosshair" style="display: none">
314
+ <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
315
+ <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>
316
+ </g>
317
+ <script>
318
+ <![CDATA[
319
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
320
+ const svg = e.currentTarget;
321
+ const rect = svg.getBoundingClientRect();
322
+ const x = e.clientX - rect.left;
323
+ const y = e.clientY - rect.top;
324
+ const crosshair = svg.getElementById('crosshair');
325
+ const h = svg.getElementById('crosshair-h');
326
+ const v = svg.getElementById('crosshair-v');
327
+ const coords = svg.getElementById('coordinates');
328
+
329
+ crosshair.style.display = 'block';
330
+ h.setAttribute('x1', '0');
331
+ h.setAttribute('x2', '640');
332
+ h.setAttribute('y1', y);
333
+ h.setAttribute('y2', y);
334
+ v.setAttribute('x1', x);
335
+ v.setAttribute('x2', x);
336
+ v.setAttribute('y1', '0');
337
+ v.setAttribute('y2', '640');
338
+
339
+ // Calculate real coordinates using inverse transformation
340
+ const matrix = {
341
+ "a": 63.87589825481921,
342
+ "c": 0,
343
+ "e": 295.56746891753164,
344
+ "b": 0,
345
+ "d": -63.87589825481921,
346
+ "f": 355.4511235314247
347
+ };
348
+ // Manually invert and apply the affine transform
349
+ // Since we only use translate and scale, we can directly compute:
350
+ // x' = (x - tx) / sx
351
+ // y' = (y - ty) / sy
352
+ const sx = matrix.a;
353
+ const sy = matrix.d;
354
+ const tx = matrix.e;
355
+ const ty = matrix.f;
356
+ const realPoint = {
357
+ x: (x - tx) / sx,
358
+ y: (y - ty) / sy // Flip y back since we used negative scale
359
+ }
360
+
361
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
362
+ coords.setAttribute('x', (x + 5).toString());
363
+ coords.setAttribute('y', (y - 5).toString());
364
+ });
365
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
366
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
367
+ });
368
+ ]]>
369
+ </script>
370
+ </svg>
@@ -0,0 +1,170 @@
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="100%" height="100%" fill="white" />
3
+ <g>
4
+ <circle data-type="point" data-label="IC2.15
5
+ x+" data-x="7.9" data-y="0.7" cx="195.43562066306856" cy="285.914032690825" r="3" fill="hsl(338, 100%, 50%, 0.8)" />
6
+ </g>
7
+ <g>
8
+ <circle data-type="point" data-label="CONN1.1
9
+ x-" data-x="11.015" data-y="0.5" cx="464.4255975327678" cy="303.18465720894375" r="3" fill="hsl(56, 100%, 50%, 0.8)" />
10
+ </g>
11
+ <g>
12
+ <circle data-type="point" data-label="CONN1.2
13
+ x-" data-x="11.015" data-y="0.30000000000000004" cx="464.4255975327678" cy="320.45528172706247" r="3" fill="hsl(57, 100%, 50%, 0.8)" />
14
+ </g>
15
+ <g>
16
+ <circle data-type="point" data-label="CONN1.3
17
+ x-" data-x="11.015" data-y="0.10000000000000003" cx="464.4255975327678" cy="337.7259062451812" r="3" fill="hsl(58, 100%, 50%, 0.8)" />
18
+ </g>
19
+ <g>
20
+ <circle data-type="point" data-label="CONN1.4
21
+ x-" data-x="11.015" data-y="-0.10000000000000003" cx="464.4255975327678" cy="354.9965307633" r="3" fill="hsl(59, 100%, 50%, 0.8)" />
22
+ </g>
23
+ <g>
24
+ <circle data-type="point" data-label="R10.1
25
+ x-" data-x="9.049999999999999" data-y="0.7" cx="294.7417116422512" cy="285.914032690825" r="3" fill="hsl(244, 100%, 50%, 0.8)" />
26
+ </g>
27
+ <g>
28
+ <circle data-type="point" data-label="R10.2
29
+ x+" data-x="10.15" data-y="0.7" cx="389.7301464919043" cy="285.914032690825" r="3" fill="hsl(245, 100%, 50%, 0.8)" />
30
+ </g>
31
+ <g>
32
+ <circle data-type="point" data-label="R11.1
33
+ x-" data-x="9.049999999999999" data-y="-0.3" cx="294.7417116422512" cy="372.2671552814187" r="3" fill="hsl(125, 100%, 50%, 0.8)" />
34
+ </g>
35
+ <g>
36
+ <circle data-type="point" data-label="R11.2
37
+ x+" data-x="10.15" data-y="-0.3" cx="389.7301464919043" cy="372.2671552814187" r="3" fill="hsl(126, 100%, 50%, 0.8)" />
38
+ </g>
39
+ <g>
40
+ <circle data-type="point" data-label="anchorPoint
41
+ orientation: x+" data-x="7.9" data-y="0.7" cx="195.43562066306856" cy="285.914032690825" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
42
+ </g>
43
+ <g>
44
+ <circle data-type="point" data-label="anchorPoint
45
+ orientation: x-" data-x="10.31525" data-y="0.19999999999999996" cx="403.9999999999999" cy="329.09059398612186" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
46
+ </g>
47
+ <g>
48
+ <circle data-type="point" data-label="anchorPoint
49
+ orientation: y+" data-x="8.85" data-y="0.7" cx="277.4710871241325" cy="285.914032690825" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
50
+ </g>
51
+ <g>
52
+ <circle data-type="point" data-label="anchorPoint
53
+ orientation: y-" data-x="10.79875" data-y="-0.10000000000000003" cx="445.7517347725519" cy="354.9965307633" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
54
+ </g>
55
+ <g>
56
+ <polyline data-points="11.015,0.30000000000000004 9.049999999999999,0.7" data-type="line" data-label="" points="464.4255975327678,320.45528172706247 294.7417116422512,285.914032690825" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
57
+ </g>
58
+ <g>
59
+ <polyline data-points="11.015,0.30000000000000004 9.049999999999999,-0.3" data-type="line" data-label="" points="464.4255975327678,320.45528172706247 294.7417116422512,372.2671552814187" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
60
+ </g>
61
+ <g>
62
+ <polyline data-points="9.049999999999999,0.7 9.049999999999999,-0.3" data-type="line" data-label="" points="294.7417116422512,285.914032690825 294.7417116422512,372.2671552814187" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
63
+ </g>
64
+ <g>
65
+ <polyline data-points="11.015,0.10000000000000003 10.15,0.7" data-type="line" data-label="" points="464.4255975327678,337.7259062451812 389.7301464919043,285.914032690825" fill="none" stroke="hsl(216, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
66
+ </g>
67
+ <g>
68
+ <polyline data-points="11.015,-0.10000000000000003 10.15,-0.3" data-type="line" data-label="" points="464.4255975327678,354.9965307633 389.7301464919043,372.2671552814187" fill="none" stroke="hsl(196, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
69
+ </g>
70
+ <g>
71
+ <polyline data-points="9.049999999999999,0.7 8.85,0.7 8.85,0.30000000000000004 11.015,0.30000000000000004" data-type="line" data-label="" points="294.7417116422512,285.914032690825 277.4710871241325,285.914032690825 277.4710871241325,320.45528172706247 464.4255975327678,320.45528172706247" fill="none" stroke="purple" stroke-width="1" />
72
+ </g>
73
+ <g>
74
+ <polyline data-points="9.049999999999999,-0.3 8.85,-0.3 8.85,0.7 9.049999999999999,0.7" data-type="line" data-label="" points="294.7417116422512,372.2671552814187 277.4710871241325,372.2671552814187 277.4710871241325,285.914032690825 294.7417116422512,285.914032690825" fill="none" stroke="purple" stroke-width="1" />
75
+ </g>
76
+ <g>
77
+ <polyline data-points="10.15,0.7 10.5825,0.7 10.5825,0.10000000000000003 11.015,0.10000000000000003" data-type="line" data-label="" points="389.7301464919043,285.914032690825 427.077872012336,285.914032690825 427.077872012336,337.7259062451812 464.4255975327678,337.7259062451812" fill="none" stroke="purple" stroke-width="1" />
78
+ </g>
79
+ <g>
80
+ <polyline data-points="11.015,-0.10000000000000003 10.5825,-0.10000000000000003 10.5825,-0.3 10.15,-0.3" data-type="line" data-label="" points="464.4255975327678,354.9965307633 427.077872012336,354.9965307633 427.077872012336,372.2671552814187 389.7301464919043,372.2671552814187" fill="none" stroke="purple" stroke-width="1" />
81
+ </g>
82
+ <g>
83
+ <polyline data-points="10.36625,0.7 10.416250000000002,0.7 10.416250000000002,0.19999999999999996 10.31525,0.19999999999999996" data-type="line" data-label="" points="408.4040092521202,285.914032690825 412.7216653816499,285.914032690825 412.7216653816499,329.09059398612186 403.9999999999999,329.09059398612186" fill="none" stroke="purple" stroke-width="1" />
84
+ </g>
85
+ <g>
86
+ <rect data-type="rect" data-label="schematic_component_0" data-x="7" data-y="0.7" x="39.999999999999886" y="242.7374713955282" width="155.43562066306868" height="86.35312259059367" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011580357142857146" />
87
+ </g>
88
+ <g>
89
+ <rect data-type="rect" data-label="schematic_component_19" data-x="11.8" data-y="0.19999999999999998" x="464.4255975327678" y="285.914032690825" width="135.57440246723206" height="86.35312259059367" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011580357142857146" />
90
+ </g>
91
+ <g>
92
+ <rect data-type="rect" data-label="schematic_component_20" data-x="9.6" data-y="0.7" x="294.7417116422512" y="252.28334710871252" width="94.98843484965312" height="67.26137116422501" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011580357142857146" />
93
+ </g>
94
+ <g>
95
+ <rect data-type="rect" data-label="schematic_component_21" data-x="9.6" data-y="-0.3" x="294.7417116422512" y="338.6364696993062" width="94.98843484965312" height="67.26137116422501" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011580357142857146" />
96
+ </g>
97
+ <g>
98
+ <rect data-type="rect" data-label="netId: SDA
99
+ globalConnNetId: connectivity_net1" data-x="8.141" data-y="0.7" x="195.52197378565916" y="277.2787204317657" width="41.44949884348489" height="17.270624518118723" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011580357142857146" />
100
+ </g>
101
+ <g>
102
+ <rect data-type="rect" data-label="netId: SDA
103
+ globalConnNetId: connectivity_net1" data-x="10.07525" data-y="0.19999999999999996" x="362.5505011565149" y="320.45528172706247" width="41.449498843485" height="17.27062451811878" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011580357142857146" />
104
+ </g>
105
+ <g>
106
+ <rect data-type="rect" data-label="netId: V3V3
107
+ globalConnNetId: connectivity_net0" data-x="8.85" data-y="1" x="268.8357748650732" y="234.10215913646883" width="17.270624518118666" height="51.8118735543562" fill="#ef444466" stroke="#ef4444" stroke-width="0.011580357142857146" />
108
+ </g>
109
+ <g>
110
+ <rect data-type="rect" data-label="netId: SCL
111
+ globalConnNetId: connectivity_net2" data-x="10.79875" data-y="-0.34" x="437.1164225134926" y="354.9965307633" width="17.270624518118666" height="41.449498843484946" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011580357142857146" />
112
+ </g>
113
+ <g id="crosshair" style="display: none">
114
+ <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
115
+ <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>
116
+ </g>
117
+ <script>
118
+ <![CDATA[
119
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
120
+ const svg = e.currentTarget;
121
+ const rect = svg.getBoundingClientRect();
122
+ const x = e.clientX - rect.left;
123
+ const y = e.clientY - rect.top;
124
+ const crosshair = svg.getElementById('crosshair');
125
+ const h = svg.getElementById('crosshair-h');
126
+ const v = svg.getElementById('crosshair-v');
127
+ const coords = svg.getElementById('coordinates');
128
+
129
+ crosshair.style.display = 'block';
130
+ h.setAttribute('x1', '0');
131
+ h.setAttribute('x2', '640');
132
+ h.setAttribute('y1', y);
133
+ h.setAttribute('y2', y);
134
+ v.setAttribute('x1', x);
135
+ v.setAttribute('x2', x);
136
+ v.setAttribute('y1', '0');
137
+ v.setAttribute('y2', '640');
138
+
139
+ // Calculate real coordinates using inverse transformation
140
+ const matrix = {
141
+ "a": 86.35312259059366,
142
+ "c": 0,
143
+ "e": -486.75404780262136,
144
+ "b": 0,
145
+ "d": -86.35312259059366,
146
+ "f": 346.3612185042406
147
+ };
148
+ // Manually invert and apply the affine transform
149
+ // Since we only use translate and scale, we can directly compute:
150
+ // x' = (x - tx) / sx
151
+ // y' = (y - ty) / sy
152
+ const sx = matrix.a;
153
+ const sy = matrix.d;
154
+ const tx = matrix.e;
155
+ const ty = matrix.f;
156
+ const realPoint = {
157
+ x: (x - tx) / sx,
158
+ y: (y - ty) / sy // Flip y back since we used negative scale
159
+ }
160
+
161
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
162
+ coords.setAttribute('x', (x + 5).toString());
163
+ coords.setAttribute('y', (y - 5).toString());
164
+ });
165
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
166
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
167
+ });
168
+ ]]>
169
+ </script>
170
+ </svg>
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example44.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example44", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })
@@ -0,0 +1,12 @@
1
+ import { test, expect } from "bun:test"
2
+ import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
3
+ import inputProblem from "../assets/example45.json"
4
+ import "tests/fixtures/matcher"
5
+
6
+ test("example45", () => {
7
+ const solver = new SchematicTracePipelineSolver(inputProblem as any)
8
+
9
+ solver.solve()
10
+
11
+ expect(solver).toMatchSolverSnapshot(import.meta.path)
12
+ })