circuit-json 0.0.428 → 0.0.429
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 +618 -175
- package/dist/index.d.mts +165 -2
- package/dist/index.mjs +1367 -1349
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,16 +46,25 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
46
46
|
- [Typescript Usage](#typescript-usage)
|
|
47
47
|
|
|
48
48
|
- [Source Components](#source-components)
|
|
49
|
+
- [SourceAmbiguousPortReference](#sourceambiguousportreference)
|
|
49
50
|
- [SourceBoard](#sourceboard)
|
|
50
51
|
- [SourceComponentBase](#sourcecomponentbase)
|
|
51
52
|
- [SourceComponentInternalConnection](#sourcecomponentinternalconnection)
|
|
53
|
+
- [SourceComponentMisconfiguredError](#sourcecomponentmisconfigurederror)
|
|
54
|
+
- [SourceComponentPinsUnderspecifiedWarning](#sourcecomponentpinsunderspecifiedwarning)
|
|
52
55
|
- [SourceFailedToCreateComponentError](#sourcefailedtocreatecomponenterror)
|
|
53
56
|
- [SourceGroup](#sourcegroup)
|
|
57
|
+
- [SourceI2cMisconfiguredError](#sourcei2cmisconfigurederror)
|
|
54
58
|
- [SourceInterconnect](#sourceinterconnect)
|
|
59
|
+
- [SourceInvalidComponentPropertyError](#sourceinvalidcomponentpropertyerror)
|
|
55
60
|
- [SourceManuallyPlacedVia](#sourcemanuallyplacedvia)
|
|
61
|
+
- [SourceMissingManufacturerPartNumberWarning](#sourcemissingmanufacturerpartnumberwarning)
|
|
56
62
|
- [SourceMissingPropertyError](#sourcemissingpropertyerror)
|
|
57
63
|
- [SourceNet](#sourcenet)
|
|
64
|
+
- [SourceNoGroundPinDefinedWarning](#sourcenogroundpindefinedwarning)
|
|
65
|
+
- [SourceNoPowerPinDefinedWarning](#sourcenopowerpindefinedwarning)
|
|
58
66
|
- [SourcePcbGroundPlane](#sourcepcbgroundplane)
|
|
67
|
+
- [SourcePinAttributes](#sourcepinattributes)
|
|
59
68
|
- [SourcePinMissingTraceWarning](#sourcepinmissingtracewarning)
|
|
60
69
|
- [SourcePinMustBeConnectedError](#sourcepinmustbeconnectederror)
|
|
61
70
|
- [SourcePort](#sourceport)
|
|
@@ -64,7 +73,9 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
64
73
|
- [SourceSimpleBattery](#sourcesimplebattery)
|
|
65
74
|
- [SourceSimpleCapacitor](#sourcesimplecapacitor)
|
|
66
75
|
- [SourceSimpleChip](#sourcesimplechip)
|
|
76
|
+
- [SourceSimpleConnector](#sourcesimpleconnector)
|
|
67
77
|
- [SourceSimpleCrystal](#sourcesimplecrystal)
|
|
78
|
+
- [SourceSimpleCurrentSource](#sourcesimplecurrentsource)
|
|
68
79
|
- [SourceSimpleDiode](#sourcesimplediode)
|
|
69
80
|
- [SourceSimpleFiducial](#sourcesimplefiducial)
|
|
70
81
|
- [SourceSimpleFuse](#sourcesimplefuse)
|
|
@@ -72,6 +83,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
72
83
|
- [SourceSimpleInductor](#sourcesimpleinductor)
|
|
73
84
|
- [SourceSimpleLed](#sourcesimpleled)
|
|
74
85
|
- [SourceSimpleMosfet](#sourcesimplemosfet)
|
|
86
|
+
- [SourceSimpleOpAmp](#sourcesimpleopamp)
|
|
75
87
|
- [SourceSimplePinHeader](#sourcesimplepinheader)
|
|
76
88
|
- [SourceSimplePinout](#sourcesimplepinout)
|
|
77
89
|
- [SourceSimplePotentiometer](#sourcesimplepotentiometer)
|
|
@@ -83,6 +95,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
83
95
|
- [SourceSimpleTestPoint](#sourcesimpletestpoint)
|
|
84
96
|
- [SourceSimpleTransistor](#sourcesimpletransistor)
|
|
85
97
|
- [SourceSimpleVoltageProbe](#sourcesimplevoltageprobe)
|
|
98
|
+
- [SourceSimpleVoltageSource](#sourcesimplevoltagesource)
|
|
86
99
|
- [SourceTrace](#sourcetrace)
|
|
87
100
|
- [SourceTraceNotConnectedError](#sourcetracenotconnectederror)
|
|
88
101
|
- [UnknownErrorFindingPart](#unknownerrorfindingpart)
|
|
@@ -94,10 +107,14 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
94
107
|
- [PcbBreakoutPoint](#pcbbreakoutpoint)
|
|
95
108
|
- [PcbComponent](#pcbcomponent)
|
|
96
109
|
- [PcbComponentInvalidLayerError](#pcbcomponentinvalidlayererror)
|
|
110
|
+
- [PcbComponentNotOnBoardEdgeError](#pcbcomponentnotonboardedgeerror)
|
|
97
111
|
- [PcbComponentOutsideBoardError](#pcbcomponentoutsideboarderror)
|
|
112
|
+
- [PcbConnectorNotInAccessibleOrientationWarning](#pcbconnectornotinaccessibleorientationwarning)
|
|
98
113
|
- [PcbCopperPour](#pcbcopperpour)
|
|
99
114
|
- [PcbCopperText](#pcbcoppertext)
|
|
115
|
+
- [PcbCourtyardCircle](#pcbcourtyardcircle)
|
|
100
116
|
- [PcbCourtyardOutline](#pcbcourtyardoutline)
|
|
117
|
+
- [PcbCourtyardOverlapError](#pcbcourtyardoverlaperror)
|
|
101
118
|
- [PcbCourtyardPolygon](#pcbcourtyardpolygon)
|
|
102
119
|
- [PcbCourtyardRect](#pcbcourtyardrect)
|
|
103
120
|
- [PcbCutout](#pcbcutout)
|
|
@@ -118,7 +135,10 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
118
135
|
- [PcbNotePath](#pcbnotepath)
|
|
119
136
|
- [PcbNoteRect](#pcbnoterect)
|
|
120
137
|
- [PcbNoteText](#pcbnotetext)
|
|
138
|
+
- [PcbPadPadClearanceError](#pcbpadpadclearanceerror)
|
|
139
|
+
- [PcbPadTraceClearanceError](#pcbpadtraceclearanceerror)
|
|
121
140
|
- [PcbPanel](#pcbpanel)
|
|
141
|
+
- [PcbPanelizationPlacementError](#pcbpanelizationplacementerror)
|
|
122
142
|
- [PcbPlacementError](#pcbplacementerror)
|
|
123
143
|
- [PcbPlatedHole](#pcbplatedhole)
|
|
124
144
|
- [PcbPort](#pcbport)
|
|
@@ -133,16 +153,16 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
133
153
|
- [PcbSilkscreenRect](#pcbsilkscreenrect)
|
|
134
154
|
- [PcbSilkscreenText](#pcbsilkscreentext)
|
|
135
155
|
- [PcbSolderPaste](#pcbsolderpaste)
|
|
136
|
-
- [SupplierFootprintMismatchWarning](#supplierfootprintmismatchwarning)
|
|
137
156
|
- [PcbText](#pcbtext)
|
|
138
157
|
- [PcbThermalSpoke](#pcbthermalspoke)
|
|
139
158
|
- [PcbTrace](#pcbtrace)
|
|
140
|
-
- [PcbTraceWarning](#pcbtracewarning)
|
|
141
159
|
- [PcbTraceError](#pcbtraceerror)
|
|
142
160
|
- [PcbTraceHint](#pcbtracehint)
|
|
143
161
|
- [PcbTraceMissingError](#pcbtracemissingerror)
|
|
162
|
+
- [PcbTraceWarning](#pcbtracewarning)
|
|
144
163
|
- [PcbVia](#pcbvia)
|
|
145
164
|
- [PcbViaClearanceError](#pcbviaclearanceerror)
|
|
165
|
+
- [PcbViaTraceClearanceError](#pcbviatraceclearanceerror)
|
|
146
166
|
- [Schematic Elements](#schematic-elements)
|
|
147
167
|
- [SchematicArc](#schematicarc)
|
|
148
168
|
- [SchematicBox](#schematicbox)
|
|
@@ -159,13 +179,16 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
159
179
|
- [SchematicPort](#schematicport)
|
|
160
180
|
- [SchematicRect](#schematicrect)
|
|
161
181
|
- [SchematicSheet](#schematicsheet)
|
|
182
|
+
- [SchematicSymbol](#schematicsymbol)
|
|
162
183
|
- [SchematicTable](#schematictable)
|
|
163
184
|
- [SchematicTableCell](#schematictablecell)
|
|
164
185
|
- [SchematicText](#schematictext)
|
|
165
186
|
- [SchematicTrace](#schematictrace)
|
|
166
187
|
- [SchematicVoltageProbe](#schematicvoltageprobe)
|
|
167
188
|
- [Simulation Elements](#simulation-elements)
|
|
189
|
+
- [SimulationCurrentSource](#simulationcurrentsource)
|
|
168
190
|
- [SimulationExperiment](#simulationexperiment)
|
|
191
|
+
- [SimulationOpAmp](#simulationopamp)
|
|
169
192
|
- [SimulationSwitch](#simulationswitch)
|
|
170
193
|
- [SimulationTransientVoltageGraph](#simulationtransientvoltagegraph)
|
|
171
194
|
- [SimulationUnknownExperimentError](#simulationunknownexperimenterror)
|
|
@@ -247,6 +270,22 @@ There are 3 main element prefixes:
|
|
|
247
270
|
|
|
248
271
|
## Source Components
|
|
249
272
|
|
|
273
|
+
### SourceAmbiguousPortReference
|
|
274
|
+
|
|
275
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_ambiguous_port_reference.ts)
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
/** Error emitted when a port hint matches multiple non-overlapping pads,
|
|
279
|
+
* making the port reference ambiguous (e.g. multiple pads all named "SH" */
|
|
280
|
+
interface SourceAmbiguousPortReference extends BaseCircuitJsonError {
|
|
281
|
+
type: "source_ambiguous_port_reference"
|
|
282
|
+
source_ambiguous_port_reference_id: string
|
|
283
|
+
error_type: "source_ambiguous_port_reference"
|
|
284
|
+
source_port_id?: string
|
|
285
|
+
source_component_id?: string
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
250
289
|
### SourceBoard
|
|
251
290
|
|
|
252
291
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_board.ts)
|
|
@@ -276,6 +315,7 @@ interface SourceComponentBase {
|
|
|
276
315
|
manufacturer_part_number?: string
|
|
277
316
|
supplier_part_numbers?: Partial<Record<SupplierName, string[]>>
|
|
278
317
|
display_value?: string
|
|
318
|
+
display_name?: string
|
|
279
319
|
are_pins_interchangeable?: boolean
|
|
280
320
|
internally_connected_source_port_ids?: string[][]
|
|
281
321
|
source_group_id?: string
|
|
@@ -297,6 +337,42 @@ interface SourceComponentInternalConnection {
|
|
|
297
337
|
}
|
|
298
338
|
```
|
|
299
339
|
|
|
340
|
+
### SourceComponentMisconfiguredError
|
|
341
|
+
|
|
342
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_component_misconfigured_error.ts)
|
|
343
|
+
|
|
344
|
+
Error emitted when one or more source components have an invalid or conflicting configuration
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
/** Error emitted when one or more source components have an invalid or conflicting configuration */
|
|
348
|
+
interface SourceComponentMisconfiguredError extends BaseCircuitJsonError {
|
|
349
|
+
type: "source_component_misconfigured_error"
|
|
350
|
+
source_component_misconfigured_error_id: string
|
|
351
|
+
error_type: "source_component_misconfigured_error"
|
|
352
|
+
source_component_ids: string[]
|
|
353
|
+
source_port_ids?: string[]
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### SourceComponentPinsUnderspecifiedWarning
|
|
358
|
+
|
|
359
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_component_pins_underspecified_warning.ts)
|
|
360
|
+
|
|
361
|
+
Warning emitted when all ports on a source component are underspecified
|
|
362
|
+
|
|
363
|
+
```typescript
|
|
364
|
+
/** Warning emitted when all ports on a source component are underspecified */
|
|
365
|
+
interface SourceComponentPinsUnderspecifiedWarning {
|
|
366
|
+
type: "source_component_pins_underspecified_warning"
|
|
367
|
+
source_component_pins_underspecified_warning_id: string
|
|
368
|
+
warning_type: "source_component_pins_underspecified_warning"
|
|
369
|
+
message: string
|
|
370
|
+
source_component_id: string
|
|
371
|
+
source_port_ids: string[]
|
|
372
|
+
subcircuit_id?: string
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
300
376
|
### SourceFailedToCreateComponentError
|
|
301
377
|
|
|
302
378
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_failed_to_create_component_error.ts)
|
|
@@ -304,11 +380,10 @@ interface SourceComponentInternalConnection {
|
|
|
304
380
|
```typescript
|
|
305
381
|
/** Error emitted when a component fails to be constructed.
|
|
306
382
|
* Contains details about the failure and prevents the component from being rendered. */
|
|
307
|
-
interface SourceFailedToCreateComponentError {
|
|
383
|
+
interface SourceFailedToCreateComponentError extends BaseCircuitJsonError {
|
|
308
384
|
type: "source_failed_to_create_component_error"
|
|
309
385
|
source_failed_to_create_component_error_id: string
|
|
310
386
|
error_type: "source_failed_to_create_component_error"
|
|
311
|
-
message: string
|
|
312
387
|
component_name?: string
|
|
313
388
|
subcircuit_id?: string
|
|
314
389
|
parent_source_component_id?: string
|
|
@@ -341,6 +416,22 @@ interface SourceGroup {
|
|
|
341
416
|
}
|
|
342
417
|
```
|
|
343
418
|
|
|
419
|
+
### SourceI2cMisconfiguredError
|
|
420
|
+
|
|
421
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_i2c_misconfigured_error.ts)
|
|
422
|
+
|
|
423
|
+
Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net
|
|
424
|
+
|
|
425
|
+
```typescript
|
|
426
|
+
/** Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net */
|
|
427
|
+
interface SourceI2cMisconfiguredError extends BaseCircuitJsonError {
|
|
428
|
+
type: "source_i2c_misconfigured_error"
|
|
429
|
+
source_i2c_misconfigured_error_id: string
|
|
430
|
+
error_type: "source_i2c_misconfigured_error"
|
|
431
|
+
source_port_ids: string[]
|
|
432
|
+
}
|
|
433
|
+
```
|
|
434
|
+
|
|
344
435
|
### SourceInterconnect
|
|
345
436
|
|
|
346
437
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_interconnect.ts)
|
|
@@ -354,6 +445,26 @@ interface SourceInterconnect extends SourceComponentBase {
|
|
|
354
445
|
}
|
|
355
446
|
```
|
|
356
447
|
|
|
448
|
+
### SourceInvalidComponentPropertyError
|
|
449
|
+
|
|
450
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_invalid_component_property_error.ts)
|
|
451
|
+
|
|
452
|
+
The source component property is invalid
|
|
453
|
+
|
|
454
|
+
```typescript
|
|
455
|
+
/** The source component property is invalid */
|
|
456
|
+
interface SourceInvalidComponentPropertyError extends BaseCircuitJsonError {
|
|
457
|
+
type: "source_invalid_component_property_error"
|
|
458
|
+
source_invalid_component_property_error_id: string
|
|
459
|
+
source_component_id: string
|
|
460
|
+
property_name: string
|
|
461
|
+
property_value?: unknown
|
|
462
|
+
expected_format?: string
|
|
463
|
+
subcircuit_id?: string
|
|
464
|
+
error_type: "source_invalid_component_property_error"
|
|
465
|
+
}
|
|
466
|
+
```
|
|
467
|
+
|
|
357
468
|
### SourceManuallyPlacedVia
|
|
358
469
|
|
|
359
470
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_manually_placed_via.ts)
|
|
@@ -372,6 +483,25 @@ interface SourceManuallyPlacedVia {
|
|
|
372
483
|
}
|
|
373
484
|
```
|
|
374
485
|
|
|
486
|
+
### SourceMissingManufacturerPartNumberWarning
|
|
487
|
+
|
|
488
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_missing_manufacturer_part_number_warning.ts)
|
|
489
|
+
|
|
490
|
+
Warning emitted when a standard connector is missing manufacturer part number
|
|
491
|
+
|
|
492
|
+
```typescript
|
|
493
|
+
/** Warning emitted when a standard connector is missing manufacturer part number */
|
|
494
|
+
interface SourceMissingManufacturerPartNumberWarning {
|
|
495
|
+
type: "source_missing_manufacturer_part_number_warning"
|
|
496
|
+
source_missing_manufacturer_part_number_warning_id: string
|
|
497
|
+
warning_type: "source_missing_manufacturer_part_number_warning"
|
|
498
|
+
message: string
|
|
499
|
+
source_component_id: string
|
|
500
|
+
standard: string
|
|
501
|
+
subcircuit_id?: string
|
|
502
|
+
}
|
|
503
|
+
```
|
|
504
|
+
|
|
375
505
|
### SourceMissingPropertyError
|
|
376
506
|
|
|
377
507
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_missing_property_error.ts)
|
|
@@ -380,14 +510,13 @@ The source code is missing a property
|
|
|
380
510
|
|
|
381
511
|
```typescript
|
|
382
512
|
/** The source code is missing a property */
|
|
383
|
-
interface SourceMissingPropertyError {
|
|
513
|
+
interface SourceMissingPropertyError extends BaseCircuitJsonError {
|
|
384
514
|
type: "source_missing_property_error"
|
|
385
515
|
source_missing_property_error_id: string
|
|
386
516
|
source_component_id: string
|
|
387
517
|
property_name: string
|
|
388
518
|
subcircuit_id?: string
|
|
389
519
|
error_type: "source_missing_property_error"
|
|
390
|
-
message: string
|
|
391
520
|
}
|
|
392
521
|
```
|
|
393
522
|
|
|
@@ -412,6 +541,44 @@ interface SourceNet {
|
|
|
412
541
|
}
|
|
413
542
|
```
|
|
414
543
|
|
|
544
|
+
### SourceNoGroundPinDefinedWarning
|
|
545
|
+
|
|
546
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_no_ground_pin_defined_warning.ts)
|
|
547
|
+
|
|
548
|
+
Warning emitted when a chip has no source ports marked as ground pins
|
|
549
|
+
|
|
550
|
+
```typescript
|
|
551
|
+
/** Warning emitted when a chip has no source ports marked as ground pins */
|
|
552
|
+
interface SourceNoGroundPinDefinedWarning {
|
|
553
|
+
type: "source_no_ground_pin_defined_warning"
|
|
554
|
+
source_no_ground_pin_defined_warning_id: string
|
|
555
|
+
warning_type: "source_no_ground_pin_defined_warning"
|
|
556
|
+
message: string
|
|
557
|
+
source_component_id: string
|
|
558
|
+
source_port_ids: string[]
|
|
559
|
+
subcircuit_id?: string
|
|
560
|
+
}
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
### SourceNoPowerPinDefinedWarning
|
|
564
|
+
|
|
565
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_no_power_pin_defined_warning.ts)
|
|
566
|
+
|
|
567
|
+
Warning emitted when a chip has no source ports with requires_power=true
|
|
568
|
+
|
|
569
|
+
```typescript
|
|
570
|
+
/** Warning emitted when a chip has no source ports with requires_power=true */
|
|
571
|
+
interface SourceNoPowerPinDefinedWarning {
|
|
572
|
+
type: "source_no_power_pin_defined_warning"
|
|
573
|
+
source_no_power_pin_defined_warning_id: string
|
|
574
|
+
warning_type: "source_no_power_pin_defined_warning"
|
|
575
|
+
message: string
|
|
576
|
+
source_component_id: string
|
|
577
|
+
source_port_ids: string[]
|
|
578
|
+
subcircuit_id?: string
|
|
579
|
+
}
|
|
580
|
+
```
|
|
581
|
+
|
|
415
582
|
### SourcePcbGroundPlane
|
|
416
583
|
|
|
417
584
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_pcb_ground_plane.ts)
|
|
@@ -429,6 +596,52 @@ interface SourcePcbGroundPlane {
|
|
|
429
596
|
}
|
|
430
597
|
```
|
|
431
598
|
|
|
599
|
+
### SourcePinAttributes
|
|
600
|
+
|
|
601
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/properties/source_pin_attributes.ts)
|
|
602
|
+
|
|
603
|
+
```typescript
|
|
604
|
+
interface SourcePinAttributes {
|
|
605
|
+
must_be_connected?: boolean
|
|
606
|
+
provides_power?: boolean
|
|
607
|
+
requires_power?: boolean
|
|
608
|
+
provides_ground?: boolean
|
|
609
|
+
requires_ground?: boolean
|
|
610
|
+
provides_voltage?: string | number
|
|
611
|
+
requires_voltage?: string | number
|
|
612
|
+
do_not_connect?: boolean
|
|
613
|
+
include_in_board_pinout?: boolean
|
|
614
|
+
can_use_internal_pullup?: boolean
|
|
615
|
+
is_using_internal_pullup?: boolean
|
|
616
|
+
needs_external_pullup?: boolean
|
|
617
|
+
can_use_internal_pulldown?: boolean
|
|
618
|
+
is_using_internal_pulldown?: boolean
|
|
619
|
+
needs_external_pulldown?: boolean
|
|
620
|
+
can_use_open_drain?: boolean
|
|
621
|
+
is_using_open_drain?: boolean
|
|
622
|
+
can_use_push_pull?: boolean
|
|
623
|
+
is_using_push_pull?: boolean
|
|
624
|
+
should_have_decoupling_capacitor?: boolean
|
|
625
|
+
recommended_decoupling_capacitor_capacitance?: string | number
|
|
626
|
+
is_configured_for_i2c_sda?: boolean
|
|
627
|
+
is_configured_for_i2c_scl?: boolean
|
|
628
|
+
is_configured_for_spi_mosi?: boolean
|
|
629
|
+
is_configured_for_spi_miso?: boolean
|
|
630
|
+
is_configured_for_spi_sck?: boolean
|
|
631
|
+
is_configured_for_spi_cs?: boolean
|
|
632
|
+
is_configured_for_uart_tx?: boolean
|
|
633
|
+
is_configured_for_uart_rx?: boolean
|
|
634
|
+
supports_i2c_sda?: boolean
|
|
635
|
+
supports_i2c_scl?: boolean
|
|
636
|
+
supports_spi_mosi?: boolean
|
|
637
|
+
supports_spi_miso?: boolean
|
|
638
|
+
supports_spi_sck?: boolean
|
|
639
|
+
supports_spi_cs?: boolean
|
|
640
|
+
supports_uart_tx?: boolean
|
|
641
|
+
supports_uart_rx?: boolean
|
|
642
|
+
}
|
|
643
|
+
```
|
|
644
|
+
|
|
432
645
|
### SourcePinMissingTraceWarning
|
|
433
646
|
|
|
434
647
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_pin_missing_trace_warning.ts)
|
|
@@ -456,11 +669,10 @@ Error emitted when a pin with mustBeConnected attribute is not connected to any
|
|
|
456
669
|
|
|
457
670
|
```typescript
|
|
458
671
|
/** Error emitted when a pin with mustBeConnected attribute is not connected to any trace */
|
|
459
|
-
interface SourcePinMustBeConnectedError {
|
|
672
|
+
interface SourcePinMustBeConnectedError extends BaseCircuitJsonError {
|
|
460
673
|
type: "source_pin_must_be_connected_error"
|
|
461
674
|
source_pin_must_be_connected_error_id: string
|
|
462
675
|
error_type: "source_pin_must_be_connected_error"
|
|
463
|
-
message: string
|
|
464
676
|
source_component_id: string
|
|
465
677
|
source_port_id: string
|
|
466
678
|
subcircuit_id?: string
|
|
@@ -475,7 +687,7 @@ Defines a source port that can be connected to other components
|
|
|
475
687
|
|
|
476
688
|
```typescript
|
|
477
689
|
/** Defines a source port that can be connected to other components */
|
|
478
|
-
interface SourcePort {
|
|
690
|
+
interface SourcePort extends SourcePinAttributes {
|
|
479
691
|
type: "source_port"
|
|
480
692
|
pin_number?: number
|
|
481
693
|
port_hints?: string[]
|
|
@@ -486,43 +698,6 @@ interface SourcePort {
|
|
|
486
698
|
most_frequently_referenced_by_name?: string
|
|
487
699
|
subcircuit_id?: string
|
|
488
700
|
subcircuit_connectivity_map_key?: string
|
|
489
|
-
must_be_connected?: boolean
|
|
490
|
-
provides_power?: boolean
|
|
491
|
-
requires_power?: boolean
|
|
492
|
-
provides_ground?: boolean
|
|
493
|
-
requires_ground?: boolean
|
|
494
|
-
provides_voltage?: string | number
|
|
495
|
-
requires_voltage?: string | number
|
|
496
|
-
do_not_connect?: boolean
|
|
497
|
-
include_in_board_pinout?: boolean
|
|
498
|
-
can_use_internal_pullup?: boolean
|
|
499
|
-
is_using_internal_pullup?: boolean
|
|
500
|
-
needs_external_pullup?: boolean
|
|
501
|
-
can_use_internal_pulldown?: boolean
|
|
502
|
-
is_using_internal_pulldown?: boolean
|
|
503
|
-
needs_external_pulldown?: boolean
|
|
504
|
-
can_use_open_drain?: boolean
|
|
505
|
-
is_using_open_drain?: boolean
|
|
506
|
-
can_use_push_pull?: boolean
|
|
507
|
-
is_using_push_pull?: boolean
|
|
508
|
-
should_have_decoupling_capacitor?: boolean
|
|
509
|
-
recommended_decoupling_capacitor_capacitance?: string | number
|
|
510
|
-
is_configured_for_i2c_sda?: boolean
|
|
511
|
-
is_configured_for_i2c_scl?: boolean
|
|
512
|
-
is_configured_for_spi_mosi?: boolean
|
|
513
|
-
is_configured_for_spi_miso?: boolean
|
|
514
|
-
is_configured_for_spi_sck?: boolean
|
|
515
|
-
is_configured_for_spi_cs?: boolean
|
|
516
|
-
is_configured_for_uart_tx?: boolean
|
|
517
|
-
is_configured_for_uart_rx?: boolean
|
|
518
|
-
supports_i2c_sda?: boolean
|
|
519
|
-
supports_i2c_scl?: boolean
|
|
520
|
-
supports_spi_mosi?: boolean
|
|
521
|
-
supports_spi_miso?: boolean
|
|
522
|
-
supports_spi_sck?: boolean
|
|
523
|
-
supports_spi_cs?: boolean
|
|
524
|
-
supports_uart_tx?: boolean
|
|
525
|
-
supports_uart_rx?: boolean
|
|
526
701
|
}
|
|
527
702
|
```
|
|
528
703
|
|
|
@@ -603,6 +778,20 @@ interface SourceSimpleChip extends SourceComponentBase {
|
|
|
603
778
|
}
|
|
604
779
|
```
|
|
605
780
|
|
|
781
|
+
### SourceSimpleConnector
|
|
782
|
+
|
|
783
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_connector.ts)
|
|
784
|
+
|
|
785
|
+
Defines a simple connector component
|
|
786
|
+
|
|
787
|
+
```typescript
|
|
788
|
+
/** Defines a simple connector component */
|
|
789
|
+
interface SourceSimpleConnector extends SourceComponentBase {
|
|
790
|
+
ftype: "simple_connector"
|
|
791
|
+
standard?: "usb_c" | "m2"
|
|
792
|
+
}
|
|
793
|
+
```
|
|
794
|
+
|
|
606
795
|
### SourceSimpleCrystal
|
|
607
796
|
|
|
608
797
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_crystal.ts)
|
|
@@ -615,6 +804,26 @@ interface SourceSimpleCrystal extends SourceComponentBase {
|
|
|
615
804
|
ftype: "simple_crystal"
|
|
616
805
|
frequency: number
|
|
617
806
|
load_capacitance?: number
|
|
807
|
+
pin_variant?: "two_pin" | "four_pin"
|
|
808
|
+
}
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
### SourceSimpleCurrentSource
|
|
812
|
+
|
|
813
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_current_source.ts)
|
|
814
|
+
|
|
815
|
+
Defines a simple current source component
|
|
816
|
+
|
|
817
|
+
```typescript
|
|
818
|
+
/** Defines a simple current source component */
|
|
819
|
+
interface SourceSimpleCurrentSource extends SourceComponentBase {
|
|
820
|
+
ftype: "simple_current_source"
|
|
821
|
+
current: number
|
|
822
|
+
frequency?: number
|
|
823
|
+
peak_to_peak_current?: number
|
|
824
|
+
wave_shape: "sine" | "square" | "triangle" | "sawtooth" | "dc"
|
|
825
|
+
phase?: number
|
|
826
|
+
duty_cycle?: number
|
|
618
827
|
}
|
|
619
828
|
```
|
|
620
829
|
|
|
@@ -715,6 +924,19 @@ interface SourceSimpleMosfet extends SourceComponentBase {
|
|
|
715
924
|
}
|
|
716
925
|
```
|
|
717
926
|
|
|
927
|
+
### SourceSimpleOpAmp
|
|
928
|
+
|
|
929
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_op_amp.ts)
|
|
930
|
+
|
|
931
|
+
Defines a simple op-amp component
|
|
932
|
+
|
|
933
|
+
```typescript
|
|
934
|
+
/** Defines a simple op-amp component */
|
|
935
|
+
interface SourceSimpleOpAmp extends SourceComponentBase {
|
|
936
|
+
ftype: "simple_op_amp"
|
|
937
|
+
}
|
|
938
|
+
```
|
|
939
|
+
|
|
718
940
|
### SourceSimplePinHeader
|
|
719
941
|
|
|
720
942
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_pin_header.ts)
|
|
@@ -748,6 +970,7 @@ interface SourceSimplePinout extends SourceComponentBase {
|
|
|
748
970
|
interface SourceSimplePotentiometer extends SourceComponentBase {
|
|
749
971
|
ftype: "simple_potentiometer"
|
|
750
972
|
max_resistance: number
|
|
973
|
+
display_max_resistance?: string
|
|
751
974
|
}
|
|
752
975
|
```
|
|
753
976
|
|
|
@@ -868,6 +1091,25 @@ interface SourceSimpleVoltageProbe extends SourceComponentBase {
|
|
|
868
1091
|
}
|
|
869
1092
|
```
|
|
870
1093
|
|
|
1094
|
+
### SourceSimpleVoltageSource
|
|
1095
|
+
|
|
1096
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_simple_voltage_source.ts)
|
|
1097
|
+
|
|
1098
|
+
Defines a simple voltage source component
|
|
1099
|
+
|
|
1100
|
+
```typescript
|
|
1101
|
+
/** Defines a simple voltage source component */
|
|
1102
|
+
interface SourceSimpleVoltageSource extends SourceComponentBase {
|
|
1103
|
+
ftype: "simple_voltage_source"
|
|
1104
|
+
voltage: number
|
|
1105
|
+
frequency?: number
|
|
1106
|
+
peak_to_peak_voltage?: number
|
|
1107
|
+
wave_shape?: "sinewave" | "square" | "triangle" | "sawtooth"
|
|
1108
|
+
phase?: number
|
|
1109
|
+
duty_cycle?: number
|
|
1110
|
+
}
|
|
1111
|
+
```
|
|
1112
|
+
|
|
871
1113
|
### SourceTrace
|
|
872
1114
|
|
|
873
1115
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/source/source_trace.ts)
|
|
@@ -894,11 +1136,10 @@ Occurs when a source trace selector does not match any ports
|
|
|
894
1136
|
|
|
895
1137
|
```typescript
|
|
896
1138
|
/** Occurs when a source trace selector does not match any ports */
|
|
897
|
-
interface SourceTraceNotConnectedError {
|
|
1139
|
+
interface SourceTraceNotConnectedError extends BaseCircuitJsonError {
|
|
898
1140
|
type: "source_trace_not_connected_error"
|
|
899
1141
|
source_trace_not_connected_error_id: string
|
|
900
1142
|
error_type: "source_trace_not_connected_error"
|
|
901
|
-
message: string
|
|
902
1143
|
subcircuit_id?: string
|
|
903
1144
|
source_group_id?: string
|
|
904
1145
|
source_trace_id?: string
|
|
@@ -915,11 +1156,10 @@ interface SourceTraceNotConnectedError {
|
|
|
915
1156
|
/** Error emitted when an unexpected error occurs while finding a part.
|
|
916
1157
|
* This includes cases where the API returns HTML instead of JSON,
|
|
917
1158
|
* network failures, or other unexpected responses. */
|
|
918
|
-
interface UnknownErrorFindingPart {
|
|
1159
|
+
interface UnknownErrorFindingPart extends BaseCircuitJsonError {
|
|
919
1160
|
type: "unknown_error_finding_part"
|
|
920
1161
|
unknown_error_finding_part_id: string
|
|
921
1162
|
error_type: "unknown_error_finding_part"
|
|
922
|
-
message: string
|
|
923
1163
|
source_component_id?: string
|
|
924
1164
|
subcircuit_id?: string
|
|
925
1165
|
}
|
|
@@ -950,9 +1190,20 @@ interface CadComponent {
|
|
|
950
1190
|
model_glb_url?: string
|
|
951
1191
|
model_step_url?: string
|
|
952
1192
|
model_wrl_url?: string
|
|
1193
|
+
model_asset?: Asset
|
|
953
1194
|
model_unit_to_mm_scale_factor?: number
|
|
1195
|
+
model_board_normal_direction?: CadModelAxisDirection
|
|
1196
|
+
model_origin_position?: Point3
|
|
1197
|
+
model_origin_alignment?:
|
|
1198
|
+
| "unknown"
|
|
1199
|
+
| "center"
|
|
1200
|
+
| "center_of_component_on_board_surface"
|
|
1201
|
+
| "bottom_center_of_component"
|
|
1202
|
+
model_object_fit: "contain_within_bounds" | "fill_bounds"
|
|
954
1203
|
model_jscad?: any
|
|
955
1204
|
show_as_translucent_model?: boolean
|
|
1205
|
+
show_as_bounding_box?: boolean
|
|
1206
|
+
anchor_alignment: CadComponentAnchorAlignment
|
|
956
1207
|
}
|
|
957
1208
|
```
|
|
958
1209
|
|
|
@@ -963,11 +1214,10 @@ interface CadComponent {
|
|
|
963
1214
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_autorouting_error.ts)
|
|
964
1215
|
|
|
965
1216
|
```typescript
|
|
966
|
-
interface PcbAutoroutingErrorInterface {
|
|
1217
|
+
interface PcbAutoroutingErrorInterface extends BaseCircuitJsonError {
|
|
967
1218
|
type: "pcb_autorouting_error"
|
|
968
1219
|
pcb_error_id: string
|
|
969
1220
|
error_type: "pcb_autorouting_error"
|
|
970
|
-
message: string
|
|
971
1221
|
subcircuit_id?: string
|
|
972
1222
|
}
|
|
973
1223
|
```
|
|
@@ -980,12 +1230,14 @@ Defines the board outline of the PCB
|
|
|
980
1230
|
|
|
981
1231
|
```typescript
|
|
982
1232
|
/** Defines the board outline of the PCB */
|
|
983
|
-
interface PcbBoard {
|
|
1233
|
+
interface PcbBoard extends ManufacturingDrcProperties {
|
|
984
1234
|
type: "pcb_board"
|
|
985
1235
|
pcb_board_id: string
|
|
986
1236
|
pcb_panel_id?: string
|
|
1237
|
+
carrier_pcb_board_id?: string
|
|
987
1238
|
is_subcircuit?: boolean
|
|
988
1239
|
subcircuit_id?: string
|
|
1240
|
+
is_mounted_to_carrier_board?: boolean
|
|
989
1241
|
width?: Length
|
|
990
1242
|
height?: Length
|
|
991
1243
|
display_offset_x?: string
|
|
@@ -999,7 +1251,7 @@ interface PcbBoard {
|
|
|
999
1251
|
solder_mask_color?: string
|
|
1000
1252
|
silkscreen_color?: string
|
|
1001
1253
|
anchor_position?: Point
|
|
1002
|
-
anchor_alignment
|
|
1254
|
+
anchor_alignment?: NinePointAnchor
|
|
1003
1255
|
position_mode?: "relative_to_panel_anchor" | "none"
|
|
1004
1256
|
}
|
|
1005
1257
|
```
|
|
@@ -1029,34 +1281,9 @@ interface PcbBreakoutPoint {
|
|
|
1029
1281
|
|
|
1030
1282
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component.ts)
|
|
1031
1283
|
|
|
1032
|
-
Defines a component on the PCB
|
|
1033
|
-
|
|
1034
1284
|
```typescript
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
type: "pcb_component"
|
|
1038
|
-
pcb_component_id: string
|
|
1039
|
-
source_component_id: string
|
|
1040
|
-
subcircuit_id?: string
|
|
1041
|
-
center: Point
|
|
1042
|
-
layer: LayerRef
|
|
1043
|
-
rotation: Rotation
|
|
1044
|
-
display_offset_x?: string
|
|
1045
|
-
display_offset_y?: string
|
|
1046
|
-
width: Length
|
|
1047
|
-
height: Length
|
|
1048
|
-
do_not_place?: boolean
|
|
1049
|
-
pcb_group_id?: string
|
|
1050
|
-
position_mode?:
|
|
1051
|
-
| "packed"
|
|
1052
|
-
| "relative_to_group_anchor"
|
|
1053
|
-
| "relative_to_another_component"
|
|
1054
|
-
| "none"
|
|
1055
|
-
anchor_position?: Point
|
|
1056
|
-
anchor_alignment?: NinePointAnchor
|
|
1057
|
-
positioned_relative_to_pcb_group_id?: string
|
|
1058
|
-
positioned_relative_to_pcb_board_id?: string
|
|
1059
|
-
obstructs_within_bounds: boolean
|
|
1285
|
+
interface PcbComponentMetadata {
|
|
1286
|
+
kicad_footprint?: KicadFootprintMetadata
|
|
1060
1287
|
}
|
|
1061
1288
|
```
|
|
1062
1289
|
|
|
@@ -1068,11 +1295,10 @@ Error emitted when a component is placed on an invalid layer (components can onl
|
|
|
1068
1295
|
|
|
1069
1296
|
```typescript
|
|
1070
1297
|
/** Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers) */
|
|
1071
|
-
interface PcbComponentInvalidLayerError {
|
|
1298
|
+
interface PcbComponentInvalidLayerError extends BaseCircuitJsonError {
|
|
1072
1299
|
type: "pcb_component_invalid_layer_error"
|
|
1073
1300
|
pcb_component_invalid_layer_error_id: string
|
|
1074
1301
|
error_type: "pcb_component_invalid_layer_error"
|
|
1075
|
-
message: string
|
|
1076
1302
|
pcb_component_id?: string
|
|
1077
1303
|
source_component_id: string
|
|
1078
1304
|
layer: LayerRef
|
|
@@ -1080,6 +1306,27 @@ interface PcbComponentInvalidLayerError {
|
|
|
1080
1306
|
}
|
|
1081
1307
|
```
|
|
1082
1308
|
|
|
1309
|
+
### PcbComponentNotOnBoardEdgeError
|
|
1310
|
+
|
|
1311
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component_not_on_board_edge_error.ts)
|
|
1312
|
+
|
|
1313
|
+
Error emitted when a component that must be placed on the board edge is centered away from the edge
|
|
1314
|
+
|
|
1315
|
+
```typescript
|
|
1316
|
+
/** Error emitted when a component that must be placed on the board edge is centered away from the edge */
|
|
1317
|
+
interface PcbComponentNotOnBoardEdgeError extends BaseCircuitJsonError {
|
|
1318
|
+
type: "pcb_component_not_on_board_edge_error"
|
|
1319
|
+
pcb_component_not_on_board_edge_error_id: string
|
|
1320
|
+
error_type: "pcb_component_not_on_board_edge_error"
|
|
1321
|
+
pcb_component_id: string
|
|
1322
|
+
pcb_board_id: string
|
|
1323
|
+
component_center: Point
|
|
1324
|
+
pad_to_nearest_board_edge_distance: number
|
|
1325
|
+
source_component_id?: string
|
|
1326
|
+
subcircuit_id?: string
|
|
1327
|
+
}
|
|
1328
|
+
```
|
|
1329
|
+
|
|
1083
1330
|
### PcbComponentOutsideBoardError
|
|
1084
1331
|
|
|
1085
1332
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component_outside_board_error.ts)
|
|
@@ -1088,11 +1335,10 @@ Error emitted when a PCB component is placed outside the board boundaries
|
|
|
1088
1335
|
|
|
1089
1336
|
```typescript
|
|
1090
1337
|
/** Error emitted when a PCB component is placed outside the board boundaries */
|
|
1091
|
-
interface PcbComponentOutsideBoardError {
|
|
1338
|
+
interface PcbComponentOutsideBoardError extends BaseCircuitJsonError {
|
|
1092
1339
|
type: "pcb_component_outside_board_error"
|
|
1093
1340
|
pcb_component_outside_board_error_id: string
|
|
1094
1341
|
error_type: "pcb_component_outside_board_error"
|
|
1095
|
-
message: string
|
|
1096
1342
|
pcb_component_id: string
|
|
1097
1343
|
pcb_board_id: string
|
|
1098
1344
|
component_center: Point
|
|
@@ -1107,6 +1353,28 @@ interface PcbComponentOutsideBoardError {
|
|
|
1107
1353
|
}
|
|
1108
1354
|
```
|
|
1109
1355
|
|
|
1356
|
+
### PcbConnectorNotInAccessibleOrientationWarning
|
|
1357
|
+
|
|
1358
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts)
|
|
1359
|
+
|
|
1360
|
+
Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented
|
|
1361
|
+
|
|
1362
|
+
```typescript
|
|
1363
|
+
/** Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented */
|
|
1364
|
+
interface PcbConnectorNotInAccessibleOrientationWarning {
|
|
1365
|
+
type: "pcb_connector_not_in_accessible_orientation_warning"
|
|
1366
|
+
pcb_connector_not_in_accessible_orientation_warning_id: string
|
|
1367
|
+
warning_type: "pcb_connector_not_in_accessible_orientation_warning"
|
|
1368
|
+
message: string
|
|
1369
|
+
pcb_component_id: string
|
|
1370
|
+
source_component_id?: string
|
|
1371
|
+
pcb_board_id?: string
|
|
1372
|
+
facing_direction: ConnectorOrientationDirection
|
|
1373
|
+
recommended_facing_direction: ConnectorOrientationDirection
|
|
1374
|
+
subcircuit_id?: string
|
|
1375
|
+
}
|
|
1376
|
+
```
|
|
1377
|
+
|
|
1110
1378
|
### PcbCopperPour
|
|
1111
1379
|
|
|
1112
1380
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_copper_pour.ts)
|
|
@@ -1163,6 +1431,27 @@ interface PcbCopperText {
|
|
|
1163
1431
|
}
|
|
1164
1432
|
```
|
|
1165
1433
|
|
|
1434
|
+
### PcbCourtyardCircle
|
|
1435
|
+
|
|
1436
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_courtyard_circle.ts)
|
|
1437
|
+
|
|
1438
|
+
Defines a courtyard circle on the PCB
|
|
1439
|
+
|
|
1440
|
+
```typescript
|
|
1441
|
+
/** Defines a courtyard circle on the PCB */
|
|
1442
|
+
interface PcbCourtyardCircle {
|
|
1443
|
+
type: "pcb_courtyard_circle"
|
|
1444
|
+
pcb_courtyard_circle_id: string
|
|
1445
|
+
pcb_component_id: string
|
|
1446
|
+
pcb_group_id?: string
|
|
1447
|
+
subcircuit_id?: string
|
|
1448
|
+
center: Point
|
|
1449
|
+
radius: Length
|
|
1450
|
+
layer: VisibleLayer
|
|
1451
|
+
color?: string
|
|
1452
|
+
}
|
|
1453
|
+
```
|
|
1454
|
+
|
|
1166
1455
|
### PcbCourtyardOutline
|
|
1167
1456
|
|
|
1168
1457
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_courtyard_outline.ts)
|
|
@@ -1179,10 +1468,22 @@ interface PcbCourtyardOutline {
|
|
|
1179
1468
|
subcircuit_id?: string
|
|
1180
1469
|
layer: VisibleLayer
|
|
1181
1470
|
outline: Point[]
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1471
|
+
}
|
|
1472
|
+
```
|
|
1473
|
+
|
|
1474
|
+
### PcbCourtyardOverlapError
|
|
1475
|
+
|
|
1476
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_courtyard_overlap_error.ts)
|
|
1477
|
+
|
|
1478
|
+
Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another
|
|
1479
|
+
|
|
1480
|
+
```typescript
|
|
1481
|
+
/** Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another */
|
|
1482
|
+
interface PcbCourtyardOverlapError extends BaseCircuitJsonError {
|
|
1483
|
+
type: "pcb_courtyard_overlap_error"
|
|
1484
|
+
pcb_error_id: string
|
|
1485
|
+
error_type: "pcb_courtyard_overlap_error"
|
|
1486
|
+
pcb_component_ids: [string, string]
|
|
1186
1487
|
}
|
|
1187
1488
|
```
|
|
1188
1489
|
|
|
@@ -1224,6 +1525,7 @@ interface PcbCourtyardRect {
|
|
|
1224
1525
|
width: Length
|
|
1225
1526
|
height: Length
|
|
1226
1527
|
layer: VisibleLayer
|
|
1528
|
+
ccw_rotation?: Rotation
|
|
1227
1529
|
color?: string
|
|
1228
1530
|
}
|
|
1229
1531
|
```
|
|
@@ -1348,6 +1650,7 @@ interface PcbFabricationNoteText {
|
|
|
1348
1650
|
font_size: Length
|
|
1349
1651
|
pcb_component_id: string
|
|
1350
1652
|
text: string
|
|
1653
|
+
ccw_rotation?: number
|
|
1351
1654
|
layer: VisibleLayer
|
|
1352
1655
|
anchor_position: Point
|
|
1353
1656
|
anchor_alignment:
|
|
@@ -1368,11 +1671,10 @@ Error emitted when a pcb footprint overlaps with another element
|
|
|
1368
1671
|
|
|
1369
1672
|
```typescript
|
|
1370
1673
|
/** Error emitted when a pcb footprint overlaps with another element */
|
|
1371
|
-
interface PcbFootprintOverlapError {
|
|
1674
|
+
interface PcbFootprintOverlapError extends BaseCircuitJsonError {
|
|
1372
1675
|
type: "pcb_footprint_overlap_error"
|
|
1373
1676
|
pcb_error_id: string
|
|
1374
1677
|
error_type: "pcb_footprint_overlap_error"
|
|
1375
|
-
message: string
|
|
1376
1678
|
pcb_smtpad_ids?: string[]
|
|
1377
1679
|
pcb_plated_hole_ids?: string[]
|
|
1378
1680
|
pcb_hole_ids?: string[]
|
|
@@ -1505,14 +1807,13 @@ Defines a placement error on the PCB
|
|
|
1505
1807
|
|
|
1506
1808
|
```typescript
|
|
1507
1809
|
/** Defines a placement error on the PCB */
|
|
1508
|
-
interface PcbMissingFootprintError {
|
|
1810
|
+
interface PcbMissingFootprintError extends BaseCircuitJsonError {
|
|
1509
1811
|
type: "pcb_missing_footprint_error"
|
|
1510
1812
|
pcb_missing_footprint_error_id: string
|
|
1511
1813
|
pcb_group_id?: string
|
|
1512
1814
|
subcircuit_id?: string
|
|
1513
1815
|
error_type: "pcb_missing_footprint_error"
|
|
1514
1816
|
source_component_id: string
|
|
1515
|
-
message: string
|
|
1516
1817
|
}
|
|
1517
1818
|
```
|
|
1518
1819
|
|
|
@@ -1558,6 +1859,7 @@ interface PcbNoteDimension {
|
|
|
1558
1859
|
}
|
|
1559
1860
|
font: "tscircuit2024"
|
|
1560
1861
|
font_size: Length
|
|
1862
|
+
layer: VisibleLayer
|
|
1561
1863
|
color?: string
|
|
1562
1864
|
arrow_size: Length
|
|
1563
1865
|
}
|
|
@@ -1583,6 +1885,7 @@ interface PcbNoteLine {
|
|
|
1583
1885
|
y1: Distance
|
|
1584
1886
|
x2: Distance
|
|
1585
1887
|
y2: Distance
|
|
1888
|
+
layer: VisibleLayer
|
|
1586
1889
|
stroke_width: Distance
|
|
1587
1890
|
color?: string
|
|
1588
1891
|
is_dashed?: boolean
|
|
@@ -1606,6 +1909,7 @@ interface PcbNotePath {
|
|
|
1606
1909
|
name?: string
|
|
1607
1910
|
text?: string
|
|
1608
1911
|
route: Point[]
|
|
1912
|
+
layer: VisibleLayer
|
|
1609
1913
|
stroke_width: Length
|
|
1610
1914
|
color?: string
|
|
1611
1915
|
}
|
|
@@ -1630,6 +1934,7 @@ interface PcbNoteRect {
|
|
|
1630
1934
|
center: Point
|
|
1631
1935
|
width: Length
|
|
1632
1936
|
height: Length
|
|
1937
|
+
layer: VisibleLayer
|
|
1633
1938
|
stroke_width: Length
|
|
1634
1939
|
corner_radius?: Length
|
|
1635
1940
|
is_filled?: boolean
|
|
@@ -1665,11 +1970,58 @@ interface PcbNoteText {
|
|
|
1665
1970
|
| "bottom_left"
|
|
1666
1971
|
| "bottom_right"
|
|
1667
1972
|
layer: VisibleLayer
|
|
1668
|
-
|
|
1973
|
+
is_mirrored_from_top_view?: boolean
|
|
1669
1974
|
color?: string
|
|
1670
1975
|
}
|
|
1671
1976
|
```
|
|
1672
1977
|
|
|
1978
|
+
### PcbPadPadClearanceError
|
|
1979
|
+
|
|
1980
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_pad_pad_clearance_error.ts)
|
|
1981
|
+
|
|
1982
|
+
Error emitted when pads are closer than the allowed clearance
|
|
1983
|
+
|
|
1984
|
+
```typescript
|
|
1985
|
+
/** Error emitted when pads are closer than the allowed clearance */
|
|
1986
|
+
interface PcbPadPadClearanceError extends BaseCircuitJsonError {
|
|
1987
|
+
type: "pcb_pad_pad_clearance_error"
|
|
1988
|
+
pcb_pad_pad_clearance_error_id: string
|
|
1989
|
+
error_type: "pcb_pad_pad_clearance_error"
|
|
1990
|
+
pcb_pad_ids: string[]
|
|
1991
|
+
minimum_clearance?: Distance
|
|
1992
|
+
actual_clearance?: Distance
|
|
1993
|
+
center?: {
|
|
1994
|
+
x?: number
|
|
1995
|
+
y?: number
|
|
1996
|
+
}
|
|
1997
|
+
subcircuit_id?: string
|
|
1998
|
+
}
|
|
1999
|
+
```
|
|
2000
|
+
|
|
2001
|
+
### PcbPadTraceClearanceError
|
|
2002
|
+
|
|
2003
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_pad_trace_clearance_error.ts)
|
|
2004
|
+
|
|
2005
|
+
Error emitted when a pad and trace are closer than allowed clearance
|
|
2006
|
+
|
|
2007
|
+
```typescript
|
|
2008
|
+
/** Error emitted when a pad and trace are closer than allowed clearance */
|
|
2009
|
+
interface PcbPadTraceClearanceError extends BaseCircuitJsonError {
|
|
2010
|
+
type: "pcb_pad_trace_clearance_error"
|
|
2011
|
+
pcb_pad_trace_clearance_error_id: string
|
|
2012
|
+
error_type: "pcb_pad_trace_clearance_error"
|
|
2013
|
+
pcb_pad_id: string
|
|
2014
|
+
pcb_trace_id: string
|
|
2015
|
+
minimum_clearance?: Distance
|
|
2016
|
+
actual_clearance?: Distance
|
|
2017
|
+
center?: {
|
|
2018
|
+
x?: number
|
|
2019
|
+
y?: number
|
|
2020
|
+
}
|
|
2021
|
+
subcircuit_id?: string
|
|
2022
|
+
}
|
|
2023
|
+
```
|
|
2024
|
+
|
|
1673
2025
|
### PcbPanel
|
|
1674
2026
|
|
|
1675
2027
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_panel.ts)
|
|
@@ -1689,6 +2041,24 @@ interface PcbPanel {
|
|
|
1689
2041
|
}
|
|
1690
2042
|
```
|
|
1691
2043
|
|
|
2044
|
+
### PcbPanelizationPlacementError
|
|
2045
|
+
|
|
2046
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_panelization_placement_error.ts)
|
|
2047
|
+
|
|
2048
|
+
Defines a panelization placement error on the PCB
|
|
2049
|
+
|
|
2050
|
+
```typescript
|
|
2051
|
+
/** Defines a panelization placement error on the PCB */
|
|
2052
|
+
interface PcbPanelizationPlacementError extends BaseCircuitJsonError {
|
|
2053
|
+
type: "pcb_panelization_placement_error"
|
|
2054
|
+
pcb_panelization_placement_error_id: string
|
|
2055
|
+
error_type: "pcb_panelization_placement_error"
|
|
2056
|
+
pcb_panel_id?: string
|
|
2057
|
+
pcb_board_id?: string
|
|
2058
|
+
subcircuit_id?: string
|
|
2059
|
+
}
|
|
2060
|
+
```
|
|
2061
|
+
|
|
1692
2062
|
### PcbPlacementError
|
|
1693
2063
|
|
|
1694
2064
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_placement_error.ts)
|
|
@@ -1697,11 +2067,10 @@ Defines a placement error on the PCB
|
|
|
1697
2067
|
|
|
1698
2068
|
```typescript
|
|
1699
2069
|
/** Defines a placement error on the PCB */
|
|
1700
|
-
interface PcbPlacementError {
|
|
2070
|
+
interface PcbPlacementError extends BaseCircuitJsonError {
|
|
1701
2071
|
type: "pcb_placement_error"
|
|
1702
2072
|
pcb_placement_error_id: string
|
|
1703
2073
|
error_type: "pcb_placement_error"
|
|
1704
|
-
message: string
|
|
1705
2074
|
subcircuit_id?: string
|
|
1706
2075
|
}
|
|
1707
2076
|
```
|
|
@@ -1806,6 +2175,7 @@ interface PcbHoleCircularWithRectPad {
|
|
|
1806
2175
|
pcb_port_id?: string
|
|
1807
2176
|
pcb_plated_hole_id: string
|
|
1808
2177
|
soldermask_margin?: number
|
|
2178
|
+
rect_ccw_rotation?: Rotation
|
|
1809
2179
|
}
|
|
1810
2180
|
|
|
1811
2181
|
/** Defines a plated hole with a polygonal pad on the PCB */
|
|
@@ -1830,6 +2200,7 @@ interface PcbHoleWithPolygonPad {
|
|
|
1830
2200
|
pcb_port_id?: string
|
|
1831
2201
|
pcb_plated_hole_id: string
|
|
1832
2202
|
soldermask_margin?: number
|
|
2203
|
+
ccw_rotation?: Rotation
|
|
1833
2204
|
}
|
|
1834
2205
|
```
|
|
1835
2206
|
|
|
@@ -1863,11 +2234,10 @@ Defines an error when a pcb port is not connected to any trace
|
|
|
1863
2234
|
|
|
1864
2235
|
```typescript
|
|
1865
2236
|
/** Defines an error when a pcb port is not connected to any trace */
|
|
1866
|
-
interface PcbPortNotConnectedError {
|
|
2237
|
+
interface PcbPortNotConnectedError extends BaseCircuitJsonError {
|
|
1867
2238
|
type: "pcb_port_not_connected_error"
|
|
1868
2239
|
pcb_port_not_connected_error_id: string
|
|
1869
2240
|
error_type: "pcb_port_not_connected_error"
|
|
1870
|
-
message: string
|
|
1871
2241
|
pcb_port_ids: string[]
|
|
1872
2242
|
pcb_component_ids: string[]
|
|
1873
2243
|
subcircuit_id?: string
|
|
@@ -1882,11 +2252,10 @@ Defines a trace error on the PCB where a port is not matched
|
|
|
1882
2252
|
|
|
1883
2253
|
```typescript
|
|
1884
2254
|
/** Defines a trace error on the PCB where a port is not matched */
|
|
1885
|
-
interface PcbPortNotMatchedError {
|
|
2255
|
+
interface PcbPortNotMatchedError extends BaseCircuitJsonError {
|
|
1886
2256
|
type: "pcb_port_not_matched_error"
|
|
1887
2257
|
pcb_error_id: string
|
|
1888
2258
|
error_type: "pcb_port_not_matched_error"
|
|
1889
|
-
message: string
|
|
1890
2259
|
pcb_component_ids: string[]
|
|
1891
2260
|
subcircuit_id?: string
|
|
1892
2261
|
}
|
|
@@ -1925,6 +2294,7 @@ interface PcbSilkscreenCircle {
|
|
|
1925
2294
|
radius: Length
|
|
1926
2295
|
layer: VisibleLayer
|
|
1927
2296
|
stroke_width: Length
|
|
2297
|
+
is_filled?: boolean
|
|
1928
2298
|
}
|
|
1929
2299
|
```
|
|
1930
2300
|
|
|
@@ -1969,6 +2339,7 @@ interface PcbSilkscreenOval {
|
|
|
1969
2339
|
radius_x: Distance
|
|
1970
2340
|
radius_y: Distance
|
|
1971
2341
|
layer: VisibleLayer
|
|
2342
|
+
ccw_rotation?: number
|
|
1972
2343
|
}
|
|
1973
2344
|
```
|
|
1974
2345
|
|
|
@@ -2010,6 +2381,7 @@ interface PcbSilkscreenPill {
|
|
|
2010
2381
|
width: Length
|
|
2011
2382
|
height: Length
|
|
2012
2383
|
layer: LayerRef
|
|
2384
|
+
ccw_rotation?: number
|
|
2013
2385
|
}
|
|
2014
2386
|
```
|
|
2015
2387
|
|
|
@@ -2036,6 +2408,7 @@ interface PcbSilkscreenRect {
|
|
|
2036
2408
|
is_filled?: boolean
|
|
2037
2409
|
has_stroke?: boolean
|
|
2038
2410
|
is_stroke_dashed?: boolean
|
|
2411
|
+
ccw_rotation?: number
|
|
2039
2412
|
}
|
|
2040
2413
|
```
|
|
2041
2414
|
|
|
@@ -2065,7 +2438,7 @@ interface PcbSilkscreenText {
|
|
|
2065
2438
|
}
|
|
2066
2439
|
ccw_rotation?: number
|
|
2067
2440
|
layer: LayerRef
|
|
2068
|
-
|
|
2441
|
+
is_mirrored?: boolean
|
|
2069
2442
|
anchor_position: Point
|
|
2070
2443
|
anchor_alignment: NinePointAnchor
|
|
2071
2444
|
}
|
|
@@ -2094,30 +2467,6 @@ interface PcbSolderPasteCircle {
|
|
|
2094
2467
|
}
|
|
2095
2468
|
```
|
|
2096
2469
|
|
|
2097
|
-
### SupplierFootprintMismatchWarning
|
|
2098
|
-
|
|
2099
|
-
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/supplier_footprint_mismatch_warning.ts)
|
|
2100
|
-
|
|
2101
|
-
Warning emitted when a supplier part footprint does not match the expected footprint
|
|
2102
|
-
|
|
2103
|
-
```typescript
|
|
2104
|
-
/** Warning emitted when a supplier part footprint does not match the expected footprint */
|
|
2105
|
-
interface SupplierFootprintMismatchWarning {
|
|
2106
|
-
type: "supplier_footprint_mismatch_warning"
|
|
2107
|
-
supplier_footprint_mismatch_warning_id: string
|
|
2108
|
-
warning_type: "supplier_footprint_mismatch_warning"
|
|
2109
|
-
message: string
|
|
2110
|
-
source_component_id: string
|
|
2111
|
-
pcb_component_id?: string
|
|
2112
|
-
pcb_group_id?: string
|
|
2113
|
-
subcircuit_id?: string
|
|
2114
|
-
supplier_name?: SupplierName
|
|
2115
|
-
supplier_part_number?: string
|
|
2116
|
-
supplier_footprint_url?: string
|
|
2117
|
-
footprint_copper_intersection_over_union: number
|
|
2118
|
-
}
|
|
2119
|
-
```
|
|
2120
|
-
|
|
2121
2470
|
### PcbText
|
|
2122
2471
|
|
|
2123
2472
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_text.ts)
|
|
@@ -2174,50 +2523,19 @@ interface PcbTraceRoutePointWire {
|
|
|
2174
2523
|
x: Distance
|
|
2175
2524
|
y: Distance
|
|
2176
2525
|
width: Distance
|
|
2526
|
+
copper_pour_id?: string
|
|
2527
|
+
is_inside_copper_pour?: boolean
|
|
2177
2528
|
start_pcb_port_id?: string
|
|
2178
2529
|
end_pcb_port_id?: string
|
|
2179
2530
|
layer: LayerRef
|
|
2180
2531
|
}
|
|
2181
2532
|
|
|
2182
|
-
interface PcbTraceRoutePointThroughPad {
|
|
2183
|
-
route_type: "through_pad"
|
|
2184
|
-
start: Point
|
|
2185
|
-
end: Point
|
|
2186
|
-
width: Distance
|
|
2187
|
-
start_layer: LayerRef
|
|
2188
|
-
end_layer: LayerRef
|
|
2189
|
-
pcb_smtpad_id?: string
|
|
2190
|
-
pcb_plated_hole_id?: string
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
2533
|
type PcbTraceRoutePoint =
|
|
2194
2534
|
| PcbTraceRoutePointWire
|
|
2195
2535
|
| PcbTraceRoutePointVia
|
|
2196
2536
|
| PcbTraceRoutePointThroughPad
|
|
2197
2537
|
```
|
|
2198
2538
|
|
|
2199
|
-
### PcbTraceWarning
|
|
2200
|
-
|
|
2201
|
-
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_warning.ts)
|
|
2202
|
-
|
|
2203
|
-
Warning emitted when a PCB trace has a warning condition
|
|
2204
|
-
|
|
2205
|
-
```typescript
|
|
2206
|
-
/** Warning emitted when a PCB trace has a warning condition */
|
|
2207
|
-
interface PcbTraceWarning {
|
|
2208
|
-
type: "pcb_trace_warning"
|
|
2209
|
-
pcb_trace_warning_id: string
|
|
2210
|
-
warning_type: "pcb_trace_warning"
|
|
2211
|
-
message: string
|
|
2212
|
-
center?: Point
|
|
2213
|
-
pcb_trace_id: string
|
|
2214
|
-
source_trace_id: string
|
|
2215
|
-
pcb_component_ids: string[]
|
|
2216
|
-
pcb_port_ids: string[]
|
|
2217
|
-
subcircuit_id?: string
|
|
2218
|
-
}
|
|
2219
|
-
```
|
|
2220
|
-
|
|
2221
2539
|
### PcbTraceError
|
|
2222
2540
|
|
|
2223
2541
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_error.ts)
|
|
@@ -2226,11 +2544,10 @@ Defines a trace error on the PCB
|
|
|
2226
2544
|
|
|
2227
2545
|
```typescript
|
|
2228
2546
|
/** Defines a trace error on the PCB */
|
|
2229
|
-
interface PcbTraceError {
|
|
2547
|
+
interface PcbTraceError extends BaseCircuitJsonError {
|
|
2230
2548
|
type: "pcb_trace_error"
|
|
2231
2549
|
pcb_trace_error_id: string
|
|
2232
2550
|
error_type: "pcb_trace_error"
|
|
2233
|
-
message: string
|
|
2234
2551
|
center?: Point
|
|
2235
2552
|
pcb_trace_id: string
|
|
2236
2553
|
source_trace_id: string
|
|
@@ -2266,12 +2583,33 @@ Defines an error when a source trace has no corresponding PCB trace
|
|
|
2266
2583
|
|
|
2267
2584
|
```typescript
|
|
2268
2585
|
/** Defines an error when a source trace has no corresponding PCB trace */
|
|
2269
|
-
interface PcbTraceMissingError {
|
|
2586
|
+
interface PcbTraceMissingError extends BaseCircuitJsonError {
|
|
2270
2587
|
type: "pcb_trace_missing_error"
|
|
2271
2588
|
pcb_trace_missing_error_id: string
|
|
2272
2589
|
error_type: "pcb_trace_missing_error"
|
|
2590
|
+
center?: Point
|
|
2591
|
+
source_trace_id: string
|
|
2592
|
+
pcb_component_ids: string[]
|
|
2593
|
+
pcb_port_ids: string[]
|
|
2594
|
+
subcircuit_id?: string
|
|
2595
|
+
}
|
|
2596
|
+
```
|
|
2597
|
+
|
|
2598
|
+
### PcbTraceWarning
|
|
2599
|
+
|
|
2600
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_warning.ts)
|
|
2601
|
+
|
|
2602
|
+
Defines a trace warning on the PCB
|
|
2603
|
+
|
|
2604
|
+
```typescript
|
|
2605
|
+
/** Defines a trace warning on the PCB */
|
|
2606
|
+
interface PcbTraceWarning {
|
|
2607
|
+
type: "pcb_trace_warning"
|
|
2608
|
+
pcb_trace_warning_id: string
|
|
2609
|
+
warning_type: "pcb_trace_warning"
|
|
2273
2610
|
message: string
|
|
2274
2611
|
center?: Point
|
|
2612
|
+
pcb_trace_id: string
|
|
2275
2613
|
source_trace_id: string
|
|
2276
2614
|
pcb_component_ids: string[]
|
|
2277
2615
|
pcb_port_ids: string[]
|
|
@@ -2317,11 +2655,10 @@ Error emitted when vias are closer than the allowed clearance
|
|
|
2317
2655
|
|
|
2318
2656
|
```typescript
|
|
2319
2657
|
/** Error emitted when vias are closer than the allowed clearance */
|
|
2320
|
-
interface PcbViaClearanceError {
|
|
2658
|
+
interface PcbViaClearanceError extends BaseCircuitJsonError {
|
|
2321
2659
|
type: "pcb_via_clearance_error"
|
|
2322
2660
|
pcb_error_id: string
|
|
2323
2661
|
error_type: "pcb_via_clearance_error"
|
|
2324
|
-
message: string
|
|
2325
2662
|
pcb_via_ids: string[]
|
|
2326
2663
|
minimum_clearance?: Distance
|
|
2327
2664
|
actual_clearance?: Distance
|
|
@@ -2333,6 +2670,30 @@ interface PcbViaClearanceError {
|
|
|
2333
2670
|
}
|
|
2334
2671
|
```
|
|
2335
2672
|
|
|
2673
|
+
### PcbViaTraceClearanceError
|
|
2674
|
+
|
|
2675
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_via_trace_clearance_error.ts)
|
|
2676
|
+
|
|
2677
|
+
Error emitted when a via and trace are closer than the allowed clearance
|
|
2678
|
+
|
|
2679
|
+
```typescript
|
|
2680
|
+
/** Error emitted when a via and trace are closer than the allowed clearance */
|
|
2681
|
+
interface PcbViaTraceClearanceError extends BaseCircuitJsonError {
|
|
2682
|
+
type: "pcb_via_trace_clearance_error"
|
|
2683
|
+
pcb_via_trace_clearance_error_id: string
|
|
2684
|
+
error_type: "pcb_via_trace_clearance_error"
|
|
2685
|
+
pcb_via_id: string
|
|
2686
|
+
pcb_trace_id: string
|
|
2687
|
+
minimum_clearance?: Distance
|
|
2688
|
+
actual_clearance?: Distance
|
|
2689
|
+
center?: {
|
|
2690
|
+
x?: number
|
|
2691
|
+
y?: number
|
|
2692
|
+
}
|
|
2693
|
+
subcircuit_id?: string
|
|
2694
|
+
}
|
|
2695
|
+
```
|
|
2696
|
+
|
|
2336
2697
|
## Schematic Elements
|
|
2337
2698
|
|
|
2338
2699
|
### SchematicArc
|
|
@@ -2346,7 +2707,8 @@ Draws a styled arc on the schematic
|
|
|
2346
2707
|
interface SchematicArc {
|
|
2347
2708
|
type: "schematic_arc"
|
|
2348
2709
|
schematic_arc_id: string
|
|
2349
|
-
schematic_component_id
|
|
2710
|
+
schematic_component_id?: string
|
|
2711
|
+
schematic_symbol_id?: string
|
|
2350
2712
|
center: Point
|
|
2351
2713
|
radius: number
|
|
2352
2714
|
start_angle_degrees: number
|
|
@@ -2367,6 +2729,7 @@ interface SchematicArc {
|
|
|
2367
2729
|
interface SchematicBox {
|
|
2368
2730
|
type: "schematic_box"
|
|
2369
2731
|
schematic_component_id?: string
|
|
2732
|
+
schematic_symbol_id?: string
|
|
2370
2733
|
width: number
|
|
2371
2734
|
height: number
|
|
2372
2735
|
is_dashed: boolean
|
|
@@ -2387,7 +2750,8 @@ Draws a styled circle on the schematic
|
|
|
2387
2750
|
interface SchematicCircle {
|
|
2388
2751
|
type: "schematic_circle"
|
|
2389
2752
|
schematic_circle_id: string
|
|
2390
|
-
schematic_component_id
|
|
2753
|
+
schematic_component_id?: string
|
|
2754
|
+
schematic_symbol_id?: string
|
|
2391
2755
|
center: Point
|
|
2392
2756
|
radius: number
|
|
2393
2757
|
stroke_width?: number | null
|
|
@@ -2410,6 +2774,7 @@ interface SchematicComponent {
|
|
|
2410
2774
|
center: Point
|
|
2411
2775
|
source_component_id?: string
|
|
2412
2776
|
schematic_component_id: string
|
|
2777
|
+
schematic_symbol_id?: string
|
|
2413
2778
|
pin_spacing?: number
|
|
2414
2779
|
pin_styles?: Record<
|
|
2415
2780
|
string,
|
|
@@ -2496,11 +2861,10 @@ interface SchematicDebugPoint {
|
|
|
2496
2861
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_error.ts)
|
|
2497
2862
|
|
|
2498
2863
|
```typescript
|
|
2499
|
-
interface SchematicError {
|
|
2864
|
+
interface SchematicError extends BaseCircuitJsonError {
|
|
2500
2865
|
type: "schematic_error"
|
|
2501
2866
|
schematic_error_id: string
|
|
2502
2867
|
error_type: "schematic_port_not_found"
|
|
2503
|
-
message: string
|
|
2504
2868
|
subcircuit_id?: string
|
|
2505
2869
|
}
|
|
2506
2870
|
```
|
|
@@ -2534,11 +2898,10 @@ interface SchematicGroup {
|
|
|
2534
2898
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_layout_error.ts)
|
|
2535
2899
|
|
|
2536
2900
|
```typescript
|
|
2537
|
-
interface SchematicLayoutError {
|
|
2901
|
+
interface SchematicLayoutError extends BaseCircuitJsonError {
|
|
2538
2902
|
type: "schematic_layout_error"
|
|
2539
2903
|
schematic_layout_error_id: string
|
|
2540
2904
|
error_type: "schematic_layout_error"
|
|
2541
|
-
message: string
|
|
2542
2905
|
source_group_id: string
|
|
2543
2906
|
schematic_group_id: string
|
|
2544
2907
|
subcircuit_id?: string
|
|
@@ -2556,7 +2919,8 @@ Draws a styled line on the schematic
|
|
|
2556
2919
|
interface SchematicLine {
|
|
2557
2920
|
type: "schematic_line"
|
|
2558
2921
|
schematic_line_id: string
|
|
2559
|
-
schematic_component_id
|
|
2922
|
+
schematic_component_id?: string
|
|
2923
|
+
schematic_symbol_id?: string
|
|
2560
2924
|
x1: number
|
|
2561
2925
|
y1: number
|
|
2562
2926
|
x2: number
|
|
@@ -2621,9 +2985,13 @@ interface SchematicNetLabel {
|
|
|
2621
2985
|
```typescript
|
|
2622
2986
|
interface SchematicPath {
|
|
2623
2987
|
type: "schematic_path"
|
|
2624
|
-
|
|
2625
|
-
|
|
2988
|
+
schematic_path_id: string
|
|
2989
|
+
schematic_component_id?: string
|
|
2990
|
+
schematic_symbol_id?: string
|
|
2991
|
+
fill_color?: string
|
|
2626
2992
|
is_filled?: boolean
|
|
2993
|
+
stroke_width?: number | null
|
|
2994
|
+
stroke_color?: string
|
|
2627
2995
|
dash_length?: number
|
|
2628
2996
|
dash_gap?: number
|
|
2629
2997
|
points: Point[]
|
|
@@ -2652,6 +3020,7 @@ interface SchematicPort {
|
|
|
2652
3020
|
is_connected?: boolean
|
|
2653
3021
|
has_input_arrow?: boolean
|
|
2654
3022
|
has_output_arrow?: boolean
|
|
3023
|
+
is_drawn_with_inversion_circle?: boolean
|
|
2655
3024
|
}
|
|
2656
3025
|
```
|
|
2657
3026
|
|
|
@@ -2666,7 +3035,8 @@ Draws a styled rectangle on the schematic
|
|
|
2666
3035
|
interface SchematicRect {
|
|
2667
3036
|
type: "schematic_rect"
|
|
2668
3037
|
schematic_rect_id: string
|
|
2669
|
-
schematic_component_id
|
|
3038
|
+
schematic_component_id?: string
|
|
3039
|
+
schematic_symbol_id?: string
|
|
2670
3040
|
center: Point
|
|
2671
3041
|
width: number
|
|
2672
3042
|
height: number
|
|
@@ -2696,6 +3066,19 @@ interface SchematicSheet {
|
|
|
2696
3066
|
}
|
|
2697
3067
|
```
|
|
2698
3068
|
|
|
3069
|
+
### SchematicSymbol
|
|
3070
|
+
|
|
3071
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_symbol.ts)
|
|
3072
|
+
|
|
3073
|
+
```typescript
|
|
3074
|
+
interface SchematicSymbol {
|
|
3075
|
+
type: "schematic_symbol"
|
|
3076
|
+
schematic_symbol_id: string
|
|
3077
|
+
name?: string
|
|
3078
|
+
metadata?: SchematicSymbolMetadata
|
|
3079
|
+
}
|
|
3080
|
+
```
|
|
3081
|
+
|
|
2699
3082
|
### SchematicTable
|
|
2700
3083
|
|
|
2701
3084
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_table.ts)
|
|
@@ -2753,6 +3136,7 @@ interface SchematicTableCell {
|
|
|
2753
3136
|
interface SchematicText {
|
|
2754
3137
|
type: "schematic_text"
|
|
2755
3138
|
schematic_component_id?: string
|
|
3139
|
+
schematic_symbol_id?: string
|
|
2756
3140
|
schematic_text_id: string
|
|
2757
3141
|
text: string
|
|
2758
3142
|
font_size: number
|
|
@@ -2808,6 +3192,46 @@ interface SchematicVoltageProbe {
|
|
|
2808
3192
|
|
|
2809
3193
|
## Simulation Elements
|
|
2810
3194
|
|
|
3195
|
+
### SimulationCurrentSource
|
|
3196
|
+
|
|
3197
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_current_source.ts)
|
|
3198
|
+
|
|
3199
|
+
```typescript
|
|
3200
|
+
type SimulationCurrentSource =
|
|
3201
|
+
| SimulationDcCurrentSource
|
|
3202
|
+
| SimulationAcCurrentSource
|
|
3203
|
+
|
|
3204
|
+
/** Defines a DC current source for simulation purposes. It forces a current
|
|
3205
|
+
* between two source ports. */
|
|
3206
|
+
interface SimulationDcCurrentSource {
|
|
3207
|
+
type: "simulation_current_source"
|
|
3208
|
+
simulation_current_source_id: string
|
|
3209
|
+
is_dc_source: true
|
|
3210
|
+
positive_source_port_id?: string
|
|
3211
|
+
positive_source_net_id?: string
|
|
3212
|
+
negative_source_port_id?: string
|
|
3213
|
+
negative_source_net_id?: string
|
|
3214
|
+
current: number
|
|
3215
|
+
}
|
|
3216
|
+
|
|
3217
|
+
/** Defines an AC current source for simulation purposes. */
|
|
3218
|
+
interface SimulationAcCurrentSource {
|
|
3219
|
+
type: "simulation_current_source"
|
|
3220
|
+
simulation_current_source_id: string
|
|
3221
|
+
is_dc_source: false
|
|
3222
|
+
terminal1_source_port_id?: string
|
|
3223
|
+
terminal2_source_port_id?: string
|
|
3224
|
+
terminal1_source_net_id?: string
|
|
3225
|
+
terminal2_source_net_id?: string
|
|
3226
|
+
current?: number
|
|
3227
|
+
frequency?: number
|
|
3228
|
+
peak_to_peak_current?: number
|
|
3229
|
+
wave_shape?: WaveShape
|
|
3230
|
+
phase?: number
|
|
3231
|
+
duty_cycle?: number
|
|
3232
|
+
}
|
|
3233
|
+
```
|
|
3234
|
+
|
|
2811
3235
|
### SimulationExperiment
|
|
2812
3236
|
|
|
2813
3237
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_experiment.ts)
|
|
@@ -2824,6 +3248,26 @@ interface SimulationExperiment {
|
|
|
2824
3248
|
}
|
|
2825
3249
|
```
|
|
2826
3250
|
|
|
3251
|
+
### SimulationOpAmp
|
|
3252
|
+
|
|
3253
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_op_amp.ts)
|
|
3254
|
+
|
|
3255
|
+
Defines a simple ideal operational amplifier for simulation.
|
|
3256
|
+
|
|
3257
|
+
```typescript
|
|
3258
|
+
/** Defines a simple ideal operational amplifier for simulation. */
|
|
3259
|
+
interface SimulationOpAmp {
|
|
3260
|
+
type: "simulation_op_amp"
|
|
3261
|
+
simulation_op_amp_id: string
|
|
3262
|
+
source_component_id?: string
|
|
3263
|
+
inverting_input_source_port_id: string
|
|
3264
|
+
non_inverting_input_source_port_id: string
|
|
3265
|
+
output_source_port_id: string
|
|
3266
|
+
positive_supply_source_port_id: string
|
|
3267
|
+
negative_supply_source_port_id: string
|
|
3268
|
+
}
|
|
3269
|
+
```
|
|
3270
|
+
|
|
2827
3271
|
### SimulationSwitch
|
|
2828
3272
|
|
|
2829
3273
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_switch.ts)
|
|
@@ -2869,11 +3313,10 @@ An unknown error occurred during the simulation experiment.
|
|
|
2869
3313
|
|
|
2870
3314
|
```typescript
|
|
2871
3315
|
/** An unknown error occurred during the simulation experiment. */
|
|
2872
|
-
interface SimulationUnknownExperimentError {
|
|
3316
|
+
interface SimulationUnknownExperimentError extends BaseCircuitJsonError {
|
|
2873
3317
|
type: "simulation_unknown_experiment_error"
|
|
2874
3318
|
simulation_unknown_experiment_error_id: string
|
|
2875
3319
|
error_type: "simulation_unknown_experiment_error"
|
|
2876
|
-
message: string
|
|
2877
3320
|
simulation_experiment_id?: string
|
|
2878
3321
|
subcircuit_id?: string
|
|
2879
3322
|
}
|