circuit-json 0.0.213 → 0.0.214
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 +214 -82
- package/dist/index.d.mts +10 -0
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,6 +90,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
90
90
|
- [PcbPlatedHole](#pcbplatedhole)
|
|
91
91
|
- [PcbPort](#pcbport)
|
|
92
92
|
- [PcbPortNotMatchedError](#pcbportnotmatchederror)
|
|
93
|
+
- [PcbRouteHints](#pcbroutehints)
|
|
93
94
|
- [PcbSilkscreenCircle](#pcbsilkscreencircle)
|
|
94
95
|
- [PcbSilkscreenLine](#pcbsilkscreenline)
|
|
95
96
|
- [PcbSilkscreenOval](#pcbsilkscreenoval)
|
|
@@ -107,6 +108,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
107
108
|
- [Schematic Elements](#schematic-elements)
|
|
108
109
|
- [SchematicBox](#schematicbox)
|
|
109
110
|
- [SchematicComponent](#schematiccomponent)
|
|
111
|
+
- [SchematicDebugObject](#schematicdebugobject)
|
|
110
112
|
- [SchematicError](#schematicerror)
|
|
111
113
|
- [SchematicGroup](#schematicgroup)
|
|
112
114
|
- [SchematicLayoutError](#schematiclayouterror)
|
|
@@ -219,7 +221,8 @@ interface SourceComponentBase {
|
|
|
219
221
|
|
|
220
222
|
```typescript
|
|
221
223
|
/** Error emitted when a component fails to be constructed.
|
|
222
|
-
* Contains details about the failure and prevents the component from being rendered. */
|
|
224
|
+
* Contains details about the failure and prevents the component from being rendered. */
|
|
225
|
+
interface SourceFailedToCreateComponentError {
|
|
223
226
|
type: "source_failed_to_create_component_error"
|
|
224
227
|
source_failed_to_create_component_error_id: string
|
|
225
228
|
error_type: "source_failed_to_create_component_error"
|
|
@@ -228,8 +231,13 @@ interface SourceComponentBase {
|
|
|
228
231
|
subcircuit_id?: string
|
|
229
232
|
parent_source_component_id?: string
|
|
230
233
|
pcb_center?: {
|
|
231
|
-
|
|
232
|
-
|
|
234
|
+
x?: number
|
|
235
|
+
y?: number
|
|
236
|
+
}
|
|
237
|
+
schematic_center?: {
|
|
238
|
+
x?: number
|
|
239
|
+
y?: number
|
|
240
|
+
}
|
|
233
241
|
}
|
|
234
242
|
```
|
|
235
243
|
|
|
@@ -255,7 +263,8 @@ interface SourceGroup {
|
|
|
255
263
|
The source code is missing a property
|
|
256
264
|
|
|
257
265
|
```typescript
|
|
258
|
-
/** The source code is missing a property */
|
|
266
|
+
/** The source code is missing a property */
|
|
267
|
+
interface SourceMissingPropertyError {
|
|
259
268
|
type: "source_missing_property_error"
|
|
260
269
|
source_missing_property_error_id: string
|
|
261
270
|
source_component_id: string
|
|
@@ -293,7 +302,8 @@ interface SourceNet {
|
|
|
293
302
|
Defines a ground plane in the source domain
|
|
294
303
|
|
|
295
304
|
```typescript
|
|
296
|
-
/** Defines a ground plane in the source domain */
|
|
305
|
+
/** Defines a ground plane in the source domain */
|
|
306
|
+
interface SourcePcbGroundPlane {
|
|
297
307
|
type: "source_pcb_ground_plane"
|
|
298
308
|
source_pcb_ground_plane_id: string
|
|
299
309
|
source_group_id: string
|
|
@@ -309,7 +319,8 @@ Defines a ground plane in the source domain
|
|
|
309
319
|
Defines a source port that can be connected to other components
|
|
310
320
|
|
|
311
321
|
```typescript
|
|
312
|
-
/** Defines a source port that can be connected to other components */
|
|
322
|
+
/** Defines a source port that can be connected to other components */
|
|
323
|
+
interface SourcePort {
|
|
313
324
|
type: "source_port"
|
|
314
325
|
pin_number?: number
|
|
315
326
|
port_hints?: string[]
|
|
@@ -342,8 +353,8 @@ interface SourceProjectMetadata {
|
|
|
342
353
|
Defines a simple battery component
|
|
343
354
|
|
|
344
355
|
```typescript
|
|
345
|
-
/** Defines a simple battery component */
|
|
346
|
-
|
|
356
|
+
/** Defines a simple battery component */
|
|
357
|
+
interface SourceSimpleBattery extends SourceComponentBase {
|
|
347
358
|
ftype: "simple_battery"
|
|
348
359
|
capacity: number
|
|
349
360
|
}
|
|
@@ -356,8 +367,8 @@ Defines a simple battery component
|
|
|
356
367
|
Defines a simple capacitor component
|
|
357
368
|
|
|
358
369
|
```typescript
|
|
359
|
-
/** Defines a simple capacitor component */
|
|
360
|
-
|
|
370
|
+
/** Defines a simple capacitor component */
|
|
371
|
+
interface SourceSimpleCapacitor extends SourceComponentBase {
|
|
361
372
|
ftype: "simple_capacitor"
|
|
362
373
|
capacitance: number
|
|
363
374
|
max_voltage_rating?: number
|
|
@@ -373,8 +384,8 @@ Defines a simple capacitor component
|
|
|
373
384
|
Defines a simple integrated circuit component
|
|
374
385
|
|
|
375
386
|
```typescript
|
|
376
|
-
/** Defines a simple integrated circuit component */
|
|
377
|
-
|
|
387
|
+
/** Defines a simple integrated circuit component */
|
|
388
|
+
interface SourceSimpleChip extends SourceComponentBase {
|
|
378
389
|
ftype: "simple_chip"
|
|
379
390
|
}
|
|
380
391
|
```
|
|
@@ -386,8 +397,8 @@ Defines a simple integrated circuit component
|
|
|
386
397
|
Defines a simple crystal oscillator component
|
|
387
398
|
|
|
388
399
|
```typescript
|
|
389
|
-
/** Defines a simple crystal oscillator component */
|
|
390
|
-
|
|
400
|
+
/** Defines a simple crystal oscillator component */
|
|
401
|
+
interface SourceSimpleCrystal extends SourceComponentBase {
|
|
391
402
|
ftype: "simple_crystal"
|
|
392
403
|
frequency: number
|
|
393
404
|
load_capacitance?: number
|
|
@@ -401,8 +412,8 @@ Defines a simple crystal oscillator component
|
|
|
401
412
|
Defines a simple diode component
|
|
402
413
|
|
|
403
414
|
```typescript
|
|
404
|
-
/** Defines a simple diode component */
|
|
405
|
-
|
|
415
|
+
/** Defines a simple diode component */
|
|
416
|
+
interface SourceSimpleDiode extends SourceComponentBase {
|
|
406
417
|
ftype: "simple_diode"
|
|
407
418
|
}
|
|
408
419
|
```
|
|
@@ -426,8 +437,8 @@ interface SourceSimpleFuse extends SourceComponentBase {
|
|
|
426
437
|
Defines a simple ground component
|
|
427
438
|
|
|
428
439
|
```typescript
|
|
429
|
-
/** Defines a simple ground component */
|
|
430
|
-
|
|
440
|
+
/** Defines a simple ground component */
|
|
441
|
+
interface SourceSimpleGround extends SourceComponentBase {
|
|
431
442
|
ftype: "simple_ground"
|
|
432
443
|
}
|
|
433
444
|
```
|
|
@@ -439,8 +450,8 @@ Defines a simple ground component
|
|
|
439
450
|
Defines a simple inductor component
|
|
440
451
|
|
|
441
452
|
```typescript
|
|
442
|
-
/** Defines a simple inductor component */
|
|
443
|
-
|
|
453
|
+
/** Defines a simple inductor component */
|
|
454
|
+
interface SourceSimpleInductor extends SourceComponentBase {
|
|
444
455
|
ftype: "simple_inductor"
|
|
445
456
|
inductance: number
|
|
446
457
|
max_current_rating?: number
|
|
@@ -454,8 +465,8 @@ Defines a simple inductor component
|
|
|
454
465
|
Defines a simple led component
|
|
455
466
|
|
|
456
467
|
```typescript
|
|
457
|
-
/** Defines a simple led component */
|
|
458
|
-
|
|
468
|
+
/** Defines a simple led component */
|
|
469
|
+
interface SourceSimpleLed extends Omit<SourceSimpleDiode, "ftype"> {
|
|
459
470
|
ftype: "simple_led"
|
|
460
471
|
color?: string
|
|
461
472
|
wavelength?: string
|
|
@@ -469,8 +480,8 @@ Defines a simple led component
|
|
|
469
480
|
```typescript
|
|
470
481
|
/** Defines a simple mosfet component
|
|
471
482
|
* This is a three-pin semiconductor device (source, gate, drain)
|
|
472
|
-
* Pin configuration is handled by the schematic port system */
|
|
473
|
-
|
|
483
|
+
* Pin configuration is handled by the schematic port system */
|
|
484
|
+
interface SourceSimpleMosfet extends SourceComponentBase {
|
|
474
485
|
ftype: "simple_mosfet"
|
|
475
486
|
channel_type: "n" | "p"
|
|
476
487
|
mosfet_mode: "enhancement" | "depletion"
|
|
@@ -484,8 +495,8 @@ Defines a simple led component
|
|
|
484
495
|
Defines a simple power source component
|
|
485
496
|
|
|
486
497
|
```typescript
|
|
487
|
-
/** Defines a simple power source component */
|
|
488
|
-
|
|
498
|
+
/** Defines a simple power source component */
|
|
499
|
+
interface SourceSimplePowerSource extends SourceComponentBase {
|
|
489
500
|
ftype: "simple_power_source"
|
|
490
501
|
voltage: number
|
|
491
502
|
}
|
|
@@ -498,8 +509,8 @@ Defines a simple power source component
|
|
|
498
509
|
Defines a simple push button component
|
|
499
510
|
|
|
500
511
|
```typescript
|
|
501
|
-
/** Defines a simple push button component */
|
|
502
|
-
|
|
512
|
+
/** Defines a simple push button component */
|
|
513
|
+
interface SourceSimplePushButton extends SourceComponentBase {
|
|
503
514
|
ftype: "simple_push_button"
|
|
504
515
|
}
|
|
505
516
|
```
|
|
@@ -511,8 +522,8 @@ Defines a simple push button component
|
|
|
511
522
|
Defines a simple resistor component
|
|
512
523
|
|
|
513
524
|
```typescript
|
|
514
|
-
/** Defines a simple resistor component */
|
|
515
|
-
|
|
525
|
+
/** Defines a simple resistor component */
|
|
526
|
+
interface SourceSimpleResistor extends SourceComponentBase {
|
|
516
527
|
ftype: "simple_resistor"
|
|
517
528
|
resistance: number
|
|
518
529
|
display_resistance?: string
|
|
@@ -526,8 +537,8 @@ Defines a simple resistor component
|
|
|
526
537
|
Defines a simple resonator component
|
|
527
538
|
|
|
528
539
|
```typescript
|
|
529
|
-
/** Defines a simple resonator component */
|
|
530
|
-
|
|
540
|
+
/** Defines a simple resonator component */
|
|
541
|
+
interface SourceSimpleResonator extends SourceComponentBase {
|
|
531
542
|
ftype: "simple_resonator"
|
|
532
543
|
load_capacitance: number
|
|
533
544
|
equivalent_series_resistance?: number
|
|
@@ -542,8 +553,8 @@ Defines a simple resonator component
|
|
|
542
553
|
Defines a simple switch component
|
|
543
554
|
|
|
544
555
|
```typescript
|
|
545
|
-
/** Defines a simple switch component */
|
|
546
|
-
|
|
556
|
+
/** Defines a simple switch component */
|
|
557
|
+
interface SourceSimpleSwitch extends SourceComponentBase {
|
|
547
558
|
ftype: "simple_switch"
|
|
548
559
|
}
|
|
549
560
|
```
|
|
@@ -555,8 +566,8 @@ Defines a simple switch component
|
|
|
555
566
|
```typescript
|
|
556
567
|
/** Defines a simple test point component
|
|
557
568
|
* Can be surface-mount or through-hole.
|
|
558
|
-
* Pad shape and dimensions configurable for different use cases. */
|
|
559
|
-
|
|
569
|
+
* Pad shape and dimensions configurable for different use cases. */
|
|
570
|
+
interface SourceSimpleTestPoint extends SourceComponentBase {
|
|
560
571
|
ftype: "simple_test_point"
|
|
561
572
|
footprint_variant?: "pad" | "through_hole"
|
|
562
573
|
pad_shape?: "rect" | "circle"
|
|
@@ -574,8 +585,8 @@ Defines a simple switch component
|
|
|
574
585
|
```typescript
|
|
575
586
|
/** Defines a simple transistor component
|
|
576
587
|
* This is a three-pin semiconductor device (emitter, base, collector)
|
|
577
|
-
* Pin configuration is handled by the schematic port system */
|
|
578
|
-
|
|
588
|
+
* Pin configuration is handled by the schematic port system */
|
|
589
|
+
interface SourceSimpleTransistor extends SourceComponentBase {
|
|
579
590
|
ftype: "simple_transistor"
|
|
580
591
|
transistor_type: "npn" | "pnp"
|
|
581
592
|
}
|
|
@@ -622,7 +633,8 @@ interface PcbAutoroutingErrorInterface {
|
|
|
622
633
|
Defines the board outline of the PCB
|
|
623
634
|
|
|
624
635
|
```typescript
|
|
625
|
-
/** Defines the board outline of the PCB */
|
|
636
|
+
/** Defines the board outline of the PCB */
|
|
637
|
+
interface PcbBoard {
|
|
626
638
|
type: "pcb_board"
|
|
627
639
|
pcb_board_id: string
|
|
628
640
|
is_subcircuit?: boolean
|
|
@@ -644,7 +656,8 @@ Defines the board outline of the PCB
|
|
|
644
656
|
Defines a routing target within a pcb_group for a source_trace or source_net
|
|
645
657
|
|
|
646
658
|
```typescript
|
|
647
|
-
/** Defines a routing target within a pcb_group for a source_trace or source_net */
|
|
659
|
+
/** Defines a routing target within a pcb_group for a source_trace or source_net */
|
|
660
|
+
interface PcbBreakoutPoint {
|
|
648
661
|
type: "pcb_breakout_point"
|
|
649
662
|
pcb_breakout_point_id: string
|
|
650
663
|
pcb_group_id: string
|
|
@@ -664,7 +677,8 @@ Defines a routing target within a pcb_group for a source_trace or source_net
|
|
|
664
677
|
Defines a component on the PCB
|
|
665
678
|
|
|
666
679
|
```typescript
|
|
667
|
-
/** Defines a component on the PCB */
|
|
680
|
+
/** Defines a component on the PCB */
|
|
681
|
+
interface PcbComponent {
|
|
668
682
|
type: "pcb_component"
|
|
669
683
|
pcb_component_id: string
|
|
670
684
|
source_component_id: string
|
|
@@ -685,7 +699,8 @@ Defines a component on the PCB
|
|
|
685
699
|
Defines a rectangular cutout on the PCB.
|
|
686
700
|
|
|
687
701
|
```typescript
|
|
688
|
-
/** Defines a rectangular cutout on the PCB. */
|
|
702
|
+
/** Defines a rectangular cutout on the PCB. */
|
|
703
|
+
interface PcbCutoutRect {
|
|
689
704
|
type: "pcb_cutout"
|
|
690
705
|
pcb_cutout_id: string
|
|
691
706
|
pcb_group_id?: string
|
|
@@ -705,7 +720,8 @@ Defines a rectangular cutout on the PCB.
|
|
|
705
720
|
Defines a fabrication path on the PCB for fabricators or assemblers
|
|
706
721
|
|
|
707
722
|
```typescript
|
|
708
|
-
/** Defines a fabrication path on the PCB for fabricators or assemblers */
|
|
723
|
+
/** Defines a fabrication path on the PCB for fabricators or assemblers */
|
|
724
|
+
interface PcbFabricationNotePath {
|
|
709
725
|
type: "pcb_fabrication_note_path"
|
|
710
726
|
pcb_fabrication_note_path_id: string
|
|
711
727
|
pcb_component_id: string
|
|
@@ -724,7 +740,8 @@ Defines a fabrication path on the PCB for fabricators or assemblers
|
|
|
724
740
|
Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators
|
|
725
741
|
|
|
726
742
|
```typescript
|
|
727
|
-
/** Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators */
|
|
743
|
+
/** Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators */
|
|
744
|
+
interface PcbFabricationNoteText {
|
|
728
745
|
type: "pcb_fabrication_note_text"
|
|
729
746
|
pcb_fabrication_note_text_id: string
|
|
730
747
|
subcircuit_id?: string
|
|
@@ -752,7 +769,8 @@ Defines a fabrication note in text on the PCB, useful for leaving notes for asse
|
|
|
752
769
|
Defines a ground plane on the PCB
|
|
753
770
|
|
|
754
771
|
```typescript
|
|
755
|
-
/** Defines a ground plane on the PCB */
|
|
772
|
+
/** Defines a ground plane on the PCB */
|
|
773
|
+
interface PcbGroundPlane {
|
|
756
774
|
type: "pcb_ground_plane"
|
|
757
775
|
pcb_ground_plane_id: string
|
|
758
776
|
source_pcb_ground_plane_id: string
|
|
@@ -769,7 +787,8 @@ Defines a ground plane on the PCB
|
|
|
769
787
|
Defines a polygon region of a ground plane
|
|
770
788
|
|
|
771
789
|
```typescript
|
|
772
|
-
/** Defines a polygon region of a ground plane */
|
|
790
|
+
/** Defines a polygon region of a ground plane */
|
|
791
|
+
interface PcbGroundPlaneRegion {
|
|
773
792
|
type: "pcb_ground_plane_region"
|
|
774
793
|
pcb_ground_plane_region_id: string
|
|
775
794
|
pcb_ground_plane_id: string
|
|
@@ -787,7 +806,8 @@ Defines a polygon region of a ground plane
|
|
|
787
806
|
Defines a group of components on the PCB
|
|
788
807
|
|
|
789
808
|
```typescript
|
|
790
|
-
/** Defines a group of components on the PCB */
|
|
809
|
+
/** Defines a group of components on the PCB */
|
|
810
|
+
interface PcbGroup {
|
|
791
811
|
type: "pcb_group"
|
|
792
812
|
pcb_group_id: string
|
|
793
813
|
source_group_id: string
|
|
@@ -809,7 +829,8 @@ Defines a group of components on the PCB
|
|
|
809
829
|
Defines a circular or square hole on the PCB
|
|
810
830
|
|
|
811
831
|
```typescript
|
|
812
|
-
/** Defines a circular or square hole on the PCB */
|
|
832
|
+
/** Defines a circular or square hole on the PCB */
|
|
833
|
+
interface PcbHoleCircleOrSquare {
|
|
813
834
|
type: "pcb_hole"
|
|
814
835
|
pcb_hole_id: string
|
|
815
836
|
pcb_group_id?: string
|
|
@@ -828,7 +849,8 @@ Defines a circular or square hole on the PCB
|
|
|
828
849
|
Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates
|
|
829
850
|
|
|
830
851
|
```typescript
|
|
831
|
-
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates */
|
|
852
|
+
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates */
|
|
853
|
+
interface PcbManualEditConflictWarning {
|
|
832
854
|
type: "pcb_manual_edit_conflict_warning"
|
|
833
855
|
pcb_manual_edit_conflict_warning_id: string
|
|
834
856
|
warning_type: "pcb_manual_edit_conflict_warning"
|
|
@@ -847,7 +869,8 @@ Warning emitted when a component has both manual placement (via manualEdits) and
|
|
|
847
869
|
Defines a placement error on the PCB
|
|
848
870
|
|
|
849
871
|
```typescript
|
|
850
|
-
/** Defines a placement error on the PCB */
|
|
872
|
+
/** Defines a placement error on the PCB */
|
|
873
|
+
interface PcbMissingFootprintError {
|
|
851
874
|
type: "pcb_missing_footprint_error"
|
|
852
875
|
pcb_missing_footprint_error_id: string
|
|
853
876
|
pcb_group_id?: string
|
|
@@ -865,7 +888,8 @@ Defines a placement error on the PCB
|
|
|
865
888
|
Defines a placement error on the PCB
|
|
866
889
|
|
|
867
890
|
```typescript
|
|
868
|
-
/** Defines a placement error on the PCB */
|
|
891
|
+
/** Defines a placement error on the PCB */
|
|
892
|
+
interface PcbPlacementError {
|
|
869
893
|
type: "pcb_placement_error"
|
|
870
894
|
pcb_placement_error_id: string
|
|
871
895
|
error_type: "pcb_placement_error"
|
|
@@ -881,7 +905,8 @@ Defines a placement error on the PCB
|
|
|
881
905
|
Defines a circular plated hole on the PCB
|
|
882
906
|
|
|
883
907
|
```typescript
|
|
884
|
-
/** Defines a circular plated hole on the PCB */
|
|
908
|
+
/** Defines a circular plated hole on the PCB */
|
|
909
|
+
interface PcbPlatedHoleCircle {
|
|
885
910
|
type: "pcb_plated_hole"
|
|
886
911
|
shape: "circle"
|
|
887
912
|
pcb_group_id?: string
|
|
@@ -897,7 +922,7 @@ Defines a circular plated hole on the PCB
|
|
|
897
922
|
pcb_plated_hole_id: string
|
|
898
923
|
}
|
|
899
924
|
|
|
900
|
-
|
|
925
|
+
interface PcbHolePillWithRectPad {
|
|
901
926
|
type: "pcb_plated_hole"
|
|
902
927
|
shape: "pill_hole_with_rect_pad"
|
|
903
928
|
pcb_group_id?: string
|
|
@@ -917,7 +942,7 @@ Defines a circular plated hole on the PCB
|
|
|
917
942
|
pcb_plated_hole_id: string
|
|
918
943
|
}
|
|
919
944
|
|
|
920
|
-
|
|
945
|
+
interface PcbHoleCircularWithRectPad {
|
|
921
946
|
type: "pcb_plated_hole"
|
|
922
947
|
shape: "circular_hole_with_rect_pad"
|
|
923
948
|
pcb_group_id?: string
|
|
@@ -944,7 +969,8 @@ Defines a circular plated hole on the PCB
|
|
|
944
969
|
Defines a port on the PCB
|
|
945
970
|
|
|
946
971
|
```typescript
|
|
947
|
-
/** Defines a port on the PCB */
|
|
972
|
+
/** Defines a port on the PCB */
|
|
973
|
+
interface PcbPort {
|
|
948
974
|
type: "pcb_port"
|
|
949
975
|
pcb_port_id: string
|
|
950
976
|
pcb_group_id?: string
|
|
@@ -964,7 +990,8 @@ Defines a port on the PCB
|
|
|
964
990
|
Defines a trace error on the PCB where a port is not matched
|
|
965
991
|
|
|
966
992
|
```typescript
|
|
967
|
-
/** Defines a trace error on the PCB where a port is not matched */
|
|
993
|
+
/** Defines a trace error on the PCB where a port is not matched */
|
|
994
|
+
interface PcbPortNotMatchedError {
|
|
968
995
|
type: "pcb_port_not_matched_error"
|
|
969
996
|
pcb_error_id: string
|
|
970
997
|
error_type: "pcb_port_not_matched_error"
|
|
@@ -974,6 +1001,21 @@ Defines a trace error on the PCB where a port is not matched
|
|
|
974
1001
|
}
|
|
975
1002
|
```
|
|
976
1003
|
|
|
1004
|
+
### PcbRouteHints
|
|
1005
|
+
|
|
1006
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/properties/pcb_route_hints.ts)
|
|
1007
|
+
|
|
1008
|
+
```typescript
|
|
1009
|
+
type PcbRouteHints = PcbRouteHint[]
|
|
1010
|
+
|
|
1011
|
+
interface PcbRouteHint {
|
|
1012
|
+
x: number
|
|
1013
|
+
y: number
|
|
1014
|
+
via?: boolean
|
|
1015
|
+
via_to_layer?: LayerRef
|
|
1016
|
+
}
|
|
1017
|
+
```
|
|
1018
|
+
|
|
977
1019
|
### PcbSilkscreenCircle
|
|
978
1020
|
|
|
979
1021
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_silkscreen_circle.ts)
|
|
@@ -981,7 +1023,8 @@ Defines a trace error on the PCB where a port is not matched
|
|
|
981
1023
|
Defines a silkscreen circle on the PCB
|
|
982
1024
|
|
|
983
1025
|
```typescript
|
|
984
|
-
/** Defines a silkscreen circle on the PCB */
|
|
1026
|
+
/** Defines a silkscreen circle on the PCB */
|
|
1027
|
+
interface PcbSilkscreenCircle {
|
|
985
1028
|
type: "pcb_silkscreen_circle"
|
|
986
1029
|
pcb_silkscreen_circle_id: string
|
|
987
1030
|
pcb_component_id: string
|
|
@@ -1001,7 +1044,8 @@ Defines a silkscreen circle on the PCB
|
|
|
1001
1044
|
Defines a silkscreen line on the PCB
|
|
1002
1045
|
|
|
1003
1046
|
```typescript
|
|
1004
|
-
/** Defines a silkscreen line on the PCB */
|
|
1047
|
+
/** Defines a silkscreen line on the PCB */
|
|
1048
|
+
interface PcbSilkscreenLine {
|
|
1005
1049
|
type: "pcb_silkscreen_line"
|
|
1006
1050
|
pcb_silkscreen_line_id: string
|
|
1007
1051
|
pcb_component_id: string
|
|
@@ -1023,7 +1067,8 @@ Defines a silkscreen line on the PCB
|
|
|
1023
1067
|
Defines a silkscreen oval on the PCB
|
|
1024
1068
|
|
|
1025
1069
|
```typescript
|
|
1026
|
-
/** Defines a silkscreen oval on the PCB */
|
|
1070
|
+
/** Defines a silkscreen oval on the PCB */
|
|
1071
|
+
interface PcbSilkscreenOval {
|
|
1027
1072
|
type: "pcb_silkscreen_oval"
|
|
1028
1073
|
pcb_silkscreen_oval_id: string
|
|
1029
1074
|
pcb_component_id: string
|
|
@@ -1043,7 +1088,8 @@ Defines a silkscreen oval on the PCB
|
|
|
1043
1088
|
Defines a silkscreen path on the PCB
|
|
1044
1089
|
|
|
1045
1090
|
```typescript
|
|
1046
|
-
/** Defines a silkscreen path on the PCB */
|
|
1091
|
+
/** Defines a silkscreen path on the PCB */
|
|
1092
|
+
interface PcbSilkscreenPath {
|
|
1047
1093
|
type: "pcb_silkscreen_path"
|
|
1048
1094
|
pcb_silkscreen_path_id: string
|
|
1049
1095
|
pcb_component_id: string
|
|
@@ -1062,7 +1108,8 @@ Defines a silkscreen path on the PCB
|
|
|
1062
1108
|
Defines a silkscreen pill on the PCB
|
|
1063
1109
|
|
|
1064
1110
|
```typescript
|
|
1065
|
-
/** Defines a silkscreen pill on the PCB */
|
|
1111
|
+
/** Defines a silkscreen pill on the PCB */
|
|
1112
|
+
interface PcbSilkscreenPill {
|
|
1066
1113
|
type: "pcb_silkscreen_pill"
|
|
1067
1114
|
pcb_silkscreen_pill_id: string
|
|
1068
1115
|
pcb_component_id: string
|
|
@@ -1082,7 +1129,8 @@ Defines a silkscreen pill on the PCB
|
|
|
1082
1129
|
Defines a silkscreen rect on the PCB
|
|
1083
1130
|
|
|
1084
1131
|
```typescript
|
|
1085
|
-
/** Defines a silkscreen rect on the PCB */
|
|
1132
|
+
/** Defines a silkscreen rect on the PCB */
|
|
1133
|
+
interface PcbSilkscreenRect {
|
|
1086
1134
|
type: "pcb_silkscreen_rect"
|
|
1087
1135
|
pcb_silkscreen_rect_id: string
|
|
1088
1136
|
pcb_component_id: string
|
|
@@ -1106,7 +1154,8 @@ Defines a silkscreen rect on the PCB
|
|
|
1106
1154
|
Defines silkscreen text on the PCB
|
|
1107
1155
|
|
|
1108
1156
|
```typescript
|
|
1109
|
-
/** Defines silkscreen text on the PCB */
|
|
1157
|
+
/** Defines silkscreen text on the PCB */
|
|
1158
|
+
interface PcbSilkscreenText {
|
|
1110
1159
|
type: "pcb_silkscreen_text"
|
|
1111
1160
|
pcb_silkscreen_text_id: string
|
|
1112
1161
|
pcb_group_id?: string
|
|
@@ -1130,7 +1179,8 @@ Defines silkscreen text on the PCB
|
|
|
1130
1179
|
Defines solderpaste on the PCB
|
|
1131
1180
|
|
|
1132
1181
|
```typescript
|
|
1133
|
-
/** Defines solderpaste on the PCB */
|
|
1182
|
+
/** Defines solderpaste on the PCB */
|
|
1183
|
+
interface PcbSolderPasteCircle {
|
|
1134
1184
|
type: "pcb_solder_paste"
|
|
1135
1185
|
shape: "circle"
|
|
1136
1186
|
pcb_solder_paste_id: string
|
|
@@ -1152,7 +1202,8 @@ Defines solderpaste on the PCB
|
|
|
1152
1202
|
Defines text on the PCB
|
|
1153
1203
|
|
|
1154
1204
|
```typescript
|
|
1155
|
-
/** Defines text on the PCB */
|
|
1205
|
+
/** Defines text on the PCB */
|
|
1206
|
+
interface PcbText {
|
|
1156
1207
|
type: "pcb_text"
|
|
1157
1208
|
pcb_text_id: string
|
|
1158
1209
|
pcb_group_id?: string
|
|
@@ -1175,7 +1226,8 @@ Defines text on the PCB
|
|
|
1175
1226
|
Pattern for connecting a ground plane to a plated hole
|
|
1176
1227
|
|
|
1177
1228
|
```typescript
|
|
1178
|
-
/** Pattern for connecting a ground plane to a plated hole */
|
|
1229
|
+
/** Pattern for connecting a ground plane to a plated hole */
|
|
1230
|
+
interface PcbThermalSpoke {
|
|
1179
1231
|
type: "pcb_thermal_spoke"
|
|
1180
1232
|
pcb_thermal_spoke_id: string
|
|
1181
1233
|
pcb_ground_plane_id: string
|
|
@@ -1203,6 +1255,8 @@ interface PcbTraceRoutePointWire {
|
|
|
1203
1255
|
end_pcb_port_id?: string
|
|
1204
1256
|
layer: LayerRef
|
|
1205
1257
|
}
|
|
1258
|
+
|
|
1259
|
+
type PcbTraceRoutePoint = PcbTraceRoutePointWire | PcbTraceRoutePointVia
|
|
1206
1260
|
```
|
|
1207
1261
|
|
|
1208
1262
|
### PcbTraceError
|
|
@@ -1212,7 +1266,8 @@ interface PcbTraceRoutePointWire {
|
|
|
1212
1266
|
Defines a trace error on the PCB
|
|
1213
1267
|
|
|
1214
1268
|
```typescript
|
|
1215
|
-
/** Defines a trace error on the PCB */
|
|
1269
|
+
/** Defines a trace error on the PCB */
|
|
1270
|
+
interface PcbTraceError {
|
|
1216
1271
|
type: "pcb_trace_error"
|
|
1217
1272
|
pcb_trace_error_id: string
|
|
1218
1273
|
error_type: "pcb_trace_error"
|
|
@@ -1233,7 +1288,8 @@ Defines a trace error on the PCB
|
|
|
1233
1288
|
A hint that can be used during generation of a PCB trace.
|
|
1234
1289
|
|
|
1235
1290
|
```typescript
|
|
1236
|
-
/** A hint that can be used during generation of a PCB trace. */
|
|
1291
|
+
/** A hint that can be used during generation of a PCB trace. */
|
|
1292
|
+
interface PcbTraceHint {
|
|
1237
1293
|
type: "pcb_trace_hint"
|
|
1238
1294
|
pcb_trace_hint_id: string
|
|
1239
1295
|
pcb_port_id: string
|
|
@@ -1250,7 +1306,8 @@ A hint that can be used during generation of a PCB trace.
|
|
|
1250
1306
|
Defines a via on the PCB
|
|
1251
1307
|
|
|
1252
1308
|
```typescript
|
|
1253
|
-
/** Defines a via on the PCB */
|
|
1309
|
+
/** Defines a via on the PCB */
|
|
1310
|
+
interface PcbVia {
|
|
1254
1311
|
type: "pcb_via"
|
|
1255
1312
|
pcb_via_id: string
|
|
1256
1313
|
pcb_group_id?: string
|
|
@@ -1300,12 +1357,21 @@ interface SchematicComponent {
|
|
|
1300
1357
|
schematic_component_id: string
|
|
1301
1358
|
pin_spacing?: number
|
|
1302
1359
|
pin_styles?: Record<
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1360
|
+
string,
|
|
1361
|
+
{
|
|
1362
|
+
left_margin?: number
|
|
1363
|
+
right_margin?: number
|
|
1364
|
+
top_margin?: number
|
|
1365
|
+
bottom_margin?: number
|
|
1366
|
+
}
|
|
1367
|
+
>
|
|
1368
|
+
box_width?: number
|
|
1369
|
+
symbol_name?: string
|
|
1370
|
+
port_arrangement?: SchematicPortArrangement
|
|
1371
|
+
port_labels?: Record<string, string>
|
|
1372
|
+
symbol_display_value?: string
|
|
1373
|
+
subcircuit_id?: string
|
|
1374
|
+
schematic_group_id?: string
|
|
1309
1375
|
}
|
|
1310
1376
|
|
|
1311
1377
|
interface SchematicPortArrangementBySize {
|
|
@@ -1317,6 +1383,54 @@ interface SchematicPortArrangementBySize {
|
|
|
1317
1383
|
|
|
1318
1384
|
interface SchematicPortArrangementBySides {
|
|
1319
1385
|
left_side?: { pins: number[]; direction?: "top-to-bottom" | "bottom-to-top" }
|
|
1386
|
+
right_side?: { pins: number[]; direction?: "top-to-bottom" | "bottom-to-top" }
|
|
1387
|
+
top_side?: { pins: number[]; direction?: "left-to-right" | "right-to-left" }
|
|
1388
|
+
bottom_side?: {
|
|
1389
|
+
pins: number[]
|
|
1390
|
+
direction?: "left-to-right" | "right-to-left"
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
type SchematicPortArrangement =
|
|
1395
|
+
| SchematicPortArrangementBySize
|
|
1396
|
+
| SchematicPortArrangementBySides
|
|
1397
|
+
```
|
|
1398
|
+
|
|
1399
|
+
### SchematicDebugObject
|
|
1400
|
+
|
|
1401
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_debug_object.ts)
|
|
1402
|
+
|
|
1403
|
+
```typescript
|
|
1404
|
+
type SchematicDebugObject =
|
|
1405
|
+
| SchematicDebugRect
|
|
1406
|
+
| SchematicDebugLine
|
|
1407
|
+
| SchematicDebugPoint
|
|
1408
|
+
|
|
1409
|
+
interface SchematicDebugRect {
|
|
1410
|
+
type: "schematic_debug_object"
|
|
1411
|
+
label?: string
|
|
1412
|
+
shape: "rect"
|
|
1413
|
+
center: Point
|
|
1414
|
+
size: Size
|
|
1415
|
+
subcircuit_id?: string
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
interface SchematicDebugLine {
|
|
1419
|
+
type: "schematic_debug_object"
|
|
1420
|
+
label?: string
|
|
1421
|
+
shape: "line"
|
|
1422
|
+
start: Point
|
|
1423
|
+
end: Point
|
|
1424
|
+
subcircuit_id?: string
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
interface SchematicDebugPoint {
|
|
1428
|
+
type: "schematic_debug_object"
|
|
1429
|
+
label?: string
|
|
1430
|
+
shape: "point"
|
|
1431
|
+
center: Point
|
|
1432
|
+
subcircuit_id?: string
|
|
1433
|
+
}
|
|
1320
1434
|
```
|
|
1321
1435
|
|
|
1322
1436
|
### SchematicError
|
|
@@ -1340,7 +1454,8 @@ interface SchematicError {
|
|
|
1340
1454
|
Defines a group of components on the schematic
|
|
1341
1455
|
|
|
1342
1456
|
```typescript
|
|
1343
|
-
/** Defines a group of components on the schematic */
|
|
1457
|
+
/** Defines a group of components on the schematic */
|
|
1458
|
+
interface SchematicGroup {
|
|
1344
1459
|
type: "schematic_group"
|
|
1345
1460
|
schematic_group_id: string
|
|
1346
1461
|
source_group_id: string
|
|
@@ -1378,7 +1493,8 @@ interface SchematicLayoutError {
|
|
|
1378
1493
|
```typescript
|
|
1379
1494
|
/** Defines a line on the schematic, this can be used for adding arbitrary lines
|
|
1380
1495
|
* to a schematic, but don't use it for drawing traces, schematic boxes or where
|
|
1381
|
-
* other schematic elements are more appropriate. */
|
|
1496
|
+
* other schematic elements are more appropriate. */
|
|
1497
|
+
interface SchematicLine {
|
|
1382
1498
|
type: "schematic_line"
|
|
1383
1499
|
schematic_component_id: string
|
|
1384
1500
|
x1: number
|
|
@@ -1396,7 +1512,8 @@ interface SchematicLayoutError {
|
|
|
1396
1512
|
Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates
|
|
1397
1513
|
|
|
1398
1514
|
```typescript
|
|
1399
|
-
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates */
|
|
1515
|
+
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates */
|
|
1516
|
+
interface SchematicManualEditConflictWarning {
|
|
1400
1517
|
type: "schematic_manual_edit_conflict_warning"
|
|
1401
1518
|
schematic_manual_edit_conflict_warning_id: string
|
|
1402
1519
|
warning_type: "schematic_manual_edit_conflict_warning"
|
|
@@ -1426,6 +1543,7 @@ interface SchematicNetLabel {
|
|
|
1426
1543
|
symbol_name?: string | undefined
|
|
1427
1544
|
/** When true the net label can be repositioned. When false the label's
|
|
1428
1545
|
* position is fixed by the element it is attached to. */
|
|
1546
|
+
|
|
1429
1547
|
is_movable?: boolean
|
|
1430
1548
|
subcircuit_id?: string
|
|
1431
1549
|
}
|
|
@@ -1464,6 +1582,7 @@ interface SchematicPort {
|
|
|
1464
1582
|
pin_number?: number
|
|
1465
1583
|
display_pin_label?: string
|
|
1466
1584
|
subcircuit_id?: string
|
|
1585
|
+
is_connected?: boolean
|
|
1467
1586
|
}
|
|
1468
1587
|
```
|
|
1469
1588
|
|
|
@@ -1479,8 +1598,13 @@ interface SchematicText {
|
|
|
1479
1598
|
text: string
|
|
1480
1599
|
font_size: number
|
|
1481
1600
|
position: {
|
|
1482
|
-
|
|
1483
|
-
|
|
1601
|
+
x: number
|
|
1602
|
+
y: number
|
|
1603
|
+
}
|
|
1604
|
+
rotation: number
|
|
1605
|
+
anchor: NinePointAnchor | FivePointAnchor
|
|
1606
|
+
color: string
|
|
1607
|
+
subcircuit_id?: string
|
|
1484
1608
|
}
|
|
1485
1609
|
```
|
|
1486
1610
|
|
|
@@ -1491,8 +1615,16 @@ interface SchematicText {
|
|
|
1491
1615
|
```typescript
|
|
1492
1616
|
interface SchematicTraceEdge {
|
|
1493
1617
|
from: {
|
|
1494
|
-
|
|
1495
|
-
|
|
1618
|
+
x: number
|
|
1619
|
+
y: number
|
|
1620
|
+
}
|
|
1621
|
+
to: {
|
|
1622
|
+
x: number
|
|
1623
|
+
y: number
|
|
1624
|
+
}
|
|
1625
|
+
is_crossing?: boolean
|
|
1626
|
+
from_schematic_port_id?: string
|
|
1627
|
+
to_schematic_port_id?: string
|
|
1496
1628
|
}
|
|
1497
1629
|
```
|
|
1498
1630
|
|