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