circuit-json 0.0.512 → 0.0.514
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 +70 -0
- package/dist/index.d.mts +2799 -9
- package/dist/index.mjs +1052 -903
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1207,12 +1207,43 @@ expectTypesMatch(true);
|
|
|
1207
1207
|
|
|
1208
1208
|
// src/source/source_bus.ts
|
|
1209
1209
|
import { z as z74 } from "zod";
|
|
1210
|
+
var route_length = z74.union([
|
|
1211
|
+
z74.number().nonnegative().finite(),
|
|
1212
|
+
z74.object({
|
|
1213
|
+
reference: z74.literal("longest_manhattan"),
|
|
1214
|
+
source_trace_ids: z74.array(z74.string()).min(1).optional(),
|
|
1215
|
+
offset: z74.number().finite().optional()
|
|
1216
|
+
})
|
|
1217
|
+
]);
|
|
1218
|
+
var trace_spacing = z74.union([
|
|
1219
|
+
z74.number().positive().finite(),
|
|
1220
|
+
z74.object({ width_multiplier: z74.number().positive().finite() })
|
|
1221
|
+
]);
|
|
1210
1222
|
var source_bus = z74.object({
|
|
1211
1223
|
type: z74.literal("source_bus"),
|
|
1212
1224
|
source_bus_id: z74.string(),
|
|
1213
1225
|
name: z74.string().optional(),
|
|
1214
1226
|
source_trace_ids: z74.array(z74.string()).min(1),
|
|
1215
1227
|
max_length_skew: z74.number().nonnegative().finite().optional(),
|
|
1228
|
+
target_impedance: z74.number().positive().finite().optional(),
|
|
1229
|
+
target_differential_impedance: z74.number().positive().finite().optional(),
|
|
1230
|
+
differential_pair: z74.object({
|
|
1231
|
+
positive_source_trace_id: z74.string(),
|
|
1232
|
+
negative_source_trace_id: z74.string(),
|
|
1233
|
+
trace_gap: z74.number().positive().finite().optional(),
|
|
1234
|
+
max_uncoupled_length: z74.number().nonnegative().finite().optional()
|
|
1235
|
+
}).optional(),
|
|
1236
|
+
length_match_source_trace_ids: z74.array(z74.string()).min(1).optional(),
|
|
1237
|
+
min_length: route_length.optional(),
|
|
1238
|
+
max_length: route_length.optional(),
|
|
1239
|
+
target_length: route_length.optional(),
|
|
1240
|
+
length_tolerance: z74.number().nonnegative().finite().optional(),
|
|
1241
|
+
pcb_trace_spacing: trace_spacing.optional(),
|
|
1242
|
+
pcb_spacing_to_other_signals: trace_spacing.optional(),
|
|
1243
|
+
target_impedance_min: z74.number().positive().finite().optional(),
|
|
1244
|
+
target_impedance_max: z74.number().positive().finite().optional(),
|
|
1245
|
+
target_differential_impedance_min: z74.number().positive().finite().optional(),
|
|
1246
|
+
target_differential_impedance_max: z74.number().positive().finite().optional(),
|
|
1216
1247
|
subcircuit_id: z74.string().optional()
|
|
1217
1248
|
});
|
|
1218
1249
|
expectTypesMatch(true);
|
|
@@ -2553,13 +2584,24 @@ var pcb_solder_paste_oval = z116.object({
|
|
|
2553
2584
|
pcb_component_id: z116.string().optional(),
|
|
2554
2585
|
pcb_smtpad_id: z116.string().optional()
|
|
2555
2586
|
});
|
|
2587
|
+
var pcb_solder_paste_polygon = polygon_shape.extend({
|
|
2588
|
+
type: z116.literal("pcb_solder_paste"),
|
|
2589
|
+
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2590
|
+
pcb_group_id: z116.string().optional(),
|
|
2591
|
+
subcircuit_id: z116.string().optional(),
|
|
2592
|
+
holes: z116.array(polygon_shape.shape.points).optional(),
|
|
2593
|
+
layer: layer_ref,
|
|
2594
|
+
pcb_component_id: z116.string().optional(),
|
|
2595
|
+
pcb_smtpad_id: z116.string().optional()
|
|
2596
|
+
});
|
|
2556
2597
|
var pcb_solder_paste = z116.union([
|
|
2557
2598
|
pcb_solder_paste_circle,
|
|
2558
2599
|
pcb_solder_paste_rect,
|
|
2559
2600
|
pcb_solder_paste_pill,
|
|
2560
2601
|
pcb_solder_paste_rotated_rect,
|
|
2561
2602
|
pcb_solder_paste_rotated_pill,
|
|
2562
|
-
pcb_solder_paste_oval
|
|
2603
|
+
pcb_solder_paste_oval,
|
|
2604
|
+
pcb_solder_paste_polygon
|
|
2563
2605
|
]).describe("Defines solderpaste on the PCB");
|
|
2564
2606
|
expectTypesMatch(true);
|
|
2565
2607
|
expectTypesMatch(true);
|
|
@@ -2571,6 +2613,7 @@ expectTypesMatch(
|
|
|
2571
2613
|
true
|
|
2572
2614
|
);
|
|
2573
2615
|
expectTypesMatch(true);
|
|
2616
|
+
expectTypesMatch(true);
|
|
2574
2617
|
|
|
2575
2618
|
// src/pcb/pcb_soldermask_opening.ts
|
|
2576
2619
|
import { z as z117 } from "zod";
|
|
@@ -2812,107 +2855,209 @@ var pcb_trace_too_many_vias_warning = z124.object({
|
|
|
2812
2855
|
);
|
|
2813
2856
|
expectTypesMatch(true);
|
|
2814
2857
|
|
|
2815
|
-
// src/pcb/
|
|
2858
|
+
// src/pcb/pcb_bus_routing_constraint_error.ts
|
|
2816
2859
|
import { z as z125 } from "zod";
|
|
2860
|
+
var error_base = base_circuit_json_error.extend({
|
|
2861
|
+
type: z125.literal("pcb_bus_routing_constraint_error"),
|
|
2862
|
+
pcb_bus_routing_constraint_error_id: getZodPrefixedIdWithDefault(
|
|
2863
|
+
"pcb_bus_routing_constraint_error"
|
|
2864
|
+
),
|
|
2865
|
+
error_type: z125.literal("pcb_bus_routing_constraint_error").default("pcb_bus_routing_constraint_error"),
|
|
2866
|
+
source_bus_id: z125.string(),
|
|
2867
|
+
source_trace_ids: z125.array(z125.string()).min(1),
|
|
2868
|
+
pcb_trace_ids: z125.array(z125.string()),
|
|
2869
|
+
subcircuit_id: z125.string().optional()
|
|
2870
|
+
});
|
|
2871
|
+
var pcb_bus_routing_constraint_error = z125.discriminatedUnion("routing_rule", [
|
|
2872
|
+
error_base.extend({
|
|
2873
|
+
routing_rule: z125.literal("length_skew"),
|
|
2874
|
+
actual_length_skew: z125.number().nonnegative().finite(),
|
|
2875
|
+
maximum_length_skew: z125.number().nonnegative().finite()
|
|
2876
|
+
}),
|
|
2877
|
+
error_base.extend({
|
|
2878
|
+
routing_rule: z125.literal("min_length"),
|
|
2879
|
+
actual_trace_length: z125.number().nonnegative().finite(),
|
|
2880
|
+
minimum_trace_length: z125.number().finite()
|
|
2881
|
+
}),
|
|
2882
|
+
error_base.extend({
|
|
2883
|
+
routing_rule: z125.literal("max_length"),
|
|
2884
|
+
actual_trace_length: z125.number().nonnegative().finite(),
|
|
2885
|
+
maximum_trace_length: z125.number().finite()
|
|
2886
|
+
}),
|
|
2887
|
+
error_base.extend({
|
|
2888
|
+
routing_rule: z125.literal("target_length"),
|
|
2889
|
+
actual_trace_length: z125.number().nonnegative().finite(),
|
|
2890
|
+
target_trace_length: z125.number().finite(),
|
|
2891
|
+
length_tolerance: z125.number().nonnegative().finite()
|
|
2892
|
+
}),
|
|
2893
|
+
error_base.extend({
|
|
2894
|
+
routing_rule: z125.literal("pcb_trace_spacing"),
|
|
2895
|
+
other_pcb_trace_id: z125.string(),
|
|
2896
|
+
other_source_trace_id: z125.string().optional(),
|
|
2897
|
+
actual_centerline_spacing: z125.number().nonnegative().finite(),
|
|
2898
|
+
minimum_centerline_spacing: z125.number().positive().finite()
|
|
2899
|
+
}),
|
|
2900
|
+
error_base.extend({
|
|
2901
|
+
routing_rule: z125.literal("pcb_spacing_to_other_signals"),
|
|
2902
|
+
other_pcb_trace_id: z125.string(),
|
|
2903
|
+
other_source_trace_id: z125.string().optional(),
|
|
2904
|
+
actual_centerline_spacing: z125.number().nonnegative().finite(),
|
|
2905
|
+
minimum_centerline_spacing: z125.number().positive().finite()
|
|
2906
|
+
}),
|
|
2907
|
+
error_base.extend({
|
|
2908
|
+
routing_rule: z125.literal("impedance_target"),
|
|
2909
|
+
target_impedance: z125.number().positive().finite(),
|
|
2910
|
+
minimum_impedance: z125.number().positive().finite().optional(),
|
|
2911
|
+
maximum_impedance: z125.number().positive().finite().optional()
|
|
2912
|
+
})
|
|
2913
|
+
]).superRefine((error, ctx) => {
|
|
2914
|
+
if (error.routing_rule !== "impedance_target") return;
|
|
2915
|
+
if (error.minimum_impedance === void 0 && error.maximum_impedance === void 0)
|
|
2916
|
+
ctx.addIssue({
|
|
2917
|
+
code: z125.ZodIssueCode.custom,
|
|
2918
|
+
path: ["minimum_impedance"],
|
|
2919
|
+
message: "Provide an impedance bound"
|
|
2920
|
+
});
|
|
2921
|
+
if (error.minimum_impedance !== void 0 && error.maximum_impedance !== void 0 && error.minimum_impedance > error.maximum_impedance)
|
|
2922
|
+
ctx.addIssue({
|
|
2923
|
+
code: z125.ZodIssueCode.custom,
|
|
2924
|
+
path: ["maximum_impedance"],
|
|
2925
|
+
message: "Impedance bounds must be ordered"
|
|
2926
|
+
});
|
|
2927
|
+
}).describe(
|
|
2928
|
+
"A declared bus or differential-pair routing constraint is violated."
|
|
2929
|
+
);
|
|
2930
|
+
expectTypesMatch(true);
|
|
2931
|
+
|
|
2932
|
+
// src/pcb/pcb_bus_routing_constraint_warning.ts
|
|
2933
|
+
import { z as z126 } from "zod";
|
|
2934
|
+
var warning_base = z126.object({
|
|
2935
|
+
type: z126.literal("pcb_bus_routing_constraint_warning"),
|
|
2936
|
+
pcb_bus_routing_constraint_warning_id: getZodPrefixedIdWithDefault(
|
|
2937
|
+
"pcb_bus_routing_constraint_warning"
|
|
2938
|
+
),
|
|
2939
|
+
warning_type: z126.literal("pcb_bus_routing_constraint_warning").default("pcb_bus_routing_constraint_warning"),
|
|
2940
|
+
source_bus_id: z126.string(),
|
|
2941
|
+
source_trace_ids: z126.array(z126.string()).min(1),
|
|
2942
|
+
pcb_trace_ids: z126.array(z126.string()),
|
|
2943
|
+
message: z126.string(),
|
|
2944
|
+
subcircuit_id: z126.string().optional()
|
|
2945
|
+
}).describe(
|
|
2946
|
+
"A declared bus or pair constraint could not be verified; this is not a pass."
|
|
2947
|
+
);
|
|
2948
|
+
var pcb_bus_routing_constraint_warning = z126.discriminatedUnion(
|
|
2949
|
+
"routing_rule",
|
|
2950
|
+
[
|
|
2951
|
+
warning_base.extend({ routing_rule: z126.literal("route_geometry") }),
|
|
2952
|
+
warning_base.extend({ routing_rule: z126.literal("reference_geometry") }),
|
|
2953
|
+
warning_base.extend({ routing_rule: z126.literal("spacing_geometry") }),
|
|
2954
|
+
warning_base.extend({ routing_rule: z126.literal("target_length") }),
|
|
2955
|
+
warning_base.extend({ routing_rule: z126.literal("physical_impedance") })
|
|
2956
|
+
]
|
|
2957
|
+
);
|
|
2958
|
+
expectTypesMatch(true);
|
|
2959
|
+
|
|
2960
|
+
// src/pcb/pcb_trace_error.ts
|
|
2961
|
+
import { z as z127 } from "zod";
|
|
2817
2962
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2818
|
-
type:
|
|
2963
|
+
type: z127.literal("pcb_trace_error"),
|
|
2819
2964
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2820
|
-
error_type:
|
|
2965
|
+
error_type: z127.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2821
2966
|
center: point.optional(),
|
|
2822
|
-
pcb_trace_id:
|
|
2823
|
-
source_trace_id:
|
|
2824
|
-
pcb_component_ids:
|
|
2825
|
-
pcb_port_ids:
|
|
2826
|
-
subcircuit_id:
|
|
2967
|
+
pcb_trace_id: z127.string(),
|
|
2968
|
+
source_trace_id: z127.string(),
|
|
2969
|
+
pcb_component_ids: z127.array(z127.string()),
|
|
2970
|
+
pcb_port_ids: z127.array(z127.string()),
|
|
2971
|
+
subcircuit_id: z127.string().optional()
|
|
2827
2972
|
}).describe("Defines a trace error on the PCB");
|
|
2828
2973
|
expectTypesMatch(true);
|
|
2829
2974
|
|
|
2830
2975
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2831
|
-
import { z as
|
|
2976
|
+
import { z as z128 } from "zod";
|
|
2832
2977
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2833
|
-
type:
|
|
2978
|
+
type: z128.literal("pcb_trace_missing_error"),
|
|
2834
2979
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2835
2980
|
"pcb_trace_missing_error"
|
|
2836
2981
|
),
|
|
2837
|
-
error_type:
|
|
2982
|
+
error_type: z128.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2838
2983
|
center: point.optional(),
|
|
2839
|
-
source_trace_id:
|
|
2840
|
-
pcb_component_ids:
|
|
2841
|
-
pcb_port_ids:
|
|
2842
|
-
subcircuit_id:
|
|
2984
|
+
source_trace_id: z128.string(),
|
|
2985
|
+
pcb_component_ids: z128.array(z128.string()),
|
|
2986
|
+
pcb_port_ids: z128.array(z128.string()),
|
|
2987
|
+
subcircuit_id: z128.string().optional()
|
|
2843
2988
|
}).describe(
|
|
2844
2989
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2845
2990
|
);
|
|
2846
2991
|
expectTypesMatch(true);
|
|
2847
2992
|
|
|
2848
2993
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2849
|
-
import { z as
|
|
2994
|
+
import { z as z129 } from "zod";
|
|
2850
2995
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2851
|
-
type:
|
|
2996
|
+
type: z129.literal("pcb_port_not_matched_error"),
|
|
2852
2997
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2853
|
-
error_type:
|
|
2854
|
-
pcb_component_ids:
|
|
2855
|
-
subcircuit_id:
|
|
2998
|
+
error_type: z129.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2999
|
+
pcb_component_ids: z129.array(z129.string()),
|
|
3000
|
+
subcircuit_id: z129.string().optional()
|
|
2856
3001
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2857
3002
|
expectTypesMatch(true);
|
|
2858
3003
|
|
|
2859
3004
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2860
|
-
import { z as
|
|
3005
|
+
import { z as z130 } from "zod";
|
|
2861
3006
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2862
|
-
type:
|
|
3007
|
+
type: z130.literal("pcb_port_not_connected_error"),
|
|
2863
3008
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2864
3009
|
"pcb_port_not_connected_error"
|
|
2865
3010
|
),
|
|
2866
|
-
error_type:
|
|
2867
|
-
pcb_port_ids:
|
|
2868
|
-
pcb_component_ids:
|
|
2869
|
-
subcircuit_id:
|
|
3011
|
+
error_type: z130.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
3012
|
+
pcb_port_ids: z130.array(z130.string()),
|
|
3013
|
+
pcb_component_ids: z130.array(z130.string()),
|
|
3014
|
+
subcircuit_id: z130.string().optional()
|
|
2870
3015
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2871
3016
|
expectTypesMatch(
|
|
2872
3017
|
true
|
|
2873
3018
|
);
|
|
2874
3019
|
|
|
2875
3020
|
// src/pcb/pcb_net.ts
|
|
2876
|
-
import { z as
|
|
2877
|
-
var pcb_net =
|
|
2878
|
-
type:
|
|
3021
|
+
import { z as z131 } from "zod";
|
|
3022
|
+
var pcb_net = z131.object({
|
|
3023
|
+
type: z131.literal("pcb_net"),
|
|
2879
3024
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2880
|
-
source_net_id:
|
|
2881
|
-
highlight_color:
|
|
3025
|
+
source_net_id: z131.string().optional(),
|
|
3026
|
+
highlight_color: z131.string().optional()
|
|
2882
3027
|
}).describe("Defines a net on the PCB");
|
|
2883
3028
|
expectTypesMatch(true);
|
|
2884
3029
|
|
|
2885
3030
|
// src/pcb/pcb_via.ts
|
|
2886
|
-
import { z as
|
|
2887
|
-
var pcb_via =
|
|
2888
|
-
type:
|
|
3031
|
+
import { z as z132 } from "zod";
|
|
3032
|
+
var pcb_via = z132.object({
|
|
3033
|
+
type: z132.literal("pcb_via"),
|
|
2889
3034
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2890
|
-
pcb_group_id:
|
|
2891
|
-
subcircuit_id:
|
|
2892
|
-
subcircuit_connectivity_map_key:
|
|
3035
|
+
pcb_group_id: z132.string().optional(),
|
|
3036
|
+
subcircuit_id: z132.string().optional(),
|
|
3037
|
+
subcircuit_connectivity_map_key: z132.string().optional(),
|
|
2893
3038
|
x: distance,
|
|
2894
3039
|
y: distance,
|
|
2895
3040
|
outer_diameter: distance.default("0.6mm"),
|
|
2896
3041
|
hole_diameter: distance.default("0.25mm"),
|
|
2897
3042
|
topmost_drill_layer: layer_ref.optional(),
|
|
2898
3043
|
bottommost_drill_layer: layer_ref.optional(),
|
|
2899
|
-
through_hole:
|
|
3044
|
+
through_hole: z132.boolean().optional(),
|
|
2900
3045
|
/** @deprecated */
|
|
2901
3046
|
from_layer: layer_ref.optional(),
|
|
2902
3047
|
/** @deprecated */
|
|
2903
3048
|
to_layer: layer_ref.optional(),
|
|
2904
|
-
layers:
|
|
3049
|
+
layers: z132.array(layer_ref),
|
|
2905
3050
|
/** PCB ports belonging to this via, including layer ports and aliases. */
|
|
2906
|
-
pcb_port_ids:
|
|
2907
|
-
pcb_trace_id:
|
|
2908
|
-
source_trace_id:
|
|
2909
|
-
source_net_id:
|
|
2910
|
-
net_is_assignable:
|
|
2911
|
-
net_assigned:
|
|
3051
|
+
pcb_port_ids: z132.array(z132.string()).optional(),
|
|
3052
|
+
pcb_trace_id: z132.string().optional(),
|
|
3053
|
+
source_trace_id: z132.string().optional(),
|
|
3054
|
+
source_net_id: z132.string().min(1).optional(),
|
|
3055
|
+
net_is_assignable: z132.boolean().optional(),
|
|
3056
|
+
net_assigned: z132.boolean().optional(),
|
|
2912
3057
|
/** @deprecated Use tented_on_top and tented_on_bottom instead. */
|
|
2913
|
-
is_tented:
|
|
2914
|
-
tented_on_top:
|
|
2915
|
-
tented_on_bottom:
|
|
3058
|
+
is_tented: z132.boolean().optional(),
|
|
3059
|
+
tented_on_top: z132.boolean().optional(),
|
|
3060
|
+
tented_on_bottom: z132.boolean().optional()
|
|
2916
3061
|
}).transform(({ is_tented, ...via }) => {
|
|
2917
3062
|
if (is_tented !== void 0) {
|
|
2918
3063
|
via.tented_on_top ??= is_tented;
|
|
@@ -2923,62 +3068,62 @@ var pcb_via = z130.object({
|
|
|
2923
3068
|
expectTypesMatch(true);
|
|
2924
3069
|
|
|
2925
3070
|
// src/pcb/pcb_board.ts
|
|
2926
|
-
import { z as
|
|
2927
|
-
var pcb_board =
|
|
2928
|
-
type:
|
|
3071
|
+
import { z as z133 } from "zod";
|
|
3072
|
+
var pcb_board = z133.object({
|
|
3073
|
+
type: z133.literal("pcb_board"),
|
|
2929
3074
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2930
|
-
pcb_panel_id:
|
|
2931
|
-
carrier_pcb_board_id:
|
|
2932
|
-
is_subcircuit:
|
|
2933
|
-
subcircuit_id:
|
|
2934
|
-
is_mounted_to_carrier_board:
|
|
2935
|
-
is_via_in_pad_allowed:
|
|
2936
|
-
default_via_tented_on_top:
|
|
2937
|
-
default_via_tented_on_bottom:
|
|
2938
|
-
default_via_plugged:
|
|
3075
|
+
pcb_panel_id: z133.string().optional(),
|
|
3076
|
+
carrier_pcb_board_id: z133.string().optional(),
|
|
3077
|
+
is_subcircuit: z133.boolean().optional(),
|
|
3078
|
+
subcircuit_id: z133.string().optional(),
|
|
3079
|
+
is_mounted_to_carrier_board: z133.boolean().optional(),
|
|
3080
|
+
is_via_in_pad_allowed: z133.boolean().optional(),
|
|
3081
|
+
default_via_tented_on_top: z133.boolean().optional(),
|
|
3082
|
+
default_via_tented_on_bottom: z133.boolean().optional(),
|
|
3083
|
+
default_via_plugged: z133.boolean().optional(),
|
|
2939
3084
|
width: length.optional(),
|
|
2940
3085
|
height: length.optional(),
|
|
2941
3086
|
center: point,
|
|
2942
|
-
display_offset_x:
|
|
3087
|
+
display_offset_x: z133.string().optional().describe(
|
|
2943
3088
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2944
3089
|
),
|
|
2945
|
-
display_offset_y:
|
|
3090
|
+
display_offset_y: z133.string().optional().describe(
|
|
2946
3091
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2947
3092
|
),
|
|
2948
3093
|
thickness: length.optional().default(1.4),
|
|
2949
|
-
num_layers:
|
|
2950
|
-
allow_blind_and_buried_vias:
|
|
3094
|
+
num_layers: z133.number().optional().default(4),
|
|
3095
|
+
allow_blind_and_buried_vias: z133.boolean().optional().describe(
|
|
2951
3096
|
"Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack."
|
|
2952
3097
|
),
|
|
2953
|
-
outline:
|
|
2954
|
-
shape:
|
|
2955
|
-
material:
|
|
2956
|
-
solder_mask_color:
|
|
2957
|
-
silkscreen_color:
|
|
3098
|
+
outline: z133.array(point).optional(),
|
|
3099
|
+
shape: z133.enum(["rect", "polygon"]).optional(),
|
|
3100
|
+
material: z133.enum(["fr4", "fr1", "flex"]).default("fr4"),
|
|
3101
|
+
solder_mask_color: z133.string().optional(),
|
|
3102
|
+
silkscreen_color: z133.string().optional(),
|
|
2958
3103
|
anchor_position: point.optional(),
|
|
2959
3104
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2960
|
-
position_mode:
|
|
3105
|
+
position_mode: z133.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2961
3106
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2962
3107
|
expectTypesMatch(true);
|
|
2963
3108
|
|
|
2964
3109
|
// src/pcb/pcb_bend.ts
|
|
2965
|
-
import { z as
|
|
3110
|
+
import { z as z134 } from "zod";
|
|
2966
3111
|
var finite_point = point.extend({
|
|
2967
|
-
x: length.pipe(
|
|
2968
|
-
y: length.pipe(
|
|
3112
|
+
x: length.pipe(z134.number().finite()),
|
|
3113
|
+
y: length.pipe(z134.number().finite())
|
|
2969
3114
|
});
|
|
2970
|
-
var pcb_bend =
|
|
2971
|
-
type:
|
|
3115
|
+
var pcb_bend = z134.object({
|
|
3116
|
+
type: z134.literal("pcb_bend"),
|
|
2972
3117
|
pcb_bend_id: getZodPrefixedIdWithDefault("pcb_bend"),
|
|
2973
|
-
pcb_board_id:
|
|
2974
|
-
pcb_group_id:
|
|
2975
|
-
subcircuit_id:
|
|
2976
|
-
name:
|
|
3118
|
+
pcb_board_id: z134.string(),
|
|
3119
|
+
pcb_group_id: z134.string().optional(),
|
|
3120
|
+
subcircuit_id: z134.string().optional(),
|
|
3121
|
+
name: z134.string().optional(),
|
|
2977
3122
|
start: finite_point,
|
|
2978
3123
|
end: finite_point,
|
|
2979
|
-
bend_angle: rotation.pipe(
|
|
2980
|
-
bend_radius: length.pipe(
|
|
2981
|
-
bend_side:
|
|
3124
|
+
bend_angle: rotation.pipe(z134.number().finite()),
|
|
3125
|
+
bend_radius: length.pipe(z134.number().finite().positive()),
|
|
3126
|
+
bend_side: z134.enum(["left", "right"])
|
|
2982
3127
|
}).refine(({ start, end }) => start.x !== end.x || start.y !== end.y, {
|
|
2983
3128
|
message: "Bend centerline endpoints must be distinct",
|
|
2984
3129
|
path: ["end"]
|
|
@@ -2988,123 +3133,123 @@ var pcb_bend = z132.object({
|
|
|
2988
3133
|
expectTypesMatch(true);
|
|
2989
3134
|
|
|
2990
3135
|
// src/pcb/pcb_stiffener.ts
|
|
2991
|
-
import { z as
|
|
2992
|
-
var positive_length = length.pipe(
|
|
3136
|
+
import { z as z135 } from "zod";
|
|
3137
|
+
var positive_length = length.pipe(z135.number().finite().positive());
|
|
2993
3138
|
var finite_point2 = point.extend({
|
|
2994
|
-
x: length.pipe(
|
|
2995
|
-
y: length.pipe(
|
|
3139
|
+
x: length.pipe(z135.number().finite()),
|
|
3140
|
+
y: length.pipe(z135.number().finite())
|
|
2996
3141
|
});
|
|
2997
|
-
var pcb_stiffener_base =
|
|
2998
|
-
type:
|
|
3142
|
+
var pcb_stiffener_base = z135.object({
|
|
3143
|
+
type: z135.literal("pcb_stiffener"),
|
|
2999
3144
|
pcb_stiffener_id: getZodPrefixedIdWithDefault("pcb_stiffener"),
|
|
3000
|
-
pcb_board_id:
|
|
3001
|
-
pcb_group_id:
|
|
3002
|
-
subcircuit_id:
|
|
3003
|
-
name:
|
|
3004
|
-
layer:
|
|
3005
|
-
material:
|
|
3145
|
+
pcb_board_id: z135.string(),
|
|
3146
|
+
pcb_group_id: z135.string().optional(),
|
|
3147
|
+
subcircuit_id: z135.string().optional(),
|
|
3148
|
+
name: z135.string().optional(),
|
|
3149
|
+
layer: z135.enum(["top", "bottom"]),
|
|
3150
|
+
material: z135.enum(["fr4", "polyimide", "stainless_steel", "aluminum"]),
|
|
3006
3151
|
thickness: positive_length,
|
|
3007
|
-
adhesive_thickness: length.pipe(
|
|
3152
|
+
adhesive_thickness: length.pipe(z135.number().finite().nonnegative()).optional()
|
|
3008
3153
|
});
|
|
3009
3154
|
var pcb_stiffener_rect = pcb_stiffener_base.extend({
|
|
3010
|
-
shape:
|
|
3155
|
+
shape: z135.literal("rect"),
|
|
3011
3156
|
center: finite_point2,
|
|
3012
|
-
rotation: rotation.pipe(
|
|
3157
|
+
rotation: rotation.pipe(z135.number().finite()).optional(),
|
|
3013
3158
|
width: positive_length,
|
|
3014
3159
|
height: positive_length,
|
|
3015
|
-
outline:
|
|
3160
|
+
outline: z135.never().optional()
|
|
3016
3161
|
});
|
|
3017
3162
|
expectTypesMatch(true);
|
|
3018
3163
|
var pcb_stiffener_polygon = pcb_stiffener_base.extend({
|
|
3019
|
-
shape:
|
|
3020
|
-
outline:
|
|
3164
|
+
shape: z135.literal("polygon"),
|
|
3165
|
+
outline: z135.array(finite_point2).min(3).refine((points) => {
|
|
3021
3166
|
const twice_area = points.reduce((sum, p, i) => {
|
|
3022
3167
|
const next = points[(i + 1) % points.length];
|
|
3023
3168
|
return sum + p.x * next.y - next.x * p.y;
|
|
3024
3169
|
}, 0);
|
|
3025
3170
|
return Number.isFinite(twice_area) && twice_area !== 0;
|
|
3026
3171
|
}, "Stiffener outline must enclose a nonzero area"),
|
|
3027
|
-
center:
|
|
3028
|
-
rotation:
|
|
3029
|
-
width:
|
|
3030
|
-
height:
|
|
3172
|
+
center: z135.never().optional(),
|
|
3173
|
+
rotation: z135.never().optional(),
|
|
3174
|
+
width: z135.never().optional(),
|
|
3175
|
+
height: z135.never().optional()
|
|
3031
3176
|
});
|
|
3032
3177
|
expectTypesMatch(
|
|
3033
3178
|
true
|
|
3034
3179
|
);
|
|
3035
|
-
var pcb_stiffener =
|
|
3180
|
+
var pcb_stiffener = z135.discriminatedUnion("shape", [pcb_stiffener_rect, pcb_stiffener_polygon]).describe(
|
|
3036
3181
|
"Defines bonded mechanical PCB reinforcement without adding copper layers"
|
|
3037
3182
|
);
|
|
3038
3183
|
expectTypesMatch(true);
|
|
3039
3184
|
|
|
3040
3185
|
// src/pcb/pcb_panel.ts
|
|
3041
|
-
import { z as
|
|
3042
|
-
var pcb_panel =
|
|
3043
|
-
type:
|
|
3186
|
+
import { z as z136 } from "zod";
|
|
3187
|
+
var pcb_panel = z136.object({
|
|
3188
|
+
type: z136.literal("pcb_panel"),
|
|
3044
3189
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
3045
3190
|
width: length,
|
|
3046
3191
|
height: length,
|
|
3047
3192
|
center: point,
|
|
3048
3193
|
thickness: length.optional().default(1.4),
|
|
3049
|
-
covered_with_solder_mask:
|
|
3194
|
+
covered_with_solder_mask: z136.boolean().optional().default(true)
|
|
3050
3195
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
3051
3196
|
expectTypesMatch(true);
|
|
3052
3197
|
|
|
3053
3198
|
// src/pcb/pcb_placement_error.ts
|
|
3054
|
-
import { z as
|
|
3199
|
+
import { z as z137 } from "zod";
|
|
3055
3200
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
3056
|
-
type:
|
|
3201
|
+
type: z137.literal("pcb_placement_error"),
|
|
3057
3202
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
3058
|
-
error_type:
|
|
3059
|
-
subcircuit_id:
|
|
3203
|
+
error_type: z137.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
3204
|
+
subcircuit_id: z137.string().optional()
|
|
3060
3205
|
}).describe("Defines a placement error on the PCB");
|
|
3061
3206
|
expectTypesMatch(true);
|
|
3062
3207
|
|
|
3063
3208
|
// src/pcb/pcb_packing_error.ts
|
|
3064
|
-
import { z as
|
|
3209
|
+
import { z as z138 } from "zod";
|
|
3065
3210
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
3066
|
-
type:
|
|
3211
|
+
type: z138.literal("pcb_packing_error"),
|
|
3067
3212
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
3068
|
-
error_type:
|
|
3069
|
-
pcb_group_id:
|
|
3070
|
-
subcircuit_id:
|
|
3213
|
+
error_type: z138.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
3214
|
+
pcb_group_id: z138.string().optional(),
|
|
3215
|
+
subcircuit_id: z138.string().optional()
|
|
3071
3216
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
3072
3217
|
expectTypesMatch(true);
|
|
3073
3218
|
|
|
3074
3219
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
3075
|
-
import { z as
|
|
3220
|
+
import { z as z139 } from "zod";
|
|
3076
3221
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
3077
|
-
type:
|
|
3222
|
+
type: z139.literal("pcb_panelization_placement_error"),
|
|
3078
3223
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
3079
3224
|
"pcb_panelization_placement_error"
|
|
3080
3225
|
),
|
|
3081
|
-
error_type:
|
|
3082
|
-
pcb_panel_id:
|
|
3083
|
-
pcb_board_id:
|
|
3084
|
-
subcircuit_id:
|
|
3226
|
+
error_type: z139.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
3227
|
+
pcb_panel_id: z139.string().optional(),
|
|
3228
|
+
pcb_board_id: z139.string().optional(),
|
|
3229
|
+
subcircuit_id: z139.string().optional()
|
|
3085
3230
|
}).describe("Defines a panelization placement error on the PCB");
|
|
3086
3231
|
expectTypesMatch(true);
|
|
3087
3232
|
|
|
3088
3233
|
// src/pcb/pcb_trace_hint.ts
|
|
3089
|
-
import { z as
|
|
3090
|
-
var pcb_trace_hint =
|
|
3091
|
-
type:
|
|
3234
|
+
import { z as z140 } from "zod";
|
|
3235
|
+
var pcb_trace_hint = z140.object({
|
|
3236
|
+
type: z140.literal("pcb_trace_hint"),
|
|
3092
3237
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
3093
|
-
pcb_port_id:
|
|
3094
|
-
pcb_component_id:
|
|
3095
|
-
route:
|
|
3096
|
-
subcircuit_id:
|
|
3238
|
+
pcb_port_id: z140.string(),
|
|
3239
|
+
pcb_component_id: z140.string(),
|
|
3240
|
+
route: z140.array(route_hint_point),
|
|
3241
|
+
subcircuit_id: z140.string().optional()
|
|
3097
3242
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
3098
3243
|
expectTypesMatch(true);
|
|
3099
3244
|
|
|
3100
3245
|
// src/pcb/pcb_silkscreen_line.ts
|
|
3101
|
-
import { z as
|
|
3102
|
-
var pcb_silkscreen_line =
|
|
3103
|
-
type:
|
|
3246
|
+
import { z as z141 } from "zod";
|
|
3247
|
+
var pcb_silkscreen_line = z141.object({
|
|
3248
|
+
type: z141.literal("pcb_silkscreen_line"),
|
|
3104
3249
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
3105
|
-
pcb_component_id:
|
|
3106
|
-
pcb_group_id:
|
|
3107
|
-
subcircuit_id:
|
|
3250
|
+
pcb_component_id: z141.string(),
|
|
3251
|
+
pcb_group_id: z141.string().optional(),
|
|
3252
|
+
subcircuit_id: z141.string().optional(),
|
|
3108
3253
|
stroke_width: distance.default("0.1mm"),
|
|
3109
3254
|
x1: distance,
|
|
3110
3255
|
y1: distance,
|
|
@@ -3115,32 +3260,32 @@ var pcb_silkscreen_line = z139.object({
|
|
|
3115
3260
|
expectTypesMatch(true);
|
|
3116
3261
|
|
|
3117
3262
|
// src/pcb/pcb_silkscreen_path.ts
|
|
3118
|
-
import { z as
|
|
3119
|
-
var pcb_silkscreen_path =
|
|
3120
|
-
type:
|
|
3263
|
+
import { z as z142 } from "zod";
|
|
3264
|
+
var pcb_silkscreen_path = z142.object({
|
|
3265
|
+
type: z142.literal("pcb_silkscreen_path"),
|
|
3121
3266
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
3122
|
-
pcb_component_id:
|
|
3123
|
-
pcb_group_id:
|
|
3124
|
-
subcircuit_id:
|
|
3267
|
+
pcb_component_id: z142.string(),
|
|
3268
|
+
pcb_group_id: z142.string().optional(),
|
|
3269
|
+
subcircuit_id: z142.string().optional(),
|
|
3125
3270
|
layer: visible_layer,
|
|
3126
|
-
route:
|
|
3271
|
+
route: z142.array(point),
|
|
3127
3272
|
stroke_width: length
|
|
3128
3273
|
}).describe("Defines a silkscreen path on the PCB");
|
|
3129
3274
|
expectTypesMatch(true);
|
|
3130
3275
|
|
|
3131
3276
|
// src/pcb/pcb_silkscreen_text.ts
|
|
3132
|
-
import { z as
|
|
3133
|
-
var pcb_silkscreen_text =
|
|
3134
|
-
type:
|
|
3277
|
+
import { z as z143 } from "zod";
|
|
3278
|
+
var pcb_silkscreen_text = z143.object({
|
|
3279
|
+
type: z143.literal("pcb_silkscreen_text"),
|
|
3135
3280
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
3136
|
-
pcb_group_id:
|
|
3137
|
-
subcircuit_id:
|
|
3138
|
-
font:
|
|
3281
|
+
pcb_group_id: z143.string().optional(),
|
|
3282
|
+
subcircuit_id: z143.string().optional(),
|
|
3283
|
+
font: z143.literal("tscircuit2024").default("tscircuit2024"),
|
|
3139
3284
|
font_size: distance.default("0.2mm"),
|
|
3140
|
-
pcb_component_id:
|
|
3141
|
-
text:
|
|
3142
|
-
is_knockout:
|
|
3143
|
-
knockout_padding:
|
|
3285
|
+
pcb_component_id: z143.string(),
|
|
3286
|
+
text: z143.string(),
|
|
3287
|
+
is_knockout: z143.boolean().default(false).optional(),
|
|
3288
|
+
knockout_padding: z143.object({
|
|
3144
3289
|
left: length,
|
|
3145
3290
|
top: length,
|
|
3146
3291
|
bottom: length,
|
|
@@ -3151,27 +3296,27 @@ var pcb_silkscreen_text = z141.object({
|
|
|
3151
3296
|
bottom: "0.2mm",
|
|
3152
3297
|
right: "0.2mm"
|
|
3153
3298
|
}).optional(),
|
|
3154
|
-
ccw_rotation:
|
|
3299
|
+
ccw_rotation: z143.number().optional(),
|
|
3155
3300
|
layer: layer_ref,
|
|
3156
|
-
is_mirrored:
|
|
3301
|
+
is_mirrored: z143.boolean().default(false).optional(),
|
|
3157
3302
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3158
3303
|
anchor_alignment: ninePointAnchor.default("center")
|
|
3159
3304
|
}).describe("Defines silkscreen text on the PCB");
|
|
3160
3305
|
expectTypesMatch(true);
|
|
3161
3306
|
|
|
3162
3307
|
// src/pcb/pcb_copper_text.ts
|
|
3163
|
-
import { z as
|
|
3164
|
-
var pcb_copper_text =
|
|
3165
|
-
type:
|
|
3308
|
+
import { z as z144 } from "zod";
|
|
3309
|
+
var pcb_copper_text = z144.object({
|
|
3310
|
+
type: z144.literal("pcb_copper_text"),
|
|
3166
3311
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
3167
|
-
pcb_group_id:
|
|
3168
|
-
subcircuit_id:
|
|
3169
|
-
font:
|
|
3312
|
+
pcb_group_id: z144.string().optional(),
|
|
3313
|
+
subcircuit_id: z144.string().optional(),
|
|
3314
|
+
font: z144.literal("tscircuit2024").default("tscircuit2024"),
|
|
3170
3315
|
font_size: distance.default("0.2mm"),
|
|
3171
|
-
pcb_component_id:
|
|
3172
|
-
text:
|
|
3173
|
-
is_knockout:
|
|
3174
|
-
knockout_padding:
|
|
3316
|
+
pcb_component_id: z144.string(),
|
|
3317
|
+
text: z144.string(),
|
|
3318
|
+
is_knockout: z144.boolean().default(false).optional(),
|
|
3319
|
+
knockout_padding: z144.object({
|
|
3175
3320
|
left: length,
|
|
3176
3321
|
top: length,
|
|
3177
3322
|
bottom: length,
|
|
@@ -3182,61 +3327,61 @@ var pcb_copper_text = z142.object({
|
|
|
3182
3327
|
bottom: "0.2mm",
|
|
3183
3328
|
right: "0.2mm"
|
|
3184
3329
|
}).optional(),
|
|
3185
|
-
ccw_rotation:
|
|
3330
|
+
ccw_rotation: z144.number().optional(),
|
|
3186
3331
|
layer: layer_ref,
|
|
3187
|
-
is_mirrored:
|
|
3332
|
+
is_mirrored: z144.boolean().default(false).optional(),
|
|
3188
3333
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3189
3334
|
anchor_alignment: ninePointAnchor.default("center")
|
|
3190
3335
|
}).describe("Defines copper text on the PCB");
|
|
3191
3336
|
expectTypesMatch(true);
|
|
3192
3337
|
|
|
3193
3338
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
3194
|
-
import { z as
|
|
3195
|
-
var pcb_silkscreen_rect =
|
|
3196
|
-
type:
|
|
3339
|
+
import { z as z145 } from "zod";
|
|
3340
|
+
var pcb_silkscreen_rect = z145.object({
|
|
3341
|
+
type: z145.literal("pcb_silkscreen_rect"),
|
|
3197
3342
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
3198
|
-
pcb_component_id:
|
|
3199
|
-
pcb_group_id:
|
|
3200
|
-
subcircuit_id:
|
|
3343
|
+
pcb_component_id: z145.string(),
|
|
3344
|
+
pcb_group_id: z145.string().optional(),
|
|
3345
|
+
subcircuit_id: z145.string().optional(),
|
|
3201
3346
|
center: point,
|
|
3202
3347
|
width: length,
|
|
3203
3348
|
height: length,
|
|
3204
3349
|
layer: layer_ref,
|
|
3205
3350
|
stroke_width: length.default("1mm"),
|
|
3206
3351
|
corner_radius: length.optional(),
|
|
3207
|
-
is_filled:
|
|
3208
|
-
has_stroke:
|
|
3209
|
-
is_stroke_dashed:
|
|
3210
|
-
ccw_rotation:
|
|
3352
|
+
is_filled: z145.boolean().default(true).optional(),
|
|
3353
|
+
has_stroke: z145.boolean().optional(),
|
|
3354
|
+
is_stroke_dashed: z145.boolean().optional(),
|
|
3355
|
+
ccw_rotation: z145.number().optional()
|
|
3211
3356
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
3212
3357
|
expectTypesMatch(true);
|
|
3213
3358
|
|
|
3214
3359
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
3215
|
-
import { z as
|
|
3216
|
-
var pcb_silkscreen_circle =
|
|
3217
|
-
type:
|
|
3360
|
+
import { z as z146 } from "zod";
|
|
3361
|
+
var pcb_silkscreen_circle = z146.object({
|
|
3362
|
+
type: z146.literal("pcb_silkscreen_circle"),
|
|
3218
3363
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
3219
3364
|
"pcb_silkscreen_circle"
|
|
3220
3365
|
),
|
|
3221
|
-
pcb_component_id:
|
|
3222
|
-
pcb_group_id:
|
|
3223
|
-
subcircuit_id:
|
|
3366
|
+
pcb_component_id: z146.string(),
|
|
3367
|
+
pcb_group_id: z146.string().optional(),
|
|
3368
|
+
subcircuit_id: z146.string().optional(),
|
|
3224
3369
|
center: point,
|
|
3225
3370
|
radius: length,
|
|
3226
3371
|
layer: visible_layer,
|
|
3227
3372
|
stroke_width: length.default("1mm"),
|
|
3228
|
-
is_filled:
|
|
3373
|
+
is_filled: z146.boolean().optional()
|
|
3229
3374
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
3230
3375
|
expectTypesMatch(true);
|
|
3231
3376
|
|
|
3232
3377
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
3233
|
-
import { z as
|
|
3234
|
-
var pcb_silkscreen_oval =
|
|
3235
|
-
type:
|
|
3378
|
+
import { z as z147 } from "zod";
|
|
3379
|
+
var pcb_silkscreen_oval = z147.object({
|
|
3380
|
+
type: z147.literal("pcb_silkscreen_oval"),
|
|
3236
3381
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
3237
|
-
pcb_component_id:
|
|
3238
|
-
pcb_group_id:
|
|
3239
|
-
subcircuit_id:
|
|
3382
|
+
pcb_component_id: z147.string(),
|
|
3383
|
+
pcb_group_id: z147.string().optional(),
|
|
3384
|
+
subcircuit_id: z147.string().optional(),
|
|
3240
3385
|
center: point,
|
|
3241
3386
|
radius_x: distance,
|
|
3242
3387
|
radius_y: distance,
|
|
@@ -3246,265 +3391,265 @@ var pcb_silkscreen_oval = z145.object({
|
|
|
3246
3391
|
expectTypesMatch(true);
|
|
3247
3392
|
|
|
3248
3393
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
3249
|
-
import { z as
|
|
3250
|
-
var pcb_silkscreen_graphic_base =
|
|
3251
|
-
type:
|
|
3394
|
+
import { z as z148 } from "zod";
|
|
3395
|
+
var pcb_silkscreen_graphic_base = z148.object({
|
|
3396
|
+
type: z148.literal("pcb_silkscreen_graphic"),
|
|
3252
3397
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
3253
3398
|
"pcb_silkscreen_graphic"
|
|
3254
3399
|
),
|
|
3255
|
-
pcb_component_id:
|
|
3256
|
-
pcb_group_id:
|
|
3257
|
-
subcircuit_id:
|
|
3400
|
+
pcb_component_id: z148.string(),
|
|
3401
|
+
pcb_group_id: z148.string().optional(),
|
|
3402
|
+
subcircuit_id: z148.string().optional(),
|
|
3258
3403
|
layer: visible_layer,
|
|
3259
3404
|
image_asset: asset.optional()
|
|
3260
3405
|
});
|
|
3261
3406
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
3262
|
-
shape:
|
|
3407
|
+
shape: z148.literal("brep"),
|
|
3263
3408
|
brep_shape
|
|
3264
3409
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
3265
3410
|
expectTypesMatch(
|
|
3266
3411
|
true
|
|
3267
3412
|
);
|
|
3268
|
-
var pcb_silkscreen_graphic =
|
|
3413
|
+
var pcb_silkscreen_graphic = z148.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
3269
3414
|
expectTypesMatch(true);
|
|
3270
3415
|
|
|
3271
3416
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
3272
|
-
import { z as
|
|
3273
|
-
var pcb_silkscreen_pill =
|
|
3274
|
-
type:
|
|
3417
|
+
import { z as z149 } from "zod";
|
|
3418
|
+
var pcb_silkscreen_pill = z149.object({
|
|
3419
|
+
type: z149.literal("pcb_silkscreen_pill"),
|
|
3275
3420
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
3276
|
-
pcb_component_id:
|
|
3277
|
-
pcb_group_id:
|
|
3278
|
-
subcircuit_id:
|
|
3421
|
+
pcb_component_id: z149.string(),
|
|
3422
|
+
pcb_group_id: z149.string().optional(),
|
|
3423
|
+
subcircuit_id: z149.string().optional(),
|
|
3279
3424
|
center: point,
|
|
3280
3425
|
width: length,
|
|
3281
3426
|
height: length,
|
|
3282
3427
|
layer: layer_ref,
|
|
3283
|
-
ccw_rotation:
|
|
3428
|
+
ccw_rotation: z149.number().optional()
|
|
3284
3429
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
3285
3430
|
expectTypesMatch(true);
|
|
3286
3431
|
|
|
3287
3432
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
3288
|
-
import { z as
|
|
3289
|
-
var pcb_fabrication_note_text =
|
|
3290
|
-
type:
|
|
3433
|
+
import { z as z150 } from "zod";
|
|
3434
|
+
var pcb_fabrication_note_text = z150.object({
|
|
3435
|
+
type: z150.literal("pcb_fabrication_note_text"),
|
|
3291
3436
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
3292
3437
|
"pcb_fabrication_note_text"
|
|
3293
3438
|
),
|
|
3294
|
-
subcircuit_id:
|
|
3295
|
-
pcb_group_id:
|
|
3296
|
-
font:
|
|
3439
|
+
subcircuit_id: z150.string().optional(),
|
|
3440
|
+
pcb_group_id: z150.string().optional(),
|
|
3441
|
+
font: z150.literal("tscircuit2024").default("tscircuit2024"),
|
|
3297
3442
|
font_size: distance.default("1mm"),
|
|
3298
|
-
pcb_component_id:
|
|
3299
|
-
text:
|
|
3300
|
-
ccw_rotation:
|
|
3443
|
+
pcb_component_id: z150.string(),
|
|
3444
|
+
text: z150.string(),
|
|
3445
|
+
ccw_rotation: z150.number().optional(),
|
|
3301
3446
|
layer: visible_layer,
|
|
3302
3447
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3303
|
-
anchor_alignment:
|
|
3304
|
-
color:
|
|
3448
|
+
anchor_alignment: z150.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3449
|
+
color: z150.string().optional()
|
|
3305
3450
|
}).describe(
|
|
3306
3451
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
3307
3452
|
);
|
|
3308
3453
|
expectTypesMatch(true);
|
|
3309
3454
|
|
|
3310
3455
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
3311
|
-
import { z as
|
|
3312
|
-
var pcb_fabrication_note_path =
|
|
3313
|
-
type:
|
|
3456
|
+
import { z as z151 } from "zod";
|
|
3457
|
+
var pcb_fabrication_note_path = z151.object({
|
|
3458
|
+
type: z151.literal("pcb_fabrication_note_path"),
|
|
3314
3459
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
3315
3460
|
"pcb_fabrication_note_path"
|
|
3316
3461
|
),
|
|
3317
|
-
pcb_component_id:
|
|
3318
|
-
subcircuit_id:
|
|
3462
|
+
pcb_component_id: z151.string(),
|
|
3463
|
+
subcircuit_id: z151.string().optional(),
|
|
3319
3464
|
layer: layer_ref,
|
|
3320
|
-
route:
|
|
3465
|
+
route: z151.array(point),
|
|
3321
3466
|
stroke_width: length,
|
|
3322
|
-
color:
|
|
3467
|
+
color: z151.string().optional()
|
|
3323
3468
|
}).describe(
|
|
3324
3469
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
3325
3470
|
);
|
|
3326
3471
|
expectTypesMatch(true);
|
|
3327
3472
|
|
|
3328
3473
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
3329
|
-
import { z as
|
|
3330
|
-
var pcb_fabrication_note_rect =
|
|
3331
|
-
type:
|
|
3474
|
+
import { z as z152 } from "zod";
|
|
3475
|
+
var pcb_fabrication_note_rect = z152.object({
|
|
3476
|
+
type: z152.literal("pcb_fabrication_note_rect"),
|
|
3332
3477
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
3333
3478
|
"pcb_fabrication_note_rect"
|
|
3334
3479
|
),
|
|
3335
|
-
pcb_component_id:
|
|
3336
|
-
pcb_group_id:
|
|
3337
|
-
subcircuit_id:
|
|
3480
|
+
pcb_component_id: z152.string(),
|
|
3481
|
+
pcb_group_id: z152.string().optional(),
|
|
3482
|
+
subcircuit_id: z152.string().optional(),
|
|
3338
3483
|
center: point,
|
|
3339
3484
|
width: length,
|
|
3340
3485
|
height: length,
|
|
3341
3486
|
layer: visible_layer,
|
|
3342
3487
|
stroke_width: length.default("0.1mm"),
|
|
3343
3488
|
corner_radius: length.optional(),
|
|
3344
|
-
is_filled:
|
|
3345
|
-
has_stroke:
|
|
3346
|
-
is_stroke_dashed:
|
|
3347
|
-
color:
|
|
3489
|
+
is_filled: z152.boolean().optional(),
|
|
3490
|
+
has_stroke: z152.boolean().optional(),
|
|
3491
|
+
is_stroke_dashed: z152.boolean().optional(),
|
|
3492
|
+
color: z152.string().optional()
|
|
3348
3493
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
3349
3494
|
expectTypesMatch(true);
|
|
3350
3495
|
|
|
3351
3496
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
3352
|
-
import { z as
|
|
3353
|
-
var pcb_fabrication_note_dimension =
|
|
3354
|
-
type:
|
|
3497
|
+
import { z as z153 } from "zod";
|
|
3498
|
+
var pcb_fabrication_note_dimension = z153.object({
|
|
3499
|
+
type: z153.literal("pcb_fabrication_note_dimension"),
|
|
3355
3500
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
3356
3501
|
"pcb_fabrication_note_dimension"
|
|
3357
3502
|
),
|
|
3358
|
-
pcb_component_id:
|
|
3359
|
-
pcb_group_id:
|
|
3360
|
-
subcircuit_id:
|
|
3503
|
+
pcb_component_id: z153.string(),
|
|
3504
|
+
pcb_group_id: z153.string().optional(),
|
|
3505
|
+
subcircuit_id: z153.string().optional(),
|
|
3361
3506
|
layer: visible_layer,
|
|
3362
3507
|
from: point,
|
|
3363
3508
|
to: point,
|
|
3364
|
-
text:
|
|
3365
|
-
text_ccw_rotation:
|
|
3509
|
+
text: z153.string().optional(),
|
|
3510
|
+
text_ccw_rotation: z153.number().optional(),
|
|
3366
3511
|
offset: length.optional(),
|
|
3367
3512
|
offset_distance: length.optional(),
|
|
3368
|
-
offset_direction:
|
|
3369
|
-
x:
|
|
3370
|
-
y:
|
|
3513
|
+
offset_direction: z153.object({
|
|
3514
|
+
x: z153.number(),
|
|
3515
|
+
y: z153.number()
|
|
3371
3516
|
}).optional(),
|
|
3372
|
-
font:
|
|
3517
|
+
font: z153.literal("tscircuit2024").default("tscircuit2024"),
|
|
3373
3518
|
font_size: length.default("1mm"),
|
|
3374
|
-
color:
|
|
3519
|
+
color: z153.string().optional(),
|
|
3375
3520
|
arrow_size: length.default("1mm")
|
|
3376
3521
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
3377
3522
|
expectTypesMatch(true);
|
|
3378
3523
|
|
|
3379
3524
|
// src/pcb/pcb_note_text.ts
|
|
3380
|
-
import { z as
|
|
3381
|
-
var pcb_note_text =
|
|
3382
|
-
type:
|
|
3525
|
+
import { z as z154 } from "zod";
|
|
3526
|
+
var pcb_note_text = z154.object({
|
|
3527
|
+
type: z154.literal("pcb_note_text"),
|
|
3383
3528
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3384
|
-
pcb_component_id:
|
|
3385
|
-
pcb_group_id:
|
|
3386
|
-
subcircuit_id:
|
|
3387
|
-
name:
|
|
3388
|
-
font:
|
|
3529
|
+
pcb_component_id: z154.string().optional(),
|
|
3530
|
+
pcb_group_id: z154.string().optional(),
|
|
3531
|
+
subcircuit_id: z154.string().optional(),
|
|
3532
|
+
name: z154.string().optional(),
|
|
3533
|
+
font: z154.literal("tscircuit2024").default("tscircuit2024"),
|
|
3389
3534
|
font_size: distance.default("1mm"),
|
|
3390
|
-
text:
|
|
3535
|
+
text: z154.string().optional(),
|
|
3391
3536
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3392
|
-
anchor_alignment:
|
|
3537
|
+
anchor_alignment: z154.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3393
3538
|
layer: visible_layer.default("top"),
|
|
3394
|
-
is_mirrored_from_top_view:
|
|
3395
|
-
color:
|
|
3539
|
+
is_mirrored_from_top_view: z154.boolean().optional(),
|
|
3540
|
+
color: z154.string().optional()
|
|
3396
3541
|
}).describe("Defines a documentation note in text on the PCB");
|
|
3397
3542
|
expectTypesMatch(true);
|
|
3398
3543
|
|
|
3399
3544
|
// src/pcb/pcb_note_rect.ts
|
|
3400
|
-
import { z as
|
|
3401
|
-
var pcb_note_rect =
|
|
3402
|
-
type:
|
|
3545
|
+
import { z as z155 } from "zod";
|
|
3546
|
+
var pcb_note_rect = z155.object({
|
|
3547
|
+
type: z155.literal("pcb_note_rect"),
|
|
3403
3548
|
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
3404
|
-
pcb_component_id:
|
|
3405
|
-
pcb_group_id:
|
|
3406
|
-
subcircuit_id:
|
|
3407
|
-
name:
|
|
3408
|
-
text:
|
|
3549
|
+
pcb_component_id: z155.string().optional(),
|
|
3550
|
+
pcb_group_id: z155.string().optional(),
|
|
3551
|
+
subcircuit_id: z155.string().optional(),
|
|
3552
|
+
name: z155.string().optional(),
|
|
3553
|
+
text: z155.string().optional(),
|
|
3409
3554
|
center: point,
|
|
3410
3555
|
width: length,
|
|
3411
3556
|
height: length,
|
|
3412
3557
|
layer: visible_layer.default("top"),
|
|
3413
3558
|
stroke_width: length.default("0.1mm"),
|
|
3414
3559
|
corner_radius: length.optional(),
|
|
3415
|
-
is_filled:
|
|
3416
|
-
has_stroke:
|
|
3417
|
-
is_stroke_dashed:
|
|
3418
|
-
color:
|
|
3560
|
+
is_filled: z155.boolean().optional(),
|
|
3561
|
+
has_stroke: z155.boolean().optional(),
|
|
3562
|
+
is_stroke_dashed: z155.boolean().optional(),
|
|
3563
|
+
color: z155.string().optional()
|
|
3419
3564
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
3420
3565
|
expectTypesMatch(true);
|
|
3421
3566
|
|
|
3422
3567
|
// src/pcb/pcb_note_path.ts
|
|
3423
|
-
import { z as
|
|
3424
|
-
var pcb_note_path =
|
|
3425
|
-
type:
|
|
3568
|
+
import { z as z156 } from "zod";
|
|
3569
|
+
var pcb_note_path = z156.object({
|
|
3570
|
+
type: z156.literal("pcb_note_path"),
|
|
3426
3571
|
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
3427
|
-
pcb_component_id:
|
|
3428
|
-
pcb_group_id:
|
|
3429
|
-
subcircuit_id:
|
|
3430
|
-
name:
|
|
3431
|
-
text:
|
|
3432
|
-
route:
|
|
3572
|
+
pcb_component_id: z156.string().optional(),
|
|
3573
|
+
pcb_group_id: z156.string().optional(),
|
|
3574
|
+
subcircuit_id: z156.string().optional(),
|
|
3575
|
+
name: z156.string().optional(),
|
|
3576
|
+
text: z156.string().optional(),
|
|
3577
|
+
route: z156.array(point),
|
|
3433
3578
|
layer: visible_layer.default("top"),
|
|
3434
3579
|
stroke_width: length.default("0.1mm"),
|
|
3435
|
-
color:
|
|
3580
|
+
color: z156.string().optional()
|
|
3436
3581
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
3437
3582
|
expectTypesMatch(true);
|
|
3438
3583
|
|
|
3439
3584
|
// src/pcb/pcb_note_line.ts
|
|
3440
|
-
import { z as
|
|
3441
|
-
var pcb_note_line =
|
|
3442
|
-
type:
|
|
3585
|
+
import { z as z157 } from "zod";
|
|
3586
|
+
var pcb_note_line = z157.object({
|
|
3587
|
+
type: z157.literal("pcb_note_line"),
|
|
3443
3588
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
3444
|
-
pcb_component_id:
|
|
3445
|
-
pcb_group_id:
|
|
3446
|
-
subcircuit_id:
|
|
3447
|
-
name:
|
|
3448
|
-
text:
|
|
3589
|
+
pcb_component_id: z157.string().optional(),
|
|
3590
|
+
pcb_group_id: z157.string().optional(),
|
|
3591
|
+
subcircuit_id: z157.string().optional(),
|
|
3592
|
+
name: z157.string().optional(),
|
|
3593
|
+
text: z157.string().optional(),
|
|
3449
3594
|
x1: distance,
|
|
3450
3595
|
y1: distance,
|
|
3451
3596
|
x2: distance,
|
|
3452
3597
|
y2: distance,
|
|
3453
3598
|
layer: visible_layer.default("top"),
|
|
3454
3599
|
stroke_width: distance.default("0.1mm"),
|
|
3455
|
-
color:
|
|
3456
|
-
is_dashed:
|
|
3600
|
+
color: z157.string().optional(),
|
|
3601
|
+
is_dashed: z157.boolean().optional()
|
|
3457
3602
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
3458
3603
|
expectTypesMatch(true);
|
|
3459
3604
|
|
|
3460
3605
|
// src/pcb/pcb_note_dimension.ts
|
|
3461
|
-
import { z as
|
|
3462
|
-
var pcb_note_dimension =
|
|
3463
|
-
type:
|
|
3606
|
+
import { z as z158 } from "zod";
|
|
3607
|
+
var pcb_note_dimension = z158.object({
|
|
3608
|
+
type: z158.literal("pcb_note_dimension"),
|
|
3464
3609
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
3465
|
-
pcb_component_id:
|
|
3466
|
-
pcb_group_id:
|
|
3467
|
-
subcircuit_id:
|
|
3468
|
-
name:
|
|
3610
|
+
pcb_component_id: z158.string().optional(),
|
|
3611
|
+
pcb_group_id: z158.string().optional(),
|
|
3612
|
+
subcircuit_id: z158.string().optional(),
|
|
3613
|
+
name: z158.string().optional(),
|
|
3469
3614
|
from: point,
|
|
3470
3615
|
to: point,
|
|
3471
|
-
text:
|
|
3472
|
-
text_ccw_rotation:
|
|
3616
|
+
text: z158.string().optional(),
|
|
3617
|
+
text_ccw_rotation: z158.number().optional(),
|
|
3473
3618
|
offset_distance: length.optional(),
|
|
3474
|
-
offset_direction:
|
|
3475
|
-
x:
|
|
3476
|
-
y:
|
|
3619
|
+
offset_direction: z158.object({
|
|
3620
|
+
x: z158.number(),
|
|
3621
|
+
y: z158.number()
|
|
3477
3622
|
}).optional(),
|
|
3478
|
-
font:
|
|
3623
|
+
font: z158.literal("tscircuit2024").default("tscircuit2024"),
|
|
3479
3624
|
font_size: length.default("1mm"),
|
|
3480
3625
|
layer: visible_layer.default("top"),
|
|
3481
|
-
color:
|
|
3626
|
+
color: z158.string().optional(),
|
|
3482
3627
|
arrow_size: length.default("1mm")
|
|
3483
3628
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
3484
3629
|
expectTypesMatch(true);
|
|
3485
3630
|
|
|
3486
3631
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
3487
|
-
import { z as
|
|
3632
|
+
import { z as z159 } from "zod";
|
|
3488
3633
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
3489
|
-
type:
|
|
3634
|
+
type: z159.literal("pcb_footprint_overlap_error"),
|
|
3490
3635
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3491
|
-
error_type:
|
|
3492
|
-
pcb_smtpad_ids:
|
|
3493
|
-
pcb_plated_hole_ids:
|
|
3494
|
-
pcb_hole_ids:
|
|
3495
|
-
pcb_keepout_ids:
|
|
3636
|
+
error_type: z159.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
3637
|
+
pcb_smtpad_ids: z159.array(z159.string()).optional(),
|
|
3638
|
+
pcb_plated_hole_ids: z159.array(z159.string()).optional(),
|
|
3639
|
+
pcb_hole_ids: z159.array(z159.string()).optional(),
|
|
3640
|
+
pcb_keepout_ids: z159.array(z159.string()).optional()
|
|
3496
3641
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
3497
3642
|
expectTypesMatch(
|
|
3498
3643
|
true
|
|
3499
3644
|
);
|
|
3500
3645
|
|
|
3501
3646
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
3502
|
-
import { z as
|
|
3647
|
+
import { z as z160 } from "zod";
|
|
3503
3648
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
3504
|
-
type:
|
|
3649
|
+
type: z160.literal("pcb_courtyard_overlap_error"),
|
|
3505
3650
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3506
|
-
error_type:
|
|
3507
|
-
pcb_component_ids:
|
|
3651
|
+
error_type: z160.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
3652
|
+
pcb_component_ids: z160.tuple([z160.string(), z160.string()])
|
|
3508
3653
|
}).describe(
|
|
3509
3654
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
3510
3655
|
);
|
|
@@ -3513,78 +3658,78 @@ expectTypesMatch(
|
|
|
3513
3658
|
);
|
|
3514
3659
|
|
|
3515
3660
|
// src/pcb/pcb_keepout.ts
|
|
3516
|
-
import { z as
|
|
3517
|
-
var pcb_keepout_outline =
|
|
3518
|
-
type:
|
|
3519
|
-
shape:
|
|
3520
|
-
pcb_group_id:
|
|
3521
|
-
subcircuit_id:
|
|
3522
|
-
outline:
|
|
3661
|
+
import { z as z161 } from "zod";
|
|
3662
|
+
var pcb_keepout_outline = z161.object({
|
|
3663
|
+
type: z161.literal("pcb_keepout"),
|
|
3664
|
+
shape: z161.literal("outline"),
|
|
3665
|
+
pcb_group_id: z161.string().optional(),
|
|
3666
|
+
subcircuit_id: z161.string().optional(),
|
|
3667
|
+
outline: z161.array(point).min(2),
|
|
3523
3668
|
stroke_width: length,
|
|
3524
|
-
pcb_keepout_id:
|
|
3525
|
-
layers:
|
|
3526
|
-
description:
|
|
3527
|
-
excluded_pcb_component_ids:
|
|
3528
|
-
warning_only:
|
|
3529
|
-
allow_traces:
|
|
3530
|
-
allow_placements:
|
|
3531
|
-
});
|
|
3532
|
-
var pcb_keepout =
|
|
3533
|
-
type:
|
|
3534
|
-
shape:
|
|
3535
|
-
pcb_group_id:
|
|
3536
|
-
subcircuit_id:
|
|
3669
|
+
pcb_keepout_id: z161.string(),
|
|
3670
|
+
layers: z161.array(z161.string()),
|
|
3671
|
+
description: z161.string().optional(),
|
|
3672
|
+
excluded_pcb_component_ids: z161.array(z161.string()).optional(),
|
|
3673
|
+
warning_only: z161.boolean().optional(),
|
|
3674
|
+
allow_traces: z161.boolean().optional(),
|
|
3675
|
+
allow_placements: z161.boolean().optional()
|
|
3676
|
+
});
|
|
3677
|
+
var pcb_keepout = z161.object({
|
|
3678
|
+
type: z161.literal("pcb_keepout"),
|
|
3679
|
+
shape: z161.literal("rect"),
|
|
3680
|
+
pcb_group_id: z161.string().optional(),
|
|
3681
|
+
subcircuit_id: z161.string().optional(),
|
|
3537
3682
|
center: point,
|
|
3538
3683
|
width: distance,
|
|
3539
3684
|
height: distance,
|
|
3540
|
-
pcb_keepout_id:
|
|
3541
|
-
layers:
|
|
3685
|
+
pcb_keepout_id: z161.string(),
|
|
3686
|
+
layers: z161.array(z161.string()),
|
|
3542
3687
|
// Specify layers where the keepout applies
|
|
3543
|
-
description:
|
|
3688
|
+
description: z161.string().optional(),
|
|
3544
3689
|
// Optional description of the keepout
|
|
3545
|
-
excluded_pcb_component_ids:
|
|
3546
|
-
warning_only:
|
|
3547
|
-
allow_traces:
|
|
3548
|
-
allow_placements:
|
|
3690
|
+
excluded_pcb_component_ids: z161.array(z161.string()).optional(),
|
|
3691
|
+
warning_only: z161.boolean().optional(),
|
|
3692
|
+
allow_traces: z161.boolean().optional(),
|
|
3693
|
+
allow_placements: z161.boolean().optional()
|
|
3549
3694
|
}).or(
|
|
3550
|
-
|
|
3551
|
-
type:
|
|
3552
|
-
shape:
|
|
3553
|
-
pcb_group_id:
|
|
3554
|
-
subcircuit_id:
|
|
3695
|
+
z161.object({
|
|
3696
|
+
type: z161.literal("pcb_keepout"),
|
|
3697
|
+
shape: z161.literal("circle"),
|
|
3698
|
+
pcb_group_id: z161.string().optional(),
|
|
3699
|
+
subcircuit_id: z161.string().optional(),
|
|
3555
3700
|
center: point,
|
|
3556
3701
|
radius: distance,
|
|
3557
|
-
pcb_keepout_id:
|
|
3558
|
-
layers:
|
|
3702
|
+
pcb_keepout_id: z161.string(),
|
|
3703
|
+
layers: z161.array(z161.string()),
|
|
3559
3704
|
// Specify layers where the keepout applies
|
|
3560
|
-
description:
|
|
3705
|
+
description: z161.string().optional(),
|
|
3561
3706
|
// Optional description of the keepout
|
|
3562
|
-
excluded_pcb_component_ids:
|
|
3563
|
-
warning_only:
|
|
3564
|
-
allow_traces:
|
|
3565
|
-
allow_placements:
|
|
3707
|
+
excluded_pcb_component_ids: z161.array(z161.string()).optional(),
|
|
3708
|
+
warning_only: z161.boolean().optional(),
|
|
3709
|
+
allow_traces: z161.boolean().optional(),
|
|
3710
|
+
allow_placements: z161.boolean().optional()
|
|
3566
3711
|
})
|
|
3567
3712
|
).or(pcb_keepout_outline);
|
|
3568
3713
|
expectTypesMatch(true);
|
|
3569
3714
|
expectTypesMatch(true);
|
|
3570
3715
|
|
|
3571
3716
|
// src/pcb/pcb_keepout_overlap_warning.ts
|
|
3572
|
-
import { z as
|
|
3573
|
-
var pcb_keepout_overlap_warning =
|
|
3574
|
-
type:
|
|
3717
|
+
import { z as z162 } from "zod";
|
|
3718
|
+
var pcb_keepout_overlap_warning = z162.object({
|
|
3719
|
+
type: z162.literal("pcb_keepout_overlap_warning"),
|
|
3575
3720
|
pcb_keepout_overlap_warning_id: getZodPrefixedIdWithDefault(
|
|
3576
3721
|
"pcb_keepout_overlap_warning"
|
|
3577
3722
|
),
|
|
3578
|
-
warning_type:
|
|
3579
|
-
message:
|
|
3580
|
-
pcb_keepout_id:
|
|
3581
|
-
pcb_component_ids:
|
|
3582
|
-
pcb_trace_ids:
|
|
3583
|
-
pcb_smtpad_ids:
|
|
3584
|
-
pcb_plated_hole_ids:
|
|
3585
|
-
pcb_via_ids:
|
|
3723
|
+
warning_type: z162.literal("pcb_keepout_overlap_warning").default("pcb_keepout_overlap_warning"),
|
|
3724
|
+
message: z162.string(),
|
|
3725
|
+
pcb_keepout_id: z162.string(),
|
|
3726
|
+
pcb_component_ids: z162.array(z162.string()).optional(),
|
|
3727
|
+
pcb_trace_ids: z162.array(z162.string()).optional(),
|
|
3728
|
+
pcb_smtpad_ids: z162.array(z162.string()).optional(),
|
|
3729
|
+
pcb_plated_hole_ids: z162.array(z162.string()).optional(),
|
|
3730
|
+
pcb_via_ids: z162.array(z162.string()).optional(),
|
|
3586
3731
|
center: point.optional(),
|
|
3587
|
-
subcircuit_id:
|
|
3732
|
+
subcircuit_id: z162.string().optional()
|
|
3588
3733
|
}).describe(
|
|
3589
3734
|
"Warning emitted when copper overlaps a PCB keepout with warning_only enabled"
|
|
3590
3735
|
);
|
|
@@ -3593,18 +3738,18 @@ expectTypesMatch(
|
|
|
3593
3738
|
);
|
|
3594
3739
|
|
|
3595
3740
|
// src/pcb/pcb_cutout.ts
|
|
3596
|
-
import { z as
|
|
3597
|
-
var pcb_cutout_base =
|
|
3598
|
-
type:
|
|
3741
|
+
import { z as z163 } from "zod";
|
|
3742
|
+
var pcb_cutout_base = z163.object({
|
|
3743
|
+
type: z163.literal("pcb_cutout"),
|
|
3599
3744
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3600
|
-
pcb_component_id:
|
|
3601
|
-
pcb_group_id:
|
|
3602
|
-
subcircuit_id:
|
|
3603
|
-
pcb_board_id:
|
|
3604
|
-
pcb_panel_id:
|
|
3745
|
+
pcb_component_id: z163.string().optional(),
|
|
3746
|
+
pcb_group_id: z163.string().optional(),
|
|
3747
|
+
subcircuit_id: z163.string().optional(),
|
|
3748
|
+
pcb_board_id: z163.string().optional(),
|
|
3749
|
+
pcb_panel_id: z163.string().optional()
|
|
3605
3750
|
});
|
|
3606
3751
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3607
|
-
shape:
|
|
3752
|
+
shape: z163.literal("rect"),
|
|
3608
3753
|
center: point,
|
|
3609
3754
|
width: length,
|
|
3610
3755
|
height: length,
|
|
@@ -3613,26 +3758,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3613
3758
|
});
|
|
3614
3759
|
expectTypesMatch(true);
|
|
3615
3760
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3616
|
-
shape:
|
|
3761
|
+
shape: z163.literal("circle"),
|
|
3617
3762
|
center: point,
|
|
3618
3763
|
radius: length
|
|
3619
3764
|
});
|
|
3620
3765
|
expectTypesMatch(true);
|
|
3621
3766
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3622
|
-
shape:
|
|
3623
|
-
points:
|
|
3767
|
+
shape: z163.literal("polygon"),
|
|
3768
|
+
points: z163.array(point)
|
|
3624
3769
|
});
|
|
3625
3770
|
expectTypesMatch(true);
|
|
3626
3771
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3627
|
-
shape:
|
|
3628
|
-
route:
|
|
3772
|
+
shape: z163.literal("path"),
|
|
3773
|
+
route: z163.array(point),
|
|
3629
3774
|
slot_width: length,
|
|
3630
3775
|
slot_length: length.optional(),
|
|
3631
3776
|
space_between_slots: length.optional(),
|
|
3632
3777
|
slot_corner_radius: length.optional()
|
|
3633
3778
|
});
|
|
3634
3779
|
expectTypesMatch(true);
|
|
3635
|
-
var pcb_cutout =
|
|
3780
|
+
var pcb_cutout = z163.discriminatedUnion("shape", [
|
|
3636
3781
|
pcb_cutout_rect,
|
|
3637
3782
|
pcb_cutout_circle,
|
|
3638
3783
|
pcb_cutout_polygon,
|
|
@@ -3641,223 +3786,223 @@ var pcb_cutout = z161.discriminatedUnion("shape", [
|
|
|
3641
3786
|
expectTypesMatch(true);
|
|
3642
3787
|
|
|
3643
3788
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3644
|
-
import { z as
|
|
3789
|
+
import { z as z164 } from "zod";
|
|
3645
3790
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3646
|
-
type:
|
|
3791
|
+
type: z164.literal("pcb_missing_footprint_error"),
|
|
3647
3792
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3648
3793
|
"pcb_missing_footprint_error"
|
|
3649
3794
|
),
|
|
3650
|
-
pcb_group_id:
|
|
3651
|
-
subcircuit_id:
|
|
3652
|
-
error_type:
|
|
3653
|
-
source_component_id:
|
|
3795
|
+
pcb_group_id: z164.string().optional(),
|
|
3796
|
+
subcircuit_id: z164.string().optional(),
|
|
3797
|
+
error_type: z164.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3798
|
+
source_component_id: z164.string()
|
|
3654
3799
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3655
3800
|
expectTypesMatch(
|
|
3656
3801
|
true
|
|
3657
3802
|
);
|
|
3658
3803
|
|
|
3659
3804
|
// src/pcb/external_footprint_load_error.ts
|
|
3660
|
-
import { z as
|
|
3805
|
+
import { z as z165 } from "zod";
|
|
3661
3806
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3662
|
-
type:
|
|
3807
|
+
type: z165.literal("external_footprint_load_error"),
|
|
3663
3808
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3664
3809
|
"external_footprint_load_error"
|
|
3665
3810
|
),
|
|
3666
|
-
pcb_component_id:
|
|
3667
|
-
source_component_id:
|
|
3668
|
-
pcb_group_id:
|
|
3669
|
-
subcircuit_id:
|
|
3670
|
-
footprinter_string:
|
|
3671
|
-
error_type:
|
|
3811
|
+
pcb_component_id: z165.string(),
|
|
3812
|
+
source_component_id: z165.string(),
|
|
3813
|
+
pcb_group_id: z165.string().optional(),
|
|
3814
|
+
subcircuit_id: z165.string().optional(),
|
|
3815
|
+
footprinter_string: z165.string().optional(),
|
|
3816
|
+
error_type: z165.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3672
3817
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3673
3818
|
expectTypesMatch(true);
|
|
3674
3819
|
|
|
3675
3820
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3676
|
-
import { z as
|
|
3821
|
+
import { z as z166 } from "zod";
|
|
3677
3822
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3678
|
-
type:
|
|
3823
|
+
type: z166.literal("circuit_json_footprint_load_error"),
|
|
3679
3824
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3680
3825
|
"circuit_json_footprint_load_error"
|
|
3681
3826
|
),
|
|
3682
|
-
pcb_component_id:
|
|
3683
|
-
source_component_id:
|
|
3684
|
-
pcb_group_id:
|
|
3685
|
-
subcircuit_id:
|
|
3686
|
-
error_type:
|
|
3687
|
-
circuit_json:
|
|
3827
|
+
pcb_component_id: z166.string(),
|
|
3828
|
+
source_component_id: z166.string(),
|
|
3829
|
+
pcb_group_id: z166.string().optional(),
|
|
3830
|
+
subcircuit_id: z166.string().optional(),
|
|
3831
|
+
error_type: z166.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3832
|
+
circuit_json: z166.array(z166.any()).optional()
|
|
3688
3833
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3689
3834
|
expectTypesMatch(true);
|
|
3690
3835
|
|
|
3691
3836
|
// src/pcb/pcb_group.ts
|
|
3692
|
-
import { z as
|
|
3693
|
-
var pcb_group =
|
|
3694
|
-
type:
|
|
3837
|
+
import { z as z167 } from "zod";
|
|
3838
|
+
var pcb_group = z167.object({
|
|
3839
|
+
type: z167.literal("pcb_group"),
|
|
3695
3840
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3696
|
-
source_group_id:
|
|
3697
|
-
is_subcircuit:
|
|
3698
|
-
subcircuit_id:
|
|
3841
|
+
source_group_id: z167.string(),
|
|
3842
|
+
is_subcircuit: z167.boolean().optional(),
|
|
3843
|
+
subcircuit_id: z167.string().optional(),
|
|
3699
3844
|
width: length.optional(),
|
|
3700
3845
|
height: length.optional(),
|
|
3701
3846
|
center: point,
|
|
3702
|
-
display_offset_x:
|
|
3847
|
+
display_offset_x: z167.string().optional().describe(
|
|
3703
3848
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3704
3849
|
),
|
|
3705
|
-
display_offset_y:
|
|
3850
|
+
display_offset_y: z167.string().optional().describe(
|
|
3706
3851
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3707
3852
|
),
|
|
3708
|
-
outline:
|
|
3853
|
+
outline: z167.array(point).optional(),
|
|
3709
3854
|
anchor_position: point.optional(),
|
|
3710
3855
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3711
|
-
position_mode:
|
|
3712
|
-
positioned_relative_to_pcb_group_id:
|
|
3713
|
-
positioned_relative_to_pcb_board_id:
|
|
3714
|
-
pcb_component_ids:
|
|
3715
|
-
child_layout_mode:
|
|
3716
|
-
name:
|
|
3717
|
-
description:
|
|
3718
|
-
layout_mode:
|
|
3719
|
-
autorouter_configuration:
|
|
3856
|
+
position_mode: z167.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3857
|
+
positioned_relative_to_pcb_group_id: z167.string().optional(),
|
|
3858
|
+
positioned_relative_to_pcb_board_id: z167.string().optional(),
|
|
3859
|
+
pcb_component_ids: z167.array(z167.string()),
|
|
3860
|
+
child_layout_mode: z167.enum(["packed", "none"]).optional(),
|
|
3861
|
+
name: z167.string().optional(),
|
|
3862
|
+
description: z167.string().optional(),
|
|
3863
|
+
layout_mode: z167.string().optional(),
|
|
3864
|
+
autorouter_configuration: z167.object({
|
|
3720
3865
|
trace_clearance: length
|
|
3721
3866
|
}).optional(),
|
|
3722
|
-
autorouter_used_string:
|
|
3867
|
+
autorouter_used_string: z167.string().optional()
|
|
3723
3868
|
}).describe("Defines a group of components on the PCB");
|
|
3724
3869
|
expectTypesMatch(true);
|
|
3725
3870
|
|
|
3726
3871
|
// src/pcb/pcb_autorouting_error.ts
|
|
3727
|
-
import { z as
|
|
3872
|
+
import { z as z168 } from "zod";
|
|
3728
3873
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3729
|
-
type:
|
|
3874
|
+
type: z168.literal("pcb_autorouting_error"),
|
|
3730
3875
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3731
|
-
error_type:
|
|
3732
|
-
subcircuit_id:
|
|
3876
|
+
error_type: z168.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3877
|
+
subcircuit_id: z168.string().optional()
|
|
3733
3878
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3734
3879
|
expectTypesMatch(true);
|
|
3735
3880
|
|
|
3736
3881
|
// src/pcb/pcb_preflight_routing_error.ts
|
|
3737
|
-
import { z as
|
|
3882
|
+
import { z as z169 } from "zod";
|
|
3738
3883
|
var pcb_preflight_routing_error = base_circuit_json_error.extend({
|
|
3739
|
-
type:
|
|
3884
|
+
type: z169.literal("pcb_preflight_routing_error"),
|
|
3740
3885
|
pcb_preflight_routing_error_id: getZodPrefixedIdWithDefault(
|
|
3741
3886
|
"pcb_preflight_routing_error"
|
|
3742
3887
|
),
|
|
3743
|
-
error_type:
|
|
3744
|
-
error_code:
|
|
3745
|
-
subcircuit_id:
|
|
3746
|
-
pcb_group_id:
|
|
3747
|
-
routing_phase_index:
|
|
3748
|
-
phase_name:
|
|
3749
|
-
source_trace_ids:
|
|
3750
|
-
pcb_component_ids:
|
|
3751
|
-
pcb_port_ids:
|
|
3752
|
-
related_error_ids:
|
|
3753
|
-
measurements:
|
|
3888
|
+
error_type: z169.literal("pcb_preflight_routing_error").default("pcb_preflight_routing_error"),
|
|
3889
|
+
error_code: z169.string(),
|
|
3890
|
+
subcircuit_id: z169.string().optional(),
|
|
3891
|
+
pcb_group_id: z169.string().optional(),
|
|
3892
|
+
routing_phase_index: z169.number().int().optional(),
|
|
3893
|
+
phase_name: z169.string().optional(),
|
|
3894
|
+
source_trace_ids: z169.array(z169.string()).optional(),
|
|
3895
|
+
pcb_component_ids: z169.array(z169.string()).optional(),
|
|
3896
|
+
pcb_port_ids: z169.array(z169.string()).optional(),
|
|
3897
|
+
related_error_ids: z169.array(z169.string()).optional(),
|
|
3898
|
+
measurements: z169.record(z169.number().finite()).optional()
|
|
3754
3899
|
});
|
|
3755
3900
|
expectTypesMatch(true);
|
|
3756
3901
|
|
|
3757
3902
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3758
|
-
import { z as
|
|
3759
|
-
var pcb_manual_edit_conflict_warning =
|
|
3760
|
-
type:
|
|
3903
|
+
import { z as z170 } from "zod";
|
|
3904
|
+
var pcb_manual_edit_conflict_warning = z170.object({
|
|
3905
|
+
type: z170.literal("pcb_manual_edit_conflict_warning"),
|
|
3761
3906
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3762
3907
|
"pcb_manual_edit_conflict_warning"
|
|
3763
3908
|
),
|
|
3764
|
-
warning_type:
|
|
3765
|
-
message:
|
|
3766
|
-
pcb_component_id:
|
|
3767
|
-
pcb_group_id:
|
|
3768
|
-
subcircuit_id:
|
|
3769
|
-
source_component_id:
|
|
3909
|
+
warning_type: z170.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3910
|
+
message: z170.string(),
|
|
3911
|
+
pcb_component_id: z170.string(),
|
|
3912
|
+
pcb_group_id: z170.string().optional(),
|
|
3913
|
+
subcircuit_id: z170.string().optional(),
|
|
3914
|
+
source_component_id: z170.string()
|
|
3770
3915
|
}).describe(
|
|
3771
3916
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3772
3917
|
);
|
|
3773
3918
|
expectTypesMatch(true);
|
|
3774
3919
|
|
|
3775
3920
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3776
|
-
import { z as
|
|
3777
|
-
var connectorOrientationDirection =
|
|
3778
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3779
|
-
type:
|
|
3921
|
+
import { z as z171 } from "zod";
|
|
3922
|
+
var connectorOrientationDirection = z171.enum(["x-", "x+", "y+", "y-"]);
|
|
3923
|
+
var pcb_connector_not_in_accessible_orientation_warning = z171.object({
|
|
3924
|
+
type: z171.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3780
3925
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3781
3926
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3782
3927
|
),
|
|
3783
|
-
warning_type:
|
|
3784
|
-
message:
|
|
3785
|
-
pcb_component_id:
|
|
3786
|
-
source_component_id:
|
|
3787
|
-
pcb_board_id:
|
|
3928
|
+
warning_type: z171.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3929
|
+
message: z171.string(),
|
|
3930
|
+
pcb_component_id: z171.string(),
|
|
3931
|
+
source_component_id: z171.string().optional(),
|
|
3932
|
+
pcb_board_id: z171.string().optional(),
|
|
3788
3933
|
facing_direction: connectorOrientationDirection,
|
|
3789
3934
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3790
|
-
subcircuit_id:
|
|
3935
|
+
subcircuit_id: z171.string().optional()
|
|
3791
3936
|
}).describe(
|
|
3792
3937
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3793
3938
|
);
|
|
3794
3939
|
expectTypesMatch(true);
|
|
3795
3940
|
|
|
3796
3941
|
// src/pcb/pcb_component_missing_courtyard_warning.ts
|
|
3797
|
-
import { z as
|
|
3798
|
-
var pcb_component_missing_courtyard_warning =
|
|
3799
|
-
type:
|
|
3942
|
+
import { z as z172 } from "zod";
|
|
3943
|
+
var pcb_component_missing_courtyard_warning = z172.object({
|
|
3944
|
+
type: z172.literal("pcb_component_missing_courtyard_warning"),
|
|
3800
3945
|
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
3801
3946
|
"pcb_component_missing_courtyard_warning"
|
|
3802
3947
|
),
|
|
3803
|
-
warning_type:
|
|
3804
|
-
message:
|
|
3805
|
-
pcb_component_id:
|
|
3806
|
-
source_component_id:
|
|
3807
|
-
subcircuit_id:
|
|
3948
|
+
warning_type: z172.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
3949
|
+
message: z172.string(),
|
|
3950
|
+
pcb_component_id: z172.string(),
|
|
3951
|
+
source_component_id: z172.string().optional(),
|
|
3952
|
+
subcircuit_id: z172.string().optional()
|
|
3808
3953
|
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
3809
3954
|
expectTypesMatch(true);
|
|
3810
3955
|
|
|
3811
3956
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3812
|
-
import { z as
|
|
3813
|
-
var supplier_footprint_mismatch_warning =
|
|
3814
|
-
type:
|
|
3957
|
+
import { z as z173 } from "zod";
|
|
3958
|
+
var supplier_footprint_mismatch_warning = z173.object({
|
|
3959
|
+
type: z173.literal("supplier_footprint_mismatch_warning"),
|
|
3815
3960
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3816
3961
|
"supplier_footprint_mismatch_warning"
|
|
3817
3962
|
),
|
|
3818
|
-
warning_type:
|
|
3819
|
-
message:
|
|
3820
|
-
source_component_id:
|
|
3821
|
-
pcb_component_id:
|
|
3822
|
-
pcb_group_id:
|
|
3823
|
-
subcircuit_id:
|
|
3963
|
+
warning_type: z173.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3964
|
+
message: z173.string(),
|
|
3965
|
+
source_component_id: z173.string(),
|
|
3966
|
+
pcb_component_id: z173.string().optional(),
|
|
3967
|
+
pcb_group_id: z173.string().optional(),
|
|
3968
|
+
subcircuit_id: z173.string().optional(),
|
|
3824
3969
|
supplier_name: supplier_name.optional(),
|
|
3825
|
-
supplier_part_number:
|
|
3826
|
-
supplier_footprint_url:
|
|
3827
|
-
footprint_copper_intersection_over_union:
|
|
3970
|
+
supplier_part_number: z173.string().optional(),
|
|
3971
|
+
supplier_footprint_url: z173.string().optional(),
|
|
3972
|
+
footprint_copper_intersection_over_union: z173.number()
|
|
3828
3973
|
}).describe(
|
|
3829
3974
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3830
3975
|
);
|
|
3831
3976
|
expectTypesMatch(true);
|
|
3832
3977
|
|
|
3833
3978
|
// src/pcb/pcb_fabricator_extra_charge_warning.ts
|
|
3834
|
-
import { z as
|
|
3835
|
-
var pcb_fabricator_extra_charge_warning =
|
|
3836
|
-
type:
|
|
3979
|
+
import { z as z174 } from "zod";
|
|
3980
|
+
var pcb_fabricator_extra_charge_warning = z174.object({
|
|
3981
|
+
type: z174.literal("pcb_fabricator_extra_charge_warning"),
|
|
3837
3982
|
pcb_fabricator_extra_charge_warning_id: getZodPrefixedIdWithDefault(
|
|
3838
3983
|
"pcb_fabricator_extra_charge_warning"
|
|
3839
3984
|
),
|
|
3840
|
-
warning_type:
|
|
3841
|
-
message:
|
|
3842
|
-
fabricator_preset:
|
|
3843
|
-
pcb_board_id:
|
|
3844
|
-
pcb_via_ids:
|
|
3845
|
-
subcircuit_id:
|
|
3985
|
+
warning_type: z174.literal("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),
|
|
3986
|
+
message: z174.string(),
|
|
3987
|
+
fabricator_preset: z174.string(),
|
|
3988
|
+
pcb_board_id: z174.string().optional(),
|
|
3989
|
+
pcb_via_ids: z174.array(z174.string()).optional(),
|
|
3990
|
+
subcircuit_id: z174.string().optional()
|
|
3846
3991
|
}).describe(
|
|
3847
3992
|
"Warning that a design feature incurs an extra charge for the selected fabricator preset, such as via hole diameters below 0.3 mm with JLCPCB economy or standard presets."
|
|
3848
3993
|
);
|
|
3849
3994
|
expectTypesMatch(true);
|
|
3850
3995
|
|
|
3851
3996
|
// src/pcb/pcb_breakout_point.ts
|
|
3852
|
-
import { z as
|
|
3853
|
-
var pcb_breakout_point =
|
|
3854
|
-
type:
|
|
3997
|
+
import { z as z175 } from "zod";
|
|
3998
|
+
var pcb_breakout_point = z175.object({
|
|
3999
|
+
type: z175.literal("pcb_breakout_point"),
|
|
3855
4000
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3856
|
-
pcb_group_id:
|
|
3857
|
-
subcircuit_id:
|
|
3858
|
-
source_trace_id:
|
|
3859
|
-
source_port_id:
|
|
3860
|
-
source_net_id:
|
|
4001
|
+
pcb_group_id: z175.string(),
|
|
4002
|
+
subcircuit_id: z175.string().optional(),
|
|
4003
|
+
source_trace_id: z175.string().optional(),
|
|
4004
|
+
source_port_id: z175.string().optional(),
|
|
4005
|
+
source_net_id: z175.string().optional(),
|
|
3861
4006
|
layer: layer_ref.optional(),
|
|
3862
4007
|
x: distance,
|
|
3863
4008
|
y: distance
|
|
@@ -3867,61 +4012,61 @@ var pcb_breakout_point = z173.object({
|
|
|
3867
4012
|
expectTypesMatch(true);
|
|
3868
4013
|
|
|
3869
4014
|
// src/pcb/pcb_ground_plane.ts
|
|
3870
|
-
import { z as
|
|
3871
|
-
var pcb_ground_plane =
|
|
3872
|
-
type:
|
|
4015
|
+
import { z as z176 } from "zod";
|
|
4016
|
+
var pcb_ground_plane = z176.object({
|
|
4017
|
+
type: z176.literal("pcb_ground_plane"),
|
|
3873
4018
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3874
|
-
source_pcb_ground_plane_id:
|
|
3875
|
-
source_net_id:
|
|
3876
|
-
pcb_group_id:
|
|
3877
|
-
subcircuit_id:
|
|
4019
|
+
source_pcb_ground_plane_id: z176.string(),
|
|
4020
|
+
source_net_id: z176.string(),
|
|
4021
|
+
pcb_group_id: z176.string().optional(),
|
|
4022
|
+
subcircuit_id: z176.string().optional()
|
|
3878
4023
|
}).describe("Defines a ground plane on the PCB");
|
|
3879
4024
|
expectTypesMatch(true);
|
|
3880
4025
|
|
|
3881
4026
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3882
|
-
import { z as
|
|
3883
|
-
var pcb_ground_plane_region =
|
|
3884
|
-
type:
|
|
4027
|
+
import { z as z177 } from "zod";
|
|
4028
|
+
var pcb_ground_plane_region = z177.object({
|
|
4029
|
+
type: z177.literal("pcb_ground_plane_region"),
|
|
3885
4030
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3886
4031
|
"pcb_ground_plane_region"
|
|
3887
4032
|
),
|
|
3888
|
-
pcb_ground_plane_id:
|
|
3889
|
-
pcb_group_id:
|
|
3890
|
-
subcircuit_id:
|
|
4033
|
+
pcb_ground_plane_id: z177.string(),
|
|
4034
|
+
pcb_group_id: z177.string().optional(),
|
|
4035
|
+
subcircuit_id: z177.string().optional(),
|
|
3891
4036
|
layer: layer_ref,
|
|
3892
|
-
points:
|
|
4037
|
+
points: z177.array(point)
|
|
3893
4038
|
}).describe("Defines a polygon region of a ground plane");
|
|
3894
4039
|
expectTypesMatch(true);
|
|
3895
4040
|
|
|
3896
4041
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3897
|
-
import { z as
|
|
3898
|
-
var pcb_thermal_spoke =
|
|
3899
|
-
type:
|
|
4042
|
+
import { z as z178 } from "zod";
|
|
4043
|
+
var pcb_thermal_spoke = z178.object({
|
|
4044
|
+
type: z178.literal("pcb_thermal_spoke"),
|
|
3900
4045
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3901
|
-
pcb_ground_plane_id:
|
|
3902
|
-
shape:
|
|
3903
|
-
spoke_count:
|
|
4046
|
+
pcb_ground_plane_id: z178.string(),
|
|
4047
|
+
shape: z178.string(),
|
|
4048
|
+
spoke_count: z178.number(),
|
|
3904
4049
|
spoke_thickness: distance,
|
|
3905
4050
|
spoke_inner_diameter: distance,
|
|
3906
4051
|
spoke_outer_diameter: distance,
|
|
3907
|
-
pcb_plated_hole_id:
|
|
3908
|
-
subcircuit_id:
|
|
4052
|
+
pcb_plated_hole_id: z178.string().optional(),
|
|
4053
|
+
subcircuit_id: z178.string().optional()
|
|
3909
4054
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3910
4055
|
expectTypesMatch(true);
|
|
3911
4056
|
|
|
3912
4057
|
// src/pcb/pcb_copper_pour.ts
|
|
3913
|
-
import { z as
|
|
3914
|
-
var pcb_copper_pour_base =
|
|
3915
|
-
type:
|
|
4058
|
+
import { z as z179 } from "zod";
|
|
4059
|
+
var pcb_copper_pour_base = z179.object({
|
|
4060
|
+
type: z179.literal("pcb_copper_pour"),
|
|
3916
4061
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3917
|
-
pcb_group_id:
|
|
3918
|
-
subcircuit_id:
|
|
4062
|
+
pcb_group_id: z179.string().optional(),
|
|
4063
|
+
subcircuit_id: z179.string().optional(),
|
|
3919
4064
|
layer: layer_ref,
|
|
3920
|
-
source_net_id:
|
|
3921
|
-
covered_with_solder_mask:
|
|
4065
|
+
source_net_id: z179.string().optional(),
|
|
4066
|
+
covered_with_solder_mask: z179.boolean().optional().default(true)
|
|
3922
4067
|
});
|
|
3923
4068
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3924
|
-
shape:
|
|
4069
|
+
shape: z179.literal("rect"),
|
|
3925
4070
|
center: point,
|
|
3926
4071
|
width: length,
|
|
3927
4072
|
height: length,
|
|
@@ -3929,16 +4074,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3929
4074
|
});
|
|
3930
4075
|
expectTypesMatch(true);
|
|
3931
4076
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3932
|
-
shape:
|
|
4077
|
+
shape: z179.literal("brep"),
|
|
3933
4078
|
brep_shape
|
|
3934
4079
|
});
|
|
3935
4080
|
expectTypesMatch(true);
|
|
3936
4081
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3937
|
-
shape:
|
|
3938
|
-
points:
|
|
4082
|
+
shape: z179.literal("polygon"),
|
|
4083
|
+
points: z179.array(point)
|
|
3939
4084
|
});
|
|
3940
4085
|
expectTypesMatch(true);
|
|
3941
|
-
var pcb_copper_pour =
|
|
4086
|
+
var pcb_copper_pour = z179.discriminatedUnion("shape", [
|
|
3942
4087
|
pcb_copper_pour_rect,
|
|
3943
4088
|
pcb_copper_pour_brep,
|
|
3944
4089
|
pcb_copper_pour_polygon
|
|
@@ -3946,99 +4091,99 @@ var pcb_copper_pour = z177.discriminatedUnion("shape", [
|
|
|
3946
4091
|
expectTypesMatch(true);
|
|
3947
4092
|
|
|
3948
4093
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3949
|
-
import { z as
|
|
4094
|
+
import { z as z180 } from "zod";
|
|
3950
4095
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3951
|
-
type:
|
|
4096
|
+
type: z180.literal("pcb_component_outside_board_error"),
|
|
3952
4097
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3953
4098
|
"pcb_component_outside_board_error"
|
|
3954
4099
|
),
|
|
3955
|
-
error_type:
|
|
3956
|
-
pcb_component_id:
|
|
3957
|
-
pcb_board_id:
|
|
4100
|
+
error_type: z180.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
4101
|
+
pcb_component_id: z180.string(),
|
|
4102
|
+
pcb_board_id: z180.string(),
|
|
3958
4103
|
component_center: point,
|
|
3959
|
-
component_bounds:
|
|
3960
|
-
min_x:
|
|
3961
|
-
max_x:
|
|
3962
|
-
min_y:
|
|
3963
|
-
max_y:
|
|
4104
|
+
component_bounds: z180.object({
|
|
4105
|
+
min_x: z180.number(),
|
|
4106
|
+
max_x: z180.number(),
|
|
4107
|
+
min_y: z180.number(),
|
|
4108
|
+
max_y: z180.number()
|
|
3964
4109
|
}),
|
|
3965
|
-
subcircuit_id:
|
|
3966
|
-
source_component_id:
|
|
4110
|
+
subcircuit_id: z180.string().optional(),
|
|
4111
|
+
source_component_id: z180.string().optional()
|
|
3967
4112
|
}).describe(
|
|
3968
4113
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3969
4114
|
);
|
|
3970
4115
|
expectTypesMatch(true);
|
|
3971
4116
|
|
|
3972
4117
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3973
|
-
import { z as
|
|
4118
|
+
import { z as z181 } from "zod";
|
|
3974
4119
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3975
|
-
type:
|
|
4120
|
+
type: z181.literal("pcb_component_not_on_board_edge_error"),
|
|
3976
4121
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3977
4122
|
"pcb_component_not_on_board_edge_error"
|
|
3978
4123
|
),
|
|
3979
|
-
error_type:
|
|
3980
|
-
pcb_component_id:
|
|
3981
|
-
pcb_board_id:
|
|
4124
|
+
error_type: z181.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
4125
|
+
pcb_component_id: z181.string(),
|
|
4126
|
+
pcb_board_id: z181.string(),
|
|
3982
4127
|
component_center: point,
|
|
3983
|
-
pad_to_nearest_board_edge_distance:
|
|
3984
|
-
source_component_id:
|
|
3985
|
-
subcircuit_id:
|
|
4128
|
+
pad_to_nearest_board_edge_distance: z181.number(),
|
|
4129
|
+
source_component_id: z181.string().optional(),
|
|
4130
|
+
subcircuit_id: z181.string().optional()
|
|
3986
4131
|
}).describe(
|
|
3987
4132
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3988
4133
|
);
|
|
3989
4134
|
expectTypesMatch(true);
|
|
3990
4135
|
|
|
3991
4136
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3992
|
-
import { z as
|
|
4137
|
+
import { z as z182 } from "zod";
|
|
3993
4138
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3994
|
-
type:
|
|
4139
|
+
type: z182.literal("pcb_component_invalid_layer_error"),
|
|
3995
4140
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3996
4141
|
"pcb_component_invalid_layer_error"
|
|
3997
4142
|
),
|
|
3998
|
-
error_type:
|
|
3999
|
-
pcb_component_id:
|
|
4000
|
-
source_component_id:
|
|
4143
|
+
error_type: z182.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
4144
|
+
pcb_component_id: z182.string().optional(),
|
|
4145
|
+
source_component_id: z182.string(),
|
|
4001
4146
|
layer: layer_ref,
|
|
4002
|
-
subcircuit_id:
|
|
4147
|
+
subcircuit_id: z182.string().optional()
|
|
4003
4148
|
}).describe(
|
|
4004
4149
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
4005
4150
|
);
|
|
4006
4151
|
expectTypesMatch(true);
|
|
4007
4152
|
|
|
4008
4153
|
// src/pcb/pcb_via_clearance_error.ts
|
|
4009
|
-
import { z as
|
|
4154
|
+
import { z as z183 } from "zod";
|
|
4010
4155
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
4011
|
-
type:
|
|
4156
|
+
type: z183.literal("pcb_via_clearance_error"),
|
|
4012
4157
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
4013
|
-
error_type:
|
|
4014
|
-
pcb_via_ids:
|
|
4158
|
+
error_type: z183.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
4159
|
+
pcb_via_ids: z183.array(z183.string()).min(2),
|
|
4015
4160
|
minimum_clearance: distance.optional(),
|
|
4016
4161
|
actual_clearance: distance.optional(),
|
|
4017
|
-
pcb_center:
|
|
4018
|
-
x:
|
|
4019
|
-
y:
|
|
4162
|
+
pcb_center: z183.object({
|
|
4163
|
+
x: z183.number().optional(),
|
|
4164
|
+
y: z183.number().optional()
|
|
4020
4165
|
}).optional(),
|
|
4021
|
-
subcircuit_id:
|
|
4166
|
+
subcircuit_id: z183.string().optional()
|
|
4022
4167
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
4023
4168
|
expectTypesMatch(true);
|
|
4024
4169
|
|
|
4025
4170
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
4026
|
-
import { z as
|
|
4171
|
+
import { z as z184 } from "zod";
|
|
4027
4172
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
4028
|
-
type:
|
|
4173
|
+
type: z184.literal("pcb_via_trace_clearance_error"),
|
|
4029
4174
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4030
4175
|
"pcb_via_trace_clearance_error"
|
|
4031
4176
|
),
|
|
4032
|
-
error_type:
|
|
4033
|
-
pcb_via_id:
|
|
4034
|
-
pcb_trace_id:
|
|
4177
|
+
error_type: z184.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
4178
|
+
pcb_via_id: z184.string(),
|
|
4179
|
+
pcb_trace_id: z184.string(),
|
|
4035
4180
|
minimum_clearance: distance.optional(),
|
|
4036
4181
|
actual_clearance: distance.optional(),
|
|
4037
|
-
center:
|
|
4038
|
-
x:
|
|
4039
|
-
y:
|
|
4182
|
+
center: z184.object({
|
|
4183
|
+
x: z184.number().optional(),
|
|
4184
|
+
y: z184.number().optional()
|
|
4040
4185
|
}).optional(),
|
|
4041
|
-
subcircuit_id:
|
|
4186
|
+
subcircuit_id: z184.string().optional()
|
|
4042
4187
|
}).describe(
|
|
4043
4188
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
4044
4189
|
);
|
|
@@ -4047,41 +4192,41 @@ expectTypesMatch(
|
|
|
4047
4192
|
);
|
|
4048
4193
|
|
|
4049
4194
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
4050
|
-
import { z as
|
|
4195
|
+
import { z as z185 } from "zod";
|
|
4051
4196
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
4052
|
-
type:
|
|
4197
|
+
type: z185.literal("pcb_pad_pad_clearance_error"),
|
|
4053
4198
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4054
4199
|
"pcb_pad_pad_clearance_error"
|
|
4055
4200
|
),
|
|
4056
|
-
error_type:
|
|
4057
|
-
pcb_pad_ids:
|
|
4201
|
+
error_type: z185.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
4202
|
+
pcb_pad_ids: z185.array(z185.string()).min(2),
|
|
4058
4203
|
minimum_clearance: distance.optional(),
|
|
4059
4204
|
actual_clearance: distance.optional(),
|
|
4060
|
-
center:
|
|
4061
|
-
x:
|
|
4062
|
-
y:
|
|
4205
|
+
center: z185.object({
|
|
4206
|
+
x: z185.number().optional(),
|
|
4207
|
+
y: z185.number().optional()
|
|
4063
4208
|
}).optional(),
|
|
4064
|
-
subcircuit_id:
|
|
4209
|
+
subcircuit_id: z185.string().optional()
|
|
4065
4210
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
4066
4211
|
expectTypesMatch(true);
|
|
4067
4212
|
|
|
4068
4213
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
4069
|
-
import { z as
|
|
4214
|
+
import { z as z186 } from "zod";
|
|
4070
4215
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
4071
|
-
type:
|
|
4216
|
+
type: z186.literal("pcb_pad_trace_clearance_error"),
|
|
4072
4217
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4073
4218
|
"pcb_pad_trace_clearance_error"
|
|
4074
4219
|
),
|
|
4075
|
-
error_type:
|
|
4076
|
-
pcb_pad_id:
|
|
4077
|
-
pcb_trace_id:
|
|
4220
|
+
error_type: z186.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
4221
|
+
pcb_pad_id: z186.string(),
|
|
4222
|
+
pcb_trace_id: z186.string(),
|
|
4078
4223
|
minimum_clearance: distance.optional(),
|
|
4079
4224
|
actual_clearance: distance.optional(),
|
|
4080
|
-
center:
|
|
4081
|
-
x:
|
|
4082
|
-
y:
|
|
4225
|
+
center: z186.object({
|
|
4226
|
+
x: z186.number().optional(),
|
|
4227
|
+
y: z186.number().optional()
|
|
4083
4228
|
}).optional(),
|
|
4084
|
-
subcircuit_id:
|
|
4229
|
+
subcircuit_id: z186.string().optional()
|
|
4085
4230
|
}).describe(
|
|
4086
4231
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
4087
4232
|
);
|
|
@@ -4090,89 +4235,89 @@ expectTypesMatch(
|
|
|
4090
4235
|
);
|
|
4091
4236
|
|
|
4092
4237
|
// src/pcb/pcb_courtyard_rect.ts
|
|
4093
|
-
import { z as
|
|
4094
|
-
var pcb_courtyard_rect =
|
|
4095
|
-
type:
|
|
4238
|
+
import { z as z187 } from "zod";
|
|
4239
|
+
var pcb_courtyard_rect = z187.object({
|
|
4240
|
+
type: z187.literal("pcb_courtyard_rect"),
|
|
4096
4241
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
4097
|
-
pcb_component_id:
|
|
4098
|
-
pcb_group_id:
|
|
4099
|
-
subcircuit_id:
|
|
4242
|
+
pcb_component_id: z187.string(),
|
|
4243
|
+
pcb_group_id: z187.string().optional(),
|
|
4244
|
+
subcircuit_id: z187.string().optional(),
|
|
4100
4245
|
center: point,
|
|
4101
4246
|
width: length,
|
|
4102
4247
|
height: length,
|
|
4103
4248
|
layer: visible_layer,
|
|
4104
4249
|
ccw_rotation: rotation.optional(),
|
|
4105
|
-
color:
|
|
4250
|
+
color: z187.string().optional()
|
|
4106
4251
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
4107
4252
|
expectTypesMatch(true);
|
|
4108
4253
|
|
|
4109
4254
|
// src/pcb/pcb_courtyard_outline.ts
|
|
4110
|
-
import { z as
|
|
4111
|
-
var pcb_courtyard_outline =
|
|
4112
|
-
type:
|
|
4255
|
+
import { z as z188 } from "zod";
|
|
4256
|
+
var pcb_courtyard_outline = z188.object({
|
|
4257
|
+
type: z188.literal("pcb_courtyard_outline"),
|
|
4113
4258
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
4114
4259
|
"pcb_courtyard_outline"
|
|
4115
4260
|
),
|
|
4116
|
-
pcb_component_id:
|
|
4117
|
-
pcb_group_id:
|
|
4118
|
-
subcircuit_id:
|
|
4261
|
+
pcb_component_id: z188.string(),
|
|
4262
|
+
pcb_group_id: z188.string().optional(),
|
|
4263
|
+
subcircuit_id: z188.string().optional(),
|
|
4119
4264
|
layer: visible_layer,
|
|
4120
|
-
outline:
|
|
4265
|
+
outline: z188.array(point).min(2)
|
|
4121
4266
|
}).describe("Defines a courtyard outline on the PCB");
|
|
4122
4267
|
expectTypesMatch(true);
|
|
4123
4268
|
|
|
4124
4269
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
4125
|
-
import { z as
|
|
4126
|
-
var pcb_courtyard_polygon =
|
|
4127
|
-
type:
|
|
4270
|
+
import { z as z189 } from "zod";
|
|
4271
|
+
var pcb_courtyard_polygon = z189.object({
|
|
4272
|
+
type: z189.literal("pcb_courtyard_polygon"),
|
|
4128
4273
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
4129
4274
|
"pcb_courtyard_polygon"
|
|
4130
4275
|
),
|
|
4131
|
-
pcb_component_id:
|
|
4132
|
-
pcb_group_id:
|
|
4133
|
-
subcircuit_id:
|
|
4276
|
+
pcb_component_id: z189.string(),
|
|
4277
|
+
pcb_group_id: z189.string().optional(),
|
|
4278
|
+
subcircuit_id: z189.string().optional(),
|
|
4134
4279
|
layer: visible_layer,
|
|
4135
|
-
points:
|
|
4136
|
-
color:
|
|
4280
|
+
points: z189.array(point).min(3),
|
|
4281
|
+
color: z189.string().optional()
|
|
4137
4282
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
4138
4283
|
expectTypesMatch(true);
|
|
4139
4284
|
|
|
4140
4285
|
// src/pcb/pcb_courtyard_circle.ts
|
|
4141
|
-
import { z as
|
|
4142
|
-
var pcb_courtyard_circle =
|
|
4143
|
-
type:
|
|
4286
|
+
import { z as z190 } from "zod";
|
|
4287
|
+
var pcb_courtyard_circle = z190.object({
|
|
4288
|
+
type: z190.literal("pcb_courtyard_circle"),
|
|
4144
4289
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
4145
4290
|
"pcb_courtyard_circle"
|
|
4146
4291
|
),
|
|
4147
|
-
pcb_component_id:
|
|
4148
|
-
pcb_group_id:
|
|
4149
|
-
subcircuit_id:
|
|
4292
|
+
pcb_component_id: z190.string(),
|
|
4293
|
+
pcb_group_id: z190.string().optional(),
|
|
4294
|
+
subcircuit_id: z190.string().optional(),
|
|
4150
4295
|
center: point,
|
|
4151
4296
|
radius: length,
|
|
4152
4297
|
layer: visible_layer,
|
|
4153
|
-
color:
|
|
4298
|
+
color: z190.string().optional()
|
|
4154
4299
|
}).describe("Defines a courtyard circle on the PCB");
|
|
4155
4300
|
expectTypesMatch(true);
|
|
4156
4301
|
|
|
4157
4302
|
// src/pcb/pcb_courtyard_pill.ts
|
|
4158
|
-
import { z as
|
|
4159
|
-
var pcb_courtyard_pill =
|
|
4160
|
-
type:
|
|
4303
|
+
import { z as z191 } from "zod";
|
|
4304
|
+
var pcb_courtyard_pill = z191.object({
|
|
4305
|
+
type: z191.literal("pcb_courtyard_pill"),
|
|
4161
4306
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
4162
|
-
pcb_component_id:
|
|
4163
|
-
pcb_group_id:
|
|
4164
|
-
subcircuit_id:
|
|
4307
|
+
pcb_component_id: z191.string(),
|
|
4308
|
+
pcb_group_id: z191.string().optional(),
|
|
4309
|
+
subcircuit_id: z191.string().optional(),
|
|
4165
4310
|
center: point,
|
|
4166
4311
|
width: length,
|
|
4167
4312
|
height: length,
|
|
4168
4313
|
radius: length,
|
|
4169
4314
|
layer: visible_layer,
|
|
4170
|
-
color:
|
|
4315
|
+
color: z191.string().optional()
|
|
4171
4316
|
}).describe("Defines a courtyard pill on the PCB");
|
|
4172
4317
|
expectTypesMatch(true);
|
|
4173
4318
|
|
|
4174
4319
|
// src/cad/cad_component.ts
|
|
4175
|
-
import { z as
|
|
4320
|
+
import { z as z192 } from "zod";
|
|
4176
4321
|
|
|
4177
4322
|
// src/cad/cad_model_conventions.ts
|
|
4178
4323
|
var cad_model_formats = [
|
|
@@ -4203,71 +4348,71 @@ var cadModelDefaultDirectionMap = {
|
|
|
4203
4348
|
};
|
|
4204
4349
|
|
|
4205
4350
|
// src/cad/cad_component.ts
|
|
4206
|
-
var cad_component =
|
|
4207
|
-
type:
|
|
4208
|
-
cad_component_id:
|
|
4209
|
-
pcb_component_id:
|
|
4351
|
+
var cad_component = z192.object({
|
|
4352
|
+
type: z192.literal("cad_component"),
|
|
4353
|
+
cad_component_id: z192.string(),
|
|
4354
|
+
pcb_component_id: z192.string().optional().describe(
|
|
4210
4355
|
"Optional PCB component reference; omit for CAD geometry without a PCB component"
|
|
4211
4356
|
),
|
|
4212
|
-
source_component_id:
|
|
4357
|
+
source_component_id: z192.string(),
|
|
4213
4358
|
position: point3,
|
|
4214
4359
|
rotation: point3.optional(),
|
|
4215
|
-
is_on_folded_board:
|
|
4360
|
+
is_on_folded_board: z192.boolean().optional().describe(
|
|
4216
4361
|
"True when position and rotation describe the assembled folded board pose. False or omitted means the flat board pose. PCB records remain flat; pcb_component_id identifies the flat mount and owning board for reversible transforms."
|
|
4217
4362
|
),
|
|
4218
4363
|
size: point3.optional(),
|
|
4219
4364
|
layer: layer_ref.optional(),
|
|
4220
|
-
subcircuit_id:
|
|
4365
|
+
subcircuit_id: z192.string().optional(),
|
|
4221
4366
|
// These are all ways to generate/load the 3d model
|
|
4222
|
-
footprinter_string:
|
|
4223
|
-
model_obj_url:
|
|
4224
|
-
model_stl_url:
|
|
4225
|
-
model_3mf_url:
|
|
4226
|
-
model_gltf_url:
|
|
4227
|
-
model_glb_url:
|
|
4228
|
-
model_step_url:
|
|
4229
|
-
model_wrl_url:
|
|
4367
|
+
footprinter_string: z192.string().optional(),
|
|
4368
|
+
model_obj_url: z192.string().optional(),
|
|
4369
|
+
model_stl_url: z192.string().optional(),
|
|
4370
|
+
model_3mf_url: z192.string().optional(),
|
|
4371
|
+
model_gltf_url: z192.string().optional(),
|
|
4372
|
+
model_glb_url: z192.string().optional(),
|
|
4373
|
+
model_step_url: z192.string().optional(),
|
|
4374
|
+
model_wrl_url: z192.string().optional(),
|
|
4230
4375
|
model_asset: asset.optional(),
|
|
4231
|
-
model_unit_to_mm_scale_factor:
|
|
4232
|
-
model_board_normal_direction:
|
|
4376
|
+
model_unit_to_mm_scale_factor: z192.number().optional(),
|
|
4377
|
+
model_board_normal_direction: z192.enum(cad_model_axis_directions).optional().describe(
|
|
4233
4378
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
4234
4379
|
),
|
|
4235
4380
|
model_origin_position: point3.optional(),
|
|
4236
|
-
model_origin_alignment:
|
|
4381
|
+
model_origin_alignment: z192.enum([
|
|
4237
4382
|
"unknown",
|
|
4238
4383
|
"center",
|
|
4239
4384
|
"center_of_component_on_board_surface",
|
|
4240
4385
|
"bottom_center_of_component"
|
|
4241
4386
|
]).optional(),
|
|
4242
|
-
model_object_fit:
|
|
4243
|
-
model_jscad:
|
|
4244
|
-
show_as_translucent_model:
|
|
4245
|
-
show_as_bounding_box:
|
|
4246
|
-
show_hidden_edges:
|
|
4247
|
-
anchor_alignment:
|
|
4387
|
+
model_object_fit: z192.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
4388
|
+
model_jscad: z192.any().optional(),
|
|
4389
|
+
show_as_translucent_model: z192.boolean().optional(),
|
|
4390
|
+
show_as_bounding_box: z192.boolean().optional(),
|
|
4391
|
+
show_hidden_edges: z192.boolean().optional(),
|
|
4392
|
+
anchor_alignment: z192.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
4248
4393
|
}).describe("Defines CAD geometry, optionally associated with a PCB component");
|
|
4249
4394
|
expectTypesMatch(true);
|
|
4250
4395
|
|
|
4251
4396
|
// src/cad/cad_collision_error.ts
|
|
4252
|
-
import { z as
|
|
4397
|
+
import { z as z193 } from "zod";
|
|
4253
4398
|
var cad_collision_error = base_circuit_json_error.extend({
|
|
4254
|
-
type:
|
|
4399
|
+
type: z193.literal("cad_collision_error"),
|
|
4255
4400
|
cad_collision_error_id: getZodPrefixedIdWithDefault("cad_collision_error"),
|
|
4256
|
-
error_type:
|
|
4257
|
-
cad_component_ids:
|
|
4258
|
-
pcb_component_ids:
|
|
4259
|
-
source_component_ids:
|
|
4260
|
-
intersection_area_mm2:
|
|
4261
|
-
threshold_area_mm2:
|
|
4401
|
+
error_type: z193.literal("cad_collision_error").default("cad_collision_error"),
|
|
4402
|
+
cad_component_ids: z193.array(z193.string()).min(1),
|
|
4403
|
+
pcb_component_ids: z193.array(z193.string()).optional(),
|
|
4404
|
+
source_component_ids: z193.array(z193.string()).min(1),
|
|
4405
|
+
intersection_area_mm2: z193.number().finite().nonnegative(),
|
|
4406
|
+
threshold_area_mm2: z193.number().finite().nonnegative()
|
|
4262
4407
|
}).describe(
|
|
4263
4408
|
"An aperture-bearing part intersects the finished enclosure. The intersection_area_mm2 is the union silhouette area of the solid intersection projected along the aperture face normal, in the right-handed Circuit JSON world frame (+X right, +Y top, +Z above). It is an area in square millimetres, not intersection volume or surface area. This indicates possible aperture misplacement, insufficient size/depth, or body clearance problems; it does not prove which cause applies."
|
|
4264
4409
|
);
|
|
4265
4410
|
expectTypesMatch(true);
|
|
4266
4411
|
|
|
4267
4412
|
// src/simulation/simulation_voltage_source.ts
|
|
4268
|
-
import { z as
|
|
4269
|
-
var wave_shape =
|
|
4270
|
-
var percentage =
|
|
4413
|
+
import { z as z194 } from "zod";
|
|
4414
|
+
var wave_shape = z194.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
4415
|
+
var percentage = z194.union([z194.string(), z194.number()]).transform((val) => {
|
|
4271
4416
|
if (typeof val === "string") {
|
|
4272
4417
|
if (val.endsWith("%")) {
|
|
4273
4418
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4276,32 +4421,32 @@ var percentage = z192.union([z192.string(), z192.number()]).transform((val) => {
|
|
|
4276
4421
|
}
|
|
4277
4422
|
return val;
|
|
4278
4423
|
}).pipe(
|
|
4279
|
-
|
|
4424
|
+
z194.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4280
4425
|
);
|
|
4281
|
-
var simulation_dc_voltage_source =
|
|
4282
|
-
type:
|
|
4426
|
+
var simulation_dc_voltage_source = z194.object({
|
|
4427
|
+
type: z194.literal("simulation_voltage_source"),
|
|
4283
4428
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4284
4429
|
"simulation_voltage_source"
|
|
4285
4430
|
),
|
|
4286
|
-
is_dc_source:
|
|
4287
|
-
positive_source_port_id:
|
|
4288
|
-
negative_source_port_id:
|
|
4289
|
-
positive_source_net_id:
|
|
4290
|
-
negative_source_net_id:
|
|
4431
|
+
is_dc_source: z194.literal(true).optional().default(true),
|
|
4432
|
+
positive_source_port_id: z194.string().optional(),
|
|
4433
|
+
negative_source_port_id: z194.string().optional(),
|
|
4434
|
+
positive_source_net_id: z194.string().optional(),
|
|
4435
|
+
negative_source_net_id: z194.string().optional(),
|
|
4291
4436
|
voltage,
|
|
4292
4437
|
ac_magnitude: voltage.optional(),
|
|
4293
4438
|
ac_phase: rotation.optional()
|
|
4294
4439
|
}).describe("Defines a DC voltage source for simulation");
|
|
4295
|
-
var simulation_ac_voltage_source =
|
|
4296
|
-
type:
|
|
4440
|
+
var simulation_ac_voltage_source = z194.object({
|
|
4441
|
+
type: z194.literal("simulation_voltage_source"),
|
|
4297
4442
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4298
4443
|
"simulation_voltage_source"
|
|
4299
4444
|
),
|
|
4300
|
-
is_dc_source:
|
|
4301
|
-
terminal1_source_port_id:
|
|
4302
|
-
terminal2_source_port_id:
|
|
4303
|
-
terminal1_source_net_id:
|
|
4304
|
-
terminal2_source_net_id:
|
|
4445
|
+
is_dc_source: z194.literal(false),
|
|
4446
|
+
terminal1_source_port_id: z194.string().optional(),
|
|
4447
|
+
terminal2_source_port_id: z194.string().optional(),
|
|
4448
|
+
terminal1_source_net_id: z194.string().optional(),
|
|
4449
|
+
terminal2_source_net_id: z194.string().optional(),
|
|
4305
4450
|
voltage: voltage.optional(),
|
|
4306
4451
|
frequency: frequency.optional(),
|
|
4307
4452
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -4316,14 +4461,14 @@ var simulation_ac_voltage_source = z192.object({
|
|
|
4316
4461
|
ac_magnitude: voltage.optional(),
|
|
4317
4462
|
ac_phase: rotation.optional()
|
|
4318
4463
|
}).describe("Defines an AC voltage source for simulation");
|
|
4319
|
-
var simulation_voltage_source =
|
|
4464
|
+
var simulation_voltage_source = z194.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
4320
4465
|
expectTypesMatch(true);
|
|
4321
4466
|
expectTypesMatch(true);
|
|
4322
4467
|
expectTypesMatch(true);
|
|
4323
4468
|
|
|
4324
4469
|
// src/simulation/simulation_current_source.ts
|
|
4325
|
-
import { z as
|
|
4326
|
-
var percentage2 =
|
|
4470
|
+
import { z as z195 } from "zod";
|
|
4471
|
+
var percentage2 = z195.union([z195.string(), z195.number()]).transform((val) => {
|
|
4327
4472
|
if (typeof val === "string") {
|
|
4328
4473
|
if (val.endsWith("%")) {
|
|
4329
4474
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4332,32 +4477,32 @@ var percentage2 = z193.union([z193.string(), z193.number()]).transform((val) =>
|
|
|
4332
4477
|
}
|
|
4333
4478
|
return val;
|
|
4334
4479
|
}).pipe(
|
|
4335
|
-
|
|
4480
|
+
z195.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4336
4481
|
);
|
|
4337
|
-
var simulation_dc_current_source =
|
|
4338
|
-
type:
|
|
4482
|
+
var simulation_dc_current_source = z195.object({
|
|
4483
|
+
type: z195.literal("simulation_current_source"),
|
|
4339
4484
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4340
4485
|
"simulation_current_source"
|
|
4341
4486
|
),
|
|
4342
|
-
is_dc_source:
|
|
4343
|
-
positive_source_port_id:
|
|
4344
|
-
negative_source_port_id:
|
|
4345
|
-
positive_source_net_id:
|
|
4346
|
-
negative_source_net_id:
|
|
4487
|
+
is_dc_source: z195.literal(true).optional().default(true),
|
|
4488
|
+
positive_source_port_id: z195.string().optional(),
|
|
4489
|
+
negative_source_port_id: z195.string().optional(),
|
|
4490
|
+
positive_source_net_id: z195.string().optional(),
|
|
4491
|
+
negative_source_net_id: z195.string().optional(),
|
|
4347
4492
|
current,
|
|
4348
4493
|
ac_magnitude: current.optional(),
|
|
4349
4494
|
ac_phase: rotation.optional()
|
|
4350
4495
|
}).describe("Defines a DC current source for simulation");
|
|
4351
|
-
var simulation_ac_current_source =
|
|
4352
|
-
type:
|
|
4496
|
+
var simulation_ac_current_source = z195.object({
|
|
4497
|
+
type: z195.literal("simulation_current_source"),
|
|
4353
4498
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4354
4499
|
"simulation_current_source"
|
|
4355
4500
|
),
|
|
4356
|
-
is_dc_source:
|
|
4357
|
-
terminal1_source_port_id:
|
|
4358
|
-
terminal2_source_port_id:
|
|
4359
|
-
terminal1_source_net_id:
|
|
4360
|
-
terminal2_source_net_id:
|
|
4501
|
+
is_dc_source: z195.literal(false),
|
|
4502
|
+
terminal1_source_port_id: z195.string().optional(),
|
|
4503
|
+
terminal2_source_port_id: z195.string().optional(),
|
|
4504
|
+
terminal1_source_net_id: z195.string().optional(),
|
|
4505
|
+
terminal2_source_net_id: z195.string().optional(),
|
|
4361
4506
|
current: current.optional(),
|
|
4362
4507
|
frequency: frequency.optional(),
|
|
4363
4508
|
peak_to_peak_current: current.optional(),
|
|
@@ -4367,58 +4512,58 @@ var simulation_ac_current_source = z193.object({
|
|
|
4367
4512
|
ac_magnitude: current.optional(),
|
|
4368
4513
|
ac_phase: rotation.optional()
|
|
4369
4514
|
}).describe("Defines an AC current source for simulation");
|
|
4370
|
-
var simulation_current_source =
|
|
4515
|
+
var simulation_current_source = z195.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
4371
4516
|
expectTypesMatch(true);
|
|
4372
4517
|
expectTypesMatch(true);
|
|
4373
4518
|
expectTypesMatch(true);
|
|
4374
4519
|
|
|
4375
4520
|
// src/simulation/simulation_experiment.ts
|
|
4376
|
-
import { z as
|
|
4521
|
+
import { z as z197 } from "zod";
|
|
4377
4522
|
|
|
4378
4523
|
// src/simulation/simulation_units.ts
|
|
4379
|
-
import { z as
|
|
4380
|
-
var simulation_dc_sweep_unit =
|
|
4524
|
+
import { z as z196 } from "zod";
|
|
4525
|
+
var simulation_dc_sweep_unit = z196.custom(
|
|
4381
4526
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
4382
4527
|
);
|
|
4383
|
-
var simulation_parameter_unit =
|
|
4528
|
+
var simulation_parameter_unit = z196.custom(
|
|
4384
4529
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
4385
4530
|
);
|
|
4386
4531
|
|
|
4387
4532
|
// src/simulation/simulation_experiment.ts
|
|
4388
|
-
var experiment_type =
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4533
|
+
var experiment_type = z197.union([
|
|
4534
|
+
z197.literal("spice_dc_sweep"),
|
|
4535
|
+
z197.literal("spice_dc_operating_point"),
|
|
4536
|
+
z197.literal("spice_transient_analysis"),
|
|
4537
|
+
z197.literal("spice_ac_analysis")
|
|
4393
4538
|
]);
|
|
4394
|
-
var spice_simulation_options =
|
|
4395
|
-
method:
|
|
4396
|
-
reltol:
|
|
4397
|
-
abstol:
|
|
4398
|
-
vntol:
|
|
4539
|
+
var spice_simulation_options = z197.object({
|
|
4540
|
+
method: z197.enum(["trap", "gear"]).optional(),
|
|
4541
|
+
reltol: z197.union([z197.number(), z197.string()]).optional(),
|
|
4542
|
+
abstol: z197.union([z197.number(), z197.string()]).optional(),
|
|
4543
|
+
vntol: z197.union([z197.number(), z197.string()]).optional()
|
|
4399
4544
|
}).describe("SPICE solver options for a simulation experiment");
|
|
4400
|
-
var simulation_experiment =
|
|
4401
|
-
type:
|
|
4545
|
+
var simulation_experiment = z197.object({
|
|
4546
|
+
type: z197.literal("simulation_experiment"),
|
|
4402
4547
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
4403
4548
|
"simulation_experiment"
|
|
4404
4549
|
),
|
|
4405
|
-
name:
|
|
4550
|
+
name: z197.string(),
|
|
4406
4551
|
experiment_type,
|
|
4407
4552
|
time_per_step: duration_ms.optional(),
|
|
4408
4553
|
start_time_ms: ms.optional(),
|
|
4409
4554
|
end_time_ms: ms.optional(),
|
|
4410
4555
|
spice_options: spice_simulation_options.optional(),
|
|
4411
|
-
dc_sweep_voltage_source_id:
|
|
4412
|
-
dc_sweep_current_source_id:
|
|
4413
|
-
dc_sweep_start:
|
|
4414
|
-
dc_sweep_stop:
|
|
4415
|
-
dc_sweep_step:
|
|
4556
|
+
dc_sweep_voltage_source_id: z197.string().optional(),
|
|
4557
|
+
dc_sweep_current_source_id: z197.string().optional(),
|
|
4558
|
+
dc_sweep_start: z197.number().optional(),
|
|
4559
|
+
dc_sweep_stop: z197.number().optional(),
|
|
4560
|
+
dc_sweep_step: z197.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
4416
4561
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
4417
|
-
ac_sweep_type:
|
|
4418
|
-
ac_samples_per_interval:
|
|
4419
|
-
ac_sample_count:
|
|
4420
|
-
ac_start_frequency_hz:
|
|
4421
|
-
ac_stop_frequency_hz:
|
|
4562
|
+
ac_sweep_type: z197.enum(["linear", "decade", "octave"]).optional(),
|
|
4563
|
+
ac_samples_per_interval: z197.number().int().positive().optional(),
|
|
4564
|
+
ac_sample_count: z197.number().int().positive().optional(),
|
|
4565
|
+
ac_start_frequency_hz: z197.number().positive().optional(),
|
|
4566
|
+
ac_stop_frequency_hz: z197.number().positive().optional()
|
|
4422
4567
|
}).superRefine((experiment, context) => {
|
|
4423
4568
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
4424
4569
|
const requiredFields = [
|
|
@@ -4430,7 +4575,7 @@ var simulation_experiment = z195.object({
|
|
|
4430
4575
|
for (const field of requiredFields) {
|
|
4431
4576
|
if (experiment[field] === void 0) {
|
|
4432
4577
|
context.addIssue({
|
|
4433
|
-
code:
|
|
4578
|
+
code: z197.ZodIssueCode.custom,
|
|
4434
4579
|
path: [field],
|
|
4435
4580
|
message: `${field} is required for a DC sweep`
|
|
4436
4581
|
});
|
|
@@ -4440,7 +4585,7 @@ var simulation_experiment = z195.object({
|
|
|
4440
4585
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
4441
4586
|
if (hasVoltageSource === hasCurrentSource) {
|
|
4442
4587
|
context.addIssue({
|
|
4443
|
-
code:
|
|
4588
|
+
code: z197.ZodIssueCode.custom,
|
|
4444
4589
|
path: ["dc_sweep_voltage_source_id"],
|
|
4445
4590
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
4446
4591
|
});
|
|
@@ -4449,35 +4594,35 @@ var simulation_experiment = z195.object({
|
|
|
4449
4594
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
4450
4595
|
if (experiment.ac_sweep_type === void 0) {
|
|
4451
4596
|
context.addIssue({
|
|
4452
|
-
code:
|
|
4597
|
+
code: z197.ZodIssueCode.custom,
|
|
4453
4598
|
path: ["ac_sweep_type"],
|
|
4454
4599
|
message: "ac_sweep_type is required for an AC analysis"
|
|
4455
4600
|
});
|
|
4456
4601
|
}
|
|
4457
4602
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
4458
4603
|
context.addIssue({
|
|
4459
|
-
code:
|
|
4604
|
+
code: z197.ZodIssueCode.custom,
|
|
4460
4605
|
path: ["ac_start_frequency_hz"],
|
|
4461
4606
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
4462
4607
|
});
|
|
4463
4608
|
}
|
|
4464
4609
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
4465
4610
|
context.addIssue({
|
|
4466
|
-
code:
|
|
4611
|
+
code: z197.ZodIssueCode.custom,
|
|
4467
4612
|
path: ["ac_stop_frequency_hz"],
|
|
4468
4613
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
4469
4614
|
});
|
|
4470
4615
|
}
|
|
4471
4616
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
4472
4617
|
context.addIssue({
|
|
4473
|
-
code:
|
|
4618
|
+
code: z197.ZodIssueCode.custom,
|
|
4474
4619
|
path: ["ac_sample_count"],
|
|
4475
4620
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
4476
4621
|
});
|
|
4477
4622
|
}
|
|
4478
4623
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
4479
4624
|
context.addIssue({
|
|
4480
|
-
code:
|
|
4625
|
+
code: z197.ZodIssueCode.custom,
|
|
4481
4626
|
path: ["ac_samples_per_interval"],
|
|
4482
4627
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
4483
4628
|
});
|
|
@@ -4487,87 +4632,87 @@ var simulation_experiment = z195.object({
|
|
|
4487
4632
|
expectTypesMatch(true);
|
|
4488
4633
|
|
|
4489
4634
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4490
|
-
import { z as
|
|
4635
|
+
import { z as z199 } from "zod";
|
|
4491
4636
|
|
|
4492
4637
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
4493
|
-
import { z as
|
|
4494
|
-
var simulation_parameter_sweep_coordinate =
|
|
4495
|
-
simulation_parameter_sweep_id:
|
|
4496
|
-
sweep_index:
|
|
4497
|
-
parameter_value:
|
|
4638
|
+
import { z as z198 } from "zod";
|
|
4639
|
+
var simulation_parameter_sweep_coordinate = z198.object({
|
|
4640
|
+
simulation_parameter_sweep_id: z198.string(),
|
|
4641
|
+
sweep_index: z198.number().int().nonnegative(),
|
|
4642
|
+
parameter_value: z198.number(),
|
|
4498
4643
|
parameter_unit: simulation_parameter_unit
|
|
4499
4644
|
});
|
|
4500
4645
|
expectTypesMatch(true);
|
|
4501
4646
|
|
|
4502
4647
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4503
|
-
var simulation_transient_voltage_graph =
|
|
4504
|
-
type:
|
|
4648
|
+
var simulation_transient_voltage_graph = z199.object({
|
|
4649
|
+
type: z199.literal("simulation_transient_voltage_graph"),
|
|
4505
4650
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4506
4651
|
"simulation_transient_voltage_graph"
|
|
4507
4652
|
),
|
|
4508
|
-
simulation_experiment_id:
|
|
4653
|
+
simulation_experiment_id: z199.string(),
|
|
4509
4654
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4510
|
-
timestamps_ms:
|
|
4511
|
-
voltage_levels:
|
|
4512
|
-
source_component_id:
|
|
4513
|
-
subcircuit_connectivity_map_key:
|
|
4655
|
+
timestamps_ms: z199.array(z199.number()).optional(),
|
|
4656
|
+
voltage_levels: z199.array(z199.number()),
|
|
4657
|
+
source_component_id: z199.string().optional(),
|
|
4658
|
+
subcircuit_connectivity_map_key: z199.string().optional(),
|
|
4514
4659
|
time_per_step: duration_ms,
|
|
4515
4660
|
start_time_ms: ms,
|
|
4516
4661
|
end_time_ms: ms,
|
|
4517
|
-
name:
|
|
4518
|
-
color:
|
|
4662
|
+
name: z199.string().optional(),
|
|
4663
|
+
color: z199.string().optional()
|
|
4519
4664
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4520
4665
|
expectTypesMatch(true);
|
|
4521
4666
|
|
|
4522
4667
|
// src/simulation/simulation_transient_current_graph.ts
|
|
4523
|
-
import { z as
|
|
4524
|
-
var simulation_transient_current_graph =
|
|
4525
|
-
type:
|
|
4668
|
+
import { z as z200 } from "zod";
|
|
4669
|
+
var simulation_transient_current_graph = z200.object({
|
|
4670
|
+
type: z200.literal("simulation_transient_current_graph"),
|
|
4526
4671
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4527
4672
|
"simulation_transient_current_graph"
|
|
4528
4673
|
),
|
|
4529
|
-
simulation_experiment_id:
|
|
4674
|
+
simulation_experiment_id: z200.string(),
|
|
4530
4675
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4531
|
-
timestamps_ms:
|
|
4532
|
-
current_levels:
|
|
4533
|
-
source_component_id:
|
|
4534
|
-
subcircuit_connectivity_map_key:
|
|
4676
|
+
timestamps_ms: z200.array(z200.number()).optional(),
|
|
4677
|
+
current_levels: z200.array(z200.number()),
|
|
4678
|
+
source_component_id: z200.string().optional(),
|
|
4679
|
+
subcircuit_connectivity_map_key: z200.string().optional(),
|
|
4535
4680
|
time_per_step: duration_ms,
|
|
4536
4681
|
start_time_ms: ms,
|
|
4537
4682
|
end_time_ms: ms,
|
|
4538
|
-
name:
|
|
4539
|
-
color:
|
|
4683
|
+
name: z200.string().optional(),
|
|
4684
|
+
color: z200.string().optional()
|
|
4540
4685
|
}).describe("Stores current measurements over time for a simulation");
|
|
4541
4686
|
expectTypesMatch(true);
|
|
4542
4687
|
|
|
4543
4688
|
// src/simulation/simulation_switch.ts
|
|
4544
|
-
import { z as
|
|
4545
|
-
var simulation_switch =
|
|
4546
|
-
type:
|
|
4689
|
+
import { z as z201 } from "zod";
|
|
4690
|
+
var simulation_switch = z201.object({
|
|
4691
|
+
type: z201.literal("simulation_switch"),
|
|
4547
4692
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4548
|
-
source_component_id:
|
|
4693
|
+
source_component_id: z201.string().optional(),
|
|
4549
4694
|
closes_at: ms.optional(),
|
|
4550
4695
|
opens_at: ms.optional(),
|
|
4551
|
-
starts_closed:
|
|
4696
|
+
starts_closed: z201.boolean().optional(),
|
|
4552
4697
|
switching_frequency: frequency.optional()
|
|
4553
4698
|
}).describe("Defines a switch for simulation timing control");
|
|
4554
4699
|
expectTypesMatch(true);
|
|
4555
4700
|
|
|
4556
4701
|
// src/simulation/simulation_voltage_probe.ts
|
|
4557
|
-
import { z as
|
|
4558
|
-
var simulation_voltage_probe =
|
|
4559
|
-
type:
|
|
4702
|
+
import { z as z202 } from "zod";
|
|
4703
|
+
var simulation_voltage_probe = z202.object({
|
|
4704
|
+
type: z202.literal("simulation_voltage_probe"),
|
|
4560
4705
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4561
4706
|
"simulation_voltage_probe"
|
|
4562
4707
|
),
|
|
4563
|
-
source_component_id:
|
|
4564
|
-
name:
|
|
4565
|
-
signal_input_source_port_id:
|
|
4566
|
-
signal_input_source_net_id:
|
|
4567
|
-
reference_input_source_port_id:
|
|
4568
|
-
reference_input_source_net_id:
|
|
4569
|
-
subcircuit_id:
|
|
4570
|
-
color:
|
|
4708
|
+
source_component_id: z202.string().optional(),
|
|
4709
|
+
name: z202.string().optional(),
|
|
4710
|
+
signal_input_source_port_id: z202.string().optional(),
|
|
4711
|
+
signal_input_source_net_id: z202.string().optional(),
|
|
4712
|
+
reference_input_source_port_id: z202.string().optional(),
|
|
4713
|
+
reference_input_source_net_id: z202.string().optional(),
|
|
4714
|
+
subcircuit_id: z202.string().optional(),
|
|
4715
|
+
color: z202.string().optional()
|
|
4571
4716
|
}).describe(
|
|
4572
4717
|
"Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points."
|
|
4573
4718
|
).superRefine((data, ctx) => {
|
|
@@ -4577,20 +4722,20 @@ var simulation_voltage_probe = z200.object({
|
|
|
4577
4722
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4578
4723
|
if (has_ports && has_nets) {
|
|
4579
4724
|
ctx.addIssue({
|
|
4580
|
-
code:
|
|
4725
|
+
code: z202.ZodIssueCode.custom,
|
|
4581
4726
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4582
4727
|
});
|
|
4583
4728
|
} else if (has_ports) {
|
|
4584
4729
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4585
4730
|
ctx.addIssue({
|
|
4586
|
-
code:
|
|
4731
|
+
code: z202.ZodIssueCode.custom,
|
|
4587
4732
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4588
4733
|
});
|
|
4589
4734
|
}
|
|
4590
4735
|
} else if (has_nets) {
|
|
4591
4736
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4592
4737
|
ctx.addIssue({
|
|
4593
|
-
code:
|
|
4738
|
+
code: z202.ZodIssueCode.custom,
|
|
4594
4739
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4595
4740
|
});
|
|
4596
4741
|
}
|
|
@@ -4598,7 +4743,7 @@ var simulation_voltage_probe = z200.object({
|
|
|
4598
4743
|
} else {
|
|
4599
4744
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4600
4745
|
ctx.addIssue({
|
|
4601
|
-
code:
|
|
4746
|
+
code: z202.ZodIssueCode.custom,
|
|
4602
4747
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4603
4748
|
});
|
|
4604
4749
|
}
|
|
@@ -4607,20 +4752,20 @@ var simulation_voltage_probe = z200.object({
|
|
|
4607
4752
|
expectTypesMatch(true);
|
|
4608
4753
|
|
|
4609
4754
|
// src/simulation/simulation_current_probe.ts
|
|
4610
|
-
import { z as
|
|
4611
|
-
var simulation_current_probe =
|
|
4612
|
-
type:
|
|
4755
|
+
import { z as z203 } from "zod";
|
|
4756
|
+
var simulation_current_probe = z203.object({
|
|
4757
|
+
type: z203.literal("simulation_current_probe"),
|
|
4613
4758
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4614
4759
|
"simulation_current_probe"
|
|
4615
4760
|
),
|
|
4616
|
-
source_component_id:
|
|
4617
|
-
name:
|
|
4618
|
-
positive_source_port_id:
|
|
4619
|
-
negative_source_port_id:
|
|
4620
|
-
positive_source_net_id:
|
|
4621
|
-
negative_source_net_id:
|
|
4622
|
-
subcircuit_id:
|
|
4623
|
-
color:
|
|
4761
|
+
source_component_id: z203.string().optional(),
|
|
4762
|
+
name: z203.string().optional(),
|
|
4763
|
+
positive_source_port_id: z203.string().optional(),
|
|
4764
|
+
negative_source_port_id: z203.string().optional(),
|
|
4765
|
+
positive_source_net_id: z203.string().optional(),
|
|
4766
|
+
negative_source_net_id: z203.string().optional(),
|
|
4767
|
+
subcircuit_id: z203.string().optional(),
|
|
4768
|
+
color: z203.string().optional()
|
|
4624
4769
|
}).describe(
|
|
4625
4770
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4626
4771
|
).superRefine((data, ctx) => {
|
|
@@ -4632,7 +4777,7 @@ var simulation_current_probe = z201.object({
|
|
|
4632
4777
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4633
4778
|
if (hasPorts && hasNets) {
|
|
4634
4779
|
ctx.addIssue({
|
|
4635
|
-
code:
|
|
4780
|
+
code: z203.ZodIssueCode.custom,
|
|
4636
4781
|
message: "Cannot mix port and net connections in a current probe."
|
|
4637
4782
|
});
|
|
4638
4783
|
return;
|
|
@@ -4640,7 +4785,7 @@ var simulation_current_probe = z201.object({
|
|
|
4640
4785
|
if (hasPorts) {
|
|
4641
4786
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4642
4787
|
ctx.addIssue({
|
|
4643
|
-
code:
|
|
4788
|
+
code: z203.ZodIssueCode.custom,
|
|
4644
4789
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4645
4790
|
});
|
|
4646
4791
|
}
|
|
@@ -4649,71 +4794,71 @@ var simulation_current_probe = z201.object({
|
|
|
4649
4794
|
if (hasNets) {
|
|
4650
4795
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4651
4796
|
ctx.addIssue({
|
|
4652
|
-
code:
|
|
4797
|
+
code: z203.ZodIssueCode.custom,
|
|
4653
4798
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4654
4799
|
});
|
|
4655
4800
|
}
|
|
4656
4801
|
return;
|
|
4657
4802
|
}
|
|
4658
4803
|
ctx.addIssue({
|
|
4659
|
-
code:
|
|
4804
|
+
code: z203.ZodIssueCode.custom,
|
|
4660
4805
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4661
4806
|
});
|
|
4662
4807
|
});
|
|
4663
4808
|
expectTypesMatch(true);
|
|
4664
4809
|
|
|
4665
4810
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4666
|
-
import { z as
|
|
4811
|
+
import { z as z204 } from "zod";
|
|
4667
4812
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4668
|
-
type:
|
|
4813
|
+
type: z204.literal("simulation_unknown_experiment_error"),
|
|
4669
4814
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4670
4815
|
"simulation_unknown_experiment_error"
|
|
4671
4816
|
),
|
|
4672
|
-
error_type:
|
|
4673
|
-
simulation_experiment_id:
|
|
4674
|
-
subcircuit_id:
|
|
4817
|
+
error_type: z204.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4818
|
+
simulation_experiment_id: z204.string().optional(),
|
|
4819
|
+
subcircuit_id: z204.string().optional()
|
|
4675
4820
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4676
4821
|
expectTypesMatch(true);
|
|
4677
4822
|
|
|
4678
4823
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4679
|
-
import { z as
|
|
4680
|
-
var simulation_parameter_type =
|
|
4824
|
+
import { z as z205 } from "zod";
|
|
4825
|
+
var simulation_parameter_type = z205.enum([
|
|
4681
4826
|
"resistance",
|
|
4682
4827
|
"capacitance",
|
|
4683
4828
|
"inductance",
|
|
4684
4829
|
"voltage",
|
|
4685
4830
|
"current"
|
|
4686
4831
|
]);
|
|
4687
|
-
var simulation_parameter_sweep_base =
|
|
4688
|
-
type:
|
|
4832
|
+
var simulation_parameter_sweep_base = z205.object({
|
|
4833
|
+
type: z205.literal("simulation_parameter_sweep"),
|
|
4689
4834
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4690
4835
|
"simulation_parameter_sweep"
|
|
4691
4836
|
),
|
|
4692
|
-
simulation_experiment_id:
|
|
4693
|
-
name:
|
|
4694
|
-
parameter_values:
|
|
4837
|
+
simulation_experiment_id: z205.string(),
|
|
4838
|
+
name: z205.string().optional(),
|
|
4839
|
+
parameter_values: z205.array(z205.number()).min(1),
|
|
4695
4840
|
parameter_unit: simulation_parameter_unit
|
|
4696
4841
|
});
|
|
4697
|
-
var simulation_parameter_sweep =
|
|
4842
|
+
var simulation_parameter_sweep = z205.discriminatedUnion("parameter_type", [
|
|
4698
4843
|
simulation_parameter_sweep_base.extend({
|
|
4699
|
-
parameter_type:
|
|
4700
|
-
resistor_source_component_id:
|
|
4844
|
+
parameter_type: z205.literal("resistance"),
|
|
4845
|
+
resistor_source_component_id: z205.string()
|
|
4701
4846
|
}),
|
|
4702
4847
|
simulation_parameter_sweep_base.extend({
|
|
4703
|
-
parameter_type:
|
|
4704
|
-
capacitor_source_component_id:
|
|
4848
|
+
parameter_type: z205.literal("capacitance"),
|
|
4849
|
+
capacitor_source_component_id: z205.string()
|
|
4705
4850
|
}),
|
|
4706
4851
|
simulation_parameter_sweep_base.extend({
|
|
4707
|
-
parameter_type:
|
|
4708
|
-
inductor_source_component_id:
|
|
4852
|
+
parameter_type: z205.literal("inductance"),
|
|
4853
|
+
inductor_source_component_id: z205.string()
|
|
4709
4854
|
}),
|
|
4710
4855
|
simulation_parameter_sweep_base.extend({
|
|
4711
|
-
parameter_type:
|
|
4712
|
-
source_net_id:
|
|
4856
|
+
parameter_type: z205.literal("voltage"),
|
|
4857
|
+
source_net_id: z205.string()
|
|
4713
4858
|
}),
|
|
4714
4859
|
simulation_parameter_sweep_base.extend({
|
|
4715
|
-
parameter_type:
|
|
4716
|
-
current_source_component_id:
|
|
4860
|
+
parameter_type: z205.literal("current"),
|
|
4861
|
+
current_source_component_id: z205.string()
|
|
4717
4862
|
})
|
|
4718
4863
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4719
4864
|
expectTypesMatch(
|
|
@@ -4721,52 +4866,52 @@ expectTypesMatch(
|
|
|
4721
4866
|
);
|
|
4722
4867
|
|
|
4723
4868
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4724
|
-
import { z as
|
|
4725
|
-
var simulation_dc_operating_point_voltage =
|
|
4726
|
-
type:
|
|
4869
|
+
import { z as z206 } from "zod";
|
|
4870
|
+
var simulation_dc_operating_point_voltage = z206.object({
|
|
4871
|
+
type: z206.literal("simulation_dc_operating_point_voltage"),
|
|
4727
4872
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4728
4873
|
"simulation_dc_operating_point_voltage"
|
|
4729
4874
|
),
|
|
4730
|
-
simulation_experiment_id:
|
|
4875
|
+
simulation_experiment_id: z206.string(),
|
|
4731
4876
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4732
|
-
simulation_voltage_probe_id:
|
|
4733
|
-
voltage:
|
|
4734
|
-
name:
|
|
4735
|
-
color:
|
|
4877
|
+
simulation_voltage_probe_id: z206.string(),
|
|
4878
|
+
voltage: z206.number(),
|
|
4879
|
+
name: z206.string().optional(),
|
|
4880
|
+
color: z206.string().optional()
|
|
4736
4881
|
});
|
|
4737
4882
|
expectTypesMatch(true);
|
|
4738
4883
|
|
|
4739
4884
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4740
|
-
import { z as
|
|
4741
|
-
var simulation_dc_operating_point_current =
|
|
4742
|
-
type:
|
|
4885
|
+
import { z as z207 } from "zod";
|
|
4886
|
+
var simulation_dc_operating_point_current = z207.object({
|
|
4887
|
+
type: z207.literal("simulation_dc_operating_point_current"),
|
|
4743
4888
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4744
4889
|
"simulation_dc_operating_point_current"
|
|
4745
4890
|
),
|
|
4746
|
-
simulation_experiment_id:
|
|
4891
|
+
simulation_experiment_id: z207.string(),
|
|
4747
4892
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4748
|
-
simulation_current_probe_id:
|
|
4749
|
-
current:
|
|
4750
|
-
name:
|
|
4751
|
-
color:
|
|
4893
|
+
simulation_current_probe_id: z207.string(),
|
|
4894
|
+
current: z207.number(),
|
|
4895
|
+
name: z207.string().optional(),
|
|
4896
|
+
color: z207.string().optional()
|
|
4752
4897
|
});
|
|
4753
4898
|
expectTypesMatch(true);
|
|
4754
4899
|
|
|
4755
4900
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4756
|
-
import { z as
|
|
4757
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4758
|
-
type:
|
|
4901
|
+
import { z as z208 } from "zod";
|
|
4902
|
+
var simulation_dc_sweep_voltage_graph = z208.object({
|
|
4903
|
+
type: z208.literal("simulation_dc_sweep_voltage_graph"),
|
|
4759
4904
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4760
4905
|
"simulation_dc_sweep_voltage_graph"
|
|
4761
4906
|
),
|
|
4762
|
-
simulation_experiment_id:
|
|
4907
|
+
simulation_experiment_id: z208.string(),
|
|
4763
4908
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4764
|
-
simulation_voltage_probe_id:
|
|
4765
|
-
sweep_values:
|
|
4909
|
+
simulation_voltage_probe_id: z208.string(),
|
|
4910
|
+
sweep_values: z208.array(z208.number()),
|
|
4766
4911
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4767
|
-
voltage_levels:
|
|
4768
|
-
name:
|
|
4769
|
-
color:
|
|
4912
|
+
voltage_levels: z208.array(z208.number()),
|
|
4913
|
+
name: z208.string().optional(),
|
|
4914
|
+
color: z208.string().optional()
|
|
4770
4915
|
}).refine(
|
|
4771
4916
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4772
4917
|
{
|
|
@@ -4776,20 +4921,20 @@ var simulation_dc_sweep_voltage_graph = z206.object({
|
|
|
4776
4921
|
expectTypesMatch(true);
|
|
4777
4922
|
|
|
4778
4923
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
4779
|
-
import { z as
|
|
4780
|
-
var simulation_dc_sweep_current_graph =
|
|
4781
|
-
type:
|
|
4924
|
+
import { z as z209 } from "zod";
|
|
4925
|
+
var simulation_dc_sweep_current_graph = z209.object({
|
|
4926
|
+
type: z209.literal("simulation_dc_sweep_current_graph"),
|
|
4782
4927
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4783
4928
|
"simulation_dc_sweep_current_graph"
|
|
4784
4929
|
),
|
|
4785
|
-
simulation_experiment_id:
|
|
4930
|
+
simulation_experiment_id: z209.string(),
|
|
4786
4931
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4787
|
-
simulation_current_probe_id:
|
|
4788
|
-
sweep_values:
|
|
4932
|
+
simulation_current_probe_id: z209.string(),
|
|
4933
|
+
sweep_values: z209.array(z209.number()),
|
|
4789
4934
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4790
|
-
current_levels:
|
|
4791
|
-
name:
|
|
4792
|
-
color:
|
|
4935
|
+
current_levels: z209.array(z209.number()),
|
|
4936
|
+
name: z209.string().optional(),
|
|
4937
|
+
color: z209.string().optional()
|
|
4793
4938
|
}).refine(
|
|
4794
4939
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4795
4940
|
{
|
|
@@ -4799,29 +4944,29 @@ var simulation_dc_sweep_current_graph = z207.object({
|
|
|
4799
4944
|
expectTypesMatch(true);
|
|
4800
4945
|
|
|
4801
4946
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4802
|
-
import { z as
|
|
4947
|
+
import { z as z211 } from "zod";
|
|
4803
4948
|
|
|
4804
4949
|
// src/simulation/simulation_complex_sample.ts
|
|
4805
|
-
import { z as
|
|
4806
|
-
var simulation_complex_sample =
|
|
4807
|
-
re:
|
|
4808
|
-
im:
|
|
4950
|
+
import { z as z210 } from "zod";
|
|
4951
|
+
var simulation_complex_sample = z210.object({
|
|
4952
|
+
re: z210.number(),
|
|
4953
|
+
im: z210.number()
|
|
4809
4954
|
});
|
|
4810
4955
|
expectTypesMatch(true);
|
|
4811
4956
|
|
|
4812
4957
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4813
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4814
|
-
type:
|
|
4958
|
+
var simulation_ac_sweep_voltage_graph = z211.object({
|
|
4959
|
+
type: z211.literal("simulation_ac_sweep_voltage_graph"),
|
|
4815
4960
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4816
4961
|
"simulation_ac_sweep_voltage_graph"
|
|
4817
4962
|
),
|
|
4818
|
-
simulation_experiment_id:
|
|
4963
|
+
simulation_experiment_id: z211.string(),
|
|
4819
4964
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4820
|
-
simulation_voltage_probe_id:
|
|
4821
|
-
frequencies_hz:
|
|
4822
|
-
complex_voltages:
|
|
4823
|
-
name:
|
|
4824
|
-
color:
|
|
4965
|
+
simulation_voltage_probe_id: z211.string(),
|
|
4966
|
+
frequencies_hz: z211.array(z211.number()),
|
|
4967
|
+
complex_voltages: z211.array(simulation_complex_sample),
|
|
4968
|
+
name: z211.string().optional(),
|
|
4969
|
+
color: z211.string().optional()
|
|
4825
4970
|
}).refine(
|
|
4826
4971
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4827
4972
|
{
|
|
@@ -4831,19 +4976,19 @@ var simulation_ac_sweep_voltage_graph = z209.object({
|
|
|
4831
4976
|
expectTypesMatch(true);
|
|
4832
4977
|
|
|
4833
4978
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
4834
|
-
import { z as
|
|
4835
|
-
var simulation_ac_sweep_current_graph =
|
|
4836
|
-
type:
|
|
4979
|
+
import { z as z212 } from "zod";
|
|
4980
|
+
var simulation_ac_sweep_current_graph = z212.object({
|
|
4981
|
+
type: z212.literal("simulation_ac_sweep_current_graph"),
|
|
4837
4982
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4838
4983
|
"simulation_ac_sweep_current_graph"
|
|
4839
4984
|
),
|
|
4840
|
-
simulation_experiment_id:
|
|
4985
|
+
simulation_experiment_id: z212.string(),
|
|
4841
4986
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4842
|
-
simulation_current_probe_id:
|
|
4843
|
-
frequencies_hz:
|
|
4844
|
-
complex_currents:
|
|
4845
|
-
name:
|
|
4846
|
-
color:
|
|
4987
|
+
simulation_current_probe_id: z212.string(),
|
|
4988
|
+
frequencies_hz: z212.array(z212.number()),
|
|
4989
|
+
complex_currents: z212.array(simulation_complex_sample),
|
|
4990
|
+
name: z212.string().optional(),
|
|
4991
|
+
color: z212.string().optional()
|
|
4847
4992
|
}).refine(
|
|
4848
4993
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4849
4994
|
{
|
|
@@ -4853,52 +4998,52 @@ var simulation_ac_sweep_current_graph = z210.object({
|
|
|
4853
4998
|
expectTypesMatch(true);
|
|
4854
4999
|
|
|
4855
5000
|
// src/simulation/simulation_op_amp.ts
|
|
4856
|
-
import { z as
|
|
4857
|
-
var simulation_op_amp =
|
|
4858
|
-
type:
|
|
5001
|
+
import { z as z213 } from "zod";
|
|
5002
|
+
var simulation_op_amp = z213.object({
|
|
5003
|
+
type: z213.literal("simulation_op_amp"),
|
|
4859
5004
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
4860
|
-
source_component_id:
|
|
4861
|
-
inverting_input_source_port_id:
|
|
4862
|
-
non_inverting_input_source_port_id:
|
|
4863
|
-
output_source_port_id:
|
|
4864
|
-
positive_supply_source_port_id:
|
|
4865
|
-
negative_supply_source_port_id:
|
|
5005
|
+
source_component_id: z213.string().optional(),
|
|
5006
|
+
inverting_input_source_port_id: z213.string(),
|
|
5007
|
+
non_inverting_input_source_port_id: z213.string(),
|
|
5008
|
+
output_source_port_id: z213.string(),
|
|
5009
|
+
positive_supply_source_port_id: z213.string(),
|
|
5010
|
+
negative_supply_source_port_id: z213.string()
|
|
4866
5011
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4867
5012
|
expectTypesMatch(true);
|
|
4868
5013
|
|
|
4869
5014
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
4870
|
-
import { z as
|
|
4871
|
-
var simulation_spice_subcircuit =
|
|
4872
|
-
type:
|
|
5015
|
+
import { z as z214 } from "zod";
|
|
5016
|
+
var simulation_spice_subcircuit = z214.object({
|
|
5017
|
+
type: z214.literal("simulation_spice_subcircuit"),
|
|
4873
5018
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4874
5019
|
"simulation_spice_subcircuit"
|
|
4875
5020
|
),
|
|
4876
|
-
source_component_id:
|
|
4877
|
-
spice_pin_to_source_port_map:
|
|
4878
|
-
subcircuit_source:
|
|
5021
|
+
source_component_id: z214.string(),
|
|
5022
|
+
spice_pin_to_source_port_map: z214.record(z214.string(), z214.string()),
|
|
5023
|
+
subcircuit_source: z214.string()
|
|
4879
5024
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4880
5025
|
expectTypesMatch(
|
|
4881
5026
|
true
|
|
4882
5027
|
);
|
|
4883
5028
|
|
|
4884
5029
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
4885
|
-
import { z as
|
|
5030
|
+
import { z as z215 } from "zod";
|
|
4886
5031
|
var hasValue = (value) => value !== void 0;
|
|
4887
|
-
var simulation_oscilloscope_trace =
|
|
4888
|
-
type:
|
|
5032
|
+
var simulation_oscilloscope_trace = z215.object({
|
|
5033
|
+
type: z215.literal("simulation_oscilloscope_trace"),
|
|
4889
5034
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4890
5035
|
"simulation_oscilloscope_trace"
|
|
4891
5036
|
),
|
|
4892
|
-
simulation_transient_voltage_graph_id:
|
|
4893
|
-
simulation_transient_current_graph_id:
|
|
4894
|
-
simulation_voltage_probe_id:
|
|
4895
|
-
simulation_current_probe_id:
|
|
4896
|
-
display_name:
|
|
4897
|
-
color:
|
|
4898
|
-
display_center_value:
|
|
4899
|
-
display_center_offset_divs:
|
|
4900
|
-
volts_per_div:
|
|
4901
|
-
amps_per_div:
|
|
5037
|
+
simulation_transient_voltage_graph_id: z215.string().optional(),
|
|
5038
|
+
simulation_transient_current_graph_id: z215.string().optional(),
|
|
5039
|
+
simulation_voltage_probe_id: z215.string().optional(),
|
|
5040
|
+
simulation_current_probe_id: z215.string().optional(),
|
|
5041
|
+
display_name: z215.string().optional(),
|
|
5042
|
+
color: z215.string().optional(),
|
|
5043
|
+
display_center_value: z215.number().optional(),
|
|
5044
|
+
display_center_offset_divs: z215.number().optional(),
|
|
5045
|
+
volts_per_div: z215.number().positive().optional(),
|
|
5046
|
+
amps_per_div: z215.number().positive().optional()
|
|
4902
5047
|
}).describe(
|
|
4903
5048
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4904
5049
|
).superRefine((data, ctx) => {
|
|
@@ -4912,19 +5057,19 @@ var simulation_oscilloscope_trace = z213.object({
|
|
|
4912
5057
|
].filter(hasValue).length;
|
|
4913
5058
|
if (voltageReferences + currentReferences !== 1) {
|
|
4914
5059
|
ctx.addIssue({
|
|
4915
|
-
code:
|
|
5060
|
+
code: z215.ZodIssueCode.custom,
|
|
4916
5061
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4917
5062
|
});
|
|
4918
5063
|
}
|
|
4919
5064
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4920
5065
|
ctx.addIssue({
|
|
4921
|
-
code:
|
|
5066
|
+
code: z215.ZodIssueCode.custom,
|
|
4922
5067
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4923
5068
|
});
|
|
4924
5069
|
}
|
|
4925
5070
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4926
5071
|
ctx.addIssue({
|
|
4927
|
-
code:
|
|
5072
|
+
code: z215.ZodIssueCode.custom,
|
|
4928
5073
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4929
5074
|
});
|
|
4930
5075
|
}
|
|
@@ -4932,8 +5077,8 @@ var simulation_oscilloscope_trace = z213.object({
|
|
|
4932
5077
|
expectTypesMatch(true);
|
|
4933
5078
|
|
|
4934
5079
|
// src/any_circuit_element.ts
|
|
4935
|
-
import { z as
|
|
4936
|
-
var any_circuit_element =
|
|
5080
|
+
import { z as z216 } from "zod";
|
|
5081
|
+
var any_circuit_element = z216.union([
|
|
4937
5082
|
source_runtime_error,
|
|
4938
5083
|
source_trace,
|
|
4939
5084
|
source_bus,
|
|
@@ -5022,6 +5167,8 @@ var any_circuit_element = z214.union([
|
|
|
5022
5167
|
pcb_silkscreen_circle,
|
|
5023
5168
|
pcb_silkscreen_oval,
|
|
5024
5169
|
pcb_silkscreen_graphic,
|
|
5170
|
+
pcb_bus_routing_constraint_error,
|
|
5171
|
+
pcb_bus_routing_constraint_warning,
|
|
5025
5172
|
pcb_trace_error,
|
|
5026
5173
|
pcb_trace_missing_error,
|
|
5027
5174
|
pcb_placement_error,
|
|
@@ -5168,6 +5315,8 @@ export {
|
|
|
5168
5315
|
pcb_board,
|
|
5169
5316
|
pcb_breakout_point,
|
|
5170
5317
|
pcb_bus_length_skew_error,
|
|
5318
|
+
pcb_bus_routing_constraint_error,
|
|
5319
|
+
pcb_bus_routing_constraint_warning,
|
|
5171
5320
|
pcb_component,
|
|
5172
5321
|
pcb_component_invalid_layer_error,
|
|
5173
5322
|
pcb_component_missing_courtyard_warning,
|