circuit-json 0.0.116 → 0.0.118

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/README.md CHANGED
@@ -37,9 +37,10 @@ and is the primary way that Circuit JSON is defined and maintained.
37
37
  <!-- toc:start -->
38
38
 
39
39
  - [Circuit JSON Specification `circuit-json`](#circuit-json-specification-circuit-json)
40
+
40
41
  - [Things You Can Do With Circuit JSON](#things-you-can-do-with-circuit-json)
41
- - [Table of Contents](#table-of-contents)
42
42
  - [Typescript Usage](#typescript-usage)
43
+
43
44
  - [Source Components](#source-components)
44
45
  - [SourceComponentBase](#sourcecomponentbase)
45
46
  - [SourceLed](#sourceled)
@@ -60,8 +61,12 @@ and is the primary way that Circuit JSON is defined and maintained.
60
61
  - [PcbComponent](#pcbcomponent)
61
62
  - [PcbFabricationNotePath](#pcbfabricationnotepath)
62
63
  - [PcbFabricationNoteText](#pcbfabricationnotetext)
64
+ - [PcbGroup](#pcbgroup)
65
+ - [PcbHole](#pcbhole)
66
+ - [PcbManualEditConflictError](#pcbmanualeditconflicterror)
63
67
  - [PcbMissingFootprintError](#pcbmissingfootprinterror)
64
68
  - [PcbPlacementError](#pcbplacementerror)
69
+ - [PcbPlatedHole](#pcbplatedhole)
65
70
  - [PcbPort](#pcbport)
66
71
  - [PcbPortNotMatchedError](#pcbportnotmatchederror)
67
72
  - [PcbSilkscreenCircle](#pcbsilkscreencircle)
@@ -71,21 +76,13 @@ and is the primary way that Circuit JSON is defined and maintained.
71
76
  - [PcbSilkscreenPill](#pcbsilkscreenpill)
72
77
  - [PcbSilkscreenRect](#pcbsilkscreenrect)
73
78
  - [PcbSilkscreenText](#pcbsilkscreentext)
79
+ - [PcbSolderPaste](#pcbsolderpaste)
74
80
  - [PcbText](#pcbtext)
75
81
  - [PcbTrace](#pcbtrace)
76
82
  - [PcbTraceError](#pcbtraceerror)
77
83
  - [PcbTraceHint](#pcbtracehint)
78
- - [PcbVia](#pcbvia)
79
- - [Schematic Elements](#schematic-elements)
80
- - [SchematicBox](#schematicbox)
81
- - [SchematicComponent](#schematiccomponent)
82
- - [SchematicError](#schematicerror)
83
- - [SchematicLine](#schematicline)
84
- - [SchematicPath](#schematicpath)
85
- - [SchematicPort](#schematicport)
86
- - [SchematicText](#schematictext)
87
- - [SchematicTrace](#schematictrace)
88
- - [SchematicVoltageProbe](#schematicvoltageprobe)
84
+ - [Schematic Elements](#schematic-elements) - [SchematicBox](#schematicbox) - [SchematicComponent](#schematiccomponent) - [SchematicError](#schematicerror) - [SchematicLine](#schematicline) - [SchematicPath](#schematicpath) - [SchematicPort](#schematicport) - [SchematicText](#schematictext) - [SchematicTrace](#schematictrace) - [SchematicVoltageProbe](#schematicvoltageprobe)
85
+ <!-- toc:end -->
89
86
 
90
87
  ## Typescript Usage
91
88
 
@@ -162,7 +159,7 @@ There are 3 main element prefixes:
162
159
  ### SourceComponentBase
163
160
 
164
161
  ```typescript
165
- export interface SourceComponentBase {
162
+ interface SourceComponentBase {
166
163
  type: "source_component"
167
164
  ftype?: string
168
165
  source_component_id: string
@@ -175,26 +172,22 @@ export interface SourceComponentBase {
175
172
 
176
173
  ### SourceLed
177
174
 
178
- - Defines an LED component that extends the simple diode
175
+ Defines an LED component that extends the simple diode
179
176
 
180
177
  ```typescript
181
- /**
182
- * Defines an LED component that extends the simple diode
183
- */
184
- export interface SourceLed extends SourceComponentBase {
178
+ /** Defines an LED component that extends the simple diode */
179
+ interface SourceLed extends SourceComponentBase {
185
180
  ftype: "led"
186
181
  }
187
182
  ```
188
183
 
189
184
  ### SourcePort
190
185
 
191
- - Defines a source port that can be connected to other components
186
+ Defines a source port that can be connected to other components
192
187
 
193
188
  ```typescript
194
- /**
195
- * Defines a source port that can be connected to other components
196
- */
197
- export interface SourcePort {
189
+ /** Defines a source port that can be connected to other components */
190
+ interface SourcePort {
198
191
  type: "source_port"
199
192
  pin_number?: number
200
193
  port_hints?: string[]
@@ -206,13 +199,11 @@ export interface SourcePort {
206
199
 
207
200
  ### SourceSimpleBattery
208
201
 
209
- - Defines a simple battery component
202
+ Defines a simple battery component
210
203
 
211
204
  ```typescript
212
- /**
213
- * Defines a simple battery component
214
- */
215
- export interface SourceSimpleBattery extends SourceComponentBase {
205
+ /** Defines a simple battery component */
206
+ interface SourceSimpleBattery extends SourceComponentBase {
216
207
  ftype: "simple_battery"
217
208
  capacity: number
218
209
  }
@@ -220,13 +211,11 @@ export interface SourceSimpleBattery extends SourceComponentBase {
220
211
 
221
212
  ### SourceSimpleCapacitor
222
213
 
223
- - Defines a simple capacitor component
214
+ Defines a simple capacitor component
224
215
 
225
216
  ```typescript
226
- /**
227
- * Defines a simple capacitor component
228
- */
229
- export interface SourceSimpleCapacitor extends SourceComponentBase {
217
+ /** Defines a simple capacitor component */
218
+ interface SourceSimpleCapacitor extends SourceComponentBase {
230
219
  ftype: "simple_capacitor"
231
220
  capacitance: number
232
221
  }
@@ -234,26 +223,22 @@ export interface SourceSimpleCapacitor extends SourceComponentBase {
234
223
 
235
224
  ### SourceSimpleChip
236
225
 
237
- - Defines a simple integrated circuit component
226
+ Defines a simple integrated circuit component
238
227
 
239
228
  ```typescript
240
- /**
241
- * Defines a simple integrated circuit component
242
- */
243
- export interface SourceSimpleChip extends SourceComponentBase {
229
+ /** Defines a simple integrated circuit component */
230
+ interface SourceSimpleChip extends SourceComponentBase {
244
231
  ftype: "simple_chip"
245
232
  }
246
233
  ```
247
234
 
248
235
  ### SourceSimpleCrystal
249
236
 
250
- - Defines a simple crystal oscillator component
237
+ Defines a simple crystal oscillator component
251
238
 
252
239
  ```typescript
253
- /**
254
- * Defines a simple crystal oscillator component
255
- */
256
- export interface SourceSimpleCrystal extends SourceComponentBase {
240
+ /** Defines a simple crystal oscillator component */
241
+ interface SourceSimpleCrystal extends SourceComponentBase {
257
242
  ftype: "simple_crystal"
258
243
  frequency: number
259
244
  load_capacitance?: number
@@ -262,39 +247,33 @@ export interface SourceSimpleCrystal extends SourceComponentBase {
262
247
 
263
248
  ### SourceSimpleDiode
264
249
 
265
- - Defines a simple diode component
250
+ Defines a simple diode component
266
251
 
267
252
  ```typescript
268
- /**
269
- * Defines a simple diode component
270
- */
271
- export interface SourceSimpleDiode extends SourceComponentBase {
253
+ /** Defines a simple diode component */
254
+ interface SourceSimpleDiode extends SourceComponentBase {
272
255
  ftype: "simple_diode"
273
256
  }
274
257
  ```
275
258
 
276
259
  ### SourceSimpleGround
277
260
 
278
- - Defines a simple ground component
261
+ Defines a simple ground component
279
262
 
280
263
  ```typescript
281
- /**
282
- * Defines a simple ground component
283
- */
284
- export interface SourceSimpleGround extends SourceComponentBase {
264
+ /** Defines a simple ground component */
265
+ interface SourceSimpleGround extends SourceComponentBase {
285
266
  ftype: "simple_ground"
286
267
  }
287
268
  ```
288
269
 
289
270
  ### SourceSimpleInductor
290
271
 
291
- - Defines a simple inductor component
272
+ Defines a simple inductor component
292
273
 
293
274
  ```typescript
294
- /**
295
- * Defines a simple inductor component
296
- */
297
- export interface SourceSimpleInductor extends SourceComponentBase {
275
+ /** Defines a simple inductor component */
276
+ interface SourceSimpleInductor extends SourceComponentBase {
298
277
  ftype: "simple_inductor"
299
278
  inductance: number
300
279
  }
@@ -302,13 +281,11 @@ export interface SourceSimpleInductor extends SourceComponentBase {
302
281
 
303
282
  ### SourceSimplePowerSource
304
283
 
305
- - Defines a simple power source component
284
+ Defines a simple power source component
306
285
 
307
286
  ```typescript
308
- /**
309
- * Defines a simple power source component
310
- */
311
- export interface SourceSimplePowerSource extends SourceComponentBase {
287
+ /** Defines a simple power source component */
288
+ interface SourceSimplePowerSource extends SourceComponentBase {
312
289
  ftype: "simple_power_source"
313
290
  voltage: number
314
291
  }
@@ -316,26 +293,22 @@ export interface SourceSimplePowerSource extends SourceComponentBase {
316
293
 
317
294
  ### SourceSimplePushButton
318
295
 
319
- - Defines a simple push button component
296
+ Defines a simple push button component
320
297
 
321
298
  ```typescript
322
- /**
323
- * Defines a simple push button component
324
- */
325
- export interface SourceSimplePushButton extends SourceComponentBase {
299
+ /** Defines a simple push button component */
300
+ interface SourceSimplePushButton extends SourceComponentBase {
326
301
  ftype: "simple_push_button"
327
302
  }
328
303
  ```
329
304
 
330
305
  ### SourceSimpleResistor
331
306
 
332
- - Defines a simple resistor component
307
+ Defines a simple resistor component
333
308
 
334
309
  ```typescript
335
- /**
336
- * Defines a simple resistor component
337
- */
338
- export interface SourceSimpleResistor extends SourceComponentBase {
310
+ /** Defines a simple resistor component */
311
+ interface SourceSimpleResistor extends SourceComponentBase {
339
312
  ftype: "simple_resistor"
340
313
  resistance: number
341
314
  }
@@ -344,7 +317,7 @@ export interface SourceSimpleResistor extends SourceComponentBase {
344
317
  ### SourceTrace
345
318
 
346
319
  ```typescript
347
- export interface SourceTrace {
320
+ interface SourceTrace {
348
321
  type: "source_trace"
349
322
  source_trace_id: string
350
323
  connected_source_port_ids: string[]
@@ -357,13 +330,11 @@ export interface SourceTrace {
357
330
 
358
331
  ### PcbBoard
359
332
 
360
- - Defines the board outline of the PCB
333
+ Defines the board outline of the PCB
361
334
 
362
335
  ```typescript
363
- /**
364
- * Defines the board outline of the PCB
365
- */
366
- export interface PcbBoard {
336
+ /** Defines the board outline of the PCB */
337
+ interface PcbBoard {
367
338
  type: "pcb_board"
368
339
  pcb_board_id: string
369
340
  width: Length
@@ -377,13 +348,11 @@ export interface PcbBoard {
377
348
 
378
349
  ### PcbComponent
379
350
 
380
- - Defines a component on the PCB
351
+ Defines a component on the PCB
381
352
 
382
353
  ```typescript
383
- /**
384
- * Defines a component on the PCB
385
- */
386
- export interface PcbComponent {
354
+ /** Defines a component on the PCB */
355
+ interface PcbComponent {
387
356
  type: "pcb_component"
388
357
  pcb_component_id: string
389
358
  source_component_id: string
@@ -397,13 +366,11 @@ export interface PcbComponent {
397
366
 
398
367
  ### PcbFabricationNotePath
399
368
 
400
- - Defines a fabrication path on the PCB for fabricators or assemblers
369
+ Defines a fabrication path on the PCB for fabricators or assemblers
401
370
 
402
371
  ```typescript
403
- /**
404
- * Defines a fabrication path on the PCB for fabricators or assemblers
405
- */
406
- export interface PcbFabricationNotePath {
372
+ /** Defines a fabrication path on the PCB for fabricators or assemblers */
373
+ interface PcbFabricationNotePath {
407
374
  type: "pcb_fabrication_note_path"
408
375
  pcb_fabrication_note_path_id: string
409
376
  pcb_component_id: string
@@ -416,13 +383,11 @@ export interface PcbFabricationNotePath {
416
383
 
417
384
  ### PcbFabricationNoteText
418
385
 
419
- - Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators
386
+ Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators
420
387
 
421
388
  ```typescript
422
- /**
423
- * Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators
424
- */
425
- export interface PcbFabricationNoteText {
389
+ /** Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators */
390
+ interface PcbFabricationNoteText {
426
391
  type: "pcb_fabrication_note_text"
427
392
  pcb_fabrication_note_text_id: string
428
393
  font: "tscircuit2024"
@@ -443,13 +408,11 @@ export interface PcbFabricationNoteText {
443
408
 
444
409
  ### PcbGroup
445
410
 
446
- - Defines a group of components on the PCB
411
+ Defines a group of components on the PCB
447
412
 
448
413
  ```typescript
449
- /**
450
- * Defines a group of components on the PCB
451
- */
452
- export interface PcbGroup {
414
+ /** Defines a group of components on the PCB */
415
+ interface PcbGroup {
453
416
  type: "pcb_group"
454
417
  pcb_group_id: string
455
418
  width: Length
@@ -461,15 +424,29 @@ export interface PcbGroup {
461
424
  }
462
425
  ```
463
426
 
427
+ ### PcbHole
428
+
429
+ Defines a circular or square hole on the PCB
430
+
431
+ ```typescript
432
+ /** Defines a circular or square hole on the PCB */
433
+ interface PcbHoleCircleOrSquare {
434
+ type: "pcb_hole"
435
+ pcb_hole_id: string
436
+ hole_shape: "circle" | "square"
437
+ hole_diameter: number
438
+ x: Distance
439
+ y: Distance
440
+ }
441
+ ```
442
+
464
443
  ### PcbManualEditConflictError
465
444
 
466
- - Error emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates
445
+ Error emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates
467
446
 
468
447
  ```typescript
469
- /**
470
- * Error emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates
471
- */
472
- export interface PcbManualEditConflictError {
448
+ /** Error emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates */
449
+ interface PcbManualEditConflictError {
473
450
  type: "pcb_manual_edit_conflict_error"
474
451
  pcb_error_id: string
475
452
  message: string
@@ -480,13 +457,11 @@ export interface PcbManualEditConflictError {
480
457
 
481
458
  ### PcbMissingFootprintError
482
459
 
483
- - Defines a placement error on the PCB
460
+ Defines a placement error on the PCB
484
461
 
485
462
  ```typescript
486
- /**
487
- * Defines a placement error on the PCB
488
- */
489
- export interface PcbMissingFootprintError {
463
+ /** Defines a placement error on the PCB */
464
+ interface PcbMissingFootprintError {
490
465
  type: "pcb_missing_footprint_error"
491
466
  pcb_missing_footprint_error_id: string
492
467
  error_type: "pcb_missing_footprint_error"
@@ -497,28 +472,45 @@ export interface PcbMissingFootprintError {
497
472
 
498
473
  ### PcbPlacementError
499
474
 
500
- - Defines a placement error on the PCB
475
+ Defines a placement error on the PCB
501
476
 
502
477
  ```typescript
503
- /**
504
- * Defines a placement error on the PCB
505
- */
506
- export interface PcbPlacementError {
478
+ /** Defines a placement error on the PCB */
479
+ interface PcbPlacementError {
507
480
  type: "pcb_placement_error"
508
481
  pcb_placement_error_id: string
509
482
  message: string
510
483
  }
511
484
  ```
512
485
 
486
+ ### PcbPlatedHole
487
+
488
+ Defines a circular plated hole on the PCB
489
+
490
+ ```typescript
491
+ /** Defines a circular plated hole on the PCB */
492
+ interface PcbPlatedHoleCircle {
493
+ type: "pcb_plated_hole"
494
+ shape: "circle"
495
+ outer_diameter: number
496
+ hole_diameter: number
497
+ x: Distance
498
+ y: Distance
499
+ layers: LayerRef[]
500
+ port_hints?: string[]
501
+ pcb_component_id?: string
502
+ pcb_port_id?: string
503
+ pcb_plated_hole_id: string
504
+ }
505
+ ```
506
+
513
507
  ### PcbPort
514
508
 
515
- - Defines a port on the PCB
509
+ Defines a port on the PCB
516
510
 
517
511
  ```typescript
518
- /**
519
- * Defines a port on the PCB
520
- */
521
- export interface PcbPort {
512
+ /** Defines a port on the PCB */
513
+ interface PcbPort {
522
514
  type: "pcb_port"
523
515
  pcb_port_id: string
524
516
  source_port_id: string
@@ -531,13 +523,11 @@ export interface PcbPort {
531
523
 
532
524
  ### PcbPortNotMatchedError
533
525
 
534
- - Defines a trace error on the PCB where a port is not matched
526
+ Defines a trace error on the PCB where a port is not matched
535
527
 
536
528
  ```typescript
537
- /**
538
- * Defines a trace error on the PCB where a port is not matched
539
- */
540
- export interface PcbPortNotMatchedError {
529
+ /** Defines a trace error on the PCB where a port is not matched */
530
+ interface PcbPortNotMatchedError {
541
531
  type: "pcb_port_not_matched_error"
542
532
  pcb_error_id: string
543
533
  message: string
@@ -547,13 +537,11 @@ export interface PcbPortNotMatchedError {
547
537
 
548
538
  ### PcbSilkscreenCircle
549
539
 
550
- - Defines a silkscreen circle on the PCB
540
+ Defines a silkscreen circle on the PCB
551
541
 
552
542
  ```typescript
553
- /**
554
- * Defines a silkscreen circle on the PCB
555
- */
556
- export interface PcbSilkscreenCircle {
543
+ /** Defines a silkscreen circle on the PCB */
544
+ interface PcbSilkscreenCircle {
557
545
  type: "pcb_silkscreen_circle"
558
546
  pcb_silkscreen_circle_id: string
559
547
  pcb_component_id: string
@@ -565,13 +553,11 @@ export interface PcbSilkscreenCircle {
565
553
 
566
554
  ### PcbSilkscreenLine
567
555
 
568
- - Defines a silkscreen line on the PCB
556
+ Defines a silkscreen line on the PCB
569
557
 
570
558
  ```typescript
571
- /**
572
- * Defines a silkscreen line on the PCB
573
- */
574
- export interface PcbSilkscreenLine {
559
+ /** Defines a silkscreen line on the PCB */
560
+ interface PcbSilkscreenLine {
575
561
  type: "pcb_silkscreen_line"
576
562
  pcb_silkscreen_line_id: string
577
563
  pcb_component_id: string
@@ -586,13 +572,11 @@ export interface PcbSilkscreenLine {
586
572
 
587
573
  ### PcbSilkscreenOval
588
574
 
589
- - Defines a silkscreen oval on the PCB
575
+ Defines a silkscreen oval on the PCB
590
576
 
591
577
  ```typescript
592
- /**
593
- * Defines a silkscreen oval on the PCB
594
- */
595
- export interface PcbSilkscreenOval {
578
+ /** Defines a silkscreen oval on the PCB */
579
+ interface PcbSilkscreenOval {
596
580
  type: "pcb_silkscreen_oval"
597
581
  pcb_silkscreen_oval_id: string
598
582
  pcb_component_id: string
@@ -605,13 +589,11 @@ export interface PcbSilkscreenOval {
605
589
 
606
590
  ### PcbSilkscreenPath
607
591
 
608
- - Defines a silkscreen path on the PCB
592
+ Defines a silkscreen path on the PCB
609
593
 
610
594
  ```typescript
611
- /**
612
- * Defines a silkscreen path on the PCB
613
- */
614
- export interface PcbSilkscreenPath {
595
+ /** Defines a silkscreen path on the PCB */
596
+ interface PcbSilkscreenPath {
615
597
  type: "pcb_silkscreen_path"
616
598
  pcb_silkscreen_path_id: string
617
599
  pcb_component_id: string
@@ -623,13 +605,11 @@ export interface PcbSilkscreenPath {
623
605
 
624
606
  ### PcbSilkscreenPill
625
607
 
626
- - Defines a silkscreen pill on the PCB
608
+ Defines a silkscreen pill on the PCB
627
609
 
628
610
  ```typescript
629
- /**
630
- * Defines a silkscreen pill on the PCB
631
- */
632
- export interface PcbSilkscreenPill {
611
+ /** Defines a silkscreen pill on the PCB */
612
+ interface PcbSilkscreenPill {
633
613
  type: "pcb_silkscreen_pill"
634
614
  pcb_silkscreen_pill_id: string
635
615
  pcb_component_id: string
@@ -642,13 +622,11 @@ export interface PcbSilkscreenPill {
642
622
 
643
623
  ### PcbSilkscreenRect
644
624
 
645
- - Defines a silkscreen rect on the PCB
625
+ Defines a silkscreen rect on the PCB
646
626
 
647
627
  ```typescript
648
- /**
649
- * Defines a silkscreen rect on the PCB
650
- */
651
- export interface PcbSilkscreenRect {
628
+ /** Defines a silkscreen rect on the PCB */
629
+ interface PcbSilkscreenRect {
652
630
  type: "pcb_silkscreen_rect"
653
631
  pcb_silkscreen_rect_id: string
654
632
  pcb_component_id: string
@@ -661,13 +639,11 @@ export interface PcbSilkscreenRect {
661
639
 
662
640
  ### PcbSilkscreenText
663
641
 
664
- - Defines silkscreen text on the PCB
642
+ Defines silkscreen text on the PCB
665
643
 
666
644
  ```typescript
667
- /**
668
- * Defines silkscreen text on the PCB
669
- */
670
- export interface PcbSilkscreenText {
645
+ /** Defines silkscreen text on the PCB */
646
+ interface PcbSilkscreenText {
671
647
  type: "pcb_silkscreen_text"
672
648
  pcb_silkscreen_text_id: string
673
649
  font: "tscircuit2024"
@@ -686,15 +662,32 @@ export interface PcbSilkscreenText {
686
662
  }
687
663
  ```
688
664
 
665
+ ### PcbSolderPaste
666
+
667
+ Defines solderpaste on the PCB
668
+
669
+ ```typescript
670
+ /** Defines solderpaste on the PCB */
671
+ interface PcbSolderPasteCircle {
672
+ type: "pcb_solder_paste"
673
+ shape: "circle"
674
+ pcb_solder_paste_id: string
675
+ x: Distance
676
+ y: Distance
677
+ radius: number
678
+ layer: LayerRef
679
+ pcb_component_id?: string
680
+ pcb_smtpad_id?: string
681
+ }
682
+ ```
683
+
689
684
  ### PcbText
690
685
 
691
- - Defines text on the PCB
686
+ Defines text on the PCB
692
687
 
693
688
  ```typescript
694
- /**
695
- * Defines text on the PCB
696
- */
697
- export interface PcbText {
689
+ /** Defines text on the PCB */
690
+ interface PcbText {
698
691
  type: "pcb_text"
699
692
  pcb_text_id: string
700
693
  text: string
@@ -709,30 +702,8 @@ export interface PcbText {
709
702
 
710
703
  ### PcbTrace
711
704
 
712
- - Defines a trace on the PCB
713
-
714
705
  ```typescript
715
- /**
716
- * Defines a trace on the PCB
717
- */
718
- export interface PcbTrace {
719
- type: "pcb_trace"
720
- source_trace_id?: string
721
- pcb_component_id?: string
722
- pcb_trace_id: string
723
- /**
724
- * The order that this trace was routed in. This can be used to debug the
725
- * autorouter and to understand the trace path better
726
- *
727
- * The route_order_index should be relative to a subcircuit
728
- */
729
- route_order_index?: number
730
- route_thickness_mode?: "constant" | "interpolated"
731
- should_round_corners?: boolean
732
- route: Array<PcbTraceRoutePoint>
733
- }
734
-
735
- export interface PcbTraceRoutePointWire {
706
+ interface PcbTraceRoutePointWire {
736
707
  route_type: "wire"
737
708
  x: Distance
738
709
  y: Distance
@@ -741,25 +712,15 @@ export interface PcbTraceRoutePointWire {
741
712
  end_pcb_port_id?: string
742
713
  layer: LayerRef
743
714
  }
744
-
745
- export interface PcbTraceRoutePointVia {
746
- route_type: "via"
747
- x: Distance
748
- y: Distance
749
- from_layer: string
750
- to_layer: string
751
- }
752
715
  ```
753
716
 
754
717
  ### PcbTraceError
755
718
 
756
- - Defines a trace error on the PCB
719
+ Defines a trace error on the PCB
757
720
 
758
721
  ```typescript
759
- /**
760
- * Defines a trace error on the PCB
761
- */
762
- export interface PcbTraceError {
722
+ /** Defines a trace error on the PCB */
723
+ interface PcbTraceError {
763
724
  type: "pcb_trace_error"
764
725
  pcb_trace_error_id: string
765
726
  error_type: "pcb_trace_error"
@@ -774,13 +735,11 @@ export interface PcbTraceError {
774
735
 
775
736
  ### PcbTraceHint
776
737
 
777
- - A hint that can be used during generation of a PCB trace.
738
+ A hint that can be used during generation of a PCB trace.
778
739
 
779
740
  ```typescript
780
- /**
781
- * A hint that can be used during generation of a PCB trace.
782
- */
783
- export interface PcbTraceHint {
741
+ /** A hint that can be used during generation of a PCB trace. */
742
+ interface PcbTraceHint {
784
743
  type: "pcb_trace_hint"
785
744
  pcb_trace_hint_id: string
786
745
  pcb_port_id: string
@@ -789,48 +748,12 @@ export interface PcbTraceHint {
789
748
  }
790
749
  ```
791
750
 
792
- ### PcbVia
793
-
794
- @deprecated
795
-
796
- ```typescript
797
- /** @deprecated */
798
- from_layer: layer_ref.optional(),
799
- /** @deprecated */
800
- to_layer: layer_ref.optional(),
801
- layers: z.array(layer_ref),
802
- pcb_trace_id: z.string().optional(),
803
- })
804
- .describe("Defines a via on the PCB")
805
-
806
- export type PcbViaInput = z.input<typeof pcb_via>
807
- type InferredPcbVia = z.infer<typeof pcb_via>
808
-
809
- /**
810
- * Defines a via on the PCB
811
- */
812
- export interface PcbVia {
813
- type: "pcb_via"
814
- pcb_via_id: string
815
- x: Distance
816
- y: Distance
817
- outer_diameter: Distance
818
- hole_diameter: Distance
819
- /** @deprecated */
820
- from_layer?: LayerRef
821
- /** @deprecated */
822
- to_layer?: LayerRef
823
- layers: LayerRef[]
824
- pcb_trace_id?: string
825
- }
826
- ```
827
-
828
751
  ## Schematic Elements
829
752
 
830
753
  ### SchematicBox
831
754
 
832
755
  ```typescript
833
- export interface SchematicBox {
756
+ interface SchematicBox {
834
757
  type: "schematic_box"
835
758
  schematic_component_id: string
836
759
  width: number
@@ -843,7 +766,7 @@ export interface SchematicBox {
843
766
  ### SchematicComponent
844
767
 
845
768
  ```typescript
846
- export interface SchematicComponent {
769
+ interface SchematicComponent {
847
770
  type: "schematic_component"
848
771
  rotation: number
849
772
  size: Size
@@ -852,43 +775,29 @@ export interface SchematicComponent {
852
775
  schematic_component_id: string
853
776
  pin_spacing?: number
854
777
  pin_styles?: Record<
855
- string,
856
- {
857
- left_margin?: number
858
- right_margin?: number
859
- top_margin?: number
860
- bottom_margin?: number
861
- }
862
- >
863
- box_width?: number
864
- symbol_name?: string
865
- port_arrangement?: SchematicPortArrangement
866
- port_labels?: Record<string, string>
867
- symbol_display_value?: string
868
- }
869
-
870
- export interface SchematicPortArrangementBySize {
778
+ string,
779
+ {
780
+ left_margin?: number
781
+ right_margin?: number
782
+ top_margin?: number
783
+ bottom_margin?: number
784
+ }
785
+
786
+ interface SchematicPortArrangementBySize {
871
787
  left_size: number
872
788
  right_size: number
873
789
  top_size?: number
874
790
  bottom_size?: number
875
791
  }
876
792
 
877
- export interface SchematicPortArrangementBySides {
793
+ interface SchematicPortArrangementBySides {
878
794
  left_side?: { pins: number[]; direction?: "top-to-bottom" | "bottom-to-top" }
879
- right_side?: { pins: number[]; direction?: "top-to-bottom" | "bottom-to-top" }
880
- top_side?: { pins: number[]; direction?: "left-to-right" | "right-to-left" }
881
- bottom_side?: {
882
- pins: number[]
883
- direction?: "left-to-right" | "right-to-left"
884
- }
885
- }
886
795
  ```
887
796
 
888
797
  ### SchematicError
889
798
 
890
799
  ```typescript
891
- export interface SchematicError {
800
+ interface SchematicError {
892
801
  type: "schematic_error"
893
802
  schematic_error_id: string
894
803
  error_type: "schematic_port_not_found"
@@ -899,12 +808,10 @@ export interface SchematicError {
899
808
  ### SchematicLine
900
809
 
901
810
  ```typescript
902
- /**
903
- * Defines a line on the schematic, this can be used for adding arbitrary lines
811
+ /** Defines a line on the schematic, this can be used for adding arbitrary lines
904
812
  * to a schematic, but don't use it for drawing traces, schematic boxes or where
905
- * other schematic elements are more appropriate.
906
- */
907
- export interface SchematicLine {
813
+ * other schematic elements are more appropriate. */
814
+ interface SchematicLine {
908
815
  type: "schematic_line"
909
816
  schematic_component_id: string
910
817
  x1: number
@@ -917,7 +824,7 @@ export interface SchematicLine {
917
824
  ### SchematicPath
918
825
 
919
826
  ```typescript
920
- export interface SchematicPath {
827
+ interface SchematicPath {
921
828
  type: "schematic_path"
922
829
  schematic_component_id: string
923
830
  fill_color?: "red" | "blue"
@@ -929,7 +836,7 @@ export interface SchematicPath {
929
836
  ### SchematicPort
930
837
 
931
838
  ```typescript
932
- export interface SchematicPort {
839
+ interface SchematicPort {
933
840
  type: "schematic_port"
934
841
  schematic_port_id: string
935
842
  source_port_id: string
@@ -947,54 +854,31 @@ export interface SchematicPort {
947
854
  ### SchematicText
948
855
 
949
856
  ```typescript
950
- export interface SchematicText {
857
+ interface SchematicText {
951
858
  type: "schematic_text"
952
859
  schematic_component_id: string
953
860
  schematic_text_id: string
954
861
  text: string
955
862
  position: {
956
- x: number
957
- y: number
958
- }
959
- rotation: number
960
- anchor: "center" | "left" | "right" | "top" | "bottom"
961
- color: string
863
+ x: number
864
+ y: number
962
865
  }
963
866
  ```
964
867
 
965
868
  ### SchematicTrace
966
869
 
967
870
  ```typescript
968
- export interface SchematicTrace {
969
- type: "schematic_trace"
970
- schematic_trace_id: string
971
- source_trace_id: string
972
- junctions: {
973
- x: number
974
- y: number
975
- }[]
976
- edges: SchematicTraceEdge[]
977
- }
978
-
979
- export interface SchematicTraceEdge {
871
+ interface SchematicTraceEdge {
980
872
  from: {
981
- x: number
982
- y: number
983
- }
984
- to: {
985
- x: number
986
- y: number
987
- }
988
- is_crossing?: boolean
989
- from_schematic_port_id?: string
990
- to_schematic_port_id?: string
873
+ x: number
874
+ y: number
991
875
  }
992
876
  ```
993
877
 
994
878
  ### SchematicVoltageProbe
995
879
 
996
880
  ```typescript
997
- export interface SchematicVoltageProbe {
881
+ interface SchematicVoltageProbe {
998
882
  type: "schematic_voltage_probe"
999
883
  schematic_voltage_probe_id: string
1000
884
  position: Point