circuit-json 0.0.521 → 0.0.523
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 +211 -0
- package/dist/index.d.mts +4683 -1425
- package/dist/index.mjs +612 -243
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -113,6 +113,7 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
113
113
|
- [CAD Components](#cad-components)
|
|
114
114
|
- [CadCable](#cadcable)
|
|
115
115
|
- [CadComponent](#cadcomponent)
|
|
116
|
+
- [CadReferenceSurface](#cadreferencesurface)
|
|
116
117
|
- [PCB Elements](#pcb-elements)
|
|
117
118
|
- [PcbFabricatorExtraChargeWarning](#pcbfabricatorextrachargewarning)
|
|
118
119
|
- [PcbAutoroutingError](#pcbautoroutingerror)
|
|
@@ -219,6 +220,8 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
219
220
|
- [SchematicTrace](#schematictrace)
|
|
220
221
|
- [SchematicVoltageProbe](#schematicvoltageprobe)
|
|
221
222
|
- [Simulation Elements](#simulation-elements)
|
|
223
|
+
- [SimulationReturnCurrentContact](#simulationreturncurrentcontact)
|
|
224
|
+
- [SimulationReturnCurrentGridJson](#simulationreturncurrentgridjson)
|
|
222
225
|
- [SimulationAcSweepCurrentGraph](#simulationacsweepcurrentgraph)
|
|
223
226
|
- [SimulationAcSweepVoltageGraph](#simulationacsweepvoltagegraph)
|
|
224
227
|
- [SimulationAnalysisResult](#simulationanalysisresult)
|
|
@@ -234,8 +237,14 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
234
237
|
- [SimulationOscilloscopeTrace](#simulationoscilloscopetrace)
|
|
235
238
|
- [SimulationParameterSweep](#simulationparametersweep)
|
|
236
239
|
- [SimulationParameterSweepCoordinate](#simulationparametersweepcoordinate)
|
|
240
|
+
- [SimulationPcbReturnCurrentField](#simulationpcbreturncurrentfield)
|
|
241
|
+
- [SimulationPcbReturnCurrentHeatmap](#simulationpcbreturncurrentheatmap)
|
|
242
|
+
- [SimulationPcbReturnCurrentMarker](#simulationpcbreturncurrentmarker)
|
|
243
|
+
- [SimulationPcbReturnCurrentResult](#simulationpcbreturncurrentresult)
|
|
244
|
+
- [SimulationReturnCurrentExcitation](#simulationreturncurrentexcitation)
|
|
237
245
|
- [SimulationSpiceSubcircuit](#simulationspicesubcircuit)
|
|
238
246
|
- [SimulationSwitch](#simulationswitch)
|
|
247
|
+
- [SimulationTerminalPort](#simulationterminalport)
|
|
239
248
|
- [SimulationTransientCurrentGraph](#simulationtransientcurrentgraph)
|
|
240
249
|
- [SimulationTransientVoltageGraph](#simulationtransientvoltagegraph)
|
|
241
250
|
- [SimulationUnknownExperimentError](#simulationunknownexperimenterror)
|
|
@@ -1516,6 +1525,32 @@ interface CadComponent {
|
|
|
1516
1525
|
}
|
|
1517
1526
|
```
|
|
1518
1527
|
|
|
1528
|
+
### CadReferenceSurface
|
|
1529
|
+
|
|
1530
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/cad/cad_reference_surface.ts)
|
|
1531
|
+
|
|
1532
|
+
```typescript
|
|
1533
|
+
/** Resolved reference frame in right-handed circuit world: +X right, +Y top,
|
|
1534
|
+
* +Z above. Center and extents are mm; normal and x_axis are dimensionless,
|
|
1535
|
+
* perpendicular unit directions, within 1e-6 numerical tolerance. The frame's
|
|
1536
|
+
* Y direction is normal cross x_axis. Names are unique within source_component_id.
|
|
1537
|
+
* Width and height are both present or both omitted; omission adds no default.
|
|
1538
|
+
* This record describes mounting reference geometry for optional visualization. */
|
|
1539
|
+
interface CadReferenceSurface {
|
|
1540
|
+
type: "cad_reference_surface"
|
|
1541
|
+
cad_reference_surface_id: string
|
|
1542
|
+
source_component_id: string
|
|
1543
|
+
name: string
|
|
1544
|
+
shape: "rect"
|
|
1545
|
+
center: Point3
|
|
1546
|
+
normal: Point3
|
|
1547
|
+
x_axis: Point3
|
|
1548
|
+
width?: number
|
|
1549
|
+
height?: number
|
|
1550
|
+
subcircuit_id?: string
|
|
1551
|
+
}
|
|
1552
|
+
```
|
|
1553
|
+
|
|
1519
1554
|
## PCB Elements
|
|
1520
1555
|
|
|
1521
1556
|
### PcbFabricatorExtraChargeWarning
|
|
@@ -4134,6 +4169,53 @@ interface SchematicVoltageProbe {
|
|
|
4134
4169
|
|
|
4135
4170
|
## Simulation Elements
|
|
4136
4171
|
|
|
4172
|
+
### SimulationReturnCurrentContact
|
|
4173
|
+
|
|
4174
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_return_current_contact.ts)
|
|
4175
|
+
|
|
4176
|
+
```typescript
|
|
4177
|
+
interface SimulationReturnCurrentContactBase {
|
|
4178
|
+
x: number
|
|
4179
|
+
y: number
|
|
4180
|
+
layer: LayerRef
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
interface SimulationReturnCurrentPortContact extends SimulationReturnCurrentContactBase {
|
|
4184
|
+
contact_type: "pcb_port"
|
|
4185
|
+
pcb_port_id: string
|
|
4186
|
+
}
|
|
4187
|
+
|
|
4188
|
+
interface SimulationReturnCurrentViaContact extends SimulationReturnCurrentContactBase {
|
|
4189
|
+
contact_type: "pcb_via"
|
|
4190
|
+
pcb_via_id: string
|
|
4191
|
+
}
|
|
4192
|
+
|
|
4193
|
+
interface SimulationReturnCurrentCopperPourContact extends SimulationReturnCurrentContactBase {
|
|
4194
|
+
contact_type: "pcb_copper_pour"
|
|
4195
|
+
pcb_copper_pour_id: string
|
|
4196
|
+
}
|
|
4197
|
+
```
|
|
4198
|
+
|
|
4199
|
+
### SimulationReturnCurrentGridJson
|
|
4200
|
+
|
|
4201
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_return_current_grid_json.ts)
|
|
4202
|
+
|
|
4203
|
+
```typescript
|
|
4204
|
+
type SimulationReturnCurrentGridJson =
|
|
4205
|
+
| {
|
|
4206
|
+
field_type: "real"
|
|
4207
|
+
sheet_current_x: (number | null)[]
|
|
4208
|
+
sheet_current_y: (number | null)[]
|
|
4209
|
+
}
|
|
4210
|
+
| {
|
|
4211
|
+
field_type: "complex_phasor"
|
|
4212
|
+
sheet_current_x_real: (number | null)[]
|
|
4213
|
+
sheet_current_x_imag: (number | null)[]
|
|
4214
|
+
sheet_current_y_real: (number | null)[]
|
|
4215
|
+
sheet_current_y_imag: (number | null)[]
|
|
4216
|
+
}
|
|
4217
|
+
```
|
|
4218
|
+
|
|
4137
4219
|
### SimulationAcSweepCurrentGraph
|
|
4138
4220
|
|
|
4139
4221
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_ac_sweep_current_graph.ts)
|
|
@@ -4483,6 +4565,122 @@ interface SimulationParameterSweepCoordinate {
|
|
|
4483
4565
|
}
|
|
4484
4566
|
```
|
|
4485
4567
|
|
|
4568
|
+
### SimulationPcbReturnCurrentField
|
|
4569
|
+
|
|
4570
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_pcb_return_current_field.ts)
|
|
4571
|
+
|
|
4572
|
+
```typescript
|
|
4573
|
+
interface SimulationPcbReturnCurrentField {
|
|
4574
|
+
type: "simulation_pcb_return_current_field"
|
|
4575
|
+
simulation_pcb_return_current_field_id: string
|
|
4576
|
+
simulation_pcb_return_current_result_id: string
|
|
4577
|
+
layer: LayerRef
|
|
4578
|
+
source_net_id: string
|
|
4579
|
+
field_type: "real" | "complex_phasor"
|
|
4580
|
+
min_x: number
|
|
4581
|
+
min_y: number
|
|
4582
|
+
columns: number
|
|
4583
|
+
rows: number
|
|
4584
|
+
cell_width: number
|
|
4585
|
+
cell_height: number
|
|
4586
|
+
copper_thickness: number
|
|
4587
|
+
data_format: "simulation_return_current_grid_json_v1"
|
|
4588
|
+
field_asset: Asset
|
|
4589
|
+
}
|
|
4590
|
+
```
|
|
4591
|
+
|
|
4592
|
+
### SimulationPcbReturnCurrentHeatmap
|
|
4593
|
+
|
|
4594
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_pcb_return_current_heatmap.ts)
|
|
4595
|
+
|
|
4596
|
+
```typescript
|
|
4597
|
+
interface SimulationPcbReturnCurrentHeatmap {
|
|
4598
|
+
type: "simulation_pcb_return_current_heatmap"
|
|
4599
|
+
simulation_pcb_return_current_heatmap_id: string
|
|
4600
|
+
simulation_pcb_return_current_result_id: string
|
|
4601
|
+
layer: LayerRef
|
|
4602
|
+
source_net_id: string
|
|
4603
|
+
min_x: number
|
|
4604
|
+
min_y: number
|
|
4605
|
+
max_x: number
|
|
4606
|
+
max_y: number
|
|
4607
|
+
image_asset: Asset
|
|
4608
|
+
}
|
|
4609
|
+
```
|
|
4610
|
+
|
|
4611
|
+
### SimulationPcbReturnCurrentMarker
|
|
4612
|
+
|
|
4613
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_pcb_return_current_marker.ts)
|
|
4614
|
+
|
|
4615
|
+
```typescript
|
|
4616
|
+
type SimulationPcbReturnCurrentMarker =
|
|
4617
|
+
| SimulationPcbReturnCurrentPortMarker
|
|
4618
|
+
| SimulationPcbReturnCurrentViaMarker
|
|
4619
|
+
|
|
4620
|
+
interface SimulationReturnCurrentMarkerBase {
|
|
4621
|
+
type: "simulation_pcb_return_current_marker"
|
|
4622
|
+
simulation_pcb_return_current_marker_id: string
|
|
4623
|
+
simulation_pcb_return_current_result_id: string
|
|
4624
|
+
role:
|
|
4625
|
+
| "signal_source"
|
|
4626
|
+
| "signal_load"
|
|
4627
|
+
| "return_source"
|
|
4628
|
+
| "return_sink"
|
|
4629
|
+
| "signal_transition"
|
|
4630
|
+
| "return_transition"
|
|
4631
|
+
label?: string
|
|
4632
|
+
label_x?: number
|
|
4633
|
+
label_y?: number
|
|
4634
|
+
}
|
|
4635
|
+
|
|
4636
|
+
interface SimulationPcbReturnCurrentPortMarker extends SimulationReturnCurrentMarkerBase {
|
|
4637
|
+
target_type: "pcb_port"
|
|
4638
|
+
pcb_port_id: string
|
|
4639
|
+
layer: LayerRef
|
|
4640
|
+
}
|
|
4641
|
+
|
|
4642
|
+
interface SimulationPcbReturnCurrentViaMarker extends SimulationReturnCurrentMarkerBase {
|
|
4643
|
+
target_type: "pcb_via"
|
|
4644
|
+
pcb_via_id: string
|
|
4645
|
+
from_layer: LayerRef
|
|
4646
|
+
to_layer: LayerRef
|
|
4647
|
+
}
|
|
4648
|
+
```
|
|
4649
|
+
|
|
4650
|
+
### SimulationPcbReturnCurrentResult
|
|
4651
|
+
|
|
4652
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_pcb_return_current_result.ts)
|
|
4653
|
+
|
|
4654
|
+
```typescript
|
|
4655
|
+
interface SimulationPcbReturnCurrentResult {
|
|
4656
|
+
type: "simulation_pcb_return_current_result"
|
|
4657
|
+
simulation_pcb_return_current_result_id: string
|
|
4658
|
+
simulation_experiment_id: string
|
|
4659
|
+
pcb_board_id: string
|
|
4660
|
+
simulation_return_current_excitation_ids: string[]
|
|
4661
|
+
frequency_hz?: number
|
|
4662
|
+
}
|
|
4663
|
+
```
|
|
4664
|
+
|
|
4665
|
+
### SimulationReturnCurrentExcitation
|
|
4666
|
+
|
|
4667
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_return_current_excitation.ts)
|
|
4668
|
+
|
|
4669
|
+
```typescript
|
|
4670
|
+
interface SimulationReturnCurrentExcitation {
|
|
4671
|
+
type: "simulation_return_current_excitation"
|
|
4672
|
+
simulation_return_current_excitation_id: string
|
|
4673
|
+
simulation_experiment_id: string
|
|
4674
|
+
pcb_trace_id: string
|
|
4675
|
+
ground_source_net_id: string
|
|
4676
|
+
current: number
|
|
4677
|
+
return_source: SimulationReturnCurrentContact
|
|
4678
|
+
return_sink: SimulationReturnCurrentContact
|
|
4679
|
+
source_port?: SimulationTerminalPort
|
|
4680
|
+
load_port?: SimulationTerminalPort
|
|
4681
|
+
}
|
|
4682
|
+
```
|
|
4683
|
+
|
|
4486
4684
|
### SimulationSpiceSubcircuit
|
|
4487
4685
|
|
|
4488
4686
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_spice_subcircuit.ts)
|
|
@@ -4522,6 +4720,19 @@ interface SimulationSwitch {
|
|
|
4522
4720
|
}
|
|
4523
4721
|
```
|
|
4524
4722
|
|
|
4723
|
+
### SimulationTerminalPort
|
|
4724
|
+
|
|
4725
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_terminal_port.ts)
|
|
4726
|
+
|
|
4727
|
+
```typescript
|
|
4728
|
+
interface SimulationTerminalPort {
|
|
4729
|
+
signal_pcb_port_id: string
|
|
4730
|
+
reference_pcb_port_id?: string
|
|
4731
|
+
reference_layer: LayerRef
|
|
4732
|
+
resistance: number
|
|
4733
|
+
}
|
|
4734
|
+
```
|
|
4735
|
+
|
|
4525
4736
|
### SimulationTransientCurrentGraph
|
|
4526
4737
|
|
|
4527
4738
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/simulation/simulation_transient_current_graph.ts)
|