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