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