circuit-json 0.0.427 → 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 +620 -175
- package/dist/index.d.mts +185 -2
- package/dist/index.mjs +1367 -1347
- 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
|
|
@@ -996,8 +1248,10 @@ interface PcbBoard {
|
|
|
996
1248
|
outline?: Point[]
|
|
997
1249
|
shape?: "rect" | "polygon"
|
|
998
1250
|
material: "fr4" | "fr1"
|
|
1251
|
+
solder_mask_color?: string
|
|
1252
|
+
silkscreen_color?: string
|
|
999
1253
|
anchor_position?: Point
|
|
1000
|
-
anchor_alignment
|
|
1254
|
+
anchor_alignment?: NinePointAnchor
|
|
1001
1255
|
position_mode?: "relative_to_panel_anchor" | "none"
|
|
1002
1256
|
}
|
|
1003
1257
|
```
|
|
@@ -1027,34 +1281,9 @@ interface PcbBreakoutPoint {
|
|
|
1027
1281
|
|
|
1028
1282
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component.ts)
|
|
1029
1283
|
|
|
1030
|
-
Defines a component on the PCB
|
|
1031
|
-
|
|
1032
1284
|
```typescript
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
type: "pcb_component"
|
|
1036
|
-
pcb_component_id: string
|
|
1037
|
-
source_component_id: string
|
|
1038
|
-
subcircuit_id?: string
|
|
1039
|
-
center: Point
|
|
1040
|
-
layer: LayerRef
|
|
1041
|
-
rotation: Rotation
|
|
1042
|
-
display_offset_x?: string
|
|
1043
|
-
display_offset_y?: string
|
|
1044
|
-
width: Length
|
|
1045
|
-
height: Length
|
|
1046
|
-
do_not_place?: boolean
|
|
1047
|
-
pcb_group_id?: string
|
|
1048
|
-
position_mode?:
|
|
1049
|
-
| "packed"
|
|
1050
|
-
| "relative_to_group_anchor"
|
|
1051
|
-
| "relative_to_another_component"
|
|
1052
|
-
| "none"
|
|
1053
|
-
anchor_position?: Point
|
|
1054
|
-
anchor_alignment?: NinePointAnchor
|
|
1055
|
-
positioned_relative_to_pcb_group_id?: string
|
|
1056
|
-
positioned_relative_to_pcb_board_id?: string
|
|
1057
|
-
obstructs_within_bounds: boolean
|
|
1285
|
+
interface PcbComponentMetadata {
|
|
1286
|
+
kicad_footprint?: KicadFootprintMetadata
|
|
1058
1287
|
}
|
|
1059
1288
|
```
|
|
1060
1289
|
|
|
@@ -1066,11 +1295,10 @@ Error emitted when a component is placed on an invalid layer (components can onl
|
|
|
1066
1295
|
|
|
1067
1296
|
```typescript
|
|
1068
1297
|
/** Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers) */
|
|
1069
|
-
interface PcbComponentInvalidLayerError {
|
|
1298
|
+
interface PcbComponentInvalidLayerError extends BaseCircuitJsonError {
|
|
1070
1299
|
type: "pcb_component_invalid_layer_error"
|
|
1071
1300
|
pcb_component_invalid_layer_error_id: string
|
|
1072
1301
|
error_type: "pcb_component_invalid_layer_error"
|
|
1073
|
-
message: string
|
|
1074
1302
|
pcb_component_id?: string
|
|
1075
1303
|
source_component_id: string
|
|
1076
1304
|
layer: LayerRef
|
|
@@ -1078,6 +1306,27 @@ interface PcbComponentInvalidLayerError {
|
|
|
1078
1306
|
}
|
|
1079
1307
|
```
|
|
1080
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
|
+
|
|
1081
1330
|
### PcbComponentOutsideBoardError
|
|
1082
1331
|
|
|
1083
1332
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_component_outside_board_error.ts)
|
|
@@ -1086,11 +1335,10 @@ Error emitted when a PCB component is placed outside the board boundaries
|
|
|
1086
1335
|
|
|
1087
1336
|
```typescript
|
|
1088
1337
|
/** Error emitted when a PCB component is placed outside the board boundaries */
|
|
1089
|
-
interface PcbComponentOutsideBoardError {
|
|
1338
|
+
interface PcbComponentOutsideBoardError extends BaseCircuitJsonError {
|
|
1090
1339
|
type: "pcb_component_outside_board_error"
|
|
1091
1340
|
pcb_component_outside_board_error_id: string
|
|
1092
1341
|
error_type: "pcb_component_outside_board_error"
|
|
1093
|
-
message: string
|
|
1094
1342
|
pcb_component_id: string
|
|
1095
1343
|
pcb_board_id: string
|
|
1096
1344
|
component_center: Point
|
|
@@ -1105,6 +1353,28 @@ interface PcbComponentOutsideBoardError {
|
|
|
1105
1353
|
}
|
|
1106
1354
|
```
|
|
1107
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
|
+
|
|
1108
1378
|
### PcbCopperPour
|
|
1109
1379
|
|
|
1110
1380
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_copper_pour.ts)
|
|
@@ -1161,6 +1431,27 @@ interface PcbCopperText {
|
|
|
1161
1431
|
}
|
|
1162
1432
|
```
|
|
1163
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
|
+
|
|
1164
1455
|
### PcbCourtyardOutline
|
|
1165
1456
|
|
|
1166
1457
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_courtyard_outline.ts)
|
|
@@ -1177,10 +1468,22 @@ interface PcbCourtyardOutline {
|
|
|
1177
1468
|
subcircuit_id?: string
|
|
1178
1469
|
layer: VisibleLayer
|
|
1179
1470
|
outline: Point[]
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
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]
|
|
1184
1487
|
}
|
|
1185
1488
|
```
|
|
1186
1489
|
|
|
@@ -1222,6 +1525,7 @@ interface PcbCourtyardRect {
|
|
|
1222
1525
|
width: Length
|
|
1223
1526
|
height: Length
|
|
1224
1527
|
layer: VisibleLayer
|
|
1528
|
+
ccw_rotation?: Rotation
|
|
1225
1529
|
color?: string
|
|
1226
1530
|
}
|
|
1227
1531
|
```
|
|
@@ -1346,6 +1650,7 @@ interface PcbFabricationNoteText {
|
|
|
1346
1650
|
font_size: Length
|
|
1347
1651
|
pcb_component_id: string
|
|
1348
1652
|
text: string
|
|
1653
|
+
ccw_rotation?: number
|
|
1349
1654
|
layer: VisibleLayer
|
|
1350
1655
|
anchor_position: Point
|
|
1351
1656
|
anchor_alignment:
|
|
@@ -1366,11 +1671,10 @@ Error emitted when a pcb footprint overlaps with another element
|
|
|
1366
1671
|
|
|
1367
1672
|
```typescript
|
|
1368
1673
|
/** Error emitted when a pcb footprint overlaps with another element */
|
|
1369
|
-
interface PcbFootprintOverlapError {
|
|
1674
|
+
interface PcbFootprintOverlapError extends BaseCircuitJsonError {
|
|
1370
1675
|
type: "pcb_footprint_overlap_error"
|
|
1371
1676
|
pcb_error_id: string
|
|
1372
1677
|
error_type: "pcb_footprint_overlap_error"
|
|
1373
|
-
message: string
|
|
1374
1678
|
pcb_smtpad_ids?: string[]
|
|
1375
1679
|
pcb_plated_hole_ids?: string[]
|
|
1376
1680
|
pcb_hole_ids?: string[]
|
|
@@ -1503,14 +1807,13 @@ Defines a placement error on the PCB
|
|
|
1503
1807
|
|
|
1504
1808
|
```typescript
|
|
1505
1809
|
/** Defines a placement error on the PCB */
|
|
1506
|
-
interface PcbMissingFootprintError {
|
|
1810
|
+
interface PcbMissingFootprintError extends BaseCircuitJsonError {
|
|
1507
1811
|
type: "pcb_missing_footprint_error"
|
|
1508
1812
|
pcb_missing_footprint_error_id: string
|
|
1509
1813
|
pcb_group_id?: string
|
|
1510
1814
|
subcircuit_id?: string
|
|
1511
1815
|
error_type: "pcb_missing_footprint_error"
|
|
1512
1816
|
source_component_id: string
|
|
1513
|
-
message: string
|
|
1514
1817
|
}
|
|
1515
1818
|
```
|
|
1516
1819
|
|
|
@@ -1556,6 +1859,7 @@ interface PcbNoteDimension {
|
|
|
1556
1859
|
}
|
|
1557
1860
|
font: "tscircuit2024"
|
|
1558
1861
|
font_size: Length
|
|
1862
|
+
layer: VisibleLayer
|
|
1559
1863
|
color?: string
|
|
1560
1864
|
arrow_size: Length
|
|
1561
1865
|
}
|
|
@@ -1581,6 +1885,7 @@ interface PcbNoteLine {
|
|
|
1581
1885
|
y1: Distance
|
|
1582
1886
|
x2: Distance
|
|
1583
1887
|
y2: Distance
|
|
1888
|
+
layer: VisibleLayer
|
|
1584
1889
|
stroke_width: Distance
|
|
1585
1890
|
color?: string
|
|
1586
1891
|
is_dashed?: boolean
|
|
@@ -1604,6 +1909,7 @@ interface PcbNotePath {
|
|
|
1604
1909
|
name?: string
|
|
1605
1910
|
text?: string
|
|
1606
1911
|
route: Point[]
|
|
1912
|
+
layer: VisibleLayer
|
|
1607
1913
|
stroke_width: Length
|
|
1608
1914
|
color?: string
|
|
1609
1915
|
}
|
|
@@ -1628,6 +1934,7 @@ interface PcbNoteRect {
|
|
|
1628
1934
|
center: Point
|
|
1629
1935
|
width: Length
|
|
1630
1936
|
height: Length
|
|
1937
|
+
layer: VisibleLayer
|
|
1631
1938
|
stroke_width: Length
|
|
1632
1939
|
corner_radius?: Length
|
|
1633
1940
|
is_filled?: boolean
|
|
@@ -1663,11 +1970,58 @@ interface PcbNoteText {
|
|
|
1663
1970
|
| "bottom_left"
|
|
1664
1971
|
| "bottom_right"
|
|
1665
1972
|
layer: VisibleLayer
|
|
1666
|
-
|
|
1973
|
+
is_mirrored_from_top_view?: boolean
|
|
1667
1974
|
color?: string
|
|
1668
1975
|
}
|
|
1669
1976
|
```
|
|
1670
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
|
+
|
|
1671
2025
|
### PcbPanel
|
|
1672
2026
|
|
|
1673
2027
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_panel.ts)
|
|
@@ -1687,6 +2041,24 @@ interface PcbPanel {
|
|
|
1687
2041
|
}
|
|
1688
2042
|
```
|
|
1689
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
|
+
|
|
1690
2062
|
### PcbPlacementError
|
|
1691
2063
|
|
|
1692
2064
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_placement_error.ts)
|
|
@@ -1695,11 +2067,10 @@ Defines a placement error on the PCB
|
|
|
1695
2067
|
|
|
1696
2068
|
```typescript
|
|
1697
2069
|
/** Defines a placement error on the PCB */
|
|
1698
|
-
interface PcbPlacementError {
|
|
2070
|
+
interface PcbPlacementError extends BaseCircuitJsonError {
|
|
1699
2071
|
type: "pcb_placement_error"
|
|
1700
2072
|
pcb_placement_error_id: string
|
|
1701
2073
|
error_type: "pcb_placement_error"
|
|
1702
|
-
message: string
|
|
1703
2074
|
subcircuit_id?: string
|
|
1704
2075
|
}
|
|
1705
2076
|
```
|
|
@@ -1804,6 +2175,7 @@ interface PcbHoleCircularWithRectPad {
|
|
|
1804
2175
|
pcb_port_id?: string
|
|
1805
2176
|
pcb_plated_hole_id: string
|
|
1806
2177
|
soldermask_margin?: number
|
|
2178
|
+
rect_ccw_rotation?: Rotation
|
|
1807
2179
|
}
|
|
1808
2180
|
|
|
1809
2181
|
/** Defines a plated hole with a polygonal pad on the PCB */
|
|
@@ -1828,6 +2200,7 @@ interface PcbHoleWithPolygonPad {
|
|
|
1828
2200
|
pcb_port_id?: string
|
|
1829
2201
|
pcb_plated_hole_id: string
|
|
1830
2202
|
soldermask_margin?: number
|
|
2203
|
+
ccw_rotation?: Rotation
|
|
1831
2204
|
}
|
|
1832
2205
|
```
|
|
1833
2206
|
|
|
@@ -1861,11 +2234,10 @@ Defines an error when a pcb port is not connected to any trace
|
|
|
1861
2234
|
|
|
1862
2235
|
```typescript
|
|
1863
2236
|
/** Defines an error when a pcb port is not connected to any trace */
|
|
1864
|
-
interface PcbPortNotConnectedError {
|
|
2237
|
+
interface PcbPortNotConnectedError extends BaseCircuitJsonError {
|
|
1865
2238
|
type: "pcb_port_not_connected_error"
|
|
1866
2239
|
pcb_port_not_connected_error_id: string
|
|
1867
2240
|
error_type: "pcb_port_not_connected_error"
|
|
1868
|
-
message: string
|
|
1869
2241
|
pcb_port_ids: string[]
|
|
1870
2242
|
pcb_component_ids: string[]
|
|
1871
2243
|
subcircuit_id?: string
|
|
@@ -1880,11 +2252,10 @@ Defines a trace error on the PCB where a port is not matched
|
|
|
1880
2252
|
|
|
1881
2253
|
```typescript
|
|
1882
2254
|
/** Defines a trace error on the PCB where a port is not matched */
|
|
1883
|
-
interface PcbPortNotMatchedError {
|
|
2255
|
+
interface PcbPortNotMatchedError extends BaseCircuitJsonError {
|
|
1884
2256
|
type: "pcb_port_not_matched_error"
|
|
1885
2257
|
pcb_error_id: string
|
|
1886
2258
|
error_type: "pcb_port_not_matched_error"
|
|
1887
|
-
message: string
|
|
1888
2259
|
pcb_component_ids: string[]
|
|
1889
2260
|
subcircuit_id?: string
|
|
1890
2261
|
}
|
|
@@ -1923,6 +2294,7 @@ interface PcbSilkscreenCircle {
|
|
|
1923
2294
|
radius: Length
|
|
1924
2295
|
layer: VisibleLayer
|
|
1925
2296
|
stroke_width: Length
|
|
2297
|
+
is_filled?: boolean
|
|
1926
2298
|
}
|
|
1927
2299
|
```
|
|
1928
2300
|
|
|
@@ -1967,6 +2339,7 @@ interface PcbSilkscreenOval {
|
|
|
1967
2339
|
radius_x: Distance
|
|
1968
2340
|
radius_y: Distance
|
|
1969
2341
|
layer: VisibleLayer
|
|
2342
|
+
ccw_rotation?: number
|
|
1970
2343
|
}
|
|
1971
2344
|
```
|
|
1972
2345
|
|
|
@@ -2008,6 +2381,7 @@ interface PcbSilkscreenPill {
|
|
|
2008
2381
|
width: Length
|
|
2009
2382
|
height: Length
|
|
2010
2383
|
layer: LayerRef
|
|
2384
|
+
ccw_rotation?: number
|
|
2011
2385
|
}
|
|
2012
2386
|
```
|
|
2013
2387
|
|
|
@@ -2034,6 +2408,7 @@ interface PcbSilkscreenRect {
|
|
|
2034
2408
|
is_filled?: boolean
|
|
2035
2409
|
has_stroke?: boolean
|
|
2036
2410
|
is_stroke_dashed?: boolean
|
|
2411
|
+
ccw_rotation?: number
|
|
2037
2412
|
}
|
|
2038
2413
|
```
|
|
2039
2414
|
|
|
@@ -2063,7 +2438,7 @@ interface PcbSilkscreenText {
|
|
|
2063
2438
|
}
|
|
2064
2439
|
ccw_rotation?: number
|
|
2065
2440
|
layer: LayerRef
|
|
2066
|
-
|
|
2441
|
+
is_mirrored?: boolean
|
|
2067
2442
|
anchor_position: Point
|
|
2068
2443
|
anchor_alignment: NinePointAnchor
|
|
2069
2444
|
}
|
|
@@ -2092,30 +2467,6 @@ interface PcbSolderPasteCircle {
|
|
|
2092
2467
|
}
|
|
2093
2468
|
```
|
|
2094
2469
|
|
|
2095
|
-
### SupplierFootprintMismatchWarning
|
|
2096
|
-
|
|
2097
|
-
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/supplier_footprint_mismatch_warning.ts)
|
|
2098
|
-
|
|
2099
|
-
Warning emitted when a supplier part footprint does not match the expected footprint
|
|
2100
|
-
|
|
2101
|
-
```typescript
|
|
2102
|
-
/** Warning emitted when a supplier part footprint does not match the expected footprint */
|
|
2103
|
-
interface SupplierFootprintMismatchWarning {
|
|
2104
|
-
type: "supplier_footprint_mismatch_warning"
|
|
2105
|
-
supplier_footprint_mismatch_warning_id: string
|
|
2106
|
-
warning_type: "supplier_footprint_mismatch_warning"
|
|
2107
|
-
message: string
|
|
2108
|
-
source_component_id: string
|
|
2109
|
-
pcb_component_id?: string
|
|
2110
|
-
pcb_group_id?: string
|
|
2111
|
-
subcircuit_id?: string
|
|
2112
|
-
supplier_name?: SupplierName
|
|
2113
|
-
supplier_part_number?: string
|
|
2114
|
-
supplier_footprint_url?: string
|
|
2115
|
-
footprint_copper_intersection_over_union: number
|
|
2116
|
-
}
|
|
2117
|
-
```
|
|
2118
|
-
|
|
2119
2470
|
### PcbText
|
|
2120
2471
|
|
|
2121
2472
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_text.ts)
|
|
@@ -2172,50 +2523,19 @@ interface PcbTraceRoutePointWire {
|
|
|
2172
2523
|
x: Distance
|
|
2173
2524
|
y: Distance
|
|
2174
2525
|
width: Distance
|
|
2526
|
+
copper_pour_id?: string
|
|
2527
|
+
is_inside_copper_pour?: boolean
|
|
2175
2528
|
start_pcb_port_id?: string
|
|
2176
2529
|
end_pcb_port_id?: string
|
|
2177
2530
|
layer: LayerRef
|
|
2178
2531
|
}
|
|
2179
2532
|
|
|
2180
|
-
interface PcbTraceRoutePointThroughPad {
|
|
2181
|
-
route_type: "through_pad"
|
|
2182
|
-
start: Point
|
|
2183
|
-
end: Point
|
|
2184
|
-
width: Distance
|
|
2185
|
-
start_layer: LayerRef
|
|
2186
|
-
end_layer: LayerRef
|
|
2187
|
-
pcb_smtpad_id?: string
|
|
2188
|
-
pcb_plated_hole_id?: string
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
2533
|
type PcbTraceRoutePoint =
|
|
2192
2534
|
| PcbTraceRoutePointWire
|
|
2193
2535
|
| PcbTraceRoutePointVia
|
|
2194
2536
|
| PcbTraceRoutePointThroughPad
|
|
2195
2537
|
```
|
|
2196
2538
|
|
|
2197
|
-
### PcbTraceWarning
|
|
2198
|
-
|
|
2199
|
-
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_warning.ts)
|
|
2200
|
-
|
|
2201
|
-
Warning emitted when a PCB trace has a warning condition
|
|
2202
|
-
|
|
2203
|
-
```typescript
|
|
2204
|
-
/** Warning emitted when a PCB trace has a warning condition */
|
|
2205
|
-
interface PcbTraceWarning {
|
|
2206
|
-
type: "pcb_trace_warning"
|
|
2207
|
-
pcb_trace_warning_id: string
|
|
2208
|
-
warning_type: "pcb_trace_warning"
|
|
2209
|
-
message: string
|
|
2210
|
-
center?: Point
|
|
2211
|
-
pcb_trace_id: string
|
|
2212
|
-
source_trace_id: string
|
|
2213
|
-
pcb_component_ids: string[]
|
|
2214
|
-
pcb_port_ids: string[]
|
|
2215
|
-
subcircuit_id?: string
|
|
2216
|
-
}
|
|
2217
|
-
```
|
|
2218
|
-
|
|
2219
2539
|
### PcbTraceError
|
|
2220
2540
|
|
|
2221
2541
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_trace_error.ts)
|
|
@@ -2224,11 +2544,10 @@ Defines a trace error on the PCB
|
|
|
2224
2544
|
|
|
2225
2545
|
```typescript
|
|
2226
2546
|
/** Defines a trace error on the PCB */
|
|
2227
|
-
interface PcbTraceError {
|
|
2547
|
+
interface PcbTraceError extends BaseCircuitJsonError {
|
|
2228
2548
|
type: "pcb_trace_error"
|
|
2229
2549
|
pcb_trace_error_id: string
|
|
2230
2550
|
error_type: "pcb_trace_error"
|
|
2231
|
-
message: string
|
|
2232
2551
|
center?: Point
|
|
2233
2552
|
pcb_trace_id: string
|
|
2234
2553
|
source_trace_id: string
|
|
@@ -2264,12 +2583,33 @@ Defines an error when a source trace has no corresponding PCB trace
|
|
|
2264
2583
|
|
|
2265
2584
|
```typescript
|
|
2266
2585
|
/** Defines an error when a source trace has no corresponding PCB trace */
|
|
2267
|
-
interface PcbTraceMissingError {
|
|
2586
|
+
interface PcbTraceMissingError extends BaseCircuitJsonError {
|
|
2268
2587
|
type: "pcb_trace_missing_error"
|
|
2269
2588
|
pcb_trace_missing_error_id: string
|
|
2270
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"
|
|
2271
2610
|
message: string
|
|
2272
2611
|
center?: Point
|
|
2612
|
+
pcb_trace_id: string
|
|
2273
2613
|
source_trace_id: string
|
|
2274
2614
|
pcb_component_ids: string[]
|
|
2275
2615
|
pcb_port_ids: string[]
|
|
@@ -2315,11 +2655,10 @@ Error emitted when vias are closer than the allowed clearance
|
|
|
2315
2655
|
|
|
2316
2656
|
```typescript
|
|
2317
2657
|
/** Error emitted when vias are closer than the allowed clearance */
|
|
2318
|
-
interface PcbViaClearanceError {
|
|
2658
|
+
interface PcbViaClearanceError extends BaseCircuitJsonError {
|
|
2319
2659
|
type: "pcb_via_clearance_error"
|
|
2320
2660
|
pcb_error_id: string
|
|
2321
2661
|
error_type: "pcb_via_clearance_error"
|
|
2322
|
-
message: string
|
|
2323
2662
|
pcb_via_ids: string[]
|
|
2324
2663
|
minimum_clearance?: Distance
|
|
2325
2664
|
actual_clearance?: Distance
|
|
@@ -2331,6 +2670,30 @@ interface PcbViaClearanceError {
|
|
|
2331
2670
|
}
|
|
2332
2671
|
```
|
|
2333
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
|
+
|
|
2334
2697
|
## Schematic Elements
|
|
2335
2698
|
|
|
2336
2699
|
### SchematicArc
|
|
@@ -2344,7 +2707,8 @@ Draws a styled arc on the schematic
|
|
|
2344
2707
|
interface SchematicArc {
|
|
2345
2708
|
type: "schematic_arc"
|
|
2346
2709
|
schematic_arc_id: string
|
|
2347
|
-
schematic_component_id
|
|
2710
|
+
schematic_component_id?: string
|
|
2711
|
+
schematic_symbol_id?: string
|
|
2348
2712
|
center: Point
|
|
2349
2713
|
radius: number
|
|
2350
2714
|
start_angle_degrees: number
|
|
@@ -2365,6 +2729,7 @@ interface SchematicArc {
|
|
|
2365
2729
|
interface SchematicBox {
|
|
2366
2730
|
type: "schematic_box"
|
|
2367
2731
|
schematic_component_id?: string
|
|
2732
|
+
schematic_symbol_id?: string
|
|
2368
2733
|
width: number
|
|
2369
2734
|
height: number
|
|
2370
2735
|
is_dashed: boolean
|
|
@@ -2385,7 +2750,8 @@ Draws a styled circle on the schematic
|
|
|
2385
2750
|
interface SchematicCircle {
|
|
2386
2751
|
type: "schematic_circle"
|
|
2387
2752
|
schematic_circle_id: string
|
|
2388
|
-
schematic_component_id
|
|
2753
|
+
schematic_component_id?: string
|
|
2754
|
+
schematic_symbol_id?: string
|
|
2389
2755
|
center: Point
|
|
2390
2756
|
radius: number
|
|
2391
2757
|
stroke_width?: number | null
|
|
@@ -2408,6 +2774,7 @@ interface SchematicComponent {
|
|
|
2408
2774
|
center: Point
|
|
2409
2775
|
source_component_id?: string
|
|
2410
2776
|
schematic_component_id: string
|
|
2777
|
+
schematic_symbol_id?: string
|
|
2411
2778
|
pin_spacing?: number
|
|
2412
2779
|
pin_styles?: Record<
|
|
2413
2780
|
string,
|
|
@@ -2494,11 +2861,10 @@ interface SchematicDebugPoint {
|
|
|
2494
2861
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_error.ts)
|
|
2495
2862
|
|
|
2496
2863
|
```typescript
|
|
2497
|
-
interface SchematicError {
|
|
2864
|
+
interface SchematicError extends BaseCircuitJsonError {
|
|
2498
2865
|
type: "schematic_error"
|
|
2499
2866
|
schematic_error_id: string
|
|
2500
2867
|
error_type: "schematic_port_not_found"
|
|
2501
|
-
message: string
|
|
2502
2868
|
subcircuit_id?: string
|
|
2503
2869
|
}
|
|
2504
2870
|
```
|
|
@@ -2532,11 +2898,10 @@ interface SchematicGroup {
|
|
|
2532
2898
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_layout_error.ts)
|
|
2533
2899
|
|
|
2534
2900
|
```typescript
|
|
2535
|
-
interface SchematicLayoutError {
|
|
2901
|
+
interface SchematicLayoutError extends BaseCircuitJsonError {
|
|
2536
2902
|
type: "schematic_layout_error"
|
|
2537
2903
|
schematic_layout_error_id: string
|
|
2538
2904
|
error_type: "schematic_layout_error"
|
|
2539
|
-
message: string
|
|
2540
2905
|
source_group_id: string
|
|
2541
2906
|
schematic_group_id: string
|
|
2542
2907
|
subcircuit_id?: string
|
|
@@ -2554,7 +2919,8 @@ Draws a styled line on the schematic
|
|
|
2554
2919
|
interface SchematicLine {
|
|
2555
2920
|
type: "schematic_line"
|
|
2556
2921
|
schematic_line_id: string
|
|
2557
|
-
schematic_component_id
|
|
2922
|
+
schematic_component_id?: string
|
|
2923
|
+
schematic_symbol_id?: string
|
|
2558
2924
|
x1: number
|
|
2559
2925
|
y1: number
|
|
2560
2926
|
x2: number
|
|
@@ -2619,9 +2985,13 @@ interface SchematicNetLabel {
|
|
|
2619
2985
|
```typescript
|
|
2620
2986
|
interface SchematicPath {
|
|
2621
2987
|
type: "schematic_path"
|
|
2622
|
-
|
|
2623
|
-
|
|
2988
|
+
schematic_path_id: string
|
|
2989
|
+
schematic_component_id?: string
|
|
2990
|
+
schematic_symbol_id?: string
|
|
2991
|
+
fill_color?: string
|
|
2624
2992
|
is_filled?: boolean
|
|
2993
|
+
stroke_width?: number | null
|
|
2994
|
+
stroke_color?: string
|
|
2625
2995
|
dash_length?: number
|
|
2626
2996
|
dash_gap?: number
|
|
2627
2997
|
points: Point[]
|
|
@@ -2650,6 +3020,7 @@ interface SchematicPort {
|
|
|
2650
3020
|
is_connected?: boolean
|
|
2651
3021
|
has_input_arrow?: boolean
|
|
2652
3022
|
has_output_arrow?: boolean
|
|
3023
|
+
is_drawn_with_inversion_circle?: boolean
|
|
2653
3024
|
}
|
|
2654
3025
|
```
|
|
2655
3026
|
|
|
@@ -2664,7 +3035,8 @@ Draws a styled rectangle on the schematic
|
|
|
2664
3035
|
interface SchematicRect {
|
|
2665
3036
|
type: "schematic_rect"
|
|
2666
3037
|
schematic_rect_id: string
|
|
2667
|
-
schematic_component_id
|
|
3038
|
+
schematic_component_id?: string
|
|
3039
|
+
schematic_symbol_id?: string
|
|
2668
3040
|
center: Point
|
|
2669
3041
|
width: number
|
|
2670
3042
|
height: number
|
|
@@ -2694,6 +3066,19 @@ interface SchematicSheet {
|
|
|
2694
3066
|
}
|
|
2695
3067
|
```
|
|
2696
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
|
+
|
|
2697
3082
|
### SchematicTable
|
|
2698
3083
|
|
|
2699
3084
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/schematic/schematic_table.ts)
|
|
@@ -2751,6 +3136,7 @@ interface SchematicTableCell {
|
|
|
2751
3136
|
interface SchematicText {
|
|
2752
3137
|
type: "schematic_text"
|
|
2753
3138
|
schematic_component_id?: string
|
|
3139
|
+
schematic_symbol_id?: string
|
|
2754
3140
|
schematic_text_id: string
|
|
2755
3141
|
text: string
|
|
2756
3142
|
font_size: number
|
|
@@ -2806,6 +3192,46 @@ interface SchematicVoltageProbe {
|
|
|
2806
3192
|
|
|
2807
3193
|
## Simulation Elements
|
|
2808
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
|
+
|
|
2809
3235
|
### SimulationExperiment
|
|
2810
3236
|
|
|
2811
3237
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_experiment.ts)
|
|
@@ -2822,6 +3248,26 @@ interface SimulationExperiment {
|
|
|
2822
3248
|
}
|
|
2823
3249
|
```
|
|
2824
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
|
+
|
|
2825
3271
|
### SimulationSwitch
|
|
2826
3272
|
|
|
2827
3273
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_switch.ts)
|
|
@@ -2867,11 +3313,10 @@ An unknown error occurred during the simulation experiment.
|
|
|
2867
3313
|
|
|
2868
3314
|
```typescript
|
|
2869
3315
|
/** An unknown error occurred during the simulation experiment. */
|
|
2870
|
-
interface SimulationUnknownExperimentError {
|
|
3316
|
+
interface SimulationUnknownExperimentError extends BaseCircuitJsonError {
|
|
2871
3317
|
type: "simulation_unknown_experiment_error"
|
|
2872
3318
|
simulation_unknown_experiment_error_id: string
|
|
2873
3319
|
error_type: "simulation_unknown_experiment_error"
|
|
2874
|
-
message: string
|
|
2875
3320
|
simulation_experiment_id?: string
|
|
2876
3321
|
subcircuit_id?: string
|
|
2877
3322
|
}
|