easyeda 0.0.2

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 (36) hide show
  1. package/README.md +59 -0
  2. package/ai-assist-docs/soup-reference.md +1325 -0
  3. package/bun.lockb +0 -0
  4. package/cli/main.ts +67 -0
  5. package/dist/cli/main.cjs +29264 -0
  6. package/dist/cli/main.cjs.map +1 -0
  7. package/dist/cli/main.d.cts +1 -0
  8. package/dist/index.cjs +29196 -0
  9. package/dist/index.cjs.map +1 -0
  10. package/dist/index.d.cts +1553 -0
  11. package/dist/lib/index.cjs +29196 -0
  12. package/dist/lib/index.cjs.map +1 -0
  13. package/dist/lib/index.d.cts +1553 -0
  14. package/lib/convert-easyeda-json-to-tscircuit-soup-json.ts +204 -0
  15. package/lib/fetch-easyeda-json.ts +66 -0
  16. package/lib/index.ts +2 -0
  17. package/lib/math/arc-utils.ts +170 -0
  18. package/lib/schemas/easy-eda-json-schema.ts +158 -0
  19. package/lib/schemas/package-detail-shape-schema.ts +251 -0
  20. package/lib/schemas/single-letter-shape-schema.ts +201 -0
  21. package/package.json +31 -0
  22. package/renovate.json +6 -0
  23. package/scripts/get-easyeda-json.ts +12 -0
  24. package/tests/assets/a555-timer-dip.raweasy.json +244 -0
  25. package/tests/assets/a555-timer-smd.raweasy.json +226 -0
  26. package/tests/assets/esp32.raweasy.json +333 -0
  27. package/tests/assets/usb-c.raweasy.json +263 -0
  28. package/tests/convert-to-soup-tests/a555timer-smd.test.ts +18 -0
  29. package/tests/convert-to-soup-tests/convert-easyeda-to-tscircuit-soup.test.ts +49 -0
  30. package/tests/convert-to-soup-tests/convert-usb-c-to-soup.test.ts +18 -0
  31. package/tests/convert-to-soup-tests/esp32-to-soup.test.ts +13 -0
  32. package/tests/parse-tests/parse-555-timer-json.test.ts +9 -0
  33. package/tests/parse-tests/parse-esp32.test.ts +9 -0
  34. package/tests/parse-tests/parse-usb-c.test.ts +9 -0
  35. package/tests/parse-tests/single-letter-shape-schema.test.ts +30 -0
  36. package/tsconfig.json +28 -0
@@ -0,0 +1,1325 @@
1
+ ## Source
2
+
3
+ ### `source_component_base`
4
+
5
+ ```json
6
+ {
7
+ "type": "source_component",
8
+ "ftype": "dolor do eu ullamco",
9
+ "source_component_id": "source_component_1",
10
+ "name": "D1",
11
+ "supplier_part_numbers": {
12
+ "occaecat32": [
13
+ "nostrud Ut occaecat",
14
+ "proident",
15
+ "reprehenderit mollit",
16
+ "id sit"
17
+ ],
18
+ "adipisicing_575": ["laboris et dolor mollit", "fugiat aliquip ad occaecat"]
19
+ }
20
+ }
21
+ ```
22
+
23
+ | Property | Type | Required | Description |
24
+ | --------------------- | ------ | -------- | ----------- |
25
+ | type | string | Yes | |
26
+ | ftype | string | No | |
27
+ | source_component_id | string | Yes | |
28
+ | name | string | Yes | |
29
+ | supplier_part_numbers | object | No | |
30
+
31
+ ### `source_group`
32
+
33
+ ```json
34
+ {
35
+ "type": "source_group",
36
+ "source_group_id": "source_group_1",
37
+ "name": "G1"
38
+ }
39
+ ```
40
+
41
+ | Property | Type | Required | Description |
42
+ | --------------- | ------ | -------- | ----------- |
43
+ | type | string | Yes | |
44
+ | source_group_id | string | Yes | |
45
+ | name | string | No | |
46
+
47
+ ### `source_led`
48
+
49
+ ```json
50
+ {
51
+ "type": "source_component",
52
+ "ftype": "led",
53
+ "source_component_id": "source_component_1",
54
+ "name": "L1"
55
+ }
56
+ ```
57
+
58
+ | Property | Type | Required | Description |
59
+ | --------------------- | ------ | -------- | ----------- |
60
+ | type | string | Yes | |
61
+ | ftype | string | Yes | |
62
+ | source_component_id | string | Yes | |
63
+ | name | string | Yes | |
64
+ | supplier_part_numbers | object | No | |
65
+
66
+ ### `source_net`
67
+
68
+ ```json
69
+ {
70
+ "type": "source_net",
71
+ "source_net_id": "source_net_1",
72
+ "name": "N1",
73
+ "member_source_group_ids": ["cupidatat"],
74
+ "is_power": false,
75
+ "is_ground": false,
76
+ "is_digital_signal": true,
77
+ "is_analog_signal": false
78
+ }
79
+ ```
80
+
81
+ | Property | Type | Required | Description |
82
+ | ----------------------- | ------- | -------- | ----------- |
83
+ | type | string | Yes | |
84
+ | source_net_id | string | Yes | |
85
+ | name | string | Yes | |
86
+ | member_source_group_ids | array | Yes | |
87
+ | is_power | boolean | No | |
88
+ | is_ground | boolean | No | |
89
+ | is_digital_signal | boolean | No | |
90
+ | is_analog_signal | boolean | No | |
91
+
92
+ ### `source_port`
93
+
94
+ ```json
95
+ {
96
+ "type": "source_port",
97
+ "port_hints": ["1", "left"],
98
+ "name": "P1",
99
+ "source_port_id": "source_port_1",
100
+ "source_component_id": "source_component_1"
101
+ }
102
+ ```
103
+
104
+ | Property | Type | Required | Description |
105
+ | ------------------- | ------ | -------- | ----------- |
106
+ | type | string | Yes | |
107
+ | pin_number | number | No | |
108
+ | port_hints | array | No | |
109
+ | name | string | Yes | |
110
+ | source_port_id | string | Yes | |
111
+ | source_component_id | string | Yes | |
112
+
113
+ ### `source_simple_bug`
114
+
115
+ ```json
116
+ {
117
+ "type": "source_component",
118
+ "ftype": "simple_bug",
119
+ "source_component_id": "source_component_1",
120
+ "name": "B1",
121
+ "supplier_part_numbers": {
122
+ "inb5": ["consectetur", "sed qui mollit laboris dolor"]
123
+ }
124
+ }
125
+ ```
126
+
127
+ | Property | Type | Required | Description |
128
+ | --------------------- | ------ | -------- | ----------- |
129
+ | type | string | Yes | |
130
+ | ftype | string | Yes | |
131
+ | source_component_id | string | Yes | |
132
+ | name | string | Yes | |
133
+ | supplier_part_numbers | object | No | |
134
+
135
+ ### `source_simple_capacitor`
136
+
137
+ ```json
138
+ {
139
+ "type": "source_component",
140
+ "ftype": "simple_capacitor",
141
+ "source_component_id": "source_component_1",
142
+ "name": "C1",
143
+ "supplier_part_numbers": {
144
+ "dolor_576": [
145
+ "occaecat",
146
+ "enim",
147
+ "dolor velit exercitation nulla",
148
+ "in",
149
+ "ex labore"
150
+ ],
151
+ "officia2b": ["sunt in", "exercitation consequat Lorem mollit"],
152
+ "labored": [
153
+ "consectetur sed incididunt esse",
154
+ "cillum",
155
+ "in",
156
+ "esse labore qui cupidatat"
157
+ ]
158
+ },
159
+ "capacitance": "1uF"
160
+ }
161
+ ```
162
+
163
+ | Property | Type | Required | Description |
164
+ | --------------------- | -------------- | -------- | ----------- |
165
+ | type | string | Yes | |
166
+ | ftype | string | Yes | |
167
+ | source_component_id | string | Yes | |
168
+ | name | string | Yes | |
169
+ | supplier_part_numbers | object | No | |
170
+ | capacitance | string, number | Yes | |
171
+
172
+ ### `source_simple_diode`
173
+
174
+ ```json
175
+ {
176
+ "type": "source_component",
177
+ "ftype": "simple_diode",
178
+ "source_component_id": "source_component_1",
179
+ "name": "D1",
180
+ "supplier_part_numbers": {
181
+ "proidenta3": ["dolore"]
182
+ }
183
+ }
184
+ ```
185
+
186
+ | Property | Type | Required | Description |
187
+ | --------------------- | ------ | -------- | ----------- |
188
+ | type | string | Yes | |
189
+ | ftype | string | Yes | |
190
+ | source_component_id | string | Yes | |
191
+ | name | string | Yes | |
192
+ | supplier_part_numbers | object | No | |
193
+
194
+ ### `source_simple_ground`
195
+
196
+ ```json
197
+ {
198
+ "type": "source_component",
199
+ "ftype": "simple_ground",
200
+ "source_component_id": "source_component_1",
201
+ "name": "G1",
202
+ "supplier_part_numbers": {
203
+ "non_d2": ["aliquip dolor"],
204
+ "irure6d4": ["amet voluptate magna"]
205
+ }
206
+ }
207
+ ```
208
+
209
+ | Property | Type | Required | Description |
210
+ | --------------------- | ------ | -------- | ----------- |
211
+ | type | string | Yes | |
212
+ | ftype | string | Yes | |
213
+ | source_component_id | string | Yes | |
214
+ | name | string | Yes | |
215
+ | supplier_part_numbers | object | No | |
216
+
217
+ ### `source_simple_power_source`
218
+
219
+ ```json
220
+ {
221
+ "type": "source_component",
222
+ "ftype": "simple_power_source",
223
+ "source_component_id": "source_component_1",
224
+ "name": "P1",
225
+ "supplier_part_numbers": {
226
+ "aliquipb": ["ullamco ut dolore"]
227
+ },
228
+ "voltage": "5V"
229
+ }
230
+ ```
231
+
232
+ | Property | Type | Required | Description |
233
+ | --------------------- | -------------- | -------- | ----------- |
234
+ | type | string | Yes | |
235
+ | ftype | string | Yes | |
236
+ | source_component_id | string | Yes | |
237
+ | name | string | Yes | |
238
+ | supplier_part_numbers | object | No | |
239
+ | voltage | string, number | Yes | |
240
+
241
+ ### `source_simple_resistor`
242
+
243
+ ```json
244
+ {
245
+ "type": "source_component",
246
+ "ftype": "simple_resistor",
247
+ "source_component_id": "source_component_1",
248
+ "name": "R1",
249
+ "supplier_part_numbers": {
250
+ "dolor_1c": [
251
+ "ut amet aliqua aliquip",
252
+ "ut cillum Duis qui",
253
+ "reprehenderit minim Lorem consequat",
254
+ "dolore proident deserunt"
255
+ ]
256
+ },
257
+ "resistance": "1k"
258
+ }
259
+ ```
260
+
261
+ | Property | Type | Required | Description |
262
+ | --------------------- | -------------- | -------- | ----------- |
263
+ | type | string | Yes | |
264
+ | ftype | string | Yes | |
265
+ | source_component_id | string | Yes | |
266
+ | name | string | Yes | |
267
+ | supplier_part_numbers | object | No | |
268
+ | resistance | string, number | Yes | |
269
+
270
+ ### `source_trace`
271
+
272
+ ```json
273
+ {
274
+ "type": "source_trace",
275
+ "source_trace_id": "source_trace_1",
276
+ "connected_source_port_ids": [
277
+ "aliqua ut occaecat amet in",
278
+ "elit eu quis sunt sint",
279
+ "quis eiusmod magna"
280
+ ],
281
+ "connected_source_net_ids": [
282
+ "eiusmod ut fugiat",
283
+ "aliqua amet commodo proident",
284
+ "proident eiusmod consectetur nulla",
285
+ "consequat adipisicing cupidatat tempor"
286
+ ]
287
+ }
288
+ ```
289
+
290
+ | Property | Type | Required | Description |
291
+ | ------------------------- | ------ | -------- | ----------- |
292
+ | type | string | Yes | |
293
+ | source_trace_id | string | Yes | |
294
+ | connected_source_port_ids | array | Yes | |
295
+ | connected_source_net_ids | array | Yes | |
296
+
297
+ ## Schematic
298
+
299
+ ### `schematic_box`
300
+
301
+ Draws a box on the schematic
302
+
303
+ ```json
304
+ {
305
+ "type": "schematic_box",
306
+ "schematic_component_id": "schematic_component_1",
307
+ "width": "5mm",
308
+ "height": "5mm",
309
+ "x": "3mm",
310
+ "y": "1mm"
311
+ }
312
+ ```
313
+
314
+ | Property | Type | Required | Description |
315
+ | ---------------------- | -------------- | -------- | ----------- |
316
+ | type | string | Yes | |
317
+ | schematic_component_id | string | Yes | |
318
+ | width | string, number | Yes | |
319
+ | height | string, number | Yes | |
320
+ | x | string, number | Yes | |
321
+ | y | string, number | Yes | |
322
+
323
+ ### `schematic_component`
324
+
325
+ ```json
326
+ {
327
+ "type": "schematic_component",
328
+ "size": {
329
+ "width": "5mm",
330
+ "height": "5mm"
331
+ },
332
+ "center": {
333
+ "x": "3mm",
334
+ "y": "1mm"
335
+ },
336
+ "source_component_id": "source_component_1",
337
+ "schematic_component_id": "schematic_component_1"
338
+ }
339
+ ```
340
+
341
+ | Property | Type | Required | Description |
342
+ | ---------------------- | -------------- | -------- | ----------- |
343
+ | type | string | Yes | |
344
+ | rotation | string, number | No | |
345
+ | size | object | Yes | |
346
+ | center | object | Yes | |
347
+ | source_component_id | string | Yes | |
348
+ | schematic_component_id | string | Yes | |
349
+ | pin_spacing | undefined | No | |
350
+ | box_width | undefined | No | |
351
+ | port_arrangement | undefined | No | |
352
+ | port_labels | object | No | |
353
+
354
+ ### `schematic_error`
355
+
356
+ Defines a schematic error on the schematic
357
+
358
+ ```json
359
+ {
360
+ "schematic_error_id": "schematic_error_1",
361
+ "type": "schematic_error",
362
+ "error_type": "schematic_port_not_found",
363
+ "message": "consequat deserunt"
364
+ }
365
+ ```
366
+
367
+ | Property | Type | Required | Description |
368
+ | ------------------ | ------ | -------- | ----------- |
369
+ | schematic_error_id | string | Yes | |
370
+ | type | string | Yes | |
371
+ | error_type | string | Yes | |
372
+ | message | string | Yes | |
373
+
374
+ ### `schematic_line`
375
+
376
+ ```json
377
+ {
378
+ "type": "schematic_line",
379
+ "schematic_component_id": "schematic_component_1",
380
+ "x1": "1mm",
381
+ "x2": "2mm",
382
+ "y1": "1mm",
383
+ "y2": "2mm"
384
+ }
385
+ ```
386
+
387
+ | Property | Type | Required | Description |
388
+ | ---------------------- | -------------- | -------- | ----------- |
389
+ | type | string | Yes | |
390
+ | schematic_component_id | string | Yes | |
391
+ | x1 | string, number | Yes | |
392
+ | x2 | string, number | Yes | |
393
+ | y1 | string, number | Yes | |
394
+ | y2 | string, number | Yes | |
395
+
396
+ ### `schematic_net_label`
397
+
398
+ ```json
399
+ {
400
+ "type": "schematic_net_label",
401
+ "source_net_id": "source_net_1",
402
+ "center": {
403
+ "x": "3mm",
404
+ "y": "1mm"
405
+ },
406
+ "anchor_side": "bottom",
407
+ "text": "Hello, World!"
408
+ }
409
+ ```
410
+
411
+ | Property | Type | Required | Description |
412
+ | ------------- | ------ | -------- | ----------- |
413
+ | type | string | Yes | |
414
+ | source_net_id | string | Yes | |
415
+ | center | object | Yes | |
416
+ | anchor_side | string | Yes | |
417
+ | text | string | Yes | |
418
+
419
+ ### `schematic_path`
420
+
421
+ ```json
422
+ {
423
+ "type": "schematic_path",
424
+ "schematic_component_id": "schematic_component_1",
425
+ "fill_color": "blue",
426
+ "is_filled": true,
427
+ "points": [
428
+ {
429
+ "x": "3mm",
430
+ "y": "1mm"
431
+ },
432
+ {
433
+ "x": "3mm",
434
+ "y": "1mm"
435
+ },
436
+ {
437
+ "x": "3mm",
438
+ "y": "1mm"
439
+ },
440
+ {
441
+ "x": "3mm",
442
+ "y": "1mm"
443
+ }
444
+ ]
445
+ }
446
+ ```
447
+
448
+ | Property | Type | Required | Description |
449
+ | ---------------------- | ------- | -------- | ----------- |
450
+ | type | string | Yes | |
451
+ | schematic_component_id | string | Yes | |
452
+ | fill_color | string | No | |
453
+ | is_filled | boolean | No | |
454
+ | points | array | Yes | |
455
+
456
+ ### `schematic_port`
457
+
458
+ Defines a port on a schematic component
459
+
460
+ ```json
461
+ {
462
+ "type": "schematic_port",
463
+ "schematic_port_id": "schematic_port_1",
464
+ "source_port_id": "source_port_1",
465
+ "schematic_component_id": "schematic_component_1",
466
+ "center": {
467
+ "x": "3mm",
468
+ "y": "1mm"
469
+ },
470
+ "facing_direction": "right"
471
+ }
472
+ ```
473
+
474
+ | Property | Type | Required | Description |
475
+ | ---------------------- | ------ | -------- | ----------- |
476
+ | type | string | Yes | |
477
+ | schematic_port_id | string | Yes | |
478
+ | source_port_id | string | Yes | |
479
+ | schematic_component_id | string | No | |
480
+ | center | object | Yes | |
481
+ | facing_direction | string | No | |
482
+
483
+ ### `schematic_text`
484
+
485
+ ```json
486
+ {
487
+ "type": "schematic_text",
488
+ "schematic_component_id": "schematic_component_1",
489
+ "schematic_text_id": "schematic_text_1",
490
+ "text": "Hello, World!",
491
+ "position": {
492
+ "x": "3mm",
493
+ "y": "1mm"
494
+ },
495
+ "rotation": "90deg",
496
+ "anchor": "left"
497
+ }
498
+ ```
499
+
500
+ | Property | Type | Required | Description |
501
+ | ---------------------- | ------ | -------- | ----------- |
502
+ | type | string | Yes | |
503
+ | schematic_component_id | string | Yes | |
504
+ | schematic_text_id | string | Yes | |
505
+ | text | string | Yes | |
506
+ | position | object | Yes | |
507
+ | rotation | number | No | |
508
+ | anchor | string | No | |
509
+
510
+ ### `schematic_trace`
511
+
512
+ ```json
513
+ {
514
+ "type": "schematic_trace",
515
+ "schematic_trace_id": "schematic_trace_1",
516
+ "source_trace_id": "source_trace_1",
517
+ "edges": [
518
+ {
519
+ "from": {
520
+ "x": "3mm",
521
+ "y": "1mm"
522
+ },
523
+ "to": {
524
+ "x": "3mm",
525
+ "y": "1mm"
526
+ },
527
+ "from_schematic_port_id": "from_schematic_port_1",
528
+ "to_schematic_port_id": "to_schematic_port_1"
529
+ },
530
+ {
531
+ "from": {
532
+ "x": "3mm",
533
+ "y": "1mm"
534
+ },
535
+ "to": {
536
+ "x": "3mm",
537
+ "y": "1mm"
538
+ },
539
+ "to_schematic_port_id": "to_schematic_port_1"
540
+ }
541
+ ]
542
+ }
543
+ ```
544
+
545
+ | Property | Type | Required | Description |
546
+ | ------------------ | ------ | -------- | ----------- |
547
+ | type | string | Yes | |
548
+ | schematic_trace_id | string | Yes | |
549
+ | source_trace_id | string | Yes | |
550
+ | edges | array | Yes | |
551
+
552
+ ## Pcb
553
+
554
+ ### `pcb_board`
555
+
556
+ Defines the board outline of the PCB
557
+
558
+ ```json
559
+ {
560
+ "type": "pcb_board",
561
+ "width": "5mm",
562
+ "height": "5mm",
563
+ "center": {
564
+ "x": "3mm",
565
+ "y": "1mm"
566
+ }
567
+ }
568
+ ```
569
+
570
+ | Property | Type | Required | Description |
571
+ | -------- | -------------- | -------- | ----------- |
572
+ | type | string | Yes | |
573
+ | width | string, number | Yes | |
574
+ | height | string, number | Yes | |
575
+ | center | object | Yes | |
576
+
577
+ ### `pcb_component`
578
+
579
+ Defines a component on the PCB
580
+
581
+ ```json
582
+ {
583
+ "type": "pcb_component",
584
+ "pcb_component_id": "pcb_component_1",
585
+ "source_component_id": "source_component_1",
586
+ "center": {
587
+ "x": "3mm",
588
+ "y": "1mm"
589
+ },
590
+ "layer": "top",
591
+ "rotation": "90deg",
592
+ "width": "5mm",
593
+ "height": "5mm"
594
+ }
595
+ ```
596
+
597
+ | Property | Type | Required | Description |
598
+ | ------------------- | -------------- | -------- | ----------- |
599
+ | type | string | Yes | |
600
+ | pcb_component_id | string | Yes | |
601
+ | source_component_id | string | Yes | |
602
+ | center | object | Yes | |
603
+ | layer | undefined | Yes | |
604
+ | rotation | string, number | Yes | |
605
+ | width | undefined | Yes | |
606
+ | height | undefined | Yes | |
607
+
608
+ ### `pcb_fabrication_note_path`
609
+
610
+ Defines a fabrication path on the PCB for fabricators or assemblers
611
+
612
+ ```json
613
+ {
614
+ "type": "pcb_fabrication_note_path",
615
+ "fabrication_note_path_id": "fabrication_note_path_1",
616
+ "pcb_component_id": "pcb_component_1",
617
+ "layer": "top",
618
+ "route": [
619
+ {
620
+ "x": "3mm",
621
+ "y": "1mm"
622
+ },
623
+ {
624
+ "x": "3mm",
625
+ "y": "1mm"
626
+ },
627
+ {
628
+ "x": "3mm",
629
+ "y": "1mm"
630
+ },
631
+ {
632
+ "x": "3mm",
633
+ "y": "1mm"
634
+ },
635
+ {
636
+ "x": "3mm",
637
+ "y": "1mm"
638
+ }
639
+ ],
640
+ "stroke_width": "0.1mm"
641
+ }
642
+ ```
643
+
644
+ | Property | Type | Required | Description |
645
+ | ------------------------ | --------- | -------- | ----------- |
646
+ | type | string | Yes | |
647
+ | fabrication_note_path_id | string | Yes | |
648
+ | pcb_component_id | string | Yes | |
649
+ | layer | string | Yes | |
650
+ | route | array | Yes | |
651
+ | stroke_width | undefined | Yes | |
652
+
653
+ ### `pcb_fabrication_note_text`
654
+
655
+ Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators
656
+
657
+ ```json
658
+ {
659
+ "type": "pcb_fabrication_note_text",
660
+ "font": "tscircuit2024",
661
+ "font_size": "1mm",
662
+ "pcb_component_id": "pcb_component_1",
663
+ "text": "Hello, World!",
664
+ "layer": "top",
665
+ "anchor_position": {
666
+ "x": "3mm",
667
+ "y": "1mm"
668
+ },
669
+ "anchor_alignment": "bottom_right"
670
+ }
671
+ ```
672
+
673
+ | Property | Type | Required | Description |
674
+ | ---------------- | -------------- | -------- | ----------- |
675
+ | type | string | Yes | |
676
+ | font | string | No | |
677
+ | font_size | string, number | No | |
678
+ | pcb_component_id | string | Yes | |
679
+ | text | string | Yes | |
680
+ | layer | string | Yes | |
681
+ | anchor_position | object | No | |
682
+ | anchor_alignment | string | No | |
683
+
684
+ ### `pcb_placement_error`
685
+
686
+ Defines a placement error on the PCB
687
+
688
+ ```json
689
+ {
690
+ "pcb_error_id": "pcb_error_1",
691
+ "type": "pcb_error",
692
+ "error_type": "pcb_placement_error",
693
+ "message": "consectetur aliquip enim eu mollit"
694
+ }
695
+ ```
696
+
697
+ | Property | Type | Required | Description |
698
+ | ------------ | ------ | -------- | ----------- |
699
+ | pcb_error_id | string | Yes | |
700
+ | type | string | Yes | |
701
+ | error_type | string | Yes | |
702
+ | message | string | Yes | |
703
+
704
+ ### `pcb_plated_hole`
705
+
706
+ Defines a plated hole on the PCB
707
+
708
+ ```json
709
+ {
710
+ "type": "pcb_plated_hole",
711
+ "outer_diameter": "1.2mm",
712
+ "hole_diameter": "0.08in",
713
+ "x": "3mm",
714
+ "y": "1mm",
715
+ "layers": ["top", "bottom"],
716
+ "port_hints": ["1", "left"],
717
+ "pcb_component_id": "pcb_component_1",
718
+ "pcb_port_id": "pcb_port_1"
719
+ }
720
+ ```
721
+
722
+ | Property | Type | Required | Description |
723
+ | ---------------- | -------------- | -------- | ----------- |
724
+ | type | string | Yes | |
725
+ | outer_diameter | number | Yes | |
726
+ | hole_diameter | number | Yes | |
727
+ | x | string, number | Yes | |
728
+ | y | string, number | Yes | |
729
+ | layers | array | Yes | |
730
+ | port_hints | array | No | |
731
+ | pcb_component_id | string | No | |
732
+ | pcb_port_id | string | No | |
733
+
734
+ ### `pcb_port`
735
+
736
+ Defines a port on the PCB
737
+
738
+ ```json
739
+ {
740
+ "type": "pcb_port",
741
+ "pcb_port_id": "pcb_port_1",
742
+ "source_port_id": "source_port_1",
743
+ "pcb_component_id": "pcb_component_1",
744
+ "x": "3mm",
745
+ "y": "1mm",
746
+ "layers": ["top", "bottom"]
747
+ }
748
+ ```
749
+
750
+ | Property | Type | Required | Description |
751
+ | ---------------- | -------------- | -------- | ----------- |
752
+ | type | string | Yes | |
753
+ | pcb_port_id | string | Yes | |
754
+ | source_port_id | string | Yes | |
755
+ | pcb_component_id | string | Yes | |
756
+ | x | string, number | Yes | |
757
+ | y | string, number | Yes | |
758
+ | layers | array | Yes | |
759
+
760
+ ### `pcb_port_not_matched_error`
761
+
762
+ Defines a trace error on the PCB
763
+
764
+ ```json
765
+ {
766
+ "pcb_error_id": "pcb_error_1",
767
+ "type": "pcb_error",
768
+ "error_type": "pcb_port_not_matched_error",
769
+ "message": "aliquip sunt",
770
+ "pcb_component_ids": ["pcb_component_1"]
771
+ }
772
+ ```
773
+
774
+ | Property | Type | Required | Description |
775
+ | ----------------- | ------ | -------- | ----------- |
776
+ | pcb_error_id | string | Yes | |
777
+ | type | string | Yes | |
778
+ | error_type | string | Yes | |
779
+ | message | string | Yes | |
780
+ | pcb_component_ids | array | Yes | |
781
+
782
+ ### `pcb_silkscreen_circle`
783
+
784
+ Defines a silkscreen circle on the PCB
785
+
786
+ ```json
787
+ {
788
+ "type": "pcb_silkscreen_circle",
789
+ "pcb_silkscreen_circle_id": "pcb_silkscreen_circle_1",
790
+ "pcb_component_id": "pcb_component_1",
791
+ "center": {
792
+ "x": "3mm",
793
+ "y": "1mm"
794
+ },
795
+ "radius": "5mm",
796
+ "layer": "top"
797
+ }
798
+ ```
799
+
800
+ | Property | Type | Required | Description |
801
+ | ------------------------ | --------- | -------- | ----------- |
802
+ | type | string | Yes | |
803
+ | pcb_silkscreen_circle_id | string | Yes | |
804
+ | pcb_component_id | string | Yes | |
805
+ | center | object | Yes | |
806
+ | radius | undefined | Yes | |
807
+ | layer | string | Yes | |
808
+
809
+ ### `pcb_silkscreen_line`
810
+
811
+ Defines a silkscreen line on the PCB
812
+
813
+ ```json
814
+ {
815
+ "type": "pcb_silkscreen_line",
816
+ "pcb_silkscreen_line_id": "pcb_silkscreen_line_1",
817
+ "pcb_component_id": "pcb_component_1",
818
+ "x1": "1mm",
819
+ "y1": "1mm",
820
+ "x2": "2mm",
821
+ "y2": "2mm",
822
+ "layer": "top"
823
+ }
824
+ ```
825
+
826
+ | Property | Type | Required | Description |
827
+ | ---------------------- | -------------- | -------- | ----------- |
828
+ | type | string | Yes | |
829
+ | pcb_silkscreen_line_id | string | Yes | |
830
+ | pcb_component_id | string | Yes | |
831
+ | stroke_width | string, number | No | |
832
+ | x1 | string, number | Yes | |
833
+ | y1 | string, number | Yes | |
834
+ | x2 | string, number | Yes | |
835
+ | y2 | string, number | Yes | |
836
+ | layer | string | Yes | |
837
+
838
+ ### `pcb_silkscreen_path`
839
+
840
+ Defines a silkscreen path on the PCB
841
+
842
+ ```json
843
+ {
844
+ "type": "pcb_silkscreen_path",
845
+ "pcb_silkscreen_path_id": "pcb_silkscreen_path_1",
846
+ "pcb_component_id": "pcb_component_1",
847
+ "layer": "top",
848
+ "route": [
849
+ {
850
+ "x": "3mm",
851
+ "y": "1mm"
852
+ },
853
+ {
854
+ "x": "3mm",
855
+ "y": "1mm"
856
+ },
857
+ {
858
+ "x": "3mm",
859
+ "y": "1mm"
860
+ },
861
+ {
862
+ "x": "3mm",
863
+ "y": "1mm"
864
+ }
865
+ ],
866
+ "stroke_width": "0.1mm"
867
+ }
868
+ ```
869
+
870
+ | Property | Type | Required | Description |
871
+ | ---------------------- | --------- | -------- | ----------- |
872
+ | type | string | Yes | |
873
+ | pcb_silkscreen_path_id | string | Yes | |
874
+ | pcb_component_id | string | Yes | |
875
+ | layer | string | Yes | |
876
+ | route | array | Yes | |
877
+ | stroke_width | undefined | Yes | |
878
+
879
+ ### `pcb_silkscreen_rect`
880
+
881
+ Defines a silkscreen rect on the PCB
882
+
883
+ ```json
884
+ {
885
+ "type": "pcb_silkscreen_rect",
886
+ "pcb_silkscreen_rect_id": "pcb_silkscreen_rect_1",
887
+ "pcb_component_id": "pcb_component_1",
888
+ "center": {
889
+ "x": "3mm",
890
+ "y": "1mm"
891
+ },
892
+ "width": "5mm",
893
+ "height": "5mm",
894
+ "layer": "top"
895
+ }
896
+ ```
897
+
898
+ | Property | Type | Required | Description |
899
+ | ---------------------- | --------- | -------- | ----------- |
900
+ | type | string | Yes | |
901
+ | pcb_silkscreen_rect_id | string | Yes | |
902
+ | pcb_component_id | string | Yes | |
903
+ | center | object | Yes | |
904
+ | width | undefined | Yes | |
905
+ | height | undefined | Yes | |
906
+ | layer | string | Yes | |
907
+
908
+ ### `pcb_silkscreen_text`
909
+
910
+ Defines silkscreen text on the PCB
911
+
912
+ ```json
913
+ {
914
+ "type": "pcb_silkscreen_text",
915
+ "pcb_component_id": "pcb_component_1",
916
+ "text": "Hello, World!",
917
+ "layer": "top"
918
+ }
919
+ ```
920
+
921
+ | Property | Type | Required | Description |
922
+ | ---------------- | -------------- | -------- | ----------- |
923
+ | type | string | Yes | |
924
+ | font | string | No | |
925
+ | font_size | string, number | No | |
926
+ | pcb_component_id | string | Yes | |
927
+ | text | string | Yes | |
928
+ | layer | string | Yes | |
929
+ | anchor_position | object | No | |
930
+ | anchor_alignment | string | No | |
931
+
932
+ ### `pcb_text`
933
+
934
+ Defines text on the PCB
935
+
936
+ ```json
937
+ {
938
+ "type": "pcb_text",
939
+ "text": "Hello, World!",
940
+ "x": "3mm",
941
+ "y": "1mm",
942
+ "align": "bottom-left",
943
+ "width": "5mm",
944
+ "height": "5mm",
945
+ "lines": 1
946
+ }
947
+ ```
948
+
949
+ | Property | Type | Required | Description |
950
+ | -------- | -------------- | -------- | ----------- |
951
+ | type | string | Yes | |
952
+ | text | string | Yes | |
953
+ | x | string, number | Yes | |
954
+ | y | string, number | Yes | |
955
+ | align | string | Yes | |
956
+ | width | string, number | Yes | |
957
+ | height | string, number | Yes | |
958
+ | lines | number | Yes | |
959
+
960
+ ### `pcb_trace`
961
+
962
+ ```json
963
+ {
964
+ "type": "pcb_trace",
965
+ "pcb_trace_id": "pcb_trace_1",
966
+ "route": [
967
+ {
968
+ "route_type": "wire",
969
+ "x": "3mm",
970
+ "y": "1mm",
971
+ "width": "5mm",
972
+ "start_pcb_port_id": "start_pcb_port_1",
973
+ "end_pcb_port_id": "end_pcb_port_1",
974
+ "layer": "top"
975
+ },
976
+ {
977
+ "route_type": "via",
978
+ "x": "3mm",
979
+ "y": "1mm",
980
+ "from_layer": "top",
981
+ "to_layer": "bottom"
982
+ },
983
+ {
984
+ "route_type": "via",
985
+ "x": "3mm",
986
+ "y": "1mm",
987
+ "from_layer": "top",
988
+ "to_layer": "bottom"
989
+ },
990
+ {
991
+ "route_type": "wire",
992
+ "x": "3mm",
993
+ "y": "1mm",
994
+ "width": "5mm",
995
+ "start_pcb_port_id": "start_pcb_port_1",
996
+ "end_pcb_port_id": "end_pcb_port_1",
997
+ "layer": "top"
998
+ }
999
+ ]
1000
+ }
1001
+ ```
1002
+
1003
+ | Property | Type | Required | Description |
1004
+ | ---------------- | ------ | -------- | ----------- |
1005
+ | type | string | Yes | |
1006
+ | source_trace_id | string | No | |
1007
+ | pcb_component_id | string | No | |
1008
+ | pcb_trace_id | string | Yes | |
1009
+ | route | array | Yes | |
1010
+
1011
+ ### `pcb_trace_error`
1012
+
1013
+ Defines a trace error on the PCB
1014
+
1015
+ ```json
1016
+ {
1017
+ "pcb_error_id": "pcb_error_1",
1018
+ "type": "pcb_error",
1019
+ "error_type": "pcb_trace_error",
1020
+ "message": "elit nulla amet ea dolore",
1021
+ "pcb_trace_id": "pcb_trace_1",
1022
+ "source_trace_id": "source_trace_1",
1023
+ "pcb_component_ids": ["pcb_component_1"],
1024
+ "pcb_port_ids": ["pcb_port_1", "pcb_port_2"]
1025
+ }
1026
+ ```
1027
+
1028
+ | Property | Type | Required | Description |
1029
+ | ----------------- | ------ | -------- | ----------- |
1030
+ | pcb_error_id | string | Yes | |
1031
+ | type | string | Yes | |
1032
+ | error_type | string | Yes | |
1033
+ | message | string | Yes | |
1034
+ | pcb_trace_id | string | Yes | |
1035
+ | source_trace_id | string | Yes | |
1036
+ | pcb_component_ids | array | Yes | |
1037
+ | pcb_port_ids | array | Yes | |
1038
+
1039
+ ### `pcb_trace_hint`
1040
+
1041
+ A hint that can be used to generate a PCB trace
1042
+
1043
+ ```json
1044
+ {
1045
+ "pcb_trace_hint_id": "pcb_trace_hint_1",
1046
+ "type": "pcb_trace_hint",
1047
+ "pcb_port_id": "pcb_port_1",
1048
+ "pcb_component_id": "pcb_component_1",
1049
+ "route": [
1050
+ {
1051
+ "x": "3mm",
1052
+ "y": "1mm",
1053
+ "via": false,
1054
+ "to_layer": "bottom"
1055
+ },
1056
+ {
1057
+ "x": "3mm",
1058
+ "y": "1mm",
1059
+ "via": false,
1060
+ "to_layer": "bottom"
1061
+ }
1062
+ ]
1063
+ }
1064
+ ```
1065
+
1066
+ | Property | Type | Required | Description |
1067
+ | ----------------- | ------ | -------- | ----------- |
1068
+ | pcb_trace_hint_id | string | Yes | |
1069
+ | type | string | Yes | |
1070
+ | pcb_port_id | string | Yes | |
1071
+ | pcb_component_id | string | Yes | |
1072
+ | route | array | Yes | |
1073
+
1074
+ ### `pcb_via`
1075
+
1076
+ Defines a via on the PCB
1077
+
1078
+ ```json
1079
+ {
1080
+ "type": "pcb_via",
1081
+ "x": "3mm",
1082
+ "y": "1mm",
1083
+ "outer_diameter": "1.2mm",
1084
+ "hole_diameter": "0.08in",
1085
+ "from_layer": "top",
1086
+ "to_layer": "bottom",
1087
+ "layers": ["top", "bottom"]
1088
+ }
1089
+ ```
1090
+
1091
+ | Property | Type | Required | Description |
1092
+ | -------------- | -------------- | -------- | ----------- |
1093
+ | type | string | Yes | |
1094
+ | x | string, number | Yes | |
1095
+ | y | string, number | Yes | |
1096
+ | outer_diameter | string, number | No | |
1097
+ | hole_diameter | string, number | No | |
1098
+ | from_layer | undefined | No | |
1099
+ | to_layer | undefined | No | |
1100
+ | layers | array | Yes | |
1101
+
1102
+ ## Misc
1103
+
1104
+ ### `any_source_component`
1105
+
1106
+ ```json
1107
+ {
1108
+ "type": "source_component",
1109
+ "ftype": "simple_capacitor",
1110
+ "source_component_id": "source_component_1",
1111
+ "name": "C1",
1112
+ "supplier_part_numbers": {
1113
+ "dolore8ab": ["Excepteur", "sint magna reprehenderit ut Duis"],
1114
+ "sint_17e": ["cupidatat in"],
1115
+ "aliqua3": [
1116
+ "anim Excepteur dolore",
1117
+ "esse",
1118
+ "quis",
1119
+ "dolore",
1120
+ "minim velit"
1121
+ ]
1122
+ },
1123
+ "capacitance": "1uF"
1124
+ }
1125
+ ```
1126
+
1127
+ ### `capacitance`
1128
+
1129
+ ```json
1130
+ "1uF"
1131
+ ```
1132
+
1133
+ ### `current`
1134
+
1135
+ ```json
1136
+ "1A"
1137
+ ```
1138
+
1139
+ ### `distance`
1140
+
1141
+ ```json
1142
+ "10mm"
1143
+ ```
1144
+
1145
+ ### `inductance`
1146
+
1147
+ ```json
1148
+ "1mH"
1149
+ ```
1150
+
1151
+ ### `layer_ref`
1152
+
1153
+ ```json
1154
+ "top"
1155
+ ```
1156
+
1157
+ ### `layer_string`
1158
+
1159
+ ```json
1160
+ "inner5"
1161
+ ```
1162
+
1163
+ ### `length`
1164
+
1165
+ ```json
1166
+ "1m"
1167
+ ```
1168
+
1169
+ ### `pcb_hole`
1170
+
1171
+ Defines a hole on the PCB
1172
+
1173
+ ```json
1174
+ {
1175
+ "type": "pcb_hole",
1176
+ "hole_diameter": "0.08in",
1177
+ "x": "3mm",
1178
+ "y": "1mm"
1179
+ }
1180
+ ```
1181
+
1182
+ ### `pcb_route_hint`
1183
+
1184
+ ```json
1185
+ {
1186
+ "x": "3mm",
1187
+ "y": "1mm",
1188
+ "via": false,
1189
+ "via_to_layer": "inner3"
1190
+ }
1191
+ ```
1192
+
1193
+ | Property | Type | Required | Description |
1194
+ | ------------ | -------------- | -------- | ----------- |
1195
+ | x | string, number | Yes | |
1196
+ | y | string, number | Yes | |
1197
+ | via | boolean | No | |
1198
+ | via_to_layer | undefined | No | |
1199
+
1200
+ ### `pcb_route_hints`
1201
+
1202
+ ```json
1203
+ [
1204
+ {
1205
+ "x": "5mm",
1206
+ "y": "6mm",
1207
+ "via": false
1208
+ }
1209
+ ]
1210
+ ```
1211
+
1212
+ ### `pcb_smtpad`
1213
+
1214
+ Defines an SMT pad on the PCB
1215
+
1216
+ ```json
1217
+ {
1218
+ "pcb_smtpad_id": "pcb_smtpad_1",
1219
+ "type": "pcb_smtpad",
1220
+ "shape": "circle",
1221
+ "x": "3mm",
1222
+ "y": "1mm",
1223
+ "radius": "5mm",
1224
+ "layer": "top",
1225
+ "port_hints": ["1", "left"],
1226
+ "pcb_component_id": "pcb_component_1",
1227
+ "pcb_port_id": "pcb_port_1"
1228
+ }
1229
+ ```
1230
+
1231
+ ### `point`
1232
+
1233
+ ```json
1234
+ {
1235
+ "x": "3mm",
1236
+ "y": "1mm"
1237
+ }
1238
+ ```
1239
+
1240
+ | Property | Type | Required | Description |
1241
+ | -------- | -------------- | -------- | ----------- |
1242
+ | x | string, number | Yes | |
1243
+ | y | string, number | Yes | |
1244
+
1245
+ ### `position`
1246
+
1247
+ ```json
1248
+ {
1249
+ "x": "3mm",
1250
+ "y": "1mm"
1251
+ }
1252
+ ```
1253
+
1254
+ | Property | Type | Required | Description |
1255
+ | -------- | -------------- | -------- | ----------- |
1256
+ | x | string, number | Yes | |
1257
+ | y | string, number | Yes | |
1258
+
1259
+ ### `resistance`
1260
+
1261
+ ```json
1262
+ "1k"
1263
+ ```
1264
+
1265
+ ### `rotation`
1266
+
1267
+ ```json
1268
+ "90deg"
1269
+ ```
1270
+
1271
+ ### `route_hint_point`
1272
+
1273
+ ```json
1274
+ {
1275
+ "x": "3mm",
1276
+ "y": "1mm",
1277
+ "via": true,
1278
+ "to_layer": "bottom"
1279
+ }
1280
+ ```
1281
+
1282
+ | Property | Type | Required | Description |
1283
+ | -------- | -------------- | -------- | ----------- |
1284
+ | x | string, number | Yes | |
1285
+ | y | string, number | Yes | |
1286
+ | via | boolean | No | |
1287
+ | to_layer | undefined | No | |
1288
+
1289
+ ### `size`
1290
+
1291
+ ```json
1292
+ {
1293
+ "width": "5mm",
1294
+ "height": "5mm"
1295
+ }
1296
+ ```
1297
+
1298
+ | Property | Type | Required | Description |
1299
+ | -------- | ------ | -------- | ----------- |
1300
+ | width | number | Yes | |
1301
+ | height | number | Yes | |
1302
+
1303
+ ### `supplier_name`
1304
+
1305
+ ```json
1306
+ "lcsc"
1307
+ ```
1308
+
1309
+ ### `time`
1310
+
1311
+ ```json
1312
+ "60s"
1313
+ ```
1314
+
1315
+ ### `visible_layer`
1316
+
1317
+ ```json
1318
+ "top"
1319
+ ```
1320
+
1321
+ ### `voltage`
1322
+
1323
+ ```json
1324
+ "5V"
1325
+ ```