circuit-json 0.0.491 → 0.0.493
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 +67 -0
- package/dist/index.d.mts +367 -32
- package/dist/index.mjs +1631 -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,18 @@ 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
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2751
|
+
layers: z127.array(layer_ref),
|
|
2752
|
+
/** PCB ports belonging to this via, including layer ports and aliases. */
|
|
2753
|
+
pcb_port_ids: z127.array(z127.string()).optional(),
|
|
2754
|
+
pcb_trace_id: z127.string().optional(),
|
|
2755
|
+
source_trace_id: z127.string().optional(),
|
|
2756
|
+
source_net_id: z127.string().min(1).optional(),
|
|
2757
|
+
net_is_assignable: z127.boolean().optional(),
|
|
2758
|
+
net_assigned: z127.boolean().optional(),
|
|
2708
2759
|
/** @deprecated Use tented_on_top and tented_on_bottom instead. */
|
|
2709
|
-
is_tented:
|
|
2710
|
-
tented_on_top:
|
|
2711
|
-
tented_on_bottom:
|
|
2760
|
+
is_tented: z127.boolean().optional(),
|
|
2761
|
+
tented_on_top: z127.boolean().optional(),
|
|
2762
|
+
tented_on_bottom: z127.boolean().optional()
|
|
2712
2763
|
}).transform(({ is_tented, ...via }) => {
|
|
2713
2764
|
if (is_tented !== void 0) {
|
|
2714
2765
|
via.tented_on_top ??= is_tented;
|
|
@@ -2719,111 +2770,111 @@ var pcb_via = z124.object({
|
|
|
2719
2770
|
expectTypesMatch(true);
|
|
2720
2771
|
|
|
2721
2772
|
// src/pcb/pcb_board.ts
|
|
2722
|
-
import { z as
|
|
2723
|
-
var pcb_board =
|
|
2724
|
-
type:
|
|
2773
|
+
import { z as z128 } from "zod";
|
|
2774
|
+
var pcb_board = z128.object({
|
|
2775
|
+
type: z128.literal("pcb_board"),
|
|
2725
2776
|
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:
|
|
2777
|
+
pcb_panel_id: z128.string().optional(),
|
|
2778
|
+
carrier_pcb_board_id: z128.string().optional(),
|
|
2779
|
+
is_subcircuit: z128.boolean().optional(),
|
|
2780
|
+
subcircuit_id: z128.string().optional(),
|
|
2781
|
+
is_mounted_to_carrier_board: z128.boolean().optional(),
|
|
2782
|
+
is_via_in_pad_allowed: z128.boolean().optional(),
|
|
2783
|
+
default_via_tented_on_top: z128.boolean().optional(),
|
|
2784
|
+
default_via_tented_on_bottom: z128.boolean().optional(),
|
|
2734
2785
|
width: length.optional(),
|
|
2735
2786
|
height: length.optional(),
|
|
2736
2787
|
center: point,
|
|
2737
|
-
display_offset_x:
|
|
2788
|
+
display_offset_x: z128.string().optional().describe(
|
|
2738
2789
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2739
2790
|
),
|
|
2740
|
-
display_offset_y:
|
|
2791
|
+
display_offset_y: z128.string().optional().describe(
|
|
2741
2792
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2742
2793
|
),
|
|
2743
2794
|
thickness: length.optional().default(1.4),
|
|
2744
|
-
num_layers:
|
|
2745
|
-
allow_blind_and_buried_vias:
|
|
2795
|
+
num_layers: z128.number().optional().default(4),
|
|
2796
|
+
allow_blind_and_buried_vias: z128.boolean().optional().describe(
|
|
2746
2797
|
"Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack."
|
|
2747
2798
|
),
|
|
2748
|
-
outline:
|
|
2749
|
-
shape:
|
|
2750
|
-
material:
|
|
2751
|
-
solder_mask_color:
|
|
2752
|
-
silkscreen_color:
|
|
2799
|
+
outline: z128.array(point).optional(),
|
|
2800
|
+
shape: z128.enum(["rect", "polygon"]).optional(),
|
|
2801
|
+
material: z128.enum(["fr4", "fr1"]).default("fr4"),
|
|
2802
|
+
solder_mask_color: z128.string().optional(),
|
|
2803
|
+
silkscreen_color: z128.string().optional(),
|
|
2753
2804
|
anchor_position: point.optional(),
|
|
2754
2805
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2755
|
-
position_mode:
|
|
2806
|
+
position_mode: z128.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2756
2807
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2757
2808
|
expectTypesMatch(true);
|
|
2758
2809
|
|
|
2759
2810
|
// src/pcb/pcb_panel.ts
|
|
2760
|
-
import { z as
|
|
2761
|
-
var pcb_panel =
|
|
2762
|
-
type:
|
|
2811
|
+
import { z as z129 } from "zod";
|
|
2812
|
+
var pcb_panel = z129.object({
|
|
2813
|
+
type: z129.literal("pcb_panel"),
|
|
2763
2814
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2764
2815
|
width: length,
|
|
2765
2816
|
height: length,
|
|
2766
2817
|
center: point,
|
|
2767
2818
|
thickness: length.optional().default(1.4),
|
|
2768
|
-
covered_with_solder_mask:
|
|
2819
|
+
covered_with_solder_mask: z129.boolean().optional().default(true)
|
|
2769
2820
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2770
2821
|
expectTypesMatch(true);
|
|
2771
2822
|
|
|
2772
2823
|
// src/pcb/pcb_placement_error.ts
|
|
2773
|
-
import { z as
|
|
2824
|
+
import { z as z130 } from "zod";
|
|
2774
2825
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2775
|
-
type:
|
|
2826
|
+
type: z130.literal("pcb_placement_error"),
|
|
2776
2827
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2777
|
-
error_type:
|
|
2778
|
-
subcircuit_id:
|
|
2828
|
+
error_type: z130.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2829
|
+
subcircuit_id: z130.string().optional()
|
|
2779
2830
|
}).describe("Defines a placement error on the PCB");
|
|
2780
2831
|
expectTypesMatch(true);
|
|
2781
2832
|
|
|
2782
2833
|
// src/pcb/pcb_packing_error.ts
|
|
2783
|
-
import { z as
|
|
2834
|
+
import { z as z131 } from "zod";
|
|
2784
2835
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
2785
|
-
type:
|
|
2836
|
+
type: z131.literal("pcb_packing_error"),
|
|
2786
2837
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
2787
|
-
error_type:
|
|
2788
|
-
pcb_group_id:
|
|
2789
|
-
subcircuit_id:
|
|
2838
|
+
error_type: z131.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
2839
|
+
pcb_group_id: z131.string().optional(),
|
|
2840
|
+
subcircuit_id: z131.string().optional()
|
|
2790
2841
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
2791
2842
|
expectTypesMatch(true);
|
|
2792
2843
|
|
|
2793
2844
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2794
|
-
import { z as
|
|
2845
|
+
import { z as z132 } from "zod";
|
|
2795
2846
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2796
|
-
type:
|
|
2847
|
+
type: z132.literal("pcb_panelization_placement_error"),
|
|
2797
2848
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2798
2849
|
"pcb_panelization_placement_error"
|
|
2799
2850
|
),
|
|
2800
|
-
error_type:
|
|
2801
|
-
pcb_panel_id:
|
|
2802
|
-
pcb_board_id:
|
|
2803
|
-
subcircuit_id:
|
|
2851
|
+
error_type: z132.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2852
|
+
pcb_panel_id: z132.string().optional(),
|
|
2853
|
+
pcb_board_id: z132.string().optional(),
|
|
2854
|
+
subcircuit_id: z132.string().optional()
|
|
2804
2855
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2805
2856
|
expectTypesMatch(true);
|
|
2806
2857
|
|
|
2807
2858
|
// src/pcb/pcb_trace_hint.ts
|
|
2808
|
-
import { z as
|
|
2809
|
-
var pcb_trace_hint =
|
|
2810
|
-
type:
|
|
2859
|
+
import { z as z133 } from "zod";
|
|
2860
|
+
var pcb_trace_hint = z133.object({
|
|
2861
|
+
type: z133.literal("pcb_trace_hint"),
|
|
2811
2862
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2812
|
-
pcb_port_id:
|
|
2813
|
-
pcb_component_id:
|
|
2814
|
-
route:
|
|
2815
|
-
subcircuit_id:
|
|
2863
|
+
pcb_port_id: z133.string(),
|
|
2864
|
+
pcb_component_id: z133.string(),
|
|
2865
|
+
route: z133.array(route_hint_point),
|
|
2866
|
+
subcircuit_id: z133.string().optional()
|
|
2816
2867
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2817
2868
|
expectTypesMatch(true);
|
|
2818
2869
|
|
|
2819
2870
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2820
|
-
import { z as
|
|
2821
|
-
var pcb_silkscreen_line =
|
|
2822
|
-
type:
|
|
2871
|
+
import { z as z134 } from "zod";
|
|
2872
|
+
var pcb_silkscreen_line = z134.object({
|
|
2873
|
+
type: z134.literal("pcb_silkscreen_line"),
|
|
2823
2874
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2824
|
-
pcb_component_id:
|
|
2825
|
-
pcb_group_id:
|
|
2826
|
-
subcircuit_id:
|
|
2875
|
+
pcb_component_id: z134.string(),
|
|
2876
|
+
pcb_group_id: z134.string().optional(),
|
|
2877
|
+
subcircuit_id: z134.string().optional(),
|
|
2827
2878
|
stroke_width: distance.default("0.1mm"),
|
|
2828
2879
|
x1: distance,
|
|
2829
2880
|
y1: distance,
|
|
@@ -2834,32 +2885,32 @@ var pcb_silkscreen_line = z131.object({
|
|
|
2834
2885
|
expectTypesMatch(true);
|
|
2835
2886
|
|
|
2836
2887
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2837
|
-
import { z as
|
|
2838
|
-
var pcb_silkscreen_path =
|
|
2839
|
-
type:
|
|
2888
|
+
import { z as z135 } from "zod";
|
|
2889
|
+
var pcb_silkscreen_path = z135.object({
|
|
2890
|
+
type: z135.literal("pcb_silkscreen_path"),
|
|
2840
2891
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2841
|
-
pcb_component_id:
|
|
2842
|
-
pcb_group_id:
|
|
2843
|
-
subcircuit_id:
|
|
2892
|
+
pcb_component_id: z135.string(),
|
|
2893
|
+
pcb_group_id: z135.string().optional(),
|
|
2894
|
+
subcircuit_id: z135.string().optional(),
|
|
2844
2895
|
layer: visible_layer,
|
|
2845
|
-
route:
|
|
2896
|
+
route: z135.array(point),
|
|
2846
2897
|
stroke_width: length
|
|
2847
2898
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2848
2899
|
expectTypesMatch(true);
|
|
2849
2900
|
|
|
2850
2901
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2851
|
-
import { z as
|
|
2852
|
-
var pcb_silkscreen_text =
|
|
2853
|
-
type:
|
|
2902
|
+
import { z as z136 } from "zod";
|
|
2903
|
+
var pcb_silkscreen_text = z136.object({
|
|
2904
|
+
type: z136.literal("pcb_silkscreen_text"),
|
|
2854
2905
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2855
|
-
pcb_group_id:
|
|
2856
|
-
subcircuit_id:
|
|
2857
|
-
font:
|
|
2906
|
+
pcb_group_id: z136.string().optional(),
|
|
2907
|
+
subcircuit_id: z136.string().optional(),
|
|
2908
|
+
font: z136.literal("tscircuit2024").default("tscircuit2024"),
|
|
2858
2909
|
font_size: distance.default("0.2mm"),
|
|
2859
|
-
pcb_component_id:
|
|
2860
|
-
text:
|
|
2861
|
-
is_knockout:
|
|
2862
|
-
knockout_padding:
|
|
2910
|
+
pcb_component_id: z136.string(),
|
|
2911
|
+
text: z136.string(),
|
|
2912
|
+
is_knockout: z136.boolean().default(false).optional(),
|
|
2913
|
+
knockout_padding: z136.object({
|
|
2863
2914
|
left: length,
|
|
2864
2915
|
top: length,
|
|
2865
2916
|
bottom: length,
|
|
@@ -2870,27 +2921,27 @@ var pcb_silkscreen_text = z133.object({
|
|
|
2870
2921
|
bottom: "0.2mm",
|
|
2871
2922
|
right: "0.2mm"
|
|
2872
2923
|
}).optional(),
|
|
2873
|
-
ccw_rotation:
|
|
2924
|
+
ccw_rotation: z136.number().optional(),
|
|
2874
2925
|
layer: layer_ref,
|
|
2875
|
-
is_mirrored:
|
|
2926
|
+
is_mirrored: z136.boolean().default(false).optional(),
|
|
2876
2927
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2877
2928
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2878
2929
|
}).describe("Defines silkscreen text on the PCB");
|
|
2879
2930
|
expectTypesMatch(true);
|
|
2880
2931
|
|
|
2881
2932
|
// src/pcb/pcb_copper_text.ts
|
|
2882
|
-
import { z as
|
|
2883
|
-
var pcb_copper_text =
|
|
2884
|
-
type:
|
|
2933
|
+
import { z as z137 } from "zod";
|
|
2934
|
+
var pcb_copper_text = z137.object({
|
|
2935
|
+
type: z137.literal("pcb_copper_text"),
|
|
2885
2936
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2886
|
-
pcb_group_id:
|
|
2887
|
-
subcircuit_id:
|
|
2888
|
-
font:
|
|
2937
|
+
pcb_group_id: z137.string().optional(),
|
|
2938
|
+
subcircuit_id: z137.string().optional(),
|
|
2939
|
+
font: z137.literal("tscircuit2024").default("tscircuit2024"),
|
|
2889
2940
|
font_size: distance.default("0.2mm"),
|
|
2890
|
-
pcb_component_id:
|
|
2891
|
-
text:
|
|
2892
|
-
is_knockout:
|
|
2893
|
-
knockout_padding:
|
|
2941
|
+
pcb_component_id: z137.string(),
|
|
2942
|
+
text: z137.string(),
|
|
2943
|
+
is_knockout: z137.boolean().default(false).optional(),
|
|
2944
|
+
knockout_padding: z137.object({
|
|
2894
2945
|
left: length,
|
|
2895
2946
|
top: length,
|
|
2896
2947
|
bottom: length,
|
|
@@ -2901,61 +2952,61 @@ var pcb_copper_text = z134.object({
|
|
|
2901
2952
|
bottom: "0.2mm",
|
|
2902
2953
|
right: "0.2mm"
|
|
2903
2954
|
}).optional(),
|
|
2904
|
-
ccw_rotation:
|
|
2955
|
+
ccw_rotation: z137.number().optional(),
|
|
2905
2956
|
layer: layer_ref,
|
|
2906
|
-
is_mirrored:
|
|
2957
|
+
is_mirrored: z137.boolean().default(false).optional(),
|
|
2907
2958
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2908
2959
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2909
2960
|
}).describe("Defines copper text on the PCB");
|
|
2910
2961
|
expectTypesMatch(true);
|
|
2911
2962
|
|
|
2912
2963
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2913
|
-
import { z as
|
|
2914
|
-
var pcb_silkscreen_rect =
|
|
2915
|
-
type:
|
|
2964
|
+
import { z as z138 } from "zod";
|
|
2965
|
+
var pcb_silkscreen_rect = z138.object({
|
|
2966
|
+
type: z138.literal("pcb_silkscreen_rect"),
|
|
2916
2967
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2917
|
-
pcb_component_id:
|
|
2918
|
-
pcb_group_id:
|
|
2919
|
-
subcircuit_id:
|
|
2968
|
+
pcb_component_id: z138.string(),
|
|
2969
|
+
pcb_group_id: z138.string().optional(),
|
|
2970
|
+
subcircuit_id: z138.string().optional(),
|
|
2920
2971
|
center: point,
|
|
2921
2972
|
width: length,
|
|
2922
2973
|
height: length,
|
|
2923
2974
|
layer: layer_ref,
|
|
2924
2975
|
stroke_width: length.default("1mm"),
|
|
2925
2976
|
corner_radius: length.optional(),
|
|
2926
|
-
is_filled:
|
|
2927
|
-
has_stroke:
|
|
2928
|
-
is_stroke_dashed:
|
|
2929
|
-
ccw_rotation:
|
|
2977
|
+
is_filled: z138.boolean().default(true).optional(),
|
|
2978
|
+
has_stroke: z138.boolean().optional(),
|
|
2979
|
+
is_stroke_dashed: z138.boolean().optional(),
|
|
2980
|
+
ccw_rotation: z138.number().optional()
|
|
2930
2981
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2931
2982
|
expectTypesMatch(true);
|
|
2932
2983
|
|
|
2933
2984
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2934
|
-
import { z as
|
|
2935
|
-
var pcb_silkscreen_circle =
|
|
2936
|
-
type:
|
|
2985
|
+
import { z as z139 } from "zod";
|
|
2986
|
+
var pcb_silkscreen_circle = z139.object({
|
|
2987
|
+
type: z139.literal("pcb_silkscreen_circle"),
|
|
2937
2988
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2938
2989
|
"pcb_silkscreen_circle"
|
|
2939
2990
|
),
|
|
2940
|
-
pcb_component_id:
|
|
2941
|
-
pcb_group_id:
|
|
2942
|
-
subcircuit_id:
|
|
2991
|
+
pcb_component_id: z139.string(),
|
|
2992
|
+
pcb_group_id: z139.string().optional(),
|
|
2993
|
+
subcircuit_id: z139.string().optional(),
|
|
2943
2994
|
center: point,
|
|
2944
2995
|
radius: length,
|
|
2945
2996
|
layer: visible_layer,
|
|
2946
2997
|
stroke_width: length.default("1mm"),
|
|
2947
|
-
is_filled:
|
|
2998
|
+
is_filled: z139.boolean().optional()
|
|
2948
2999
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2949
3000
|
expectTypesMatch(true);
|
|
2950
3001
|
|
|
2951
3002
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2952
|
-
import { z as
|
|
2953
|
-
var pcb_silkscreen_oval =
|
|
2954
|
-
type:
|
|
3003
|
+
import { z as z140 } from "zod";
|
|
3004
|
+
var pcb_silkscreen_oval = z140.object({
|
|
3005
|
+
type: z140.literal("pcb_silkscreen_oval"),
|
|
2955
3006
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2956
|
-
pcb_component_id:
|
|
2957
|
-
pcb_group_id:
|
|
2958
|
-
subcircuit_id:
|
|
3007
|
+
pcb_component_id: z140.string(),
|
|
3008
|
+
pcb_group_id: z140.string().optional(),
|
|
3009
|
+
subcircuit_id: z140.string().optional(),
|
|
2959
3010
|
center: point,
|
|
2960
3011
|
radius_x: distance,
|
|
2961
3012
|
radius_y: distance,
|
|
@@ -2965,265 +3016,265 @@ var pcb_silkscreen_oval = z137.object({
|
|
|
2965
3016
|
expectTypesMatch(true);
|
|
2966
3017
|
|
|
2967
3018
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2968
|
-
import { z as
|
|
2969
|
-
var pcb_silkscreen_graphic_base =
|
|
2970
|
-
type:
|
|
3019
|
+
import { z as z141 } from "zod";
|
|
3020
|
+
var pcb_silkscreen_graphic_base = z141.object({
|
|
3021
|
+
type: z141.literal("pcb_silkscreen_graphic"),
|
|
2971
3022
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2972
3023
|
"pcb_silkscreen_graphic"
|
|
2973
3024
|
),
|
|
2974
|
-
pcb_component_id:
|
|
2975
|
-
pcb_group_id:
|
|
2976
|
-
subcircuit_id:
|
|
3025
|
+
pcb_component_id: z141.string(),
|
|
3026
|
+
pcb_group_id: z141.string().optional(),
|
|
3027
|
+
subcircuit_id: z141.string().optional(),
|
|
2977
3028
|
layer: visible_layer,
|
|
2978
3029
|
image_asset: asset.optional()
|
|
2979
3030
|
});
|
|
2980
3031
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2981
|
-
shape:
|
|
3032
|
+
shape: z141.literal("brep"),
|
|
2982
3033
|
brep_shape
|
|
2983
3034
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2984
3035
|
expectTypesMatch(
|
|
2985
3036
|
true
|
|
2986
3037
|
);
|
|
2987
|
-
var pcb_silkscreen_graphic =
|
|
3038
|
+
var pcb_silkscreen_graphic = z141.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2988
3039
|
expectTypesMatch(true);
|
|
2989
3040
|
|
|
2990
3041
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2991
|
-
import { z as
|
|
2992
|
-
var pcb_silkscreen_pill =
|
|
2993
|
-
type:
|
|
3042
|
+
import { z as z142 } from "zod";
|
|
3043
|
+
var pcb_silkscreen_pill = z142.object({
|
|
3044
|
+
type: z142.literal("pcb_silkscreen_pill"),
|
|
2994
3045
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2995
|
-
pcb_component_id:
|
|
2996
|
-
pcb_group_id:
|
|
2997
|
-
subcircuit_id:
|
|
3046
|
+
pcb_component_id: z142.string(),
|
|
3047
|
+
pcb_group_id: z142.string().optional(),
|
|
3048
|
+
subcircuit_id: z142.string().optional(),
|
|
2998
3049
|
center: point,
|
|
2999
3050
|
width: length,
|
|
3000
3051
|
height: length,
|
|
3001
3052
|
layer: layer_ref,
|
|
3002
|
-
ccw_rotation:
|
|
3053
|
+
ccw_rotation: z142.number().optional()
|
|
3003
3054
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
3004
3055
|
expectTypesMatch(true);
|
|
3005
3056
|
|
|
3006
3057
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
3007
|
-
import { z as
|
|
3008
|
-
var pcb_fabrication_note_text =
|
|
3009
|
-
type:
|
|
3058
|
+
import { z as z143 } from "zod";
|
|
3059
|
+
var pcb_fabrication_note_text = z143.object({
|
|
3060
|
+
type: z143.literal("pcb_fabrication_note_text"),
|
|
3010
3061
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
3011
3062
|
"pcb_fabrication_note_text"
|
|
3012
3063
|
),
|
|
3013
|
-
subcircuit_id:
|
|
3014
|
-
pcb_group_id:
|
|
3015
|
-
font:
|
|
3064
|
+
subcircuit_id: z143.string().optional(),
|
|
3065
|
+
pcb_group_id: z143.string().optional(),
|
|
3066
|
+
font: z143.literal("tscircuit2024").default("tscircuit2024"),
|
|
3016
3067
|
font_size: distance.default("1mm"),
|
|
3017
|
-
pcb_component_id:
|
|
3018
|
-
text:
|
|
3019
|
-
ccw_rotation:
|
|
3068
|
+
pcb_component_id: z143.string(),
|
|
3069
|
+
text: z143.string(),
|
|
3070
|
+
ccw_rotation: z143.number().optional(),
|
|
3020
3071
|
layer: visible_layer,
|
|
3021
3072
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3022
|
-
anchor_alignment:
|
|
3023
|
-
color:
|
|
3073
|
+
anchor_alignment: z143.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3074
|
+
color: z143.string().optional()
|
|
3024
3075
|
}).describe(
|
|
3025
3076
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
3026
3077
|
);
|
|
3027
3078
|
expectTypesMatch(true);
|
|
3028
3079
|
|
|
3029
3080
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
3030
|
-
import { z as
|
|
3031
|
-
var pcb_fabrication_note_path =
|
|
3032
|
-
type:
|
|
3081
|
+
import { z as z144 } from "zod";
|
|
3082
|
+
var pcb_fabrication_note_path = z144.object({
|
|
3083
|
+
type: z144.literal("pcb_fabrication_note_path"),
|
|
3033
3084
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
3034
3085
|
"pcb_fabrication_note_path"
|
|
3035
3086
|
),
|
|
3036
|
-
pcb_component_id:
|
|
3037
|
-
subcircuit_id:
|
|
3087
|
+
pcb_component_id: z144.string(),
|
|
3088
|
+
subcircuit_id: z144.string().optional(),
|
|
3038
3089
|
layer: layer_ref,
|
|
3039
|
-
route:
|
|
3090
|
+
route: z144.array(point),
|
|
3040
3091
|
stroke_width: length,
|
|
3041
|
-
color:
|
|
3092
|
+
color: z144.string().optional()
|
|
3042
3093
|
}).describe(
|
|
3043
3094
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
3044
3095
|
);
|
|
3045
3096
|
expectTypesMatch(true);
|
|
3046
3097
|
|
|
3047
3098
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
3048
|
-
import { z as
|
|
3049
|
-
var pcb_fabrication_note_rect =
|
|
3050
|
-
type:
|
|
3099
|
+
import { z as z145 } from "zod";
|
|
3100
|
+
var pcb_fabrication_note_rect = z145.object({
|
|
3101
|
+
type: z145.literal("pcb_fabrication_note_rect"),
|
|
3051
3102
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
3052
3103
|
"pcb_fabrication_note_rect"
|
|
3053
3104
|
),
|
|
3054
|
-
pcb_component_id:
|
|
3055
|
-
pcb_group_id:
|
|
3056
|
-
subcircuit_id:
|
|
3105
|
+
pcb_component_id: z145.string(),
|
|
3106
|
+
pcb_group_id: z145.string().optional(),
|
|
3107
|
+
subcircuit_id: z145.string().optional(),
|
|
3057
3108
|
center: point,
|
|
3058
3109
|
width: length,
|
|
3059
3110
|
height: length,
|
|
3060
3111
|
layer: visible_layer,
|
|
3061
3112
|
stroke_width: length.default("0.1mm"),
|
|
3062
3113
|
corner_radius: length.optional(),
|
|
3063
|
-
is_filled:
|
|
3064
|
-
has_stroke:
|
|
3065
|
-
is_stroke_dashed:
|
|
3066
|
-
color:
|
|
3114
|
+
is_filled: z145.boolean().optional(),
|
|
3115
|
+
has_stroke: z145.boolean().optional(),
|
|
3116
|
+
is_stroke_dashed: z145.boolean().optional(),
|
|
3117
|
+
color: z145.string().optional()
|
|
3067
3118
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
3068
3119
|
expectTypesMatch(true);
|
|
3069
3120
|
|
|
3070
3121
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
3071
|
-
import { z as
|
|
3072
|
-
var pcb_fabrication_note_dimension =
|
|
3073
|
-
type:
|
|
3122
|
+
import { z as z146 } from "zod";
|
|
3123
|
+
var pcb_fabrication_note_dimension = z146.object({
|
|
3124
|
+
type: z146.literal("pcb_fabrication_note_dimension"),
|
|
3074
3125
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
3075
3126
|
"pcb_fabrication_note_dimension"
|
|
3076
3127
|
),
|
|
3077
|
-
pcb_component_id:
|
|
3078
|
-
pcb_group_id:
|
|
3079
|
-
subcircuit_id:
|
|
3128
|
+
pcb_component_id: z146.string(),
|
|
3129
|
+
pcb_group_id: z146.string().optional(),
|
|
3130
|
+
subcircuit_id: z146.string().optional(),
|
|
3080
3131
|
layer: visible_layer,
|
|
3081
3132
|
from: point,
|
|
3082
3133
|
to: point,
|
|
3083
|
-
text:
|
|
3084
|
-
text_ccw_rotation:
|
|
3134
|
+
text: z146.string().optional(),
|
|
3135
|
+
text_ccw_rotation: z146.number().optional(),
|
|
3085
3136
|
offset: length.optional(),
|
|
3086
3137
|
offset_distance: length.optional(),
|
|
3087
|
-
offset_direction:
|
|
3088
|
-
x:
|
|
3089
|
-
y:
|
|
3138
|
+
offset_direction: z146.object({
|
|
3139
|
+
x: z146.number(),
|
|
3140
|
+
y: z146.number()
|
|
3090
3141
|
}).optional(),
|
|
3091
|
-
font:
|
|
3142
|
+
font: z146.literal("tscircuit2024").default("tscircuit2024"),
|
|
3092
3143
|
font_size: length.default("1mm"),
|
|
3093
|
-
color:
|
|
3144
|
+
color: z146.string().optional(),
|
|
3094
3145
|
arrow_size: length.default("1mm")
|
|
3095
3146
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
3096
3147
|
expectTypesMatch(true);
|
|
3097
3148
|
|
|
3098
3149
|
// src/pcb/pcb_note_text.ts
|
|
3099
|
-
import { z as
|
|
3100
|
-
var pcb_note_text =
|
|
3101
|
-
type:
|
|
3150
|
+
import { z as z147 } from "zod";
|
|
3151
|
+
var pcb_note_text = z147.object({
|
|
3152
|
+
type: z147.literal("pcb_note_text"),
|
|
3102
3153
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3103
|
-
pcb_component_id:
|
|
3104
|
-
pcb_group_id:
|
|
3105
|
-
subcircuit_id:
|
|
3106
|
-
name:
|
|
3107
|
-
font:
|
|
3154
|
+
pcb_component_id: z147.string().optional(),
|
|
3155
|
+
pcb_group_id: z147.string().optional(),
|
|
3156
|
+
subcircuit_id: z147.string().optional(),
|
|
3157
|
+
name: z147.string().optional(),
|
|
3158
|
+
font: z147.literal("tscircuit2024").default("tscircuit2024"),
|
|
3108
3159
|
font_size: distance.default("1mm"),
|
|
3109
|
-
text:
|
|
3160
|
+
text: z147.string().optional(),
|
|
3110
3161
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3111
|
-
anchor_alignment:
|
|
3162
|
+
anchor_alignment: z147.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3112
3163
|
layer: visible_layer.default("top"),
|
|
3113
|
-
is_mirrored_from_top_view:
|
|
3114
|
-
color:
|
|
3164
|
+
is_mirrored_from_top_view: z147.boolean().optional(),
|
|
3165
|
+
color: z147.string().optional()
|
|
3115
3166
|
}).describe("Defines a documentation note in text on the PCB");
|
|
3116
3167
|
expectTypesMatch(true);
|
|
3117
3168
|
|
|
3118
3169
|
// 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:
|
|
3170
|
+
import { z as z148 } from "zod";
|
|
3171
|
+
var pcb_note_rect = z148.object({
|
|
3172
|
+
type: z148.literal("pcb_note_rect"),
|
|
3173
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
3174
|
+
pcb_component_id: z148.string().optional(),
|
|
3175
|
+
pcb_group_id: z148.string().optional(),
|
|
3176
|
+
subcircuit_id: z148.string().optional(),
|
|
3177
|
+
name: z148.string().optional(),
|
|
3178
|
+
text: z148.string().optional(),
|
|
3128
3179
|
center: point,
|
|
3129
3180
|
width: length,
|
|
3130
3181
|
height: length,
|
|
3131
3182
|
layer: visible_layer.default("top"),
|
|
3132
3183
|
stroke_width: length.default("0.1mm"),
|
|
3133
3184
|
corner_radius: length.optional(),
|
|
3134
|
-
is_filled:
|
|
3135
|
-
has_stroke:
|
|
3136
|
-
is_stroke_dashed:
|
|
3137
|
-
color:
|
|
3185
|
+
is_filled: z148.boolean().optional(),
|
|
3186
|
+
has_stroke: z148.boolean().optional(),
|
|
3187
|
+
is_stroke_dashed: z148.boolean().optional(),
|
|
3188
|
+
color: z148.string().optional()
|
|
3138
3189
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
3139
3190
|
expectTypesMatch(true);
|
|
3140
3191
|
|
|
3141
3192
|
// src/pcb/pcb_note_path.ts
|
|
3142
|
-
import { z as
|
|
3143
|
-
var pcb_note_path =
|
|
3144
|
-
type:
|
|
3193
|
+
import { z as z149 } from "zod";
|
|
3194
|
+
var pcb_note_path = z149.object({
|
|
3195
|
+
type: z149.literal("pcb_note_path"),
|
|
3145
3196
|
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:
|
|
3197
|
+
pcb_component_id: z149.string().optional(),
|
|
3198
|
+
pcb_group_id: z149.string().optional(),
|
|
3199
|
+
subcircuit_id: z149.string().optional(),
|
|
3200
|
+
name: z149.string().optional(),
|
|
3201
|
+
text: z149.string().optional(),
|
|
3202
|
+
route: z149.array(point),
|
|
3152
3203
|
layer: visible_layer.default("top"),
|
|
3153
3204
|
stroke_width: length.default("0.1mm"),
|
|
3154
|
-
color:
|
|
3205
|
+
color: z149.string().optional()
|
|
3155
3206
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
3156
3207
|
expectTypesMatch(true);
|
|
3157
3208
|
|
|
3158
3209
|
// src/pcb/pcb_note_line.ts
|
|
3159
|
-
import { z as
|
|
3160
|
-
var pcb_note_line =
|
|
3161
|
-
type:
|
|
3210
|
+
import { z as z150 } from "zod";
|
|
3211
|
+
var pcb_note_line = z150.object({
|
|
3212
|
+
type: z150.literal("pcb_note_line"),
|
|
3162
3213
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
3163
|
-
pcb_component_id:
|
|
3164
|
-
pcb_group_id:
|
|
3165
|
-
subcircuit_id:
|
|
3166
|
-
name:
|
|
3167
|
-
text:
|
|
3214
|
+
pcb_component_id: z150.string().optional(),
|
|
3215
|
+
pcb_group_id: z150.string().optional(),
|
|
3216
|
+
subcircuit_id: z150.string().optional(),
|
|
3217
|
+
name: z150.string().optional(),
|
|
3218
|
+
text: z150.string().optional(),
|
|
3168
3219
|
x1: distance,
|
|
3169
3220
|
y1: distance,
|
|
3170
3221
|
x2: distance,
|
|
3171
3222
|
y2: distance,
|
|
3172
3223
|
layer: visible_layer.default("top"),
|
|
3173
3224
|
stroke_width: distance.default("0.1mm"),
|
|
3174
|
-
color:
|
|
3175
|
-
is_dashed:
|
|
3225
|
+
color: z150.string().optional(),
|
|
3226
|
+
is_dashed: z150.boolean().optional()
|
|
3176
3227
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
3177
3228
|
expectTypesMatch(true);
|
|
3178
3229
|
|
|
3179
3230
|
// src/pcb/pcb_note_dimension.ts
|
|
3180
|
-
import { z as
|
|
3181
|
-
var pcb_note_dimension =
|
|
3182
|
-
type:
|
|
3231
|
+
import { z as z151 } from "zod";
|
|
3232
|
+
var pcb_note_dimension = z151.object({
|
|
3233
|
+
type: z151.literal("pcb_note_dimension"),
|
|
3183
3234
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
3184
|
-
pcb_component_id:
|
|
3185
|
-
pcb_group_id:
|
|
3186
|
-
subcircuit_id:
|
|
3187
|
-
name:
|
|
3235
|
+
pcb_component_id: z151.string().optional(),
|
|
3236
|
+
pcb_group_id: z151.string().optional(),
|
|
3237
|
+
subcircuit_id: z151.string().optional(),
|
|
3238
|
+
name: z151.string().optional(),
|
|
3188
3239
|
from: point,
|
|
3189
3240
|
to: point,
|
|
3190
|
-
text:
|
|
3191
|
-
text_ccw_rotation:
|
|
3241
|
+
text: z151.string().optional(),
|
|
3242
|
+
text_ccw_rotation: z151.number().optional(),
|
|
3192
3243
|
offset_distance: length.optional(),
|
|
3193
|
-
offset_direction:
|
|
3194
|
-
x:
|
|
3195
|
-
y:
|
|
3244
|
+
offset_direction: z151.object({
|
|
3245
|
+
x: z151.number(),
|
|
3246
|
+
y: z151.number()
|
|
3196
3247
|
}).optional(),
|
|
3197
|
-
font:
|
|
3248
|
+
font: z151.literal("tscircuit2024").default("tscircuit2024"),
|
|
3198
3249
|
font_size: length.default("1mm"),
|
|
3199
3250
|
layer: visible_layer.default("top"),
|
|
3200
|
-
color:
|
|
3251
|
+
color: z151.string().optional(),
|
|
3201
3252
|
arrow_size: length.default("1mm")
|
|
3202
3253
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
3203
3254
|
expectTypesMatch(true);
|
|
3204
3255
|
|
|
3205
3256
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
3206
|
-
import { z as
|
|
3257
|
+
import { z as z152 } from "zod";
|
|
3207
3258
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
3208
|
-
type:
|
|
3259
|
+
type: z152.literal("pcb_footprint_overlap_error"),
|
|
3209
3260
|
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:
|
|
3261
|
+
error_type: z152.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
3262
|
+
pcb_smtpad_ids: z152.array(z152.string()).optional(),
|
|
3263
|
+
pcb_plated_hole_ids: z152.array(z152.string()).optional(),
|
|
3264
|
+
pcb_hole_ids: z152.array(z152.string()).optional(),
|
|
3265
|
+
pcb_keepout_ids: z152.array(z152.string()).optional()
|
|
3215
3266
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
3216
3267
|
expectTypesMatch(
|
|
3217
3268
|
true
|
|
3218
3269
|
);
|
|
3219
3270
|
|
|
3220
3271
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
3221
|
-
import { z as
|
|
3272
|
+
import { z as z153 } from "zod";
|
|
3222
3273
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
3223
|
-
type:
|
|
3274
|
+
type: z153.literal("pcb_courtyard_overlap_error"),
|
|
3224
3275
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3225
|
-
error_type:
|
|
3226
|
-
pcb_component_ids:
|
|
3276
|
+
error_type: z153.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
3277
|
+
pcb_component_ids: z153.tuple([z153.string(), z153.string()])
|
|
3227
3278
|
}).describe(
|
|
3228
3279
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
3229
3280
|
);
|
|
@@ -3232,65 +3283,65 @@ expectTypesMatch(
|
|
|
3232
3283
|
);
|
|
3233
3284
|
|
|
3234
3285
|
// 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:
|
|
3286
|
+
import { z as z154 } from "zod";
|
|
3287
|
+
var pcb_keepout_outline = z154.object({
|
|
3288
|
+
type: z154.literal("pcb_keepout"),
|
|
3289
|
+
shape: z154.literal("outline"),
|
|
3290
|
+
pcb_group_id: z154.string().optional(),
|
|
3291
|
+
subcircuit_id: z154.string().optional(),
|
|
3292
|
+
outline: z154.array(point).min(2),
|
|
3242
3293
|
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:
|
|
3294
|
+
pcb_keepout_id: z154.string(),
|
|
3295
|
+
layers: z154.array(z154.string()),
|
|
3296
|
+
description: z154.string().optional(),
|
|
3297
|
+
excluded_pcb_component_ids: z154.array(z154.string()).optional()
|
|
3298
|
+
});
|
|
3299
|
+
var pcb_keepout = z154.object({
|
|
3300
|
+
type: z154.literal("pcb_keepout"),
|
|
3301
|
+
shape: z154.literal("rect"),
|
|
3302
|
+
pcb_group_id: z154.string().optional(),
|
|
3303
|
+
subcircuit_id: z154.string().optional(),
|
|
3253
3304
|
center: point,
|
|
3254
3305
|
width: distance,
|
|
3255
3306
|
height: distance,
|
|
3256
|
-
pcb_keepout_id:
|
|
3257
|
-
layers:
|
|
3307
|
+
pcb_keepout_id: z154.string(),
|
|
3308
|
+
layers: z154.array(z154.string()),
|
|
3258
3309
|
// Specify layers where the keepout applies
|
|
3259
|
-
description:
|
|
3310
|
+
description: z154.string().optional(),
|
|
3260
3311
|
// Optional description of the keepout
|
|
3261
|
-
excluded_pcb_component_ids:
|
|
3312
|
+
excluded_pcb_component_ids: z154.array(z154.string()).optional()
|
|
3262
3313
|
}).or(
|
|
3263
|
-
|
|
3264
|
-
type:
|
|
3265
|
-
shape:
|
|
3266
|
-
pcb_group_id:
|
|
3267
|
-
subcircuit_id:
|
|
3314
|
+
z154.object({
|
|
3315
|
+
type: z154.literal("pcb_keepout"),
|
|
3316
|
+
shape: z154.literal("circle"),
|
|
3317
|
+
pcb_group_id: z154.string().optional(),
|
|
3318
|
+
subcircuit_id: z154.string().optional(),
|
|
3268
3319
|
center: point,
|
|
3269
3320
|
radius: distance,
|
|
3270
|
-
pcb_keepout_id:
|
|
3271
|
-
layers:
|
|
3321
|
+
pcb_keepout_id: z154.string(),
|
|
3322
|
+
layers: z154.array(z154.string()),
|
|
3272
3323
|
// Specify layers where the keepout applies
|
|
3273
|
-
description:
|
|
3324
|
+
description: z154.string().optional(),
|
|
3274
3325
|
// Optional description of the keepout
|
|
3275
|
-
excluded_pcb_component_ids:
|
|
3326
|
+
excluded_pcb_component_ids: z154.array(z154.string()).optional()
|
|
3276
3327
|
})
|
|
3277
3328
|
).or(pcb_keepout_outline);
|
|
3278
3329
|
expectTypesMatch(true);
|
|
3279
3330
|
expectTypesMatch(true);
|
|
3280
3331
|
|
|
3281
3332
|
// src/pcb/pcb_cutout.ts
|
|
3282
|
-
import { z as
|
|
3283
|
-
var pcb_cutout_base =
|
|
3284
|
-
type:
|
|
3333
|
+
import { z as z155 } from "zod";
|
|
3334
|
+
var pcb_cutout_base = z155.object({
|
|
3335
|
+
type: z155.literal("pcb_cutout"),
|
|
3285
3336
|
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:
|
|
3337
|
+
pcb_component_id: z155.string().optional(),
|
|
3338
|
+
pcb_group_id: z155.string().optional(),
|
|
3339
|
+
subcircuit_id: z155.string().optional(),
|
|
3340
|
+
pcb_board_id: z155.string().optional(),
|
|
3341
|
+
pcb_panel_id: z155.string().optional()
|
|
3291
3342
|
});
|
|
3292
3343
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3293
|
-
shape:
|
|
3344
|
+
shape: z155.literal("rect"),
|
|
3294
3345
|
center: point,
|
|
3295
3346
|
width: length,
|
|
3296
3347
|
height: length,
|
|
@@ -3299,26 +3350,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3299
3350
|
});
|
|
3300
3351
|
expectTypesMatch(true);
|
|
3301
3352
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3302
|
-
shape:
|
|
3353
|
+
shape: z155.literal("circle"),
|
|
3303
3354
|
center: point,
|
|
3304
3355
|
radius: length
|
|
3305
3356
|
});
|
|
3306
3357
|
expectTypesMatch(true);
|
|
3307
3358
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3308
|
-
shape:
|
|
3309
|
-
points:
|
|
3359
|
+
shape: z155.literal("polygon"),
|
|
3360
|
+
points: z155.array(point)
|
|
3310
3361
|
});
|
|
3311
3362
|
expectTypesMatch(true);
|
|
3312
3363
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3313
|
-
shape:
|
|
3314
|
-
route:
|
|
3364
|
+
shape: z155.literal("path"),
|
|
3365
|
+
route: z155.array(point),
|
|
3315
3366
|
slot_width: length,
|
|
3316
3367
|
slot_length: length.optional(),
|
|
3317
3368
|
space_between_slots: length.optional(),
|
|
3318
3369
|
slot_corner_radius: length.optional()
|
|
3319
3370
|
});
|
|
3320
3371
|
expectTypesMatch(true);
|
|
3321
|
-
var pcb_cutout =
|
|
3372
|
+
var pcb_cutout = z155.discriminatedUnion("shape", [
|
|
3322
3373
|
pcb_cutout_rect,
|
|
3323
3374
|
pcb_cutout_circle,
|
|
3324
3375
|
pcb_cutout_polygon,
|
|
@@ -3327,223 +3378,223 @@ var pcb_cutout = z152.discriminatedUnion("shape", [
|
|
|
3327
3378
|
expectTypesMatch(true);
|
|
3328
3379
|
|
|
3329
3380
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3330
|
-
import { z as
|
|
3381
|
+
import { z as z156 } from "zod";
|
|
3331
3382
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3332
|
-
type:
|
|
3383
|
+
type: z156.literal("pcb_missing_footprint_error"),
|
|
3333
3384
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3334
3385
|
"pcb_missing_footprint_error"
|
|
3335
3386
|
),
|
|
3336
|
-
pcb_group_id:
|
|
3337
|
-
subcircuit_id:
|
|
3338
|
-
error_type:
|
|
3339
|
-
source_component_id:
|
|
3387
|
+
pcb_group_id: z156.string().optional(),
|
|
3388
|
+
subcircuit_id: z156.string().optional(),
|
|
3389
|
+
error_type: z156.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3390
|
+
source_component_id: z156.string()
|
|
3340
3391
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3341
3392
|
expectTypesMatch(
|
|
3342
3393
|
true
|
|
3343
3394
|
);
|
|
3344
3395
|
|
|
3345
3396
|
// src/pcb/external_footprint_load_error.ts
|
|
3346
|
-
import { z as
|
|
3397
|
+
import { z as z157 } from "zod";
|
|
3347
3398
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3348
|
-
type:
|
|
3399
|
+
type: z157.literal("external_footprint_load_error"),
|
|
3349
3400
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3350
3401
|
"external_footprint_load_error"
|
|
3351
3402
|
),
|
|
3352
|
-
pcb_component_id:
|
|
3353
|
-
source_component_id:
|
|
3354
|
-
pcb_group_id:
|
|
3355
|
-
subcircuit_id:
|
|
3356
|
-
footprinter_string:
|
|
3357
|
-
error_type:
|
|
3403
|
+
pcb_component_id: z157.string(),
|
|
3404
|
+
source_component_id: z157.string(),
|
|
3405
|
+
pcb_group_id: z157.string().optional(),
|
|
3406
|
+
subcircuit_id: z157.string().optional(),
|
|
3407
|
+
footprinter_string: z157.string().optional(),
|
|
3408
|
+
error_type: z157.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3358
3409
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3359
3410
|
expectTypesMatch(true);
|
|
3360
3411
|
|
|
3361
3412
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3362
|
-
import { z as
|
|
3413
|
+
import { z as z158 } from "zod";
|
|
3363
3414
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3364
|
-
type:
|
|
3415
|
+
type: z158.literal("circuit_json_footprint_load_error"),
|
|
3365
3416
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3366
3417
|
"circuit_json_footprint_load_error"
|
|
3367
3418
|
),
|
|
3368
|
-
pcb_component_id:
|
|
3369
|
-
source_component_id:
|
|
3370
|
-
pcb_group_id:
|
|
3371
|
-
subcircuit_id:
|
|
3372
|
-
error_type:
|
|
3373
|
-
circuit_json:
|
|
3419
|
+
pcb_component_id: z158.string(),
|
|
3420
|
+
source_component_id: z158.string(),
|
|
3421
|
+
pcb_group_id: z158.string().optional(),
|
|
3422
|
+
subcircuit_id: z158.string().optional(),
|
|
3423
|
+
error_type: z158.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3424
|
+
circuit_json: z158.array(z158.any()).optional()
|
|
3374
3425
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3375
3426
|
expectTypesMatch(true);
|
|
3376
3427
|
|
|
3377
3428
|
// src/pcb/pcb_group.ts
|
|
3378
|
-
import { z as
|
|
3379
|
-
var pcb_group =
|
|
3380
|
-
type:
|
|
3429
|
+
import { z as z159 } from "zod";
|
|
3430
|
+
var pcb_group = z159.object({
|
|
3431
|
+
type: z159.literal("pcb_group"),
|
|
3381
3432
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3382
|
-
source_group_id:
|
|
3383
|
-
is_subcircuit:
|
|
3384
|
-
subcircuit_id:
|
|
3433
|
+
source_group_id: z159.string(),
|
|
3434
|
+
is_subcircuit: z159.boolean().optional(),
|
|
3435
|
+
subcircuit_id: z159.string().optional(),
|
|
3385
3436
|
width: length.optional(),
|
|
3386
3437
|
height: length.optional(),
|
|
3387
3438
|
center: point,
|
|
3388
|
-
display_offset_x:
|
|
3439
|
+
display_offset_x: z159.string().optional().describe(
|
|
3389
3440
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3390
3441
|
),
|
|
3391
|
-
display_offset_y:
|
|
3442
|
+
display_offset_y: z159.string().optional().describe(
|
|
3392
3443
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3393
3444
|
),
|
|
3394
|
-
outline:
|
|
3445
|
+
outline: z159.array(point).optional(),
|
|
3395
3446
|
anchor_position: point.optional(),
|
|
3396
3447
|
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:
|
|
3448
|
+
position_mode: z159.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3449
|
+
positioned_relative_to_pcb_group_id: z159.string().optional(),
|
|
3450
|
+
positioned_relative_to_pcb_board_id: z159.string().optional(),
|
|
3451
|
+
pcb_component_ids: z159.array(z159.string()),
|
|
3452
|
+
child_layout_mode: z159.enum(["packed", "none"]).optional(),
|
|
3453
|
+
name: z159.string().optional(),
|
|
3454
|
+
description: z159.string().optional(),
|
|
3455
|
+
layout_mode: z159.string().optional(),
|
|
3456
|
+
autorouter_configuration: z159.object({
|
|
3406
3457
|
trace_clearance: length
|
|
3407
3458
|
}).optional(),
|
|
3408
|
-
autorouter_used_string:
|
|
3459
|
+
autorouter_used_string: z159.string().optional()
|
|
3409
3460
|
}).describe("Defines a group of components on the PCB");
|
|
3410
3461
|
expectTypesMatch(true);
|
|
3411
3462
|
|
|
3412
3463
|
// src/pcb/pcb_autorouting_error.ts
|
|
3413
|
-
import { z as
|
|
3464
|
+
import { z as z160 } from "zod";
|
|
3414
3465
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3415
|
-
type:
|
|
3466
|
+
type: z160.literal("pcb_autorouting_error"),
|
|
3416
3467
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3417
|
-
error_type:
|
|
3418
|
-
subcircuit_id:
|
|
3468
|
+
error_type: z160.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3469
|
+
subcircuit_id: z160.string().optional()
|
|
3419
3470
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3420
3471
|
expectTypesMatch(true);
|
|
3421
3472
|
|
|
3422
3473
|
// src/pcb/pcb_preflight_routing_error.ts
|
|
3423
|
-
import { z as
|
|
3474
|
+
import { z as z161 } from "zod";
|
|
3424
3475
|
var pcb_preflight_routing_error = base_circuit_json_error.extend({
|
|
3425
|
-
type:
|
|
3476
|
+
type: z161.literal("pcb_preflight_routing_error"),
|
|
3426
3477
|
pcb_preflight_routing_error_id: getZodPrefixedIdWithDefault(
|
|
3427
3478
|
"pcb_preflight_routing_error"
|
|
3428
3479
|
),
|
|
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:
|
|
3480
|
+
error_type: z161.literal("pcb_preflight_routing_error").default("pcb_preflight_routing_error"),
|
|
3481
|
+
error_code: z161.string(),
|
|
3482
|
+
subcircuit_id: z161.string().optional(),
|
|
3483
|
+
pcb_group_id: z161.string().optional(),
|
|
3484
|
+
routing_phase_index: z161.number().int().optional(),
|
|
3485
|
+
phase_name: z161.string().optional(),
|
|
3486
|
+
source_trace_ids: z161.array(z161.string()).optional(),
|
|
3487
|
+
pcb_component_ids: z161.array(z161.string()).optional(),
|
|
3488
|
+
pcb_port_ids: z161.array(z161.string()).optional(),
|
|
3489
|
+
related_error_ids: z161.array(z161.string()).optional(),
|
|
3490
|
+
measurements: z161.record(z161.number().finite()).optional()
|
|
3440
3491
|
});
|
|
3441
3492
|
expectTypesMatch(true);
|
|
3442
3493
|
|
|
3443
3494
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3444
|
-
import { z as
|
|
3445
|
-
var pcb_manual_edit_conflict_warning =
|
|
3446
|
-
type:
|
|
3495
|
+
import { z as z162 } from "zod";
|
|
3496
|
+
var pcb_manual_edit_conflict_warning = z162.object({
|
|
3497
|
+
type: z162.literal("pcb_manual_edit_conflict_warning"),
|
|
3447
3498
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3448
3499
|
"pcb_manual_edit_conflict_warning"
|
|
3449
3500
|
),
|
|
3450
|
-
warning_type:
|
|
3451
|
-
message:
|
|
3452
|
-
pcb_component_id:
|
|
3453
|
-
pcb_group_id:
|
|
3454
|
-
subcircuit_id:
|
|
3455
|
-
source_component_id:
|
|
3501
|
+
warning_type: z162.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3502
|
+
message: z162.string(),
|
|
3503
|
+
pcb_component_id: z162.string(),
|
|
3504
|
+
pcb_group_id: z162.string().optional(),
|
|
3505
|
+
subcircuit_id: z162.string().optional(),
|
|
3506
|
+
source_component_id: z162.string()
|
|
3456
3507
|
}).describe(
|
|
3457
3508
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3458
3509
|
);
|
|
3459
3510
|
expectTypesMatch(true);
|
|
3460
3511
|
|
|
3461
3512
|
// 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:
|
|
3513
|
+
import { z as z163 } from "zod";
|
|
3514
|
+
var connectorOrientationDirection = z163.enum(["x-", "x+", "y+", "y-"]);
|
|
3515
|
+
var pcb_connector_not_in_accessible_orientation_warning = z163.object({
|
|
3516
|
+
type: z163.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3466
3517
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3467
3518
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3468
3519
|
),
|
|
3469
|
-
warning_type:
|
|
3470
|
-
message:
|
|
3471
|
-
pcb_component_id:
|
|
3472
|
-
source_component_id:
|
|
3473
|
-
pcb_board_id:
|
|
3520
|
+
warning_type: z163.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3521
|
+
message: z163.string(),
|
|
3522
|
+
pcb_component_id: z163.string(),
|
|
3523
|
+
source_component_id: z163.string().optional(),
|
|
3524
|
+
pcb_board_id: z163.string().optional(),
|
|
3474
3525
|
facing_direction: connectorOrientationDirection,
|
|
3475
3526
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3476
|
-
subcircuit_id:
|
|
3527
|
+
subcircuit_id: z163.string().optional()
|
|
3477
3528
|
}).describe(
|
|
3478
3529
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3479
3530
|
);
|
|
3480
3531
|
expectTypesMatch(true);
|
|
3481
3532
|
|
|
3482
3533
|
// src/pcb/pcb_component_missing_courtyard_warning.ts
|
|
3483
|
-
import { z as
|
|
3484
|
-
var pcb_component_missing_courtyard_warning =
|
|
3485
|
-
type:
|
|
3534
|
+
import { z as z164 } from "zod";
|
|
3535
|
+
var pcb_component_missing_courtyard_warning = z164.object({
|
|
3536
|
+
type: z164.literal("pcb_component_missing_courtyard_warning"),
|
|
3486
3537
|
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
3487
3538
|
"pcb_component_missing_courtyard_warning"
|
|
3488
3539
|
),
|
|
3489
|
-
warning_type:
|
|
3490
|
-
message:
|
|
3491
|
-
pcb_component_id:
|
|
3492
|
-
source_component_id:
|
|
3493
|
-
subcircuit_id:
|
|
3540
|
+
warning_type: z164.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
3541
|
+
message: z164.string(),
|
|
3542
|
+
pcb_component_id: z164.string(),
|
|
3543
|
+
source_component_id: z164.string().optional(),
|
|
3544
|
+
subcircuit_id: z164.string().optional()
|
|
3494
3545
|
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
3495
3546
|
expectTypesMatch(true);
|
|
3496
3547
|
|
|
3497
3548
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3498
|
-
import { z as
|
|
3499
|
-
var supplier_footprint_mismatch_warning =
|
|
3500
|
-
type:
|
|
3549
|
+
import { z as z165 } from "zod";
|
|
3550
|
+
var supplier_footprint_mismatch_warning = z165.object({
|
|
3551
|
+
type: z165.literal("supplier_footprint_mismatch_warning"),
|
|
3501
3552
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3502
3553
|
"supplier_footprint_mismatch_warning"
|
|
3503
3554
|
),
|
|
3504
|
-
warning_type:
|
|
3505
|
-
message:
|
|
3506
|
-
source_component_id:
|
|
3507
|
-
pcb_component_id:
|
|
3508
|
-
pcb_group_id:
|
|
3509
|
-
subcircuit_id:
|
|
3555
|
+
warning_type: z165.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3556
|
+
message: z165.string(),
|
|
3557
|
+
source_component_id: z165.string(),
|
|
3558
|
+
pcb_component_id: z165.string().optional(),
|
|
3559
|
+
pcb_group_id: z165.string().optional(),
|
|
3560
|
+
subcircuit_id: z165.string().optional(),
|
|
3510
3561
|
supplier_name: supplier_name.optional(),
|
|
3511
|
-
supplier_part_number:
|
|
3512
|
-
supplier_footprint_url:
|
|
3513
|
-
footprint_copper_intersection_over_union:
|
|
3562
|
+
supplier_part_number: z165.string().optional(),
|
|
3563
|
+
supplier_footprint_url: z165.string().optional(),
|
|
3564
|
+
footprint_copper_intersection_over_union: z165.number()
|
|
3514
3565
|
}).describe(
|
|
3515
3566
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3516
3567
|
);
|
|
3517
3568
|
expectTypesMatch(true);
|
|
3518
3569
|
|
|
3519
3570
|
// src/pcb/pcb_fabricator_extra_charge_warning.ts
|
|
3520
|
-
import { z as
|
|
3521
|
-
var pcb_fabricator_extra_charge_warning =
|
|
3522
|
-
type:
|
|
3571
|
+
import { z as z166 } from "zod";
|
|
3572
|
+
var pcb_fabricator_extra_charge_warning = z166.object({
|
|
3573
|
+
type: z166.literal("pcb_fabricator_extra_charge_warning"),
|
|
3523
3574
|
pcb_fabricator_extra_charge_warning_id: getZodPrefixedIdWithDefault(
|
|
3524
3575
|
"pcb_fabricator_extra_charge_warning"
|
|
3525
3576
|
),
|
|
3526
|
-
warning_type:
|
|
3527
|
-
message:
|
|
3528
|
-
fabricator_preset:
|
|
3529
|
-
pcb_board_id:
|
|
3530
|
-
pcb_via_ids:
|
|
3531
|
-
subcircuit_id:
|
|
3577
|
+
warning_type: z166.literal("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),
|
|
3578
|
+
message: z166.string(),
|
|
3579
|
+
fabricator_preset: z166.string(),
|
|
3580
|
+
pcb_board_id: z166.string().optional(),
|
|
3581
|
+
pcb_via_ids: z166.array(z166.string()).optional(),
|
|
3582
|
+
subcircuit_id: z166.string().optional()
|
|
3532
3583
|
}).describe(
|
|
3533
3584
|
"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
3585
|
);
|
|
3535
3586
|
expectTypesMatch(true);
|
|
3536
3587
|
|
|
3537
3588
|
// src/pcb/pcb_breakout_point.ts
|
|
3538
|
-
import { z as
|
|
3539
|
-
var pcb_breakout_point =
|
|
3540
|
-
type:
|
|
3589
|
+
import { z as z167 } from "zod";
|
|
3590
|
+
var pcb_breakout_point = z167.object({
|
|
3591
|
+
type: z167.literal("pcb_breakout_point"),
|
|
3541
3592
|
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:
|
|
3593
|
+
pcb_group_id: z167.string(),
|
|
3594
|
+
subcircuit_id: z167.string().optional(),
|
|
3595
|
+
source_trace_id: z167.string().optional(),
|
|
3596
|
+
source_port_id: z167.string().optional(),
|
|
3597
|
+
source_net_id: z167.string().optional(),
|
|
3547
3598
|
layer: layer_ref.optional(),
|
|
3548
3599
|
x: distance,
|
|
3549
3600
|
y: distance
|
|
@@ -3553,61 +3604,61 @@ var pcb_breakout_point = z164.object({
|
|
|
3553
3604
|
expectTypesMatch(true);
|
|
3554
3605
|
|
|
3555
3606
|
// src/pcb/pcb_ground_plane.ts
|
|
3556
|
-
import { z as
|
|
3557
|
-
var pcb_ground_plane =
|
|
3558
|
-
type:
|
|
3607
|
+
import { z as z168 } from "zod";
|
|
3608
|
+
var pcb_ground_plane = z168.object({
|
|
3609
|
+
type: z168.literal("pcb_ground_plane"),
|
|
3559
3610
|
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:
|
|
3611
|
+
source_pcb_ground_plane_id: z168.string(),
|
|
3612
|
+
source_net_id: z168.string(),
|
|
3613
|
+
pcb_group_id: z168.string().optional(),
|
|
3614
|
+
subcircuit_id: z168.string().optional()
|
|
3564
3615
|
}).describe("Defines a ground plane on the PCB");
|
|
3565
3616
|
expectTypesMatch(true);
|
|
3566
3617
|
|
|
3567
3618
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3568
|
-
import { z as
|
|
3569
|
-
var pcb_ground_plane_region =
|
|
3570
|
-
type:
|
|
3619
|
+
import { z as z169 } from "zod";
|
|
3620
|
+
var pcb_ground_plane_region = z169.object({
|
|
3621
|
+
type: z169.literal("pcb_ground_plane_region"),
|
|
3571
3622
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3572
3623
|
"pcb_ground_plane_region"
|
|
3573
3624
|
),
|
|
3574
|
-
pcb_ground_plane_id:
|
|
3575
|
-
pcb_group_id:
|
|
3576
|
-
subcircuit_id:
|
|
3625
|
+
pcb_ground_plane_id: z169.string(),
|
|
3626
|
+
pcb_group_id: z169.string().optional(),
|
|
3627
|
+
subcircuit_id: z169.string().optional(),
|
|
3577
3628
|
layer: layer_ref,
|
|
3578
|
-
points:
|
|
3629
|
+
points: z169.array(point)
|
|
3579
3630
|
}).describe("Defines a polygon region of a ground plane");
|
|
3580
3631
|
expectTypesMatch(true);
|
|
3581
3632
|
|
|
3582
3633
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3583
|
-
import { z as
|
|
3584
|
-
var pcb_thermal_spoke =
|
|
3585
|
-
type:
|
|
3634
|
+
import { z as z170 } from "zod";
|
|
3635
|
+
var pcb_thermal_spoke = z170.object({
|
|
3636
|
+
type: z170.literal("pcb_thermal_spoke"),
|
|
3586
3637
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3587
|
-
pcb_ground_plane_id:
|
|
3588
|
-
shape:
|
|
3589
|
-
spoke_count:
|
|
3638
|
+
pcb_ground_plane_id: z170.string(),
|
|
3639
|
+
shape: z170.string(),
|
|
3640
|
+
spoke_count: z170.number(),
|
|
3590
3641
|
spoke_thickness: distance,
|
|
3591
3642
|
spoke_inner_diameter: distance,
|
|
3592
3643
|
spoke_outer_diameter: distance,
|
|
3593
|
-
pcb_plated_hole_id:
|
|
3594
|
-
subcircuit_id:
|
|
3644
|
+
pcb_plated_hole_id: z170.string().optional(),
|
|
3645
|
+
subcircuit_id: z170.string().optional()
|
|
3595
3646
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3596
3647
|
expectTypesMatch(true);
|
|
3597
3648
|
|
|
3598
3649
|
// src/pcb/pcb_copper_pour.ts
|
|
3599
|
-
import { z as
|
|
3600
|
-
var pcb_copper_pour_base =
|
|
3601
|
-
type:
|
|
3650
|
+
import { z as z171 } from "zod";
|
|
3651
|
+
var pcb_copper_pour_base = z171.object({
|
|
3652
|
+
type: z171.literal("pcb_copper_pour"),
|
|
3602
3653
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3603
|
-
pcb_group_id:
|
|
3604
|
-
subcircuit_id:
|
|
3654
|
+
pcb_group_id: z171.string().optional(),
|
|
3655
|
+
subcircuit_id: z171.string().optional(),
|
|
3605
3656
|
layer: layer_ref,
|
|
3606
|
-
source_net_id:
|
|
3607
|
-
covered_with_solder_mask:
|
|
3657
|
+
source_net_id: z171.string().optional(),
|
|
3658
|
+
covered_with_solder_mask: z171.boolean().optional().default(true)
|
|
3608
3659
|
});
|
|
3609
3660
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3610
|
-
shape:
|
|
3661
|
+
shape: z171.literal("rect"),
|
|
3611
3662
|
center: point,
|
|
3612
3663
|
width: length,
|
|
3613
3664
|
height: length,
|
|
@@ -3615,16 +3666,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3615
3666
|
});
|
|
3616
3667
|
expectTypesMatch(true);
|
|
3617
3668
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3618
|
-
shape:
|
|
3669
|
+
shape: z171.literal("brep"),
|
|
3619
3670
|
brep_shape
|
|
3620
3671
|
});
|
|
3621
3672
|
expectTypesMatch(true);
|
|
3622
3673
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3623
|
-
shape:
|
|
3624
|
-
points:
|
|
3674
|
+
shape: z171.literal("polygon"),
|
|
3675
|
+
points: z171.array(point)
|
|
3625
3676
|
});
|
|
3626
3677
|
expectTypesMatch(true);
|
|
3627
|
-
var pcb_copper_pour =
|
|
3678
|
+
var pcb_copper_pour = z171.discriminatedUnion("shape", [
|
|
3628
3679
|
pcb_copper_pour_rect,
|
|
3629
3680
|
pcb_copper_pour_brep,
|
|
3630
3681
|
pcb_copper_pour_polygon
|
|
@@ -3632,99 +3683,99 @@ var pcb_copper_pour = z168.discriminatedUnion("shape", [
|
|
|
3632
3683
|
expectTypesMatch(true);
|
|
3633
3684
|
|
|
3634
3685
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3635
|
-
import { z as
|
|
3686
|
+
import { z as z172 } from "zod";
|
|
3636
3687
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3637
|
-
type:
|
|
3688
|
+
type: z172.literal("pcb_component_outside_board_error"),
|
|
3638
3689
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3639
3690
|
"pcb_component_outside_board_error"
|
|
3640
3691
|
),
|
|
3641
|
-
error_type:
|
|
3642
|
-
pcb_component_id:
|
|
3643
|
-
pcb_board_id:
|
|
3692
|
+
error_type: z172.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3693
|
+
pcb_component_id: z172.string(),
|
|
3694
|
+
pcb_board_id: z172.string(),
|
|
3644
3695
|
component_center: point,
|
|
3645
|
-
component_bounds:
|
|
3646
|
-
min_x:
|
|
3647
|
-
max_x:
|
|
3648
|
-
min_y:
|
|
3649
|
-
max_y:
|
|
3696
|
+
component_bounds: z172.object({
|
|
3697
|
+
min_x: z172.number(),
|
|
3698
|
+
max_x: z172.number(),
|
|
3699
|
+
min_y: z172.number(),
|
|
3700
|
+
max_y: z172.number()
|
|
3650
3701
|
}),
|
|
3651
|
-
subcircuit_id:
|
|
3652
|
-
source_component_id:
|
|
3702
|
+
subcircuit_id: z172.string().optional(),
|
|
3703
|
+
source_component_id: z172.string().optional()
|
|
3653
3704
|
}).describe(
|
|
3654
3705
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3655
3706
|
);
|
|
3656
3707
|
expectTypesMatch(true);
|
|
3657
3708
|
|
|
3658
3709
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3659
|
-
import { z as
|
|
3710
|
+
import { z as z173 } from "zod";
|
|
3660
3711
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3661
|
-
type:
|
|
3712
|
+
type: z173.literal("pcb_component_not_on_board_edge_error"),
|
|
3662
3713
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3663
3714
|
"pcb_component_not_on_board_edge_error"
|
|
3664
3715
|
),
|
|
3665
|
-
error_type:
|
|
3666
|
-
pcb_component_id:
|
|
3667
|
-
pcb_board_id:
|
|
3716
|
+
error_type: z173.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3717
|
+
pcb_component_id: z173.string(),
|
|
3718
|
+
pcb_board_id: z173.string(),
|
|
3668
3719
|
component_center: point,
|
|
3669
|
-
pad_to_nearest_board_edge_distance:
|
|
3670
|
-
source_component_id:
|
|
3671
|
-
subcircuit_id:
|
|
3720
|
+
pad_to_nearest_board_edge_distance: z173.number(),
|
|
3721
|
+
source_component_id: z173.string().optional(),
|
|
3722
|
+
subcircuit_id: z173.string().optional()
|
|
3672
3723
|
}).describe(
|
|
3673
3724
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3674
3725
|
);
|
|
3675
3726
|
expectTypesMatch(true);
|
|
3676
3727
|
|
|
3677
3728
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3678
|
-
import { z as
|
|
3729
|
+
import { z as z174 } from "zod";
|
|
3679
3730
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3680
|
-
type:
|
|
3731
|
+
type: z174.literal("pcb_component_invalid_layer_error"),
|
|
3681
3732
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3682
3733
|
"pcb_component_invalid_layer_error"
|
|
3683
3734
|
),
|
|
3684
|
-
error_type:
|
|
3685
|
-
pcb_component_id:
|
|
3686
|
-
source_component_id:
|
|
3735
|
+
error_type: z174.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3736
|
+
pcb_component_id: z174.string().optional(),
|
|
3737
|
+
source_component_id: z174.string(),
|
|
3687
3738
|
layer: layer_ref,
|
|
3688
|
-
subcircuit_id:
|
|
3739
|
+
subcircuit_id: z174.string().optional()
|
|
3689
3740
|
}).describe(
|
|
3690
3741
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3691
3742
|
);
|
|
3692
3743
|
expectTypesMatch(true);
|
|
3693
3744
|
|
|
3694
3745
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3695
|
-
import { z as
|
|
3746
|
+
import { z as z175 } from "zod";
|
|
3696
3747
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3697
|
-
type:
|
|
3748
|
+
type: z175.literal("pcb_via_clearance_error"),
|
|
3698
3749
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3699
|
-
error_type:
|
|
3700
|
-
pcb_via_ids:
|
|
3750
|
+
error_type: z175.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3751
|
+
pcb_via_ids: z175.array(z175.string()).min(2),
|
|
3701
3752
|
minimum_clearance: distance.optional(),
|
|
3702
3753
|
actual_clearance: distance.optional(),
|
|
3703
|
-
pcb_center:
|
|
3704
|
-
x:
|
|
3705
|
-
y:
|
|
3754
|
+
pcb_center: z175.object({
|
|
3755
|
+
x: z175.number().optional(),
|
|
3756
|
+
y: z175.number().optional()
|
|
3706
3757
|
}).optional(),
|
|
3707
|
-
subcircuit_id:
|
|
3758
|
+
subcircuit_id: z175.string().optional()
|
|
3708
3759
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3709
3760
|
expectTypesMatch(true);
|
|
3710
3761
|
|
|
3711
3762
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3712
|
-
import { z as
|
|
3763
|
+
import { z as z176 } from "zod";
|
|
3713
3764
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3714
|
-
type:
|
|
3765
|
+
type: z176.literal("pcb_via_trace_clearance_error"),
|
|
3715
3766
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3716
3767
|
"pcb_via_trace_clearance_error"
|
|
3717
3768
|
),
|
|
3718
|
-
error_type:
|
|
3719
|
-
pcb_via_id:
|
|
3720
|
-
pcb_trace_id:
|
|
3769
|
+
error_type: z176.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3770
|
+
pcb_via_id: z176.string(),
|
|
3771
|
+
pcb_trace_id: z176.string(),
|
|
3721
3772
|
minimum_clearance: distance.optional(),
|
|
3722
3773
|
actual_clearance: distance.optional(),
|
|
3723
|
-
center:
|
|
3724
|
-
x:
|
|
3725
|
-
y:
|
|
3774
|
+
center: z176.object({
|
|
3775
|
+
x: z176.number().optional(),
|
|
3776
|
+
y: z176.number().optional()
|
|
3726
3777
|
}).optional(),
|
|
3727
|
-
subcircuit_id:
|
|
3778
|
+
subcircuit_id: z176.string().optional()
|
|
3728
3779
|
}).describe(
|
|
3729
3780
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3730
3781
|
);
|
|
@@ -3733,41 +3784,41 @@ expectTypesMatch(
|
|
|
3733
3784
|
);
|
|
3734
3785
|
|
|
3735
3786
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3736
|
-
import { z as
|
|
3787
|
+
import { z as z177 } from "zod";
|
|
3737
3788
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3738
|
-
type:
|
|
3789
|
+
type: z177.literal("pcb_pad_pad_clearance_error"),
|
|
3739
3790
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3740
3791
|
"pcb_pad_pad_clearance_error"
|
|
3741
3792
|
),
|
|
3742
|
-
error_type:
|
|
3743
|
-
pcb_pad_ids:
|
|
3793
|
+
error_type: z177.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3794
|
+
pcb_pad_ids: z177.array(z177.string()).min(2),
|
|
3744
3795
|
minimum_clearance: distance.optional(),
|
|
3745
3796
|
actual_clearance: distance.optional(),
|
|
3746
|
-
center:
|
|
3747
|
-
x:
|
|
3748
|
-
y:
|
|
3797
|
+
center: z177.object({
|
|
3798
|
+
x: z177.number().optional(),
|
|
3799
|
+
y: z177.number().optional()
|
|
3749
3800
|
}).optional(),
|
|
3750
|
-
subcircuit_id:
|
|
3801
|
+
subcircuit_id: z177.string().optional()
|
|
3751
3802
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3752
3803
|
expectTypesMatch(true);
|
|
3753
3804
|
|
|
3754
3805
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3755
|
-
import { z as
|
|
3806
|
+
import { z as z178 } from "zod";
|
|
3756
3807
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3757
|
-
type:
|
|
3808
|
+
type: z178.literal("pcb_pad_trace_clearance_error"),
|
|
3758
3809
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3759
3810
|
"pcb_pad_trace_clearance_error"
|
|
3760
3811
|
),
|
|
3761
|
-
error_type:
|
|
3762
|
-
pcb_pad_id:
|
|
3763
|
-
pcb_trace_id:
|
|
3812
|
+
error_type: z178.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3813
|
+
pcb_pad_id: z178.string(),
|
|
3814
|
+
pcb_trace_id: z178.string(),
|
|
3764
3815
|
minimum_clearance: distance.optional(),
|
|
3765
3816
|
actual_clearance: distance.optional(),
|
|
3766
|
-
center:
|
|
3767
|
-
x:
|
|
3768
|
-
y:
|
|
3817
|
+
center: z178.object({
|
|
3818
|
+
x: z178.number().optional(),
|
|
3819
|
+
y: z178.number().optional()
|
|
3769
3820
|
}).optional(),
|
|
3770
|
-
subcircuit_id:
|
|
3821
|
+
subcircuit_id: z178.string().optional()
|
|
3771
3822
|
}).describe(
|
|
3772
3823
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3773
3824
|
);
|
|
@@ -3776,89 +3827,89 @@ expectTypesMatch(
|
|
|
3776
3827
|
);
|
|
3777
3828
|
|
|
3778
3829
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3779
|
-
import { z as
|
|
3780
|
-
var pcb_courtyard_rect =
|
|
3781
|
-
type:
|
|
3830
|
+
import { z as z179 } from "zod";
|
|
3831
|
+
var pcb_courtyard_rect = z179.object({
|
|
3832
|
+
type: z179.literal("pcb_courtyard_rect"),
|
|
3782
3833
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3783
|
-
pcb_component_id:
|
|
3784
|
-
pcb_group_id:
|
|
3785
|
-
subcircuit_id:
|
|
3834
|
+
pcb_component_id: z179.string(),
|
|
3835
|
+
pcb_group_id: z179.string().optional(),
|
|
3836
|
+
subcircuit_id: z179.string().optional(),
|
|
3786
3837
|
center: point,
|
|
3787
3838
|
width: length,
|
|
3788
3839
|
height: length,
|
|
3789
3840
|
layer: visible_layer,
|
|
3790
3841
|
ccw_rotation: rotation.optional(),
|
|
3791
|
-
color:
|
|
3842
|
+
color: z179.string().optional()
|
|
3792
3843
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3793
3844
|
expectTypesMatch(true);
|
|
3794
3845
|
|
|
3795
3846
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3796
|
-
import { z as
|
|
3797
|
-
var pcb_courtyard_outline =
|
|
3798
|
-
type:
|
|
3847
|
+
import { z as z180 } from "zod";
|
|
3848
|
+
var pcb_courtyard_outline = z180.object({
|
|
3849
|
+
type: z180.literal("pcb_courtyard_outline"),
|
|
3799
3850
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3800
3851
|
"pcb_courtyard_outline"
|
|
3801
3852
|
),
|
|
3802
|
-
pcb_component_id:
|
|
3803
|
-
pcb_group_id:
|
|
3804
|
-
subcircuit_id:
|
|
3853
|
+
pcb_component_id: z180.string(),
|
|
3854
|
+
pcb_group_id: z180.string().optional(),
|
|
3855
|
+
subcircuit_id: z180.string().optional(),
|
|
3805
3856
|
layer: visible_layer,
|
|
3806
|
-
outline:
|
|
3857
|
+
outline: z180.array(point).min(2)
|
|
3807
3858
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3808
3859
|
expectTypesMatch(true);
|
|
3809
3860
|
|
|
3810
3861
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3811
|
-
import { z as
|
|
3812
|
-
var pcb_courtyard_polygon =
|
|
3813
|
-
type:
|
|
3862
|
+
import { z as z181 } from "zod";
|
|
3863
|
+
var pcb_courtyard_polygon = z181.object({
|
|
3864
|
+
type: z181.literal("pcb_courtyard_polygon"),
|
|
3814
3865
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3815
3866
|
"pcb_courtyard_polygon"
|
|
3816
3867
|
),
|
|
3817
|
-
pcb_component_id:
|
|
3818
|
-
pcb_group_id:
|
|
3819
|
-
subcircuit_id:
|
|
3868
|
+
pcb_component_id: z181.string(),
|
|
3869
|
+
pcb_group_id: z181.string().optional(),
|
|
3870
|
+
subcircuit_id: z181.string().optional(),
|
|
3820
3871
|
layer: visible_layer,
|
|
3821
|
-
points:
|
|
3822
|
-
color:
|
|
3872
|
+
points: z181.array(point).min(3),
|
|
3873
|
+
color: z181.string().optional()
|
|
3823
3874
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3824
3875
|
expectTypesMatch(true);
|
|
3825
3876
|
|
|
3826
3877
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3827
|
-
import { z as
|
|
3828
|
-
var pcb_courtyard_circle =
|
|
3829
|
-
type:
|
|
3878
|
+
import { z as z182 } from "zod";
|
|
3879
|
+
var pcb_courtyard_circle = z182.object({
|
|
3880
|
+
type: z182.literal("pcb_courtyard_circle"),
|
|
3830
3881
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3831
3882
|
"pcb_courtyard_circle"
|
|
3832
3883
|
),
|
|
3833
|
-
pcb_component_id:
|
|
3834
|
-
pcb_group_id:
|
|
3835
|
-
subcircuit_id:
|
|
3884
|
+
pcb_component_id: z182.string(),
|
|
3885
|
+
pcb_group_id: z182.string().optional(),
|
|
3886
|
+
subcircuit_id: z182.string().optional(),
|
|
3836
3887
|
center: point,
|
|
3837
3888
|
radius: length,
|
|
3838
3889
|
layer: visible_layer,
|
|
3839
|
-
color:
|
|
3890
|
+
color: z182.string().optional()
|
|
3840
3891
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3841
3892
|
expectTypesMatch(true);
|
|
3842
3893
|
|
|
3843
3894
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3844
|
-
import { z as
|
|
3845
|
-
var pcb_courtyard_pill =
|
|
3846
|
-
type:
|
|
3895
|
+
import { z as z183 } from "zod";
|
|
3896
|
+
var pcb_courtyard_pill = z183.object({
|
|
3897
|
+
type: z183.literal("pcb_courtyard_pill"),
|
|
3847
3898
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3848
|
-
pcb_component_id:
|
|
3849
|
-
pcb_group_id:
|
|
3850
|
-
subcircuit_id:
|
|
3899
|
+
pcb_component_id: z183.string(),
|
|
3900
|
+
pcb_group_id: z183.string().optional(),
|
|
3901
|
+
subcircuit_id: z183.string().optional(),
|
|
3851
3902
|
center: point,
|
|
3852
3903
|
width: length,
|
|
3853
3904
|
height: length,
|
|
3854
3905
|
radius: length,
|
|
3855
3906
|
layer: visible_layer,
|
|
3856
|
-
color:
|
|
3907
|
+
color: z183.string().optional()
|
|
3857
3908
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3858
3909
|
expectTypesMatch(true);
|
|
3859
3910
|
|
|
3860
3911
|
// src/cad/cad_component.ts
|
|
3861
|
-
import { z as
|
|
3912
|
+
import { z as z184 } from "zod";
|
|
3862
3913
|
|
|
3863
3914
|
// src/cad/cad_model_conventions.ts
|
|
3864
3915
|
var cad_model_formats = [
|
|
@@ -3889,50 +3940,50 @@ var cadModelDefaultDirectionMap = {
|
|
|
3889
3940
|
};
|
|
3890
3941
|
|
|
3891
3942
|
// src/cad/cad_component.ts
|
|
3892
|
-
var cad_component =
|
|
3893
|
-
type:
|
|
3894
|
-
cad_component_id:
|
|
3895
|
-
pcb_component_id:
|
|
3896
|
-
source_component_id:
|
|
3943
|
+
var cad_component = z184.object({
|
|
3944
|
+
type: z184.literal("cad_component"),
|
|
3945
|
+
cad_component_id: z184.string(),
|
|
3946
|
+
pcb_component_id: z184.string(),
|
|
3947
|
+
source_component_id: z184.string(),
|
|
3897
3948
|
position: point3,
|
|
3898
3949
|
rotation: point3.optional(),
|
|
3899
3950
|
size: point3.optional(),
|
|
3900
3951
|
layer: layer_ref.optional(),
|
|
3901
|
-
subcircuit_id:
|
|
3952
|
+
subcircuit_id: z184.string().optional(),
|
|
3902
3953
|
// 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:
|
|
3954
|
+
footprinter_string: z184.string().optional(),
|
|
3955
|
+
model_obj_url: z184.string().optional(),
|
|
3956
|
+
model_stl_url: z184.string().optional(),
|
|
3957
|
+
model_3mf_url: z184.string().optional(),
|
|
3958
|
+
model_gltf_url: z184.string().optional(),
|
|
3959
|
+
model_glb_url: z184.string().optional(),
|
|
3960
|
+
model_step_url: z184.string().optional(),
|
|
3961
|
+
model_wrl_url: z184.string().optional(),
|
|
3911
3962
|
model_asset: asset.optional(),
|
|
3912
|
-
model_unit_to_mm_scale_factor:
|
|
3913
|
-
model_board_normal_direction:
|
|
3963
|
+
model_unit_to_mm_scale_factor: z184.number().optional(),
|
|
3964
|
+
model_board_normal_direction: z184.enum(cad_model_axis_directions).optional().describe(
|
|
3914
3965
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3915
3966
|
),
|
|
3916
3967
|
model_origin_position: point3.optional(),
|
|
3917
|
-
model_origin_alignment:
|
|
3968
|
+
model_origin_alignment: z184.enum([
|
|
3918
3969
|
"unknown",
|
|
3919
3970
|
"center",
|
|
3920
3971
|
"center_of_component_on_board_surface",
|
|
3921
3972
|
"bottom_center_of_component"
|
|
3922
3973
|
]).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:
|
|
3974
|
+
model_object_fit: z184.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3975
|
+
model_jscad: z184.any().optional(),
|
|
3976
|
+
show_as_translucent_model: z184.boolean().optional(),
|
|
3977
|
+
show_as_bounding_box: z184.boolean().optional(),
|
|
3978
|
+
show_hidden_edges: z184.boolean().optional(),
|
|
3979
|
+
anchor_alignment: z184.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3929
3980
|
}).describe("Defines a component on the PCB");
|
|
3930
3981
|
expectTypesMatch(true);
|
|
3931
3982
|
|
|
3932
3983
|
// src/simulation/simulation_voltage_source.ts
|
|
3933
|
-
import { z as
|
|
3934
|
-
var wave_shape =
|
|
3935
|
-
var percentage =
|
|
3984
|
+
import { z as z185 } from "zod";
|
|
3985
|
+
var wave_shape = z185.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3986
|
+
var percentage = z185.union([z185.string(), z185.number()]).transform((val) => {
|
|
3936
3987
|
if (typeof val === "string") {
|
|
3937
3988
|
if (val.endsWith("%")) {
|
|
3938
3989
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3941,32 +3992,32 @@ var percentage = z182.union([z182.string(), z182.number()]).transform((val) => {
|
|
|
3941
3992
|
}
|
|
3942
3993
|
return val;
|
|
3943
3994
|
}).pipe(
|
|
3944
|
-
|
|
3995
|
+
z185.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3945
3996
|
);
|
|
3946
|
-
var simulation_dc_voltage_source =
|
|
3947
|
-
type:
|
|
3997
|
+
var simulation_dc_voltage_source = z185.object({
|
|
3998
|
+
type: z185.literal("simulation_voltage_source"),
|
|
3948
3999
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3949
4000
|
"simulation_voltage_source"
|
|
3950
4001
|
),
|
|
3951
|
-
is_dc_source:
|
|
3952
|
-
positive_source_port_id:
|
|
3953
|
-
negative_source_port_id:
|
|
3954
|
-
positive_source_net_id:
|
|
3955
|
-
negative_source_net_id:
|
|
4002
|
+
is_dc_source: z185.literal(true).optional().default(true),
|
|
4003
|
+
positive_source_port_id: z185.string().optional(),
|
|
4004
|
+
negative_source_port_id: z185.string().optional(),
|
|
4005
|
+
positive_source_net_id: z185.string().optional(),
|
|
4006
|
+
negative_source_net_id: z185.string().optional(),
|
|
3956
4007
|
voltage,
|
|
3957
4008
|
ac_magnitude: voltage.optional(),
|
|
3958
4009
|
ac_phase: rotation.optional()
|
|
3959
4010
|
}).describe("Defines a DC voltage source for simulation");
|
|
3960
|
-
var simulation_ac_voltage_source =
|
|
3961
|
-
type:
|
|
4011
|
+
var simulation_ac_voltage_source = z185.object({
|
|
4012
|
+
type: z185.literal("simulation_voltage_source"),
|
|
3962
4013
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3963
4014
|
"simulation_voltage_source"
|
|
3964
4015
|
),
|
|
3965
|
-
is_dc_source:
|
|
3966
|
-
terminal1_source_port_id:
|
|
3967
|
-
terminal2_source_port_id:
|
|
3968
|
-
terminal1_source_net_id:
|
|
3969
|
-
terminal2_source_net_id:
|
|
4016
|
+
is_dc_source: z185.literal(false),
|
|
4017
|
+
terminal1_source_port_id: z185.string().optional(),
|
|
4018
|
+
terminal2_source_port_id: z185.string().optional(),
|
|
4019
|
+
terminal1_source_net_id: z185.string().optional(),
|
|
4020
|
+
terminal2_source_net_id: z185.string().optional(),
|
|
3970
4021
|
voltage: voltage.optional(),
|
|
3971
4022
|
frequency: frequency.optional(),
|
|
3972
4023
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3981,14 +4032,14 @@ var simulation_ac_voltage_source = z182.object({
|
|
|
3981
4032
|
ac_magnitude: voltage.optional(),
|
|
3982
4033
|
ac_phase: rotation.optional()
|
|
3983
4034
|
}).describe("Defines an AC voltage source for simulation");
|
|
3984
|
-
var simulation_voltage_source =
|
|
4035
|
+
var simulation_voltage_source = z185.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3985
4036
|
expectTypesMatch(true);
|
|
3986
4037
|
expectTypesMatch(true);
|
|
3987
4038
|
expectTypesMatch(true);
|
|
3988
4039
|
|
|
3989
4040
|
// src/simulation/simulation_current_source.ts
|
|
3990
|
-
import { z as
|
|
3991
|
-
var percentage2 =
|
|
4041
|
+
import { z as z186 } from "zod";
|
|
4042
|
+
var percentage2 = z186.union([z186.string(), z186.number()]).transform((val) => {
|
|
3992
4043
|
if (typeof val === "string") {
|
|
3993
4044
|
if (val.endsWith("%")) {
|
|
3994
4045
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3997,32 +4048,32 @@ var percentage2 = z183.union([z183.string(), z183.number()]).transform((val) =>
|
|
|
3997
4048
|
}
|
|
3998
4049
|
return val;
|
|
3999
4050
|
}).pipe(
|
|
4000
|
-
|
|
4051
|
+
z186.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4001
4052
|
);
|
|
4002
|
-
var simulation_dc_current_source =
|
|
4003
|
-
type:
|
|
4053
|
+
var simulation_dc_current_source = z186.object({
|
|
4054
|
+
type: z186.literal("simulation_current_source"),
|
|
4004
4055
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4005
4056
|
"simulation_current_source"
|
|
4006
4057
|
),
|
|
4007
|
-
is_dc_source:
|
|
4008
|
-
positive_source_port_id:
|
|
4009
|
-
negative_source_port_id:
|
|
4010
|
-
positive_source_net_id:
|
|
4011
|
-
negative_source_net_id:
|
|
4058
|
+
is_dc_source: z186.literal(true).optional().default(true),
|
|
4059
|
+
positive_source_port_id: z186.string().optional(),
|
|
4060
|
+
negative_source_port_id: z186.string().optional(),
|
|
4061
|
+
positive_source_net_id: z186.string().optional(),
|
|
4062
|
+
negative_source_net_id: z186.string().optional(),
|
|
4012
4063
|
current,
|
|
4013
4064
|
ac_magnitude: current.optional(),
|
|
4014
4065
|
ac_phase: rotation.optional()
|
|
4015
4066
|
}).describe("Defines a DC current source for simulation");
|
|
4016
|
-
var simulation_ac_current_source =
|
|
4017
|
-
type:
|
|
4067
|
+
var simulation_ac_current_source = z186.object({
|
|
4068
|
+
type: z186.literal("simulation_current_source"),
|
|
4018
4069
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4019
4070
|
"simulation_current_source"
|
|
4020
4071
|
),
|
|
4021
|
-
is_dc_source:
|
|
4022
|
-
terminal1_source_port_id:
|
|
4023
|
-
terminal2_source_port_id:
|
|
4024
|
-
terminal1_source_net_id:
|
|
4025
|
-
terminal2_source_net_id:
|
|
4072
|
+
is_dc_source: z186.literal(false),
|
|
4073
|
+
terminal1_source_port_id: z186.string().optional(),
|
|
4074
|
+
terminal2_source_port_id: z186.string().optional(),
|
|
4075
|
+
terminal1_source_net_id: z186.string().optional(),
|
|
4076
|
+
terminal2_source_net_id: z186.string().optional(),
|
|
4026
4077
|
current: current.optional(),
|
|
4027
4078
|
frequency: frequency.optional(),
|
|
4028
4079
|
peak_to_peak_current: current.optional(),
|
|
@@ -4032,58 +4083,58 @@ var simulation_ac_current_source = z183.object({
|
|
|
4032
4083
|
ac_magnitude: current.optional(),
|
|
4033
4084
|
ac_phase: rotation.optional()
|
|
4034
4085
|
}).describe("Defines an AC current source for simulation");
|
|
4035
|
-
var simulation_current_source =
|
|
4086
|
+
var simulation_current_source = z186.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
4036
4087
|
expectTypesMatch(true);
|
|
4037
4088
|
expectTypesMatch(true);
|
|
4038
4089
|
expectTypesMatch(true);
|
|
4039
4090
|
|
|
4040
4091
|
// src/simulation/simulation_experiment.ts
|
|
4041
|
-
import { z as
|
|
4092
|
+
import { z as z188 } from "zod";
|
|
4042
4093
|
|
|
4043
4094
|
// src/simulation/simulation_units.ts
|
|
4044
|
-
import { z as
|
|
4045
|
-
var simulation_dc_sweep_unit =
|
|
4095
|
+
import { z as z187 } from "zod";
|
|
4096
|
+
var simulation_dc_sweep_unit = z187.custom(
|
|
4046
4097
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
4047
4098
|
);
|
|
4048
|
-
var simulation_parameter_unit =
|
|
4099
|
+
var simulation_parameter_unit = z187.custom(
|
|
4049
4100
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
4050
4101
|
);
|
|
4051
4102
|
|
|
4052
4103
|
// src/simulation/simulation_experiment.ts
|
|
4053
|
-
var experiment_type =
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4104
|
+
var experiment_type = z188.union([
|
|
4105
|
+
z188.literal("spice_dc_sweep"),
|
|
4106
|
+
z188.literal("spice_dc_operating_point"),
|
|
4107
|
+
z188.literal("spice_transient_analysis"),
|
|
4108
|
+
z188.literal("spice_ac_analysis")
|
|
4058
4109
|
]);
|
|
4059
|
-
var spice_simulation_options =
|
|
4060
|
-
method:
|
|
4061
|
-
reltol:
|
|
4062
|
-
abstol:
|
|
4063
|
-
vntol:
|
|
4110
|
+
var spice_simulation_options = z188.object({
|
|
4111
|
+
method: z188.enum(["trap", "gear"]).optional(),
|
|
4112
|
+
reltol: z188.union([z188.number(), z188.string()]).optional(),
|
|
4113
|
+
abstol: z188.union([z188.number(), z188.string()]).optional(),
|
|
4114
|
+
vntol: z188.union([z188.number(), z188.string()]).optional()
|
|
4064
4115
|
}).describe("SPICE solver options for a simulation experiment");
|
|
4065
|
-
var simulation_experiment =
|
|
4066
|
-
type:
|
|
4116
|
+
var simulation_experiment = z188.object({
|
|
4117
|
+
type: z188.literal("simulation_experiment"),
|
|
4067
4118
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
4068
4119
|
"simulation_experiment"
|
|
4069
4120
|
),
|
|
4070
|
-
name:
|
|
4121
|
+
name: z188.string(),
|
|
4071
4122
|
experiment_type,
|
|
4072
4123
|
time_per_step: duration_ms.optional(),
|
|
4073
4124
|
start_time_ms: ms.optional(),
|
|
4074
4125
|
end_time_ms: ms.optional(),
|
|
4075
4126
|
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:
|
|
4127
|
+
dc_sweep_voltage_source_id: z188.string().optional(),
|
|
4128
|
+
dc_sweep_current_source_id: z188.string().optional(),
|
|
4129
|
+
dc_sweep_start: z188.number().optional(),
|
|
4130
|
+
dc_sweep_stop: z188.number().optional(),
|
|
4131
|
+
dc_sweep_step: z188.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
4081
4132
|
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:
|
|
4133
|
+
ac_sweep_type: z188.enum(["linear", "decade", "octave"]).optional(),
|
|
4134
|
+
ac_samples_per_interval: z188.number().int().positive().optional(),
|
|
4135
|
+
ac_sample_count: z188.number().int().positive().optional(),
|
|
4136
|
+
ac_start_frequency_hz: z188.number().positive().optional(),
|
|
4137
|
+
ac_stop_frequency_hz: z188.number().positive().optional()
|
|
4087
4138
|
}).superRefine((experiment, context) => {
|
|
4088
4139
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
4089
4140
|
const requiredFields = [
|
|
@@ -4095,7 +4146,7 @@ var simulation_experiment = z185.object({
|
|
|
4095
4146
|
for (const field of requiredFields) {
|
|
4096
4147
|
if (experiment[field] === void 0) {
|
|
4097
4148
|
context.addIssue({
|
|
4098
|
-
code:
|
|
4149
|
+
code: z188.ZodIssueCode.custom,
|
|
4099
4150
|
path: [field],
|
|
4100
4151
|
message: `${field} is required for a DC sweep`
|
|
4101
4152
|
});
|
|
@@ -4105,7 +4156,7 @@ var simulation_experiment = z185.object({
|
|
|
4105
4156
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
4106
4157
|
if (hasVoltageSource === hasCurrentSource) {
|
|
4107
4158
|
context.addIssue({
|
|
4108
|
-
code:
|
|
4159
|
+
code: z188.ZodIssueCode.custom,
|
|
4109
4160
|
path: ["dc_sweep_voltage_source_id"],
|
|
4110
4161
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
4111
4162
|
});
|
|
@@ -4114,35 +4165,35 @@ var simulation_experiment = z185.object({
|
|
|
4114
4165
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
4115
4166
|
if (experiment.ac_sweep_type === void 0) {
|
|
4116
4167
|
context.addIssue({
|
|
4117
|
-
code:
|
|
4168
|
+
code: z188.ZodIssueCode.custom,
|
|
4118
4169
|
path: ["ac_sweep_type"],
|
|
4119
4170
|
message: "ac_sweep_type is required for an AC analysis"
|
|
4120
4171
|
});
|
|
4121
4172
|
}
|
|
4122
4173
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
4123
4174
|
context.addIssue({
|
|
4124
|
-
code:
|
|
4175
|
+
code: z188.ZodIssueCode.custom,
|
|
4125
4176
|
path: ["ac_start_frequency_hz"],
|
|
4126
4177
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
4127
4178
|
});
|
|
4128
4179
|
}
|
|
4129
4180
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
4130
4181
|
context.addIssue({
|
|
4131
|
-
code:
|
|
4182
|
+
code: z188.ZodIssueCode.custom,
|
|
4132
4183
|
path: ["ac_stop_frequency_hz"],
|
|
4133
4184
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
4134
4185
|
});
|
|
4135
4186
|
}
|
|
4136
4187
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
4137
4188
|
context.addIssue({
|
|
4138
|
-
code:
|
|
4189
|
+
code: z188.ZodIssueCode.custom,
|
|
4139
4190
|
path: ["ac_sample_count"],
|
|
4140
4191
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
4141
4192
|
});
|
|
4142
4193
|
}
|
|
4143
4194
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
4144
4195
|
context.addIssue({
|
|
4145
|
-
code:
|
|
4196
|
+
code: z188.ZodIssueCode.custom,
|
|
4146
4197
|
path: ["ac_samples_per_interval"],
|
|
4147
4198
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
4148
4199
|
});
|
|
@@ -4152,87 +4203,87 @@ var simulation_experiment = z185.object({
|
|
|
4152
4203
|
expectTypesMatch(true);
|
|
4153
4204
|
|
|
4154
4205
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4155
|
-
import { z as
|
|
4206
|
+
import { z as z190 } from "zod";
|
|
4156
4207
|
|
|
4157
4208
|
// 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:
|
|
4209
|
+
import { z as z189 } from "zod";
|
|
4210
|
+
var simulation_parameter_sweep_coordinate = z189.object({
|
|
4211
|
+
simulation_parameter_sweep_id: z189.string(),
|
|
4212
|
+
sweep_index: z189.number().int().nonnegative(),
|
|
4213
|
+
parameter_value: z189.number(),
|
|
4163
4214
|
parameter_unit: simulation_parameter_unit
|
|
4164
4215
|
});
|
|
4165
4216
|
expectTypesMatch(true);
|
|
4166
4217
|
|
|
4167
4218
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4168
|
-
var simulation_transient_voltage_graph =
|
|
4169
|
-
type:
|
|
4219
|
+
var simulation_transient_voltage_graph = z190.object({
|
|
4220
|
+
type: z190.literal("simulation_transient_voltage_graph"),
|
|
4170
4221
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4171
4222
|
"simulation_transient_voltage_graph"
|
|
4172
4223
|
),
|
|
4173
|
-
simulation_experiment_id:
|
|
4224
|
+
simulation_experiment_id: z190.string(),
|
|
4174
4225
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4175
|
-
timestamps_ms:
|
|
4176
|
-
voltage_levels:
|
|
4177
|
-
source_component_id:
|
|
4178
|
-
subcircuit_connectivity_map_key:
|
|
4226
|
+
timestamps_ms: z190.array(z190.number()).optional(),
|
|
4227
|
+
voltage_levels: z190.array(z190.number()),
|
|
4228
|
+
source_component_id: z190.string().optional(),
|
|
4229
|
+
subcircuit_connectivity_map_key: z190.string().optional(),
|
|
4179
4230
|
time_per_step: duration_ms,
|
|
4180
4231
|
start_time_ms: ms,
|
|
4181
4232
|
end_time_ms: ms,
|
|
4182
|
-
name:
|
|
4183
|
-
color:
|
|
4233
|
+
name: z190.string().optional(),
|
|
4234
|
+
color: z190.string().optional()
|
|
4184
4235
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4185
4236
|
expectTypesMatch(true);
|
|
4186
4237
|
|
|
4187
4238
|
// src/simulation/simulation_transient_current_graph.ts
|
|
4188
|
-
import { z as
|
|
4189
|
-
var simulation_transient_current_graph =
|
|
4190
|
-
type:
|
|
4239
|
+
import { z as z191 } from "zod";
|
|
4240
|
+
var simulation_transient_current_graph = z191.object({
|
|
4241
|
+
type: z191.literal("simulation_transient_current_graph"),
|
|
4191
4242
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4192
4243
|
"simulation_transient_current_graph"
|
|
4193
4244
|
),
|
|
4194
|
-
simulation_experiment_id:
|
|
4245
|
+
simulation_experiment_id: z191.string(),
|
|
4195
4246
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4196
|
-
timestamps_ms:
|
|
4197
|
-
current_levels:
|
|
4198
|
-
source_component_id:
|
|
4199
|
-
subcircuit_connectivity_map_key:
|
|
4247
|
+
timestamps_ms: z191.array(z191.number()).optional(),
|
|
4248
|
+
current_levels: z191.array(z191.number()),
|
|
4249
|
+
source_component_id: z191.string().optional(),
|
|
4250
|
+
subcircuit_connectivity_map_key: z191.string().optional(),
|
|
4200
4251
|
time_per_step: duration_ms,
|
|
4201
4252
|
start_time_ms: ms,
|
|
4202
4253
|
end_time_ms: ms,
|
|
4203
|
-
name:
|
|
4204
|
-
color:
|
|
4254
|
+
name: z191.string().optional(),
|
|
4255
|
+
color: z191.string().optional()
|
|
4205
4256
|
}).describe("Stores current measurements over time for a simulation");
|
|
4206
4257
|
expectTypesMatch(true);
|
|
4207
4258
|
|
|
4208
4259
|
// src/simulation/simulation_switch.ts
|
|
4209
|
-
import { z as
|
|
4210
|
-
var simulation_switch =
|
|
4211
|
-
type:
|
|
4260
|
+
import { z as z192 } from "zod";
|
|
4261
|
+
var simulation_switch = z192.object({
|
|
4262
|
+
type: z192.literal("simulation_switch"),
|
|
4212
4263
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4213
|
-
source_component_id:
|
|
4264
|
+
source_component_id: z192.string().optional(),
|
|
4214
4265
|
closes_at: ms.optional(),
|
|
4215
4266
|
opens_at: ms.optional(),
|
|
4216
|
-
starts_closed:
|
|
4267
|
+
starts_closed: z192.boolean().optional(),
|
|
4217
4268
|
switching_frequency: frequency.optional()
|
|
4218
4269
|
}).describe("Defines a switch for simulation timing control");
|
|
4219
4270
|
expectTypesMatch(true);
|
|
4220
4271
|
|
|
4221
4272
|
// src/simulation/simulation_voltage_probe.ts
|
|
4222
|
-
import { z as
|
|
4223
|
-
var simulation_voltage_probe =
|
|
4224
|
-
type:
|
|
4273
|
+
import { z as z193 } from "zod";
|
|
4274
|
+
var simulation_voltage_probe = z193.object({
|
|
4275
|
+
type: z193.literal("simulation_voltage_probe"),
|
|
4225
4276
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4226
4277
|
"simulation_voltage_probe"
|
|
4227
4278
|
),
|
|
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:
|
|
4279
|
+
source_component_id: z193.string().optional(),
|
|
4280
|
+
name: z193.string().optional(),
|
|
4281
|
+
signal_input_source_port_id: z193.string().optional(),
|
|
4282
|
+
signal_input_source_net_id: z193.string().optional(),
|
|
4283
|
+
reference_input_source_port_id: z193.string().optional(),
|
|
4284
|
+
reference_input_source_net_id: z193.string().optional(),
|
|
4285
|
+
subcircuit_id: z193.string().optional(),
|
|
4286
|
+
color: z193.string().optional()
|
|
4236
4287
|
}).describe(
|
|
4237
4288
|
"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
4289
|
).superRefine((data, ctx) => {
|
|
@@ -4242,20 +4293,20 @@ var simulation_voltage_probe = z190.object({
|
|
|
4242
4293
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4243
4294
|
if (has_ports && has_nets) {
|
|
4244
4295
|
ctx.addIssue({
|
|
4245
|
-
code:
|
|
4296
|
+
code: z193.ZodIssueCode.custom,
|
|
4246
4297
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4247
4298
|
});
|
|
4248
4299
|
} else if (has_ports) {
|
|
4249
4300
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4250
4301
|
ctx.addIssue({
|
|
4251
|
-
code:
|
|
4302
|
+
code: z193.ZodIssueCode.custom,
|
|
4252
4303
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4253
4304
|
});
|
|
4254
4305
|
}
|
|
4255
4306
|
} else if (has_nets) {
|
|
4256
4307
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4257
4308
|
ctx.addIssue({
|
|
4258
|
-
code:
|
|
4309
|
+
code: z193.ZodIssueCode.custom,
|
|
4259
4310
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4260
4311
|
});
|
|
4261
4312
|
}
|
|
@@ -4263,7 +4314,7 @@ var simulation_voltage_probe = z190.object({
|
|
|
4263
4314
|
} else {
|
|
4264
4315
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4265
4316
|
ctx.addIssue({
|
|
4266
|
-
code:
|
|
4317
|
+
code: z193.ZodIssueCode.custom,
|
|
4267
4318
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4268
4319
|
});
|
|
4269
4320
|
}
|
|
@@ -4272,20 +4323,20 @@ var simulation_voltage_probe = z190.object({
|
|
|
4272
4323
|
expectTypesMatch(true);
|
|
4273
4324
|
|
|
4274
4325
|
// src/simulation/simulation_current_probe.ts
|
|
4275
|
-
import { z as
|
|
4276
|
-
var simulation_current_probe =
|
|
4277
|
-
type:
|
|
4326
|
+
import { z as z194 } from "zod";
|
|
4327
|
+
var simulation_current_probe = z194.object({
|
|
4328
|
+
type: z194.literal("simulation_current_probe"),
|
|
4278
4329
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4279
4330
|
"simulation_current_probe"
|
|
4280
4331
|
),
|
|
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:
|
|
4332
|
+
source_component_id: z194.string().optional(),
|
|
4333
|
+
name: z194.string().optional(),
|
|
4334
|
+
positive_source_port_id: z194.string().optional(),
|
|
4335
|
+
negative_source_port_id: z194.string().optional(),
|
|
4336
|
+
positive_source_net_id: z194.string().optional(),
|
|
4337
|
+
negative_source_net_id: z194.string().optional(),
|
|
4338
|
+
subcircuit_id: z194.string().optional(),
|
|
4339
|
+
color: z194.string().optional()
|
|
4289
4340
|
}).describe(
|
|
4290
4341
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4291
4342
|
).superRefine((data, ctx) => {
|
|
@@ -4297,7 +4348,7 @@ var simulation_current_probe = z191.object({
|
|
|
4297
4348
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4298
4349
|
if (hasPorts && hasNets) {
|
|
4299
4350
|
ctx.addIssue({
|
|
4300
|
-
code:
|
|
4351
|
+
code: z194.ZodIssueCode.custom,
|
|
4301
4352
|
message: "Cannot mix port and net connections in a current probe."
|
|
4302
4353
|
});
|
|
4303
4354
|
return;
|
|
@@ -4305,7 +4356,7 @@ var simulation_current_probe = z191.object({
|
|
|
4305
4356
|
if (hasPorts) {
|
|
4306
4357
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4307
4358
|
ctx.addIssue({
|
|
4308
|
-
code:
|
|
4359
|
+
code: z194.ZodIssueCode.custom,
|
|
4309
4360
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4310
4361
|
});
|
|
4311
4362
|
}
|
|
@@ -4314,71 +4365,71 @@ var simulation_current_probe = z191.object({
|
|
|
4314
4365
|
if (hasNets) {
|
|
4315
4366
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4316
4367
|
ctx.addIssue({
|
|
4317
|
-
code:
|
|
4368
|
+
code: z194.ZodIssueCode.custom,
|
|
4318
4369
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4319
4370
|
});
|
|
4320
4371
|
}
|
|
4321
4372
|
return;
|
|
4322
4373
|
}
|
|
4323
4374
|
ctx.addIssue({
|
|
4324
|
-
code:
|
|
4375
|
+
code: z194.ZodIssueCode.custom,
|
|
4325
4376
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4326
4377
|
});
|
|
4327
4378
|
});
|
|
4328
4379
|
expectTypesMatch(true);
|
|
4329
4380
|
|
|
4330
4381
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4331
|
-
import { z as
|
|
4382
|
+
import { z as z195 } from "zod";
|
|
4332
4383
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4333
|
-
type:
|
|
4384
|
+
type: z195.literal("simulation_unknown_experiment_error"),
|
|
4334
4385
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4335
4386
|
"simulation_unknown_experiment_error"
|
|
4336
4387
|
),
|
|
4337
|
-
error_type:
|
|
4338
|
-
simulation_experiment_id:
|
|
4339
|
-
subcircuit_id:
|
|
4388
|
+
error_type: z195.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4389
|
+
simulation_experiment_id: z195.string().optional(),
|
|
4390
|
+
subcircuit_id: z195.string().optional()
|
|
4340
4391
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4341
4392
|
expectTypesMatch(true);
|
|
4342
4393
|
|
|
4343
4394
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4344
|
-
import { z as
|
|
4345
|
-
var simulation_parameter_type =
|
|
4395
|
+
import { z as z196 } from "zod";
|
|
4396
|
+
var simulation_parameter_type = z196.enum([
|
|
4346
4397
|
"resistance",
|
|
4347
4398
|
"capacitance",
|
|
4348
4399
|
"inductance",
|
|
4349
4400
|
"voltage",
|
|
4350
4401
|
"current"
|
|
4351
4402
|
]);
|
|
4352
|
-
var simulation_parameter_sweep_base =
|
|
4353
|
-
type:
|
|
4403
|
+
var simulation_parameter_sweep_base = z196.object({
|
|
4404
|
+
type: z196.literal("simulation_parameter_sweep"),
|
|
4354
4405
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4355
4406
|
"simulation_parameter_sweep"
|
|
4356
4407
|
),
|
|
4357
|
-
simulation_experiment_id:
|
|
4358
|
-
name:
|
|
4359
|
-
parameter_values:
|
|
4408
|
+
simulation_experiment_id: z196.string(),
|
|
4409
|
+
name: z196.string().optional(),
|
|
4410
|
+
parameter_values: z196.array(z196.number()).min(1),
|
|
4360
4411
|
parameter_unit: simulation_parameter_unit
|
|
4361
4412
|
});
|
|
4362
|
-
var simulation_parameter_sweep =
|
|
4413
|
+
var simulation_parameter_sweep = z196.discriminatedUnion("parameter_type", [
|
|
4363
4414
|
simulation_parameter_sweep_base.extend({
|
|
4364
|
-
parameter_type:
|
|
4365
|
-
resistor_source_component_id:
|
|
4415
|
+
parameter_type: z196.literal("resistance"),
|
|
4416
|
+
resistor_source_component_id: z196.string()
|
|
4366
4417
|
}),
|
|
4367
4418
|
simulation_parameter_sweep_base.extend({
|
|
4368
|
-
parameter_type:
|
|
4369
|
-
capacitor_source_component_id:
|
|
4419
|
+
parameter_type: z196.literal("capacitance"),
|
|
4420
|
+
capacitor_source_component_id: z196.string()
|
|
4370
4421
|
}),
|
|
4371
4422
|
simulation_parameter_sweep_base.extend({
|
|
4372
|
-
parameter_type:
|
|
4373
|
-
inductor_source_component_id:
|
|
4423
|
+
parameter_type: z196.literal("inductance"),
|
|
4424
|
+
inductor_source_component_id: z196.string()
|
|
4374
4425
|
}),
|
|
4375
4426
|
simulation_parameter_sweep_base.extend({
|
|
4376
|
-
parameter_type:
|
|
4377
|
-
source_net_id:
|
|
4427
|
+
parameter_type: z196.literal("voltage"),
|
|
4428
|
+
source_net_id: z196.string()
|
|
4378
4429
|
}),
|
|
4379
4430
|
simulation_parameter_sweep_base.extend({
|
|
4380
|
-
parameter_type:
|
|
4381
|
-
current_source_component_id:
|
|
4431
|
+
parameter_type: z196.literal("current"),
|
|
4432
|
+
current_source_component_id: z196.string()
|
|
4382
4433
|
})
|
|
4383
4434
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4384
4435
|
expectTypesMatch(
|
|
@@ -4386,52 +4437,52 @@ expectTypesMatch(
|
|
|
4386
4437
|
);
|
|
4387
4438
|
|
|
4388
4439
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4389
|
-
import { z as
|
|
4390
|
-
var simulation_dc_operating_point_voltage =
|
|
4391
|
-
type:
|
|
4440
|
+
import { z as z197 } from "zod";
|
|
4441
|
+
var simulation_dc_operating_point_voltage = z197.object({
|
|
4442
|
+
type: z197.literal("simulation_dc_operating_point_voltage"),
|
|
4392
4443
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4393
4444
|
"simulation_dc_operating_point_voltage"
|
|
4394
4445
|
),
|
|
4395
|
-
simulation_experiment_id:
|
|
4446
|
+
simulation_experiment_id: z197.string(),
|
|
4396
4447
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4397
|
-
simulation_voltage_probe_id:
|
|
4398
|
-
voltage:
|
|
4399
|
-
name:
|
|
4400
|
-
color:
|
|
4448
|
+
simulation_voltage_probe_id: z197.string(),
|
|
4449
|
+
voltage: z197.number(),
|
|
4450
|
+
name: z197.string().optional(),
|
|
4451
|
+
color: z197.string().optional()
|
|
4401
4452
|
});
|
|
4402
4453
|
expectTypesMatch(true);
|
|
4403
4454
|
|
|
4404
4455
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4405
|
-
import { z as
|
|
4406
|
-
var simulation_dc_operating_point_current =
|
|
4407
|
-
type:
|
|
4456
|
+
import { z as z198 } from "zod";
|
|
4457
|
+
var simulation_dc_operating_point_current = z198.object({
|
|
4458
|
+
type: z198.literal("simulation_dc_operating_point_current"),
|
|
4408
4459
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4409
4460
|
"simulation_dc_operating_point_current"
|
|
4410
4461
|
),
|
|
4411
|
-
simulation_experiment_id:
|
|
4462
|
+
simulation_experiment_id: z198.string(),
|
|
4412
4463
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4413
|
-
simulation_current_probe_id:
|
|
4414
|
-
current:
|
|
4415
|
-
name:
|
|
4416
|
-
color:
|
|
4464
|
+
simulation_current_probe_id: z198.string(),
|
|
4465
|
+
current: z198.number(),
|
|
4466
|
+
name: z198.string().optional(),
|
|
4467
|
+
color: z198.string().optional()
|
|
4417
4468
|
});
|
|
4418
4469
|
expectTypesMatch(true);
|
|
4419
4470
|
|
|
4420
4471
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4421
|
-
import { z as
|
|
4422
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4423
|
-
type:
|
|
4472
|
+
import { z as z199 } from "zod";
|
|
4473
|
+
var simulation_dc_sweep_voltage_graph = z199.object({
|
|
4474
|
+
type: z199.literal("simulation_dc_sweep_voltage_graph"),
|
|
4424
4475
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4425
4476
|
"simulation_dc_sweep_voltage_graph"
|
|
4426
4477
|
),
|
|
4427
|
-
simulation_experiment_id:
|
|
4478
|
+
simulation_experiment_id: z199.string(),
|
|
4428
4479
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4429
|
-
simulation_voltage_probe_id:
|
|
4430
|
-
sweep_values:
|
|
4480
|
+
simulation_voltage_probe_id: z199.string(),
|
|
4481
|
+
sweep_values: z199.array(z199.number()),
|
|
4431
4482
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4432
|
-
voltage_levels:
|
|
4433
|
-
name:
|
|
4434
|
-
color:
|
|
4483
|
+
voltage_levels: z199.array(z199.number()),
|
|
4484
|
+
name: z199.string().optional(),
|
|
4485
|
+
color: z199.string().optional()
|
|
4435
4486
|
}).refine(
|
|
4436
4487
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4437
4488
|
{
|
|
@@ -4441,20 +4492,20 @@ var simulation_dc_sweep_voltage_graph = z196.object({
|
|
|
4441
4492
|
expectTypesMatch(true);
|
|
4442
4493
|
|
|
4443
4494
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
4444
|
-
import { z as
|
|
4445
|
-
var simulation_dc_sweep_current_graph =
|
|
4446
|
-
type:
|
|
4495
|
+
import { z as z200 } from "zod";
|
|
4496
|
+
var simulation_dc_sweep_current_graph = z200.object({
|
|
4497
|
+
type: z200.literal("simulation_dc_sweep_current_graph"),
|
|
4447
4498
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4448
4499
|
"simulation_dc_sweep_current_graph"
|
|
4449
4500
|
),
|
|
4450
|
-
simulation_experiment_id:
|
|
4501
|
+
simulation_experiment_id: z200.string(),
|
|
4451
4502
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4452
|
-
simulation_current_probe_id:
|
|
4453
|
-
sweep_values:
|
|
4503
|
+
simulation_current_probe_id: z200.string(),
|
|
4504
|
+
sweep_values: z200.array(z200.number()),
|
|
4454
4505
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4455
|
-
current_levels:
|
|
4456
|
-
name:
|
|
4457
|
-
color:
|
|
4506
|
+
current_levels: z200.array(z200.number()),
|
|
4507
|
+
name: z200.string().optional(),
|
|
4508
|
+
color: z200.string().optional()
|
|
4458
4509
|
}).refine(
|
|
4459
4510
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4460
4511
|
{
|
|
@@ -4464,29 +4515,29 @@ var simulation_dc_sweep_current_graph = z197.object({
|
|
|
4464
4515
|
expectTypesMatch(true);
|
|
4465
4516
|
|
|
4466
4517
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4467
|
-
import { z as
|
|
4518
|
+
import { z as z202 } from "zod";
|
|
4468
4519
|
|
|
4469
4520
|
// src/simulation/simulation_complex_sample.ts
|
|
4470
|
-
import { z as
|
|
4471
|
-
var simulation_complex_sample =
|
|
4472
|
-
re:
|
|
4473
|
-
im:
|
|
4521
|
+
import { z as z201 } from "zod";
|
|
4522
|
+
var simulation_complex_sample = z201.object({
|
|
4523
|
+
re: z201.number(),
|
|
4524
|
+
im: z201.number()
|
|
4474
4525
|
});
|
|
4475
4526
|
expectTypesMatch(true);
|
|
4476
4527
|
|
|
4477
4528
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4478
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4479
|
-
type:
|
|
4529
|
+
var simulation_ac_sweep_voltage_graph = z202.object({
|
|
4530
|
+
type: z202.literal("simulation_ac_sweep_voltage_graph"),
|
|
4480
4531
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4481
4532
|
"simulation_ac_sweep_voltage_graph"
|
|
4482
4533
|
),
|
|
4483
|
-
simulation_experiment_id:
|
|
4534
|
+
simulation_experiment_id: z202.string(),
|
|
4484
4535
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4485
|
-
simulation_voltage_probe_id:
|
|
4486
|
-
frequencies_hz:
|
|
4487
|
-
complex_voltages:
|
|
4488
|
-
name:
|
|
4489
|
-
color:
|
|
4536
|
+
simulation_voltage_probe_id: z202.string(),
|
|
4537
|
+
frequencies_hz: z202.array(z202.number()),
|
|
4538
|
+
complex_voltages: z202.array(simulation_complex_sample),
|
|
4539
|
+
name: z202.string().optional(),
|
|
4540
|
+
color: z202.string().optional()
|
|
4490
4541
|
}).refine(
|
|
4491
4542
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4492
4543
|
{
|
|
@@ -4496,19 +4547,19 @@ var simulation_ac_sweep_voltage_graph = z199.object({
|
|
|
4496
4547
|
expectTypesMatch(true);
|
|
4497
4548
|
|
|
4498
4549
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
4499
|
-
import { z as
|
|
4500
|
-
var simulation_ac_sweep_current_graph =
|
|
4501
|
-
type:
|
|
4550
|
+
import { z as z203 } from "zod";
|
|
4551
|
+
var simulation_ac_sweep_current_graph = z203.object({
|
|
4552
|
+
type: z203.literal("simulation_ac_sweep_current_graph"),
|
|
4502
4553
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4503
4554
|
"simulation_ac_sweep_current_graph"
|
|
4504
4555
|
),
|
|
4505
|
-
simulation_experiment_id:
|
|
4556
|
+
simulation_experiment_id: z203.string(),
|
|
4506
4557
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4507
|
-
simulation_current_probe_id:
|
|
4508
|
-
frequencies_hz:
|
|
4509
|
-
complex_currents:
|
|
4510
|
-
name:
|
|
4511
|
-
color:
|
|
4558
|
+
simulation_current_probe_id: z203.string(),
|
|
4559
|
+
frequencies_hz: z203.array(z203.number()),
|
|
4560
|
+
complex_currents: z203.array(simulation_complex_sample),
|
|
4561
|
+
name: z203.string().optional(),
|
|
4562
|
+
color: z203.string().optional()
|
|
4512
4563
|
}).refine(
|
|
4513
4564
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4514
4565
|
{
|
|
@@ -4518,52 +4569,52 @@ var simulation_ac_sweep_current_graph = z200.object({
|
|
|
4518
4569
|
expectTypesMatch(true);
|
|
4519
4570
|
|
|
4520
4571
|
// src/simulation/simulation_op_amp.ts
|
|
4521
|
-
import { z as
|
|
4522
|
-
var simulation_op_amp =
|
|
4523
|
-
type:
|
|
4572
|
+
import { z as z204 } from "zod";
|
|
4573
|
+
var simulation_op_amp = z204.object({
|
|
4574
|
+
type: z204.literal("simulation_op_amp"),
|
|
4524
4575
|
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:
|
|
4576
|
+
source_component_id: z204.string().optional(),
|
|
4577
|
+
inverting_input_source_port_id: z204.string(),
|
|
4578
|
+
non_inverting_input_source_port_id: z204.string(),
|
|
4579
|
+
output_source_port_id: z204.string(),
|
|
4580
|
+
positive_supply_source_port_id: z204.string(),
|
|
4581
|
+
negative_supply_source_port_id: z204.string()
|
|
4531
4582
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4532
4583
|
expectTypesMatch(true);
|
|
4533
4584
|
|
|
4534
4585
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
4535
|
-
import { z as
|
|
4536
|
-
var simulation_spice_subcircuit =
|
|
4537
|
-
type:
|
|
4586
|
+
import { z as z205 } from "zod";
|
|
4587
|
+
var simulation_spice_subcircuit = z205.object({
|
|
4588
|
+
type: z205.literal("simulation_spice_subcircuit"),
|
|
4538
4589
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4539
4590
|
"simulation_spice_subcircuit"
|
|
4540
4591
|
),
|
|
4541
|
-
source_component_id:
|
|
4542
|
-
spice_pin_to_source_port_map:
|
|
4543
|
-
subcircuit_source:
|
|
4592
|
+
source_component_id: z205.string(),
|
|
4593
|
+
spice_pin_to_source_port_map: z205.record(z205.string(), z205.string()),
|
|
4594
|
+
subcircuit_source: z205.string()
|
|
4544
4595
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4545
4596
|
expectTypesMatch(
|
|
4546
4597
|
true
|
|
4547
4598
|
);
|
|
4548
4599
|
|
|
4549
4600
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
4550
|
-
import { z as
|
|
4601
|
+
import { z as z206 } from "zod";
|
|
4551
4602
|
var hasValue = (value) => value !== void 0;
|
|
4552
|
-
var simulation_oscilloscope_trace =
|
|
4553
|
-
type:
|
|
4603
|
+
var simulation_oscilloscope_trace = z206.object({
|
|
4604
|
+
type: z206.literal("simulation_oscilloscope_trace"),
|
|
4554
4605
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4555
4606
|
"simulation_oscilloscope_trace"
|
|
4556
4607
|
),
|
|
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:
|
|
4608
|
+
simulation_transient_voltage_graph_id: z206.string().optional(),
|
|
4609
|
+
simulation_transient_current_graph_id: z206.string().optional(),
|
|
4610
|
+
simulation_voltage_probe_id: z206.string().optional(),
|
|
4611
|
+
simulation_current_probe_id: z206.string().optional(),
|
|
4612
|
+
display_name: z206.string().optional(),
|
|
4613
|
+
color: z206.string().optional(),
|
|
4614
|
+
display_center_value: z206.number().optional(),
|
|
4615
|
+
display_center_offset_divs: z206.number().optional(),
|
|
4616
|
+
volts_per_div: z206.number().positive().optional(),
|
|
4617
|
+
amps_per_div: z206.number().positive().optional()
|
|
4567
4618
|
}).describe(
|
|
4568
4619
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4569
4620
|
).superRefine((data, ctx) => {
|
|
@@ -4577,19 +4628,19 @@ var simulation_oscilloscope_trace = z203.object({
|
|
|
4577
4628
|
].filter(hasValue).length;
|
|
4578
4629
|
if (voltageReferences + currentReferences !== 1) {
|
|
4579
4630
|
ctx.addIssue({
|
|
4580
|
-
code:
|
|
4631
|
+
code: z206.ZodIssueCode.custom,
|
|
4581
4632
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4582
4633
|
});
|
|
4583
4634
|
}
|
|
4584
4635
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4585
4636
|
ctx.addIssue({
|
|
4586
|
-
code:
|
|
4637
|
+
code: z206.ZodIssueCode.custom,
|
|
4587
4638
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4588
4639
|
});
|
|
4589
4640
|
}
|
|
4590
4641
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4591
4642
|
ctx.addIssue({
|
|
4592
|
-
code:
|
|
4643
|
+
code: z206.ZodIssueCode.custom,
|
|
4593
4644
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4594
4645
|
});
|
|
4595
4646
|
}
|
|
@@ -4597,9 +4648,10 @@ var simulation_oscilloscope_trace = z203.object({
|
|
|
4597
4648
|
expectTypesMatch(true);
|
|
4598
4649
|
|
|
4599
4650
|
// src/any_circuit_element.ts
|
|
4600
|
-
import { z as
|
|
4601
|
-
var any_circuit_element =
|
|
4651
|
+
import { z as z207 } from "zod";
|
|
4652
|
+
var any_circuit_element = z207.union([
|
|
4602
4653
|
source_trace,
|
|
4654
|
+
source_bus,
|
|
4603
4655
|
source_port,
|
|
4604
4656
|
source_component_internal_connection,
|
|
4605
4657
|
any_source_component,
|
|
@@ -4662,6 +4714,8 @@ var any_circuit_element = z204.union([
|
|
|
4662
4714
|
pcb_trace,
|
|
4663
4715
|
pcb_trace_warning,
|
|
4664
4716
|
pcb_trace_too_long_warning,
|
|
4717
|
+
pcb_trace_too_long_error,
|
|
4718
|
+
pcb_bus_length_skew_error,
|
|
4665
4719
|
pcb_trace_too_many_vias_warning,
|
|
4666
4720
|
pcb_via,
|
|
4667
4721
|
pcb_smtpad,
|
|
@@ -4820,6 +4874,7 @@ export {
|
|
|
4820
4874
|
pcb_autorouting_error,
|
|
4821
4875
|
pcb_board,
|
|
4822
4876
|
pcb_breakout_point,
|
|
4877
|
+
pcb_bus_length_skew_error,
|
|
4823
4878
|
pcb_component,
|
|
4824
4879
|
pcb_component_invalid_layer_error,
|
|
4825
4880
|
pcb_component_missing_courtyard_warning,
|
|
@@ -4909,6 +4964,7 @@ export {
|
|
|
4909
4964
|
pcb_trace_route_point_through_pad,
|
|
4910
4965
|
pcb_trace_route_point_via,
|
|
4911
4966
|
pcb_trace_route_point_wire,
|
|
4967
|
+
pcb_trace_too_long_error,
|
|
4912
4968
|
pcb_trace_too_long_warning,
|
|
4913
4969
|
pcb_trace_too_many_vias_warning,
|
|
4914
4970
|
pcb_trace_warning,
|
|
@@ -4991,6 +5047,7 @@ export {
|
|
|
4991
5047
|
size,
|
|
4992
5048
|
source_ambiguous_port_reference,
|
|
4993
5049
|
source_board,
|
|
5050
|
+
source_bus,
|
|
4994
5051
|
source_component_base,
|
|
4995
5052
|
source_component_internal_connection,
|
|
4996
5053
|
source_component_misconfigured_error,
|