circuit-json 0.0.295 → 0.0.297
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/dist/index.d.mts +88 -1
- package/dist/index.mjs +783 -766
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1204,76 +1204,88 @@ var schematic_table_cell = z64.object({
|
|
|
1204
1204
|
}).describe("Defines a cell within a schematic_table");
|
|
1205
1205
|
expectTypesMatch(true);
|
|
1206
1206
|
|
|
1207
|
-
// src/
|
|
1207
|
+
// src/schematic/schematic_sheet.ts
|
|
1208
1208
|
import { z as z65 } from "zod";
|
|
1209
|
-
var
|
|
1209
|
+
var schematic_sheet = z65.object({
|
|
1210
|
+
type: z65.literal("schematic_sheet"),
|
|
1211
|
+
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1212
|
+
name: z65.string().optional(),
|
|
1213
|
+
subcircuit_id: z65.string().optional()
|
|
1214
|
+
}).describe(
|
|
1215
|
+
"Defines a schematic sheet or page that components can be placed on"
|
|
1216
|
+
);
|
|
1217
|
+
expectTypesMatch(true);
|
|
1218
|
+
|
|
1219
|
+
// src/pcb/properties/brep.ts
|
|
1220
|
+
import { z as z66 } from "zod";
|
|
1221
|
+
var point_with_bulge = z66.object({
|
|
1210
1222
|
x: distance,
|
|
1211
1223
|
y: distance,
|
|
1212
|
-
bulge:
|
|
1224
|
+
bulge: z66.number().optional()
|
|
1213
1225
|
});
|
|
1214
1226
|
expectTypesMatch(true);
|
|
1215
|
-
var ring =
|
|
1216
|
-
vertices:
|
|
1227
|
+
var ring = z66.object({
|
|
1228
|
+
vertices: z66.array(point_with_bulge)
|
|
1217
1229
|
});
|
|
1218
1230
|
expectTypesMatch(true);
|
|
1219
|
-
var brep_shape =
|
|
1231
|
+
var brep_shape = z66.object({
|
|
1220
1232
|
outer_ring: ring,
|
|
1221
|
-
inner_rings:
|
|
1233
|
+
inner_rings: z66.array(ring).default([])
|
|
1222
1234
|
});
|
|
1223
1235
|
expectTypesMatch(true);
|
|
1224
1236
|
|
|
1225
1237
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1226
|
-
import { z as
|
|
1227
|
-
var pcb_route_hint =
|
|
1238
|
+
import { z as z67 } from "zod";
|
|
1239
|
+
var pcb_route_hint = z67.object({
|
|
1228
1240
|
x: distance,
|
|
1229
1241
|
y: distance,
|
|
1230
|
-
via:
|
|
1242
|
+
via: z67.boolean().optional(),
|
|
1231
1243
|
via_to_layer: layer_ref.optional()
|
|
1232
1244
|
});
|
|
1233
|
-
var pcb_route_hints =
|
|
1245
|
+
var pcb_route_hints = z67.array(pcb_route_hint);
|
|
1234
1246
|
expectTypesMatch(true);
|
|
1235
1247
|
expectTypesMatch(true);
|
|
1236
1248
|
|
|
1237
1249
|
// src/pcb/properties/route_hint_point.ts
|
|
1238
|
-
import { z as
|
|
1239
|
-
var route_hint_point =
|
|
1250
|
+
import { z as z68 } from "zod";
|
|
1251
|
+
var route_hint_point = z68.object({
|
|
1240
1252
|
x: distance,
|
|
1241
1253
|
y: distance,
|
|
1242
|
-
via:
|
|
1254
|
+
via: z68.boolean().optional(),
|
|
1243
1255
|
to_layer: layer_ref.optional(),
|
|
1244
1256
|
trace_width: distance.optional()
|
|
1245
1257
|
});
|
|
1246
1258
|
expectTypesMatch(true);
|
|
1247
1259
|
|
|
1248
1260
|
// src/pcb/pcb_component.ts
|
|
1249
|
-
import { z as
|
|
1250
|
-
var pcb_component =
|
|
1251
|
-
type:
|
|
1261
|
+
import { z as z69 } from "zod";
|
|
1262
|
+
var pcb_component = z69.object({
|
|
1263
|
+
type: z69.literal("pcb_component"),
|
|
1252
1264
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1253
|
-
source_component_id:
|
|
1265
|
+
source_component_id: z69.string(),
|
|
1254
1266
|
center: point,
|
|
1255
1267
|
layer: layer_ref,
|
|
1256
1268
|
rotation,
|
|
1257
1269
|
width: length,
|
|
1258
1270
|
height: length,
|
|
1259
|
-
do_not_place:
|
|
1260
|
-
subcircuit_id:
|
|
1261
|
-
pcb_group_id:
|
|
1262
|
-
obstructs_within_bounds:
|
|
1271
|
+
do_not_place: z69.boolean().optional(),
|
|
1272
|
+
subcircuit_id: z69.string().optional(),
|
|
1273
|
+
pcb_group_id: z69.string().optional(),
|
|
1274
|
+
obstructs_within_bounds: z69.boolean().default(true).describe(
|
|
1263
1275
|
"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"
|
|
1264
1276
|
)
|
|
1265
1277
|
}).describe("Defines a component on the PCB");
|
|
1266
1278
|
expectTypesMatch(true);
|
|
1267
1279
|
|
|
1268
1280
|
// src/pcb/pcb_hole.ts
|
|
1269
|
-
import { z as
|
|
1270
|
-
var pcb_hole_circle_or_square =
|
|
1271
|
-
type:
|
|
1281
|
+
import { z as z70 } from "zod";
|
|
1282
|
+
var pcb_hole_circle_or_square = z70.object({
|
|
1283
|
+
type: z70.literal("pcb_hole"),
|
|
1272
1284
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1273
|
-
pcb_group_id:
|
|
1274
|
-
subcircuit_id:
|
|
1275
|
-
hole_shape:
|
|
1276
|
-
hole_diameter:
|
|
1285
|
+
pcb_group_id: z70.string().optional(),
|
|
1286
|
+
subcircuit_id: z70.string().optional(),
|
|
1287
|
+
hole_shape: z70.enum(["circle", "square"]),
|
|
1288
|
+
hole_diameter: z70.number(),
|
|
1277
1289
|
x: distance,
|
|
1278
1290
|
y: distance
|
|
1279
1291
|
});
|
|
@@ -1281,14 +1293,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
|
1281
1293
|
"Defines a circular or square hole on the PCB"
|
|
1282
1294
|
);
|
|
1283
1295
|
expectTypesMatch(true);
|
|
1284
|
-
var pcb_hole_oval =
|
|
1285
|
-
type:
|
|
1296
|
+
var pcb_hole_oval = z70.object({
|
|
1297
|
+
type: z70.literal("pcb_hole"),
|
|
1286
1298
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1287
|
-
pcb_group_id:
|
|
1288
|
-
subcircuit_id:
|
|
1289
|
-
hole_shape:
|
|
1290
|
-
hole_width:
|
|
1291
|
-
hole_height:
|
|
1299
|
+
pcb_group_id: z70.string().optional(),
|
|
1300
|
+
subcircuit_id: z70.string().optional(),
|
|
1301
|
+
hole_shape: z70.literal("oval"),
|
|
1302
|
+
hole_width: z70.number(),
|
|
1303
|
+
hole_height: z70.number(),
|
|
1292
1304
|
x: distance,
|
|
1293
1305
|
y: distance
|
|
1294
1306
|
});
|
|
@@ -1296,14 +1308,14 @@ var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
|
1296
1308
|
"Defines an oval hole on the PCB"
|
|
1297
1309
|
);
|
|
1298
1310
|
expectTypesMatch(true);
|
|
1299
|
-
var pcb_hole_pill =
|
|
1300
|
-
type:
|
|
1311
|
+
var pcb_hole_pill = z70.object({
|
|
1312
|
+
type: z70.literal("pcb_hole"),
|
|
1301
1313
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1302
|
-
pcb_group_id:
|
|
1303
|
-
subcircuit_id:
|
|
1304
|
-
hole_shape:
|
|
1305
|
-
hole_width:
|
|
1306
|
-
hole_height:
|
|
1314
|
+
pcb_group_id: z70.string().optional(),
|
|
1315
|
+
subcircuit_id: z70.string().optional(),
|
|
1316
|
+
hole_shape: z70.literal("pill"),
|
|
1317
|
+
hole_width: z70.number(),
|
|
1318
|
+
hole_height: z70.number(),
|
|
1307
1319
|
x: distance,
|
|
1308
1320
|
y: distance
|
|
1309
1321
|
});
|
|
@@ -1311,14 +1323,14 @@ var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
|
1311
1323
|
"Defines a pill-shaped hole on the PCB"
|
|
1312
1324
|
);
|
|
1313
1325
|
expectTypesMatch(true);
|
|
1314
|
-
var pcb_hole_rotated_pill =
|
|
1315
|
-
type:
|
|
1326
|
+
var pcb_hole_rotated_pill = z70.object({
|
|
1327
|
+
type: z70.literal("pcb_hole"),
|
|
1316
1328
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1317
|
-
pcb_group_id:
|
|
1318
|
-
subcircuit_id:
|
|
1319
|
-
hole_shape:
|
|
1320
|
-
hole_width:
|
|
1321
|
-
hole_height:
|
|
1329
|
+
pcb_group_id: z70.string().optional(),
|
|
1330
|
+
subcircuit_id: z70.string().optional(),
|
|
1331
|
+
hole_shape: z70.literal("rotated_pill"),
|
|
1332
|
+
hole_width: z70.number(),
|
|
1333
|
+
hole_height: z70.number(),
|
|
1322
1334
|
x: distance,
|
|
1323
1335
|
y: distance,
|
|
1324
1336
|
ccw_rotation: rotation
|
|
@@ -1330,108 +1342,108 @@ expectTypesMatch(true);
|
|
|
1330
1342
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill);
|
|
1331
1343
|
|
|
1332
1344
|
// src/pcb/pcb_plated_hole.ts
|
|
1333
|
-
import { z as
|
|
1334
|
-
var pcb_plated_hole_circle =
|
|
1335
|
-
type:
|
|
1336
|
-
shape:
|
|
1337
|
-
pcb_group_id:
|
|
1338
|
-
subcircuit_id:
|
|
1339
|
-
outer_diameter:
|
|
1340
|
-
hole_diameter:
|
|
1345
|
+
import { z as z71 } from "zod";
|
|
1346
|
+
var pcb_plated_hole_circle = z71.object({
|
|
1347
|
+
type: z71.literal("pcb_plated_hole"),
|
|
1348
|
+
shape: z71.literal("circle"),
|
|
1349
|
+
pcb_group_id: z71.string().optional(),
|
|
1350
|
+
subcircuit_id: z71.string().optional(),
|
|
1351
|
+
outer_diameter: z71.number(),
|
|
1352
|
+
hole_diameter: z71.number(),
|
|
1341
1353
|
x: distance,
|
|
1342
1354
|
y: distance,
|
|
1343
|
-
layers:
|
|
1344
|
-
port_hints:
|
|
1345
|
-
pcb_component_id:
|
|
1346
|
-
pcb_port_id:
|
|
1355
|
+
layers: z71.array(layer_ref),
|
|
1356
|
+
port_hints: z71.array(z71.string()).optional(),
|
|
1357
|
+
pcb_component_id: z71.string().optional(),
|
|
1358
|
+
pcb_port_id: z71.string().optional(),
|
|
1347
1359
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1348
1360
|
});
|
|
1349
|
-
var pcb_plated_hole_oval =
|
|
1350
|
-
type:
|
|
1351
|
-
shape:
|
|
1352
|
-
pcb_group_id:
|
|
1353
|
-
subcircuit_id:
|
|
1354
|
-
outer_width:
|
|
1355
|
-
outer_height:
|
|
1356
|
-
hole_width:
|
|
1357
|
-
hole_height:
|
|
1361
|
+
var pcb_plated_hole_oval = z71.object({
|
|
1362
|
+
type: z71.literal("pcb_plated_hole"),
|
|
1363
|
+
shape: z71.enum(["oval", "pill"]),
|
|
1364
|
+
pcb_group_id: z71.string().optional(),
|
|
1365
|
+
subcircuit_id: z71.string().optional(),
|
|
1366
|
+
outer_width: z71.number(),
|
|
1367
|
+
outer_height: z71.number(),
|
|
1368
|
+
hole_width: z71.number(),
|
|
1369
|
+
hole_height: z71.number(),
|
|
1358
1370
|
x: distance,
|
|
1359
1371
|
y: distance,
|
|
1360
1372
|
ccw_rotation: rotation,
|
|
1361
|
-
layers:
|
|
1362
|
-
port_hints:
|
|
1363
|
-
pcb_component_id:
|
|
1364
|
-
pcb_port_id:
|
|
1373
|
+
layers: z71.array(layer_ref),
|
|
1374
|
+
port_hints: z71.array(z71.string()).optional(),
|
|
1375
|
+
pcb_component_id: z71.string().optional(),
|
|
1376
|
+
pcb_port_id: z71.string().optional(),
|
|
1365
1377
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1366
1378
|
});
|
|
1367
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1368
|
-
type:
|
|
1369
|
-
shape:
|
|
1370
|
-
pcb_group_id:
|
|
1371
|
-
subcircuit_id:
|
|
1372
|
-
hole_shape:
|
|
1373
|
-
pad_shape:
|
|
1374
|
-
hole_diameter:
|
|
1375
|
-
rect_pad_width:
|
|
1376
|
-
rect_pad_height:
|
|
1377
|
-
rect_border_radius:
|
|
1379
|
+
var pcb_circular_hole_with_rect_pad = z71.object({
|
|
1380
|
+
type: z71.literal("pcb_plated_hole"),
|
|
1381
|
+
shape: z71.literal("circular_hole_with_rect_pad"),
|
|
1382
|
+
pcb_group_id: z71.string().optional(),
|
|
1383
|
+
subcircuit_id: z71.string().optional(),
|
|
1384
|
+
hole_shape: z71.literal("circle"),
|
|
1385
|
+
pad_shape: z71.literal("rect"),
|
|
1386
|
+
hole_diameter: z71.number(),
|
|
1387
|
+
rect_pad_width: z71.number(),
|
|
1388
|
+
rect_pad_height: z71.number(),
|
|
1389
|
+
rect_border_radius: z71.number().optional(),
|
|
1378
1390
|
hole_offset_x: distance.default(0),
|
|
1379
1391
|
hole_offset_y: distance.default(0),
|
|
1380
1392
|
x: distance,
|
|
1381
1393
|
y: distance,
|
|
1382
|
-
layers:
|
|
1383
|
-
port_hints:
|
|
1384
|
-
pcb_component_id:
|
|
1385
|
-
pcb_port_id:
|
|
1394
|
+
layers: z71.array(layer_ref),
|
|
1395
|
+
port_hints: z71.array(z71.string()).optional(),
|
|
1396
|
+
pcb_component_id: z71.string().optional(),
|
|
1397
|
+
pcb_port_id: z71.string().optional(),
|
|
1386
1398
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1387
1399
|
});
|
|
1388
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1389
|
-
type:
|
|
1390
|
-
shape:
|
|
1391
|
-
pcb_group_id:
|
|
1392
|
-
subcircuit_id:
|
|
1393
|
-
hole_shape:
|
|
1394
|
-
pad_shape:
|
|
1395
|
-
hole_width:
|
|
1396
|
-
hole_height:
|
|
1397
|
-
rect_pad_width:
|
|
1398
|
-
rect_pad_height:
|
|
1399
|
-
rect_border_radius:
|
|
1400
|
+
var pcb_pill_hole_with_rect_pad = z71.object({
|
|
1401
|
+
type: z71.literal("pcb_plated_hole"),
|
|
1402
|
+
shape: z71.literal("pill_hole_with_rect_pad"),
|
|
1403
|
+
pcb_group_id: z71.string().optional(),
|
|
1404
|
+
subcircuit_id: z71.string().optional(),
|
|
1405
|
+
hole_shape: z71.literal("pill"),
|
|
1406
|
+
pad_shape: z71.literal("rect"),
|
|
1407
|
+
hole_width: z71.number(),
|
|
1408
|
+
hole_height: z71.number(),
|
|
1409
|
+
rect_pad_width: z71.number(),
|
|
1410
|
+
rect_pad_height: z71.number(),
|
|
1411
|
+
rect_border_radius: z71.number().optional(),
|
|
1400
1412
|
hole_offset_x: distance.default(0),
|
|
1401
1413
|
hole_offset_y: distance.default(0),
|
|
1402
1414
|
x: distance,
|
|
1403
1415
|
y: distance,
|
|
1404
|
-
layers:
|
|
1405
|
-
port_hints:
|
|
1406
|
-
pcb_component_id:
|
|
1407
|
-
pcb_port_id:
|
|
1416
|
+
layers: z71.array(layer_ref),
|
|
1417
|
+
port_hints: z71.array(z71.string()).optional(),
|
|
1418
|
+
pcb_component_id: z71.string().optional(),
|
|
1419
|
+
pcb_port_id: z71.string().optional(),
|
|
1408
1420
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1409
1421
|
});
|
|
1410
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1411
|
-
type:
|
|
1412
|
-
shape:
|
|
1413
|
-
pcb_group_id:
|
|
1414
|
-
subcircuit_id:
|
|
1415
|
-
hole_shape:
|
|
1416
|
-
pad_shape:
|
|
1417
|
-
hole_width:
|
|
1418
|
-
hole_height:
|
|
1422
|
+
var pcb_rotated_pill_hole_with_rect_pad = z71.object({
|
|
1423
|
+
type: z71.literal("pcb_plated_hole"),
|
|
1424
|
+
shape: z71.literal("rotated_pill_hole_with_rect_pad"),
|
|
1425
|
+
pcb_group_id: z71.string().optional(),
|
|
1426
|
+
subcircuit_id: z71.string().optional(),
|
|
1427
|
+
hole_shape: z71.literal("rotated_pill"),
|
|
1428
|
+
pad_shape: z71.literal("rect"),
|
|
1429
|
+
hole_width: z71.number(),
|
|
1430
|
+
hole_height: z71.number(),
|
|
1419
1431
|
hole_ccw_rotation: rotation,
|
|
1420
|
-
rect_pad_width:
|
|
1421
|
-
rect_pad_height:
|
|
1422
|
-
rect_border_radius:
|
|
1432
|
+
rect_pad_width: z71.number(),
|
|
1433
|
+
rect_pad_height: z71.number(),
|
|
1434
|
+
rect_border_radius: z71.number().optional(),
|
|
1423
1435
|
rect_ccw_rotation: rotation,
|
|
1424
1436
|
hole_offset_x: distance.default(0),
|
|
1425
1437
|
hole_offset_y: distance.default(0),
|
|
1426
1438
|
x: distance,
|
|
1427
1439
|
y: distance,
|
|
1428
|
-
layers:
|
|
1429
|
-
port_hints:
|
|
1430
|
-
pcb_component_id:
|
|
1431
|
-
pcb_port_id:
|
|
1440
|
+
layers: z71.array(layer_ref),
|
|
1441
|
+
port_hints: z71.array(z71.string()).optional(),
|
|
1442
|
+
pcb_component_id: z71.string().optional(),
|
|
1443
|
+
pcb_port_id: z71.string().optional(),
|
|
1432
1444
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
1433
1445
|
});
|
|
1434
|
-
var pcb_plated_hole =
|
|
1446
|
+
var pcb_plated_hole = z71.union([
|
|
1435
1447
|
pcb_plated_hole_circle,
|
|
1436
1448
|
pcb_plated_hole_oval,
|
|
1437
1449
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1447,124 +1459,124 @@ expectTypesMatch(true);
|
|
|
1447
1459
|
expectTypesMatch(true);
|
|
1448
1460
|
|
|
1449
1461
|
// src/pcb/pcb_port.ts
|
|
1450
|
-
import { z as
|
|
1451
|
-
var pcb_port =
|
|
1452
|
-
type:
|
|
1462
|
+
import { z as z72 } from "zod";
|
|
1463
|
+
var pcb_port = z72.object({
|
|
1464
|
+
type: z72.literal("pcb_port"),
|
|
1453
1465
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1454
|
-
pcb_group_id:
|
|
1455
|
-
subcircuit_id:
|
|
1456
|
-
source_port_id:
|
|
1457
|
-
pcb_component_id:
|
|
1466
|
+
pcb_group_id: z72.string().optional(),
|
|
1467
|
+
subcircuit_id: z72.string().optional(),
|
|
1468
|
+
source_port_id: z72.string(),
|
|
1469
|
+
pcb_component_id: z72.string().optional(),
|
|
1458
1470
|
x: distance,
|
|
1459
1471
|
y: distance,
|
|
1460
|
-
layers:
|
|
1461
|
-
is_board_pinout:
|
|
1472
|
+
layers: z72.array(layer_ref),
|
|
1473
|
+
is_board_pinout: z72.boolean().optional()
|
|
1462
1474
|
}).describe("Defines a port on the PCB");
|
|
1463
1475
|
expectTypesMatch(true);
|
|
1464
1476
|
|
|
1465
1477
|
// src/pcb/pcb_smtpad.ts
|
|
1466
|
-
import { z as
|
|
1467
|
-
var pcb_smtpad_circle =
|
|
1468
|
-
type:
|
|
1469
|
-
shape:
|
|
1478
|
+
import { z as z73 } from "zod";
|
|
1479
|
+
var pcb_smtpad_circle = z73.object({
|
|
1480
|
+
type: z73.literal("pcb_smtpad"),
|
|
1481
|
+
shape: z73.literal("circle"),
|
|
1470
1482
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1471
|
-
pcb_group_id:
|
|
1472
|
-
subcircuit_id:
|
|
1483
|
+
pcb_group_id: z73.string().optional(),
|
|
1484
|
+
subcircuit_id: z73.string().optional(),
|
|
1473
1485
|
x: distance,
|
|
1474
1486
|
y: distance,
|
|
1475
|
-
radius:
|
|
1487
|
+
radius: z73.number(),
|
|
1476
1488
|
layer: layer_ref,
|
|
1477
|
-
port_hints:
|
|
1478
|
-
pcb_component_id:
|
|
1479
|
-
pcb_port_id:
|
|
1480
|
-
is_covered_with_solder_mask:
|
|
1489
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1490
|
+
pcb_component_id: z73.string().optional(),
|
|
1491
|
+
pcb_port_id: z73.string().optional(),
|
|
1492
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
1481
1493
|
});
|
|
1482
|
-
var pcb_smtpad_rect =
|
|
1483
|
-
type:
|
|
1484
|
-
shape:
|
|
1494
|
+
var pcb_smtpad_rect = z73.object({
|
|
1495
|
+
type: z73.literal("pcb_smtpad"),
|
|
1496
|
+
shape: z73.literal("rect"),
|
|
1485
1497
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1486
|
-
pcb_group_id:
|
|
1487
|
-
subcircuit_id:
|
|
1498
|
+
pcb_group_id: z73.string().optional(),
|
|
1499
|
+
subcircuit_id: z73.string().optional(),
|
|
1488
1500
|
x: distance,
|
|
1489
1501
|
y: distance,
|
|
1490
|
-
width:
|
|
1491
|
-
height:
|
|
1492
|
-
rect_border_radius:
|
|
1493
|
-
corner_radius:
|
|
1502
|
+
width: z73.number(),
|
|
1503
|
+
height: z73.number(),
|
|
1504
|
+
rect_border_radius: z73.number().optional(),
|
|
1505
|
+
corner_radius: z73.number().optional(),
|
|
1494
1506
|
layer: layer_ref,
|
|
1495
|
-
port_hints:
|
|
1496
|
-
pcb_component_id:
|
|
1497
|
-
pcb_port_id:
|
|
1498
|
-
is_covered_with_solder_mask:
|
|
1507
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1508
|
+
pcb_component_id: z73.string().optional(),
|
|
1509
|
+
pcb_port_id: z73.string().optional(),
|
|
1510
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
1499
1511
|
});
|
|
1500
|
-
var pcb_smtpad_rotated_rect =
|
|
1501
|
-
type:
|
|
1502
|
-
shape:
|
|
1512
|
+
var pcb_smtpad_rotated_rect = z73.object({
|
|
1513
|
+
type: z73.literal("pcb_smtpad"),
|
|
1514
|
+
shape: z73.literal("rotated_rect"),
|
|
1503
1515
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1504
|
-
pcb_group_id:
|
|
1505
|
-
subcircuit_id:
|
|
1516
|
+
pcb_group_id: z73.string().optional(),
|
|
1517
|
+
subcircuit_id: z73.string().optional(),
|
|
1506
1518
|
x: distance,
|
|
1507
1519
|
y: distance,
|
|
1508
|
-
width:
|
|
1509
|
-
height:
|
|
1510
|
-
rect_border_radius:
|
|
1511
|
-
corner_radius:
|
|
1520
|
+
width: z73.number(),
|
|
1521
|
+
height: z73.number(),
|
|
1522
|
+
rect_border_radius: z73.number().optional(),
|
|
1523
|
+
corner_radius: z73.number().optional(),
|
|
1512
1524
|
ccw_rotation: rotation,
|
|
1513
1525
|
layer: layer_ref,
|
|
1514
|
-
port_hints:
|
|
1515
|
-
pcb_component_id:
|
|
1516
|
-
pcb_port_id:
|
|
1517
|
-
is_covered_with_solder_mask:
|
|
1526
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1527
|
+
pcb_component_id: z73.string().optional(),
|
|
1528
|
+
pcb_port_id: z73.string().optional(),
|
|
1529
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
1518
1530
|
});
|
|
1519
|
-
var pcb_smtpad_pill =
|
|
1520
|
-
type:
|
|
1521
|
-
shape:
|
|
1531
|
+
var pcb_smtpad_pill = z73.object({
|
|
1532
|
+
type: z73.literal("pcb_smtpad"),
|
|
1533
|
+
shape: z73.literal("pill"),
|
|
1522
1534
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1523
|
-
pcb_group_id:
|
|
1524
|
-
subcircuit_id:
|
|
1535
|
+
pcb_group_id: z73.string().optional(),
|
|
1536
|
+
subcircuit_id: z73.string().optional(),
|
|
1525
1537
|
x: distance,
|
|
1526
1538
|
y: distance,
|
|
1527
|
-
width:
|
|
1528
|
-
height:
|
|
1529
|
-
radius:
|
|
1539
|
+
width: z73.number(),
|
|
1540
|
+
height: z73.number(),
|
|
1541
|
+
radius: z73.number(),
|
|
1530
1542
|
layer: layer_ref,
|
|
1531
|
-
port_hints:
|
|
1532
|
-
pcb_component_id:
|
|
1533
|
-
pcb_port_id:
|
|
1534
|
-
is_covered_with_solder_mask:
|
|
1543
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1544
|
+
pcb_component_id: z73.string().optional(),
|
|
1545
|
+
pcb_port_id: z73.string().optional(),
|
|
1546
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
1535
1547
|
});
|
|
1536
|
-
var pcb_smtpad_rotated_pill =
|
|
1537
|
-
type:
|
|
1538
|
-
shape:
|
|
1548
|
+
var pcb_smtpad_rotated_pill = z73.object({
|
|
1549
|
+
type: z73.literal("pcb_smtpad"),
|
|
1550
|
+
shape: z73.literal("rotated_pill"),
|
|
1539
1551
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1540
|
-
pcb_group_id:
|
|
1541
|
-
subcircuit_id:
|
|
1552
|
+
pcb_group_id: z73.string().optional(),
|
|
1553
|
+
subcircuit_id: z73.string().optional(),
|
|
1542
1554
|
x: distance,
|
|
1543
1555
|
y: distance,
|
|
1544
|
-
width:
|
|
1545
|
-
height:
|
|
1546
|
-
radius:
|
|
1556
|
+
width: z73.number(),
|
|
1557
|
+
height: z73.number(),
|
|
1558
|
+
radius: z73.number(),
|
|
1547
1559
|
ccw_rotation: rotation,
|
|
1548
1560
|
layer: layer_ref,
|
|
1549
|
-
port_hints:
|
|
1550
|
-
pcb_component_id:
|
|
1551
|
-
pcb_port_id:
|
|
1552
|
-
is_covered_with_solder_mask:
|
|
1561
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1562
|
+
pcb_component_id: z73.string().optional(),
|
|
1563
|
+
pcb_port_id: z73.string().optional(),
|
|
1564
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
1553
1565
|
});
|
|
1554
|
-
var pcb_smtpad_polygon =
|
|
1555
|
-
type:
|
|
1556
|
-
shape:
|
|
1566
|
+
var pcb_smtpad_polygon = z73.object({
|
|
1567
|
+
type: z73.literal("pcb_smtpad"),
|
|
1568
|
+
shape: z73.literal("polygon"),
|
|
1557
1569
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1558
|
-
pcb_group_id:
|
|
1559
|
-
subcircuit_id:
|
|
1560
|
-
points:
|
|
1570
|
+
pcb_group_id: z73.string().optional(),
|
|
1571
|
+
subcircuit_id: z73.string().optional(),
|
|
1572
|
+
points: z73.array(point),
|
|
1561
1573
|
layer: layer_ref,
|
|
1562
|
-
port_hints:
|
|
1563
|
-
pcb_component_id:
|
|
1564
|
-
pcb_port_id:
|
|
1565
|
-
is_covered_with_solder_mask:
|
|
1574
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
1575
|
+
pcb_component_id: z73.string().optional(),
|
|
1576
|
+
pcb_port_id: z73.string().optional(),
|
|
1577
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
1566
1578
|
});
|
|
1567
|
-
var pcb_smtpad =
|
|
1579
|
+
var pcb_smtpad = z73.discriminatedUnion("shape", [
|
|
1568
1580
|
pcb_smtpad_circle,
|
|
1569
1581
|
pcb_smtpad_rect,
|
|
1570
1582
|
pcb_smtpad_rotated_rect,
|
|
@@ -1580,79 +1592,79 @@ expectTypesMatch(true);
|
|
|
1580
1592
|
expectTypesMatch(true);
|
|
1581
1593
|
|
|
1582
1594
|
// src/pcb/pcb_solder_paste.ts
|
|
1583
|
-
import { z as
|
|
1584
|
-
var pcb_solder_paste_circle =
|
|
1585
|
-
type:
|
|
1586
|
-
shape:
|
|
1595
|
+
import { z as z74 } from "zod";
|
|
1596
|
+
var pcb_solder_paste_circle = z74.object({
|
|
1597
|
+
type: z74.literal("pcb_solder_paste"),
|
|
1598
|
+
shape: z74.literal("circle"),
|
|
1587
1599
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1588
|
-
pcb_group_id:
|
|
1589
|
-
subcircuit_id:
|
|
1600
|
+
pcb_group_id: z74.string().optional(),
|
|
1601
|
+
subcircuit_id: z74.string().optional(),
|
|
1590
1602
|
x: distance,
|
|
1591
1603
|
y: distance,
|
|
1592
|
-
radius:
|
|
1604
|
+
radius: z74.number(),
|
|
1593
1605
|
layer: layer_ref,
|
|
1594
|
-
pcb_component_id:
|
|
1595
|
-
pcb_smtpad_id:
|
|
1606
|
+
pcb_component_id: z74.string().optional(),
|
|
1607
|
+
pcb_smtpad_id: z74.string().optional()
|
|
1596
1608
|
});
|
|
1597
|
-
var pcb_solder_paste_rect =
|
|
1598
|
-
type:
|
|
1599
|
-
shape:
|
|
1609
|
+
var pcb_solder_paste_rect = z74.object({
|
|
1610
|
+
type: z74.literal("pcb_solder_paste"),
|
|
1611
|
+
shape: z74.literal("rect"),
|
|
1600
1612
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1601
|
-
pcb_group_id:
|
|
1602
|
-
subcircuit_id:
|
|
1613
|
+
pcb_group_id: z74.string().optional(),
|
|
1614
|
+
subcircuit_id: z74.string().optional(),
|
|
1603
1615
|
x: distance,
|
|
1604
1616
|
y: distance,
|
|
1605
|
-
width:
|
|
1606
|
-
height:
|
|
1617
|
+
width: z74.number(),
|
|
1618
|
+
height: z74.number(),
|
|
1607
1619
|
layer: layer_ref,
|
|
1608
|
-
pcb_component_id:
|
|
1609
|
-
pcb_smtpad_id:
|
|
1620
|
+
pcb_component_id: z74.string().optional(),
|
|
1621
|
+
pcb_smtpad_id: z74.string().optional()
|
|
1610
1622
|
});
|
|
1611
|
-
var pcb_solder_paste_pill =
|
|
1612
|
-
type:
|
|
1613
|
-
shape:
|
|
1623
|
+
var pcb_solder_paste_pill = z74.object({
|
|
1624
|
+
type: z74.literal("pcb_solder_paste"),
|
|
1625
|
+
shape: z74.literal("pill"),
|
|
1614
1626
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1615
|
-
pcb_group_id:
|
|
1616
|
-
subcircuit_id:
|
|
1627
|
+
pcb_group_id: z74.string().optional(),
|
|
1628
|
+
subcircuit_id: z74.string().optional(),
|
|
1617
1629
|
x: distance,
|
|
1618
1630
|
y: distance,
|
|
1619
|
-
width:
|
|
1620
|
-
height:
|
|
1621
|
-
radius:
|
|
1631
|
+
width: z74.number(),
|
|
1632
|
+
height: z74.number(),
|
|
1633
|
+
radius: z74.number(),
|
|
1622
1634
|
layer: layer_ref,
|
|
1623
|
-
pcb_component_id:
|
|
1624
|
-
pcb_smtpad_id:
|
|
1635
|
+
pcb_component_id: z74.string().optional(),
|
|
1636
|
+
pcb_smtpad_id: z74.string().optional()
|
|
1625
1637
|
});
|
|
1626
|
-
var pcb_solder_paste_rotated_rect =
|
|
1627
|
-
type:
|
|
1628
|
-
shape:
|
|
1638
|
+
var pcb_solder_paste_rotated_rect = z74.object({
|
|
1639
|
+
type: z74.literal("pcb_solder_paste"),
|
|
1640
|
+
shape: z74.literal("rotated_rect"),
|
|
1629
1641
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1630
|
-
pcb_group_id:
|
|
1631
|
-
subcircuit_id:
|
|
1642
|
+
pcb_group_id: z74.string().optional(),
|
|
1643
|
+
subcircuit_id: z74.string().optional(),
|
|
1632
1644
|
x: distance,
|
|
1633
1645
|
y: distance,
|
|
1634
|
-
width:
|
|
1635
|
-
height:
|
|
1646
|
+
width: z74.number(),
|
|
1647
|
+
height: z74.number(),
|
|
1636
1648
|
ccw_rotation: distance,
|
|
1637
1649
|
layer: layer_ref,
|
|
1638
|
-
pcb_component_id:
|
|
1639
|
-
pcb_smtpad_id:
|
|
1650
|
+
pcb_component_id: z74.string().optional(),
|
|
1651
|
+
pcb_smtpad_id: z74.string().optional()
|
|
1640
1652
|
});
|
|
1641
|
-
var pcb_solder_paste_oval =
|
|
1642
|
-
type:
|
|
1643
|
-
shape:
|
|
1653
|
+
var pcb_solder_paste_oval = z74.object({
|
|
1654
|
+
type: z74.literal("pcb_solder_paste"),
|
|
1655
|
+
shape: z74.literal("oval"),
|
|
1644
1656
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1645
|
-
pcb_group_id:
|
|
1646
|
-
subcircuit_id:
|
|
1657
|
+
pcb_group_id: z74.string().optional(),
|
|
1658
|
+
subcircuit_id: z74.string().optional(),
|
|
1647
1659
|
x: distance,
|
|
1648
1660
|
y: distance,
|
|
1649
|
-
width:
|
|
1650
|
-
height:
|
|
1661
|
+
width: z74.number(),
|
|
1662
|
+
height: z74.number(),
|
|
1651
1663
|
layer: layer_ref,
|
|
1652
|
-
pcb_component_id:
|
|
1653
|
-
pcb_smtpad_id:
|
|
1664
|
+
pcb_component_id: z74.string().optional(),
|
|
1665
|
+
pcb_smtpad_id: z74.string().optional()
|
|
1654
1666
|
});
|
|
1655
|
-
var pcb_solder_paste =
|
|
1667
|
+
var pcb_solder_paste = z74.union([
|
|
1656
1668
|
pcb_solder_paste_circle,
|
|
1657
1669
|
pcb_solder_paste_rect,
|
|
1658
1670
|
pcb_solder_paste_pill,
|
|
@@ -1668,145 +1680,145 @@ expectTypesMatch(
|
|
|
1668
1680
|
expectTypesMatch(true);
|
|
1669
1681
|
|
|
1670
1682
|
// src/pcb/pcb_text.ts
|
|
1671
|
-
import { z as
|
|
1672
|
-
var pcb_text =
|
|
1673
|
-
type:
|
|
1683
|
+
import { z as z75 } from "zod";
|
|
1684
|
+
var pcb_text = z75.object({
|
|
1685
|
+
type: z75.literal("pcb_text"),
|
|
1674
1686
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1675
|
-
pcb_group_id:
|
|
1676
|
-
subcircuit_id:
|
|
1677
|
-
text:
|
|
1687
|
+
pcb_group_id: z75.string().optional(),
|
|
1688
|
+
subcircuit_id: z75.string().optional(),
|
|
1689
|
+
text: z75.string(),
|
|
1678
1690
|
center: point,
|
|
1679
1691
|
layer: layer_ref,
|
|
1680
1692
|
width: length,
|
|
1681
1693
|
height: length,
|
|
1682
|
-
lines:
|
|
1694
|
+
lines: z75.number(),
|
|
1683
1695
|
// @ts-ignore
|
|
1684
|
-
align:
|
|
1696
|
+
align: z75.enum(["bottom-left"])
|
|
1685
1697
|
}).describe("Defines text on the PCB");
|
|
1686
1698
|
expectTypesMatch(true);
|
|
1687
1699
|
|
|
1688
1700
|
// src/pcb/pcb_trace.ts
|
|
1689
|
-
import { z as
|
|
1690
|
-
var pcb_trace_route_point_wire =
|
|
1691
|
-
route_type:
|
|
1701
|
+
import { z as z76 } from "zod";
|
|
1702
|
+
var pcb_trace_route_point_wire = z76.object({
|
|
1703
|
+
route_type: z76.literal("wire"),
|
|
1692
1704
|
x: distance,
|
|
1693
1705
|
y: distance,
|
|
1694
1706
|
width: distance,
|
|
1695
|
-
start_pcb_port_id:
|
|
1696
|
-
end_pcb_port_id:
|
|
1707
|
+
start_pcb_port_id: z76.string().optional(),
|
|
1708
|
+
end_pcb_port_id: z76.string().optional(),
|
|
1697
1709
|
layer: layer_ref
|
|
1698
1710
|
});
|
|
1699
|
-
var pcb_trace_route_point_via =
|
|
1700
|
-
route_type:
|
|
1711
|
+
var pcb_trace_route_point_via = z76.object({
|
|
1712
|
+
route_type: z76.literal("via"),
|
|
1701
1713
|
x: distance,
|
|
1702
1714
|
y: distance,
|
|
1703
1715
|
hole_diameter: distance.optional(),
|
|
1704
1716
|
outer_diameter: distance.optional(),
|
|
1705
|
-
from_layer:
|
|
1706
|
-
to_layer:
|
|
1717
|
+
from_layer: z76.string(),
|
|
1718
|
+
to_layer: z76.string()
|
|
1707
1719
|
});
|
|
1708
|
-
var pcb_trace_route_point =
|
|
1720
|
+
var pcb_trace_route_point = z76.union([
|
|
1709
1721
|
pcb_trace_route_point_wire,
|
|
1710
1722
|
pcb_trace_route_point_via
|
|
1711
1723
|
]);
|
|
1712
|
-
var pcb_trace =
|
|
1713
|
-
type:
|
|
1714
|
-
source_trace_id:
|
|
1715
|
-
pcb_component_id:
|
|
1724
|
+
var pcb_trace = z76.object({
|
|
1725
|
+
type: z76.literal("pcb_trace"),
|
|
1726
|
+
source_trace_id: z76.string().optional(),
|
|
1727
|
+
pcb_component_id: z76.string().optional(),
|
|
1716
1728
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1717
|
-
pcb_group_id:
|
|
1718
|
-
subcircuit_id:
|
|
1719
|
-
route_thickness_mode:
|
|
1720
|
-
route_order_index:
|
|
1721
|
-
should_round_corners:
|
|
1722
|
-
trace_length:
|
|
1723
|
-
highlight_color:
|
|
1724
|
-
route:
|
|
1729
|
+
pcb_group_id: z76.string().optional(),
|
|
1730
|
+
subcircuit_id: z76.string().optional(),
|
|
1731
|
+
route_thickness_mode: z76.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
1732
|
+
route_order_index: z76.number().optional(),
|
|
1733
|
+
should_round_corners: z76.boolean().optional(),
|
|
1734
|
+
trace_length: z76.number().optional(),
|
|
1735
|
+
highlight_color: z76.string().optional(),
|
|
1736
|
+
route: z76.array(pcb_trace_route_point)
|
|
1725
1737
|
}).describe("Defines a trace on the PCB");
|
|
1726
1738
|
expectTypesMatch(true);
|
|
1727
1739
|
expectTypesMatch(true);
|
|
1728
1740
|
|
|
1729
1741
|
// src/pcb/pcb_trace_error.ts
|
|
1730
|
-
import { z as
|
|
1731
|
-
var pcb_trace_error =
|
|
1732
|
-
type:
|
|
1742
|
+
import { z as z77 } from "zod";
|
|
1743
|
+
var pcb_trace_error = z77.object({
|
|
1744
|
+
type: z77.literal("pcb_trace_error"),
|
|
1733
1745
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1734
|
-
error_type:
|
|
1735
|
-
message:
|
|
1746
|
+
error_type: z77.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
1747
|
+
message: z77.string(),
|
|
1736
1748
|
center: point.optional(),
|
|
1737
|
-
pcb_trace_id:
|
|
1738
|
-
source_trace_id:
|
|
1739
|
-
pcb_component_ids:
|
|
1740
|
-
pcb_port_ids:
|
|
1741
|
-
subcircuit_id:
|
|
1749
|
+
pcb_trace_id: z77.string(),
|
|
1750
|
+
source_trace_id: z77.string(),
|
|
1751
|
+
pcb_component_ids: z77.array(z77.string()),
|
|
1752
|
+
pcb_port_ids: z77.array(z77.string()),
|
|
1753
|
+
subcircuit_id: z77.string().optional()
|
|
1742
1754
|
}).describe("Defines a trace error on the PCB");
|
|
1743
1755
|
expectTypesMatch(true);
|
|
1744
1756
|
|
|
1745
1757
|
// src/pcb/pcb_trace_missing_error.ts
|
|
1746
|
-
import { z as
|
|
1747
|
-
var pcb_trace_missing_error =
|
|
1748
|
-
type:
|
|
1758
|
+
import { z as z78 } from "zod";
|
|
1759
|
+
var pcb_trace_missing_error = z78.object({
|
|
1760
|
+
type: z78.literal("pcb_trace_missing_error"),
|
|
1749
1761
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
1750
1762
|
"pcb_trace_missing_error"
|
|
1751
1763
|
),
|
|
1752
|
-
error_type:
|
|
1753
|
-
message:
|
|
1764
|
+
error_type: z78.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
1765
|
+
message: z78.string(),
|
|
1754
1766
|
center: point.optional(),
|
|
1755
|
-
source_trace_id:
|
|
1756
|
-
pcb_component_ids:
|
|
1757
|
-
pcb_port_ids:
|
|
1758
|
-
subcircuit_id:
|
|
1767
|
+
source_trace_id: z78.string(),
|
|
1768
|
+
pcb_component_ids: z78.array(z78.string()),
|
|
1769
|
+
pcb_port_ids: z78.array(z78.string()),
|
|
1770
|
+
subcircuit_id: z78.string().optional()
|
|
1759
1771
|
}).describe(
|
|
1760
1772
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
1761
1773
|
);
|
|
1762
1774
|
expectTypesMatch(true);
|
|
1763
1775
|
|
|
1764
1776
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1765
|
-
import { z as
|
|
1766
|
-
var pcb_port_not_matched_error =
|
|
1767
|
-
type:
|
|
1777
|
+
import { z as z79 } from "zod";
|
|
1778
|
+
var pcb_port_not_matched_error = z79.object({
|
|
1779
|
+
type: z79.literal("pcb_port_not_matched_error"),
|
|
1768
1780
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1769
|
-
error_type:
|
|
1770
|
-
message:
|
|
1771
|
-
pcb_component_ids:
|
|
1772
|
-
subcircuit_id:
|
|
1781
|
+
error_type: z79.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1782
|
+
message: z79.string(),
|
|
1783
|
+
pcb_component_ids: z79.array(z79.string()),
|
|
1784
|
+
subcircuit_id: z79.string().optional()
|
|
1773
1785
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1774
1786
|
expectTypesMatch(true);
|
|
1775
1787
|
|
|
1776
1788
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
1777
|
-
import { z as
|
|
1778
|
-
var pcb_port_not_connected_error =
|
|
1779
|
-
type:
|
|
1789
|
+
import { z as z80 } from "zod";
|
|
1790
|
+
var pcb_port_not_connected_error = z80.object({
|
|
1791
|
+
type: z80.literal("pcb_port_not_connected_error"),
|
|
1780
1792
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1781
1793
|
"pcb_port_not_connected_error"
|
|
1782
1794
|
),
|
|
1783
|
-
error_type:
|
|
1784
|
-
message:
|
|
1785
|
-
pcb_port_ids:
|
|
1786
|
-
pcb_component_ids:
|
|
1787
|
-
subcircuit_id:
|
|
1795
|
+
error_type: z80.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
1796
|
+
message: z80.string(),
|
|
1797
|
+
pcb_port_ids: z80.array(z80.string()),
|
|
1798
|
+
pcb_component_ids: z80.array(z80.string()),
|
|
1799
|
+
subcircuit_id: z80.string().optional()
|
|
1788
1800
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
1789
1801
|
expectTypesMatch(
|
|
1790
1802
|
true
|
|
1791
1803
|
);
|
|
1792
1804
|
|
|
1793
1805
|
// src/pcb/pcb_net.ts
|
|
1794
|
-
import { z as
|
|
1795
|
-
var pcb_net =
|
|
1796
|
-
type:
|
|
1806
|
+
import { z as z81 } from "zod";
|
|
1807
|
+
var pcb_net = z81.object({
|
|
1808
|
+
type: z81.literal("pcb_net"),
|
|
1797
1809
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
1798
|
-
source_net_id:
|
|
1799
|
-
highlight_color:
|
|
1810
|
+
source_net_id: z81.string().optional(),
|
|
1811
|
+
highlight_color: z81.string().optional()
|
|
1800
1812
|
}).describe("Defines a net on the PCB");
|
|
1801
1813
|
expectTypesMatch(true);
|
|
1802
1814
|
|
|
1803
1815
|
// src/pcb/pcb_via.ts
|
|
1804
|
-
import { z as
|
|
1805
|
-
var pcb_via =
|
|
1806
|
-
type:
|
|
1816
|
+
import { z as z82 } from "zod";
|
|
1817
|
+
var pcb_via = z82.object({
|
|
1818
|
+
type: z82.literal("pcb_via"),
|
|
1807
1819
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1808
|
-
pcb_group_id:
|
|
1809
|
-
subcircuit_id:
|
|
1820
|
+
pcb_group_id: z82.string().optional(),
|
|
1821
|
+
subcircuit_id: z82.string().optional(),
|
|
1810
1822
|
x: distance,
|
|
1811
1823
|
y: distance,
|
|
1812
1824
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1815,71 +1827,71 @@ var pcb_via = z81.object({
|
|
|
1815
1827
|
from_layer: layer_ref.optional(),
|
|
1816
1828
|
/** @deprecated */
|
|
1817
1829
|
to_layer: layer_ref.optional(),
|
|
1818
|
-
layers:
|
|
1819
|
-
pcb_trace_id:
|
|
1830
|
+
layers: z82.array(layer_ref),
|
|
1831
|
+
pcb_trace_id: z82.string().optional()
|
|
1820
1832
|
}).describe("Defines a via on the PCB");
|
|
1821
1833
|
expectTypesMatch(true);
|
|
1822
1834
|
|
|
1823
1835
|
// src/pcb/pcb_board.ts
|
|
1824
|
-
import { z as
|
|
1825
|
-
var pcb_board =
|
|
1826
|
-
type:
|
|
1836
|
+
import { z as z83 } from "zod";
|
|
1837
|
+
var pcb_board = z83.object({
|
|
1838
|
+
type: z83.literal("pcb_board"),
|
|
1827
1839
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1828
|
-
pcb_panel_id:
|
|
1829
|
-
is_subcircuit:
|
|
1830
|
-
subcircuit_id:
|
|
1840
|
+
pcb_panel_id: z83.string().optional(),
|
|
1841
|
+
is_subcircuit: z83.boolean().optional(),
|
|
1842
|
+
subcircuit_id: z83.string().optional(),
|
|
1831
1843
|
width: length,
|
|
1832
1844
|
height: length,
|
|
1833
1845
|
center: point,
|
|
1834
1846
|
thickness: length.optional().default(1.4),
|
|
1835
|
-
num_layers:
|
|
1836
|
-
outline:
|
|
1837
|
-
material:
|
|
1847
|
+
num_layers: z83.number().optional().default(4),
|
|
1848
|
+
outline: z83.array(point).optional(),
|
|
1849
|
+
material: z83.enum(["fr4", "fr1"]).default("fr4")
|
|
1838
1850
|
}).describe("Defines the board outline of the PCB");
|
|
1839
1851
|
expectTypesMatch(true);
|
|
1840
1852
|
|
|
1841
1853
|
// src/pcb/pcb_panel.ts
|
|
1842
|
-
import { z as
|
|
1843
|
-
var pcb_panel =
|
|
1844
|
-
type:
|
|
1854
|
+
import { z as z84 } from "zod";
|
|
1855
|
+
var pcb_panel = z84.object({
|
|
1856
|
+
type: z84.literal("pcb_panel"),
|
|
1845
1857
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
1846
1858
|
width: length,
|
|
1847
1859
|
height: length,
|
|
1848
|
-
covered_with_solder_mask:
|
|
1860
|
+
covered_with_solder_mask: z84.boolean().optional().default(true)
|
|
1849
1861
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
1850
1862
|
expectTypesMatch(true);
|
|
1851
1863
|
|
|
1852
1864
|
// src/pcb/pcb_placement_error.ts
|
|
1853
|
-
import { z as
|
|
1854
|
-
var pcb_placement_error =
|
|
1855
|
-
type:
|
|
1865
|
+
import { z as z85 } from "zod";
|
|
1866
|
+
var pcb_placement_error = z85.object({
|
|
1867
|
+
type: z85.literal("pcb_placement_error"),
|
|
1856
1868
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1857
|
-
error_type:
|
|
1858
|
-
message:
|
|
1859
|
-
subcircuit_id:
|
|
1869
|
+
error_type: z85.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
1870
|
+
message: z85.string(),
|
|
1871
|
+
subcircuit_id: z85.string().optional()
|
|
1860
1872
|
}).describe("Defines a placement error on the PCB");
|
|
1861
1873
|
expectTypesMatch(true);
|
|
1862
1874
|
|
|
1863
1875
|
// src/pcb/pcb_trace_hint.ts
|
|
1864
|
-
import { z as
|
|
1865
|
-
var pcb_trace_hint =
|
|
1866
|
-
type:
|
|
1876
|
+
import { z as z86 } from "zod";
|
|
1877
|
+
var pcb_trace_hint = z86.object({
|
|
1878
|
+
type: z86.literal("pcb_trace_hint"),
|
|
1867
1879
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1868
|
-
pcb_port_id:
|
|
1869
|
-
pcb_component_id:
|
|
1870
|
-
route:
|
|
1871
|
-
subcircuit_id:
|
|
1880
|
+
pcb_port_id: z86.string(),
|
|
1881
|
+
pcb_component_id: z86.string(),
|
|
1882
|
+
route: z86.array(route_hint_point),
|
|
1883
|
+
subcircuit_id: z86.string().optional()
|
|
1872
1884
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1873
1885
|
expectTypesMatch(true);
|
|
1874
1886
|
|
|
1875
1887
|
// src/pcb/pcb_silkscreen_line.ts
|
|
1876
|
-
import { z as
|
|
1877
|
-
var pcb_silkscreen_line =
|
|
1878
|
-
type:
|
|
1888
|
+
import { z as z87 } from "zod";
|
|
1889
|
+
var pcb_silkscreen_line = z87.object({
|
|
1890
|
+
type: z87.literal("pcb_silkscreen_line"),
|
|
1879
1891
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
1880
|
-
pcb_component_id:
|
|
1881
|
-
pcb_group_id:
|
|
1882
|
-
subcircuit_id:
|
|
1892
|
+
pcb_component_id: z87.string(),
|
|
1893
|
+
pcb_group_id: z87.string().optional(),
|
|
1894
|
+
subcircuit_id: z87.string().optional(),
|
|
1883
1895
|
stroke_width: distance.default("0.1mm"),
|
|
1884
1896
|
x1: distance,
|
|
1885
1897
|
y1: distance,
|
|
@@ -1890,32 +1902,32 @@ var pcb_silkscreen_line = z86.object({
|
|
|
1890
1902
|
expectTypesMatch(true);
|
|
1891
1903
|
|
|
1892
1904
|
// src/pcb/pcb_silkscreen_path.ts
|
|
1893
|
-
import { z as
|
|
1894
|
-
var pcb_silkscreen_path =
|
|
1895
|
-
type:
|
|
1905
|
+
import { z as z88 } from "zod";
|
|
1906
|
+
var pcb_silkscreen_path = z88.object({
|
|
1907
|
+
type: z88.literal("pcb_silkscreen_path"),
|
|
1896
1908
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
1897
|
-
pcb_component_id:
|
|
1898
|
-
pcb_group_id:
|
|
1899
|
-
subcircuit_id:
|
|
1909
|
+
pcb_component_id: z88.string(),
|
|
1910
|
+
pcb_group_id: z88.string().optional(),
|
|
1911
|
+
subcircuit_id: z88.string().optional(),
|
|
1900
1912
|
layer: visible_layer,
|
|
1901
|
-
route:
|
|
1913
|
+
route: z88.array(point),
|
|
1902
1914
|
stroke_width: length
|
|
1903
1915
|
}).describe("Defines a silkscreen path on the PCB");
|
|
1904
1916
|
expectTypesMatch(true);
|
|
1905
1917
|
|
|
1906
1918
|
// src/pcb/pcb_silkscreen_text.ts
|
|
1907
|
-
import { z as
|
|
1908
|
-
var pcb_silkscreen_text =
|
|
1909
|
-
type:
|
|
1919
|
+
import { z as z89 } from "zod";
|
|
1920
|
+
var pcb_silkscreen_text = z89.object({
|
|
1921
|
+
type: z89.literal("pcb_silkscreen_text"),
|
|
1910
1922
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
1911
|
-
pcb_group_id:
|
|
1912
|
-
subcircuit_id:
|
|
1913
|
-
font:
|
|
1923
|
+
pcb_group_id: z89.string().optional(),
|
|
1924
|
+
subcircuit_id: z89.string().optional(),
|
|
1925
|
+
font: z89.literal("tscircuit2024").default("tscircuit2024"),
|
|
1914
1926
|
font_size: distance.default("0.2mm"),
|
|
1915
|
-
pcb_component_id:
|
|
1916
|
-
text:
|
|
1917
|
-
is_knockout:
|
|
1918
|
-
knockout_padding:
|
|
1927
|
+
pcb_component_id: z89.string(),
|
|
1928
|
+
text: z89.string(),
|
|
1929
|
+
is_knockout: z89.boolean().default(false).optional(),
|
|
1930
|
+
knockout_padding: z89.object({
|
|
1919
1931
|
left: length,
|
|
1920
1932
|
top: length,
|
|
1921
1933
|
bottom: length,
|
|
@@ -1926,27 +1938,27 @@ var pcb_silkscreen_text = z88.object({
|
|
|
1926
1938
|
bottom: "0.2mm",
|
|
1927
1939
|
right: "0.2mm"
|
|
1928
1940
|
}).optional(),
|
|
1929
|
-
ccw_rotation:
|
|
1941
|
+
ccw_rotation: z89.number().optional(),
|
|
1930
1942
|
layer: layer_ref,
|
|
1931
|
-
is_mirrored:
|
|
1943
|
+
is_mirrored: z89.boolean().default(false).optional(),
|
|
1932
1944
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1933
1945
|
anchor_alignment: ninePointAnchor.default("center")
|
|
1934
1946
|
}).describe("Defines silkscreen text on the PCB");
|
|
1935
1947
|
expectTypesMatch(true);
|
|
1936
1948
|
|
|
1937
1949
|
// src/pcb/pcb_copper_text.ts
|
|
1938
|
-
import { z as
|
|
1939
|
-
var pcb_copper_text =
|
|
1940
|
-
type:
|
|
1950
|
+
import { z as z90 } from "zod";
|
|
1951
|
+
var pcb_copper_text = z90.object({
|
|
1952
|
+
type: z90.literal("pcb_copper_text"),
|
|
1941
1953
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
1942
|
-
pcb_group_id:
|
|
1943
|
-
subcircuit_id:
|
|
1944
|
-
font:
|
|
1954
|
+
pcb_group_id: z90.string().optional(),
|
|
1955
|
+
subcircuit_id: z90.string().optional(),
|
|
1956
|
+
font: z90.literal("tscircuit2024").default("tscircuit2024"),
|
|
1945
1957
|
font_size: distance.default("0.2mm"),
|
|
1946
|
-
pcb_component_id:
|
|
1947
|
-
text:
|
|
1948
|
-
is_knockout:
|
|
1949
|
-
knockout_padding:
|
|
1958
|
+
pcb_component_id: z90.string(),
|
|
1959
|
+
text: z90.string(),
|
|
1960
|
+
is_knockout: z90.boolean().default(false).optional(),
|
|
1961
|
+
knockout_padding: z90.object({
|
|
1950
1962
|
left: length,
|
|
1951
1963
|
top: length,
|
|
1952
1964
|
bottom: length,
|
|
@@ -1957,43 +1969,44 @@ var pcb_copper_text = z89.object({
|
|
|
1957
1969
|
bottom: "0.2mm",
|
|
1958
1970
|
right: "0.2mm"
|
|
1959
1971
|
}).optional(),
|
|
1960
|
-
ccw_rotation:
|
|
1972
|
+
ccw_rotation: z90.number().optional(),
|
|
1961
1973
|
layer: layer_ref,
|
|
1962
|
-
is_mirrored:
|
|
1974
|
+
is_mirrored: z90.boolean().default(false).optional(),
|
|
1963
1975
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1964
1976
|
anchor_alignment: ninePointAnchor.default("center")
|
|
1965
1977
|
}).describe("Defines copper text on the PCB");
|
|
1966
1978
|
expectTypesMatch(true);
|
|
1967
1979
|
|
|
1968
1980
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
1969
|
-
import { z as
|
|
1970
|
-
var pcb_silkscreen_rect =
|
|
1971
|
-
type:
|
|
1981
|
+
import { z as z91 } from "zod";
|
|
1982
|
+
var pcb_silkscreen_rect = z91.object({
|
|
1983
|
+
type: z91.literal("pcb_silkscreen_rect"),
|
|
1972
1984
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1973
|
-
pcb_component_id:
|
|
1974
|
-
pcb_group_id:
|
|
1975
|
-
subcircuit_id:
|
|
1985
|
+
pcb_component_id: z91.string(),
|
|
1986
|
+
pcb_group_id: z91.string().optional(),
|
|
1987
|
+
subcircuit_id: z91.string().optional(),
|
|
1976
1988
|
center: point,
|
|
1977
1989
|
width: length,
|
|
1978
1990
|
height: length,
|
|
1979
1991
|
layer: layer_ref,
|
|
1980
1992
|
stroke_width: length.default("1mm"),
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1993
|
+
corner_radius: length.optional(),
|
|
1994
|
+
is_filled: z91.boolean().default(true).optional(),
|
|
1995
|
+
has_stroke: z91.boolean().optional(),
|
|
1996
|
+
is_stroke_dashed: z91.boolean().optional()
|
|
1984
1997
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
1985
1998
|
expectTypesMatch(true);
|
|
1986
1999
|
|
|
1987
2000
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1988
|
-
import { z as
|
|
1989
|
-
var pcb_silkscreen_circle =
|
|
1990
|
-
type:
|
|
2001
|
+
import { z as z92 } from "zod";
|
|
2002
|
+
var pcb_silkscreen_circle = z92.object({
|
|
2003
|
+
type: z92.literal("pcb_silkscreen_circle"),
|
|
1991
2004
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1992
2005
|
"pcb_silkscreen_circle"
|
|
1993
2006
|
),
|
|
1994
|
-
pcb_component_id:
|
|
1995
|
-
pcb_group_id:
|
|
1996
|
-
subcircuit_id:
|
|
2007
|
+
pcb_component_id: z92.string(),
|
|
2008
|
+
pcb_group_id: z92.string().optional(),
|
|
2009
|
+
subcircuit_id: z92.string().optional(),
|
|
1997
2010
|
center: point,
|
|
1998
2011
|
radius: length,
|
|
1999
2012
|
layer: visible_layer,
|
|
@@ -2002,13 +2015,13 @@ var pcb_silkscreen_circle = z91.object({
|
|
|
2002
2015
|
expectTypesMatch(true);
|
|
2003
2016
|
|
|
2004
2017
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2005
|
-
import { z as
|
|
2006
|
-
var pcb_silkscreen_oval =
|
|
2007
|
-
type:
|
|
2018
|
+
import { z as z93 } from "zod";
|
|
2019
|
+
var pcb_silkscreen_oval = z93.object({
|
|
2020
|
+
type: z93.literal("pcb_silkscreen_oval"),
|
|
2008
2021
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2009
|
-
pcb_component_id:
|
|
2010
|
-
pcb_group_id:
|
|
2011
|
-
subcircuit_id:
|
|
2022
|
+
pcb_component_id: z93.string(),
|
|
2023
|
+
pcb_group_id: z93.string().optional(),
|
|
2024
|
+
subcircuit_id: z93.string().optional(),
|
|
2012
2025
|
center: point,
|
|
2013
2026
|
radius_x: distance,
|
|
2014
2027
|
radius_y: distance,
|
|
@@ -2017,253 +2030,255 @@ var pcb_silkscreen_oval = z92.object({
|
|
|
2017
2030
|
expectTypesMatch(true);
|
|
2018
2031
|
|
|
2019
2032
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2020
|
-
import { z as
|
|
2021
|
-
var pcb_fabrication_note_text =
|
|
2022
|
-
type:
|
|
2033
|
+
import { z as z94 } from "zod";
|
|
2034
|
+
var pcb_fabrication_note_text = z94.object({
|
|
2035
|
+
type: z94.literal("pcb_fabrication_note_text"),
|
|
2023
2036
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2024
2037
|
"pcb_fabrication_note_text"
|
|
2025
2038
|
),
|
|
2026
|
-
subcircuit_id:
|
|
2027
|
-
pcb_group_id:
|
|
2028
|
-
font:
|
|
2039
|
+
subcircuit_id: z94.string().optional(),
|
|
2040
|
+
pcb_group_id: z94.string().optional(),
|
|
2041
|
+
font: z94.literal("tscircuit2024").default("tscircuit2024"),
|
|
2029
2042
|
font_size: distance.default("1mm"),
|
|
2030
|
-
pcb_component_id:
|
|
2031
|
-
text:
|
|
2043
|
+
pcb_component_id: z94.string(),
|
|
2044
|
+
text: z94.string(),
|
|
2032
2045
|
layer: visible_layer,
|
|
2033
2046
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2034
|
-
anchor_alignment:
|
|
2035
|
-
color:
|
|
2047
|
+
anchor_alignment: z94.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2048
|
+
color: z94.string().optional()
|
|
2036
2049
|
}).describe(
|
|
2037
2050
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2038
2051
|
);
|
|
2039
2052
|
expectTypesMatch(true);
|
|
2040
2053
|
|
|
2041
2054
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2042
|
-
import { z as
|
|
2043
|
-
var pcb_fabrication_note_path =
|
|
2044
|
-
type:
|
|
2055
|
+
import { z as z95 } from "zod";
|
|
2056
|
+
var pcb_fabrication_note_path = z95.object({
|
|
2057
|
+
type: z95.literal("pcb_fabrication_note_path"),
|
|
2045
2058
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2046
2059
|
"pcb_fabrication_note_path"
|
|
2047
2060
|
),
|
|
2048
|
-
pcb_component_id:
|
|
2049
|
-
subcircuit_id:
|
|
2061
|
+
pcb_component_id: z95.string(),
|
|
2062
|
+
subcircuit_id: z95.string().optional(),
|
|
2050
2063
|
layer: layer_ref,
|
|
2051
|
-
route:
|
|
2064
|
+
route: z95.array(point),
|
|
2052
2065
|
stroke_width: length,
|
|
2053
|
-
color:
|
|
2066
|
+
color: z95.string().optional()
|
|
2054
2067
|
}).describe(
|
|
2055
2068
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2056
2069
|
);
|
|
2057
2070
|
expectTypesMatch(true);
|
|
2058
2071
|
|
|
2059
2072
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2060
|
-
import { z as
|
|
2061
|
-
var pcb_fabrication_note_rect =
|
|
2062
|
-
type:
|
|
2073
|
+
import { z as z96 } from "zod";
|
|
2074
|
+
var pcb_fabrication_note_rect = z96.object({
|
|
2075
|
+
type: z96.literal("pcb_fabrication_note_rect"),
|
|
2063
2076
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2064
2077
|
"pcb_fabrication_note_rect"
|
|
2065
2078
|
),
|
|
2066
|
-
pcb_component_id:
|
|
2067
|
-
pcb_group_id:
|
|
2068
|
-
subcircuit_id:
|
|
2079
|
+
pcb_component_id: z96.string(),
|
|
2080
|
+
pcb_group_id: z96.string().optional(),
|
|
2081
|
+
subcircuit_id: z96.string().optional(),
|
|
2069
2082
|
center: point,
|
|
2070
2083
|
width: length,
|
|
2071
2084
|
height: length,
|
|
2072
2085
|
layer: visible_layer,
|
|
2073
2086
|
stroke_width: length.default("0.1mm"),
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2087
|
+
corner_radius: length.optional(),
|
|
2088
|
+
is_filled: z96.boolean().optional(),
|
|
2089
|
+
has_stroke: z96.boolean().optional(),
|
|
2090
|
+
is_stroke_dashed: z96.boolean().optional(),
|
|
2091
|
+
color: z96.string().optional()
|
|
2078
2092
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2079
2093
|
expectTypesMatch(true);
|
|
2080
2094
|
|
|
2081
2095
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2082
|
-
import { z as
|
|
2083
|
-
var pcb_fabrication_note_dimension =
|
|
2084
|
-
type:
|
|
2096
|
+
import { z as z97 } from "zod";
|
|
2097
|
+
var pcb_fabrication_note_dimension = z97.object({
|
|
2098
|
+
type: z97.literal("pcb_fabrication_note_dimension"),
|
|
2085
2099
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2086
2100
|
"pcb_fabrication_note_dimension"
|
|
2087
2101
|
),
|
|
2088
|
-
pcb_component_id:
|
|
2089
|
-
pcb_group_id:
|
|
2090
|
-
subcircuit_id:
|
|
2102
|
+
pcb_component_id: z97.string(),
|
|
2103
|
+
pcb_group_id: z97.string().optional(),
|
|
2104
|
+
subcircuit_id: z97.string().optional(),
|
|
2091
2105
|
layer: visible_layer,
|
|
2092
2106
|
from: point,
|
|
2093
2107
|
to: point,
|
|
2094
|
-
text:
|
|
2095
|
-
text_ccw_rotation:
|
|
2108
|
+
text: z97.string().optional(),
|
|
2109
|
+
text_ccw_rotation: z97.number().optional(),
|
|
2096
2110
|
offset: length.optional(),
|
|
2097
2111
|
offset_distance: length.optional(),
|
|
2098
|
-
offset_direction:
|
|
2099
|
-
x:
|
|
2100
|
-
y:
|
|
2112
|
+
offset_direction: z97.object({
|
|
2113
|
+
x: z97.number(),
|
|
2114
|
+
y: z97.number()
|
|
2101
2115
|
}).optional(),
|
|
2102
|
-
font:
|
|
2116
|
+
font: z97.literal("tscircuit2024").default("tscircuit2024"),
|
|
2103
2117
|
font_size: length.default("1mm"),
|
|
2104
|
-
color:
|
|
2118
|
+
color: z97.string().optional(),
|
|
2105
2119
|
arrow_size: length.default("1mm")
|
|
2106
2120
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2107
2121
|
expectTypesMatch(true);
|
|
2108
2122
|
|
|
2109
2123
|
// src/pcb/pcb_note_text.ts
|
|
2110
|
-
import { z as z97 } from "zod";
|
|
2111
|
-
var pcb_note_text = z97.object({
|
|
2112
|
-
type: z97.literal("pcb_note_text"),
|
|
2113
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2114
|
-
pcb_component_id: z97.string().optional(),
|
|
2115
|
-
pcb_group_id: z97.string().optional(),
|
|
2116
|
-
subcircuit_id: z97.string().optional(),
|
|
2117
|
-
name: z97.string().optional(),
|
|
2118
|
-
font: z97.literal("tscircuit2024").default("tscircuit2024"),
|
|
2119
|
-
font_size: distance.default("1mm"),
|
|
2120
|
-
text: z97.string().optional(),
|
|
2121
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2122
|
-
anchor_alignment: z97.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2123
|
-
color: z97.string().optional()
|
|
2124
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2125
|
-
expectTypesMatch(true);
|
|
2126
|
-
|
|
2127
|
-
// src/pcb/pcb_note_rect.ts
|
|
2128
2124
|
import { z as z98 } from "zod";
|
|
2129
|
-
var
|
|
2130
|
-
type: z98.literal("
|
|
2131
|
-
|
|
2125
|
+
var pcb_note_text = z98.object({
|
|
2126
|
+
type: z98.literal("pcb_note_text"),
|
|
2127
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2132
2128
|
pcb_component_id: z98.string().optional(),
|
|
2133
2129
|
pcb_group_id: z98.string().optional(),
|
|
2134
2130
|
subcircuit_id: z98.string().optional(),
|
|
2135
2131
|
name: z98.string().optional(),
|
|
2132
|
+
font: z98.literal("tscircuit2024").default("tscircuit2024"),
|
|
2133
|
+
font_size: distance.default("1mm"),
|
|
2136
2134
|
text: z98.string().optional(),
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
height: length,
|
|
2140
|
-
stroke_width: length.default("0.1mm"),
|
|
2141
|
-
is_filled: z98.boolean().optional(),
|
|
2142
|
-
has_stroke: z98.boolean().optional(),
|
|
2143
|
-
is_stroke_dashed: z98.boolean().optional(),
|
|
2135
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2136
|
+
anchor_alignment: z98.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2144
2137
|
color: z98.string().optional()
|
|
2145
|
-
}).describe("Defines a
|
|
2138
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2146
2139
|
expectTypesMatch(true);
|
|
2147
2140
|
|
|
2148
|
-
// src/pcb/
|
|
2141
|
+
// src/pcb/pcb_note_rect.ts
|
|
2149
2142
|
import { z as z99 } from "zod";
|
|
2150
|
-
var
|
|
2151
|
-
type: z99.literal("
|
|
2152
|
-
|
|
2143
|
+
var pcb_note_rect = z99.object({
|
|
2144
|
+
type: z99.literal("pcb_note_rect"),
|
|
2145
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2153
2146
|
pcb_component_id: z99.string().optional(),
|
|
2154
2147
|
pcb_group_id: z99.string().optional(),
|
|
2155
2148
|
subcircuit_id: z99.string().optional(),
|
|
2156
2149
|
name: z99.string().optional(),
|
|
2157
2150
|
text: z99.string().optional(),
|
|
2158
|
-
|
|
2151
|
+
center: point,
|
|
2152
|
+
width: length,
|
|
2153
|
+
height: length,
|
|
2159
2154
|
stroke_width: length.default("0.1mm"),
|
|
2155
|
+
corner_radius: length.optional(),
|
|
2156
|
+
is_filled: z99.boolean().optional(),
|
|
2157
|
+
has_stroke: z99.boolean().optional(),
|
|
2158
|
+
is_stroke_dashed: z99.boolean().optional(),
|
|
2160
2159
|
color: z99.string().optional()
|
|
2161
|
-
}).describe("Defines a
|
|
2160
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2162
2161
|
expectTypesMatch(true);
|
|
2163
2162
|
|
|
2164
|
-
// src/pcb/
|
|
2163
|
+
// src/pcb/pcb_note_path.ts
|
|
2165
2164
|
import { z as z100 } from "zod";
|
|
2166
|
-
var
|
|
2167
|
-
type: z100.literal("
|
|
2168
|
-
|
|
2165
|
+
var pcb_note_path = z100.object({
|
|
2166
|
+
type: z100.literal("pcb_note_path"),
|
|
2167
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2169
2168
|
pcb_component_id: z100.string().optional(),
|
|
2170
2169
|
pcb_group_id: z100.string().optional(),
|
|
2171
2170
|
subcircuit_id: z100.string().optional(),
|
|
2172
2171
|
name: z100.string().optional(),
|
|
2173
2172
|
text: z100.string().optional(),
|
|
2173
|
+
route: z100.array(point),
|
|
2174
|
+
stroke_width: length.default("0.1mm"),
|
|
2175
|
+
color: z100.string().optional()
|
|
2176
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2177
|
+
expectTypesMatch(true);
|
|
2178
|
+
|
|
2179
|
+
// src/pcb/pcb_note_line.ts
|
|
2180
|
+
import { z as z101 } from "zod";
|
|
2181
|
+
var pcb_note_line = z101.object({
|
|
2182
|
+
type: z101.literal("pcb_note_line"),
|
|
2183
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2184
|
+
pcb_component_id: z101.string().optional(),
|
|
2185
|
+
pcb_group_id: z101.string().optional(),
|
|
2186
|
+
subcircuit_id: z101.string().optional(),
|
|
2187
|
+
name: z101.string().optional(),
|
|
2188
|
+
text: z101.string().optional(),
|
|
2174
2189
|
x1: distance,
|
|
2175
2190
|
y1: distance,
|
|
2176
2191
|
x2: distance,
|
|
2177
2192
|
y2: distance,
|
|
2178
2193
|
stroke_width: distance.default("0.1mm"),
|
|
2179
|
-
color:
|
|
2180
|
-
is_dashed:
|
|
2194
|
+
color: z101.string().optional(),
|
|
2195
|
+
is_dashed: z101.boolean().optional()
|
|
2181
2196
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2182
2197
|
expectTypesMatch(true);
|
|
2183
2198
|
|
|
2184
2199
|
// src/pcb/pcb_note_dimension.ts
|
|
2185
|
-
import { z as
|
|
2186
|
-
var pcb_note_dimension =
|
|
2187
|
-
type:
|
|
2200
|
+
import { z as z102 } from "zod";
|
|
2201
|
+
var pcb_note_dimension = z102.object({
|
|
2202
|
+
type: z102.literal("pcb_note_dimension"),
|
|
2188
2203
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2189
|
-
pcb_component_id:
|
|
2190
|
-
pcb_group_id:
|
|
2191
|
-
subcircuit_id:
|
|
2192
|
-
name:
|
|
2204
|
+
pcb_component_id: z102.string().optional(),
|
|
2205
|
+
pcb_group_id: z102.string().optional(),
|
|
2206
|
+
subcircuit_id: z102.string().optional(),
|
|
2207
|
+
name: z102.string().optional(),
|
|
2193
2208
|
from: point,
|
|
2194
2209
|
to: point,
|
|
2195
|
-
text:
|
|
2196
|
-
text_ccw_rotation:
|
|
2210
|
+
text: z102.string().optional(),
|
|
2211
|
+
text_ccw_rotation: z102.number().optional(),
|
|
2197
2212
|
offset_distance: length.optional(),
|
|
2198
|
-
offset_direction:
|
|
2199
|
-
x:
|
|
2200
|
-
y:
|
|
2213
|
+
offset_direction: z102.object({
|
|
2214
|
+
x: z102.number(),
|
|
2215
|
+
y: z102.number()
|
|
2201
2216
|
}).optional(),
|
|
2202
|
-
font:
|
|
2217
|
+
font: z102.literal("tscircuit2024").default("tscircuit2024"),
|
|
2203
2218
|
font_size: length.default("1mm"),
|
|
2204
|
-
color:
|
|
2219
|
+
color: z102.string().optional(),
|
|
2205
2220
|
arrow_size: length.default("1mm")
|
|
2206
2221
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2207
2222
|
expectTypesMatch(true);
|
|
2208
2223
|
|
|
2209
2224
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2210
|
-
import { z as
|
|
2211
|
-
var pcb_footprint_overlap_error =
|
|
2212
|
-
type:
|
|
2225
|
+
import { z as z103 } from "zod";
|
|
2226
|
+
var pcb_footprint_overlap_error = z103.object({
|
|
2227
|
+
type: z103.literal("pcb_footprint_overlap_error"),
|
|
2213
2228
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2214
|
-
error_type:
|
|
2215
|
-
message:
|
|
2216
|
-
pcb_smtpad_ids:
|
|
2217
|
-
pcb_plated_hole_ids:
|
|
2218
|
-
pcb_hole_ids:
|
|
2219
|
-
pcb_keepout_ids:
|
|
2229
|
+
error_type: z103.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2230
|
+
message: z103.string(),
|
|
2231
|
+
pcb_smtpad_ids: z103.array(z103.string()).optional(),
|
|
2232
|
+
pcb_plated_hole_ids: z103.array(z103.string()).optional(),
|
|
2233
|
+
pcb_hole_ids: z103.array(z103.string()).optional(),
|
|
2234
|
+
pcb_keepout_ids: z103.array(z103.string()).optional()
|
|
2220
2235
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2221
2236
|
expectTypesMatch(
|
|
2222
2237
|
true
|
|
2223
2238
|
);
|
|
2224
2239
|
|
|
2225
2240
|
// src/pcb/pcb_keepout.ts
|
|
2226
|
-
import { z as
|
|
2227
|
-
var pcb_keepout =
|
|
2228
|
-
type:
|
|
2229
|
-
shape:
|
|
2230
|
-
pcb_group_id:
|
|
2231
|
-
subcircuit_id:
|
|
2241
|
+
import { z as z104 } from "zod";
|
|
2242
|
+
var pcb_keepout = z104.object({
|
|
2243
|
+
type: z104.literal("pcb_keepout"),
|
|
2244
|
+
shape: z104.literal("rect"),
|
|
2245
|
+
pcb_group_id: z104.string().optional(),
|
|
2246
|
+
subcircuit_id: z104.string().optional(),
|
|
2232
2247
|
center: point,
|
|
2233
2248
|
width: distance,
|
|
2234
2249
|
height: distance,
|
|
2235
|
-
pcb_keepout_id:
|
|
2236
|
-
layers:
|
|
2250
|
+
pcb_keepout_id: z104.string(),
|
|
2251
|
+
layers: z104.array(z104.string()),
|
|
2237
2252
|
// Specify layers where the keepout applies
|
|
2238
|
-
description:
|
|
2253
|
+
description: z104.string().optional()
|
|
2239
2254
|
// Optional description of the keepout
|
|
2240
2255
|
}).or(
|
|
2241
|
-
|
|
2242
|
-
type:
|
|
2243
|
-
shape:
|
|
2244
|
-
pcb_group_id:
|
|
2245
|
-
subcircuit_id:
|
|
2256
|
+
z104.object({
|
|
2257
|
+
type: z104.literal("pcb_keepout"),
|
|
2258
|
+
shape: z104.literal("circle"),
|
|
2259
|
+
pcb_group_id: z104.string().optional(),
|
|
2260
|
+
subcircuit_id: z104.string().optional(),
|
|
2246
2261
|
center: point,
|
|
2247
2262
|
radius: distance,
|
|
2248
|
-
pcb_keepout_id:
|
|
2249
|
-
layers:
|
|
2263
|
+
pcb_keepout_id: z104.string(),
|
|
2264
|
+
layers: z104.array(z104.string()),
|
|
2250
2265
|
// Specify layers where the keepout applies
|
|
2251
|
-
description:
|
|
2266
|
+
description: z104.string().optional()
|
|
2252
2267
|
// Optional description of the keepout
|
|
2253
2268
|
})
|
|
2254
2269
|
);
|
|
2255
2270
|
expectTypesMatch(true);
|
|
2256
2271
|
|
|
2257
2272
|
// src/pcb/pcb_cutout.ts
|
|
2258
|
-
import { z as
|
|
2259
|
-
var pcb_cutout_base =
|
|
2260
|
-
type:
|
|
2273
|
+
import { z as z105 } from "zod";
|
|
2274
|
+
var pcb_cutout_base = z105.object({
|
|
2275
|
+
type: z105.literal("pcb_cutout"),
|
|
2261
2276
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2262
|
-
pcb_group_id:
|
|
2263
|
-
subcircuit_id:
|
|
2277
|
+
pcb_group_id: z105.string().optional(),
|
|
2278
|
+
subcircuit_id: z105.string().optional()
|
|
2264
2279
|
});
|
|
2265
2280
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2266
|
-
shape:
|
|
2281
|
+
shape: z105.literal("rect"),
|
|
2267
2282
|
center: point,
|
|
2268
2283
|
width: length,
|
|
2269
2284
|
height: length,
|
|
@@ -2271,17 +2286,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2271
2286
|
});
|
|
2272
2287
|
expectTypesMatch(true);
|
|
2273
2288
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2274
|
-
shape:
|
|
2289
|
+
shape: z105.literal("circle"),
|
|
2275
2290
|
center: point,
|
|
2276
2291
|
radius: length
|
|
2277
2292
|
});
|
|
2278
2293
|
expectTypesMatch(true);
|
|
2279
2294
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2280
|
-
shape:
|
|
2281
|
-
points:
|
|
2295
|
+
shape: z105.literal("polygon"),
|
|
2296
|
+
points: z105.array(point)
|
|
2282
2297
|
});
|
|
2283
2298
|
expectTypesMatch(true);
|
|
2284
|
-
var pcb_cutout =
|
|
2299
|
+
var pcb_cutout = z105.discriminatedUnion("shape", [
|
|
2285
2300
|
pcb_cutout_rect,
|
|
2286
2301
|
pcb_cutout_circle,
|
|
2287
2302
|
pcb_cutout_polygon
|
|
@@ -2289,120 +2304,120 @@ var pcb_cutout = z104.discriminatedUnion("shape", [
|
|
|
2289
2304
|
expectTypesMatch(true);
|
|
2290
2305
|
|
|
2291
2306
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2292
|
-
import { z as
|
|
2293
|
-
var pcb_missing_footprint_error =
|
|
2294
|
-
type:
|
|
2307
|
+
import { z as z106 } from "zod";
|
|
2308
|
+
var pcb_missing_footprint_error = z106.object({
|
|
2309
|
+
type: z106.literal("pcb_missing_footprint_error"),
|
|
2295
2310
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2296
2311
|
"pcb_missing_footprint_error"
|
|
2297
2312
|
),
|
|
2298
|
-
pcb_group_id:
|
|
2299
|
-
subcircuit_id:
|
|
2300
|
-
error_type:
|
|
2301
|
-
source_component_id:
|
|
2302
|
-
message:
|
|
2313
|
+
pcb_group_id: z106.string().optional(),
|
|
2314
|
+
subcircuit_id: z106.string().optional(),
|
|
2315
|
+
error_type: z106.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2316
|
+
source_component_id: z106.string(),
|
|
2317
|
+
message: z106.string()
|
|
2303
2318
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2304
2319
|
expectTypesMatch(
|
|
2305
2320
|
true
|
|
2306
2321
|
);
|
|
2307
2322
|
|
|
2308
2323
|
// src/pcb/external_footprint_load_error.ts
|
|
2309
|
-
import { z as
|
|
2310
|
-
var external_footprint_load_error =
|
|
2311
|
-
type:
|
|
2324
|
+
import { z as z107 } from "zod";
|
|
2325
|
+
var external_footprint_load_error = z107.object({
|
|
2326
|
+
type: z107.literal("external_footprint_load_error"),
|
|
2312
2327
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2313
2328
|
"external_footprint_load_error"
|
|
2314
2329
|
),
|
|
2315
|
-
pcb_component_id:
|
|
2316
|
-
source_component_id:
|
|
2317
|
-
pcb_group_id:
|
|
2318
|
-
subcircuit_id:
|
|
2319
|
-
footprinter_string:
|
|
2320
|
-
error_type:
|
|
2321
|
-
message:
|
|
2330
|
+
pcb_component_id: z107.string(),
|
|
2331
|
+
source_component_id: z107.string(),
|
|
2332
|
+
pcb_group_id: z107.string().optional(),
|
|
2333
|
+
subcircuit_id: z107.string().optional(),
|
|
2334
|
+
footprinter_string: z107.string().optional(),
|
|
2335
|
+
error_type: z107.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
2336
|
+
message: z107.string()
|
|
2322
2337
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2323
2338
|
expectTypesMatch(true);
|
|
2324
2339
|
|
|
2325
2340
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2326
|
-
import { z as
|
|
2327
|
-
var circuit_json_footprint_load_error =
|
|
2328
|
-
type:
|
|
2341
|
+
import { z as z108 } from "zod";
|
|
2342
|
+
var circuit_json_footprint_load_error = z108.object({
|
|
2343
|
+
type: z108.literal("circuit_json_footprint_load_error"),
|
|
2329
2344
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2330
2345
|
"circuit_json_footprint_load_error"
|
|
2331
2346
|
),
|
|
2332
|
-
pcb_component_id:
|
|
2333
|
-
source_component_id:
|
|
2334
|
-
pcb_group_id:
|
|
2335
|
-
subcircuit_id:
|
|
2336
|
-
error_type:
|
|
2337
|
-
message:
|
|
2338
|
-
circuit_json:
|
|
2347
|
+
pcb_component_id: z108.string(),
|
|
2348
|
+
source_component_id: z108.string(),
|
|
2349
|
+
pcb_group_id: z108.string().optional(),
|
|
2350
|
+
subcircuit_id: z108.string().optional(),
|
|
2351
|
+
error_type: z108.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2352
|
+
message: z108.string(),
|
|
2353
|
+
circuit_json: z108.array(z108.any()).optional()
|
|
2339
2354
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2340
2355
|
expectTypesMatch(true);
|
|
2341
2356
|
|
|
2342
2357
|
// src/pcb/pcb_group.ts
|
|
2343
|
-
import { z as
|
|
2344
|
-
var pcb_group =
|
|
2345
|
-
type:
|
|
2358
|
+
import { z as z109 } from "zod";
|
|
2359
|
+
var pcb_group = z109.object({
|
|
2360
|
+
type: z109.literal("pcb_group"),
|
|
2346
2361
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2347
|
-
source_group_id:
|
|
2348
|
-
is_subcircuit:
|
|
2349
|
-
subcircuit_id:
|
|
2362
|
+
source_group_id: z109.string(),
|
|
2363
|
+
is_subcircuit: z109.boolean().optional(),
|
|
2364
|
+
subcircuit_id: z109.string().optional(),
|
|
2350
2365
|
width: length.optional(),
|
|
2351
2366
|
height: length.optional(),
|
|
2352
2367
|
center: point,
|
|
2353
|
-
outline:
|
|
2368
|
+
outline: z109.array(point).optional(),
|
|
2354
2369
|
anchor_position: point.optional(),
|
|
2355
|
-
anchor_alignment:
|
|
2356
|
-
pcb_component_ids:
|
|
2357
|
-
name:
|
|
2358
|
-
description:
|
|
2359
|
-
layout_mode:
|
|
2360
|
-
autorouter_configuration:
|
|
2370
|
+
anchor_alignment: z109.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).optional(),
|
|
2371
|
+
pcb_component_ids: z109.array(z109.string()),
|
|
2372
|
+
name: z109.string().optional(),
|
|
2373
|
+
description: z109.string().optional(),
|
|
2374
|
+
layout_mode: z109.string().optional(),
|
|
2375
|
+
autorouter_configuration: z109.object({
|
|
2361
2376
|
trace_clearance: length
|
|
2362
2377
|
}).optional(),
|
|
2363
|
-
autorouter_used_string:
|
|
2378
|
+
autorouter_used_string: z109.string().optional()
|
|
2364
2379
|
}).describe("Defines a group of components on the PCB");
|
|
2365
2380
|
expectTypesMatch(true);
|
|
2366
2381
|
|
|
2367
2382
|
// src/pcb/pcb_autorouting_error.ts
|
|
2368
|
-
import { z as
|
|
2369
|
-
var pcb_autorouting_error =
|
|
2370
|
-
type:
|
|
2383
|
+
import { z as z110 } from "zod";
|
|
2384
|
+
var pcb_autorouting_error = z110.object({
|
|
2385
|
+
type: z110.literal("pcb_autorouting_error"),
|
|
2371
2386
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2372
|
-
error_type:
|
|
2373
|
-
message:
|
|
2374
|
-
subcircuit_id:
|
|
2387
|
+
error_type: z110.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2388
|
+
message: z110.string(),
|
|
2389
|
+
subcircuit_id: z110.string().optional()
|
|
2375
2390
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2376
2391
|
expectTypesMatch(true);
|
|
2377
2392
|
|
|
2378
2393
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2379
|
-
import { z as
|
|
2380
|
-
var pcb_manual_edit_conflict_warning =
|
|
2381
|
-
type:
|
|
2394
|
+
import { z as z111 } from "zod";
|
|
2395
|
+
var pcb_manual_edit_conflict_warning = z111.object({
|
|
2396
|
+
type: z111.literal("pcb_manual_edit_conflict_warning"),
|
|
2382
2397
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2383
2398
|
"pcb_manual_edit_conflict_warning"
|
|
2384
2399
|
),
|
|
2385
|
-
warning_type:
|
|
2386
|
-
message:
|
|
2387
|
-
pcb_component_id:
|
|
2388
|
-
pcb_group_id:
|
|
2389
|
-
subcircuit_id:
|
|
2390
|
-
source_component_id:
|
|
2400
|
+
warning_type: z111.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
2401
|
+
message: z111.string(),
|
|
2402
|
+
pcb_component_id: z111.string(),
|
|
2403
|
+
pcb_group_id: z111.string().optional(),
|
|
2404
|
+
subcircuit_id: z111.string().optional(),
|
|
2405
|
+
source_component_id: z111.string()
|
|
2391
2406
|
}).describe(
|
|
2392
2407
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2393
2408
|
);
|
|
2394
2409
|
expectTypesMatch(true);
|
|
2395
2410
|
|
|
2396
2411
|
// src/pcb/pcb_breakout_point.ts
|
|
2397
|
-
import { z as
|
|
2398
|
-
var pcb_breakout_point =
|
|
2399
|
-
type:
|
|
2412
|
+
import { z as z112 } from "zod";
|
|
2413
|
+
var pcb_breakout_point = z112.object({
|
|
2414
|
+
type: z112.literal("pcb_breakout_point"),
|
|
2400
2415
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
2401
|
-
pcb_group_id:
|
|
2402
|
-
subcircuit_id:
|
|
2403
|
-
source_trace_id:
|
|
2404
|
-
source_port_id:
|
|
2405
|
-
source_net_id:
|
|
2416
|
+
pcb_group_id: z112.string(),
|
|
2417
|
+
subcircuit_id: z112.string().optional(),
|
|
2418
|
+
source_trace_id: z112.string().optional(),
|
|
2419
|
+
source_port_id: z112.string().optional(),
|
|
2420
|
+
source_net_id: z112.string().optional(),
|
|
2406
2421
|
x: distance,
|
|
2407
2422
|
y: distance
|
|
2408
2423
|
}).describe(
|
|
@@ -2411,60 +2426,60 @@ var pcb_breakout_point = z111.object({
|
|
|
2411
2426
|
expectTypesMatch(true);
|
|
2412
2427
|
|
|
2413
2428
|
// src/pcb/pcb_ground_plane.ts
|
|
2414
|
-
import { z as
|
|
2415
|
-
var pcb_ground_plane =
|
|
2416
|
-
type:
|
|
2429
|
+
import { z as z113 } from "zod";
|
|
2430
|
+
var pcb_ground_plane = z113.object({
|
|
2431
|
+
type: z113.literal("pcb_ground_plane"),
|
|
2417
2432
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
2418
|
-
source_pcb_ground_plane_id:
|
|
2419
|
-
source_net_id:
|
|
2420
|
-
pcb_group_id:
|
|
2421
|
-
subcircuit_id:
|
|
2433
|
+
source_pcb_ground_plane_id: z113.string(),
|
|
2434
|
+
source_net_id: z113.string(),
|
|
2435
|
+
pcb_group_id: z113.string().optional(),
|
|
2436
|
+
subcircuit_id: z113.string().optional()
|
|
2422
2437
|
}).describe("Defines a ground plane on the PCB");
|
|
2423
2438
|
expectTypesMatch(true);
|
|
2424
2439
|
|
|
2425
2440
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2426
|
-
import { z as
|
|
2427
|
-
var pcb_ground_plane_region =
|
|
2428
|
-
type:
|
|
2441
|
+
import { z as z114 } from "zod";
|
|
2442
|
+
var pcb_ground_plane_region = z114.object({
|
|
2443
|
+
type: z114.literal("pcb_ground_plane_region"),
|
|
2429
2444
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2430
2445
|
"pcb_ground_plane_region"
|
|
2431
2446
|
),
|
|
2432
|
-
pcb_ground_plane_id:
|
|
2433
|
-
pcb_group_id:
|
|
2434
|
-
subcircuit_id:
|
|
2447
|
+
pcb_ground_plane_id: z114.string(),
|
|
2448
|
+
pcb_group_id: z114.string().optional(),
|
|
2449
|
+
subcircuit_id: z114.string().optional(),
|
|
2435
2450
|
layer: layer_ref,
|
|
2436
|
-
points:
|
|
2451
|
+
points: z114.array(point)
|
|
2437
2452
|
}).describe("Defines a polygon region of a ground plane");
|
|
2438
2453
|
expectTypesMatch(true);
|
|
2439
2454
|
|
|
2440
2455
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2441
|
-
import { z as
|
|
2442
|
-
var pcb_thermal_spoke =
|
|
2443
|
-
type:
|
|
2456
|
+
import { z as z115 } from "zod";
|
|
2457
|
+
var pcb_thermal_spoke = z115.object({
|
|
2458
|
+
type: z115.literal("pcb_thermal_spoke"),
|
|
2444
2459
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2445
|
-
pcb_ground_plane_id:
|
|
2446
|
-
shape:
|
|
2447
|
-
spoke_count:
|
|
2460
|
+
pcb_ground_plane_id: z115.string(),
|
|
2461
|
+
shape: z115.string(),
|
|
2462
|
+
spoke_count: z115.number(),
|
|
2448
2463
|
spoke_thickness: distance,
|
|
2449
2464
|
spoke_inner_diameter: distance,
|
|
2450
2465
|
spoke_outer_diameter: distance,
|
|
2451
|
-
pcb_plated_hole_id:
|
|
2452
|
-
subcircuit_id:
|
|
2466
|
+
pcb_plated_hole_id: z115.string().optional(),
|
|
2467
|
+
subcircuit_id: z115.string().optional()
|
|
2453
2468
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2454
2469
|
expectTypesMatch(true);
|
|
2455
2470
|
|
|
2456
2471
|
// src/pcb/pcb_copper_pour.ts
|
|
2457
|
-
import { z as
|
|
2458
|
-
var pcb_copper_pour_base =
|
|
2459
|
-
type:
|
|
2472
|
+
import { z as z116 } from "zod";
|
|
2473
|
+
var pcb_copper_pour_base = z116.object({
|
|
2474
|
+
type: z116.literal("pcb_copper_pour"),
|
|
2460
2475
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2461
|
-
pcb_group_id:
|
|
2462
|
-
subcircuit_id:
|
|
2476
|
+
pcb_group_id: z116.string().optional(),
|
|
2477
|
+
subcircuit_id: z116.string().optional(),
|
|
2463
2478
|
layer: layer_ref,
|
|
2464
|
-
source_net_id:
|
|
2479
|
+
source_net_id: z116.string().optional()
|
|
2465
2480
|
});
|
|
2466
2481
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2467
|
-
shape:
|
|
2482
|
+
shape: z116.literal("rect"),
|
|
2468
2483
|
center: point,
|
|
2469
2484
|
width: length,
|
|
2470
2485
|
height: length,
|
|
@@ -2472,16 +2487,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2472
2487
|
});
|
|
2473
2488
|
expectTypesMatch(true);
|
|
2474
2489
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2475
|
-
shape:
|
|
2490
|
+
shape: z116.literal("brep"),
|
|
2476
2491
|
brep_shape
|
|
2477
2492
|
});
|
|
2478
2493
|
expectTypesMatch(true);
|
|
2479
2494
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2480
|
-
shape:
|
|
2481
|
-
points:
|
|
2495
|
+
shape: z116.literal("polygon"),
|
|
2496
|
+
points: z116.array(point)
|
|
2482
2497
|
});
|
|
2483
2498
|
expectTypesMatch(true);
|
|
2484
|
-
var pcb_copper_pour =
|
|
2499
|
+
var pcb_copper_pour = z116.discriminatedUnion("shape", [
|
|
2485
2500
|
pcb_copper_pour_rect,
|
|
2486
2501
|
pcb_copper_pour_brep,
|
|
2487
2502
|
pcb_copper_pour_polygon
|
|
@@ -2489,147 +2504,147 @@ var pcb_copper_pour = z115.discriminatedUnion("shape", [
|
|
|
2489
2504
|
expectTypesMatch(true);
|
|
2490
2505
|
|
|
2491
2506
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2492
|
-
import { z as
|
|
2493
|
-
var pcb_component_outside_board_error =
|
|
2494
|
-
type:
|
|
2507
|
+
import { z as z117 } from "zod";
|
|
2508
|
+
var pcb_component_outside_board_error = z117.object({
|
|
2509
|
+
type: z117.literal("pcb_component_outside_board_error"),
|
|
2495
2510
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2496
2511
|
"pcb_component_outside_board_error"
|
|
2497
2512
|
),
|
|
2498
|
-
error_type:
|
|
2499
|
-
message:
|
|
2500
|
-
pcb_component_id:
|
|
2501
|
-
pcb_board_id:
|
|
2513
|
+
error_type: z117.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2514
|
+
message: z117.string(),
|
|
2515
|
+
pcb_component_id: z117.string(),
|
|
2516
|
+
pcb_board_id: z117.string(),
|
|
2502
2517
|
component_center: point,
|
|
2503
|
-
component_bounds:
|
|
2504
|
-
min_x:
|
|
2505
|
-
max_x:
|
|
2506
|
-
min_y:
|
|
2507
|
-
max_y:
|
|
2518
|
+
component_bounds: z117.object({
|
|
2519
|
+
min_x: z117.number(),
|
|
2520
|
+
max_x: z117.number(),
|
|
2521
|
+
min_y: z117.number(),
|
|
2522
|
+
max_y: z117.number()
|
|
2508
2523
|
}),
|
|
2509
|
-
subcircuit_id:
|
|
2510
|
-
source_component_id:
|
|
2524
|
+
subcircuit_id: z117.string().optional(),
|
|
2525
|
+
source_component_id: z117.string().optional()
|
|
2511
2526
|
}).describe(
|
|
2512
2527
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2513
2528
|
);
|
|
2514
2529
|
expectTypesMatch(true);
|
|
2515
2530
|
|
|
2516
2531
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
2517
|
-
import { z as
|
|
2518
|
-
var pcb_component_invalid_layer_error =
|
|
2519
|
-
type:
|
|
2532
|
+
import { z as z118 } from "zod";
|
|
2533
|
+
var pcb_component_invalid_layer_error = z118.object({
|
|
2534
|
+
type: z118.literal("pcb_component_invalid_layer_error"),
|
|
2520
2535
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
2521
2536
|
"pcb_component_invalid_layer_error"
|
|
2522
2537
|
),
|
|
2523
|
-
error_type:
|
|
2524
|
-
message:
|
|
2525
|
-
pcb_component_id:
|
|
2526
|
-
source_component_id:
|
|
2538
|
+
error_type: z118.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
2539
|
+
message: z118.string(),
|
|
2540
|
+
pcb_component_id: z118.string().optional(),
|
|
2541
|
+
source_component_id: z118.string(),
|
|
2527
2542
|
layer: layer_ref,
|
|
2528
|
-
subcircuit_id:
|
|
2543
|
+
subcircuit_id: z118.string().optional()
|
|
2529
2544
|
}).describe(
|
|
2530
2545
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
2531
2546
|
);
|
|
2532
2547
|
expectTypesMatch(true);
|
|
2533
2548
|
|
|
2534
2549
|
// src/pcb/pcb_via_clearance_error.ts
|
|
2535
|
-
import { z as
|
|
2536
|
-
var pcb_via_clearance_error =
|
|
2537
|
-
type:
|
|
2550
|
+
import { z as z119 } from "zod";
|
|
2551
|
+
var pcb_via_clearance_error = z119.object({
|
|
2552
|
+
type: z119.literal("pcb_via_clearance_error"),
|
|
2538
2553
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2539
|
-
error_type:
|
|
2540
|
-
message:
|
|
2541
|
-
pcb_via_ids:
|
|
2554
|
+
error_type: z119.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
2555
|
+
message: z119.string(),
|
|
2556
|
+
pcb_via_ids: z119.array(z119.string()).min(2),
|
|
2542
2557
|
minimum_clearance: distance.optional(),
|
|
2543
2558
|
actual_clearance: distance.optional(),
|
|
2544
|
-
pcb_center:
|
|
2545
|
-
x:
|
|
2546
|
-
y:
|
|
2559
|
+
pcb_center: z119.object({
|
|
2560
|
+
x: z119.number().optional(),
|
|
2561
|
+
y: z119.number().optional()
|
|
2547
2562
|
}).optional(),
|
|
2548
|
-
subcircuit_id:
|
|
2563
|
+
subcircuit_id: z119.string().optional()
|
|
2549
2564
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
2550
2565
|
expectTypesMatch(true);
|
|
2551
2566
|
|
|
2552
2567
|
// src/pcb/pcb_courtyard_rect.ts
|
|
2553
|
-
import { z as
|
|
2554
|
-
var pcb_courtyard_rect =
|
|
2555
|
-
type:
|
|
2568
|
+
import { z as z120 } from "zod";
|
|
2569
|
+
var pcb_courtyard_rect = z120.object({
|
|
2570
|
+
type: z120.literal("pcb_courtyard_rect"),
|
|
2556
2571
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
2557
|
-
pcb_component_id:
|
|
2558
|
-
pcb_group_id:
|
|
2559
|
-
subcircuit_id:
|
|
2572
|
+
pcb_component_id: z120.string(),
|
|
2573
|
+
pcb_group_id: z120.string().optional(),
|
|
2574
|
+
subcircuit_id: z120.string().optional(),
|
|
2560
2575
|
center: point,
|
|
2561
2576
|
width: length,
|
|
2562
2577
|
height: length,
|
|
2563
2578
|
layer: visible_layer,
|
|
2564
|
-
color:
|
|
2579
|
+
color: z120.string().optional()
|
|
2565
2580
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
2566
2581
|
expectTypesMatch(true);
|
|
2567
2582
|
|
|
2568
2583
|
// src/pcb/pcb_courtyard_outline.ts
|
|
2569
|
-
import { z as
|
|
2570
|
-
var pcb_courtyard_outline =
|
|
2571
|
-
type:
|
|
2584
|
+
import { z as z121 } from "zod";
|
|
2585
|
+
var pcb_courtyard_outline = z121.object({
|
|
2586
|
+
type: z121.literal("pcb_courtyard_outline"),
|
|
2572
2587
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
2573
2588
|
"pcb_courtyard_outline"
|
|
2574
2589
|
),
|
|
2575
|
-
pcb_component_id:
|
|
2576
|
-
pcb_group_id:
|
|
2577
|
-
subcircuit_id:
|
|
2590
|
+
pcb_component_id: z121.string(),
|
|
2591
|
+
pcb_group_id: z121.string().optional(),
|
|
2592
|
+
subcircuit_id: z121.string().optional(),
|
|
2578
2593
|
layer: visible_layer,
|
|
2579
|
-
outline:
|
|
2594
|
+
outline: z121.array(point).min(2),
|
|
2580
2595
|
stroke_width: length.default("0.1mm"),
|
|
2581
|
-
is_closed:
|
|
2582
|
-
is_stroke_dashed:
|
|
2583
|
-
color:
|
|
2596
|
+
is_closed: z121.boolean().optional(),
|
|
2597
|
+
is_stroke_dashed: z121.boolean().optional(),
|
|
2598
|
+
color: z121.string().optional()
|
|
2584
2599
|
}).describe("Defines a courtyard outline on the PCB");
|
|
2585
2600
|
expectTypesMatch(true);
|
|
2586
2601
|
|
|
2587
2602
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
2588
|
-
import { z as
|
|
2589
|
-
var pcb_courtyard_polygon =
|
|
2590
|
-
type:
|
|
2603
|
+
import { z as z122 } from "zod";
|
|
2604
|
+
var pcb_courtyard_polygon = z122.object({
|
|
2605
|
+
type: z122.literal("pcb_courtyard_polygon"),
|
|
2591
2606
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
2592
2607
|
"pcb_courtyard_polygon"
|
|
2593
2608
|
),
|
|
2594
|
-
pcb_component_id:
|
|
2595
|
-
pcb_group_id:
|
|
2596
|
-
subcircuit_id:
|
|
2609
|
+
pcb_component_id: z122.string(),
|
|
2610
|
+
pcb_group_id: z122.string().optional(),
|
|
2611
|
+
subcircuit_id: z122.string().optional(),
|
|
2597
2612
|
layer: visible_layer,
|
|
2598
|
-
points:
|
|
2599
|
-
color:
|
|
2613
|
+
points: z122.array(point).min(3),
|
|
2614
|
+
color: z122.string().optional()
|
|
2600
2615
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
2601
2616
|
expectTypesMatch(true);
|
|
2602
2617
|
|
|
2603
2618
|
// src/cad/cad_component.ts
|
|
2604
|
-
import { z as
|
|
2605
|
-
var cad_component =
|
|
2606
|
-
type:
|
|
2607
|
-
cad_component_id:
|
|
2608
|
-
pcb_component_id:
|
|
2609
|
-
source_component_id:
|
|
2619
|
+
import { z as z123 } from "zod";
|
|
2620
|
+
var cad_component = z123.object({
|
|
2621
|
+
type: z123.literal("cad_component"),
|
|
2622
|
+
cad_component_id: z123.string(),
|
|
2623
|
+
pcb_component_id: z123.string(),
|
|
2624
|
+
source_component_id: z123.string(),
|
|
2610
2625
|
position: point3,
|
|
2611
2626
|
rotation: point3.optional(),
|
|
2612
2627
|
size: point3.optional(),
|
|
2613
2628
|
layer: layer_ref.optional(),
|
|
2614
|
-
subcircuit_id:
|
|
2629
|
+
subcircuit_id: z123.string().optional(),
|
|
2615
2630
|
// These are all ways to generate/load the 3d model
|
|
2616
|
-
footprinter_string:
|
|
2617
|
-
model_obj_url:
|
|
2618
|
-
model_stl_url:
|
|
2619
|
-
model_3mf_url:
|
|
2620
|
-
model_gltf_url:
|
|
2621
|
-
model_glb_url:
|
|
2622
|
-
model_step_url:
|
|
2623
|
-
model_wrl_url:
|
|
2624
|
-
model_unit_to_mm_scale_factor:
|
|
2625
|
-
model_jscad:
|
|
2631
|
+
footprinter_string: z123.string().optional(),
|
|
2632
|
+
model_obj_url: z123.string().optional(),
|
|
2633
|
+
model_stl_url: z123.string().optional(),
|
|
2634
|
+
model_3mf_url: z123.string().optional(),
|
|
2635
|
+
model_gltf_url: z123.string().optional(),
|
|
2636
|
+
model_glb_url: z123.string().optional(),
|
|
2637
|
+
model_step_url: z123.string().optional(),
|
|
2638
|
+
model_wrl_url: z123.string().optional(),
|
|
2639
|
+
model_unit_to_mm_scale_factor: z123.number().optional(),
|
|
2640
|
+
model_jscad: z123.any().optional()
|
|
2626
2641
|
}).describe("Defines a component on the PCB");
|
|
2627
2642
|
expectTypesMatch(true);
|
|
2628
2643
|
|
|
2629
2644
|
// src/simulation/simulation_voltage_source.ts
|
|
2630
|
-
import { z as
|
|
2631
|
-
var wave_shape =
|
|
2632
|
-
var percentage =
|
|
2645
|
+
import { z as z124 } from "zod";
|
|
2646
|
+
var wave_shape = z124.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2647
|
+
var percentage = z124.union([z124.string(), z124.number()]).transform((val) => {
|
|
2633
2648
|
if (typeof val === "string") {
|
|
2634
2649
|
if (val.endsWith("%")) {
|
|
2635
2650
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2638,30 +2653,30 @@ var percentage = z123.union([z123.string(), z123.number()]).transform((val) => {
|
|
|
2638
2653
|
}
|
|
2639
2654
|
return val;
|
|
2640
2655
|
}).pipe(
|
|
2641
|
-
|
|
2656
|
+
z124.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2642
2657
|
);
|
|
2643
|
-
var simulation_dc_voltage_source =
|
|
2644
|
-
type:
|
|
2658
|
+
var simulation_dc_voltage_source = z124.object({
|
|
2659
|
+
type: z124.literal("simulation_voltage_source"),
|
|
2645
2660
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2646
2661
|
"simulation_voltage_source"
|
|
2647
2662
|
),
|
|
2648
|
-
is_dc_source:
|
|
2649
|
-
positive_source_port_id:
|
|
2650
|
-
negative_source_port_id:
|
|
2651
|
-
positive_source_net_id:
|
|
2652
|
-
negative_source_net_id:
|
|
2663
|
+
is_dc_source: z124.literal(true).optional().default(true),
|
|
2664
|
+
positive_source_port_id: z124.string().optional(),
|
|
2665
|
+
negative_source_port_id: z124.string().optional(),
|
|
2666
|
+
positive_source_net_id: z124.string().optional(),
|
|
2667
|
+
negative_source_net_id: z124.string().optional(),
|
|
2653
2668
|
voltage
|
|
2654
2669
|
}).describe("Defines a DC voltage source for simulation");
|
|
2655
|
-
var simulation_ac_voltage_source =
|
|
2656
|
-
type:
|
|
2670
|
+
var simulation_ac_voltage_source = z124.object({
|
|
2671
|
+
type: z124.literal("simulation_voltage_source"),
|
|
2657
2672
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2658
2673
|
"simulation_voltage_source"
|
|
2659
2674
|
),
|
|
2660
|
-
is_dc_source:
|
|
2661
|
-
terminal1_source_port_id:
|
|
2662
|
-
terminal2_source_port_id:
|
|
2663
|
-
terminal1_source_net_id:
|
|
2664
|
-
terminal2_source_net_id:
|
|
2675
|
+
is_dc_source: z124.literal(false),
|
|
2676
|
+
terminal1_source_port_id: z124.string().optional(),
|
|
2677
|
+
terminal2_source_port_id: z124.string().optional(),
|
|
2678
|
+
terminal1_source_net_id: z124.string().optional(),
|
|
2679
|
+
terminal2_source_net_id: z124.string().optional(),
|
|
2665
2680
|
voltage: voltage.optional(),
|
|
2666
2681
|
frequency: frequency.optional(),
|
|
2667
2682
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2669,25 +2684,25 @@ var simulation_ac_voltage_source = z123.object({
|
|
|
2669
2684
|
phase: rotation.optional(),
|
|
2670
2685
|
duty_cycle: percentage.optional()
|
|
2671
2686
|
}).describe("Defines an AC voltage source for simulation");
|
|
2672
|
-
var simulation_voltage_source =
|
|
2687
|
+
var simulation_voltage_source = z124.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2673
2688
|
expectTypesMatch(true);
|
|
2674
2689
|
expectTypesMatch(true);
|
|
2675
2690
|
expectTypesMatch(true);
|
|
2676
2691
|
|
|
2677
2692
|
// src/simulation/simulation_experiment.ts
|
|
2678
|
-
import { z as
|
|
2679
|
-
var experiment_type =
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2693
|
+
import { z as z125 } from "zod";
|
|
2694
|
+
var experiment_type = z125.union([
|
|
2695
|
+
z125.literal("spice_dc_sweep"),
|
|
2696
|
+
z125.literal("spice_dc_operating_point"),
|
|
2697
|
+
z125.literal("spice_transient_analysis"),
|
|
2698
|
+
z125.literal("spice_ac_analysis")
|
|
2684
2699
|
]);
|
|
2685
|
-
var simulation_experiment =
|
|
2686
|
-
type:
|
|
2700
|
+
var simulation_experiment = z125.object({
|
|
2701
|
+
type: z125.literal("simulation_experiment"),
|
|
2687
2702
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
2688
2703
|
"simulation_experiment"
|
|
2689
2704
|
),
|
|
2690
|
-
name:
|
|
2705
|
+
name: z125.string(),
|
|
2691
2706
|
experiment_type,
|
|
2692
2707
|
time_per_step: duration_ms.optional(),
|
|
2693
2708
|
start_time_ms: ms.optional(),
|
|
@@ -2696,49 +2711,49 @@ var simulation_experiment = z124.object({
|
|
|
2696
2711
|
expectTypesMatch(true);
|
|
2697
2712
|
|
|
2698
2713
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
2699
|
-
import { z as
|
|
2700
|
-
var simulation_transient_voltage_graph =
|
|
2701
|
-
type:
|
|
2714
|
+
import { z as z126 } from "zod";
|
|
2715
|
+
var simulation_transient_voltage_graph = z126.object({
|
|
2716
|
+
type: z126.literal("simulation_transient_voltage_graph"),
|
|
2702
2717
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
2703
2718
|
"simulation_transient_voltage_graph"
|
|
2704
2719
|
),
|
|
2705
|
-
simulation_experiment_id:
|
|
2706
|
-
timestamps_ms:
|
|
2707
|
-
voltage_levels:
|
|
2708
|
-
schematic_voltage_probe_id:
|
|
2709
|
-
simulation_voltage_probe_id:
|
|
2710
|
-
subcircuit_connectivity_map_key:
|
|
2720
|
+
simulation_experiment_id: z126.string(),
|
|
2721
|
+
timestamps_ms: z126.array(z126.number()).optional(),
|
|
2722
|
+
voltage_levels: z126.array(z126.number()),
|
|
2723
|
+
schematic_voltage_probe_id: z126.string().optional(),
|
|
2724
|
+
simulation_voltage_probe_id: z126.string().optional(),
|
|
2725
|
+
subcircuit_connectivity_map_key: z126.string().optional(),
|
|
2711
2726
|
time_per_step: duration_ms,
|
|
2712
2727
|
start_time_ms: ms,
|
|
2713
2728
|
end_time_ms: ms,
|
|
2714
|
-
name:
|
|
2729
|
+
name: z126.string().optional()
|
|
2715
2730
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2716
2731
|
expectTypesMatch(true);
|
|
2717
2732
|
|
|
2718
2733
|
// src/simulation/simulation_switch.ts
|
|
2719
|
-
import { z as
|
|
2720
|
-
var simulation_switch =
|
|
2721
|
-
type:
|
|
2734
|
+
import { z as z127 } from "zod";
|
|
2735
|
+
var simulation_switch = z127.object({
|
|
2736
|
+
type: z127.literal("simulation_switch"),
|
|
2722
2737
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2723
|
-
source_component_id:
|
|
2738
|
+
source_component_id: z127.string().optional(),
|
|
2724
2739
|
closes_at: ms.optional(),
|
|
2725
2740
|
opens_at: ms.optional(),
|
|
2726
|
-
starts_closed:
|
|
2741
|
+
starts_closed: z127.boolean().optional(),
|
|
2727
2742
|
switching_frequency: frequency.optional()
|
|
2728
2743
|
}).describe("Defines a switch for simulation timing control");
|
|
2729
2744
|
expectTypesMatch(true);
|
|
2730
2745
|
|
|
2731
2746
|
// src/simulation/simulation_voltage_probe.ts
|
|
2732
|
-
import { z as
|
|
2733
|
-
var simulation_voltage_probe =
|
|
2734
|
-
type:
|
|
2747
|
+
import { z as z128 } from "zod";
|
|
2748
|
+
var simulation_voltage_probe = z128.object({
|
|
2749
|
+
type: z128.literal("simulation_voltage_probe"),
|
|
2735
2750
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
2736
2751
|
"simulation_voltage_probe"
|
|
2737
2752
|
),
|
|
2738
|
-
source_port_id:
|
|
2739
|
-
source_net_id:
|
|
2740
|
-
name:
|
|
2741
|
-
subcircuit_id:
|
|
2753
|
+
source_port_id: z128.string().optional(),
|
|
2754
|
+
source_net_id: z128.string().optional(),
|
|
2755
|
+
name: z128.string().optional(),
|
|
2756
|
+
subcircuit_id: z128.string().optional()
|
|
2742
2757
|
}).describe(
|
|
2743
2758
|
"Defines a voltage probe for simulation, connected to a port or a net"
|
|
2744
2759
|
).refine(
|
|
@@ -2750,8 +2765,8 @@ var simulation_voltage_probe = z127.object({
|
|
|
2750
2765
|
expectTypesMatch(true);
|
|
2751
2766
|
|
|
2752
2767
|
// src/any_circuit_element.ts
|
|
2753
|
-
import { z as
|
|
2754
|
-
var any_circuit_element =
|
|
2768
|
+
import { z as z129 } from "zod";
|
|
2769
|
+
var any_circuit_element = z129.union([
|
|
2755
2770
|
source_trace,
|
|
2756
2771
|
source_port,
|
|
2757
2772
|
any_source_component,
|
|
@@ -2852,6 +2867,7 @@ var any_circuit_element = z128.union([
|
|
|
2852
2867
|
schematic_voltage_probe,
|
|
2853
2868
|
schematic_manual_edit_conflict_warning,
|
|
2854
2869
|
schematic_group,
|
|
2870
|
+
schematic_sheet,
|
|
2855
2871
|
schematic_table,
|
|
2856
2872
|
schematic_table_cell,
|
|
2857
2873
|
cad_component,
|
|
@@ -2986,6 +3002,7 @@ export {
|
|
|
2986
3002
|
schematic_pin_styles,
|
|
2987
3003
|
schematic_port,
|
|
2988
3004
|
schematic_rect,
|
|
3005
|
+
schematic_sheet,
|
|
2989
3006
|
schematic_table,
|
|
2990
3007
|
schematic_table_cell,
|
|
2991
3008
|
schematic_text,
|