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