circuit-json 0.0.523 → 0.0.525
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 +44 -0
- package/dist/index.d.mts +433 -14
- package/dist/index.mjs +1142 -1105
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -421,7 +421,9 @@ expectTypesMatch(true);
|
|
|
421
421
|
// src/source/source_printed_part.ts
|
|
422
422
|
import { z as z22 } from "zod";
|
|
423
423
|
var source_printed_part = source_component_base.extend({
|
|
424
|
-
ftype: z22.literal("printedpart")
|
|
424
|
+
ftype: z22.literal("printedpart"),
|
|
425
|
+
material: z22.enum(["pla", "petg", "nylon"]).optional(),
|
|
426
|
+
color: z22.string().trim().min(1).optional()
|
|
425
427
|
});
|
|
426
428
|
expectTypesMatch(true);
|
|
427
429
|
|
|
@@ -2839,149 +2841,179 @@ var pcb_trace_warning = z125.object({
|
|
|
2839
2841
|
}).describe("Defines a trace warning on the PCB");
|
|
2840
2842
|
expectTypesMatch(true);
|
|
2841
2843
|
|
|
2842
|
-
// src/pcb/
|
|
2844
|
+
// src/pcb/pcb_trace_style_warning.ts
|
|
2843
2845
|
import { z as z126 } from "zod";
|
|
2844
|
-
var
|
|
2845
|
-
type: z126.literal("
|
|
2846
|
-
|
|
2847
|
-
"
|
|
2846
|
+
var pcb_trace_style_warning = z126.object({
|
|
2847
|
+
type: z126.literal("pcb_trace_style_warning"),
|
|
2848
|
+
pcb_trace_style_warning_id: getZodPrefixedIdWithDefault(
|
|
2849
|
+
"pcb_trace_style_warning"
|
|
2848
2850
|
),
|
|
2849
|
-
|
|
2851
|
+
warning_type: z126.literal("pcb_trace_style_warning").default("pcb_trace_style_warning"),
|
|
2850
2852
|
message: z126.string(),
|
|
2853
|
+
styling_issue_type: z126.literal("long_segment_at_odd_angle"),
|
|
2851
2854
|
pcb_trace_id: z126.string(),
|
|
2852
|
-
source_net_id: z126.string().optional(),
|
|
2853
2855
|
source_trace_id: z126.string().optional(),
|
|
2856
|
+
subcircuit_id: z126.string().optional(),
|
|
2857
|
+
layer: layer_ref,
|
|
2858
|
+
start_route_index: z126.number().int().nonnegative(),
|
|
2859
|
+
end_route_index: z126.number().int().nonnegative(),
|
|
2860
|
+
segment_start: point,
|
|
2861
|
+
segment_end: point,
|
|
2862
|
+
center: point,
|
|
2863
|
+
segment_length: distance,
|
|
2864
|
+
minimum_segment_length: distance,
|
|
2865
|
+
angle_degrees: z126.number().min(0).lt(360),
|
|
2866
|
+
nearest_allowed_angle_degrees: z126.number().min(0).lt(360).multipleOf(45),
|
|
2867
|
+
angle_deviation_degrees: z126.number().min(0).max(22.5),
|
|
2868
|
+
angle_tolerance_degrees: z126.number().min(0).lt(22.5)
|
|
2869
|
+
}).describe(
|
|
2870
|
+
"Warning for a long PCB trace segment whose direction deviates from a multiple of 45 degrees"
|
|
2871
|
+
);
|
|
2872
|
+
expectTypesMatch(true);
|
|
2873
|
+
|
|
2874
|
+
// src/pcb/pcb_trace_too_long_error.ts
|
|
2875
|
+
import { z as z127 } from "zod";
|
|
2876
|
+
var pcb_trace_too_long_error = z127.object({
|
|
2877
|
+
type: z127.literal("pcb_trace_too_long_error"),
|
|
2878
|
+
pcb_trace_too_long_error_id: getZodPrefixedIdWithDefault(
|
|
2879
|
+
"pcb_trace_too_long_error"
|
|
2880
|
+
),
|
|
2881
|
+
error_type: z127.literal("pcb_trace_too_long_error").default("pcb_trace_too_long_error"),
|
|
2882
|
+
message: z127.string(),
|
|
2883
|
+
pcb_trace_id: z127.string(),
|
|
2884
|
+
source_net_id: z127.string().optional(),
|
|
2885
|
+
source_trace_id: z127.string().optional(),
|
|
2854
2886
|
actual_trace_length: distance,
|
|
2855
2887
|
maximum_trace_length: distance,
|
|
2856
|
-
subcircuit_id:
|
|
2888
|
+
subcircuit_id: z127.string().optional()
|
|
2857
2889
|
}).describe(
|
|
2858
2890
|
"Error emitted when a PCB trace is longer than its maximum allowed length"
|
|
2859
2891
|
);
|
|
2860
2892
|
expectTypesMatch(true);
|
|
2861
2893
|
|
|
2862
2894
|
// src/pcb/pcb_bus_length_skew_error.ts
|
|
2863
|
-
import { z as
|
|
2895
|
+
import { z as z128 } from "zod";
|
|
2864
2896
|
var pcb_bus_length_skew_error = base_circuit_json_error.extend({
|
|
2865
|
-
type:
|
|
2897
|
+
type: z128.literal("pcb_bus_length_skew_error"),
|
|
2866
2898
|
pcb_bus_length_skew_error_id: getZodPrefixedIdWithDefault(
|
|
2867
2899
|
"pcb_bus_length_skew_error"
|
|
2868
2900
|
),
|
|
2869
|
-
error_type:
|
|
2870
|
-
source_bus_id:
|
|
2871
|
-
source_trace_ids:
|
|
2872
|
-
pcb_trace_ids:
|
|
2873
|
-
actual_length_skew:
|
|
2874
|
-
maximum_length_skew:
|
|
2875
|
-
subcircuit_id:
|
|
2901
|
+
error_type: z128.literal("pcb_bus_length_skew_error").default("pcb_bus_length_skew_error"),
|
|
2902
|
+
source_bus_id: z128.string(),
|
|
2903
|
+
source_trace_ids: z128.array(z128.string()),
|
|
2904
|
+
pcb_trace_ids: z128.array(z128.string()),
|
|
2905
|
+
actual_length_skew: z128.number().nonnegative().finite(),
|
|
2906
|
+
maximum_length_skew: z128.number().nonnegative().finite(),
|
|
2907
|
+
subcircuit_id: z128.string().optional()
|
|
2876
2908
|
});
|
|
2877
2909
|
expectTypesMatch(true);
|
|
2878
2910
|
|
|
2879
2911
|
// src/pcb/pcb_trace_too_long_warning.ts
|
|
2880
|
-
import { z as
|
|
2881
|
-
var pcb_trace_too_long_warning =
|
|
2882
|
-
type:
|
|
2912
|
+
import { z as z129 } from "zod";
|
|
2913
|
+
var pcb_trace_too_long_warning = z129.object({
|
|
2914
|
+
type: z129.literal("pcb_trace_too_long_warning"),
|
|
2883
2915
|
pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
|
|
2884
2916
|
"pcb_trace_too_long_warning"
|
|
2885
2917
|
),
|
|
2886
|
-
warning_type:
|
|
2887
|
-
message:
|
|
2888
|
-
pcb_trace_id:
|
|
2889
|
-
source_net_id:
|
|
2890
|
-
source_trace_id:
|
|
2918
|
+
warning_type: z129.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
|
|
2919
|
+
message: z129.string(),
|
|
2920
|
+
pcb_trace_id: z129.string(),
|
|
2921
|
+
source_net_id: z129.string().optional(),
|
|
2922
|
+
source_trace_id: z129.string().optional(),
|
|
2891
2923
|
actual_trace_length: distance,
|
|
2892
2924
|
maximum_trace_length: distance,
|
|
2893
|
-
subcircuit_id:
|
|
2925
|
+
subcircuit_id: z129.string().optional()
|
|
2894
2926
|
}).describe(
|
|
2895
2927
|
"Warning emitted when a PCB trace is longer than its maximum allowed length"
|
|
2896
2928
|
);
|
|
2897
2929
|
expectTypesMatch(true);
|
|
2898
2930
|
|
|
2899
2931
|
// src/pcb/pcb_trace_too_many_vias_warning.ts
|
|
2900
|
-
import { z as
|
|
2901
|
-
var pcb_trace_too_many_vias_warning =
|
|
2902
|
-
type:
|
|
2932
|
+
import { z as z130 } from "zod";
|
|
2933
|
+
var pcb_trace_too_many_vias_warning = z130.object({
|
|
2934
|
+
type: z130.literal("pcb_trace_too_many_vias_warning"),
|
|
2903
2935
|
pcb_trace_too_many_vias_warning_id: getZodPrefixedIdWithDefault(
|
|
2904
2936
|
"pcb_trace_too_many_vias_warning"
|
|
2905
2937
|
),
|
|
2906
|
-
warning_type:
|
|
2907
|
-
message:
|
|
2908
|
-
pcb_trace_id:
|
|
2909
|
-
source_net_id:
|
|
2910
|
-
source_trace_id:
|
|
2911
|
-
actual_via_count:
|
|
2912
|
-
maximum_via_count:
|
|
2913
|
-
subcircuit_id:
|
|
2938
|
+
warning_type: z130.literal("pcb_trace_too_many_vias_warning").default("pcb_trace_too_many_vias_warning"),
|
|
2939
|
+
message: z130.string(),
|
|
2940
|
+
pcb_trace_id: z130.string(),
|
|
2941
|
+
source_net_id: z130.string().optional(),
|
|
2942
|
+
source_trace_id: z130.string().optional(),
|
|
2943
|
+
actual_via_count: z130.number().int().nonnegative(),
|
|
2944
|
+
maximum_via_count: z130.number().int().nonnegative(),
|
|
2945
|
+
subcircuit_id: z130.string().optional()
|
|
2914
2946
|
}).describe(
|
|
2915
2947
|
"Warning emitted when a PCB trace has more vias than its maximum allowed count"
|
|
2916
2948
|
);
|
|
2917
2949
|
expectTypesMatch(true);
|
|
2918
2950
|
|
|
2919
2951
|
// src/pcb/pcb_bus_routing_constraint_error.ts
|
|
2920
|
-
import { z as
|
|
2952
|
+
import { z as z131 } from "zod";
|
|
2921
2953
|
var error_base = base_circuit_json_error.extend({
|
|
2922
|
-
type:
|
|
2954
|
+
type: z131.literal("pcb_bus_routing_constraint_error"),
|
|
2923
2955
|
pcb_bus_routing_constraint_error_id: getZodPrefixedIdWithDefault(
|
|
2924
2956
|
"pcb_bus_routing_constraint_error"
|
|
2925
2957
|
),
|
|
2926
|
-
error_type:
|
|
2927
|
-
source_bus_id:
|
|
2928
|
-
source_trace_ids:
|
|
2929
|
-
pcb_trace_ids:
|
|
2930
|
-
subcircuit_id:
|
|
2958
|
+
error_type: z131.literal("pcb_bus_routing_constraint_error").default("pcb_bus_routing_constraint_error"),
|
|
2959
|
+
source_bus_id: z131.string(),
|
|
2960
|
+
source_trace_ids: z131.array(z131.string()).min(1),
|
|
2961
|
+
pcb_trace_ids: z131.array(z131.string()),
|
|
2962
|
+
subcircuit_id: z131.string().optional()
|
|
2931
2963
|
});
|
|
2932
|
-
var pcb_bus_routing_constraint_error =
|
|
2964
|
+
var pcb_bus_routing_constraint_error = z131.discriminatedUnion("routing_rule", [
|
|
2933
2965
|
error_base.extend({
|
|
2934
|
-
routing_rule:
|
|
2935
|
-
actual_length_skew:
|
|
2936
|
-
maximum_length_skew:
|
|
2966
|
+
routing_rule: z131.literal("length_skew"),
|
|
2967
|
+
actual_length_skew: z131.number().nonnegative().finite(),
|
|
2968
|
+
maximum_length_skew: z131.number().nonnegative().finite()
|
|
2937
2969
|
}),
|
|
2938
2970
|
error_base.extend({
|
|
2939
|
-
routing_rule:
|
|
2940
|
-
actual_trace_length:
|
|
2941
|
-
minimum_trace_length:
|
|
2971
|
+
routing_rule: z131.literal("min_length"),
|
|
2972
|
+
actual_trace_length: z131.number().nonnegative().finite(),
|
|
2973
|
+
minimum_trace_length: z131.number().finite()
|
|
2942
2974
|
}),
|
|
2943
2975
|
error_base.extend({
|
|
2944
|
-
routing_rule:
|
|
2945
|
-
actual_trace_length:
|
|
2946
|
-
maximum_trace_length:
|
|
2976
|
+
routing_rule: z131.literal("max_length"),
|
|
2977
|
+
actual_trace_length: z131.number().nonnegative().finite(),
|
|
2978
|
+
maximum_trace_length: z131.number().finite()
|
|
2947
2979
|
}),
|
|
2948
2980
|
error_base.extend({
|
|
2949
|
-
routing_rule:
|
|
2950
|
-
actual_trace_length:
|
|
2951
|
-
target_trace_length:
|
|
2952
|
-
length_tolerance:
|
|
2981
|
+
routing_rule: z131.literal("target_length"),
|
|
2982
|
+
actual_trace_length: z131.number().nonnegative().finite(),
|
|
2983
|
+
target_trace_length: z131.number().finite(),
|
|
2984
|
+
length_tolerance: z131.number().nonnegative().finite()
|
|
2953
2985
|
}),
|
|
2954
2986
|
error_base.extend({
|
|
2955
|
-
routing_rule:
|
|
2956
|
-
other_pcb_trace_id:
|
|
2957
|
-
other_source_trace_id:
|
|
2958
|
-
actual_centerline_spacing:
|
|
2959
|
-
minimum_centerline_spacing:
|
|
2987
|
+
routing_rule: z131.literal("pcb_trace_spacing"),
|
|
2988
|
+
other_pcb_trace_id: z131.string(),
|
|
2989
|
+
other_source_trace_id: z131.string().optional(),
|
|
2990
|
+
actual_centerline_spacing: z131.number().nonnegative().finite(),
|
|
2991
|
+
minimum_centerline_spacing: z131.number().positive().finite()
|
|
2960
2992
|
}),
|
|
2961
2993
|
error_base.extend({
|
|
2962
|
-
routing_rule:
|
|
2963
|
-
other_pcb_trace_id:
|
|
2964
|
-
other_source_trace_id:
|
|
2965
|
-
actual_centerline_spacing:
|
|
2966
|
-
minimum_centerline_spacing:
|
|
2994
|
+
routing_rule: z131.literal("pcb_spacing_to_other_signals"),
|
|
2995
|
+
other_pcb_trace_id: z131.string(),
|
|
2996
|
+
other_source_trace_id: z131.string().optional(),
|
|
2997
|
+
actual_centerline_spacing: z131.number().nonnegative().finite(),
|
|
2998
|
+
minimum_centerline_spacing: z131.number().positive().finite()
|
|
2967
2999
|
}),
|
|
2968
3000
|
error_base.extend({
|
|
2969
|
-
routing_rule:
|
|
2970
|
-
target_impedance:
|
|
2971
|
-
minimum_impedance:
|
|
2972
|
-
maximum_impedance:
|
|
3001
|
+
routing_rule: z131.literal("impedance_target"),
|
|
3002
|
+
target_impedance: z131.number().positive().finite(),
|
|
3003
|
+
minimum_impedance: z131.number().positive().finite().optional(),
|
|
3004
|
+
maximum_impedance: z131.number().positive().finite().optional()
|
|
2973
3005
|
})
|
|
2974
3006
|
]).superRefine((error, ctx) => {
|
|
2975
3007
|
if (error.routing_rule !== "impedance_target") return;
|
|
2976
3008
|
if (error.minimum_impedance === void 0 && error.maximum_impedance === void 0)
|
|
2977
3009
|
ctx.addIssue({
|
|
2978
|
-
code:
|
|
3010
|
+
code: z131.ZodIssueCode.custom,
|
|
2979
3011
|
path: ["minimum_impedance"],
|
|
2980
3012
|
message: "Provide an impedance bound"
|
|
2981
3013
|
});
|
|
2982
3014
|
if (error.minimum_impedance !== void 0 && error.maximum_impedance !== void 0 && error.minimum_impedance > error.maximum_impedance)
|
|
2983
3015
|
ctx.addIssue({
|
|
2984
|
-
code:
|
|
3016
|
+
code: z131.ZodIssueCode.custom,
|
|
2985
3017
|
path: ["maximum_impedance"],
|
|
2986
3018
|
message: "Impedance bounds must be ordered"
|
|
2987
3019
|
});
|
|
@@ -2991,134 +3023,134 @@ var pcb_bus_routing_constraint_error = z130.discriminatedUnion("routing_rule", [
|
|
|
2991
3023
|
expectTypesMatch(true);
|
|
2992
3024
|
|
|
2993
3025
|
// src/pcb/pcb_bus_routing_constraint_warning.ts
|
|
2994
|
-
import { z as
|
|
2995
|
-
var warning_base =
|
|
2996
|
-
type:
|
|
3026
|
+
import { z as z132 } from "zod";
|
|
3027
|
+
var warning_base = z132.object({
|
|
3028
|
+
type: z132.literal("pcb_bus_routing_constraint_warning"),
|
|
2997
3029
|
pcb_bus_routing_constraint_warning_id: getZodPrefixedIdWithDefault(
|
|
2998
3030
|
"pcb_bus_routing_constraint_warning"
|
|
2999
3031
|
),
|
|
3000
|
-
warning_type:
|
|
3001
|
-
source_bus_id:
|
|
3002
|
-
source_trace_ids:
|
|
3003
|
-
pcb_trace_ids:
|
|
3004
|
-
message:
|
|
3005
|
-
subcircuit_id:
|
|
3032
|
+
warning_type: z132.literal("pcb_bus_routing_constraint_warning").default("pcb_bus_routing_constraint_warning"),
|
|
3033
|
+
source_bus_id: z132.string(),
|
|
3034
|
+
source_trace_ids: z132.array(z132.string()).min(1),
|
|
3035
|
+
pcb_trace_ids: z132.array(z132.string()),
|
|
3036
|
+
message: z132.string(),
|
|
3037
|
+
subcircuit_id: z132.string().optional()
|
|
3006
3038
|
}).describe(
|
|
3007
3039
|
"A declared bus or pair constraint could not be verified; this is not a pass."
|
|
3008
3040
|
);
|
|
3009
|
-
var pcb_bus_routing_constraint_warning =
|
|
3041
|
+
var pcb_bus_routing_constraint_warning = z132.discriminatedUnion(
|
|
3010
3042
|
"routing_rule",
|
|
3011
3043
|
[
|
|
3012
|
-
warning_base.extend({ routing_rule:
|
|
3013
|
-
warning_base.extend({ routing_rule:
|
|
3014
|
-
warning_base.extend({ routing_rule:
|
|
3015
|
-
warning_base.extend({ routing_rule:
|
|
3016
|
-
warning_base.extend({ routing_rule:
|
|
3044
|
+
warning_base.extend({ routing_rule: z132.literal("route_geometry") }),
|
|
3045
|
+
warning_base.extend({ routing_rule: z132.literal("reference_geometry") }),
|
|
3046
|
+
warning_base.extend({ routing_rule: z132.literal("spacing_geometry") }),
|
|
3047
|
+
warning_base.extend({ routing_rule: z132.literal("target_length") }),
|
|
3048
|
+
warning_base.extend({ routing_rule: z132.literal("physical_impedance") })
|
|
3017
3049
|
]
|
|
3018
3050
|
);
|
|
3019
3051
|
expectTypesMatch(true);
|
|
3020
3052
|
|
|
3021
3053
|
// src/pcb/pcb_trace_error.ts
|
|
3022
|
-
import { z as
|
|
3054
|
+
import { z as z133 } from "zod";
|
|
3023
3055
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
3024
|
-
type:
|
|
3056
|
+
type: z133.literal("pcb_trace_error"),
|
|
3025
3057
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
3026
|
-
error_type:
|
|
3058
|
+
error_type: z133.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
3027
3059
|
center: point.optional(),
|
|
3028
|
-
pcb_trace_id:
|
|
3029
|
-
source_trace_id:
|
|
3030
|
-
pcb_component_ids:
|
|
3031
|
-
pcb_port_ids:
|
|
3032
|
-
subcircuit_id:
|
|
3060
|
+
pcb_trace_id: z133.string(),
|
|
3061
|
+
source_trace_id: z133.string(),
|
|
3062
|
+
pcb_component_ids: z133.array(z133.string()),
|
|
3063
|
+
pcb_port_ids: z133.array(z133.string()),
|
|
3064
|
+
subcircuit_id: z133.string().optional()
|
|
3033
3065
|
}).describe("Defines a trace error on the PCB");
|
|
3034
3066
|
expectTypesMatch(true);
|
|
3035
3067
|
|
|
3036
3068
|
// src/pcb/pcb_trace_missing_error.ts
|
|
3037
|
-
import { z as
|
|
3069
|
+
import { z as z134 } from "zod";
|
|
3038
3070
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
3039
|
-
type:
|
|
3071
|
+
type: z134.literal("pcb_trace_missing_error"),
|
|
3040
3072
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
3041
3073
|
"pcb_trace_missing_error"
|
|
3042
3074
|
),
|
|
3043
|
-
error_type:
|
|
3075
|
+
error_type: z134.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
3044
3076
|
center: point.optional(),
|
|
3045
|
-
source_trace_id:
|
|
3046
|
-
pcb_component_ids:
|
|
3047
|
-
pcb_port_ids:
|
|
3048
|
-
subcircuit_id:
|
|
3077
|
+
source_trace_id: z134.string(),
|
|
3078
|
+
pcb_component_ids: z134.array(z134.string()),
|
|
3079
|
+
pcb_port_ids: z134.array(z134.string()),
|
|
3080
|
+
subcircuit_id: z134.string().optional()
|
|
3049
3081
|
}).describe(
|
|
3050
3082
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
3051
3083
|
);
|
|
3052
3084
|
expectTypesMatch(true);
|
|
3053
3085
|
|
|
3054
3086
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
3055
|
-
import { z as
|
|
3087
|
+
import { z as z135 } from "zod";
|
|
3056
3088
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
3057
|
-
type:
|
|
3089
|
+
type: z135.literal("pcb_port_not_matched_error"),
|
|
3058
3090
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3059
|
-
error_type:
|
|
3060
|
-
pcb_component_ids:
|
|
3061
|
-
subcircuit_id:
|
|
3091
|
+
error_type: z135.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
3092
|
+
pcb_component_ids: z135.array(z135.string()),
|
|
3093
|
+
subcircuit_id: z135.string().optional()
|
|
3062
3094
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
3063
3095
|
expectTypesMatch(true);
|
|
3064
3096
|
|
|
3065
3097
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
3066
|
-
import { z as
|
|
3098
|
+
import { z as z136 } from "zod";
|
|
3067
3099
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
3068
|
-
type:
|
|
3100
|
+
type: z136.literal("pcb_port_not_connected_error"),
|
|
3069
3101
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
3070
3102
|
"pcb_port_not_connected_error"
|
|
3071
3103
|
),
|
|
3072
|
-
error_type:
|
|
3073
|
-
pcb_port_ids:
|
|
3074
|
-
pcb_component_ids:
|
|
3075
|
-
subcircuit_id:
|
|
3104
|
+
error_type: z136.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
3105
|
+
pcb_port_ids: z136.array(z136.string()),
|
|
3106
|
+
pcb_component_ids: z136.array(z136.string()),
|
|
3107
|
+
subcircuit_id: z136.string().optional()
|
|
3076
3108
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
3077
3109
|
expectTypesMatch(
|
|
3078
3110
|
true
|
|
3079
3111
|
);
|
|
3080
3112
|
|
|
3081
3113
|
// src/pcb/pcb_net.ts
|
|
3082
|
-
import { z as
|
|
3083
|
-
var pcb_net =
|
|
3084
|
-
type:
|
|
3114
|
+
import { z as z137 } from "zod";
|
|
3115
|
+
var pcb_net = z137.object({
|
|
3116
|
+
type: z137.literal("pcb_net"),
|
|
3085
3117
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
3086
|
-
source_net_id:
|
|
3087
|
-
highlight_color:
|
|
3118
|
+
source_net_id: z137.string().optional(),
|
|
3119
|
+
highlight_color: z137.string().optional()
|
|
3088
3120
|
}).describe("Defines a net on the PCB");
|
|
3089
3121
|
expectTypesMatch(true);
|
|
3090
3122
|
|
|
3091
3123
|
// src/pcb/pcb_via.ts
|
|
3092
|
-
import { z as
|
|
3093
|
-
var pcb_via =
|
|
3094
|
-
type:
|
|
3124
|
+
import { z as z138 } from "zod";
|
|
3125
|
+
var pcb_via = z138.object({
|
|
3126
|
+
type: z138.literal("pcb_via"),
|
|
3095
3127
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
3096
|
-
pcb_group_id:
|
|
3097
|
-
subcircuit_id:
|
|
3098
|
-
subcircuit_connectivity_map_key:
|
|
3128
|
+
pcb_group_id: z138.string().optional(),
|
|
3129
|
+
subcircuit_id: z138.string().optional(),
|
|
3130
|
+
subcircuit_connectivity_map_key: z138.string().optional(),
|
|
3099
3131
|
x: distance,
|
|
3100
3132
|
y: distance,
|
|
3101
3133
|
outer_diameter: distance.default("0.6mm"),
|
|
3102
3134
|
hole_diameter: distance.default("0.25mm"),
|
|
3103
3135
|
topmost_drill_layer: layer_ref.optional(),
|
|
3104
3136
|
bottommost_drill_layer: layer_ref.optional(),
|
|
3105
|
-
through_hole:
|
|
3137
|
+
through_hole: z138.boolean().optional(),
|
|
3106
3138
|
/** @deprecated */
|
|
3107
3139
|
from_layer: layer_ref.optional(),
|
|
3108
3140
|
/** @deprecated */
|
|
3109
3141
|
to_layer: layer_ref.optional(),
|
|
3110
|
-
layers:
|
|
3142
|
+
layers: z138.array(layer_ref),
|
|
3111
3143
|
/** PCB ports belonging to this via, including layer ports and aliases. */
|
|
3112
|
-
pcb_port_ids:
|
|
3113
|
-
pcb_trace_id:
|
|
3114
|
-
source_trace_id:
|
|
3115
|
-
source_net_id:
|
|
3116
|
-
net_is_assignable:
|
|
3117
|
-
net_assigned:
|
|
3144
|
+
pcb_port_ids: z138.array(z138.string()).optional(),
|
|
3145
|
+
pcb_trace_id: z138.string().optional(),
|
|
3146
|
+
source_trace_id: z138.string().optional(),
|
|
3147
|
+
source_net_id: z138.string().min(1).optional(),
|
|
3148
|
+
net_is_assignable: z138.boolean().optional(),
|
|
3149
|
+
net_assigned: z138.boolean().optional(),
|
|
3118
3150
|
/** @deprecated Use tented_on_top and tented_on_bottom instead. */
|
|
3119
|
-
is_tented:
|
|
3120
|
-
tented_on_top:
|
|
3121
|
-
tented_on_bottom:
|
|
3151
|
+
is_tented: z138.boolean().optional(),
|
|
3152
|
+
tented_on_top: z138.boolean().optional(),
|
|
3153
|
+
tented_on_bottom: z138.boolean().optional()
|
|
3122
3154
|
}).transform(({ is_tented, ...via }) => {
|
|
3123
3155
|
if (is_tented !== void 0) {
|
|
3124
3156
|
via.tented_on_top ??= is_tented;
|
|
@@ -3129,62 +3161,62 @@ var pcb_via = z137.object({
|
|
|
3129
3161
|
expectTypesMatch(true);
|
|
3130
3162
|
|
|
3131
3163
|
// src/pcb/pcb_board.ts
|
|
3132
|
-
import { z as
|
|
3133
|
-
var pcb_board =
|
|
3134
|
-
type:
|
|
3164
|
+
import { z as z139 } from "zod";
|
|
3165
|
+
var pcb_board = z139.object({
|
|
3166
|
+
type: z139.literal("pcb_board"),
|
|
3135
3167
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
3136
|
-
pcb_panel_id:
|
|
3137
|
-
carrier_pcb_board_id:
|
|
3138
|
-
is_subcircuit:
|
|
3139
|
-
subcircuit_id:
|
|
3140
|
-
is_mounted_to_carrier_board:
|
|
3141
|
-
is_via_in_pad_allowed:
|
|
3142
|
-
default_via_tented_on_top:
|
|
3143
|
-
default_via_tented_on_bottom:
|
|
3144
|
-
default_via_plugged:
|
|
3168
|
+
pcb_panel_id: z139.string().optional(),
|
|
3169
|
+
carrier_pcb_board_id: z139.string().optional(),
|
|
3170
|
+
is_subcircuit: z139.boolean().optional(),
|
|
3171
|
+
subcircuit_id: z139.string().optional(),
|
|
3172
|
+
is_mounted_to_carrier_board: z139.boolean().optional(),
|
|
3173
|
+
is_via_in_pad_allowed: z139.boolean().optional(),
|
|
3174
|
+
default_via_tented_on_top: z139.boolean().optional(),
|
|
3175
|
+
default_via_tented_on_bottom: z139.boolean().optional(),
|
|
3176
|
+
default_via_plugged: z139.boolean().optional(),
|
|
3145
3177
|
width: length.optional(),
|
|
3146
3178
|
height: length.optional(),
|
|
3147
3179
|
center: point,
|
|
3148
|
-
display_offset_x:
|
|
3180
|
+
display_offset_x: z139.string().optional().describe(
|
|
3149
3181
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
3150
3182
|
),
|
|
3151
|
-
display_offset_y:
|
|
3183
|
+
display_offset_y: z139.string().optional().describe(
|
|
3152
3184
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
3153
3185
|
),
|
|
3154
3186
|
thickness: length.optional().default(1.4),
|
|
3155
|
-
num_layers:
|
|
3156
|
-
allow_blind_and_buried_vias:
|
|
3187
|
+
num_layers: z139.number().optional().default(4),
|
|
3188
|
+
allow_blind_and_buried_vias: z139.boolean().optional().describe(
|
|
3157
3189
|
"Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack."
|
|
3158
3190
|
),
|
|
3159
|
-
outline:
|
|
3160
|
-
shape:
|
|
3161
|
-
material:
|
|
3162
|
-
solder_mask_color:
|
|
3163
|
-
silkscreen_color:
|
|
3191
|
+
outline: z139.array(point).optional(),
|
|
3192
|
+
shape: z139.enum(["rect", "polygon"]).optional(),
|
|
3193
|
+
material: z139.enum(["fr4", "fr1", "flex"]).default("fr4"),
|
|
3194
|
+
solder_mask_color: z139.string().optional(),
|
|
3195
|
+
silkscreen_color: z139.string().optional(),
|
|
3164
3196
|
anchor_position: point.optional(),
|
|
3165
3197
|
anchor_alignment: ninePointAnchor.optional(),
|
|
3166
|
-
position_mode:
|
|
3198
|
+
position_mode: z139.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
3167
3199
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
3168
3200
|
expectTypesMatch(true);
|
|
3169
3201
|
|
|
3170
3202
|
// src/pcb/pcb_bend.ts
|
|
3171
|
-
import { z as
|
|
3203
|
+
import { z as z140 } from "zod";
|
|
3172
3204
|
var finite_point = point.extend({
|
|
3173
|
-
x: length.pipe(
|
|
3174
|
-
y: length.pipe(
|
|
3205
|
+
x: length.pipe(z140.number().finite()),
|
|
3206
|
+
y: length.pipe(z140.number().finite())
|
|
3175
3207
|
});
|
|
3176
|
-
var pcb_bend =
|
|
3177
|
-
type:
|
|
3208
|
+
var pcb_bend = z140.object({
|
|
3209
|
+
type: z140.literal("pcb_bend"),
|
|
3178
3210
|
pcb_bend_id: getZodPrefixedIdWithDefault("pcb_bend"),
|
|
3179
|
-
pcb_board_id:
|
|
3180
|
-
pcb_group_id:
|
|
3181
|
-
subcircuit_id:
|
|
3182
|
-
name:
|
|
3211
|
+
pcb_board_id: z140.string(),
|
|
3212
|
+
pcb_group_id: z140.string().optional(),
|
|
3213
|
+
subcircuit_id: z140.string().optional(),
|
|
3214
|
+
name: z140.string().optional(),
|
|
3183
3215
|
start: finite_point,
|
|
3184
3216
|
end: finite_point,
|
|
3185
|
-
bend_angle: rotation.pipe(
|
|
3186
|
-
bend_radius: length.pipe(
|
|
3187
|
-
bend_side:
|
|
3217
|
+
bend_angle: rotation.pipe(z140.number().finite()),
|
|
3218
|
+
bend_radius: length.pipe(z140.number().finite().positive()),
|
|
3219
|
+
bend_side: z140.enum(["left", "right"])
|
|
3188
3220
|
}).refine(({ start, end }) => start.x !== end.x || start.y !== end.y, {
|
|
3189
3221
|
message: "Bend centerline endpoints must be distinct",
|
|
3190
3222
|
path: ["end"]
|
|
@@ -3194,123 +3226,123 @@ var pcb_bend = z139.object({
|
|
|
3194
3226
|
expectTypesMatch(true);
|
|
3195
3227
|
|
|
3196
3228
|
// src/pcb/pcb_stiffener.ts
|
|
3197
|
-
import { z as
|
|
3198
|
-
var positive_length = length.pipe(
|
|
3229
|
+
import { z as z141 } from "zod";
|
|
3230
|
+
var positive_length = length.pipe(z141.number().finite().positive());
|
|
3199
3231
|
var finite_point2 = point.extend({
|
|
3200
|
-
x: length.pipe(
|
|
3201
|
-
y: length.pipe(
|
|
3232
|
+
x: length.pipe(z141.number().finite()),
|
|
3233
|
+
y: length.pipe(z141.number().finite())
|
|
3202
3234
|
});
|
|
3203
|
-
var pcb_stiffener_base =
|
|
3204
|
-
type:
|
|
3235
|
+
var pcb_stiffener_base = z141.object({
|
|
3236
|
+
type: z141.literal("pcb_stiffener"),
|
|
3205
3237
|
pcb_stiffener_id: getZodPrefixedIdWithDefault("pcb_stiffener"),
|
|
3206
|
-
pcb_board_id:
|
|
3207
|
-
pcb_group_id:
|
|
3208
|
-
subcircuit_id:
|
|
3209
|
-
name:
|
|
3210
|
-
layer:
|
|
3211
|
-
material:
|
|
3238
|
+
pcb_board_id: z141.string(),
|
|
3239
|
+
pcb_group_id: z141.string().optional(),
|
|
3240
|
+
subcircuit_id: z141.string().optional(),
|
|
3241
|
+
name: z141.string().optional(),
|
|
3242
|
+
layer: z141.enum(["top", "bottom"]),
|
|
3243
|
+
material: z141.enum(["fr4", "polyimide", "stainless_steel", "aluminum"]),
|
|
3212
3244
|
thickness: positive_length,
|
|
3213
|
-
adhesive_thickness: length.pipe(
|
|
3245
|
+
adhesive_thickness: length.pipe(z141.number().finite().nonnegative()).optional()
|
|
3214
3246
|
});
|
|
3215
3247
|
var pcb_stiffener_rect = pcb_stiffener_base.extend({
|
|
3216
|
-
shape:
|
|
3248
|
+
shape: z141.literal("rect"),
|
|
3217
3249
|
center: finite_point2,
|
|
3218
|
-
rotation: rotation.pipe(
|
|
3250
|
+
rotation: rotation.pipe(z141.number().finite()).optional(),
|
|
3219
3251
|
width: positive_length,
|
|
3220
3252
|
height: positive_length,
|
|
3221
|
-
outline:
|
|
3253
|
+
outline: z141.never().optional()
|
|
3222
3254
|
});
|
|
3223
3255
|
expectTypesMatch(true);
|
|
3224
3256
|
var pcb_stiffener_polygon = pcb_stiffener_base.extend({
|
|
3225
|
-
shape:
|
|
3226
|
-
outline:
|
|
3257
|
+
shape: z141.literal("polygon"),
|
|
3258
|
+
outline: z141.array(finite_point2).min(3).refine((points) => {
|
|
3227
3259
|
const twice_area = points.reduce((sum, p, i) => {
|
|
3228
3260
|
const next = points[(i + 1) % points.length];
|
|
3229
3261
|
return sum + p.x * next.y - next.x * p.y;
|
|
3230
3262
|
}, 0);
|
|
3231
3263
|
return Number.isFinite(twice_area) && twice_area !== 0;
|
|
3232
3264
|
}, "Stiffener outline must enclose a nonzero area"),
|
|
3233
|
-
center:
|
|
3234
|
-
rotation:
|
|
3235
|
-
width:
|
|
3236
|
-
height:
|
|
3265
|
+
center: z141.never().optional(),
|
|
3266
|
+
rotation: z141.never().optional(),
|
|
3267
|
+
width: z141.never().optional(),
|
|
3268
|
+
height: z141.never().optional()
|
|
3237
3269
|
});
|
|
3238
3270
|
expectTypesMatch(
|
|
3239
3271
|
true
|
|
3240
3272
|
);
|
|
3241
|
-
var pcb_stiffener =
|
|
3273
|
+
var pcb_stiffener = z141.discriminatedUnion("shape", [pcb_stiffener_rect, pcb_stiffener_polygon]).describe(
|
|
3242
3274
|
"Defines bonded mechanical PCB reinforcement without adding copper layers"
|
|
3243
3275
|
);
|
|
3244
3276
|
expectTypesMatch(true);
|
|
3245
3277
|
|
|
3246
3278
|
// src/pcb/pcb_panel.ts
|
|
3247
|
-
import { z as
|
|
3248
|
-
var pcb_panel =
|
|
3249
|
-
type:
|
|
3279
|
+
import { z as z142 } from "zod";
|
|
3280
|
+
var pcb_panel = z142.object({
|
|
3281
|
+
type: z142.literal("pcb_panel"),
|
|
3250
3282
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
3251
3283
|
width: length,
|
|
3252
3284
|
height: length,
|
|
3253
3285
|
center: point,
|
|
3254
3286
|
thickness: length.optional().default(1.4),
|
|
3255
|
-
covered_with_solder_mask:
|
|
3287
|
+
covered_with_solder_mask: z142.boolean().optional().default(true)
|
|
3256
3288
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
3257
3289
|
expectTypesMatch(true);
|
|
3258
3290
|
|
|
3259
3291
|
// src/pcb/pcb_placement_error.ts
|
|
3260
|
-
import { z as
|
|
3292
|
+
import { z as z143 } from "zod";
|
|
3261
3293
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
3262
|
-
type:
|
|
3294
|
+
type: z143.literal("pcb_placement_error"),
|
|
3263
3295
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
3264
|
-
error_type:
|
|
3265
|
-
subcircuit_id:
|
|
3296
|
+
error_type: z143.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
3297
|
+
subcircuit_id: z143.string().optional()
|
|
3266
3298
|
}).describe("Defines a placement error on the PCB");
|
|
3267
3299
|
expectTypesMatch(true);
|
|
3268
3300
|
|
|
3269
3301
|
// src/pcb/pcb_packing_error.ts
|
|
3270
|
-
import { z as
|
|
3302
|
+
import { z as z144 } from "zod";
|
|
3271
3303
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
3272
|
-
type:
|
|
3304
|
+
type: z144.literal("pcb_packing_error"),
|
|
3273
3305
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
3274
|
-
error_type:
|
|
3275
|
-
pcb_group_id:
|
|
3276
|
-
subcircuit_id:
|
|
3306
|
+
error_type: z144.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
3307
|
+
pcb_group_id: z144.string().optional(),
|
|
3308
|
+
subcircuit_id: z144.string().optional()
|
|
3277
3309
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
3278
3310
|
expectTypesMatch(true);
|
|
3279
3311
|
|
|
3280
3312
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
3281
|
-
import { z as
|
|
3313
|
+
import { z as z145 } from "zod";
|
|
3282
3314
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
3283
|
-
type:
|
|
3315
|
+
type: z145.literal("pcb_panelization_placement_error"),
|
|
3284
3316
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
3285
3317
|
"pcb_panelization_placement_error"
|
|
3286
3318
|
),
|
|
3287
|
-
error_type:
|
|
3288
|
-
pcb_panel_id:
|
|
3289
|
-
pcb_board_id:
|
|
3290
|
-
subcircuit_id:
|
|
3319
|
+
error_type: z145.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
3320
|
+
pcb_panel_id: z145.string().optional(),
|
|
3321
|
+
pcb_board_id: z145.string().optional(),
|
|
3322
|
+
subcircuit_id: z145.string().optional()
|
|
3291
3323
|
}).describe("Defines a panelization placement error on the PCB");
|
|
3292
3324
|
expectTypesMatch(true);
|
|
3293
3325
|
|
|
3294
3326
|
// src/pcb/pcb_trace_hint.ts
|
|
3295
|
-
import { z as
|
|
3296
|
-
var pcb_trace_hint =
|
|
3297
|
-
type:
|
|
3327
|
+
import { z as z146 } from "zod";
|
|
3328
|
+
var pcb_trace_hint = z146.object({
|
|
3329
|
+
type: z146.literal("pcb_trace_hint"),
|
|
3298
3330
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
3299
|
-
pcb_port_id:
|
|
3300
|
-
pcb_component_id:
|
|
3301
|
-
route:
|
|
3302
|
-
subcircuit_id:
|
|
3331
|
+
pcb_port_id: z146.string(),
|
|
3332
|
+
pcb_component_id: z146.string(),
|
|
3333
|
+
route: z146.array(route_hint_point),
|
|
3334
|
+
subcircuit_id: z146.string().optional()
|
|
3303
3335
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
3304
3336
|
expectTypesMatch(true);
|
|
3305
3337
|
|
|
3306
3338
|
// src/pcb/pcb_silkscreen_line.ts
|
|
3307
|
-
import { z as
|
|
3308
|
-
var pcb_silkscreen_line =
|
|
3309
|
-
type:
|
|
3339
|
+
import { z as z147 } from "zod";
|
|
3340
|
+
var pcb_silkscreen_line = z147.object({
|
|
3341
|
+
type: z147.literal("pcb_silkscreen_line"),
|
|
3310
3342
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
3311
|
-
pcb_component_id:
|
|
3312
|
-
pcb_group_id:
|
|
3313
|
-
subcircuit_id:
|
|
3343
|
+
pcb_component_id: z147.string(),
|
|
3344
|
+
pcb_group_id: z147.string().optional(),
|
|
3345
|
+
subcircuit_id: z147.string().optional(),
|
|
3314
3346
|
stroke_width: distance.default("0.1mm"),
|
|
3315
3347
|
x1: distance,
|
|
3316
3348
|
y1: distance,
|
|
@@ -3321,32 +3353,32 @@ var pcb_silkscreen_line = z146.object({
|
|
|
3321
3353
|
expectTypesMatch(true);
|
|
3322
3354
|
|
|
3323
3355
|
// src/pcb/pcb_silkscreen_path.ts
|
|
3324
|
-
import { z as
|
|
3325
|
-
var pcb_silkscreen_path =
|
|
3326
|
-
type:
|
|
3356
|
+
import { z as z148 } from "zod";
|
|
3357
|
+
var pcb_silkscreen_path = z148.object({
|
|
3358
|
+
type: z148.literal("pcb_silkscreen_path"),
|
|
3327
3359
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
3328
|
-
pcb_component_id:
|
|
3329
|
-
pcb_group_id:
|
|
3330
|
-
subcircuit_id:
|
|
3360
|
+
pcb_component_id: z148.string(),
|
|
3361
|
+
pcb_group_id: z148.string().optional(),
|
|
3362
|
+
subcircuit_id: z148.string().optional(),
|
|
3331
3363
|
layer: visible_layer,
|
|
3332
|
-
route:
|
|
3364
|
+
route: z148.array(point),
|
|
3333
3365
|
stroke_width: length
|
|
3334
3366
|
}).describe("Defines a silkscreen path on the PCB");
|
|
3335
3367
|
expectTypesMatch(true);
|
|
3336
3368
|
|
|
3337
3369
|
// src/pcb/pcb_silkscreen_text.ts
|
|
3338
|
-
import { z as
|
|
3339
|
-
var pcb_silkscreen_text =
|
|
3340
|
-
type:
|
|
3370
|
+
import { z as z149 } from "zod";
|
|
3371
|
+
var pcb_silkscreen_text = z149.object({
|
|
3372
|
+
type: z149.literal("pcb_silkscreen_text"),
|
|
3341
3373
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
3342
|
-
pcb_group_id:
|
|
3343
|
-
subcircuit_id:
|
|
3344
|
-
font:
|
|
3374
|
+
pcb_group_id: z149.string().optional(),
|
|
3375
|
+
subcircuit_id: z149.string().optional(),
|
|
3376
|
+
font: z149.literal("tscircuit2024").default("tscircuit2024"),
|
|
3345
3377
|
font_size: distance.default("0.2mm"),
|
|
3346
|
-
pcb_component_id:
|
|
3347
|
-
text:
|
|
3348
|
-
is_knockout:
|
|
3349
|
-
knockout_padding:
|
|
3378
|
+
pcb_component_id: z149.string(),
|
|
3379
|
+
text: z149.string(),
|
|
3380
|
+
is_knockout: z149.boolean().default(false).optional(),
|
|
3381
|
+
knockout_padding: z149.object({
|
|
3350
3382
|
left: length,
|
|
3351
3383
|
top: length,
|
|
3352
3384
|
bottom: length,
|
|
@@ -3357,27 +3389,27 @@ var pcb_silkscreen_text = z148.object({
|
|
|
3357
3389
|
bottom: "0.2mm",
|
|
3358
3390
|
right: "0.2mm"
|
|
3359
3391
|
}).optional(),
|
|
3360
|
-
ccw_rotation:
|
|
3392
|
+
ccw_rotation: z149.number().optional(),
|
|
3361
3393
|
layer: layer_ref,
|
|
3362
|
-
is_mirrored:
|
|
3394
|
+
is_mirrored: z149.boolean().default(false).optional(),
|
|
3363
3395
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3364
3396
|
anchor_alignment: ninePointAnchor.default("center")
|
|
3365
3397
|
}).describe("Defines silkscreen text on the PCB");
|
|
3366
3398
|
expectTypesMatch(true);
|
|
3367
3399
|
|
|
3368
3400
|
// src/pcb/pcb_copper_text.ts
|
|
3369
|
-
import { z as
|
|
3370
|
-
var pcb_copper_text =
|
|
3371
|
-
type:
|
|
3401
|
+
import { z as z150 } from "zod";
|
|
3402
|
+
var pcb_copper_text = z150.object({
|
|
3403
|
+
type: z150.literal("pcb_copper_text"),
|
|
3372
3404
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
3373
|
-
pcb_group_id:
|
|
3374
|
-
subcircuit_id:
|
|
3375
|
-
font:
|
|
3405
|
+
pcb_group_id: z150.string().optional(),
|
|
3406
|
+
subcircuit_id: z150.string().optional(),
|
|
3407
|
+
font: z150.literal("tscircuit2024").default("tscircuit2024"),
|
|
3376
3408
|
font_size: distance.default("0.2mm"),
|
|
3377
|
-
pcb_component_id:
|
|
3378
|
-
text:
|
|
3379
|
-
is_knockout:
|
|
3380
|
-
knockout_padding:
|
|
3409
|
+
pcb_component_id: z150.string(),
|
|
3410
|
+
text: z150.string(),
|
|
3411
|
+
is_knockout: z150.boolean().default(false).optional(),
|
|
3412
|
+
knockout_padding: z150.object({
|
|
3381
3413
|
left: length,
|
|
3382
3414
|
top: length,
|
|
3383
3415
|
bottom: length,
|
|
@@ -3388,61 +3420,61 @@ var pcb_copper_text = z149.object({
|
|
|
3388
3420
|
bottom: "0.2mm",
|
|
3389
3421
|
right: "0.2mm"
|
|
3390
3422
|
}).optional(),
|
|
3391
|
-
ccw_rotation:
|
|
3423
|
+
ccw_rotation: z150.number().optional(),
|
|
3392
3424
|
layer: layer_ref,
|
|
3393
|
-
is_mirrored:
|
|
3425
|
+
is_mirrored: z150.boolean().default(false).optional(),
|
|
3394
3426
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3395
3427
|
anchor_alignment: ninePointAnchor.default("center")
|
|
3396
3428
|
}).describe("Defines copper text on the PCB");
|
|
3397
3429
|
expectTypesMatch(true);
|
|
3398
3430
|
|
|
3399
3431
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
3400
|
-
import { z as
|
|
3401
|
-
var pcb_silkscreen_rect =
|
|
3402
|
-
type:
|
|
3432
|
+
import { z as z151 } from "zod";
|
|
3433
|
+
var pcb_silkscreen_rect = z151.object({
|
|
3434
|
+
type: z151.literal("pcb_silkscreen_rect"),
|
|
3403
3435
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
3404
|
-
pcb_component_id:
|
|
3405
|
-
pcb_group_id:
|
|
3406
|
-
subcircuit_id:
|
|
3436
|
+
pcb_component_id: z151.string(),
|
|
3437
|
+
pcb_group_id: z151.string().optional(),
|
|
3438
|
+
subcircuit_id: z151.string().optional(),
|
|
3407
3439
|
center: point,
|
|
3408
3440
|
width: length,
|
|
3409
3441
|
height: length,
|
|
3410
3442
|
layer: layer_ref,
|
|
3411
3443
|
stroke_width: length.default("1mm"),
|
|
3412
3444
|
corner_radius: length.optional(),
|
|
3413
|
-
is_filled:
|
|
3414
|
-
has_stroke:
|
|
3415
|
-
is_stroke_dashed:
|
|
3416
|
-
ccw_rotation:
|
|
3445
|
+
is_filled: z151.boolean().default(true).optional(),
|
|
3446
|
+
has_stroke: z151.boolean().optional(),
|
|
3447
|
+
is_stroke_dashed: z151.boolean().optional(),
|
|
3448
|
+
ccw_rotation: z151.number().optional()
|
|
3417
3449
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
3418
3450
|
expectTypesMatch(true);
|
|
3419
3451
|
|
|
3420
3452
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
3421
|
-
import { z as
|
|
3422
|
-
var pcb_silkscreen_circle =
|
|
3423
|
-
type:
|
|
3453
|
+
import { z as z152 } from "zod";
|
|
3454
|
+
var pcb_silkscreen_circle = z152.object({
|
|
3455
|
+
type: z152.literal("pcb_silkscreen_circle"),
|
|
3424
3456
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
3425
3457
|
"pcb_silkscreen_circle"
|
|
3426
3458
|
),
|
|
3427
|
-
pcb_component_id:
|
|
3428
|
-
pcb_group_id:
|
|
3429
|
-
subcircuit_id:
|
|
3459
|
+
pcb_component_id: z152.string(),
|
|
3460
|
+
pcb_group_id: z152.string().optional(),
|
|
3461
|
+
subcircuit_id: z152.string().optional(),
|
|
3430
3462
|
center: point,
|
|
3431
3463
|
radius: length,
|
|
3432
3464
|
layer: visible_layer,
|
|
3433
3465
|
stroke_width: length.default("1mm"),
|
|
3434
|
-
is_filled:
|
|
3466
|
+
is_filled: z152.boolean().optional()
|
|
3435
3467
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
3436
3468
|
expectTypesMatch(true);
|
|
3437
3469
|
|
|
3438
3470
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
3439
|
-
import { z as
|
|
3440
|
-
var pcb_silkscreen_oval =
|
|
3441
|
-
type:
|
|
3471
|
+
import { z as z153 } from "zod";
|
|
3472
|
+
var pcb_silkscreen_oval = z153.object({
|
|
3473
|
+
type: z153.literal("pcb_silkscreen_oval"),
|
|
3442
3474
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
3443
|
-
pcb_component_id:
|
|
3444
|
-
pcb_group_id:
|
|
3445
|
-
subcircuit_id:
|
|
3475
|
+
pcb_component_id: z153.string(),
|
|
3476
|
+
pcb_group_id: z153.string().optional(),
|
|
3477
|
+
subcircuit_id: z153.string().optional(),
|
|
3446
3478
|
center: point,
|
|
3447
3479
|
radius_x: distance,
|
|
3448
3480
|
radius_y: distance,
|
|
@@ -3452,267 +3484,267 @@ var pcb_silkscreen_oval = z152.object({
|
|
|
3452
3484
|
expectTypesMatch(true);
|
|
3453
3485
|
|
|
3454
3486
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
3455
|
-
import { z as
|
|
3456
|
-
var pcb_silkscreen_graphic_base =
|
|
3457
|
-
type:
|
|
3487
|
+
import { z as z154 } from "zod";
|
|
3488
|
+
var pcb_silkscreen_graphic_base = z154.object({
|
|
3489
|
+
type: z154.literal("pcb_silkscreen_graphic"),
|
|
3458
3490
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
3459
3491
|
"pcb_silkscreen_graphic"
|
|
3460
3492
|
),
|
|
3461
|
-
pcb_component_id:
|
|
3462
|
-
pcb_group_id:
|
|
3463
|
-
subcircuit_id:
|
|
3493
|
+
pcb_component_id: z154.string(),
|
|
3494
|
+
pcb_group_id: z154.string().optional(),
|
|
3495
|
+
subcircuit_id: z154.string().optional(),
|
|
3464
3496
|
layer: visible_layer,
|
|
3465
3497
|
image_asset: asset.optional()
|
|
3466
3498
|
});
|
|
3467
3499
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
3468
|
-
shape:
|
|
3500
|
+
shape: z154.literal("brep"),
|
|
3469
3501
|
brep_shape
|
|
3470
3502
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
3471
3503
|
expectTypesMatch(
|
|
3472
3504
|
true
|
|
3473
3505
|
);
|
|
3474
|
-
var pcb_silkscreen_graphic =
|
|
3506
|
+
var pcb_silkscreen_graphic = z154.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
3475
3507
|
expectTypesMatch(true);
|
|
3476
3508
|
|
|
3477
3509
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
3478
|
-
import { z as
|
|
3479
|
-
var pcb_silkscreen_pill =
|
|
3480
|
-
type:
|
|
3510
|
+
import { z as z155 } from "zod";
|
|
3511
|
+
var pcb_silkscreen_pill = z155.object({
|
|
3512
|
+
type: z155.literal("pcb_silkscreen_pill"),
|
|
3481
3513
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
3482
|
-
pcb_component_id:
|
|
3483
|
-
pcb_group_id:
|
|
3484
|
-
subcircuit_id:
|
|
3514
|
+
pcb_component_id: z155.string(),
|
|
3515
|
+
pcb_group_id: z155.string().optional(),
|
|
3516
|
+
subcircuit_id: z155.string().optional(),
|
|
3485
3517
|
center: point,
|
|
3486
3518
|
width: length,
|
|
3487
3519
|
height: length,
|
|
3488
3520
|
layer: layer_ref,
|
|
3489
|
-
ccw_rotation:
|
|
3521
|
+
ccw_rotation: z155.number().optional()
|
|
3490
3522
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
3491
3523
|
expectTypesMatch(true);
|
|
3492
3524
|
|
|
3493
3525
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
3494
|
-
import { z as
|
|
3495
|
-
var pcb_fabrication_note_text =
|
|
3496
|
-
type:
|
|
3526
|
+
import { z as z156 } from "zod";
|
|
3527
|
+
var pcb_fabrication_note_text = z156.object({
|
|
3528
|
+
type: z156.literal("pcb_fabrication_note_text"),
|
|
3497
3529
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
3498
3530
|
"pcb_fabrication_note_text"
|
|
3499
3531
|
),
|
|
3500
|
-
subcircuit_id:
|
|
3501
|
-
pcb_group_id:
|
|
3502
|
-
font:
|
|
3532
|
+
subcircuit_id: z156.string().optional(),
|
|
3533
|
+
pcb_group_id: z156.string().optional(),
|
|
3534
|
+
font: z156.literal("tscircuit2024").default("tscircuit2024"),
|
|
3503
3535
|
font_size: distance.default("1mm"),
|
|
3504
|
-
pcb_component_id:
|
|
3505
|
-
text:
|
|
3506
|
-
ccw_rotation:
|
|
3536
|
+
pcb_component_id: z156.string(),
|
|
3537
|
+
text: z156.string(),
|
|
3538
|
+
ccw_rotation: z156.number().optional(),
|
|
3507
3539
|
layer: visible_layer,
|
|
3508
3540
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3509
|
-
anchor_alignment:
|
|
3510
|
-
color:
|
|
3541
|
+
anchor_alignment: z156.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3542
|
+
color: z156.string().optional()
|
|
3511
3543
|
}).describe(
|
|
3512
3544
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
3513
3545
|
);
|
|
3514
3546
|
expectTypesMatch(true);
|
|
3515
3547
|
|
|
3516
3548
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
3517
|
-
import { z as
|
|
3518
|
-
var pcb_fabrication_note_path =
|
|
3519
|
-
type:
|
|
3549
|
+
import { z as z157 } from "zod";
|
|
3550
|
+
var pcb_fabrication_note_path = z157.object({
|
|
3551
|
+
type: z157.literal("pcb_fabrication_note_path"),
|
|
3520
3552
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
3521
3553
|
"pcb_fabrication_note_path"
|
|
3522
3554
|
),
|
|
3523
|
-
pcb_component_id:
|
|
3524
|
-
subcircuit_id:
|
|
3555
|
+
pcb_component_id: z157.string(),
|
|
3556
|
+
subcircuit_id: z157.string().optional(),
|
|
3525
3557
|
layer: layer_ref,
|
|
3526
|
-
route:
|
|
3558
|
+
route: z157.array(point),
|
|
3527
3559
|
stroke_width: length,
|
|
3528
|
-
color:
|
|
3529
|
-
is_filled:
|
|
3530
|
-
has_stroke:
|
|
3560
|
+
color: z157.string().optional(),
|
|
3561
|
+
is_filled: z157.boolean().optional(),
|
|
3562
|
+
has_stroke: z157.boolean().optional()
|
|
3531
3563
|
}).describe(
|
|
3532
3564
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
3533
3565
|
);
|
|
3534
3566
|
expectTypesMatch(true);
|
|
3535
3567
|
|
|
3536
3568
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
3537
|
-
import { z as
|
|
3538
|
-
var pcb_fabrication_note_rect =
|
|
3539
|
-
type:
|
|
3569
|
+
import { z as z158 } from "zod";
|
|
3570
|
+
var pcb_fabrication_note_rect = z158.object({
|
|
3571
|
+
type: z158.literal("pcb_fabrication_note_rect"),
|
|
3540
3572
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
3541
3573
|
"pcb_fabrication_note_rect"
|
|
3542
3574
|
),
|
|
3543
|
-
pcb_component_id:
|
|
3544
|
-
pcb_group_id:
|
|
3545
|
-
subcircuit_id:
|
|
3575
|
+
pcb_component_id: z158.string(),
|
|
3576
|
+
pcb_group_id: z158.string().optional(),
|
|
3577
|
+
subcircuit_id: z158.string().optional(),
|
|
3546
3578
|
center: point,
|
|
3547
3579
|
width: length,
|
|
3548
3580
|
height: length,
|
|
3549
3581
|
layer: visible_layer,
|
|
3550
3582
|
stroke_width: length.default("0.1mm"),
|
|
3551
3583
|
corner_radius: length.optional(),
|
|
3552
|
-
is_filled:
|
|
3553
|
-
has_stroke:
|
|
3554
|
-
is_stroke_dashed:
|
|
3555
|
-
color:
|
|
3584
|
+
is_filled: z158.boolean().optional(),
|
|
3585
|
+
has_stroke: z158.boolean().optional(),
|
|
3586
|
+
is_stroke_dashed: z158.boolean().optional(),
|
|
3587
|
+
color: z158.string().optional()
|
|
3556
3588
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
3557
3589
|
expectTypesMatch(true);
|
|
3558
3590
|
|
|
3559
3591
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
3560
|
-
import { z as
|
|
3561
|
-
var pcb_fabrication_note_dimension =
|
|
3562
|
-
type:
|
|
3592
|
+
import { z as z159 } from "zod";
|
|
3593
|
+
var pcb_fabrication_note_dimension = z159.object({
|
|
3594
|
+
type: z159.literal("pcb_fabrication_note_dimension"),
|
|
3563
3595
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
3564
3596
|
"pcb_fabrication_note_dimension"
|
|
3565
3597
|
),
|
|
3566
|
-
pcb_component_id:
|
|
3567
|
-
pcb_group_id:
|
|
3568
|
-
subcircuit_id:
|
|
3598
|
+
pcb_component_id: z159.string(),
|
|
3599
|
+
pcb_group_id: z159.string().optional(),
|
|
3600
|
+
subcircuit_id: z159.string().optional(),
|
|
3569
3601
|
layer: visible_layer,
|
|
3570
3602
|
from: point,
|
|
3571
3603
|
to: point,
|
|
3572
|
-
text:
|
|
3573
|
-
text_ccw_rotation:
|
|
3604
|
+
text: z159.string().optional(),
|
|
3605
|
+
text_ccw_rotation: z159.number().optional(),
|
|
3574
3606
|
offset: length.optional(),
|
|
3575
3607
|
offset_distance: length.optional(),
|
|
3576
|
-
offset_direction:
|
|
3577
|
-
x:
|
|
3578
|
-
y:
|
|
3608
|
+
offset_direction: z159.object({
|
|
3609
|
+
x: z159.number(),
|
|
3610
|
+
y: z159.number()
|
|
3579
3611
|
}).optional(),
|
|
3580
|
-
font:
|
|
3612
|
+
font: z159.literal("tscircuit2024").default("tscircuit2024"),
|
|
3581
3613
|
font_size: length.default("1mm"),
|
|
3582
|
-
color:
|
|
3614
|
+
color: z159.string().optional(),
|
|
3583
3615
|
arrow_size: length.default("1mm")
|
|
3584
3616
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
3585
3617
|
expectTypesMatch(true);
|
|
3586
3618
|
|
|
3587
3619
|
// src/pcb/pcb_note_text.ts
|
|
3588
|
-
import { z as z159 } from "zod";
|
|
3589
|
-
var pcb_note_text = z159.object({
|
|
3590
|
-
type: z159.literal("pcb_note_text"),
|
|
3591
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3592
|
-
pcb_component_id: z159.string().optional(),
|
|
3593
|
-
pcb_group_id: z159.string().optional(),
|
|
3594
|
-
subcircuit_id: z159.string().optional(),
|
|
3595
|
-
name: z159.string().optional(),
|
|
3596
|
-
font: z159.literal("tscircuit2024").default("tscircuit2024"),
|
|
3597
|
-
font_size: distance.default("1mm"),
|
|
3598
|
-
text: z159.string().optional(),
|
|
3599
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3600
|
-
anchor_alignment: z159.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3601
|
-
layer: visible_layer.default("top"),
|
|
3602
|
-
is_mirrored_from_top_view: z159.boolean().optional(),
|
|
3603
|
-
color: z159.string().optional()
|
|
3604
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
3605
|
-
expectTypesMatch(true);
|
|
3606
|
-
|
|
3607
|
-
// src/pcb/pcb_note_rect.ts
|
|
3608
3620
|
import { z as z160 } from "zod";
|
|
3609
|
-
var
|
|
3610
|
-
type: z160.literal("
|
|
3611
|
-
|
|
3621
|
+
var pcb_note_text = z160.object({
|
|
3622
|
+
type: z160.literal("pcb_note_text"),
|
|
3623
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3612
3624
|
pcb_component_id: z160.string().optional(),
|
|
3613
3625
|
pcb_group_id: z160.string().optional(),
|
|
3614
3626
|
subcircuit_id: z160.string().optional(),
|
|
3615
3627
|
name: z160.string().optional(),
|
|
3628
|
+
font: z160.literal("tscircuit2024").default("tscircuit2024"),
|
|
3629
|
+
font_size: distance.default("1mm"),
|
|
3616
3630
|
text: z160.string().optional(),
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
height: length,
|
|
3631
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3632
|
+
anchor_alignment: z160.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3620
3633
|
layer: visible_layer.default("top"),
|
|
3621
|
-
|
|
3622
|
-
corner_radius: length.optional(),
|
|
3623
|
-
is_filled: z160.boolean().optional(),
|
|
3624
|
-
has_stroke: z160.boolean().optional(),
|
|
3625
|
-
is_stroke_dashed: z160.boolean().optional(),
|
|
3634
|
+
is_mirrored_from_top_view: z160.boolean().optional(),
|
|
3626
3635
|
color: z160.string().optional()
|
|
3627
|
-
}).describe("Defines a
|
|
3636
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
3628
3637
|
expectTypesMatch(true);
|
|
3629
3638
|
|
|
3630
|
-
// src/pcb/
|
|
3639
|
+
// src/pcb/pcb_note_rect.ts
|
|
3631
3640
|
import { z as z161 } from "zod";
|
|
3632
|
-
var
|
|
3633
|
-
type: z161.literal("
|
|
3634
|
-
|
|
3641
|
+
var pcb_note_rect = z161.object({
|
|
3642
|
+
type: z161.literal("pcb_note_rect"),
|
|
3643
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
3635
3644
|
pcb_component_id: z161.string().optional(),
|
|
3636
3645
|
pcb_group_id: z161.string().optional(),
|
|
3637
3646
|
subcircuit_id: z161.string().optional(),
|
|
3638
3647
|
name: z161.string().optional(),
|
|
3639
3648
|
text: z161.string().optional(),
|
|
3640
|
-
|
|
3649
|
+
center: point,
|
|
3650
|
+
width: length,
|
|
3651
|
+
height: length,
|
|
3641
3652
|
layer: visible_layer.default("top"),
|
|
3642
3653
|
stroke_width: length.default("0.1mm"),
|
|
3654
|
+
corner_radius: length.optional(),
|
|
3655
|
+
is_filled: z161.boolean().optional(),
|
|
3656
|
+
has_stroke: z161.boolean().optional(),
|
|
3657
|
+
is_stroke_dashed: z161.boolean().optional(),
|
|
3643
3658
|
color: z161.string().optional()
|
|
3644
|
-
}).describe("Defines a
|
|
3659
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
3645
3660
|
expectTypesMatch(true);
|
|
3646
3661
|
|
|
3647
|
-
// src/pcb/
|
|
3662
|
+
// src/pcb/pcb_note_path.ts
|
|
3648
3663
|
import { z as z162 } from "zod";
|
|
3649
|
-
var
|
|
3650
|
-
type: z162.literal("
|
|
3651
|
-
|
|
3664
|
+
var pcb_note_path = z162.object({
|
|
3665
|
+
type: z162.literal("pcb_note_path"),
|
|
3666
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
3652
3667
|
pcb_component_id: z162.string().optional(),
|
|
3653
3668
|
pcb_group_id: z162.string().optional(),
|
|
3654
3669
|
subcircuit_id: z162.string().optional(),
|
|
3655
3670
|
name: z162.string().optional(),
|
|
3656
3671
|
text: z162.string().optional(),
|
|
3672
|
+
route: z162.array(point),
|
|
3673
|
+
layer: visible_layer.default("top"),
|
|
3674
|
+
stroke_width: length.default("0.1mm"),
|
|
3675
|
+
color: z162.string().optional()
|
|
3676
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
3677
|
+
expectTypesMatch(true);
|
|
3678
|
+
|
|
3679
|
+
// src/pcb/pcb_note_line.ts
|
|
3680
|
+
import { z as z163 } from "zod";
|
|
3681
|
+
var pcb_note_line = z163.object({
|
|
3682
|
+
type: z163.literal("pcb_note_line"),
|
|
3683
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
3684
|
+
pcb_component_id: z163.string().optional(),
|
|
3685
|
+
pcb_group_id: z163.string().optional(),
|
|
3686
|
+
subcircuit_id: z163.string().optional(),
|
|
3687
|
+
name: z163.string().optional(),
|
|
3688
|
+
text: z163.string().optional(),
|
|
3657
3689
|
x1: distance,
|
|
3658
3690
|
y1: distance,
|
|
3659
3691
|
x2: distance,
|
|
3660
3692
|
y2: distance,
|
|
3661
3693
|
layer: visible_layer.default("top"),
|
|
3662
3694
|
stroke_width: distance.default("0.1mm"),
|
|
3663
|
-
color:
|
|
3664
|
-
is_dashed:
|
|
3695
|
+
color: z163.string().optional(),
|
|
3696
|
+
is_dashed: z163.boolean().optional()
|
|
3665
3697
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
3666
3698
|
expectTypesMatch(true);
|
|
3667
3699
|
|
|
3668
3700
|
// src/pcb/pcb_note_dimension.ts
|
|
3669
|
-
import { z as
|
|
3670
|
-
var pcb_note_dimension =
|
|
3671
|
-
type:
|
|
3701
|
+
import { z as z164 } from "zod";
|
|
3702
|
+
var pcb_note_dimension = z164.object({
|
|
3703
|
+
type: z164.literal("pcb_note_dimension"),
|
|
3672
3704
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
3673
|
-
pcb_component_id:
|
|
3674
|
-
pcb_group_id:
|
|
3675
|
-
subcircuit_id:
|
|
3676
|
-
name:
|
|
3705
|
+
pcb_component_id: z164.string().optional(),
|
|
3706
|
+
pcb_group_id: z164.string().optional(),
|
|
3707
|
+
subcircuit_id: z164.string().optional(),
|
|
3708
|
+
name: z164.string().optional(),
|
|
3677
3709
|
from: point,
|
|
3678
3710
|
to: point,
|
|
3679
|
-
text:
|
|
3680
|
-
text_ccw_rotation:
|
|
3711
|
+
text: z164.string().optional(),
|
|
3712
|
+
text_ccw_rotation: z164.number().optional(),
|
|
3681
3713
|
offset_distance: length.optional(),
|
|
3682
|
-
offset_direction:
|
|
3683
|
-
x:
|
|
3684
|
-
y:
|
|
3714
|
+
offset_direction: z164.object({
|
|
3715
|
+
x: z164.number(),
|
|
3716
|
+
y: z164.number()
|
|
3685
3717
|
}).optional(),
|
|
3686
|
-
font:
|
|
3718
|
+
font: z164.literal("tscircuit2024").default("tscircuit2024"),
|
|
3687
3719
|
font_size: length.default("1mm"),
|
|
3688
3720
|
layer: visible_layer.default("top"),
|
|
3689
|
-
color:
|
|
3721
|
+
color: z164.string().optional(),
|
|
3690
3722
|
arrow_size: length.default("1mm")
|
|
3691
3723
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
3692
3724
|
expectTypesMatch(true);
|
|
3693
3725
|
|
|
3694
3726
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
3695
|
-
import { z as
|
|
3727
|
+
import { z as z165 } from "zod";
|
|
3696
3728
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
3697
|
-
type:
|
|
3729
|
+
type: z165.literal("pcb_footprint_overlap_error"),
|
|
3698
3730
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3699
|
-
error_type:
|
|
3700
|
-
pcb_smtpad_ids:
|
|
3701
|
-
pcb_plated_hole_ids:
|
|
3702
|
-
pcb_hole_ids:
|
|
3703
|
-
pcb_keepout_ids:
|
|
3731
|
+
error_type: z165.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
3732
|
+
pcb_smtpad_ids: z165.array(z165.string()).optional(),
|
|
3733
|
+
pcb_plated_hole_ids: z165.array(z165.string()).optional(),
|
|
3734
|
+
pcb_hole_ids: z165.array(z165.string()).optional(),
|
|
3735
|
+
pcb_keepout_ids: z165.array(z165.string()).optional()
|
|
3704
3736
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
3705
3737
|
expectTypesMatch(
|
|
3706
3738
|
true
|
|
3707
3739
|
);
|
|
3708
3740
|
|
|
3709
3741
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
3710
|
-
import { z as
|
|
3742
|
+
import { z as z166 } from "zod";
|
|
3711
3743
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
3712
|
-
type:
|
|
3744
|
+
type: z166.literal("pcb_courtyard_overlap_error"),
|
|
3713
3745
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3714
|
-
error_type:
|
|
3715
|
-
pcb_component_ids:
|
|
3746
|
+
error_type: z166.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
3747
|
+
pcb_component_ids: z166.tuple([z166.string(), z166.string()])
|
|
3716
3748
|
}).describe(
|
|
3717
3749
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
3718
3750
|
);
|
|
@@ -3721,78 +3753,78 @@ expectTypesMatch(
|
|
|
3721
3753
|
);
|
|
3722
3754
|
|
|
3723
3755
|
// src/pcb/pcb_keepout.ts
|
|
3724
|
-
import { z as
|
|
3725
|
-
var pcb_keepout_outline =
|
|
3726
|
-
type:
|
|
3727
|
-
shape:
|
|
3728
|
-
pcb_group_id:
|
|
3729
|
-
subcircuit_id:
|
|
3730
|
-
outline:
|
|
3756
|
+
import { z as z167 } from "zod";
|
|
3757
|
+
var pcb_keepout_outline = z167.object({
|
|
3758
|
+
type: z167.literal("pcb_keepout"),
|
|
3759
|
+
shape: z167.literal("outline"),
|
|
3760
|
+
pcb_group_id: z167.string().optional(),
|
|
3761
|
+
subcircuit_id: z167.string().optional(),
|
|
3762
|
+
outline: z167.array(point).min(2),
|
|
3731
3763
|
stroke_width: length,
|
|
3732
|
-
pcb_keepout_id:
|
|
3733
|
-
layers:
|
|
3734
|
-
description:
|
|
3735
|
-
excluded_pcb_component_ids:
|
|
3736
|
-
warning_only:
|
|
3737
|
-
allow_traces:
|
|
3738
|
-
allow_placements:
|
|
3739
|
-
});
|
|
3740
|
-
var pcb_keepout =
|
|
3741
|
-
type:
|
|
3742
|
-
shape:
|
|
3743
|
-
pcb_group_id:
|
|
3744
|
-
subcircuit_id:
|
|
3764
|
+
pcb_keepout_id: z167.string(),
|
|
3765
|
+
layers: z167.array(z167.string()),
|
|
3766
|
+
description: z167.string().optional(),
|
|
3767
|
+
excluded_pcb_component_ids: z167.array(z167.string()).optional(),
|
|
3768
|
+
warning_only: z167.boolean().optional(),
|
|
3769
|
+
allow_traces: z167.boolean().optional(),
|
|
3770
|
+
allow_placements: z167.boolean().optional()
|
|
3771
|
+
});
|
|
3772
|
+
var pcb_keepout = z167.object({
|
|
3773
|
+
type: z167.literal("pcb_keepout"),
|
|
3774
|
+
shape: z167.literal("rect"),
|
|
3775
|
+
pcb_group_id: z167.string().optional(),
|
|
3776
|
+
subcircuit_id: z167.string().optional(),
|
|
3745
3777
|
center: point,
|
|
3746
3778
|
width: distance,
|
|
3747
3779
|
height: distance,
|
|
3748
|
-
pcb_keepout_id:
|
|
3749
|
-
layers:
|
|
3780
|
+
pcb_keepout_id: z167.string(),
|
|
3781
|
+
layers: z167.array(z167.string()),
|
|
3750
3782
|
// Specify layers where the keepout applies
|
|
3751
|
-
description:
|
|
3783
|
+
description: z167.string().optional(),
|
|
3752
3784
|
// Optional description of the keepout
|
|
3753
|
-
excluded_pcb_component_ids:
|
|
3754
|
-
warning_only:
|
|
3755
|
-
allow_traces:
|
|
3756
|
-
allow_placements:
|
|
3785
|
+
excluded_pcb_component_ids: z167.array(z167.string()).optional(),
|
|
3786
|
+
warning_only: z167.boolean().optional(),
|
|
3787
|
+
allow_traces: z167.boolean().optional(),
|
|
3788
|
+
allow_placements: z167.boolean().optional()
|
|
3757
3789
|
}).or(
|
|
3758
|
-
|
|
3759
|
-
type:
|
|
3760
|
-
shape:
|
|
3761
|
-
pcb_group_id:
|
|
3762
|
-
subcircuit_id:
|
|
3790
|
+
z167.object({
|
|
3791
|
+
type: z167.literal("pcb_keepout"),
|
|
3792
|
+
shape: z167.literal("circle"),
|
|
3793
|
+
pcb_group_id: z167.string().optional(),
|
|
3794
|
+
subcircuit_id: z167.string().optional(),
|
|
3763
3795
|
center: point,
|
|
3764
3796
|
radius: distance,
|
|
3765
|
-
pcb_keepout_id:
|
|
3766
|
-
layers:
|
|
3797
|
+
pcb_keepout_id: z167.string(),
|
|
3798
|
+
layers: z167.array(z167.string()),
|
|
3767
3799
|
// Specify layers where the keepout applies
|
|
3768
|
-
description:
|
|
3800
|
+
description: z167.string().optional(),
|
|
3769
3801
|
// Optional description of the keepout
|
|
3770
|
-
excluded_pcb_component_ids:
|
|
3771
|
-
warning_only:
|
|
3772
|
-
allow_traces:
|
|
3773
|
-
allow_placements:
|
|
3802
|
+
excluded_pcb_component_ids: z167.array(z167.string()).optional(),
|
|
3803
|
+
warning_only: z167.boolean().optional(),
|
|
3804
|
+
allow_traces: z167.boolean().optional(),
|
|
3805
|
+
allow_placements: z167.boolean().optional()
|
|
3774
3806
|
})
|
|
3775
3807
|
).or(pcb_keepout_outline);
|
|
3776
3808
|
expectTypesMatch(true);
|
|
3777
3809
|
expectTypesMatch(true);
|
|
3778
3810
|
|
|
3779
3811
|
// src/pcb/pcb_keepout_overlap_warning.ts
|
|
3780
|
-
import { z as
|
|
3781
|
-
var pcb_keepout_overlap_warning =
|
|
3782
|
-
type:
|
|
3812
|
+
import { z as z168 } from "zod";
|
|
3813
|
+
var pcb_keepout_overlap_warning = z168.object({
|
|
3814
|
+
type: z168.literal("pcb_keepout_overlap_warning"),
|
|
3783
3815
|
pcb_keepout_overlap_warning_id: getZodPrefixedIdWithDefault(
|
|
3784
3816
|
"pcb_keepout_overlap_warning"
|
|
3785
3817
|
),
|
|
3786
|
-
warning_type:
|
|
3787
|
-
message:
|
|
3788
|
-
pcb_keepout_id:
|
|
3789
|
-
pcb_component_ids:
|
|
3790
|
-
pcb_trace_ids:
|
|
3791
|
-
pcb_smtpad_ids:
|
|
3792
|
-
pcb_plated_hole_ids:
|
|
3793
|
-
pcb_via_ids:
|
|
3818
|
+
warning_type: z168.literal("pcb_keepout_overlap_warning").default("pcb_keepout_overlap_warning"),
|
|
3819
|
+
message: z168.string(),
|
|
3820
|
+
pcb_keepout_id: z168.string(),
|
|
3821
|
+
pcb_component_ids: z168.array(z168.string()).optional(),
|
|
3822
|
+
pcb_trace_ids: z168.array(z168.string()).optional(),
|
|
3823
|
+
pcb_smtpad_ids: z168.array(z168.string()).optional(),
|
|
3824
|
+
pcb_plated_hole_ids: z168.array(z168.string()).optional(),
|
|
3825
|
+
pcb_via_ids: z168.array(z168.string()).optional(),
|
|
3794
3826
|
center: point.optional(),
|
|
3795
|
-
subcircuit_id:
|
|
3827
|
+
subcircuit_id: z168.string().optional()
|
|
3796
3828
|
}).describe(
|
|
3797
3829
|
"Warning emitted when copper overlaps a PCB keepout with warning_only enabled"
|
|
3798
3830
|
);
|
|
@@ -3801,18 +3833,18 @@ expectTypesMatch(
|
|
|
3801
3833
|
);
|
|
3802
3834
|
|
|
3803
3835
|
// src/pcb/pcb_cutout.ts
|
|
3804
|
-
import { z as
|
|
3805
|
-
var pcb_cutout_base =
|
|
3806
|
-
type:
|
|
3836
|
+
import { z as z169 } from "zod";
|
|
3837
|
+
var pcb_cutout_base = z169.object({
|
|
3838
|
+
type: z169.literal("pcb_cutout"),
|
|
3807
3839
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3808
|
-
pcb_component_id:
|
|
3809
|
-
pcb_group_id:
|
|
3810
|
-
subcircuit_id:
|
|
3811
|
-
pcb_board_id:
|
|
3812
|
-
pcb_panel_id:
|
|
3840
|
+
pcb_component_id: z169.string().optional(),
|
|
3841
|
+
pcb_group_id: z169.string().optional(),
|
|
3842
|
+
subcircuit_id: z169.string().optional(),
|
|
3843
|
+
pcb_board_id: z169.string().optional(),
|
|
3844
|
+
pcb_panel_id: z169.string().optional()
|
|
3813
3845
|
});
|
|
3814
3846
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3815
|
-
shape:
|
|
3847
|
+
shape: z169.literal("rect"),
|
|
3816
3848
|
center: point,
|
|
3817
3849
|
width: length,
|
|
3818
3850
|
height: length,
|
|
@@ -3821,26 +3853,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3821
3853
|
});
|
|
3822
3854
|
expectTypesMatch(true);
|
|
3823
3855
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3824
|
-
shape:
|
|
3856
|
+
shape: z169.literal("circle"),
|
|
3825
3857
|
center: point,
|
|
3826
3858
|
radius: length
|
|
3827
3859
|
});
|
|
3828
3860
|
expectTypesMatch(true);
|
|
3829
3861
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3830
|
-
shape:
|
|
3831
|
-
points:
|
|
3862
|
+
shape: z169.literal("polygon"),
|
|
3863
|
+
points: z169.array(point)
|
|
3832
3864
|
});
|
|
3833
3865
|
expectTypesMatch(true);
|
|
3834
3866
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3835
|
-
shape:
|
|
3836
|
-
route:
|
|
3867
|
+
shape: z169.literal("path"),
|
|
3868
|
+
route: z169.array(point),
|
|
3837
3869
|
slot_width: length,
|
|
3838
3870
|
slot_length: length.optional(),
|
|
3839
3871
|
space_between_slots: length.optional(),
|
|
3840
3872
|
slot_corner_radius: length.optional()
|
|
3841
3873
|
});
|
|
3842
3874
|
expectTypesMatch(true);
|
|
3843
|
-
var pcb_cutout =
|
|
3875
|
+
var pcb_cutout = z169.discriminatedUnion("shape", [
|
|
3844
3876
|
pcb_cutout_rect,
|
|
3845
3877
|
pcb_cutout_circle,
|
|
3846
3878
|
pcb_cutout_polygon,
|
|
@@ -3849,223 +3881,223 @@ var pcb_cutout = z168.discriminatedUnion("shape", [
|
|
|
3849
3881
|
expectTypesMatch(true);
|
|
3850
3882
|
|
|
3851
3883
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3852
|
-
import { z as
|
|
3884
|
+
import { z as z170 } from "zod";
|
|
3853
3885
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3854
|
-
type:
|
|
3886
|
+
type: z170.literal("pcb_missing_footprint_error"),
|
|
3855
3887
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3856
3888
|
"pcb_missing_footprint_error"
|
|
3857
3889
|
),
|
|
3858
|
-
pcb_group_id:
|
|
3859
|
-
subcircuit_id:
|
|
3860
|
-
error_type:
|
|
3861
|
-
source_component_id:
|
|
3890
|
+
pcb_group_id: z170.string().optional(),
|
|
3891
|
+
subcircuit_id: z170.string().optional(),
|
|
3892
|
+
error_type: z170.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3893
|
+
source_component_id: z170.string()
|
|
3862
3894
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3863
3895
|
expectTypesMatch(
|
|
3864
3896
|
true
|
|
3865
3897
|
);
|
|
3866
3898
|
|
|
3867
3899
|
// src/pcb/external_footprint_load_error.ts
|
|
3868
|
-
import { z as
|
|
3900
|
+
import { z as z171 } from "zod";
|
|
3869
3901
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3870
|
-
type:
|
|
3902
|
+
type: z171.literal("external_footprint_load_error"),
|
|
3871
3903
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3872
3904
|
"external_footprint_load_error"
|
|
3873
3905
|
),
|
|
3874
|
-
pcb_component_id:
|
|
3875
|
-
source_component_id:
|
|
3876
|
-
pcb_group_id:
|
|
3877
|
-
subcircuit_id:
|
|
3878
|
-
footprinter_string:
|
|
3879
|
-
error_type:
|
|
3906
|
+
pcb_component_id: z171.string(),
|
|
3907
|
+
source_component_id: z171.string(),
|
|
3908
|
+
pcb_group_id: z171.string().optional(),
|
|
3909
|
+
subcircuit_id: z171.string().optional(),
|
|
3910
|
+
footprinter_string: z171.string().optional(),
|
|
3911
|
+
error_type: z171.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3880
3912
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3881
3913
|
expectTypesMatch(true);
|
|
3882
3914
|
|
|
3883
3915
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3884
|
-
import { z as
|
|
3916
|
+
import { z as z172 } from "zod";
|
|
3885
3917
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3886
|
-
type:
|
|
3918
|
+
type: z172.literal("circuit_json_footprint_load_error"),
|
|
3887
3919
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3888
3920
|
"circuit_json_footprint_load_error"
|
|
3889
3921
|
),
|
|
3890
|
-
pcb_component_id:
|
|
3891
|
-
source_component_id:
|
|
3892
|
-
pcb_group_id:
|
|
3893
|
-
subcircuit_id:
|
|
3894
|
-
error_type:
|
|
3895
|
-
circuit_json:
|
|
3922
|
+
pcb_component_id: z172.string(),
|
|
3923
|
+
source_component_id: z172.string(),
|
|
3924
|
+
pcb_group_id: z172.string().optional(),
|
|
3925
|
+
subcircuit_id: z172.string().optional(),
|
|
3926
|
+
error_type: z172.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3927
|
+
circuit_json: z172.array(z172.any()).optional()
|
|
3896
3928
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3897
3929
|
expectTypesMatch(true);
|
|
3898
3930
|
|
|
3899
3931
|
// src/pcb/pcb_group.ts
|
|
3900
|
-
import { z as
|
|
3901
|
-
var pcb_group =
|
|
3902
|
-
type:
|
|
3932
|
+
import { z as z173 } from "zod";
|
|
3933
|
+
var pcb_group = z173.object({
|
|
3934
|
+
type: z173.literal("pcb_group"),
|
|
3903
3935
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3904
|
-
source_group_id:
|
|
3905
|
-
is_subcircuit:
|
|
3906
|
-
subcircuit_id:
|
|
3936
|
+
source_group_id: z173.string(),
|
|
3937
|
+
is_subcircuit: z173.boolean().optional(),
|
|
3938
|
+
subcircuit_id: z173.string().optional(),
|
|
3907
3939
|
width: length.optional(),
|
|
3908
3940
|
height: length.optional(),
|
|
3909
3941
|
center: point,
|
|
3910
|
-
display_offset_x:
|
|
3942
|
+
display_offset_x: z173.string().optional().describe(
|
|
3911
3943
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3912
3944
|
),
|
|
3913
|
-
display_offset_y:
|
|
3945
|
+
display_offset_y: z173.string().optional().describe(
|
|
3914
3946
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3915
3947
|
),
|
|
3916
|
-
outline:
|
|
3948
|
+
outline: z173.array(point).optional(),
|
|
3917
3949
|
anchor_position: point.optional(),
|
|
3918
3950
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3919
|
-
position_mode:
|
|
3920
|
-
positioned_relative_to_pcb_group_id:
|
|
3921
|
-
positioned_relative_to_pcb_board_id:
|
|
3922
|
-
pcb_component_ids:
|
|
3923
|
-
child_layout_mode:
|
|
3924
|
-
name:
|
|
3925
|
-
description:
|
|
3926
|
-
layout_mode:
|
|
3927
|
-
autorouter_configuration:
|
|
3951
|
+
position_mode: z173.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3952
|
+
positioned_relative_to_pcb_group_id: z173.string().optional(),
|
|
3953
|
+
positioned_relative_to_pcb_board_id: z173.string().optional(),
|
|
3954
|
+
pcb_component_ids: z173.array(z173.string()),
|
|
3955
|
+
child_layout_mode: z173.enum(["packed", "none"]).optional(),
|
|
3956
|
+
name: z173.string().optional(),
|
|
3957
|
+
description: z173.string().optional(),
|
|
3958
|
+
layout_mode: z173.string().optional(),
|
|
3959
|
+
autorouter_configuration: z173.object({
|
|
3928
3960
|
trace_clearance: length
|
|
3929
3961
|
}).optional(),
|
|
3930
|
-
autorouter_used_string:
|
|
3962
|
+
autorouter_used_string: z173.string().optional()
|
|
3931
3963
|
}).describe("Defines a group of components on the PCB");
|
|
3932
3964
|
expectTypesMatch(true);
|
|
3933
3965
|
|
|
3934
3966
|
// src/pcb/pcb_autorouting_error.ts
|
|
3935
|
-
import { z as
|
|
3967
|
+
import { z as z174 } from "zod";
|
|
3936
3968
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3937
|
-
type:
|
|
3969
|
+
type: z174.literal("pcb_autorouting_error"),
|
|
3938
3970
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3939
|
-
error_type:
|
|
3940
|
-
subcircuit_id:
|
|
3971
|
+
error_type: z174.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3972
|
+
subcircuit_id: z174.string().optional()
|
|
3941
3973
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3942
3974
|
expectTypesMatch(true);
|
|
3943
3975
|
|
|
3944
3976
|
// src/pcb/pcb_preflight_routing_error.ts
|
|
3945
|
-
import { z as
|
|
3977
|
+
import { z as z175 } from "zod";
|
|
3946
3978
|
var pcb_preflight_routing_error = base_circuit_json_error.extend({
|
|
3947
|
-
type:
|
|
3979
|
+
type: z175.literal("pcb_preflight_routing_error"),
|
|
3948
3980
|
pcb_preflight_routing_error_id: getZodPrefixedIdWithDefault(
|
|
3949
3981
|
"pcb_preflight_routing_error"
|
|
3950
3982
|
),
|
|
3951
|
-
error_type:
|
|
3952
|
-
error_code:
|
|
3953
|
-
subcircuit_id:
|
|
3954
|
-
pcb_group_id:
|
|
3955
|
-
routing_phase_index:
|
|
3956
|
-
phase_name:
|
|
3957
|
-
source_trace_ids:
|
|
3958
|
-
pcb_component_ids:
|
|
3959
|
-
pcb_port_ids:
|
|
3960
|
-
related_error_ids:
|
|
3961
|
-
measurements:
|
|
3983
|
+
error_type: z175.literal("pcb_preflight_routing_error").default("pcb_preflight_routing_error"),
|
|
3984
|
+
error_code: z175.string(),
|
|
3985
|
+
subcircuit_id: z175.string().optional(),
|
|
3986
|
+
pcb_group_id: z175.string().optional(),
|
|
3987
|
+
routing_phase_index: z175.number().int().optional(),
|
|
3988
|
+
phase_name: z175.string().optional(),
|
|
3989
|
+
source_trace_ids: z175.array(z175.string()).optional(),
|
|
3990
|
+
pcb_component_ids: z175.array(z175.string()).optional(),
|
|
3991
|
+
pcb_port_ids: z175.array(z175.string()).optional(),
|
|
3992
|
+
related_error_ids: z175.array(z175.string()).optional(),
|
|
3993
|
+
measurements: z175.record(z175.number().finite()).optional()
|
|
3962
3994
|
});
|
|
3963
3995
|
expectTypesMatch(true);
|
|
3964
3996
|
|
|
3965
3997
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3966
|
-
import { z as
|
|
3967
|
-
var pcb_manual_edit_conflict_warning =
|
|
3968
|
-
type:
|
|
3998
|
+
import { z as z176 } from "zod";
|
|
3999
|
+
var pcb_manual_edit_conflict_warning = z176.object({
|
|
4000
|
+
type: z176.literal("pcb_manual_edit_conflict_warning"),
|
|
3969
4001
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3970
4002
|
"pcb_manual_edit_conflict_warning"
|
|
3971
4003
|
),
|
|
3972
|
-
warning_type:
|
|
3973
|
-
message:
|
|
3974
|
-
pcb_component_id:
|
|
3975
|
-
pcb_group_id:
|
|
3976
|
-
subcircuit_id:
|
|
3977
|
-
source_component_id:
|
|
4004
|
+
warning_type: z176.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
4005
|
+
message: z176.string(),
|
|
4006
|
+
pcb_component_id: z176.string(),
|
|
4007
|
+
pcb_group_id: z176.string().optional(),
|
|
4008
|
+
subcircuit_id: z176.string().optional(),
|
|
4009
|
+
source_component_id: z176.string()
|
|
3978
4010
|
}).describe(
|
|
3979
4011
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3980
4012
|
);
|
|
3981
4013
|
expectTypesMatch(true);
|
|
3982
4014
|
|
|
3983
4015
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3984
|
-
import { z as
|
|
3985
|
-
var connectorOrientationDirection =
|
|
3986
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3987
|
-
type:
|
|
4016
|
+
import { z as z177 } from "zod";
|
|
4017
|
+
var connectorOrientationDirection = z177.enum(["x-", "x+", "y+", "y-"]);
|
|
4018
|
+
var pcb_connector_not_in_accessible_orientation_warning = z177.object({
|
|
4019
|
+
type: z177.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3988
4020
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3989
4021
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3990
4022
|
),
|
|
3991
|
-
warning_type:
|
|
3992
|
-
message:
|
|
3993
|
-
pcb_component_id:
|
|
3994
|
-
source_component_id:
|
|
3995
|
-
pcb_board_id:
|
|
4023
|
+
warning_type: z177.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
4024
|
+
message: z177.string(),
|
|
4025
|
+
pcb_component_id: z177.string(),
|
|
4026
|
+
source_component_id: z177.string().optional(),
|
|
4027
|
+
pcb_board_id: z177.string().optional(),
|
|
3996
4028
|
facing_direction: connectorOrientationDirection,
|
|
3997
4029
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3998
|
-
subcircuit_id:
|
|
4030
|
+
subcircuit_id: z177.string().optional()
|
|
3999
4031
|
}).describe(
|
|
4000
4032
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
4001
4033
|
);
|
|
4002
4034
|
expectTypesMatch(true);
|
|
4003
4035
|
|
|
4004
4036
|
// src/pcb/pcb_component_missing_courtyard_warning.ts
|
|
4005
|
-
import { z as
|
|
4006
|
-
var pcb_component_missing_courtyard_warning =
|
|
4007
|
-
type:
|
|
4037
|
+
import { z as z178 } from "zod";
|
|
4038
|
+
var pcb_component_missing_courtyard_warning = z178.object({
|
|
4039
|
+
type: z178.literal("pcb_component_missing_courtyard_warning"),
|
|
4008
4040
|
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
4009
4041
|
"pcb_component_missing_courtyard_warning"
|
|
4010
4042
|
),
|
|
4011
|
-
warning_type:
|
|
4012
|
-
message:
|
|
4013
|
-
pcb_component_id:
|
|
4014
|
-
source_component_id:
|
|
4015
|
-
subcircuit_id:
|
|
4043
|
+
warning_type: z178.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
4044
|
+
message: z178.string(),
|
|
4045
|
+
pcb_component_id: z178.string(),
|
|
4046
|
+
source_component_id: z178.string().optional(),
|
|
4047
|
+
subcircuit_id: z178.string().optional()
|
|
4016
4048
|
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
4017
4049
|
expectTypesMatch(true);
|
|
4018
4050
|
|
|
4019
4051
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
4020
|
-
import { z as
|
|
4021
|
-
var supplier_footprint_mismatch_warning =
|
|
4022
|
-
type:
|
|
4052
|
+
import { z as z179 } from "zod";
|
|
4053
|
+
var supplier_footprint_mismatch_warning = z179.object({
|
|
4054
|
+
type: z179.literal("supplier_footprint_mismatch_warning"),
|
|
4023
4055
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
4024
4056
|
"supplier_footprint_mismatch_warning"
|
|
4025
4057
|
),
|
|
4026
|
-
warning_type:
|
|
4027
|
-
message:
|
|
4028
|
-
source_component_id:
|
|
4029
|
-
pcb_component_id:
|
|
4030
|
-
pcb_group_id:
|
|
4031
|
-
subcircuit_id:
|
|
4058
|
+
warning_type: z179.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
4059
|
+
message: z179.string(),
|
|
4060
|
+
source_component_id: z179.string(),
|
|
4061
|
+
pcb_component_id: z179.string().optional(),
|
|
4062
|
+
pcb_group_id: z179.string().optional(),
|
|
4063
|
+
subcircuit_id: z179.string().optional(),
|
|
4032
4064
|
supplier_name: supplier_name.optional(),
|
|
4033
|
-
supplier_part_number:
|
|
4034
|
-
supplier_footprint_url:
|
|
4035
|
-
footprint_copper_intersection_over_union:
|
|
4065
|
+
supplier_part_number: z179.string().optional(),
|
|
4066
|
+
supplier_footprint_url: z179.string().optional(),
|
|
4067
|
+
footprint_copper_intersection_over_union: z179.number()
|
|
4036
4068
|
}).describe(
|
|
4037
4069
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
4038
4070
|
);
|
|
4039
4071
|
expectTypesMatch(true);
|
|
4040
4072
|
|
|
4041
4073
|
// src/pcb/pcb_fabricator_extra_charge_warning.ts
|
|
4042
|
-
import { z as
|
|
4043
|
-
var pcb_fabricator_extra_charge_warning =
|
|
4044
|
-
type:
|
|
4074
|
+
import { z as z180 } from "zod";
|
|
4075
|
+
var pcb_fabricator_extra_charge_warning = z180.object({
|
|
4076
|
+
type: z180.literal("pcb_fabricator_extra_charge_warning"),
|
|
4045
4077
|
pcb_fabricator_extra_charge_warning_id: getZodPrefixedIdWithDefault(
|
|
4046
4078
|
"pcb_fabricator_extra_charge_warning"
|
|
4047
4079
|
),
|
|
4048
|
-
warning_type:
|
|
4049
|
-
message:
|
|
4050
|
-
fabricator_preset:
|
|
4051
|
-
pcb_board_id:
|
|
4052
|
-
pcb_via_ids:
|
|
4053
|
-
subcircuit_id:
|
|
4080
|
+
warning_type: z180.literal("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),
|
|
4081
|
+
message: z180.string(),
|
|
4082
|
+
fabricator_preset: z180.string(),
|
|
4083
|
+
pcb_board_id: z180.string().optional(),
|
|
4084
|
+
pcb_via_ids: z180.array(z180.string()).optional(),
|
|
4085
|
+
subcircuit_id: z180.string().optional()
|
|
4054
4086
|
}).describe(
|
|
4055
4087
|
"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."
|
|
4056
4088
|
);
|
|
4057
4089
|
expectTypesMatch(true);
|
|
4058
4090
|
|
|
4059
4091
|
// src/pcb/pcb_breakout_point.ts
|
|
4060
|
-
import { z as
|
|
4061
|
-
var pcb_breakout_point =
|
|
4062
|
-
type:
|
|
4092
|
+
import { z as z181 } from "zod";
|
|
4093
|
+
var pcb_breakout_point = z181.object({
|
|
4094
|
+
type: z181.literal("pcb_breakout_point"),
|
|
4063
4095
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
4064
|
-
pcb_group_id:
|
|
4065
|
-
subcircuit_id:
|
|
4066
|
-
source_trace_id:
|
|
4067
|
-
source_port_id:
|
|
4068
|
-
source_net_id:
|
|
4096
|
+
pcb_group_id: z181.string(),
|
|
4097
|
+
subcircuit_id: z181.string().optional(),
|
|
4098
|
+
source_trace_id: z181.string().optional(),
|
|
4099
|
+
source_port_id: z181.string().optional(),
|
|
4100
|
+
source_net_id: z181.string().optional(),
|
|
4069
4101
|
layer: layer_ref.optional(),
|
|
4070
4102
|
x: distance,
|
|
4071
4103
|
y: distance
|
|
@@ -4075,61 +4107,61 @@ var pcb_breakout_point = z180.object({
|
|
|
4075
4107
|
expectTypesMatch(true);
|
|
4076
4108
|
|
|
4077
4109
|
// src/pcb/pcb_ground_plane.ts
|
|
4078
|
-
import { z as
|
|
4079
|
-
var pcb_ground_plane =
|
|
4080
|
-
type:
|
|
4110
|
+
import { z as z182 } from "zod";
|
|
4111
|
+
var pcb_ground_plane = z182.object({
|
|
4112
|
+
type: z182.literal("pcb_ground_plane"),
|
|
4081
4113
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
4082
|
-
source_pcb_ground_plane_id:
|
|
4083
|
-
source_net_id:
|
|
4084
|
-
pcb_group_id:
|
|
4085
|
-
subcircuit_id:
|
|
4114
|
+
source_pcb_ground_plane_id: z182.string(),
|
|
4115
|
+
source_net_id: z182.string(),
|
|
4116
|
+
pcb_group_id: z182.string().optional(),
|
|
4117
|
+
subcircuit_id: z182.string().optional()
|
|
4086
4118
|
}).describe("Defines a ground plane on the PCB");
|
|
4087
4119
|
expectTypesMatch(true);
|
|
4088
4120
|
|
|
4089
4121
|
// src/pcb/pcb_ground_plane_region.ts
|
|
4090
|
-
import { z as
|
|
4091
|
-
var pcb_ground_plane_region =
|
|
4092
|
-
type:
|
|
4122
|
+
import { z as z183 } from "zod";
|
|
4123
|
+
var pcb_ground_plane_region = z183.object({
|
|
4124
|
+
type: z183.literal("pcb_ground_plane_region"),
|
|
4093
4125
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
4094
4126
|
"pcb_ground_plane_region"
|
|
4095
4127
|
),
|
|
4096
|
-
pcb_ground_plane_id:
|
|
4097
|
-
pcb_group_id:
|
|
4098
|
-
subcircuit_id:
|
|
4128
|
+
pcb_ground_plane_id: z183.string(),
|
|
4129
|
+
pcb_group_id: z183.string().optional(),
|
|
4130
|
+
subcircuit_id: z183.string().optional(),
|
|
4099
4131
|
layer: layer_ref,
|
|
4100
|
-
points:
|
|
4132
|
+
points: z183.array(point)
|
|
4101
4133
|
}).describe("Defines a polygon region of a ground plane");
|
|
4102
4134
|
expectTypesMatch(true);
|
|
4103
4135
|
|
|
4104
4136
|
// src/pcb/pcb_thermal_spoke.ts
|
|
4105
|
-
import { z as
|
|
4106
|
-
var pcb_thermal_spoke =
|
|
4107
|
-
type:
|
|
4137
|
+
import { z as z184 } from "zod";
|
|
4138
|
+
var pcb_thermal_spoke = z184.object({
|
|
4139
|
+
type: z184.literal("pcb_thermal_spoke"),
|
|
4108
4140
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
4109
|
-
pcb_ground_plane_id:
|
|
4110
|
-
shape:
|
|
4111
|
-
spoke_count:
|
|
4141
|
+
pcb_ground_plane_id: z184.string(),
|
|
4142
|
+
shape: z184.string(),
|
|
4143
|
+
spoke_count: z184.number(),
|
|
4112
4144
|
spoke_thickness: distance,
|
|
4113
4145
|
spoke_inner_diameter: distance,
|
|
4114
4146
|
spoke_outer_diameter: distance,
|
|
4115
|
-
pcb_plated_hole_id:
|
|
4116
|
-
subcircuit_id:
|
|
4147
|
+
pcb_plated_hole_id: z184.string().optional(),
|
|
4148
|
+
subcircuit_id: z184.string().optional()
|
|
4117
4149
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
4118
4150
|
expectTypesMatch(true);
|
|
4119
4151
|
|
|
4120
4152
|
// src/pcb/pcb_copper_pour.ts
|
|
4121
|
-
import { z as
|
|
4122
|
-
var pcb_copper_pour_base =
|
|
4123
|
-
type:
|
|
4153
|
+
import { z as z185 } from "zod";
|
|
4154
|
+
var pcb_copper_pour_base = z185.object({
|
|
4155
|
+
type: z185.literal("pcb_copper_pour"),
|
|
4124
4156
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
4125
|
-
pcb_group_id:
|
|
4126
|
-
subcircuit_id:
|
|
4157
|
+
pcb_group_id: z185.string().optional(),
|
|
4158
|
+
subcircuit_id: z185.string().optional(),
|
|
4127
4159
|
layer: layer_ref,
|
|
4128
|
-
source_net_id:
|
|
4129
|
-
covered_with_solder_mask:
|
|
4160
|
+
source_net_id: z185.string().optional(),
|
|
4161
|
+
covered_with_solder_mask: z185.boolean().optional().default(true)
|
|
4130
4162
|
});
|
|
4131
4163
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
4132
|
-
shape:
|
|
4164
|
+
shape: z185.literal("rect"),
|
|
4133
4165
|
center: point,
|
|
4134
4166
|
width: length,
|
|
4135
4167
|
height: length,
|
|
@@ -4137,16 +4169,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
4137
4169
|
});
|
|
4138
4170
|
expectTypesMatch(true);
|
|
4139
4171
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
4140
|
-
shape:
|
|
4172
|
+
shape: z185.literal("brep"),
|
|
4141
4173
|
brep_shape
|
|
4142
4174
|
});
|
|
4143
4175
|
expectTypesMatch(true);
|
|
4144
4176
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
4145
|
-
shape:
|
|
4146
|
-
points:
|
|
4177
|
+
shape: z185.literal("polygon"),
|
|
4178
|
+
points: z185.array(point)
|
|
4147
4179
|
});
|
|
4148
4180
|
expectTypesMatch(true);
|
|
4149
|
-
var pcb_copper_pour =
|
|
4181
|
+
var pcb_copper_pour = z185.discriminatedUnion("shape", [
|
|
4150
4182
|
pcb_copper_pour_rect,
|
|
4151
4183
|
pcb_copper_pour_brep,
|
|
4152
4184
|
pcb_copper_pour_polygon
|
|
@@ -4154,99 +4186,99 @@ var pcb_copper_pour = z184.discriminatedUnion("shape", [
|
|
|
4154
4186
|
expectTypesMatch(true);
|
|
4155
4187
|
|
|
4156
4188
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
4157
|
-
import { z as
|
|
4189
|
+
import { z as z186 } from "zod";
|
|
4158
4190
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
4159
|
-
type:
|
|
4191
|
+
type: z186.literal("pcb_component_outside_board_error"),
|
|
4160
4192
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
4161
4193
|
"pcb_component_outside_board_error"
|
|
4162
4194
|
),
|
|
4163
|
-
error_type:
|
|
4164
|
-
pcb_component_id:
|
|
4165
|
-
pcb_board_id:
|
|
4195
|
+
error_type: z186.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
4196
|
+
pcb_component_id: z186.string(),
|
|
4197
|
+
pcb_board_id: z186.string(),
|
|
4166
4198
|
component_center: point,
|
|
4167
|
-
component_bounds:
|
|
4168
|
-
min_x:
|
|
4169
|
-
max_x:
|
|
4170
|
-
min_y:
|
|
4171
|
-
max_y:
|
|
4199
|
+
component_bounds: z186.object({
|
|
4200
|
+
min_x: z186.number(),
|
|
4201
|
+
max_x: z186.number(),
|
|
4202
|
+
min_y: z186.number(),
|
|
4203
|
+
max_y: z186.number()
|
|
4172
4204
|
}),
|
|
4173
|
-
subcircuit_id:
|
|
4174
|
-
source_component_id:
|
|
4205
|
+
subcircuit_id: z186.string().optional(),
|
|
4206
|
+
source_component_id: z186.string().optional()
|
|
4175
4207
|
}).describe(
|
|
4176
4208
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
4177
4209
|
);
|
|
4178
4210
|
expectTypesMatch(true);
|
|
4179
4211
|
|
|
4180
4212
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
4181
|
-
import { z as
|
|
4213
|
+
import { z as z187 } from "zod";
|
|
4182
4214
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
4183
|
-
type:
|
|
4215
|
+
type: z187.literal("pcb_component_not_on_board_edge_error"),
|
|
4184
4216
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
4185
4217
|
"pcb_component_not_on_board_edge_error"
|
|
4186
4218
|
),
|
|
4187
|
-
error_type:
|
|
4188
|
-
pcb_component_id:
|
|
4189
|
-
pcb_board_id:
|
|
4219
|
+
error_type: z187.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
4220
|
+
pcb_component_id: z187.string(),
|
|
4221
|
+
pcb_board_id: z187.string(),
|
|
4190
4222
|
component_center: point,
|
|
4191
|
-
pad_to_nearest_board_edge_distance:
|
|
4192
|
-
source_component_id:
|
|
4193
|
-
subcircuit_id:
|
|
4223
|
+
pad_to_nearest_board_edge_distance: z187.number(),
|
|
4224
|
+
source_component_id: z187.string().optional(),
|
|
4225
|
+
subcircuit_id: z187.string().optional()
|
|
4194
4226
|
}).describe(
|
|
4195
4227
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
4196
4228
|
);
|
|
4197
4229
|
expectTypesMatch(true);
|
|
4198
4230
|
|
|
4199
4231
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
4200
|
-
import { z as
|
|
4232
|
+
import { z as z188 } from "zod";
|
|
4201
4233
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
4202
|
-
type:
|
|
4234
|
+
type: z188.literal("pcb_component_invalid_layer_error"),
|
|
4203
4235
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
4204
4236
|
"pcb_component_invalid_layer_error"
|
|
4205
4237
|
),
|
|
4206
|
-
error_type:
|
|
4207
|
-
pcb_component_id:
|
|
4208
|
-
source_component_id:
|
|
4238
|
+
error_type: z188.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
4239
|
+
pcb_component_id: z188.string().optional(),
|
|
4240
|
+
source_component_id: z188.string(),
|
|
4209
4241
|
layer: layer_ref,
|
|
4210
|
-
subcircuit_id:
|
|
4242
|
+
subcircuit_id: z188.string().optional()
|
|
4211
4243
|
}).describe(
|
|
4212
4244
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
4213
4245
|
);
|
|
4214
4246
|
expectTypesMatch(true);
|
|
4215
4247
|
|
|
4216
4248
|
// src/pcb/pcb_via_clearance_error.ts
|
|
4217
|
-
import { z as
|
|
4249
|
+
import { z as z189 } from "zod";
|
|
4218
4250
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
4219
|
-
type:
|
|
4251
|
+
type: z189.literal("pcb_via_clearance_error"),
|
|
4220
4252
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
4221
|
-
error_type:
|
|
4222
|
-
pcb_via_ids:
|
|
4253
|
+
error_type: z189.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
4254
|
+
pcb_via_ids: z189.array(z189.string()).min(2),
|
|
4223
4255
|
minimum_clearance: distance.optional(),
|
|
4224
4256
|
actual_clearance: distance.optional(),
|
|
4225
|
-
pcb_center:
|
|
4226
|
-
x:
|
|
4227
|
-
y:
|
|
4257
|
+
pcb_center: z189.object({
|
|
4258
|
+
x: z189.number().optional(),
|
|
4259
|
+
y: z189.number().optional()
|
|
4228
4260
|
}).optional(),
|
|
4229
|
-
subcircuit_id:
|
|
4261
|
+
subcircuit_id: z189.string().optional()
|
|
4230
4262
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
4231
4263
|
expectTypesMatch(true);
|
|
4232
4264
|
|
|
4233
4265
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
4234
|
-
import { z as
|
|
4266
|
+
import { z as z190 } from "zod";
|
|
4235
4267
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
4236
|
-
type:
|
|
4268
|
+
type: z190.literal("pcb_via_trace_clearance_error"),
|
|
4237
4269
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4238
4270
|
"pcb_via_trace_clearance_error"
|
|
4239
4271
|
),
|
|
4240
|
-
error_type:
|
|
4241
|
-
pcb_via_id:
|
|
4242
|
-
pcb_trace_id:
|
|
4272
|
+
error_type: z190.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
4273
|
+
pcb_via_id: z190.string(),
|
|
4274
|
+
pcb_trace_id: z190.string(),
|
|
4243
4275
|
minimum_clearance: distance.optional(),
|
|
4244
4276
|
actual_clearance: distance.optional(),
|
|
4245
|
-
center:
|
|
4246
|
-
x:
|
|
4247
|
-
y:
|
|
4277
|
+
center: z190.object({
|
|
4278
|
+
x: z190.number().optional(),
|
|
4279
|
+
y: z190.number().optional()
|
|
4248
4280
|
}).optional(),
|
|
4249
|
-
subcircuit_id:
|
|
4281
|
+
subcircuit_id: z190.string().optional()
|
|
4250
4282
|
}).describe(
|
|
4251
4283
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
4252
4284
|
);
|
|
@@ -4255,41 +4287,41 @@ expectTypesMatch(
|
|
|
4255
4287
|
);
|
|
4256
4288
|
|
|
4257
4289
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
4258
|
-
import { z as
|
|
4290
|
+
import { z as z191 } from "zod";
|
|
4259
4291
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
4260
|
-
type:
|
|
4292
|
+
type: z191.literal("pcb_pad_pad_clearance_error"),
|
|
4261
4293
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4262
4294
|
"pcb_pad_pad_clearance_error"
|
|
4263
4295
|
),
|
|
4264
|
-
error_type:
|
|
4265
|
-
pcb_pad_ids:
|
|
4296
|
+
error_type: z191.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
4297
|
+
pcb_pad_ids: z191.array(z191.string()).min(2),
|
|
4266
4298
|
minimum_clearance: distance.optional(),
|
|
4267
4299
|
actual_clearance: distance.optional(),
|
|
4268
|
-
center:
|
|
4269
|
-
x:
|
|
4270
|
-
y:
|
|
4300
|
+
center: z191.object({
|
|
4301
|
+
x: z191.number().optional(),
|
|
4302
|
+
y: z191.number().optional()
|
|
4271
4303
|
}).optional(),
|
|
4272
|
-
subcircuit_id:
|
|
4304
|
+
subcircuit_id: z191.string().optional()
|
|
4273
4305
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
4274
4306
|
expectTypesMatch(true);
|
|
4275
4307
|
|
|
4276
4308
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
4277
|
-
import { z as
|
|
4309
|
+
import { z as z192 } from "zod";
|
|
4278
4310
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
4279
|
-
type:
|
|
4311
|
+
type: z192.literal("pcb_pad_trace_clearance_error"),
|
|
4280
4312
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4281
4313
|
"pcb_pad_trace_clearance_error"
|
|
4282
4314
|
),
|
|
4283
|
-
error_type:
|
|
4284
|
-
pcb_pad_id:
|
|
4285
|
-
pcb_trace_id:
|
|
4315
|
+
error_type: z192.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
4316
|
+
pcb_pad_id: z192.string(),
|
|
4317
|
+
pcb_trace_id: z192.string(),
|
|
4286
4318
|
minimum_clearance: distance.optional(),
|
|
4287
4319
|
actual_clearance: distance.optional(),
|
|
4288
|
-
center:
|
|
4289
|
-
x:
|
|
4290
|
-
y:
|
|
4320
|
+
center: z192.object({
|
|
4321
|
+
x: z192.number().optional(),
|
|
4322
|
+
y: z192.number().optional()
|
|
4291
4323
|
}).optional(),
|
|
4292
|
-
subcircuit_id:
|
|
4324
|
+
subcircuit_id: z192.string().optional()
|
|
4293
4325
|
}).describe(
|
|
4294
4326
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
4295
4327
|
);
|
|
@@ -4298,89 +4330,89 @@ expectTypesMatch(
|
|
|
4298
4330
|
);
|
|
4299
4331
|
|
|
4300
4332
|
// src/pcb/pcb_courtyard_rect.ts
|
|
4301
|
-
import { z as
|
|
4302
|
-
var pcb_courtyard_rect =
|
|
4303
|
-
type:
|
|
4333
|
+
import { z as z193 } from "zod";
|
|
4334
|
+
var pcb_courtyard_rect = z193.object({
|
|
4335
|
+
type: z193.literal("pcb_courtyard_rect"),
|
|
4304
4336
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
4305
|
-
pcb_component_id:
|
|
4306
|
-
pcb_group_id:
|
|
4307
|
-
subcircuit_id:
|
|
4337
|
+
pcb_component_id: z193.string(),
|
|
4338
|
+
pcb_group_id: z193.string().optional(),
|
|
4339
|
+
subcircuit_id: z193.string().optional(),
|
|
4308
4340
|
center: point,
|
|
4309
4341
|
width: length,
|
|
4310
4342
|
height: length,
|
|
4311
4343
|
layer: visible_layer,
|
|
4312
4344
|
ccw_rotation: rotation.optional(),
|
|
4313
|
-
color:
|
|
4345
|
+
color: z193.string().optional()
|
|
4314
4346
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
4315
4347
|
expectTypesMatch(true);
|
|
4316
4348
|
|
|
4317
4349
|
// src/pcb/pcb_courtyard_outline.ts
|
|
4318
|
-
import { z as
|
|
4319
|
-
var pcb_courtyard_outline =
|
|
4320
|
-
type:
|
|
4350
|
+
import { z as z194 } from "zod";
|
|
4351
|
+
var pcb_courtyard_outline = z194.object({
|
|
4352
|
+
type: z194.literal("pcb_courtyard_outline"),
|
|
4321
4353
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
4322
4354
|
"pcb_courtyard_outline"
|
|
4323
4355
|
),
|
|
4324
|
-
pcb_component_id:
|
|
4325
|
-
pcb_group_id:
|
|
4326
|
-
subcircuit_id:
|
|
4356
|
+
pcb_component_id: z194.string(),
|
|
4357
|
+
pcb_group_id: z194.string().optional(),
|
|
4358
|
+
subcircuit_id: z194.string().optional(),
|
|
4327
4359
|
layer: visible_layer,
|
|
4328
|
-
outline:
|
|
4360
|
+
outline: z194.array(point).min(2)
|
|
4329
4361
|
}).describe("Defines a courtyard outline on the PCB");
|
|
4330
4362
|
expectTypesMatch(true);
|
|
4331
4363
|
|
|
4332
4364
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
4333
|
-
import { z as
|
|
4334
|
-
var pcb_courtyard_polygon =
|
|
4335
|
-
type:
|
|
4365
|
+
import { z as z195 } from "zod";
|
|
4366
|
+
var pcb_courtyard_polygon = z195.object({
|
|
4367
|
+
type: z195.literal("pcb_courtyard_polygon"),
|
|
4336
4368
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
4337
4369
|
"pcb_courtyard_polygon"
|
|
4338
4370
|
),
|
|
4339
|
-
pcb_component_id:
|
|
4340
|
-
pcb_group_id:
|
|
4341
|
-
subcircuit_id:
|
|
4371
|
+
pcb_component_id: z195.string(),
|
|
4372
|
+
pcb_group_id: z195.string().optional(),
|
|
4373
|
+
subcircuit_id: z195.string().optional(),
|
|
4342
4374
|
layer: visible_layer,
|
|
4343
|
-
points:
|
|
4344
|
-
color:
|
|
4375
|
+
points: z195.array(point).min(3),
|
|
4376
|
+
color: z195.string().optional()
|
|
4345
4377
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
4346
4378
|
expectTypesMatch(true);
|
|
4347
4379
|
|
|
4348
4380
|
// src/pcb/pcb_courtyard_circle.ts
|
|
4349
|
-
import { z as
|
|
4350
|
-
var pcb_courtyard_circle =
|
|
4351
|
-
type:
|
|
4381
|
+
import { z as z196 } from "zod";
|
|
4382
|
+
var pcb_courtyard_circle = z196.object({
|
|
4383
|
+
type: z196.literal("pcb_courtyard_circle"),
|
|
4352
4384
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
4353
4385
|
"pcb_courtyard_circle"
|
|
4354
4386
|
),
|
|
4355
|
-
pcb_component_id:
|
|
4356
|
-
pcb_group_id:
|
|
4357
|
-
subcircuit_id:
|
|
4387
|
+
pcb_component_id: z196.string(),
|
|
4388
|
+
pcb_group_id: z196.string().optional(),
|
|
4389
|
+
subcircuit_id: z196.string().optional(),
|
|
4358
4390
|
center: point,
|
|
4359
4391
|
radius: length,
|
|
4360
4392
|
layer: visible_layer,
|
|
4361
|
-
color:
|
|
4393
|
+
color: z196.string().optional()
|
|
4362
4394
|
}).describe("Defines a courtyard circle on the PCB");
|
|
4363
4395
|
expectTypesMatch(true);
|
|
4364
4396
|
|
|
4365
4397
|
// src/pcb/pcb_courtyard_pill.ts
|
|
4366
|
-
import { z as
|
|
4367
|
-
var pcb_courtyard_pill =
|
|
4368
|
-
type:
|
|
4398
|
+
import { z as z197 } from "zod";
|
|
4399
|
+
var pcb_courtyard_pill = z197.object({
|
|
4400
|
+
type: z197.literal("pcb_courtyard_pill"),
|
|
4369
4401
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
4370
|
-
pcb_component_id:
|
|
4371
|
-
pcb_group_id:
|
|
4372
|
-
subcircuit_id:
|
|
4402
|
+
pcb_component_id: z197.string(),
|
|
4403
|
+
pcb_group_id: z197.string().optional(),
|
|
4404
|
+
subcircuit_id: z197.string().optional(),
|
|
4373
4405
|
center: point,
|
|
4374
4406
|
width: length,
|
|
4375
4407
|
height: length,
|
|
4376
4408
|
radius: length,
|
|
4377
4409
|
layer: visible_layer,
|
|
4378
|
-
color:
|
|
4410
|
+
color: z197.string().optional()
|
|
4379
4411
|
}).describe("Defines a courtyard pill on the PCB");
|
|
4380
4412
|
expectTypesMatch(true);
|
|
4381
4413
|
|
|
4382
4414
|
// src/cad/cad_component.ts
|
|
4383
|
-
import { z as
|
|
4415
|
+
import { z as z198 } from "zod";
|
|
4384
4416
|
|
|
4385
4417
|
// src/cad/cad_model_conventions.ts
|
|
4386
4418
|
var cad_model_formats = [
|
|
@@ -4411,87 +4443,90 @@ var cadModelDefaultDirectionMap = {
|
|
|
4411
4443
|
};
|
|
4412
4444
|
|
|
4413
4445
|
// src/cad/cad_component.ts
|
|
4414
|
-
var cad_component =
|
|
4415
|
-
type:
|
|
4416
|
-
cad_component_id:
|
|
4417
|
-
pcb_component_id:
|
|
4446
|
+
var cad_component = z198.object({
|
|
4447
|
+
type: z198.literal("cad_component"),
|
|
4448
|
+
cad_component_id: z198.string(),
|
|
4449
|
+
pcb_component_id: z198.string().optional().describe(
|
|
4418
4450
|
"Optional PCB component reference; omit for CAD geometry without a PCB component"
|
|
4419
4451
|
),
|
|
4420
|
-
source_component_id:
|
|
4452
|
+
source_component_id: z198.string(),
|
|
4421
4453
|
position: point3,
|
|
4422
4454
|
rotation: point3.optional(),
|
|
4423
|
-
is_on_folded_board:
|
|
4455
|
+
is_on_folded_board: z198.boolean().optional().describe(
|
|
4424
4456
|
"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."
|
|
4425
4457
|
),
|
|
4426
4458
|
size: point3.optional(),
|
|
4427
4459
|
layer: layer_ref.optional(),
|
|
4428
|
-
subcircuit_id:
|
|
4460
|
+
subcircuit_id: z198.string().optional(),
|
|
4429
4461
|
// These are all ways to generate/load the 3d model
|
|
4430
|
-
footprinter_string:
|
|
4431
|
-
model_obj_url:
|
|
4432
|
-
model_stl_url:
|
|
4433
|
-
model_3mf_url:
|
|
4434
|
-
model_gltf_url:
|
|
4435
|
-
model_glb_url:
|
|
4436
|
-
model_step_url:
|
|
4437
|
-
model_wrl_url:
|
|
4462
|
+
footprinter_string: z198.string().optional(),
|
|
4463
|
+
model_obj_url: z198.string().optional(),
|
|
4464
|
+
model_stl_url: z198.string().optional(),
|
|
4465
|
+
model_3mf_url: z198.string().optional(),
|
|
4466
|
+
model_gltf_url: z198.string().optional(),
|
|
4467
|
+
model_glb_url: z198.string().optional(),
|
|
4468
|
+
model_step_url: z198.string().optional(),
|
|
4469
|
+
model_wrl_url: z198.string().optional(),
|
|
4438
4470
|
model_asset: asset.optional(),
|
|
4439
|
-
model_unit_to_mm_scale_factor:
|
|
4440
|
-
model_board_normal_direction:
|
|
4471
|
+
model_unit_to_mm_scale_factor: z198.number().optional(),
|
|
4472
|
+
model_board_normal_direction: z198.enum(cad_model_axis_directions).optional().describe(
|
|
4441
4473
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
4442
4474
|
),
|
|
4443
4475
|
model_origin_position: point3.optional(),
|
|
4444
|
-
model_origin_alignment:
|
|
4476
|
+
model_origin_alignment: z198.enum([
|
|
4445
4477
|
"unknown",
|
|
4446
4478
|
"center",
|
|
4447
4479
|
"center_of_component_on_board_surface",
|
|
4448
4480
|
"bottom_center_of_component"
|
|
4449
4481
|
]).optional(),
|
|
4450
|
-
model_object_fit:
|
|
4451
|
-
model_jscad:
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4482
|
+
model_object_fit: z198.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
4483
|
+
model_jscad: z198.any().optional(),
|
|
4484
|
+
color: z198.string().trim().min(1).optional().describe(
|
|
4485
|
+
"Explicit color override for CAD geometry, including authored JSCAD material colors. Omit to preserve model materials."
|
|
4486
|
+
),
|
|
4487
|
+
show_as_translucent_model: z198.boolean().optional(),
|
|
4488
|
+
show_as_bounding_box: z198.boolean().optional(),
|
|
4489
|
+
show_hidden_edges: z198.boolean().optional(),
|
|
4490
|
+
anchor_alignment: z198.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
4456
4491
|
}).describe("Defines CAD geometry, optionally associated with a PCB component");
|
|
4457
4492
|
expectTypesMatch(true);
|
|
4458
4493
|
|
|
4459
4494
|
// src/cad/cad_collision_error.ts
|
|
4460
|
-
import { z as
|
|
4495
|
+
import { z as z199 } from "zod";
|
|
4461
4496
|
var cad_collision_error = base_circuit_json_error.extend({
|
|
4462
|
-
type:
|
|
4497
|
+
type: z199.literal("cad_collision_error"),
|
|
4463
4498
|
cad_collision_error_id: getZodPrefixedIdWithDefault("cad_collision_error"),
|
|
4464
|
-
error_type:
|
|
4465
|
-
cad_component_ids:
|
|
4466
|
-
pcb_component_ids:
|
|
4467
|
-
source_component_ids:
|
|
4468
|
-
intersection_area_mm2:
|
|
4469
|
-
threshold_area_mm2:
|
|
4499
|
+
error_type: z199.literal("cad_collision_error").default("cad_collision_error"),
|
|
4500
|
+
cad_component_ids: z199.array(z199.string()).min(1),
|
|
4501
|
+
pcb_component_ids: z199.array(z199.string()).optional(),
|
|
4502
|
+
source_component_ids: z199.array(z199.string()).min(1),
|
|
4503
|
+
intersection_area_mm2: z199.number().finite().nonnegative(),
|
|
4504
|
+
threshold_area_mm2: z199.number().finite().nonnegative()
|
|
4470
4505
|
}).describe(
|
|
4471
4506
|
"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."
|
|
4472
4507
|
);
|
|
4473
4508
|
expectTypesMatch(true);
|
|
4474
4509
|
|
|
4475
4510
|
// src/cad/cad_cable.ts
|
|
4476
|
-
import { z as
|
|
4511
|
+
import { z as z200 } from "zod";
|
|
4477
4512
|
var connectorPin1Position = point3.refine(
|
|
4478
4513
|
(point2) => [point2.x, point2.y, point2.z].every(Number.isFinite),
|
|
4479
4514
|
"Connector pin 1 positions must be finite"
|
|
4480
4515
|
).describe(
|
|
4481
4516
|
"Resolved pin 1 position at the connector mating face, in right-handed circuit world, millimeters: +X right, +Y top, +Z above. An absolute point, not a direction. Computed by the circuit producer from endpoint geometry. Together with the endpoint path tangent, fixes connector roll and identifies its pin 1 side; renderers must not infer it from footprints."
|
|
4482
4517
|
);
|
|
4483
|
-
var cad_cable =
|
|
4484
|
-
type:
|
|
4485
|
-
cad_cable_id:
|
|
4486
|
-
name:
|
|
4487
|
-
from_source_component_id:
|
|
4488
|
-
to_source_component_id:
|
|
4518
|
+
var cad_cable = z200.object({
|
|
4519
|
+
type: z200.literal("cad_cable"),
|
|
4520
|
+
cad_cable_id: z200.string(),
|
|
4521
|
+
name: z200.string().min(1),
|
|
4522
|
+
from_source_component_id: z200.string(),
|
|
4523
|
+
to_source_component_id: z200.string(),
|
|
4489
4524
|
from_connector_pin1_position: connectorPin1Position.optional(),
|
|
4490
4525
|
to_connector_pin1_position: connectorPin1Position.optional(),
|
|
4491
|
-
cableprinter_string:
|
|
4526
|
+
cableprinter_string: z200.string().min(1).describe(
|
|
4492
4527
|
'Physical cable definition, e.g. "usb_c" or "jst_ph_pins6". Independent of the route.'
|
|
4493
4528
|
),
|
|
4494
|
-
path:
|
|
4529
|
+
path: z200.array(point3).min(2).refine(
|
|
4495
4530
|
(path) => path.every(
|
|
4496
4531
|
(point2, i) => [point2.x, point2.y, point2.z].every(Number.isFinite) && (i === 0 || Math.hypot(
|
|
4497
4532
|
point2.x - path[i - 1].x,
|
|
@@ -4509,27 +4544,27 @@ var cad_cable = z199.object({
|
|
|
4509
4544
|
expectTypesMatch(true);
|
|
4510
4545
|
|
|
4511
4546
|
// src/cad/cad_reference_surface.ts
|
|
4512
|
-
import { z as
|
|
4547
|
+
import { z as z201 } from "zod";
|
|
4513
4548
|
var FRAME_TOLERANCE = 1e-6;
|
|
4514
|
-
var unitDirection =
|
|
4515
|
-
x:
|
|
4516
|
-
y:
|
|
4517
|
-
z:
|
|
4549
|
+
var unitDirection = z201.object({
|
|
4550
|
+
x: z201.number().finite(),
|
|
4551
|
+
y: z201.number().finite(),
|
|
4552
|
+
z: z201.number().finite()
|
|
4518
4553
|
}).refine(
|
|
4519
4554
|
(v) => Math.abs(Math.hypot(v.x, v.y, v.z) - 1) <= FRAME_TOLERANCE,
|
|
4520
4555
|
"Reference surface directions must be unit vectors"
|
|
4521
4556
|
);
|
|
4522
|
-
var extent = distance.pipe(
|
|
4523
|
-
var cad_reference_surface =
|
|
4524
|
-
type:
|
|
4525
|
-
cad_reference_surface_id:
|
|
4526
|
-
source_component_id:
|
|
4557
|
+
var extent = distance.pipe(z201.number().finite().positive());
|
|
4558
|
+
var cad_reference_surface = z201.object({
|
|
4559
|
+
type: z201.literal("cad_reference_surface"),
|
|
4560
|
+
cad_reference_surface_id: z201.string().min(1),
|
|
4561
|
+
source_component_id: z201.string().min(1).describe(
|
|
4527
4562
|
"Owning assembly part's source component ID. The part may have no CAD geometry."
|
|
4528
4563
|
),
|
|
4529
|
-
name:
|
|
4564
|
+
name: z201.string().trim().min(1).describe(
|
|
4530
4565
|
"Reference name, unique within the owning part, e.g. shade in STEM.shade."
|
|
4531
4566
|
),
|
|
4532
|
-
shape:
|
|
4567
|
+
shape: z201.literal("rect"),
|
|
4533
4568
|
center: point3.refine(
|
|
4534
4569
|
(p) => [p.x, p.y, p.z].every(Number.isFinite),
|
|
4535
4570
|
"Reference surface centers must be finite"
|
|
@@ -4548,18 +4583,18 @@ var cad_reference_surface = z200.object({
|
|
|
4548
4583
|
height: extent.optional().describe(
|
|
4549
4584
|
"Rectangular extent along normal cross x_axis in millimeters. Supply together with width."
|
|
4550
4585
|
),
|
|
4551
|
-
subcircuit_id:
|
|
4586
|
+
subcircuit_id: z201.string().optional()
|
|
4552
4587
|
}).superRefine((surface, ctx) => {
|
|
4553
4588
|
if (surface.width === void 0 !== (surface.height === void 0))
|
|
4554
4589
|
ctx.addIssue({
|
|
4555
|
-
code:
|
|
4590
|
+
code: z201.ZodIssueCode.custom,
|
|
4556
4591
|
path: ["width"],
|
|
4557
4592
|
message: "Provide width and height together"
|
|
4558
4593
|
});
|
|
4559
4594
|
const { normal: n, x_axis: x } = surface;
|
|
4560
4595
|
if (Math.abs(n.x * x.x + n.y * x.y + n.z * x.z) > FRAME_TOLERANCE)
|
|
4561
4596
|
ctx.addIssue({
|
|
4562
|
-
code:
|
|
4597
|
+
code: z201.ZodIssueCode.custom,
|
|
4563
4598
|
path: ["x_axis"],
|
|
4564
4599
|
message: "x_axis must be perpendicular to normal"
|
|
4565
4600
|
});
|
|
@@ -4571,9 +4606,9 @@ expectTypesMatch(
|
|
|
4571
4606
|
);
|
|
4572
4607
|
|
|
4573
4608
|
// src/simulation/simulation_voltage_source.ts
|
|
4574
|
-
import { z as
|
|
4575
|
-
var wave_shape =
|
|
4576
|
-
var percentage =
|
|
4609
|
+
import { z as z202 } from "zod";
|
|
4610
|
+
var wave_shape = z202.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
4611
|
+
var percentage = z202.union([z202.string(), z202.number()]).transform((val) => {
|
|
4577
4612
|
if (typeof val === "string") {
|
|
4578
4613
|
if (val.endsWith("%")) {
|
|
4579
4614
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4582,32 +4617,32 @@ var percentage = z201.union([z201.string(), z201.number()]).transform((val) => {
|
|
|
4582
4617
|
}
|
|
4583
4618
|
return val;
|
|
4584
4619
|
}).pipe(
|
|
4585
|
-
|
|
4620
|
+
z202.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4586
4621
|
);
|
|
4587
|
-
var simulation_dc_voltage_source =
|
|
4588
|
-
type:
|
|
4622
|
+
var simulation_dc_voltage_source = z202.object({
|
|
4623
|
+
type: z202.literal("simulation_voltage_source"),
|
|
4589
4624
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4590
4625
|
"simulation_voltage_source"
|
|
4591
4626
|
),
|
|
4592
|
-
is_dc_source:
|
|
4593
|
-
positive_source_port_id:
|
|
4594
|
-
negative_source_port_id:
|
|
4595
|
-
positive_source_net_id:
|
|
4596
|
-
negative_source_net_id:
|
|
4627
|
+
is_dc_source: z202.literal(true).optional().default(true),
|
|
4628
|
+
positive_source_port_id: z202.string().optional(),
|
|
4629
|
+
negative_source_port_id: z202.string().optional(),
|
|
4630
|
+
positive_source_net_id: z202.string().optional(),
|
|
4631
|
+
negative_source_net_id: z202.string().optional(),
|
|
4597
4632
|
voltage,
|
|
4598
4633
|
ac_magnitude: voltage.optional(),
|
|
4599
4634
|
ac_phase: rotation.optional()
|
|
4600
4635
|
}).describe("Defines a DC voltage source for simulation");
|
|
4601
|
-
var simulation_ac_voltage_source =
|
|
4602
|
-
type:
|
|
4636
|
+
var simulation_ac_voltage_source = z202.object({
|
|
4637
|
+
type: z202.literal("simulation_voltage_source"),
|
|
4603
4638
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4604
4639
|
"simulation_voltage_source"
|
|
4605
4640
|
),
|
|
4606
|
-
is_dc_source:
|
|
4607
|
-
terminal1_source_port_id:
|
|
4608
|
-
terminal2_source_port_id:
|
|
4609
|
-
terminal1_source_net_id:
|
|
4610
|
-
terminal2_source_net_id:
|
|
4641
|
+
is_dc_source: z202.literal(false),
|
|
4642
|
+
terminal1_source_port_id: z202.string().optional(),
|
|
4643
|
+
terminal2_source_port_id: z202.string().optional(),
|
|
4644
|
+
terminal1_source_net_id: z202.string().optional(),
|
|
4645
|
+
terminal2_source_net_id: z202.string().optional(),
|
|
4611
4646
|
voltage: voltage.optional(),
|
|
4612
4647
|
frequency: frequency.optional(),
|
|
4613
4648
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -4622,14 +4657,14 @@ var simulation_ac_voltage_source = z201.object({
|
|
|
4622
4657
|
ac_magnitude: voltage.optional(),
|
|
4623
4658
|
ac_phase: rotation.optional()
|
|
4624
4659
|
}).describe("Defines an AC voltage source for simulation");
|
|
4625
|
-
var simulation_voltage_source =
|
|
4660
|
+
var simulation_voltage_source = z202.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
4626
4661
|
expectTypesMatch(true);
|
|
4627
4662
|
expectTypesMatch(true);
|
|
4628
4663
|
expectTypesMatch(true);
|
|
4629
4664
|
|
|
4630
4665
|
// src/simulation/simulation_current_source.ts
|
|
4631
|
-
import { z as
|
|
4632
|
-
var percentage2 =
|
|
4666
|
+
import { z as z203 } from "zod";
|
|
4667
|
+
var percentage2 = z203.union([z203.string(), z203.number()]).transform((val) => {
|
|
4633
4668
|
if (typeof val === "string") {
|
|
4634
4669
|
if (val.endsWith("%")) {
|
|
4635
4670
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4638,32 +4673,32 @@ var percentage2 = z202.union([z202.string(), z202.number()]).transform((val) =>
|
|
|
4638
4673
|
}
|
|
4639
4674
|
return val;
|
|
4640
4675
|
}).pipe(
|
|
4641
|
-
|
|
4676
|
+
z203.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4642
4677
|
);
|
|
4643
|
-
var simulation_dc_current_source =
|
|
4644
|
-
type:
|
|
4678
|
+
var simulation_dc_current_source = z203.object({
|
|
4679
|
+
type: z203.literal("simulation_current_source"),
|
|
4645
4680
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4646
4681
|
"simulation_current_source"
|
|
4647
4682
|
),
|
|
4648
|
-
is_dc_source:
|
|
4649
|
-
positive_source_port_id:
|
|
4650
|
-
negative_source_port_id:
|
|
4651
|
-
positive_source_net_id:
|
|
4652
|
-
negative_source_net_id:
|
|
4683
|
+
is_dc_source: z203.literal(true).optional().default(true),
|
|
4684
|
+
positive_source_port_id: z203.string().optional(),
|
|
4685
|
+
negative_source_port_id: z203.string().optional(),
|
|
4686
|
+
positive_source_net_id: z203.string().optional(),
|
|
4687
|
+
negative_source_net_id: z203.string().optional(),
|
|
4653
4688
|
current,
|
|
4654
4689
|
ac_magnitude: current.optional(),
|
|
4655
4690
|
ac_phase: rotation.optional()
|
|
4656
4691
|
}).describe("Defines a DC current source for simulation");
|
|
4657
|
-
var simulation_ac_current_source =
|
|
4658
|
-
type:
|
|
4692
|
+
var simulation_ac_current_source = z203.object({
|
|
4693
|
+
type: z203.literal("simulation_current_source"),
|
|
4659
4694
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4660
4695
|
"simulation_current_source"
|
|
4661
4696
|
),
|
|
4662
|
-
is_dc_source:
|
|
4663
|
-
terminal1_source_port_id:
|
|
4664
|
-
terminal2_source_port_id:
|
|
4665
|
-
terminal1_source_net_id:
|
|
4666
|
-
terminal2_source_net_id:
|
|
4697
|
+
is_dc_source: z203.literal(false),
|
|
4698
|
+
terminal1_source_port_id: z203.string().optional(),
|
|
4699
|
+
terminal2_source_port_id: z203.string().optional(),
|
|
4700
|
+
terminal1_source_net_id: z203.string().optional(),
|
|
4701
|
+
terminal2_source_net_id: z203.string().optional(),
|
|
4667
4702
|
current: current.optional(),
|
|
4668
4703
|
frequency: frequency.optional(),
|
|
4669
4704
|
peak_to_peak_current: current.optional(),
|
|
@@ -4673,59 +4708,59 @@ var simulation_ac_current_source = z202.object({
|
|
|
4673
4708
|
ac_magnitude: current.optional(),
|
|
4674
4709
|
ac_phase: rotation.optional()
|
|
4675
4710
|
}).describe("Defines an AC current source for simulation");
|
|
4676
|
-
var simulation_current_source =
|
|
4711
|
+
var simulation_current_source = z203.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
4677
4712
|
expectTypesMatch(true);
|
|
4678
4713
|
expectTypesMatch(true);
|
|
4679
4714
|
expectTypesMatch(true);
|
|
4680
4715
|
|
|
4681
4716
|
// src/simulation/simulation_experiment.ts
|
|
4682
|
-
import { z as
|
|
4717
|
+
import { z as z205 } from "zod";
|
|
4683
4718
|
|
|
4684
4719
|
// src/simulation/simulation_units.ts
|
|
4685
|
-
import { z as
|
|
4686
|
-
var simulation_dc_sweep_unit =
|
|
4720
|
+
import { z as z204 } from "zod";
|
|
4721
|
+
var simulation_dc_sweep_unit = z204.custom(
|
|
4687
4722
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
4688
4723
|
);
|
|
4689
|
-
var simulation_parameter_unit =
|
|
4724
|
+
var simulation_parameter_unit = z204.custom(
|
|
4690
4725
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
4691
4726
|
);
|
|
4692
4727
|
|
|
4693
4728
|
// src/simulation/simulation_experiment.ts
|
|
4694
|
-
var experiment_type =
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4729
|
+
var experiment_type = z205.union([
|
|
4730
|
+
z205.literal("spice_dc_sweep"),
|
|
4731
|
+
z205.literal("spice_dc_operating_point"),
|
|
4732
|
+
z205.literal("spice_transient_analysis"),
|
|
4733
|
+
z205.literal("spice_ac_analysis"),
|
|
4734
|
+
z205.literal("pcb_return_current")
|
|
4700
4735
|
]);
|
|
4701
|
-
var spice_simulation_options =
|
|
4702
|
-
method:
|
|
4703
|
-
reltol:
|
|
4704
|
-
abstol:
|
|
4705
|
-
vntol:
|
|
4736
|
+
var spice_simulation_options = z205.object({
|
|
4737
|
+
method: z205.enum(["trap", "gear"]).optional(),
|
|
4738
|
+
reltol: z205.union([z205.number(), z205.string()]).optional(),
|
|
4739
|
+
abstol: z205.union([z205.number(), z205.string()]).optional(),
|
|
4740
|
+
vntol: z205.union([z205.number(), z205.string()]).optional()
|
|
4706
4741
|
}).describe("SPICE solver options for a simulation experiment");
|
|
4707
|
-
var simulation_experiment =
|
|
4708
|
-
type:
|
|
4742
|
+
var simulation_experiment = z205.object({
|
|
4743
|
+
type: z205.literal("simulation_experiment"),
|
|
4709
4744
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
4710
4745
|
"simulation_experiment"
|
|
4711
4746
|
),
|
|
4712
|
-
name:
|
|
4747
|
+
name: z205.string(),
|
|
4713
4748
|
experiment_type,
|
|
4714
4749
|
time_per_step: duration_ms.optional(),
|
|
4715
4750
|
start_time_ms: ms.optional(),
|
|
4716
4751
|
end_time_ms: ms.optional(),
|
|
4717
4752
|
spice_options: spice_simulation_options.optional(),
|
|
4718
|
-
dc_sweep_voltage_source_id:
|
|
4719
|
-
dc_sweep_current_source_id:
|
|
4720
|
-
dc_sweep_start:
|
|
4721
|
-
dc_sweep_stop:
|
|
4722
|
-
dc_sweep_step:
|
|
4753
|
+
dc_sweep_voltage_source_id: z205.string().optional(),
|
|
4754
|
+
dc_sweep_current_source_id: z205.string().optional(),
|
|
4755
|
+
dc_sweep_start: z205.number().optional(),
|
|
4756
|
+
dc_sweep_stop: z205.number().optional(),
|
|
4757
|
+
dc_sweep_step: z205.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
4723
4758
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
4724
|
-
ac_sweep_type:
|
|
4725
|
-
ac_samples_per_interval:
|
|
4726
|
-
ac_sample_count:
|
|
4727
|
-
ac_start_frequency_hz:
|
|
4728
|
-
ac_stop_frequency_hz:
|
|
4759
|
+
ac_sweep_type: z205.enum(["linear", "decade", "octave"]).optional(),
|
|
4760
|
+
ac_samples_per_interval: z205.number().int().positive().optional(),
|
|
4761
|
+
ac_sample_count: z205.number().int().positive().optional(),
|
|
4762
|
+
ac_start_frequency_hz: z205.number().positive().optional(),
|
|
4763
|
+
ac_stop_frequency_hz: z205.number().positive().optional()
|
|
4729
4764
|
}).superRefine((experiment, context) => {
|
|
4730
4765
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
4731
4766
|
const requiredFields = [
|
|
@@ -4737,7 +4772,7 @@ var simulation_experiment = z204.object({
|
|
|
4737
4772
|
for (const field of requiredFields) {
|
|
4738
4773
|
if (experiment[field] === void 0) {
|
|
4739
4774
|
context.addIssue({
|
|
4740
|
-
code:
|
|
4775
|
+
code: z205.ZodIssueCode.custom,
|
|
4741
4776
|
path: [field],
|
|
4742
4777
|
message: `${field} is required for a DC sweep`
|
|
4743
4778
|
});
|
|
@@ -4747,7 +4782,7 @@ var simulation_experiment = z204.object({
|
|
|
4747
4782
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
4748
4783
|
if (hasVoltageSource === hasCurrentSource) {
|
|
4749
4784
|
context.addIssue({
|
|
4750
|
-
code:
|
|
4785
|
+
code: z205.ZodIssueCode.custom,
|
|
4751
4786
|
path: ["dc_sweep_voltage_source_id"],
|
|
4752
4787
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
4753
4788
|
});
|
|
@@ -4756,35 +4791,35 @@ var simulation_experiment = z204.object({
|
|
|
4756
4791
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
4757
4792
|
if (experiment.ac_sweep_type === void 0) {
|
|
4758
4793
|
context.addIssue({
|
|
4759
|
-
code:
|
|
4794
|
+
code: z205.ZodIssueCode.custom,
|
|
4760
4795
|
path: ["ac_sweep_type"],
|
|
4761
4796
|
message: "ac_sweep_type is required for an AC analysis"
|
|
4762
4797
|
});
|
|
4763
4798
|
}
|
|
4764
4799
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
4765
4800
|
context.addIssue({
|
|
4766
|
-
code:
|
|
4801
|
+
code: z205.ZodIssueCode.custom,
|
|
4767
4802
|
path: ["ac_start_frequency_hz"],
|
|
4768
4803
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
4769
4804
|
});
|
|
4770
4805
|
}
|
|
4771
4806
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
4772
4807
|
context.addIssue({
|
|
4773
|
-
code:
|
|
4808
|
+
code: z205.ZodIssueCode.custom,
|
|
4774
4809
|
path: ["ac_stop_frequency_hz"],
|
|
4775
4810
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
4776
4811
|
});
|
|
4777
4812
|
}
|
|
4778
4813
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
4779
4814
|
context.addIssue({
|
|
4780
|
-
code:
|
|
4815
|
+
code: z205.ZodIssueCode.custom,
|
|
4781
4816
|
path: ["ac_sample_count"],
|
|
4782
4817
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
4783
4818
|
});
|
|
4784
4819
|
}
|
|
4785
4820
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
4786
4821
|
context.addIssue({
|
|
4787
|
-
code:
|
|
4822
|
+
code: z205.ZodIssueCode.custom,
|
|
4788
4823
|
path: ["ac_samples_per_interval"],
|
|
4789
4824
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
4790
4825
|
});
|
|
@@ -4794,87 +4829,87 @@ var simulation_experiment = z204.object({
|
|
|
4794
4829
|
expectTypesMatch(true);
|
|
4795
4830
|
|
|
4796
4831
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4797
|
-
import { z as
|
|
4832
|
+
import { z as z207 } from "zod";
|
|
4798
4833
|
|
|
4799
4834
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
4800
|
-
import { z as
|
|
4801
|
-
var simulation_parameter_sweep_coordinate =
|
|
4802
|
-
simulation_parameter_sweep_id:
|
|
4803
|
-
sweep_index:
|
|
4804
|
-
parameter_value:
|
|
4835
|
+
import { z as z206 } from "zod";
|
|
4836
|
+
var simulation_parameter_sweep_coordinate = z206.object({
|
|
4837
|
+
simulation_parameter_sweep_id: z206.string(),
|
|
4838
|
+
sweep_index: z206.number().int().nonnegative(),
|
|
4839
|
+
parameter_value: z206.number(),
|
|
4805
4840
|
parameter_unit: simulation_parameter_unit
|
|
4806
4841
|
});
|
|
4807
4842
|
expectTypesMatch(true);
|
|
4808
4843
|
|
|
4809
4844
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4810
|
-
var simulation_transient_voltage_graph =
|
|
4811
|
-
type:
|
|
4845
|
+
var simulation_transient_voltage_graph = z207.object({
|
|
4846
|
+
type: z207.literal("simulation_transient_voltage_graph"),
|
|
4812
4847
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4813
4848
|
"simulation_transient_voltage_graph"
|
|
4814
4849
|
),
|
|
4815
|
-
simulation_experiment_id:
|
|
4850
|
+
simulation_experiment_id: z207.string(),
|
|
4816
4851
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4817
|
-
timestamps_ms:
|
|
4818
|
-
voltage_levels:
|
|
4819
|
-
source_component_id:
|
|
4820
|
-
subcircuit_connectivity_map_key:
|
|
4852
|
+
timestamps_ms: z207.array(z207.number()).optional(),
|
|
4853
|
+
voltage_levels: z207.array(z207.number()),
|
|
4854
|
+
source_component_id: z207.string().optional(),
|
|
4855
|
+
subcircuit_connectivity_map_key: z207.string().optional(),
|
|
4821
4856
|
time_per_step: duration_ms,
|
|
4822
4857
|
start_time_ms: ms,
|
|
4823
4858
|
end_time_ms: ms,
|
|
4824
|
-
name:
|
|
4825
|
-
color:
|
|
4859
|
+
name: z207.string().optional(),
|
|
4860
|
+
color: z207.string().optional()
|
|
4826
4861
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4827
4862
|
expectTypesMatch(true);
|
|
4828
4863
|
|
|
4829
4864
|
// src/simulation/simulation_transient_current_graph.ts
|
|
4830
|
-
import { z as
|
|
4831
|
-
var simulation_transient_current_graph =
|
|
4832
|
-
type:
|
|
4865
|
+
import { z as z208 } from "zod";
|
|
4866
|
+
var simulation_transient_current_graph = z208.object({
|
|
4867
|
+
type: z208.literal("simulation_transient_current_graph"),
|
|
4833
4868
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4834
4869
|
"simulation_transient_current_graph"
|
|
4835
4870
|
),
|
|
4836
|
-
simulation_experiment_id:
|
|
4871
|
+
simulation_experiment_id: z208.string(),
|
|
4837
4872
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4838
|
-
timestamps_ms:
|
|
4839
|
-
current_levels:
|
|
4840
|
-
source_component_id:
|
|
4841
|
-
subcircuit_connectivity_map_key:
|
|
4873
|
+
timestamps_ms: z208.array(z208.number()).optional(),
|
|
4874
|
+
current_levels: z208.array(z208.number()),
|
|
4875
|
+
source_component_id: z208.string().optional(),
|
|
4876
|
+
subcircuit_connectivity_map_key: z208.string().optional(),
|
|
4842
4877
|
time_per_step: duration_ms,
|
|
4843
4878
|
start_time_ms: ms,
|
|
4844
4879
|
end_time_ms: ms,
|
|
4845
|
-
name:
|
|
4846
|
-
color:
|
|
4880
|
+
name: z208.string().optional(),
|
|
4881
|
+
color: z208.string().optional()
|
|
4847
4882
|
}).describe("Stores current measurements over time for a simulation");
|
|
4848
4883
|
expectTypesMatch(true);
|
|
4849
4884
|
|
|
4850
4885
|
// src/simulation/simulation_switch.ts
|
|
4851
|
-
import { z as
|
|
4852
|
-
var simulation_switch =
|
|
4853
|
-
type:
|
|
4886
|
+
import { z as z209 } from "zod";
|
|
4887
|
+
var simulation_switch = z209.object({
|
|
4888
|
+
type: z209.literal("simulation_switch"),
|
|
4854
4889
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4855
|
-
source_component_id:
|
|
4890
|
+
source_component_id: z209.string().optional(),
|
|
4856
4891
|
closes_at: ms.optional(),
|
|
4857
4892
|
opens_at: ms.optional(),
|
|
4858
|
-
starts_closed:
|
|
4893
|
+
starts_closed: z209.boolean().optional(),
|
|
4859
4894
|
switching_frequency: frequency.optional()
|
|
4860
4895
|
}).describe("Defines a switch for simulation timing control");
|
|
4861
4896
|
expectTypesMatch(true);
|
|
4862
4897
|
|
|
4863
4898
|
// src/simulation/simulation_voltage_probe.ts
|
|
4864
|
-
import { z as
|
|
4865
|
-
var simulation_voltage_probe =
|
|
4866
|
-
type:
|
|
4899
|
+
import { z as z210 } from "zod";
|
|
4900
|
+
var simulation_voltage_probe = z210.object({
|
|
4901
|
+
type: z210.literal("simulation_voltage_probe"),
|
|
4867
4902
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4868
4903
|
"simulation_voltage_probe"
|
|
4869
4904
|
),
|
|
4870
|
-
source_component_id:
|
|
4871
|
-
name:
|
|
4872
|
-
signal_input_source_port_id:
|
|
4873
|
-
signal_input_source_net_id:
|
|
4874
|
-
reference_input_source_port_id:
|
|
4875
|
-
reference_input_source_net_id:
|
|
4876
|
-
subcircuit_id:
|
|
4877
|
-
color:
|
|
4905
|
+
source_component_id: z210.string().optional(),
|
|
4906
|
+
name: z210.string().optional(),
|
|
4907
|
+
signal_input_source_port_id: z210.string().optional(),
|
|
4908
|
+
signal_input_source_net_id: z210.string().optional(),
|
|
4909
|
+
reference_input_source_port_id: z210.string().optional(),
|
|
4910
|
+
reference_input_source_net_id: z210.string().optional(),
|
|
4911
|
+
subcircuit_id: z210.string().optional(),
|
|
4912
|
+
color: z210.string().optional()
|
|
4878
4913
|
}).describe(
|
|
4879
4914
|
"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."
|
|
4880
4915
|
).superRefine((data, ctx) => {
|
|
@@ -4884,20 +4919,20 @@ var simulation_voltage_probe = z209.object({
|
|
|
4884
4919
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4885
4920
|
if (has_ports && has_nets) {
|
|
4886
4921
|
ctx.addIssue({
|
|
4887
|
-
code:
|
|
4922
|
+
code: z210.ZodIssueCode.custom,
|
|
4888
4923
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4889
4924
|
});
|
|
4890
4925
|
} else if (has_ports) {
|
|
4891
4926
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4892
4927
|
ctx.addIssue({
|
|
4893
|
-
code:
|
|
4928
|
+
code: z210.ZodIssueCode.custom,
|
|
4894
4929
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4895
4930
|
});
|
|
4896
4931
|
}
|
|
4897
4932
|
} else if (has_nets) {
|
|
4898
4933
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4899
4934
|
ctx.addIssue({
|
|
4900
|
-
code:
|
|
4935
|
+
code: z210.ZodIssueCode.custom,
|
|
4901
4936
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4902
4937
|
});
|
|
4903
4938
|
}
|
|
@@ -4905,7 +4940,7 @@ var simulation_voltage_probe = z209.object({
|
|
|
4905
4940
|
} else {
|
|
4906
4941
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4907
4942
|
ctx.addIssue({
|
|
4908
|
-
code:
|
|
4943
|
+
code: z210.ZodIssueCode.custom,
|
|
4909
4944
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4910
4945
|
});
|
|
4911
4946
|
}
|
|
@@ -4914,20 +4949,20 @@ var simulation_voltage_probe = z209.object({
|
|
|
4914
4949
|
expectTypesMatch(true);
|
|
4915
4950
|
|
|
4916
4951
|
// src/simulation/simulation_current_probe.ts
|
|
4917
|
-
import { z as
|
|
4918
|
-
var simulation_current_probe =
|
|
4919
|
-
type:
|
|
4952
|
+
import { z as z211 } from "zod";
|
|
4953
|
+
var simulation_current_probe = z211.object({
|
|
4954
|
+
type: z211.literal("simulation_current_probe"),
|
|
4920
4955
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4921
4956
|
"simulation_current_probe"
|
|
4922
4957
|
),
|
|
4923
|
-
source_component_id:
|
|
4924
|
-
name:
|
|
4925
|
-
positive_source_port_id:
|
|
4926
|
-
negative_source_port_id:
|
|
4927
|
-
positive_source_net_id:
|
|
4928
|
-
negative_source_net_id:
|
|
4929
|
-
subcircuit_id:
|
|
4930
|
-
color:
|
|
4958
|
+
source_component_id: z211.string().optional(),
|
|
4959
|
+
name: z211.string().optional(),
|
|
4960
|
+
positive_source_port_id: z211.string().optional(),
|
|
4961
|
+
negative_source_port_id: z211.string().optional(),
|
|
4962
|
+
positive_source_net_id: z211.string().optional(),
|
|
4963
|
+
negative_source_net_id: z211.string().optional(),
|
|
4964
|
+
subcircuit_id: z211.string().optional(),
|
|
4965
|
+
color: z211.string().optional()
|
|
4931
4966
|
}).describe(
|
|
4932
4967
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4933
4968
|
).superRefine((data, ctx) => {
|
|
@@ -4939,7 +4974,7 @@ var simulation_current_probe = z210.object({
|
|
|
4939
4974
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4940
4975
|
if (hasPorts && hasNets) {
|
|
4941
4976
|
ctx.addIssue({
|
|
4942
|
-
code:
|
|
4977
|
+
code: z211.ZodIssueCode.custom,
|
|
4943
4978
|
message: "Cannot mix port and net connections in a current probe."
|
|
4944
4979
|
});
|
|
4945
4980
|
return;
|
|
@@ -4947,7 +4982,7 @@ var simulation_current_probe = z210.object({
|
|
|
4947
4982
|
if (hasPorts) {
|
|
4948
4983
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4949
4984
|
ctx.addIssue({
|
|
4950
|
-
code:
|
|
4985
|
+
code: z211.ZodIssueCode.custom,
|
|
4951
4986
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4952
4987
|
});
|
|
4953
4988
|
}
|
|
@@ -4956,71 +4991,71 @@ var simulation_current_probe = z210.object({
|
|
|
4956
4991
|
if (hasNets) {
|
|
4957
4992
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4958
4993
|
ctx.addIssue({
|
|
4959
|
-
code:
|
|
4994
|
+
code: z211.ZodIssueCode.custom,
|
|
4960
4995
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4961
4996
|
});
|
|
4962
4997
|
}
|
|
4963
4998
|
return;
|
|
4964
4999
|
}
|
|
4965
5000
|
ctx.addIssue({
|
|
4966
|
-
code:
|
|
5001
|
+
code: z211.ZodIssueCode.custom,
|
|
4967
5002
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4968
5003
|
});
|
|
4969
5004
|
});
|
|
4970
5005
|
expectTypesMatch(true);
|
|
4971
5006
|
|
|
4972
5007
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4973
|
-
import { z as
|
|
5008
|
+
import { z as z212 } from "zod";
|
|
4974
5009
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4975
|
-
type:
|
|
5010
|
+
type: z212.literal("simulation_unknown_experiment_error"),
|
|
4976
5011
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4977
5012
|
"simulation_unknown_experiment_error"
|
|
4978
5013
|
),
|
|
4979
|
-
error_type:
|
|
4980
|
-
simulation_experiment_id:
|
|
4981
|
-
subcircuit_id:
|
|
5014
|
+
error_type: z212.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
5015
|
+
simulation_experiment_id: z212.string().optional(),
|
|
5016
|
+
subcircuit_id: z212.string().optional()
|
|
4982
5017
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4983
5018
|
expectTypesMatch(true);
|
|
4984
5019
|
|
|
4985
5020
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4986
|
-
import { z as
|
|
4987
|
-
var simulation_parameter_type =
|
|
5021
|
+
import { z as z213 } from "zod";
|
|
5022
|
+
var simulation_parameter_type = z213.enum([
|
|
4988
5023
|
"resistance",
|
|
4989
5024
|
"capacitance",
|
|
4990
5025
|
"inductance",
|
|
4991
5026
|
"voltage",
|
|
4992
5027
|
"current"
|
|
4993
5028
|
]);
|
|
4994
|
-
var simulation_parameter_sweep_base =
|
|
4995
|
-
type:
|
|
5029
|
+
var simulation_parameter_sweep_base = z213.object({
|
|
5030
|
+
type: z213.literal("simulation_parameter_sweep"),
|
|
4996
5031
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4997
5032
|
"simulation_parameter_sweep"
|
|
4998
5033
|
),
|
|
4999
|
-
simulation_experiment_id:
|
|
5000
|
-
name:
|
|
5001
|
-
parameter_values:
|
|
5034
|
+
simulation_experiment_id: z213.string(),
|
|
5035
|
+
name: z213.string().optional(),
|
|
5036
|
+
parameter_values: z213.array(z213.number()).min(1),
|
|
5002
5037
|
parameter_unit: simulation_parameter_unit
|
|
5003
5038
|
});
|
|
5004
|
-
var simulation_parameter_sweep =
|
|
5039
|
+
var simulation_parameter_sweep = z213.discriminatedUnion("parameter_type", [
|
|
5005
5040
|
simulation_parameter_sweep_base.extend({
|
|
5006
|
-
parameter_type:
|
|
5007
|
-
resistor_source_component_id:
|
|
5041
|
+
parameter_type: z213.literal("resistance"),
|
|
5042
|
+
resistor_source_component_id: z213.string()
|
|
5008
5043
|
}),
|
|
5009
5044
|
simulation_parameter_sweep_base.extend({
|
|
5010
|
-
parameter_type:
|
|
5011
|
-
capacitor_source_component_id:
|
|
5045
|
+
parameter_type: z213.literal("capacitance"),
|
|
5046
|
+
capacitor_source_component_id: z213.string()
|
|
5012
5047
|
}),
|
|
5013
5048
|
simulation_parameter_sweep_base.extend({
|
|
5014
|
-
parameter_type:
|
|
5015
|
-
inductor_source_component_id:
|
|
5049
|
+
parameter_type: z213.literal("inductance"),
|
|
5050
|
+
inductor_source_component_id: z213.string()
|
|
5016
5051
|
}),
|
|
5017
5052
|
simulation_parameter_sweep_base.extend({
|
|
5018
|
-
parameter_type:
|
|
5019
|
-
source_net_id:
|
|
5053
|
+
parameter_type: z213.literal("voltage"),
|
|
5054
|
+
source_net_id: z213.string()
|
|
5020
5055
|
}),
|
|
5021
5056
|
simulation_parameter_sweep_base.extend({
|
|
5022
|
-
parameter_type:
|
|
5023
|
-
current_source_component_id:
|
|
5057
|
+
parameter_type: z213.literal("current"),
|
|
5058
|
+
current_source_component_id: z213.string()
|
|
5024
5059
|
})
|
|
5025
5060
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
5026
5061
|
expectTypesMatch(
|
|
@@ -5028,52 +5063,52 @@ expectTypesMatch(
|
|
|
5028
5063
|
);
|
|
5029
5064
|
|
|
5030
5065
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
5031
|
-
import { z as
|
|
5032
|
-
var simulation_dc_operating_point_voltage =
|
|
5033
|
-
type:
|
|
5066
|
+
import { z as z214 } from "zod";
|
|
5067
|
+
var simulation_dc_operating_point_voltage = z214.object({
|
|
5068
|
+
type: z214.literal("simulation_dc_operating_point_voltage"),
|
|
5034
5069
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
5035
5070
|
"simulation_dc_operating_point_voltage"
|
|
5036
5071
|
),
|
|
5037
|
-
simulation_experiment_id:
|
|
5072
|
+
simulation_experiment_id: z214.string(),
|
|
5038
5073
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5039
|
-
simulation_voltage_probe_id:
|
|
5040
|
-
voltage:
|
|
5041
|
-
name:
|
|
5042
|
-
color:
|
|
5074
|
+
simulation_voltage_probe_id: z214.string(),
|
|
5075
|
+
voltage: z214.number(),
|
|
5076
|
+
name: z214.string().optional(),
|
|
5077
|
+
color: z214.string().optional()
|
|
5043
5078
|
});
|
|
5044
5079
|
expectTypesMatch(true);
|
|
5045
5080
|
|
|
5046
5081
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
5047
|
-
import { z as
|
|
5048
|
-
var simulation_dc_operating_point_current =
|
|
5049
|
-
type:
|
|
5082
|
+
import { z as z215 } from "zod";
|
|
5083
|
+
var simulation_dc_operating_point_current = z215.object({
|
|
5084
|
+
type: z215.literal("simulation_dc_operating_point_current"),
|
|
5050
5085
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
5051
5086
|
"simulation_dc_operating_point_current"
|
|
5052
5087
|
),
|
|
5053
|
-
simulation_experiment_id:
|
|
5088
|
+
simulation_experiment_id: z215.string(),
|
|
5054
5089
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5055
|
-
simulation_current_probe_id:
|
|
5056
|
-
current:
|
|
5057
|
-
name:
|
|
5058
|
-
color:
|
|
5090
|
+
simulation_current_probe_id: z215.string(),
|
|
5091
|
+
current: z215.number(),
|
|
5092
|
+
name: z215.string().optional(),
|
|
5093
|
+
color: z215.string().optional()
|
|
5059
5094
|
});
|
|
5060
5095
|
expectTypesMatch(true);
|
|
5061
5096
|
|
|
5062
5097
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
5063
|
-
import { z as
|
|
5064
|
-
var simulation_dc_sweep_voltage_graph =
|
|
5065
|
-
type:
|
|
5098
|
+
import { z as z216 } from "zod";
|
|
5099
|
+
var simulation_dc_sweep_voltage_graph = z216.object({
|
|
5100
|
+
type: z216.literal("simulation_dc_sweep_voltage_graph"),
|
|
5066
5101
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
5067
5102
|
"simulation_dc_sweep_voltage_graph"
|
|
5068
5103
|
),
|
|
5069
|
-
simulation_experiment_id:
|
|
5104
|
+
simulation_experiment_id: z216.string(),
|
|
5070
5105
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5071
|
-
simulation_voltage_probe_id:
|
|
5072
|
-
sweep_values:
|
|
5106
|
+
simulation_voltage_probe_id: z216.string(),
|
|
5107
|
+
sweep_values: z216.array(z216.number()),
|
|
5073
5108
|
sweep_unit: simulation_dc_sweep_unit,
|
|
5074
|
-
voltage_levels:
|
|
5075
|
-
name:
|
|
5076
|
-
color:
|
|
5109
|
+
voltage_levels: z216.array(z216.number()),
|
|
5110
|
+
name: z216.string().optional(),
|
|
5111
|
+
color: z216.string().optional()
|
|
5077
5112
|
}).refine(
|
|
5078
5113
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
5079
5114
|
{
|
|
@@ -5083,20 +5118,20 @@ var simulation_dc_sweep_voltage_graph = z215.object({
|
|
|
5083
5118
|
expectTypesMatch(true);
|
|
5084
5119
|
|
|
5085
5120
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
5086
|
-
import { z as
|
|
5087
|
-
var simulation_dc_sweep_current_graph =
|
|
5088
|
-
type:
|
|
5121
|
+
import { z as z217 } from "zod";
|
|
5122
|
+
var simulation_dc_sweep_current_graph = z217.object({
|
|
5123
|
+
type: z217.literal("simulation_dc_sweep_current_graph"),
|
|
5089
5124
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
5090
5125
|
"simulation_dc_sweep_current_graph"
|
|
5091
5126
|
),
|
|
5092
|
-
simulation_experiment_id:
|
|
5127
|
+
simulation_experiment_id: z217.string(),
|
|
5093
5128
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5094
|
-
simulation_current_probe_id:
|
|
5095
|
-
sweep_values:
|
|
5129
|
+
simulation_current_probe_id: z217.string(),
|
|
5130
|
+
sweep_values: z217.array(z217.number()),
|
|
5096
5131
|
sweep_unit: simulation_dc_sweep_unit,
|
|
5097
|
-
current_levels:
|
|
5098
|
-
name:
|
|
5099
|
-
color:
|
|
5132
|
+
current_levels: z217.array(z217.number()),
|
|
5133
|
+
name: z217.string().optional(),
|
|
5134
|
+
color: z217.string().optional()
|
|
5100
5135
|
}).refine(
|
|
5101
5136
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
5102
5137
|
{
|
|
@@ -5106,29 +5141,29 @@ var simulation_dc_sweep_current_graph = z216.object({
|
|
|
5106
5141
|
expectTypesMatch(true);
|
|
5107
5142
|
|
|
5108
5143
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
5109
|
-
import { z as
|
|
5144
|
+
import { z as z219 } from "zod";
|
|
5110
5145
|
|
|
5111
5146
|
// src/simulation/simulation_complex_sample.ts
|
|
5112
|
-
import { z as
|
|
5113
|
-
var simulation_complex_sample =
|
|
5114
|
-
re:
|
|
5115
|
-
im:
|
|
5147
|
+
import { z as z218 } from "zod";
|
|
5148
|
+
var simulation_complex_sample = z218.object({
|
|
5149
|
+
re: z218.number(),
|
|
5150
|
+
im: z218.number()
|
|
5116
5151
|
});
|
|
5117
5152
|
expectTypesMatch(true);
|
|
5118
5153
|
|
|
5119
5154
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
5120
|
-
var simulation_ac_sweep_voltage_graph =
|
|
5121
|
-
type:
|
|
5155
|
+
var simulation_ac_sweep_voltage_graph = z219.object({
|
|
5156
|
+
type: z219.literal("simulation_ac_sweep_voltage_graph"),
|
|
5122
5157
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
5123
5158
|
"simulation_ac_sweep_voltage_graph"
|
|
5124
5159
|
),
|
|
5125
|
-
simulation_experiment_id:
|
|
5160
|
+
simulation_experiment_id: z219.string(),
|
|
5126
5161
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5127
|
-
simulation_voltage_probe_id:
|
|
5128
|
-
frequencies_hz:
|
|
5129
|
-
complex_voltages:
|
|
5130
|
-
name:
|
|
5131
|
-
color:
|
|
5162
|
+
simulation_voltage_probe_id: z219.string(),
|
|
5163
|
+
frequencies_hz: z219.array(z219.number()),
|
|
5164
|
+
complex_voltages: z219.array(simulation_complex_sample),
|
|
5165
|
+
name: z219.string().optional(),
|
|
5166
|
+
color: z219.string().optional()
|
|
5132
5167
|
}).refine(
|
|
5133
5168
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
5134
5169
|
{
|
|
@@ -5138,19 +5173,19 @@ var simulation_ac_sweep_voltage_graph = z218.object({
|
|
|
5138
5173
|
expectTypesMatch(true);
|
|
5139
5174
|
|
|
5140
5175
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
5141
|
-
import { z as
|
|
5142
|
-
var simulation_ac_sweep_current_graph =
|
|
5143
|
-
type:
|
|
5176
|
+
import { z as z220 } from "zod";
|
|
5177
|
+
var simulation_ac_sweep_current_graph = z220.object({
|
|
5178
|
+
type: z220.literal("simulation_ac_sweep_current_graph"),
|
|
5144
5179
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
5145
5180
|
"simulation_ac_sweep_current_graph"
|
|
5146
5181
|
),
|
|
5147
|
-
simulation_experiment_id:
|
|
5182
|
+
simulation_experiment_id: z220.string(),
|
|
5148
5183
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5149
|
-
simulation_current_probe_id:
|
|
5150
|
-
frequencies_hz:
|
|
5151
|
-
complex_currents:
|
|
5152
|
-
name:
|
|
5153
|
-
color:
|
|
5184
|
+
simulation_current_probe_id: z220.string(),
|
|
5185
|
+
frequencies_hz: z220.array(z220.number()),
|
|
5186
|
+
complex_currents: z220.array(simulation_complex_sample),
|
|
5187
|
+
name: z220.string().optional(),
|
|
5188
|
+
color: z220.string().optional()
|
|
5154
5189
|
}).refine(
|
|
5155
5190
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
5156
5191
|
{
|
|
@@ -5160,52 +5195,52 @@ var simulation_ac_sweep_current_graph = z219.object({
|
|
|
5160
5195
|
expectTypesMatch(true);
|
|
5161
5196
|
|
|
5162
5197
|
// src/simulation/simulation_op_amp.ts
|
|
5163
|
-
import { z as
|
|
5164
|
-
var simulation_op_amp =
|
|
5165
|
-
type:
|
|
5198
|
+
import { z as z221 } from "zod";
|
|
5199
|
+
var simulation_op_amp = z221.object({
|
|
5200
|
+
type: z221.literal("simulation_op_amp"),
|
|
5166
5201
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
5167
|
-
source_component_id:
|
|
5168
|
-
inverting_input_source_port_id:
|
|
5169
|
-
non_inverting_input_source_port_id:
|
|
5170
|
-
output_source_port_id:
|
|
5171
|
-
positive_supply_source_port_id:
|
|
5172
|
-
negative_supply_source_port_id:
|
|
5202
|
+
source_component_id: z221.string().optional(),
|
|
5203
|
+
inverting_input_source_port_id: z221.string(),
|
|
5204
|
+
non_inverting_input_source_port_id: z221.string(),
|
|
5205
|
+
output_source_port_id: z221.string(),
|
|
5206
|
+
positive_supply_source_port_id: z221.string(),
|
|
5207
|
+
negative_supply_source_port_id: z221.string()
|
|
5173
5208
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
5174
5209
|
expectTypesMatch(true);
|
|
5175
5210
|
|
|
5176
5211
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
5177
|
-
import { z as
|
|
5178
|
-
var simulation_spice_subcircuit =
|
|
5179
|
-
type:
|
|
5212
|
+
import { z as z222 } from "zod";
|
|
5213
|
+
var simulation_spice_subcircuit = z222.object({
|
|
5214
|
+
type: z222.literal("simulation_spice_subcircuit"),
|
|
5180
5215
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
5181
5216
|
"simulation_spice_subcircuit"
|
|
5182
5217
|
),
|
|
5183
|
-
source_component_id:
|
|
5184
|
-
spice_pin_to_source_port_map:
|
|
5185
|
-
subcircuit_source:
|
|
5218
|
+
source_component_id: z222.string(),
|
|
5219
|
+
spice_pin_to_source_port_map: z222.record(z222.string(), z222.string()),
|
|
5220
|
+
subcircuit_source: z222.string()
|
|
5186
5221
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
5187
5222
|
expectTypesMatch(
|
|
5188
5223
|
true
|
|
5189
5224
|
);
|
|
5190
5225
|
|
|
5191
5226
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
5192
|
-
import { z as
|
|
5227
|
+
import { z as z223 } from "zod";
|
|
5193
5228
|
var hasValue = (value) => value !== void 0;
|
|
5194
|
-
var simulation_oscilloscope_trace =
|
|
5195
|
-
type:
|
|
5229
|
+
var simulation_oscilloscope_trace = z223.object({
|
|
5230
|
+
type: z223.literal("simulation_oscilloscope_trace"),
|
|
5196
5231
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
5197
5232
|
"simulation_oscilloscope_trace"
|
|
5198
5233
|
),
|
|
5199
|
-
simulation_transient_voltage_graph_id:
|
|
5200
|
-
simulation_transient_current_graph_id:
|
|
5201
|
-
simulation_voltage_probe_id:
|
|
5202
|
-
simulation_current_probe_id:
|
|
5203
|
-
display_name:
|
|
5204
|
-
color:
|
|
5205
|
-
display_center_value:
|
|
5206
|
-
display_center_offset_divs:
|
|
5207
|
-
volts_per_div:
|
|
5208
|
-
amps_per_div:
|
|
5234
|
+
simulation_transient_voltage_graph_id: z223.string().optional(),
|
|
5235
|
+
simulation_transient_current_graph_id: z223.string().optional(),
|
|
5236
|
+
simulation_voltage_probe_id: z223.string().optional(),
|
|
5237
|
+
simulation_current_probe_id: z223.string().optional(),
|
|
5238
|
+
display_name: z223.string().optional(),
|
|
5239
|
+
color: z223.string().optional(),
|
|
5240
|
+
display_center_value: z223.number().optional(),
|
|
5241
|
+
display_center_offset_divs: z223.number().optional(),
|
|
5242
|
+
volts_per_div: z223.number().positive().optional(),
|
|
5243
|
+
amps_per_div: z223.number().positive().optional()
|
|
5209
5244
|
}).describe(
|
|
5210
5245
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
5211
5246
|
).superRefine((data, ctx) => {
|
|
@@ -5219,19 +5254,19 @@ var simulation_oscilloscope_trace = z222.object({
|
|
|
5219
5254
|
].filter(hasValue).length;
|
|
5220
5255
|
if (voltageReferences + currentReferences !== 1) {
|
|
5221
5256
|
ctx.addIssue({
|
|
5222
|
-
code:
|
|
5257
|
+
code: z223.ZodIssueCode.custom,
|
|
5223
5258
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
5224
5259
|
});
|
|
5225
5260
|
}
|
|
5226
5261
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
5227
5262
|
ctx.addIssue({
|
|
5228
|
-
code:
|
|
5263
|
+
code: z223.ZodIssueCode.custom,
|
|
5229
5264
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
5230
5265
|
});
|
|
5231
5266
|
}
|
|
5232
5267
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
5233
5268
|
ctx.addIssue({
|
|
5234
|
-
code:
|
|
5269
|
+
code: z223.ZodIssueCode.custom,
|
|
5235
5270
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
5236
5271
|
});
|
|
5237
5272
|
}
|
|
@@ -5239,51 +5274,51 @@ var simulation_oscilloscope_trace = z222.object({
|
|
|
5239
5274
|
expectTypesMatch(true);
|
|
5240
5275
|
|
|
5241
5276
|
// src/simulation/simulation_return_current_contact.ts
|
|
5242
|
-
import { z as
|
|
5243
|
-
var contact_position =
|
|
5244
|
-
x:
|
|
5245
|
-
y:
|
|
5277
|
+
import { z as z224 } from "zod";
|
|
5278
|
+
var contact_position = z224.object({
|
|
5279
|
+
x: z224.number().finite(),
|
|
5280
|
+
y: z224.number().finite(),
|
|
5246
5281
|
layer: layer_ref
|
|
5247
5282
|
});
|
|
5248
|
-
var simulation_return_current_contact =
|
|
5283
|
+
var simulation_return_current_contact = z224.discriminatedUnion("contact_type", [
|
|
5249
5284
|
contact_position.extend({
|
|
5250
|
-
contact_type:
|
|
5251
|
-
pcb_port_id:
|
|
5285
|
+
contact_type: z224.literal("pcb_port"),
|
|
5286
|
+
pcb_port_id: z224.string().min(1)
|
|
5252
5287
|
}),
|
|
5253
5288
|
contact_position.extend({
|
|
5254
|
-
contact_type:
|
|
5255
|
-
pcb_via_id:
|
|
5289
|
+
contact_type: z224.literal("pcb_via"),
|
|
5290
|
+
pcb_via_id: z224.string().min(1)
|
|
5256
5291
|
}),
|
|
5257
5292
|
contact_position.extend({
|
|
5258
|
-
contact_type:
|
|
5259
|
-
pcb_copper_pour_id:
|
|
5293
|
+
contact_type: z224.literal("pcb_copper_pour"),
|
|
5294
|
+
pcb_copper_pour_id: z224.string().min(1)
|
|
5260
5295
|
})
|
|
5261
5296
|
]).describe("Identifies the reference conductor at a return-current contact");
|
|
5262
5297
|
expectTypesMatch(true);
|
|
5263
5298
|
|
|
5264
5299
|
// src/simulation/simulation_terminal_port.ts
|
|
5265
|
-
import { z as
|
|
5266
|
-
var simulation_terminal_port =
|
|
5267
|
-
signal_pcb_port_id:
|
|
5268
|
-
reference_pcb_port_id:
|
|
5300
|
+
import { z as z225 } from "zod";
|
|
5301
|
+
var simulation_terminal_port = z225.object({
|
|
5302
|
+
signal_pcb_port_id: z225.string().min(1),
|
|
5303
|
+
reference_pcb_port_id: z225.string().min(1).optional(),
|
|
5269
5304
|
reference_layer: layer_ref,
|
|
5270
|
-
resistance:
|
|
5305
|
+
resistance: z225.number().finite().positive()
|
|
5271
5306
|
}).describe(
|
|
5272
5307
|
"A two-terminal return-current excitation port with resistance in ohms"
|
|
5273
5308
|
);
|
|
5274
5309
|
expectTypesMatch(true);
|
|
5275
5310
|
|
|
5276
5311
|
// src/simulation/simulation_return_current_excitation.ts
|
|
5277
|
-
import { z as
|
|
5278
|
-
var simulation_return_current_excitation =
|
|
5279
|
-
type:
|
|
5312
|
+
import { z as z226 } from "zod";
|
|
5313
|
+
var simulation_return_current_excitation = z226.object({
|
|
5314
|
+
type: z226.literal("simulation_return_current_excitation"),
|
|
5280
5315
|
simulation_return_current_excitation_id: getZodPrefixedIdWithDefault(
|
|
5281
5316
|
"simulation_return_current_excitation"
|
|
5282
5317
|
),
|
|
5283
|
-
simulation_experiment_id:
|
|
5284
|
-
pcb_trace_id:
|
|
5285
|
-
ground_source_net_id:
|
|
5286
|
-
current:
|
|
5318
|
+
simulation_experiment_id: z226.string().min(1),
|
|
5319
|
+
pcb_trace_id: z226.string().min(1),
|
|
5320
|
+
ground_source_net_id: z226.string().min(1),
|
|
5321
|
+
current: z226.number().finite(),
|
|
5287
5322
|
return_source: simulation_return_current_contact,
|
|
5288
5323
|
return_sink: simulation_return_current_contact,
|
|
5289
5324
|
source_port: simulation_terminal_port.optional(),
|
|
@@ -5294,34 +5329,34 @@ var simulation_return_current_excitation = z225.object({
|
|
|
5294
5329
|
expectTypesMatch(true);
|
|
5295
5330
|
|
|
5296
5331
|
// src/simulation/simulation_pcb_return_current_result.ts
|
|
5297
|
-
import { z as
|
|
5298
|
-
var simulation_pcb_return_current_result =
|
|
5299
|
-
type:
|
|
5332
|
+
import { z as z227 } from "zod";
|
|
5333
|
+
var simulation_pcb_return_current_result = z227.object({
|
|
5334
|
+
type: z227.literal("simulation_pcb_return_current_result"),
|
|
5300
5335
|
simulation_pcb_return_current_result_id: getZodPrefixedIdWithDefault(
|
|
5301
5336
|
"simulation_pcb_return_current_result"
|
|
5302
5337
|
),
|
|
5303
|
-
simulation_experiment_id:
|
|
5304
|
-
pcb_board_id:
|
|
5305
|
-
simulation_return_current_excitation_ids:
|
|
5338
|
+
simulation_experiment_id: z227.string().min(1),
|
|
5339
|
+
pcb_board_id: z227.string().min(1),
|
|
5340
|
+
simulation_return_current_excitation_ids: z227.array(z227.string().min(1)).min(1).refine(
|
|
5306
5341
|
(ids) => new Set(ids).size === ids.length,
|
|
5307
5342
|
"Excitation IDs must be unique"
|
|
5308
5343
|
),
|
|
5309
|
-
frequency_hz:
|
|
5344
|
+
frequency_hz: z227.number().finite().positive().optional()
|
|
5310
5345
|
}).describe(
|
|
5311
5346
|
"A PCB return-current result at one frequency, or a frequency-independent result when frequency_hz is absent"
|
|
5312
5347
|
);
|
|
5313
5348
|
expectTypesMatch(true);
|
|
5314
5349
|
|
|
5315
5350
|
// src/simulation/simulation_return_current_asset.ts
|
|
5316
|
-
import { z as
|
|
5351
|
+
import { z as z228 } from "zod";
|
|
5317
5352
|
function createSimulationReturnCurrentAssetSchema(mimetypes) {
|
|
5318
5353
|
return asset.extend({
|
|
5319
|
-
project_relative_path:
|
|
5320
|
-
url:
|
|
5354
|
+
project_relative_path: z228.string().min(1),
|
|
5355
|
+
url: z228.string().url()
|
|
5321
5356
|
}).superRefine((value, context) => {
|
|
5322
5357
|
if (!mimetypes.includes(value.mimetype)) {
|
|
5323
5358
|
context.addIssue({
|
|
5324
|
-
code:
|
|
5359
|
+
code: z228.ZodIssueCode.custom,
|
|
5325
5360
|
path: ["mimetype"],
|
|
5326
5361
|
message: `Expected one of: ${mimetypes.join(", ")}`
|
|
5327
5362
|
});
|
|
@@ -5330,7 +5365,7 @@ function createSimulationReturnCurrentAssetSchema(mimetypes) {
|
|
|
5330
5365
|
const mediaType = /^data:([^;,]*)(?:;[^,]*)?,/i.exec(value.url)?.[1];
|
|
5331
5366
|
if (mediaType?.toLowerCase() !== value.mimetype) {
|
|
5332
5367
|
context.addIssue({
|
|
5333
|
-
code:
|
|
5368
|
+
code: z228.ZodIssueCode.custom,
|
|
5334
5369
|
path: ["url"],
|
|
5335
5370
|
message: "Data URL media type must match asset.mimetype"
|
|
5336
5371
|
});
|
|
@@ -5345,29 +5380,29 @@ var simulation_return_current_field_asset = createSimulationReturnCurrentAssetSc
|
|
|
5345
5380
|
var simulation_return_current_image_asset = createSimulationReturnCurrentAssetSchema(["image/png", "image/webp"]);
|
|
5346
5381
|
|
|
5347
5382
|
// src/simulation/simulation_pcb_return_current_field.ts
|
|
5348
|
-
import { z as
|
|
5349
|
-
var simulation_pcb_return_current_field =
|
|
5350
|
-
type:
|
|
5383
|
+
import { z as z229 } from "zod";
|
|
5384
|
+
var simulation_pcb_return_current_field = z229.object({
|
|
5385
|
+
type: z229.literal("simulation_pcb_return_current_field"),
|
|
5351
5386
|
simulation_pcb_return_current_field_id: getZodPrefixedIdWithDefault(
|
|
5352
5387
|
"simulation_pcb_return_current_field"
|
|
5353
5388
|
),
|
|
5354
|
-
simulation_pcb_return_current_result_id:
|
|
5389
|
+
simulation_pcb_return_current_result_id: z229.string().min(1),
|
|
5355
5390
|
layer: layer_ref,
|
|
5356
|
-
source_net_id:
|
|
5357
|
-
field_type:
|
|
5358
|
-
min_x:
|
|
5359
|
-
min_y:
|
|
5360
|
-
columns:
|
|
5361
|
-
rows:
|
|
5362
|
-
cell_width:
|
|
5363
|
-
cell_height:
|
|
5364
|
-
copper_thickness:
|
|
5365
|
-
data_format:
|
|
5391
|
+
source_net_id: z229.string().min(1),
|
|
5392
|
+
field_type: z229.enum(["real", "complex_phasor"]),
|
|
5393
|
+
min_x: z229.number().finite(),
|
|
5394
|
+
min_y: z229.number().finite(),
|
|
5395
|
+
columns: z229.number().int().positive().safe(),
|
|
5396
|
+
rows: z229.number().int().positive().safe(),
|
|
5397
|
+
cell_width: z229.number().finite().positive(),
|
|
5398
|
+
cell_height: z229.number().finite().positive(),
|
|
5399
|
+
copper_thickness: z229.number().finite().positive(),
|
|
5400
|
+
data_format: z229.literal("simulation_return_current_grid_json_v1"),
|
|
5366
5401
|
field_asset: simulation_return_current_field_asset
|
|
5367
5402
|
}).superRefine((field, context) => {
|
|
5368
5403
|
if (!Number.isSafeInteger(field.columns * field.rows)) {
|
|
5369
5404
|
context.addIssue({
|
|
5370
|
-
code:
|
|
5405
|
+
code: z229.ZodIssueCode.custom,
|
|
5371
5406
|
path: ["columns"],
|
|
5372
5407
|
message: "The grid cell count must be a safe integer"
|
|
5373
5408
|
});
|
|
@@ -5378,16 +5413,16 @@ var simulation_pcb_return_current_field = z228.object({
|
|
|
5378
5413
|
expectTypesMatch(true);
|
|
5379
5414
|
|
|
5380
5415
|
// src/simulation/simulation_return_current_grid_json.ts
|
|
5381
|
-
import { z as
|
|
5382
|
-
var channel =
|
|
5383
|
-
var simulation_return_current_grid_json =
|
|
5384
|
-
|
|
5385
|
-
field_type:
|
|
5416
|
+
import { z as z230 } from "zod";
|
|
5417
|
+
var channel = z230.array(z230.number().finite().nullable()).min(1);
|
|
5418
|
+
var simulation_return_current_grid_json = z230.discriminatedUnion("field_type", [
|
|
5419
|
+
z230.object({
|
|
5420
|
+
field_type: z230.literal("real"),
|
|
5386
5421
|
sheet_current_x: channel,
|
|
5387
5422
|
sheet_current_y: channel
|
|
5388
5423
|
}),
|
|
5389
|
-
|
|
5390
|
-
field_type:
|
|
5424
|
+
z230.object({
|
|
5425
|
+
field_type: z230.literal("complex_phasor"),
|
|
5391
5426
|
sheet_current_x_real: channel,
|
|
5392
5427
|
sheet_current_x_imag: channel,
|
|
5393
5428
|
sheet_current_y_real: channel,
|
|
@@ -5403,7 +5438,7 @@ var simulation_return_current_grid_json = z229.discriminatedUnion("field_type",
|
|
|
5403
5438
|
const first = channels[0];
|
|
5404
5439
|
if (channels.some((values) => values.length !== first.length)) {
|
|
5405
5440
|
context.addIssue({
|
|
5406
|
-
code:
|
|
5441
|
+
code: z230.ZodIssueCode.custom,
|
|
5407
5442
|
message: "Current channels must have equal lengths"
|
|
5408
5443
|
});
|
|
5409
5444
|
return;
|
|
@@ -5412,7 +5447,7 @@ var simulation_return_current_grid_json = z229.discriminatedUnion("field_type",
|
|
|
5412
5447
|
const masked = first[index] === null;
|
|
5413
5448
|
if (channels.some((values) => values[index] === null !== masked)) {
|
|
5414
5449
|
context.addIssue({
|
|
5415
|
-
code:
|
|
5450
|
+
code: z230.ZodIssueCode.custom,
|
|
5416
5451
|
message: `Cell ${index} must be null in every channel or finite in every channel`
|
|
5417
5452
|
});
|
|
5418
5453
|
return;
|
|
@@ -5429,7 +5464,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
|
|
|
5429
5464
|
return simulation_return_current_grid_json.superRefine((grid, context) => {
|
|
5430
5465
|
if (grid.field_type !== field.field_type) {
|
|
5431
5466
|
context.addIssue({
|
|
5432
|
-
code:
|
|
5467
|
+
code: z230.ZodIssueCode.custom,
|
|
5433
5468
|
path: ["field_type"],
|
|
5434
5469
|
message: "Decoded field_type must match the parent field"
|
|
5435
5470
|
});
|
|
@@ -5437,7 +5472,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
|
|
|
5437
5472
|
const first = grid.field_type === "real" ? grid.sheet_current_x : grid.sheet_current_x_real;
|
|
5438
5473
|
if (first.length !== count) {
|
|
5439
5474
|
context.addIssue({
|
|
5440
|
-
code:
|
|
5475
|
+
code: z230.ZodIssueCode.custom,
|
|
5441
5476
|
message: `Each current channel must have ${count} entries (columns * rows)`
|
|
5442
5477
|
});
|
|
5443
5478
|
}
|
|
@@ -5445,25 +5480,25 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
|
|
|
5445
5480
|
}
|
|
5446
5481
|
|
|
5447
5482
|
// src/simulation/simulation_pcb_return_current_heatmap.ts
|
|
5448
|
-
import { z as
|
|
5449
|
-
var simulation_pcb_return_current_heatmap =
|
|
5450
|
-
type:
|
|
5483
|
+
import { z as z231 } from "zod";
|
|
5484
|
+
var simulation_pcb_return_current_heatmap = z231.object({
|
|
5485
|
+
type: z231.literal("simulation_pcb_return_current_heatmap"),
|
|
5451
5486
|
simulation_pcb_return_current_heatmap_id: getZodPrefixedIdWithDefault(
|
|
5452
5487
|
"simulation_pcb_return_current_heatmap"
|
|
5453
5488
|
),
|
|
5454
|
-
simulation_pcb_return_current_result_id:
|
|
5489
|
+
simulation_pcb_return_current_result_id: z231.string().min(1),
|
|
5455
5490
|
layer: layer_ref,
|
|
5456
|
-
source_net_id:
|
|
5457
|
-
min_x:
|
|
5458
|
-
min_y:
|
|
5459
|
-
max_x:
|
|
5460
|
-
max_y:
|
|
5491
|
+
source_net_id: z231.string().min(1),
|
|
5492
|
+
min_x: z231.number().finite(),
|
|
5493
|
+
min_y: z231.number().finite(),
|
|
5494
|
+
max_x: z231.number().finite(),
|
|
5495
|
+
max_y: z231.number().finite(),
|
|
5461
5496
|
image_asset: simulation_return_current_image_asset
|
|
5462
5497
|
}).superRefine((heatmap, context) => {
|
|
5463
5498
|
for (const axis of ["x", "y"]) {
|
|
5464
5499
|
if (heatmap[`max_${axis}`] <= heatmap[`min_${axis}`]) {
|
|
5465
5500
|
context.addIssue({
|
|
5466
|
-
code:
|
|
5501
|
+
code: z231.ZodIssueCode.custom,
|
|
5467
5502
|
path: [`max_${axis}`],
|
|
5468
5503
|
message: "Heatmap bounds must have positive width and height"
|
|
5469
5504
|
});
|
|
@@ -5475,14 +5510,14 @@ var simulation_pcb_return_current_heatmap = z230.object({
|
|
|
5475
5510
|
expectTypesMatch(true);
|
|
5476
5511
|
|
|
5477
5512
|
// src/simulation/simulation_pcb_return_current_marker.ts
|
|
5478
|
-
import { z as
|
|
5479
|
-
var marker_base =
|
|
5480
|
-
type:
|
|
5513
|
+
import { z as z232 } from "zod";
|
|
5514
|
+
var marker_base = z232.object({
|
|
5515
|
+
type: z232.literal("simulation_pcb_return_current_marker"),
|
|
5481
5516
|
simulation_pcb_return_current_marker_id: getZodPrefixedIdWithDefault(
|
|
5482
5517
|
"simulation_pcb_return_current_marker"
|
|
5483
5518
|
),
|
|
5484
|
-
simulation_pcb_return_current_result_id:
|
|
5485
|
-
role:
|
|
5519
|
+
simulation_pcb_return_current_result_id: z232.string().min(1),
|
|
5520
|
+
role: z232.enum([
|
|
5486
5521
|
"signal_source",
|
|
5487
5522
|
"signal_load",
|
|
5488
5523
|
"return_source",
|
|
@@ -5490,33 +5525,33 @@ var marker_base = z231.object({
|
|
|
5490
5525
|
"signal_transition",
|
|
5491
5526
|
"return_transition"
|
|
5492
5527
|
]),
|
|
5493
|
-
label:
|
|
5494
|
-
label_x:
|
|
5495
|
-
label_y:
|
|
5528
|
+
label: z232.string().optional(),
|
|
5529
|
+
label_x: z232.number().finite().optional(),
|
|
5530
|
+
label_y: z232.number().finite().optional()
|
|
5496
5531
|
});
|
|
5497
|
-
var simulation_pcb_return_current_marker =
|
|
5532
|
+
var simulation_pcb_return_current_marker = z232.discriminatedUnion("target_type", [
|
|
5498
5533
|
marker_base.extend({
|
|
5499
|
-
target_type:
|
|
5500
|
-
pcb_port_id:
|
|
5534
|
+
target_type: z232.literal("pcb_port"),
|
|
5535
|
+
pcb_port_id: z232.string().min(1),
|
|
5501
5536
|
layer: layer_ref
|
|
5502
5537
|
}),
|
|
5503
5538
|
marker_base.extend({
|
|
5504
|
-
target_type:
|
|
5505
|
-
pcb_via_id:
|
|
5539
|
+
target_type: z232.literal("pcb_via"),
|
|
5540
|
+
pcb_via_id: z232.string().min(1),
|
|
5506
5541
|
from_layer: layer_ref,
|
|
5507
5542
|
to_layer: layer_ref
|
|
5508
5543
|
})
|
|
5509
5544
|
]).superRefine((marker, context) => {
|
|
5510
5545
|
if (marker.label_x === void 0 !== (marker.label_y === void 0)) {
|
|
5511
5546
|
context.addIssue({
|
|
5512
|
-
code:
|
|
5547
|
+
code: z232.ZodIssueCode.custom,
|
|
5513
5548
|
path: ["label_x"],
|
|
5514
5549
|
message: "label_x and label_y must be provided together"
|
|
5515
5550
|
});
|
|
5516
5551
|
}
|
|
5517
5552
|
if (marker.target_type === "pcb_via" && marker.from_layer === marker.to_layer) {
|
|
5518
5553
|
context.addIssue({
|
|
5519
|
-
code:
|
|
5554
|
+
code: z232.ZodIssueCode.custom,
|
|
5520
5555
|
path: ["to_layer"],
|
|
5521
5556
|
message: "A via transition must connect distinct layers"
|
|
5522
5557
|
});
|
|
@@ -5527,8 +5562,8 @@ var simulation_pcb_return_current_marker = z231.discriminatedUnion("target_type"
|
|
|
5527
5562
|
expectTypesMatch(true);
|
|
5528
5563
|
|
|
5529
5564
|
// src/any_circuit_element.ts
|
|
5530
|
-
import { z as
|
|
5531
|
-
var any_circuit_element =
|
|
5565
|
+
import { z as z233 } from "zod";
|
|
5566
|
+
var any_circuit_element = z233.union([
|
|
5532
5567
|
source_runtime_error,
|
|
5533
5568
|
source_trace,
|
|
5534
5569
|
source_bus,
|
|
@@ -5595,6 +5630,7 @@ var any_circuit_element = z232.union([
|
|
|
5595
5630
|
pcb_text,
|
|
5596
5631
|
pcb_trace,
|
|
5597
5632
|
pcb_trace_warning,
|
|
5633
|
+
pcb_trace_style_warning,
|
|
5598
5634
|
pcb_trace_too_long_warning,
|
|
5599
5635
|
pcb_trace_too_long_error,
|
|
5600
5636
|
pcb_bus_length_skew_error,
|
|
@@ -5873,6 +5909,7 @@ export {
|
|
|
5873
5909
|
pcb_trace_route_point_through_pad,
|
|
5874
5910
|
pcb_trace_route_point_via,
|
|
5875
5911
|
pcb_trace_route_point_wire,
|
|
5912
|
+
pcb_trace_style_warning,
|
|
5876
5913
|
pcb_trace_too_long_error,
|
|
5877
5914
|
pcb_trace_too_long_warning,
|
|
5878
5915
|
pcb_trace_too_many_vias_warning,
|