circuit-json 0.0.441 → 0.0.443
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 +20 -0
- package/dist/index.d.mts +88 -1
- package/dist/index.mjs +1360 -1341
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -970,200 +970,216 @@ var source_manually_placed_via = z63.object({
|
|
|
970
970
|
}).describe("Defines a via that is manually placed in the source domain");
|
|
971
971
|
expectTypesMatch(true);
|
|
972
972
|
|
|
973
|
-
// src/source/
|
|
973
|
+
// src/source/source_unnamed_trace_warning.ts
|
|
974
974
|
import { z as z64 } from "zod";
|
|
975
|
-
var
|
|
976
|
-
type: z64.literal("
|
|
977
|
-
|
|
978
|
-
"
|
|
975
|
+
var source_unnamed_trace_warning = z64.object({
|
|
976
|
+
type: z64.literal("source_unnamed_trace_warning"),
|
|
977
|
+
source_unnamed_trace_warning_id: getZodPrefixedIdWithDefault(
|
|
978
|
+
"source_unnamed_trace_warning"
|
|
979
979
|
),
|
|
980
|
-
warning_type: z64.literal("
|
|
980
|
+
warning_type: z64.literal("source_unnamed_trace_warning").default("source_unnamed_trace_warning"),
|
|
981
981
|
message: z64.string(),
|
|
982
|
-
|
|
983
|
-
source_port_ids: z64.array(z64.string()),
|
|
982
|
+
source_trace_id: z64.string(),
|
|
984
983
|
subcircuit_id: z64.string().optional()
|
|
985
|
-
}).describe(
|
|
986
|
-
|
|
984
|
+
}).describe("Warning emitted when a source trace is missing a name");
|
|
985
|
+
expectTypesMatch(
|
|
986
|
+
true
|
|
987
987
|
);
|
|
988
|
-
expectTypesMatch(true);
|
|
989
988
|
|
|
990
|
-
// src/source/
|
|
989
|
+
// src/source/source_no_power_pin_defined_warning.ts
|
|
991
990
|
import { z as z65 } from "zod";
|
|
992
|
-
var
|
|
993
|
-
type: z65.literal("
|
|
994
|
-
|
|
995
|
-
"
|
|
991
|
+
var source_no_power_pin_defined_warning = z65.object({
|
|
992
|
+
type: z65.literal("source_no_power_pin_defined_warning"),
|
|
993
|
+
source_no_power_pin_defined_warning_id: getZodPrefixedIdWithDefault(
|
|
994
|
+
"source_no_power_pin_defined_warning"
|
|
996
995
|
),
|
|
997
|
-
warning_type: z65.literal("
|
|
996
|
+
warning_type: z65.literal("source_no_power_pin_defined_warning").default("source_no_power_pin_defined_warning"),
|
|
998
997
|
message: z65.string(),
|
|
999
998
|
source_component_id: z65.string(),
|
|
1000
999
|
source_port_ids: z65.array(z65.string()),
|
|
1001
1000
|
subcircuit_id: z65.string().optional()
|
|
1002
1001
|
}).describe(
|
|
1003
|
-
"Warning emitted when a chip has no source ports
|
|
1002
|
+
"Warning emitted when a chip has no source ports with requires_power=true"
|
|
1004
1003
|
);
|
|
1005
1004
|
expectTypesMatch(true);
|
|
1006
1005
|
|
|
1007
|
-
// src/source/
|
|
1006
|
+
// src/source/source_no_ground_pin_defined_warning.ts
|
|
1008
1007
|
import { z as z66 } from "zod";
|
|
1009
|
-
var
|
|
1010
|
-
type: z66.literal("
|
|
1011
|
-
|
|
1012
|
-
"
|
|
1008
|
+
var source_no_ground_pin_defined_warning = z66.object({
|
|
1009
|
+
type: z66.literal("source_no_ground_pin_defined_warning"),
|
|
1010
|
+
source_no_ground_pin_defined_warning_id: getZodPrefixedIdWithDefault(
|
|
1011
|
+
"source_no_ground_pin_defined_warning"
|
|
1013
1012
|
),
|
|
1014
|
-
warning_type: z66.literal("
|
|
1013
|
+
warning_type: z66.literal("source_no_ground_pin_defined_warning").default("source_no_ground_pin_defined_warning"),
|
|
1015
1014
|
message: z66.string(),
|
|
1016
1015
|
source_component_id: z66.string(),
|
|
1017
1016
|
source_port_ids: z66.array(z66.string()),
|
|
1018
1017
|
subcircuit_id: z66.string().optional()
|
|
1018
|
+
}).describe(
|
|
1019
|
+
"Warning emitted when a chip has no source ports marked as ground pins"
|
|
1020
|
+
);
|
|
1021
|
+
expectTypesMatch(true);
|
|
1022
|
+
|
|
1023
|
+
// src/source/source_component_pins_underspecified_warning.ts
|
|
1024
|
+
import { z as z67 } from "zod";
|
|
1025
|
+
var source_component_pins_underspecified_warning = z67.object({
|
|
1026
|
+
type: z67.literal("source_component_pins_underspecified_warning"),
|
|
1027
|
+
source_component_pins_underspecified_warning_id: getZodPrefixedIdWithDefault(
|
|
1028
|
+
"source_component_pins_underspecified_warning"
|
|
1029
|
+
),
|
|
1030
|
+
warning_type: z67.literal("source_component_pins_underspecified_warning").default("source_component_pins_underspecified_warning"),
|
|
1031
|
+
message: z67.string(),
|
|
1032
|
+
source_component_id: z67.string(),
|
|
1033
|
+
source_port_ids: z67.array(z67.string()),
|
|
1034
|
+
subcircuit_id: z67.string().optional()
|
|
1019
1035
|
}).describe(
|
|
1020
1036
|
"Warning emitted when all ports on a source component are underspecified"
|
|
1021
1037
|
);
|
|
1022
1038
|
expectTypesMatch(true);
|
|
1023
1039
|
|
|
1024
1040
|
// src/source/source_pin_must_be_connected_error.ts
|
|
1025
|
-
import { z as
|
|
1041
|
+
import { z as z68 } from "zod";
|
|
1026
1042
|
var source_pin_must_be_connected_error = base_circuit_json_error.extend({
|
|
1027
|
-
type:
|
|
1043
|
+
type: z68.literal("source_pin_must_be_connected_error"),
|
|
1028
1044
|
source_pin_must_be_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1029
1045
|
"source_pin_must_be_connected_error"
|
|
1030
1046
|
),
|
|
1031
|
-
error_type:
|
|
1032
|
-
source_component_id:
|
|
1033
|
-
source_port_id:
|
|
1034
|
-
subcircuit_id:
|
|
1047
|
+
error_type: z68.literal("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),
|
|
1048
|
+
source_component_id: z68.string(),
|
|
1049
|
+
source_port_id: z68.string(),
|
|
1050
|
+
subcircuit_id: z68.string().optional()
|
|
1035
1051
|
}).describe(
|
|
1036
1052
|
"Error emitted when a pin with mustBeConnected attribute is not connected to any trace"
|
|
1037
1053
|
);
|
|
1038
1054
|
expectTypesMatch(true);
|
|
1039
1055
|
|
|
1040
1056
|
// src/source/unknown_error_finding_part.ts
|
|
1041
|
-
import { z as
|
|
1057
|
+
import { z as z69 } from "zod";
|
|
1042
1058
|
var unknown_error_finding_part = base_circuit_json_error.extend({
|
|
1043
|
-
type:
|
|
1059
|
+
type: z69.literal("unknown_error_finding_part"),
|
|
1044
1060
|
unknown_error_finding_part_id: getZodPrefixedIdWithDefault(
|
|
1045
1061
|
"unknown_error_finding_part"
|
|
1046
1062
|
),
|
|
1047
|
-
error_type:
|
|
1048
|
-
source_component_id:
|
|
1049
|
-
subcircuit_id:
|
|
1063
|
+
error_type: z69.literal("unknown_error_finding_part").default("unknown_error_finding_part"),
|
|
1064
|
+
source_component_id: z69.string().optional(),
|
|
1065
|
+
subcircuit_id: z69.string().optional()
|
|
1050
1066
|
}).describe(
|
|
1051
1067
|
"Error emitted when an unexpected error occurs while finding a part"
|
|
1052
1068
|
);
|
|
1053
1069
|
expectTypesMatch(true);
|
|
1054
1070
|
|
|
1055
1071
|
// src/schematic/schematic_box.ts
|
|
1056
|
-
import { z as
|
|
1057
|
-
var schematic_box =
|
|
1058
|
-
type:
|
|
1059
|
-
schematic_sheet_id:
|
|
1060
|
-
schematic_component_id:
|
|
1061
|
-
schematic_symbol_id:
|
|
1072
|
+
import { z as z70 } from "zod";
|
|
1073
|
+
var schematic_box = z70.object({
|
|
1074
|
+
type: z70.literal("schematic_box"),
|
|
1075
|
+
schematic_sheet_id: z70.string().optional(),
|
|
1076
|
+
schematic_component_id: z70.string().optional(),
|
|
1077
|
+
schematic_symbol_id: z70.string().optional(),
|
|
1062
1078
|
width: distance,
|
|
1063
1079
|
height: distance,
|
|
1064
|
-
is_dashed:
|
|
1080
|
+
is_dashed: z70.boolean().default(false),
|
|
1065
1081
|
x: distance,
|
|
1066
1082
|
y: distance,
|
|
1067
|
-
subcircuit_id:
|
|
1083
|
+
subcircuit_id: z70.string().optional()
|
|
1068
1084
|
}).describe("Draws a box on the schematic");
|
|
1069
1085
|
expectTypesMatch(true);
|
|
1070
1086
|
|
|
1071
1087
|
// src/schematic/schematic_path.ts
|
|
1072
|
-
import { z as
|
|
1073
|
-
var schematic_path =
|
|
1074
|
-
type:
|
|
1088
|
+
import { z as z71 } from "zod";
|
|
1089
|
+
var schematic_path = z71.object({
|
|
1090
|
+
type: z71.literal("schematic_path"),
|
|
1075
1091
|
schematic_path_id: getZodPrefixedIdWithDefault("schematic_path"),
|
|
1076
|
-
schematic_sheet_id:
|
|
1077
|
-
schematic_component_id:
|
|
1078
|
-
schematic_symbol_id:
|
|
1079
|
-
fill_color:
|
|
1080
|
-
is_filled:
|
|
1081
|
-
is_dashed:
|
|
1092
|
+
schematic_sheet_id: z71.string().optional(),
|
|
1093
|
+
schematic_component_id: z71.string().optional(),
|
|
1094
|
+
schematic_symbol_id: z71.string().optional(),
|
|
1095
|
+
fill_color: z71.string().optional(),
|
|
1096
|
+
is_filled: z71.boolean().optional(),
|
|
1097
|
+
is_dashed: z71.boolean().default(false),
|
|
1082
1098
|
stroke_width: distance.nullable().optional(),
|
|
1083
|
-
stroke_color:
|
|
1099
|
+
stroke_color: z71.string().optional(),
|
|
1084
1100
|
dash_length: distance.optional(),
|
|
1085
1101
|
dash_gap: distance.optional(),
|
|
1086
|
-
points:
|
|
1087
|
-
subcircuit_id:
|
|
1102
|
+
points: z71.array(point),
|
|
1103
|
+
subcircuit_id: z71.string().optional()
|
|
1088
1104
|
});
|
|
1089
1105
|
expectTypesMatch(true);
|
|
1090
1106
|
|
|
1091
1107
|
// src/schematic/schematic_component.ts
|
|
1092
|
-
import { z as
|
|
1093
|
-
var schematic_pin_styles =
|
|
1094
|
-
|
|
1108
|
+
import { z as z72 } from "zod";
|
|
1109
|
+
var schematic_pin_styles = z72.record(
|
|
1110
|
+
z72.object({
|
|
1095
1111
|
left_margin: length.optional(),
|
|
1096
1112
|
right_margin: length.optional(),
|
|
1097
1113
|
top_margin: length.optional(),
|
|
1098
1114
|
bottom_margin: length.optional()
|
|
1099
1115
|
})
|
|
1100
1116
|
);
|
|
1101
|
-
var schematic_component_port_arrangement_by_size =
|
|
1102
|
-
left_size:
|
|
1103
|
-
right_size:
|
|
1104
|
-
top_size:
|
|
1105
|
-
bottom_size:
|
|
1117
|
+
var schematic_component_port_arrangement_by_size = z72.object({
|
|
1118
|
+
left_size: z72.number(),
|
|
1119
|
+
right_size: z72.number(),
|
|
1120
|
+
top_size: z72.number().optional(),
|
|
1121
|
+
bottom_size: z72.number().optional()
|
|
1106
1122
|
});
|
|
1107
1123
|
expectTypesMatch(true);
|
|
1108
|
-
var schematic_component_port_arrangement_by_sides =
|
|
1109
|
-
left_side:
|
|
1110
|
-
pins:
|
|
1124
|
+
var schematic_component_port_arrangement_by_sides = z72.object({
|
|
1125
|
+
left_side: z72.object({
|
|
1126
|
+
pins: z72.array(z72.number()),
|
|
1111
1127
|
// @ts-ignore
|
|
1112
|
-
direction:
|
|
1128
|
+
direction: z72.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
1113
1129
|
}).optional(),
|
|
1114
|
-
right_side:
|
|
1115
|
-
pins:
|
|
1130
|
+
right_side: z72.object({
|
|
1131
|
+
pins: z72.array(z72.number()),
|
|
1116
1132
|
// @ts-ignore
|
|
1117
|
-
direction:
|
|
1133
|
+
direction: z72.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
1118
1134
|
}).optional(),
|
|
1119
|
-
top_side:
|
|
1120
|
-
pins:
|
|
1135
|
+
top_side: z72.object({
|
|
1136
|
+
pins: z72.array(z72.number()),
|
|
1121
1137
|
// @ts-ignore
|
|
1122
|
-
direction:
|
|
1138
|
+
direction: z72.enum(["left-to-right", "right-to-left"]).optional()
|
|
1123
1139
|
}).optional(),
|
|
1124
|
-
bottom_side:
|
|
1125
|
-
pins:
|
|
1140
|
+
bottom_side: z72.object({
|
|
1141
|
+
pins: z72.array(z72.number()),
|
|
1126
1142
|
// @ts-ignore
|
|
1127
|
-
direction:
|
|
1143
|
+
direction: z72.enum(["left-to-right", "right-to-left"]).optional()
|
|
1128
1144
|
}).optional()
|
|
1129
1145
|
});
|
|
1130
1146
|
expectTypesMatch(true);
|
|
1131
|
-
var port_arrangement =
|
|
1147
|
+
var port_arrangement = z72.union([
|
|
1132
1148
|
schematic_component_port_arrangement_by_size,
|
|
1133
1149
|
schematic_component_port_arrangement_by_sides
|
|
1134
1150
|
]);
|
|
1135
|
-
var schematic_component =
|
|
1136
|
-
type:
|
|
1151
|
+
var schematic_component = z72.object({
|
|
1152
|
+
type: z72.literal("schematic_component"),
|
|
1137
1153
|
size,
|
|
1138
1154
|
center: point,
|
|
1139
|
-
source_component_id:
|
|
1140
|
-
schematic_component_id:
|
|
1141
|
-
schematic_sheet_id:
|
|
1142
|
-
schematic_symbol_id:
|
|
1155
|
+
source_component_id: z72.string().optional(),
|
|
1156
|
+
schematic_component_id: z72.string(),
|
|
1157
|
+
schematic_sheet_id: z72.string().optional(),
|
|
1158
|
+
schematic_symbol_id: z72.string().optional(),
|
|
1143
1159
|
pin_spacing: length.optional(),
|
|
1144
1160
|
pin_styles: schematic_pin_styles.optional(),
|
|
1145
1161
|
box_width: length.optional(),
|
|
1146
|
-
symbol_name:
|
|
1162
|
+
symbol_name: z72.string().optional(),
|
|
1147
1163
|
port_arrangement: port_arrangement.optional(),
|
|
1148
|
-
port_labels:
|
|
1149
|
-
symbol_display_value:
|
|
1150
|
-
subcircuit_id:
|
|
1151
|
-
schematic_group_id:
|
|
1152
|
-
is_schematic_group:
|
|
1153
|
-
source_group_id:
|
|
1154
|
-
is_box_with_pins:
|
|
1164
|
+
port_labels: z72.record(z72.string()).optional(),
|
|
1165
|
+
symbol_display_value: z72.string().optional(),
|
|
1166
|
+
subcircuit_id: z72.string().optional(),
|
|
1167
|
+
schematic_group_id: z72.string().optional(),
|
|
1168
|
+
is_schematic_group: z72.boolean().optional(),
|
|
1169
|
+
source_group_id: z72.string().optional(),
|
|
1170
|
+
is_box_with_pins: z72.boolean().optional().default(true)
|
|
1155
1171
|
});
|
|
1156
1172
|
expectTypesMatch(true);
|
|
1157
1173
|
|
|
1158
1174
|
// src/schematic/schematic_symbol.ts
|
|
1159
|
-
import { z as
|
|
1160
|
-
var schematicSymbolMetadata =
|
|
1175
|
+
import { z as z73 } from "zod";
|
|
1176
|
+
var schematicSymbolMetadata = z73.object({
|
|
1161
1177
|
kicad_symbol: kicadSymbolMetadata.optional()
|
|
1162
|
-
}).catchall(
|
|
1163
|
-
var schematic_symbol =
|
|
1164
|
-
type:
|
|
1165
|
-
schematic_symbol_id:
|
|
1166
|
-
name:
|
|
1178
|
+
}).catchall(z73.unknown());
|
|
1179
|
+
var schematic_symbol = z73.object({
|
|
1180
|
+
type: z73.literal("schematic_symbol"),
|
|
1181
|
+
schematic_symbol_id: z73.string(),
|
|
1182
|
+
name: z73.string().optional(),
|
|
1167
1183
|
metadata: schematicSymbolMetadata.optional()
|
|
1168
1184
|
}).describe(
|
|
1169
1185
|
"Defines a named schematic symbol that can be referenced by components."
|
|
@@ -1171,126 +1187,126 @@ var schematic_symbol = z72.object({
|
|
|
1171
1187
|
expectTypesMatch(true);
|
|
1172
1188
|
|
|
1173
1189
|
// src/schematic/schematic_line.ts
|
|
1174
|
-
import { z as
|
|
1175
|
-
var schematic_line =
|
|
1176
|
-
type:
|
|
1190
|
+
import { z as z74 } from "zod";
|
|
1191
|
+
var schematic_line = z74.object({
|
|
1192
|
+
type: z74.literal("schematic_line"),
|
|
1177
1193
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
1178
|
-
schematic_sheet_id:
|
|
1179
|
-
schematic_component_id:
|
|
1180
|
-
schematic_symbol_id:
|
|
1194
|
+
schematic_sheet_id: z74.string().optional(),
|
|
1195
|
+
schematic_component_id: z74.string().optional(),
|
|
1196
|
+
schematic_symbol_id: z74.string().optional(),
|
|
1181
1197
|
x1: distance,
|
|
1182
1198
|
y1: distance,
|
|
1183
1199
|
x2: distance,
|
|
1184
1200
|
y2: distance,
|
|
1185
1201
|
stroke_width: distance.nullable().optional(),
|
|
1186
|
-
color:
|
|
1187
|
-
is_dashed:
|
|
1202
|
+
color: z74.string().default("#000000"),
|
|
1203
|
+
is_dashed: z74.boolean().default(false),
|
|
1188
1204
|
dash_length: distance.optional(),
|
|
1189
1205
|
dash_gap: distance.optional(),
|
|
1190
|
-
subcircuit_id:
|
|
1206
|
+
subcircuit_id: z74.string().optional()
|
|
1191
1207
|
}).describe("Draws a styled line on the schematic");
|
|
1192
1208
|
expectTypesMatch(true);
|
|
1193
1209
|
|
|
1194
1210
|
// src/schematic/schematic_rect.ts
|
|
1195
|
-
import { z as
|
|
1196
|
-
var schematic_rect =
|
|
1197
|
-
type:
|
|
1211
|
+
import { z as z75 } from "zod";
|
|
1212
|
+
var schematic_rect = z75.object({
|
|
1213
|
+
type: z75.literal("schematic_rect"),
|
|
1198
1214
|
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
1199
|
-
schematic_sheet_id:
|
|
1200
|
-
schematic_component_id:
|
|
1201
|
-
schematic_symbol_id:
|
|
1215
|
+
schematic_sheet_id: z75.string().optional(),
|
|
1216
|
+
schematic_component_id: z75.string().optional(),
|
|
1217
|
+
schematic_symbol_id: z75.string().optional(),
|
|
1202
1218
|
center: point,
|
|
1203
1219
|
width: distance,
|
|
1204
1220
|
height: distance,
|
|
1205
1221
|
rotation: rotation.default(0),
|
|
1206
1222
|
stroke_width: distance.nullable().optional(),
|
|
1207
|
-
color:
|
|
1208
|
-
is_filled:
|
|
1209
|
-
fill_color:
|
|
1210
|
-
is_dashed:
|
|
1211
|
-
subcircuit_id:
|
|
1223
|
+
color: z75.string().default("#000000"),
|
|
1224
|
+
is_filled: z75.boolean().default(false),
|
|
1225
|
+
fill_color: z75.string().optional(),
|
|
1226
|
+
is_dashed: z75.boolean().default(false),
|
|
1227
|
+
subcircuit_id: z75.string().optional()
|
|
1212
1228
|
}).describe("Draws a styled rectangle on the schematic");
|
|
1213
1229
|
expectTypesMatch(true);
|
|
1214
1230
|
|
|
1215
1231
|
// src/schematic/schematic_circle.ts
|
|
1216
|
-
import { z as
|
|
1217
|
-
var schematic_circle =
|
|
1218
|
-
type:
|
|
1232
|
+
import { z as z76 } from "zod";
|
|
1233
|
+
var schematic_circle = z76.object({
|
|
1234
|
+
type: z76.literal("schematic_circle"),
|
|
1219
1235
|
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
1220
|
-
schematic_sheet_id:
|
|
1221
|
-
schematic_component_id:
|
|
1222
|
-
schematic_symbol_id:
|
|
1236
|
+
schematic_sheet_id: z76.string().optional(),
|
|
1237
|
+
schematic_component_id: z76.string().optional(),
|
|
1238
|
+
schematic_symbol_id: z76.string().optional(),
|
|
1223
1239
|
center: point,
|
|
1224
1240
|
radius: distance,
|
|
1225
1241
|
stroke_width: distance.nullable().optional(),
|
|
1226
|
-
color:
|
|
1227
|
-
is_filled:
|
|
1228
|
-
fill_color:
|
|
1229
|
-
is_dashed:
|
|
1230
|
-
subcircuit_id:
|
|
1242
|
+
color: z76.string().default("#000000"),
|
|
1243
|
+
is_filled: z76.boolean().default(false),
|
|
1244
|
+
fill_color: z76.string().optional(),
|
|
1245
|
+
is_dashed: z76.boolean().default(false),
|
|
1246
|
+
subcircuit_id: z76.string().optional()
|
|
1231
1247
|
}).describe("Draws a styled circle on the schematic");
|
|
1232
1248
|
expectTypesMatch(true);
|
|
1233
1249
|
|
|
1234
1250
|
// src/schematic/schematic_arc.ts
|
|
1235
|
-
import { z as
|
|
1236
|
-
var schematic_arc =
|
|
1237
|
-
type:
|
|
1251
|
+
import { z as z77 } from "zod";
|
|
1252
|
+
var schematic_arc = z77.object({
|
|
1253
|
+
type: z77.literal("schematic_arc"),
|
|
1238
1254
|
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
1239
|
-
schematic_sheet_id:
|
|
1240
|
-
schematic_component_id:
|
|
1241
|
-
schematic_symbol_id:
|
|
1255
|
+
schematic_sheet_id: z77.string().optional(),
|
|
1256
|
+
schematic_component_id: z77.string().optional(),
|
|
1257
|
+
schematic_symbol_id: z77.string().optional(),
|
|
1242
1258
|
center: point,
|
|
1243
1259
|
radius: distance,
|
|
1244
1260
|
start_angle_degrees: rotation,
|
|
1245
1261
|
end_angle_degrees: rotation,
|
|
1246
|
-
direction:
|
|
1262
|
+
direction: z77.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
1247
1263
|
stroke_width: distance.nullable().optional(),
|
|
1248
|
-
color:
|
|
1249
|
-
is_dashed:
|
|
1250
|
-
subcircuit_id:
|
|
1264
|
+
color: z77.string().default("#000000"),
|
|
1265
|
+
is_dashed: z77.boolean().default(false),
|
|
1266
|
+
subcircuit_id: z77.string().optional()
|
|
1251
1267
|
}).describe("Draws a styled arc on the schematic");
|
|
1252
1268
|
expectTypesMatch(true);
|
|
1253
1269
|
|
|
1254
1270
|
// src/schematic/schematic_trace.ts
|
|
1255
|
-
import { z as
|
|
1256
|
-
var schematic_trace =
|
|
1257
|
-
type:
|
|
1258
|
-
schematic_trace_id:
|
|
1259
|
-
schematic_sheet_id:
|
|
1260
|
-
source_trace_id:
|
|
1261
|
-
junctions:
|
|
1262
|
-
|
|
1263
|
-
x:
|
|
1264
|
-
y:
|
|
1271
|
+
import { z as z78 } from "zod";
|
|
1272
|
+
var schematic_trace = z78.object({
|
|
1273
|
+
type: z78.literal("schematic_trace"),
|
|
1274
|
+
schematic_trace_id: z78.string(),
|
|
1275
|
+
schematic_sheet_id: z78.string().optional(),
|
|
1276
|
+
source_trace_id: z78.string().optional(),
|
|
1277
|
+
junctions: z78.array(
|
|
1278
|
+
z78.object({
|
|
1279
|
+
x: z78.number(),
|
|
1280
|
+
y: z78.number()
|
|
1265
1281
|
})
|
|
1266
1282
|
),
|
|
1267
|
-
edges:
|
|
1268
|
-
|
|
1269
|
-
from:
|
|
1270
|
-
x:
|
|
1271
|
-
y:
|
|
1283
|
+
edges: z78.array(
|
|
1284
|
+
z78.object({
|
|
1285
|
+
from: z78.object({
|
|
1286
|
+
x: z78.number(),
|
|
1287
|
+
y: z78.number()
|
|
1272
1288
|
}),
|
|
1273
|
-
to:
|
|
1274
|
-
x:
|
|
1275
|
-
y:
|
|
1289
|
+
to: z78.object({
|
|
1290
|
+
x: z78.number(),
|
|
1291
|
+
y: z78.number()
|
|
1276
1292
|
}),
|
|
1277
|
-
is_crossing:
|
|
1278
|
-
from_schematic_port_id:
|
|
1279
|
-
to_schematic_port_id:
|
|
1293
|
+
is_crossing: z78.boolean().optional(),
|
|
1294
|
+
from_schematic_port_id: z78.string().optional(),
|
|
1295
|
+
to_schematic_port_id: z78.string().optional()
|
|
1280
1296
|
})
|
|
1281
1297
|
),
|
|
1282
|
-
subcircuit_id:
|
|
1298
|
+
subcircuit_id: z78.string().optional(),
|
|
1283
1299
|
// TODO: make required in a future release
|
|
1284
|
-
subcircuit_connectivity_map_key:
|
|
1300
|
+
subcircuit_connectivity_map_key: z78.string().optional()
|
|
1285
1301
|
});
|
|
1286
1302
|
expectTypesMatch(true);
|
|
1287
1303
|
|
|
1288
1304
|
// src/schematic/schematic_text.ts
|
|
1289
|
-
import { z as
|
|
1305
|
+
import { z as z80 } from "zod";
|
|
1290
1306
|
|
|
1291
1307
|
// src/common/FivePointAnchor.ts
|
|
1292
|
-
import { z as
|
|
1293
|
-
var fivePointAnchor =
|
|
1308
|
+
import { z as z79 } from "zod";
|
|
1309
|
+
var fivePointAnchor = z79.enum([
|
|
1294
1310
|
"center",
|
|
1295
1311
|
"left",
|
|
1296
1312
|
"right",
|
|
@@ -1300,114 +1316,114 @@ var fivePointAnchor = z78.enum([
|
|
|
1300
1316
|
expectTypesMatch(true);
|
|
1301
1317
|
|
|
1302
1318
|
// src/schematic/schematic_text.ts
|
|
1303
|
-
var schematic_text =
|
|
1304
|
-
type:
|
|
1305
|
-
schematic_sheet_id:
|
|
1306
|
-
schematic_component_id:
|
|
1307
|
-
schematic_symbol_id:
|
|
1308
|
-
schematic_text_id:
|
|
1309
|
-
text:
|
|
1310
|
-
font_size:
|
|
1311
|
-
position:
|
|
1319
|
+
var schematic_text = z80.object({
|
|
1320
|
+
type: z80.literal("schematic_text"),
|
|
1321
|
+
schematic_sheet_id: z80.string().optional(),
|
|
1322
|
+
schematic_component_id: z80.string().optional(),
|
|
1323
|
+
schematic_symbol_id: z80.string().optional(),
|
|
1324
|
+
schematic_text_id: z80.string(),
|
|
1325
|
+
text: z80.string(),
|
|
1326
|
+
font_size: z80.number().default(0.18),
|
|
1327
|
+
position: z80.object({
|
|
1312
1328
|
x: distance,
|
|
1313
1329
|
y: distance
|
|
1314
1330
|
}),
|
|
1315
|
-
rotation:
|
|
1316
|
-
anchor:
|
|
1317
|
-
color:
|
|
1318
|
-
subcircuit_id:
|
|
1331
|
+
rotation: z80.number().default(0),
|
|
1332
|
+
anchor: z80.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
1333
|
+
color: z80.string().default("#000000"),
|
|
1334
|
+
subcircuit_id: z80.string().optional()
|
|
1319
1335
|
});
|
|
1320
1336
|
expectTypesMatch(true);
|
|
1321
1337
|
|
|
1322
1338
|
// src/schematic/schematic_port.ts
|
|
1323
|
-
import { z as
|
|
1324
|
-
var schematic_port =
|
|
1325
|
-
type:
|
|
1326
|
-
schematic_port_id:
|
|
1327
|
-
source_port_id:
|
|
1328
|
-
schematic_sheet_id:
|
|
1329
|
-
schematic_component_id:
|
|
1339
|
+
import { z as z81 } from "zod";
|
|
1340
|
+
var schematic_port = z81.object({
|
|
1341
|
+
type: z81.literal("schematic_port"),
|
|
1342
|
+
schematic_port_id: z81.string(),
|
|
1343
|
+
source_port_id: z81.string(),
|
|
1344
|
+
schematic_sheet_id: z81.string().optional(),
|
|
1345
|
+
schematic_component_id: z81.string().optional(),
|
|
1330
1346
|
center: point,
|
|
1331
|
-
facing_direction:
|
|
1332
|
-
distance_from_component_edge:
|
|
1333
|
-
side_of_component:
|
|
1334
|
-
true_ccw_index:
|
|
1335
|
-
pin_number:
|
|
1336
|
-
display_pin_label:
|
|
1337
|
-
subcircuit_id:
|
|
1338
|
-
is_connected:
|
|
1339
|
-
has_input_arrow:
|
|
1340
|
-
has_output_arrow:
|
|
1341
|
-
is_drawn_with_inversion_circle:
|
|
1347
|
+
facing_direction: z81.enum(["up", "down", "left", "right"]).optional(),
|
|
1348
|
+
distance_from_component_edge: z81.number().optional(),
|
|
1349
|
+
side_of_component: z81.enum(["top", "bottom", "left", "right"]).optional(),
|
|
1350
|
+
true_ccw_index: z81.number().optional(),
|
|
1351
|
+
pin_number: z81.number().optional(),
|
|
1352
|
+
display_pin_label: z81.string().optional(),
|
|
1353
|
+
subcircuit_id: z81.string().optional(),
|
|
1354
|
+
is_connected: z81.boolean().optional(),
|
|
1355
|
+
has_input_arrow: z81.boolean().optional(),
|
|
1356
|
+
has_output_arrow: z81.boolean().optional(),
|
|
1357
|
+
is_drawn_with_inversion_circle: z81.boolean().optional()
|
|
1342
1358
|
}).describe("Defines a port on a schematic component");
|
|
1343
1359
|
expectTypesMatch(true);
|
|
1344
1360
|
|
|
1345
1361
|
// src/schematic/schematic_net_label.ts
|
|
1346
|
-
import { z as
|
|
1347
|
-
var schematic_net_label =
|
|
1348
|
-
type:
|
|
1362
|
+
import { z as z82 } from "zod";
|
|
1363
|
+
var schematic_net_label = z82.object({
|
|
1364
|
+
type: z82.literal("schematic_net_label"),
|
|
1349
1365
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
1350
|
-
schematic_sheet_id:
|
|
1351
|
-
schematic_trace_id:
|
|
1352
|
-
source_trace_id:
|
|
1353
|
-
source_net_id:
|
|
1366
|
+
schematic_sheet_id: z82.string().optional(),
|
|
1367
|
+
schematic_trace_id: z82.string().optional(),
|
|
1368
|
+
source_trace_id: z82.string().optional(),
|
|
1369
|
+
source_net_id: z82.string(),
|
|
1354
1370
|
center: point,
|
|
1355
1371
|
anchor_position: point.optional(),
|
|
1356
|
-
anchor_side:
|
|
1357
|
-
text:
|
|
1358
|
-
symbol_name:
|
|
1359
|
-
is_movable:
|
|
1360
|
-
subcircuit_id:
|
|
1372
|
+
anchor_side: z82.enum(["top", "bottom", "left", "right"]),
|
|
1373
|
+
text: z82.string(),
|
|
1374
|
+
symbol_name: z82.string().optional(),
|
|
1375
|
+
is_movable: z82.boolean().optional(),
|
|
1376
|
+
subcircuit_id: z82.string().optional()
|
|
1361
1377
|
});
|
|
1362
1378
|
expectTypesMatch(true);
|
|
1363
1379
|
|
|
1364
1380
|
// src/schematic/schematic_error.ts
|
|
1365
|
-
import { z as
|
|
1381
|
+
import { z as z83 } from "zod";
|
|
1366
1382
|
var schematic_error = base_circuit_json_error.extend({
|
|
1367
|
-
type:
|
|
1368
|
-
schematic_error_id:
|
|
1383
|
+
type: z83.literal("schematic_error"),
|
|
1384
|
+
schematic_error_id: z83.string(),
|
|
1369
1385
|
// eventually each error type should be broken out into a dir of files
|
|
1370
|
-
error_type:
|
|
1371
|
-
subcircuit_id:
|
|
1386
|
+
error_type: z83.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
1387
|
+
subcircuit_id: z83.string().optional()
|
|
1372
1388
|
}).describe("Defines a schematic error on the schematic");
|
|
1373
1389
|
expectTypesMatch(true);
|
|
1374
1390
|
|
|
1375
1391
|
// src/schematic/schematic_layout_error.ts
|
|
1376
|
-
import { z as
|
|
1392
|
+
import { z as z84 } from "zod";
|
|
1377
1393
|
var schematic_layout_error = base_circuit_json_error.extend({
|
|
1378
|
-
type:
|
|
1394
|
+
type: z84.literal("schematic_layout_error"),
|
|
1379
1395
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
1380
1396
|
"schematic_layout_error"
|
|
1381
1397
|
),
|
|
1382
|
-
error_type:
|
|
1383
|
-
source_group_id:
|
|
1384
|
-
schematic_group_id:
|
|
1385
|
-
subcircuit_id:
|
|
1398
|
+
error_type: z84.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
1399
|
+
source_group_id: z84.string(),
|
|
1400
|
+
schematic_group_id: z84.string(),
|
|
1401
|
+
subcircuit_id: z84.string().optional()
|
|
1386
1402
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
1387
1403
|
expectTypesMatch(true);
|
|
1388
1404
|
|
|
1389
1405
|
// src/schematic/schematic_debug_object.ts
|
|
1390
|
-
import { z as
|
|
1391
|
-
var schematic_debug_object_base =
|
|
1392
|
-
type:
|
|
1393
|
-
label:
|
|
1394
|
-
subcircuit_id:
|
|
1406
|
+
import { z as z85 } from "zod";
|
|
1407
|
+
var schematic_debug_object_base = z85.object({
|
|
1408
|
+
type: z85.literal("schematic_debug_object"),
|
|
1409
|
+
label: z85.string().optional(),
|
|
1410
|
+
subcircuit_id: z85.string().optional()
|
|
1395
1411
|
});
|
|
1396
1412
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
1397
|
-
shape:
|
|
1413
|
+
shape: z85.literal("rect"),
|
|
1398
1414
|
center: point,
|
|
1399
1415
|
size
|
|
1400
1416
|
});
|
|
1401
1417
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
1402
|
-
shape:
|
|
1418
|
+
shape: z85.literal("line"),
|
|
1403
1419
|
start: point,
|
|
1404
1420
|
end: point
|
|
1405
1421
|
});
|
|
1406
1422
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
1407
|
-
shape:
|
|
1423
|
+
shape: z85.literal("point"),
|
|
1408
1424
|
center: point
|
|
1409
1425
|
});
|
|
1410
|
-
var schematic_debug_object =
|
|
1426
|
+
var schematic_debug_object = z85.discriminatedUnion("shape", [
|
|
1411
1427
|
schematic_debug_rect,
|
|
1412
1428
|
schematic_debug_line,
|
|
1413
1429
|
schematic_debug_point
|
|
@@ -1415,157 +1431,158 @@ var schematic_debug_object = z84.discriminatedUnion("shape", [
|
|
|
1415
1431
|
expectTypesMatch(true);
|
|
1416
1432
|
|
|
1417
1433
|
// src/schematic/schematic_voltage_probe.ts
|
|
1418
|
-
import { z as
|
|
1419
|
-
var schematic_voltage_probe =
|
|
1420
|
-
type:
|
|
1421
|
-
schematic_voltage_probe_id:
|
|
1422
|
-
schematic_sheet_id:
|
|
1423
|
-
source_component_id:
|
|
1424
|
-
name:
|
|
1434
|
+
import { z as z86 } from "zod";
|
|
1435
|
+
var schematic_voltage_probe = z86.object({
|
|
1436
|
+
type: z86.literal("schematic_voltage_probe"),
|
|
1437
|
+
schematic_voltage_probe_id: z86.string(),
|
|
1438
|
+
schematic_sheet_id: z86.string().optional(),
|
|
1439
|
+
source_component_id: z86.string().optional(),
|
|
1440
|
+
name: z86.string().optional(),
|
|
1425
1441
|
position: point,
|
|
1426
|
-
schematic_trace_id:
|
|
1442
|
+
schematic_trace_id: z86.string(),
|
|
1427
1443
|
voltage: voltage.optional(),
|
|
1428
|
-
subcircuit_id:
|
|
1429
|
-
color:
|
|
1444
|
+
subcircuit_id: z86.string().optional(),
|
|
1445
|
+
color: z86.string().optional(),
|
|
1430
1446
|
label_alignment: ninePointAnchor.optional()
|
|
1431
1447
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
1432
1448
|
expectTypesMatch(true);
|
|
1433
1449
|
|
|
1434
1450
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
1435
|
-
import { z as
|
|
1436
|
-
var schematic_manual_edit_conflict_warning =
|
|
1437
|
-
type:
|
|
1451
|
+
import { z as z87 } from "zod";
|
|
1452
|
+
var schematic_manual_edit_conflict_warning = z87.object({
|
|
1453
|
+
type: z87.literal("schematic_manual_edit_conflict_warning"),
|
|
1438
1454
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1439
1455
|
"schematic_manual_edit_conflict_warning"
|
|
1440
1456
|
),
|
|
1441
|
-
warning_type:
|
|
1442
|
-
message:
|
|
1443
|
-
schematic_component_id:
|
|
1444
|
-
schematic_group_id:
|
|
1445
|
-
subcircuit_id:
|
|
1446
|
-
source_component_id:
|
|
1457
|
+
warning_type: z87.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
1458
|
+
message: z87.string(),
|
|
1459
|
+
schematic_component_id: z87.string(),
|
|
1460
|
+
schematic_group_id: z87.string().optional(),
|
|
1461
|
+
subcircuit_id: z87.string().optional(),
|
|
1462
|
+
source_component_id: z87.string()
|
|
1447
1463
|
}).describe(
|
|
1448
1464
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
1449
1465
|
);
|
|
1450
1466
|
expectTypesMatch(true);
|
|
1451
1467
|
|
|
1452
1468
|
// src/schematic/schematic_group.ts
|
|
1453
|
-
import { z as
|
|
1454
|
-
var schematic_group =
|
|
1455
|
-
type:
|
|
1469
|
+
import { z as z88 } from "zod";
|
|
1470
|
+
var schematic_group = z88.object({
|
|
1471
|
+
type: z88.literal("schematic_group"),
|
|
1456
1472
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1457
|
-
schematic_sheet_id:
|
|
1458
|
-
source_group_id:
|
|
1459
|
-
is_subcircuit:
|
|
1460
|
-
subcircuit_id:
|
|
1473
|
+
schematic_sheet_id: z88.string().optional(),
|
|
1474
|
+
source_group_id: z88.string(),
|
|
1475
|
+
is_subcircuit: z88.boolean().optional(),
|
|
1476
|
+
subcircuit_id: z88.string().optional(),
|
|
1461
1477
|
width: length,
|
|
1462
1478
|
height: length,
|
|
1463
1479
|
center: point,
|
|
1464
|
-
schematic_component_ids:
|
|
1465
|
-
show_as_schematic_box:
|
|
1466
|
-
name:
|
|
1467
|
-
description:
|
|
1480
|
+
schematic_component_ids: z88.array(z88.string()),
|
|
1481
|
+
show_as_schematic_box: z88.boolean().optional(),
|
|
1482
|
+
name: z88.string().optional(),
|
|
1483
|
+
description: z88.string().optional()
|
|
1468
1484
|
}).describe("Defines a group of components on the schematic");
|
|
1469
1485
|
expectTypesMatch(true);
|
|
1470
1486
|
|
|
1471
1487
|
// src/schematic/schematic_table.ts
|
|
1472
|
-
import { z as
|
|
1473
|
-
var schematic_table =
|
|
1474
|
-
type:
|
|
1488
|
+
import { z as z89 } from "zod";
|
|
1489
|
+
var schematic_table = z89.object({
|
|
1490
|
+
type: z89.literal("schematic_table"),
|
|
1475
1491
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1476
|
-
schematic_sheet_id:
|
|
1492
|
+
schematic_sheet_id: z89.string().optional(),
|
|
1477
1493
|
anchor_position: point,
|
|
1478
|
-
column_widths:
|
|
1479
|
-
row_heights:
|
|
1494
|
+
column_widths: z89.array(distance),
|
|
1495
|
+
row_heights: z89.array(distance),
|
|
1480
1496
|
cell_padding: distance.optional(),
|
|
1481
1497
|
border_width: distance.optional(),
|
|
1482
|
-
subcircuit_id:
|
|
1483
|
-
schematic_component_id:
|
|
1498
|
+
subcircuit_id: z89.string().optional(),
|
|
1499
|
+
schematic_component_id: z89.string().optional(),
|
|
1484
1500
|
anchor: ninePointAnchor.optional()
|
|
1485
1501
|
}).describe("Defines a table on the schematic");
|
|
1486
1502
|
expectTypesMatch(true);
|
|
1487
1503
|
|
|
1488
1504
|
// src/schematic/schematic_table_cell.ts
|
|
1489
|
-
import { z as
|
|
1490
|
-
var schematic_table_cell =
|
|
1491
|
-
type:
|
|
1505
|
+
import { z as z90 } from "zod";
|
|
1506
|
+
var schematic_table_cell = z90.object({
|
|
1507
|
+
type: z90.literal("schematic_table_cell"),
|
|
1492
1508
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1493
1509
|
"schematic_table_cell"
|
|
1494
1510
|
),
|
|
1495
|
-
schematic_sheet_id:
|
|
1496
|
-
schematic_table_id:
|
|
1497
|
-
start_row_index:
|
|
1498
|
-
end_row_index:
|
|
1499
|
-
start_column_index:
|
|
1500
|
-
end_column_index:
|
|
1501
|
-
text:
|
|
1511
|
+
schematic_sheet_id: z90.string().optional(),
|
|
1512
|
+
schematic_table_id: z90.string(),
|
|
1513
|
+
start_row_index: z90.number(),
|
|
1514
|
+
end_row_index: z90.number(),
|
|
1515
|
+
start_column_index: z90.number(),
|
|
1516
|
+
end_column_index: z90.number(),
|
|
1517
|
+
text: z90.string().optional(),
|
|
1502
1518
|
center: point,
|
|
1503
1519
|
width: distance,
|
|
1504
1520
|
height: distance,
|
|
1505
|
-
horizontal_align:
|
|
1506
|
-
vertical_align:
|
|
1521
|
+
horizontal_align: z90.enum(["left", "center", "right"]).optional(),
|
|
1522
|
+
vertical_align: z90.enum(["top", "middle", "bottom"]).optional(),
|
|
1507
1523
|
font_size: distance.optional(),
|
|
1508
|
-
subcircuit_id:
|
|
1524
|
+
subcircuit_id: z90.string().optional()
|
|
1509
1525
|
}).describe("Defines a cell within a schematic_table");
|
|
1510
1526
|
expectTypesMatch(true);
|
|
1511
1527
|
|
|
1512
1528
|
// src/schematic/schematic_sheet.ts
|
|
1513
|
-
import { z as
|
|
1514
|
-
var schematic_sheet =
|
|
1515
|
-
type:
|
|
1529
|
+
import { z as z91 } from "zod";
|
|
1530
|
+
var schematic_sheet = z91.object({
|
|
1531
|
+
type: z91.literal("schematic_sheet"),
|
|
1516
1532
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1517
|
-
name:
|
|
1518
|
-
|
|
1519
|
-
|
|
1533
|
+
name: z91.string().optional(),
|
|
1534
|
+
sheet_index: z91.number().optional(),
|
|
1535
|
+
subcircuit_id: z91.string().optional(),
|
|
1536
|
+
outline_color: z91.string().optional()
|
|
1520
1537
|
}).describe(
|
|
1521
1538
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1522
1539
|
);
|
|
1523
1540
|
expectTypesMatch(true);
|
|
1524
1541
|
|
|
1525
1542
|
// src/pcb/properties/brep.ts
|
|
1526
|
-
import { z as
|
|
1527
|
-
var point_with_bulge =
|
|
1543
|
+
import { z as z92 } from "zod";
|
|
1544
|
+
var point_with_bulge = z92.object({
|
|
1528
1545
|
x: distance,
|
|
1529
1546
|
y: distance,
|
|
1530
|
-
bulge:
|
|
1547
|
+
bulge: z92.number().optional()
|
|
1531
1548
|
});
|
|
1532
1549
|
expectTypesMatch(true);
|
|
1533
|
-
var ring =
|
|
1534
|
-
vertices:
|
|
1550
|
+
var ring = z92.object({
|
|
1551
|
+
vertices: z92.array(point_with_bulge)
|
|
1535
1552
|
});
|
|
1536
1553
|
expectTypesMatch(true);
|
|
1537
|
-
var brep_shape =
|
|
1554
|
+
var brep_shape = z92.object({
|
|
1538
1555
|
outer_ring: ring,
|
|
1539
|
-
inner_rings:
|
|
1556
|
+
inner_rings: z92.array(ring).default([])
|
|
1540
1557
|
});
|
|
1541
1558
|
expectTypesMatch(true);
|
|
1542
1559
|
|
|
1543
1560
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1544
|
-
import { z as
|
|
1545
|
-
var pcb_route_hint =
|
|
1561
|
+
import { z as z93 } from "zod";
|
|
1562
|
+
var pcb_route_hint = z93.object({
|
|
1546
1563
|
x: distance,
|
|
1547
1564
|
y: distance,
|
|
1548
|
-
via:
|
|
1565
|
+
via: z93.boolean().optional(),
|
|
1549
1566
|
via_to_layer: layer_ref.optional()
|
|
1550
1567
|
});
|
|
1551
|
-
var pcb_route_hints =
|
|
1568
|
+
var pcb_route_hints = z93.array(pcb_route_hint);
|
|
1552
1569
|
expectTypesMatch(true);
|
|
1553
1570
|
expectTypesMatch(true);
|
|
1554
1571
|
|
|
1555
1572
|
// src/pcb/properties/route_hint_point.ts
|
|
1556
|
-
import { z as
|
|
1557
|
-
var route_hint_point =
|
|
1573
|
+
import { z as z94 } from "zod";
|
|
1574
|
+
var route_hint_point = z94.object({
|
|
1558
1575
|
x: distance,
|
|
1559
1576
|
y: distance,
|
|
1560
|
-
via:
|
|
1577
|
+
via: z94.boolean().optional(),
|
|
1561
1578
|
to_layer: layer_ref.optional(),
|
|
1562
1579
|
trace_width: distance.optional()
|
|
1563
1580
|
});
|
|
1564
1581
|
expectTypesMatch(true);
|
|
1565
1582
|
|
|
1566
1583
|
// src/pcb/properties/manufacturing_drc_properties.ts
|
|
1567
|
-
import { z as
|
|
1568
|
-
var manufacturing_drc_properties =
|
|
1584
|
+
import { z as z95 } from "zod";
|
|
1585
|
+
var manufacturing_drc_properties = z95.object({
|
|
1569
1586
|
min_trace_width: length.optional(),
|
|
1570
1587
|
min_board_edge_clearance: length.optional(),
|
|
1571
1588
|
min_via_hole_edge_to_via_hole_edge_clearance: length.optional(),
|
|
@@ -1580,27 +1597,27 @@ var manufacturing_drc_properties = z94.object({
|
|
|
1580
1597
|
});
|
|
1581
1598
|
|
|
1582
1599
|
// src/pcb/pcb_component.ts
|
|
1583
|
-
import { z as
|
|
1584
|
-
var pcb_component =
|
|
1585
|
-
type:
|
|
1600
|
+
import { z as z96 } from "zod";
|
|
1601
|
+
var pcb_component = z96.object({
|
|
1602
|
+
type: z96.literal("pcb_component"),
|
|
1586
1603
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1587
|
-
source_component_id:
|
|
1604
|
+
source_component_id: z96.string(),
|
|
1588
1605
|
center: point,
|
|
1589
1606
|
layer: layer_ref,
|
|
1590
1607
|
rotation,
|
|
1591
|
-
display_offset_x:
|
|
1608
|
+
display_offset_x: z96.string().optional().describe(
|
|
1592
1609
|
"How to display the x offset for this part, usually corresponding with how the user specified it"
|
|
1593
1610
|
),
|
|
1594
|
-
display_offset_y:
|
|
1611
|
+
display_offset_y: z96.string().optional().describe(
|
|
1595
1612
|
"How to display the y offset for this part, usually corresponding with how the user specified it"
|
|
1596
1613
|
),
|
|
1597
1614
|
width: length,
|
|
1598
1615
|
height: length,
|
|
1599
|
-
do_not_place:
|
|
1600
|
-
is_allowed_to_be_off_board:
|
|
1601
|
-
subcircuit_id:
|
|
1602
|
-
pcb_group_id:
|
|
1603
|
-
position_mode:
|
|
1616
|
+
do_not_place: z96.boolean().optional(),
|
|
1617
|
+
is_allowed_to_be_off_board: z96.boolean().optional(),
|
|
1618
|
+
subcircuit_id: z96.string().optional(),
|
|
1619
|
+
pcb_group_id: z96.string().optional(),
|
|
1620
|
+
position_mode: z96.enum([
|
|
1604
1621
|
"packed",
|
|
1605
1622
|
"relative_to_group_anchor",
|
|
1606
1623
|
"relative_to_another_component",
|
|
@@ -1608,129 +1625,129 @@ var pcb_component = z95.object({
|
|
|
1608
1625
|
]).optional(),
|
|
1609
1626
|
anchor_position: point.optional(),
|
|
1610
1627
|
anchor_alignment: ninePointAnchor.optional(),
|
|
1611
|
-
positioned_relative_to_pcb_group_id:
|
|
1612
|
-
positioned_relative_to_pcb_board_id:
|
|
1628
|
+
positioned_relative_to_pcb_group_id: z96.string().optional(),
|
|
1629
|
+
positioned_relative_to_pcb_board_id: z96.string().optional(),
|
|
1613
1630
|
cable_insertion_center: point.optional(),
|
|
1614
|
-
insertion_direction:
|
|
1631
|
+
insertion_direction: z96.enum([
|
|
1615
1632
|
"from_above",
|
|
1616
1633
|
"from_left",
|
|
1617
1634
|
"from_right",
|
|
1618
1635
|
"from_front",
|
|
1619
1636
|
"from_back"
|
|
1620
1637
|
]).optional(),
|
|
1621
|
-
metadata:
|
|
1638
|
+
metadata: z96.object({
|
|
1622
1639
|
kicad_footprint: kicadFootprintMetadata.optional()
|
|
1623
1640
|
}).optional(),
|
|
1624
|
-
obstructs_within_bounds:
|
|
1641
|
+
obstructs_within_bounds: z96.boolean().default(true).describe(
|
|
1625
1642
|
"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath"
|
|
1626
1643
|
)
|
|
1627
1644
|
}).describe("Defines a component on the PCB");
|
|
1628
1645
|
expectTypesMatch(true);
|
|
1629
1646
|
|
|
1630
1647
|
// src/pcb/pcb_hole.ts
|
|
1631
|
-
import { z as
|
|
1632
|
-
var pcb_hole_circle =
|
|
1633
|
-
type:
|
|
1648
|
+
import { z as z97 } from "zod";
|
|
1649
|
+
var pcb_hole_circle = z97.object({
|
|
1650
|
+
type: z97.literal("pcb_hole"),
|
|
1634
1651
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1635
|
-
pcb_group_id:
|
|
1636
|
-
subcircuit_id:
|
|
1637
|
-
pcb_component_id:
|
|
1638
|
-
hole_shape:
|
|
1639
|
-
hole_diameter:
|
|
1652
|
+
pcb_group_id: z97.string().optional(),
|
|
1653
|
+
subcircuit_id: z97.string().optional(),
|
|
1654
|
+
pcb_component_id: z97.string().optional(),
|
|
1655
|
+
hole_shape: z97.literal("circle"),
|
|
1656
|
+
hole_diameter: z97.number(),
|
|
1640
1657
|
x: distance,
|
|
1641
1658
|
y: distance,
|
|
1642
|
-
is_covered_with_solder_mask:
|
|
1643
|
-
soldermask_margin:
|
|
1659
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1660
|
+
soldermask_margin: z97.number().optional()
|
|
1644
1661
|
});
|
|
1645
1662
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1646
1663
|
"Defines a circular hole on the PCB"
|
|
1647
1664
|
);
|
|
1648
1665
|
expectTypesMatch(true);
|
|
1649
|
-
var pcb_hole_rect =
|
|
1650
|
-
type:
|
|
1666
|
+
var pcb_hole_rect = z97.object({
|
|
1667
|
+
type: z97.literal("pcb_hole"),
|
|
1651
1668
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1652
|
-
pcb_group_id:
|
|
1653
|
-
subcircuit_id:
|
|
1654
|
-
pcb_component_id:
|
|
1655
|
-
hole_shape:
|
|
1656
|
-
hole_width:
|
|
1657
|
-
hole_height:
|
|
1669
|
+
pcb_group_id: z97.string().optional(),
|
|
1670
|
+
subcircuit_id: z97.string().optional(),
|
|
1671
|
+
pcb_component_id: z97.string().optional(),
|
|
1672
|
+
hole_shape: z97.literal("rect"),
|
|
1673
|
+
hole_width: z97.number(),
|
|
1674
|
+
hole_height: z97.number(),
|
|
1658
1675
|
x: distance,
|
|
1659
1676
|
y: distance,
|
|
1660
|
-
is_covered_with_solder_mask:
|
|
1661
|
-
soldermask_margin:
|
|
1677
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1678
|
+
soldermask_margin: z97.number().optional()
|
|
1662
1679
|
});
|
|
1663
1680
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1664
1681
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1665
1682
|
);
|
|
1666
1683
|
expectTypesMatch(true);
|
|
1667
|
-
var pcb_hole_circle_or_square =
|
|
1668
|
-
type:
|
|
1684
|
+
var pcb_hole_circle_or_square = z97.object({
|
|
1685
|
+
type: z97.literal("pcb_hole"),
|
|
1669
1686
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1670
|
-
pcb_group_id:
|
|
1671
|
-
subcircuit_id:
|
|
1672
|
-
pcb_component_id:
|
|
1673
|
-
hole_shape:
|
|
1674
|
-
hole_diameter:
|
|
1687
|
+
pcb_group_id: z97.string().optional(),
|
|
1688
|
+
subcircuit_id: z97.string().optional(),
|
|
1689
|
+
pcb_component_id: z97.string().optional(),
|
|
1690
|
+
hole_shape: z97.enum(["circle", "square"]),
|
|
1691
|
+
hole_diameter: z97.number(),
|
|
1675
1692
|
x: distance,
|
|
1676
1693
|
y: distance,
|
|
1677
|
-
is_covered_with_solder_mask:
|
|
1678
|
-
soldermask_margin:
|
|
1694
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1695
|
+
soldermask_margin: z97.number().optional()
|
|
1679
1696
|
});
|
|
1680
1697
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1681
1698
|
"Defines a circular or square hole on the PCB"
|
|
1682
1699
|
);
|
|
1683
1700
|
expectTypesMatch(true);
|
|
1684
|
-
var pcb_hole_oval =
|
|
1685
|
-
type:
|
|
1701
|
+
var pcb_hole_oval = z97.object({
|
|
1702
|
+
type: z97.literal("pcb_hole"),
|
|
1686
1703
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1687
|
-
pcb_group_id:
|
|
1688
|
-
subcircuit_id:
|
|
1689
|
-
pcb_component_id:
|
|
1690
|
-
hole_shape:
|
|
1691
|
-
hole_width:
|
|
1692
|
-
hole_height:
|
|
1704
|
+
pcb_group_id: z97.string().optional(),
|
|
1705
|
+
subcircuit_id: z97.string().optional(),
|
|
1706
|
+
pcb_component_id: z97.string().optional(),
|
|
1707
|
+
hole_shape: z97.literal("oval"),
|
|
1708
|
+
hole_width: z97.number(),
|
|
1709
|
+
hole_height: z97.number(),
|
|
1693
1710
|
x: distance,
|
|
1694
1711
|
y: distance,
|
|
1695
|
-
is_covered_with_solder_mask:
|
|
1696
|
-
soldermask_margin:
|
|
1712
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1713
|
+
soldermask_margin: z97.number().optional()
|
|
1697
1714
|
});
|
|
1698
1715
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1699
1716
|
"Defines an oval hole on the PCB"
|
|
1700
1717
|
);
|
|
1701
1718
|
expectTypesMatch(true);
|
|
1702
|
-
var pcb_hole_pill =
|
|
1703
|
-
type:
|
|
1719
|
+
var pcb_hole_pill = z97.object({
|
|
1720
|
+
type: z97.literal("pcb_hole"),
|
|
1704
1721
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1705
|
-
pcb_group_id:
|
|
1706
|
-
subcircuit_id:
|
|
1707
|
-
pcb_component_id:
|
|
1708
|
-
hole_shape:
|
|
1709
|
-
hole_width:
|
|
1710
|
-
hole_height:
|
|
1722
|
+
pcb_group_id: z97.string().optional(),
|
|
1723
|
+
subcircuit_id: z97.string().optional(),
|
|
1724
|
+
pcb_component_id: z97.string().optional(),
|
|
1725
|
+
hole_shape: z97.literal("pill"),
|
|
1726
|
+
hole_width: z97.number(),
|
|
1727
|
+
hole_height: z97.number(),
|
|
1711
1728
|
x: distance,
|
|
1712
1729
|
y: distance,
|
|
1713
|
-
is_covered_with_solder_mask:
|
|
1714
|
-
soldermask_margin:
|
|
1730
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1731
|
+
soldermask_margin: z97.number().optional()
|
|
1715
1732
|
});
|
|
1716
1733
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
1717
1734
|
"Defines a pill-shaped hole on the PCB"
|
|
1718
1735
|
);
|
|
1719
1736
|
expectTypesMatch(true);
|
|
1720
|
-
var pcb_hole_rotated_pill =
|
|
1721
|
-
type:
|
|
1737
|
+
var pcb_hole_rotated_pill = z97.object({
|
|
1738
|
+
type: z97.literal("pcb_hole"),
|
|
1722
1739
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1723
|
-
pcb_group_id:
|
|
1724
|
-
subcircuit_id:
|
|
1725
|
-
pcb_component_id:
|
|
1726
|
-
hole_shape:
|
|
1727
|
-
hole_width:
|
|
1728
|
-
hole_height:
|
|
1740
|
+
pcb_group_id: z97.string().optional(),
|
|
1741
|
+
subcircuit_id: z97.string().optional(),
|
|
1742
|
+
pcb_component_id: z97.string().optional(),
|
|
1743
|
+
hole_shape: z97.literal("rotated_pill"),
|
|
1744
|
+
hole_width: z97.number(),
|
|
1745
|
+
hole_height: z97.number(),
|
|
1729
1746
|
x: distance,
|
|
1730
1747
|
y: distance,
|
|
1731
1748
|
ccw_rotation: rotation,
|
|
1732
|
-
is_covered_with_solder_mask:
|
|
1733
|
-
soldermask_margin:
|
|
1749
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1750
|
+
soldermask_margin: z97.number().optional()
|
|
1734
1751
|
});
|
|
1735
1752
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
1736
1753
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -1739,147 +1756,147 @@ expectTypesMatch(true);
|
|
|
1739
1756
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill).or(pcb_hole_circle).or(pcb_hole_rect);
|
|
1740
1757
|
|
|
1741
1758
|
// src/pcb/pcb_plated_hole.ts
|
|
1742
|
-
import { z as
|
|
1743
|
-
var pcb_plated_hole_circle =
|
|
1744
|
-
type:
|
|
1745
|
-
shape:
|
|
1746
|
-
pcb_group_id:
|
|
1747
|
-
subcircuit_id:
|
|
1748
|
-
outer_diameter:
|
|
1749
|
-
hole_diameter:
|
|
1750
|
-
is_covered_with_solder_mask:
|
|
1759
|
+
import { z as z98 } from "zod";
|
|
1760
|
+
var pcb_plated_hole_circle = z98.object({
|
|
1761
|
+
type: z98.literal("pcb_plated_hole"),
|
|
1762
|
+
shape: z98.literal("circle"),
|
|
1763
|
+
pcb_group_id: z98.string().optional(),
|
|
1764
|
+
subcircuit_id: z98.string().optional(),
|
|
1765
|
+
outer_diameter: z98.number(),
|
|
1766
|
+
hole_diameter: z98.number(),
|
|
1767
|
+
is_covered_with_solder_mask: z98.boolean().optional(),
|
|
1751
1768
|
x: distance,
|
|
1752
1769
|
y: distance,
|
|
1753
|
-
layers:
|
|
1754
|
-
port_hints:
|
|
1755
|
-
pcb_component_id:
|
|
1756
|
-
pcb_port_id:
|
|
1770
|
+
layers: z98.array(layer_ref),
|
|
1771
|
+
port_hints: z98.array(z98.string()).optional(),
|
|
1772
|
+
pcb_component_id: z98.string().optional(),
|
|
1773
|
+
pcb_port_id: z98.string().optional(),
|
|
1757
1774
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1758
|
-
soldermask_margin:
|
|
1775
|
+
soldermask_margin: z98.number().optional()
|
|
1759
1776
|
});
|
|
1760
|
-
var pcb_plated_hole_oval =
|
|
1761
|
-
type:
|
|
1762
|
-
shape:
|
|
1763
|
-
pcb_group_id:
|
|
1764
|
-
subcircuit_id:
|
|
1765
|
-
outer_width:
|
|
1766
|
-
outer_height:
|
|
1767
|
-
hole_width:
|
|
1768
|
-
hole_height:
|
|
1769
|
-
is_covered_with_solder_mask:
|
|
1777
|
+
var pcb_plated_hole_oval = z98.object({
|
|
1778
|
+
type: z98.literal("pcb_plated_hole"),
|
|
1779
|
+
shape: z98.enum(["oval", "pill"]),
|
|
1780
|
+
pcb_group_id: z98.string().optional(),
|
|
1781
|
+
subcircuit_id: z98.string().optional(),
|
|
1782
|
+
outer_width: z98.number(),
|
|
1783
|
+
outer_height: z98.number(),
|
|
1784
|
+
hole_width: z98.number(),
|
|
1785
|
+
hole_height: z98.number(),
|
|
1786
|
+
is_covered_with_solder_mask: z98.boolean().optional(),
|
|
1770
1787
|
x: distance,
|
|
1771
1788
|
y: distance,
|
|
1772
1789
|
ccw_rotation: rotation,
|
|
1773
|
-
layers:
|
|
1774
|
-
port_hints:
|
|
1775
|
-
pcb_component_id:
|
|
1776
|
-
pcb_port_id:
|
|
1790
|
+
layers: z98.array(layer_ref),
|
|
1791
|
+
port_hints: z98.array(z98.string()).optional(),
|
|
1792
|
+
pcb_component_id: z98.string().optional(),
|
|
1793
|
+
pcb_port_id: z98.string().optional(),
|
|
1777
1794
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1778
|
-
soldermask_margin:
|
|
1795
|
+
soldermask_margin: z98.number().optional()
|
|
1779
1796
|
});
|
|
1780
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1781
|
-
type:
|
|
1782
|
-
shape:
|
|
1783
|
-
pcb_group_id:
|
|
1784
|
-
subcircuit_id:
|
|
1785
|
-
hole_shape:
|
|
1786
|
-
pad_shape:
|
|
1787
|
-
hole_diameter:
|
|
1788
|
-
rect_pad_width:
|
|
1789
|
-
rect_pad_height:
|
|
1790
|
-
rect_border_radius:
|
|
1797
|
+
var pcb_circular_hole_with_rect_pad = z98.object({
|
|
1798
|
+
type: z98.literal("pcb_plated_hole"),
|
|
1799
|
+
shape: z98.literal("circular_hole_with_rect_pad"),
|
|
1800
|
+
pcb_group_id: z98.string().optional(),
|
|
1801
|
+
subcircuit_id: z98.string().optional(),
|
|
1802
|
+
hole_shape: z98.literal("circle"),
|
|
1803
|
+
pad_shape: z98.literal("rect"),
|
|
1804
|
+
hole_diameter: z98.number(),
|
|
1805
|
+
rect_pad_width: z98.number(),
|
|
1806
|
+
rect_pad_height: z98.number(),
|
|
1807
|
+
rect_border_radius: z98.number().optional(),
|
|
1791
1808
|
hole_offset_x: distance.default(0),
|
|
1792
1809
|
hole_offset_y: distance.default(0),
|
|
1793
|
-
is_covered_with_solder_mask:
|
|
1810
|
+
is_covered_with_solder_mask: z98.boolean().optional(),
|
|
1794
1811
|
x: distance,
|
|
1795
1812
|
y: distance,
|
|
1796
|
-
layers:
|
|
1797
|
-
port_hints:
|
|
1798
|
-
pcb_component_id:
|
|
1799
|
-
pcb_port_id:
|
|
1813
|
+
layers: z98.array(layer_ref),
|
|
1814
|
+
port_hints: z98.array(z98.string()).optional(),
|
|
1815
|
+
pcb_component_id: z98.string().optional(),
|
|
1816
|
+
pcb_port_id: z98.string().optional(),
|
|
1800
1817
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1801
|
-
soldermask_margin:
|
|
1818
|
+
soldermask_margin: z98.number().optional(),
|
|
1802
1819
|
rect_ccw_rotation: rotation.optional()
|
|
1803
1820
|
});
|
|
1804
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1805
|
-
type:
|
|
1806
|
-
shape:
|
|
1807
|
-
pcb_group_id:
|
|
1808
|
-
subcircuit_id:
|
|
1809
|
-
hole_shape:
|
|
1810
|
-
pad_shape:
|
|
1811
|
-
hole_width:
|
|
1812
|
-
hole_height:
|
|
1813
|
-
rect_pad_width:
|
|
1814
|
-
rect_pad_height:
|
|
1815
|
-
rect_border_radius:
|
|
1821
|
+
var pcb_pill_hole_with_rect_pad = z98.object({
|
|
1822
|
+
type: z98.literal("pcb_plated_hole"),
|
|
1823
|
+
shape: z98.literal("pill_hole_with_rect_pad"),
|
|
1824
|
+
pcb_group_id: z98.string().optional(),
|
|
1825
|
+
subcircuit_id: z98.string().optional(),
|
|
1826
|
+
hole_shape: z98.literal("pill"),
|
|
1827
|
+
pad_shape: z98.literal("rect"),
|
|
1828
|
+
hole_width: z98.number(),
|
|
1829
|
+
hole_height: z98.number(),
|
|
1830
|
+
rect_pad_width: z98.number(),
|
|
1831
|
+
rect_pad_height: z98.number(),
|
|
1832
|
+
rect_border_radius: z98.number().optional(),
|
|
1816
1833
|
hole_offset_x: distance.default(0),
|
|
1817
1834
|
hole_offset_y: distance.default(0),
|
|
1818
|
-
is_covered_with_solder_mask:
|
|
1835
|
+
is_covered_with_solder_mask: z98.boolean().optional(),
|
|
1819
1836
|
x: distance,
|
|
1820
1837
|
y: distance,
|
|
1821
|
-
layers:
|
|
1822
|
-
port_hints:
|
|
1823
|
-
pcb_component_id:
|
|
1824
|
-
pcb_port_id:
|
|
1838
|
+
layers: z98.array(layer_ref),
|
|
1839
|
+
port_hints: z98.array(z98.string()).optional(),
|
|
1840
|
+
pcb_component_id: z98.string().optional(),
|
|
1841
|
+
pcb_port_id: z98.string().optional(),
|
|
1825
1842
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1826
|
-
soldermask_margin:
|
|
1843
|
+
soldermask_margin: z98.number().optional()
|
|
1827
1844
|
});
|
|
1828
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1829
|
-
type:
|
|
1830
|
-
shape:
|
|
1831
|
-
pcb_group_id:
|
|
1832
|
-
subcircuit_id:
|
|
1833
|
-
hole_shape:
|
|
1834
|
-
pad_shape:
|
|
1835
|
-
hole_width:
|
|
1836
|
-
hole_height:
|
|
1845
|
+
var pcb_rotated_pill_hole_with_rect_pad = z98.object({
|
|
1846
|
+
type: z98.literal("pcb_plated_hole"),
|
|
1847
|
+
shape: z98.literal("rotated_pill_hole_with_rect_pad"),
|
|
1848
|
+
pcb_group_id: z98.string().optional(),
|
|
1849
|
+
subcircuit_id: z98.string().optional(),
|
|
1850
|
+
hole_shape: z98.literal("rotated_pill"),
|
|
1851
|
+
pad_shape: z98.literal("rect"),
|
|
1852
|
+
hole_width: z98.number(),
|
|
1853
|
+
hole_height: z98.number(),
|
|
1837
1854
|
hole_ccw_rotation: rotation,
|
|
1838
|
-
rect_pad_width:
|
|
1839
|
-
rect_pad_height:
|
|
1840
|
-
rect_border_radius:
|
|
1855
|
+
rect_pad_width: z98.number(),
|
|
1856
|
+
rect_pad_height: z98.number(),
|
|
1857
|
+
rect_border_radius: z98.number().optional(),
|
|
1841
1858
|
rect_ccw_rotation: rotation,
|
|
1842
1859
|
hole_offset_x: distance.default(0),
|
|
1843
1860
|
hole_offset_y: distance.default(0),
|
|
1844
|
-
is_covered_with_solder_mask:
|
|
1861
|
+
is_covered_with_solder_mask: z98.boolean().optional(),
|
|
1845
1862
|
x: distance,
|
|
1846
1863
|
y: distance,
|
|
1847
|
-
layers:
|
|
1848
|
-
port_hints:
|
|
1849
|
-
pcb_component_id:
|
|
1850
|
-
pcb_port_id:
|
|
1864
|
+
layers: z98.array(layer_ref),
|
|
1865
|
+
port_hints: z98.array(z98.string()).optional(),
|
|
1866
|
+
pcb_component_id: z98.string().optional(),
|
|
1867
|
+
pcb_port_id: z98.string().optional(),
|
|
1851
1868
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1852
|
-
soldermask_margin:
|
|
1869
|
+
soldermask_margin: z98.number().optional()
|
|
1853
1870
|
});
|
|
1854
|
-
var pcb_hole_with_polygon_pad =
|
|
1855
|
-
type:
|
|
1856
|
-
shape:
|
|
1857
|
-
pcb_group_id:
|
|
1858
|
-
subcircuit_id:
|
|
1859
|
-
hole_shape:
|
|
1860
|
-
hole_diameter:
|
|
1861
|
-
hole_width:
|
|
1862
|
-
hole_height:
|
|
1863
|
-
pad_outline:
|
|
1864
|
-
|
|
1871
|
+
var pcb_hole_with_polygon_pad = z98.object({
|
|
1872
|
+
type: z98.literal("pcb_plated_hole"),
|
|
1873
|
+
shape: z98.literal("hole_with_polygon_pad"),
|
|
1874
|
+
pcb_group_id: z98.string().optional(),
|
|
1875
|
+
subcircuit_id: z98.string().optional(),
|
|
1876
|
+
hole_shape: z98.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
1877
|
+
hole_diameter: z98.number().optional(),
|
|
1878
|
+
hole_width: z98.number().optional(),
|
|
1879
|
+
hole_height: z98.number().optional(),
|
|
1880
|
+
pad_outline: z98.array(
|
|
1881
|
+
z98.object({
|
|
1865
1882
|
x: distance,
|
|
1866
1883
|
y: distance
|
|
1867
1884
|
})
|
|
1868
1885
|
).min(3),
|
|
1869
1886
|
hole_offset_x: distance.default(0),
|
|
1870
1887
|
hole_offset_y: distance.default(0),
|
|
1871
|
-
is_covered_with_solder_mask:
|
|
1888
|
+
is_covered_with_solder_mask: z98.boolean().optional(),
|
|
1872
1889
|
x: distance,
|
|
1873
1890
|
y: distance,
|
|
1874
|
-
layers:
|
|
1875
|
-
port_hints:
|
|
1876
|
-
pcb_component_id:
|
|
1877
|
-
pcb_port_id:
|
|
1891
|
+
layers: z98.array(layer_ref),
|
|
1892
|
+
port_hints: z98.array(z98.string()).optional(),
|
|
1893
|
+
pcb_component_id: z98.string().optional(),
|
|
1894
|
+
pcb_port_id: z98.string().optional(),
|
|
1878
1895
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1879
|
-
soldermask_margin:
|
|
1896
|
+
soldermask_margin: z98.number().optional(),
|
|
1880
1897
|
ccw_rotation: rotation.optional()
|
|
1881
1898
|
});
|
|
1882
|
-
var pcb_plated_hole =
|
|
1899
|
+
var pcb_plated_hole = z98.union([
|
|
1883
1900
|
pcb_plated_hole_circle,
|
|
1884
1901
|
pcb_plated_hole_oval,
|
|
1885
1902
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1897,138 +1914,138 @@ expectTypesMatch(true);
|
|
|
1897
1914
|
expectTypesMatch(true);
|
|
1898
1915
|
|
|
1899
1916
|
// src/pcb/pcb_port.ts
|
|
1900
|
-
import { z as
|
|
1901
|
-
var pcb_port =
|
|
1902
|
-
type:
|
|
1917
|
+
import { z as z99 } from "zod";
|
|
1918
|
+
var pcb_port = z99.object({
|
|
1919
|
+
type: z99.literal("pcb_port"),
|
|
1903
1920
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1904
|
-
pcb_group_id:
|
|
1905
|
-
subcircuit_id:
|
|
1906
|
-
source_port_id:
|
|
1907
|
-
pcb_component_id:
|
|
1921
|
+
pcb_group_id: z99.string().optional(),
|
|
1922
|
+
subcircuit_id: z99.string().optional(),
|
|
1923
|
+
source_port_id: z99.string(),
|
|
1924
|
+
pcb_component_id: z99.string().optional(),
|
|
1908
1925
|
x: distance,
|
|
1909
1926
|
y: distance,
|
|
1910
|
-
layers:
|
|
1911
|
-
is_board_pinout:
|
|
1927
|
+
layers: z99.array(layer_ref),
|
|
1928
|
+
is_board_pinout: z99.boolean().optional()
|
|
1912
1929
|
}).describe("Defines a port on the PCB");
|
|
1913
1930
|
expectTypesMatch(true);
|
|
1914
1931
|
|
|
1915
1932
|
// src/pcb/pcb_smtpad.ts
|
|
1916
|
-
import { z as
|
|
1917
|
-
var pcb_smtpad_circle =
|
|
1918
|
-
type:
|
|
1919
|
-
shape:
|
|
1933
|
+
import { z as z100 } from "zod";
|
|
1934
|
+
var pcb_smtpad_circle = z100.object({
|
|
1935
|
+
type: z100.literal("pcb_smtpad"),
|
|
1936
|
+
shape: z100.literal("circle"),
|
|
1920
1937
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1921
|
-
pcb_group_id:
|
|
1922
|
-
subcircuit_id:
|
|
1938
|
+
pcb_group_id: z100.string().optional(),
|
|
1939
|
+
subcircuit_id: z100.string().optional(),
|
|
1923
1940
|
x: distance,
|
|
1924
1941
|
y: distance,
|
|
1925
|
-
radius:
|
|
1942
|
+
radius: z100.number(),
|
|
1926
1943
|
layer: layer_ref,
|
|
1927
|
-
port_hints:
|
|
1928
|
-
pcb_component_id:
|
|
1929
|
-
pcb_port_id:
|
|
1930
|
-
is_covered_with_solder_mask:
|
|
1931
|
-
soldermask_margin:
|
|
1944
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
1945
|
+
pcb_component_id: z100.string().optional(),
|
|
1946
|
+
pcb_port_id: z100.string().optional(),
|
|
1947
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1948
|
+
soldermask_margin: z100.number().optional()
|
|
1932
1949
|
});
|
|
1933
|
-
var pcb_smtpad_rect =
|
|
1934
|
-
type:
|
|
1935
|
-
shape:
|
|
1950
|
+
var pcb_smtpad_rect = z100.object({
|
|
1951
|
+
type: z100.literal("pcb_smtpad"),
|
|
1952
|
+
shape: z100.literal("rect"),
|
|
1936
1953
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1937
|
-
pcb_group_id:
|
|
1938
|
-
subcircuit_id:
|
|
1954
|
+
pcb_group_id: z100.string().optional(),
|
|
1955
|
+
subcircuit_id: z100.string().optional(),
|
|
1939
1956
|
x: distance,
|
|
1940
1957
|
y: distance,
|
|
1941
|
-
width:
|
|
1942
|
-
height:
|
|
1943
|
-
rect_border_radius:
|
|
1944
|
-
corner_radius:
|
|
1958
|
+
width: z100.number(),
|
|
1959
|
+
height: z100.number(),
|
|
1960
|
+
rect_border_radius: z100.number().optional(),
|
|
1961
|
+
corner_radius: z100.number().optional(),
|
|
1945
1962
|
layer: layer_ref,
|
|
1946
|
-
port_hints:
|
|
1947
|
-
pcb_component_id:
|
|
1948
|
-
pcb_port_id:
|
|
1949
|
-
is_covered_with_solder_mask:
|
|
1950
|
-
soldermask_margin:
|
|
1951
|
-
soldermask_margin_left:
|
|
1952
|
-
soldermask_margin_top:
|
|
1953
|
-
soldermask_margin_right:
|
|
1954
|
-
soldermask_margin_bottom:
|
|
1963
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
1964
|
+
pcb_component_id: z100.string().optional(),
|
|
1965
|
+
pcb_port_id: z100.string().optional(),
|
|
1966
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1967
|
+
soldermask_margin: z100.number().optional(),
|
|
1968
|
+
soldermask_margin_left: z100.number().optional(),
|
|
1969
|
+
soldermask_margin_top: z100.number().optional(),
|
|
1970
|
+
soldermask_margin_right: z100.number().optional(),
|
|
1971
|
+
soldermask_margin_bottom: z100.number().optional()
|
|
1955
1972
|
});
|
|
1956
|
-
var pcb_smtpad_rotated_rect =
|
|
1957
|
-
type:
|
|
1958
|
-
shape:
|
|
1973
|
+
var pcb_smtpad_rotated_rect = z100.object({
|
|
1974
|
+
type: z100.literal("pcb_smtpad"),
|
|
1975
|
+
shape: z100.literal("rotated_rect"),
|
|
1959
1976
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1960
|
-
pcb_group_id:
|
|
1961
|
-
subcircuit_id:
|
|
1977
|
+
pcb_group_id: z100.string().optional(),
|
|
1978
|
+
subcircuit_id: z100.string().optional(),
|
|
1962
1979
|
x: distance,
|
|
1963
1980
|
y: distance,
|
|
1964
|
-
width:
|
|
1965
|
-
height:
|
|
1966
|
-
rect_border_radius:
|
|
1967
|
-
corner_radius:
|
|
1981
|
+
width: z100.number(),
|
|
1982
|
+
height: z100.number(),
|
|
1983
|
+
rect_border_radius: z100.number().optional(),
|
|
1984
|
+
corner_radius: z100.number().optional(),
|
|
1968
1985
|
ccw_rotation: rotation,
|
|
1969
1986
|
layer: layer_ref,
|
|
1970
|
-
port_hints:
|
|
1971
|
-
pcb_component_id:
|
|
1972
|
-
pcb_port_id:
|
|
1973
|
-
is_covered_with_solder_mask:
|
|
1974
|
-
soldermask_margin:
|
|
1975
|
-
soldermask_margin_left:
|
|
1976
|
-
soldermask_margin_top:
|
|
1977
|
-
soldermask_margin_right:
|
|
1978
|
-
soldermask_margin_bottom:
|
|
1987
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
1988
|
+
pcb_component_id: z100.string().optional(),
|
|
1989
|
+
pcb_port_id: z100.string().optional(),
|
|
1990
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1991
|
+
soldermask_margin: z100.number().optional(),
|
|
1992
|
+
soldermask_margin_left: z100.number().optional(),
|
|
1993
|
+
soldermask_margin_top: z100.number().optional(),
|
|
1994
|
+
soldermask_margin_right: z100.number().optional(),
|
|
1995
|
+
soldermask_margin_bottom: z100.number().optional()
|
|
1979
1996
|
});
|
|
1980
|
-
var pcb_smtpad_pill =
|
|
1981
|
-
type:
|
|
1982
|
-
shape:
|
|
1997
|
+
var pcb_smtpad_pill = z100.object({
|
|
1998
|
+
type: z100.literal("pcb_smtpad"),
|
|
1999
|
+
shape: z100.literal("pill"),
|
|
1983
2000
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1984
|
-
pcb_group_id:
|
|
1985
|
-
subcircuit_id:
|
|
2001
|
+
pcb_group_id: z100.string().optional(),
|
|
2002
|
+
subcircuit_id: z100.string().optional(),
|
|
1986
2003
|
x: distance,
|
|
1987
2004
|
y: distance,
|
|
1988
|
-
width:
|
|
1989
|
-
height:
|
|
1990
|
-
radius:
|
|
2005
|
+
width: z100.number(),
|
|
2006
|
+
height: z100.number(),
|
|
2007
|
+
radius: z100.number(),
|
|
1991
2008
|
layer: layer_ref,
|
|
1992
|
-
port_hints:
|
|
1993
|
-
pcb_component_id:
|
|
1994
|
-
pcb_port_id:
|
|
1995
|
-
is_covered_with_solder_mask:
|
|
1996
|
-
soldermask_margin:
|
|
2009
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
2010
|
+
pcb_component_id: z100.string().optional(),
|
|
2011
|
+
pcb_port_id: z100.string().optional(),
|
|
2012
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
2013
|
+
soldermask_margin: z100.number().optional()
|
|
1997
2014
|
});
|
|
1998
|
-
var pcb_smtpad_rotated_pill =
|
|
1999
|
-
type:
|
|
2000
|
-
shape:
|
|
2015
|
+
var pcb_smtpad_rotated_pill = z100.object({
|
|
2016
|
+
type: z100.literal("pcb_smtpad"),
|
|
2017
|
+
shape: z100.literal("rotated_pill"),
|
|
2001
2018
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2002
|
-
pcb_group_id:
|
|
2003
|
-
subcircuit_id:
|
|
2019
|
+
pcb_group_id: z100.string().optional(),
|
|
2020
|
+
subcircuit_id: z100.string().optional(),
|
|
2004
2021
|
x: distance,
|
|
2005
2022
|
y: distance,
|
|
2006
|
-
width:
|
|
2007
|
-
height:
|
|
2008
|
-
radius:
|
|
2023
|
+
width: z100.number(),
|
|
2024
|
+
height: z100.number(),
|
|
2025
|
+
radius: z100.number(),
|
|
2009
2026
|
ccw_rotation: rotation,
|
|
2010
2027
|
layer: layer_ref,
|
|
2011
|
-
port_hints:
|
|
2012
|
-
pcb_component_id:
|
|
2013
|
-
pcb_port_id:
|
|
2014
|
-
is_covered_with_solder_mask:
|
|
2015
|
-
soldermask_margin:
|
|
2028
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
2029
|
+
pcb_component_id: z100.string().optional(),
|
|
2030
|
+
pcb_port_id: z100.string().optional(),
|
|
2031
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
2032
|
+
soldermask_margin: z100.number().optional()
|
|
2016
2033
|
});
|
|
2017
|
-
var pcb_smtpad_polygon =
|
|
2018
|
-
type:
|
|
2019
|
-
shape:
|
|
2034
|
+
var pcb_smtpad_polygon = z100.object({
|
|
2035
|
+
type: z100.literal("pcb_smtpad"),
|
|
2036
|
+
shape: z100.literal("polygon"),
|
|
2020
2037
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2021
|
-
pcb_group_id:
|
|
2022
|
-
subcircuit_id:
|
|
2023
|
-
points:
|
|
2038
|
+
pcb_group_id: z100.string().optional(),
|
|
2039
|
+
subcircuit_id: z100.string().optional(),
|
|
2040
|
+
points: z100.array(point),
|
|
2024
2041
|
layer: layer_ref,
|
|
2025
|
-
port_hints:
|
|
2026
|
-
pcb_component_id:
|
|
2027
|
-
pcb_port_id:
|
|
2028
|
-
is_covered_with_solder_mask:
|
|
2029
|
-
soldermask_margin:
|
|
2042
|
+
port_hints: z100.array(z100.string()).optional(),
|
|
2043
|
+
pcb_component_id: z100.string().optional(),
|
|
2044
|
+
pcb_port_id: z100.string().optional(),
|
|
2045
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
2046
|
+
soldermask_margin: z100.number().optional()
|
|
2030
2047
|
});
|
|
2031
|
-
var pcb_smtpad =
|
|
2048
|
+
var pcb_smtpad = z100.discriminatedUnion("shape", [
|
|
2032
2049
|
pcb_smtpad_circle,
|
|
2033
2050
|
pcb_smtpad_rect,
|
|
2034
2051
|
pcb_smtpad_rotated_rect,
|
|
@@ -2044,79 +2061,79 @@ expectTypesMatch(true);
|
|
|
2044
2061
|
expectTypesMatch(true);
|
|
2045
2062
|
|
|
2046
2063
|
// src/pcb/pcb_solder_paste.ts
|
|
2047
|
-
import { z as
|
|
2048
|
-
var pcb_solder_paste_circle =
|
|
2049
|
-
type:
|
|
2050
|
-
shape:
|
|
2064
|
+
import { z as z101 } from "zod";
|
|
2065
|
+
var pcb_solder_paste_circle = z101.object({
|
|
2066
|
+
type: z101.literal("pcb_solder_paste"),
|
|
2067
|
+
shape: z101.literal("circle"),
|
|
2051
2068
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2052
|
-
pcb_group_id:
|
|
2053
|
-
subcircuit_id:
|
|
2069
|
+
pcb_group_id: z101.string().optional(),
|
|
2070
|
+
subcircuit_id: z101.string().optional(),
|
|
2054
2071
|
x: distance,
|
|
2055
2072
|
y: distance,
|
|
2056
|
-
radius:
|
|
2073
|
+
radius: z101.number(),
|
|
2057
2074
|
layer: layer_ref,
|
|
2058
|
-
pcb_component_id:
|
|
2059
|
-
pcb_smtpad_id:
|
|
2075
|
+
pcb_component_id: z101.string().optional(),
|
|
2076
|
+
pcb_smtpad_id: z101.string().optional()
|
|
2060
2077
|
});
|
|
2061
|
-
var pcb_solder_paste_rect =
|
|
2062
|
-
type:
|
|
2063
|
-
shape:
|
|
2078
|
+
var pcb_solder_paste_rect = z101.object({
|
|
2079
|
+
type: z101.literal("pcb_solder_paste"),
|
|
2080
|
+
shape: z101.literal("rect"),
|
|
2064
2081
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2065
|
-
pcb_group_id:
|
|
2066
|
-
subcircuit_id:
|
|
2082
|
+
pcb_group_id: z101.string().optional(),
|
|
2083
|
+
subcircuit_id: z101.string().optional(),
|
|
2067
2084
|
x: distance,
|
|
2068
2085
|
y: distance,
|
|
2069
|
-
width:
|
|
2070
|
-
height:
|
|
2086
|
+
width: z101.number(),
|
|
2087
|
+
height: z101.number(),
|
|
2071
2088
|
layer: layer_ref,
|
|
2072
|
-
pcb_component_id:
|
|
2073
|
-
pcb_smtpad_id:
|
|
2089
|
+
pcb_component_id: z101.string().optional(),
|
|
2090
|
+
pcb_smtpad_id: z101.string().optional()
|
|
2074
2091
|
});
|
|
2075
|
-
var pcb_solder_paste_pill =
|
|
2076
|
-
type:
|
|
2077
|
-
shape:
|
|
2092
|
+
var pcb_solder_paste_pill = z101.object({
|
|
2093
|
+
type: z101.literal("pcb_solder_paste"),
|
|
2094
|
+
shape: z101.literal("pill"),
|
|
2078
2095
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2079
|
-
pcb_group_id:
|
|
2080
|
-
subcircuit_id:
|
|
2096
|
+
pcb_group_id: z101.string().optional(),
|
|
2097
|
+
subcircuit_id: z101.string().optional(),
|
|
2081
2098
|
x: distance,
|
|
2082
2099
|
y: distance,
|
|
2083
|
-
width:
|
|
2084
|
-
height:
|
|
2085
|
-
radius:
|
|
2100
|
+
width: z101.number(),
|
|
2101
|
+
height: z101.number(),
|
|
2102
|
+
radius: z101.number(),
|
|
2086
2103
|
layer: layer_ref,
|
|
2087
|
-
pcb_component_id:
|
|
2088
|
-
pcb_smtpad_id:
|
|
2104
|
+
pcb_component_id: z101.string().optional(),
|
|
2105
|
+
pcb_smtpad_id: z101.string().optional()
|
|
2089
2106
|
});
|
|
2090
|
-
var pcb_solder_paste_rotated_rect =
|
|
2091
|
-
type:
|
|
2092
|
-
shape:
|
|
2107
|
+
var pcb_solder_paste_rotated_rect = z101.object({
|
|
2108
|
+
type: z101.literal("pcb_solder_paste"),
|
|
2109
|
+
shape: z101.literal("rotated_rect"),
|
|
2093
2110
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2094
|
-
pcb_group_id:
|
|
2095
|
-
subcircuit_id:
|
|
2111
|
+
pcb_group_id: z101.string().optional(),
|
|
2112
|
+
subcircuit_id: z101.string().optional(),
|
|
2096
2113
|
x: distance,
|
|
2097
2114
|
y: distance,
|
|
2098
|
-
width:
|
|
2099
|
-
height:
|
|
2115
|
+
width: z101.number(),
|
|
2116
|
+
height: z101.number(),
|
|
2100
2117
|
ccw_rotation: distance,
|
|
2101
2118
|
layer: layer_ref,
|
|
2102
|
-
pcb_component_id:
|
|
2103
|
-
pcb_smtpad_id:
|
|
2119
|
+
pcb_component_id: z101.string().optional(),
|
|
2120
|
+
pcb_smtpad_id: z101.string().optional()
|
|
2104
2121
|
});
|
|
2105
|
-
var pcb_solder_paste_oval =
|
|
2106
|
-
type:
|
|
2107
|
-
shape:
|
|
2122
|
+
var pcb_solder_paste_oval = z101.object({
|
|
2123
|
+
type: z101.literal("pcb_solder_paste"),
|
|
2124
|
+
shape: z101.literal("oval"),
|
|
2108
2125
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2109
|
-
pcb_group_id:
|
|
2110
|
-
subcircuit_id:
|
|
2126
|
+
pcb_group_id: z101.string().optional(),
|
|
2127
|
+
subcircuit_id: z101.string().optional(),
|
|
2111
2128
|
x: distance,
|
|
2112
2129
|
y: distance,
|
|
2113
|
-
width:
|
|
2114
|
-
height:
|
|
2130
|
+
width: z101.number(),
|
|
2131
|
+
height: z101.number(),
|
|
2115
2132
|
layer: layer_ref,
|
|
2116
|
-
pcb_component_id:
|
|
2117
|
-
pcb_smtpad_id:
|
|
2133
|
+
pcb_component_id: z101.string().optional(),
|
|
2134
|
+
pcb_smtpad_id: z101.string().optional()
|
|
2118
2135
|
});
|
|
2119
|
-
var pcb_solder_paste =
|
|
2136
|
+
var pcb_solder_paste = z101.union([
|
|
2120
2137
|
pcb_solder_paste_circle,
|
|
2121
2138
|
pcb_solder_paste_rect,
|
|
2122
2139
|
pcb_solder_paste_pill,
|
|
@@ -2132,173 +2149,173 @@ expectTypesMatch(
|
|
|
2132
2149
|
expectTypesMatch(true);
|
|
2133
2150
|
|
|
2134
2151
|
// src/pcb/pcb_text.ts
|
|
2135
|
-
import { z as
|
|
2136
|
-
var pcb_text =
|
|
2137
|
-
type:
|
|
2152
|
+
import { z as z102 } from "zod";
|
|
2153
|
+
var pcb_text = z102.object({
|
|
2154
|
+
type: z102.literal("pcb_text"),
|
|
2138
2155
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
2139
|
-
pcb_group_id:
|
|
2140
|
-
subcircuit_id:
|
|
2141
|
-
text:
|
|
2156
|
+
pcb_group_id: z102.string().optional(),
|
|
2157
|
+
subcircuit_id: z102.string().optional(),
|
|
2158
|
+
text: z102.string(),
|
|
2142
2159
|
center: point,
|
|
2143
2160
|
layer: layer_ref,
|
|
2144
2161
|
width: length,
|
|
2145
2162
|
height: length,
|
|
2146
|
-
lines:
|
|
2163
|
+
lines: z102.number(),
|
|
2147
2164
|
// @ts-ignore
|
|
2148
|
-
align:
|
|
2165
|
+
align: z102.enum(["bottom-left"])
|
|
2149
2166
|
}).describe("Defines text on the PCB");
|
|
2150
2167
|
expectTypesMatch(true);
|
|
2151
2168
|
|
|
2152
2169
|
// src/pcb/pcb_trace.ts
|
|
2153
|
-
import { z as
|
|
2154
|
-
var pcb_trace_route_point_wire =
|
|
2155
|
-
route_type:
|
|
2170
|
+
import { z as z103 } from "zod";
|
|
2171
|
+
var pcb_trace_route_point_wire = z103.object({
|
|
2172
|
+
route_type: z103.literal("wire"),
|
|
2156
2173
|
x: distance,
|
|
2157
2174
|
y: distance,
|
|
2158
2175
|
width: distance,
|
|
2159
|
-
copper_pour_id:
|
|
2160
|
-
is_inside_copper_pour:
|
|
2161
|
-
start_pcb_port_id:
|
|
2162
|
-
end_pcb_port_id:
|
|
2176
|
+
copper_pour_id: z103.string().optional(),
|
|
2177
|
+
is_inside_copper_pour: z103.boolean().optional(),
|
|
2178
|
+
start_pcb_port_id: z103.string().optional(),
|
|
2179
|
+
end_pcb_port_id: z103.string().optional(),
|
|
2163
2180
|
layer: layer_ref
|
|
2164
2181
|
});
|
|
2165
|
-
var pcb_trace_route_point_via =
|
|
2166
|
-
route_type:
|
|
2182
|
+
var pcb_trace_route_point_via = z103.object({
|
|
2183
|
+
route_type: z103.literal("via"),
|
|
2167
2184
|
x: distance,
|
|
2168
2185
|
y: distance,
|
|
2169
|
-
copper_pour_id:
|
|
2170
|
-
is_inside_copper_pour:
|
|
2186
|
+
copper_pour_id: z103.string().optional(),
|
|
2187
|
+
is_inside_copper_pour: z103.boolean().optional(),
|
|
2171
2188
|
hole_diameter: distance.optional(),
|
|
2172
2189
|
outer_diameter: distance.optional(),
|
|
2173
2190
|
from_layer: layer_ref,
|
|
2174
2191
|
to_layer: layer_ref
|
|
2175
2192
|
});
|
|
2176
|
-
var pcb_trace_route_point_through_pad =
|
|
2177
|
-
route_type:
|
|
2193
|
+
var pcb_trace_route_point_through_pad = z103.object({
|
|
2194
|
+
route_type: z103.literal("through_pad"),
|
|
2178
2195
|
start: point,
|
|
2179
2196
|
end: point,
|
|
2180
2197
|
width: distance,
|
|
2181
2198
|
start_layer: layer_ref,
|
|
2182
2199
|
end_layer: layer_ref,
|
|
2183
|
-
pcb_smtpad_id:
|
|
2184
|
-
pcb_plated_hole_id:
|
|
2200
|
+
pcb_smtpad_id: z103.string().optional(),
|
|
2201
|
+
pcb_plated_hole_id: z103.string().optional()
|
|
2185
2202
|
});
|
|
2186
|
-
var pcb_trace_route_point =
|
|
2203
|
+
var pcb_trace_route_point = z103.union([
|
|
2187
2204
|
pcb_trace_route_point_wire,
|
|
2188
2205
|
pcb_trace_route_point_via,
|
|
2189
2206
|
pcb_trace_route_point_through_pad
|
|
2190
2207
|
]);
|
|
2191
|
-
var pcb_trace =
|
|
2192
|
-
type:
|
|
2193
|
-
source_trace_id:
|
|
2194
|
-
pcb_component_id:
|
|
2208
|
+
var pcb_trace = z103.object({
|
|
2209
|
+
type: z103.literal("pcb_trace"),
|
|
2210
|
+
source_trace_id: z103.string().optional(),
|
|
2211
|
+
pcb_component_id: z103.string().optional(),
|
|
2195
2212
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
2196
|
-
pcb_group_id:
|
|
2197
|
-
subcircuit_id:
|
|
2198
|
-
route_thickness_mode:
|
|
2199
|
-
route_order_index:
|
|
2200
|
-
should_round_corners:
|
|
2201
|
-
trace_length:
|
|
2202
|
-
highlight_color:
|
|
2203
|
-
route:
|
|
2213
|
+
pcb_group_id: z103.string().optional(),
|
|
2214
|
+
subcircuit_id: z103.string().optional(),
|
|
2215
|
+
route_thickness_mode: z103.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
2216
|
+
route_order_index: z103.number().optional(),
|
|
2217
|
+
should_round_corners: z103.boolean().optional(),
|
|
2218
|
+
trace_length: z103.number().optional(),
|
|
2219
|
+
highlight_color: z103.string().optional(),
|
|
2220
|
+
route: z103.array(pcb_trace_route_point)
|
|
2204
2221
|
}).describe("Defines a trace on the PCB");
|
|
2205
2222
|
expectTypesMatch(true);
|
|
2206
2223
|
expectTypesMatch(true);
|
|
2207
2224
|
|
|
2208
2225
|
// src/pcb/pcb_trace_warning.ts
|
|
2209
|
-
import { z as
|
|
2210
|
-
var pcb_trace_warning =
|
|
2211
|
-
type:
|
|
2226
|
+
import { z as z104 } from "zod";
|
|
2227
|
+
var pcb_trace_warning = z104.object({
|
|
2228
|
+
type: z104.literal("pcb_trace_warning"),
|
|
2212
2229
|
pcb_trace_warning_id: getZodPrefixedIdWithDefault("pcb_trace_warning"),
|
|
2213
|
-
warning_type:
|
|
2214
|
-
message:
|
|
2230
|
+
warning_type: z104.literal("pcb_trace_warning").default("pcb_trace_warning"),
|
|
2231
|
+
message: z104.string(),
|
|
2215
2232
|
center: point.optional(),
|
|
2216
|
-
pcb_trace_id:
|
|
2217
|
-
source_trace_id:
|
|
2218
|
-
pcb_component_ids:
|
|
2219
|
-
pcb_port_ids:
|
|
2220
|
-
subcircuit_id:
|
|
2233
|
+
pcb_trace_id: z104.string(),
|
|
2234
|
+
source_trace_id: z104.string(),
|
|
2235
|
+
pcb_component_ids: z104.array(z104.string()),
|
|
2236
|
+
pcb_port_ids: z104.array(z104.string()),
|
|
2237
|
+
subcircuit_id: z104.string().optional()
|
|
2221
2238
|
}).describe("Defines a trace warning on the PCB");
|
|
2222
2239
|
expectTypesMatch(true);
|
|
2223
2240
|
|
|
2224
2241
|
// src/pcb/pcb_trace_error.ts
|
|
2225
|
-
import { z as
|
|
2242
|
+
import { z as z105 } from "zod";
|
|
2226
2243
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2227
|
-
type:
|
|
2244
|
+
type: z105.literal("pcb_trace_error"),
|
|
2228
2245
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2229
|
-
error_type:
|
|
2246
|
+
error_type: z105.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2230
2247
|
center: point.optional(),
|
|
2231
|
-
pcb_trace_id:
|
|
2232
|
-
source_trace_id:
|
|
2233
|
-
pcb_component_ids:
|
|
2234
|
-
pcb_port_ids:
|
|
2235
|
-
subcircuit_id:
|
|
2248
|
+
pcb_trace_id: z105.string(),
|
|
2249
|
+
source_trace_id: z105.string(),
|
|
2250
|
+
pcb_component_ids: z105.array(z105.string()),
|
|
2251
|
+
pcb_port_ids: z105.array(z105.string()),
|
|
2252
|
+
subcircuit_id: z105.string().optional()
|
|
2236
2253
|
}).describe("Defines a trace error on the PCB");
|
|
2237
2254
|
expectTypesMatch(true);
|
|
2238
2255
|
|
|
2239
2256
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2240
|
-
import { z as
|
|
2257
|
+
import { z as z106 } from "zod";
|
|
2241
2258
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2242
|
-
type:
|
|
2259
|
+
type: z106.literal("pcb_trace_missing_error"),
|
|
2243
2260
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2244
2261
|
"pcb_trace_missing_error"
|
|
2245
2262
|
),
|
|
2246
|
-
error_type:
|
|
2263
|
+
error_type: z106.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2247
2264
|
center: point.optional(),
|
|
2248
|
-
source_trace_id:
|
|
2249
|
-
pcb_component_ids:
|
|
2250
|
-
pcb_port_ids:
|
|
2251
|
-
subcircuit_id:
|
|
2265
|
+
source_trace_id: z106.string(),
|
|
2266
|
+
pcb_component_ids: z106.array(z106.string()),
|
|
2267
|
+
pcb_port_ids: z106.array(z106.string()),
|
|
2268
|
+
subcircuit_id: z106.string().optional()
|
|
2252
2269
|
}).describe(
|
|
2253
2270
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2254
2271
|
);
|
|
2255
2272
|
expectTypesMatch(true);
|
|
2256
2273
|
|
|
2257
2274
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2258
|
-
import { z as
|
|
2275
|
+
import { z as z107 } from "zod";
|
|
2259
2276
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2260
|
-
type:
|
|
2277
|
+
type: z107.literal("pcb_port_not_matched_error"),
|
|
2261
2278
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2262
|
-
error_type:
|
|
2263
|
-
pcb_component_ids:
|
|
2264
|
-
subcircuit_id:
|
|
2279
|
+
error_type: z107.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2280
|
+
pcb_component_ids: z107.array(z107.string()),
|
|
2281
|
+
subcircuit_id: z107.string().optional()
|
|
2265
2282
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2266
2283
|
expectTypesMatch(true);
|
|
2267
2284
|
|
|
2268
2285
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2269
|
-
import { z as
|
|
2286
|
+
import { z as z108 } from "zod";
|
|
2270
2287
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2271
|
-
type:
|
|
2288
|
+
type: z108.literal("pcb_port_not_connected_error"),
|
|
2272
2289
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2273
2290
|
"pcb_port_not_connected_error"
|
|
2274
2291
|
),
|
|
2275
|
-
error_type:
|
|
2276
|
-
pcb_port_ids:
|
|
2277
|
-
pcb_component_ids:
|
|
2278
|
-
subcircuit_id:
|
|
2292
|
+
error_type: z108.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2293
|
+
pcb_port_ids: z108.array(z108.string()),
|
|
2294
|
+
pcb_component_ids: z108.array(z108.string()),
|
|
2295
|
+
subcircuit_id: z108.string().optional()
|
|
2279
2296
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2280
2297
|
expectTypesMatch(
|
|
2281
2298
|
true
|
|
2282
2299
|
);
|
|
2283
2300
|
|
|
2284
2301
|
// src/pcb/pcb_net.ts
|
|
2285
|
-
import { z as
|
|
2286
|
-
var pcb_net =
|
|
2287
|
-
type:
|
|
2302
|
+
import { z as z109 } from "zod";
|
|
2303
|
+
var pcb_net = z109.object({
|
|
2304
|
+
type: z109.literal("pcb_net"),
|
|
2288
2305
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2289
|
-
source_net_id:
|
|
2290
|
-
highlight_color:
|
|
2306
|
+
source_net_id: z109.string().optional(),
|
|
2307
|
+
highlight_color: z109.string().optional()
|
|
2291
2308
|
}).describe("Defines a net on the PCB");
|
|
2292
2309
|
expectTypesMatch(true);
|
|
2293
2310
|
|
|
2294
2311
|
// src/pcb/pcb_via.ts
|
|
2295
|
-
import { z as
|
|
2296
|
-
var pcb_via =
|
|
2297
|
-
type:
|
|
2312
|
+
import { z as z110 } from "zod";
|
|
2313
|
+
var pcb_via = z110.object({
|
|
2314
|
+
type: z110.literal("pcb_via"),
|
|
2298
2315
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2299
|
-
pcb_group_id:
|
|
2300
|
-
subcircuit_id:
|
|
2301
|
-
subcircuit_connectivity_map_key:
|
|
2316
|
+
pcb_group_id: z110.string().optional(),
|
|
2317
|
+
subcircuit_id: z110.string().optional(),
|
|
2318
|
+
subcircuit_connectivity_map_key: z110.string().optional(),
|
|
2302
2319
|
x: distance,
|
|
2303
2320
|
y: distance,
|
|
2304
2321
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2307,103 +2324,103 @@ var pcb_via = z109.object({
|
|
|
2307
2324
|
from_layer: layer_ref.optional(),
|
|
2308
2325
|
/** @deprecated */
|
|
2309
2326
|
to_layer: layer_ref.optional(),
|
|
2310
|
-
layers:
|
|
2311
|
-
pcb_trace_id:
|
|
2312
|
-
net_is_assignable:
|
|
2313
|
-
net_assigned:
|
|
2314
|
-
is_tented:
|
|
2327
|
+
layers: z110.array(layer_ref),
|
|
2328
|
+
pcb_trace_id: z110.string().optional(),
|
|
2329
|
+
net_is_assignable: z110.boolean().optional(),
|
|
2330
|
+
net_assigned: z110.boolean().optional(),
|
|
2331
|
+
is_tented: z110.boolean().optional()
|
|
2315
2332
|
}).describe("Defines a via on the PCB");
|
|
2316
2333
|
expectTypesMatch(true);
|
|
2317
2334
|
|
|
2318
2335
|
// src/pcb/pcb_board.ts
|
|
2319
|
-
import { z as
|
|
2320
|
-
var pcb_board =
|
|
2321
|
-
type:
|
|
2336
|
+
import { z as z111 } from "zod";
|
|
2337
|
+
var pcb_board = z111.object({
|
|
2338
|
+
type: z111.literal("pcb_board"),
|
|
2322
2339
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2323
|
-
pcb_panel_id:
|
|
2324
|
-
carrier_pcb_board_id:
|
|
2325
|
-
is_subcircuit:
|
|
2326
|
-
subcircuit_id:
|
|
2327
|
-
is_mounted_to_carrier_board:
|
|
2340
|
+
pcb_panel_id: z111.string().optional(),
|
|
2341
|
+
carrier_pcb_board_id: z111.string().optional(),
|
|
2342
|
+
is_subcircuit: z111.boolean().optional(),
|
|
2343
|
+
subcircuit_id: z111.string().optional(),
|
|
2344
|
+
is_mounted_to_carrier_board: z111.boolean().optional(),
|
|
2328
2345
|
width: length.optional(),
|
|
2329
2346
|
height: length.optional(),
|
|
2330
2347
|
center: point,
|
|
2331
|
-
display_offset_x:
|
|
2348
|
+
display_offset_x: z111.string().optional().describe(
|
|
2332
2349
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2333
2350
|
),
|
|
2334
|
-
display_offset_y:
|
|
2351
|
+
display_offset_y: z111.string().optional().describe(
|
|
2335
2352
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2336
2353
|
),
|
|
2337
2354
|
thickness: length.optional().default(1.4),
|
|
2338
|
-
num_layers:
|
|
2339
|
-
outline:
|
|
2340
|
-
shape:
|
|
2341
|
-
material:
|
|
2342
|
-
solder_mask_color:
|
|
2343
|
-
silkscreen_color:
|
|
2355
|
+
num_layers: z111.number().optional().default(4),
|
|
2356
|
+
outline: z111.array(point).optional(),
|
|
2357
|
+
shape: z111.enum(["rect", "polygon"]).optional(),
|
|
2358
|
+
material: z111.enum(["fr4", "fr1"]).default("fr4"),
|
|
2359
|
+
solder_mask_color: z111.string().optional(),
|
|
2360
|
+
silkscreen_color: z111.string().optional(),
|
|
2344
2361
|
anchor_position: point.optional(),
|
|
2345
2362
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2346
|
-
position_mode:
|
|
2363
|
+
position_mode: z111.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2347
2364
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2348
2365
|
expectTypesMatch(true);
|
|
2349
2366
|
|
|
2350
2367
|
// src/pcb/pcb_panel.ts
|
|
2351
|
-
import { z as
|
|
2352
|
-
var pcb_panel =
|
|
2353
|
-
type:
|
|
2368
|
+
import { z as z112 } from "zod";
|
|
2369
|
+
var pcb_panel = z112.object({
|
|
2370
|
+
type: z112.literal("pcb_panel"),
|
|
2354
2371
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2355
2372
|
width: length,
|
|
2356
2373
|
height: length,
|
|
2357
2374
|
center: point,
|
|
2358
2375
|
thickness: length.optional().default(1.4),
|
|
2359
|
-
covered_with_solder_mask:
|
|
2376
|
+
covered_with_solder_mask: z112.boolean().optional().default(true)
|
|
2360
2377
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2361
2378
|
expectTypesMatch(true);
|
|
2362
2379
|
|
|
2363
2380
|
// src/pcb/pcb_placement_error.ts
|
|
2364
|
-
import { z as
|
|
2381
|
+
import { z as z113 } from "zod";
|
|
2365
2382
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2366
|
-
type:
|
|
2383
|
+
type: z113.literal("pcb_placement_error"),
|
|
2367
2384
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2368
|
-
error_type:
|
|
2369
|
-
subcircuit_id:
|
|
2385
|
+
error_type: z113.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2386
|
+
subcircuit_id: z113.string().optional()
|
|
2370
2387
|
}).describe("Defines a placement error on the PCB");
|
|
2371
2388
|
expectTypesMatch(true);
|
|
2372
2389
|
|
|
2373
2390
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2374
|
-
import { z as
|
|
2391
|
+
import { z as z114 } from "zod";
|
|
2375
2392
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2376
|
-
type:
|
|
2393
|
+
type: z114.literal("pcb_panelization_placement_error"),
|
|
2377
2394
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2378
2395
|
"pcb_panelization_placement_error"
|
|
2379
2396
|
),
|
|
2380
|
-
error_type:
|
|
2381
|
-
pcb_panel_id:
|
|
2382
|
-
pcb_board_id:
|
|
2383
|
-
subcircuit_id:
|
|
2397
|
+
error_type: z114.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2398
|
+
pcb_panel_id: z114.string().optional(),
|
|
2399
|
+
pcb_board_id: z114.string().optional(),
|
|
2400
|
+
subcircuit_id: z114.string().optional()
|
|
2384
2401
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2385
2402
|
expectTypesMatch(true);
|
|
2386
2403
|
|
|
2387
2404
|
// src/pcb/pcb_trace_hint.ts
|
|
2388
|
-
import { z as
|
|
2389
|
-
var pcb_trace_hint =
|
|
2390
|
-
type:
|
|
2405
|
+
import { z as z115 } from "zod";
|
|
2406
|
+
var pcb_trace_hint = z115.object({
|
|
2407
|
+
type: z115.literal("pcb_trace_hint"),
|
|
2391
2408
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2392
|
-
pcb_port_id:
|
|
2393
|
-
pcb_component_id:
|
|
2394
|
-
route:
|
|
2395
|
-
subcircuit_id:
|
|
2409
|
+
pcb_port_id: z115.string(),
|
|
2410
|
+
pcb_component_id: z115.string(),
|
|
2411
|
+
route: z115.array(route_hint_point),
|
|
2412
|
+
subcircuit_id: z115.string().optional()
|
|
2396
2413
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2397
2414
|
expectTypesMatch(true);
|
|
2398
2415
|
|
|
2399
2416
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2400
|
-
import { z as
|
|
2401
|
-
var pcb_silkscreen_line =
|
|
2402
|
-
type:
|
|
2417
|
+
import { z as z116 } from "zod";
|
|
2418
|
+
var pcb_silkscreen_line = z116.object({
|
|
2419
|
+
type: z116.literal("pcb_silkscreen_line"),
|
|
2403
2420
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2404
|
-
pcb_component_id:
|
|
2405
|
-
pcb_group_id:
|
|
2406
|
-
subcircuit_id:
|
|
2421
|
+
pcb_component_id: z116.string(),
|
|
2422
|
+
pcb_group_id: z116.string().optional(),
|
|
2423
|
+
subcircuit_id: z116.string().optional(),
|
|
2407
2424
|
stroke_width: distance.default("0.1mm"),
|
|
2408
2425
|
x1: distance,
|
|
2409
2426
|
y1: distance,
|
|
@@ -2414,32 +2431,32 @@ var pcb_silkscreen_line = z115.object({
|
|
|
2414
2431
|
expectTypesMatch(true);
|
|
2415
2432
|
|
|
2416
2433
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2417
|
-
import { z as
|
|
2418
|
-
var pcb_silkscreen_path =
|
|
2419
|
-
type:
|
|
2434
|
+
import { z as z117 } from "zod";
|
|
2435
|
+
var pcb_silkscreen_path = z117.object({
|
|
2436
|
+
type: z117.literal("pcb_silkscreen_path"),
|
|
2420
2437
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2421
|
-
pcb_component_id:
|
|
2422
|
-
pcb_group_id:
|
|
2423
|
-
subcircuit_id:
|
|
2438
|
+
pcb_component_id: z117.string(),
|
|
2439
|
+
pcb_group_id: z117.string().optional(),
|
|
2440
|
+
subcircuit_id: z117.string().optional(),
|
|
2424
2441
|
layer: visible_layer,
|
|
2425
|
-
route:
|
|
2442
|
+
route: z117.array(point),
|
|
2426
2443
|
stroke_width: length
|
|
2427
2444
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2428
2445
|
expectTypesMatch(true);
|
|
2429
2446
|
|
|
2430
2447
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2431
|
-
import { z as
|
|
2432
|
-
var pcb_silkscreen_text =
|
|
2433
|
-
type:
|
|
2448
|
+
import { z as z118 } from "zod";
|
|
2449
|
+
var pcb_silkscreen_text = z118.object({
|
|
2450
|
+
type: z118.literal("pcb_silkscreen_text"),
|
|
2434
2451
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2435
|
-
pcb_group_id:
|
|
2436
|
-
subcircuit_id:
|
|
2437
|
-
font:
|
|
2452
|
+
pcb_group_id: z118.string().optional(),
|
|
2453
|
+
subcircuit_id: z118.string().optional(),
|
|
2454
|
+
font: z118.literal("tscircuit2024").default("tscircuit2024"),
|
|
2438
2455
|
font_size: distance.default("0.2mm"),
|
|
2439
|
-
pcb_component_id:
|
|
2440
|
-
text:
|
|
2441
|
-
is_knockout:
|
|
2442
|
-
knockout_padding:
|
|
2456
|
+
pcb_component_id: z118.string(),
|
|
2457
|
+
text: z118.string(),
|
|
2458
|
+
is_knockout: z118.boolean().default(false).optional(),
|
|
2459
|
+
knockout_padding: z118.object({
|
|
2443
2460
|
left: length,
|
|
2444
2461
|
top: length,
|
|
2445
2462
|
bottom: length,
|
|
@@ -2450,27 +2467,27 @@ var pcb_silkscreen_text = z117.object({
|
|
|
2450
2467
|
bottom: "0.2mm",
|
|
2451
2468
|
right: "0.2mm"
|
|
2452
2469
|
}).optional(),
|
|
2453
|
-
ccw_rotation:
|
|
2470
|
+
ccw_rotation: z118.number().optional(),
|
|
2454
2471
|
layer: layer_ref,
|
|
2455
|
-
is_mirrored:
|
|
2472
|
+
is_mirrored: z118.boolean().default(false).optional(),
|
|
2456
2473
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2457
2474
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2458
2475
|
}).describe("Defines silkscreen text on the PCB");
|
|
2459
2476
|
expectTypesMatch(true);
|
|
2460
2477
|
|
|
2461
2478
|
// src/pcb/pcb_copper_text.ts
|
|
2462
|
-
import { z as
|
|
2463
|
-
var pcb_copper_text =
|
|
2464
|
-
type:
|
|
2479
|
+
import { z as z119 } from "zod";
|
|
2480
|
+
var pcb_copper_text = z119.object({
|
|
2481
|
+
type: z119.literal("pcb_copper_text"),
|
|
2465
2482
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2466
|
-
pcb_group_id:
|
|
2467
|
-
subcircuit_id:
|
|
2468
|
-
font:
|
|
2483
|
+
pcb_group_id: z119.string().optional(),
|
|
2484
|
+
subcircuit_id: z119.string().optional(),
|
|
2485
|
+
font: z119.literal("tscircuit2024").default("tscircuit2024"),
|
|
2469
2486
|
font_size: distance.default("0.2mm"),
|
|
2470
|
-
pcb_component_id:
|
|
2471
|
-
text:
|
|
2472
|
-
is_knockout:
|
|
2473
|
-
knockout_padding:
|
|
2487
|
+
pcb_component_id: z119.string(),
|
|
2488
|
+
text: z119.string(),
|
|
2489
|
+
is_knockout: z119.boolean().default(false).optional(),
|
|
2490
|
+
knockout_padding: z119.object({
|
|
2474
2491
|
left: length,
|
|
2475
2492
|
top: length,
|
|
2476
2493
|
bottom: length,
|
|
@@ -2481,61 +2498,61 @@ var pcb_copper_text = z118.object({
|
|
|
2481
2498
|
bottom: "0.2mm",
|
|
2482
2499
|
right: "0.2mm"
|
|
2483
2500
|
}).optional(),
|
|
2484
|
-
ccw_rotation:
|
|
2501
|
+
ccw_rotation: z119.number().optional(),
|
|
2485
2502
|
layer: layer_ref,
|
|
2486
|
-
is_mirrored:
|
|
2503
|
+
is_mirrored: z119.boolean().default(false).optional(),
|
|
2487
2504
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2488
2505
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2489
2506
|
}).describe("Defines copper text on the PCB");
|
|
2490
2507
|
expectTypesMatch(true);
|
|
2491
2508
|
|
|
2492
2509
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2493
|
-
import { z as
|
|
2494
|
-
var pcb_silkscreen_rect =
|
|
2495
|
-
type:
|
|
2510
|
+
import { z as z120 } from "zod";
|
|
2511
|
+
var pcb_silkscreen_rect = z120.object({
|
|
2512
|
+
type: z120.literal("pcb_silkscreen_rect"),
|
|
2496
2513
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2497
|
-
pcb_component_id:
|
|
2498
|
-
pcb_group_id:
|
|
2499
|
-
subcircuit_id:
|
|
2514
|
+
pcb_component_id: z120.string(),
|
|
2515
|
+
pcb_group_id: z120.string().optional(),
|
|
2516
|
+
subcircuit_id: z120.string().optional(),
|
|
2500
2517
|
center: point,
|
|
2501
2518
|
width: length,
|
|
2502
2519
|
height: length,
|
|
2503
2520
|
layer: layer_ref,
|
|
2504
2521
|
stroke_width: length.default("1mm"),
|
|
2505
2522
|
corner_radius: length.optional(),
|
|
2506
|
-
is_filled:
|
|
2507
|
-
has_stroke:
|
|
2508
|
-
is_stroke_dashed:
|
|
2509
|
-
ccw_rotation:
|
|
2523
|
+
is_filled: z120.boolean().default(true).optional(),
|
|
2524
|
+
has_stroke: z120.boolean().optional(),
|
|
2525
|
+
is_stroke_dashed: z120.boolean().optional(),
|
|
2526
|
+
ccw_rotation: z120.number().optional()
|
|
2510
2527
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2511
2528
|
expectTypesMatch(true);
|
|
2512
2529
|
|
|
2513
2530
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2514
|
-
import { z as
|
|
2515
|
-
var pcb_silkscreen_circle =
|
|
2516
|
-
type:
|
|
2531
|
+
import { z as z121 } from "zod";
|
|
2532
|
+
var pcb_silkscreen_circle = z121.object({
|
|
2533
|
+
type: z121.literal("pcb_silkscreen_circle"),
|
|
2517
2534
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2518
2535
|
"pcb_silkscreen_circle"
|
|
2519
2536
|
),
|
|
2520
|
-
pcb_component_id:
|
|
2521
|
-
pcb_group_id:
|
|
2522
|
-
subcircuit_id:
|
|
2537
|
+
pcb_component_id: z121.string(),
|
|
2538
|
+
pcb_group_id: z121.string().optional(),
|
|
2539
|
+
subcircuit_id: z121.string().optional(),
|
|
2523
2540
|
center: point,
|
|
2524
2541
|
radius: length,
|
|
2525
2542
|
layer: visible_layer,
|
|
2526
2543
|
stroke_width: length.default("1mm"),
|
|
2527
|
-
is_filled:
|
|
2544
|
+
is_filled: z121.boolean().optional()
|
|
2528
2545
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2529
2546
|
expectTypesMatch(true);
|
|
2530
2547
|
|
|
2531
2548
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2532
|
-
import { z as
|
|
2533
|
-
var pcb_silkscreen_oval =
|
|
2534
|
-
type:
|
|
2549
|
+
import { z as z122 } from "zod";
|
|
2550
|
+
var pcb_silkscreen_oval = z122.object({
|
|
2551
|
+
type: z122.literal("pcb_silkscreen_oval"),
|
|
2535
2552
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2536
|
-
pcb_component_id:
|
|
2537
|
-
pcb_group_id:
|
|
2538
|
-
subcircuit_id:
|
|
2553
|
+
pcb_component_id: z122.string(),
|
|
2554
|
+
pcb_group_id: z122.string().optional(),
|
|
2555
|
+
subcircuit_id: z122.string().optional(),
|
|
2539
2556
|
center: point,
|
|
2540
2557
|
radius_x: distance,
|
|
2541
2558
|
radius_y: distance,
|
|
@@ -2545,265 +2562,265 @@ var pcb_silkscreen_oval = z121.object({
|
|
|
2545
2562
|
expectTypesMatch(true);
|
|
2546
2563
|
|
|
2547
2564
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2548
|
-
import { z as
|
|
2549
|
-
var pcb_silkscreen_graphic_base =
|
|
2550
|
-
type:
|
|
2565
|
+
import { z as z123 } from "zod";
|
|
2566
|
+
var pcb_silkscreen_graphic_base = z123.object({
|
|
2567
|
+
type: z123.literal("pcb_silkscreen_graphic"),
|
|
2551
2568
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2552
2569
|
"pcb_silkscreen_graphic"
|
|
2553
2570
|
),
|
|
2554
|
-
pcb_component_id:
|
|
2555
|
-
pcb_group_id:
|
|
2556
|
-
subcircuit_id:
|
|
2571
|
+
pcb_component_id: z123.string(),
|
|
2572
|
+
pcb_group_id: z123.string().optional(),
|
|
2573
|
+
subcircuit_id: z123.string().optional(),
|
|
2557
2574
|
layer: visible_layer,
|
|
2558
2575
|
image_asset: asset.optional()
|
|
2559
2576
|
});
|
|
2560
2577
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2561
|
-
shape:
|
|
2578
|
+
shape: z123.literal("brep"),
|
|
2562
2579
|
brep_shape
|
|
2563
2580
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2564
2581
|
expectTypesMatch(
|
|
2565
2582
|
true
|
|
2566
2583
|
);
|
|
2567
|
-
var pcb_silkscreen_graphic =
|
|
2584
|
+
var pcb_silkscreen_graphic = z123.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2568
2585
|
expectTypesMatch(true);
|
|
2569
2586
|
|
|
2570
2587
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2571
|
-
import { z as
|
|
2572
|
-
var pcb_silkscreen_pill =
|
|
2573
|
-
type:
|
|
2588
|
+
import { z as z124 } from "zod";
|
|
2589
|
+
var pcb_silkscreen_pill = z124.object({
|
|
2590
|
+
type: z124.literal("pcb_silkscreen_pill"),
|
|
2574
2591
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2575
|
-
pcb_component_id:
|
|
2576
|
-
pcb_group_id:
|
|
2577
|
-
subcircuit_id:
|
|
2592
|
+
pcb_component_id: z124.string(),
|
|
2593
|
+
pcb_group_id: z124.string().optional(),
|
|
2594
|
+
subcircuit_id: z124.string().optional(),
|
|
2578
2595
|
center: point,
|
|
2579
2596
|
width: length,
|
|
2580
2597
|
height: length,
|
|
2581
2598
|
layer: layer_ref,
|
|
2582
|
-
ccw_rotation:
|
|
2599
|
+
ccw_rotation: z124.number().optional()
|
|
2583
2600
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2584
2601
|
expectTypesMatch(true);
|
|
2585
2602
|
|
|
2586
2603
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2587
|
-
import { z as
|
|
2588
|
-
var pcb_fabrication_note_text =
|
|
2589
|
-
type:
|
|
2604
|
+
import { z as z125 } from "zod";
|
|
2605
|
+
var pcb_fabrication_note_text = z125.object({
|
|
2606
|
+
type: z125.literal("pcb_fabrication_note_text"),
|
|
2590
2607
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2591
2608
|
"pcb_fabrication_note_text"
|
|
2592
2609
|
),
|
|
2593
|
-
subcircuit_id:
|
|
2594
|
-
pcb_group_id:
|
|
2595
|
-
font:
|
|
2610
|
+
subcircuit_id: z125.string().optional(),
|
|
2611
|
+
pcb_group_id: z125.string().optional(),
|
|
2612
|
+
font: z125.literal("tscircuit2024").default("tscircuit2024"),
|
|
2596
2613
|
font_size: distance.default("1mm"),
|
|
2597
|
-
pcb_component_id:
|
|
2598
|
-
text:
|
|
2599
|
-
ccw_rotation:
|
|
2614
|
+
pcb_component_id: z125.string(),
|
|
2615
|
+
text: z125.string(),
|
|
2616
|
+
ccw_rotation: z125.number().optional(),
|
|
2600
2617
|
layer: visible_layer,
|
|
2601
2618
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2602
|
-
anchor_alignment:
|
|
2603
|
-
color:
|
|
2619
|
+
anchor_alignment: z125.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2620
|
+
color: z125.string().optional()
|
|
2604
2621
|
}).describe(
|
|
2605
2622
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2606
2623
|
);
|
|
2607
2624
|
expectTypesMatch(true);
|
|
2608
2625
|
|
|
2609
2626
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2610
|
-
import { z as
|
|
2611
|
-
var pcb_fabrication_note_path =
|
|
2612
|
-
type:
|
|
2627
|
+
import { z as z126 } from "zod";
|
|
2628
|
+
var pcb_fabrication_note_path = z126.object({
|
|
2629
|
+
type: z126.literal("pcb_fabrication_note_path"),
|
|
2613
2630
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2614
2631
|
"pcb_fabrication_note_path"
|
|
2615
2632
|
),
|
|
2616
|
-
pcb_component_id:
|
|
2617
|
-
subcircuit_id:
|
|
2633
|
+
pcb_component_id: z126.string(),
|
|
2634
|
+
subcircuit_id: z126.string().optional(),
|
|
2618
2635
|
layer: layer_ref,
|
|
2619
|
-
route:
|
|
2636
|
+
route: z126.array(point),
|
|
2620
2637
|
stroke_width: length,
|
|
2621
|
-
color:
|
|
2638
|
+
color: z126.string().optional()
|
|
2622
2639
|
}).describe(
|
|
2623
2640
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2624
2641
|
);
|
|
2625
2642
|
expectTypesMatch(true);
|
|
2626
2643
|
|
|
2627
2644
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2628
|
-
import { z as
|
|
2629
|
-
var pcb_fabrication_note_rect =
|
|
2630
|
-
type:
|
|
2645
|
+
import { z as z127 } from "zod";
|
|
2646
|
+
var pcb_fabrication_note_rect = z127.object({
|
|
2647
|
+
type: z127.literal("pcb_fabrication_note_rect"),
|
|
2631
2648
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2632
2649
|
"pcb_fabrication_note_rect"
|
|
2633
2650
|
),
|
|
2634
|
-
pcb_component_id:
|
|
2635
|
-
pcb_group_id:
|
|
2636
|
-
subcircuit_id:
|
|
2651
|
+
pcb_component_id: z127.string(),
|
|
2652
|
+
pcb_group_id: z127.string().optional(),
|
|
2653
|
+
subcircuit_id: z127.string().optional(),
|
|
2637
2654
|
center: point,
|
|
2638
2655
|
width: length,
|
|
2639
2656
|
height: length,
|
|
2640
2657
|
layer: visible_layer,
|
|
2641
2658
|
stroke_width: length.default("0.1mm"),
|
|
2642
2659
|
corner_radius: length.optional(),
|
|
2643
|
-
is_filled:
|
|
2644
|
-
has_stroke:
|
|
2645
|
-
is_stroke_dashed:
|
|
2646
|
-
color:
|
|
2660
|
+
is_filled: z127.boolean().optional(),
|
|
2661
|
+
has_stroke: z127.boolean().optional(),
|
|
2662
|
+
is_stroke_dashed: z127.boolean().optional(),
|
|
2663
|
+
color: z127.string().optional()
|
|
2647
2664
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2648
2665
|
expectTypesMatch(true);
|
|
2649
2666
|
|
|
2650
2667
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2651
|
-
import { z as
|
|
2652
|
-
var pcb_fabrication_note_dimension =
|
|
2653
|
-
type:
|
|
2668
|
+
import { z as z128 } from "zod";
|
|
2669
|
+
var pcb_fabrication_note_dimension = z128.object({
|
|
2670
|
+
type: z128.literal("pcb_fabrication_note_dimension"),
|
|
2654
2671
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2655
2672
|
"pcb_fabrication_note_dimension"
|
|
2656
2673
|
),
|
|
2657
|
-
pcb_component_id:
|
|
2658
|
-
pcb_group_id:
|
|
2659
|
-
subcircuit_id:
|
|
2674
|
+
pcb_component_id: z128.string(),
|
|
2675
|
+
pcb_group_id: z128.string().optional(),
|
|
2676
|
+
subcircuit_id: z128.string().optional(),
|
|
2660
2677
|
layer: visible_layer,
|
|
2661
2678
|
from: point,
|
|
2662
2679
|
to: point,
|
|
2663
|
-
text:
|
|
2664
|
-
text_ccw_rotation:
|
|
2680
|
+
text: z128.string().optional(),
|
|
2681
|
+
text_ccw_rotation: z128.number().optional(),
|
|
2665
2682
|
offset: length.optional(),
|
|
2666
2683
|
offset_distance: length.optional(),
|
|
2667
|
-
offset_direction:
|
|
2668
|
-
x:
|
|
2669
|
-
y:
|
|
2684
|
+
offset_direction: z128.object({
|
|
2685
|
+
x: z128.number(),
|
|
2686
|
+
y: z128.number()
|
|
2670
2687
|
}).optional(),
|
|
2671
|
-
font:
|
|
2688
|
+
font: z128.literal("tscircuit2024").default("tscircuit2024"),
|
|
2672
2689
|
font_size: length.default("1mm"),
|
|
2673
|
-
color:
|
|
2690
|
+
color: z128.string().optional(),
|
|
2674
2691
|
arrow_size: length.default("1mm")
|
|
2675
2692
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2676
2693
|
expectTypesMatch(true);
|
|
2677
2694
|
|
|
2678
2695
|
// src/pcb/pcb_note_text.ts
|
|
2679
|
-
import { z as
|
|
2680
|
-
var pcb_note_text =
|
|
2681
|
-
type:
|
|
2696
|
+
import { z as z129 } from "zod";
|
|
2697
|
+
var pcb_note_text = z129.object({
|
|
2698
|
+
type: z129.literal("pcb_note_text"),
|
|
2682
2699
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2683
|
-
pcb_component_id:
|
|
2684
|
-
pcb_group_id:
|
|
2685
|
-
subcircuit_id:
|
|
2686
|
-
name:
|
|
2687
|
-
font:
|
|
2700
|
+
pcb_component_id: z129.string().optional(),
|
|
2701
|
+
pcb_group_id: z129.string().optional(),
|
|
2702
|
+
subcircuit_id: z129.string().optional(),
|
|
2703
|
+
name: z129.string().optional(),
|
|
2704
|
+
font: z129.literal("tscircuit2024").default("tscircuit2024"),
|
|
2688
2705
|
font_size: distance.default("1mm"),
|
|
2689
|
-
text:
|
|
2706
|
+
text: z129.string().optional(),
|
|
2690
2707
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2691
|
-
anchor_alignment:
|
|
2708
|
+
anchor_alignment: z129.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2692
2709
|
layer: visible_layer.default("top"),
|
|
2693
|
-
is_mirrored_from_top_view:
|
|
2694
|
-
color:
|
|
2710
|
+
is_mirrored_from_top_view: z129.boolean().optional(),
|
|
2711
|
+
color: z129.string().optional()
|
|
2695
2712
|
}).describe("Defines a documentation note in text on the PCB");
|
|
2696
2713
|
expectTypesMatch(true);
|
|
2697
2714
|
|
|
2698
2715
|
// src/pcb/pcb_note_rect.ts
|
|
2699
|
-
import { z as
|
|
2700
|
-
var pcb_note_rect =
|
|
2701
|
-
type:
|
|
2716
|
+
import { z as z130 } from "zod";
|
|
2717
|
+
var pcb_note_rect = z130.object({
|
|
2718
|
+
type: z130.literal("pcb_note_rect"),
|
|
2702
2719
|
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2703
|
-
pcb_component_id:
|
|
2704
|
-
pcb_group_id:
|
|
2705
|
-
subcircuit_id:
|
|
2706
|
-
name:
|
|
2707
|
-
text:
|
|
2720
|
+
pcb_component_id: z130.string().optional(),
|
|
2721
|
+
pcb_group_id: z130.string().optional(),
|
|
2722
|
+
subcircuit_id: z130.string().optional(),
|
|
2723
|
+
name: z130.string().optional(),
|
|
2724
|
+
text: z130.string().optional(),
|
|
2708
2725
|
center: point,
|
|
2709
2726
|
width: length,
|
|
2710
2727
|
height: length,
|
|
2711
2728
|
layer: visible_layer.default("top"),
|
|
2712
2729
|
stroke_width: length.default("0.1mm"),
|
|
2713
2730
|
corner_radius: length.optional(),
|
|
2714
|
-
is_filled:
|
|
2715
|
-
has_stroke:
|
|
2716
|
-
is_stroke_dashed:
|
|
2717
|
-
color:
|
|
2731
|
+
is_filled: z130.boolean().optional(),
|
|
2732
|
+
has_stroke: z130.boolean().optional(),
|
|
2733
|
+
is_stroke_dashed: z130.boolean().optional(),
|
|
2734
|
+
color: z130.string().optional()
|
|
2718
2735
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2719
2736
|
expectTypesMatch(true);
|
|
2720
2737
|
|
|
2721
2738
|
// src/pcb/pcb_note_path.ts
|
|
2722
|
-
import { z as
|
|
2723
|
-
var pcb_note_path =
|
|
2724
|
-
type:
|
|
2739
|
+
import { z as z131 } from "zod";
|
|
2740
|
+
var pcb_note_path = z131.object({
|
|
2741
|
+
type: z131.literal("pcb_note_path"),
|
|
2725
2742
|
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2726
|
-
pcb_component_id:
|
|
2727
|
-
pcb_group_id:
|
|
2728
|
-
subcircuit_id:
|
|
2729
|
-
name:
|
|
2730
|
-
text:
|
|
2731
|
-
route:
|
|
2743
|
+
pcb_component_id: z131.string().optional(),
|
|
2744
|
+
pcb_group_id: z131.string().optional(),
|
|
2745
|
+
subcircuit_id: z131.string().optional(),
|
|
2746
|
+
name: z131.string().optional(),
|
|
2747
|
+
text: z131.string().optional(),
|
|
2748
|
+
route: z131.array(point),
|
|
2732
2749
|
layer: visible_layer.default("top"),
|
|
2733
2750
|
stroke_width: length.default("0.1mm"),
|
|
2734
|
-
color:
|
|
2751
|
+
color: z131.string().optional()
|
|
2735
2752
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
2736
2753
|
expectTypesMatch(true);
|
|
2737
2754
|
|
|
2738
2755
|
// src/pcb/pcb_note_line.ts
|
|
2739
|
-
import { z as
|
|
2740
|
-
var pcb_note_line =
|
|
2741
|
-
type:
|
|
2756
|
+
import { z as z132 } from "zod";
|
|
2757
|
+
var pcb_note_line = z132.object({
|
|
2758
|
+
type: z132.literal("pcb_note_line"),
|
|
2742
2759
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2743
|
-
pcb_component_id:
|
|
2744
|
-
pcb_group_id:
|
|
2745
|
-
subcircuit_id:
|
|
2746
|
-
name:
|
|
2747
|
-
text:
|
|
2760
|
+
pcb_component_id: z132.string().optional(),
|
|
2761
|
+
pcb_group_id: z132.string().optional(),
|
|
2762
|
+
subcircuit_id: z132.string().optional(),
|
|
2763
|
+
name: z132.string().optional(),
|
|
2764
|
+
text: z132.string().optional(),
|
|
2748
2765
|
x1: distance,
|
|
2749
2766
|
y1: distance,
|
|
2750
2767
|
x2: distance,
|
|
2751
2768
|
y2: distance,
|
|
2752
2769
|
layer: visible_layer.default("top"),
|
|
2753
2770
|
stroke_width: distance.default("0.1mm"),
|
|
2754
|
-
color:
|
|
2755
|
-
is_dashed:
|
|
2771
|
+
color: z132.string().optional(),
|
|
2772
|
+
is_dashed: z132.boolean().optional()
|
|
2756
2773
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2757
2774
|
expectTypesMatch(true);
|
|
2758
2775
|
|
|
2759
2776
|
// src/pcb/pcb_note_dimension.ts
|
|
2760
|
-
import { z as
|
|
2761
|
-
var pcb_note_dimension =
|
|
2762
|
-
type:
|
|
2777
|
+
import { z as z133 } from "zod";
|
|
2778
|
+
var pcb_note_dimension = z133.object({
|
|
2779
|
+
type: z133.literal("pcb_note_dimension"),
|
|
2763
2780
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2764
|
-
pcb_component_id:
|
|
2765
|
-
pcb_group_id:
|
|
2766
|
-
subcircuit_id:
|
|
2767
|
-
name:
|
|
2781
|
+
pcb_component_id: z133.string().optional(),
|
|
2782
|
+
pcb_group_id: z133.string().optional(),
|
|
2783
|
+
subcircuit_id: z133.string().optional(),
|
|
2784
|
+
name: z133.string().optional(),
|
|
2768
2785
|
from: point,
|
|
2769
2786
|
to: point,
|
|
2770
|
-
text:
|
|
2771
|
-
text_ccw_rotation:
|
|
2787
|
+
text: z133.string().optional(),
|
|
2788
|
+
text_ccw_rotation: z133.number().optional(),
|
|
2772
2789
|
offset_distance: length.optional(),
|
|
2773
|
-
offset_direction:
|
|
2774
|
-
x:
|
|
2775
|
-
y:
|
|
2790
|
+
offset_direction: z133.object({
|
|
2791
|
+
x: z133.number(),
|
|
2792
|
+
y: z133.number()
|
|
2776
2793
|
}).optional(),
|
|
2777
|
-
font:
|
|
2794
|
+
font: z133.literal("tscircuit2024").default("tscircuit2024"),
|
|
2778
2795
|
font_size: length.default("1mm"),
|
|
2779
2796
|
layer: visible_layer.default("top"),
|
|
2780
|
-
color:
|
|
2797
|
+
color: z133.string().optional(),
|
|
2781
2798
|
arrow_size: length.default("1mm")
|
|
2782
2799
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2783
2800
|
expectTypesMatch(true);
|
|
2784
2801
|
|
|
2785
2802
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2786
|
-
import { z as
|
|
2803
|
+
import { z as z134 } from "zod";
|
|
2787
2804
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
2788
|
-
type:
|
|
2805
|
+
type: z134.literal("pcb_footprint_overlap_error"),
|
|
2789
2806
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2790
|
-
error_type:
|
|
2791
|
-
pcb_smtpad_ids:
|
|
2792
|
-
pcb_plated_hole_ids:
|
|
2793
|
-
pcb_hole_ids:
|
|
2794
|
-
pcb_keepout_ids:
|
|
2807
|
+
error_type: z134.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2808
|
+
pcb_smtpad_ids: z134.array(z134.string()).optional(),
|
|
2809
|
+
pcb_plated_hole_ids: z134.array(z134.string()).optional(),
|
|
2810
|
+
pcb_hole_ids: z134.array(z134.string()).optional(),
|
|
2811
|
+
pcb_keepout_ids: z134.array(z134.string()).optional()
|
|
2795
2812
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2796
2813
|
expectTypesMatch(
|
|
2797
2814
|
true
|
|
2798
2815
|
);
|
|
2799
2816
|
|
|
2800
2817
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
2801
|
-
import { z as
|
|
2818
|
+
import { z as z135 } from "zod";
|
|
2802
2819
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
2803
|
-
type:
|
|
2820
|
+
type: z135.literal("pcb_courtyard_overlap_error"),
|
|
2804
2821
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2805
|
-
error_type:
|
|
2806
|
-
pcb_component_ids:
|
|
2822
|
+
error_type: z135.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
2823
|
+
pcb_component_ids: z135.tuple([z135.string(), z135.string()])
|
|
2807
2824
|
}).describe(
|
|
2808
2825
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
2809
2826
|
);
|
|
@@ -2812,49 +2829,49 @@ expectTypesMatch(
|
|
|
2812
2829
|
);
|
|
2813
2830
|
|
|
2814
2831
|
// src/pcb/pcb_keepout.ts
|
|
2815
|
-
import { z as
|
|
2816
|
-
var pcb_keepout =
|
|
2817
|
-
type:
|
|
2818
|
-
shape:
|
|
2819
|
-
pcb_group_id:
|
|
2820
|
-
subcircuit_id:
|
|
2832
|
+
import { z as z136 } from "zod";
|
|
2833
|
+
var pcb_keepout = z136.object({
|
|
2834
|
+
type: z136.literal("pcb_keepout"),
|
|
2835
|
+
shape: z136.literal("rect"),
|
|
2836
|
+
pcb_group_id: z136.string().optional(),
|
|
2837
|
+
subcircuit_id: z136.string().optional(),
|
|
2821
2838
|
center: point,
|
|
2822
2839
|
width: distance,
|
|
2823
2840
|
height: distance,
|
|
2824
|
-
pcb_keepout_id:
|
|
2825
|
-
layers:
|
|
2841
|
+
pcb_keepout_id: z136.string(),
|
|
2842
|
+
layers: z136.array(z136.string()),
|
|
2826
2843
|
// Specify layers where the keepout applies
|
|
2827
|
-
description:
|
|
2844
|
+
description: z136.string().optional()
|
|
2828
2845
|
// Optional description of the keepout
|
|
2829
2846
|
}).or(
|
|
2830
|
-
|
|
2831
|
-
type:
|
|
2832
|
-
shape:
|
|
2833
|
-
pcb_group_id:
|
|
2834
|
-
subcircuit_id:
|
|
2847
|
+
z136.object({
|
|
2848
|
+
type: z136.literal("pcb_keepout"),
|
|
2849
|
+
shape: z136.literal("circle"),
|
|
2850
|
+
pcb_group_id: z136.string().optional(),
|
|
2851
|
+
subcircuit_id: z136.string().optional(),
|
|
2835
2852
|
center: point,
|
|
2836
2853
|
radius: distance,
|
|
2837
|
-
pcb_keepout_id:
|
|
2838
|
-
layers:
|
|
2854
|
+
pcb_keepout_id: z136.string(),
|
|
2855
|
+
layers: z136.array(z136.string()),
|
|
2839
2856
|
// Specify layers where the keepout applies
|
|
2840
|
-
description:
|
|
2857
|
+
description: z136.string().optional()
|
|
2841
2858
|
// Optional description of the keepout
|
|
2842
2859
|
})
|
|
2843
2860
|
);
|
|
2844
2861
|
expectTypesMatch(true);
|
|
2845
2862
|
|
|
2846
2863
|
// src/pcb/pcb_cutout.ts
|
|
2847
|
-
import { z as
|
|
2848
|
-
var pcb_cutout_base =
|
|
2849
|
-
type:
|
|
2864
|
+
import { z as z137 } from "zod";
|
|
2865
|
+
var pcb_cutout_base = z137.object({
|
|
2866
|
+
type: z137.literal("pcb_cutout"),
|
|
2850
2867
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2851
|
-
pcb_group_id:
|
|
2852
|
-
subcircuit_id:
|
|
2853
|
-
pcb_board_id:
|
|
2854
|
-
pcb_panel_id:
|
|
2868
|
+
pcb_group_id: z137.string().optional(),
|
|
2869
|
+
subcircuit_id: z137.string().optional(),
|
|
2870
|
+
pcb_board_id: z137.string().optional(),
|
|
2871
|
+
pcb_panel_id: z137.string().optional()
|
|
2855
2872
|
});
|
|
2856
2873
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2857
|
-
shape:
|
|
2874
|
+
shape: z137.literal("rect"),
|
|
2858
2875
|
center: point,
|
|
2859
2876
|
width: length,
|
|
2860
2877
|
height: length,
|
|
@@ -2863,26 +2880,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2863
2880
|
});
|
|
2864
2881
|
expectTypesMatch(true);
|
|
2865
2882
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2866
|
-
shape:
|
|
2883
|
+
shape: z137.literal("circle"),
|
|
2867
2884
|
center: point,
|
|
2868
2885
|
radius: length
|
|
2869
2886
|
});
|
|
2870
2887
|
expectTypesMatch(true);
|
|
2871
2888
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2872
|
-
shape:
|
|
2873
|
-
points:
|
|
2889
|
+
shape: z137.literal("polygon"),
|
|
2890
|
+
points: z137.array(point)
|
|
2874
2891
|
});
|
|
2875
2892
|
expectTypesMatch(true);
|
|
2876
2893
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2877
|
-
shape:
|
|
2878
|
-
route:
|
|
2894
|
+
shape: z137.literal("path"),
|
|
2895
|
+
route: z137.array(point),
|
|
2879
2896
|
slot_width: length,
|
|
2880
2897
|
slot_length: length.optional(),
|
|
2881
2898
|
space_between_slots: length.optional(),
|
|
2882
2899
|
slot_corner_radius: length.optional()
|
|
2883
2900
|
});
|
|
2884
2901
|
expectTypesMatch(true);
|
|
2885
|
-
var pcb_cutout =
|
|
2902
|
+
var pcb_cutout = z137.discriminatedUnion("shape", [
|
|
2886
2903
|
pcb_cutout_rect,
|
|
2887
2904
|
pcb_cutout_circle,
|
|
2888
2905
|
pcb_cutout_polygon,
|
|
@@ -2891,169 +2908,169 @@ var pcb_cutout = z136.discriminatedUnion("shape", [
|
|
|
2891
2908
|
expectTypesMatch(true);
|
|
2892
2909
|
|
|
2893
2910
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2894
|
-
import { z as
|
|
2911
|
+
import { z as z138 } from "zod";
|
|
2895
2912
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
2896
|
-
type:
|
|
2913
|
+
type: z138.literal("pcb_missing_footprint_error"),
|
|
2897
2914
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2898
2915
|
"pcb_missing_footprint_error"
|
|
2899
2916
|
),
|
|
2900
|
-
pcb_group_id:
|
|
2901
|
-
subcircuit_id:
|
|
2902
|
-
error_type:
|
|
2903
|
-
source_component_id:
|
|
2917
|
+
pcb_group_id: z138.string().optional(),
|
|
2918
|
+
subcircuit_id: z138.string().optional(),
|
|
2919
|
+
error_type: z138.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2920
|
+
source_component_id: z138.string()
|
|
2904
2921
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2905
2922
|
expectTypesMatch(
|
|
2906
2923
|
true
|
|
2907
2924
|
);
|
|
2908
2925
|
|
|
2909
2926
|
// src/pcb/external_footprint_load_error.ts
|
|
2910
|
-
import { z as
|
|
2927
|
+
import { z as z139 } from "zod";
|
|
2911
2928
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
2912
|
-
type:
|
|
2929
|
+
type: z139.literal("external_footprint_load_error"),
|
|
2913
2930
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2914
2931
|
"external_footprint_load_error"
|
|
2915
2932
|
),
|
|
2916
|
-
pcb_component_id:
|
|
2917
|
-
source_component_id:
|
|
2918
|
-
pcb_group_id:
|
|
2919
|
-
subcircuit_id:
|
|
2920
|
-
footprinter_string:
|
|
2921
|
-
error_type:
|
|
2933
|
+
pcb_component_id: z139.string(),
|
|
2934
|
+
source_component_id: z139.string(),
|
|
2935
|
+
pcb_group_id: z139.string().optional(),
|
|
2936
|
+
subcircuit_id: z139.string().optional(),
|
|
2937
|
+
footprinter_string: z139.string().optional(),
|
|
2938
|
+
error_type: z139.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
2922
2939
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2923
2940
|
expectTypesMatch(true);
|
|
2924
2941
|
|
|
2925
2942
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2926
|
-
import { z as
|
|
2943
|
+
import { z as z140 } from "zod";
|
|
2927
2944
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
2928
|
-
type:
|
|
2945
|
+
type: z140.literal("circuit_json_footprint_load_error"),
|
|
2929
2946
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2930
2947
|
"circuit_json_footprint_load_error"
|
|
2931
2948
|
),
|
|
2932
|
-
pcb_component_id:
|
|
2933
|
-
source_component_id:
|
|
2934
|
-
pcb_group_id:
|
|
2935
|
-
subcircuit_id:
|
|
2936
|
-
error_type:
|
|
2937
|
-
circuit_json:
|
|
2949
|
+
pcb_component_id: z140.string(),
|
|
2950
|
+
source_component_id: z140.string(),
|
|
2951
|
+
pcb_group_id: z140.string().optional(),
|
|
2952
|
+
subcircuit_id: z140.string().optional(),
|
|
2953
|
+
error_type: z140.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2954
|
+
circuit_json: z140.array(z140.any()).optional()
|
|
2938
2955
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2939
2956
|
expectTypesMatch(true);
|
|
2940
2957
|
|
|
2941
2958
|
// src/pcb/pcb_group.ts
|
|
2942
|
-
import { z as
|
|
2943
|
-
var pcb_group =
|
|
2944
|
-
type:
|
|
2959
|
+
import { z as z141 } from "zod";
|
|
2960
|
+
var pcb_group = z141.object({
|
|
2961
|
+
type: z141.literal("pcb_group"),
|
|
2945
2962
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2946
|
-
source_group_id:
|
|
2947
|
-
is_subcircuit:
|
|
2948
|
-
subcircuit_id:
|
|
2963
|
+
source_group_id: z141.string(),
|
|
2964
|
+
is_subcircuit: z141.boolean().optional(),
|
|
2965
|
+
subcircuit_id: z141.string().optional(),
|
|
2949
2966
|
width: length.optional(),
|
|
2950
2967
|
height: length.optional(),
|
|
2951
2968
|
center: point,
|
|
2952
|
-
display_offset_x:
|
|
2969
|
+
display_offset_x: z141.string().optional().describe(
|
|
2953
2970
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
2954
2971
|
),
|
|
2955
|
-
display_offset_y:
|
|
2972
|
+
display_offset_y: z141.string().optional().describe(
|
|
2956
2973
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
2957
2974
|
),
|
|
2958
|
-
outline:
|
|
2975
|
+
outline: z141.array(point).optional(),
|
|
2959
2976
|
anchor_position: point.optional(),
|
|
2960
2977
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
2961
|
-
position_mode:
|
|
2962
|
-
positioned_relative_to_pcb_group_id:
|
|
2963
|
-
positioned_relative_to_pcb_board_id:
|
|
2964
|
-
pcb_component_ids:
|
|
2965
|
-
child_layout_mode:
|
|
2966
|
-
name:
|
|
2967
|
-
description:
|
|
2968
|
-
layout_mode:
|
|
2969
|
-
autorouter_configuration:
|
|
2978
|
+
position_mode: z141.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
2979
|
+
positioned_relative_to_pcb_group_id: z141.string().optional(),
|
|
2980
|
+
positioned_relative_to_pcb_board_id: z141.string().optional(),
|
|
2981
|
+
pcb_component_ids: z141.array(z141.string()),
|
|
2982
|
+
child_layout_mode: z141.enum(["packed", "none"]).optional(),
|
|
2983
|
+
name: z141.string().optional(),
|
|
2984
|
+
description: z141.string().optional(),
|
|
2985
|
+
layout_mode: z141.string().optional(),
|
|
2986
|
+
autorouter_configuration: z141.object({
|
|
2970
2987
|
trace_clearance: length
|
|
2971
2988
|
}).optional(),
|
|
2972
|
-
autorouter_used_string:
|
|
2989
|
+
autorouter_used_string: z141.string().optional()
|
|
2973
2990
|
}).describe("Defines a group of components on the PCB");
|
|
2974
2991
|
expectTypesMatch(true);
|
|
2975
2992
|
|
|
2976
2993
|
// src/pcb/pcb_autorouting_error.ts
|
|
2977
|
-
import { z as
|
|
2994
|
+
import { z as z142 } from "zod";
|
|
2978
2995
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
2979
|
-
type:
|
|
2996
|
+
type: z142.literal("pcb_autorouting_error"),
|
|
2980
2997
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2981
|
-
error_type:
|
|
2982
|
-
subcircuit_id:
|
|
2998
|
+
error_type: z142.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2999
|
+
subcircuit_id: z142.string().optional()
|
|
2983
3000
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2984
3001
|
expectTypesMatch(true);
|
|
2985
3002
|
|
|
2986
3003
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2987
|
-
import { z as
|
|
2988
|
-
var pcb_manual_edit_conflict_warning =
|
|
2989
|
-
type:
|
|
3004
|
+
import { z as z143 } from "zod";
|
|
3005
|
+
var pcb_manual_edit_conflict_warning = z143.object({
|
|
3006
|
+
type: z143.literal("pcb_manual_edit_conflict_warning"),
|
|
2990
3007
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2991
3008
|
"pcb_manual_edit_conflict_warning"
|
|
2992
3009
|
),
|
|
2993
|
-
warning_type:
|
|
2994
|
-
message:
|
|
2995
|
-
pcb_component_id:
|
|
2996
|
-
pcb_group_id:
|
|
2997
|
-
subcircuit_id:
|
|
2998
|
-
source_component_id:
|
|
3010
|
+
warning_type: z143.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3011
|
+
message: z143.string(),
|
|
3012
|
+
pcb_component_id: z143.string(),
|
|
3013
|
+
pcb_group_id: z143.string().optional(),
|
|
3014
|
+
subcircuit_id: z143.string().optional(),
|
|
3015
|
+
source_component_id: z143.string()
|
|
2999
3016
|
}).describe(
|
|
3000
3017
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3001
3018
|
);
|
|
3002
3019
|
expectTypesMatch(true);
|
|
3003
3020
|
|
|
3004
3021
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3005
|
-
import { z as
|
|
3006
|
-
var connectorOrientationDirection =
|
|
3007
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3008
|
-
type:
|
|
3022
|
+
import { z as z144 } from "zod";
|
|
3023
|
+
var connectorOrientationDirection = z144.enum(["x-", "x+", "y+", "y-"]);
|
|
3024
|
+
var pcb_connector_not_in_accessible_orientation_warning = z144.object({
|
|
3025
|
+
type: z144.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3009
3026
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3010
3027
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3011
3028
|
),
|
|
3012
|
-
warning_type:
|
|
3013
|
-
message:
|
|
3014
|
-
pcb_component_id:
|
|
3015
|
-
source_component_id:
|
|
3016
|
-
pcb_board_id:
|
|
3029
|
+
warning_type: z144.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3030
|
+
message: z144.string(),
|
|
3031
|
+
pcb_component_id: z144.string(),
|
|
3032
|
+
source_component_id: z144.string().optional(),
|
|
3033
|
+
pcb_board_id: z144.string().optional(),
|
|
3017
3034
|
facing_direction: connectorOrientationDirection,
|
|
3018
3035
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3019
|
-
subcircuit_id:
|
|
3036
|
+
subcircuit_id: z144.string().optional()
|
|
3020
3037
|
}).describe(
|
|
3021
3038
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3022
3039
|
);
|
|
3023
3040
|
expectTypesMatch(true);
|
|
3024
3041
|
|
|
3025
3042
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3026
|
-
import { z as
|
|
3027
|
-
var supplier_footprint_mismatch_warning =
|
|
3028
|
-
type:
|
|
3043
|
+
import { z as z145 } from "zod";
|
|
3044
|
+
var supplier_footprint_mismatch_warning = z145.object({
|
|
3045
|
+
type: z145.literal("supplier_footprint_mismatch_warning"),
|
|
3029
3046
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3030
3047
|
"supplier_footprint_mismatch_warning"
|
|
3031
3048
|
),
|
|
3032
|
-
warning_type:
|
|
3033
|
-
message:
|
|
3034
|
-
source_component_id:
|
|
3035
|
-
pcb_component_id:
|
|
3036
|
-
pcb_group_id:
|
|
3037
|
-
subcircuit_id:
|
|
3049
|
+
warning_type: z145.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3050
|
+
message: z145.string(),
|
|
3051
|
+
source_component_id: z145.string(),
|
|
3052
|
+
pcb_component_id: z145.string().optional(),
|
|
3053
|
+
pcb_group_id: z145.string().optional(),
|
|
3054
|
+
subcircuit_id: z145.string().optional(),
|
|
3038
3055
|
supplier_name: supplier_name.optional(),
|
|
3039
|
-
supplier_part_number:
|
|
3040
|
-
supplier_footprint_url:
|
|
3041
|
-
footprint_copper_intersection_over_union:
|
|
3056
|
+
supplier_part_number: z145.string().optional(),
|
|
3057
|
+
supplier_footprint_url: z145.string().optional(),
|
|
3058
|
+
footprint_copper_intersection_over_union: z145.number()
|
|
3042
3059
|
}).describe(
|
|
3043
3060
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3044
3061
|
);
|
|
3045
3062
|
expectTypesMatch(true);
|
|
3046
3063
|
|
|
3047
3064
|
// src/pcb/pcb_breakout_point.ts
|
|
3048
|
-
import { z as
|
|
3049
|
-
var pcb_breakout_point =
|
|
3050
|
-
type:
|
|
3065
|
+
import { z as z146 } from "zod";
|
|
3066
|
+
var pcb_breakout_point = z146.object({
|
|
3067
|
+
type: z146.literal("pcb_breakout_point"),
|
|
3051
3068
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3052
|
-
pcb_group_id:
|
|
3053
|
-
subcircuit_id:
|
|
3054
|
-
source_trace_id:
|
|
3055
|
-
source_port_id:
|
|
3056
|
-
source_net_id:
|
|
3069
|
+
pcb_group_id: z146.string(),
|
|
3070
|
+
subcircuit_id: z146.string().optional(),
|
|
3071
|
+
source_trace_id: z146.string().optional(),
|
|
3072
|
+
source_port_id: z146.string().optional(),
|
|
3073
|
+
source_net_id: z146.string().optional(),
|
|
3057
3074
|
x: distance,
|
|
3058
3075
|
y: distance
|
|
3059
3076
|
}).describe(
|
|
@@ -3062,61 +3079,61 @@ var pcb_breakout_point = z145.object({
|
|
|
3062
3079
|
expectTypesMatch(true);
|
|
3063
3080
|
|
|
3064
3081
|
// src/pcb/pcb_ground_plane.ts
|
|
3065
|
-
import { z as
|
|
3066
|
-
var pcb_ground_plane =
|
|
3067
|
-
type:
|
|
3082
|
+
import { z as z147 } from "zod";
|
|
3083
|
+
var pcb_ground_plane = z147.object({
|
|
3084
|
+
type: z147.literal("pcb_ground_plane"),
|
|
3068
3085
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3069
|
-
source_pcb_ground_plane_id:
|
|
3070
|
-
source_net_id:
|
|
3071
|
-
pcb_group_id:
|
|
3072
|
-
subcircuit_id:
|
|
3086
|
+
source_pcb_ground_plane_id: z147.string(),
|
|
3087
|
+
source_net_id: z147.string(),
|
|
3088
|
+
pcb_group_id: z147.string().optional(),
|
|
3089
|
+
subcircuit_id: z147.string().optional()
|
|
3073
3090
|
}).describe("Defines a ground plane on the PCB");
|
|
3074
3091
|
expectTypesMatch(true);
|
|
3075
3092
|
|
|
3076
3093
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3077
|
-
import { z as
|
|
3078
|
-
var pcb_ground_plane_region =
|
|
3079
|
-
type:
|
|
3094
|
+
import { z as z148 } from "zod";
|
|
3095
|
+
var pcb_ground_plane_region = z148.object({
|
|
3096
|
+
type: z148.literal("pcb_ground_plane_region"),
|
|
3080
3097
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3081
3098
|
"pcb_ground_plane_region"
|
|
3082
3099
|
),
|
|
3083
|
-
pcb_ground_plane_id:
|
|
3084
|
-
pcb_group_id:
|
|
3085
|
-
subcircuit_id:
|
|
3100
|
+
pcb_ground_plane_id: z148.string(),
|
|
3101
|
+
pcb_group_id: z148.string().optional(),
|
|
3102
|
+
subcircuit_id: z148.string().optional(),
|
|
3086
3103
|
layer: layer_ref,
|
|
3087
|
-
points:
|
|
3104
|
+
points: z148.array(point)
|
|
3088
3105
|
}).describe("Defines a polygon region of a ground plane");
|
|
3089
3106
|
expectTypesMatch(true);
|
|
3090
3107
|
|
|
3091
3108
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3092
|
-
import { z as
|
|
3093
|
-
var pcb_thermal_spoke =
|
|
3094
|
-
type:
|
|
3109
|
+
import { z as z149 } from "zod";
|
|
3110
|
+
var pcb_thermal_spoke = z149.object({
|
|
3111
|
+
type: z149.literal("pcb_thermal_spoke"),
|
|
3095
3112
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3096
|
-
pcb_ground_plane_id:
|
|
3097
|
-
shape:
|
|
3098
|
-
spoke_count:
|
|
3113
|
+
pcb_ground_plane_id: z149.string(),
|
|
3114
|
+
shape: z149.string(),
|
|
3115
|
+
spoke_count: z149.number(),
|
|
3099
3116
|
spoke_thickness: distance,
|
|
3100
3117
|
spoke_inner_diameter: distance,
|
|
3101
3118
|
spoke_outer_diameter: distance,
|
|
3102
|
-
pcb_plated_hole_id:
|
|
3103
|
-
subcircuit_id:
|
|
3119
|
+
pcb_plated_hole_id: z149.string().optional(),
|
|
3120
|
+
subcircuit_id: z149.string().optional()
|
|
3104
3121
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3105
3122
|
expectTypesMatch(true);
|
|
3106
3123
|
|
|
3107
3124
|
// src/pcb/pcb_copper_pour.ts
|
|
3108
|
-
import { z as
|
|
3109
|
-
var pcb_copper_pour_base =
|
|
3110
|
-
type:
|
|
3125
|
+
import { z as z150 } from "zod";
|
|
3126
|
+
var pcb_copper_pour_base = z150.object({
|
|
3127
|
+
type: z150.literal("pcb_copper_pour"),
|
|
3111
3128
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3112
|
-
pcb_group_id:
|
|
3113
|
-
subcircuit_id:
|
|
3129
|
+
pcb_group_id: z150.string().optional(),
|
|
3130
|
+
subcircuit_id: z150.string().optional(),
|
|
3114
3131
|
layer: layer_ref,
|
|
3115
|
-
source_net_id:
|
|
3116
|
-
covered_with_solder_mask:
|
|
3132
|
+
source_net_id: z150.string().optional(),
|
|
3133
|
+
covered_with_solder_mask: z150.boolean().optional().default(true)
|
|
3117
3134
|
});
|
|
3118
3135
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3119
|
-
shape:
|
|
3136
|
+
shape: z150.literal("rect"),
|
|
3120
3137
|
center: point,
|
|
3121
3138
|
width: length,
|
|
3122
3139
|
height: length,
|
|
@@ -3124,16 +3141,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3124
3141
|
});
|
|
3125
3142
|
expectTypesMatch(true);
|
|
3126
3143
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3127
|
-
shape:
|
|
3144
|
+
shape: z150.literal("brep"),
|
|
3128
3145
|
brep_shape
|
|
3129
3146
|
});
|
|
3130
3147
|
expectTypesMatch(true);
|
|
3131
3148
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3132
|
-
shape:
|
|
3133
|
-
points:
|
|
3149
|
+
shape: z150.literal("polygon"),
|
|
3150
|
+
points: z150.array(point)
|
|
3134
3151
|
});
|
|
3135
3152
|
expectTypesMatch(true);
|
|
3136
|
-
var pcb_copper_pour =
|
|
3153
|
+
var pcb_copper_pour = z150.discriminatedUnion("shape", [
|
|
3137
3154
|
pcb_copper_pour_rect,
|
|
3138
3155
|
pcb_copper_pour_brep,
|
|
3139
3156
|
pcb_copper_pour_polygon
|
|
@@ -3141,99 +3158,99 @@ var pcb_copper_pour = z149.discriminatedUnion("shape", [
|
|
|
3141
3158
|
expectTypesMatch(true);
|
|
3142
3159
|
|
|
3143
3160
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3144
|
-
import { z as
|
|
3161
|
+
import { z as z151 } from "zod";
|
|
3145
3162
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3146
|
-
type:
|
|
3163
|
+
type: z151.literal("pcb_component_outside_board_error"),
|
|
3147
3164
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3148
3165
|
"pcb_component_outside_board_error"
|
|
3149
3166
|
),
|
|
3150
|
-
error_type:
|
|
3151
|
-
pcb_component_id:
|
|
3152
|
-
pcb_board_id:
|
|
3167
|
+
error_type: z151.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3168
|
+
pcb_component_id: z151.string(),
|
|
3169
|
+
pcb_board_id: z151.string(),
|
|
3153
3170
|
component_center: point,
|
|
3154
|
-
component_bounds:
|
|
3155
|
-
min_x:
|
|
3156
|
-
max_x:
|
|
3157
|
-
min_y:
|
|
3158
|
-
max_y:
|
|
3171
|
+
component_bounds: z151.object({
|
|
3172
|
+
min_x: z151.number(),
|
|
3173
|
+
max_x: z151.number(),
|
|
3174
|
+
min_y: z151.number(),
|
|
3175
|
+
max_y: z151.number()
|
|
3159
3176
|
}),
|
|
3160
|
-
subcircuit_id:
|
|
3161
|
-
source_component_id:
|
|
3177
|
+
subcircuit_id: z151.string().optional(),
|
|
3178
|
+
source_component_id: z151.string().optional()
|
|
3162
3179
|
}).describe(
|
|
3163
3180
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3164
3181
|
);
|
|
3165
3182
|
expectTypesMatch(true);
|
|
3166
3183
|
|
|
3167
3184
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3168
|
-
import { z as
|
|
3185
|
+
import { z as z152 } from "zod";
|
|
3169
3186
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3170
|
-
type:
|
|
3187
|
+
type: z152.literal("pcb_component_not_on_board_edge_error"),
|
|
3171
3188
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3172
3189
|
"pcb_component_not_on_board_edge_error"
|
|
3173
3190
|
),
|
|
3174
|
-
error_type:
|
|
3175
|
-
pcb_component_id:
|
|
3176
|
-
pcb_board_id:
|
|
3191
|
+
error_type: z152.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3192
|
+
pcb_component_id: z152.string(),
|
|
3193
|
+
pcb_board_id: z152.string(),
|
|
3177
3194
|
component_center: point,
|
|
3178
|
-
pad_to_nearest_board_edge_distance:
|
|
3179
|
-
source_component_id:
|
|
3180
|
-
subcircuit_id:
|
|
3195
|
+
pad_to_nearest_board_edge_distance: z152.number(),
|
|
3196
|
+
source_component_id: z152.string().optional(),
|
|
3197
|
+
subcircuit_id: z152.string().optional()
|
|
3181
3198
|
}).describe(
|
|
3182
3199
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3183
3200
|
);
|
|
3184
3201
|
expectTypesMatch(true);
|
|
3185
3202
|
|
|
3186
3203
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3187
|
-
import { z as
|
|
3204
|
+
import { z as z153 } from "zod";
|
|
3188
3205
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3189
|
-
type:
|
|
3206
|
+
type: z153.literal("pcb_component_invalid_layer_error"),
|
|
3190
3207
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3191
3208
|
"pcb_component_invalid_layer_error"
|
|
3192
3209
|
),
|
|
3193
|
-
error_type:
|
|
3194
|
-
pcb_component_id:
|
|
3195
|
-
source_component_id:
|
|
3210
|
+
error_type: z153.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3211
|
+
pcb_component_id: z153.string().optional(),
|
|
3212
|
+
source_component_id: z153.string(),
|
|
3196
3213
|
layer: layer_ref,
|
|
3197
|
-
subcircuit_id:
|
|
3214
|
+
subcircuit_id: z153.string().optional()
|
|
3198
3215
|
}).describe(
|
|
3199
3216
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3200
3217
|
);
|
|
3201
3218
|
expectTypesMatch(true);
|
|
3202
3219
|
|
|
3203
3220
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3204
|
-
import { z as
|
|
3221
|
+
import { z as z154 } from "zod";
|
|
3205
3222
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3206
|
-
type:
|
|
3223
|
+
type: z154.literal("pcb_via_clearance_error"),
|
|
3207
3224
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3208
|
-
error_type:
|
|
3209
|
-
pcb_via_ids:
|
|
3225
|
+
error_type: z154.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3226
|
+
pcb_via_ids: z154.array(z154.string()).min(2),
|
|
3210
3227
|
minimum_clearance: distance.optional(),
|
|
3211
3228
|
actual_clearance: distance.optional(),
|
|
3212
|
-
pcb_center:
|
|
3213
|
-
x:
|
|
3214
|
-
y:
|
|
3229
|
+
pcb_center: z154.object({
|
|
3230
|
+
x: z154.number().optional(),
|
|
3231
|
+
y: z154.number().optional()
|
|
3215
3232
|
}).optional(),
|
|
3216
|
-
subcircuit_id:
|
|
3233
|
+
subcircuit_id: z154.string().optional()
|
|
3217
3234
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3218
3235
|
expectTypesMatch(true);
|
|
3219
3236
|
|
|
3220
3237
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3221
|
-
import { z as
|
|
3238
|
+
import { z as z155 } from "zod";
|
|
3222
3239
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3223
|
-
type:
|
|
3240
|
+
type: z155.literal("pcb_via_trace_clearance_error"),
|
|
3224
3241
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3225
3242
|
"pcb_via_trace_clearance_error"
|
|
3226
3243
|
),
|
|
3227
|
-
error_type:
|
|
3228
|
-
pcb_via_id:
|
|
3229
|
-
pcb_trace_id:
|
|
3244
|
+
error_type: z155.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3245
|
+
pcb_via_id: z155.string(),
|
|
3246
|
+
pcb_trace_id: z155.string(),
|
|
3230
3247
|
minimum_clearance: distance.optional(),
|
|
3231
3248
|
actual_clearance: distance.optional(),
|
|
3232
|
-
center:
|
|
3233
|
-
x:
|
|
3234
|
-
y:
|
|
3249
|
+
center: z155.object({
|
|
3250
|
+
x: z155.number().optional(),
|
|
3251
|
+
y: z155.number().optional()
|
|
3235
3252
|
}).optional(),
|
|
3236
|
-
subcircuit_id:
|
|
3253
|
+
subcircuit_id: z155.string().optional()
|
|
3237
3254
|
}).describe(
|
|
3238
3255
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3239
3256
|
);
|
|
@@ -3242,41 +3259,41 @@ expectTypesMatch(
|
|
|
3242
3259
|
);
|
|
3243
3260
|
|
|
3244
3261
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3245
|
-
import { z as
|
|
3262
|
+
import { z as z156 } from "zod";
|
|
3246
3263
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3247
|
-
type:
|
|
3264
|
+
type: z156.literal("pcb_pad_pad_clearance_error"),
|
|
3248
3265
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3249
3266
|
"pcb_pad_pad_clearance_error"
|
|
3250
3267
|
),
|
|
3251
|
-
error_type:
|
|
3252
|
-
pcb_pad_ids:
|
|
3268
|
+
error_type: z156.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3269
|
+
pcb_pad_ids: z156.array(z156.string()).min(2),
|
|
3253
3270
|
minimum_clearance: distance.optional(),
|
|
3254
3271
|
actual_clearance: distance.optional(),
|
|
3255
|
-
center:
|
|
3256
|
-
x:
|
|
3257
|
-
y:
|
|
3272
|
+
center: z156.object({
|
|
3273
|
+
x: z156.number().optional(),
|
|
3274
|
+
y: z156.number().optional()
|
|
3258
3275
|
}).optional(),
|
|
3259
|
-
subcircuit_id:
|
|
3276
|
+
subcircuit_id: z156.string().optional()
|
|
3260
3277
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3261
3278
|
expectTypesMatch(true);
|
|
3262
3279
|
|
|
3263
3280
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3264
|
-
import { z as
|
|
3281
|
+
import { z as z157 } from "zod";
|
|
3265
3282
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3266
|
-
type:
|
|
3283
|
+
type: z157.literal("pcb_pad_trace_clearance_error"),
|
|
3267
3284
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3268
3285
|
"pcb_pad_trace_clearance_error"
|
|
3269
3286
|
),
|
|
3270
|
-
error_type:
|
|
3271
|
-
pcb_pad_id:
|
|
3272
|
-
pcb_trace_id:
|
|
3287
|
+
error_type: z157.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3288
|
+
pcb_pad_id: z157.string(),
|
|
3289
|
+
pcb_trace_id: z157.string(),
|
|
3273
3290
|
minimum_clearance: distance.optional(),
|
|
3274
3291
|
actual_clearance: distance.optional(),
|
|
3275
|
-
center:
|
|
3276
|
-
x:
|
|
3277
|
-
y:
|
|
3292
|
+
center: z157.object({
|
|
3293
|
+
x: z157.number().optional(),
|
|
3294
|
+
y: z157.number().optional()
|
|
3278
3295
|
}).optional(),
|
|
3279
|
-
subcircuit_id:
|
|
3296
|
+
subcircuit_id: z157.string().optional()
|
|
3280
3297
|
}).describe(
|
|
3281
3298
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3282
3299
|
);
|
|
@@ -3285,89 +3302,89 @@ expectTypesMatch(
|
|
|
3285
3302
|
);
|
|
3286
3303
|
|
|
3287
3304
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3288
|
-
import { z as
|
|
3289
|
-
var pcb_courtyard_rect =
|
|
3290
|
-
type:
|
|
3305
|
+
import { z as z158 } from "zod";
|
|
3306
|
+
var pcb_courtyard_rect = z158.object({
|
|
3307
|
+
type: z158.literal("pcb_courtyard_rect"),
|
|
3291
3308
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3292
|
-
pcb_component_id:
|
|
3293
|
-
pcb_group_id:
|
|
3294
|
-
subcircuit_id:
|
|
3309
|
+
pcb_component_id: z158.string(),
|
|
3310
|
+
pcb_group_id: z158.string().optional(),
|
|
3311
|
+
subcircuit_id: z158.string().optional(),
|
|
3295
3312
|
center: point,
|
|
3296
3313
|
width: length,
|
|
3297
3314
|
height: length,
|
|
3298
3315
|
layer: visible_layer,
|
|
3299
3316
|
ccw_rotation: rotation.optional(),
|
|
3300
|
-
color:
|
|
3317
|
+
color: z158.string().optional()
|
|
3301
3318
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3302
3319
|
expectTypesMatch(true);
|
|
3303
3320
|
|
|
3304
3321
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3305
|
-
import { z as
|
|
3306
|
-
var pcb_courtyard_outline =
|
|
3307
|
-
type:
|
|
3322
|
+
import { z as z159 } from "zod";
|
|
3323
|
+
var pcb_courtyard_outline = z159.object({
|
|
3324
|
+
type: z159.literal("pcb_courtyard_outline"),
|
|
3308
3325
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3309
3326
|
"pcb_courtyard_outline"
|
|
3310
3327
|
),
|
|
3311
|
-
pcb_component_id:
|
|
3312
|
-
pcb_group_id:
|
|
3313
|
-
subcircuit_id:
|
|
3328
|
+
pcb_component_id: z159.string(),
|
|
3329
|
+
pcb_group_id: z159.string().optional(),
|
|
3330
|
+
subcircuit_id: z159.string().optional(),
|
|
3314
3331
|
layer: visible_layer,
|
|
3315
|
-
outline:
|
|
3332
|
+
outline: z159.array(point).min(2)
|
|
3316
3333
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3317
3334
|
expectTypesMatch(true);
|
|
3318
3335
|
|
|
3319
3336
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3320
|
-
import { z as
|
|
3321
|
-
var pcb_courtyard_polygon =
|
|
3322
|
-
type:
|
|
3337
|
+
import { z as z160 } from "zod";
|
|
3338
|
+
var pcb_courtyard_polygon = z160.object({
|
|
3339
|
+
type: z160.literal("pcb_courtyard_polygon"),
|
|
3323
3340
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3324
3341
|
"pcb_courtyard_polygon"
|
|
3325
3342
|
),
|
|
3326
|
-
pcb_component_id:
|
|
3327
|
-
pcb_group_id:
|
|
3328
|
-
subcircuit_id:
|
|
3343
|
+
pcb_component_id: z160.string(),
|
|
3344
|
+
pcb_group_id: z160.string().optional(),
|
|
3345
|
+
subcircuit_id: z160.string().optional(),
|
|
3329
3346
|
layer: visible_layer,
|
|
3330
|
-
points:
|
|
3331
|
-
color:
|
|
3347
|
+
points: z160.array(point).min(3),
|
|
3348
|
+
color: z160.string().optional()
|
|
3332
3349
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3333
3350
|
expectTypesMatch(true);
|
|
3334
3351
|
|
|
3335
3352
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3336
|
-
import { z as
|
|
3337
|
-
var pcb_courtyard_circle =
|
|
3338
|
-
type:
|
|
3353
|
+
import { z as z161 } from "zod";
|
|
3354
|
+
var pcb_courtyard_circle = z161.object({
|
|
3355
|
+
type: z161.literal("pcb_courtyard_circle"),
|
|
3339
3356
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3340
3357
|
"pcb_courtyard_circle"
|
|
3341
3358
|
),
|
|
3342
|
-
pcb_component_id:
|
|
3343
|
-
pcb_group_id:
|
|
3344
|
-
subcircuit_id:
|
|
3359
|
+
pcb_component_id: z161.string(),
|
|
3360
|
+
pcb_group_id: z161.string().optional(),
|
|
3361
|
+
subcircuit_id: z161.string().optional(),
|
|
3345
3362
|
center: point,
|
|
3346
3363
|
radius: length,
|
|
3347
3364
|
layer: visible_layer,
|
|
3348
|
-
color:
|
|
3365
|
+
color: z161.string().optional()
|
|
3349
3366
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3350
3367
|
expectTypesMatch(true);
|
|
3351
3368
|
|
|
3352
3369
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3353
|
-
import { z as
|
|
3354
|
-
var pcb_courtyard_pill =
|
|
3355
|
-
type:
|
|
3370
|
+
import { z as z162 } from "zod";
|
|
3371
|
+
var pcb_courtyard_pill = z162.object({
|
|
3372
|
+
type: z162.literal("pcb_courtyard_pill"),
|
|
3356
3373
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3357
|
-
pcb_component_id:
|
|
3358
|
-
pcb_group_id:
|
|
3359
|
-
subcircuit_id:
|
|
3374
|
+
pcb_component_id: z162.string(),
|
|
3375
|
+
pcb_group_id: z162.string().optional(),
|
|
3376
|
+
subcircuit_id: z162.string().optional(),
|
|
3360
3377
|
center: point,
|
|
3361
3378
|
width: length,
|
|
3362
3379
|
height: length,
|
|
3363
3380
|
radius: length,
|
|
3364
3381
|
layer: visible_layer,
|
|
3365
|
-
color:
|
|
3382
|
+
color: z162.string().optional()
|
|
3366
3383
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3367
3384
|
expectTypesMatch(true);
|
|
3368
3385
|
|
|
3369
3386
|
// src/cad/cad_component.ts
|
|
3370
|
-
import { z as
|
|
3387
|
+
import { z as z163 } from "zod";
|
|
3371
3388
|
|
|
3372
3389
|
// src/cad/cad_model_conventions.ts
|
|
3373
3390
|
var cad_model_formats = [
|
|
@@ -3398,49 +3415,49 @@ var cadModelDefaultDirectionMap = {
|
|
|
3398
3415
|
};
|
|
3399
3416
|
|
|
3400
3417
|
// src/cad/cad_component.ts
|
|
3401
|
-
var cad_component =
|
|
3402
|
-
type:
|
|
3403
|
-
cad_component_id:
|
|
3404
|
-
pcb_component_id:
|
|
3405
|
-
source_component_id:
|
|
3418
|
+
var cad_component = z163.object({
|
|
3419
|
+
type: z163.literal("cad_component"),
|
|
3420
|
+
cad_component_id: z163.string(),
|
|
3421
|
+
pcb_component_id: z163.string(),
|
|
3422
|
+
source_component_id: z163.string(),
|
|
3406
3423
|
position: point3,
|
|
3407
3424
|
rotation: point3.optional(),
|
|
3408
3425
|
size: point3.optional(),
|
|
3409
3426
|
layer: layer_ref.optional(),
|
|
3410
|
-
subcircuit_id:
|
|
3427
|
+
subcircuit_id: z163.string().optional(),
|
|
3411
3428
|
// These are all ways to generate/load the 3d model
|
|
3412
|
-
footprinter_string:
|
|
3413
|
-
model_obj_url:
|
|
3414
|
-
model_stl_url:
|
|
3415
|
-
model_3mf_url:
|
|
3416
|
-
model_gltf_url:
|
|
3417
|
-
model_glb_url:
|
|
3418
|
-
model_step_url:
|
|
3419
|
-
model_wrl_url:
|
|
3429
|
+
footprinter_string: z163.string().optional(),
|
|
3430
|
+
model_obj_url: z163.string().optional(),
|
|
3431
|
+
model_stl_url: z163.string().optional(),
|
|
3432
|
+
model_3mf_url: z163.string().optional(),
|
|
3433
|
+
model_gltf_url: z163.string().optional(),
|
|
3434
|
+
model_glb_url: z163.string().optional(),
|
|
3435
|
+
model_step_url: z163.string().optional(),
|
|
3436
|
+
model_wrl_url: z163.string().optional(),
|
|
3420
3437
|
model_asset: asset.optional(),
|
|
3421
|
-
model_unit_to_mm_scale_factor:
|
|
3422
|
-
model_board_normal_direction:
|
|
3438
|
+
model_unit_to_mm_scale_factor: z163.number().optional(),
|
|
3439
|
+
model_board_normal_direction: z163.enum(cad_model_axis_directions).optional().describe(
|
|
3423
3440
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3424
3441
|
),
|
|
3425
3442
|
model_origin_position: point3.optional(),
|
|
3426
|
-
model_origin_alignment:
|
|
3443
|
+
model_origin_alignment: z163.enum([
|
|
3427
3444
|
"unknown",
|
|
3428
3445
|
"center",
|
|
3429
3446
|
"center_of_component_on_board_surface",
|
|
3430
3447
|
"bottom_center_of_component"
|
|
3431
3448
|
]).optional(),
|
|
3432
|
-
model_object_fit:
|
|
3433
|
-
model_jscad:
|
|
3434
|
-
show_as_translucent_model:
|
|
3435
|
-
show_as_bounding_box:
|
|
3436
|
-
anchor_alignment:
|
|
3449
|
+
model_object_fit: z163.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3450
|
+
model_jscad: z163.any().optional(),
|
|
3451
|
+
show_as_translucent_model: z163.boolean().optional(),
|
|
3452
|
+
show_as_bounding_box: z163.boolean().optional(),
|
|
3453
|
+
anchor_alignment: z163.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3437
3454
|
}).describe("Defines a component on the PCB");
|
|
3438
3455
|
expectTypesMatch(true);
|
|
3439
3456
|
|
|
3440
3457
|
// src/simulation/simulation_voltage_source.ts
|
|
3441
|
-
import { z as
|
|
3442
|
-
var wave_shape =
|
|
3443
|
-
var percentage =
|
|
3458
|
+
import { z as z164 } from "zod";
|
|
3459
|
+
var wave_shape = z164.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3460
|
+
var percentage = z164.union([z164.string(), z164.number()]).transform((val) => {
|
|
3444
3461
|
if (typeof val === "string") {
|
|
3445
3462
|
if (val.endsWith("%")) {
|
|
3446
3463
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3449,30 +3466,30 @@ var percentage = z163.union([z163.string(), z163.number()]).transform((val) => {
|
|
|
3449
3466
|
}
|
|
3450
3467
|
return val;
|
|
3451
3468
|
}).pipe(
|
|
3452
|
-
|
|
3469
|
+
z164.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3453
3470
|
);
|
|
3454
|
-
var simulation_dc_voltage_source =
|
|
3455
|
-
type:
|
|
3471
|
+
var simulation_dc_voltage_source = z164.object({
|
|
3472
|
+
type: z164.literal("simulation_voltage_source"),
|
|
3456
3473
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3457
3474
|
"simulation_voltage_source"
|
|
3458
3475
|
),
|
|
3459
|
-
is_dc_source:
|
|
3460
|
-
positive_source_port_id:
|
|
3461
|
-
negative_source_port_id:
|
|
3462
|
-
positive_source_net_id:
|
|
3463
|
-
negative_source_net_id:
|
|
3476
|
+
is_dc_source: z164.literal(true).optional().default(true),
|
|
3477
|
+
positive_source_port_id: z164.string().optional(),
|
|
3478
|
+
negative_source_port_id: z164.string().optional(),
|
|
3479
|
+
positive_source_net_id: z164.string().optional(),
|
|
3480
|
+
negative_source_net_id: z164.string().optional(),
|
|
3464
3481
|
voltage
|
|
3465
3482
|
}).describe("Defines a DC voltage source for simulation");
|
|
3466
|
-
var simulation_ac_voltage_source =
|
|
3467
|
-
type:
|
|
3483
|
+
var simulation_ac_voltage_source = z164.object({
|
|
3484
|
+
type: z164.literal("simulation_voltage_source"),
|
|
3468
3485
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3469
3486
|
"simulation_voltage_source"
|
|
3470
3487
|
),
|
|
3471
|
-
is_dc_source:
|
|
3472
|
-
terminal1_source_port_id:
|
|
3473
|
-
terminal2_source_port_id:
|
|
3474
|
-
terminal1_source_net_id:
|
|
3475
|
-
terminal2_source_net_id:
|
|
3488
|
+
is_dc_source: z164.literal(false),
|
|
3489
|
+
terminal1_source_port_id: z164.string().optional(),
|
|
3490
|
+
terminal2_source_port_id: z164.string().optional(),
|
|
3491
|
+
terminal1_source_net_id: z164.string().optional(),
|
|
3492
|
+
terminal2_source_net_id: z164.string().optional(),
|
|
3476
3493
|
voltage: voltage.optional(),
|
|
3477
3494
|
frequency: frequency.optional(),
|
|
3478
3495
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3485,14 +3502,14 @@ var simulation_ac_voltage_source = z163.object({
|
|
|
3485
3502
|
pulse_width: ms.optional(),
|
|
3486
3503
|
period: ms.optional()
|
|
3487
3504
|
}).describe("Defines an AC voltage source for simulation");
|
|
3488
|
-
var simulation_voltage_source =
|
|
3505
|
+
var simulation_voltage_source = z164.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3489
3506
|
expectTypesMatch(true);
|
|
3490
3507
|
expectTypesMatch(true);
|
|
3491
3508
|
expectTypesMatch(true);
|
|
3492
3509
|
|
|
3493
3510
|
// src/simulation/simulation_current_source.ts
|
|
3494
|
-
import { z as
|
|
3495
|
-
var percentage2 =
|
|
3511
|
+
import { z as z165 } from "zod";
|
|
3512
|
+
var percentage2 = z165.union([z165.string(), z165.number()]).transform((val) => {
|
|
3496
3513
|
if (typeof val === "string") {
|
|
3497
3514
|
if (val.endsWith("%")) {
|
|
3498
3515
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3501,30 +3518,30 @@ var percentage2 = z164.union([z164.string(), z164.number()]).transform((val) =>
|
|
|
3501
3518
|
}
|
|
3502
3519
|
return val;
|
|
3503
3520
|
}).pipe(
|
|
3504
|
-
|
|
3521
|
+
z165.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3505
3522
|
);
|
|
3506
|
-
var simulation_dc_current_source =
|
|
3507
|
-
type:
|
|
3523
|
+
var simulation_dc_current_source = z165.object({
|
|
3524
|
+
type: z165.literal("simulation_current_source"),
|
|
3508
3525
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3509
3526
|
"simulation_current_source"
|
|
3510
3527
|
),
|
|
3511
|
-
is_dc_source:
|
|
3512
|
-
positive_source_port_id:
|
|
3513
|
-
negative_source_port_id:
|
|
3514
|
-
positive_source_net_id:
|
|
3515
|
-
negative_source_net_id:
|
|
3528
|
+
is_dc_source: z165.literal(true).optional().default(true),
|
|
3529
|
+
positive_source_port_id: z165.string().optional(),
|
|
3530
|
+
negative_source_port_id: z165.string().optional(),
|
|
3531
|
+
positive_source_net_id: z165.string().optional(),
|
|
3532
|
+
negative_source_net_id: z165.string().optional(),
|
|
3516
3533
|
current
|
|
3517
3534
|
}).describe("Defines a DC current source for simulation");
|
|
3518
|
-
var simulation_ac_current_source =
|
|
3519
|
-
type:
|
|
3535
|
+
var simulation_ac_current_source = z165.object({
|
|
3536
|
+
type: z165.literal("simulation_current_source"),
|
|
3520
3537
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3521
3538
|
"simulation_current_source"
|
|
3522
3539
|
),
|
|
3523
|
-
is_dc_source:
|
|
3524
|
-
terminal1_source_port_id:
|
|
3525
|
-
terminal2_source_port_id:
|
|
3526
|
-
terminal1_source_net_id:
|
|
3527
|
-
terminal2_source_net_id:
|
|
3540
|
+
is_dc_source: z165.literal(false),
|
|
3541
|
+
terminal1_source_port_id: z165.string().optional(),
|
|
3542
|
+
terminal2_source_port_id: z165.string().optional(),
|
|
3543
|
+
terminal1_source_net_id: z165.string().optional(),
|
|
3544
|
+
terminal2_source_net_id: z165.string().optional(),
|
|
3528
3545
|
current: current.optional(),
|
|
3529
3546
|
frequency: frequency.optional(),
|
|
3530
3547
|
peak_to_peak_current: current.optional(),
|
|
@@ -3532,31 +3549,31 @@ var simulation_ac_current_source = z164.object({
|
|
|
3532
3549
|
phase: rotation.optional(),
|
|
3533
3550
|
duty_cycle: percentage2.optional()
|
|
3534
3551
|
}).describe("Defines an AC current source for simulation");
|
|
3535
|
-
var simulation_current_source =
|
|
3552
|
+
var simulation_current_source = z165.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3536
3553
|
expectTypesMatch(true);
|
|
3537
3554
|
expectTypesMatch(true);
|
|
3538
3555
|
expectTypesMatch(true);
|
|
3539
3556
|
|
|
3540
3557
|
// src/simulation/simulation_experiment.ts
|
|
3541
|
-
import { z as
|
|
3542
|
-
var experiment_type =
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3558
|
+
import { z as z166 } from "zod";
|
|
3559
|
+
var experiment_type = z166.union([
|
|
3560
|
+
z166.literal("spice_dc_sweep"),
|
|
3561
|
+
z166.literal("spice_dc_operating_point"),
|
|
3562
|
+
z166.literal("spice_transient_analysis"),
|
|
3563
|
+
z166.literal("spice_ac_analysis")
|
|
3547
3564
|
]);
|
|
3548
|
-
var spice_simulation_options =
|
|
3549
|
-
method:
|
|
3550
|
-
reltol:
|
|
3551
|
-
abstol:
|
|
3552
|
-
vntol:
|
|
3565
|
+
var spice_simulation_options = z166.object({
|
|
3566
|
+
method: z166.enum(["trap", "gear"]).optional(),
|
|
3567
|
+
reltol: z166.union([z166.number(), z166.string()]).optional(),
|
|
3568
|
+
abstol: z166.union([z166.number(), z166.string()]).optional(),
|
|
3569
|
+
vntol: z166.union([z166.number(), z166.string()]).optional()
|
|
3553
3570
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3554
|
-
var simulation_experiment =
|
|
3555
|
-
type:
|
|
3571
|
+
var simulation_experiment = z166.object({
|
|
3572
|
+
type: z166.literal("simulation_experiment"),
|
|
3556
3573
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3557
3574
|
"simulation_experiment"
|
|
3558
3575
|
),
|
|
3559
|
-
name:
|
|
3576
|
+
name: z166.string(),
|
|
3560
3577
|
experiment_type,
|
|
3561
3578
|
time_per_step: duration_ms.optional(),
|
|
3562
3579
|
start_time_ms: ms.optional(),
|
|
@@ -3566,73 +3583,73 @@ var simulation_experiment = z165.object({
|
|
|
3566
3583
|
expectTypesMatch(true);
|
|
3567
3584
|
|
|
3568
3585
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3569
|
-
import { z as
|
|
3570
|
-
var simulation_transient_voltage_graph =
|
|
3571
|
-
type:
|
|
3586
|
+
import { z as z167 } from "zod";
|
|
3587
|
+
var simulation_transient_voltage_graph = z167.object({
|
|
3588
|
+
type: z167.literal("simulation_transient_voltage_graph"),
|
|
3572
3589
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3573
3590
|
"simulation_transient_voltage_graph"
|
|
3574
3591
|
),
|
|
3575
|
-
simulation_experiment_id:
|
|
3576
|
-
timestamps_ms:
|
|
3577
|
-
voltage_levels:
|
|
3578
|
-
source_component_id:
|
|
3579
|
-
subcircuit_connectivity_map_key:
|
|
3592
|
+
simulation_experiment_id: z167.string(),
|
|
3593
|
+
timestamps_ms: z167.array(z167.number()).optional(),
|
|
3594
|
+
voltage_levels: z167.array(z167.number()),
|
|
3595
|
+
source_component_id: z167.string().optional(),
|
|
3596
|
+
subcircuit_connectivity_map_key: z167.string().optional(),
|
|
3580
3597
|
time_per_step: duration_ms,
|
|
3581
3598
|
start_time_ms: ms,
|
|
3582
3599
|
end_time_ms: ms,
|
|
3583
|
-
name:
|
|
3584
|
-
color:
|
|
3600
|
+
name: z167.string().optional(),
|
|
3601
|
+
color: z167.string().optional()
|
|
3585
3602
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3586
3603
|
expectTypesMatch(true);
|
|
3587
3604
|
|
|
3588
3605
|
// src/simulation/simulation_transient_current_graph.ts
|
|
3589
|
-
import { z as
|
|
3590
|
-
var simulation_transient_current_graph =
|
|
3591
|
-
type:
|
|
3606
|
+
import { z as z168 } from "zod";
|
|
3607
|
+
var simulation_transient_current_graph = z168.object({
|
|
3608
|
+
type: z168.literal("simulation_transient_current_graph"),
|
|
3592
3609
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
3593
3610
|
"simulation_transient_current_graph"
|
|
3594
3611
|
),
|
|
3595
|
-
simulation_experiment_id:
|
|
3596
|
-
timestamps_ms:
|
|
3597
|
-
current_levels:
|
|
3598
|
-
source_component_id:
|
|
3599
|
-
subcircuit_connectivity_map_key:
|
|
3612
|
+
simulation_experiment_id: z168.string(),
|
|
3613
|
+
timestamps_ms: z168.array(z168.number()).optional(),
|
|
3614
|
+
current_levels: z168.array(z168.number()),
|
|
3615
|
+
source_component_id: z168.string().optional(),
|
|
3616
|
+
subcircuit_connectivity_map_key: z168.string().optional(),
|
|
3600
3617
|
time_per_step: duration_ms,
|
|
3601
3618
|
start_time_ms: ms,
|
|
3602
3619
|
end_time_ms: ms,
|
|
3603
|
-
name:
|
|
3604
|
-
color:
|
|
3620
|
+
name: z168.string().optional(),
|
|
3621
|
+
color: z168.string().optional()
|
|
3605
3622
|
}).describe("Stores current measurements over time for a simulation");
|
|
3606
3623
|
expectTypesMatch(true);
|
|
3607
3624
|
|
|
3608
3625
|
// src/simulation/simulation_switch.ts
|
|
3609
|
-
import { z as
|
|
3610
|
-
var simulation_switch =
|
|
3611
|
-
type:
|
|
3626
|
+
import { z as z169 } from "zod";
|
|
3627
|
+
var simulation_switch = z169.object({
|
|
3628
|
+
type: z169.literal("simulation_switch"),
|
|
3612
3629
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3613
|
-
source_component_id:
|
|
3630
|
+
source_component_id: z169.string().optional(),
|
|
3614
3631
|
closes_at: ms.optional(),
|
|
3615
3632
|
opens_at: ms.optional(),
|
|
3616
|
-
starts_closed:
|
|
3633
|
+
starts_closed: z169.boolean().optional(),
|
|
3617
3634
|
switching_frequency: frequency.optional()
|
|
3618
3635
|
}).describe("Defines a switch for simulation timing control");
|
|
3619
3636
|
expectTypesMatch(true);
|
|
3620
3637
|
|
|
3621
3638
|
// src/simulation/simulation_voltage_probe.ts
|
|
3622
|
-
import { z as
|
|
3623
|
-
var simulation_voltage_probe =
|
|
3624
|
-
type:
|
|
3639
|
+
import { z as z170 } from "zod";
|
|
3640
|
+
var simulation_voltage_probe = z170.object({
|
|
3641
|
+
type: z170.literal("simulation_voltage_probe"),
|
|
3625
3642
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3626
3643
|
"simulation_voltage_probe"
|
|
3627
3644
|
),
|
|
3628
|
-
source_component_id:
|
|
3629
|
-
name:
|
|
3630
|
-
signal_input_source_port_id:
|
|
3631
|
-
signal_input_source_net_id:
|
|
3632
|
-
reference_input_source_port_id:
|
|
3633
|
-
reference_input_source_net_id:
|
|
3634
|
-
subcircuit_id:
|
|
3635
|
-
color:
|
|
3645
|
+
source_component_id: z170.string().optional(),
|
|
3646
|
+
name: z170.string().optional(),
|
|
3647
|
+
signal_input_source_port_id: z170.string().optional(),
|
|
3648
|
+
signal_input_source_net_id: z170.string().optional(),
|
|
3649
|
+
reference_input_source_port_id: z170.string().optional(),
|
|
3650
|
+
reference_input_source_net_id: z170.string().optional(),
|
|
3651
|
+
subcircuit_id: z170.string().optional(),
|
|
3652
|
+
color: z170.string().optional()
|
|
3636
3653
|
}).describe(
|
|
3637
3654
|
"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."
|
|
3638
3655
|
).superRefine((data, ctx) => {
|
|
@@ -3642,20 +3659,20 @@ var simulation_voltage_probe = z169.object({
|
|
|
3642
3659
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3643
3660
|
if (has_ports && has_nets) {
|
|
3644
3661
|
ctx.addIssue({
|
|
3645
|
-
code:
|
|
3662
|
+
code: z170.ZodIssueCode.custom,
|
|
3646
3663
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3647
3664
|
});
|
|
3648
3665
|
} else if (has_ports) {
|
|
3649
3666
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3650
3667
|
ctx.addIssue({
|
|
3651
|
-
code:
|
|
3668
|
+
code: z170.ZodIssueCode.custom,
|
|
3652
3669
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3653
3670
|
});
|
|
3654
3671
|
}
|
|
3655
3672
|
} else if (has_nets) {
|
|
3656
3673
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3657
3674
|
ctx.addIssue({
|
|
3658
|
-
code:
|
|
3675
|
+
code: z170.ZodIssueCode.custom,
|
|
3659
3676
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3660
3677
|
});
|
|
3661
3678
|
}
|
|
@@ -3663,7 +3680,7 @@ var simulation_voltage_probe = z169.object({
|
|
|
3663
3680
|
} else {
|
|
3664
3681
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3665
3682
|
ctx.addIssue({
|
|
3666
|
-
code:
|
|
3683
|
+
code: z170.ZodIssueCode.custom,
|
|
3667
3684
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3668
3685
|
});
|
|
3669
3686
|
}
|
|
@@ -3672,20 +3689,20 @@ var simulation_voltage_probe = z169.object({
|
|
|
3672
3689
|
expectTypesMatch(true);
|
|
3673
3690
|
|
|
3674
3691
|
// src/simulation/simulation_current_probe.ts
|
|
3675
|
-
import { z as
|
|
3676
|
-
var simulation_current_probe =
|
|
3677
|
-
type:
|
|
3692
|
+
import { z as z171 } from "zod";
|
|
3693
|
+
var simulation_current_probe = z171.object({
|
|
3694
|
+
type: z171.literal("simulation_current_probe"),
|
|
3678
3695
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
3679
3696
|
"simulation_current_probe"
|
|
3680
3697
|
),
|
|
3681
|
-
source_component_id:
|
|
3682
|
-
name:
|
|
3683
|
-
positive_source_port_id:
|
|
3684
|
-
negative_source_port_id:
|
|
3685
|
-
positive_source_net_id:
|
|
3686
|
-
negative_source_net_id:
|
|
3687
|
-
subcircuit_id:
|
|
3688
|
-
color:
|
|
3698
|
+
source_component_id: z171.string().optional(),
|
|
3699
|
+
name: z171.string().optional(),
|
|
3700
|
+
positive_source_port_id: z171.string().optional(),
|
|
3701
|
+
negative_source_port_id: z171.string().optional(),
|
|
3702
|
+
positive_source_net_id: z171.string().optional(),
|
|
3703
|
+
negative_source_net_id: z171.string().optional(),
|
|
3704
|
+
subcircuit_id: z171.string().optional(),
|
|
3705
|
+
color: z171.string().optional()
|
|
3689
3706
|
}).describe(
|
|
3690
3707
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
3691
3708
|
).superRefine((data, ctx) => {
|
|
@@ -3697,7 +3714,7 @@ var simulation_current_probe = z170.object({
|
|
|
3697
3714
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
3698
3715
|
if (hasPorts && hasNets) {
|
|
3699
3716
|
ctx.addIssue({
|
|
3700
|
-
code:
|
|
3717
|
+
code: z171.ZodIssueCode.custom,
|
|
3701
3718
|
message: "Cannot mix port and net connections in a current probe."
|
|
3702
3719
|
});
|
|
3703
3720
|
return;
|
|
@@ -3705,7 +3722,7 @@ var simulation_current_probe = z170.object({
|
|
|
3705
3722
|
if (hasPorts) {
|
|
3706
3723
|
if (!hasPositivePort || !hasNegativePort) {
|
|
3707
3724
|
ctx.addIssue({
|
|
3708
|
-
code:
|
|
3725
|
+
code: z171.ZodIssueCode.custom,
|
|
3709
3726
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
3710
3727
|
});
|
|
3711
3728
|
}
|
|
@@ -3714,79 +3731,79 @@ var simulation_current_probe = z170.object({
|
|
|
3714
3731
|
if (hasNets) {
|
|
3715
3732
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
3716
3733
|
ctx.addIssue({
|
|
3717
|
-
code:
|
|
3734
|
+
code: z171.ZodIssueCode.custom,
|
|
3718
3735
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
3719
3736
|
});
|
|
3720
3737
|
}
|
|
3721
3738
|
return;
|
|
3722
3739
|
}
|
|
3723
3740
|
ctx.addIssue({
|
|
3724
|
-
code:
|
|
3741
|
+
code: z171.ZodIssueCode.custom,
|
|
3725
3742
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
3726
3743
|
});
|
|
3727
3744
|
});
|
|
3728
3745
|
expectTypesMatch(true);
|
|
3729
3746
|
|
|
3730
3747
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3731
|
-
import { z as
|
|
3748
|
+
import { z as z172 } from "zod";
|
|
3732
3749
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3733
|
-
type:
|
|
3750
|
+
type: z172.literal("simulation_unknown_experiment_error"),
|
|
3734
3751
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
3735
3752
|
"simulation_unknown_experiment_error"
|
|
3736
3753
|
),
|
|
3737
|
-
error_type:
|
|
3738
|
-
simulation_experiment_id:
|
|
3739
|
-
subcircuit_id:
|
|
3754
|
+
error_type: z172.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
3755
|
+
simulation_experiment_id: z172.string().optional(),
|
|
3756
|
+
subcircuit_id: z172.string().optional()
|
|
3740
3757
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3741
3758
|
expectTypesMatch(true);
|
|
3742
3759
|
|
|
3743
3760
|
// src/simulation/simulation_op_amp.ts
|
|
3744
|
-
import { z as
|
|
3745
|
-
var simulation_op_amp =
|
|
3746
|
-
type:
|
|
3761
|
+
import { z as z173 } from "zod";
|
|
3762
|
+
var simulation_op_amp = z173.object({
|
|
3763
|
+
type: z173.literal("simulation_op_amp"),
|
|
3747
3764
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
3748
|
-
source_component_id:
|
|
3749
|
-
inverting_input_source_port_id:
|
|
3750
|
-
non_inverting_input_source_port_id:
|
|
3751
|
-
output_source_port_id:
|
|
3752
|
-
positive_supply_source_port_id:
|
|
3753
|
-
negative_supply_source_port_id:
|
|
3765
|
+
source_component_id: z173.string().optional(),
|
|
3766
|
+
inverting_input_source_port_id: z173.string(),
|
|
3767
|
+
non_inverting_input_source_port_id: z173.string(),
|
|
3768
|
+
output_source_port_id: z173.string(),
|
|
3769
|
+
positive_supply_source_port_id: z173.string(),
|
|
3770
|
+
negative_supply_source_port_id: z173.string()
|
|
3754
3771
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
3755
3772
|
expectTypesMatch(true);
|
|
3756
3773
|
|
|
3757
3774
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
3758
|
-
import { z as
|
|
3759
|
-
var simulation_spice_subcircuit =
|
|
3760
|
-
type:
|
|
3775
|
+
import { z as z174 } from "zod";
|
|
3776
|
+
var simulation_spice_subcircuit = z174.object({
|
|
3777
|
+
type: z174.literal("simulation_spice_subcircuit"),
|
|
3761
3778
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
3762
3779
|
"simulation_spice_subcircuit"
|
|
3763
3780
|
),
|
|
3764
|
-
source_component_id:
|
|
3765
|
-
spice_pin_to_source_port_map:
|
|
3766
|
-
subcircuit_source:
|
|
3781
|
+
source_component_id: z174.string(),
|
|
3782
|
+
spice_pin_to_source_port_map: z174.record(z174.string(), z174.string()),
|
|
3783
|
+
subcircuit_source: z174.string()
|
|
3767
3784
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
3768
3785
|
expectTypesMatch(
|
|
3769
3786
|
true
|
|
3770
3787
|
);
|
|
3771
3788
|
|
|
3772
3789
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
3773
|
-
import { z as
|
|
3790
|
+
import { z as z175 } from "zod";
|
|
3774
3791
|
var hasValue = (value) => value !== void 0;
|
|
3775
|
-
var simulation_oscilloscope_trace =
|
|
3776
|
-
type:
|
|
3792
|
+
var simulation_oscilloscope_trace = z175.object({
|
|
3793
|
+
type: z175.literal("simulation_oscilloscope_trace"),
|
|
3777
3794
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
3778
3795
|
"simulation_oscilloscope_trace"
|
|
3779
3796
|
),
|
|
3780
|
-
simulation_transient_voltage_graph_id:
|
|
3781
|
-
simulation_transient_current_graph_id:
|
|
3782
|
-
simulation_voltage_probe_id:
|
|
3783
|
-
simulation_current_probe_id:
|
|
3784
|
-
display_name:
|
|
3785
|
-
color:
|
|
3786
|
-
display_center_value:
|
|
3787
|
-
display_center_offset_divs:
|
|
3788
|
-
volts_per_div:
|
|
3789
|
-
amps_per_div:
|
|
3797
|
+
simulation_transient_voltage_graph_id: z175.string().optional(),
|
|
3798
|
+
simulation_transient_current_graph_id: z175.string().optional(),
|
|
3799
|
+
simulation_voltage_probe_id: z175.string().optional(),
|
|
3800
|
+
simulation_current_probe_id: z175.string().optional(),
|
|
3801
|
+
display_name: z175.string().optional(),
|
|
3802
|
+
color: z175.string().optional(),
|
|
3803
|
+
display_center_value: z175.number().optional(),
|
|
3804
|
+
display_center_offset_divs: z175.number().optional(),
|
|
3805
|
+
volts_per_div: z175.number().positive().optional(),
|
|
3806
|
+
amps_per_div: z175.number().positive().optional()
|
|
3790
3807
|
}).describe(
|
|
3791
3808
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
3792
3809
|
).superRefine((data, ctx) => {
|
|
@@ -3800,19 +3817,19 @@ var simulation_oscilloscope_trace = z174.object({
|
|
|
3800
3817
|
].filter(hasValue).length;
|
|
3801
3818
|
if (voltageReferences + currentReferences !== 1) {
|
|
3802
3819
|
ctx.addIssue({
|
|
3803
|
-
code:
|
|
3820
|
+
code: z175.ZodIssueCode.custom,
|
|
3804
3821
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
3805
3822
|
});
|
|
3806
3823
|
}
|
|
3807
3824
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
3808
3825
|
ctx.addIssue({
|
|
3809
|
-
code:
|
|
3826
|
+
code: z175.ZodIssueCode.custom,
|
|
3810
3827
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
3811
3828
|
});
|
|
3812
3829
|
}
|
|
3813
3830
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
3814
3831
|
ctx.addIssue({
|
|
3815
|
-
code:
|
|
3832
|
+
code: z175.ZodIssueCode.custom,
|
|
3816
3833
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
3817
3834
|
});
|
|
3818
3835
|
}
|
|
@@ -3820,8 +3837,8 @@ var simulation_oscilloscope_trace = z174.object({
|
|
|
3820
3837
|
expectTypesMatch(true);
|
|
3821
3838
|
|
|
3822
3839
|
// src/any_circuit_element.ts
|
|
3823
|
-
import { z as
|
|
3824
|
-
var any_circuit_element =
|
|
3840
|
+
import { z as z176 } from "zod";
|
|
3841
|
+
var any_circuit_element = z176.union([
|
|
3825
3842
|
source_trace,
|
|
3826
3843
|
source_port,
|
|
3827
3844
|
source_component_internal_connection,
|
|
@@ -3853,6 +3870,7 @@ var any_circuit_element = z175.union([
|
|
|
3853
3870
|
source_invalid_component_property_error,
|
|
3854
3871
|
source_trace_not_connected_error,
|
|
3855
3872
|
source_pin_missing_trace_warning,
|
|
3873
|
+
source_unnamed_trace_warning,
|
|
3856
3874
|
source_missing_manufacturer_part_number_warning,
|
|
3857
3875
|
source_no_power_pin_defined_warning,
|
|
3858
3876
|
source_no_ground_pin_defined_warning,
|
|
@@ -4205,6 +4223,7 @@ export {
|
|
|
4205
4223
|
source_simple_voltage_source,
|
|
4206
4224
|
source_trace,
|
|
4207
4225
|
source_trace_not_connected_error,
|
|
4226
|
+
source_unnamed_trace_warning,
|
|
4208
4227
|
spice_simulation_options,
|
|
4209
4228
|
supplier_footprint_mismatch_warning,
|
|
4210
4229
|
supplier_name,
|