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