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