circuit-json 0.0.213 → 0.0.215
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 +218 -82
- package/dist/index.d.mts +62 -0
- package/dist/index.mjs +7 -2
- 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
|
|
@@ -799,6 +819,10 @@ Defines a group of components on the PCB
|
|
|
799
819
|
pcb_component_ids: string[]
|
|
800
820
|
name?: string
|
|
801
821
|
description?: string
|
|
822
|
+
autorouter_configuration?: {
|
|
823
|
+
trace_clearance: Length
|
|
824
|
+
}
|
|
825
|
+
autorouter_used_string?: string
|
|
802
826
|
}
|
|
803
827
|
```
|
|
804
828
|
|
|
@@ -809,7 +833,8 @@ Defines a group of components on the PCB
|
|
|
809
833
|
Defines a circular or square hole on the PCB
|
|
810
834
|
|
|
811
835
|
```typescript
|
|
812
|
-
/** Defines a circular or square hole on the PCB */
|
|
836
|
+
/** Defines a circular or square hole on the PCB */
|
|
837
|
+
interface PcbHoleCircleOrSquare {
|
|
813
838
|
type: "pcb_hole"
|
|
814
839
|
pcb_hole_id: string
|
|
815
840
|
pcb_group_id?: string
|
|
@@ -828,7 +853,8 @@ Defines a circular or square hole on the PCB
|
|
|
828
853
|
Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates
|
|
829
854
|
|
|
830
855
|
```typescript
|
|
831
|
-
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates */
|
|
856
|
+
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit pcbX/pcbY coordinates */
|
|
857
|
+
interface PcbManualEditConflictWarning {
|
|
832
858
|
type: "pcb_manual_edit_conflict_warning"
|
|
833
859
|
pcb_manual_edit_conflict_warning_id: string
|
|
834
860
|
warning_type: "pcb_manual_edit_conflict_warning"
|
|
@@ -847,7 +873,8 @@ Warning emitted when a component has both manual placement (via manualEdits) and
|
|
|
847
873
|
Defines a placement error on the PCB
|
|
848
874
|
|
|
849
875
|
```typescript
|
|
850
|
-
/** Defines a placement error on the PCB */
|
|
876
|
+
/** Defines a placement error on the PCB */
|
|
877
|
+
interface PcbMissingFootprintError {
|
|
851
878
|
type: "pcb_missing_footprint_error"
|
|
852
879
|
pcb_missing_footprint_error_id: string
|
|
853
880
|
pcb_group_id?: string
|
|
@@ -865,7 +892,8 @@ Defines a placement error on the PCB
|
|
|
865
892
|
Defines a placement error on the PCB
|
|
866
893
|
|
|
867
894
|
```typescript
|
|
868
|
-
/** Defines a placement error on the PCB */
|
|
895
|
+
/** Defines a placement error on the PCB */
|
|
896
|
+
interface PcbPlacementError {
|
|
869
897
|
type: "pcb_placement_error"
|
|
870
898
|
pcb_placement_error_id: string
|
|
871
899
|
error_type: "pcb_placement_error"
|
|
@@ -881,7 +909,8 @@ Defines a placement error on the PCB
|
|
|
881
909
|
Defines a circular plated hole on the PCB
|
|
882
910
|
|
|
883
911
|
```typescript
|
|
884
|
-
/** Defines a circular plated hole on the PCB */
|
|
912
|
+
/** Defines a circular plated hole on the PCB */
|
|
913
|
+
interface PcbPlatedHoleCircle {
|
|
885
914
|
type: "pcb_plated_hole"
|
|
886
915
|
shape: "circle"
|
|
887
916
|
pcb_group_id?: string
|
|
@@ -897,7 +926,7 @@ Defines a circular plated hole on the PCB
|
|
|
897
926
|
pcb_plated_hole_id: string
|
|
898
927
|
}
|
|
899
928
|
|
|
900
|
-
|
|
929
|
+
interface PcbHolePillWithRectPad {
|
|
901
930
|
type: "pcb_plated_hole"
|
|
902
931
|
shape: "pill_hole_with_rect_pad"
|
|
903
932
|
pcb_group_id?: string
|
|
@@ -917,7 +946,7 @@ Defines a circular plated hole on the PCB
|
|
|
917
946
|
pcb_plated_hole_id: string
|
|
918
947
|
}
|
|
919
948
|
|
|
920
|
-
|
|
949
|
+
interface PcbHoleCircularWithRectPad {
|
|
921
950
|
type: "pcb_plated_hole"
|
|
922
951
|
shape: "circular_hole_with_rect_pad"
|
|
923
952
|
pcb_group_id?: string
|
|
@@ -944,7 +973,8 @@ Defines a circular plated hole on the PCB
|
|
|
944
973
|
Defines a port on the PCB
|
|
945
974
|
|
|
946
975
|
```typescript
|
|
947
|
-
/** Defines a port on the PCB */
|
|
976
|
+
/** Defines a port on the PCB */
|
|
977
|
+
interface PcbPort {
|
|
948
978
|
type: "pcb_port"
|
|
949
979
|
pcb_port_id: string
|
|
950
980
|
pcb_group_id?: string
|
|
@@ -964,7 +994,8 @@ Defines a port on the PCB
|
|
|
964
994
|
Defines a trace error on the PCB where a port is not matched
|
|
965
995
|
|
|
966
996
|
```typescript
|
|
967
|
-
/** Defines a trace error on the PCB where a port is not matched */
|
|
997
|
+
/** Defines a trace error on the PCB where a port is not matched */
|
|
998
|
+
interface PcbPortNotMatchedError {
|
|
968
999
|
type: "pcb_port_not_matched_error"
|
|
969
1000
|
pcb_error_id: string
|
|
970
1001
|
error_type: "pcb_port_not_matched_error"
|
|
@@ -974,6 +1005,21 @@ Defines a trace error on the PCB where a port is not matched
|
|
|
974
1005
|
}
|
|
975
1006
|
```
|
|
976
1007
|
|
|
1008
|
+
### PcbRouteHints
|
|
1009
|
+
|
|
1010
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/properties/pcb_route_hints.ts)
|
|
1011
|
+
|
|
1012
|
+
```typescript
|
|
1013
|
+
type PcbRouteHints = PcbRouteHint[]
|
|
1014
|
+
|
|
1015
|
+
interface PcbRouteHint {
|
|
1016
|
+
x: number
|
|
1017
|
+
y: number
|
|
1018
|
+
via?: boolean
|
|
1019
|
+
via_to_layer?: LayerRef
|
|
1020
|
+
}
|
|
1021
|
+
```
|
|
1022
|
+
|
|
977
1023
|
### PcbSilkscreenCircle
|
|
978
1024
|
|
|
979
1025
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_silkscreen_circle.ts)
|
|
@@ -981,7 +1027,8 @@ Defines a trace error on the PCB where a port is not matched
|
|
|
981
1027
|
Defines a silkscreen circle on the PCB
|
|
982
1028
|
|
|
983
1029
|
```typescript
|
|
984
|
-
/** Defines a silkscreen circle on the PCB */
|
|
1030
|
+
/** Defines a silkscreen circle on the PCB */
|
|
1031
|
+
interface PcbSilkscreenCircle {
|
|
985
1032
|
type: "pcb_silkscreen_circle"
|
|
986
1033
|
pcb_silkscreen_circle_id: string
|
|
987
1034
|
pcb_component_id: string
|
|
@@ -1001,7 +1048,8 @@ Defines a silkscreen circle on the PCB
|
|
|
1001
1048
|
Defines a silkscreen line on the PCB
|
|
1002
1049
|
|
|
1003
1050
|
```typescript
|
|
1004
|
-
/** Defines a silkscreen line on the PCB */
|
|
1051
|
+
/** Defines a silkscreen line on the PCB */
|
|
1052
|
+
interface PcbSilkscreenLine {
|
|
1005
1053
|
type: "pcb_silkscreen_line"
|
|
1006
1054
|
pcb_silkscreen_line_id: string
|
|
1007
1055
|
pcb_component_id: string
|
|
@@ -1023,7 +1071,8 @@ Defines a silkscreen line on the PCB
|
|
|
1023
1071
|
Defines a silkscreen oval on the PCB
|
|
1024
1072
|
|
|
1025
1073
|
```typescript
|
|
1026
|
-
/** Defines a silkscreen oval on the PCB */
|
|
1074
|
+
/** Defines a silkscreen oval on the PCB */
|
|
1075
|
+
interface PcbSilkscreenOval {
|
|
1027
1076
|
type: "pcb_silkscreen_oval"
|
|
1028
1077
|
pcb_silkscreen_oval_id: string
|
|
1029
1078
|
pcb_component_id: string
|
|
@@ -1043,7 +1092,8 @@ Defines a silkscreen oval on the PCB
|
|
|
1043
1092
|
Defines a silkscreen path on the PCB
|
|
1044
1093
|
|
|
1045
1094
|
```typescript
|
|
1046
|
-
/** Defines a silkscreen path on the PCB */
|
|
1095
|
+
/** Defines a silkscreen path on the PCB */
|
|
1096
|
+
interface PcbSilkscreenPath {
|
|
1047
1097
|
type: "pcb_silkscreen_path"
|
|
1048
1098
|
pcb_silkscreen_path_id: string
|
|
1049
1099
|
pcb_component_id: string
|
|
@@ -1062,7 +1112,8 @@ Defines a silkscreen path on the PCB
|
|
|
1062
1112
|
Defines a silkscreen pill on the PCB
|
|
1063
1113
|
|
|
1064
1114
|
```typescript
|
|
1065
|
-
/** Defines a silkscreen pill on the PCB */
|
|
1115
|
+
/** Defines a silkscreen pill on the PCB */
|
|
1116
|
+
interface PcbSilkscreenPill {
|
|
1066
1117
|
type: "pcb_silkscreen_pill"
|
|
1067
1118
|
pcb_silkscreen_pill_id: string
|
|
1068
1119
|
pcb_component_id: string
|
|
@@ -1082,7 +1133,8 @@ Defines a silkscreen pill on the PCB
|
|
|
1082
1133
|
Defines a silkscreen rect on the PCB
|
|
1083
1134
|
|
|
1084
1135
|
```typescript
|
|
1085
|
-
/** Defines a silkscreen rect on the PCB */
|
|
1136
|
+
/** Defines a silkscreen rect on the PCB */
|
|
1137
|
+
interface PcbSilkscreenRect {
|
|
1086
1138
|
type: "pcb_silkscreen_rect"
|
|
1087
1139
|
pcb_silkscreen_rect_id: string
|
|
1088
1140
|
pcb_component_id: string
|
|
@@ -1106,7 +1158,8 @@ Defines a silkscreen rect on the PCB
|
|
|
1106
1158
|
Defines silkscreen text on the PCB
|
|
1107
1159
|
|
|
1108
1160
|
```typescript
|
|
1109
|
-
/** Defines silkscreen text on the PCB */
|
|
1161
|
+
/** Defines silkscreen text on the PCB */
|
|
1162
|
+
interface PcbSilkscreenText {
|
|
1110
1163
|
type: "pcb_silkscreen_text"
|
|
1111
1164
|
pcb_silkscreen_text_id: string
|
|
1112
1165
|
pcb_group_id?: string
|
|
@@ -1130,7 +1183,8 @@ Defines silkscreen text on the PCB
|
|
|
1130
1183
|
Defines solderpaste on the PCB
|
|
1131
1184
|
|
|
1132
1185
|
```typescript
|
|
1133
|
-
/** Defines solderpaste on the PCB */
|
|
1186
|
+
/** Defines solderpaste on the PCB */
|
|
1187
|
+
interface PcbSolderPasteCircle {
|
|
1134
1188
|
type: "pcb_solder_paste"
|
|
1135
1189
|
shape: "circle"
|
|
1136
1190
|
pcb_solder_paste_id: string
|
|
@@ -1152,7 +1206,8 @@ Defines solderpaste on the PCB
|
|
|
1152
1206
|
Defines text on the PCB
|
|
1153
1207
|
|
|
1154
1208
|
```typescript
|
|
1155
|
-
/** Defines text on the PCB */
|
|
1209
|
+
/** Defines text on the PCB */
|
|
1210
|
+
interface PcbText {
|
|
1156
1211
|
type: "pcb_text"
|
|
1157
1212
|
pcb_text_id: string
|
|
1158
1213
|
pcb_group_id?: string
|
|
@@ -1175,7 +1230,8 @@ Defines text on the PCB
|
|
|
1175
1230
|
Pattern for connecting a ground plane to a plated hole
|
|
1176
1231
|
|
|
1177
1232
|
```typescript
|
|
1178
|
-
/** Pattern for connecting a ground plane to a plated hole */
|
|
1233
|
+
/** Pattern for connecting a ground plane to a plated hole */
|
|
1234
|
+
interface PcbThermalSpoke {
|
|
1179
1235
|
type: "pcb_thermal_spoke"
|
|
1180
1236
|
pcb_thermal_spoke_id: string
|
|
1181
1237
|
pcb_ground_plane_id: string
|
|
@@ -1203,6 +1259,8 @@ interface PcbTraceRoutePointWire {
|
|
|
1203
1259
|
end_pcb_port_id?: string
|
|
1204
1260
|
layer: LayerRef
|
|
1205
1261
|
}
|
|
1262
|
+
|
|
1263
|
+
type PcbTraceRoutePoint = PcbTraceRoutePointWire | PcbTraceRoutePointVia
|
|
1206
1264
|
```
|
|
1207
1265
|
|
|
1208
1266
|
### PcbTraceError
|
|
@@ -1212,7 +1270,8 @@ interface PcbTraceRoutePointWire {
|
|
|
1212
1270
|
Defines a trace error on the PCB
|
|
1213
1271
|
|
|
1214
1272
|
```typescript
|
|
1215
|
-
/** Defines a trace error on the PCB */
|
|
1273
|
+
/** Defines a trace error on the PCB */
|
|
1274
|
+
interface PcbTraceError {
|
|
1216
1275
|
type: "pcb_trace_error"
|
|
1217
1276
|
pcb_trace_error_id: string
|
|
1218
1277
|
error_type: "pcb_trace_error"
|
|
@@ -1233,7 +1292,8 @@ Defines a trace error on the PCB
|
|
|
1233
1292
|
A hint that can be used during generation of a PCB trace.
|
|
1234
1293
|
|
|
1235
1294
|
```typescript
|
|
1236
|
-
/** A hint that can be used during generation of a PCB trace. */
|
|
1295
|
+
/** A hint that can be used during generation of a PCB trace. */
|
|
1296
|
+
interface PcbTraceHint {
|
|
1237
1297
|
type: "pcb_trace_hint"
|
|
1238
1298
|
pcb_trace_hint_id: string
|
|
1239
1299
|
pcb_port_id: string
|
|
@@ -1250,7 +1310,8 @@ A hint that can be used during generation of a PCB trace.
|
|
|
1250
1310
|
Defines a via on the PCB
|
|
1251
1311
|
|
|
1252
1312
|
```typescript
|
|
1253
|
-
/** Defines a via on the PCB */
|
|
1313
|
+
/** Defines a via on the PCB */
|
|
1314
|
+
interface PcbVia {
|
|
1254
1315
|
type: "pcb_via"
|
|
1255
1316
|
pcb_via_id: string
|
|
1256
1317
|
pcb_group_id?: string
|
|
@@ -1300,12 +1361,21 @@ interface SchematicComponent {
|
|
|
1300
1361
|
schematic_component_id: string
|
|
1301
1362
|
pin_spacing?: number
|
|
1302
1363
|
pin_styles?: Record<
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1364
|
+
string,
|
|
1365
|
+
{
|
|
1366
|
+
left_margin?: number
|
|
1367
|
+
right_margin?: number
|
|
1368
|
+
top_margin?: number
|
|
1369
|
+
bottom_margin?: number
|
|
1370
|
+
}
|
|
1371
|
+
>
|
|
1372
|
+
box_width?: number
|
|
1373
|
+
symbol_name?: string
|
|
1374
|
+
port_arrangement?: SchematicPortArrangement
|
|
1375
|
+
port_labels?: Record<string, string>
|
|
1376
|
+
symbol_display_value?: string
|
|
1377
|
+
subcircuit_id?: string
|
|
1378
|
+
schematic_group_id?: string
|
|
1309
1379
|
}
|
|
1310
1380
|
|
|
1311
1381
|
interface SchematicPortArrangementBySize {
|
|
@@ -1317,6 +1387,54 @@ interface SchematicPortArrangementBySize {
|
|
|
1317
1387
|
|
|
1318
1388
|
interface SchematicPortArrangementBySides {
|
|
1319
1389
|
left_side?: { pins: number[]; direction?: "top-to-bottom" | "bottom-to-top" }
|
|
1390
|
+
right_side?: { pins: number[]; direction?: "top-to-bottom" | "bottom-to-top" }
|
|
1391
|
+
top_side?: { pins: number[]; direction?: "left-to-right" | "right-to-left" }
|
|
1392
|
+
bottom_side?: {
|
|
1393
|
+
pins: number[]
|
|
1394
|
+
direction?: "left-to-right" | "right-to-left"
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
type SchematicPortArrangement =
|
|
1399
|
+
| SchematicPortArrangementBySize
|
|
1400
|
+
| SchematicPortArrangementBySides
|
|
1401
|
+
```
|
|
1402
|
+
|
|
1403
|
+
### SchematicDebugObject
|
|
1404
|
+
|
|
1405
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_debug_object.ts)
|
|
1406
|
+
|
|
1407
|
+
```typescript
|
|
1408
|
+
type SchematicDebugObject =
|
|
1409
|
+
| SchematicDebugRect
|
|
1410
|
+
| SchematicDebugLine
|
|
1411
|
+
| SchematicDebugPoint
|
|
1412
|
+
|
|
1413
|
+
interface SchematicDebugRect {
|
|
1414
|
+
type: "schematic_debug_object"
|
|
1415
|
+
label?: string
|
|
1416
|
+
shape: "rect"
|
|
1417
|
+
center: Point
|
|
1418
|
+
size: Size
|
|
1419
|
+
subcircuit_id?: string
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
interface SchematicDebugLine {
|
|
1423
|
+
type: "schematic_debug_object"
|
|
1424
|
+
label?: string
|
|
1425
|
+
shape: "line"
|
|
1426
|
+
start: Point
|
|
1427
|
+
end: Point
|
|
1428
|
+
subcircuit_id?: string
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
interface SchematicDebugPoint {
|
|
1432
|
+
type: "schematic_debug_object"
|
|
1433
|
+
label?: string
|
|
1434
|
+
shape: "point"
|
|
1435
|
+
center: Point
|
|
1436
|
+
subcircuit_id?: string
|
|
1437
|
+
}
|
|
1320
1438
|
```
|
|
1321
1439
|
|
|
1322
1440
|
### SchematicError
|
|
@@ -1340,7 +1458,8 @@ interface SchematicError {
|
|
|
1340
1458
|
Defines a group of components on the schematic
|
|
1341
1459
|
|
|
1342
1460
|
```typescript
|
|
1343
|
-
/** Defines a group of components on the schematic */
|
|
1461
|
+
/** Defines a group of components on the schematic */
|
|
1462
|
+
interface SchematicGroup {
|
|
1344
1463
|
type: "schematic_group"
|
|
1345
1464
|
schematic_group_id: string
|
|
1346
1465
|
source_group_id: string
|
|
@@ -1378,7 +1497,8 @@ interface SchematicLayoutError {
|
|
|
1378
1497
|
```typescript
|
|
1379
1498
|
/** Defines a line on the schematic, this can be used for adding arbitrary lines
|
|
1380
1499
|
* to a schematic, but don't use it for drawing traces, schematic boxes or where
|
|
1381
|
-
* other schematic elements are more appropriate. */
|
|
1500
|
+
* other schematic elements are more appropriate. */
|
|
1501
|
+
interface SchematicLine {
|
|
1382
1502
|
type: "schematic_line"
|
|
1383
1503
|
schematic_component_id: string
|
|
1384
1504
|
x1: number
|
|
@@ -1396,7 +1516,8 @@ interface SchematicLayoutError {
|
|
|
1396
1516
|
Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates
|
|
1397
1517
|
|
|
1398
1518
|
```typescript
|
|
1399
|
-
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates */
|
|
1519
|
+
/** Warning emitted when a component has both manual placement (via manualEdits) and explicit schX/schY coordinates */
|
|
1520
|
+
interface SchematicManualEditConflictWarning {
|
|
1400
1521
|
type: "schematic_manual_edit_conflict_warning"
|
|
1401
1522
|
schematic_manual_edit_conflict_warning_id: string
|
|
1402
1523
|
warning_type: "schematic_manual_edit_conflict_warning"
|
|
@@ -1426,6 +1547,7 @@ interface SchematicNetLabel {
|
|
|
1426
1547
|
symbol_name?: string | undefined
|
|
1427
1548
|
/** When true the net label can be repositioned. When false the label's
|
|
1428
1549
|
* position is fixed by the element it is attached to. */
|
|
1550
|
+
|
|
1429
1551
|
is_movable?: boolean
|
|
1430
1552
|
subcircuit_id?: string
|
|
1431
1553
|
}
|
|
@@ -1464,6 +1586,7 @@ interface SchematicPort {
|
|
|
1464
1586
|
pin_number?: number
|
|
1465
1587
|
display_pin_label?: string
|
|
1466
1588
|
subcircuit_id?: string
|
|
1589
|
+
is_connected?: boolean
|
|
1467
1590
|
}
|
|
1468
1591
|
```
|
|
1469
1592
|
|
|
@@ -1479,8 +1602,13 @@ interface SchematicText {
|
|
|
1479
1602
|
text: string
|
|
1480
1603
|
font_size: number
|
|
1481
1604
|
position: {
|
|
1482
|
-
|
|
1483
|
-
|
|
1605
|
+
x: number
|
|
1606
|
+
y: number
|
|
1607
|
+
}
|
|
1608
|
+
rotation: number
|
|
1609
|
+
anchor: NinePointAnchor | FivePointAnchor
|
|
1610
|
+
color: string
|
|
1611
|
+
subcircuit_id?: string
|
|
1484
1612
|
}
|
|
1485
1613
|
```
|
|
1486
1614
|
|
|
@@ -1491,8 +1619,16 @@ interface SchematicText {
|
|
|
1491
1619
|
```typescript
|
|
1492
1620
|
interface SchematicTraceEdge {
|
|
1493
1621
|
from: {
|
|
1494
|
-
|
|
1495
|
-
|
|
1622
|
+
x: number
|
|
1623
|
+
y: number
|
|
1624
|
+
}
|
|
1625
|
+
to: {
|
|
1626
|
+
x: number
|
|
1627
|
+
y: number
|
|
1628
|
+
}
|
|
1629
|
+
is_crossing?: boolean
|
|
1630
|
+
from_schematic_port_id?: string
|
|
1631
|
+
to_schematic_port_id?: string
|
|
1496
1632
|
}
|
|
1497
1633
|
```
|
|
1498
1634
|
|