circuit-json 0.0.442 → 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 +19 -0
- package/dist/index.d.mts +78 -1
- package/dist/index.mjs +1360 -1342
- 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,158 +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
|
-
sheet_index:
|
|
1519
|
-
subcircuit_id:
|
|
1520
|
-
outline_color:
|
|
1533
|
+
name: z91.string().optional(),
|
|
1534
|
+
sheet_index: z91.number().optional(),
|
|
1535
|
+
subcircuit_id: z91.string().optional(),
|
|
1536
|
+
outline_color: z91.string().optional()
|
|
1521
1537
|
}).describe(
|
|
1522
1538
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1523
1539
|
);
|
|
1524
1540
|
expectTypesMatch(true);
|
|
1525
1541
|
|
|
1526
1542
|
// src/pcb/properties/brep.ts
|
|
1527
|
-
import { z as
|
|
1528
|
-
var point_with_bulge =
|
|
1543
|
+
import { z as z92 } from "zod";
|
|
1544
|
+
var point_with_bulge = z92.object({
|
|
1529
1545
|
x: distance,
|
|
1530
1546
|
y: distance,
|
|
1531
|
-
bulge:
|
|
1547
|
+
bulge: z92.number().optional()
|
|
1532
1548
|
});
|
|
1533
1549
|
expectTypesMatch(true);
|
|
1534
|
-
var ring =
|
|
1535
|
-
vertices:
|
|
1550
|
+
var ring = z92.object({
|
|
1551
|
+
vertices: z92.array(point_with_bulge)
|
|
1536
1552
|
});
|
|
1537
1553
|
expectTypesMatch(true);
|
|
1538
|
-
var brep_shape =
|
|
1554
|
+
var brep_shape = z92.object({
|
|
1539
1555
|
outer_ring: ring,
|
|
1540
|
-
inner_rings:
|
|
1556
|
+
inner_rings: z92.array(ring).default([])
|
|
1541
1557
|
});
|
|
1542
1558
|
expectTypesMatch(true);
|
|
1543
1559
|
|
|
1544
1560
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1545
|
-
import { z as
|
|
1546
|
-
var pcb_route_hint =
|
|
1561
|
+
import { z as z93 } from "zod";
|
|
1562
|
+
var pcb_route_hint = z93.object({
|
|
1547
1563
|
x: distance,
|
|
1548
1564
|
y: distance,
|
|
1549
|
-
via:
|
|
1565
|
+
via: z93.boolean().optional(),
|
|
1550
1566
|
via_to_layer: layer_ref.optional()
|
|
1551
1567
|
});
|
|
1552
|
-
var pcb_route_hints =
|
|
1568
|
+
var pcb_route_hints = z93.array(pcb_route_hint);
|
|
1553
1569
|
expectTypesMatch(true);
|
|
1554
1570
|
expectTypesMatch(true);
|
|
1555
1571
|
|
|
1556
1572
|
// src/pcb/properties/route_hint_point.ts
|
|
1557
|
-
import { z as
|
|
1558
|
-
var route_hint_point =
|
|
1573
|
+
import { z as z94 } from "zod";
|
|
1574
|
+
var route_hint_point = z94.object({
|
|
1559
1575
|
x: distance,
|
|
1560
1576
|
y: distance,
|
|
1561
|
-
via:
|
|
1577
|
+
via: z94.boolean().optional(),
|
|
1562
1578
|
to_layer: layer_ref.optional(),
|
|
1563
1579
|
trace_width: distance.optional()
|
|
1564
1580
|
});
|
|
1565
1581
|
expectTypesMatch(true);
|
|
1566
1582
|
|
|
1567
1583
|
// src/pcb/properties/manufacturing_drc_properties.ts
|
|
1568
|
-
import { z as
|
|
1569
|
-
var manufacturing_drc_properties =
|
|
1584
|
+
import { z as z95 } from "zod";
|
|
1585
|
+
var manufacturing_drc_properties = z95.object({
|
|
1570
1586
|
min_trace_width: length.optional(),
|
|
1571
1587
|
min_board_edge_clearance: length.optional(),
|
|
1572
1588
|
min_via_hole_edge_to_via_hole_edge_clearance: length.optional(),
|
|
@@ -1581,27 +1597,27 @@ var manufacturing_drc_properties = z94.object({
|
|
|
1581
1597
|
});
|
|
1582
1598
|
|
|
1583
1599
|
// src/pcb/pcb_component.ts
|
|
1584
|
-
import { z as
|
|
1585
|
-
var pcb_component =
|
|
1586
|
-
type:
|
|
1600
|
+
import { z as z96 } from "zod";
|
|
1601
|
+
var pcb_component = z96.object({
|
|
1602
|
+
type: z96.literal("pcb_component"),
|
|
1587
1603
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1588
|
-
source_component_id:
|
|
1604
|
+
source_component_id: z96.string(),
|
|
1589
1605
|
center: point,
|
|
1590
1606
|
layer: layer_ref,
|
|
1591
1607
|
rotation,
|
|
1592
|
-
display_offset_x:
|
|
1608
|
+
display_offset_x: z96.string().optional().describe(
|
|
1593
1609
|
"How to display the x offset for this part, usually corresponding with how the user specified it"
|
|
1594
1610
|
),
|
|
1595
|
-
display_offset_y:
|
|
1611
|
+
display_offset_y: z96.string().optional().describe(
|
|
1596
1612
|
"How to display the y offset for this part, usually corresponding with how the user specified it"
|
|
1597
1613
|
),
|
|
1598
1614
|
width: length,
|
|
1599
1615
|
height: length,
|
|
1600
|
-
do_not_place:
|
|
1601
|
-
is_allowed_to_be_off_board:
|
|
1602
|
-
subcircuit_id:
|
|
1603
|
-
pcb_group_id:
|
|
1604
|
-
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([
|
|
1605
1621
|
"packed",
|
|
1606
1622
|
"relative_to_group_anchor",
|
|
1607
1623
|
"relative_to_another_component",
|
|
@@ -1609,129 +1625,129 @@ var pcb_component = z95.object({
|
|
|
1609
1625
|
]).optional(),
|
|
1610
1626
|
anchor_position: point.optional(),
|
|
1611
1627
|
anchor_alignment: ninePointAnchor.optional(),
|
|
1612
|
-
positioned_relative_to_pcb_group_id:
|
|
1613
|
-
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(),
|
|
1614
1630
|
cable_insertion_center: point.optional(),
|
|
1615
|
-
insertion_direction:
|
|
1631
|
+
insertion_direction: z96.enum([
|
|
1616
1632
|
"from_above",
|
|
1617
1633
|
"from_left",
|
|
1618
1634
|
"from_right",
|
|
1619
1635
|
"from_front",
|
|
1620
1636
|
"from_back"
|
|
1621
1637
|
]).optional(),
|
|
1622
|
-
metadata:
|
|
1638
|
+
metadata: z96.object({
|
|
1623
1639
|
kicad_footprint: kicadFootprintMetadata.optional()
|
|
1624
1640
|
}).optional(),
|
|
1625
|
-
obstructs_within_bounds:
|
|
1641
|
+
obstructs_within_bounds: z96.boolean().default(true).describe(
|
|
1626
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"
|
|
1627
1643
|
)
|
|
1628
1644
|
}).describe("Defines a component on the PCB");
|
|
1629
1645
|
expectTypesMatch(true);
|
|
1630
1646
|
|
|
1631
1647
|
// src/pcb/pcb_hole.ts
|
|
1632
|
-
import { z as
|
|
1633
|
-
var pcb_hole_circle =
|
|
1634
|
-
type:
|
|
1648
|
+
import { z as z97 } from "zod";
|
|
1649
|
+
var pcb_hole_circle = z97.object({
|
|
1650
|
+
type: z97.literal("pcb_hole"),
|
|
1635
1651
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1636
|
-
pcb_group_id:
|
|
1637
|
-
subcircuit_id:
|
|
1638
|
-
pcb_component_id:
|
|
1639
|
-
hole_shape:
|
|
1640
|
-
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(),
|
|
1641
1657
|
x: distance,
|
|
1642
1658
|
y: distance,
|
|
1643
|
-
is_covered_with_solder_mask:
|
|
1644
|
-
soldermask_margin:
|
|
1659
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1660
|
+
soldermask_margin: z97.number().optional()
|
|
1645
1661
|
});
|
|
1646
1662
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1647
1663
|
"Defines a circular hole on the PCB"
|
|
1648
1664
|
);
|
|
1649
1665
|
expectTypesMatch(true);
|
|
1650
|
-
var pcb_hole_rect =
|
|
1651
|
-
type:
|
|
1666
|
+
var pcb_hole_rect = z97.object({
|
|
1667
|
+
type: z97.literal("pcb_hole"),
|
|
1652
1668
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1653
|
-
pcb_group_id:
|
|
1654
|
-
subcircuit_id:
|
|
1655
|
-
pcb_component_id:
|
|
1656
|
-
hole_shape:
|
|
1657
|
-
hole_width:
|
|
1658
|
-
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(),
|
|
1659
1675
|
x: distance,
|
|
1660
1676
|
y: distance,
|
|
1661
|
-
is_covered_with_solder_mask:
|
|
1662
|
-
soldermask_margin:
|
|
1677
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1678
|
+
soldermask_margin: z97.number().optional()
|
|
1663
1679
|
});
|
|
1664
1680
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1665
1681
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1666
1682
|
);
|
|
1667
1683
|
expectTypesMatch(true);
|
|
1668
|
-
var pcb_hole_circle_or_square =
|
|
1669
|
-
type:
|
|
1684
|
+
var pcb_hole_circle_or_square = z97.object({
|
|
1685
|
+
type: z97.literal("pcb_hole"),
|
|
1670
1686
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1671
|
-
pcb_group_id:
|
|
1672
|
-
subcircuit_id:
|
|
1673
|
-
pcb_component_id:
|
|
1674
|
-
hole_shape:
|
|
1675
|
-
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(),
|
|
1676
1692
|
x: distance,
|
|
1677
1693
|
y: distance,
|
|
1678
|
-
is_covered_with_solder_mask:
|
|
1679
|
-
soldermask_margin:
|
|
1694
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1695
|
+
soldermask_margin: z97.number().optional()
|
|
1680
1696
|
});
|
|
1681
1697
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1682
1698
|
"Defines a circular or square hole on the PCB"
|
|
1683
1699
|
);
|
|
1684
1700
|
expectTypesMatch(true);
|
|
1685
|
-
var pcb_hole_oval =
|
|
1686
|
-
type:
|
|
1701
|
+
var pcb_hole_oval = z97.object({
|
|
1702
|
+
type: z97.literal("pcb_hole"),
|
|
1687
1703
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1688
|
-
pcb_group_id:
|
|
1689
|
-
subcircuit_id:
|
|
1690
|
-
pcb_component_id:
|
|
1691
|
-
hole_shape:
|
|
1692
|
-
hole_width:
|
|
1693
|
-
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(),
|
|
1694
1710
|
x: distance,
|
|
1695
1711
|
y: distance,
|
|
1696
|
-
is_covered_with_solder_mask:
|
|
1697
|
-
soldermask_margin:
|
|
1712
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1713
|
+
soldermask_margin: z97.number().optional()
|
|
1698
1714
|
});
|
|
1699
1715
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1700
1716
|
"Defines an oval hole on the PCB"
|
|
1701
1717
|
);
|
|
1702
1718
|
expectTypesMatch(true);
|
|
1703
|
-
var pcb_hole_pill =
|
|
1704
|
-
type:
|
|
1719
|
+
var pcb_hole_pill = z97.object({
|
|
1720
|
+
type: z97.literal("pcb_hole"),
|
|
1705
1721
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1706
|
-
pcb_group_id:
|
|
1707
|
-
subcircuit_id:
|
|
1708
|
-
pcb_component_id:
|
|
1709
|
-
hole_shape:
|
|
1710
|
-
hole_width:
|
|
1711
|
-
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(),
|
|
1712
1728
|
x: distance,
|
|
1713
1729
|
y: distance,
|
|
1714
|
-
is_covered_with_solder_mask:
|
|
1715
|
-
soldermask_margin:
|
|
1730
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1731
|
+
soldermask_margin: z97.number().optional()
|
|
1716
1732
|
});
|
|
1717
1733
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
1718
1734
|
"Defines a pill-shaped hole on the PCB"
|
|
1719
1735
|
);
|
|
1720
1736
|
expectTypesMatch(true);
|
|
1721
|
-
var pcb_hole_rotated_pill =
|
|
1722
|
-
type:
|
|
1737
|
+
var pcb_hole_rotated_pill = z97.object({
|
|
1738
|
+
type: z97.literal("pcb_hole"),
|
|
1723
1739
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1724
|
-
pcb_group_id:
|
|
1725
|
-
subcircuit_id:
|
|
1726
|
-
pcb_component_id:
|
|
1727
|
-
hole_shape:
|
|
1728
|
-
hole_width:
|
|
1729
|
-
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(),
|
|
1730
1746
|
x: distance,
|
|
1731
1747
|
y: distance,
|
|
1732
1748
|
ccw_rotation: rotation,
|
|
1733
|
-
is_covered_with_solder_mask:
|
|
1734
|
-
soldermask_margin:
|
|
1749
|
+
is_covered_with_solder_mask: z97.boolean().optional(),
|
|
1750
|
+
soldermask_margin: z97.number().optional()
|
|
1735
1751
|
});
|
|
1736
1752
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
1737
1753
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -1740,147 +1756,147 @@ expectTypesMatch(true);
|
|
|
1740
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);
|
|
1741
1757
|
|
|
1742
1758
|
// src/pcb/pcb_plated_hole.ts
|
|
1743
|
-
import { z as
|
|
1744
|
-
var pcb_plated_hole_circle =
|
|
1745
|
-
type:
|
|
1746
|
-
shape:
|
|
1747
|
-
pcb_group_id:
|
|
1748
|
-
subcircuit_id:
|
|
1749
|
-
outer_diameter:
|
|
1750
|
-
hole_diameter:
|
|
1751
|
-
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(),
|
|
1752
1768
|
x: distance,
|
|
1753
1769
|
y: distance,
|
|
1754
|
-
layers:
|
|
1755
|
-
port_hints:
|
|
1756
|
-
pcb_component_id:
|
|
1757
|
-
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(),
|
|
1758
1774
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1759
|
-
soldermask_margin:
|
|
1775
|
+
soldermask_margin: z98.number().optional()
|
|
1760
1776
|
});
|
|
1761
|
-
var pcb_plated_hole_oval =
|
|
1762
|
-
type:
|
|
1763
|
-
shape:
|
|
1764
|
-
pcb_group_id:
|
|
1765
|
-
subcircuit_id:
|
|
1766
|
-
outer_width:
|
|
1767
|
-
outer_height:
|
|
1768
|
-
hole_width:
|
|
1769
|
-
hole_height:
|
|
1770
|
-
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(),
|
|
1771
1787
|
x: distance,
|
|
1772
1788
|
y: distance,
|
|
1773
1789
|
ccw_rotation: rotation,
|
|
1774
|
-
layers:
|
|
1775
|
-
port_hints:
|
|
1776
|
-
pcb_component_id:
|
|
1777
|
-
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(),
|
|
1778
1794
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1779
|
-
soldermask_margin:
|
|
1795
|
+
soldermask_margin: z98.number().optional()
|
|
1780
1796
|
});
|
|
1781
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1782
|
-
type:
|
|
1783
|
-
shape:
|
|
1784
|
-
pcb_group_id:
|
|
1785
|
-
subcircuit_id:
|
|
1786
|
-
hole_shape:
|
|
1787
|
-
pad_shape:
|
|
1788
|
-
hole_diameter:
|
|
1789
|
-
rect_pad_width:
|
|
1790
|
-
rect_pad_height:
|
|
1791
|
-
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(),
|
|
1792
1808
|
hole_offset_x: distance.default(0),
|
|
1793
1809
|
hole_offset_y: distance.default(0),
|
|
1794
|
-
is_covered_with_solder_mask:
|
|
1810
|
+
is_covered_with_solder_mask: z98.boolean().optional(),
|
|
1795
1811
|
x: distance,
|
|
1796
1812
|
y: distance,
|
|
1797
|
-
layers:
|
|
1798
|
-
port_hints:
|
|
1799
|
-
pcb_component_id:
|
|
1800
|
-
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(),
|
|
1801
1817
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1802
|
-
soldermask_margin:
|
|
1818
|
+
soldermask_margin: z98.number().optional(),
|
|
1803
1819
|
rect_ccw_rotation: rotation.optional()
|
|
1804
1820
|
});
|
|
1805
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1806
|
-
type:
|
|
1807
|
-
shape:
|
|
1808
|
-
pcb_group_id:
|
|
1809
|
-
subcircuit_id:
|
|
1810
|
-
hole_shape:
|
|
1811
|
-
pad_shape:
|
|
1812
|
-
hole_width:
|
|
1813
|
-
hole_height:
|
|
1814
|
-
rect_pad_width:
|
|
1815
|
-
rect_pad_height:
|
|
1816
|
-
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(),
|
|
1817
1833
|
hole_offset_x: distance.default(0),
|
|
1818
1834
|
hole_offset_y: distance.default(0),
|
|
1819
|
-
is_covered_with_solder_mask:
|
|
1835
|
+
is_covered_with_solder_mask: z98.boolean().optional(),
|
|
1820
1836
|
x: distance,
|
|
1821
1837
|
y: distance,
|
|
1822
|
-
layers:
|
|
1823
|
-
port_hints:
|
|
1824
|
-
pcb_component_id:
|
|
1825
|
-
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(),
|
|
1826
1842
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1827
|
-
soldermask_margin:
|
|
1843
|
+
soldermask_margin: z98.number().optional()
|
|
1828
1844
|
});
|
|
1829
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1830
|
-
type:
|
|
1831
|
-
shape:
|
|
1832
|
-
pcb_group_id:
|
|
1833
|
-
subcircuit_id:
|
|
1834
|
-
hole_shape:
|
|
1835
|
-
pad_shape:
|
|
1836
|
-
hole_width:
|
|
1837
|
-
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(),
|
|
1838
1854
|
hole_ccw_rotation: rotation,
|
|
1839
|
-
rect_pad_width:
|
|
1840
|
-
rect_pad_height:
|
|
1841
|
-
rect_border_radius:
|
|
1855
|
+
rect_pad_width: z98.number(),
|
|
1856
|
+
rect_pad_height: z98.number(),
|
|
1857
|
+
rect_border_radius: z98.number().optional(),
|
|
1842
1858
|
rect_ccw_rotation: rotation,
|
|
1843
1859
|
hole_offset_x: distance.default(0),
|
|
1844
1860
|
hole_offset_y: distance.default(0),
|
|
1845
|
-
is_covered_with_solder_mask:
|
|
1861
|
+
is_covered_with_solder_mask: z98.boolean().optional(),
|
|
1846
1862
|
x: distance,
|
|
1847
1863
|
y: distance,
|
|
1848
|
-
layers:
|
|
1849
|
-
port_hints:
|
|
1850
|
-
pcb_component_id:
|
|
1851
|
-
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(),
|
|
1852
1868
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1853
|
-
soldermask_margin:
|
|
1869
|
+
soldermask_margin: z98.number().optional()
|
|
1854
1870
|
});
|
|
1855
|
-
var pcb_hole_with_polygon_pad =
|
|
1856
|
-
type:
|
|
1857
|
-
shape:
|
|
1858
|
-
pcb_group_id:
|
|
1859
|
-
subcircuit_id:
|
|
1860
|
-
hole_shape:
|
|
1861
|
-
hole_diameter:
|
|
1862
|
-
hole_width:
|
|
1863
|
-
hole_height:
|
|
1864
|
-
pad_outline:
|
|
1865
|
-
|
|
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({
|
|
1866
1882
|
x: distance,
|
|
1867
1883
|
y: distance
|
|
1868
1884
|
})
|
|
1869
1885
|
).min(3),
|
|
1870
1886
|
hole_offset_x: distance.default(0),
|
|
1871
1887
|
hole_offset_y: distance.default(0),
|
|
1872
|
-
is_covered_with_solder_mask:
|
|
1888
|
+
is_covered_with_solder_mask: z98.boolean().optional(),
|
|
1873
1889
|
x: distance,
|
|
1874
1890
|
y: distance,
|
|
1875
|
-
layers:
|
|
1876
|
-
port_hints:
|
|
1877
|
-
pcb_component_id:
|
|
1878
|
-
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(),
|
|
1879
1895
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1880
|
-
soldermask_margin:
|
|
1896
|
+
soldermask_margin: z98.number().optional(),
|
|
1881
1897
|
ccw_rotation: rotation.optional()
|
|
1882
1898
|
});
|
|
1883
|
-
var pcb_plated_hole =
|
|
1899
|
+
var pcb_plated_hole = z98.union([
|
|
1884
1900
|
pcb_plated_hole_circle,
|
|
1885
1901
|
pcb_plated_hole_oval,
|
|
1886
1902
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1898,138 +1914,138 @@ expectTypesMatch(true);
|
|
|
1898
1914
|
expectTypesMatch(true);
|
|
1899
1915
|
|
|
1900
1916
|
// src/pcb/pcb_port.ts
|
|
1901
|
-
import { z as
|
|
1902
|
-
var pcb_port =
|
|
1903
|
-
type:
|
|
1917
|
+
import { z as z99 } from "zod";
|
|
1918
|
+
var pcb_port = z99.object({
|
|
1919
|
+
type: z99.literal("pcb_port"),
|
|
1904
1920
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1905
|
-
pcb_group_id:
|
|
1906
|
-
subcircuit_id:
|
|
1907
|
-
source_port_id:
|
|
1908
|
-
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(),
|
|
1909
1925
|
x: distance,
|
|
1910
1926
|
y: distance,
|
|
1911
|
-
layers:
|
|
1912
|
-
is_board_pinout:
|
|
1927
|
+
layers: z99.array(layer_ref),
|
|
1928
|
+
is_board_pinout: z99.boolean().optional()
|
|
1913
1929
|
}).describe("Defines a port on the PCB");
|
|
1914
1930
|
expectTypesMatch(true);
|
|
1915
1931
|
|
|
1916
1932
|
// src/pcb/pcb_smtpad.ts
|
|
1917
|
-
import { z as
|
|
1918
|
-
var pcb_smtpad_circle =
|
|
1919
|
-
type:
|
|
1920
|
-
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"),
|
|
1921
1937
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1922
|
-
pcb_group_id:
|
|
1923
|
-
subcircuit_id:
|
|
1938
|
+
pcb_group_id: z100.string().optional(),
|
|
1939
|
+
subcircuit_id: z100.string().optional(),
|
|
1924
1940
|
x: distance,
|
|
1925
1941
|
y: distance,
|
|
1926
|
-
radius:
|
|
1942
|
+
radius: z100.number(),
|
|
1927
1943
|
layer: layer_ref,
|
|
1928
|
-
port_hints:
|
|
1929
|
-
pcb_component_id:
|
|
1930
|
-
pcb_port_id:
|
|
1931
|
-
is_covered_with_solder_mask:
|
|
1932
|
-
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()
|
|
1933
1949
|
});
|
|
1934
|
-
var pcb_smtpad_rect =
|
|
1935
|
-
type:
|
|
1936
|
-
shape:
|
|
1950
|
+
var pcb_smtpad_rect = z100.object({
|
|
1951
|
+
type: z100.literal("pcb_smtpad"),
|
|
1952
|
+
shape: z100.literal("rect"),
|
|
1937
1953
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1938
|
-
pcb_group_id:
|
|
1939
|
-
subcircuit_id:
|
|
1954
|
+
pcb_group_id: z100.string().optional(),
|
|
1955
|
+
subcircuit_id: z100.string().optional(),
|
|
1940
1956
|
x: distance,
|
|
1941
1957
|
y: distance,
|
|
1942
|
-
width:
|
|
1943
|
-
height:
|
|
1944
|
-
rect_border_radius:
|
|
1945
|
-
corner_radius:
|
|
1958
|
+
width: z100.number(),
|
|
1959
|
+
height: z100.number(),
|
|
1960
|
+
rect_border_radius: z100.number().optional(),
|
|
1961
|
+
corner_radius: z100.number().optional(),
|
|
1946
1962
|
layer: layer_ref,
|
|
1947
|
-
port_hints:
|
|
1948
|
-
pcb_component_id:
|
|
1949
|
-
pcb_port_id:
|
|
1950
|
-
is_covered_with_solder_mask:
|
|
1951
|
-
soldermask_margin:
|
|
1952
|
-
soldermask_margin_left:
|
|
1953
|
-
soldermask_margin_top:
|
|
1954
|
-
soldermask_margin_right:
|
|
1955
|
-
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()
|
|
1956
1972
|
});
|
|
1957
|
-
var pcb_smtpad_rotated_rect =
|
|
1958
|
-
type:
|
|
1959
|
-
shape:
|
|
1973
|
+
var pcb_smtpad_rotated_rect = z100.object({
|
|
1974
|
+
type: z100.literal("pcb_smtpad"),
|
|
1975
|
+
shape: z100.literal("rotated_rect"),
|
|
1960
1976
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1961
|
-
pcb_group_id:
|
|
1962
|
-
subcircuit_id:
|
|
1977
|
+
pcb_group_id: z100.string().optional(),
|
|
1978
|
+
subcircuit_id: z100.string().optional(),
|
|
1963
1979
|
x: distance,
|
|
1964
1980
|
y: distance,
|
|
1965
|
-
width:
|
|
1966
|
-
height:
|
|
1967
|
-
rect_border_radius:
|
|
1968
|
-
corner_radius:
|
|
1981
|
+
width: z100.number(),
|
|
1982
|
+
height: z100.number(),
|
|
1983
|
+
rect_border_radius: z100.number().optional(),
|
|
1984
|
+
corner_radius: z100.number().optional(),
|
|
1969
1985
|
ccw_rotation: rotation,
|
|
1970
1986
|
layer: layer_ref,
|
|
1971
|
-
port_hints:
|
|
1972
|
-
pcb_component_id:
|
|
1973
|
-
pcb_port_id:
|
|
1974
|
-
is_covered_with_solder_mask:
|
|
1975
|
-
soldermask_margin:
|
|
1976
|
-
soldermask_margin_left:
|
|
1977
|
-
soldermask_margin_top:
|
|
1978
|
-
soldermask_margin_right:
|
|
1979
|
-
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()
|
|
1980
1996
|
});
|
|
1981
|
-
var pcb_smtpad_pill =
|
|
1982
|
-
type:
|
|
1983
|
-
shape:
|
|
1997
|
+
var pcb_smtpad_pill = z100.object({
|
|
1998
|
+
type: z100.literal("pcb_smtpad"),
|
|
1999
|
+
shape: z100.literal("pill"),
|
|
1984
2000
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1985
|
-
pcb_group_id:
|
|
1986
|
-
subcircuit_id:
|
|
2001
|
+
pcb_group_id: z100.string().optional(),
|
|
2002
|
+
subcircuit_id: z100.string().optional(),
|
|
1987
2003
|
x: distance,
|
|
1988
2004
|
y: distance,
|
|
1989
|
-
width:
|
|
1990
|
-
height:
|
|
1991
|
-
radius:
|
|
2005
|
+
width: z100.number(),
|
|
2006
|
+
height: z100.number(),
|
|
2007
|
+
radius: z100.number(),
|
|
1992
2008
|
layer: layer_ref,
|
|
1993
|
-
port_hints:
|
|
1994
|
-
pcb_component_id:
|
|
1995
|
-
pcb_port_id:
|
|
1996
|
-
is_covered_with_solder_mask:
|
|
1997
|
-
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()
|
|
1998
2014
|
});
|
|
1999
|
-
var pcb_smtpad_rotated_pill =
|
|
2000
|
-
type:
|
|
2001
|
-
shape:
|
|
2015
|
+
var pcb_smtpad_rotated_pill = z100.object({
|
|
2016
|
+
type: z100.literal("pcb_smtpad"),
|
|
2017
|
+
shape: z100.literal("rotated_pill"),
|
|
2002
2018
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2003
|
-
pcb_group_id:
|
|
2004
|
-
subcircuit_id:
|
|
2019
|
+
pcb_group_id: z100.string().optional(),
|
|
2020
|
+
subcircuit_id: z100.string().optional(),
|
|
2005
2021
|
x: distance,
|
|
2006
2022
|
y: distance,
|
|
2007
|
-
width:
|
|
2008
|
-
height:
|
|
2009
|
-
radius:
|
|
2023
|
+
width: z100.number(),
|
|
2024
|
+
height: z100.number(),
|
|
2025
|
+
radius: z100.number(),
|
|
2010
2026
|
ccw_rotation: rotation,
|
|
2011
2027
|
layer: layer_ref,
|
|
2012
|
-
port_hints:
|
|
2013
|
-
pcb_component_id:
|
|
2014
|
-
pcb_port_id:
|
|
2015
|
-
is_covered_with_solder_mask:
|
|
2016
|
-
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()
|
|
2017
2033
|
});
|
|
2018
|
-
var pcb_smtpad_polygon =
|
|
2019
|
-
type:
|
|
2020
|
-
shape:
|
|
2034
|
+
var pcb_smtpad_polygon = z100.object({
|
|
2035
|
+
type: z100.literal("pcb_smtpad"),
|
|
2036
|
+
shape: z100.literal("polygon"),
|
|
2021
2037
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2022
|
-
pcb_group_id:
|
|
2023
|
-
subcircuit_id:
|
|
2024
|
-
points:
|
|
2038
|
+
pcb_group_id: z100.string().optional(),
|
|
2039
|
+
subcircuit_id: z100.string().optional(),
|
|
2040
|
+
points: z100.array(point),
|
|
2025
2041
|
layer: layer_ref,
|
|
2026
|
-
port_hints:
|
|
2027
|
-
pcb_component_id:
|
|
2028
|
-
pcb_port_id:
|
|
2029
|
-
is_covered_with_solder_mask:
|
|
2030
|
-
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()
|
|
2031
2047
|
});
|
|
2032
|
-
var pcb_smtpad =
|
|
2048
|
+
var pcb_smtpad = z100.discriminatedUnion("shape", [
|
|
2033
2049
|
pcb_smtpad_circle,
|
|
2034
2050
|
pcb_smtpad_rect,
|
|
2035
2051
|
pcb_smtpad_rotated_rect,
|
|
@@ -2045,79 +2061,79 @@ expectTypesMatch(true);
|
|
|
2045
2061
|
expectTypesMatch(true);
|
|
2046
2062
|
|
|
2047
2063
|
// src/pcb/pcb_solder_paste.ts
|
|
2048
|
-
import { z as
|
|
2049
|
-
var pcb_solder_paste_circle =
|
|
2050
|
-
type:
|
|
2051
|
-
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"),
|
|
2052
2068
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2053
|
-
pcb_group_id:
|
|
2054
|
-
subcircuit_id:
|
|
2069
|
+
pcb_group_id: z101.string().optional(),
|
|
2070
|
+
subcircuit_id: z101.string().optional(),
|
|
2055
2071
|
x: distance,
|
|
2056
2072
|
y: distance,
|
|
2057
|
-
radius:
|
|
2073
|
+
radius: z101.number(),
|
|
2058
2074
|
layer: layer_ref,
|
|
2059
|
-
pcb_component_id:
|
|
2060
|
-
pcb_smtpad_id:
|
|
2075
|
+
pcb_component_id: z101.string().optional(),
|
|
2076
|
+
pcb_smtpad_id: z101.string().optional()
|
|
2061
2077
|
});
|
|
2062
|
-
var pcb_solder_paste_rect =
|
|
2063
|
-
type:
|
|
2064
|
-
shape:
|
|
2078
|
+
var pcb_solder_paste_rect = z101.object({
|
|
2079
|
+
type: z101.literal("pcb_solder_paste"),
|
|
2080
|
+
shape: z101.literal("rect"),
|
|
2065
2081
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2066
|
-
pcb_group_id:
|
|
2067
|
-
subcircuit_id:
|
|
2082
|
+
pcb_group_id: z101.string().optional(),
|
|
2083
|
+
subcircuit_id: z101.string().optional(),
|
|
2068
2084
|
x: distance,
|
|
2069
2085
|
y: distance,
|
|
2070
|
-
width:
|
|
2071
|
-
height:
|
|
2086
|
+
width: z101.number(),
|
|
2087
|
+
height: z101.number(),
|
|
2072
2088
|
layer: layer_ref,
|
|
2073
|
-
pcb_component_id:
|
|
2074
|
-
pcb_smtpad_id:
|
|
2089
|
+
pcb_component_id: z101.string().optional(),
|
|
2090
|
+
pcb_smtpad_id: z101.string().optional()
|
|
2075
2091
|
});
|
|
2076
|
-
var pcb_solder_paste_pill =
|
|
2077
|
-
type:
|
|
2078
|
-
shape:
|
|
2092
|
+
var pcb_solder_paste_pill = z101.object({
|
|
2093
|
+
type: z101.literal("pcb_solder_paste"),
|
|
2094
|
+
shape: z101.literal("pill"),
|
|
2079
2095
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2080
|
-
pcb_group_id:
|
|
2081
|
-
subcircuit_id:
|
|
2096
|
+
pcb_group_id: z101.string().optional(),
|
|
2097
|
+
subcircuit_id: z101.string().optional(),
|
|
2082
2098
|
x: distance,
|
|
2083
2099
|
y: distance,
|
|
2084
|
-
width:
|
|
2085
|
-
height:
|
|
2086
|
-
radius:
|
|
2100
|
+
width: z101.number(),
|
|
2101
|
+
height: z101.number(),
|
|
2102
|
+
radius: z101.number(),
|
|
2087
2103
|
layer: layer_ref,
|
|
2088
|
-
pcb_component_id:
|
|
2089
|
-
pcb_smtpad_id:
|
|
2104
|
+
pcb_component_id: z101.string().optional(),
|
|
2105
|
+
pcb_smtpad_id: z101.string().optional()
|
|
2090
2106
|
});
|
|
2091
|
-
var pcb_solder_paste_rotated_rect =
|
|
2092
|
-
type:
|
|
2093
|
-
shape:
|
|
2107
|
+
var pcb_solder_paste_rotated_rect = z101.object({
|
|
2108
|
+
type: z101.literal("pcb_solder_paste"),
|
|
2109
|
+
shape: z101.literal("rotated_rect"),
|
|
2094
2110
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2095
|
-
pcb_group_id:
|
|
2096
|
-
subcircuit_id:
|
|
2111
|
+
pcb_group_id: z101.string().optional(),
|
|
2112
|
+
subcircuit_id: z101.string().optional(),
|
|
2097
2113
|
x: distance,
|
|
2098
2114
|
y: distance,
|
|
2099
|
-
width:
|
|
2100
|
-
height:
|
|
2115
|
+
width: z101.number(),
|
|
2116
|
+
height: z101.number(),
|
|
2101
2117
|
ccw_rotation: distance,
|
|
2102
2118
|
layer: layer_ref,
|
|
2103
|
-
pcb_component_id:
|
|
2104
|
-
pcb_smtpad_id:
|
|
2119
|
+
pcb_component_id: z101.string().optional(),
|
|
2120
|
+
pcb_smtpad_id: z101.string().optional()
|
|
2105
2121
|
});
|
|
2106
|
-
var pcb_solder_paste_oval =
|
|
2107
|
-
type:
|
|
2108
|
-
shape:
|
|
2122
|
+
var pcb_solder_paste_oval = z101.object({
|
|
2123
|
+
type: z101.literal("pcb_solder_paste"),
|
|
2124
|
+
shape: z101.literal("oval"),
|
|
2109
2125
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2110
|
-
pcb_group_id:
|
|
2111
|
-
subcircuit_id:
|
|
2126
|
+
pcb_group_id: z101.string().optional(),
|
|
2127
|
+
subcircuit_id: z101.string().optional(),
|
|
2112
2128
|
x: distance,
|
|
2113
2129
|
y: distance,
|
|
2114
|
-
width:
|
|
2115
|
-
height:
|
|
2130
|
+
width: z101.number(),
|
|
2131
|
+
height: z101.number(),
|
|
2116
2132
|
layer: layer_ref,
|
|
2117
|
-
pcb_component_id:
|
|
2118
|
-
pcb_smtpad_id:
|
|
2133
|
+
pcb_component_id: z101.string().optional(),
|
|
2134
|
+
pcb_smtpad_id: z101.string().optional()
|
|
2119
2135
|
});
|
|
2120
|
-
var pcb_solder_paste =
|
|
2136
|
+
var pcb_solder_paste = z101.union([
|
|
2121
2137
|
pcb_solder_paste_circle,
|
|
2122
2138
|
pcb_solder_paste_rect,
|
|
2123
2139
|
pcb_solder_paste_pill,
|
|
@@ -2133,173 +2149,173 @@ expectTypesMatch(
|
|
|
2133
2149
|
expectTypesMatch(true);
|
|
2134
2150
|
|
|
2135
2151
|
// src/pcb/pcb_text.ts
|
|
2136
|
-
import { z as
|
|
2137
|
-
var pcb_text =
|
|
2138
|
-
type:
|
|
2152
|
+
import { z as z102 } from "zod";
|
|
2153
|
+
var pcb_text = z102.object({
|
|
2154
|
+
type: z102.literal("pcb_text"),
|
|
2139
2155
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
2140
|
-
pcb_group_id:
|
|
2141
|
-
subcircuit_id:
|
|
2142
|
-
text:
|
|
2156
|
+
pcb_group_id: z102.string().optional(),
|
|
2157
|
+
subcircuit_id: z102.string().optional(),
|
|
2158
|
+
text: z102.string(),
|
|
2143
2159
|
center: point,
|
|
2144
2160
|
layer: layer_ref,
|
|
2145
2161
|
width: length,
|
|
2146
2162
|
height: length,
|
|
2147
|
-
lines:
|
|
2163
|
+
lines: z102.number(),
|
|
2148
2164
|
// @ts-ignore
|
|
2149
|
-
align:
|
|
2165
|
+
align: z102.enum(["bottom-left"])
|
|
2150
2166
|
}).describe("Defines text on the PCB");
|
|
2151
2167
|
expectTypesMatch(true);
|
|
2152
2168
|
|
|
2153
2169
|
// src/pcb/pcb_trace.ts
|
|
2154
|
-
import { z as
|
|
2155
|
-
var pcb_trace_route_point_wire =
|
|
2156
|
-
route_type:
|
|
2170
|
+
import { z as z103 } from "zod";
|
|
2171
|
+
var pcb_trace_route_point_wire = z103.object({
|
|
2172
|
+
route_type: z103.literal("wire"),
|
|
2157
2173
|
x: distance,
|
|
2158
2174
|
y: distance,
|
|
2159
2175
|
width: distance,
|
|
2160
|
-
copper_pour_id:
|
|
2161
|
-
is_inside_copper_pour:
|
|
2162
|
-
start_pcb_port_id:
|
|
2163
|
-
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(),
|
|
2164
2180
|
layer: layer_ref
|
|
2165
2181
|
});
|
|
2166
|
-
var pcb_trace_route_point_via =
|
|
2167
|
-
route_type:
|
|
2182
|
+
var pcb_trace_route_point_via = z103.object({
|
|
2183
|
+
route_type: z103.literal("via"),
|
|
2168
2184
|
x: distance,
|
|
2169
2185
|
y: distance,
|
|
2170
|
-
copper_pour_id:
|
|
2171
|
-
is_inside_copper_pour:
|
|
2186
|
+
copper_pour_id: z103.string().optional(),
|
|
2187
|
+
is_inside_copper_pour: z103.boolean().optional(),
|
|
2172
2188
|
hole_diameter: distance.optional(),
|
|
2173
2189
|
outer_diameter: distance.optional(),
|
|
2174
2190
|
from_layer: layer_ref,
|
|
2175
2191
|
to_layer: layer_ref
|
|
2176
2192
|
});
|
|
2177
|
-
var pcb_trace_route_point_through_pad =
|
|
2178
|
-
route_type:
|
|
2193
|
+
var pcb_trace_route_point_through_pad = z103.object({
|
|
2194
|
+
route_type: z103.literal("through_pad"),
|
|
2179
2195
|
start: point,
|
|
2180
2196
|
end: point,
|
|
2181
2197
|
width: distance,
|
|
2182
2198
|
start_layer: layer_ref,
|
|
2183
2199
|
end_layer: layer_ref,
|
|
2184
|
-
pcb_smtpad_id:
|
|
2185
|
-
pcb_plated_hole_id:
|
|
2200
|
+
pcb_smtpad_id: z103.string().optional(),
|
|
2201
|
+
pcb_plated_hole_id: z103.string().optional()
|
|
2186
2202
|
});
|
|
2187
|
-
var pcb_trace_route_point =
|
|
2203
|
+
var pcb_trace_route_point = z103.union([
|
|
2188
2204
|
pcb_trace_route_point_wire,
|
|
2189
2205
|
pcb_trace_route_point_via,
|
|
2190
2206
|
pcb_trace_route_point_through_pad
|
|
2191
2207
|
]);
|
|
2192
|
-
var pcb_trace =
|
|
2193
|
-
type:
|
|
2194
|
-
source_trace_id:
|
|
2195
|
-
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(),
|
|
2196
2212
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
2197
|
-
pcb_group_id:
|
|
2198
|
-
subcircuit_id:
|
|
2199
|
-
route_thickness_mode:
|
|
2200
|
-
route_order_index:
|
|
2201
|
-
should_round_corners:
|
|
2202
|
-
trace_length:
|
|
2203
|
-
highlight_color:
|
|
2204
|
-
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)
|
|
2205
2221
|
}).describe("Defines a trace on the PCB");
|
|
2206
2222
|
expectTypesMatch(true);
|
|
2207
2223
|
expectTypesMatch(true);
|
|
2208
2224
|
|
|
2209
2225
|
// src/pcb/pcb_trace_warning.ts
|
|
2210
|
-
import { z as
|
|
2211
|
-
var pcb_trace_warning =
|
|
2212
|
-
type:
|
|
2226
|
+
import { z as z104 } from "zod";
|
|
2227
|
+
var pcb_trace_warning = z104.object({
|
|
2228
|
+
type: z104.literal("pcb_trace_warning"),
|
|
2213
2229
|
pcb_trace_warning_id: getZodPrefixedIdWithDefault("pcb_trace_warning"),
|
|
2214
|
-
warning_type:
|
|
2215
|
-
message:
|
|
2230
|
+
warning_type: z104.literal("pcb_trace_warning").default("pcb_trace_warning"),
|
|
2231
|
+
message: z104.string(),
|
|
2216
2232
|
center: point.optional(),
|
|
2217
|
-
pcb_trace_id:
|
|
2218
|
-
source_trace_id:
|
|
2219
|
-
pcb_component_ids:
|
|
2220
|
-
pcb_port_ids:
|
|
2221
|
-
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()
|
|
2222
2238
|
}).describe("Defines a trace warning on the PCB");
|
|
2223
2239
|
expectTypesMatch(true);
|
|
2224
2240
|
|
|
2225
2241
|
// src/pcb/pcb_trace_error.ts
|
|
2226
|
-
import { z as
|
|
2242
|
+
import { z as z105 } from "zod";
|
|
2227
2243
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2228
|
-
type:
|
|
2244
|
+
type: z105.literal("pcb_trace_error"),
|
|
2229
2245
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2230
|
-
error_type:
|
|
2246
|
+
error_type: z105.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2231
2247
|
center: point.optional(),
|
|
2232
|
-
pcb_trace_id:
|
|
2233
|
-
source_trace_id:
|
|
2234
|
-
pcb_component_ids:
|
|
2235
|
-
pcb_port_ids:
|
|
2236
|
-
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()
|
|
2237
2253
|
}).describe("Defines a trace error on the PCB");
|
|
2238
2254
|
expectTypesMatch(true);
|
|
2239
2255
|
|
|
2240
2256
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2241
|
-
import { z as
|
|
2257
|
+
import { z as z106 } from "zod";
|
|
2242
2258
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2243
|
-
type:
|
|
2259
|
+
type: z106.literal("pcb_trace_missing_error"),
|
|
2244
2260
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2245
2261
|
"pcb_trace_missing_error"
|
|
2246
2262
|
),
|
|
2247
|
-
error_type:
|
|
2263
|
+
error_type: z106.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2248
2264
|
center: point.optional(),
|
|
2249
|
-
source_trace_id:
|
|
2250
|
-
pcb_component_ids:
|
|
2251
|
-
pcb_port_ids:
|
|
2252
|
-
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()
|
|
2253
2269
|
}).describe(
|
|
2254
2270
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2255
2271
|
);
|
|
2256
2272
|
expectTypesMatch(true);
|
|
2257
2273
|
|
|
2258
2274
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2259
|
-
import { z as
|
|
2275
|
+
import { z as z107 } from "zod";
|
|
2260
2276
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2261
|
-
type:
|
|
2277
|
+
type: z107.literal("pcb_port_not_matched_error"),
|
|
2262
2278
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2263
|
-
error_type:
|
|
2264
|
-
pcb_component_ids:
|
|
2265
|
-
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()
|
|
2266
2282
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2267
2283
|
expectTypesMatch(true);
|
|
2268
2284
|
|
|
2269
2285
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2270
|
-
import { z as
|
|
2286
|
+
import { z as z108 } from "zod";
|
|
2271
2287
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2272
|
-
type:
|
|
2288
|
+
type: z108.literal("pcb_port_not_connected_error"),
|
|
2273
2289
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2274
2290
|
"pcb_port_not_connected_error"
|
|
2275
2291
|
),
|
|
2276
|
-
error_type:
|
|
2277
|
-
pcb_port_ids:
|
|
2278
|
-
pcb_component_ids:
|
|
2279
|
-
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()
|
|
2280
2296
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2281
2297
|
expectTypesMatch(
|
|
2282
2298
|
true
|
|
2283
2299
|
);
|
|
2284
2300
|
|
|
2285
2301
|
// src/pcb/pcb_net.ts
|
|
2286
|
-
import { z as
|
|
2287
|
-
var pcb_net =
|
|
2288
|
-
type:
|
|
2302
|
+
import { z as z109 } from "zod";
|
|
2303
|
+
var pcb_net = z109.object({
|
|
2304
|
+
type: z109.literal("pcb_net"),
|
|
2289
2305
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2290
|
-
source_net_id:
|
|
2291
|
-
highlight_color:
|
|
2306
|
+
source_net_id: z109.string().optional(),
|
|
2307
|
+
highlight_color: z109.string().optional()
|
|
2292
2308
|
}).describe("Defines a net on the PCB");
|
|
2293
2309
|
expectTypesMatch(true);
|
|
2294
2310
|
|
|
2295
2311
|
// src/pcb/pcb_via.ts
|
|
2296
|
-
import { z as
|
|
2297
|
-
var pcb_via =
|
|
2298
|
-
type:
|
|
2312
|
+
import { z as z110 } from "zod";
|
|
2313
|
+
var pcb_via = z110.object({
|
|
2314
|
+
type: z110.literal("pcb_via"),
|
|
2299
2315
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2300
|
-
pcb_group_id:
|
|
2301
|
-
subcircuit_id:
|
|
2302
|
-
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(),
|
|
2303
2319
|
x: distance,
|
|
2304
2320
|
y: distance,
|
|
2305
2321
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2308,103 +2324,103 @@ var pcb_via = z109.object({
|
|
|
2308
2324
|
from_layer: layer_ref.optional(),
|
|
2309
2325
|
/** @deprecated */
|
|
2310
2326
|
to_layer: layer_ref.optional(),
|
|
2311
|
-
layers:
|
|
2312
|
-
pcb_trace_id:
|
|
2313
|
-
net_is_assignable:
|
|
2314
|
-
net_assigned:
|
|
2315
|
-
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()
|
|
2316
2332
|
}).describe("Defines a via on the PCB");
|
|
2317
2333
|
expectTypesMatch(true);
|
|
2318
2334
|
|
|
2319
2335
|
// src/pcb/pcb_board.ts
|
|
2320
|
-
import { z as
|
|
2321
|
-
var pcb_board =
|
|
2322
|
-
type:
|
|
2336
|
+
import { z as z111 } from "zod";
|
|
2337
|
+
var pcb_board = z111.object({
|
|
2338
|
+
type: z111.literal("pcb_board"),
|
|
2323
2339
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2324
|
-
pcb_panel_id:
|
|
2325
|
-
carrier_pcb_board_id:
|
|
2326
|
-
is_subcircuit:
|
|
2327
|
-
subcircuit_id:
|
|
2328
|
-
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(),
|
|
2329
2345
|
width: length.optional(),
|
|
2330
2346
|
height: length.optional(),
|
|
2331
2347
|
center: point,
|
|
2332
|
-
display_offset_x:
|
|
2348
|
+
display_offset_x: z111.string().optional().describe(
|
|
2333
2349
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2334
2350
|
),
|
|
2335
|
-
display_offset_y:
|
|
2351
|
+
display_offset_y: z111.string().optional().describe(
|
|
2336
2352
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2337
2353
|
),
|
|
2338
2354
|
thickness: length.optional().default(1.4),
|
|
2339
|
-
num_layers:
|
|
2340
|
-
outline:
|
|
2341
|
-
shape:
|
|
2342
|
-
material:
|
|
2343
|
-
solder_mask_color:
|
|
2344
|
-
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(),
|
|
2345
2361
|
anchor_position: point.optional(),
|
|
2346
2362
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2347
|
-
position_mode:
|
|
2363
|
+
position_mode: z111.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2348
2364
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2349
2365
|
expectTypesMatch(true);
|
|
2350
2366
|
|
|
2351
2367
|
// src/pcb/pcb_panel.ts
|
|
2352
|
-
import { z as
|
|
2353
|
-
var pcb_panel =
|
|
2354
|
-
type:
|
|
2368
|
+
import { z as z112 } from "zod";
|
|
2369
|
+
var pcb_panel = z112.object({
|
|
2370
|
+
type: z112.literal("pcb_panel"),
|
|
2355
2371
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2356
2372
|
width: length,
|
|
2357
2373
|
height: length,
|
|
2358
2374
|
center: point,
|
|
2359
2375
|
thickness: length.optional().default(1.4),
|
|
2360
|
-
covered_with_solder_mask:
|
|
2376
|
+
covered_with_solder_mask: z112.boolean().optional().default(true)
|
|
2361
2377
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2362
2378
|
expectTypesMatch(true);
|
|
2363
2379
|
|
|
2364
2380
|
// src/pcb/pcb_placement_error.ts
|
|
2365
|
-
import { z as
|
|
2381
|
+
import { z as z113 } from "zod";
|
|
2366
2382
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2367
|
-
type:
|
|
2383
|
+
type: z113.literal("pcb_placement_error"),
|
|
2368
2384
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2369
|
-
error_type:
|
|
2370
|
-
subcircuit_id:
|
|
2385
|
+
error_type: z113.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2386
|
+
subcircuit_id: z113.string().optional()
|
|
2371
2387
|
}).describe("Defines a placement error on the PCB");
|
|
2372
2388
|
expectTypesMatch(true);
|
|
2373
2389
|
|
|
2374
2390
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2375
|
-
import { z as
|
|
2391
|
+
import { z as z114 } from "zod";
|
|
2376
2392
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2377
|
-
type:
|
|
2393
|
+
type: z114.literal("pcb_panelization_placement_error"),
|
|
2378
2394
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2379
2395
|
"pcb_panelization_placement_error"
|
|
2380
2396
|
),
|
|
2381
|
-
error_type:
|
|
2382
|
-
pcb_panel_id:
|
|
2383
|
-
pcb_board_id:
|
|
2384
|
-
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()
|
|
2385
2401
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2386
2402
|
expectTypesMatch(true);
|
|
2387
2403
|
|
|
2388
2404
|
// src/pcb/pcb_trace_hint.ts
|
|
2389
|
-
import { z as
|
|
2390
|
-
var pcb_trace_hint =
|
|
2391
|
-
type:
|
|
2405
|
+
import { z as z115 } from "zod";
|
|
2406
|
+
var pcb_trace_hint = z115.object({
|
|
2407
|
+
type: z115.literal("pcb_trace_hint"),
|
|
2392
2408
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2393
|
-
pcb_port_id:
|
|
2394
|
-
pcb_component_id:
|
|
2395
|
-
route:
|
|
2396
|
-
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()
|
|
2397
2413
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2398
2414
|
expectTypesMatch(true);
|
|
2399
2415
|
|
|
2400
2416
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2401
|
-
import { z as
|
|
2402
|
-
var pcb_silkscreen_line =
|
|
2403
|
-
type:
|
|
2417
|
+
import { z as z116 } from "zod";
|
|
2418
|
+
var pcb_silkscreen_line = z116.object({
|
|
2419
|
+
type: z116.literal("pcb_silkscreen_line"),
|
|
2404
2420
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2405
|
-
pcb_component_id:
|
|
2406
|
-
pcb_group_id:
|
|
2407
|
-
subcircuit_id:
|
|
2421
|
+
pcb_component_id: z116.string(),
|
|
2422
|
+
pcb_group_id: z116.string().optional(),
|
|
2423
|
+
subcircuit_id: z116.string().optional(),
|
|
2408
2424
|
stroke_width: distance.default("0.1mm"),
|
|
2409
2425
|
x1: distance,
|
|
2410
2426
|
y1: distance,
|
|
@@ -2415,32 +2431,32 @@ var pcb_silkscreen_line = z115.object({
|
|
|
2415
2431
|
expectTypesMatch(true);
|
|
2416
2432
|
|
|
2417
2433
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2418
|
-
import { z as
|
|
2419
|
-
var pcb_silkscreen_path =
|
|
2420
|
-
type:
|
|
2434
|
+
import { z as z117 } from "zod";
|
|
2435
|
+
var pcb_silkscreen_path = z117.object({
|
|
2436
|
+
type: z117.literal("pcb_silkscreen_path"),
|
|
2421
2437
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2422
|
-
pcb_component_id:
|
|
2423
|
-
pcb_group_id:
|
|
2424
|
-
subcircuit_id:
|
|
2438
|
+
pcb_component_id: z117.string(),
|
|
2439
|
+
pcb_group_id: z117.string().optional(),
|
|
2440
|
+
subcircuit_id: z117.string().optional(),
|
|
2425
2441
|
layer: visible_layer,
|
|
2426
|
-
route:
|
|
2442
|
+
route: z117.array(point),
|
|
2427
2443
|
stroke_width: length
|
|
2428
2444
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2429
2445
|
expectTypesMatch(true);
|
|
2430
2446
|
|
|
2431
2447
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2432
|
-
import { z as
|
|
2433
|
-
var pcb_silkscreen_text =
|
|
2434
|
-
type:
|
|
2448
|
+
import { z as z118 } from "zod";
|
|
2449
|
+
var pcb_silkscreen_text = z118.object({
|
|
2450
|
+
type: z118.literal("pcb_silkscreen_text"),
|
|
2435
2451
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2436
|
-
pcb_group_id:
|
|
2437
|
-
subcircuit_id:
|
|
2438
|
-
font:
|
|
2452
|
+
pcb_group_id: z118.string().optional(),
|
|
2453
|
+
subcircuit_id: z118.string().optional(),
|
|
2454
|
+
font: z118.literal("tscircuit2024").default("tscircuit2024"),
|
|
2439
2455
|
font_size: distance.default("0.2mm"),
|
|
2440
|
-
pcb_component_id:
|
|
2441
|
-
text:
|
|
2442
|
-
is_knockout:
|
|
2443
|
-
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({
|
|
2444
2460
|
left: length,
|
|
2445
2461
|
top: length,
|
|
2446
2462
|
bottom: length,
|
|
@@ -2451,27 +2467,27 @@ var pcb_silkscreen_text = z117.object({
|
|
|
2451
2467
|
bottom: "0.2mm",
|
|
2452
2468
|
right: "0.2mm"
|
|
2453
2469
|
}).optional(),
|
|
2454
|
-
ccw_rotation:
|
|
2470
|
+
ccw_rotation: z118.number().optional(),
|
|
2455
2471
|
layer: layer_ref,
|
|
2456
|
-
is_mirrored:
|
|
2472
|
+
is_mirrored: z118.boolean().default(false).optional(),
|
|
2457
2473
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2458
2474
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2459
2475
|
}).describe("Defines silkscreen text on the PCB");
|
|
2460
2476
|
expectTypesMatch(true);
|
|
2461
2477
|
|
|
2462
2478
|
// src/pcb/pcb_copper_text.ts
|
|
2463
|
-
import { z as
|
|
2464
|
-
var pcb_copper_text =
|
|
2465
|
-
type:
|
|
2479
|
+
import { z as z119 } from "zod";
|
|
2480
|
+
var pcb_copper_text = z119.object({
|
|
2481
|
+
type: z119.literal("pcb_copper_text"),
|
|
2466
2482
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2467
|
-
pcb_group_id:
|
|
2468
|
-
subcircuit_id:
|
|
2469
|
-
font:
|
|
2483
|
+
pcb_group_id: z119.string().optional(),
|
|
2484
|
+
subcircuit_id: z119.string().optional(),
|
|
2485
|
+
font: z119.literal("tscircuit2024").default("tscircuit2024"),
|
|
2470
2486
|
font_size: distance.default("0.2mm"),
|
|
2471
|
-
pcb_component_id:
|
|
2472
|
-
text:
|
|
2473
|
-
is_knockout:
|
|
2474
|
-
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({
|
|
2475
2491
|
left: length,
|
|
2476
2492
|
top: length,
|
|
2477
2493
|
bottom: length,
|
|
@@ -2482,61 +2498,61 @@ var pcb_copper_text = z118.object({
|
|
|
2482
2498
|
bottom: "0.2mm",
|
|
2483
2499
|
right: "0.2mm"
|
|
2484
2500
|
}).optional(),
|
|
2485
|
-
ccw_rotation:
|
|
2501
|
+
ccw_rotation: z119.number().optional(),
|
|
2486
2502
|
layer: layer_ref,
|
|
2487
|
-
is_mirrored:
|
|
2503
|
+
is_mirrored: z119.boolean().default(false).optional(),
|
|
2488
2504
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2489
2505
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2490
2506
|
}).describe("Defines copper text on the PCB");
|
|
2491
2507
|
expectTypesMatch(true);
|
|
2492
2508
|
|
|
2493
2509
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2494
|
-
import { z as
|
|
2495
|
-
var pcb_silkscreen_rect =
|
|
2496
|
-
type:
|
|
2510
|
+
import { z as z120 } from "zod";
|
|
2511
|
+
var pcb_silkscreen_rect = z120.object({
|
|
2512
|
+
type: z120.literal("pcb_silkscreen_rect"),
|
|
2497
2513
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2498
|
-
pcb_component_id:
|
|
2499
|
-
pcb_group_id:
|
|
2500
|
-
subcircuit_id:
|
|
2514
|
+
pcb_component_id: z120.string(),
|
|
2515
|
+
pcb_group_id: z120.string().optional(),
|
|
2516
|
+
subcircuit_id: z120.string().optional(),
|
|
2501
2517
|
center: point,
|
|
2502
2518
|
width: length,
|
|
2503
2519
|
height: length,
|
|
2504
2520
|
layer: layer_ref,
|
|
2505
2521
|
stroke_width: length.default("1mm"),
|
|
2506
2522
|
corner_radius: length.optional(),
|
|
2507
|
-
is_filled:
|
|
2508
|
-
has_stroke:
|
|
2509
|
-
is_stroke_dashed:
|
|
2510
|
-
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()
|
|
2511
2527
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2512
2528
|
expectTypesMatch(true);
|
|
2513
2529
|
|
|
2514
2530
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2515
|
-
import { z as
|
|
2516
|
-
var pcb_silkscreen_circle =
|
|
2517
|
-
type:
|
|
2531
|
+
import { z as z121 } from "zod";
|
|
2532
|
+
var pcb_silkscreen_circle = z121.object({
|
|
2533
|
+
type: z121.literal("pcb_silkscreen_circle"),
|
|
2518
2534
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2519
2535
|
"pcb_silkscreen_circle"
|
|
2520
2536
|
),
|
|
2521
|
-
pcb_component_id:
|
|
2522
|
-
pcb_group_id:
|
|
2523
|
-
subcircuit_id:
|
|
2537
|
+
pcb_component_id: z121.string(),
|
|
2538
|
+
pcb_group_id: z121.string().optional(),
|
|
2539
|
+
subcircuit_id: z121.string().optional(),
|
|
2524
2540
|
center: point,
|
|
2525
2541
|
radius: length,
|
|
2526
2542
|
layer: visible_layer,
|
|
2527
2543
|
stroke_width: length.default("1mm"),
|
|
2528
|
-
is_filled:
|
|
2544
|
+
is_filled: z121.boolean().optional()
|
|
2529
2545
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2530
2546
|
expectTypesMatch(true);
|
|
2531
2547
|
|
|
2532
2548
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2533
|
-
import { z as
|
|
2534
|
-
var pcb_silkscreen_oval =
|
|
2535
|
-
type:
|
|
2549
|
+
import { z as z122 } from "zod";
|
|
2550
|
+
var pcb_silkscreen_oval = z122.object({
|
|
2551
|
+
type: z122.literal("pcb_silkscreen_oval"),
|
|
2536
2552
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2537
|
-
pcb_component_id:
|
|
2538
|
-
pcb_group_id:
|
|
2539
|
-
subcircuit_id:
|
|
2553
|
+
pcb_component_id: z122.string(),
|
|
2554
|
+
pcb_group_id: z122.string().optional(),
|
|
2555
|
+
subcircuit_id: z122.string().optional(),
|
|
2540
2556
|
center: point,
|
|
2541
2557
|
radius_x: distance,
|
|
2542
2558
|
radius_y: distance,
|
|
@@ -2546,265 +2562,265 @@ var pcb_silkscreen_oval = z121.object({
|
|
|
2546
2562
|
expectTypesMatch(true);
|
|
2547
2563
|
|
|
2548
2564
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2549
|
-
import { z as
|
|
2550
|
-
var pcb_silkscreen_graphic_base =
|
|
2551
|
-
type:
|
|
2565
|
+
import { z as z123 } from "zod";
|
|
2566
|
+
var pcb_silkscreen_graphic_base = z123.object({
|
|
2567
|
+
type: z123.literal("pcb_silkscreen_graphic"),
|
|
2552
2568
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2553
2569
|
"pcb_silkscreen_graphic"
|
|
2554
2570
|
),
|
|
2555
|
-
pcb_component_id:
|
|
2556
|
-
pcb_group_id:
|
|
2557
|
-
subcircuit_id:
|
|
2571
|
+
pcb_component_id: z123.string(),
|
|
2572
|
+
pcb_group_id: z123.string().optional(),
|
|
2573
|
+
subcircuit_id: z123.string().optional(),
|
|
2558
2574
|
layer: visible_layer,
|
|
2559
2575
|
image_asset: asset.optional()
|
|
2560
2576
|
});
|
|
2561
2577
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2562
|
-
shape:
|
|
2578
|
+
shape: z123.literal("brep"),
|
|
2563
2579
|
brep_shape
|
|
2564
2580
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2565
2581
|
expectTypesMatch(
|
|
2566
2582
|
true
|
|
2567
2583
|
);
|
|
2568
|
-
var pcb_silkscreen_graphic =
|
|
2584
|
+
var pcb_silkscreen_graphic = z123.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2569
2585
|
expectTypesMatch(true);
|
|
2570
2586
|
|
|
2571
2587
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2572
|
-
import { z as
|
|
2573
|
-
var pcb_silkscreen_pill =
|
|
2574
|
-
type:
|
|
2588
|
+
import { z as z124 } from "zod";
|
|
2589
|
+
var pcb_silkscreen_pill = z124.object({
|
|
2590
|
+
type: z124.literal("pcb_silkscreen_pill"),
|
|
2575
2591
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2576
|
-
pcb_component_id:
|
|
2577
|
-
pcb_group_id:
|
|
2578
|
-
subcircuit_id:
|
|
2592
|
+
pcb_component_id: z124.string(),
|
|
2593
|
+
pcb_group_id: z124.string().optional(),
|
|
2594
|
+
subcircuit_id: z124.string().optional(),
|
|
2579
2595
|
center: point,
|
|
2580
2596
|
width: length,
|
|
2581
2597
|
height: length,
|
|
2582
2598
|
layer: layer_ref,
|
|
2583
|
-
ccw_rotation:
|
|
2599
|
+
ccw_rotation: z124.number().optional()
|
|
2584
2600
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2585
2601
|
expectTypesMatch(true);
|
|
2586
2602
|
|
|
2587
2603
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2588
|
-
import { z as
|
|
2589
|
-
var pcb_fabrication_note_text =
|
|
2590
|
-
type:
|
|
2604
|
+
import { z as z125 } from "zod";
|
|
2605
|
+
var pcb_fabrication_note_text = z125.object({
|
|
2606
|
+
type: z125.literal("pcb_fabrication_note_text"),
|
|
2591
2607
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2592
2608
|
"pcb_fabrication_note_text"
|
|
2593
2609
|
),
|
|
2594
|
-
subcircuit_id:
|
|
2595
|
-
pcb_group_id:
|
|
2596
|
-
font:
|
|
2610
|
+
subcircuit_id: z125.string().optional(),
|
|
2611
|
+
pcb_group_id: z125.string().optional(),
|
|
2612
|
+
font: z125.literal("tscircuit2024").default("tscircuit2024"),
|
|
2597
2613
|
font_size: distance.default("1mm"),
|
|
2598
|
-
pcb_component_id:
|
|
2599
|
-
text:
|
|
2600
|
-
ccw_rotation:
|
|
2614
|
+
pcb_component_id: z125.string(),
|
|
2615
|
+
text: z125.string(),
|
|
2616
|
+
ccw_rotation: z125.number().optional(),
|
|
2601
2617
|
layer: visible_layer,
|
|
2602
2618
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2603
|
-
anchor_alignment:
|
|
2604
|
-
color:
|
|
2619
|
+
anchor_alignment: z125.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2620
|
+
color: z125.string().optional()
|
|
2605
2621
|
}).describe(
|
|
2606
2622
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2607
2623
|
);
|
|
2608
2624
|
expectTypesMatch(true);
|
|
2609
2625
|
|
|
2610
2626
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2611
|
-
import { z as
|
|
2612
|
-
var pcb_fabrication_note_path =
|
|
2613
|
-
type:
|
|
2627
|
+
import { z as z126 } from "zod";
|
|
2628
|
+
var pcb_fabrication_note_path = z126.object({
|
|
2629
|
+
type: z126.literal("pcb_fabrication_note_path"),
|
|
2614
2630
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2615
2631
|
"pcb_fabrication_note_path"
|
|
2616
2632
|
),
|
|
2617
|
-
pcb_component_id:
|
|
2618
|
-
subcircuit_id:
|
|
2633
|
+
pcb_component_id: z126.string(),
|
|
2634
|
+
subcircuit_id: z126.string().optional(),
|
|
2619
2635
|
layer: layer_ref,
|
|
2620
|
-
route:
|
|
2636
|
+
route: z126.array(point),
|
|
2621
2637
|
stroke_width: length,
|
|
2622
|
-
color:
|
|
2638
|
+
color: z126.string().optional()
|
|
2623
2639
|
}).describe(
|
|
2624
2640
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2625
2641
|
);
|
|
2626
2642
|
expectTypesMatch(true);
|
|
2627
2643
|
|
|
2628
2644
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2629
|
-
import { z as
|
|
2630
|
-
var pcb_fabrication_note_rect =
|
|
2631
|
-
type:
|
|
2645
|
+
import { z as z127 } from "zod";
|
|
2646
|
+
var pcb_fabrication_note_rect = z127.object({
|
|
2647
|
+
type: z127.literal("pcb_fabrication_note_rect"),
|
|
2632
2648
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2633
2649
|
"pcb_fabrication_note_rect"
|
|
2634
2650
|
),
|
|
2635
|
-
pcb_component_id:
|
|
2636
|
-
pcb_group_id:
|
|
2637
|
-
subcircuit_id:
|
|
2651
|
+
pcb_component_id: z127.string(),
|
|
2652
|
+
pcb_group_id: z127.string().optional(),
|
|
2653
|
+
subcircuit_id: z127.string().optional(),
|
|
2638
2654
|
center: point,
|
|
2639
2655
|
width: length,
|
|
2640
2656
|
height: length,
|
|
2641
2657
|
layer: visible_layer,
|
|
2642
2658
|
stroke_width: length.default("0.1mm"),
|
|
2643
2659
|
corner_radius: length.optional(),
|
|
2644
|
-
is_filled:
|
|
2645
|
-
has_stroke:
|
|
2646
|
-
is_stroke_dashed:
|
|
2647
|
-
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()
|
|
2648
2664
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2649
2665
|
expectTypesMatch(true);
|
|
2650
2666
|
|
|
2651
2667
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2652
|
-
import { z as
|
|
2653
|
-
var pcb_fabrication_note_dimension =
|
|
2654
|
-
type:
|
|
2668
|
+
import { z as z128 } from "zod";
|
|
2669
|
+
var pcb_fabrication_note_dimension = z128.object({
|
|
2670
|
+
type: z128.literal("pcb_fabrication_note_dimension"),
|
|
2655
2671
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2656
2672
|
"pcb_fabrication_note_dimension"
|
|
2657
2673
|
),
|
|
2658
|
-
pcb_component_id:
|
|
2659
|
-
pcb_group_id:
|
|
2660
|
-
subcircuit_id:
|
|
2674
|
+
pcb_component_id: z128.string(),
|
|
2675
|
+
pcb_group_id: z128.string().optional(),
|
|
2676
|
+
subcircuit_id: z128.string().optional(),
|
|
2661
2677
|
layer: visible_layer,
|
|
2662
2678
|
from: point,
|
|
2663
2679
|
to: point,
|
|
2664
|
-
text:
|
|
2665
|
-
text_ccw_rotation:
|
|
2680
|
+
text: z128.string().optional(),
|
|
2681
|
+
text_ccw_rotation: z128.number().optional(),
|
|
2666
2682
|
offset: length.optional(),
|
|
2667
2683
|
offset_distance: length.optional(),
|
|
2668
|
-
offset_direction:
|
|
2669
|
-
x:
|
|
2670
|
-
y:
|
|
2684
|
+
offset_direction: z128.object({
|
|
2685
|
+
x: z128.number(),
|
|
2686
|
+
y: z128.number()
|
|
2671
2687
|
}).optional(),
|
|
2672
|
-
font:
|
|
2688
|
+
font: z128.literal("tscircuit2024").default("tscircuit2024"),
|
|
2673
2689
|
font_size: length.default("1mm"),
|
|
2674
|
-
color:
|
|
2690
|
+
color: z128.string().optional(),
|
|
2675
2691
|
arrow_size: length.default("1mm")
|
|
2676
2692
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2677
2693
|
expectTypesMatch(true);
|
|
2678
2694
|
|
|
2679
2695
|
// src/pcb/pcb_note_text.ts
|
|
2680
|
-
import { z as
|
|
2681
|
-
var pcb_note_text =
|
|
2682
|
-
type:
|
|
2696
|
+
import { z as z129 } from "zod";
|
|
2697
|
+
var pcb_note_text = z129.object({
|
|
2698
|
+
type: z129.literal("pcb_note_text"),
|
|
2683
2699
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2684
|
-
pcb_component_id:
|
|
2685
|
-
pcb_group_id:
|
|
2686
|
-
subcircuit_id:
|
|
2687
|
-
name:
|
|
2688
|
-
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"),
|
|
2689
2705
|
font_size: distance.default("1mm"),
|
|
2690
|
-
text:
|
|
2706
|
+
text: z129.string().optional(),
|
|
2691
2707
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2692
|
-
anchor_alignment:
|
|
2708
|
+
anchor_alignment: z129.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2693
2709
|
layer: visible_layer.default("top"),
|
|
2694
|
-
is_mirrored_from_top_view:
|
|
2695
|
-
color:
|
|
2710
|
+
is_mirrored_from_top_view: z129.boolean().optional(),
|
|
2711
|
+
color: z129.string().optional()
|
|
2696
2712
|
}).describe("Defines a documentation note in text on the PCB");
|
|
2697
2713
|
expectTypesMatch(true);
|
|
2698
2714
|
|
|
2699
2715
|
// src/pcb/pcb_note_rect.ts
|
|
2700
|
-
import { z as
|
|
2701
|
-
var pcb_note_rect =
|
|
2702
|
-
type:
|
|
2716
|
+
import { z as z130 } from "zod";
|
|
2717
|
+
var pcb_note_rect = z130.object({
|
|
2718
|
+
type: z130.literal("pcb_note_rect"),
|
|
2703
2719
|
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2704
|
-
pcb_component_id:
|
|
2705
|
-
pcb_group_id:
|
|
2706
|
-
subcircuit_id:
|
|
2707
|
-
name:
|
|
2708
|
-
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(),
|
|
2709
2725
|
center: point,
|
|
2710
2726
|
width: length,
|
|
2711
2727
|
height: length,
|
|
2712
2728
|
layer: visible_layer.default("top"),
|
|
2713
2729
|
stroke_width: length.default("0.1mm"),
|
|
2714
2730
|
corner_radius: length.optional(),
|
|
2715
|
-
is_filled:
|
|
2716
|
-
has_stroke:
|
|
2717
|
-
is_stroke_dashed:
|
|
2718
|
-
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()
|
|
2719
2735
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2720
2736
|
expectTypesMatch(true);
|
|
2721
2737
|
|
|
2722
2738
|
// src/pcb/pcb_note_path.ts
|
|
2723
|
-
import { z as
|
|
2724
|
-
var pcb_note_path =
|
|
2725
|
-
type:
|
|
2739
|
+
import { z as z131 } from "zod";
|
|
2740
|
+
var pcb_note_path = z131.object({
|
|
2741
|
+
type: z131.literal("pcb_note_path"),
|
|
2726
2742
|
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2727
|
-
pcb_component_id:
|
|
2728
|
-
pcb_group_id:
|
|
2729
|
-
subcircuit_id:
|
|
2730
|
-
name:
|
|
2731
|
-
text:
|
|
2732
|
-
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),
|
|
2733
2749
|
layer: visible_layer.default("top"),
|
|
2734
2750
|
stroke_width: length.default("0.1mm"),
|
|
2735
|
-
color:
|
|
2751
|
+
color: z131.string().optional()
|
|
2736
2752
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
2737
2753
|
expectTypesMatch(true);
|
|
2738
2754
|
|
|
2739
2755
|
// src/pcb/pcb_note_line.ts
|
|
2740
|
-
import { z as
|
|
2741
|
-
var pcb_note_line =
|
|
2742
|
-
type:
|
|
2756
|
+
import { z as z132 } from "zod";
|
|
2757
|
+
var pcb_note_line = z132.object({
|
|
2758
|
+
type: z132.literal("pcb_note_line"),
|
|
2743
2759
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2744
|
-
pcb_component_id:
|
|
2745
|
-
pcb_group_id:
|
|
2746
|
-
subcircuit_id:
|
|
2747
|
-
name:
|
|
2748
|
-
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(),
|
|
2749
2765
|
x1: distance,
|
|
2750
2766
|
y1: distance,
|
|
2751
2767
|
x2: distance,
|
|
2752
2768
|
y2: distance,
|
|
2753
2769
|
layer: visible_layer.default("top"),
|
|
2754
2770
|
stroke_width: distance.default("0.1mm"),
|
|
2755
|
-
color:
|
|
2756
|
-
is_dashed:
|
|
2771
|
+
color: z132.string().optional(),
|
|
2772
|
+
is_dashed: z132.boolean().optional()
|
|
2757
2773
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2758
2774
|
expectTypesMatch(true);
|
|
2759
2775
|
|
|
2760
2776
|
// src/pcb/pcb_note_dimension.ts
|
|
2761
|
-
import { z as
|
|
2762
|
-
var pcb_note_dimension =
|
|
2763
|
-
type:
|
|
2777
|
+
import { z as z133 } from "zod";
|
|
2778
|
+
var pcb_note_dimension = z133.object({
|
|
2779
|
+
type: z133.literal("pcb_note_dimension"),
|
|
2764
2780
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2765
|
-
pcb_component_id:
|
|
2766
|
-
pcb_group_id:
|
|
2767
|
-
subcircuit_id:
|
|
2768
|
-
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(),
|
|
2769
2785
|
from: point,
|
|
2770
2786
|
to: point,
|
|
2771
|
-
text:
|
|
2772
|
-
text_ccw_rotation:
|
|
2787
|
+
text: z133.string().optional(),
|
|
2788
|
+
text_ccw_rotation: z133.number().optional(),
|
|
2773
2789
|
offset_distance: length.optional(),
|
|
2774
|
-
offset_direction:
|
|
2775
|
-
x:
|
|
2776
|
-
y:
|
|
2790
|
+
offset_direction: z133.object({
|
|
2791
|
+
x: z133.number(),
|
|
2792
|
+
y: z133.number()
|
|
2777
2793
|
}).optional(),
|
|
2778
|
-
font:
|
|
2794
|
+
font: z133.literal("tscircuit2024").default("tscircuit2024"),
|
|
2779
2795
|
font_size: length.default("1mm"),
|
|
2780
2796
|
layer: visible_layer.default("top"),
|
|
2781
|
-
color:
|
|
2797
|
+
color: z133.string().optional(),
|
|
2782
2798
|
arrow_size: length.default("1mm")
|
|
2783
2799
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2784
2800
|
expectTypesMatch(true);
|
|
2785
2801
|
|
|
2786
2802
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2787
|
-
import { z as
|
|
2803
|
+
import { z as z134 } from "zod";
|
|
2788
2804
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
2789
|
-
type:
|
|
2805
|
+
type: z134.literal("pcb_footprint_overlap_error"),
|
|
2790
2806
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2791
|
-
error_type:
|
|
2792
|
-
pcb_smtpad_ids:
|
|
2793
|
-
pcb_plated_hole_ids:
|
|
2794
|
-
pcb_hole_ids:
|
|
2795
|
-
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()
|
|
2796
2812
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2797
2813
|
expectTypesMatch(
|
|
2798
2814
|
true
|
|
2799
2815
|
);
|
|
2800
2816
|
|
|
2801
2817
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
2802
|
-
import { z as
|
|
2818
|
+
import { z as z135 } from "zod";
|
|
2803
2819
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
2804
|
-
type:
|
|
2820
|
+
type: z135.literal("pcb_courtyard_overlap_error"),
|
|
2805
2821
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2806
|
-
error_type:
|
|
2807
|
-
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()])
|
|
2808
2824
|
}).describe(
|
|
2809
2825
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
2810
2826
|
);
|
|
@@ -2813,49 +2829,49 @@ expectTypesMatch(
|
|
|
2813
2829
|
);
|
|
2814
2830
|
|
|
2815
2831
|
// src/pcb/pcb_keepout.ts
|
|
2816
|
-
import { z as
|
|
2817
|
-
var pcb_keepout =
|
|
2818
|
-
type:
|
|
2819
|
-
shape:
|
|
2820
|
-
pcb_group_id:
|
|
2821
|
-
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(),
|
|
2822
2838
|
center: point,
|
|
2823
2839
|
width: distance,
|
|
2824
2840
|
height: distance,
|
|
2825
|
-
pcb_keepout_id:
|
|
2826
|
-
layers:
|
|
2841
|
+
pcb_keepout_id: z136.string(),
|
|
2842
|
+
layers: z136.array(z136.string()),
|
|
2827
2843
|
// Specify layers where the keepout applies
|
|
2828
|
-
description:
|
|
2844
|
+
description: z136.string().optional()
|
|
2829
2845
|
// Optional description of the keepout
|
|
2830
2846
|
}).or(
|
|
2831
|
-
|
|
2832
|
-
type:
|
|
2833
|
-
shape:
|
|
2834
|
-
pcb_group_id:
|
|
2835
|
-
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(),
|
|
2836
2852
|
center: point,
|
|
2837
2853
|
radius: distance,
|
|
2838
|
-
pcb_keepout_id:
|
|
2839
|
-
layers:
|
|
2854
|
+
pcb_keepout_id: z136.string(),
|
|
2855
|
+
layers: z136.array(z136.string()),
|
|
2840
2856
|
// Specify layers where the keepout applies
|
|
2841
|
-
description:
|
|
2857
|
+
description: z136.string().optional()
|
|
2842
2858
|
// Optional description of the keepout
|
|
2843
2859
|
})
|
|
2844
2860
|
);
|
|
2845
2861
|
expectTypesMatch(true);
|
|
2846
2862
|
|
|
2847
2863
|
// src/pcb/pcb_cutout.ts
|
|
2848
|
-
import { z as
|
|
2849
|
-
var pcb_cutout_base =
|
|
2850
|
-
type:
|
|
2864
|
+
import { z as z137 } from "zod";
|
|
2865
|
+
var pcb_cutout_base = z137.object({
|
|
2866
|
+
type: z137.literal("pcb_cutout"),
|
|
2851
2867
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2852
|
-
pcb_group_id:
|
|
2853
|
-
subcircuit_id:
|
|
2854
|
-
pcb_board_id:
|
|
2855
|
-
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()
|
|
2856
2872
|
});
|
|
2857
2873
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2858
|
-
shape:
|
|
2874
|
+
shape: z137.literal("rect"),
|
|
2859
2875
|
center: point,
|
|
2860
2876
|
width: length,
|
|
2861
2877
|
height: length,
|
|
@@ -2864,26 +2880,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2864
2880
|
});
|
|
2865
2881
|
expectTypesMatch(true);
|
|
2866
2882
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2867
|
-
shape:
|
|
2883
|
+
shape: z137.literal("circle"),
|
|
2868
2884
|
center: point,
|
|
2869
2885
|
radius: length
|
|
2870
2886
|
});
|
|
2871
2887
|
expectTypesMatch(true);
|
|
2872
2888
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2873
|
-
shape:
|
|
2874
|
-
points:
|
|
2889
|
+
shape: z137.literal("polygon"),
|
|
2890
|
+
points: z137.array(point)
|
|
2875
2891
|
});
|
|
2876
2892
|
expectTypesMatch(true);
|
|
2877
2893
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2878
|
-
shape:
|
|
2879
|
-
route:
|
|
2894
|
+
shape: z137.literal("path"),
|
|
2895
|
+
route: z137.array(point),
|
|
2880
2896
|
slot_width: length,
|
|
2881
2897
|
slot_length: length.optional(),
|
|
2882
2898
|
space_between_slots: length.optional(),
|
|
2883
2899
|
slot_corner_radius: length.optional()
|
|
2884
2900
|
});
|
|
2885
2901
|
expectTypesMatch(true);
|
|
2886
|
-
var pcb_cutout =
|
|
2902
|
+
var pcb_cutout = z137.discriminatedUnion("shape", [
|
|
2887
2903
|
pcb_cutout_rect,
|
|
2888
2904
|
pcb_cutout_circle,
|
|
2889
2905
|
pcb_cutout_polygon,
|
|
@@ -2892,169 +2908,169 @@ var pcb_cutout = z136.discriminatedUnion("shape", [
|
|
|
2892
2908
|
expectTypesMatch(true);
|
|
2893
2909
|
|
|
2894
2910
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2895
|
-
import { z as
|
|
2911
|
+
import { z as z138 } from "zod";
|
|
2896
2912
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
2897
|
-
type:
|
|
2913
|
+
type: z138.literal("pcb_missing_footprint_error"),
|
|
2898
2914
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2899
2915
|
"pcb_missing_footprint_error"
|
|
2900
2916
|
),
|
|
2901
|
-
pcb_group_id:
|
|
2902
|
-
subcircuit_id:
|
|
2903
|
-
error_type:
|
|
2904
|
-
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()
|
|
2905
2921
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2906
2922
|
expectTypesMatch(
|
|
2907
2923
|
true
|
|
2908
2924
|
);
|
|
2909
2925
|
|
|
2910
2926
|
// src/pcb/external_footprint_load_error.ts
|
|
2911
|
-
import { z as
|
|
2927
|
+
import { z as z139 } from "zod";
|
|
2912
2928
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
2913
|
-
type:
|
|
2929
|
+
type: z139.literal("external_footprint_load_error"),
|
|
2914
2930
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2915
2931
|
"external_footprint_load_error"
|
|
2916
2932
|
),
|
|
2917
|
-
pcb_component_id:
|
|
2918
|
-
source_component_id:
|
|
2919
|
-
pcb_group_id:
|
|
2920
|
-
subcircuit_id:
|
|
2921
|
-
footprinter_string:
|
|
2922
|
-
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")
|
|
2923
2939
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2924
2940
|
expectTypesMatch(true);
|
|
2925
2941
|
|
|
2926
2942
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2927
|
-
import { z as
|
|
2943
|
+
import { z as z140 } from "zod";
|
|
2928
2944
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
2929
|
-
type:
|
|
2945
|
+
type: z140.literal("circuit_json_footprint_load_error"),
|
|
2930
2946
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2931
2947
|
"circuit_json_footprint_load_error"
|
|
2932
2948
|
),
|
|
2933
|
-
pcb_component_id:
|
|
2934
|
-
source_component_id:
|
|
2935
|
-
pcb_group_id:
|
|
2936
|
-
subcircuit_id:
|
|
2937
|
-
error_type:
|
|
2938
|
-
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()
|
|
2939
2955
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2940
2956
|
expectTypesMatch(true);
|
|
2941
2957
|
|
|
2942
2958
|
// src/pcb/pcb_group.ts
|
|
2943
|
-
import { z as
|
|
2944
|
-
var pcb_group =
|
|
2945
|
-
type:
|
|
2959
|
+
import { z as z141 } from "zod";
|
|
2960
|
+
var pcb_group = z141.object({
|
|
2961
|
+
type: z141.literal("pcb_group"),
|
|
2946
2962
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2947
|
-
source_group_id:
|
|
2948
|
-
is_subcircuit:
|
|
2949
|
-
subcircuit_id:
|
|
2963
|
+
source_group_id: z141.string(),
|
|
2964
|
+
is_subcircuit: z141.boolean().optional(),
|
|
2965
|
+
subcircuit_id: z141.string().optional(),
|
|
2950
2966
|
width: length.optional(),
|
|
2951
2967
|
height: length.optional(),
|
|
2952
2968
|
center: point,
|
|
2953
|
-
display_offset_x:
|
|
2969
|
+
display_offset_x: z141.string().optional().describe(
|
|
2954
2970
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
2955
2971
|
),
|
|
2956
|
-
display_offset_y:
|
|
2972
|
+
display_offset_y: z141.string().optional().describe(
|
|
2957
2973
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
2958
2974
|
),
|
|
2959
|
-
outline:
|
|
2975
|
+
outline: z141.array(point).optional(),
|
|
2960
2976
|
anchor_position: point.optional(),
|
|
2961
2977
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
2962
|
-
position_mode:
|
|
2963
|
-
positioned_relative_to_pcb_group_id:
|
|
2964
|
-
positioned_relative_to_pcb_board_id:
|
|
2965
|
-
pcb_component_ids:
|
|
2966
|
-
child_layout_mode:
|
|
2967
|
-
name:
|
|
2968
|
-
description:
|
|
2969
|
-
layout_mode:
|
|
2970
|
-
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({
|
|
2971
2987
|
trace_clearance: length
|
|
2972
2988
|
}).optional(),
|
|
2973
|
-
autorouter_used_string:
|
|
2989
|
+
autorouter_used_string: z141.string().optional()
|
|
2974
2990
|
}).describe("Defines a group of components on the PCB");
|
|
2975
2991
|
expectTypesMatch(true);
|
|
2976
2992
|
|
|
2977
2993
|
// src/pcb/pcb_autorouting_error.ts
|
|
2978
|
-
import { z as
|
|
2994
|
+
import { z as z142 } from "zod";
|
|
2979
2995
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
2980
|
-
type:
|
|
2996
|
+
type: z142.literal("pcb_autorouting_error"),
|
|
2981
2997
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2982
|
-
error_type:
|
|
2983
|
-
subcircuit_id:
|
|
2998
|
+
error_type: z142.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2999
|
+
subcircuit_id: z142.string().optional()
|
|
2984
3000
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2985
3001
|
expectTypesMatch(true);
|
|
2986
3002
|
|
|
2987
3003
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2988
|
-
import { z as
|
|
2989
|
-
var pcb_manual_edit_conflict_warning =
|
|
2990
|
-
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"),
|
|
2991
3007
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2992
3008
|
"pcb_manual_edit_conflict_warning"
|
|
2993
3009
|
),
|
|
2994
|
-
warning_type:
|
|
2995
|
-
message:
|
|
2996
|
-
pcb_component_id:
|
|
2997
|
-
pcb_group_id:
|
|
2998
|
-
subcircuit_id:
|
|
2999
|
-
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()
|
|
3000
3016
|
}).describe(
|
|
3001
3017
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3002
3018
|
);
|
|
3003
3019
|
expectTypesMatch(true);
|
|
3004
3020
|
|
|
3005
3021
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3006
|
-
import { z as
|
|
3007
|
-
var connectorOrientationDirection =
|
|
3008
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3009
|
-
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"),
|
|
3010
3026
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3011
3027
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3012
3028
|
),
|
|
3013
|
-
warning_type:
|
|
3014
|
-
message:
|
|
3015
|
-
pcb_component_id:
|
|
3016
|
-
source_component_id:
|
|
3017
|
-
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(),
|
|
3018
3034
|
facing_direction: connectorOrientationDirection,
|
|
3019
3035
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3020
|
-
subcircuit_id:
|
|
3036
|
+
subcircuit_id: z144.string().optional()
|
|
3021
3037
|
}).describe(
|
|
3022
3038
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3023
3039
|
);
|
|
3024
3040
|
expectTypesMatch(true);
|
|
3025
3041
|
|
|
3026
3042
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3027
|
-
import { z as
|
|
3028
|
-
var supplier_footprint_mismatch_warning =
|
|
3029
|
-
type:
|
|
3043
|
+
import { z as z145 } from "zod";
|
|
3044
|
+
var supplier_footprint_mismatch_warning = z145.object({
|
|
3045
|
+
type: z145.literal("supplier_footprint_mismatch_warning"),
|
|
3030
3046
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3031
3047
|
"supplier_footprint_mismatch_warning"
|
|
3032
3048
|
),
|
|
3033
|
-
warning_type:
|
|
3034
|
-
message:
|
|
3035
|
-
source_component_id:
|
|
3036
|
-
pcb_component_id:
|
|
3037
|
-
pcb_group_id:
|
|
3038
|
-
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(),
|
|
3039
3055
|
supplier_name: supplier_name.optional(),
|
|
3040
|
-
supplier_part_number:
|
|
3041
|
-
supplier_footprint_url:
|
|
3042
|
-
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()
|
|
3043
3059
|
}).describe(
|
|
3044
3060
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3045
3061
|
);
|
|
3046
3062
|
expectTypesMatch(true);
|
|
3047
3063
|
|
|
3048
3064
|
// src/pcb/pcb_breakout_point.ts
|
|
3049
|
-
import { z as
|
|
3050
|
-
var pcb_breakout_point =
|
|
3051
|
-
type:
|
|
3065
|
+
import { z as z146 } from "zod";
|
|
3066
|
+
var pcb_breakout_point = z146.object({
|
|
3067
|
+
type: z146.literal("pcb_breakout_point"),
|
|
3052
3068
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3053
|
-
pcb_group_id:
|
|
3054
|
-
subcircuit_id:
|
|
3055
|
-
source_trace_id:
|
|
3056
|
-
source_port_id:
|
|
3057
|
-
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(),
|
|
3058
3074
|
x: distance,
|
|
3059
3075
|
y: distance
|
|
3060
3076
|
}).describe(
|
|
@@ -3063,61 +3079,61 @@ var pcb_breakout_point = z145.object({
|
|
|
3063
3079
|
expectTypesMatch(true);
|
|
3064
3080
|
|
|
3065
3081
|
// src/pcb/pcb_ground_plane.ts
|
|
3066
|
-
import { z as
|
|
3067
|
-
var pcb_ground_plane =
|
|
3068
|
-
type:
|
|
3082
|
+
import { z as z147 } from "zod";
|
|
3083
|
+
var pcb_ground_plane = z147.object({
|
|
3084
|
+
type: z147.literal("pcb_ground_plane"),
|
|
3069
3085
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3070
|
-
source_pcb_ground_plane_id:
|
|
3071
|
-
source_net_id:
|
|
3072
|
-
pcb_group_id:
|
|
3073
|
-
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()
|
|
3074
3090
|
}).describe("Defines a ground plane on the PCB");
|
|
3075
3091
|
expectTypesMatch(true);
|
|
3076
3092
|
|
|
3077
3093
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3078
|
-
import { z as
|
|
3079
|
-
var pcb_ground_plane_region =
|
|
3080
|
-
type:
|
|
3094
|
+
import { z as z148 } from "zod";
|
|
3095
|
+
var pcb_ground_plane_region = z148.object({
|
|
3096
|
+
type: z148.literal("pcb_ground_plane_region"),
|
|
3081
3097
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3082
3098
|
"pcb_ground_plane_region"
|
|
3083
3099
|
),
|
|
3084
|
-
pcb_ground_plane_id:
|
|
3085
|
-
pcb_group_id:
|
|
3086
|
-
subcircuit_id:
|
|
3100
|
+
pcb_ground_plane_id: z148.string(),
|
|
3101
|
+
pcb_group_id: z148.string().optional(),
|
|
3102
|
+
subcircuit_id: z148.string().optional(),
|
|
3087
3103
|
layer: layer_ref,
|
|
3088
|
-
points:
|
|
3104
|
+
points: z148.array(point)
|
|
3089
3105
|
}).describe("Defines a polygon region of a ground plane");
|
|
3090
3106
|
expectTypesMatch(true);
|
|
3091
3107
|
|
|
3092
3108
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3093
|
-
import { z as
|
|
3094
|
-
var pcb_thermal_spoke =
|
|
3095
|
-
type:
|
|
3109
|
+
import { z as z149 } from "zod";
|
|
3110
|
+
var pcb_thermal_spoke = z149.object({
|
|
3111
|
+
type: z149.literal("pcb_thermal_spoke"),
|
|
3096
3112
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3097
|
-
pcb_ground_plane_id:
|
|
3098
|
-
shape:
|
|
3099
|
-
spoke_count:
|
|
3113
|
+
pcb_ground_plane_id: z149.string(),
|
|
3114
|
+
shape: z149.string(),
|
|
3115
|
+
spoke_count: z149.number(),
|
|
3100
3116
|
spoke_thickness: distance,
|
|
3101
3117
|
spoke_inner_diameter: distance,
|
|
3102
3118
|
spoke_outer_diameter: distance,
|
|
3103
|
-
pcb_plated_hole_id:
|
|
3104
|
-
subcircuit_id:
|
|
3119
|
+
pcb_plated_hole_id: z149.string().optional(),
|
|
3120
|
+
subcircuit_id: z149.string().optional()
|
|
3105
3121
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3106
3122
|
expectTypesMatch(true);
|
|
3107
3123
|
|
|
3108
3124
|
// src/pcb/pcb_copper_pour.ts
|
|
3109
|
-
import { z as
|
|
3110
|
-
var pcb_copper_pour_base =
|
|
3111
|
-
type:
|
|
3125
|
+
import { z as z150 } from "zod";
|
|
3126
|
+
var pcb_copper_pour_base = z150.object({
|
|
3127
|
+
type: z150.literal("pcb_copper_pour"),
|
|
3112
3128
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3113
|
-
pcb_group_id:
|
|
3114
|
-
subcircuit_id:
|
|
3129
|
+
pcb_group_id: z150.string().optional(),
|
|
3130
|
+
subcircuit_id: z150.string().optional(),
|
|
3115
3131
|
layer: layer_ref,
|
|
3116
|
-
source_net_id:
|
|
3117
|
-
covered_with_solder_mask:
|
|
3132
|
+
source_net_id: z150.string().optional(),
|
|
3133
|
+
covered_with_solder_mask: z150.boolean().optional().default(true)
|
|
3118
3134
|
});
|
|
3119
3135
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3120
|
-
shape:
|
|
3136
|
+
shape: z150.literal("rect"),
|
|
3121
3137
|
center: point,
|
|
3122
3138
|
width: length,
|
|
3123
3139
|
height: length,
|
|
@@ -3125,16 +3141,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3125
3141
|
});
|
|
3126
3142
|
expectTypesMatch(true);
|
|
3127
3143
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3128
|
-
shape:
|
|
3144
|
+
shape: z150.literal("brep"),
|
|
3129
3145
|
brep_shape
|
|
3130
3146
|
});
|
|
3131
3147
|
expectTypesMatch(true);
|
|
3132
3148
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3133
|
-
shape:
|
|
3134
|
-
points:
|
|
3149
|
+
shape: z150.literal("polygon"),
|
|
3150
|
+
points: z150.array(point)
|
|
3135
3151
|
});
|
|
3136
3152
|
expectTypesMatch(true);
|
|
3137
|
-
var pcb_copper_pour =
|
|
3153
|
+
var pcb_copper_pour = z150.discriminatedUnion("shape", [
|
|
3138
3154
|
pcb_copper_pour_rect,
|
|
3139
3155
|
pcb_copper_pour_brep,
|
|
3140
3156
|
pcb_copper_pour_polygon
|
|
@@ -3142,99 +3158,99 @@ var pcb_copper_pour = z149.discriminatedUnion("shape", [
|
|
|
3142
3158
|
expectTypesMatch(true);
|
|
3143
3159
|
|
|
3144
3160
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3145
|
-
import { z as
|
|
3161
|
+
import { z as z151 } from "zod";
|
|
3146
3162
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3147
|
-
type:
|
|
3163
|
+
type: z151.literal("pcb_component_outside_board_error"),
|
|
3148
3164
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3149
3165
|
"pcb_component_outside_board_error"
|
|
3150
3166
|
),
|
|
3151
|
-
error_type:
|
|
3152
|
-
pcb_component_id:
|
|
3153
|
-
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(),
|
|
3154
3170
|
component_center: point,
|
|
3155
|
-
component_bounds:
|
|
3156
|
-
min_x:
|
|
3157
|
-
max_x:
|
|
3158
|
-
min_y:
|
|
3159
|
-
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()
|
|
3160
3176
|
}),
|
|
3161
|
-
subcircuit_id:
|
|
3162
|
-
source_component_id:
|
|
3177
|
+
subcircuit_id: z151.string().optional(),
|
|
3178
|
+
source_component_id: z151.string().optional()
|
|
3163
3179
|
}).describe(
|
|
3164
3180
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3165
3181
|
);
|
|
3166
3182
|
expectTypesMatch(true);
|
|
3167
3183
|
|
|
3168
3184
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3169
|
-
import { z as
|
|
3185
|
+
import { z as z152 } from "zod";
|
|
3170
3186
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3171
|
-
type:
|
|
3187
|
+
type: z152.literal("pcb_component_not_on_board_edge_error"),
|
|
3172
3188
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3173
3189
|
"pcb_component_not_on_board_edge_error"
|
|
3174
3190
|
),
|
|
3175
|
-
error_type:
|
|
3176
|
-
pcb_component_id:
|
|
3177
|
-
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(),
|
|
3178
3194
|
component_center: point,
|
|
3179
|
-
pad_to_nearest_board_edge_distance:
|
|
3180
|
-
source_component_id:
|
|
3181
|
-
subcircuit_id:
|
|
3195
|
+
pad_to_nearest_board_edge_distance: z152.number(),
|
|
3196
|
+
source_component_id: z152.string().optional(),
|
|
3197
|
+
subcircuit_id: z152.string().optional()
|
|
3182
3198
|
}).describe(
|
|
3183
3199
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3184
3200
|
);
|
|
3185
3201
|
expectTypesMatch(true);
|
|
3186
3202
|
|
|
3187
3203
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3188
|
-
import { z as
|
|
3204
|
+
import { z as z153 } from "zod";
|
|
3189
3205
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3190
|
-
type:
|
|
3206
|
+
type: z153.literal("pcb_component_invalid_layer_error"),
|
|
3191
3207
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3192
3208
|
"pcb_component_invalid_layer_error"
|
|
3193
3209
|
),
|
|
3194
|
-
error_type:
|
|
3195
|
-
pcb_component_id:
|
|
3196
|
-
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(),
|
|
3197
3213
|
layer: layer_ref,
|
|
3198
|
-
subcircuit_id:
|
|
3214
|
+
subcircuit_id: z153.string().optional()
|
|
3199
3215
|
}).describe(
|
|
3200
3216
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3201
3217
|
);
|
|
3202
3218
|
expectTypesMatch(true);
|
|
3203
3219
|
|
|
3204
3220
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3205
|
-
import { z as
|
|
3221
|
+
import { z as z154 } from "zod";
|
|
3206
3222
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3207
|
-
type:
|
|
3223
|
+
type: z154.literal("pcb_via_clearance_error"),
|
|
3208
3224
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3209
|
-
error_type:
|
|
3210
|
-
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),
|
|
3211
3227
|
minimum_clearance: distance.optional(),
|
|
3212
3228
|
actual_clearance: distance.optional(),
|
|
3213
|
-
pcb_center:
|
|
3214
|
-
x:
|
|
3215
|
-
y:
|
|
3229
|
+
pcb_center: z154.object({
|
|
3230
|
+
x: z154.number().optional(),
|
|
3231
|
+
y: z154.number().optional()
|
|
3216
3232
|
}).optional(),
|
|
3217
|
-
subcircuit_id:
|
|
3233
|
+
subcircuit_id: z154.string().optional()
|
|
3218
3234
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3219
3235
|
expectTypesMatch(true);
|
|
3220
3236
|
|
|
3221
3237
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3222
|
-
import { z as
|
|
3238
|
+
import { z as z155 } from "zod";
|
|
3223
3239
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3224
|
-
type:
|
|
3240
|
+
type: z155.literal("pcb_via_trace_clearance_error"),
|
|
3225
3241
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3226
3242
|
"pcb_via_trace_clearance_error"
|
|
3227
3243
|
),
|
|
3228
|
-
error_type:
|
|
3229
|
-
pcb_via_id:
|
|
3230
|
-
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(),
|
|
3231
3247
|
minimum_clearance: distance.optional(),
|
|
3232
3248
|
actual_clearance: distance.optional(),
|
|
3233
|
-
center:
|
|
3234
|
-
x:
|
|
3235
|
-
y:
|
|
3249
|
+
center: z155.object({
|
|
3250
|
+
x: z155.number().optional(),
|
|
3251
|
+
y: z155.number().optional()
|
|
3236
3252
|
}).optional(),
|
|
3237
|
-
subcircuit_id:
|
|
3253
|
+
subcircuit_id: z155.string().optional()
|
|
3238
3254
|
}).describe(
|
|
3239
3255
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3240
3256
|
);
|
|
@@ -3243,41 +3259,41 @@ expectTypesMatch(
|
|
|
3243
3259
|
);
|
|
3244
3260
|
|
|
3245
3261
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3246
|
-
import { z as
|
|
3262
|
+
import { z as z156 } from "zod";
|
|
3247
3263
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3248
|
-
type:
|
|
3264
|
+
type: z156.literal("pcb_pad_pad_clearance_error"),
|
|
3249
3265
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3250
3266
|
"pcb_pad_pad_clearance_error"
|
|
3251
3267
|
),
|
|
3252
|
-
error_type:
|
|
3253
|
-
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),
|
|
3254
3270
|
minimum_clearance: distance.optional(),
|
|
3255
3271
|
actual_clearance: distance.optional(),
|
|
3256
|
-
center:
|
|
3257
|
-
x:
|
|
3258
|
-
y:
|
|
3272
|
+
center: z156.object({
|
|
3273
|
+
x: z156.number().optional(),
|
|
3274
|
+
y: z156.number().optional()
|
|
3259
3275
|
}).optional(),
|
|
3260
|
-
subcircuit_id:
|
|
3276
|
+
subcircuit_id: z156.string().optional()
|
|
3261
3277
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3262
3278
|
expectTypesMatch(true);
|
|
3263
3279
|
|
|
3264
3280
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3265
|
-
import { z as
|
|
3281
|
+
import { z as z157 } from "zod";
|
|
3266
3282
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3267
|
-
type:
|
|
3283
|
+
type: z157.literal("pcb_pad_trace_clearance_error"),
|
|
3268
3284
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3269
3285
|
"pcb_pad_trace_clearance_error"
|
|
3270
3286
|
),
|
|
3271
|
-
error_type:
|
|
3272
|
-
pcb_pad_id:
|
|
3273
|
-
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(),
|
|
3274
3290
|
minimum_clearance: distance.optional(),
|
|
3275
3291
|
actual_clearance: distance.optional(),
|
|
3276
|
-
center:
|
|
3277
|
-
x:
|
|
3278
|
-
y:
|
|
3292
|
+
center: z157.object({
|
|
3293
|
+
x: z157.number().optional(),
|
|
3294
|
+
y: z157.number().optional()
|
|
3279
3295
|
}).optional(),
|
|
3280
|
-
subcircuit_id:
|
|
3296
|
+
subcircuit_id: z157.string().optional()
|
|
3281
3297
|
}).describe(
|
|
3282
3298
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3283
3299
|
);
|
|
@@ -3286,89 +3302,89 @@ expectTypesMatch(
|
|
|
3286
3302
|
);
|
|
3287
3303
|
|
|
3288
3304
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3289
|
-
import { z as
|
|
3290
|
-
var pcb_courtyard_rect =
|
|
3291
|
-
type:
|
|
3305
|
+
import { z as z158 } from "zod";
|
|
3306
|
+
var pcb_courtyard_rect = z158.object({
|
|
3307
|
+
type: z158.literal("pcb_courtyard_rect"),
|
|
3292
3308
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3293
|
-
pcb_component_id:
|
|
3294
|
-
pcb_group_id:
|
|
3295
|
-
subcircuit_id:
|
|
3309
|
+
pcb_component_id: z158.string(),
|
|
3310
|
+
pcb_group_id: z158.string().optional(),
|
|
3311
|
+
subcircuit_id: z158.string().optional(),
|
|
3296
3312
|
center: point,
|
|
3297
3313
|
width: length,
|
|
3298
3314
|
height: length,
|
|
3299
3315
|
layer: visible_layer,
|
|
3300
3316
|
ccw_rotation: rotation.optional(),
|
|
3301
|
-
color:
|
|
3317
|
+
color: z158.string().optional()
|
|
3302
3318
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3303
3319
|
expectTypesMatch(true);
|
|
3304
3320
|
|
|
3305
3321
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3306
|
-
import { z as
|
|
3307
|
-
var pcb_courtyard_outline =
|
|
3308
|
-
type:
|
|
3322
|
+
import { z as z159 } from "zod";
|
|
3323
|
+
var pcb_courtyard_outline = z159.object({
|
|
3324
|
+
type: z159.literal("pcb_courtyard_outline"),
|
|
3309
3325
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3310
3326
|
"pcb_courtyard_outline"
|
|
3311
3327
|
),
|
|
3312
|
-
pcb_component_id:
|
|
3313
|
-
pcb_group_id:
|
|
3314
|
-
subcircuit_id:
|
|
3328
|
+
pcb_component_id: z159.string(),
|
|
3329
|
+
pcb_group_id: z159.string().optional(),
|
|
3330
|
+
subcircuit_id: z159.string().optional(),
|
|
3315
3331
|
layer: visible_layer,
|
|
3316
|
-
outline:
|
|
3332
|
+
outline: z159.array(point).min(2)
|
|
3317
3333
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3318
3334
|
expectTypesMatch(true);
|
|
3319
3335
|
|
|
3320
3336
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3321
|
-
import { z as
|
|
3322
|
-
var pcb_courtyard_polygon =
|
|
3323
|
-
type:
|
|
3337
|
+
import { z as z160 } from "zod";
|
|
3338
|
+
var pcb_courtyard_polygon = z160.object({
|
|
3339
|
+
type: z160.literal("pcb_courtyard_polygon"),
|
|
3324
3340
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3325
3341
|
"pcb_courtyard_polygon"
|
|
3326
3342
|
),
|
|
3327
|
-
pcb_component_id:
|
|
3328
|
-
pcb_group_id:
|
|
3329
|
-
subcircuit_id:
|
|
3343
|
+
pcb_component_id: z160.string(),
|
|
3344
|
+
pcb_group_id: z160.string().optional(),
|
|
3345
|
+
subcircuit_id: z160.string().optional(),
|
|
3330
3346
|
layer: visible_layer,
|
|
3331
|
-
points:
|
|
3332
|
-
color:
|
|
3347
|
+
points: z160.array(point).min(3),
|
|
3348
|
+
color: z160.string().optional()
|
|
3333
3349
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3334
3350
|
expectTypesMatch(true);
|
|
3335
3351
|
|
|
3336
3352
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3337
|
-
import { z as
|
|
3338
|
-
var pcb_courtyard_circle =
|
|
3339
|
-
type:
|
|
3353
|
+
import { z as z161 } from "zod";
|
|
3354
|
+
var pcb_courtyard_circle = z161.object({
|
|
3355
|
+
type: z161.literal("pcb_courtyard_circle"),
|
|
3340
3356
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3341
3357
|
"pcb_courtyard_circle"
|
|
3342
3358
|
),
|
|
3343
|
-
pcb_component_id:
|
|
3344
|
-
pcb_group_id:
|
|
3345
|
-
subcircuit_id:
|
|
3359
|
+
pcb_component_id: z161.string(),
|
|
3360
|
+
pcb_group_id: z161.string().optional(),
|
|
3361
|
+
subcircuit_id: z161.string().optional(),
|
|
3346
3362
|
center: point,
|
|
3347
3363
|
radius: length,
|
|
3348
3364
|
layer: visible_layer,
|
|
3349
|
-
color:
|
|
3365
|
+
color: z161.string().optional()
|
|
3350
3366
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3351
3367
|
expectTypesMatch(true);
|
|
3352
3368
|
|
|
3353
3369
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3354
|
-
import { z as
|
|
3355
|
-
var pcb_courtyard_pill =
|
|
3356
|
-
type:
|
|
3370
|
+
import { z as z162 } from "zod";
|
|
3371
|
+
var pcb_courtyard_pill = z162.object({
|
|
3372
|
+
type: z162.literal("pcb_courtyard_pill"),
|
|
3357
3373
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3358
|
-
pcb_component_id:
|
|
3359
|
-
pcb_group_id:
|
|
3360
|
-
subcircuit_id:
|
|
3374
|
+
pcb_component_id: z162.string(),
|
|
3375
|
+
pcb_group_id: z162.string().optional(),
|
|
3376
|
+
subcircuit_id: z162.string().optional(),
|
|
3361
3377
|
center: point,
|
|
3362
3378
|
width: length,
|
|
3363
3379
|
height: length,
|
|
3364
3380
|
radius: length,
|
|
3365
3381
|
layer: visible_layer,
|
|
3366
|
-
color:
|
|
3382
|
+
color: z162.string().optional()
|
|
3367
3383
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3368
3384
|
expectTypesMatch(true);
|
|
3369
3385
|
|
|
3370
3386
|
// src/cad/cad_component.ts
|
|
3371
|
-
import { z as
|
|
3387
|
+
import { z as z163 } from "zod";
|
|
3372
3388
|
|
|
3373
3389
|
// src/cad/cad_model_conventions.ts
|
|
3374
3390
|
var cad_model_formats = [
|
|
@@ -3399,49 +3415,49 @@ var cadModelDefaultDirectionMap = {
|
|
|
3399
3415
|
};
|
|
3400
3416
|
|
|
3401
3417
|
// src/cad/cad_component.ts
|
|
3402
|
-
var cad_component =
|
|
3403
|
-
type:
|
|
3404
|
-
cad_component_id:
|
|
3405
|
-
pcb_component_id:
|
|
3406
|
-
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(),
|
|
3407
3423
|
position: point3,
|
|
3408
3424
|
rotation: point3.optional(),
|
|
3409
3425
|
size: point3.optional(),
|
|
3410
3426
|
layer: layer_ref.optional(),
|
|
3411
|
-
subcircuit_id:
|
|
3427
|
+
subcircuit_id: z163.string().optional(),
|
|
3412
3428
|
// These are all ways to generate/load the 3d model
|
|
3413
|
-
footprinter_string:
|
|
3414
|
-
model_obj_url:
|
|
3415
|
-
model_stl_url:
|
|
3416
|
-
model_3mf_url:
|
|
3417
|
-
model_gltf_url:
|
|
3418
|
-
model_glb_url:
|
|
3419
|
-
model_step_url:
|
|
3420
|
-
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(),
|
|
3421
3437
|
model_asset: asset.optional(),
|
|
3422
|
-
model_unit_to_mm_scale_factor:
|
|
3423
|
-
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(
|
|
3424
3440
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3425
3441
|
),
|
|
3426
3442
|
model_origin_position: point3.optional(),
|
|
3427
|
-
model_origin_alignment:
|
|
3443
|
+
model_origin_alignment: z163.enum([
|
|
3428
3444
|
"unknown",
|
|
3429
3445
|
"center",
|
|
3430
3446
|
"center_of_component_on_board_surface",
|
|
3431
3447
|
"bottom_center_of_component"
|
|
3432
3448
|
]).optional(),
|
|
3433
|
-
model_object_fit:
|
|
3434
|
-
model_jscad:
|
|
3435
|
-
show_as_translucent_model:
|
|
3436
|
-
show_as_bounding_box:
|
|
3437
|
-
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")
|
|
3438
3454
|
}).describe("Defines a component on the PCB");
|
|
3439
3455
|
expectTypesMatch(true);
|
|
3440
3456
|
|
|
3441
3457
|
// src/simulation/simulation_voltage_source.ts
|
|
3442
|
-
import { z as
|
|
3443
|
-
var wave_shape =
|
|
3444
|
-
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) => {
|
|
3445
3461
|
if (typeof val === "string") {
|
|
3446
3462
|
if (val.endsWith("%")) {
|
|
3447
3463
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3450,30 +3466,30 @@ var percentage = z163.union([z163.string(), z163.number()]).transform((val) => {
|
|
|
3450
3466
|
}
|
|
3451
3467
|
return val;
|
|
3452
3468
|
}).pipe(
|
|
3453
|
-
|
|
3469
|
+
z164.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3454
3470
|
);
|
|
3455
|
-
var simulation_dc_voltage_source =
|
|
3456
|
-
type:
|
|
3471
|
+
var simulation_dc_voltage_source = z164.object({
|
|
3472
|
+
type: z164.literal("simulation_voltage_source"),
|
|
3457
3473
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3458
3474
|
"simulation_voltage_source"
|
|
3459
3475
|
),
|
|
3460
|
-
is_dc_source:
|
|
3461
|
-
positive_source_port_id:
|
|
3462
|
-
negative_source_port_id:
|
|
3463
|
-
positive_source_net_id:
|
|
3464
|
-
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(),
|
|
3465
3481
|
voltage
|
|
3466
3482
|
}).describe("Defines a DC voltage source for simulation");
|
|
3467
|
-
var simulation_ac_voltage_source =
|
|
3468
|
-
type:
|
|
3483
|
+
var simulation_ac_voltage_source = z164.object({
|
|
3484
|
+
type: z164.literal("simulation_voltage_source"),
|
|
3469
3485
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3470
3486
|
"simulation_voltage_source"
|
|
3471
3487
|
),
|
|
3472
|
-
is_dc_source:
|
|
3473
|
-
terminal1_source_port_id:
|
|
3474
|
-
terminal2_source_port_id:
|
|
3475
|
-
terminal1_source_net_id:
|
|
3476
|
-
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(),
|
|
3477
3493
|
voltage: voltage.optional(),
|
|
3478
3494
|
frequency: frequency.optional(),
|
|
3479
3495
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3486,14 +3502,14 @@ var simulation_ac_voltage_source = z163.object({
|
|
|
3486
3502
|
pulse_width: ms.optional(),
|
|
3487
3503
|
period: ms.optional()
|
|
3488
3504
|
}).describe("Defines an AC voltage source for simulation");
|
|
3489
|
-
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");
|
|
3490
3506
|
expectTypesMatch(true);
|
|
3491
3507
|
expectTypesMatch(true);
|
|
3492
3508
|
expectTypesMatch(true);
|
|
3493
3509
|
|
|
3494
3510
|
// src/simulation/simulation_current_source.ts
|
|
3495
|
-
import { z as
|
|
3496
|
-
var percentage2 =
|
|
3511
|
+
import { z as z165 } from "zod";
|
|
3512
|
+
var percentage2 = z165.union([z165.string(), z165.number()]).transform((val) => {
|
|
3497
3513
|
if (typeof val === "string") {
|
|
3498
3514
|
if (val.endsWith("%")) {
|
|
3499
3515
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3502,30 +3518,30 @@ var percentage2 = z164.union([z164.string(), z164.number()]).transform((val) =>
|
|
|
3502
3518
|
}
|
|
3503
3519
|
return val;
|
|
3504
3520
|
}).pipe(
|
|
3505
|
-
|
|
3521
|
+
z165.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3506
3522
|
);
|
|
3507
|
-
var simulation_dc_current_source =
|
|
3508
|
-
type:
|
|
3523
|
+
var simulation_dc_current_source = z165.object({
|
|
3524
|
+
type: z165.literal("simulation_current_source"),
|
|
3509
3525
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3510
3526
|
"simulation_current_source"
|
|
3511
3527
|
),
|
|
3512
|
-
is_dc_source:
|
|
3513
|
-
positive_source_port_id:
|
|
3514
|
-
negative_source_port_id:
|
|
3515
|
-
positive_source_net_id:
|
|
3516
|
-
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(),
|
|
3517
3533
|
current
|
|
3518
3534
|
}).describe("Defines a DC current source for simulation");
|
|
3519
|
-
var simulation_ac_current_source =
|
|
3520
|
-
type:
|
|
3535
|
+
var simulation_ac_current_source = z165.object({
|
|
3536
|
+
type: z165.literal("simulation_current_source"),
|
|
3521
3537
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3522
3538
|
"simulation_current_source"
|
|
3523
3539
|
),
|
|
3524
|
-
is_dc_source:
|
|
3525
|
-
terminal1_source_port_id:
|
|
3526
|
-
terminal2_source_port_id:
|
|
3527
|
-
terminal1_source_net_id:
|
|
3528
|
-
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(),
|
|
3529
3545
|
current: current.optional(),
|
|
3530
3546
|
frequency: frequency.optional(),
|
|
3531
3547
|
peak_to_peak_current: current.optional(),
|
|
@@ -3533,31 +3549,31 @@ var simulation_ac_current_source = z164.object({
|
|
|
3533
3549
|
phase: rotation.optional(),
|
|
3534
3550
|
duty_cycle: percentage2.optional()
|
|
3535
3551
|
}).describe("Defines an AC current source for simulation");
|
|
3536
|
-
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");
|
|
3537
3553
|
expectTypesMatch(true);
|
|
3538
3554
|
expectTypesMatch(true);
|
|
3539
3555
|
expectTypesMatch(true);
|
|
3540
3556
|
|
|
3541
3557
|
// src/simulation/simulation_experiment.ts
|
|
3542
|
-
import { z as
|
|
3543
|
-
var experiment_type =
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
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")
|
|
3548
3564
|
]);
|
|
3549
|
-
var spice_simulation_options =
|
|
3550
|
-
method:
|
|
3551
|
-
reltol:
|
|
3552
|
-
abstol:
|
|
3553
|
-
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()
|
|
3554
3570
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3555
|
-
var simulation_experiment =
|
|
3556
|
-
type:
|
|
3571
|
+
var simulation_experiment = z166.object({
|
|
3572
|
+
type: z166.literal("simulation_experiment"),
|
|
3557
3573
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3558
3574
|
"simulation_experiment"
|
|
3559
3575
|
),
|
|
3560
|
-
name:
|
|
3576
|
+
name: z166.string(),
|
|
3561
3577
|
experiment_type,
|
|
3562
3578
|
time_per_step: duration_ms.optional(),
|
|
3563
3579
|
start_time_ms: ms.optional(),
|
|
@@ -3567,73 +3583,73 @@ var simulation_experiment = z165.object({
|
|
|
3567
3583
|
expectTypesMatch(true);
|
|
3568
3584
|
|
|
3569
3585
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3570
|
-
import { z as
|
|
3571
|
-
var simulation_transient_voltage_graph =
|
|
3572
|
-
type:
|
|
3586
|
+
import { z as z167 } from "zod";
|
|
3587
|
+
var simulation_transient_voltage_graph = z167.object({
|
|
3588
|
+
type: z167.literal("simulation_transient_voltage_graph"),
|
|
3573
3589
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3574
3590
|
"simulation_transient_voltage_graph"
|
|
3575
3591
|
),
|
|
3576
|
-
simulation_experiment_id:
|
|
3577
|
-
timestamps_ms:
|
|
3578
|
-
voltage_levels:
|
|
3579
|
-
source_component_id:
|
|
3580
|
-
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(),
|
|
3581
3597
|
time_per_step: duration_ms,
|
|
3582
3598
|
start_time_ms: ms,
|
|
3583
3599
|
end_time_ms: ms,
|
|
3584
|
-
name:
|
|
3585
|
-
color:
|
|
3600
|
+
name: z167.string().optional(),
|
|
3601
|
+
color: z167.string().optional()
|
|
3586
3602
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3587
3603
|
expectTypesMatch(true);
|
|
3588
3604
|
|
|
3589
3605
|
// src/simulation/simulation_transient_current_graph.ts
|
|
3590
|
-
import { z as
|
|
3591
|
-
var simulation_transient_current_graph =
|
|
3592
|
-
type:
|
|
3606
|
+
import { z as z168 } from "zod";
|
|
3607
|
+
var simulation_transient_current_graph = z168.object({
|
|
3608
|
+
type: z168.literal("simulation_transient_current_graph"),
|
|
3593
3609
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
3594
3610
|
"simulation_transient_current_graph"
|
|
3595
3611
|
),
|
|
3596
|
-
simulation_experiment_id:
|
|
3597
|
-
timestamps_ms:
|
|
3598
|
-
current_levels:
|
|
3599
|
-
source_component_id:
|
|
3600
|
-
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(),
|
|
3601
3617
|
time_per_step: duration_ms,
|
|
3602
3618
|
start_time_ms: ms,
|
|
3603
3619
|
end_time_ms: ms,
|
|
3604
|
-
name:
|
|
3605
|
-
color:
|
|
3620
|
+
name: z168.string().optional(),
|
|
3621
|
+
color: z168.string().optional()
|
|
3606
3622
|
}).describe("Stores current measurements over time for a simulation");
|
|
3607
3623
|
expectTypesMatch(true);
|
|
3608
3624
|
|
|
3609
3625
|
// src/simulation/simulation_switch.ts
|
|
3610
|
-
import { z as
|
|
3611
|
-
var simulation_switch =
|
|
3612
|
-
type:
|
|
3626
|
+
import { z as z169 } from "zod";
|
|
3627
|
+
var simulation_switch = z169.object({
|
|
3628
|
+
type: z169.literal("simulation_switch"),
|
|
3613
3629
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3614
|
-
source_component_id:
|
|
3630
|
+
source_component_id: z169.string().optional(),
|
|
3615
3631
|
closes_at: ms.optional(),
|
|
3616
3632
|
opens_at: ms.optional(),
|
|
3617
|
-
starts_closed:
|
|
3633
|
+
starts_closed: z169.boolean().optional(),
|
|
3618
3634
|
switching_frequency: frequency.optional()
|
|
3619
3635
|
}).describe("Defines a switch for simulation timing control");
|
|
3620
3636
|
expectTypesMatch(true);
|
|
3621
3637
|
|
|
3622
3638
|
// src/simulation/simulation_voltage_probe.ts
|
|
3623
|
-
import { z as
|
|
3624
|
-
var simulation_voltage_probe =
|
|
3625
|
-
type:
|
|
3639
|
+
import { z as z170 } from "zod";
|
|
3640
|
+
var simulation_voltage_probe = z170.object({
|
|
3641
|
+
type: z170.literal("simulation_voltage_probe"),
|
|
3626
3642
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3627
3643
|
"simulation_voltage_probe"
|
|
3628
3644
|
),
|
|
3629
|
-
source_component_id:
|
|
3630
|
-
name:
|
|
3631
|
-
signal_input_source_port_id:
|
|
3632
|
-
signal_input_source_net_id:
|
|
3633
|
-
reference_input_source_port_id:
|
|
3634
|
-
reference_input_source_net_id:
|
|
3635
|
-
subcircuit_id:
|
|
3636
|
-
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()
|
|
3637
3653
|
}).describe(
|
|
3638
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."
|
|
3639
3655
|
).superRefine((data, ctx) => {
|
|
@@ -3643,20 +3659,20 @@ var simulation_voltage_probe = z169.object({
|
|
|
3643
3659
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3644
3660
|
if (has_ports && has_nets) {
|
|
3645
3661
|
ctx.addIssue({
|
|
3646
|
-
code:
|
|
3662
|
+
code: z170.ZodIssueCode.custom,
|
|
3647
3663
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3648
3664
|
});
|
|
3649
3665
|
} else if (has_ports) {
|
|
3650
3666
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3651
3667
|
ctx.addIssue({
|
|
3652
|
-
code:
|
|
3668
|
+
code: z170.ZodIssueCode.custom,
|
|
3653
3669
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3654
3670
|
});
|
|
3655
3671
|
}
|
|
3656
3672
|
} else if (has_nets) {
|
|
3657
3673
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3658
3674
|
ctx.addIssue({
|
|
3659
|
-
code:
|
|
3675
|
+
code: z170.ZodIssueCode.custom,
|
|
3660
3676
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3661
3677
|
});
|
|
3662
3678
|
}
|
|
@@ -3664,7 +3680,7 @@ var simulation_voltage_probe = z169.object({
|
|
|
3664
3680
|
} else {
|
|
3665
3681
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3666
3682
|
ctx.addIssue({
|
|
3667
|
-
code:
|
|
3683
|
+
code: z170.ZodIssueCode.custom,
|
|
3668
3684
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3669
3685
|
});
|
|
3670
3686
|
}
|
|
@@ -3673,20 +3689,20 @@ var simulation_voltage_probe = z169.object({
|
|
|
3673
3689
|
expectTypesMatch(true);
|
|
3674
3690
|
|
|
3675
3691
|
// src/simulation/simulation_current_probe.ts
|
|
3676
|
-
import { z as
|
|
3677
|
-
var simulation_current_probe =
|
|
3678
|
-
type:
|
|
3692
|
+
import { z as z171 } from "zod";
|
|
3693
|
+
var simulation_current_probe = z171.object({
|
|
3694
|
+
type: z171.literal("simulation_current_probe"),
|
|
3679
3695
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
3680
3696
|
"simulation_current_probe"
|
|
3681
3697
|
),
|
|
3682
|
-
source_component_id:
|
|
3683
|
-
name:
|
|
3684
|
-
positive_source_port_id:
|
|
3685
|
-
negative_source_port_id:
|
|
3686
|
-
positive_source_net_id:
|
|
3687
|
-
negative_source_net_id:
|
|
3688
|
-
subcircuit_id:
|
|
3689
|
-
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()
|
|
3690
3706
|
}).describe(
|
|
3691
3707
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
3692
3708
|
).superRefine((data, ctx) => {
|
|
@@ -3698,7 +3714,7 @@ var simulation_current_probe = z170.object({
|
|
|
3698
3714
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
3699
3715
|
if (hasPorts && hasNets) {
|
|
3700
3716
|
ctx.addIssue({
|
|
3701
|
-
code:
|
|
3717
|
+
code: z171.ZodIssueCode.custom,
|
|
3702
3718
|
message: "Cannot mix port and net connections in a current probe."
|
|
3703
3719
|
});
|
|
3704
3720
|
return;
|
|
@@ -3706,7 +3722,7 @@ var simulation_current_probe = z170.object({
|
|
|
3706
3722
|
if (hasPorts) {
|
|
3707
3723
|
if (!hasPositivePort || !hasNegativePort) {
|
|
3708
3724
|
ctx.addIssue({
|
|
3709
|
-
code:
|
|
3725
|
+
code: z171.ZodIssueCode.custom,
|
|
3710
3726
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
3711
3727
|
});
|
|
3712
3728
|
}
|
|
@@ -3715,79 +3731,79 @@ var simulation_current_probe = z170.object({
|
|
|
3715
3731
|
if (hasNets) {
|
|
3716
3732
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
3717
3733
|
ctx.addIssue({
|
|
3718
|
-
code:
|
|
3734
|
+
code: z171.ZodIssueCode.custom,
|
|
3719
3735
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
3720
3736
|
});
|
|
3721
3737
|
}
|
|
3722
3738
|
return;
|
|
3723
3739
|
}
|
|
3724
3740
|
ctx.addIssue({
|
|
3725
|
-
code:
|
|
3741
|
+
code: z171.ZodIssueCode.custom,
|
|
3726
3742
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
3727
3743
|
});
|
|
3728
3744
|
});
|
|
3729
3745
|
expectTypesMatch(true);
|
|
3730
3746
|
|
|
3731
3747
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3732
|
-
import { z as
|
|
3748
|
+
import { z as z172 } from "zod";
|
|
3733
3749
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3734
|
-
type:
|
|
3750
|
+
type: z172.literal("simulation_unknown_experiment_error"),
|
|
3735
3751
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
3736
3752
|
"simulation_unknown_experiment_error"
|
|
3737
3753
|
),
|
|
3738
|
-
error_type:
|
|
3739
|
-
simulation_experiment_id:
|
|
3740
|
-
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()
|
|
3741
3757
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3742
3758
|
expectTypesMatch(true);
|
|
3743
3759
|
|
|
3744
3760
|
// src/simulation/simulation_op_amp.ts
|
|
3745
|
-
import { z as
|
|
3746
|
-
var simulation_op_amp =
|
|
3747
|
-
type:
|
|
3761
|
+
import { z as z173 } from "zod";
|
|
3762
|
+
var simulation_op_amp = z173.object({
|
|
3763
|
+
type: z173.literal("simulation_op_amp"),
|
|
3748
3764
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
3749
|
-
source_component_id:
|
|
3750
|
-
inverting_input_source_port_id:
|
|
3751
|
-
non_inverting_input_source_port_id:
|
|
3752
|
-
output_source_port_id:
|
|
3753
|
-
positive_supply_source_port_id:
|
|
3754
|
-
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()
|
|
3755
3771
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
3756
3772
|
expectTypesMatch(true);
|
|
3757
3773
|
|
|
3758
3774
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
3759
|
-
import { z as
|
|
3760
|
-
var simulation_spice_subcircuit =
|
|
3761
|
-
type:
|
|
3775
|
+
import { z as z174 } from "zod";
|
|
3776
|
+
var simulation_spice_subcircuit = z174.object({
|
|
3777
|
+
type: z174.literal("simulation_spice_subcircuit"),
|
|
3762
3778
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
3763
3779
|
"simulation_spice_subcircuit"
|
|
3764
3780
|
),
|
|
3765
|
-
source_component_id:
|
|
3766
|
-
spice_pin_to_source_port_map:
|
|
3767
|
-
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()
|
|
3768
3784
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
3769
3785
|
expectTypesMatch(
|
|
3770
3786
|
true
|
|
3771
3787
|
);
|
|
3772
3788
|
|
|
3773
3789
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
3774
|
-
import { z as
|
|
3790
|
+
import { z as z175 } from "zod";
|
|
3775
3791
|
var hasValue = (value) => value !== void 0;
|
|
3776
|
-
var simulation_oscilloscope_trace =
|
|
3777
|
-
type:
|
|
3792
|
+
var simulation_oscilloscope_trace = z175.object({
|
|
3793
|
+
type: z175.literal("simulation_oscilloscope_trace"),
|
|
3778
3794
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
3779
3795
|
"simulation_oscilloscope_trace"
|
|
3780
3796
|
),
|
|
3781
|
-
simulation_transient_voltage_graph_id:
|
|
3782
|
-
simulation_transient_current_graph_id:
|
|
3783
|
-
simulation_voltage_probe_id:
|
|
3784
|
-
simulation_current_probe_id:
|
|
3785
|
-
display_name:
|
|
3786
|
-
color:
|
|
3787
|
-
display_center_value:
|
|
3788
|
-
display_center_offset_divs:
|
|
3789
|
-
volts_per_div:
|
|
3790
|
-
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()
|
|
3791
3807
|
}).describe(
|
|
3792
3808
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
3793
3809
|
).superRefine((data, ctx) => {
|
|
@@ -3801,19 +3817,19 @@ var simulation_oscilloscope_trace = z174.object({
|
|
|
3801
3817
|
].filter(hasValue).length;
|
|
3802
3818
|
if (voltageReferences + currentReferences !== 1) {
|
|
3803
3819
|
ctx.addIssue({
|
|
3804
|
-
code:
|
|
3820
|
+
code: z175.ZodIssueCode.custom,
|
|
3805
3821
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
3806
3822
|
});
|
|
3807
3823
|
}
|
|
3808
3824
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
3809
3825
|
ctx.addIssue({
|
|
3810
|
-
code:
|
|
3826
|
+
code: z175.ZodIssueCode.custom,
|
|
3811
3827
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
3812
3828
|
});
|
|
3813
3829
|
}
|
|
3814
3830
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
3815
3831
|
ctx.addIssue({
|
|
3816
|
-
code:
|
|
3832
|
+
code: z175.ZodIssueCode.custom,
|
|
3817
3833
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
3818
3834
|
});
|
|
3819
3835
|
}
|
|
@@ -3821,8 +3837,8 @@ var simulation_oscilloscope_trace = z174.object({
|
|
|
3821
3837
|
expectTypesMatch(true);
|
|
3822
3838
|
|
|
3823
3839
|
// src/any_circuit_element.ts
|
|
3824
|
-
import { z as
|
|
3825
|
-
var any_circuit_element =
|
|
3840
|
+
import { z as z176 } from "zod";
|
|
3841
|
+
var any_circuit_element = z176.union([
|
|
3826
3842
|
source_trace,
|
|
3827
3843
|
source_port,
|
|
3828
3844
|
source_component_internal_connection,
|
|
@@ -3854,6 +3870,7 @@ var any_circuit_element = z175.union([
|
|
|
3854
3870
|
source_invalid_component_property_error,
|
|
3855
3871
|
source_trace_not_connected_error,
|
|
3856
3872
|
source_pin_missing_trace_warning,
|
|
3873
|
+
source_unnamed_trace_warning,
|
|
3857
3874
|
source_missing_manufacturer_part_number_warning,
|
|
3858
3875
|
source_no_power_pin_defined_warning,
|
|
3859
3876
|
source_no_ground_pin_defined_warning,
|
|
@@ -4206,6 +4223,7 @@ export {
|
|
|
4206
4223
|
source_simple_voltage_source,
|
|
4207
4224
|
source_trace,
|
|
4208
4225
|
source_trace_not_connected_error,
|
|
4226
|
+
source_unnamed_trace_warning,
|
|
4209
4227
|
spice_simulation_options,
|
|
4210
4228
|
supplier_footprint_mismatch_warning,
|
|
4211
4229
|
supplier_name,
|