@tscircuit/copper-pour-solver 0.0.1

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.
Files changed (44) hide show
  1. package/.github/workflows/.replit +9 -0
  2. package/.github/workflows/bun-formatcheck.yml +26 -0
  3. package/.github/workflows/bun-pver-release.yml +71 -0
  4. package/.github/workflows/bun-test.yml +31 -0
  5. package/.github/workflows/bun-typecheck.yml +26 -0
  6. package/README.md +37 -0
  7. package/biome.json +93 -0
  8. package/bun.lock +164 -0
  9. package/bunfig.toml +5 -0
  10. package/cosmos.config.json +5 -0
  11. package/dist/index.d.ts +57 -0
  12. package/dist/index.js +368 -0
  13. package/lib/circuit-json/convert-circuit-json-to-input-problem.ts +208 -0
  14. package/lib/circuit-json/convertCircuitJsonToInputProblem.ts +0 -0
  15. package/lib/index.ts +3 -0
  16. package/lib/solvers/CopperPourPipelineSolver.ts +51 -0
  17. package/lib/solvers/copper-pour/circle-to-polygon.ts +15 -0
  18. package/lib/solvers/copper-pour/generate-brep.ts +60 -0
  19. package/lib/solvers/copper-pour/get-board-polygon.ts +19 -0
  20. package/lib/solvers/copper-pour/process-obstacles.ts +116 -0
  21. package/lib/types.ts +46 -0
  22. package/package.json +28 -0
  23. package/site/Welcome.page.tsx +0 -0
  24. package/tests/__snapshots__/circuit-1.snap.svg +1 -0
  25. package/tests/__snapshots__/circuit-2.snap.svg +1 -0
  26. package/tests/__snapshots__/circuit-3.snap.svg +1 -0
  27. package/tests/__snapshots__/circuit-4.snap.svg +1 -0
  28. package/tests/__snapshots__/circuit-5.snap.svg +1 -0
  29. package/tests/__snapshots__/circuit-6.snap.svg +1 -0
  30. package/tests/assets/circuit-1.json +592 -0
  31. package/tests/assets/circuit-2.json +1424 -0
  32. package/tests/assets/circuit-3.json +1424 -0
  33. package/tests/assets/circuit-4.json +631 -0
  34. package/tests/assets/circuit-5.json +631 -0
  35. package/tests/assets/circuit-6.json +806 -0
  36. package/tests/circuit-1.test.ts +14 -0
  37. package/tests/circuit-2.test.ts +15 -0
  38. package/tests/circuit-3.test.ts +15 -0
  39. package/tests/circuit-4.test.ts +15 -0
  40. package/tests/circuit-5.test.ts +15 -0
  41. package/tests/circuit-6.test.ts +15 -0
  42. package/tests/fixtures/preload.ts +1 -0
  43. package/tests/utils/run-solver-and-render-to-svg.ts +64 -0
  44. package/tsconfig.json +34 -0
@@ -0,0 +1,806 @@
1
+ [
2
+ {
3
+ "type": "source_project_metadata",
4
+ "source_project_metadata_id": "source_project_metadata_0",
5
+ "software_used_string": "@tscircuit/core@0.0.844"
6
+ },
7
+ {
8
+ "type": "source_group",
9
+ "source_group_id": "source_group_0",
10
+ "is_subcircuit": true,
11
+ "was_automatically_named": true,
12
+ "subcircuit_id": "subcircuit_source_group_0"
13
+ },
14
+ {
15
+ "type": "source_net",
16
+ "source_net_id": "source_net_0",
17
+ "name": "GND",
18
+ "member_source_group_ids": [],
19
+ "is_ground": true,
20
+ "is_power": false,
21
+ "is_positive_voltage_source": false,
22
+ "subcircuit_id": "subcircuit_source_group_0",
23
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net0"
24
+ },
25
+ {
26
+ "type": "source_net",
27
+ "source_net_id": "source_net_1",
28
+ "name": "VCC",
29
+ "member_source_group_ids": [],
30
+ "is_ground": false,
31
+ "is_power": true,
32
+ "is_positive_voltage_source": true,
33
+ "subcircuit_id": "subcircuit_source_group_0",
34
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net1"
35
+ },
36
+ {
37
+ "type": "source_port",
38
+ "source_port_id": "source_port_0",
39
+ "name": "pin1",
40
+ "pin_number": 1,
41
+ "port_hints": ["pin1", "anode", "pos", "left", "1"],
42
+ "source_component_id": "source_component_0",
43
+ "subcircuit_id": "subcircuit_source_group_0",
44
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net0"
45
+ },
46
+ {
47
+ "type": "source_port",
48
+ "source_port_id": "source_port_1",
49
+ "name": "pin2",
50
+ "pin_number": 2,
51
+ "port_hints": ["pin2", "cathode", "neg", "right", "2"],
52
+ "source_component_id": "source_component_0",
53
+ "subcircuit_id": "subcircuit_source_group_0",
54
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net1"
55
+ },
56
+ {
57
+ "type": "source_component",
58
+ "source_component_id": "source_component_0",
59
+ "ftype": "simple_resistor",
60
+ "name": "R1",
61
+ "resistance": 10000,
62
+ "display_resistance": "10kΩ",
63
+ "are_pins_interchangeable": true,
64
+ "source_group_id": "source_group_0"
65
+ },
66
+ {
67
+ "type": "source_port",
68
+ "source_port_id": "source_port_2",
69
+ "name": "pin1",
70
+ "pin_number": 1,
71
+ "port_hints": ["pin1", "anode", "pos", "left", "1"],
72
+ "source_component_id": "source_component_1",
73
+ "subcircuit_id": "subcircuit_source_group_0",
74
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net1"
75
+ },
76
+ {
77
+ "type": "source_port",
78
+ "source_port_id": "source_port_3",
79
+ "name": "pin2",
80
+ "pin_number": 2,
81
+ "port_hints": ["pin2", "cathode", "neg", "right", "2"],
82
+ "source_component_id": "source_component_1",
83
+ "subcircuit_id": "subcircuit_source_group_0",
84
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net1"
85
+ },
86
+ {
87
+ "type": "source_component",
88
+ "source_component_id": "source_component_1",
89
+ "ftype": "simple_resistor",
90
+ "name": "R2",
91
+ "resistance": 1000,
92
+ "display_resistance": "1kΩ",
93
+ "are_pins_interchangeable": true,
94
+ "source_group_id": "source_group_0"
95
+ },
96
+ {
97
+ "type": "source_board",
98
+ "source_board_id": "source_board_0",
99
+ "source_group_id": "source_group_0"
100
+ },
101
+ {
102
+ "type": "source_trace",
103
+ "source_trace_id": "source_trace_0",
104
+ "connected_source_port_ids": ["source_port_0"],
105
+ "connected_source_net_ids": ["source_net_0"],
106
+ "subcircuit_id": "subcircuit_source_group_0",
107
+ "display_name": ".R1 > .pin1 to net.GND",
108
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net0"
109
+ },
110
+ {
111
+ "type": "source_trace",
112
+ "source_trace_id": "source_trace_1",
113
+ "connected_source_port_ids": ["source_port_1"],
114
+ "connected_source_net_ids": ["source_net_1"],
115
+ "subcircuit_id": "subcircuit_source_group_0",
116
+ "display_name": ".R1 > .pin2 to net.VCC",
117
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net1"
118
+ },
119
+ {
120
+ "type": "source_trace",
121
+ "source_trace_id": "source_trace_2",
122
+ "connected_source_port_ids": ["source_port_2"],
123
+ "connected_source_net_ids": ["source_net_1"],
124
+ "subcircuit_id": "subcircuit_source_group_0",
125
+ "display_name": ".R2 > .pin1 to net.VCC",
126
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net1"
127
+ },
128
+ {
129
+ "type": "source_trace",
130
+ "source_trace_id": "source_trace_3",
131
+ "connected_source_port_ids": ["source_port_3"],
132
+ "connected_source_net_ids": ["source_net_1"],
133
+ "subcircuit_id": "subcircuit_source_group_0",
134
+ "display_name": ".R2 > .pin2 to net.VCC",
135
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net1"
136
+ },
137
+ {
138
+ "type": "schematic_component",
139
+ "schematic_component_id": "schematic_component_0",
140
+ "center": {
141
+ "x": 0,
142
+ "y": 0
143
+ },
144
+ "size": {
145
+ "width": 1.1,
146
+ "height": 0.388910699999999
147
+ },
148
+ "source_component_id": "source_component_0",
149
+ "is_box_with_pins": true,
150
+ "symbol_name": "boxresistor_right",
151
+ "symbol_display_value": "10kΩ",
152
+ "schematic_group_id": "schematic_group_0"
153
+ },
154
+ {
155
+ "type": "schematic_component",
156
+ "schematic_component_id": "schematic_component_1",
157
+ "center": {
158
+ "x": 1.0999999999999996,
159
+ "y": -1.588910699999999
160
+ },
161
+ "size": {
162
+ "width": 1.1,
163
+ "height": 0.388910699999999
164
+ },
165
+ "source_component_id": "source_component_1",
166
+ "is_box_with_pins": true,
167
+ "symbol_name": "boxresistor_right",
168
+ "symbol_display_value": "1kΩ",
169
+ "schematic_group_id": "schematic_group_0"
170
+ },
171
+ {
172
+ "type": "schematic_group",
173
+ "schematic_group_id": "schematic_group_0",
174
+ "is_subcircuit": true,
175
+ "subcircuit_id": "subcircuit_source_group_0",
176
+ "name": "unnamed_board1",
177
+ "center": {
178
+ "x": 0,
179
+ "y": 0
180
+ },
181
+ "width": 0,
182
+ "height": 0,
183
+ "schematic_component_ids": [],
184
+ "source_group_id": "source_group_0"
185
+ },
186
+ {
187
+ "type": "schematic_port",
188
+ "schematic_port_id": "schematic_port_0",
189
+ "schematic_component_id": "schematic_component_0",
190
+ "center": {
191
+ "x": -0.55,
192
+ "y": 0
193
+ },
194
+ "source_port_id": "source_port_0",
195
+ "facing_direction": "left",
196
+ "distance_from_component_edge": 0.4,
197
+ "pin_number": 1,
198
+ "display_pin_label": "anode",
199
+ "is_connected": false
200
+ },
201
+ {
202
+ "type": "schematic_port",
203
+ "schematic_port_id": "schematic_port_1",
204
+ "schematic_component_id": "schematic_component_0",
205
+ "center": {
206
+ "x": 0.55,
207
+ "y": 0
208
+ },
209
+ "source_port_id": "source_port_1",
210
+ "facing_direction": "right",
211
+ "distance_from_component_edge": 0.4,
212
+ "pin_number": 2,
213
+ "display_pin_label": "cathode",
214
+ "is_connected": true
215
+ },
216
+ {
217
+ "type": "schematic_port",
218
+ "schematic_port_id": "schematic_port_2",
219
+ "schematic_component_id": "schematic_component_1",
220
+ "center": {
221
+ "x": 0.5499999999999996,
222
+ "y": -1.588910699999999
223
+ },
224
+ "source_port_id": "source_port_2",
225
+ "facing_direction": "left",
226
+ "distance_from_component_edge": 0.4,
227
+ "pin_number": 1,
228
+ "display_pin_label": "anode",
229
+ "is_connected": true
230
+ },
231
+ {
232
+ "type": "schematic_port",
233
+ "schematic_port_id": "schematic_port_3",
234
+ "schematic_component_id": "schematic_component_1",
235
+ "center": {
236
+ "x": 1.6499999999999997,
237
+ "y": -1.588910699999999
238
+ },
239
+ "source_port_id": "source_port_3",
240
+ "facing_direction": "right",
241
+ "distance_from_component_edge": 0.4,
242
+ "pin_number": 2,
243
+ "display_pin_label": "cathode",
244
+ "is_connected": true
245
+ },
246
+ {
247
+ "type": "schematic_trace",
248
+ "schematic_trace_id": "schematic_trace_0",
249
+ "source_trace_id": "solver_R2.1-R1.2",
250
+ "edges": [
251
+ {
252
+ "from": {
253
+ "x": 0.5499999999999996,
254
+ "y": -1.588910699999999
255
+ },
256
+ "to": {
257
+ "x": 0.34999999999999964,
258
+ "y": -1.588910699999999
259
+ }
260
+ },
261
+ {
262
+ "from": {
263
+ "x": 0.34999999999999964,
264
+ "y": -1.588910699999999
265
+ },
266
+ "to": {
267
+ "x": 0.34999999999999964,
268
+ "y": -0.7944553499999994
269
+ }
270
+ },
271
+ {
272
+ "from": {
273
+ "x": 0.34999999999999964,
274
+ "y": -0.7944553499999994
275
+ },
276
+ "to": {
277
+ "x": 0.75,
278
+ "y": -0.7944553499999994
279
+ }
280
+ },
281
+ {
282
+ "from": {
283
+ "x": 0.75,
284
+ "y": -0.7944553499999994
285
+ },
286
+ "to": {
287
+ "x": 0.75,
288
+ "y": 0
289
+ }
290
+ },
291
+ {
292
+ "from": {
293
+ "x": 0.75,
294
+ "y": 0
295
+ },
296
+ "to": {
297
+ "x": 0.55,
298
+ "y": 0
299
+ }
300
+ }
301
+ ],
302
+ "junctions": [
303
+ {
304
+ "x": 0.34999999999999964,
305
+ "y": -1.388910699999999
306
+ }
307
+ ],
308
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net1"
309
+ },
310
+ {
311
+ "type": "schematic_trace",
312
+ "schematic_trace_id": "schematic_trace_1",
313
+ "source_trace_id": "solver_R2.2-R2.1",
314
+ "edges": [
315
+ {
316
+ "from": {
317
+ "x": 1.6499999999999997,
318
+ "y": -1.588910699999999
319
+ },
320
+ "to": {
321
+ "x": 1.8499999999999996,
322
+ "y": -1.588910699999999
323
+ }
324
+ },
325
+ {
326
+ "from": {
327
+ "x": 1.8499999999999996,
328
+ "y": -1.588910699999999
329
+ },
330
+ "to": {
331
+ "x": 1.8499999999999996,
332
+ "y": -1.388910699999999
333
+ }
334
+ },
335
+ {
336
+ "from": {
337
+ "x": 1.8499999999999996,
338
+ "y": -1.388910699999999
339
+ },
340
+ "to": {
341
+ "x": 0.34999999999999964,
342
+ "y": -1.388910699999999
343
+ }
344
+ },
345
+ {
346
+ "from": {
347
+ "x": 0.34999999999999964,
348
+ "y": -1.388910699999999
349
+ },
350
+ "to": {
351
+ "x": 0.34999999999999964,
352
+ "y": -1.588910699999999
353
+ }
354
+ },
355
+ {
356
+ "from": {
357
+ "x": 0.34999999999999964,
358
+ "y": -1.588910699999999
359
+ },
360
+ "to": {
361
+ "x": 0.5499999999999996,
362
+ "y": -1.588910699999999
363
+ }
364
+ }
365
+ ],
366
+ "junctions": [
367
+ {
368
+ "x": 0.34999999999999964,
369
+ "y": -1.388910699999999
370
+ }
371
+ ],
372
+ "subcircuit_connectivity_map_key": "unnamedsubcircuit25_connectivity_net1"
373
+ },
374
+ {
375
+ "type": "schematic_net_label",
376
+ "schematic_net_label_id": "schematic_net_label_0",
377
+ "text": "VCC",
378
+ "anchor_position": {
379
+ "x": 0.75,
380
+ "y": 0
381
+ },
382
+ "center": {
383
+ "x": 0.75,
384
+ "y": 0.09
385
+ },
386
+ "anchor_side": "bottom",
387
+ "source_net_id": "source_net_1",
388
+ "symbol_name": "rail_up"
389
+ },
390
+ {
391
+ "type": "schematic_net_label",
392
+ "schematic_net_label_id": "schematic_net_label_1",
393
+ "text": "GND",
394
+ "anchor_position": {
395
+ "x": -0.55,
396
+ "y": 0
397
+ },
398
+ "center": {
399
+ "x": -0.7000000000000001,
400
+ "y": 0
401
+ },
402
+ "anchor_side": "right",
403
+ "source_net_id": "source_net_0"
404
+ },
405
+ {
406
+ "type": "pcb_component",
407
+ "pcb_component_id": "pcb_component_0",
408
+ "center": {
409
+ "x": -5,
410
+ "y": -2
411
+ },
412
+ "width": 2.8499999999999996,
413
+ "height": 1.4000000000000001,
414
+ "layer": "top",
415
+ "rotation": 0,
416
+ "source_component_id": "source_component_0",
417
+ "subcircuit_id": "subcircuit_source_group_0",
418
+ "do_not_place": false,
419
+ "obstructs_within_bounds": true
420
+ },
421
+ {
422
+ "type": "pcb_component",
423
+ "pcb_component_id": "pcb_component_1",
424
+ "center": {
425
+ "x": 5,
426
+ "y": -2
427
+ },
428
+ "width": 2.8499999999999996,
429
+ "height": 1.4000000000000001,
430
+ "layer": "top",
431
+ "rotation": 0,
432
+ "source_component_id": "source_component_1",
433
+ "subcircuit_id": "subcircuit_source_group_0",
434
+ "do_not_place": false,
435
+ "obstructs_within_bounds": true
436
+ },
437
+ {
438
+ "type": "pcb_board",
439
+ "pcb_board_id": "pcb_board_0",
440
+ "center": {
441
+ "x": 0,
442
+ "y": 0
443
+ },
444
+ "thickness": 1.4,
445
+ "num_layers": 2,
446
+ "width": 20,
447
+ "height": 20,
448
+ "outline": [
449
+ {
450
+ "x": -10,
451
+ "y": -10
452
+ },
453
+ {
454
+ "x": 10,
455
+ "y": -10
456
+ },
457
+ {
458
+ "x": 10,
459
+ "y": 10
460
+ },
461
+ {
462
+ "x": 0,
463
+ "y": 10
464
+ },
465
+ {
466
+ "x": 0,
467
+ "y": 0
468
+ },
469
+ {
470
+ "x": -10,
471
+ "y": 0
472
+ }
473
+ ],
474
+ "material": "fr4"
475
+ },
476
+ {
477
+ "type": "pcb_smtpad",
478
+ "pcb_smtpad_id": "pcb_smtpad_0",
479
+ "pcb_component_id": "pcb_component_0",
480
+ "pcb_port_id": "pcb_port_0",
481
+ "layer": "top",
482
+ "shape": "rect",
483
+ "width": 1.025,
484
+ "height": 1.4,
485
+ "port_hints": ["1", "left"],
486
+ "is_covered_with_solder_mask": false,
487
+ "x": -5.9125,
488
+ "y": -2,
489
+ "subcircuit_id": "subcircuit_source_group_0"
490
+ },
491
+ {
492
+ "type": "pcb_solder_paste",
493
+ "pcb_solder_paste_id": "pcb_solder_paste_0",
494
+ "layer": "top",
495
+ "shape": "rect",
496
+ "width": 0.7174999999999999,
497
+ "height": 0.9799999999999999,
498
+ "x": -5.9125,
499
+ "y": -2,
500
+ "pcb_component_id": "pcb_component_0",
501
+ "pcb_smtpad_id": "pcb_smtpad_0",
502
+ "subcircuit_id": "subcircuit_source_group_0"
503
+ },
504
+ {
505
+ "type": "pcb_smtpad",
506
+ "pcb_smtpad_id": "pcb_smtpad_1",
507
+ "pcb_component_id": "pcb_component_0",
508
+ "pcb_port_id": "pcb_port_1",
509
+ "layer": "top",
510
+ "shape": "rect",
511
+ "width": 1.025,
512
+ "height": 1.4,
513
+ "port_hints": ["2", "right"],
514
+ "is_covered_with_solder_mask": false,
515
+ "x": -4.0875,
516
+ "y": -2,
517
+ "subcircuit_id": "subcircuit_source_group_0"
518
+ },
519
+ {
520
+ "type": "pcb_solder_paste",
521
+ "pcb_solder_paste_id": "pcb_solder_paste_1",
522
+ "layer": "top",
523
+ "shape": "rect",
524
+ "width": 0.7174999999999999,
525
+ "height": 0.9799999999999999,
526
+ "x": -4.0875,
527
+ "y": -2,
528
+ "pcb_component_id": "pcb_component_0",
529
+ "pcb_smtpad_id": "pcb_smtpad_1",
530
+ "subcircuit_id": "subcircuit_source_group_0"
531
+ },
532
+ {
533
+ "type": "pcb_silkscreen_path",
534
+ "pcb_silkscreen_path_id": "pcb_silkscreen_path_0",
535
+ "pcb_component_id": "pcb_component_0",
536
+ "layer": "top",
537
+ "route": [
538
+ {
539
+ "x": -4.0875,
540
+ "y": -0.8999999999999999
541
+ },
542
+ {
543
+ "x": -6.625,
544
+ "y": -0.8999999999999999
545
+ },
546
+ {
547
+ "x": -6.625,
548
+ "y": -3.1
549
+ },
550
+ {
551
+ "x": -4.0875,
552
+ "y": -3.1
553
+ }
554
+ ],
555
+ "stroke_width": 0.1,
556
+ "subcircuit_id": "subcircuit_source_group_0"
557
+ },
558
+ {
559
+ "type": "pcb_silkscreen_text",
560
+ "pcb_silkscreen_text_id": "pcb_silkscreen_text_0",
561
+ "anchor_alignment": "center",
562
+ "anchor_position": {
563
+ "x": -5,
564
+ "y": -0.3999999999999999
565
+ },
566
+ "font": "tscircuit2024",
567
+ "font_size": 0.4,
568
+ "layer": "top",
569
+ "text": "R1",
570
+ "ccw_rotation": 0,
571
+ "pcb_component_id": "pcb_component_0",
572
+ "subcircuit_id": "subcircuit_source_group_0"
573
+ },
574
+ {
575
+ "type": "pcb_smtpad",
576
+ "pcb_smtpad_id": "pcb_smtpad_2",
577
+ "pcb_component_id": "pcb_component_1",
578
+ "pcb_port_id": "pcb_port_2",
579
+ "layer": "top",
580
+ "shape": "rect",
581
+ "width": 1.025,
582
+ "height": 1.4,
583
+ "port_hints": ["1", "left"],
584
+ "is_covered_with_solder_mask": false,
585
+ "x": 4.0875,
586
+ "y": -2,
587
+ "subcircuit_id": "subcircuit_source_group_0"
588
+ },
589
+ {
590
+ "type": "pcb_solder_paste",
591
+ "pcb_solder_paste_id": "pcb_solder_paste_2",
592
+ "layer": "top",
593
+ "shape": "rect",
594
+ "width": 0.7174999999999999,
595
+ "height": 0.9799999999999999,
596
+ "x": 4.0875,
597
+ "y": -2,
598
+ "pcb_component_id": "pcb_component_1",
599
+ "pcb_smtpad_id": "pcb_smtpad_2",
600
+ "subcircuit_id": "subcircuit_source_group_0"
601
+ },
602
+ {
603
+ "type": "pcb_smtpad",
604
+ "pcb_smtpad_id": "pcb_smtpad_3",
605
+ "pcb_component_id": "pcb_component_1",
606
+ "pcb_port_id": "pcb_port_3",
607
+ "layer": "top",
608
+ "shape": "rect",
609
+ "width": 1.025,
610
+ "height": 1.4,
611
+ "port_hints": ["2", "right"],
612
+ "is_covered_with_solder_mask": false,
613
+ "x": 5.9125,
614
+ "y": -2,
615
+ "subcircuit_id": "subcircuit_source_group_0"
616
+ },
617
+ {
618
+ "type": "pcb_solder_paste",
619
+ "pcb_solder_paste_id": "pcb_solder_paste_3",
620
+ "layer": "top",
621
+ "shape": "rect",
622
+ "width": 0.7174999999999999,
623
+ "height": 0.9799999999999999,
624
+ "x": 5.9125,
625
+ "y": -2,
626
+ "pcb_component_id": "pcb_component_1",
627
+ "pcb_smtpad_id": "pcb_smtpad_3",
628
+ "subcircuit_id": "subcircuit_source_group_0"
629
+ },
630
+ {
631
+ "type": "pcb_silkscreen_path",
632
+ "pcb_silkscreen_path_id": "pcb_silkscreen_path_1",
633
+ "pcb_component_id": "pcb_component_1",
634
+ "layer": "top",
635
+ "route": [
636
+ {
637
+ "x": 5.9125,
638
+ "y": -0.8999999999999999
639
+ },
640
+ {
641
+ "x": 3.375,
642
+ "y": -0.8999999999999999
643
+ },
644
+ {
645
+ "x": 3.375,
646
+ "y": -3.1
647
+ },
648
+ {
649
+ "x": 5.9125,
650
+ "y": -3.1
651
+ }
652
+ ],
653
+ "stroke_width": 0.1,
654
+ "subcircuit_id": "subcircuit_source_group_0"
655
+ },
656
+ {
657
+ "type": "pcb_silkscreen_text",
658
+ "pcb_silkscreen_text_id": "pcb_silkscreen_text_1",
659
+ "anchor_alignment": "center",
660
+ "anchor_position": {
661
+ "x": 5,
662
+ "y": -0.3999999999999999
663
+ },
664
+ "font": "tscircuit2024",
665
+ "font_size": 0.4,
666
+ "layer": "top",
667
+ "text": "R2",
668
+ "ccw_rotation": 0,
669
+ "pcb_component_id": "pcb_component_1",
670
+ "subcircuit_id": "subcircuit_source_group_0"
671
+ },
672
+ {
673
+ "type": "pcb_port",
674
+ "pcb_port_id": "pcb_port_0",
675
+ "pcb_component_id": "pcb_component_0",
676
+ "layers": ["top"],
677
+ "subcircuit_id": "subcircuit_source_group_0",
678
+ "x": -5.9125,
679
+ "y": -2,
680
+ "source_port_id": "source_port_0"
681
+ },
682
+ {
683
+ "type": "pcb_port",
684
+ "pcb_port_id": "pcb_port_1",
685
+ "pcb_component_id": "pcb_component_0",
686
+ "layers": ["top"],
687
+ "subcircuit_id": "subcircuit_source_group_0",
688
+ "x": -4.0875,
689
+ "y": -2,
690
+ "source_port_id": "source_port_1"
691
+ },
692
+ {
693
+ "type": "pcb_port",
694
+ "pcb_port_id": "pcb_port_2",
695
+ "pcb_component_id": "pcb_component_1",
696
+ "layers": ["top"],
697
+ "subcircuit_id": "subcircuit_source_group_0",
698
+ "x": 4.0875,
699
+ "y": -2,
700
+ "source_port_id": "source_port_2"
701
+ },
702
+ {
703
+ "type": "pcb_port",
704
+ "pcb_port_id": "pcb_port_3",
705
+ "pcb_component_id": "pcb_component_1",
706
+ "layers": ["top"],
707
+ "subcircuit_id": "subcircuit_source_group_0",
708
+ "x": 5.9125,
709
+ "y": -2,
710
+ "source_port_id": "source_port_3"
711
+ },
712
+ {
713
+ "type": "cad_component",
714
+ "cad_component_id": "cad_component_0",
715
+ "position": {
716
+ "x": -5,
717
+ "y": -2,
718
+ "z": 0.7
719
+ },
720
+ "rotation": {
721
+ "x": 0,
722
+ "y": 0,
723
+ "z": 0
724
+ },
725
+ "pcb_component_id": "pcb_component_0",
726
+ "source_component_id": "source_component_0",
727
+ "footprinter_string": "0805"
728
+ },
729
+ {
730
+ "type": "cad_component",
731
+ "cad_component_id": "cad_component_1",
732
+ "position": {
733
+ "x": 5,
734
+ "y": -2,
735
+ "z": 0.7
736
+ },
737
+ "rotation": {
738
+ "x": 0,
739
+ "y": 0,
740
+ "z": 0
741
+ },
742
+ "pcb_component_id": "pcb_component_1",
743
+ "source_component_id": "source_component_1",
744
+ "footprinter_string": "0805"
745
+ },
746
+ {
747
+ "type": "pcb_trace",
748
+ "pcb_trace_id": "source_net_1_mst0_0",
749
+ "connection_name": "source_net_1",
750
+ "route": [
751
+ {
752
+ "route_type": "wire",
753
+ "x": 4.0875,
754
+ "y": -2,
755
+ "width": 0.15,
756
+ "layer": "top"
757
+ },
758
+ {
759
+ "route_type": "wire",
760
+ "x": 5.9125,
761
+ "y": -2,
762
+ "width": 0.15,
763
+ "layer": "top"
764
+ },
765
+ {
766
+ "route_type": "wire",
767
+ "x": 5.9125,
768
+ "y": -2,
769
+ "width": 0.15,
770
+ "layer": "top"
771
+ }
772
+ ],
773
+ "subcircuit_id": "subcircuit_source_group_0",
774
+ "source_trace_id": "source_net_1"
775
+ },
776
+ {
777
+ "type": "pcb_trace",
778
+ "pcb_trace_id": "source_net_1_mst1_0",
779
+ "connection_name": "source_net_1",
780
+ "route": [
781
+ {
782
+ "route_type": "wire",
783
+ "x": 4.0875,
784
+ "y": -2,
785
+ "width": 0.15,
786
+ "layer": "top"
787
+ },
788
+ {
789
+ "route_type": "wire",
790
+ "x": -4.0875,
791
+ "y": -2,
792
+ "width": 0.15,
793
+ "layer": "top"
794
+ },
795
+ {
796
+ "route_type": "wire",
797
+ "x": -4.0875,
798
+ "y": -2,
799
+ "width": 0.15,
800
+ "layer": "top"
801
+ }
802
+ ],
803
+ "subcircuit_id": "subcircuit_source_group_0",
804
+ "source_trace_id": "source_net_1"
805
+ }
806
+ ]