@tscircuit/rectdiff 0.0.25 → 0.0.27
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/.github/workflows/bun-pver-release.yml +45 -24
- package/dist/index.d.ts +46 -0
- package/dist/index.js +778 -220
- package/lib/RectDiffPipeline.ts +46 -0
- package/lib/solvers/AdjacentLayerContainmentMergeSolver/AdjacentLayerContainmentMergeSolver.ts +456 -0
- package/lib/solvers/OuterLayerContainmentMergeSolver/OuterLayerContainmentMergeSolver.ts +311 -0
- package/lib/types/srj-types.ts +1 -0
- package/package.json +2 -1
- package/pages/bugreports/bugreport50-multi-support-layer-merge.page.tsx +19 -0
- package/pages/pour.page.tsx +18 -0
- package/test-assets/bugreport49-634662.json +412 -0
- package/tests/__snapshots__/board-outline.snap.svg +2 -2
- package/tests/solver/__snapshots__/rectDiffGridSolverPipeline.snap.svg +1 -1
- package/tests/solver/both-points-equivalent/__snapshots__/both-points-equivalent.snap.svg +1 -1
- package/tests/solver/bugreport01-be84eb/__snapshots__/bugreport01-be84eb.snap.svg +1 -1
- package/tests/solver/bugreport02-bc4361/__snapshots__/bugreport02-bc4361.snap.svg +1 -1
- package/tests/solver/bugreport03-fe4a17/__snapshots__/bugreport03-fe4a17.snap.svg +1 -1
- package/tests/solver/bugreport07-d3f3be/__snapshots__/bugreport07-d3f3be.snap.svg +1 -1
- package/tests/solver/bugreport08-e3ec95/__snapshots__/bugreport08-e3ec95.snap.svg +1 -1
- package/tests/solver/bugreport09-618e09/__snapshots__/bugreport09-618e09.snap.svg +1 -1
- package/tests/solver/bugreport10-71239a/__snapshots__/bugreport10-71239a.snap.svg +1 -1
- package/tests/solver/bugreport11-b2de3c/__snapshots__/bugreport11-b2de3c.snap.svg +1 -1
- package/tests/solver/bugreport12-35ce1c/__snapshots__/bugreport12-35ce1c.snap.svg +1 -1
- package/tests/solver/bugreport13-b9a758/__snapshots__/bugreport13-b9a758.snap.svg +1 -1
- package/tests/solver/bugreport16-d95f38/__snapshots__/bugreport16-d95f38.snap.svg +1 -1
- package/tests/solver/bugreport19/__snapshots__/bugreport19.snap.svg +1 -1
- package/tests/solver/bugreport20-obstacle-clipping/__snapshots__/bugreport20-obstacle-clipping.snap.svg +1 -1
- package/tests/solver/bugreport21-board-outline/__snapshots__/bugreport21-board-outline.snap.svg +2 -2
- package/tests/solver/bugreport22-2a75ce/__snapshots__/bugreport22-2a75ce.snap.svg +1 -1
- package/tests/solver/bugreport23-LGA15x4/__snapshots__/bugreport23-LGA15x4.snap.svg +1 -1
- package/tests/solver/bugreport24-05597c/__snapshots__/bugreport24-05597c.snap.svg +1 -1
- package/tests/solver/bugreport25-4b1d55/__snapshots__/bugreport25-4b1d55.snap.svg +1 -1
- package/tests/solver/bugreport36-bf8303/__snapshots__/bugreport36-bf8303.snap.svg +1 -1
- package/tests/solver/bugreport49-634662/__snapshots__/bugreport49-634662.snap.svg +44 -0
- package/tests/solver/bugreport49-634662/bugreport49-634662.test.ts +134 -0
- package/tests/solver/bugreport50-multi-support-layer-merge/__snapshots__/bugreport50-multi-support-layer-merge.snap.svg +44 -0
- package/tests/solver/bugreport50-multi-support-layer-merge/bugreport50-multi-support-layer-merge.json +972 -0
- package/tests/solver/bugreport50-multi-support-layer-merge/bugreport50-multi-support-layer-merge.test.ts +125 -0
- package/tests/solver/interaction/__snapshots__/interaction.snap.svg +1 -1
- package/tests/solver/multi-point/__snapshots__/multi-point.snap.svg +1 -1
- package/tests/solver/no-better-path/__snapshots__/no-better-path.snap.svg +1 -1
- package/tests/solver/transitivity/__snapshots__/transitivity.snap.svg +2 -2
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
{
|
|
2
|
+
"autorouting_bug_report_id": "6346629c-bb27-4d63-a798-78e850e8572d",
|
|
3
|
+
"reporter_account_id": "9f398687-69d0-4ef4-a48c-bb6dc990e7df",
|
|
4
|
+
"package_id": null,
|
|
5
|
+
"title": "<board#1853 />",
|
|
6
|
+
"simple_route_json": {
|
|
7
|
+
"bounds": {
|
|
8
|
+
"maxX": 5,
|
|
9
|
+
"maxY": 5,
|
|
10
|
+
"minX": -5,
|
|
11
|
+
"minY": -5
|
|
12
|
+
},
|
|
13
|
+
"obstacles": [
|
|
14
|
+
{
|
|
15
|
+
"type": "rect",
|
|
16
|
+
"width": 1,
|
|
17
|
+
"center": {
|
|
18
|
+
"x": -2.15,
|
|
19
|
+
"y": 1.905
|
|
20
|
+
},
|
|
21
|
+
"height": 0.6,
|
|
22
|
+
"layers": ["top"],
|
|
23
|
+
"connectedTo": [
|
|
24
|
+
"pcb_smtpad_0",
|
|
25
|
+
"connectivity_net8",
|
|
26
|
+
"source_trace_3",
|
|
27
|
+
"source_port_8",
|
|
28
|
+
"source_port_0",
|
|
29
|
+
"pcb_smtpad_0",
|
|
30
|
+
"pcb_port_0",
|
|
31
|
+
"pcb_smtpad_8",
|
|
32
|
+
"pcb_port_8"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "rect",
|
|
37
|
+
"width": 1,
|
|
38
|
+
"center": {
|
|
39
|
+
"x": -2.15,
|
|
40
|
+
"y": 0.635
|
|
41
|
+
},
|
|
42
|
+
"height": 0.6,
|
|
43
|
+
"layers": ["top"],
|
|
44
|
+
"connectedTo": [
|
|
45
|
+
"pcb_smtpad_1",
|
|
46
|
+
"connectivity_net16",
|
|
47
|
+
"source_trace_6",
|
|
48
|
+
"source_port_11",
|
|
49
|
+
"source_trace_4",
|
|
50
|
+
"source_port_9",
|
|
51
|
+
"source_trace_2",
|
|
52
|
+
"source_port_3",
|
|
53
|
+
"source_trace_0",
|
|
54
|
+
"source_port_1",
|
|
55
|
+
"source_net_0",
|
|
56
|
+
"pcb_smtpad_1",
|
|
57
|
+
"pcb_port_1",
|
|
58
|
+
"pcb_smtpad_3",
|
|
59
|
+
"pcb_port_3",
|
|
60
|
+
"pcb_smtpad_9",
|
|
61
|
+
"pcb_port_9",
|
|
62
|
+
"pcb_smtpad_11",
|
|
63
|
+
"pcb_port_11"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "rect",
|
|
68
|
+
"width": 1,
|
|
69
|
+
"center": {
|
|
70
|
+
"x": -2.15,
|
|
71
|
+
"y": -0.635
|
|
72
|
+
},
|
|
73
|
+
"height": 0.6,
|
|
74
|
+
"layers": ["top"],
|
|
75
|
+
"connectedTo": [
|
|
76
|
+
"pcb_smtpad_2",
|
|
77
|
+
"connectivity_net3",
|
|
78
|
+
"source_trace_1",
|
|
79
|
+
"source_port_2",
|
|
80
|
+
"source_net_1",
|
|
81
|
+
"pcb_smtpad_2",
|
|
82
|
+
"pcb_port_2"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "rect",
|
|
87
|
+
"width": 1,
|
|
88
|
+
"center": {
|
|
89
|
+
"x": -2.15,
|
|
90
|
+
"y": -1.905
|
|
91
|
+
},
|
|
92
|
+
"height": 0.6,
|
|
93
|
+
"layers": ["top"],
|
|
94
|
+
"connectedTo": [
|
|
95
|
+
"pcb_smtpad_3",
|
|
96
|
+
"connectivity_net16",
|
|
97
|
+
"source_trace_6",
|
|
98
|
+
"source_port_11",
|
|
99
|
+
"source_trace_4",
|
|
100
|
+
"source_port_9",
|
|
101
|
+
"source_trace_2",
|
|
102
|
+
"source_port_3",
|
|
103
|
+
"source_trace_0",
|
|
104
|
+
"source_port_1",
|
|
105
|
+
"source_net_0",
|
|
106
|
+
"pcb_smtpad_1",
|
|
107
|
+
"pcb_port_1",
|
|
108
|
+
"pcb_smtpad_3",
|
|
109
|
+
"pcb_port_3",
|
|
110
|
+
"pcb_smtpad_9",
|
|
111
|
+
"pcb_port_9",
|
|
112
|
+
"pcb_smtpad_11",
|
|
113
|
+
"pcb_port_11"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "rect",
|
|
118
|
+
"width": 1,
|
|
119
|
+
"center": {
|
|
120
|
+
"x": 2.15,
|
|
121
|
+
"y": -1.905
|
|
122
|
+
},
|
|
123
|
+
"height": 0.6,
|
|
124
|
+
"layers": ["top"],
|
|
125
|
+
"connectedTo": [
|
|
126
|
+
"pcb_smtpad_4",
|
|
127
|
+
"connectivity_net42",
|
|
128
|
+
"source_port_4",
|
|
129
|
+
"pcb_smtpad_4",
|
|
130
|
+
"pcb_port_4"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"type": "rect",
|
|
135
|
+
"width": 1,
|
|
136
|
+
"center": {
|
|
137
|
+
"x": 2.15,
|
|
138
|
+
"y": -0.635
|
|
139
|
+
},
|
|
140
|
+
"height": 0.6,
|
|
141
|
+
"layers": ["top"],
|
|
142
|
+
"connectedTo": [
|
|
143
|
+
"pcb_smtpad_5",
|
|
144
|
+
"connectivity_net13",
|
|
145
|
+
"source_trace_5",
|
|
146
|
+
"source_port_10",
|
|
147
|
+
"source_port_5",
|
|
148
|
+
"pcb_smtpad_5",
|
|
149
|
+
"pcb_port_5",
|
|
150
|
+
"pcb_smtpad_10",
|
|
151
|
+
"pcb_port_10"
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"type": "rect",
|
|
156
|
+
"width": 1,
|
|
157
|
+
"center": {
|
|
158
|
+
"x": 2.15,
|
|
159
|
+
"y": 0.635
|
|
160
|
+
},
|
|
161
|
+
"height": 0.6,
|
|
162
|
+
"layers": ["top"],
|
|
163
|
+
"connectedTo": [
|
|
164
|
+
"pcb_smtpad_6",
|
|
165
|
+
"connectivity_net43",
|
|
166
|
+
"source_port_6",
|
|
167
|
+
"pcb_smtpad_6",
|
|
168
|
+
"pcb_port_6"
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"type": "rect",
|
|
173
|
+
"width": 1,
|
|
174
|
+
"center": {
|
|
175
|
+
"x": 2.15,
|
|
176
|
+
"y": 1.905
|
|
177
|
+
},
|
|
178
|
+
"height": 0.6,
|
|
179
|
+
"layers": ["top"],
|
|
180
|
+
"connectedTo": [
|
|
181
|
+
"pcb_smtpad_7",
|
|
182
|
+
"connectivity_net44",
|
|
183
|
+
"source_port_7",
|
|
184
|
+
"pcb_smtpad_7",
|
|
185
|
+
"pcb_port_7"
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "rect",
|
|
190
|
+
"width": 0.54,
|
|
191
|
+
"center": {
|
|
192
|
+
"x": -2.1499999999999995,
|
|
193
|
+
"y": 3.525
|
|
194
|
+
},
|
|
195
|
+
"height": 0.64,
|
|
196
|
+
"layers": ["top"],
|
|
197
|
+
"connectedTo": [
|
|
198
|
+
"pcb_smtpad_8",
|
|
199
|
+
"connectivity_net8",
|
|
200
|
+
"source_trace_3",
|
|
201
|
+
"source_port_8",
|
|
202
|
+
"source_port_0",
|
|
203
|
+
"pcb_smtpad_0",
|
|
204
|
+
"pcb_port_0",
|
|
205
|
+
"pcb_smtpad_8",
|
|
206
|
+
"pcb_port_8"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"type": "rect",
|
|
211
|
+
"width": 0.54,
|
|
212
|
+
"center": {
|
|
213
|
+
"x": -1.1299999999999997,
|
|
214
|
+
"y": 3.525
|
|
215
|
+
},
|
|
216
|
+
"height": 0.64,
|
|
217
|
+
"layers": ["top"],
|
|
218
|
+
"connectedTo": [
|
|
219
|
+
"pcb_smtpad_9",
|
|
220
|
+
"connectivity_net16",
|
|
221
|
+
"source_trace_6",
|
|
222
|
+
"source_port_11",
|
|
223
|
+
"source_trace_4",
|
|
224
|
+
"source_port_9",
|
|
225
|
+
"source_trace_2",
|
|
226
|
+
"source_port_3",
|
|
227
|
+
"source_trace_0",
|
|
228
|
+
"source_port_1",
|
|
229
|
+
"source_net_0",
|
|
230
|
+
"pcb_smtpad_1",
|
|
231
|
+
"pcb_port_1",
|
|
232
|
+
"pcb_smtpad_3",
|
|
233
|
+
"pcb_port_3",
|
|
234
|
+
"pcb_smtpad_9",
|
|
235
|
+
"pcb_port_9",
|
|
236
|
+
"pcb_smtpad_11",
|
|
237
|
+
"pcb_port_11"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"type": "rect",
|
|
242
|
+
"width": 0.64,
|
|
243
|
+
"center": {
|
|
244
|
+
"x": 3.9699999999999998,
|
|
245
|
+
"y": -0.635
|
|
246
|
+
},
|
|
247
|
+
"height": 0.54,
|
|
248
|
+
"layers": ["top"],
|
|
249
|
+
"connectedTo": [
|
|
250
|
+
"pcb_smtpad_10",
|
|
251
|
+
"connectivity_net13",
|
|
252
|
+
"source_trace_5",
|
|
253
|
+
"source_port_10",
|
|
254
|
+
"source_port_5",
|
|
255
|
+
"pcb_smtpad_5",
|
|
256
|
+
"pcb_port_5",
|
|
257
|
+
"pcb_smtpad_10",
|
|
258
|
+
"pcb_port_10"
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"type": "rect",
|
|
263
|
+
"width": 0.64,
|
|
264
|
+
"center": {
|
|
265
|
+
"x": 3.9699999999999998,
|
|
266
|
+
"y": 0.385
|
|
267
|
+
},
|
|
268
|
+
"height": 0.54,
|
|
269
|
+
"layers": ["top"],
|
|
270
|
+
"connectedTo": [
|
|
271
|
+
"pcb_smtpad_11",
|
|
272
|
+
"connectivity_net16",
|
|
273
|
+
"source_trace_6",
|
|
274
|
+
"source_port_11",
|
|
275
|
+
"source_trace_4",
|
|
276
|
+
"source_port_9",
|
|
277
|
+
"source_trace_2",
|
|
278
|
+
"source_port_3",
|
|
279
|
+
"source_trace_0",
|
|
280
|
+
"source_port_1",
|
|
281
|
+
"source_net_0",
|
|
282
|
+
"pcb_smtpad_1",
|
|
283
|
+
"pcb_port_1",
|
|
284
|
+
"pcb_smtpad_3",
|
|
285
|
+
"pcb_port_3",
|
|
286
|
+
"pcb_smtpad_9",
|
|
287
|
+
"pcb_port_9",
|
|
288
|
+
"pcb_smtpad_11",
|
|
289
|
+
"pcb_port_11"
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"type": "rect",
|
|
294
|
+
"width": 10,
|
|
295
|
+
"center": {
|
|
296
|
+
"x": 0,
|
|
297
|
+
"y": 0
|
|
298
|
+
},
|
|
299
|
+
"height": 10,
|
|
300
|
+
"layers": ["inner1"],
|
|
301
|
+
"connectedTo": ["net.VCC"],
|
|
302
|
+
"isCopperPour": true
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"type": "rect",
|
|
306
|
+
"width": 10,
|
|
307
|
+
"center": {
|
|
308
|
+
"x": 0,
|
|
309
|
+
"y": 0
|
|
310
|
+
},
|
|
311
|
+
"height": 10,
|
|
312
|
+
"layers": ["inner2"],
|
|
313
|
+
"connectedTo": ["net.GND"],
|
|
314
|
+
"isCopperPour": true
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"layerCount": 4,
|
|
318
|
+
"connections": [
|
|
319
|
+
{
|
|
320
|
+
"name": "source_trace_3",
|
|
321
|
+
"pointsToConnect": [
|
|
322
|
+
{
|
|
323
|
+
"x": -2.1499999999999995,
|
|
324
|
+
"y": 3.525,
|
|
325
|
+
"layer": "top",
|
|
326
|
+
"pointId": "pcb_port_8",
|
|
327
|
+
"pcb_port_id": "pcb_port_8"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"x": -2.15,
|
|
331
|
+
"y": 1.905,
|
|
332
|
+
"layer": "top",
|
|
333
|
+
"pointId": "pcb_port_0",
|
|
334
|
+
"pcb_port_id": "pcb_port_0"
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
"source_trace_id": "source_trace_3"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"name": "source_trace_5",
|
|
341
|
+
"pointsToConnect": [
|
|
342
|
+
{
|
|
343
|
+
"x": 3.9699999999999998,
|
|
344
|
+
"y": -0.635,
|
|
345
|
+
"layer": "top",
|
|
346
|
+
"pointId": "pcb_port_10",
|
|
347
|
+
"pcb_port_id": "pcb_port_10"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"x": 2.15,
|
|
351
|
+
"y": -0.635,
|
|
352
|
+
"layer": "top",
|
|
353
|
+
"pointId": "pcb_port_5",
|
|
354
|
+
"pcb_port_id": "pcb_port_5"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"source_trace_id": "source_trace_5"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"name": "source_net_0",
|
|
361
|
+
"netConnectionName": "net.VCC",
|
|
362
|
+
"pointsToConnect": [
|
|
363
|
+
{
|
|
364
|
+
"x": -2.15,
|
|
365
|
+
"y": 0.635,
|
|
366
|
+
"layer": "top",
|
|
367
|
+
"pointId": "pcb_port_1",
|
|
368
|
+
"pcb_port_id": "pcb_port_1"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"x": -2.15,
|
|
372
|
+
"y": -1.905,
|
|
373
|
+
"layer": "top",
|
|
374
|
+
"pointId": "pcb_port_3",
|
|
375
|
+
"pcb_port_id": "pcb_port_3"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"x": -1.1299999999999997,
|
|
379
|
+
"y": 3.525,
|
|
380
|
+
"layer": "top",
|
|
381
|
+
"pointId": "pcb_port_9",
|
|
382
|
+
"pcb_port_id": "pcb_port_9"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"x": 3.9699999999999998,
|
|
386
|
+
"y": 0.385,
|
|
387
|
+
"layer": "top",
|
|
388
|
+
"pointId": "pcb_port_11",
|
|
389
|
+
"pcb_port_id": "pcb_port_11"
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"name": "source_net_1",
|
|
395
|
+
"netConnectionName": "net.GND",
|
|
396
|
+
"pointsToConnect": [
|
|
397
|
+
{
|
|
398
|
+
"x": -2.15,
|
|
399
|
+
"y": -0.635,
|
|
400
|
+
"layer": "top",
|
|
401
|
+
"pointId": "pcb_port_2",
|
|
402
|
+
"pcb_port_id": "pcb_port_2"
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
"minTraceWidth": 0.15
|
|
408
|
+
},
|
|
409
|
+
"circuit_json": null,
|
|
410
|
+
"subcircuit_id": null,
|
|
411
|
+
"created_at": "2026-04-11T17:08:22.076Z"
|
|
412
|
+
}
|
|
@@ -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><rect data-type="rect" data-label="node" data-x="-5" data-y="1.
|
|
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><rect data-type="rect" data-label="node" data-x="-5" data-y="1.1600000000000001" x="40" y="110" width="210" height="338.79999999999995" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="5" data-y="1.1600000000000001" x="390" y="110" width="210" height="338.79999999999995" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="0" data-y="4" x="250" y="110" width="140" height="140" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="-5.48" data-y="-5.16" x="40" y="471.20000000000005" width="176.39999999999998" height="58.799999999999955" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="5.48" data-y="-5.16" x="423.6" y="471.20000000000005" width="176.39999999999998" height="58.799999999999955" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="-2.48" data-y="-4.84" x="216.4" y="448.79999999999995" width="33.599999999999994" height="81.20000000000005" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="2.48" data-y="-4.84" x="390" y="448.79999999999995" width="33.60000000000002" height="81.20000000000005" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="-6.890000000000001" data-y="-3.999999999999999" x="40" y="448.79999999999995" width="77.69999999999996" height="22.400000000000034" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="-5" data-y="-3.999999999999999" x="136.6" y="448.79999999999995" width="16.80000000000001" height="22.400000000000034" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="-3.59" data-y="-3.999999999999999" x="172.3" y="448.79999999999995" width="44.099999999999994" height="22.400000000000034" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="3.59" data-y="-3.999999999999999" x="423.6" y="448.79999999999995" width="44.099999999999966" height="22.400000000000034" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="5" data-y="-3.999999999999999" x="486.6" y="448.79999999999995" width="16.799999999999955" height="22.400000000000034" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="6.889999999999999" data-y="-3.999999999999999" x="522.3" y="448.79999999999995" width="77.70000000000005" height="22.400000000000034" fill="#dbeafe" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="-5.51" data-y="-4" x="117.70000000000002" y="448.79999999999995" width="18.899999999999977" height="22.40000000000009" fill="red" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="-4.49" data-y="-4" x="153.4" y="448.79999999999995" width="18.899999999999977" height="22.40000000000009" fill="red" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="4.49" data-y="-4" x="467.70000000000005" y="448.79999999999995" width="18.899999999999977" height="22.40000000000009" fill="red" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="5.51" data-y="-4" x="503.4" y="448.79999999999995" width="18.899999999999977" height="22.40000000000009" fill="red" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="-5.51" data-y="-3.999999999999999" x="117.70000000000002" y="448.79999999999995" width="18.899999999999977" height="22.400000000000034" fill="#fef3c7" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="-4.49" data-y="-3.999999999999999" x="153.39999999999998" y="448.79999999999995" width="18.900000000000034" height="22.400000000000034" fill="#fef3c7" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="4.49" data-y="-3.999999999999999" x="467.70000000000005" y="448.79999999999995" width="18.899999999999977" height="22.400000000000034" fill="#fef3c7" stroke="black" stroke-width="0.02857142857142857"/></g><g><rect data-type="rect" data-label="node" data-x="5.51" data-y="-3.999999999999999" x="503.4" y="448.79999999999995" width="18.899999999999977" height="22.400000000000034" fill="#fef3c7" stroke="black" stroke-width="0.02857142857142857"/></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[
|
|
2
2
|
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
3
3
|
const svg = e.currentTarget;
|
|
4
4
|
const rect = svg.getBoundingClientRect();
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
v.setAttribute('y2', '640');
|
|
21
21
|
|
|
22
22
|
// Calculate real coordinates using inverse transformation
|
|
23
|
-
const matrix = {"a":35,"c":0,"e":320,"b":0,"d":-35,"f":320
|
|
23
|
+
const matrix = {"a":35,"c":0,"e":320,"b":0,"d":-35,"f":320};
|
|
24
24
|
// Manually invert and apply the affine transform
|
|
25
25
|
// Since we only use translate and scale, we can directly compute:
|
|
26
26
|
// x' = (x - tx) / sx
|