circuit-json 0.0.480 → 0.0.482
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/index.d.mts +140 -1
- package/dist/index.mjs +1545 -1525
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1126,118 +1126,135 @@ expectTypesMatch(
|
|
|
1126
1126
|
true
|
|
1127
1127
|
);
|
|
1128
1128
|
|
|
1129
|
-
// src/
|
|
1129
|
+
// src/source/source_confusing_net_name_warning.ts
|
|
1130
1130
|
import { z as z72 } from "zod";
|
|
1131
|
-
var
|
|
1132
|
-
type: z72.literal("
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1131
|
+
var source_confusing_net_name_warning = z72.object({
|
|
1132
|
+
type: z72.literal("source_confusing_net_name_warning"),
|
|
1133
|
+
source_confusing_net_name_warning_id: getZodPrefixedIdWithDefault(
|
|
1134
|
+
"source_confusing_net_name_warning"
|
|
1135
|
+
),
|
|
1136
|
+
warning_type: z72.literal("source_confusing_net_name_warning").default("source_confusing_net_name_warning"),
|
|
1137
|
+
message: z72.string(),
|
|
1138
|
+
source_net_ids: z72.array(z72.string()).min(2),
|
|
1139
|
+
net_name: z72.string(),
|
|
1140
|
+
subcircuit_id: z72.string().optional()
|
|
1141
|
+
}).describe(
|
|
1142
|
+
"Warning emitted when electrically disconnected source nets share a name"
|
|
1143
|
+
);
|
|
1144
|
+
expectTypesMatch(true);
|
|
1145
|
+
|
|
1146
|
+
// src/schematic/schematic_box.ts
|
|
1147
|
+
import { z as z73 } from "zod";
|
|
1148
|
+
var schematic_box = z73.object({
|
|
1149
|
+
type: z73.literal("schematic_box"),
|
|
1150
|
+
schematic_sheet_id: z73.string().optional(),
|
|
1151
|
+
schematic_component_id: z73.string().optional(),
|
|
1152
|
+
schematic_symbol_id: z73.string().optional(),
|
|
1136
1153
|
width: distance,
|
|
1137
1154
|
height: distance,
|
|
1138
|
-
is_dashed:
|
|
1155
|
+
is_dashed: z73.boolean().default(false),
|
|
1139
1156
|
x: distance,
|
|
1140
1157
|
y: distance,
|
|
1141
|
-
subcircuit_id:
|
|
1158
|
+
subcircuit_id: z73.string().optional()
|
|
1142
1159
|
}).describe("Draws a box on the schematic");
|
|
1143
1160
|
expectTypesMatch(true);
|
|
1144
1161
|
|
|
1145
1162
|
// src/schematic/schematic_path.ts
|
|
1146
|
-
import { z as
|
|
1147
|
-
var schematic_path =
|
|
1148
|
-
type:
|
|
1163
|
+
import { z as z74 } from "zod";
|
|
1164
|
+
var schematic_path = z74.object({
|
|
1165
|
+
type: z74.literal("schematic_path"),
|
|
1149
1166
|
schematic_path_id: getZodPrefixedIdWithDefault("schematic_path"),
|
|
1150
|
-
schematic_sheet_id:
|
|
1151
|
-
schematic_component_id:
|
|
1152
|
-
schematic_symbol_id:
|
|
1153
|
-
fill_color:
|
|
1154
|
-
is_filled:
|
|
1155
|
-
is_dashed:
|
|
1167
|
+
schematic_sheet_id: z74.string().optional(),
|
|
1168
|
+
schematic_component_id: z74.string().optional(),
|
|
1169
|
+
schematic_symbol_id: z74.string().optional(),
|
|
1170
|
+
fill_color: z74.string().optional(),
|
|
1171
|
+
is_filled: z74.boolean().optional(),
|
|
1172
|
+
is_dashed: z74.boolean().default(false),
|
|
1156
1173
|
stroke_width: distance.nullable().optional(),
|
|
1157
|
-
stroke_color:
|
|
1174
|
+
stroke_color: z74.string().optional(),
|
|
1158
1175
|
dash_length: distance.optional(),
|
|
1159
1176
|
dash_gap: distance.optional(),
|
|
1160
|
-
points:
|
|
1161
|
-
subcircuit_id:
|
|
1177
|
+
points: z74.array(point),
|
|
1178
|
+
subcircuit_id: z74.string().optional()
|
|
1162
1179
|
});
|
|
1163
1180
|
expectTypesMatch(true);
|
|
1164
1181
|
|
|
1165
1182
|
// src/schematic/schematic_component.ts
|
|
1166
|
-
import { z as
|
|
1167
|
-
var schematic_pin_styles =
|
|
1168
|
-
|
|
1183
|
+
import { z as z75 } from "zod";
|
|
1184
|
+
var schematic_pin_styles = z75.record(
|
|
1185
|
+
z75.object({
|
|
1169
1186
|
left_margin: length.optional(),
|
|
1170
1187
|
right_margin: length.optional(),
|
|
1171
1188
|
top_margin: length.optional(),
|
|
1172
1189
|
bottom_margin: length.optional()
|
|
1173
1190
|
})
|
|
1174
1191
|
);
|
|
1175
|
-
var schematic_component_port_arrangement_by_size =
|
|
1176
|
-
left_size:
|
|
1177
|
-
right_size:
|
|
1178
|
-
top_size:
|
|
1179
|
-
bottom_size:
|
|
1192
|
+
var schematic_component_port_arrangement_by_size = z75.object({
|
|
1193
|
+
left_size: z75.number(),
|
|
1194
|
+
right_size: z75.number(),
|
|
1195
|
+
top_size: z75.number().optional(),
|
|
1196
|
+
bottom_size: z75.number().optional()
|
|
1180
1197
|
});
|
|
1181
1198
|
expectTypesMatch(true);
|
|
1182
|
-
var schematic_component_port_arrangement_by_sides =
|
|
1183
|
-
left_side:
|
|
1184
|
-
pins:
|
|
1199
|
+
var schematic_component_port_arrangement_by_sides = z75.object({
|
|
1200
|
+
left_side: z75.object({
|
|
1201
|
+
pins: z75.array(z75.number()),
|
|
1185
1202
|
// @ts-ignore
|
|
1186
|
-
direction:
|
|
1203
|
+
direction: z75.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
1187
1204
|
}).optional(),
|
|
1188
|
-
right_side:
|
|
1189
|
-
pins:
|
|
1205
|
+
right_side: z75.object({
|
|
1206
|
+
pins: z75.array(z75.number()),
|
|
1190
1207
|
// @ts-ignore
|
|
1191
|
-
direction:
|
|
1208
|
+
direction: z75.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
1192
1209
|
}).optional(),
|
|
1193
|
-
top_side:
|
|
1194
|
-
pins:
|
|
1210
|
+
top_side: z75.object({
|
|
1211
|
+
pins: z75.array(z75.number()),
|
|
1195
1212
|
// @ts-ignore
|
|
1196
|
-
direction:
|
|
1213
|
+
direction: z75.enum(["left-to-right", "right-to-left"]).optional()
|
|
1197
1214
|
}).optional(),
|
|
1198
|
-
bottom_side:
|
|
1199
|
-
pins:
|
|
1215
|
+
bottom_side: z75.object({
|
|
1216
|
+
pins: z75.array(z75.number()),
|
|
1200
1217
|
// @ts-ignore
|
|
1201
|
-
direction:
|
|
1218
|
+
direction: z75.enum(["left-to-right", "right-to-left"]).optional()
|
|
1202
1219
|
}).optional()
|
|
1203
1220
|
});
|
|
1204
1221
|
expectTypesMatch(true);
|
|
1205
|
-
var port_arrangement =
|
|
1222
|
+
var port_arrangement = z75.union([
|
|
1206
1223
|
schematic_component_port_arrangement_by_size,
|
|
1207
1224
|
schematic_component_port_arrangement_by_sides
|
|
1208
1225
|
]);
|
|
1209
|
-
var schematic_component =
|
|
1210
|
-
type:
|
|
1226
|
+
var schematic_component = z75.object({
|
|
1227
|
+
type: z75.literal("schematic_component"),
|
|
1211
1228
|
size,
|
|
1212
1229
|
center: point,
|
|
1213
|
-
source_component_id:
|
|
1214
|
-
schematic_component_id:
|
|
1215
|
-
schematic_sheet_id:
|
|
1216
|
-
schematic_symbol_id:
|
|
1230
|
+
source_component_id: z75.string().optional(),
|
|
1231
|
+
schematic_component_id: z75.string(),
|
|
1232
|
+
schematic_sheet_id: z75.string().optional(),
|
|
1233
|
+
schematic_symbol_id: z75.string().optional(),
|
|
1217
1234
|
pin_spacing: length.optional(),
|
|
1218
1235
|
pin_styles: schematic_pin_styles.optional(),
|
|
1219
1236
|
box_width: length.optional(),
|
|
1220
|
-
symbol_name:
|
|
1237
|
+
symbol_name: z75.string().optional(),
|
|
1221
1238
|
port_arrangement: port_arrangement.optional(),
|
|
1222
|
-
port_labels:
|
|
1223
|
-
symbol_display_value:
|
|
1224
|
-
subcircuit_id:
|
|
1225
|
-
schematic_group_id:
|
|
1226
|
-
is_schematic_group:
|
|
1227
|
-
source_group_id:
|
|
1228
|
-
is_box_with_pins:
|
|
1239
|
+
port_labels: z75.record(z75.string()).optional(),
|
|
1240
|
+
symbol_display_value: z75.string().optional(),
|
|
1241
|
+
subcircuit_id: z75.string().optional(),
|
|
1242
|
+
schematic_group_id: z75.string().optional(),
|
|
1243
|
+
is_schematic_group: z75.boolean().optional(),
|
|
1244
|
+
source_group_id: z75.string().optional(),
|
|
1245
|
+
is_box_with_pins: z75.boolean().optional().default(true)
|
|
1229
1246
|
});
|
|
1230
1247
|
expectTypesMatch(true);
|
|
1231
1248
|
|
|
1232
1249
|
// src/schematic/schematic_symbol.ts
|
|
1233
|
-
import { z as
|
|
1234
|
-
var schematicSymbolMetadata =
|
|
1250
|
+
import { z as z76 } from "zod";
|
|
1251
|
+
var schematicSymbolMetadata = z76.object({
|
|
1235
1252
|
kicad_symbol: kicadSymbolMetadata.optional()
|
|
1236
|
-
}).catchall(
|
|
1237
|
-
var schematic_symbol =
|
|
1238
|
-
type:
|
|
1239
|
-
schematic_symbol_id:
|
|
1240
|
-
name:
|
|
1253
|
+
}).catchall(z76.unknown());
|
|
1254
|
+
var schematic_symbol = z76.object({
|
|
1255
|
+
type: z76.literal("schematic_symbol"),
|
|
1256
|
+
schematic_symbol_id: z76.string(),
|
|
1257
|
+
name: z76.string().optional(),
|
|
1241
1258
|
metadata: schematicSymbolMetadata.optional()
|
|
1242
1259
|
}).describe(
|
|
1243
1260
|
"Defines a named schematic symbol that can be referenced by components."
|
|
@@ -1245,126 +1262,126 @@ var schematic_symbol = z75.object({
|
|
|
1245
1262
|
expectTypesMatch(true);
|
|
1246
1263
|
|
|
1247
1264
|
// src/schematic/schematic_line.ts
|
|
1248
|
-
import { z as
|
|
1249
|
-
var schematic_line =
|
|
1250
|
-
type:
|
|
1265
|
+
import { z as z77 } from "zod";
|
|
1266
|
+
var schematic_line = z77.object({
|
|
1267
|
+
type: z77.literal("schematic_line"),
|
|
1251
1268
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
1252
|
-
schematic_sheet_id:
|
|
1253
|
-
schematic_component_id:
|
|
1254
|
-
schematic_symbol_id:
|
|
1269
|
+
schematic_sheet_id: z77.string().optional(),
|
|
1270
|
+
schematic_component_id: z77.string().optional(),
|
|
1271
|
+
schematic_symbol_id: z77.string().optional(),
|
|
1255
1272
|
x1: distance,
|
|
1256
1273
|
y1: distance,
|
|
1257
1274
|
x2: distance,
|
|
1258
1275
|
y2: distance,
|
|
1259
1276
|
stroke_width: distance.nullable().optional(),
|
|
1260
|
-
color:
|
|
1261
|
-
is_dashed:
|
|
1277
|
+
color: z77.string().default("#000000"),
|
|
1278
|
+
is_dashed: z77.boolean().default(false),
|
|
1262
1279
|
dash_length: distance.optional(),
|
|
1263
1280
|
dash_gap: distance.optional(),
|
|
1264
|
-
subcircuit_id:
|
|
1281
|
+
subcircuit_id: z77.string().optional()
|
|
1265
1282
|
}).describe("Draws a styled line on the schematic");
|
|
1266
1283
|
expectTypesMatch(true);
|
|
1267
1284
|
|
|
1268
1285
|
// src/schematic/schematic_rect.ts
|
|
1269
|
-
import { z as
|
|
1270
|
-
var schematic_rect =
|
|
1271
|
-
type:
|
|
1286
|
+
import { z as z78 } from "zod";
|
|
1287
|
+
var schematic_rect = z78.object({
|
|
1288
|
+
type: z78.literal("schematic_rect"),
|
|
1272
1289
|
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
1273
|
-
schematic_sheet_id:
|
|
1274
|
-
schematic_component_id:
|
|
1275
|
-
schematic_symbol_id:
|
|
1290
|
+
schematic_sheet_id: z78.string().optional(),
|
|
1291
|
+
schematic_component_id: z78.string().optional(),
|
|
1292
|
+
schematic_symbol_id: z78.string().optional(),
|
|
1276
1293
|
center: point,
|
|
1277
1294
|
width: distance,
|
|
1278
1295
|
height: distance,
|
|
1279
1296
|
rotation: rotation.default(0),
|
|
1280
1297
|
stroke_width: distance.nullable().optional(),
|
|
1281
|
-
color:
|
|
1282
|
-
is_filled:
|
|
1283
|
-
fill_color:
|
|
1284
|
-
is_dashed:
|
|
1285
|
-
subcircuit_id:
|
|
1298
|
+
color: z78.string().default("#000000"),
|
|
1299
|
+
is_filled: z78.boolean().default(false),
|
|
1300
|
+
fill_color: z78.string().optional(),
|
|
1301
|
+
is_dashed: z78.boolean().default(false),
|
|
1302
|
+
subcircuit_id: z78.string().optional()
|
|
1286
1303
|
}).describe("Draws a styled rectangle on the schematic");
|
|
1287
1304
|
expectTypesMatch(true);
|
|
1288
1305
|
|
|
1289
1306
|
// src/schematic/schematic_circle.ts
|
|
1290
|
-
import { z as
|
|
1291
|
-
var schematic_circle =
|
|
1292
|
-
type:
|
|
1307
|
+
import { z as z79 } from "zod";
|
|
1308
|
+
var schematic_circle = z79.object({
|
|
1309
|
+
type: z79.literal("schematic_circle"),
|
|
1293
1310
|
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
1294
|
-
schematic_sheet_id:
|
|
1295
|
-
schematic_component_id:
|
|
1296
|
-
schematic_symbol_id:
|
|
1311
|
+
schematic_sheet_id: z79.string().optional(),
|
|
1312
|
+
schematic_component_id: z79.string().optional(),
|
|
1313
|
+
schematic_symbol_id: z79.string().optional(),
|
|
1297
1314
|
center: point,
|
|
1298
1315
|
radius: distance,
|
|
1299
1316
|
stroke_width: distance.nullable().optional(),
|
|
1300
|
-
color:
|
|
1301
|
-
is_filled:
|
|
1302
|
-
fill_color:
|
|
1303
|
-
is_dashed:
|
|
1304
|
-
subcircuit_id:
|
|
1317
|
+
color: z79.string().default("#000000"),
|
|
1318
|
+
is_filled: z79.boolean().default(false),
|
|
1319
|
+
fill_color: z79.string().optional(),
|
|
1320
|
+
is_dashed: z79.boolean().default(false),
|
|
1321
|
+
subcircuit_id: z79.string().optional()
|
|
1305
1322
|
}).describe("Draws a styled circle on the schematic");
|
|
1306
1323
|
expectTypesMatch(true);
|
|
1307
1324
|
|
|
1308
1325
|
// src/schematic/schematic_arc.ts
|
|
1309
|
-
import { z as
|
|
1310
|
-
var schematic_arc =
|
|
1311
|
-
type:
|
|
1326
|
+
import { z as z80 } from "zod";
|
|
1327
|
+
var schematic_arc = z80.object({
|
|
1328
|
+
type: z80.literal("schematic_arc"),
|
|
1312
1329
|
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
1313
|
-
schematic_sheet_id:
|
|
1314
|
-
schematic_component_id:
|
|
1315
|
-
schematic_symbol_id:
|
|
1330
|
+
schematic_sheet_id: z80.string().optional(),
|
|
1331
|
+
schematic_component_id: z80.string().optional(),
|
|
1332
|
+
schematic_symbol_id: z80.string().optional(),
|
|
1316
1333
|
center: point,
|
|
1317
1334
|
radius: distance,
|
|
1318
1335
|
start_angle_degrees: rotation,
|
|
1319
1336
|
end_angle_degrees: rotation,
|
|
1320
|
-
direction:
|
|
1337
|
+
direction: z80.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
1321
1338
|
stroke_width: distance.nullable().optional(),
|
|
1322
|
-
color:
|
|
1323
|
-
is_dashed:
|
|
1324
|
-
subcircuit_id:
|
|
1339
|
+
color: z80.string().default("#000000"),
|
|
1340
|
+
is_dashed: z80.boolean().default(false),
|
|
1341
|
+
subcircuit_id: z80.string().optional()
|
|
1325
1342
|
}).describe("Draws a styled arc on the schematic");
|
|
1326
1343
|
expectTypesMatch(true);
|
|
1327
1344
|
|
|
1328
1345
|
// src/schematic/schematic_trace.ts
|
|
1329
|
-
import { z as
|
|
1330
|
-
var schematic_trace =
|
|
1331
|
-
type:
|
|
1332
|
-
schematic_trace_id:
|
|
1333
|
-
schematic_sheet_id:
|
|
1334
|
-
source_trace_id:
|
|
1335
|
-
junctions:
|
|
1336
|
-
|
|
1337
|
-
x:
|
|
1338
|
-
y:
|
|
1346
|
+
import { z as z81 } from "zod";
|
|
1347
|
+
var schematic_trace = z81.object({
|
|
1348
|
+
type: z81.literal("schematic_trace"),
|
|
1349
|
+
schematic_trace_id: z81.string(),
|
|
1350
|
+
schematic_sheet_id: z81.string().optional(),
|
|
1351
|
+
source_trace_id: z81.string().optional(),
|
|
1352
|
+
junctions: z81.array(
|
|
1353
|
+
z81.object({
|
|
1354
|
+
x: z81.number(),
|
|
1355
|
+
y: z81.number()
|
|
1339
1356
|
})
|
|
1340
1357
|
),
|
|
1341
|
-
edges:
|
|
1342
|
-
|
|
1343
|
-
from:
|
|
1344
|
-
x:
|
|
1345
|
-
y:
|
|
1358
|
+
edges: z81.array(
|
|
1359
|
+
z81.object({
|
|
1360
|
+
from: z81.object({
|
|
1361
|
+
x: z81.number(),
|
|
1362
|
+
y: z81.number()
|
|
1346
1363
|
}),
|
|
1347
|
-
to:
|
|
1348
|
-
x:
|
|
1349
|
-
y:
|
|
1364
|
+
to: z81.object({
|
|
1365
|
+
x: z81.number(),
|
|
1366
|
+
y: z81.number()
|
|
1350
1367
|
}),
|
|
1351
|
-
is_crossing:
|
|
1352
|
-
from_schematic_port_id:
|
|
1353
|
-
to_schematic_port_id:
|
|
1368
|
+
is_crossing: z81.boolean().optional(),
|
|
1369
|
+
from_schematic_port_id: z81.string().optional(),
|
|
1370
|
+
to_schematic_port_id: z81.string().optional()
|
|
1354
1371
|
})
|
|
1355
1372
|
),
|
|
1356
|
-
subcircuit_id:
|
|
1373
|
+
subcircuit_id: z81.string().optional(),
|
|
1357
1374
|
// TODO: make required in a future release
|
|
1358
|
-
subcircuit_connectivity_map_key:
|
|
1375
|
+
subcircuit_connectivity_map_key: z81.string().optional()
|
|
1359
1376
|
});
|
|
1360
1377
|
expectTypesMatch(true);
|
|
1361
1378
|
|
|
1362
1379
|
// src/schematic/schematic_text.ts
|
|
1363
|
-
import { z as
|
|
1380
|
+
import { z as z83 } from "zod";
|
|
1364
1381
|
|
|
1365
1382
|
// src/common/FivePointAnchor.ts
|
|
1366
|
-
import { z as
|
|
1367
|
-
var fivePointAnchor =
|
|
1383
|
+
import { z as z82 } from "zod";
|
|
1384
|
+
var fivePointAnchor = z82.enum([
|
|
1368
1385
|
"center",
|
|
1369
1386
|
"left",
|
|
1370
1387
|
"right",
|
|
@@ -1374,118 +1391,118 @@ var fivePointAnchor = z81.enum([
|
|
|
1374
1391
|
expectTypesMatch(true);
|
|
1375
1392
|
|
|
1376
1393
|
// src/schematic/schematic_text.ts
|
|
1377
|
-
var schematic_text =
|
|
1378
|
-
type:
|
|
1379
|
-
schematic_sheet_id:
|
|
1380
|
-
schematic_component_id:
|
|
1381
|
-
schematic_symbol_id:
|
|
1382
|
-
schematic_text_id:
|
|
1383
|
-
source_trace_id:
|
|
1384
|
-
text:
|
|
1385
|
-
font_size:
|
|
1386
|
-
position:
|
|
1394
|
+
var schematic_text = z83.object({
|
|
1395
|
+
type: z83.literal("schematic_text"),
|
|
1396
|
+
schematic_sheet_id: z83.string().optional(),
|
|
1397
|
+
schematic_component_id: z83.string().optional(),
|
|
1398
|
+
schematic_symbol_id: z83.string().optional(),
|
|
1399
|
+
schematic_text_id: z83.string(),
|
|
1400
|
+
source_trace_id: z83.string().optional(),
|
|
1401
|
+
text: z83.string(),
|
|
1402
|
+
font_size: z83.number().default(0.18),
|
|
1403
|
+
position: z83.object({
|
|
1387
1404
|
x: distance,
|
|
1388
1405
|
y: distance
|
|
1389
1406
|
}),
|
|
1390
|
-
rotation:
|
|
1391
|
-
anchor:
|
|
1392
|
-
color:
|
|
1393
|
-
subcircuit_id:
|
|
1407
|
+
rotation: z83.number().default(0),
|
|
1408
|
+
anchor: z83.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
1409
|
+
color: z83.string().default("#000000"),
|
|
1410
|
+
subcircuit_id: z83.string().optional()
|
|
1394
1411
|
});
|
|
1395
1412
|
expectTypesMatch(true);
|
|
1396
1413
|
|
|
1397
1414
|
// src/schematic/schematic_port.ts
|
|
1398
|
-
import { z as
|
|
1399
|
-
var schematic_port =
|
|
1400
|
-
type:
|
|
1401
|
-
schematic_port_id:
|
|
1402
|
-
source_port_id:
|
|
1403
|
-
schematic_sheet_id:
|
|
1404
|
-
schematic_component_id:
|
|
1415
|
+
import { z as z84 } from "zod";
|
|
1416
|
+
var schematic_port = z84.object({
|
|
1417
|
+
type: z84.literal("schematic_port"),
|
|
1418
|
+
schematic_port_id: z84.string(),
|
|
1419
|
+
source_port_id: z84.string(),
|
|
1420
|
+
schematic_sheet_id: z84.string().optional(),
|
|
1421
|
+
schematic_component_id: z84.string().optional(),
|
|
1405
1422
|
center: point,
|
|
1406
|
-
facing_direction:
|
|
1407
|
-
distance_from_component_edge:
|
|
1408
|
-
side_of_component:
|
|
1409
|
-
true_ccw_index:
|
|
1410
|
-
pin_number:
|
|
1411
|
-
display_pin_label:
|
|
1412
|
-
display_pin_label_font_size:
|
|
1413
|
-
subcircuit_id:
|
|
1414
|
-
is_connected:
|
|
1415
|
-
is_internal_circuit_port:
|
|
1416
|
-
is_overlapping_internal_circuit_port:
|
|
1417
|
-
has_input_arrow:
|
|
1418
|
-
has_output_arrow:
|
|
1419
|
-
is_drawn_with_inversion_circle:
|
|
1423
|
+
facing_direction: z84.enum(["up", "down", "left", "right"]).optional(),
|
|
1424
|
+
distance_from_component_edge: z84.number().optional(),
|
|
1425
|
+
side_of_component: z84.enum(["top", "bottom", "left", "right"]).optional(),
|
|
1426
|
+
true_ccw_index: z84.number().optional(),
|
|
1427
|
+
pin_number: z84.number().optional(),
|
|
1428
|
+
display_pin_label: z84.string().optional(),
|
|
1429
|
+
display_pin_label_font_size: z84.number().positive().finite().optional(),
|
|
1430
|
+
subcircuit_id: z84.string().optional(),
|
|
1431
|
+
is_connected: z84.boolean().optional(),
|
|
1432
|
+
is_internal_circuit_port: z84.boolean().optional(),
|
|
1433
|
+
is_overlapping_internal_circuit_port: z84.boolean().optional(),
|
|
1434
|
+
has_input_arrow: z84.boolean().optional(),
|
|
1435
|
+
has_output_arrow: z84.boolean().optional(),
|
|
1436
|
+
is_drawn_with_inversion_circle: z84.boolean().optional()
|
|
1420
1437
|
}).describe("Defines a port on a schematic component");
|
|
1421
1438
|
expectTypesMatch(true);
|
|
1422
1439
|
|
|
1423
1440
|
// src/schematic/schematic_net_label.ts
|
|
1424
|
-
import { z as
|
|
1425
|
-
var schematic_net_label =
|
|
1426
|
-
type:
|
|
1441
|
+
import { z as z85 } from "zod";
|
|
1442
|
+
var schematic_net_label = z85.object({
|
|
1443
|
+
type: z85.literal("schematic_net_label"),
|
|
1427
1444
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
1428
|
-
schematic_sheet_id:
|
|
1429
|
-
schematic_trace_id:
|
|
1430
|
-
source_trace_id:
|
|
1431
|
-
source_net_id:
|
|
1445
|
+
schematic_sheet_id: z85.string().optional(),
|
|
1446
|
+
schematic_trace_id: z85.string().optional(),
|
|
1447
|
+
source_trace_id: z85.string().optional(),
|
|
1448
|
+
source_net_id: z85.string(),
|
|
1432
1449
|
center: point,
|
|
1433
1450
|
anchor_position: point.optional(),
|
|
1434
|
-
anchor_side:
|
|
1435
|
-
text:
|
|
1436
|
-
symbol_name:
|
|
1437
|
-
is_movable:
|
|
1438
|
-
subcircuit_id:
|
|
1451
|
+
anchor_side: z85.enum(["top", "bottom", "left", "right"]),
|
|
1452
|
+
text: z85.string(),
|
|
1453
|
+
symbol_name: z85.string().optional(),
|
|
1454
|
+
is_movable: z85.boolean().optional(),
|
|
1455
|
+
subcircuit_id: z85.string().optional()
|
|
1439
1456
|
});
|
|
1440
1457
|
expectTypesMatch(true);
|
|
1441
1458
|
|
|
1442
1459
|
// src/schematic/schematic_error.ts
|
|
1443
|
-
import { z as
|
|
1460
|
+
import { z as z86 } from "zod";
|
|
1444
1461
|
var schematic_error = base_circuit_json_error.extend({
|
|
1445
|
-
type:
|
|
1446
|
-
schematic_error_id:
|
|
1462
|
+
type: z86.literal("schematic_error"),
|
|
1463
|
+
schematic_error_id: z86.string(),
|
|
1447
1464
|
// eventually each error type should be broken out into a dir of files
|
|
1448
|
-
error_type:
|
|
1449
|
-
subcircuit_id:
|
|
1465
|
+
error_type: z86.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
1466
|
+
subcircuit_id: z86.string().optional()
|
|
1450
1467
|
}).describe("Defines a schematic error on the schematic");
|
|
1451
1468
|
expectTypesMatch(true);
|
|
1452
1469
|
|
|
1453
1470
|
// src/schematic/schematic_layout_error.ts
|
|
1454
|
-
import { z as
|
|
1471
|
+
import { z as z87 } from "zod";
|
|
1455
1472
|
var schematic_layout_error = base_circuit_json_error.extend({
|
|
1456
|
-
type:
|
|
1473
|
+
type: z87.literal("schematic_layout_error"),
|
|
1457
1474
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
1458
1475
|
"schematic_layout_error"
|
|
1459
1476
|
),
|
|
1460
|
-
error_type:
|
|
1461
|
-
source_group_id:
|
|
1462
|
-
schematic_group_id:
|
|
1463
|
-
subcircuit_id:
|
|
1477
|
+
error_type: z87.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
1478
|
+
source_group_id: z87.string(),
|
|
1479
|
+
schematic_group_id: z87.string(),
|
|
1480
|
+
subcircuit_id: z87.string().optional()
|
|
1464
1481
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
1465
1482
|
expectTypesMatch(true);
|
|
1466
1483
|
|
|
1467
1484
|
// src/schematic/schematic_debug_object.ts
|
|
1468
|
-
import { z as
|
|
1469
|
-
var schematic_debug_object_base =
|
|
1470
|
-
type:
|
|
1471
|
-
label:
|
|
1472
|
-
subcircuit_id:
|
|
1485
|
+
import { z as z88 } from "zod";
|
|
1486
|
+
var schematic_debug_object_base = z88.object({
|
|
1487
|
+
type: z88.literal("schematic_debug_object"),
|
|
1488
|
+
label: z88.string().optional(),
|
|
1489
|
+
subcircuit_id: z88.string().optional()
|
|
1473
1490
|
});
|
|
1474
1491
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
1475
|
-
shape:
|
|
1492
|
+
shape: z88.literal("rect"),
|
|
1476
1493
|
center: point,
|
|
1477
1494
|
size
|
|
1478
1495
|
});
|
|
1479
1496
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
1480
|
-
shape:
|
|
1497
|
+
shape: z88.literal("line"),
|
|
1481
1498
|
start: point,
|
|
1482
1499
|
end: point
|
|
1483
1500
|
});
|
|
1484
1501
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
1485
|
-
shape:
|
|
1502
|
+
shape: z88.literal("point"),
|
|
1486
1503
|
center: point
|
|
1487
1504
|
});
|
|
1488
|
-
var schematic_debug_object =
|
|
1505
|
+
var schematic_debug_object = z88.discriminatedUnion("shape", [
|
|
1489
1506
|
schematic_debug_rect,
|
|
1490
1507
|
schematic_debug_line,
|
|
1491
1508
|
schematic_debug_point
|
|
@@ -1493,106 +1510,106 @@ var schematic_debug_object = z87.discriminatedUnion("shape", [
|
|
|
1493
1510
|
expectTypesMatch(true);
|
|
1494
1511
|
|
|
1495
1512
|
// src/schematic/schematic_voltage_probe.ts
|
|
1496
|
-
import { z as
|
|
1497
|
-
var schematic_voltage_probe =
|
|
1498
|
-
type:
|
|
1499
|
-
schematic_voltage_probe_id:
|
|
1500
|
-
schematic_sheet_id:
|
|
1501
|
-
source_component_id:
|
|
1502
|
-
name:
|
|
1513
|
+
import { z as z89 } from "zod";
|
|
1514
|
+
var schematic_voltage_probe = z89.object({
|
|
1515
|
+
type: z89.literal("schematic_voltage_probe"),
|
|
1516
|
+
schematic_voltage_probe_id: z89.string(),
|
|
1517
|
+
schematic_sheet_id: z89.string().optional(),
|
|
1518
|
+
source_component_id: z89.string().optional(),
|
|
1519
|
+
name: z89.string().optional(),
|
|
1503
1520
|
position: point,
|
|
1504
|
-
schematic_trace_id:
|
|
1521
|
+
schematic_trace_id: z89.string(),
|
|
1505
1522
|
voltage: voltage.optional(),
|
|
1506
|
-
subcircuit_id:
|
|
1507
|
-
color:
|
|
1523
|
+
subcircuit_id: z89.string().optional(),
|
|
1524
|
+
color: z89.string().optional(),
|
|
1508
1525
|
label_alignment: ninePointAnchor.optional()
|
|
1509
1526
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
1510
1527
|
expectTypesMatch(true);
|
|
1511
1528
|
|
|
1512
1529
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
1513
|
-
import { z as
|
|
1514
|
-
var schematic_manual_edit_conflict_warning =
|
|
1515
|
-
type:
|
|
1530
|
+
import { z as z90 } from "zod";
|
|
1531
|
+
var schematic_manual_edit_conflict_warning = z90.object({
|
|
1532
|
+
type: z90.literal("schematic_manual_edit_conflict_warning"),
|
|
1516
1533
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1517
1534
|
"schematic_manual_edit_conflict_warning"
|
|
1518
1535
|
),
|
|
1519
|
-
warning_type:
|
|
1520
|
-
message:
|
|
1521
|
-
schematic_component_id:
|
|
1522
|
-
schematic_group_id:
|
|
1523
|
-
subcircuit_id:
|
|
1524
|
-
source_component_id:
|
|
1536
|
+
warning_type: z90.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
1537
|
+
message: z90.string(),
|
|
1538
|
+
schematic_component_id: z90.string(),
|
|
1539
|
+
schematic_group_id: z90.string().optional(),
|
|
1540
|
+
subcircuit_id: z90.string().optional(),
|
|
1541
|
+
source_component_id: z90.string()
|
|
1525
1542
|
}).describe(
|
|
1526
1543
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
1527
1544
|
);
|
|
1528
1545
|
expectTypesMatch(true);
|
|
1529
1546
|
|
|
1530
1547
|
// src/schematic/schematic_component_overlap_warning.ts
|
|
1531
|
-
import { z as
|
|
1532
|
-
var schematic_component_overlap_warning =
|
|
1533
|
-
type:
|
|
1548
|
+
import { z as z91 } from "zod";
|
|
1549
|
+
var schematic_component_overlap_warning = z91.object({
|
|
1550
|
+
type: z91.literal("schematic_component_overlap_warning"),
|
|
1534
1551
|
schematic_component_overlap_warning_id: getZodPrefixedIdWithDefault(
|
|
1535
1552
|
"schematic_component_overlap_warning"
|
|
1536
1553
|
),
|
|
1537
|
-
warning_type:
|
|
1538
|
-
message:
|
|
1539
|
-
schematic_component_ids:
|
|
1540
|
-
schematic_sheet_id:
|
|
1554
|
+
warning_type: z91.literal("schematic_component_overlap_warning").default("schematic_component_overlap_warning"),
|
|
1555
|
+
message: z91.string(),
|
|
1556
|
+
schematic_component_ids: z91.tuple([z91.string(), z91.string()]),
|
|
1557
|
+
schematic_sheet_id: z91.string().optional()
|
|
1541
1558
|
}).describe(
|
|
1542
1559
|
"Warning emitted when the rendered bounds of two schematic components overlap"
|
|
1543
1560
|
);
|
|
1544
1561
|
expectTypesMatch(true);
|
|
1545
1562
|
|
|
1546
1563
|
// src/schematic/schematic_component_styling_warning.ts
|
|
1547
|
-
import { z as
|
|
1548
|
-
var schematic_component_styling_warning =
|
|
1549
|
-
type:
|
|
1564
|
+
import { z as z92 } from "zod";
|
|
1565
|
+
var schematic_component_styling_warning = z92.object({
|
|
1566
|
+
type: z92.literal("schematic_component_styling_warning"),
|
|
1550
1567
|
schematic_component_styling_warning_id: getZodPrefixedIdWithDefault(
|
|
1551
1568
|
"schematic_component_styling_warning"
|
|
1552
1569
|
),
|
|
1553
|
-
warning_type:
|
|
1554
|
-
message:
|
|
1555
|
-
schematic_component_id:
|
|
1556
|
-
styling_issue_type:
|
|
1557
|
-
schematic_port_ids:
|
|
1558
|
-
source_component_id:
|
|
1559
|
-
schematic_sheet_id:
|
|
1560
|
-
subcircuit_id:
|
|
1570
|
+
warning_type: z92.literal("schematic_component_styling_warning").default("schematic_component_styling_warning"),
|
|
1571
|
+
message: z92.string(),
|
|
1572
|
+
schematic_component_id: z92.string(),
|
|
1573
|
+
styling_issue_type: z92.string(),
|
|
1574
|
+
schematic_port_ids: z92.array(z92.string()).optional(),
|
|
1575
|
+
source_component_id: z92.string().optional(),
|
|
1576
|
+
schematic_sheet_id: z92.string().optional(),
|
|
1577
|
+
subcircuit_id: z92.string().optional()
|
|
1561
1578
|
}).describe(
|
|
1562
1579
|
"Warning emitted when a schematic component has a visual styling issue"
|
|
1563
1580
|
);
|
|
1564
1581
|
expectTypesMatch(true);
|
|
1565
1582
|
|
|
1566
1583
|
// src/schematic/schematic_element_outside_sheet_warning.ts
|
|
1567
|
-
import { z as
|
|
1568
|
-
var schematic_element_outside_sheet_warning =
|
|
1569
|
-
type:
|
|
1584
|
+
import { z as z93 } from "zod";
|
|
1585
|
+
var schematic_element_outside_sheet_warning = z93.object({
|
|
1586
|
+
type: z93.literal("schematic_element_outside_sheet_warning"),
|
|
1570
1587
|
schematic_element_outside_sheet_warning_id: getZodPrefixedIdWithDefault(
|
|
1571
1588
|
"schematic_element_outside_sheet_warning"
|
|
1572
1589
|
),
|
|
1573
|
-
warning_type:
|
|
1574
|
-
message:
|
|
1575
|
-
schematic_sheet_id:
|
|
1576
|
-
schematic_element_type:
|
|
1590
|
+
warning_type: z93.literal("schematic_element_outside_sheet_warning").default("schematic_element_outside_sheet_warning"),
|
|
1591
|
+
message: z93.string(),
|
|
1592
|
+
schematic_sheet_id: z93.string(),
|
|
1593
|
+
schematic_element_type: z93.enum([
|
|
1577
1594
|
"schematic_component",
|
|
1578
1595
|
"schematic_net_label",
|
|
1579
1596
|
"schematic_trace"
|
|
1580
1597
|
]),
|
|
1581
|
-
schematic_element_id:
|
|
1598
|
+
schematic_element_id: z93.string()
|
|
1582
1599
|
}).describe(
|
|
1583
1600
|
"Warning emitted when a schematic component, net label, or trace extends outside its schematic sheet"
|
|
1584
1601
|
);
|
|
1585
1602
|
expectTypesMatch(true);
|
|
1586
1603
|
|
|
1587
1604
|
// src/schematic/schematic_graphic.ts
|
|
1588
|
-
import { z as
|
|
1589
|
-
var positiveFiniteDistance = distance.pipe(
|
|
1590
|
-
var schematic_graphic =
|
|
1591
|
-
type:
|
|
1605
|
+
import { z as z94 } from "zod";
|
|
1606
|
+
var positiveFiniteDistance = distance.pipe(z94.number().positive().finite());
|
|
1607
|
+
var schematic_graphic = z94.object({
|
|
1608
|
+
type: z94.literal("schematic_graphic"),
|
|
1592
1609
|
schematic_graphic_id: getZodPrefixedIdWithDefault("schematic_graphic"),
|
|
1593
|
-
schematic_sheet_id:
|
|
1610
|
+
schematic_sheet_id: z94.string().optional(),
|
|
1594
1611
|
asset: asset.optional(),
|
|
1595
|
-
svg_content:
|
|
1612
|
+
svg_content: z94.string().optional(),
|
|
1596
1613
|
width: positiveFiniteDistance.optional(),
|
|
1597
1614
|
height: positiveFiniteDistance.optional()
|
|
1598
1615
|
}).describe(
|
|
@@ -1600,7 +1617,7 @@ var schematic_graphic = z93.object({
|
|
|
1600
1617
|
).superRefine(({ asset: asset2, svg_content }, ctx) => {
|
|
1601
1618
|
if (asset2 === void 0 && svg_content === void 0) {
|
|
1602
1619
|
ctx.addIssue({
|
|
1603
|
-
code:
|
|
1620
|
+
code: z94.ZodIssueCode.custom,
|
|
1604
1621
|
message: "At least one of asset or svg_content is required"
|
|
1605
1622
|
});
|
|
1606
1623
|
}
|
|
@@ -1608,103 +1625,103 @@ var schematic_graphic = z93.object({
|
|
|
1608
1625
|
expectTypesMatch(true);
|
|
1609
1626
|
|
|
1610
1627
|
// src/schematic/schematic_group.ts
|
|
1611
|
-
import { z as
|
|
1612
|
-
var schematic_group =
|
|
1613
|
-
type:
|
|
1628
|
+
import { z as z95 } from "zod";
|
|
1629
|
+
var schematic_group = z95.object({
|
|
1630
|
+
type: z95.literal("schematic_group"),
|
|
1614
1631
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1615
|
-
schematic_sheet_id:
|
|
1616
|
-
source_group_id:
|
|
1617
|
-
is_subcircuit:
|
|
1618
|
-
subcircuit_id:
|
|
1632
|
+
schematic_sheet_id: z95.string().optional(),
|
|
1633
|
+
source_group_id: z95.string(),
|
|
1634
|
+
is_subcircuit: z95.boolean().optional(),
|
|
1635
|
+
subcircuit_id: z95.string().optional(),
|
|
1619
1636
|
width: length,
|
|
1620
1637
|
height: length,
|
|
1621
1638
|
center: point,
|
|
1622
|
-
schematic_component_ids:
|
|
1623
|
-
show_as_schematic_box:
|
|
1624
|
-
name:
|
|
1625
|
-
description:
|
|
1639
|
+
schematic_component_ids: z95.array(z95.string()),
|
|
1640
|
+
show_as_schematic_box: z95.boolean().optional(),
|
|
1641
|
+
name: z95.string().optional(),
|
|
1642
|
+
description: z95.string().optional()
|
|
1626
1643
|
}).describe("Defines a group of components on the schematic");
|
|
1627
1644
|
expectTypesMatch(true);
|
|
1628
1645
|
|
|
1629
1646
|
// src/schematic/schematic_table.ts
|
|
1630
|
-
import { z as
|
|
1631
|
-
var schematic_table =
|
|
1632
|
-
type:
|
|
1647
|
+
import { z as z96 } from "zod";
|
|
1648
|
+
var schematic_table = z96.object({
|
|
1649
|
+
type: z96.literal("schematic_table"),
|
|
1633
1650
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1634
|
-
schematic_sheet_id:
|
|
1651
|
+
schematic_sheet_id: z96.string().optional(),
|
|
1635
1652
|
anchor_position: point,
|
|
1636
|
-
column_widths:
|
|
1637
|
-
row_heights:
|
|
1653
|
+
column_widths: z96.array(distance),
|
|
1654
|
+
row_heights: z96.array(distance),
|
|
1638
1655
|
cell_padding: distance.optional(),
|
|
1639
1656
|
border_width: distance.optional(),
|
|
1640
|
-
subcircuit_id:
|
|
1641
|
-
schematic_component_id:
|
|
1657
|
+
subcircuit_id: z96.string().optional(),
|
|
1658
|
+
schematic_component_id: z96.string().optional(),
|
|
1642
1659
|
anchor: ninePointAnchor.optional()
|
|
1643
1660
|
}).describe("Defines a table on the schematic");
|
|
1644
1661
|
expectTypesMatch(true);
|
|
1645
1662
|
|
|
1646
1663
|
// src/schematic/schematic_table_cell.ts
|
|
1647
|
-
import { z as
|
|
1648
|
-
var schematic_table_cell =
|
|
1649
|
-
type:
|
|
1664
|
+
import { z as z97 } from "zod";
|
|
1665
|
+
var schematic_table_cell = z97.object({
|
|
1666
|
+
type: z97.literal("schematic_table_cell"),
|
|
1650
1667
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1651
1668
|
"schematic_table_cell"
|
|
1652
1669
|
),
|
|
1653
|
-
schematic_sheet_id:
|
|
1654
|
-
schematic_table_id:
|
|
1655
|
-
start_row_index:
|
|
1656
|
-
end_row_index:
|
|
1657
|
-
start_column_index:
|
|
1658
|
-
end_column_index:
|
|
1659
|
-
text:
|
|
1670
|
+
schematic_sheet_id: z97.string().optional(),
|
|
1671
|
+
schematic_table_id: z97.string(),
|
|
1672
|
+
start_row_index: z97.number(),
|
|
1673
|
+
end_row_index: z97.number(),
|
|
1674
|
+
start_column_index: z97.number(),
|
|
1675
|
+
end_column_index: z97.number(),
|
|
1676
|
+
text: z97.string().optional(),
|
|
1660
1677
|
center: point,
|
|
1661
1678
|
width: distance,
|
|
1662
1679
|
height: distance,
|
|
1663
|
-
horizontal_align:
|
|
1664
|
-
vertical_align:
|
|
1680
|
+
horizontal_align: z97.enum(["left", "center", "right"]).optional(),
|
|
1681
|
+
vertical_align: z97.enum(["top", "middle", "bottom"]).optional(),
|
|
1665
1682
|
font_size: distance.optional(),
|
|
1666
|
-
subcircuit_id:
|
|
1683
|
+
subcircuit_id: z97.string().optional()
|
|
1667
1684
|
}).describe("Defines a cell within a schematic_table");
|
|
1668
1685
|
expectTypesMatch(true);
|
|
1669
1686
|
|
|
1670
1687
|
// src/schematic/schematic_sheet.ts
|
|
1671
|
-
import { z as
|
|
1672
|
-
var schematic_sheet_size =
|
|
1673
|
-
var schematic_sheet =
|
|
1674
|
-
type:
|
|
1688
|
+
import { z as z98 } from "zod";
|
|
1689
|
+
var schematic_sheet_size = z98.enum(["a4", "ansi_b"]);
|
|
1690
|
+
var schematic_sheet = z98.object({
|
|
1691
|
+
type: z98.literal("schematic_sheet"),
|
|
1675
1692
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1676
|
-
name:
|
|
1677
|
-
sheet_index:
|
|
1693
|
+
name: z98.string().optional(),
|
|
1694
|
+
sheet_index: z98.number().optional(),
|
|
1678
1695
|
sheet_size: schematic_sheet_size.optional(),
|
|
1679
|
-
sheet_width:
|
|
1680
|
-
sheet_height:
|
|
1681
|
-
subcircuit_id:
|
|
1682
|
-
outline_color:
|
|
1696
|
+
sheet_width: z98.number().positive().optional(),
|
|
1697
|
+
sheet_height: z98.number().positive().optional(),
|
|
1698
|
+
subcircuit_id: z98.string().optional(),
|
|
1699
|
+
outline_color: z98.string().optional()
|
|
1683
1700
|
}).describe(
|
|
1684
1701
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1685
1702
|
);
|
|
1686
1703
|
expectTypesMatch(true);
|
|
1687
1704
|
|
|
1688
1705
|
// src/pcb/properties/brep.ts
|
|
1689
|
-
import { z as
|
|
1690
|
-
var point_with_bulge =
|
|
1706
|
+
import { z as z99 } from "zod";
|
|
1707
|
+
var point_with_bulge = z99.object({
|
|
1691
1708
|
x: distance,
|
|
1692
1709
|
y: distance,
|
|
1693
|
-
bulge:
|
|
1710
|
+
bulge: z99.number().optional()
|
|
1694
1711
|
});
|
|
1695
1712
|
expectTypesMatch(true);
|
|
1696
|
-
var ring =
|
|
1697
|
-
vertices:
|
|
1713
|
+
var ring = z99.object({
|
|
1714
|
+
vertices: z99.array(point_with_bulge)
|
|
1698
1715
|
});
|
|
1699
1716
|
expectTypesMatch(true);
|
|
1700
|
-
var brep_shape =
|
|
1717
|
+
var brep_shape = z99.object({
|
|
1701
1718
|
outer_ring: ring,
|
|
1702
|
-
inner_rings:
|
|
1719
|
+
inner_rings: z99.array(ring).default([])
|
|
1703
1720
|
});
|
|
1704
1721
|
expectTypesMatch(true);
|
|
1705
1722
|
|
|
1706
1723
|
// src/pcb/properties/insertion_direction.ts
|
|
1707
|
-
import { z as
|
|
1724
|
+
import { z as z100 } from "zod";
|
|
1708
1725
|
var insertionDirectionToCanonical = {
|
|
1709
1726
|
from_left: "from_left",
|
|
1710
1727
|
from_right: "from_right",
|
|
@@ -1731,7 +1748,7 @@ var insertionDirectionToVector = {
|
|
|
1731
1748
|
from_above: { x: 0, y: 0, z: 1 },
|
|
1732
1749
|
from_below: { x: 0, y: 0, z: -1 }
|
|
1733
1750
|
};
|
|
1734
|
-
var insertion_direction =
|
|
1751
|
+
var insertion_direction = z100.enum([
|
|
1735
1752
|
"from_left",
|
|
1736
1753
|
"from_right",
|
|
1737
1754
|
"from_top",
|
|
@@ -1756,8 +1773,8 @@ expectTypesMatch(
|
|
|
1756
1773
|
);
|
|
1757
1774
|
|
|
1758
1775
|
// src/pcb/properties/pcb_pin1_location.ts
|
|
1759
|
-
import { z as
|
|
1760
|
-
var pcb_pin1_location =
|
|
1776
|
+
import { z as z101 } from "zod";
|
|
1777
|
+
var pcb_pin1_location = z101.enum([
|
|
1761
1778
|
"leftside_top",
|
|
1762
1779
|
"leftside_bottom",
|
|
1763
1780
|
"rightside_top",
|
|
@@ -1794,31 +1811,31 @@ var getRotationBetweenPcbPin1Locations = (from, to) => {
|
|
|
1794
1811
|
};
|
|
1795
1812
|
|
|
1796
1813
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1797
|
-
import { z as
|
|
1798
|
-
var pcb_route_hint =
|
|
1814
|
+
import { z as z102 } from "zod";
|
|
1815
|
+
var pcb_route_hint = z102.object({
|
|
1799
1816
|
x: distance,
|
|
1800
1817
|
y: distance,
|
|
1801
|
-
via:
|
|
1818
|
+
via: z102.boolean().optional(),
|
|
1802
1819
|
via_to_layer: layer_ref.optional()
|
|
1803
1820
|
});
|
|
1804
|
-
var pcb_route_hints =
|
|
1821
|
+
var pcb_route_hints = z102.array(pcb_route_hint);
|
|
1805
1822
|
expectTypesMatch(true);
|
|
1806
1823
|
expectTypesMatch(true);
|
|
1807
1824
|
|
|
1808
1825
|
// src/pcb/properties/route_hint_point.ts
|
|
1809
|
-
import { z as
|
|
1810
|
-
var route_hint_point =
|
|
1826
|
+
import { z as z103 } from "zod";
|
|
1827
|
+
var route_hint_point = z103.object({
|
|
1811
1828
|
x: distance,
|
|
1812
1829
|
y: distance,
|
|
1813
|
-
via:
|
|
1830
|
+
via: z103.boolean().optional(),
|
|
1814
1831
|
to_layer: layer_ref.optional(),
|
|
1815
1832
|
trace_width: distance.optional()
|
|
1816
1833
|
});
|
|
1817
1834
|
expectTypesMatch(true);
|
|
1818
1835
|
|
|
1819
1836
|
// src/pcb/properties/manufacturing_drc_properties.ts
|
|
1820
|
-
import { z as
|
|
1821
|
-
var manufacturing_drc_properties =
|
|
1837
|
+
import { z as z104 } from "zod";
|
|
1838
|
+
var manufacturing_drc_properties = z104.object({
|
|
1822
1839
|
min_trace_width: length.optional(),
|
|
1823
1840
|
min_board_edge_clearance: length.optional(),
|
|
1824
1841
|
min_via_hole_edge_to_via_hole_edge_clearance: length.optional(),
|
|
@@ -1833,27 +1850,27 @@ var manufacturing_drc_properties = z103.object({
|
|
|
1833
1850
|
});
|
|
1834
1851
|
|
|
1835
1852
|
// src/pcb/pcb_component.ts
|
|
1836
|
-
import { z as
|
|
1837
|
-
var pcb_component =
|
|
1838
|
-
type:
|
|
1853
|
+
import { z as z105 } from "zod";
|
|
1854
|
+
var pcb_component = z105.object({
|
|
1855
|
+
type: z105.literal("pcb_component"),
|
|
1839
1856
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1840
|
-
source_component_id:
|
|
1857
|
+
source_component_id: z105.string(),
|
|
1841
1858
|
center: point,
|
|
1842
1859
|
layer: layer_ref,
|
|
1843
1860
|
rotation,
|
|
1844
|
-
display_offset_x:
|
|
1861
|
+
display_offset_x: z105.string().optional().describe(
|
|
1845
1862
|
"How to display the x offset for this part, usually corresponding with how the user specified it"
|
|
1846
1863
|
),
|
|
1847
|
-
display_offset_y:
|
|
1864
|
+
display_offset_y: z105.string().optional().describe(
|
|
1848
1865
|
"How to display the y offset for this part, usually corresponding with how the user specified it"
|
|
1849
1866
|
),
|
|
1850
1867
|
width: length,
|
|
1851
1868
|
height: length,
|
|
1852
|
-
do_not_place:
|
|
1853
|
-
is_allowed_to_be_off_board:
|
|
1854
|
-
subcircuit_id:
|
|
1855
|
-
pcb_group_id:
|
|
1856
|
-
position_mode:
|
|
1869
|
+
do_not_place: z105.boolean().optional(),
|
|
1870
|
+
is_allowed_to_be_off_board: z105.boolean().optional(),
|
|
1871
|
+
subcircuit_id: z105.string().optional(),
|
|
1872
|
+
pcb_group_id: z105.string().optional(),
|
|
1873
|
+
position_mode: z105.enum([
|
|
1857
1874
|
"packed",
|
|
1858
1875
|
"relative_to_group_anchor",
|
|
1859
1876
|
"relative_to_another_component",
|
|
@@ -1861,48 +1878,48 @@ var pcb_component = z104.object({
|
|
|
1861
1878
|
]).optional(),
|
|
1862
1879
|
anchor_position: point.optional(),
|
|
1863
1880
|
anchor_alignment: ninePointAnchor.optional(),
|
|
1864
|
-
positioned_relative_to_pcb_group_id:
|
|
1865
|
-
positioned_relative_to_pcb_board_id:
|
|
1881
|
+
positioned_relative_to_pcb_group_id: z105.string().optional(),
|
|
1882
|
+
positioned_relative_to_pcb_board_id: z105.string().optional(),
|
|
1866
1883
|
cable_insertion_center: point.optional(),
|
|
1867
1884
|
insertion_direction: insertion_direction.optional(),
|
|
1868
1885
|
pin1_location: pcb_pin1_location.optional().describe(
|
|
1869
1886
|
"Location of pin 1 on the unrotated, top-view component footprint"
|
|
1870
1887
|
),
|
|
1871
|
-
supplier_pin1_location_map:
|
|
1888
|
+
supplier_pin1_location_map: z105.record(supplier_name, pcb_pin1_location).optional().describe(
|
|
1872
1889
|
"Pin 1 location for each supplier's unrotated, top-view footprint"
|
|
1873
1890
|
),
|
|
1874
|
-
metadata:
|
|
1891
|
+
metadata: z105.object({
|
|
1875
1892
|
kicad_footprint: kicadFootprintMetadata.optional()
|
|
1876
1893
|
}).optional(),
|
|
1877
|
-
obstructs_within_bounds:
|
|
1894
|
+
obstructs_within_bounds: z105.boolean().default(true).describe(
|
|
1878
1895
|
"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"
|
|
1879
1896
|
)
|
|
1880
1897
|
}).describe("Defines a component on the PCB");
|
|
1881
1898
|
expectTypesMatch(true);
|
|
1882
1899
|
|
|
1883
1900
|
// src/pcb/pcb_debug_object.ts
|
|
1884
|
-
import { z as
|
|
1885
|
-
var pcb_debug_object_base =
|
|
1886
|
-
type:
|
|
1901
|
+
import { z as z106 } from "zod";
|
|
1902
|
+
var pcb_debug_object_base = z106.object({
|
|
1903
|
+
type: z106.literal("pcb_debug_object"),
|
|
1887
1904
|
pcb_debug_object_id: getZodPrefixedIdWithDefault("pcb_debug_object"),
|
|
1888
|
-
label:
|
|
1889
|
-
subcircuit_id:
|
|
1905
|
+
label: z106.string().optional(),
|
|
1906
|
+
subcircuit_id: z106.string().optional()
|
|
1890
1907
|
});
|
|
1891
1908
|
var pcb_debug_rect = pcb_debug_object_base.extend({
|
|
1892
|
-
shape:
|
|
1909
|
+
shape: z106.literal("rect"),
|
|
1893
1910
|
center: point,
|
|
1894
1911
|
size
|
|
1895
1912
|
});
|
|
1896
1913
|
var pcb_debug_line = pcb_debug_object_base.extend({
|
|
1897
|
-
shape:
|
|
1914
|
+
shape: z106.literal("line"),
|
|
1898
1915
|
start: point,
|
|
1899
1916
|
end: point
|
|
1900
1917
|
});
|
|
1901
1918
|
var pcb_debug_point = pcb_debug_object_base.extend({
|
|
1902
|
-
shape:
|
|
1919
|
+
shape: z106.literal("point"),
|
|
1903
1920
|
center: point
|
|
1904
1921
|
});
|
|
1905
|
-
var pcb_debug_object =
|
|
1922
|
+
var pcb_debug_object = z106.discriminatedUnion("shape", [
|
|
1906
1923
|
pcb_debug_rect,
|
|
1907
1924
|
pcb_debug_line,
|
|
1908
1925
|
pcb_debug_point
|
|
@@ -1910,109 +1927,109 @@ var pcb_debug_object = z105.discriminatedUnion("shape", [
|
|
|
1910
1927
|
expectTypesMatch(true);
|
|
1911
1928
|
|
|
1912
1929
|
// src/pcb/pcb_hole.ts
|
|
1913
|
-
import { z as
|
|
1914
|
-
var pcb_hole_circle =
|
|
1915
|
-
type:
|
|
1930
|
+
import { z as z107 } from "zod";
|
|
1931
|
+
var pcb_hole_circle = z107.object({
|
|
1932
|
+
type: z107.literal("pcb_hole"),
|
|
1916
1933
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1917
|
-
pcb_group_id:
|
|
1918
|
-
subcircuit_id:
|
|
1919
|
-
pcb_component_id:
|
|
1920
|
-
hole_shape:
|
|
1921
|
-
hole_diameter:
|
|
1934
|
+
pcb_group_id: z107.string().optional(),
|
|
1935
|
+
subcircuit_id: z107.string().optional(),
|
|
1936
|
+
pcb_component_id: z107.string().optional(),
|
|
1937
|
+
hole_shape: z107.literal("circle"),
|
|
1938
|
+
hole_diameter: z107.number(),
|
|
1922
1939
|
x: distance,
|
|
1923
1940
|
y: distance,
|
|
1924
|
-
is_covered_with_solder_mask:
|
|
1925
|
-
soldermask_margin:
|
|
1941
|
+
is_covered_with_solder_mask: z107.boolean().optional(),
|
|
1942
|
+
soldermask_margin: z107.number().optional()
|
|
1926
1943
|
});
|
|
1927
1944
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1928
1945
|
"Defines a circular hole on the PCB"
|
|
1929
1946
|
);
|
|
1930
1947
|
expectTypesMatch(true);
|
|
1931
|
-
var pcb_hole_rect =
|
|
1932
|
-
type:
|
|
1948
|
+
var pcb_hole_rect = z107.object({
|
|
1949
|
+
type: z107.literal("pcb_hole"),
|
|
1933
1950
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1934
|
-
pcb_group_id:
|
|
1935
|
-
subcircuit_id:
|
|
1936
|
-
pcb_component_id:
|
|
1937
|
-
hole_shape:
|
|
1938
|
-
hole_width:
|
|
1939
|
-
hole_height:
|
|
1951
|
+
pcb_group_id: z107.string().optional(),
|
|
1952
|
+
subcircuit_id: z107.string().optional(),
|
|
1953
|
+
pcb_component_id: z107.string().optional(),
|
|
1954
|
+
hole_shape: z107.literal("rect"),
|
|
1955
|
+
hole_width: z107.number(),
|
|
1956
|
+
hole_height: z107.number(),
|
|
1940
1957
|
x: distance,
|
|
1941
1958
|
y: distance,
|
|
1942
|
-
is_covered_with_solder_mask:
|
|
1943
|
-
soldermask_margin:
|
|
1959
|
+
is_covered_with_solder_mask: z107.boolean().optional(),
|
|
1960
|
+
soldermask_margin: z107.number().optional()
|
|
1944
1961
|
});
|
|
1945
1962
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1946
1963
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1947
1964
|
);
|
|
1948
1965
|
expectTypesMatch(true);
|
|
1949
|
-
var pcb_hole_circle_or_square =
|
|
1950
|
-
type:
|
|
1966
|
+
var pcb_hole_circle_or_square = z107.object({
|
|
1967
|
+
type: z107.literal("pcb_hole"),
|
|
1951
1968
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1952
|
-
pcb_group_id:
|
|
1953
|
-
subcircuit_id:
|
|
1954
|
-
pcb_component_id:
|
|
1955
|
-
hole_shape:
|
|
1956
|
-
hole_diameter:
|
|
1969
|
+
pcb_group_id: z107.string().optional(),
|
|
1970
|
+
subcircuit_id: z107.string().optional(),
|
|
1971
|
+
pcb_component_id: z107.string().optional(),
|
|
1972
|
+
hole_shape: z107.enum(["circle", "square"]),
|
|
1973
|
+
hole_diameter: z107.number(),
|
|
1957
1974
|
x: distance,
|
|
1958
1975
|
y: distance,
|
|
1959
|
-
is_covered_with_solder_mask:
|
|
1960
|
-
soldermask_margin:
|
|
1976
|
+
is_covered_with_solder_mask: z107.boolean().optional(),
|
|
1977
|
+
soldermask_margin: z107.number().optional()
|
|
1961
1978
|
});
|
|
1962
1979
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1963
1980
|
"Defines a circular or square hole on the PCB"
|
|
1964
1981
|
);
|
|
1965
1982
|
expectTypesMatch(true);
|
|
1966
|
-
var pcb_hole_oval =
|
|
1967
|
-
type:
|
|
1983
|
+
var pcb_hole_oval = z107.object({
|
|
1984
|
+
type: z107.literal("pcb_hole"),
|
|
1968
1985
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1969
|
-
pcb_group_id:
|
|
1970
|
-
subcircuit_id:
|
|
1971
|
-
pcb_component_id:
|
|
1972
|
-
hole_shape:
|
|
1973
|
-
hole_width:
|
|
1974
|
-
hole_height:
|
|
1986
|
+
pcb_group_id: z107.string().optional(),
|
|
1987
|
+
subcircuit_id: z107.string().optional(),
|
|
1988
|
+
pcb_component_id: z107.string().optional(),
|
|
1989
|
+
hole_shape: z107.literal("oval"),
|
|
1990
|
+
hole_width: z107.number(),
|
|
1991
|
+
hole_height: z107.number(),
|
|
1975
1992
|
x: distance,
|
|
1976
1993
|
y: distance,
|
|
1977
|
-
is_covered_with_solder_mask:
|
|
1978
|
-
soldermask_margin:
|
|
1994
|
+
is_covered_with_solder_mask: z107.boolean().optional(),
|
|
1995
|
+
soldermask_margin: z107.number().optional()
|
|
1979
1996
|
});
|
|
1980
1997
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1981
1998
|
"Defines an oval hole on the PCB"
|
|
1982
1999
|
);
|
|
1983
2000
|
expectTypesMatch(true);
|
|
1984
|
-
var pcb_hole_pill =
|
|
1985
|
-
type:
|
|
2001
|
+
var pcb_hole_pill = z107.object({
|
|
2002
|
+
type: z107.literal("pcb_hole"),
|
|
1986
2003
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1987
|
-
pcb_group_id:
|
|
1988
|
-
subcircuit_id:
|
|
1989
|
-
pcb_component_id:
|
|
1990
|
-
hole_shape:
|
|
1991
|
-
hole_width:
|
|
1992
|
-
hole_height:
|
|
2004
|
+
pcb_group_id: z107.string().optional(),
|
|
2005
|
+
subcircuit_id: z107.string().optional(),
|
|
2006
|
+
pcb_component_id: z107.string().optional(),
|
|
2007
|
+
hole_shape: z107.literal("pill"),
|
|
2008
|
+
hole_width: z107.number(),
|
|
2009
|
+
hole_height: z107.number(),
|
|
1993
2010
|
x: distance,
|
|
1994
2011
|
y: distance,
|
|
1995
|
-
is_covered_with_solder_mask:
|
|
1996
|
-
soldermask_margin:
|
|
2012
|
+
is_covered_with_solder_mask: z107.boolean().optional(),
|
|
2013
|
+
soldermask_margin: z107.number().optional()
|
|
1997
2014
|
});
|
|
1998
2015
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
1999
2016
|
"Defines a pill-shaped hole on the PCB"
|
|
2000
2017
|
);
|
|
2001
2018
|
expectTypesMatch(true);
|
|
2002
|
-
var pcb_hole_rotated_pill =
|
|
2003
|
-
type:
|
|
2019
|
+
var pcb_hole_rotated_pill = z107.object({
|
|
2020
|
+
type: z107.literal("pcb_hole"),
|
|
2004
2021
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2005
|
-
pcb_group_id:
|
|
2006
|
-
subcircuit_id:
|
|
2007
|
-
pcb_component_id:
|
|
2008
|
-
hole_shape:
|
|
2009
|
-
hole_width:
|
|
2010
|
-
hole_height:
|
|
2022
|
+
pcb_group_id: z107.string().optional(),
|
|
2023
|
+
subcircuit_id: z107.string().optional(),
|
|
2024
|
+
pcb_component_id: z107.string().optional(),
|
|
2025
|
+
hole_shape: z107.literal("rotated_pill"),
|
|
2026
|
+
hole_width: z107.number(),
|
|
2027
|
+
hole_height: z107.number(),
|
|
2011
2028
|
x: distance,
|
|
2012
2029
|
y: distance,
|
|
2013
2030
|
ccw_rotation: rotation,
|
|
2014
|
-
is_covered_with_solder_mask:
|
|
2015
|
-
soldermask_margin:
|
|
2031
|
+
is_covered_with_solder_mask: z107.boolean().optional(),
|
|
2032
|
+
soldermask_margin: z107.number().optional()
|
|
2016
2033
|
});
|
|
2017
2034
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
2018
2035
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -2021,147 +2038,147 @@ expectTypesMatch(true);
|
|
|
2021
2038
|
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);
|
|
2022
2039
|
|
|
2023
2040
|
// src/pcb/pcb_plated_hole.ts
|
|
2024
|
-
import { z as
|
|
2025
|
-
var pcb_plated_hole_circle =
|
|
2026
|
-
type:
|
|
2027
|
-
shape:
|
|
2028
|
-
pcb_group_id:
|
|
2029
|
-
subcircuit_id:
|
|
2030
|
-
outer_diameter:
|
|
2031
|
-
hole_diameter:
|
|
2032
|
-
is_covered_with_solder_mask:
|
|
2041
|
+
import { z as z108 } from "zod";
|
|
2042
|
+
var pcb_plated_hole_circle = z108.object({
|
|
2043
|
+
type: z108.literal("pcb_plated_hole"),
|
|
2044
|
+
shape: z108.literal("circle"),
|
|
2045
|
+
pcb_group_id: z108.string().optional(),
|
|
2046
|
+
subcircuit_id: z108.string().optional(),
|
|
2047
|
+
outer_diameter: z108.number(),
|
|
2048
|
+
hole_diameter: z108.number(),
|
|
2049
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2033
2050
|
x: distance,
|
|
2034
2051
|
y: distance,
|
|
2035
|
-
layers:
|
|
2036
|
-
port_hints:
|
|
2037
|
-
pcb_component_id:
|
|
2038
|
-
pcb_port_id:
|
|
2052
|
+
layers: z108.array(layer_ref),
|
|
2053
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2054
|
+
pcb_component_id: z108.string().optional(),
|
|
2055
|
+
pcb_port_id: z108.string().optional(),
|
|
2039
2056
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2040
|
-
soldermask_margin:
|
|
2057
|
+
soldermask_margin: z108.number().optional()
|
|
2041
2058
|
});
|
|
2042
|
-
var pcb_plated_hole_oval =
|
|
2043
|
-
type:
|
|
2044
|
-
shape:
|
|
2045
|
-
pcb_group_id:
|
|
2046
|
-
subcircuit_id:
|
|
2047
|
-
outer_width:
|
|
2048
|
-
outer_height:
|
|
2049
|
-
hole_width:
|
|
2050
|
-
hole_height:
|
|
2051
|
-
is_covered_with_solder_mask:
|
|
2059
|
+
var pcb_plated_hole_oval = z108.object({
|
|
2060
|
+
type: z108.literal("pcb_plated_hole"),
|
|
2061
|
+
shape: z108.enum(["oval", "pill"]),
|
|
2062
|
+
pcb_group_id: z108.string().optional(),
|
|
2063
|
+
subcircuit_id: z108.string().optional(),
|
|
2064
|
+
outer_width: z108.number(),
|
|
2065
|
+
outer_height: z108.number(),
|
|
2066
|
+
hole_width: z108.number(),
|
|
2067
|
+
hole_height: z108.number(),
|
|
2068
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2052
2069
|
x: distance,
|
|
2053
2070
|
y: distance,
|
|
2054
2071
|
ccw_rotation: rotation,
|
|
2055
|
-
layers:
|
|
2056
|
-
port_hints:
|
|
2057
|
-
pcb_component_id:
|
|
2058
|
-
pcb_port_id:
|
|
2072
|
+
layers: z108.array(layer_ref),
|
|
2073
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2074
|
+
pcb_component_id: z108.string().optional(),
|
|
2075
|
+
pcb_port_id: z108.string().optional(),
|
|
2059
2076
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2060
|
-
soldermask_margin:
|
|
2077
|
+
soldermask_margin: z108.number().optional()
|
|
2061
2078
|
});
|
|
2062
|
-
var pcb_circular_hole_with_rect_pad =
|
|
2063
|
-
type:
|
|
2064
|
-
shape:
|
|
2065
|
-
pcb_group_id:
|
|
2066
|
-
subcircuit_id:
|
|
2067
|
-
hole_shape:
|
|
2068
|
-
pad_shape:
|
|
2069
|
-
hole_diameter:
|
|
2070
|
-
rect_pad_width:
|
|
2071
|
-
rect_pad_height:
|
|
2072
|
-
rect_border_radius:
|
|
2079
|
+
var pcb_circular_hole_with_rect_pad = z108.object({
|
|
2080
|
+
type: z108.literal("pcb_plated_hole"),
|
|
2081
|
+
shape: z108.literal("circular_hole_with_rect_pad"),
|
|
2082
|
+
pcb_group_id: z108.string().optional(),
|
|
2083
|
+
subcircuit_id: z108.string().optional(),
|
|
2084
|
+
hole_shape: z108.literal("circle"),
|
|
2085
|
+
pad_shape: z108.literal("rect"),
|
|
2086
|
+
hole_diameter: z108.number(),
|
|
2087
|
+
rect_pad_width: z108.number(),
|
|
2088
|
+
rect_pad_height: z108.number(),
|
|
2089
|
+
rect_border_radius: z108.number().optional(),
|
|
2073
2090
|
hole_offset_x: distance.default(0),
|
|
2074
2091
|
hole_offset_y: distance.default(0),
|
|
2075
|
-
is_covered_with_solder_mask:
|
|
2092
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2076
2093
|
x: distance,
|
|
2077
2094
|
y: distance,
|
|
2078
|
-
layers:
|
|
2079
|
-
port_hints:
|
|
2080
|
-
pcb_component_id:
|
|
2081
|
-
pcb_port_id:
|
|
2095
|
+
layers: z108.array(layer_ref),
|
|
2096
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2097
|
+
pcb_component_id: z108.string().optional(),
|
|
2098
|
+
pcb_port_id: z108.string().optional(),
|
|
2082
2099
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2083
|
-
soldermask_margin:
|
|
2100
|
+
soldermask_margin: z108.number().optional(),
|
|
2084
2101
|
rect_ccw_rotation: rotation.optional()
|
|
2085
2102
|
});
|
|
2086
|
-
var pcb_pill_hole_with_rect_pad =
|
|
2087
|
-
type:
|
|
2088
|
-
shape:
|
|
2089
|
-
pcb_group_id:
|
|
2090
|
-
subcircuit_id:
|
|
2091
|
-
hole_shape:
|
|
2092
|
-
pad_shape:
|
|
2093
|
-
hole_width:
|
|
2094
|
-
hole_height:
|
|
2095
|
-
rect_pad_width:
|
|
2096
|
-
rect_pad_height:
|
|
2097
|
-
rect_border_radius:
|
|
2103
|
+
var pcb_pill_hole_with_rect_pad = z108.object({
|
|
2104
|
+
type: z108.literal("pcb_plated_hole"),
|
|
2105
|
+
shape: z108.literal("pill_hole_with_rect_pad"),
|
|
2106
|
+
pcb_group_id: z108.string().optional(),
|
|
2107
|
+
subcircuit_id: z108.string().optional(),
|
|
2108
|
+
hole_shape: z108.literal("pill"),
|
|
2109
|
+
pad_shape: z108.literal("rect"),
|
|
2110
|
+
hole_width: z108.number(),
|
|
2111
|
+
hole_height: z108.number(),
|
|
2112
|
+
rect_pad_width: z108.number(),
|
|
2113
|
+
rect_pad_height: z108.number(),
|
|
2114
|
+
rect_border_radius: z108.number().optional(),
|
|
2098
2115
|
hole_offset_x: distance.default(0),
|
|
2099
2116
|
hole_offset_y: distance.default(0),
|
|
2100
|
-
is_covered_with_solder_mask:
|
|
2117
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2101
2118
|
x: distance,
|
|
2102
2119
|
y: distance,
|
|
2103
|
-
layers:
|
|
2104
|
-
port_hints:
|
|
2105
|
-
pcb_component_id:
|
|
2106
|
-
pcb_port_id:
|
|
2120
|
+
layers: z108.array(layer_ref),
|
|
2121
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2122
|
+
pcb_component_id: z108.string().optional(),
|
|
2123
|
+
pcb_port_id: z108.string().optional(),
|
|
2107
2124
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2108
|
-
soldermask_margin:
|
|
2125
|
+
soldermask_margin: z108.number().optional()
|
|
2109
2126
|
});
|
|
2110
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
2111
|
-
type:
|
|
2112
|
-
shape:
|
|
2113
|
-
pcb_group_id:
|
|
2114
|
-
subcircuit_id:
|
|
2115
|
-
hole_shape:
|
|
2116
|
-
pad_shape:
|
|
2117
|
-
hole_width:
|
|
2118
|
-
hole_height:
|
|
2127
|
+
var pcb_rotated_pill_hole_with_rect_pad = z108.object({
|
|
2128
|
+
type: z108.literal("pcb_plated_hole"),
|
|
2129
|
+
shape: z108.literal("rotated_pill_hole_with_rect_pad"),
|
|
2130
|
+
pcb_group_id: z108.string().optional(),
|
|
2131
|
+
subcircuit_id: z108.string().optional(),
|
|
2132
|
+
hole_shape: z108.literal("rotated_pill"),
|
|
2133
|
+
pad_shape: z108.literal("rect"),
|
|
2134
|
+
hole_width: z108.number(),
|
|
2135
|
+
hole_height: z108.number(),
|
|
2119
2136
|
hole_ccw_rotation: rotation,
|
|
2120
|
-
rect_pad_width:
|
|
2121
|
-
rect_pad_height:
|
|
2122
|
-
rect_border_radius:
|
|
2137
|
+
rect_pad_width: z108.number(),
|
|
2138
|
+
rect_pad_height: z108.number(),
|
|
2139
|
+
rect_border_radius: z108.number().optional(),
|
|
2123
2140
|
rect_ccw_rotation: rotation,
|
|
2124
2141
|
hole_offset_x: distance.default(0),
|
|
2125
2142
|
hole_offset_y: distance.default(0),
|
|
2126
|
-
is_covered_with_solder_mask:
|
|
2143
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2127
2144
|
x: distance,
|
|
2128
2145
|
y: distance,
|
|
2129
|
-
layers:
|
|
2130
|
-
port_hints:
|
|
2131
|
-
pcb_component_id:
|
|
2132
|
-
pcb_port_id:
|
|
2146
|
+
layers: z108.array(layer_ref),
|
|
2147
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2148
|
+
pcb_component_id: z108.string().optional(),
|
|
2149
|
+
pcb_port_id: z108.string().optional(),
|
|
2133
2150
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2134
|
-
soldermask_margin:
|
|
2151
|
+
soldermask_margin: z108.number().optional()
|
|
2135
2152
|
});
|
|
2136
|
-
var pcb_hole_with_polygon_pad =
|
|
2137
|
-
type:
|
|
2138
|
-
shape:
|
|
2139
|
-
pcb_group_id:
|
|
2140
|
-
subcircuit_id:
|
|
2141
|
-
hole_shape:
|
|
2142
|
-
hole_diameter:
|
|
2143
|
-
hole_width:
|
|
2144
|
-
hole_height:
|
|
2145
|
-
pad_outline:
|
|
2146
|
-
|
|
2153
|
+
var pcb_hole_with_polygon_pad = z108.object({
|
|
2154
|
+
type: z108.literal("pcb_plated_hole"),
|
|
2155
|
+
shape: z108.literal("hole_with_polygon_pad"),
|
|
2156
|
+
pcb_group_id: z108.string().optional(),
|
|
2157
|
+
subcircuit_id: z108.string().optional(),
|
|
2158
|
+
hole_shape: z108.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
2159
|
+
hole_diameter: z108.number().optional(),
|
|
2160
|
+
hole_width: z108.number().optional(),
|
|
2161
|
+
hole_height: z108.number().optional(),
|
|
2162
|
+
pad_outline: z108.array(
|
|
2163
|
+
z108.object({
|
|
2147
2164
|
x: distance,
|
|
2148
2165
|
y: distance
|
|
2149
2166
|
})
|
|
2150
2167
|
).min(3),
|
|
2151
2168
|
hole_offset_x: distance.default(0),
|
|
2152
2169
|
hole_offset_y: distance.default(0),
|
|
2153
|
-
is_covered_with_solder_mask:
|
|
2170
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2154
2171
|
x: distance,
|
|
2155
2172
|
y: distance,
|
|
2156
|
-
layers:
|
|
2157
|
-
port_hints:
|
|
2158
|
-
pcb_component_id:
|
|
2159
|
-
pcb_port_id:
|
|
2173
|
+
layers: z108.array(layer_ref),
|
|
2174
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2175
|
+
pcb_component_id: z108.string().optional(),
|
|
2176
|
+
pcb_port_id: z108.string().optional(),
|
|
2160
2177
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2161
|
-
soldermask_margin:
|
|
2178
|
+
soldermask_margin: z108.number().optional(),
|
|
2162
2179
|
ccw_rotation: rotation.optional()
|
|
2163
2180
|
});
|
|
2164
|
-
var pcb_plated_hole =
|
|
2181
|
+
var pcb_plated_hole = z108.union([
|
|
2165
2182
|
pcb_plated_hole_circle,
|
|
2166
2183
|
pcb_plated_hole_oval,
|
|
2167
2184
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -2179,144 +2196,144 @@ expectTypesMatch(true);
|
|
|
2179
2196
|
expectTypesMatch(true);
|
|
2180
2197
|
|
|
2181
2198
|
// src/pcb/pcb_port.ts
|
|
2182
|
-
import { z as
|
|
2183
|
-
var pcb_port =
|
|
2184
|
-
type:
|
|
2199
|
+
import { z as z109 } from "zod";
|
|
2200
|
+
var pcb_port = z109.object({
|
|
2201
|
+
type: z109.literal("pcb_port"),
|
|
2185
2202
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
2186
|
-
pcb_group_id:
|
|
2187
|
-
subcircuit_id:
|
|
2188
|
-
source_port_id:
|
|
2189
|
-
pcb_component_id:
|
|
2203
|
+
pcb_group_id: z109.string().optional(),
|
|
2204
|
+
subcircuit_id: z109.string().optional(),
|
|
2205
|
+
source_port_id: z109.string(),
|
|
2206
|
+
pcb_component_id: z109.string().optional(),
|
|
2190
2207
|
x: distance,
|
|
2191
2208
|
y: distance,
|
|
2192
|
-
layers:
|
|
2193
|
-
is_board_pinout:
|
|
2209
|
+
layers: z109.array(layer_ref),
|
|
2210
|
+
is_board_pinout: z109.boolean().optional()
|
|
2194
2211
|
}).describe("Defines a port on the PCB");
|
|
2195
2212
|
expectTypesMatch(true);
|
|
2196
2213
|
|
|
2197
2214
|
// src/pcb/pcb_smtpad.ts
|
|
2198
|
-
import { z as
|
|
2199
|
-
var pcb_smtpad_circle =
|
|
2200
|
-
type:
|
|
2201
|
-
shape:
|
|
2215
|
+
import { z as z110 } from "zod";
|
|
2216
|
+
var pcb_smtpad_circle = z110.object({
|
|
2217
|
+
type: z110.literal("pcb_smtpad"),
|
|
2218
|
+
shape: z110.literal("circle"),
|
|
2202
2219
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2203
|
-
pcb_group_id:
|
|
2204
|
-
subcircuit_id:
|
|
2220
|
+
pcb_group_id: z110.string().optional(),
|
|
2221
|
+
subcircuit_id: z110.string().optional(),
|
|
2205
2222
|
x: distance,
|
|
2206
2223
|
y: distance,
|
|
2207
|
-
radius:
|
|
2224
|
+
radius: z110.number(),
|
|
2208
2225
|
layer: layer_ref,
|
|
2209
|
-
port_hints:
|
|
2210
|
-
pcb_component_id:
|
|
2211
|
-
pcb_port_id:
|
|
2212
|
-
is_covered_with_solder_mask:
|
|
2213
|
-
soldermask_margin:
|
|
2214
|
-
solderpaste_margin:
|
|
2226
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2227
|
+
pcb_component_id: z110.string().optional(),
|
|
2228
|
+
pcb_port_id: z110.string().optional(),
|
|
2229
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2230
|
+
soldermask_margin: z110.number().optional(),
|
|
2231
|
+
solderpaste_margin: z110.number().optional()
|
|
2215
2232
|
});
|
|
2216
|
-
var pcb_smtpad_rect =
|
|
2217
|
-
type:
|
|
2218
|
-
shape:
|
|
2233
|
+
var pcb_smtpad_rect = z110.object({
|
|
2234
|
+
type: z110.literal("pcb_smtpad"),
|
|
2235
|
+
shape: z110.literal("rect"),
|
|
2219
2236
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2220
|
-
pcb_group_id:
|
|
2221
|
-
subcircuit_id:
|
|
2237
|
+
pcb_group_id: z110.string().optional(),
|
|
2238
|
+
subcircuit_id: z110.string().optional(),
|
|
2222
2239
|
x: distance,
|
|
2223
2240
|
y: distance,
|
|
2224
|
-
width:
|
|
2225
|
-
height:
|
|
2226
|
-
rect_border_radius:
|
|
2227
|
-
corner_radius:
|
|
2241
|
+
width: z110.number(),
|
|
2242
|
+
height: z110.number(),
|
|
2243
|
+
rect_border_radius: z110.number().optional(),
|
|
2244
|
+
corner_radius: z110.number().optional(),
|
|
2228
2245
|
layer: layer_ref,
|
|
2229
|
-
port_hints:
|
|
2230
|
-
pcb_component_id:
|
|
2231
|
-
pcb_port_id:
|
|
2232
|
-
is_covered_with_solder_mask:
|
|
2233
|
-
soldermask_margin:
|
|
2234
|
-
soldermask_margin_left:
|
|
2235
|
-
soldermask_margin_top:
|
|
2236
|
-
soldermask_margin_right:
|
|
2237
|
-
soldermask_margin_bottom:
|
|
2238
|
-
solderpaste_margin:
|
|
2246
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2247
|
+
pcb_component_id: z110.string().optional(),
|
|
2248
|
+
pcb_port_id: z110.string().optional(),
|
|
2249
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2250
|
+
soldermask_margin: z110.number().optional(),
|
|
2251
|
+
soldermask_margin_left: z110.number().optional(),
|
|
2252
|
+
soldermask_margin_top: z110.number().optional(),
|
|
2253
|
+
soldermask_margin_right: z110.number().optional(),
|
|
2254
|
+
soldermask_margin_bottom: z110.number().optional(),
|
|
2255
|
+
solderpaste_margin: z110.number().optional()
|
|
2239
2256
|
});
|
|
2240
|
-
var pcb_smtpad_rotated_rect =
|
|
2241
|
-
type:
|
|
2242
|
-
shape:
|
|
2257
|
+
var pcb_smtpad_rotated_rect = z110.object({
|
|
2258
|
+
type: z110.literal("pcb_smtpad"),
|
|
2259
|
+
shape: z110.literal("rotated_rect"),
|
|
2243
2260
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2244
|
-
pcb_group_id:
|
|
2245
|
-
subcircuit_id:
|
|
2261
|
+
pcb_group_id: z110.string().optional(),
|
|
2262
|
+
subcircuit_id: z110.string().optional(),
|
|
2246
2263
|
x: distance,
|
|
2247
2264
|
y: distance,
|
|
2248
|
-
width:
|
|
2249
|
-
height:
|
|
2250
|
-
rect_border_radius:
|
|
2251
|
-
corner_radius:
|
|
2265
|
+
width: z110.number(),
|
|
2266
|
+
height: z110.number(),
|
|
2267
|
+
rect_border_radius: z110.number().optional(),
|
|
2268
|
+
corner_radius: z110.number().optional(),
|
|
2252
2269
|
ccw_rotation: rotation,
|
|
2253
2270
|
layer: layer_ref,
|
|
2254
|
-
port_hints:
|
|
2255
|
-
pcb_component_id:
|
|
2256
|
-
pcb_port_id:
|
|
2257
|
-
is_covered_with_solder_mask:
|
|
2258
|
-
soldermask_margin:
|
|
2259
|
-
soldermask_margin_left:
|
|
2260
|
-
soldermask_margin_top:
|
|
2261
|
-
soldermask_margin_right:
|
|
2262
|
-
soldermask_margin_bottom:
|
|
2263
|
-
solderpaste_margin:
|
|
2271
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2272
|
+
pcb_component_id: z110.string().optional(),
|
|
2273
|
+
pcb_port_id: z110.string().optional(),
|
|
2274
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2275
|
+
soldermask_margin: z110.number().optional(),
|
|
2276
|
+
soldermask_margin_left: z110.number().optional(),
|
|
2277
|
+
soldermask_margin_top: z110.number().optional(),
|
|
2278
|
+
soldermask_margin_right: z110.number().optional(),
|
|
2279
|
+
soldermask_margin_bottom: z110.number().optional(),
|
|
2280
|
+
solderpaste_margin: z110.number().optional()
|
|
2264
2281
|
});
|
|
2265
|
-
var pcb_smtpad_pill =
|
|
2266
|
-
type:
|
|
2267
|
-
shape:
|
|
2282
|
+
var pcb_smtpad_pill = z110.object({
|
|
2283
|
+
type: z110.literal("pcb_smtpad"),
|
|
2284
|
+
shape: z110.literal("pill"),
|
|
2268
2285
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2269
|
-
pcb_group_id:
|
|
2270
|
-
subcircuit_id:
|
|
2286
|
+
pcb_group_id: z110.string().optional(),
|
|
2287
|
+
subcircuit_id: z110.string().optional(),
|
|
2271
2288
|
x: distance,
|
|
2272
2289
|
y: distance,
|
|
2273
|
-
width:
|
|
2274
|
-
height:
|
|
2275
|
-
radius:
|
|
2290
|
+
width: z110.number(),
|
|
2291
|
+
height: z110.number(),
|
|
2292
|
+
radius: z110.number(),
|
|
2276
2293
|
layer: layer_ref,
|
|
2277
|
-
port_hints:
|
|
2278
|
-
pcb_component_id:
|
|
2279
|
-
pcb_port_id:
|
|
2280
|
-
is_covered_with_solder_mask:
|
|
2281
|
-
soldermask_margin:
|
|
2282
|
-
solderpaste_margin:
|
|
2294
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2295
|
+
pcb_component_id: z110.string().optional(),
|
|
2296
|
+
pcb_port_id: z110.string().optional(),
|
|
2297
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2298
|
+
soldermask_margin: z110.number().optional(),
|
|
2299
|
+
solderpaste_margin: z110.number().optional()
|
|
2283
2300
|
});
|
|
2284
|
-
var pcb_smtpad_rotated_pill =
|
|
2285
|
-
type:
|
|
2286
|
-
shape:
|
|
2301
|
+
var pcb_smtpad_rotated_pill = z110.object({
|
|
2302
|
+
type: z110.literal("pcb_smtpad"),
|
|
2303
|
+
shape: z110.literal("rotated_pill"),
|
|
2287
2304
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2288
|
-
pcb_group_id:
|
|
2289
|
-
subcircuit_id:
|
|
2305
|
+
pcb_group_id: z110.string().optional(),
|
|
2306
|
+
subcircuit_id: z110.string().optional(),
|
|
2290
2307
|
x: distance,
|
|
2291
2308
|
y: distance,
|
|
2292
|
-
width:
|
|
2293
|
-
height:
|
|
2294
|
-
radius:
|
|
2309
|
+
width: z110.number(),
|
|
2310
|
+
height: z110.number(),
|
|
2311
|
+
radius: z110.number(),
|
|
2295
2312
|
ccw_rotation: rotation,
|
|
2296
2313
|
layer: layer_ref,
|
|
2297
|
-
port_hints:
|
|
2298
|
-
pcb_component_id:
|
|
2299
|
-
pcb_port_id:
|
|
2300
|
-
is_covered_with_solder_mask:
|
|
2301
|
-
soldermask_margin:
|
|
2302
|
-
solderpaste_margin:
|
|
2314
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2315
|
+
pcb_component_id: z110.string().optional(),
|
|
2316
|
+
pcb_port_id: z110.string().optional(),
|
|
2317
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2318
|
+
soldermask_margin: z110.number().optional(),
|
|
2319
|
+
solderpaste_margin: z110.number().optional()
|
|
2303
2320
|
});
|
|
2304
|
-
var pcb_smtpad_polygon =
|
|
2305
|
-
type:
|
|
2306
|
-
shape:
|
|
2321
|
+
var pcb_smtpad_polygon = z110.object({
|
|
2322
|
+
type: z110.literal("pcb_smtpad"),
|
|
2323
|
+
shape: z110.literal("polygon"),
|
|
2307
2324
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2308
|
-
pcb_group_id:
|
|
2309
|
-
subcircuit_id:
|
|
2310
|
-
points:
|
|
2325
|
+
pcb_group_id: z110.string().optional(),
|
|
2326
|
+
subcircuit_id: z110.string().optional(),
|
|
2327
|
+
points: z110.array(point),
|
|
2311
2328
|
layer: layer_ref,
|
|
2312
|
-
port_hints:
|
|
2313
|
-
pcb_component_id:
|
|
2314
|
-
pcb_port_id:
|
|
2315
|
-
is_covered_with_solder_mask:
|
|
2316
|
-
soldermask_margin:
|
|
2317
|
-
solderpaste_margin:
|
|
2329
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2330
|
+
pcb_component_id: z110.string().optional(),
|
|
2331
|
+
pcb_port_id: z110.string().optional(),
|
|
2332
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2333
|
+
soldermask_margin: z110.number().optional(),
|
|
2334
|
+
solderpaste_margin: z110.number().optional()
|
|
2318
2335
|
});
|
|
2319
|
-
var pcb_smtpad =
|
|
2336
|
+
var pcb_smtpad = z110.discriminatedUnion("shape", [
|
|
2320
2337
|
pcb_smtpad_circle,
|
|
2321
2338
|
pcb_smtpad_rect,
|
|
2322
2339
|
pcb_smtpad_rotated_rect,
|
|
@@ -2332,95 +2349,95 @@ expectTypesMatch(true);
|
|
|
2332
2349
|
expectTypesMatch(true);
|
|
2333
2350
|
|
|
2334
2351
|
// src/pcb/pcb_solder_paste.ts
|
|
2335
|
-
import { z as
|
|
2336
|
-
var pcb_solder_paste_circle =
|
|
2337
|
-
type:
|
|
2338
|
-
shape:
|
|
2352
|
+
import { z as z111 } from "zod";
|
|
2353
|
+
var pcb_solder_paste_circle = z111.object({
|
|
2354
|
+
type: z111.literal("pcb_solder_paste"),
|
|
2355
|
+
shape: z111.literal("circle"),
|
|
2339
2356
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2340
|
-
pcb_group_id:
|
|
2341
|
-
subcircuit_id:
|
|
2357
|
+
pcb_group_id: z111.string().optional(),
|
|
2358
|
+
subcircuit_id: z111.string().optional(),
|
|
2342
2359
|
x: distance,
|
|
2343
2360
|
y: distance,
|
|
2344
|
-
radius:
|
|
2361
|
+
radius: z111.number(),
|
|
2345
2362
|
layer: layer_ref,
|
|
2346
|
-
pcb_component_id:
|
|
2347
|
-
pcb_smtpad_id:
|
|
2363
|
+
pcb_component_id: z111.string().optional(),
|
|
2364
|
+
pcb_smtpad_id: z111.string().optional()
|
|
2348
2365
|
});
|
|
2349
|
-
var pcb_solder_paste_rect =
|
|
2350
|
-
type:
|
|
2351
|
-
shape:
|
|
2366
|
+
var pcb_solder_paste_rect = z111.object({
|
|
2367
|
+
type: z111.literal("pcb_solder_paste"),
|
|
2368
|
+
shape: z111.literal("rect"),
|
|
2352
2369
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2353
|
-
pcb_group_id:
|
|
2354
|
-
subcircuit_id:
|
|
2370
|
+
pcb_group_id: z111.string().optional(),
|
|
2371
|
+
subcircuit_id: z111.string().optional(),
|
|
2355
2372
|
x: distance,
|
|
2356
2373
|
y: distance,
|
|
2357
|
-
width:
|
|
2358
|
-
height:
|
|
2374
|
+
width: z111.number(),
|
|
2375
|
+
height: z111.number(),
|
|
2359
2376
|
layer: layer_ref,
|
|
2360
|
-
pcb_component_id:
|
|
2361
|
-
pcb_smtpad_id:
|
|
2377
|
+
pcb_component_id: z111.string().optional(),
|
|
2378
|
+
pcb_smtpad_id: z111.string().optional()
|
|
2362
2379
|
});
|
|
2363
|
-
var pcb_solder_paste_pill =
|
|
2364
|
-
type:
|
|
2365
|
-
shape:
|
|
2380
|
+
var pcb_solder_paste_pill = z111.object({
|
|
2381
|
+
type: z111.literal("pcb_solder_paste"),
|
|
2382
|
+
shape: z111.literal("pill"),
|
|
2366
2383
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2367
|
-
pcb_group_id:
|
|
2368
|
-
subcircuit_id:
|
|
2384
|
+
pcb_group_id: z111.string().optional(),
|
|
2385
|
+
subcircuit_id: z111.string().optional(),
|
|
2369
2386
|
x: distance,
|
|
2370
2387
|
y: distance,
|
|
2371
|
-
width:
|
|
2372
|
-
height:
|
|
2373
|
-
radius:
|
|
2388
|
+
width: z111.number(),
|
|
2389
|
+
height: z111.number(),
|
|
2390
|
+
radius: z111.number(),
|
|
2374
2391
|
layer: layer_ref,
|
|
2375
|
-
pcb_component_id:
|
|
2376
|
-
pcb_smtpad_id:
|
|
2392
|
+
pcb_component_id: z111.string().optional(),
|
|
2393
|
+
pcb_smtpad_id: z111.string().optional()
|
|
2377
2394
|
});
|
|
2378
|
-
var pcb_solder_paste_rotated_rect =
|
|
2379
|
-
type:
|
|
2380
|
-
shape:
|
|
2395
|
+
var pcb_solder_paste_rotated_rect = z111.object({
|
|
2396
|
+
type: z111.literal("pcb_solder_paste"),
|
|
2397
|
+
shape: z111.literal("rotated_rect"),
|
|
2381
2398
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2382
|
-
pcb_group_id:
|
|
2383
|
-
subcircuit_id:
|
|
2399
|
+
pcb_group_id: z111.string().optional(),
|
|
2400
|
+
subcircuit_id: z111.string().optional(),
|
|
2384
2401
|
x: distance,
|
|
2385
2402
|
y: distance,
|
|
2386
|
-
width:
|
|
2387
|
-
height:
|
|
2403
|
+
width: z111.number(),
|
|
2404
|
+
height: z111.number(),
|
|
2388
2405
|
ccw_rotation: distance,
|
|
2389
2406
|
layer: layer_ref,
|
|
2390
|
-
pcb_component_id:
|
|
2391
|
-
pcb_smtpad_id:
|
|
2407
|
+
pcb_component_id: z111.string().optional(),
|
|
2408
|
+
pcb_smtpad_id: z111.string().optional()
|
|
2392
2409
|
});
|
|
2393
|
-
var pcb_solder_paste_rotated_pill =
|
|
2394
|
-
type:
|
|
2395
|
-
shape:
|
|
2410
|
+
var pcb_solder_paste_rotated_pill = z111.object({
|
|
2411
|
+
type: z111.literal("pcb_solder_paste"),
|
|
2412
|
+
shape: z111.literal("rotated_pill"),
|
|
2396
2413
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2397
|
-
pcb_group_id:
|
|
2398
|
-
subcircuit_id:
|
|
2414
|
+
pcb_group_id: z111.string().optional(),
|
|
2415
|
+
subcircuit_id: z111.string().optional(),
|
|
2399
2416
|
x: distance,
|
|
2400
2417
|
y: distance,
|
|
2401
|
-
width:
|
|
2402
|
-
height:
|
|
2403
|
-
radius:
|
|
2418
|
+
width: z111.number(),
|
|
2419
|
+
height: z111.number(),
|
|
2420
|
+
radius: z111.number(),
|
|
2404
2421
|
ccw_rotation: rotation,
|
|
2405
2422
|
layer: layer_ref,
|
|
2406
|
-
pcb_component_id:
|
|
2407
|
-
pcb_smtpad_id:
|
|
2423
|
+
pcb_component_id: z111.string().optional(),
|
|
2424
|
+
pcb_smtpad_id: z111.string().optional()
|
|
2408
2425
|
});
|
|
2409
|
-
var pcb_solder_paste_oval =
|
|
2410
|
-
type:
|
|
2411
|
-
shape:
|
|
2426
|
+
var pcb_solder_paste_oval = z111.object({
|
|
2427
|
+
type: z111.literal("pcb_solder_paste"),
|
|
2428
|
+
shape: z111.literal("oval"),
|
|
2412
2429
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2413
|
-
pcb_group_id:
|
|
2414
|
-
subcircuit_id:
|
|
2430
|
+
pcb_group_id: z111.string().optional(),
|
|
2431
|
+
subcircuit_id: z111.string().optional(),
|
|
2415
2432
|
x: distance,
|
|
2416
2433
|
y: distance,
|
|
2417
|
-
width:
|
|
2418
|
-
height:
|
|
2434
|
+
width: z111.number(),
|
|
2435
|
+
height: z111.number(),
|
|
2419
2436
|
layer: layer_ref,
|
|
2420
|
-
pcb_component_id:
|
|
2421
|
-
pcb_smtpad_id:
|
|
2437
|
+
pcb_component_id: z111.string().optional(),
|
|
2438
|
+
pcb_smtpad_id: z111.string().optional()
|
|
2422
2439
|
});
|
|
2423
|
-
var pcb_solder_paste =
|
|
2440
|
+
var pcb_solder_paste = z111.union([
|
|
2424
2441
|
pcb_solder_paste_circle,
|
|
2425
2442
|
pcb_solder_paste_rect,
|
|
2426
2443
|
pcb_solder_paste_pill,
|
|
@@ -2440,213 +2457,213 @@ expectTypesMatch(
|
|
|
2440
2457
|
expectTypesMatch(true);
|
|
2441
2458
|
|
|
2442
2459
|
// src/pcb/pcb_text.ts
|
|
2443
|
-
import { z as
|
|
2444
|
-
var pcb_text =
|
|
2445
|
-
type:
|
|
2460
|
+
import { z as z112 } from "zod";
|
|
2461
|
+
var pcb_text = z112.object({
|
|
2462
|
+
type: z112.literal("pcb_text"),
|
|
2446
2463
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
2447
|
-
pcb_group_id:
|
|
2448
|
-
subcircuit_id:
|
|
2449
|
-
text:
|
|
2464
|
+
pcb_group_id: z112.string().optional(),
|
|
2465
|
+
subcircuit_id: z112.string().optional(),
|
|
2466
|
+
text: z112.string(),
|
|
2450
2467
|
center: point,
|
|
2451
2468
|
layer: layer_ref,
|
|
2452
2469
|
width: length,
|
|
2453
2470
|
height: length,
|
|
2454
|
-
lines:
|
|
2471
|
+
lines: z112.number(),
|
|
2455
2472
|
// @ts-ignore
|
|
2456
|
-
align:
|
|
2473
|
+
align: z112.enum(["bottom-left"])
|
|
2457
2474
|
}).describe("Defines text on the PCB");
|
|
2458
2475
|
expectTypesMatch(true);
|
|
2459
2476
|
|
|
2460
2477
|
// src/pcb/pcb_trace.ts
|
|
2461
|
-
import { z as
|
|
2462
|
-
var pcb_trace_route_point_wire =
|
|
2463
|
-
route_type:
|
|
2478
|
+
import { z as z113 } from "zod";
|
|
2479
|
+
var pcb_trace_route_point_wire = z113.object({
|
|
2480
|
+
route_type: z113.literal("wire"),
|
|
2464
2481
|
x: distance,
|
|
2465
2482
|
y: distance,
|
|
2466
2483
|
width: distance,
|
|
2467
|
-
copper_pour_id:
|
|
2468
|
-
is_inside_copper_pour:
|
|
2469
|
-
start_pcb_port_id:
|
|
2470
|
-
end_pcb_port_id:
|
|
2484
|
+
copper_pour_id: z113.string().optional(),
|
|
2485
|
+
is_inside_copper_pour: z113.boolean().optional(),
|
|
2486
|
+
start_pcb_port_id: z113.string().optional(),
|
|
2487
|
+
end_pcb_port_id: z113.string().optional(),
|
|
2471
2488
|
layer: layer_ref
|
|
2472
2489
|
});
|
|
2473
|
-
var pcb_trace_route_point_via =
|
|
2474
|
-
route_type:
|
|
2490
|
+
var pcb_trace_route_point_via = z113.object({
|
|
2491
|
+
route_type: z113.literal("via"),
|
|
2475
2492
|
x: distance,
|
|
2476
2493
|
y: distance,
|
|
2477
|
-
copper_pour_id:
|
|
2478
|
-
is_inside_copper_pour:
|
|
2494
|
+
copper_pour_id: z113.string().optional(),
|
|
2495
|
+
is_inside_copper_pour: z113.boolean().optional(),
|
|
2479
2496
|
hole_diameter: distance.optional(),
|
|
2480
2497
|
outer_diameter: distance.optional(),
|
|
2481
2498
|
from_layer: layer_ref,
|
|
2482
2499
|
to_layer: layer_ref
|
|
2483
2500
|
});
|
|
2484
|
-
var pcb_trace_route_point_through_pad =
|
|
2485
|
-
route_type:
|
|
2501
|
+
var pcb_trace_route_point_through_pad = z113.object({
|
|
2502
|
+
route_type: z113.literal("through_pad"),
|
|
2486
2503
|
start: point,
|
|
2487
2504
|
end: point,
|
|
2488
2505
|
width: distance,
|
|
2489
2506
|
start_layer: layer_ref,
|
|
2490
2507
|
end_layer: layer_ref,
|
|
2491
|
-
pcb_smtpad_id:
|
|
2492
|
-
pcb_plated_hole_id:
|
|
2508
|
+
pcb_smtpad_id: z113.string().optional(),
|
|
2509
|
+
pcb_plated_hole_id: z113.string().optional()
|
|
2493
2510
|
});
|
|
2494
|
-
var pcb_trace_route_point =
|
|
2511
|
+
var pcb_trace_route_point = z113.union([
|
|
2495
2512
|
pcb_trace_route_point_wire,
|
|
2496
2513
|
pcb_trace_route_point_via,
|
|
2497
2514
|
pcb_trace_route_point_through_pad
|
|
2498
2515
|
]);
|
|
2499
|
-
var pcb_trace =
|
|
2500
|
-
type:
|
|
2501
|
-
source_trace_id:
|
|
2502
|
-
pcb_component_id:
|
|
2516
|
+
var pcb_trace = z113.object({
|
|
2517
|
+
type: z113.literal("pcb_trace"),
|
|
2518
|
+
source_trace_id: z113.string().optional(),
|
|
2519
|
+
pcb_component_id: z113.string().optional(),
|
|
2503
2520
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
2504
|
-
pcb_group_id:
|
|
2505
|
-
subcircuit_id:
|
|
2506
|
-
route_thickness_mode:
|
|
2507
|
-
route_order_index:
|
|
2508
|
-
should_round_corners:
|
|
2509
|
-
trace_length:
|
|
2510
|
-
highlight_color:
|
|
2511
|
-
route:
|
|
2521
|
+
pcb_group_id: z113.string().optional(),
|
|
2522
|
+
subcircuit_id: z113.string().optional(),
|
|
2523
|
+
route_thickness_mode: z113.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
2524
|
+
route_order_index: z113.number().optional(),
|
|
2525
|
+
should_round_corners: z113.boolean().optional(),
|
|
2526
|
+
trace_length: z113.number().optional(),
|
|
2527
|
+
highlight_color: z113.string().optional(),
|
|
2528
|
+
route: z113.array(pcb_trace_route_point)
|
|
2512
2529
|
}).describe("Defines a trace on the PCB");
|
|
2513
2530
|
expectTypesMatch(true);
|
|
2514
2531
|
expectTypesMatch(true);
|
|
2515
2532
|
|
|
2516
2533
|
// src/pcb/pcb_trace_warning.ts
|
|
2517
|
-
import { z as
|
|
2518
|
-
var pcb_trace_warning =
|
|
2519
|
-
type:
|
|
2534
|
+
import { z as z114 } from "zod";
|
|
2535
|
+
var pcb_trace_warning = z114.object({
|
|
2536
|
+
type: z114.literal("pcb_trace_warning"),
|
|
2520
2537
|
pcb_trace_warning_id: getZodPrefixedIdWithDefault("pcb_trace_warning"),
|
|
2521
|
-
warning_type:
|
|
2522
|
-
message:
|
|
2538
|
+
warning_type: z114.literal("pcb_trace_warning").default("pcb_trace_warning"),
|
|
2539
|
+
message: z114.string(),
|
|
2523
2540
|
center: point.optional(),
|
|
2524
|
-
pcb_trace_id:
|
|
2525
|
-
source_trace_id:
|
|
2526
|
-
pcb_component_ids:
|
|
2527
|
-
pcb_port_ids:
|
|
2528
|
-
subcircuit_id:
|
|
2541
|
+
pcb_trace_id: z114.string(),
|
|
2542
|
+
source_trace_id: z114.string(),
|
|
2543
|
+
pcb_component_ids: z114.array(z114.string()),
|
|
2544
|
+
pcb_port_ids: z114.array(z114.string()),
|
|
2545
|
+
subcircuit_id: z114.string().optional()
|
|
2529
2546
|
}).describe("Defines a trace warning on the PCB");
|
|
2530
2547
|
expectTypesMatch(true);
|
|
2531
2548
|
|
|
2532
2549
|
// src/pcb/pcb_trace_too_long_warning.ts
|
|
2533
|
-
import { z as
|
|
2534
|
-
var pcb_trace_too_long_warning =
|
|
2535
|
-
type:
|
|
2550
|
+
import { z as z115 } from "zod";
|
|
2551
|
+
var pcb_trace_too_long_warning = z115.object({
|
|
2552
|
+
type: z115.literal("pcb_trace_too_long_warning"),
|
|
2536
2553
|
pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
|
|
2537
2554
|
"pcb_trace_too_long_warning"
|
|
2538
2555
|
),
|
|
2539
|
-
warning_type:
|
|
2540
|
-
message:
|
|
2541
|
-
pcb_trace_id:
|
|
2542
|
-
source_net_id:
|
|
2543
|
-
source_trace_id:
|
|
2556
|
+
warning_type: z115.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
|
|
2557
|
+
message: z115.string(),
|
|
2558
|
+
pcb_trace_id: z115.string(),
|
|
2559
|
+
source_net_id: z115.string().optional(),
|
|
2560
|
+
source_trace_id: z115.string().optional(),
|
|
2544
2561
|
actual_trace_length: distance,
|
|
2545
2562
|
maximum_trace_length: distance,
|
|
2546
|
-
subcircuit_id:
|
|
2563
|
+
subcircuit_id: z115.string().optional()
|
|
2547
2564
|
}).describe(
|
|
2548
2565
|
"Warning emitted when a PCB trace is longer than its maximum allowed length"
|
|
2549
2566
|
);
|
|
2550
2567
|
expectTypesMatch(true);
|
|
2551
2568
|
|
|
2552
2569
|
// src/pcb/pcb_trace_too_many_vias_warning.ts
|
|
2553
|
-
import { z as
|
|
2554
|
-
var pcb_trace_too_many_vias_warning =
|
|
2555
|
-
type:
|
|
2570
|
+
import { z as z116 } from "zod";
|
|
2571
|
+
var pcb_trace_too_many_vias_warning = z116.object({
|
|
2572
|
+
type: z116.literal("pcb_trace_too_many_vias_warning"),
|
|
2556
2573
|
pcb_trace_too_many_vias_warning_id: getZodPrefixedIdWithDefault(
|
|
2557
2574
|
"pcb_trace_too_many_vias_warning"
|
|
2558
2575
|
),
|
|
2559
|
-
warning_type:
|
|
2560
|
-
message:
|
|
2561
|
-
pcb_trace_id:
|
|
2562
|
-
source_net_id:
|
|
2563
|
-
source_trace_id:
|
|
2564
|
-
actual_via_count:
|
|
2565
|
-
maximum_via_count:
|
|
2566
|
-
subcircuit_id:
|
|
2576
|
+
warning_type: z116.literal("pcb_trace_too_many_vias_warning").default("pcb_trace_too_many_vias_warning"),
|
|
2577
|
+
message: z116.string(),
|
|
2578
|
+
pcb_trace_id: z116.string(),
|
|
2579
|
+
source_net_id: z116.string().optional(),
|
|
2580
|
+
source_trace_id: z116.string().optional(),
|
|
2581
|
+
actual_via_count: z116.number().int().nonnegative(),
|
|
2582
|
+
maximum_via_count: z116.number().int().nonnegative(),
|
|
2583
|
+
subcircuit_id: z116.string().optional()
|
|
2567
2584
|
}).describe(
|
|
2568
2585
|
"Warning emitted when a PCB trace has more vias than its maximum allowed count"
|
|
2569
2586
|
);
|
|
2570
2587
|
expectTypesMatch(true);
|
|
2571
2588
|
|
|
2572
2589
|
// src/pcb/pcb_trace_error.ts
|
|
2573
|
-
import { z as
|
|
2590
|
+
import { z as z117 } from "zod";
|
|
2574
2591
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2575
|
-
type:
|
|
2592
|
+
type: z117.literal("pcb_trace_error"),
|
|
2576
2593
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2577
|
-
error_type:
|
|
2594
|
+
error_type: z117.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2578
2595
|
center: point.optional(),
|
|
2579
|
-
pcb_trace_id:
|
|
2580
|
-
source_trace_id:
|
|
2581
|
-
pcb_component_ids:
|
|
2582
|
-
pcb_port_ids:
|
|
2583
|
-
subcircuit_id:
|
|
2596
|
+
pcb_trace_id: z117.string(),
|
|
2597
|
+
source_trace_id: z117.string(),
|
|
2598
|
+
pcb_component_ids: z117.array(z117.string()),
|
|
2599
|
+
pcb_port_ids: z117.array(z117.string()),
|
|
2600
|
+
subcircuit_id: z117.string().optional()
|
|
2584
2601
|
}).describe("Defines a trace error on the PCB");
|
|
2585
2602
|
expectTypesMatch(true);
|
|
2586
2603
|
|
|
2587
2604
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2588
|
-
import { z as
|
|
2605
|
+
import { z as z118 } from "zod";
|
|
2589
2606
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2590
|
-
type:
|
|
2607
|
+
type: z118.literal("pcb_trace_missing_error"),
|
|
2591
2608
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2592
2609
|
"pcb_trace_missing_error"
|
|
2593
2610
|
),
|
|
2594
|
-
error_type:
|
|
2611
|
+
error_type: z118.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2595
2612
|
center: point.optional(),
|
|
2596
|
-
source_trace_id:
|
|
2597
|
-
pcb_component_ids:
|
|
2598
|
-
pcb_port_ids:
|
|
2599
|
-
subcircuit_id:
|
|
2613
|
+
source_trace_id: z118.string(),
|
|
2614
|
+
pcb_component_ids: z118.array(z118.string()),
|
|
2615
|
+
pcb_port_ids: z118.array(z118.string()),
|
|
2616
|
+
subcircuit_id: z118.string().optional()
|
|
2600
2617
|
}).describe(
|
|
2601
2618
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2602
2619
|
);
|
|
2603
2620
|
expectTypesMatch(true);
|
|
2604
2621
|
|
|
2605
2622
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2606
|
-
import { z as
|
|
2623
|
+
import { z as z119 } from "zod";
|
|
2607
2624
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2608
|
-
type:
|
|
2625
|
+
type: z119.literal("pcb_port_not_matched_error"),
|
|
2609
2626
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2610
|
-
error_type:
|
|
2611
|
-
pcb_component_ids:
|
|
2612
|
-
subcircuit_id:
|
|
2627
|
+
error_type: z119.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2628
|
+
pcb_component_ids: z119.array(z119.string()),
|
|
2629
|
+
subcircuit_id: z119.string().optional()
|
|
2613
2630
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2614
2631
|
expectTypesMatch(true);
|
|
2615
2632
|
|
|
2616
2633
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2617
|
-
import { z as
|
|
2634
|
+
import { z as z120 } from "zod";
|
|
2618
2635
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2619
|
-
type:
|
|
2636
|
+
type: z120.literal("pcb_port_not_connected_error"),
|
|
2620
2637
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2621
2638
|
"pcb_port_not_connected_error"
|
|
2622
2639
|
),
|
|
2623
|
-
error_type:
|
|
2624
|
-
pcb_port_ids:
|
|
2625
|
-
pcb_component_ids:
|
|
2626
|
-
subcircuit_id:
|
|
2640
|
+
error_type: z120.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2641
|
+
pcb_port_ids: z120.array(z120.string()),
|
|
2642
|
+
pcb_component_ids: z120.array(z120.string()),
|
|
2643
|
+
subcircuit_id: z120.string().optional()
|
|
2627
2644
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2628
2645
|
expectTypesMatch(
|
|
2629
2646
|
true
|
|
2630
2647
|
);
|
|
2631
2648
|
|
|
2632
2649
|
// src/pcb/pcb_net.ts
|
|
2633
|
-
import { z as
|
|
2634
|
-
var pcb_net =
|
|
2635
|
-
type:
|
|
2650
|
+
import { z as z121 } from "zod";
|
|
2651
|
+
var pcb_net = z121.object({
|
|
2652
|
+
type: z121.literal("pcb_net"),
|
|
2636
2653
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2637
|
-
source_net_id:
|
|
2638
|
-
highlight_color:
|
|
2654
|
+
source_net_id: z121.string().optional(),
|
|
2655
|
+
highlight_color: z121.string().optional()
|
|
2639
2656
|
}).describe("Defines a net on the PCB");
|
|
2640
2657
|
expectTypesMatch(true);
|
|
2641
2658
|
|
|
2642
2659
|
// src/pcb/pcb_via.ts
|
|
2643
|
-
import { z as
|
|
2644
|
-
var pcb_via =
|
|
2645
|
-
type:
|
|
2660
|
+
import { z as z122 } from "zod";
|
|
2661
|
+
var pcb_via = z122.object({
|
|
2662
|
+
type: z122.literal("pcb_via"),
|
|
2646
2663
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2647
|
-
pcb_group_id:
|
|
2648
|
-
subcircuit_id:
|
|
2649
|
-
subcircuit_connectivity_map_key:
|
|
2664
|
+
pcb_group_id: z122.string().optional(),
|
|
2665
|
+
subcircuit_id: z122.string().optional(),
|
|
2666
|
+
subcircuit_connectivity_map_key: z122.string().optional(),
|
|
2650
2667
|
x: distance,
|
|
2651
2668
|
y: distance,
|
|
2652
2669
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2655,120 +2672,120 @@ var pcb_via = z121.object({
|
|
|
2655
2672
|
from_layer: layer_ref.optional(),
|
|
2656
2673
|
/** @deprecated */
|
|
2657
2674
|
to_layer: layer_ref.optional(),
|
|
2658
|
-
layers:
|
|
2659
|
-
pcb_trace_id:
|
|
2660
|
-
source_trace_id:
|
|
2661
|
-
source_net_id:
|
|
2662
|
-
net_is_assignable:
|
|
2663
|
-
net_assigned:
|
|
2664
|
-
is_tented:
|
|
2675
|
+
layers: z122.array(layer_ref),
|
|
2676
|
+
pcb_trace_id: z122.string().optional(),
|
|
2677
|
+
source_trace_id: z122.string().optional(),
|
|
2678
|
+
source_net_id: z122.string().min(1).optional(),
|
|
2679
|
+
net_is_assignable: z122.boolean().optional(),
|
|
2680
|
+
net_assigned: z122.boolean().optional(),
|
|
2681
|
+
is_tented: z122.boolean().optional()
|
|
2665
2682
|
}).describe("Defines a via on the PCB");
|
|
2666
2683
|
expectTypesMatch(true);
|
|
2667
2684
|
|
|
2668
2685
|
// src/pcb/pcb_board.ts
|
|
2669
|
-
import { z as
|
|
2670
|
-
var pcb_board =
|
|
2671
|
-
type:
|
|
2686
|
+
import { z as z123 } from "zod";
|
|
2687
|
+
var pcb_board = z123.object({
|
|
2688
|
+
type: z123.literal("pcb_board"),
|
|
2672
2689
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2673
|
-
pcb_panel_id:
|
|
2674
|
-
carrier_pcb_board_id:
|
|
2675
|
-
is_subcircuit:
|
|
2676
|
-
subcircuit_id:
|
|
2677
|
-
is_mounted_to_carrier_board:
|
|
2678
|
-
is_via_in_pad_allowed:
|
|
2690
|
+
pcb_panel_id: z123.string().optional(),
|
|
2691
|
+
carrier_pcb_board_id: z123.string().optional(),
|
|
2692
|
+
is_subcircuit: z123.boolean().optional(),
|
|
2693
|
+
subcircuit_id: z123.string().optional(),
|
|
2694
|
+
is_mounted_to_carrier_board: z123.boolean().optional(),
|
|
2695
|
+
is_via_in_pad_allowed: z123.boolean().optional(),
|
|
2679
2696
|
width: length.optional(),
|
|
2680
2697
|
height: length.optional(),
|
|
2681
2698
|
center: point,
|
|
2682
|
-
display_offset_x:
|
|
2699
|
+
display_offset_x: z123.string().optional().describe(
|
|
2683
2700
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2684
2701
|
),
|
|
2685
|
-
display_offset_y:
|
|
2702
|
+
display_offset_y: z123.string().optional().describe(
|
|
2686
2703
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2687
2704
|
),
|
|
2688
2705
|
thickness: length.optional().default(1.4),
|
|
2689
|
-
num_layers:
|
|
2690
|
-
allow_blind_and_buried_vias:
|
|
2706
|
+
num_layers: z123.number().optional().default(4),
|
|
2707
|
+
allow_blind_and_buried_vias: z123.boolean().optional().describe(
|
|
2691
2708
|
"Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack."
|
|
2692
2709
|
),
|
|
2693
|
-
outline:
|
|
2694
|
-
shape:
|
|
2695
|
-
material:
|
|
2696
|
-
solder_mask_color:
|
|
2697
|
-
silkscreen_color:
|
|
2710
|
+
outline: z123.array(point).optional(),
|
|
2711
|
+
shape: z123.enum(["rect", "polygon"]).optional(),
|
|
2712
|
+
material: z123.enum(["fr4", "fr1"]).default("fr4"),
|
|
2713
|
+
solder_mask_color: z123.string().optional(),
|
|
2714
|
+
silkscreen_color: z123.string().optional(),
|
|
2698
2715
|
anchor_position: point.optional(),
|
|
2699
2716
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2700
|
-
position_mode:
|
|
2717
|
+
position_mode: z123.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2701
2718
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2702
2719
|
expectTypesMatch(true);
|
|
2703
2720
|
|
|
2704
2721
|
// src/pcb/pcb_panel.ts
|
|
2705
|
-
import { z as
|
|
2706
|
-
var pcb_panel =
|
|
2707
|
-
type:
|
|
2722
|
+
import { z as z124 } from "zod";
|
|
2723
|
+
var pcb_panel = z124.object({
|
|
2724
|
+
type: z124.literal("pcb_panel"),
|
|
2708
2725
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2709
2726
|
width: length,
|
|
2710
2727
|
height: length,
|
|
2711
2728
|
center: point,
|
|
2712
2729
|
thickness: length.optional().default(1.4),
|
|
2713
|
-
covered_with_solder_mask:
|
|
2730
|
+
covered_with_solder_mask: z124.boolean().optional().default(true)
|
|
2714
2731
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2715
2732
|
expectTypesMatch(true);
|
|
2716
2733
|
|
|
2717
2734
|
// src/pcb/pcb_placement_error.ts
|
|
2718
|
-
import { z as
|
|
2735
|
+
import { z as z125 } from "zod";
|
|
2719
2736
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2720
|
-
type:
|
|
2737
|
+
type: z125.literal("pcb_placement_error"),
|
|
2721
2738
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2722
|
-
error_type:
|
|
2723
|
-
subcircuit_id:
|
|
2739
|
+
error_type: z125.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2740
|
+
subcircuit_id: z125.string().optional()
|
|
2724
2741
|
}).describe("Defines a placement error on the PCB");
|
|
2725
2742
|
expectTypesMatch(true);
|
|
2726
2743
|
|
|
2727
2744
|
// src/pcb/pcb_packing_error.ts
|
|
2728
|
-
import { z as
|
|
2745
|
+
import { z as z126 } from "zod";
|
|
2729
2746
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
2730
|
-
type:
|
|
2747
|
+
type: z126.literal("pcb_packing_error"),
|
|
2731
2748
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
2732
|
-
error_type:
|
|
2733
|
-
pcb_group_id:
|
|
2734
|
-
subcircuit_id:
|
|
2749
|
+
error_type: z126.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
2750
|
+
pcb_group_id: z126.string().optional(),
|
|
2751
|
+
subcircuit_id: z126.string().optional()
|
|
2735
2752
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
2736
2753
|
expectTypesMatch(true);
|
|
2737
2754
|
|
|
2738
2755
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2739
|
-
import { z as
|
|
2756
|
+
import { z as z127 } from "zod";
|
|
2740
2757
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2741
|
-
type:
|
|
2758
|
+
type: z127.literal("pcb_panelization_placement_error"),
|
|
2742
2759
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2743
2760
|
"pcb_panelization_placement_error"
|
|
2744
2761
|
),
|
|
2745
|
-
error_type:
|
|
2746
|
-
pcb_panel_id:
|
|
2747
|
-
pcb_board_id:
|
|
2748
|
-
subcircuit_id:
|
|
2762
|
+
error_type: z127.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2763
|
+
pcb_panel_id: z127.string().optional(),
|
|
2764
|
+
pcb_board_id: z127.string().optional(),
|
|
2765
|
+
subcircuit_id: z127.string().optional()
|
|
2749
2766
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2750
2767
|
expectTypesMatch(true);
|
|
2751
2768
|
|
|
2752
2769
|
// src/pcb/pcb_trace_hint.ts
|
|
2753
|
-
import { z as
|
|
2754
|
-
var pcb_trace_hint =
|
|
2755
|
-
type:
|
|
2770
|
+
import { z as z128 } from "zod";
|
|
2771
|
+
var pcb_trace_hint = z128.object({
|
|
2772
|
+
type: z128.literal("pcb_trace_hint"),
|
|
2756
2773
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2757
|
-
pcb_port_id:
|
|
2758
|
-
pcb_component_id:
|
|
2759
|
-
route:
|
|
2760
|
-
subcircuit_id:
|
|
2774
|
+
pcb_port_id: z128.string(),
|
|
2775
|
+
pcb_component_id: z128.string(),
|
|
2776
|
+
route: z128.array(route_hint_point),
|
|
2777
|
+
subcircuit_id: z128.string().optional()
|
|
2761
2778
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2762
2779
|
expectTypesMatch(true);
|
|
2763
2780
|
|
|
2764
2781
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2765
|
-
import { z as
|
|
2766
|
-
var pcb_silkscreen_line =
|
|
2767
|
-
type:
|
|
2782
|
+
import { z as z129 } from "zod";
|
|
2783
|
+
var pcb_silkscreen_line = z129.object({
|
|
2784
|
+
type: z129.literal("pcb_silkscreen_line"),
|
|
2768
2785
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2769
|
-
pcb_component_id:
|
|
2770
|
-
pcb_group_id:
|
|
2771
|
-
subcircuit_id:
|
|
2786
|
+
pcb_component_id: z129.string(),
|
|
2787
|
+
pcb_group_id: z129.string().optional(),
|
|
2788
|
+
subcircuit_id: z129.string().optional(),
|
|
2772
2789
|
stroke_width: distance.default("0.1mm"),
|
|
2773
2790
|
x1: distance,
|
|
2774
2791
|
y1: distance,
|
|
@@ -2779,32 +2796,32 @@ var pcb_silkscreen_line = z128.object({
|
|
|
2779
2796
|
expectTypesMatch(true);
|
|
2780
2797
|
|
|
2781
2798
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2782
|
-
import { z as
|
|
2783
|
-
var pcb_silkscreen_path =
|
|
2784
|
-
type:
|
|
2799
|
+
import { z as z130 } from "zod";
|
|
2800
|
+
var pcb_silkscreen_path = z130.object({
|
|
2801
|
+
type: z130.literal("pcb_silkscreen_path"),
|
|
2785
2802
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2786
|
-
pcb_component_id:
|
|
2787
|
-
pcb_group_id:
|
|
2788
|
-
subcircuit_id:
|
|
2803
|
+
pcb_component_id: z130.string(),
|
|
2804
|
+
pcb_group_id: z130.string().optional(),
|
|
2805
|
+
subcircuit_id: z130.string().optional(),
|
|
2789
2806
|
layer: visible_layer,
|
|
2790
|
-
route:
|
|
2807
|
+
route: z130.array(point),
|
|
2791
2808
|
stroke_width: length
|
|
2792
2809
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2793
2810
|
expectTypesMatch(true);
|
|
2794
2811
|
|
|
2795
2812
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2796
|
-
import { z as
|
|
2797
|
-
var pcb_silkscreen_text =
|
|
2798
|
-
type:
|
|
2813
|
+
import { z as z131 } from "zod";
|
|
2814
|
+
var pcb_silkscreen_text = z131.object({
|
|
2815
|
+
type: z131.literal("pcb_silkscreen_text"),
|
|
2799
2816
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2800
|
-
pcb_group_id:
|
|
2801
|
-
subcircuit_id:
|
|
2802
|
-
font:
|
|
2817
|
+
pcb_group_id: z131.string().optional(),
|
|
2818
|
+
subcircuit_id: z131.string().optional(),
|
|
2819
|
+
font: z131.literal("tscircuit2024").default("tscircuit2024"),
|
|
2803
2820
|
font_size: distance.default("0.2mm"),
|
|
2804
|
-
pcb_component_id:
|
|
2805
|
-
text:
|
|
2806
|
-
is_knockout:
|
|
2807
|
-
knockout_padding:
|
|
2821
|
+
pcb_component_id: z131.string(),
|
|
2822
|
+
text: z131.string(),
|
|
2823
|
+
is_knockout: z131.boolean().default(false).optional(),
|
|
2824
|
+
knockout_padding: z131.object({
|
|
2808
2825
|
left: length,
|
|
2809
2826
|
top: length,
|
|
2810
2827
|
bottom: length,
|
|
@@ -2815,27 +2832,27 @@ var pcb_silkscreen_text = z130.object({
|
|
|
2815
2832
|
bottom: "0.2mm",
|
|
2816
2833
|
right: "0.2mm"
|
|
2817
2834
|
}).optional(),
|
|
2818
|
-
ccw_rotation:
|
|
2835
|
+
ccw_rotation: z131.number().optional(),
|
|
2819
2836
|
layer: layer_ref,
|
|
2820
|
-
is_mirrored:
|
|
2837
|
+
is_mirrored: z131.boolean().default(false).optional(),
|
|
2821
2838
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2822
2839
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2823
2840
|
}).describe("Defines silkscreen text on the PCB");
|
|
2824
2841
|
expectTypesMatch(true);
|
|
2825
2842
|
|
|
2826
2843
|
// src/pcb/pcb_copper_text.ts
|
|
2827
|
-
import { z as
|
|
2828
|
-
var pcb_copper_text =
|
|
2829
|
-
type:
|
|
2844
|
+
import { z as z132 } from "zod";
|
|
2845
|
+
var pcb_copper_text = z132.object({
|
|
2846
|
+
type: z132.literal("pcb_copper_text"),
|
|
2830
2847
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2831
|
-
pcb_group_id:
|
|
2832
|
-
subcircuit_id:
|
|
2833
|
-
font:
|
|
2848
|
+
pcb_group_id: z132.string().optional(),
|
|
2849
|
+
subcircuit_id: z132.string().optional(),
|
|
2850
|
+
font: z132.literal("tscircuit2024").default("tscircuit2024"),
|
|
2834
2851
|
font_size: distance.default("0.2mm"),
|
|
2835
|
-
pcb_component_id:
|
|
2836
|
-
text:
|
|
2837
|
-
is_knockout:
|
|
2838
|
-
knockout_padding:
|
|
2852
|
+
pcb_component_id: z132.string(),
|
|
2853
|
+
text: z132.string(),
|
|
2854
|
+
is_knockout: z132.boolean().default(false).optional(),
|
|
2855
|
+
knockout_padding: z132.object({
|
|
2839
2856
|
left: length,
|
|
2840
2857
|
top: length,
|
|
2841
2858
|
bottom: length,
|
|
@@ -2846,61 +2863,61 @@ var pcb_copper_text = z131.object({
|
|
|
2846
2863
|
bottom: "0.2mm",
|
|
2847
2864
|
right: "0.2mm"
|
|
2848
2865
|
}).optional(),
|
|
2849
|
-
ccw_rotation:
|
|
2866
|
+
ccw_rotation: z132.number().optional(),
|
|
2850
2867
|
layer: layer_ref,
|
|
2851
|
-
is_mirrored:
|
|
2868
|
+
is_mirrored: z132.boolean().default(false).optional(),
|
|
2852
2869
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2853
2870
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2854
2871
|
}).describe("Defines copper text on the PCB");
|
|
2855
2872
|
expectTypesMatch(true);
|
|
2856
2873
|
|
|
2857
2874
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2858
|
-
import { z as
|
|
2859
|
-
var pcb_silkscreen_rect =
|
|
2860
|
-
type:
|
|
2875
|
+
import { z as z133 } from "zod";
|
|
2876
|
+
var pcb_silkscreen_rect = z133.object({
|
|
2877
|
+
type: z133.literal("pcb_silkscreen_rect"),
|
|
2861
2878
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2862
|
-
pcb_component_id:
|
|
2863
|
-
pcb_group_id:
|
|
2864
|
-
subcircuit_id:
|
|
2879
|
+
pcb_component_id: z133.string(),
|
|
2880
|
+
pcb_group_id: z133.string().optional(),
|
|
2881
|
+
subcircuit_id: z133.string().optional(),
|
|
2865
2882
|
center: point,
|
|
2866
2883
|
width: length,
|
|
2867
2884
|
height: length,
|
|
2868
2885
|
layer: layer_ref,
|
|
2869
2886
|
stroke_width: length.default("1mm"),
|
|
2870
2887
|
corner_radius: length.optional(),
|
|
2871
|
-
is_filled:
|
|
2872
|
-
has_stroke:
|
|
2873
|
-
is_stroke_dashed:
|
|
2874
|
-
ccw_rotation:
|
|
2888
|
+
is_filled: z133.boolean().default(true).optional(),
|
|
2889
|
+
has_stroke: z133.boolean().optional(),
|
|
2890
|
+
is_stroke_dashed: z133.boolean().optional(),
|
|
2891
|
+
ccw_rotation: z133.number().optional()
|
|
2875
2892
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2876
2893
|
expectTypesMatch(true);
|
|
2877
2894
|
|
|
2878
2895
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2879
|
-
import { z as
|
|
2880
|
-
var pcb_silkscreen_circle =
|
|
2881
|
-
type:
|
|
2896
|
+
import { z as z134 } from "zod";
|
|
2897
|
+
var pcb_silkscreen_circle = z134.object({
|
|
2898
|
+
type: z134.literal("pcb_silkscreen_circle"),
|
|
2882
2899
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2883
2900
|
"pcb_silkscreen_circle"
|
|
2884
2901
|
),
|
|
2885
|
-
pcb_component_id:
|
|
2886
|
-
pcb_group_id:
|
|
2887
|
-
subcircuit_id:
|
|
2902
|
+
pcb_component_id: z134.string(),
|
|
2903
|
+
pcb_group_id: z134.string().optional(),
|
|
2904
|
+
subcircuit_id: z134.string().optional(),
|
|
2888
2905
|
center: point,
|
|
2889
2906
|
radius: length,
|
|
2890
2907
|
layer: visible_layer,
|
|
2891
2908
|
stroke_width: length.default("1mm"),
|
|
2892
|
-
is_filled:
|
|
2909
|
+
is_filled: z134.boolean().optional()
|
|
2893
2910
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2894
2911
|
expectTypesMatch(true);
|
|
2895
2912
|
|
|
2896
2913
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2897
|
-
import { z as
|
|
2898
|
-
var pcb_silkscreen_oval =
|
|
2899
|
-
type:
|
|
2914
|
+
import { z as z135 } from "zod";
|
|
2915
|
+
var pcb_silkscreen_oval = z135.object({
|
|
2916
|
+
type: z135.literal("pcb_silkscreen_oval"),
|
|
2900
2917
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2901
|
-
pcb_component_id:
|
|
2902
|
-
pcb_group_id:
|
|
2903
|
-
subcircuit_id:
|
|
2918
|
+
pcb_component_id: z135.string(),
|
|
2919
|
+
pcb_group_id: z135.string().optional(),
|
|
2920
|
+
subcircuit_id: z135.string().optional(),
|
|
2904
2921
|
center: point,
|
|
2905
2922
|
radius_x: distance,
|
|
2906
2923
|
radius_y: distance,
|
|
@@ -2910,265 +2927,265 @@ var pcb_silkscreen_oval = z134.object({
|
|
|
2910
2927
|
expectTypesMatch(true);
|
|
2911
2928
|
|
|
2912
2929
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2913
|
-
import { z as
|
|
2914
|
-
var pcb_silkscreen_graphic_base =
|
|
2915
|
-
type:
|
|
2930
|
+
import { z as z136 } from "zod";
|
|
2931
|
+
var pcb_silkscreen_graphic_base = z136.object({
|
|
2932
|
+
type: z136.literal("pcb_silkscreen_graphic"),
|
|
2916
2933
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2917
2934
|
"pcb_silkscreen_graphic"
|
|
2918
2935
|
),
|
|
2919
|
-
pcb_component_id:
|
|
2920
|
-
pcb_group_id:
|
|
2921
|
-
subcircuit_id:
|
|
2936
|
+
pcb_component_id: z136.string(),
|
|
2937
|
+
pcb_group_id: z136.string().optional(),
|
|
2938
|
+
subcircuit_id: z136.string().optional(),
|
|
2922
2939
|
layer: visible_layer,
|
|
2923
2940
|
image_asset: asset.optional()
|
|
2924
2941
|
});
|
|
2925
2942
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2926
|
-
shape:
|
|
2943
|
+
shape: z136.literal("brep"),
|
|
2927
2944
|
brep_shape
|
|
2928
2945
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2929
2946
|
expectTypesMatch(
|
|
2930
2947
|
true
|
|
2931
2948
|
);
|
|
2932
|
-
var pcb_silkscreen_graphic =
|
|
2949
|
+
var pcb_silkscreen_graphic = z136.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2933
2950
|
expectTypesMatch(true);
|
|
2934
2951
|
|
|
2935
2952
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2936
|
-
import { z as
|
|
2937
|
-
var pcb_silkscreen_pill =
|
|
2938
|
-
type:
|
|
2953
|
+
import { z as z137 } from "zod";
|
|
2954
|
+
var pcb_silkscreen_pill = z137.object({
|
|
2955
|
+
type: z137.literal("pcb_silkscreen_pill"),
|
|
2939
2956
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2940
|
-
pcb_component_id:
|
|
2941
|
-
pcb_group_id:
|
|
2942
|
-
subcircuit_id:
|
|
2957
|
+
pcb_component_id: z137.string(),
|
|
2958
|
+
pcb_group_id: z137.string().optional(),
|
|
2959
|
+
subcircuit_id: z137.string().optional(),
|
|
2943
2960
|
center: point,
|
|
2944
2961
|
width: length,
|
|
2945
2962
|
height: length,
|
|
2946
2963
|
layer: layer_ref,
|
|
2947
|
-
ccw_rotation:
|
|
2964
|
+
ccw_rotation: z137.number().optional()
|
|
2948
2965
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2949
2966
|
expectTypesMatch(true);
|
|
2950
2967
|
|
|
2951
2968
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2952
|
-
import { z as
|
|
2953
|
-
var pcb_fabrication_note_text =
|
|
2954
|
-
type:
|
|
2969
|
+
import { z as z138 } from "zod";
|
|
2970
|
+
var pcb_fabrication_note_text = z138.object({
|
|
2971
|
+
type: z138.literal("pcb_fabrication_note_text"),
|
|
2955
2972
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2956
2973
|
"pcb_fabrication_note_text"
|
|
2957
2974
|
),
|
|
2958
|
-
subcircuit_id:
|
|
2959
|
-
pcb_group_id:
|
|
2960
|
-
font:
|
|
2975
|
+
subcircuit_id: z138.string().optional(),
|
|
2976
|
+
pcb_group_id: z138.string().optional(),
|
|
2977
|
+
font: z138.literal("tscircuit2024").default("tscircuit2024"),
|
|
2961
2978
|
font_size: distance.default("1mm"),
|
|
2962
|
-
pcb_component_id:
|
|
2963
|
-
text:
|
|
2964
|
-
ccw_rotation:
|
|
2979
|
+
pcb_component_id: z138.string(),
|
|
2980
|
+
text: z138.string(),
|
|
2981
|
+
ccw_rotation: z138.number().optional(),
|
|
2965
2982
|
layer: visible_layer,
|
|
2966
2983
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2967
|
-
anchor_alignment:
|
|
2968
|
-
color:
|
|
2984
|
+
anchor_alignment: z138.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2985
|
+
color: z138.string().optional()
|
|
2969
2986
|
}).describe(
|
|
2970
2987
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2971
2988
|
);
|
|
2972
2989
|
expectTypesMatch(true);
|
|
2973
2990
|
|
|
2974
2991
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2975
|
-
import { z as
|
|
2976
|
-
var pcb_fabrication_note_path =
|
|
2977
|
-
type:
|
|
2992
|
+
import { z as z139 } from "zod";
|
|
2993
|
+
var pcb_fabrication_note_path = z139.object({
|
|
2994
|
+
type: z139.literal("pcb_fabrication_note_path"),
|
|
2978
2995
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2979
2996
|
"pcb_fabrication_note_path"
|
|
2980
2997
|
),
|
|
2981
|
-
pcb_component_id:
|
|
2982
|
-
subcircuit_id:
|
|
2998
|
+
pcb_component_id: z139.string(),
|
|
2999
|
+
subcircuit_id: z139.string().optional(),
|
|
2983
3000
|
layer: layer_ref,
|
|
2984
|
-
route:
|
|
3001
|
+
route: z139.array(point),
|
|
2985
3002
|
stroke_width: length,
|
|
2986
|
-
color:
|
|
3003
|
+
color: z139.string().optional()
|
|
2987
3004
|
}).describe(
|
|
2988
3005
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2989
3006
|
);
|
|
2990
3007
|
expectTypesMatch(true);
|
|
2991
3008
|
|
|
2992
3009
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2993
|
-
import { z as
|
|
2994
|
-
var pcb_fabrication_note_rect =
|
|
2995
|
-
type:
|
|
3010
|
+
import { z as z140 } from "zod";
|
|
3011
|
+
var pcb_fabrication_note_rect = z140.object({
|
|
3012
|
+
type: z140.literal("pcb_fabrication_note_rect"),
|
|
2996
3013
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2997
3014
|
"pcb_fabrication_note_rect"
|
|
2998
3015
|
),
|
|
2999
|
-
pcb_component_id:
|
|
3000
|
-
pcb_group_id:
|
|
3001
|
-
subcircuit_id:
|
|
3016
|
+
pcb_component_id: z140.string(),
|
|
3017
|
+
pcb_group_id: z140.string().optional(),
|
|
3018
|
+
subcircuit_id: z140.string().optional(),
|
|
3002
3019
|
center: point,
|
|
3003
3020
|
width: length,
|
|
3004
3021
|
height: length,
|
|
3005
3022
|
layer: visible_layer,
|
|
3006
3023
|
stroke_width: length.default("0.1mm"),
|
|
3007
3024
|
corner_radius: length.optional(),
|
|
3008
|
-
is_filled:
|
|
3009
|
-
has_stroke:
|
|
3010
|
-
is_stroke_dashed:
|
|
3011
|
-
color:
|
|
3025
|
+
is_filled: z140.boolean().optional(),
|
|
3026
|
+
has_stroke: z140.boolean().optional(),
|
|
3027
|
+
is_stroke_dashed: z140.boolean().optional(),
|
|
3028
|
+
color: z140.string().optional()
|
|
3012
3029
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
3013
3030
|
expectTypesMatch(true);
|
|
3014
3031
|
|
|
3015
3032
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
3016
|
-
import { z as
|
|
3017
|
-
var pcb_fabrication_note_dimension =
|
|
3018
|
-
type:
|
|
3033
|
+
import { z as z141 } from "zod";
|
|
3034
|
+
var pcb_fabrication_note_dimension = z141.object({
|
|
3035
|
+
type: z141.literal("pcb_fabrication_note_dimension"),
|
|
3019
3036
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
3020
3037
|
"pcb_fabrication_note_dimension"
|
|
3021
3038
|
),
|
|
3022
|
-
pcb_component_id:
|
|
3023
|
-
pcb_group_id:
|
|
3024
|
-
subcircuit_id:
|
|
3039
|
+
pcb_component_id: z141.string(),
|
|
3040
|
+
pcb_group_id: z141.string().optional(),
|
|
3041
|
+
subcircuit_id: z141.string().optional(),
|
|
3025
3042
|
layer: visible_layer,
|
|
3026
3043
|
from: point,
|
|
3027
3044
|
to: point,
|
|
3028
|
-
text:
|
|
3029
|
-
text_ccw_rotation:
|
|
3045
|
+
text: z141.string().optional(),
|
|
3046
|
+
text_ccw_rotation: z141.number().optional(),
|
|
3030
3047
|
offset: length.optional(),
|
|
3031
3048
|
offset_distance: length.optional(),
|
|
3032
|
-
offset_direction:
|
|
3033
|
-
x:
|
|
3034
|
-
y:
|
|
3049
|
+
offset_direction: z141.object({
|
|
3050
|
+
x: z141.number(),
|
|
3051
|
+
y: z141.number()
|
|
3035
3052
|
}).optional(),
|
|
3036
|
-
font:
|
|
3053
|
+
font: z141.literal("tscircuit2024").default("tscircuit2024"),
|
|
3037
3054
|
font_size: length.default("1mm"),
|
|
3038
|
-
color:
|
|
3055
|
+
color: z141.string().optional(),
|
|
3039
3056
|
arrow_size: length.default("1mm")
|
|
3040
3057
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
3041
3058
|
expectTypesMatch(true);
|
|
3042
3059
|
|
|
3043
3060
|
// src/pcb/pcb_note_text.ts
|
|
3044
|
-
import { z as z141 } from "zod";
|
|
3045
|
-
var pcb_note_text = z141.object({
|
|
3046
|
-
type: z141.literal("pcb_note_text"),
|
|
3047
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3048
|
-
pcb_component_id: z141.string().optional(),
|
|
3049
|
-
pcb_group_id: z141.string().optional(),
|
|
3050
|
-
subcircuit_id: z141.string().optional(),
|
|
3051
|
-
name: z141.string().optional(),
|
|
3052
|
-
font: z141.literal("tscircuit2024").default("tscircuit2024"),
|
|
3053
|
-
font_size: distance.default("1mm"),
|
|
3054
|
-
text: z141.string().optional(),
|
|
3055
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3056
|
-
anchor_alignment: z141.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3057
|
-
layer: visible_layer.default("top"),
|
|
3058
|
-
is_mirrored_from_top_view: z141.boolean().optional(),
|
|
3059
|
-
color: z141.string().optional()
|
|
3060
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
3061
|
-
expectTypesMatch(true);
|
|
3062
|
-
|
|
3063
|
-
// src/pcb/pcb_note_rect.ts
|
|
3064
3061
|
import { z as z142 } from "zod";
|
|
3065
|
-
var
|
|
3066
|
-
type: z142.literal("
|
|
3067
|
-
|
|
3062
|
+
var pcb_note_text = z142.object({
|
|
3063
|
+
type: z142.literal("pcb_note_text"),
|
|
3064
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3068
3065
|
pcb_component_id: z142.string().optional(),
|
|
3069
3066
|
pcb_group_id: z142.string().optional(),
|
|
3070
3067
|
subcircuit_id: z142.string().optional(),
|
|
3071
3068
|
name: z142.string().optional(),
|
|
3069
|
+
font: z142.literal("tscircuit2024").default("tscircuit2024"),
|
|
3070
|
+
font_size: distance.default("1mm"),
|
|
3072
3071
|
text: z142.string().optional(),
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
height: length,
|
|
3072
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3073
|
+
anchor_alignment: z142.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3076
3074
|
layer: visible_layer.default("top"),
|
|
3077
|
-
|
|
3078
|
-
corner_radius: length.optional(),
|
|
3079
|
-
is_filled: z142.boolean().optional(),
|
|
3080
|
-
has_stroke: z142.boolean().optional(),
|
|
3081
|
-
is_stroke_dashed: z142.boolean().optional(),
|
|
3075
|
+
is_mirrored_from_top_view: z142.boolean().optional(),
|
|
3082
3076
|
color: z142.string().optional()
|
|
3083
|
-
}).describe("Defines a
|
|
3077
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
3084
3078
|
expectTypesMatch(true);
|
|
3085
3079
|
|
|
3086
|
-
// src/pcb/
|
|
3080
|
+
// src/pcb/pcb_note_rect.ts
|
|
3087
3081
|
import { z as z143 } from "zod";
|
|
3088
|
-
var
|
|
3089
|
-
type: z143.literal("
|
|
3090
|
-
|
|
3082
|
+
var pcb_note_rect = z143.object({
|
|
3083
|
+
type: z143.literal("pcb_note_rect"),
|
|
3084
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
3091
3085
|
pcb_component_id: z143.string().optional(),
|
|
3092
3086
|
pcb_group_id: z143.string().optional(),
|
|
3093
3087
|
subcircuit_id: z143.string().optional(),
|
|
3094
3088
|
name: z143.string().optional(),
|
|
3095
3089
|
text: z143.string().optional(),
|
|
3096
|
-
|
|
3090
|
+
center: point,
|
|
3091
|
+
width: length,
|
|
3092
|
+
height: length,
|
|
3097
3093
|
layer: visible_layer.default("top"),
|
|
3098
3094
|
stroke_width: length.default("0.1mm"),
|
|
3095
|
+
corner_radius: length.optional(),
|
|
3096
|
+
is_filled: z143.boolean().optional(),
|
|
3097
|
+
has_stroke: z143.boolean().optional(),
|
|
3098
|
+
is_stroke_dashed: z143.boolean().optional(),
|
|
3099
3099
|
color: z143.string().optional()
|
|
3100
|
-
}).describe("Defines a
|
|
3100
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
3101
3101
|
expectTypesMatch(true);
|
|
3102
3102
|
|
|
3103
|
-
// src/pcb/
|
|
3103
|
+
// src/pcb/pcb_note_path.ts
|
|
3104
3104
|
import { z as z144 } from "zod";
|
|
3105
|
-
var
|
|
3106
|
-
type: z144.literal("
|
|
3107
|
-
|
|
3105
|
+
var pcb_note_path = z144.object({
|
|
3106
|
+
type: z144.literal("pcb_note_path"),
|
|
3107
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
3108
3108
|
pcb_component_id: z144.string().optional(),
|
|
3109
3109
|
pcb_group_id: z144.string().optional(),
|
|
3110
3110
|
subcircuit_id: z144.string().optional(),
|
|
3111
3111
|
name: z144.string().optional(),
|
|
3112
3112
|
text: z144.string().optional(),
|
|
3113
|
+
route: z144.array(point),
|
|
3114
|
+
layer: visible_layer.default("top"),
|
|
3115
|
+
stroke_width: length.default("0.1mm"),
|
|
3116
|
+
color: z144.string().optional()
|
|
3117
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
3118
|
+
expectTypesMatch(true);
|
|
3119
|
+
|
|
3120
|
+
// src/pcb/pcb_note_line.ts
|
|
3121
|
+
import { z as z145 } from "zod";
|
|
3122
|
+
var pcb_note_line = z145.object({
|
|
3123
|
+
type: z145.literal("pcb_note_line"),
|
|
3124
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
3125
|
+
pcb_component_id: z145.string().optional(),
|
|
3126
|
+
pcb_group_id: z145.string().optional(),
|
|
3127
|
+
subcircuit_id: z145.string().optional(),
|
|
3128
|
+
name: z145.string().optional(),
|
|
3129
|
+
text: z145.string().optional(),
|
|
3113
3130
|
x1: distance,
|
|
3114
3131
|
y1: distance,
|
|
3115
3132
|
x2: distance,
|
|
3116
3133
|
y2: distance,
|
|
3117
3134
|
layer: visible_layer.default("top"),
|
|
3118
3135
|
stroke_width: distance.default("0.1mm"),
|
|
3119
|
-
color:
|
|
3120
|
-
is_dashed:
|
|
3136
|
+
color: z145.string().optional(),
|
|
3137
|
+
is_dashed: z145.boolean().optional()
|
|
3121
3138
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
3122
3139
|
expectTypesMatch(true);
|
|
3123
3140
|
|
|
3124
3141
|
// src/pcb/pcb_note_dimension.ts
|
|
3125
|
-
import { z as
|
|
3126
|
-
var pcb_note_dimension =
|
|
3127
|
-
type:
|
|
3142
|
+
import { z as z146 } from "zod";
|
|
3143
|
+
var pcb_note_dimension = z146.object({
|
|
3144
|
+
type: z146.literal("pcb_note_dimension"),
|
|
3128
3145
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
3129
|
-
pcb_component_id:
|
|
3130
|
-
pcb_group_id:
|
|
3131
|
-
subcircuit_id:
|
|
3132
|
-
name:
|
|
3146
|
+
pcb_component_id: z146.string().optional(),
|
|
3147
|
+
pcb_group_id: z146.string().optional(),
|
|
3148
|
+
subcircuit_id: z146.string().optional(),
|
|
3149
|
+
name: z146.string().optional(),
|
|
3133
3150
|
from: point,
|
|
3134
3151
|
to: point,
|
|
3135
|
-
text:
|
|
3136
|
-
text_ccw_rotation:
|
|
3152
|
+
text: z146.string().optional(),
|
|
3153
|
+
text_ccw_rotation: z146.number().optional(),
|
|
3137
3154
|
offset_distance: length.optional(),
|
|
3138
|
-
offset_direction:
|
|
3139
|
-
x:
|
|
3140
|
-
y:
|
|
3155
|
+
offset_direction: z146.object({
|
|
3156
|
+
x: z146.number(),
|
|
3157
|
+
y: z146.number()
|
|
3141
3158
|
}).optional(),
|
|
3142
|
-
font:
|
|
3159
|
+
font: z146.literal("tscircuit2024").default("tscircuit2024"),
|
|
3143
3160
|
font_size: length.default("1mm"),
|
|
3144
3161
|
layer: visible_layer.default("top"),
|
|
3145
|
-
color:
|
|
3162
|
+
color: z146.string().optional(),
|
|
3146
3163
|
arrow_size: length.default("1mm")
|
|
3147
3164
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
3148
3165
|
expectTypesMatch(true);
|
|
3149
3166
|
|
|
3150
3167
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
3151
|
-
import { z as
|
|
3168
|
+
import { z as z147 } from "zod";
|
|
3152
3169
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
3153
|
-
type:
|
|
3170
|
+
type: z147.literal("pcb_footprint_overlap_error"),
|
|
3154
3171
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3155
|
-
error_type:
|
|
3156
|
-
pcb_smtpad_ids:
|
|
3157
|
-
pcb_plated_hole_ids:
|
|
3158
|
-
pcb_hole_ids:
|
|
3159
|
-
pcb_keepout_ids:
|
|
3172
|
+
error_type: z147.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
3173
|
+
pcb_smtpad_ids: z147.array(z147.string()).optional(),
|
|
3174
|
+
pcb_plated_hole_ids: z147.array(z147.string()).optional(),
|
|
3175
|
+
pcb_hole_ids: z147.array(z147.string()).optional(),
|
|
3176
|
+
pcb_keepout_ids: z147.array(z147.string()).optional()
|
|
3160
3177
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
3161
3178
|
expectTypesMatch(
|
|
3162
3179
|
true
|
|
3163
3180
|
);
|
|
3164
3181
|
|
|
3165
3182
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
3166
|
-
import { z as
|
|
3183
|
+
import { z as z148 } from "zod";
|
|
3167
3184
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
3168
|
-
type:
|
|
3185
|
+
type: z148.literal("pcb_courtyard_overlap_error"),
|
|
3169
3186
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3170
|
-
error_type:
|
|
3171
|
-
pcb_component_ids:
|
|
3187
|
+
error_type: z148.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
3188
|
+
pcb_component_ids: z148.tuple([z148.string(), z148.string()])
|
|
3172
3189
|
}).describe(
|
|
3173
3190
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
3174
3191
|
);
|
|
@@ -3177,64 +3194,65 @@ expectTypesMatch(
|
|
|
3177
3194
|
);
|
|
3178
3195
|
|
|
3179
3196
|
// src/pcb/pcb_keepout.ts
|
|
3180
|
-
import { z as
|
|
3181
|
-
var pcb_keepout_outline =
|
|
3182
|
-
type:
|
|
3183
|
-
shape:
|
|
3184
|
-
pcb_group_id:
|
|
3185
|
-
subcircuit_id:
|
|
3186
|
-
outline:
|
|
3197
|
+
import { z as z149 } from "zod";
|
|
3198
|
+
var pcb_keepout_outline = z149.object({
|
|
3199
|
+
type: z149.literal("pcb_keepout"),
|
|
3200
|
+
shape: z149.literal("outline"),
|
|
3201
|
+
pcb_group_id: z149.string().optional(),
|
|
3202
|
+
subcircuit_id: z149.string().optional(),
|
|
3203
|
+
outline: z149.array(point).min(2),
|
|
3187
3204
|
stroke_width: length,
|
|
3188
|
-
pcb_keepout_id:
|
|
3189
|
-
layers:
|
|
3190
|
-
description:
|
|
3191
|
-
excluded_pcb_component_ids:
|
|
3205
|
+
pcb_keepout_id: z149.string(),
|
|
3206
|
+
layers: z149.array(z149.string()),
|
|
3207
|
+
description: z149.string().optional(),
|
|
3208
|
+
excluded_pcb_component_ids: z149.array(z149.string()).optional()
|
|
3192
3209
|
});
|
|
3193
|
-
var pcb_keepout =
|
|
3194
|
-
type:
|
|
3195
|
-
shape:
|
|
3196
|
-
pcb_group_id:
|
|
3197
|
-
subcircuit_id:
|
|
3210
|
+
var pcb_keepout = z149.object({
|
|
3211
|
+
type: z149.literal("pcb_keepout"),
|
|
3212
|
+
shape: z149.literal("rect"),
|
|
3213
|
+
pcb_group_id: z149.string().optional(),
|
|
3214
|
+
subcircuit_id: z149.string().optional(),
|
|
3198
3215
|
center: point,
|
|
3199
3216
|
width: distance,
|
|
3200
3217
|
height: distance,
|
|
3201
|
-
pcb_keepout_id:
|
|
3202
|
-
layers:
|
|
3218
|
+
pcb_keepout_id: z149.string(),
|
|
3219
|
+
layers: z149.array(z149.string()),
|
|
3203
3220
|
// Specify layers where the keepout applies
|
|
3204
|
-
description:
|
|
3221
|
+
description: z149.string().optional(),
|
|
3205
3222
|
// Optional description of the keepout
|
|
3206
|
-
excluded_pcb_component_ids:
|
|
3223
|
+
excluded_pcb_component_ids: z149.array(z149.string()).optional()
|
|
3207
3224
|
}).or(
|
|
3208
|
-
|
|
3209
|
-
type:
|
|
3210
|
-
shape:
|
|
3211
|
-
pcb_group_id:
|
|
3212
|
-
subcircuit_id:
|
|
3225
|
+
z149.object({
|
|
3226
|
+
type: z149.literal("pcb_keepout"),
|
|
3227
|
+
shape: z149.literal("circle"),
|
|
3228
|
+
pcb_group_id: z149.string().optional(),
|
|
3229
|
+
subcircuit_id: z149.string().optional(),
|
|
3213
3230
|
center: point,
|
|
3214
3231
|
radius: distance,
|
|
3215
|
-
pcb_keepout_id:
|
|
3216
|
-
layers:
|
|
3232
|
+
pcb_keepout_id: z149.string(),
|
|
3233
|
+
layers: z149.array(z149.string()),
|
|
3217
3234
|
// Specify layers where the keepout applies
|
|
3218
|
-
description:
|
|
3235
|
+
description: z149.string().optional(),
|
|
3219
3236
|
// Optional description of the keepout
|
|
3220
|
-
excluded_pcb_component_ids:
|
|
3237
|
+
excluded_pcb_component_ids: z149.array(z149.string()).optional()
|
|
3221
3238
|
})
|
|
3222
3239
|
).or(pcb_keepout_outline);
|
|
3223
3240
|
expectTypesMatch(true);
|
|
3224
3241
|
expectTypesMatch(true);
|
|
3225
3242
|
|
|
3226
3243
|
// src/pcb/pcb_cutout.ts
|
|
3227
|
-
import { z as
|
|
3228
|
-
var pcb_cutout_base =
|
|
3229
|
-
type:
|
|
3244
|
+
import { z as z150 } from "zod";
|
|
3245
|
+
var pcb_cutout_base = z150.object({
|
|
3246
|
+
type: z150.literal("pcb_cutout"),
|
|
3230
3247
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3248
|
+
pcb_component_id: z150.string().optional(),
|
|
3249
|
+
pcb_group_id: z150.string().optional(),
|
|
3250
|
+
subcircuit_id: z150.string().optional(),
|
|
3251
|
+
pcb_board_id: z150.string().optional(),
|
|
3252
|
+
pcb_panel_id: z150.string().optional()
|
|
3235
3253
|
});
|
|
3236
3254
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3237
|
-
shape:
|
|
3255
|
+
shape: z150.literal("rect"),
|
|
3238
3256
|
center: point,
|
|
3239
3257
|
width: length,
|
|
3240
3258
|
height: length,
|
|
@@ -3243,26 +3261,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3243
3261
|
});
|
|
3244
3262
|
expectTypesMatch(true);
|
|
3245
3263
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3246
|
-
shape:
|
|
3264
|
+
shape: z150.literal("circle"),
|
|
3247
3265
|
center: point,
|
|
3248
3266
|
radius: length
|
|
3249
3267
|
});
|
|
3250
3268
|
expectTypesMatch(true);
|
|
3251
3269
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3252
|
-
shape:
|
|
3253
|
-
points:
|
|
3270
|
+
shape: z150.literal("polygon"),
|
|
3271
|
+
points: z150.array(point)
|
|
3254
3272
|
});
|
|
3255
3273
|
expectTypesMatch(true);
|
|
3256
3274
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3257
|
-
shape:
|
|
3258
|
-
route:
|
|
3275
|
+
shape: z150.literal("path"),
|
|
3276
|
+
route: z150.array(point),
|
|
3259
3277
|
slot_width: length,
|
|
3260
3278
|
slot_length: length.optional(),
|
|
3261
3279
|
space_between_slots: length.optional(),
|
|
3262
3280
|
slot_corner_radius: length.optional()
|
|
3263
3281
|
});
|
|
3264
3282
|
expectTypesMatch(true);
|
|
3265
|
-
var pcb_cutout =
|
|
3283
|
+
var pcb_cutout = z150.discriminatedUnion("shape", [
|
|
3266
3284
|
pcb_cutout_rect,
|
|
3267
3285
|
pcb_cutout_circle,
|
|
3268
3286
|
pcb_cutout_polygon,
|
|
@@ -3271,184 +3289,184 @@ var pcb_cutout = z149.discriminatedUnion("shape", [
|
|
|
3271
3289
|
expectTypesMatch(true);
|
|
3272
3290
|
|
|
3273
3291
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3274
|
-
import { z as
|
|
3292
|
+
import { z as z151 } from "zod";
|
|
3275
3293
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3276
|
-
type:
|
|
3294
|
+
type: z151.literal("pcb_missing_footprint_error"),
|
|
3277
3295
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3278
3296
|
"pcb_missing_footprint_error"
|
|
3279
3297
|
),
|
|
3280
|
-
pcb_group_id:
|
|
3281
|
-
subcircuit_id:
|
|
3282
|
-
error_type:
|
|
3283
|
-
source_component_id:
|
|
3298
|
+
pcb_group_id: z151.string().optional(),
|
|
3299
|
+
subcircuit_id: z151.string().optional(),
|
|
3300
|
+
error_type: z151.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3301
|
+
source_component_id: z151.string()
|
|
3284
3302
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3285
3303
|
expectTypesMatch(
|
|
3286
3304
|
true
|
|
3287
3305
|
);
|
|
3288
3306
|
|
|
3289
3307
|
// src/pcb/external_footprint_load_error.ts
|
|
3290
|
-
import { z as
|
|
3308
|
+
import { z as z152 } from "zod";
|
|
3291
3309
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3292
|
-
type:
|
|
3310
|
+
type: z152.literal("external_footprint_load_error"),
|
|
3293
3311
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3294
3312
|
"external_footprint_load_error"
|
|
3295
3313
|
),
|
|
3296
|
-
pcb_component_id:
|
|
3297
|
-
source_component_id:
|
|
3298
|
-
pcb_group_id:
|
|
3299
|
-
subcircuit_id:
|
|
3300
|
-
footprinter_string:
|
|
3301
|
-
error_type:
|
|
3314
|
+
pcb_component_id: z152.string(),
|
|
3315
|
+
source_component_id: z152.string(),
|
|
3316
|
+
pcb_group_id: z152.string().optional(),
|
|
3317
|
+
subcircuit_id: z152.string().optional(),
|
|
3318
|
+
footprinter_string: z152.string().optional(),
|
|
3319
|
+
error_type: z152.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3302
3320
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3303
3321
|
expectTypesMatch(true);
|
|
3304
3322
|
|
|
3305
3323
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3306
|
-
import { z as
|
|
3324
|
+
import { z as z153 } from "zod";
|
|
3307
3325
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3308
|
-
type:
|
|
3326
|
+
type: z153.literal("circuit_json_footprint_load_error"),
|
|
3309
3327
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3310
3328
|
"circuit_json_footprint_load_error"
|
|
3311
3329
|
),
|
|
3312
|
-
pcb_component_id:
|
|
3313
|
-
source_component_id:
|
|
3314
|
-
pcb_group_id:
|
|
3315
|
-
subcircuit_id:
|
|
3316
|
-
error_type:
|
|
3317
|
-
circuit_json:
|
|
3330
|
+
pcb_component_id: z153.string(),
|
|
3331
|
+
source_component_id: z153.string(),
|
|
3332
|
+
pcb_group_id: z153.string().optional(),
|
|
3333
|
+
subcircuit_id: z153.string().optional(),
|
|
3334
|
+
error_type: z153.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3335
|
+
circuit_json: z153.array(z153.any()).optional()
|
|
3318
3336
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3319
3337
|
expectTypesMatch(true);
|
|
3320
3338
|
|
|
3321
3339
|
// src/pcb/pcb_group.ts
|
|
3322
|
-
import { z as
|
|
3323
|
-
var pcb_group =
|
|
3324
|
-
type:
|
|
3340
|
+
import { z as z154 } from "zod";
|
|
3341
|
+
var pcb_group = z154.object({
|
|
3342
|
+
type: z154.literal("pcb_group"),
|
|
3325
3343
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3326
|
-
source_group_id:
|
|
3327
|
-
is_subcircuit:
|
|
3328
|
-
subcircuit_id:
|
|
3344
|
+
source_group_id: z154.string(),
|
|
3345
|
+
is_subcircuit: z154.boolean().optional(),
|
|
3346
|
+
subcircuit_id: z154.string().optional(),
|
|
3329
3347
|
width: length.optional(),
|
|
3330
3348
|
height: length.optional(),
|
|
3331
3349
|
center: point,
|
|
3332
|
-
display_offset_x:
|
|
3350
|
+
display_offset_x: z154.string().optional().describe(
|
|
3333
3351
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3334
3352
|
),
|
|
3335
|
-
display_offset_y:
|
|
3353
|
+
display_offset_y: z154.string().optional().describe(
|
|
3336
3354
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3337
3355
|
),
|
|
3338
|
-
outline:
|
|
3356
|
+
outline: z154.array(point).optional(),
|
|
3339
3357
|
anchor_position: point.optional(),
|
|
3340
3358
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3341
|
-
position_mode:
|
|
3342
|
-
positioned_relative_to_pcb_group_id:
|
|
3343
|
-
positioned_relative_to_pcb_board_id:
|
|
3344
|
-
pcb_component_ids:
|
|
3345
|
-
child_layout_mode:
|
|
3346
|
-
name:
|
|
3347
|
-
description:
|
|
3348
|
-
layout_mode:
|
|
3349
|
-
autorouter_configuration:
|
|
3359
|
+
position_mode: z154.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3360
|
+
positioned_relative_to_pcb_group_id: z154.string().optional(),
|
|
3361
|
+
positioned_relative_to_pcb_board_id: z154.string().optional(),
|
|
3362
|
+
pcb_component_ids: z154.array(z154.string()),
|
|
3363
|
+
child_layout_mode: z154.enum(["packed", "none"]).optional(),
|
|
3364
|
+
name: z154.string().optional(),
|
|
3365
|
+
description: z154.string().optional(),
|
|
3366
|
+
layout_mode: z154.string().optional(),
|
|
3367
|
+
autorouter_configuration: z154.object({
|
|
3350
3368
|
trace_clearance: length
|
|
3351
3369
|
}).optional(),
|
|
3352
|
-
autorouter_used_string:
|
|
3370
|
+
autorouter_used_string: z154.string().optional()
|
|
3353
3371
|
}).describe("Defines a group of components on the PCB");
|
|
3354
3372
|
expectTypesMatch(true);
|
|
3355
3373
|
|
|
3356
3374
|
// src/pcb/pcb_autorouting_error.ts
|
|
3357
|
-
import { z as
|
|
3375
|
+
import { z as z155 } from "zod";
|
|
3358
3376
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3359
|
-
type:
|
|
3377
|
+
type: z155.literal("pcb_autorouting_error"),
|
|
3360
3378
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3361
|
-
error_type:
|
|
3362
|
-
subcircuit_id:
|
|
3379
|
+
error_type: z155.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3380
|
+
subcircuit_id: z155.string().optional()
|
|
3363
3381
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3364
3382
|
expectTypesMatch(true);
|
|
3365
3383
|
|
|
3366
3384
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3367
|
-
import { z as
|
|
3368
|
-
var pcb_manual_edit_conflict_warning =
|
|
3369
|
-
type:
|
|
3385
|
+
import { z as z156 } from "zod";
|
|
3386
|
+
var pcb_manual_edit_conflict_warning = z156.object({
|
|
3387
|
+
type: z156.literal("pcb_manual_edit_conflict_warning"),
|
|
3370
3388
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3371
3389
|
"pcb_manual_edit_conflict_warning"
|
|
3372
3390
|
),
|
|
3373
|
-
warning_type:
|
|
3374
|
-
message:
|
|
3375
|
-
pcb_component_id:
|
|
3376
|
-
pcb_group_id:
|
|
3377
|
-
subcircuit_id:
|
|
3378
|
-
source_component_id:
|
|
3391
|
+
warning_type: z156.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3392
|
+
message: z156.string(),
|
|
3393
|
+
pcb_component_id: z156.string(),
|
|
3394
|
+
pcb_group_id: z156.string().optional(),
|
|
3395
|
+
subcircuit_id: z156.string().optional(),
|
|
3396
|
+
source_component_id: z156.string()
|
|
3379
3397
|
}).describe(
|
|
3380
3398
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3381
3399
|
);
|
|
3382
3400
|
expectTypesMatch(true);
|
|
3383
3401
|
|
|
3384
3402
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3385
|
-
import { z as
|
|
3386
|
-
var connectorOrientationDirection =
|
|
3387
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3388
|
-
type:
|
|
3403
|
+
import { z as z157 } from "zod";
|
|
3404
|
+
var connectorOrientationDirection = z157.enum(["x-", "x+", "y+", "y-"]);
|
|
3405
|
+
var pcb_connector_not_in_accessible_orientation_warning = z157.object({
|
|
3406
|
+
type: z157.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3389
3407
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3390
3408
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3391
3409
|
),
|
|
3392
|
-
warning_type:
|
|
3393
|
-
message:
|
|
3394
|
-
pcb_component_id:
|
|
3395
|
-
source_component_id:
|
|
3396
|
-
pcb_board_id:
|
|
3410
|
+
warning_type: z157.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3411
|
+
message: z157.string(),
|
|
3412
|
+
pcb_component_id: z157.string(),
|
|
3413
|
+
source_component_id: z157.string().optional(),
|
|
3414
|
+
pcb_board_id: z157.string().optional(),
|
|
3397
3415
|
facing_direction: connectorOrientationDirection,
|
|
3398
3416
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3399
|
-
subcircuit_id:
|
|
3417
|
+
subcircuit_id: z157.string().optional()
|
|
3400
3418
|
}).describe(
|
|
3401
3419
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3402
3420
|
);
|
|
3403
3421
|
expectTypesMatch(true);
|
|
3404
3422
|
|
|
3405
3423
|
// src/pcb/pcb_component_missing_courtyard_warning.ts
|
|
3406
|
-
import { z as
|
|
3407
|
-
var pcb_component_missing_courtyard_warning =
|
|
3408
|
-
type:
|
|
3424
|
+
import { z as z158 } from "zod";
|
|
3425
|
+
var pcb_component_missing_courtyard_warning = z158.object({
|
|
3426
|
+
type: z158.literal("pcb_component_missing_courtyard_warning"),
|
|
3409
3427
|
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
3410
3428
|
"pcb_component_missing_courtyard_warning"
|
|
3411
3429
|
),
|
|
3412
|
-
warning_type:
|
|
3413
|
-
message:
|
|
3414
|
-
pcb_component_id:
|
|
3415
|
-
source_component_id:
|
|
3416
|
-
subcircuit_id:
|
|
3430
|
+
warning_type: z158.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
3431
|
+
message: z158.string(),
|
|
3432
|
+
pcb_component_id: z158.string(),
|
|
3433
|
+
source_component_id: z158.string().optional(),
|
|
3434
|
+
subcircuit_id: z158.string().optional()
|
|
3417
3435
|
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
3418
3436
|
expectTypesMatch(true);
|
|
3419
3437
|
|
|
3420
3438
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3421
|
-
import { z as
|
|
3422
|
-
var supplier_footprint_mismatch_warning =
|
|
3423
|
-
type:
|
|
3439
|
+
import { z as z159 } from "zod";
|
|
3440
|
+
var supplier_footprint_mismatch_warning = z159.object({
|
|
3441
|
+
type: z159.literal("supplier_footprint_mismatch_warning"),
|
|
3424
3442
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3425
3443
|
"supplier_footprint_mismatch_warning"
|
|
3426
3444
|
),
|
|
3427
|
-
warning_type:
|
|
3428
|
-
message:
|
|
3429
|
-
source_component_id:
|
|
3430
|
-
pcb_component_id:
|
|
3431
|
-
pcb_group_id:
|
|
3432
|
-
subcircuit_id:
|
|
3445
|
+
warning_type: z159.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3446
|
+
message: z159.string(),
|
|
3447
|
+
source_component_id: z159.string(),
|
|
3448
|
+
pcb_component_id: z159.string().optional(),
|
|
3449
|
+
pcb_group_id: z159.string().optional(),
|
|
3450
|
+
subcircuit_id: z159.string().optional(),
|
|
3433
3451
|
supplier_name: supplier_name.optional(),
|
|
3434
|
-
supplier_part_number:
|
|
3435
|
-
supplier_footprint_url:
|
|
3436
|
-
footprint_copper_intersection_over_union:
|
|
3452
|
+
supplier_part_number: z159.string().optional(),
|
|
3453
|
+
supplier_footprint_url: z159.string().optional(),
|
|
3454
|
+
footprint_copper_intersection_over_union: z159.number()
|
|
3437
3455
|
}).describe(
|
|
3438
3456
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3439
3457
|
);
|
|
3440
3458
|
expectTypesMatch(true);
|
|
3441
3459
|
|
|
3442
3460
|
// src/pcb/pcb_breakout_point.ts
|
|
3443
|
-
import { z as
|
|
3444
|
-
var pcb_breakout_point =
|
|
3445
|
-
type:
|
|
3461
|
+
import { z as z160 } from "zod";
|
|
3462
|
+
var pcb_breakout_point = z160.object({
|
|
3463
|
+
type: z160.literal("pcb_breakout_point"),
|
|
3446
3464
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3447
|
-
pcb_group_id:
|
|
3448
|
-
subcircuit_id:
|
|
3449
|
-
source_trace_id:
|
|
3450
|
-
source_port_id:
|
|
3451
|
-
source_net_id:
|
|
3465
|
+
pcb_group_id: z160.string(),
|
|
3466
|
+
subcircuit_id: z160.string().optional(),
|
|
3467
|
+
source_trace_id: z160.string().optional(),
|
|
3468
|
+
source_port_id: z160.string().optional(),
|
|
3469
|
+
source_net_id: z160.string().optional(),
|
|
3452
3470
|
layer: layer_ref.optional(),
|
|
3453
3471
|
x: distance,
|
|
3454
3472
|
y: distance
|
|
@@ -3458,61 +3476,61 @@ var pcb_breakout_point = z159.object({
|
|
|
3458
3476
|
expectTypesMatch(true);
|
|
3459
3477
|
|
|
3460
3478
|
// src/pcb/pcb_ground_plane.ts
|
|
3461
|
-
import { z as
|
|
3462
|
-
var pcb_ground_plane =
|
|
3463
|
-
type:
|
|
3479
|
+
import { z as z161 } from "zod";
|
|
3480
|
+
var pcb_ground_plane = z161.object({
|
|
3481
|
+
type: z161.literal("pcb_ground_plane"),
|
|
3464
3482
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3465
|
-
source_pcb_ground_plane_id:
|
|
3466
|
-
source_net_id:
|
|
3467
|
-
pcb_group_id:
|
|
3468
|
-
subcircuit_id:
|
|
3483
|
+
source_pcb_ground_plane_id: z161.string(),
|
|
3484
|
+
source_net_id: z161.string(),
|
|
3485
|
+
pcb_group_id: z161.string().optional(),
|
|
3486
|
+
subcircuit_id: z161.string().optional()
|
|
3469
3487
|
}).describe("Defines a ground plane on the PCB");
|
|
3470
3488
|
expectTypesMatch(true);
|
|
3471
3489
|
|
|
3472
3490
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3473
|
-
import { z as
|
|
3474
|
-
var pcb_ground_plane_region =
|
|
3475
|
-
type:
|
|
3491
|
+
import { z as z162 } from "zod";
|
|
3492
|
+
var pcb_ground_plane_region = z162.object({
|
|
3493
|
+
type: z162.literal("pcb_ground_plane_region"),
|
|
3476
3494
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3477
3495
|
"pcb_ground_plane_region"
|
|
3478
3496
|
),
|
|
3479
|
-
pcb_ground_plane_id:
|
|
3480
|
-
pcb_group_id:
|
|
3481
|
-
subcircuit_id:
|
|
3497
|
+
pcb_ground_plane_id: z162.string(),
|
|
3498
|
+
pcb_group_id: z162.string().optional(),
|
|
3499
|
+
subcircuit_id: z162.string().optional(),
|
|
3482
3500
|
layer: layer_ref,
|
|
3483
|
-
points:
|
|
3501
|
+
points: z162.array(point)
|
|
3484
3502
|
}).describe("Defines a polygon region of a ground plane");
|
|
3485
3503
|
expectTypesMatch(true);
|
|
3486
3504
|
|
|
3487
3505
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3488
|
-
import { z as
|
|
3489
|
-
var pcb_thermal_spoke =
|
|
3490
|
-
type:
|
|
3506
|
+
import { z as z163 } from "zod";
|
|
3507
|
+
var pcb_thermal_spoke = z163.object({
|
|
3508
|
+
type: z163.literal("pcb_thermal_spoke"),
|
|
3491
3509
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3492
|
-
pcb_ground_plane_id:
|
|
3493
|
-
shape:
|
|
3494
|
-
spoke_count:
|
|
3510
|
+
pcb_ground_plane_id: z163.string(),
|
|
3511
|
+
shape: z163.string(),
|
|
3512
|
+
spoke_count: z163.number(),
|
|
3495
3513
|
spoke_thickness: distance,
|
|
3496
3514
|
spoke_inner_diameter: distance,
|
|
3497
3515
|
spoke_outer_diameter: distance,
|
|
3498
|
-
pcb_plated_hole_id:
|
|
3499
|
-
subcircuit_id:
|
|
3516
|
+
pcb_plated_hole_id: z163.string().optional(),
|
|
3517
|
+
subcircuit_id: z163.string().optional()
|
|
3500
3518
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3501
3519
|
expectTypesMatch(true);
|
|
3502
3520
|
|
|
3503
3521
|
// src/pcb/pcb_copper_pour.ts
|
|
3504
|
-
import { z as
|
|
3505
|
-
var pcb_copper_pour_base =
|
|
3506
|
-
type:
|
|
3522
|
+
import { z as z164 } from "zod";
|
|
3523
|
+
var pcb_copper_pour_base = z164.object({
|
|
3524
|
+
type: z164.literal("pcb_copper_pour"),
|
|
3507
3525
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3508
|
-
pcb_group_id:
|
|
3509
|
-
subcircuit_id:
|
|
3526
|
+
pcb_group_id: z164.string().optional(),
|
|
3527
|
+
subcircuit_id: z164.string().optional(),
|
|
3510
3528
|
layer: layer_ref,
|
|
3511
|
-
source_net_id:
|
|
3512
|
-
covered_with_solder_mask:
|
|
3529
|
+
source_net_id: z164.string().optional(),
|
|
3530
|
+
covered_with_solder_mask: z164.boolean().optional().default(true)
|
|
3513
3531
|
});
|
|
3514
3532
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3515
|
-
shape:
|
|
3533
|
+
shape: z164.literal("rect"),
|
|
3516
3534
|
center: point,
|
|
3517
3535
|
width: length,
|
|
3518
3536
|
height: length,
|
|
@@ -3520,16 +3538,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3520
3538
|
});
|
|
3521
3539
|
expectTypesMatch(true);
|
|
3522
3540
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3523
|
-
shape:
|
|
3541
|
+
shape: z164.literal("brep"),
|
|
3524
3542
|
brep_shape
|
|
3525
3543
|
});
|
|
3526
3544
|
expectTypesMatch(true);
|
|
3527
3545
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3528
|
-
shape:
|
|
3529
|
-
points:
|
|
3546
|
+
shape: z164.literal("polygon"),
|
|
3547
|
+
points: z164.array(point)
|
|
3530
3548
|
});
|
|
3531
3549
|
expectTypesMatch(true);
|
|
3532
|
-
var pcb_copper_pour =
|
|
3550
|
+
var pcb_copper_pour = z164.discriminatedUnion("shape", [
|
|
3533
3551
|
pcb_copper_pour_rect,
|
|
3534
3552
|
pcb_copper_pour_brep,
|
|
3535
3553
|
pcb_copper_pour_polygon
|
|
@@ -3537,99 +3555,99 @@ var pcb_copper_pour = z163.discriminatedUnion("shape", [
|
|
|
3537
3555
|
expectTypesMatch(true);
|
|
3538
3556
|
|
|
3539
3557
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3540
|
-
import { z as
|
|
3558
|
+
import { z as z165 } from "zod";
|
|
3541
3559
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3542
|
-
type:
|
|
3560
|
+
type: z165.literal("pcb_component_outside_board_error"),
|
|
3543
3561
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3544
3562
|
"pcb_component_outside_board_error"
|
|
3545
3563
|
),
|
|
3546
|
-
error_type:
|
|
3547
|
-
pcb_component_id:
|
|
3548
|
-
pcb_board_id:
|
|
3564
|
+
error_type: z165.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3565
|
+
pcb_component_id: z165.string(),
|
|
3566
|
+
pcb_board_id: z165.string(),
|
|
3549
3567
|
component_center: point,
|
|
3550
|
-
component_bounds:
|
|
3551
|
-
min_x:
|
|
3552
|
-
max_x:
|
|
3553
|
-
min_y:
|
|
3554
|
-
max_y:
|
|
3568
|
+
component_bounds: z165.object({
|
|
3569
|
+
min_x: z165.number(),
|
|
3570
|
+
max_x: z165.number(),
|
|
3571
|
+
min_y: z165.number(),
|
|
3572
|
+
max_y: z165.number()
|
|
3555
3573
|
}),
|
|
3556
|
-
subcircuit_id:
|
|
3557
|
-
source_component_id:
|
|
3574
|
+
subcircuit_id: z165.string().optional(),
|
|
3575
|
+
source_component_id: z165.string().optional()
|
|
3558
3576
|
}).describe(
|
|
3559
3577
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3560
3578
|
);
|
|
3561
3579
|
expectTypesMatch(true);
|
|
3562
3580
|
|
|
3563
3581
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3564
|
-
import { z as
|
|
3582
|
+
import { z as z166 } from "zod";
|
|
3565
3583
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3566
|
-
type:
|
|
3584
|
+
type: z166.literal("pcb_component_not_on_board_edge_error"),
|
|
3567
3585
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3568
3586
|
"pcb_component_not_on_board_edge_error"
|
|
3569
3587
|
),
|
|
3570
|
-
error_type:
|
|
3571
|
-
pcb_component_id:
|
|
3572
|
-
pcb_board_id:
|
|
3588
|
+
error_type: z166.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3589
|
+
pcb_component_id: z166.string(),
|
|
3590
|
+
pcb_board_id: z166.string(),
|
|
3573
3591
|
component_center: point,
|
|
3574
|
-
pad_to_nearest_board_edge_distance:
|
|
3575
|
-
source_component_id:
|
|
3576
|
-
subcircuit_id:
|
|
3592
|
+
pad_to_nearest_board_edge_distance: z166.number(),
|
|
3593
|
+
source_component_id: z166.string().optional(),
|
|
3594
|
+
subcircuit_id: z166.string().optional()
|
|
3577
3595
|
}).describe(
|
|
3578
3596
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3579
3597
|
);
|
|
3580
3598
|
expectTypesMatch(true);
|
|
3581
3599
|
|
|
3582
3600
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3583
|
-
import { z as
|
|
3601
|
+
import { z as z167 } from "zod";
|
|
3584
3602
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3585
|
-
type:
|
|
3603
|
+
type: z167.literal("pcb_component_invalid_layer_error"),
|
|
3586
3604
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3587
3605
|
"pcb_component_invalid_layer_error"
|
|
3588
3606
|
),
|
|
3589
|
-
error_type:
|
|
3590
|
-
pcb_component_id:
|
|
3591
|
-
source_component_id:
|
|
3607
|
+
error_type: z167.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3608
|
+
pcb_component_id: z167.string().optional(),
|
|
3609
|
+
source_component_id: z167.string(),
|
|
3592
3610
|
layer: layer_ref,
|
|
3593
|
-
subcircuit_id:
|
|
3611
|
+
subcircuit_id: z167.string().optional()
|
|
3594
3612
|
}).describe(
|
|
3595
3613
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3596
3614
|
);
|
|
3597
3615
|
expectTypesMatch(true);
|
|
3598
3616
|
|
|
3599
3617
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3600
|
-
import { z as
|
|
3618
|
+
import { z as z168 } from "zod";
|
|
3601
3619
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3602
|
-
type:
|
|
3620
|
+
type: z168.literal("pcb_via_clearance_error"),
|
|
3603
3621
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3604
|
-
error_type:
|
|
3605
|
-
pcb_via_ids:
|
|
3622
|
+
error_type: z168.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3623
|
+
pcb_via_ids: z168.array(z168.string()).min(2),
|
|
3606
3624
|
minimum_clearance: distance.optional(),
|
|
3607
3625
|
actual_clearance: distance.optional(),
|
|
3608
|
-
pcb_center:
|
|
3609
|
-
x:
|
|
3610
|
-
y:
|
|
3626
|
+
pcb_center: z168.object({
|
|
3627
|
+
x: z168.number().optional(),
|
|
3628
|
+
y: z168.number().optional()
|
|
3611
3629
|
}).optional(),
|
|
3612
|
-
subcircuit_id:
|
|
3630
|
+
subcircuit_id: z168.string().optional()
|
|
3613
3631
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3614
3632
|
expectTypesMatch(true);
|
|
3615
3633
|
|
|
3616
3634
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3617
|
-
import { z as
|
|
3635
|
+
import { z as z169 } from "zod";
|
|
3618
3636
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3619
|
-
type:
|
|
3637
|
+
type: z169.literal("pcb_via_trace_clearance_error"),
|
|
3620
3638
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3621
3639
|
"pcb_via_trace_clearance_error"
|
|
3622
3640
|
),
|
|
3623
|
-
error_type:
|
|
3624
|
-
pcb_via_id:
|
|
3625
|
-
pcb_trace_id:
|
|
3641
|
+
error_type: z169.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3642
|
+
pcb_via_id: z169.string(),
|
|
3643
|
+
pcb_trace_id: z169.string(),
|
|
3626
3644
|
minimum_clearance: distance.optional(),
|
|
3627
3645
|
actual_clearance: distance.optional(),
|
|
3628
|
-
center:
|
|
3629
|
-
x:
|
|
3630
|
-
y:
|
|
3646
|
+
center: z169.object({
|
|
3647
|
+
x: z169.number().optional(),
|
|
3648
|
+
y: z169.number().optional()
|
|
3631
3649
|
}).optional(),
|
|
3632
|
-
subcircuit_id:
|
|
3650
|
+
subcircuit_id: z169.string().optional()
|
|
3633
3651
|
}).describe(
|
|
3634
3652
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3635
3653
|
);
|
|
@@ -3638,41 +3656,41 @@ expectTypesMatch(
|
|
|
3638
3656
|
);
|
|
3639
3657
|
|
|
3640
3658
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3641
|
-
import { z as
|
|
3659
|
+
import { z as z170 } from "zod";
|
|
3642
3660
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3643
|
-
type:
|
|
3661
|
+
type: z170.literal("pcb_pad_pad_clearance_error"),
|
|
3644
3662
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3645
3663
|
"pcb_pad_pad_clearance_error"
|
|
3646
3664
|
),
|
|
3647
|
-
error_type:
|
|
3648
|
-
pcb_pad_ids:
|
|
3665
|
+
error_type: z170.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3666
|
+
pcb_pad_ids: z170.array(z170.string()).min(2),
|
|
3649
3667
|
minimum_clearance: distance.optional(),
|
|
3650
3668
|
actual_clearance: distance.optional(),
|
|
3651
|
-
center:
|
|
3652
|
-
x:
|
|
3653
|
-
y:
|
|
3669
|
+
center: z170.object({
|
|
3670
|
+
x: z170.number().optional(),
|
|
3671
|
+
y: z170.number().optional()
|
|
3654
3672
|
}).optional(),
|
|
3655
|
-
subcircuit_id:
|
|
3673
|
+
subcircuit_id: z170.string().optional()
|
|
3656
3674
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3657
3675
|
expectTypesMatch(true);
|
|
3658
3676
|
|
|
3659
3677
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3660
|
-
import { z as
|
|
3678
|
+
import { z as z171 } from "zod";
|
|
3661
3679
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3662
|
-
type:
|
|
3680
|
+
type: z171.literal("pcb_pad_trace_clearance_error"),
|
|
3663
3681
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3664
3682
|
"pcb_pad_trace_clearance_error"
|
|
3665
3683
|
),
|
|
3666
|
-
error_type:
|
|
3667
|
-
pcb_pad_id:
|
|
3668
|
-
pcb_trace_id:
|
|
3684
|
+
error_type: z171.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3685
|
+
pcb_pad_id: z171.string(),
|
|
3686
|
+
pcb_trace_id: z171.string(),
|
|
3669
3687
|
minimum_clearance: distance.optional(),
|
|
3670
3688
|
actual_clearance: distance.optional(),
|
|
3671
|
-
center:
|
|
3672
|
-
x:
|
|
3673
|
-
y:
|
|
3689
|
+
center: z171.object({
|
|
3690
|
+
x: z171.number().optional(),
|
|
3691
|
+
y: z171.number().optional()
|
|
3674
3692
|
}).optional(),
|
|
3675
|
-
subcircuit_id:
|
|
3693
|
+
subcircuit_id: z171.string().optional()
|
|
3676
3694
|
}).describe(
|
|
3677
3695
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3678
3696
|
);
|
|
@@ -3681,89 +3699,89 @@ expectTypesMatch(
|
|
|
3681
3699
|
);
|
|
3682
3700
|
|
|
3683
3701
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3684
|
-
import { z as
|
|
3685
|
-
var pcb_courtyard_rect =
|
|
3686
|
-
type:
|
|
3702
|
+
import { z as z172 } from "zod";
|
|
3703
|
+
var pcb_courtyard_rect = z172.object({
|
|
3704
|
+
type: z172.literal("pcb_courtyard_rect"),
|
|
3687
3705
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3688
|
-
pcb_component_id:
|
|
3689
|
-
pcb_group_id:
|
|
3690
|
-
subcircuit_id:
|
|
3706
|
+
pcb_component_id: z172.string(),
|
|
3707
|
+
pcb_group_id: z172.string().optional(),
|
|
3708
|
+
subcircuit_id: z172.string().optional(),
|
|
3691
3709
|
center: point,
|
|
3692
3710
|
width: length,
|
|
3693
3711
|
height: length,
|
|
3694
3712
|
layer: visible_layer,
|
|
3695
3713
|
ccw_rotation: rotation.optional(),
|
|
3696
|
-
color:
|
|
3714
|
+
color: z172.string().optional()
|
|
3697
3715
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3698
3716
|
expectTypesMatch(true);
|
|
3699
3717
|
|
|
3700
3718
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3701
|
-
import { z as
|
|
3702
|
-
var pcb_courtyard_outline =
|
|
3703
|
-
type:
|
|
3719
|
+
import { z as z173 } from "zod";
|
|
3720
|
+
var pcb_courtyard_outline = z173.object({
|
|
3721
|
+
type: z173.literal("pcb_courtyard_outline"),
|
|
3704
3722
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3705
3723
|
"pcb_courtyard_outline"
|
|
3706
3724
|
),
|
|
3707
|
-
pcb_component_id:
|
|
3708
|
-
pcb_group_id:
|
|
3709
|
-
subcircuit_id:
|
|
3725
|
+
pcb_component_id: z173.string(),
|
|
3726
|
+
pcb_group_id: z173.string().optional(),
|
|
3727
|
+
subcircuit_id: z173.string().optional(),
|
|
3710
3728
|
layer: visible_layer,
|
|
3711
|
-
outline:
|
|
3729
|
+
outline: z173.array(point).min(2)
|
|
3712
3730
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3713
3731
|
expectTypesMatch(true);
|
|
3714
3732
|
|
|
3715
3733
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3716
|
-
import { z as
|
|
3717
|
-
var pcb_courtyard_polygon =
|
|
3718
|
-
type:
|
|
3734
|
+
import { z as z174 } from "zod";
|
|
3735
|
+
var pcb_courtyard_polygon = z174.object({
|
|
3736
|
+
type: z174.literal("pcb_courtyard_polygon"),
|
|
3719
3737
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3720
3738
|
"pcb_courtyard_polygon"
|
|
3721
3739
|
),
|
|
3722
|
-
pcb_component_id:
|
|
3723
|
-
pcb_group_id:
|
|
3724
|
-
subcircuit_id:
|
|
3740
|
+
pcb_component_id: z174.string(),
|
|
3741
|
+
pcb_group_id: z174.string().optional(),
|
|
3742
|
+
subcircuit_id: z174.string().optional(),
|
|
3725
3743
|
layer: visible_layer,
|
|
3726
|
-
points:
|
|
3727
|
-
color:
|
|
3744
|
+
points: z174.array(point).min(3),
|
|
3745
|
+
color: z174.string().optional()
|
|
3728
3746
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3729
3747
|
expectTypesMatch(true);
|
|
3730
3748
|
|
|
3731
3749
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3732
|
-
import { z as
|
|
3733
|
-
var pcb_courtyard_circle =
|
|
3734
|
-
type:
|
|
3750
|
+
import { z as z175 } from "zod";
|
|
3751
|
+
var pcb_courtyard_circle = z175.object({
|
|
3752
|
+
type: z175.literal("pcb_courtyard_circle"),
|
|
3735
3753
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3736
3754
|
"pcb_courtyard_circle"
|
|
3737
3755
|
),
|
|
3738
|
-
pcb_component_id:
|
|
3739
|
-
pcb_group_id:
|
|
3740
|
-
subcircuit_id:
|
|
3756
|
+
pcb_component_id: z175.string(),
|
|
3757
|
+
pcb_group_id: z175.string().optional(),
|
|
3758
|
+
subcircuit_id: z175.string().optional(),
|
|
3741
3759
|
center: point,
|
|
3742
3760
|
radius: length,
|
|
3743
3761
|
layer: visible_layer,
|
|
3744
|
-
color:
|
|
3762
|
+
color: z175.string().optional()
|
|
3745
3763
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3746
3764
|
expectTypesMatch(true);
|
|
3747
3765
|
|
|
3748
3766
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3749
|
-
import { z as
|
|
3750
|
-
var pcb_courtyard_pill =
|
|
3751
|
-
type:
|
|
3767
|
+
import { z as z176 } from "zod";
|
|
3768
|
+
var pcb_courtyard_pill = z176.object({
|
|
3769
|
+
type: z176.literal("pcb_courtyard_pill"),
|
|
3752
3770
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3753
|
-
pcb_component_id:
|
|
3754
|
-
pcb_group_id:
|
|
3755
|
-
subcircuit_id:
|
|
3771
|
+
pcb_component_id: z176.string(),
|
|
3772
|
+
pcb_group_id: z176.string().optional(),
|
|
3773
|
+
subcircuit_id: z176.string().optional(),
|
|
3756
3774
|
center: point,
|
|
3757
3775
|
width: length,
|
|
3758
3776
|
height: length,
|
|
3759
3777
|
radius: length,
|
|
3760
3778
|
layer: visible_layer,
|
|
3761
|
-
color:
|
|
3779
|
+
color: z176.string().optional()
|
|
3762
3780
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3763
3781
|
expectTypesMatch(true);
|
|
3764
3782
|
|
|
3765
3783
|
// src/cad/cad_component.ts
|
|
3766
|
-
import { z as
|
|
3784
|
+
import { z as z177 } from "zod";
|
|
3767
3785
|
|
|
3768
3786
|
// src/cad/cad_model_conventions.ts
|
|
3769
3787
|
var cad_model_formats = [
|
|
@@ -3794,50 +3812,50 @@ var cadModelDefaultDirectionMap = {
|
|
|
3794
3812
|
};
|
|
3795
3813
|
|
|
3796
3814
|
// src/cad/cad_component.ts
|
|
3797
|
-
var cad_component =
|
|
3798
|
-
type:
|
|
3799
|
-
cad_component_id:
|
|
3800
|
-
pcb_component_id:
|
|
3801
|
-
source_component_id:
|
|
3815
|
+
var cad_component = z177.object({
|
|
3816
|
+
type: z177.literal("cad_component"),
|
|
3817
|
+
cad_component_id: z177.string(),
|
|
3818
|
+
pcb_component_id: z177.string(),
|
|
3819
|
+
source_component_id: z177.string(),
|
|
3802
3820
|
position: point3,
|
|
3803
3821
|
rotation: point3.optional(),
|
|
3804
3822
|
size: point3.optional(),
|
|
3805
3823
|
layer: layer_ref.optional(),
|
|
3806
|
-
subcircuit_id:
|
|
3824
|
+
subcircuit_id: z177.string().optional(),
|
|
3807
3825
|
// These are all ways to generate/load the 3d model
|
|
3808
|
-
footprinter_string:
|
|
3809
|
-
model_obj_url:
|
|
3810
|
-
model_stl_url:
|
|
3811
|
-
model_3mf_url:
|
|
3812
|
-
model_gltf_url:
|
|
3813
|
-
model_glb_url:
|
|
3814
|
-
model_step_url:
|
|
3815
|
-
model_wrl_url:
|
|
3826
|
+
footprinter_string: z177.string().optional(),
|
|
3827
|
+
model_obj_url: z177.string().optional(),
|
|
3828
|
+
model_stl_url: z177.string().optional(),
|
|
3829
|
+
model_3mf_url: z177.string().optional(),
|
|
3830
|
+
model_gltf_url: z177.string().optional(),
|
|
3831
|
+
model_glb_url: z177.string().optional(),
|
|
3832
|
+
model_step_url: z177.string().optional(),
|
|
3833
|
+
model_wrl_url: z177.string().optional(),
|
|
3816
3834
|
model_asset: asset.optional(),
|
|
3817
|
-
model_unit_to_mm_scale_factor:
|
|
3818
|
-
model_board_normal_direction:
|
|
3835
|
+
model_unit_to_mm_scale_factor: z177.number().optional(),
|
|
3836
|
+
model_board_normal_direction: z177.enum(cad_model_axis_directions).optional().describe(
|
|
3819
3837
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3820
3838
|
),
|
|
3821
3839
|
model_origin_position: point3.optional(),
|
|
3822
|
-
model_origin_alignment:
|
|
3840
|
+
model_origin_alignment: z177.enum([
|
|
3823
3841
|
"unknown",
|
|
3824
3842
|
"center",
|
|
3825
3843
|
"center_of_component_on_board_surface",
|
|
3826
3844
|
"bottom_center_of_component"
|
|
3827
3845
|
]).optional(),
|
|
3828
|
-
model_object_fit:
|
|
3829
|
-
model_jscad:
|
|
3830
|
-
show_as_translucent_model:
|
|
3831
|
-
show_as_bounding_box:
|
|
3832
|
-
show_hidden_edges:
|
|
3833
|
-
anchor_alignment:
|
|
3846
|
+
model_object_fit: z177.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3847
|
+
model_jscad: z177.any().optional(),
|
|
3848
|
+
show_as_translucent_model: z177.boolean().optional(),
|
|
3849
|
+
show_as_bounding_box: z177.boolean().optional(),
|
|
3850
|
+
show_hidden_edges: z177.boolean().optional(),
|
|
3851
|
+
anchor_alignment: z177.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3834
3852
|
}).describe("Defines a component on the PCB");
|
|
3835
3853
|
expectTypesMatch(true);
|
|
3836
3854
|
|
|
3837
3855
|
// src/simulation/simulation_voltage_source.ts
|
|
3838
|
-
import { z as
|
|
3839
|
-
var wave_shape =
|
|
3840
|
-
var percentage =
|
|
3856
|
+
import { z as z178 } from "zod";
|
|
3857
|
+
var wave_shape = z178.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3858
|
+
var percentage = z178.union([z178.string(), z178.number()]).transform((val) => {
|
|
3841
3859
|
if (typeof val === "string") {
|
|
3842
3860
|
if (val.endsWith("%")) {
|
|
3843
3861
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3846,32 +3864,32 @@ var percentage = z177.union([z177.string(), z177.number()]).transform((val) => {
|
|
|
3846
3864
|
}
|
|
3847
3865
|
return val;
|
|
3848
3866
|
}).pipe(
|
|
3849
|
-
|
|
3867
|
+
z178.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3850
3868
|
);
|
|
3851
|
-
var simulation_dc_voltage_source =
|
|
3852
|
-
type:
|
|
3869
|
+
var simulation_dc_voltage_source = z178.object({
|
|
3870
|
+
type: z178.literal("simulation_voltage_source"),
|
|
3853
3871
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3854
3872
|
"simulation_voltage_source"
|
|
3855
3873
|
),
|
|
3856
|
-
is_dc_source:
|
|
3857
|
-
positive_source_port_id:
|
|
3858
|
-
negative_source_port_id:
|
|
3859
|
-
positive_source_net_id:
|
|
3860
|
-
negative_source_net_id:
|
|
3874
|
+
is_dc_source: z178.literal(true).optional().default(true),
|
|
3875
|
+
positive_source_port_id: z178.string().optional(),
|
|
3876
|
+
negative_source_port_id: z178.string().optional(),
|
|
3877
|
+
positive_source_net_id: z178.string().optional(),
|
|
3878
|
+
negative_source_net_id: z178.string().optional(),
|
|
3861
3879
|
voltage,
|
|
3862
3880
|
ac_magnitude: voltage.optional(),
|
|
3863
3881
|
ac_phase: rotation.optional()
|
|
3864
3882
|
}).describe("Defines a DC voltage source for simulation");
|
|
3865
|
-
var simulation_ac_voltage_source =
|
|
3866
|
-
type:
|
|
3883
|
+
var simulation_ac_voltage_source = z178.object({
|
|
3884
|
+
type: z178.literal("simulation_voltage_source"),
|
|
3867
3885
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3868
3886
|
"simulation_voltage_source"
|
|
3869
3887
|
),
|
|
3870
|
-
is_dc_source:
|
|
3871
|
-
terminal1_source_port_id:
|
|
3872
|
-
terminal2_source_port_id:
|
|
3873
|
-
terminal1_source_net_id:
|
|
3874
|
-
terminal2_source_net_id:
|
|
3888
|
+
is_dc_source: z178.literal(false),
|
|
3889
|
+
terminal1_source_port_id: z178.string().optional(),
|
|
3890
|
+
terminal2_source_port_id: z178.string().optional(),
|
|
3891
|
+
terminal1_source_net_id: z178.string().optional(),
|
|
3892
|
+
terminal2_source_net_id: z178.string().optional(),
|
|
3875
3893
|
voltage: voltage.optional(),
|
|
3876
3894
|
frequency: frequency.optional(),
|
|
3877
3895
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3886,14 +3904,14 @@ var simulation_ac_voltage_source = z177.object({
|
|
|
3886
3904
|
ac_magnitude: voltage.optional(),
|
|
3887
3905
|
ac_phase: rotation.optional()
|
|
3888
3906
|
}).describe("Defines an AC voltage source for simulation");
|
|
3889
|
-
var simulation_voltage_source =
|
|
3907
|
+
var simulation_voltage_source = z178.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3890
3908
|
expectTypesMatch(true);
|
|
3891
3909
|
expectTypesMatch(true);
|
|
3892
3910
|
expectTypesMatch(true);
|
|
3893
3911
|
|
|
3894
3912
|
// src/simulation/simulation_current_source.ts
|
|
3895
|
-
import { z as
|
|
3896
|
-
var percentage2 =
|
|
3913
|
+
import { z as z179 } from "zod";
|
|
3914
|
+
var percentage2 = z179.union([z179.string(), z179.number()]).transform((val) => {
|
|
3897
3915
|
if (typeof val === "string") {
|
|
3898
3916
|
if (val.endsWith("%")) {
|
|
3899
3917
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3902,32 +3920,32 @@ var percentage2 = z178.union([z178.string(), z178.number()]).transform((val) =>
|
|
|
3902
3920
|
}
|
|
3903
3921
|
return val;
|
|
3904
3922
|
}).pipe(
|
|
3905
|
-
|
|
3923
|
+
z179.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3906
3924
|
);
|
|
3907
|
-
var simulation_dc_current_source =
|
|
3908
|
-
type:
|
|
3925
|
+
var simulation_dc_current_source = z179.object({
|
|
3926
|
+
type: z179.literal("simulation_current_source"),
|
|
3909
3927
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3910
3928
|
"simulation_current_source"
|
|
3911
3929
|
),
|
|
3912
|
-
is_dc_source:
|
|
3913
|
-
positive_source_port_id:
|
|
3914
|
-
negative_source_port_id:
|
|
3915
|
-
positive_source_net_id:
|
|
3916
|
-
negative_source_net_id:
|
|
3930
|
+
is_dc_source: z179.literal(true).optional().default(true),
|
|
3931
|
+
positive_source_port_id: z179.string().optional(),
|
|
3932
|
+
negative_source_port_id: z179.string().optional(),
|
|
3933
|
+
positive_source_net_id: z179.string().optional(),
|
|
3934
|
+
negative_source_net_id: z179.string().optional(),
|
|
3917
3935
|
current,
|
|
3918
3936
|
ac_magnitude: current.optional(),
|
|
3919
3937
|
ac_phase: rotation.optional()
|
|
3920
3938
|
}).describe("Defines a DC current source for simulation");
|
|
3921
|
-
var simulation_ac_current_source =
|
|
3922
|
-
type:
|
|
3939
|
+
var simulation_ac_current_source = z179.object({
|
|
3940
|
+
type: z179.literal("simulation_current_source"),
|
|
3923
3941
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3924
3942
|
"simulation_current_source"
|
|
3925
3943
|
),
|
|
3926
|
-
is_dc_source:
|
|
3927
|
-
terminal1_source_port_id:
|
|
3928
|
-
terminal2_source_port_id:
|
|
3929
|
-
terminal1_source_net_id:
|
|
3930
|
-
terminal2_source_net_id:
|
|
3944
|
+
is_dc_source: z179.literal(false),
|
|
3945
|
+
terminal1_source_port_id: z179.string().optional(),
|
|
3946
|
+
terminal2_source_port_id: z179.string().optional(),
|
|
3947
|
+
terminal1_source_net_id: z179.string().optional(),
|
|
3948
|
+
terminal2_source_net_id: z179.string().optional(),
|
|
3931
3949
|
current: current.optional(),
|
|
3932
3950
|
frequency: frequency.optional(),
|
|
3933
3951
|
peak_to_peak_current: current.optional(),
|
|
@@ -3937,58 +3955,58 @@ var simulation_ac_current_source = z178.object({
|
|
|
3937
3955
|
ac_magnitude: current.optional(),
|
|
3938
3956
|
ac_phase: rotation.optional()
|
|
3939
3957
|
}).describe("Defines an AC current source for simulation");
|
|
3940
|
-
var simulation_current_source =
|
|
3958
|
+
var simulation_current_source = z179.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3941
3959
|
expectTypesMatch(true);
|
|
3942
3960
|
expectTypesMatch(true);
|
|
3943
3961
|
expectTypesMatch(true);
|
|
3944
3962
|
|
|
3945
3963
|
// src/simulation/simulation_experiment.ts
|
|
3946
|
-
import { z as
|
|
3964
|
+
import { z as z181 } from "zod";
|
|
3947
3965
|
|
|
3948
3966
|
// src/simulation/simulation_units.ts
|
|
3949
|
-
import { z as
|
|
3950
|
-
var simulation_dc_sweep_unit =
|
|
3967
|
+
import { z as z180 } from "zod";
|
|
3968
|
+
var simulation_dc_sweep_unit = z180.custom(
|
|
3951
3969
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
3952
3970
|
);
|
|
3953
|
-
var simulation_parameter_unit =
|
|
3971
|
+
var simulation_parameter_unit = z180.custom(
|
|
3954
3972
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
3955
3973
|
);
|
|
3956
3974
|
|
|
3957
3975
|
// src/simulation/simulation_experiment.ts
|
|
3958
|
-
var experiment_type =
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3976
|
+
var experiment_type = z181.union([
|
|
3977
|
+
z181.literal("spice_dc_sweep"),
|
|
3978
|
+
z181.literal("spice_dc_operating_point"),
|
|
3979
|
+
z181.literal("spice_transient_analysis"),
|
|
3980
|
+
z181.literal("spice_ac_analysis")
|
|
3963
3981
|
]);
|
|
3964
|
-
var spice_simulation_options =
|
|
3965
|
-
method:
|
|
3966
|
-
reltol:
|
|
3967
|
-
abstol:
|
|
3968
|
-
vntol:
|
|
3982
|
+
var spice_simulation_options = z181.object({
|
|
3983
|
+
method: z181.enum(["trap", "gear"]).optional(),
|
|
3984
|
+
reltol: z181.union([z181.number(), z181.string()]).optional(),
|
|
3985
|
+
abstol: z181.union([z181.number(), z181.string()]).optional(),
|
|
3986
|
+
vntol: z181.union([z181.number(), z181.string()]).optional()
|
|
3969
3987
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3970
|
-
var simulation_experiment =
|
|
3971
|
-
type:
|
|
3988
|
+
var simulation_experiment = z181.object({
|
|
3989
|
+
type: z181.literal("simulation_experiment"),
|
|
3972
3990
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3973
3991
|
"simulation_experiment"
|
|
3974
3992
|
),
|
|
3975
|
-
name:
|
|
3993
|
+
name: z181.string(),
|
|
3976
3994
|
experiment_type,
|
|
3977
3995
|
time_per_step: duration_ms.optional(),
|
|
3978
3996
|
start_time_ms: ms.optional(),
|
|
3979
3997
|
end_time_ms: ms.optional(),
|
|
3980
3998
|
spice_options: spice_simulation_options.optional(),
|
|
3981
|
-
dc_sweep_voltage_source_id:
|
|
3982
|
-
dc_sweep_current_source_id:
|
|
3983
|
-
dc_sweep_start:
|
|
3984
|
-
dc_sweep_stop:
|
|
3985
|
-
dc_sweep_step:
|
|
3999
|
+
dc_sweep_voltage_source_id: z181.string().optional(),
|
|
4000
|
+
dc_sweep_current_source_id: z181.string().optional(),
|
|
4001
|
+
dc_sweep_start: z181.number().optional(),
|
|
4002
|
+
dc_sweep_stop: z181.number().optional(),
|
|
4003
|
+
dc_sweep_step: z181.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
3986
4004
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
3987
|
-
ac_sweep_type:
|
|
3988
|
-
ac_samples_per_interval:
|
|
3989
|
-
ac_sample_count:
|
|
3990
|
-
ac_start_frequency_hz:
|
|
3991
|
-
ac_stop_frequency_hz:
|
|
4005
|
+
ac_sweep_type: z181.enum(["linear", "decade", "octave"]).optional(),
|
|
4006
|
+
ac_samples_per_interval: z181.number().int().positive().optional(),
|
|
4007
|
+
ac_sample_count: z181.number().int().positive().optional(),
|
|
4008
|
+
ac_start_frequency_hz: z181.number().positive().optional(),
|
|
4009
|
+
ac_stop_frequency_hz: z181.number().positive().optional()
|
|
3992
4010
|
}).superRefine((experiment, context) => {
|
|
3993
4011
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
3994
4012
|
const requiredFields = [
|
|
@@ -4000,7 +4018,7 @@ var simulation_experiment = z180.object({
|
|
|
4000
4018
|
for (const field of requiredFields) {
|
|
4001
4019
|
if (experiment[field] === void 0) {
|
|
4002
4020
|
context.addIssue({
|
|
4003
|
-
code:
|
|
4021
|
+
code: z181.ZodIssueCode.custom,
|
|
4004
4022
|
path: [field],
|
|
4005
4023
|
message: `${field} is required for a DC sweep`
|
|
4006
4024
|
});
|
|
@@ -4010,7 +4028,7 @@ var simulation_experiment = z180.object({
|
|
|
4010
4028
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
4011
4029
|
if (hasVoltageSource === hasCurrentSource) {
|
|
4012
4030
|
context.addIssue({
|
|
4013
|
-
code:
|
|
4031
|
+
code: z181.ZodIssueCode.custom,
|
|
4014
4032
|
path: ["dc_sweep_voltage_source_id"],
|
|
4015
4033
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
4016
4034
|
});
|
|
@@ -4019,35 +4037,35 @@ var simulation_experiment = z180.object({
|
|
|
4019
4037
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
4020
4038
|
if (experiment.ac_sweep_type === void 0) {
|
|
4021
4039
|
context.addIssue({
|
|
4022
|
-
code:
|
|
4040
|
+
code: z181.ZodIssueCode.custom,
|
|
4023
4041
|
path: ["ac_sweep_type"],
|
|
4024
4042
|
message: "ac_sweep_type is required for an AC analysis"
|
|
4025
4043
|
});
|
|
4026
4044
|
}
|
|
4027
4045
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
4028
4046
|
context.addIssue({
|
|
4029
|
-
code:
|
|
4047
|
+
code: z181.ZodIssueCode.custom,
|
|
4030
4048
|
path: ["ac_start_frequency_hz"],
|
|
4031
4049
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
4032
4050
|
});
|
|
4033
4051
|
}
|
|
4034
4052
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
4035
4053
|
context.addIssue({
|
|
4036
|
-
code:
|
|
4054
|
+
code: z181.ZodIssueCode.custom,
|
|
4037
4055
|
path: ["ac_stop_frequency_hz"],
|
|
4038
4056
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
4039
4057
|
});
|
|
4040
4058
|
}
|
|
4041
4059
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
4042
4060
|
context.addIssue({
|
|
4043
|
-
code:
|
|
4061
|
+
code: z181.ZodIssueCode.custom,
|
|
4044
4062
|
path: ["ac_sample_count"],
|
|
4045
4063
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
4046
4064
|
});
|
|
4047
4065
|
}
|
|
4048
4066
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
4049
4067
|
context.addIssue({
|
|
4050
|
-
code:
|
|
4068
|
+
code: z181.ZodIssueCode.custom,
|
|
4051
4069
|
path: ["ac_samples_per_interval"],
|
|
4052
4070
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
4053
4071
|
});
|
|
@@ -4057,87 +4075,87 @@ var simulation_experiment = z180.object({
|
|
|
4057
4075
|
expectTypesMatch(true);
|
|
4058
4076
|
|
|
4059
4077
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4060
|
-
import { z as
|
|
4078
|
+
import { z as z183 } from "zod";
|
|
4061
4079
|
|
|
4062
4080
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
4063
|
-
import { z as
|
|
4064
|
-
var simulation_parameter_sweep_coordinate =
|
|
4065
|
-
simulation_parameter_sweep_id:
|
|
4066
|
-
sweep_index:
|
|
4067
|
-
parameter_value:
|
|
4081
|
+
import { z as z182 } from "zod";
|
|
4082
|
+
var simulation_parameter_sweep_coordinate = z182.object({
|
|
4083
|
+
simulation_parameter_sweep_id: z182.string(),
|
|
4084
|
+
sweep_index: z182.number().int().nonnegative(),
|
|
4085
|
+
parameter_value: z182.number(),
|
|
4068
4086
|
parameter_unit: simulation_parameter_unit
|
|
4069
4087
|
});
|
|
4070
4088
|
expectTypesMatch(true);
|
|
4071
4089
|
|
|
4072
4090
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4073
|
-
var simulation_transient_voltage_graph =
|
|
4074
|
-
type:
|
|
4091
|
+
var simulation_transient_voltage_graph = z183.object({
|
|
4092
|
+
type: z183.literal("simulation_transient_voltage_graph"),
|
|
4075
4093
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4076
4094
|
"simulation_transient_voltage_graph"
|
|
4077
4095
|
),
|
|
4078
|
-
simulation_experiment_id:
|
|
4096
|
+
simulation_experiment_id: z183.string(),
|
|
4079
4097
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4080
|
-
timestamps_ms:
|
|
4081
|
-
voltage_levels:
|
|
4082
|
-
source_component_id:
|
|
4083
|
-
subcircuit_connectivity_map_key:
|
|
4098
|
+
timestamps_ms: z183.array(z183.number()).optional(),
|
|
4099
|
+
voltage_levels: z183.array(z183.number()),
|
|
4100
|
+
source_component_id: z183.string().optional(),
|
|
4101
|
+
subcircuit_connectivity_map_key: z183.string().optional(),
|
|
4084
4102
|
time_per_step: duration_ms,
|
|
4085
4103
|
start_time_ms: ms,
|
|
4086
4104
|
end_time_ms: ms,
|
|
4087
|
-
name:
|
|
4088
|
-
color:
|
|
4105
|
+
name: z183.string().optional(),
|
|
4106
|
+
color: z183.string().optional()
|
|
4089
4107
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4090
4108
|
expectTypesMatch(true);
|
|
4091
4109
|
|
|
4092
4110
|
// src/simulation/simulation_transient_current_graph.ts
|
|
4093
|
-
import { z as
|
|
4094
|
-
var simulation_transient_current_graph =
|
|
4095
|
-
type:
|
|
4111
|
+
import { z as z184 } from "zod";
|
|
4112
|
+
var simulation_transient_current_graph = z184.object({
|
|
4113
|
+
type: z184.literal("simulation_transient_current_graph"),
|
|
4096
4114
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4097
4115
|
"simulation_transient_current_graph"
|
|
4098
4116
|
),
|
|
4099
|
-
simulation_experiment_id:
|
|
4117
|
+
simulation_experiment_id: z184.string(),
|
|
4100
4118
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4101
|
-
timestamps_ms:
|
|
4102
|
-
current_levels:
|
|
4103
|
-
source_component_id:
|
|
4104
|
-
subcircuit_connectivity_map_key:
|
|
4119
|
+
timestamps_ms: z184.array(z184.number()).optional(),
|
|
4120
|
+
current_levels: z184.array(z184.number()),
|
|
4121
|
+
source_component_id: z184.string().optional(),
|
|
4122
|
+
subcircuit_connectivity_map_key: z184.string().optional(),
|
|
4105
4123
|
time_per_step: duration_ms,
|
|
4106
4124
|
start_time_ms: ms,
|
|
4107
4125
|
end_time_ms: ms,
|
|
4108
|
-
name:
|
|
4109
|
-
color:
|
|
4126
|
+
name: z184.string().optional(),
|
|
4127
|
+
color: z184.string().optional()
|
|
4110
4128
|
}).describe("Stores current measurements over time for a simulation");
|
|
4111
4129
|
expectTypesMatch(true);
|
|
4112
4130
|
|
|
4113
4131
|
// src/simulation/simulation_switch.ts
|
|
4114
|
-
import { z as
|
|
4115
|
-
var simulation_switch =
|
|
4116
|
-
type:
|
|
4132
|
+
import { z as z185 } from "zod";
|
|
4133
|
+
var simulation_switch = z185.object({
|
|
4134
|
+
type: z185.literal("simulation_switch"),
|
|
4117
4135
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4118
|
-
source_component_id:
|
|
4136
|
+
source_component_id: z185.string().optional(),
|
|
4119
4137
|
closes_at: ms.optional(),
|
|
4120
4138
|
opens_at: ms.optional(),
|
|
4121
|
-
starts_closed:
|
|
4139
|
+
starts_closed: z185.boolean().optional(),
|
|
4122
4140
|
switching_frequency: frequency.optional()
|
|
4123
4141
|
}).describe("Defines a switch for simulation timing control");
|
|
4124
4142
|
expectTypesMatch(true);
|
|
4125
4143
|
|
|
4126
4144
|
// src/simulation/simulation_voltage_probe.ts
|
|
4127
|
-
import { z as
|
|
4128
|
-
var simulation_voltage_probe =
|
|
4129
|
-
type:
|
|
4145
|
+
import { z as z186 } from "zod";
|
|
4146
|
+
var simulation_voltage_probe = z186.object({
|
|
4147
|
+
type: z186.literal("simulation_voltage_probe"),
|
|
4130
4148
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4131
4149
|
"simulation_voltage_probe"
|
|
4132
4150
|
),
|
|
4133
|
-
source_component_id:
|
|
4134
|
-
name:
|
|
4135
|
-
signal_input_source_port_id:
|
|
4136
|
-
signal_input_source_net_id:
|
|
4137
|
-
reference_input_source_port_id:
|
|
4138
|
-
reference_input_source_net_id:
|
|
4139
|
-
subcircuit_id:
|
|
4140
|
-
color:
|
|
4151
|
+
source_component_id: z186.string().optional(),
|
|
4152
|
+
name: z186.string().optional(),
|
|
4153
|
+
signal_input_source_port_id: z186.string().optional(),
|
|
4154
|
+
signal_input_source_net_id: z186.string().optional(),
|
|
4155
|
+
reference_input_source_port_id: z186.string().optional(),
|
|
4156
|
+
reference_input_source_net_id: z186.string().optional(),
|
|
4157
|
+
subcircuit_id: z186.string().optional(),
|
|
4158
|
+
color: z186.string().optional()
|
|
4141
4159
|
}).describe(
|
|
4142
4160
|
"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."
|
|
4143
4161
|
).superRefine((data, ctx) => {
|
|
@@ -4147,20 +4165,20 @@ var simulation_voltage_probe = z185.object({
|
|
|
4147
4165
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4148
4166
|
if (has_ports && has_nets) {
|
|
4149
4167
|
ctx.addIssue({
|
|
4150
|
-
code:
|
|
4168
|
+
code: z186.ZodIssueCode.custom,
|
|
4151
4169
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4152
4170
|
});
|
|
4153
4171
|
} else if (has_ports) {
|
|
4154
4172
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4155
4173
|
ctx.addIssue({
|
|
4156
|
-
code:
|
|
4174
|
+
code: z186.ZodIssueCode.custom,
|
|
4157
4175
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4158
4176
|
});
|
|
4159
4177
|
}
|
|
4160
4178
|
} else if (has_nets) {
|
|
4161
4179
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4162
4180
|
ctx.addIssue({
|
|
4163
|
-
code:
|
|
4181
|
+
code: z186.ZodIssueCode.custom,
|
|
4164
4182
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4165
4183
|
});
|
|
4166
4184
|
}
|
|
@@ -4168,7 +4186,7 @@ var simulation_voltage_probe = z185.object({
|
|
|
4168
4186
|
} else {
|
|
4169
4187
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4170
4188
|
ctx.addIssue({
|
|
4171
|
-
code:
|
|
4189
|
+
code: z186.ZodIssueCode.custom,
|
|
4172
4190
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4173
4191
|
});
|
|
4174
4192
|
}
|
|
@@ -4177,20 +4195,20 @@ var simulation_voltage_probe = z185.object({
|
|
|
4177
4195
|
expectTypesMatch(true);
|
|
4178
4196
|
|
|
4179
4197
|
// src/simulation/simulation_current_probe.ts
|
|
4180
|
-
import { z as
|
|
4181
|
-
var simulation_current_probe =
|
|
4182
|
-
type:
|
|
4198
|
+
import { z as z187 } from "zod";
|
|
4199
|
+
var simulation_current_probe = z187.object({
|
|
4200
|
+
type: z187.literal("simulation_current_probe"),
|
|
4183
4201
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4184
4202
|
"simulation_current_probe"
|
|
4185
4203
|
),
|
|
4186
|
-
source_component_id:
|
|
4187
|
-
name:
|
|
4188
|
-
positive_source_port_id:
|
|
4189
|
-
negative_source_port_id:
|
|
4190
|
-
positive_source_net_id:
|
|
4191
|
-
negative_source_net_id:
|
|
4192
|
-
subcircuit_id:
|
|
4193
|
-
color:
|
|
4204
|
+
source_component_id: z187.string().optional(),
|
|
4205
|
+
name: z187.string().optional(),
|
|
4206
|
+
positive_source_port_id: z187.string().optional(),
|
|
4207
|
+
negative_source_port_id: z187.string().optional(),
|
|
4208
|
+
positive_source_net_id: z187.string().optional(),
|
|
4209
|
+
negative_source_net_id: z187.string().optional(),
|
|
4210
|
+
subcircuit_id: z187.string().optional(),
|
|
4211
|
+
color: z187.string().optional()
|
|
4194
4212
|
}).describe(
|
|
4195
4213
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4196
4214
|
).superRefine((data, ctx) => {
|
|
@@ -4202,7 +4220,7 @@ var simulation_current_probe = z186.object({
|
|
|
4202
4220
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4203
4221
|
if (hasPorts && hasNets) {
|
|
4204
4222
|
ctx.addIssue({
|
|
4205
|
-
code:
|
|
4223
|
+
code: z187.ZodIssueCode.custom,
|
|
4206
4224
|
message: "Cannot mix port and net connections in a current probe."
|
|
4207
4225
|
});
|
|
4208
4226
|
return;
|
|
@@ -4210,7 +4228,7 @@ var simulation_current_probe = z186.object({
|
|
|
4210
4228
|
if (hasPorts) {
|
|
4211
4229
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4212
4230
|
ctx.addIssue({
|
|
4213
|
-
code:
|
|
4231
|
+
code: z187.ZodIssueCode.custom,
|
|
4214
4232
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4215
4233
|
});
|
|
4216
4234
|
}
|
|
@@ -4219,71 +4237,71 @@ var simulation_current_probe = z186.object({
|
|
|
4219
4237
|
if (hasNets) {
|
|
4220
4238
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4221
4239
|
ctx.addIssue({
|
|
4222
|
-
code:
|
|
4240
|
+
code: z187.ZodIssueCode.custom,
|
|
4223
4241
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4224
4242
|
});
|
|
4225
4243
|
}
|
|
4226
4244
|
return;
|
|
4227
4245
|
}
|
|
4228
4246
|
ctx.addIssue({
|
|
4229
|
-
code:
|
|
4247
|
+
code: z187.ZodIssueCode.custom,
|
|
4230
4248
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4231
4249
|
});
|
|
4232
4250
|
});
|
|
4233
4251
|
expectTypesMatch(true);
|
|
4234
4252
|
|
|
4235
4253
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4236
|
-
import { z as
|
|
4254
|
+
import { z as z188 } from "zod";
|
|
4237
4255
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4238
|
-
type:
|
|
4256
|
+
type: z188.literal("simulation_unknown_experiment_error"),
|
|
4239
4257
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4240
4258
|
"simulation_unknown_experiment_error"
|
|
4241
4259
|
),
|
|
4242
|
-
error_type:
|
|
4243
|
-
simulation_experiment_id:
|
|
4244
|
-
subcircuit_id:
|
|
4260
|
+
error_type: z188.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4261
|
+
simulation_experiment_id: z188.string().optional(),
|
|
4262
|
+
subcircuit_id: z188.string().optional()
|
|
4245
4263
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4246
4264
|
expectTypesMatch(true);
|
|
4247
4265
|
|
|
4248
4266
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4249
|
-
import { z as
|
|
4250
|
-
var simulation_parameter_type =
|
|
4267
|
+
import { z as z189 } from "zod";
|
|
4268
|
+
var simulation_parameter_type = z189.enum([
|
|
4251
4269
|
"resistance",
|
|
4252
4270
|
"capacitance",
|
|
4253
4271
|
"inductance",
|
|
4254
4272
|
"voltage",
|
|
4255
4273
|
"current"
|
|
4256
4274
|
]);
|
|
4257
|
-
var simulation_parameter_sweep_base =
|
|
4258
|
-
type:
|
|
4275
|
+
var simulation_parameter_sweep_base = z189.object({
|
|
4276
|
+
type: z189.literal("simulation_parameter_sweep"),
|
|
4259
4277
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4260
4278
|
"simulation_parameter_sweep"
|
|
4261
4279
|
),
|
|
4262
|
-
simulation_experiment_id:
|
|
4263
|
-
name:
|
|
4264
|
-
parameter_values:
|
|
4280
|
+
simulation_experiment_id: z189.string(),
|
|
4281
|
+
name: z189.string().optional(),
|
|
4282
|
+
parameter_values: z189.array(z189.number()).min(1),
|
|
4265
4283
|
parameter_unit: simulation_parameter_unit
|
|
4266
4284
|
});
|
|
4267
|
-
var simulation_parameter_sweep =
|
|
4285
|
+
var simulation_parameter_sweep = z189.discriminatedUnion("parameter_type", [
|
|
4268
4286
|
simulation_parameter_sweep_base.extend({
|
|
4269
|
-
parameter_type:
|
|
4270
|
-
resistor_source_component_id:
|
|
4287
|
+
parameter_type: z189.literal("resistance"),
|
|
4288
|
+
resistor_source_component_id: z189.string()
|
|
4271
4289
|
}),
|
|
4272
4290
|
simulation_parameter_sweep_base.extend({
|
|
4273
|
-
parameter_type:
|
|
4274
|
-
capacitor_source_component_id:
|
|
4291
|
+
parameter_type: z189.literal("capacitance"),
|
|
4292
|
+
capacitor_source_component_id: z189.string()
|
|
4275
4293
|
}),
|
|
4276
4294
|
simulation_parameter_sweep_base.extend({
|
|
4277
|
-
parameter_type:
|
|
4278
|
-
inductor_source_component_id:
|
|
4295
|
+
parameter_type: z189.literal("inductance"),
|
|
4296
|
+
inductor_source_component_id: z189.string()
|
|
4279
4297
|
}),
|
|
4280
4298
|
simulation_parameter_sweep_base.extend({
|
|
4281
|
-
parameter_type:
|
|
4282
|
-
source_net_id:
|
|
4299
|
+
parameter_type: z189.literal("voltage"),
|
|
4300
|
+
source_net_id: z189.string()
|
|
4283
4301
|
}),
|
|
4284
4302
|
simulation_parameter_sweep_base.extend({
|
|
4285
|
-
parameter_type:
|
|
4286
|
-
current_source_component_id:
|
|
4303
|
+
parameter_type: z189.literal("current"),
|
|
4304
|
+
current_source_component_id: z189.string()
|
|
4287
4305
|
})
|
|
4288
4306
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4289
4307
|
expectTypesMatch(
|
|
@@ -4291,52 +4309,52 @@ expectTypesMatch(
|
|
|
4291
4309
|
);
|
|
4292
4310
|
|
|
4293
4311
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4294
|
-
import { z as
|
|
4295
|
-
var simulation_dc_operating_point_voltage =
|
|
4296
|
-
type:
|
|
4312
|
+
import { z as z190 } from "zod";
|
|
4313
|
+
var simulation_dc_operating_point_voltage = z190.object({
|
|
4314
|
+
type: z190.literal("simulation_dc_operating_point_voltage"),
|
|
4297
4315
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4298
4316
|
"simulation_dc_operating_point_voltage"
|
|
4299
4317
|
),
|
|
4300
|
-
simulation_experiment_id:
|
|
4318
|
+
simulation_experiment_id: z190.string(),
|
|
4301
4319
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4302
|
-
simulation_voltage_probe_id:
|
|
4303
|
-
voltage:
|
|
4304
|
-
name:
|
|
4305
|
-
color:
|
|
4320
|
+
simulation_voltage_probe_id: z190.string(),
|
|
4321
|
+
voltage: z190.number(),
|
|
4322
|
+
name: z190.string().optional(),
|
|
4323
|
+
color: z190.string().optional()
|
|
4306
4324
|
});
|
|
4307
4325
|
expectTypesMatch(true);
|
|
4308
4326
|
|
|
4309
4327
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4310
|
-
import { z as
|
|
4311
|
-
var simulation_dc_operating_point_current =
|
|
4312
|
-
type:
|
|
4328
|
+
import { z as z191 } from "zod";
|
|
4329
|
+
var simulation_dc_operating_point_current = z191.object({
|
|
4330
|
+
type: z191.literal("simulation_dc_operating_point_current"),
|
|
4313
4331
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4314
4332
|
"simulation_dc_operating_point_current"
|
|
4315
4333
|
),
|
|
4316
|
-
simulation_experiment_id:
|
|
4334
|
+
simulation_experiment_id: z191.string(),
|
|
4317
4335
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4318
|
-
simulation_current_probe_id:
|
|
4319
|
-
current:
|
|
4320
|
-
name:
|
|
4321
|
-
color:
|
|
4336
|
+
simulation_current_probe_id: z191.string(),
|
|
4337
|
+
current: z191.number(),
|
|
4338
|
+
name: z191.string().optional(),
|
|
4339
|
+
color: z191.string().optional()
|
|
4322
4340
|
});
|
|
4323
4341
|
expectTypesMatch(true);
|
|
4324
4342
|
|
|
4325
4343
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4326
|
-
import { z as
|
|
4327
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4328
|
-
type:
|
|
4344
|
+
import { z as z192 } from "zod";
|
|
4345
|
+
var simulation_dc_sweep_voltage_graph = z192.object({
|
|
4346
|
+
type: z192.literal("simulation_dc_sweep_voltage_graph"),
|
|
4329
4347
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4330
4348
|
"simulation_dc_sweep_voltage_graph"
|
|
4331
4349
|
),
|
|
4332
|
-
simulation_experiment_id:
|
|
4350
|
+
simulation_experiment_id: z192.string(),
|
|
4333
4351
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4334
|
-
simulation_voltage_probe_id:
|
|
4335
|
-
sweep_values:
|
|
4352
|
+
simulation_voltage_probe_id: z192.string(),
|
|
4353
|
+
sweep_values: z192.array(z192.number()),
|
|
4336
4354
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4337
|
-
voltage_levels:
|
|
4338
|
-
name:
|
|
4339
|
-
color:
|
|
4355
|
+
voltage_levels: z192.array(z192.number()),
|
|
4356
|
+
name: z192.string().optional(),
|
|
4357
|
+
color: z192.string().optional()
|
|
4340
4358
|
}).refine(
|
|
4341
4359
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4342
4360
|
{
|
|
@@ -4346,20 +4364,20 @@ var simulation_dc_sweep_voltage_graph = z191.object({
|
|
|
4346
4364
|
expectTypesMatch(true);
|
|
4347
4365
|
|
|
4348
4366
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
4349
|
-
import { z as
|
|
4350
|
-
var simulation_dc_sweep_current_graph =
|
|
4351
|
-
type:
|
|
4367
|
+
import { z as z193 } from "zod";
|
|
4368
|
+
var simulation_dc_sweep_current_graph = z193.object({
|
|
4369
|
+
type: z193.literal("simulation_dc_sweep_current_graph"),
|
|
4352
4370
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4353
4371
|
"simulation_dc_sweep_current_graph"
|
|
4354
4372
|
),
|
|
4355
|
-
simulation_experiment_id:
|
|
4373
|
+
simulation_experiment_id: z193.string(),
|
|
4356
4374
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4357
|
-
simulation_current_probe_id:
|
|
4358
|
-
sweep_values:
|
|
4375
|
+
simulation_current_probe_id: z193.string(),
|
|
4376
|
+
sweep_values: z193.array(z193.number()),
|
|
4359
4377
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4360
|
-
current_levels:
|
|
4361
|
-
name:
|
|
4362
|
-
color:
|
|
4378
|
+
current_levels: z193.array(z193.number()),
|
|
4379
|
+
name: z193.string().optional(),
|
|
4380
|
+
color: z193.string().optional()
|
|
4363
4381
|
}).refine(
|
|
4364
4382
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4365
4383
|
{
|
|
@@ -4369,29 +4387,29 @@ var simulation_dc_sweep_current_graph = z192.object({
|
|
|
4369
4387
|
expectTypesMatch(true);
|
|
4370
4388
|
|
|
4371
4389
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4372
|
-
import { z as
|
|
4390
|
+
import { z as z195 } from "zod";
|
|
4373
4391
|
|
|
4374
4392
|
// src/simulation/simulation_complex_sample.ts
|
|
4375
|
-
import { z as
|
|
4376
|
-
var simulation_complex_sample =
|
|
4377
|
-
re:
|
|
4378
|
-
im:
|
|
4393
|
+
import { z as z194 } from "zod";
|
|
4394
|
+
var simulation_complex_sample = z194.object({
|
|
4395
|
+
re: z194.number(),
|
|
4396
|
+
im: z194.number()
|
|
4379
4397
|
});
|
|
4380
4398
|
expectTypesMatch(true);
|
|
4381
4399
|
|
|
4382
4400
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4383
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4384
|
-
type:
|
|
4401
|
+
var simulation_ac_sweep_voltage_graph = z195.object({
|
|
4402
|
+
type: z195.literal("simulation_ac_sweep_voltage_graph"),
|
|
4385
4403
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4386
4404
|
"simulation_ac_sweep_voltage_graph"
|
|
4387
4405
|
),
|
|
4388
|
-
simulation_experiment_id:
|
|
4406
|
+
simulation_experiment_id: z195.string(),
|
|
4389
4407
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4390
|
-
simulation_voltage_probe_id:
|
|
4391
|
-
frequencies_hz:
|
|
4392
|
-
complex_voltages:
|
|
4393
|
-
name:
|
|
4394
|
-
color:
|
|
4408
|
+
simulation_voltage_probe_id: z195.string(),
|
|
4409
|
+
frequencies_hz: z195.array(z195.number()),
|
|
4410
|
+
complex_voltages: z195.array(simulation_complex_sample),
|
|
4411
|
+
name: z195.string().optional(),
|
|
4412
|
+
color: z195.string().optional()
|
|
4395
4413
|
}).refine(
|
|
4396
4414
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4397
4415
|
{
|
|
@@ -4401,19 +4419,19 @@ var simulation_ac_sweep_voltage_graph = z194.object({
|
|
|
4401
4419
|
expectTypesMatch(true);
|
|
4402
4420
|
|
|
4403
4421
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
4404
|
-
import { z as
|
|
4405
|
-
var simulation_ac_sweep_current_graph =
|
|
4406
|
-
type:
|
|
4422
|
+
import { z as z196 } from "zod";
|
|
4423
|
+
var simulation_ac_sweep_current_graph = z196.object({
|
|
4424
|
+
type: z196.literal("simulation_ac_sweep_current_graph"),
|
|
4407
4425
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4408
4426
|
"simulation_ac_sweep_current_graph"
|
|
4409
4427
|
),
|
|
4410
|
-
simulation_experiment_id:
|
|
4428
|
+
simulation_experiment_id: z196.string(),
|
|
4411
4429
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4412
|
-
simulation_current_probe_id:
|
|
4413
|
-
frequencies_hz:
|
|
4414
|
-
complex_currents:
|
|
4415
|
-
name:
|
|
4416
|
-
color:
|
|
4430
|
+
simulation_current_probe_id: z196.string(),
|
|
4431
|
+
frequencies_hz: z196.array(z196.number()),
|
|
4432
|
+
complex_currents: z196.array(simulation_complex_sample),
|
|
4433
|
+
name: z196.string().optional(),
|
|
4434
|
+
color: z196.string().optional()
|
|
4417
4435
|
}).refine(
|
|
4418
4436
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4419
4437
|
{
|
|
@@ -4423,52 +4441,52 @@ var simulation_ac_sweep_current_graph = z195.object({
|
|
|
4423
4441
|
expectTypesMatch(true);
|
|
4424
4442
|
|
|
4425
4443
|
// src/simulation/simulation_op_amp.ts
|
|
4426
|
-
import { z as
|
|
4427
|
-
var simulation_op_amp =
|
|
4428
|
-
type:
|
|
4444
|
+
import { z as z197 } from "zod";
|
|
4445
|
+
var simulation_op_amp = z197.object({
|
|
4446
|
+
type: z197.literal("simulation_op_amp"),
|
|
4429
4447
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
4430
|
-
source_component_id:
|
|
4431
|
-
inverting_input_source_port_id:
|
|
4432
|
-
non_inverting_input_source_port_id:
|
|
4433
|
-
output_source_port_id:
|
|
4434
|
-
positive_supply_source_port_id:
|
|
4435
|
-
negative_supply_source_port_id:
|
|
4448
|
+
source_component_id: z197.string().optional(),
|
|
4449
|
+
inverting_input_source_port_id: z197.string(),
|
|
4450
|
+
non_inverting_input_source_port_id: z197.string(),
|
|
4451
|
+
output_source_port_id: z197.string(),
|
|
4452
|
+
positive_supply_source_port_id: z197.string(),
|
|
4453
|
+
negative_supply_source_port_id: z197.string()
|
|
4436
4454
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4437
4455
|
expectTypesMatch(true);
|
|
4438
4456
|
|
|
4439
4457
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
4440
|
-
import { z as
|
|
4441
|
-
var simulation_spice_subcircuit =
|
|
4442
|
-
type:
|
|
4458
|
+
import { z as z198 } from "zod";
|
|
4459
|
+
var simulation_spice_subcircuit = z198.object({
|
|
4460
|
+
type: z198.literal("simulation_spice_subcircuit"),
|
|
4443
4461
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4444
4462
|
"simulation_spice_subcircuit"
|
|
4445
4463
|
),
|
|
4446
|
-
source_component_id:
|
|
4447
|
-
spice_pin_to_source_port_map:
|
|
4448
|
-
subcircuit_source:
|
|
4464
|
+
source_component_id: z198.string(),
|
|
4465
|
+
spice_pin_to_source_port_map: z198.record(z198.string(), z198.string()),
|
|
4466
|
+
subcircuit_source: z198.string()
|
|
4449
4467
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4450
4468
|
expectTypesMatch(
|
|
4451
4469
|
true
|
|
4452
4470
|
);
|
|
4453
4471
|
|
|
4454
4472
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
4455
|
-
import { z as
|
|
4473
|
+
import { z as z199 } from "zod";
|
|
4456
4474
|
var hasValue = (value) => value !== void 0;
|
|
4457
|
-
var simulation_oscilloscope_trace =
|
|
4458
|
-
type:
|
|
4475
|
+
var simulation_oscilloscope_trace = z199.object({
|
|
4476
|
+
type: z199.literal("simulation_oscilloscope_trace"),
|
|
4459
4477
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4460
4478
|
"simulation_oscilloscope_trace"
|
|
4461
4479
|
),
|
|
4462
|
-
simulation_transient_voltage_graph_id:
|
|
4463
|
-
simulation_transient_current_graph_id:
|
|
4464
|
-
simulation_voltage_probe_id:
|
|
4465
|
-
simulation_current_probe_id:
|
|
4466
|
-
display_name:
|
|
4467
|
-
color:
|
|
4468
|
-
display_center_value:
|
|
4469
|
-
display_center_offset_divs:
|
|
4470
|
-
volts_per_div:
|
|
4471
|
-
amps_per_div:
|
|
4480
|
+
simulation_transient_voltage_graph_id: z199.string().optional(),
|
|
4481
|
+
simulation_transient_current_graph_id: z199.string().optional(),
|
|
4482
|
+
simulation_voltage_probe_id: z199.string().optional(),
|
|
4483
|
+
simulation_current_probe_id: z199.string().optional(),
|
|
4484
|
+
display_name: z199.string().optional(),
|
|
4485
|
+
color: z199.string().optional(),
|
|
4486
|
+
display_center_value: z199.number().optional(),
|
|
4487
|
+
display_center_offset_divs: z199.number().optional(),
|
|
4488
|
+
volts_per_div: z199.number().positive().optional(),
|
|
4489
|
+
amps_per_div: z199.number().positive().optional()
|
|
4472
4490
|
}).describe(
|
|
4473
4491
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4474
4492
|
).superRefine((data, ctx) => {
|
|
@@ -4482,19 +4500,19 @@ var simulation_oscilloscope_trace = z198.object({
|
|
|
4482
4500
|
].filter(hasValue).length;
|
|
4483
4501
|
if (voltageReferences + currentReferences !== 1) {
|
|
4484
4502
|
ctx.addIssue({
|
|
4485
|
-
code:
|
|
4503
|
+
code: z199.ZodIssueCode.custom,
|
|
4486
4504
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4487
4505
|
});
|
|
4488
4506
|
}
|
|
4489
4507
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4490
4508
|
ctx.addIssue({
|
|
4491
|
-
code:
|
|
4509
|
+
code: z199.ZodIssueCode.custom,
|
|
4492
4510
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4493
4511
|
});
|
|
4494
4512
|
}
|
|
4495
4513
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4496
4514
|
ctx.addIssue({
|
|
4497
|
-
code:
|
|
4515
|
+
code: z199.ZodIssueCode.custom,
|
|
4498
4516
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4499
4517
|
});
|
|
4500
4518
|
}
|
|
@@ -4502,8 +4520,8 @@ var simulation_oscilloscope_trace = z198.object({
|
|
|
4502
4520
|
expectTypesMatch(true);
|
|
4503
4521
|
|
|
4504
4522
|
// src/any_circuit_element.ts
|
|
4505
|
-
import { z as
|
|
4506
|
-
var any_circuit_element =
|
|
4523
|
+
import { z as z200 } from "zod";
|
|
4524
|
+
var any_circuit_element = z200.union([
|
|
4507
4525
|
source_trace,
|
|
4508
4526
|
source_port,
|
|
4509
4527
|
source_component_internal_connection,
|
|
@@ -4536,6 +4554,7 @@ var any_circuit_element = z199.union([
|
|
|
4536
4554
|
source_trace_not_connected_error,
|
|
4537
4555
|
source_pin_missing_trace_warning,
|
|
4538
4556
|
source_unnamed_trace_warning,
|
|
4557
|
+
source_confusing_net_name_warning,
|
|
4539
4558
|
source_missing_manufacturer_part_number_warning,
|
|
4540
4559
|
source_refdes_convention_warning,
|
|
4541
4560
|
source_no_power_pin_defined_warning,
|
|
@@ -4892,6 +4911,7 @@ export {
|
|
|
4892
4911
|
source_component_internal_connection,
|
|
4893
4912
|
source_component_misconfigured_error,
|
|
4894
4913
|
source_component_pins_underspecified_warning,
|
|
4914
|
+
source_confusing_net_name_warning,
|
|
4895
4915
|
source_failed_to_create_component_error,
|
|
4896
4916
|
source_group,
|
|
4897
4917
|
source_i2c_misconfigured_error,
|