easyeda 0.0.321 → 0.0.322
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/dist/browser/index.js +348 -7
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +1645 -1290
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +2372 -4519
- package/dist/main.cjs.map +1 -1
- package/package.json +4 -4
package/dist/browser/index.js
CHANGED
|
@@ -100,6 +100,7 @@ __export(dist_exports, {
|
|
|
100
100
|
pcb_note_path: () => pcb_note_path,
|
|
101
101
|
pcb_note_rect: () => pcb_note_rect,
|
|
102
102
|
pcb_note_text: () => pcb_note_text,
|
|
103
|
+
pcb_packing_error: () => pcb_packing_error,
|
|
103
104
|
pcb_pad_pad_clearance_error: () => pcb_pad_pad_clearance_error,
|
|
104
105
|
pcb_pad_trace_clearance_error: () => pcb_pad_trace_clearance_error,
|
|
105
106
|
pcb_panel: () => pcb_panel,
|
|
@@ -133,6 +134,7 @@ __export(dist_exports, {
|
|
|
133
134
|
pcb_trace_route_point_through_pad: () => pcb_trace_route_point_through_pad,
|
|
134
135
|
pcb_trace_route_point_via: () => pcb_trace_route_point_via,
|
|
135
136
|
pcb_trace_route_point_wire: () => pcb_trace_route_point_wire,
|
|
137
|
+
pcb_trace_too_long_warning: () => pcb_trace_too_long_warning,
|
|
136
138
|
pcb_trace_warning: () => pcb_trace_warning,
|
|
137
139
|
pcb_via: () => pcb_via,
|
|
138
140
|
pcb_via_clearance_error: () => pcb_via_clearance_error,
|
|
@@ -151,6 +153,7 @@ __export(dist_exports, {
|
|
|
151
153
|
schematic_box: () => schematic_box,
|
|
152
154
|
schematic_circle: () => schematic_circle,
|
|
153
155
|
schematic_component: () => schematic_component,
|
|
156
|
+
schematic_component_overlap_warning: () => schematic_component_overlap_warning,
|
|
154
157
|
schematic_component_port_arrangement_by_sides: () => schematic_component_port_arrangement_by_sides,
|
|
155
158
|
schematic_component_port_arrangement_by_size: () => schematic_component_port_arrangement_by_size,
|
|
156
159
|
schematic_debug_line: () => schematic_debug_line,
|
|
@@ -158,6 +161,7 @@ __export(dist_exports, {
|
|
|
158
161
|
schematic_debug_object_base: () => schematic_debug_object_base,
|
|
159
162
|
schematic_debug_point: () => schematic_debug_point,
|
|
160
163
|
schematic_debug_rect: () => schematic_debug_rect,
|
|
164
|
+
schematic_element_outside_sheet_warning: () => schematic_element_outside_sheet_warning,
|
|
161
165
|
schematic_error: () => schematic_error,
|
|
162
166
|
schematic_group: () => schematic_group,
|
|
163
167
|
schematic_layout_error: () => schematic_layout_error,
|
|
@@ -176,14 +180,26 @@ __export(dist_exports, {
|
|
|
176
180
|
schematic_trace: () => schematic_trace,
|
|
177
181
|
schematic_voltage_probe: () => schematic_voltage_probe,
|
|
178
182
|
simulation_ac_current_source: () => simulation_ac_current_source,
|
|
183
|
+
simulation_ac_sweep_current_graph: () => simulation_ac_sweep_current_graph,
|
|
184
|
+
simulation_ac_sweep_voltage_graph: () => simulation_ac_sweep_voltage_graph,
|
|
179
185
|
simulation_ac_voltage_source: () => simulation_ac_voltage_source,
|
|
186
|
+
simulation_complex_sample: () => simulation_complex_sample,
|
|
180
187
|
simulation_current_probe: () => simulation_current_probe,
|
|
181
188
|
simulation_current_source: () => simulation_current_source,
|
|
182
189
|
simulation_dc_current_source: () => simulation_dc_current_source,
|
|
190
|
+
simulation_dc_operating_point_current: () => simulation_dc_operating_point_current,
|
|
191
|
+
simulation_dc_operating_point_voltage: () => simulation_dc_operating_point_voltage,
|
|
192
|
+
simulation_dc_sweep_current_graph: () => simulation_dc_sweep_current_graph,
|
|
193
|
+
simulation_dc_sweep_unit: () => simulation_dc_sweep_unit,
|
|
194
|
+
simulation_dc_sweep_voltage_graph: () => simulation_dc_sweep_voltage_graph,
|
|
183
195
|
simulation_dc_voltage_source: () => simulation_dc_voltage_source,
|
|
184
196
|
simulation_experiment: () => simulation_experiment,
|
|
185
197
|
simulation_op_amp: () => simulation_op_amp,
|
|
186
198
|
simulation_oscilloscope_trace: () => simulation_oscilloscope_trace,
|
|
199
|
+
simulation_parameter_sweep: () => simulation_parameter_sweep,
|
|
200
|
+
simulation_parameter_sweep_coordinate: () => simulation_parameter_sweep_coordinate,
|
|
201
|
+
simulation_parameter_type: () => simulation_parameter_type,
|
|
202
|
+
simulation_parameter_unit: () => simulation_parameter_unit,
|
|
187
203
|
simulation_spice_subcircuit: () => simulation_spice_subcircuit,
|
|
188
204
|
simulation_switch: () => simulation_switch,
|
|
189
205
|
simulation_transient_current_graph: () => simulation_transient_current_graph,
|
|
@@ -4681,6 +4697,8 @@ var pcbRenderLayer = external_exports.enum([
|
|
|
4681
4697
|
"inner4_copper",
|
|
4682
4698
|
"inner5_copper",
|
|
4683
4699
|
"inner6_copper",
|
|
4700
|
+
"inner7_copper",
|
|
4701
|
+
"inner8_copper",
|
|
4684
4702
|
"edge_cuts",
|
|
4685
4703
|
"drill"
|
|
4686
4704
|
]);
|
|
@@ -5027,6 +5045,7 @@ var source_project_metadata = external_exports.object({
|
|
|
5027
5045
|
name: external_exports.string().optional(),
|
|
5028
5046
|
software_used_string: external_exports.string().optional(),
|
|
5029
5047
|
project_url: external_exports.string().optional(),
|
|
5048
|
+
source_filesystem_md5_hash: external_exports.string().optional(),
|
|
5030
5049
|
created_at: timestamp.optional()
|
|
5031
5050
|
});
|
|
5032
5051
|
expectTypesMatch(true);
|
|
@@ -5331,7 +5350,9 @@ var all_layers = [
|
|
|
5331
5350
|
"inner3",
|
|
5332
5351
|
"inner4",
|
|
5333
5352
|
"inner5",
|
|
5334
|
-
"inner6"
|
|
5353
|
+
"inner6",
|
|
5354
|
+
"inner7",
|
|
5355
|
+
"inner8"
|
|
5335
5356
|
];
|
|
5336
5357
|
var layer_string = external_exports.enum(all_layers);
|
|
5337
5358
|
var layer_ref = layer_string.or(
|
|
@@ -5699,6 +5720,8 @@ var schematic_port = external_exports.object({
|
|
|
5699
5720
|
display_pin_label: external_exports.string().optional(),
|
|
5700
5721
|
subcircuit_id: external_exports.string().optional(),
|
|
5701
5722
|
is_connected: external_exports.boolean().optional(),
|
|
5723
|
+
is_internal_circuit_port: external_exports.boolean().optional(),
|
|
5724
|
+
is_overlapping_internal_circuit_port: external_exports.boolean().optional(),
|
|
5702
5725
|
has_input_arrow: external_exports.boolean().optional(),
|
|
5703
5726
|
has_output_arrow: external_exports.boolean().optional(),
|
|
5704
5727
|
is_drawn_with_inversion_circle: external_exports.boolean().optional()
|
|
@@ -5793,6 +5816,37 @@ var schematic_manual_edit_conflict_warning = external_exports.object({
|
|
|
5793
5816
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
5794
5817
|
);
|
|
5795
5818
|
expectTypesMatch(true);
|
|
5819
|
+
var schematic_component_overlap_warning = external_exports.object({
|
|
5820
|
+
type: external_exports.literal("schematic_component_overlap_warning"),
|
|
5821
|
+
schematic_component_overlap_warning_id: getZodPrefixedIdWithDefault(
|
|
5822
|
+
"schematic_component_overlap_warning"
|
|
5823
|
+
),
|
|
5824
|
+
warning_type: external_exports.literal("schematic_component_overlap_warning").default("schematic_component_overlap_warning"),
|
|
5825
|
+
message: external_exports.string(),
|
|
5826
|
+
schematic_component_ids: external_exports.tuple([external_exports.string(), external_exports.string()]),
|
|
5827
|
+
schematic_sheet_id: external_exports.string().optional()
|
|
5828
|
+
}).describe(
|
|
5829
|
+
"Warning emitted when the rendered bounds of two schematic components overlap"
|
|
5830
|
+
);
|
|
5831
|
+
expectTypesMatch(true);
|
|
5832
|
+
var schematic_element_outside_sheet_warning = external_exports.object({
|
|
5833
|
+
type: external_exports.literal("schematic_element_outside_sheet_warning"),
|
|
5834
|
+
schematic_element_outside_sheet_warning_id: getZodPrefixedIdWithDefault(
|
|
5835
|
+
"schematic_element_outside_sheet_warning"
|
|
5836
|
+
),
|
|
5837
|
+
warning_type: external_exports.literal("schematic_element_outside_sheet_warning").default("schematic_element_outside_sheet_warning"),
|
|
5838
|
+
message: external_exports.string(),
|
|
5839
|
+
schematic_sheet_id: external_exports.string(),
|
|
5840
|
+
schematic_element_type: external_exports.enum([
|
|
5841
|
+
"schematic_component",
|
|
5842
|
+
"schematic_net_label",
|
|
5843
|
+
"schematic_trace"
|
|
5844
|
+
]),
|
|
5845
|
+
schematic_element_id: external_exports.string()
|
|
5846
|
+
}).describe(
|
|
5847
|
+
"Warning emitted when a schematic component, net label, or trace extends outside its schematic sheet"
|
|
5848
|
+
);
|
|
5849
|
+
expectTypesMatch(true);
|
|
5796
5850
|
var schematic_group = external_exports.object({
|
|
5797
5851
|
type: external_exports.literal("schematic_group"),
|
|
5798
5852
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
@@ -6515,6 +6569,23 @@ var pcb_trace_warning = external_exports.object({
|
|
|
6515
6569
|
subcircuit_id: external_exports.string().optional()
|
|
6516
6570
|
}).describe("Defines a trace warning on the PCB");
|
|
6517
6571
|
expectTypesMatch(true);
|
|
6572
|
+
var pcb_trace_too_long_warning = external_exports.object({
|
|
6573
|
+
type: external_exports.literal("pcb_trace_too_long_warning"),
|
|
6574
|
+
pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
|
|
6575
|
+
"pcb_trace_too_long_warning"
|
|
6576
|
+
),
|
|
6577
|
+
warning_type: external_exports.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
|
|
6578
|
+
message: external_exports.string(),
|
|
6579
|
+
pcb_trace_id: external_exports.string(),
|
|
6580
|
+
source_net_id: external_exports.string().optional(),
|
|
6581
|
+
source_trace_id: external_exports.string().optional(),
|
|
6582
|
+
actual_trace_length: distance,
|
|
6583
|
+
maximum_trace_length: distance,
|
|
6584
|
+
subcircuit_id: external_exports.string().optional()
|
|
6585
|
+
}).describe(
|
|
6586
|
+
"Warning emitted when a PCB trace is longer than its maximum allowed length"
|
|
6587
|
+
);
|
|
6588
|
+
expectTypesMatch(true);
|
|
6518
6589
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
6519
6590
|
type: external_exports.literal("pcb_trace_error"),
|
|
6520
6591
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
@@ -6637,6 +6708,14 @@ var pcb_placement_error = base_circuit_json_error.extend({
|
|
|
6637
6708
|
subcircuit_id: external_exports.string().optional()
|
|
6638
6709
|
}).describe("Defines a placement error on the PCB");
|
|
6639
6710
|
expectTypesMatch(true);
|
|
6711
|
+
var pcb_packing_error = base_circuit_json_error.extend({
|
|
6712
|
+
type: external_exports.literal("pcb_packing_error"),
|
|
6713
|
+
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
6714
|
+
error_type: external_exports.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
6715
|
+
pcb_group_id: external_exports.string().optional(),
|
|
6716
|
+
subcircuit_id: external_exports.string().optional()
|
|
6717
|
+
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
6718
|
+
expectTypesMatch(true);
|
|
6640
6719
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
6641
6720
|
type: external_exports.literal("pcb_panelization_placement_error"),
|
|
6642
6721
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
@@ -7572,7 +7651,9 @@ var simulation_dc_voltage_source = external_exports.object({
|
|
|
7572
7651
|
negative_source_port_id: external_exports.string().optional(),
|
|
7573
7652
|
positive_source_net_id: external_exports.string().optional(),
|
|
7574
7653
|
negative_source_net_id: external_exports.string().optional(),
|
|
7575
|
-
voltage
|
|
7654
|
+
voltage,
|
|
7655
|
+
ac_magnitude: voltage.optional(),
|
|
7656
|
+
ac_phase: rotation.optional()
|
|
7576
7657
|
}).describe("Defines a DC voltage source for simulation");
|
|
7577
7658
|
var simulation_ac_voltage_source = external_exports.object({
|
|
7578
7659
|
type: external_exports.literal("simulation_voltage_source"),
|
|
@@ -7594,7 +7675,9 @@ var simulation_ac_voltage_source = external_exports.object({
|
|
|
7594
7675
|
rise_time: ms.optional(),
|
|
7595
7676
|
fall_time: ms.optional(),
|
|
7596
7677
|
pulse_width: ms.optional(),
|
|
7597
|
-
period: ms.optional()
|
|
7678
|
+
period: ms.optional(),
|
|
7679
|
+
ac_magnitude: voltage.optional(),
|
|
7680
|
+
ac_phase: rotation.optional()
|
|
7598
7681
|
}).describe("Defines an AC voltage source for simulation");
|
|
7599
7682
|
var simulation_voltage_source = external_exports.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
7600
7683
|
expectTypesMatch(true);
|
|
@@ -7621,7 +7704,9 @@ var simulation_dc_current_source = external_exports.object({
|
|
|
7621
7704
|
negative_source_port_id: external_exports.string().optional(),
|
|
7622
7705
|
positive_source_net_id: external_exports.string().optional(),
|
|
7623
7706
|
negative_source_net_id: external_exports.string().optional(),
|
|
7624
|
-
current
|
|
7707
|
+
current,
|
|
7708
|
+
ac_magnitude: current.optional(),
|
|
7709
|
+
ac_phase: rotation.optional()
|
|
7625
7710
|
}).describe("Defines a DC current source for simulation");
|
|
7626
7711
|
var simulation_ac_current_source = external_exports.object({
|
|
7627
7712
|
type: external_exports.literal("simulation_current_source"),
|
|
@@ -7638,12 +7723,20 @@ var simulation_ac_current_source = external_exports.object({
|
|
|
7638
7723
|
peak_to_peak_current: current.optional(),
|
|
7639
7724
|
wave_shape: wave_shape.optional(),
|
|
7640
7725
|
phase: rotation.optional(),
|
|
7641
|
-
duty_cycle: percentage2.optional()
|
|
7726
|
+
duty_cycle: percentage2.optional(),
|
|
7727
|
+
ac_magnitude: current.optional(),
|
|
7728
|
+
ac_phase: rotation.optional()
|
|
7642
7729
|
}).describe("Defines an AC current source for simulation");
|
|
7643
7730
|
var simulation_current_source = external_exports.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
7644
7731
|
expectTypesMatch(true);
|
|
7645
7732
|
expectTypesMatch(true);
|
|
7646
7733
|
expectTypesMatch(true);
|
|
7734
|
+
var simulation_dc_sweep_unit = external_exports.custom(
|
|
7735
|
+
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
7736
|
+
);
|
|
7737
|
+
var simulation_parameter_unit = external_exports.custom(
|
|
7738
|
+
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
7739
|
+
);
|
|
7647
7740
|
var experiment_type = external_exports.union([
|
|
7648
7741
|
external_exports.literal("spice_dc_sweep"),
|
|
7649
7742
|
external_exports.literal("spice_dc_operating_point"),
|
|
@@ -7666,15 +7759,98 @@ var simulation_experiment = external_exports.object({
|
|
|
7666
7759
|
time_per_step: duration_ms.optional(),
|
|
7667
7760
|
start_time_ms: ms.optional(),
|
|
7668
7761
|
end_time_ms: ms.optional(),
|
|
7669
|
-
spice_options: spice_simulation_options.optional()
|
|
7762
|
+
spice_options: spice_simulation_options.optional(),
|
|
7763
|
+
dc_sweep_voltage_source_id: external_exports.string().optional(),
|
|
7764
|
+
dc_sweep_current_source_id: external_exports.string().optional(),
|
|
7765
|
+
dc_sweep_start: external_exports.number().optional(),
|
|
7766
|
+
dc_sweep_stop: external_exports.number().optional(),
|
|
7767
|
+
dc_sweep_step: external_exports.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
7768
|
+
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
7769
|
+
ac_sweep_type: external_exports.enum(["linear", "decade", "octave"]).optional(),
|
|
7770
|
+
ac_samples_per_interval: external_exports.number().int().positive().optional(),
|
|
7771
|
+
ac_sample_count: external_exports.number().int().positive().optional(),
|
|
7772
|
+
ac_start_frequency_hz: external_exports.number().positive().optional(),
|
|
7773
|
+
ac_stop_frequency_hz: external_exports.number().positive().optional()
|
|
7774
|
+
}).superRefine((experiment, context) => {
|
|
7775
|
+
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
7776
|
+
const requiredFields = [
|
|
7777
|
+
"dc_sweep_start",
|
|
7778
|
+
"dc_sweep_stop",
|
|
7779
|
+
"dc_sweep_step",
|
|
7780
|
+
"dc_sweep_unit"
|
|
7781
|
+
];
|
|
7782
|
+
for (const field of requiredFields) {
|
|
7783
|
+
if (experiment[field] === void 0) {
|
|
7784
|
+
context.addIssue({
|
|
7785
|
+
code: external_exports.ZodIssueCode.custom,
|
|
7786
|
+
path: [field],
|
|
7787
|
+
message: `${field} is required for a DC sweep`
|
|
7788
|
+
});
|
|
7789
|
+
}
|
|
7790
|
+
}
|
|
7791
|
+
const hasVoltageSource = experiment.dc_sweep_voltage_source_id !== void 0;
|
|
7792
|
+
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
7793
|
+
if (hasVoltageSource === hasCurrentSource) {
|
|
7794
|
+
context.addIssue({
|
|
7795
|
+
code: external_exports.ZodIssueCode.custom,
|
|
7796
|
+
path: ["dc_sweep_voltage_source_id"],
|
|
7797
|
+
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
7798
|
+
});
|
|
7799
|
+
}
|
|
7800
|
+
}
|
|
7801
|
+
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
7802
|
+
if (experiment.ac_sweep_type === void 0) {
|
|
7803
|
+
context.addIssue({
|
|
7804
|
+
code: external_exports.ZodIssueCode.custom,
|
|
7805
|
+
path: ["ac_sweep_type"],
|
|
7806
|
+
message: "ac_sweep_type is required for an AC analysis"
|
|
7807
|
+
});
|
|
7808
|
+
}
|
|
7809
|
+
if (experiment.ac_start_frequency_hz === void 0) {
|
|
7810
|
+
context.addIssue({
|
|
7811
|
+
code: external_exports.ZodIssueCode.custom,
|
|
7812
|
+
path: ["ac_start_frequency_hz"],
|
|
7813
|
+
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
7814
|
+
});
|
|
7815
|
+
}
|
|
7816
|
+
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
7817
|
+
context.addIssue({
|
|
7818
|
+
code: external_exports.ZodIssueCode.custom,
|
|
7819
|
+
path: ["ac_stop_frequency_hz"],
|
|
7820
|
+
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
7821
|
+
});
|
|
7822
|
+
}
|
|
7823
|
+
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
7824
|
+
context.addIssue({
|
|
7825
|
+
code: external_exports.ZodIssueCode.custom,
|
|
7826
|
+
path: ["ac_sample_count"],
|
|
7827
|
+
message: "ac_sample_count is required for a linear AC analysis"
|
|
7828
|
+
});
|
|
7829
|
+
}
|
|
7830
|
+
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
7831
|
+
context.addIssue({
|
|
7832
|
+
code: external_exports.ZodIssueCode.custom,
|
|
7833
|
+
path: ["ac_samples_per_interval"],
|
|
7834
|
+
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
7835
|
+
});
|
|
7836
|
+
}
|
|
7837
|
+
}
|
|
7670
7838
|
}).describe("Defines a simulation experiment configuration");
|
|
7671
7839
|
expectTypesMatch(true);
|
|
7840
|
+
var simulation_parameter_sweep_coordinate = external_exports.object({
|
|
7841
|
+
simulation_parameter_sweep_id: external_exports.string(),
|
|
7842
|
+
sweep_index: external_exports.number().int().nonnegative(),
|
|
7843
|
+
parameter_value: external_exports.number(),
|
|
7844
|
+
parameter_unit: simulation_parameter_unit
|
|
7845
|
+
});
|
|
7846
|
+
expectTypesMatch(true);
|
|
7672
7847
|
var simulation_transient_voltage_graph = external_exports.object({
|
|
7673
7848
|
type: external_exports.literal("simulation_transient_voltage_graph"),
|
|
7674
7849
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
7675
7850
|
"simulation_transient_voltage_graph"
|
|
7676
7851
|
),
|
|
7677
7852
|
simulation_experiment_id: external_exports.string(),
|
|
7853
|
+
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
7678
7854
|
timestamps_ms: external_exports.array(external_exports.number()).optional(),
|
|
7679
7855
|
voltage_levels: external_exports.array(external_exports.number()),
|
|
7680
7856
|
source_component_id: external_exports.string().optional(),
|
|
@@ -7692,6 +7868,7 @@ var simulation_transient_current_graph = external_exports.object({
|
|
|
7692
7868
|
"simulation_transient_current_graph"
|
|
7693
7869
|
),
|
|
7694
7870
|
simulation_experiment_id: external_exports.string(),
|
|
7871
|
+
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
7695
7872
|
timestamps_ms: external_exports.array(external_exports.number()).optional(),
|
|
7696
7873
|
current_levels: external_exports.array(external_exports.number()),
|
|
7697
7874
|
source_component_id: external_exports.string().optional(),
|
|
@@ -7826,6 +8003,157 @@ var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
|
7826
8003
|
subcircuit_id: external_exports.string().optional()
|
|
7827
8004
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
7828
8005
|
expectTypesMatch(true);
|
|
8006
|
+
var simulation_parameter_type = external_exports.enum([
|
|
8007
|
+
"resistance",
|
|
8008
|
+
"capacitance",
|
|
8009
|
+
"inductance",
|
|
8010
|
+
"voltage",
|
|
8011
|
+
"current"
|
|
8012
|
+
]);
|
|
8013
|
+
var simulation_parameter_sweep_base = external_exports.object({
|
|
8014
|
+
type: external_exports.literal("simulation_parameter_sweep"),
|
|
8015
|
+
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
8016
|
+
"simulation_parameter_sweep"
|
|
8017
|
+
),
|
|
8018
|
+
simulation_experiment_id: external_exports.string(),
|
|
8019
|
+
name: external_exports.string().optional(),
|
|
8020
|
+
parameter_values: external_exports.array(external_exports.number()).min(1),
|
|
8021
|
+
parameter_unit: simulation_parameter_unit
|
|
8022
|
+
});
|
|
8023
|
+
var simulation_parameter_sweep = external_exports.discriminatedUnion("parameter_type", [
|
|
8024
|
+
simulation_parameter_sweep_base.extend({
|
|
8025
|
+
parameter_type: external_exports.literal("resistance"),
|
|
8026
|
+
resistor_source_component_id: external_exports.string()
|
|
8027
|
+
}),
|
|
8028
|
+
simulation_parameter_sweep_base.extend({
|
|
8029
|
+
parameter_type: external_exports.literal("capacitance"),
|
|
8030
|
+
capacitor_source_component_id: external_exports.string()
|
|
8031
|
+
}),
|
|
8032
|
+
simulation_parameter_sweep_base.extend({
|
|
8033
|
+
parameter_type: external_exports.literal("inductance"),
|
|
8034
|
+
inductor_source_component_id: external_exports.string()
|
|
8035
|
+
}),
|
|
8036
|
+
simulation_parameter_sweep_base.extend({
|
|
8037
|
+
parameter_type: external_exports.literal("voltage"),
|
|
8038
|
+
source_net_id: external_exports.string()
|
|
8039
|
+
}),
|
|
8040
|
+
simulation_parameter_sweep_base.extend({
|
|
8041
|
+
parameter_type: external_exports.literal("current"),
|
|
8042
|
+
current_source_component_id: external_exports.string()
|
|
8043
|
+
})
|
|
8044
|
+
]).describe("Repeats a simulation experiment over component parameter values");
|
|
8045
|
+
expectTypesMatch(
|
|
8046
|
+
true
|
|
8047
|
+
);
|
|
8048
|
+
var simulation_dc_operating_point_voltage = external_exports.object({
|
|
8049
|
+
type: external_exports.literal("simulation_dc_operating_point_voltage"),
|
|
8050
|
+
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
8051
|
+
"simulation_dc_operating_point_voltage"
|
|
8052
|
+
),
|
|
8053
|
+
simulation_experiment_id: external_exports.string(),
|
|
8054
|
+
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
8055
|
+
simulation_voltage_probe_id: external_exports.string(),
|
|
8056
|
+
voltage: external_exports.number(),
|
|
8057
|
+
name: external_exports.string().optional(),
|
|
8058
|
+
color: external_exports.string().optional()
|
|
8059
|
+
});
|
|
8060
|
+
expectTypesMatch(true);
|
|
8061
|
+
var simulation_dc_operating_point_current = external_exports.object({
|
|
8062
|
+
type: external_exports.literal("simulation_dc_operating_point_current"),
|
|
8063
|
+
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
8064
|
+
"simulation_dc_operating_point_current"
|
|
8065
|
+
),
|
|
8066
|
+
simulation_experiment_id: external_exports.string(),
|
|
8067
|
+
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
8068
|
+
simulation_current_probe_id: external_exports.string(),
|
|
8069
|
+
current: external_exports.number(),
|
|
8070
|
+
name: external_exports.string().optional(),
|
|
8071
|
+
color: external_exports.string().optional()
|
|
8072
|
+
});
|
|
8073
|
+
expectTypesMatch(true);
|
|
8074
|
+
var simulation_dc_sweep_voltage_graph = external_exports.object({
|
|
8075
|
+
type: external_exports.literal("simulation_dc_sweep_voltage_graph"),
|
|
8076
|
+
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
8077
|
+
"simulation_dc_sweep_voltage_graph"
|
|
8078
|
+
),
|
|
8079
|
+
simulation_experiment_id: external_exports.string(),
|
|
8080
|
+
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
8081
|
+
simulation_voltage_probe_id: external_exports.string(),
|
|
8082
|
+
sweep_values: external_exports.array(external_exports.number()),
|
|
8083
|
+
sweep_unit: simulation_dc_sweep_unit,
|
|
8084
|
+
voltage_levels: external_exports.array(external_exports.number()),
|
|
8085
|
+
name: external_exports.string().optional(),
|
|
8086
|
+
color: external_exports.string().optional()
|
|
8087
|
+
}).refine(
|
|
8088
|
+
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
8089
|
+
{
|
|
8090
|
+
message: "sweep_values and voltage_levels must have the same length"
|
|
8091
|
+
}
|
|
8092
|
+
);
|
|
8093
|
+
expectTypesMatch(true);
|
|
8094
|
+
var simulation_dc_sweep_current_graph = external_exports.object({
|
|
8095
|
+
type: external_exports.literal("simulation_dc_sweep_current_graph"),
|
|
8096
|
+
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
8097
|
+
"simulation_dc_sweep_current_graph"
|
|
8098
|
+
),
|
|
8099
|
+
simulation_experiment_id: external_exports.string(),
|
|
8100
|
+
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
8101
|
+
simulation_current_probe_id: external_exports.string(),
|
|
8102
|
+
sweep_values: external_exports.array(external_exports.number()),
|
|
8103
|
+
sweep_unit: simulation_dc_sweep_unit,
|
|
8104
|
+
current_levels: external_exports.array(external_exports.number()),
|
|
8105
|
+
name: external_exports.string().optional(),
|
|
8106
|
+
color: external_exports.string().optional()
|
|
8107
|
+
}).refine(
|
|
8108
|
+
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
8109
|
+
{
|
|
8110
|
+
message: "sweep_values and current_levels must have the same length"
|
|
8111
|
+
}
|
|
8112
|
+
);
|
|
8113
|
+
expectTypesMatch(true);
|
|
8114
|
+
var simulation_complex_sample = external_exports.object({
|
|
8115
|
+
re: external_exports.number(),
|
|
8116
|
+
im: external_exports.number()
|
|
8117
|
+
});
|
|
8118
|
+
expectTypesMatch(true);
|
|
8119
|
+
var simulation_ac_sweep_voltage_graph = external_exports.object({
|
|
8120
|
+
type: external_exports.literal("simulation_ac_sweep_voltage_graph"),
|
|
8121
|
+
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
8122
|
+
"simulation_ac_sweep_voltage_graph"
|
|
8123
|
+
),
|
|
8124
|
+
simulation_experiment_id: external_exports.string(),
|
|
8125
|
+
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
8126
|
+
simulation_voltage_probe_id: external_exports.string(),
|
|
8127
|
+
frequencies_hz: external_exports.array(external_exports.number()),
|
|
8128
|
+
complex_voltages: external_exports.array(simulation_complex_sample),
|
|
8129
|
+
name: external_exports.string().optional(),
|
|
8130
|
+
color: external_exports.string().optional()
|
|
8131
|
+
}).refine(
|
|
8132
|
+
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
8133
|
+
{
|
|
8134
|
+
message: "frequencies_hz and complex_voltages must have the same length"
|
|
8135
|
+
}
|
|
8136
|
+
);
|
|
8137
|
+
expectTypesMatch(true);
|
|
8138
|
+
var simulation_ac_sweep_current_graph = external_exports.object({
|
|
8139
|
+
type: external_exports.literal("simulation_ac_sweep_current_graph"),
|
|
8140
|
+
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
8141
|
+
"simulation_ac_sweep_current_graph"
|
|
8142
|
+
),
|
|
8143
|
+
simulation_experiment_id: external_exports.string(),
|
|
8144
|
+
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
8145
|
+
simulation_current_probe_id: external_exports.string(),
|
|
8146
|
+
frequencies_hz: external_exports.array(external_exports.number()),
|
|
8147
|
+
complex_currents: external_exports.array(simulation_complex_sample),
|
|
8148
|
+
name: external_exports.string().optional(),
|
|
8149
|
+
color: external_exports.string().optional()
|
|
8150
|
+
}).refine(
|
|
8151
|
+
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
8152
|
+
{
|
|
8153
|
+
message: "frequencies_hz and complex_currents must have the same length"
|
|
8154
|
+
}
|
|
8155
|
+
);
|
|
8156
|
+
expectTypesMatch(true);
|
|
7829
8157
|
var simulation_op_amp = external_exports.object({
|
|
7830
8158
|
type: external_exports.literal("simulation_op_amp"),
|
|
7831
8159
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
@@ -7955,6 +8283,7 @@ var any_circuit_element = external_exports.union([
|
|
|
7955
8283
|
pcb_text,
|
|
7956
8284
|
pcb_trace,
|
|
7957
8285
|
pcb_trace_warning,
|
|
8286
|
+
pcb_trace_too_long_warning,
|
|
7958
8287
|
pcb_via,
|
|
7959
8288
|
pcb_smtpad,
|
|
7960
8289
|
pcb_solder_paste,
|
|
@@ -7974,6 +8303,7 @@ var any_circuit_element = external_exports.union([
|
|
|
7974
8303
|
pcb_trace_error,
|
|
7975
8304
|
pcb_trace_missing_error,
|
|
7976
8305
|
pcb_placement_error,
|
|
8306
|
+
pcb_packing_error,
|
|
7977
8307
|
pcb_panelization_placement_error,
|
|
7978
8308
|
pcb_port_not_matched_error,
|
|
7979
8309
|
pcb_port_not_connected_error,
|
|
@@ -8024,6 +8354,8 @@ var any_circuit_element = external_exports.union([
|
|
|
8024
8354
|
schematic_debug_object,
|
|
8025
8355
|
schematic_voltage_probe,
|
|
8026
8356
|
schematic_manual_edit_conflict_warning,
|
|
8357
|
+
schematic_component_overlap_warning,
|
|
8358
|
+
schematic_element_outside_sheet_warning,
|
|
8027
8359
|
schematic_group,
|
|
8028
8360
|
schematic_sheet,
|
|
8029
8361
|
schematic_table,
|
|
@@ -8034,6 +8366,13 @@ var any_circuit_element = external_exports.union([
|
|
|
8034
8366
|
simulation_experiment,
|
|
8035
8367
|
simulation_transient_voltage_graph,
|
|
8036
8368
|
simulation_transient_current_graph,
|
|
8369
|
+
simulation_dc_operating_point_voltage,
|
|
8370
|
+
simulation_dc_operating_point_current,
|
|
8371
|
+
simulation_dc_sweep_voltage_graph,
|
|
8372
|
+
simulation_dc_sweep_current_graph,
|
|
8373
|
+
simulation_ac_sweep_voltage_graph,
|
|
8374
|
+
simulation_ac_sweep_current_graph,
|
|
8375
|
+
simulation_parameter_sweep,
|
|
8037
8376
|
simulation_switch,
|
|
8038
8377
|
simulation_voltage_probe,
|
|
8039
8378
|
simulation_current_probe,
|
|
@@ -9249,7 +9588,7 @@ var transformPCBElements = (elms, matrix) => {
|
|
|
9249
9588
|
let transformedElms = elms.map((elm) => transformPCBElement(elm, matrix));
|
|
9250
9589
|
if (flipPadWidthHeight) {
|
|
9251
9590
|
transformedElms = transformedElms.map((elm) => {
|
|
9252
|
-
if (elm.type === "pcb_smtpad" && elm.shape === "rect") {
|
|
9591
|
+
if (elm.type === "pcb_smtpad" && (elm.shape === "rect" || elm.shape === "pill")) {
|
|
9253
9592
|
;
|
|
9254
9593
|
[elm.width, elm.height] = [elm.height, elm.width];
|
|
9255
9594
|
}
|
|
@@ -10997,6 +11336,8 @@ var parsePin = (pinString) => {
|
|
|
10997
11336
|
if (label.endsWith("-")) label = `${label.slice(0, -1)}_NEG`;
|
|
10998
11337
|
label = normalizeActiveLowPinLabel(label);
|
|
10999
11338
|
if (/^\+\d+(?:\.\d+)?V$/i.test(label)) label = `V${label.slice(1, -1)}`;
|
|
11339
|
+
if (label.startsWith("+")) label = `${label.slice(1)}_POS`;
|
|
11340
|
+
if (label.startsWith("-")) label = `${label.slice(1)}_NEG`;
|
|
11000
11341
|
const colorMatch = pinString.match(/#[0-9A-F]{6}/);
|
|
11001
11342
|
const labelColor = colorMatch ? colorMatch[0] : "";
|
|
11002
11343
|
const path = pinString.split("^^")[2]?.split("~")[0] ?? "";
|