circuit-json 0.0.451 → 0.0.452
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -0
- package/dist/index.d.mts +76 -1
- package/dist/index.mjs +1122 -1104
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1513,124 +1513,140 @@ var schematic_manual_edit_conflict_warning = z89.object({
|
|
|
1513
1513
|
);
|
|
1514
1514
|
expectTypesMatch(true);
|
|
1515
1515
|
|
|
1516
|
-
// src/schematic/
|
|
1516
|
+
// src/schematic/schematic_component_overlap_warning.ts
|
|
1517
1517
|
import { z as z90 } from "zod";
|
|
1518
|
-
var
|
|
1519
|
-
type: z90.literal("
|
|
1518
|
+
var schematic_component_overlap_warning = z90.object({
|
|
1519
|
+
type: z90.literal("schematic_component_overlap_warning"),
|
|
1520
|
+
schematic_component_overlap_warning_id: getZodPrefixedIdWithDefault(
|
|
1521
|
+
"schematic_component_overlap_warning"
|
|
1522
|
+
),
|
|
1523
|
+
warning_type: z90.literal("schematic_component_overlap_warning").default("schematic_component_overlap_warning"),
|
|
1524
|
+
message: z90.string(),
|
|
1525
|
+
schematic_component_ids: z90.tuple([z90.string(), z90.string()]),
|
|
1526
|
+
schematic_sheet_id: z90.string().optional()
|
|
1527
|
+
}).describe(
|
|
1528
|
+
"Warning emitted when the rendered bounds of two schematic components overlap"
|
|
1529
|
+
);
|
|
1530
|
+
expectTypesMatch(true);
|
|
1531
|
+
|
|
1532
|
+
// src/schematic/schematic_group.ts
|
|
1533
|
+
import { z as z91 } from "zod";
|
|
1534
|
+
var schematic_group = z91.object({
|
|
1535
|
+
type: z91.literal("schematic_group"),
|
|
1520
1536
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1521
|
-
schematic_sheet_id:
|
|
1522
|
-
source_group_id:
|
|
1523
|
-
is_subcircuit:
|
|
1524
|
-
subcircuit_id:
|
|
1537
|
+
schematic_sheet_id: z91.string().optional(),
|
|
1538
|
+
source_group_id: z91.string(),
|
|
1539
|
+
is_subcircuit: z91.boolean().optional(),
|
|
1540
|
+
subcircuit_id: z91.string().optional(),
|
|
1525
1541
|
width: length,
|
|
1526
1542
|
height: length,
|
|
1527
1543
|
center: point,
|
|
1528
|
-
schematic_component_ids:
|
|
1529
|
-
show_as_schematic_box:
|
|
1530
|
-
name:
|
|
1531
|
-
description:
|
|
1544
|
+
schematic_component_ids: z91.array(z91.string()),
|
|
1545
|
+
show_as_schematic_box: z91.boolean().optional(),
|
|
1546
|
+
name: z91.string().optional(),
|
|
1547
|
+
description: z91.string().optional()
|
|
1532
1548
|
}).describe("Defines a group of components on the schematic");
|
|
1533
1549
|
expectTypesMatch(true);
|
|
1534
1550
|
|
|
1535
1551
|
// src/schematic/schematic_table.ts
|
|
1536
|
-
import { z as
|
|
1537
|
-
var schematic_table =
|
|
1538
|
-
type:
|
|
1552
|
+
import { z as z92 } from "zod";
|
|
1553
|
+
var schematic_table = z92.object({
|
|
1554
|
+
type: z92.literal("schematic_table"),
|
|
1539
1555
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1540
|
-
schematic_sheet_id:
|
|
1556
|
+
schematic_sheet_id: z92.string().optional(),
|
|
1541
1557
|
anchor_position: point,
|
|
1542
|
-
column_widths:
|
|
1543
|
-
row_heights:
|
|
1558
|
+
column_widths: z92.array(distance),
|
|
1559
|
+
row_heights: z92.array(distance),
|
|
1544
1560
|
cell_padding: distance.optional(),
|
|
1545
1561
|
border_width: distance.optional(),
|
|
1546
|
-
subcircuit_id:
|
|
1547
|
-
schematic_component_id:
|
|
1562
|
+
subcircuit_id: z92.string().optional(),
|
|
1563
|
+
schematic_component_id: z92.string().optional(),
|
|
1548
1564
|
anchor: ninePointAnchor.optional()
|
|
1549
1565
|
}).describe("Defines a table on the schematic");
|
|
1550
1566
|
expectTypesMatch(true);
|
|
1551
1567
|
|
|
1552
1568
|
// src/schematic/schematic_table_cell.ts
|
|
1553
|
-
import { z as
|
|
1554
|
-
var schematic_table_cell =
|
|
1555
|
-
type:
|
|
1569
|
+
import { z as z93 } from "zod";
|
|
1570
|
+
var schematic_table_cell = z93.object({
|
|
1571
|
+
type: z93.literal("schematic_table_cell"),
|
|
1556
1572
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1557
1573
|
"schematic_table_cell"
|
|
1558
1574
|
),
|
|
1559
|
-
schematic_sheet_id:
|
|
1560
|
-
schematic_table_id:
|
|
1561
|
-
start_row_index:
|
|
1562
|
-
end_row_index:
|
|
1563
|
-
start_column_index:
|
|
1564
|
-
end_column_index:
|
|
1565
|
-
text:
|
|
1575
|
+
schematic_sheet_id: z93.string().optional(),
|
|
1576
|
+
schematic_table_id: z93.string(),
|
|
1577
|
+
start_row_index: z93.number(),
|
|
1578
|
+
end_row_index: z93.number(),
|
|
1579
|
+
start_column_index: z93.number(),
|
|
1580
|
+
end_column_index: z93.number(),
|
|
1581
|
+
text: z93.string().optional(),
|
|
1566
1582
|
center: point,
|
|
1567
1583
|
width: distance,
|
|
1568
1584
|
height: distance,
|
|
1569
|
-
horizontal_align:
|
|
1570
|
-
vertical_align:
|
|
1585
|
+
horizontal_align: z93.enum(["left", "center", "right"]).optional(),
|
|
1586
|
+
vertical_align: z93.enum(["top", "middle", "bottom"]).optional(),
|
|
1571
1587
|
font_size: distance.optional(),
|
|
1572
|
-
subcircuit_id:
|
|
1588
|
+
subcircuit_id: z93.string().optional()
|
|
1573
1589
|
}).describe("Defines a cell within a schematic_table");
|
|
1574
1590
|
expectTypesMatch(true);
|
|
1575
1591
|
|
|
1576
1592
|
// src/schematic/schematic_sheet.ts
|
|
1577
|
-
import { z as
|
|
1578
|
-
var schematic_sheet =
|
|
1579
|
-
type:
|
|
1593
|
+
import { z as z94 } from "zod";
|
|
1594
|
+
var schematic_sheet = z94.object({
|
|
1595
|
+
type: z94.literal("schematic_sheet"),
|
|
1580
1596
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1581
|
-
name:
|
|
1582
|
-
sheet_index:
|
|
1583
|
-
subcircuit_id:
|
|
1584
|
-
outline_color:
|
|
1597
|
+
name: z94.string().optional(),
|
|
1598
|
+
sheet_index: z94.number().optional(),
|
|
1599
|
+
subcircuit_id: z94.string().optional(),
|
|
1600
|
+
outline_color: z94.string().optional()
|
|
1585
1601
|
}).describe(
|
|
1586
1602
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1587
1603
|
);
|
|
1588
1604
|
expectTypesMatch(true);
|
|
1589
1605
|
|
|
1590
1606
|
// src/pcb/properties/brep.ts
|
|
1591
|
-
import { z as
|
|
1592
|
-
var point_with_bulge =
|
|
1607
|
+
import { z as z95 } from "zod";
|
|
1608
|
+
var point_with_bulge = z95.object({
|
|
1593
1609
|
x: distance,
|
|
1594
1610
|
y: distance,
|
|
1595
|
-
bulge:
|
|
1611
|
+
bulge: z95.number().optional()
|
|
1596
1612
|
});
|
|
1597
1613
|
expectTypesMatch(true);
|
|
1598
|
-
var ring =
|
|
1599
|
-
vertices:
|
|
1614
|
+
var ring = z95.object({
|
|
1615
|
+
vertices: z95.array(point_with_bulge)
|
|
1600
1616
|
});
|
|
1601
1617
|
expectTypesMatch(true);
|
|
1602
|
-
var brep_shape =
|
|
1618
|
+
var brep_shape = z95.object({
|
|
1603
1619
|
outer_ring: ring,
|
|
1604
|
-
inner_rings:
|
|
1620
|
+
inner_rings: z95.array(ring).default([])
|
|
1605
1621
|
});
|
|
1606
1622
|
expectTypesMatch(true);
|
|
1607
1623
|
|
|
1608
1624
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1609
|
-
import { z as
|
|
1610
|
-
var pcb_route_hint =
|
|
1625
|
+
import { z as z96 } from "zod";
|
|
1626
|
+
var pcb_route_hint = z96.object({
|
|
1611
1627
|
x: distance,
|
|
1612
1628
|
y: distance,
|
|
1613
|
-
via:
|
|
1629
|
+
via: z96.boolean().optional(),
|
|
1614
1630
|
via_to_layer: layer_ref.optional()
|
|
1615
1631
|
});
|
|
1616
|
-
var pcb_route_hints =
|
|
1632
|
+
var pcb_route_hints = z96.array(pcb_route_hint);
|
|
1617
1633
|
expectTypesMatch(true);
|
|
1618
1634
|
expectTypesMatch(true);
|
|
1619
1635
|
|
|
1620
1636
|
// src/pcb/properties/route_hint_point.ts
|
|
1621
|
-
import { z as
|
|
1622
|
-
var route_hint_point =
|
|
1637
|
+
import { z as z97 } from "zod";
|
|
1638
|
+
var route_hint_point = z97.object({
|
|
1623
1639
|
x: distance,
|
|
1624
1640
|
y: distance,
|
|
1625
|
-
via:
|
|
1641
|
+
via: z97.boolean().optional(),
|
|
1626
1642
|
to_layer: layer_ref.optional(),
|
|
1627
1643
|
trace_width: distance.optional()
|
|
1628
1644
|
});
|
|
1629
1645
|
expectTypesMatch(true);
|
|
1630
1646
|
|
|
1631
1647
|
// src/pcb/properties/manufacturing_drc_properties.ts
|
|
1632
|
-
import { z as
|
|
1633
|
-
var manufacturing_drc_properties =
|
|
1648
|
+
import { z as z98 } from "zod";
|
|
1649
|
+
var manufacturing_drc_properties = z98.object({
|
|
1634
1650
|
min_trace_width: length.optional(),
|
|
1635
1651
|
min_board_edge_clearance: length.optional(),
|
|
1636
1652
|
min_via_hole_edge_to_via_hole_edge_clearance: length.optional(),
|
|
@@ -1645,27 +1661,27 @@ var manufacturing_drc_properties = z97.object({
|
|
|
1645
1661
|
});
|
|
1646
1662
|
|
|
1647
1663
|
// src/pcb/pcb_component.ts
|
|
1648
|
-
import { z as
|
|
1649
|
-
var pcb_component =
|
|
1650
|
-
type:
|
|
1664
|
+
import { z as z99 } from "zod";
|
|
1665
|
+
var pcb_component = z99.object({
|
|
1666
|
+
type: z99.literal("pcb_component"),
|
|
1651
1667
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1652
|
-
source_component_id:
|
|
1668
|
+
source_component_id: z99.string(),
|
|
1653
1669
|
center: point,
|
|
1654
1670
|
layer: layer_ref,
|
|
1655
1671
|
rotation,
|
|
1656
|
-
display_offset_x:
|
|
1672
|
+
display_offset_x: z99.string().optional().describe(
|
|
1657
1673
|
"How to display the x offset for this part, usually corresponding with how the user specified it"
|
|
1658
1674
|
),
|
|
1659
|
-
display_offset_y:
|
|
1675
|
+
display_offset_y: z99.string().optional().describe(
|
|
1660
1676
|
"How to display the y offset for this part, usually corresponding with how the user specified it"
|
|
1661
1677
|
),
|
|
1662
1678
|
width: length,
|
|
1663
1679
|
height: length,
|
|
1664
|
-
do_not_place:
|
|
1665
|
-
is_allowed_to_be_off_board:
|
|
1666
|
-
subcircuit_id:
|
|
1667
|
-
pcb_group_id:
|
|
1668
|
-
position_mode:
|
|
1680
|
+
do_not_place: z99.boolean().optional(),
|
|
1681
|
+
is_allowed_to_be_off_board: z99.boolean().optional(),
|
|
1682
|
+
subcircuit_id: z99.string().optional(),
|
|
1683
|
+
pcb_group_id: z99.string().optional(),
|
|
1684
|
+
position_mode: z99.enum([
|
|
1669
1685
|
"packed",
|
|
1670
1686
|
"relative_to_group_anchor",
|
|
1671
1687
|
"relative_to_another_component",
|
|
@@ -1673,129 +1689,129 @@ var pcb_component = z98.object({
|
|
|
1673
1689
|
]).optional(),
|
|
1674
1690
|
anchor_position: point.optional(),
|
|
1675
1691
|
anchor_alignment: ninePointAnchor.optional(),
|
|
1676
|
-
positioned_relative_to_pcb_group_id:
|
|
1677
|
-
positioned_relative_to_pcb_board_id:
|
|
1692
|
+
positioned_relative_to_pcb_group_id: z99.string().optional(),
|
|
1693
|
+
positioned_relative_to_pcb_board_id: z99.string().optional(),
|
|
1678
1694
|
cable_insertion_center: point.optional(),
|
|
1679
|
-
insertion_direction:
|
|
1695
|
+
insertion_direction: z99.enum([
|
|
1680
1696
|
"from_above",
|
|
1681
1697
|
"from_left",
|
|
1682
1698
|
"from_right",
|
|
1683
1699
|
"from_front",
|
|
1684
1700
|
"from_back"
|
|
1685
1701
|
]).optional(),
|
|
1686
|
-
metadata:
|
|
1702
|
+
metadata: z99.object({
|
|
1687
1703
|
kicad_footprint: kicadFootprintMetadata.optional()
|
|
1688
1704
|
}).optional(),
|
|
1689
|
-
obstructs_within_bounds:
|
|
1705
|
+
obstructs_within_bounds: z99.boolean().default(true).describe(
|
|
1690
1706
|
"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"
|
|
1691
1707
|
)
|
|
1692
1708
|
}).describe("Defines a component on the PCB");
|
|
1693
1709
|
expectTypesMatch(true);
|
|
1694
1710
|
|
|
1695
1711
|
// src/pcb/pcb_hole.ts
|
|
1696
|
-
import { z as
|
|
1697
|
-
var pcb_hole_circle =
|
|
1698
|
-
type:
|
|
1712
|
+
import { z as z100 } from "zod";
|
|
1713
|
+
var pcb_hole_circle = z100.object({
|
|
1714
|
+
type: z100.literal("pcb_hole"),
|
|
1699
1715
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1700
|
-
pcb_group_id:
|
|
1701
|
-
subcircuit_id:
|
|
1702
|
-
pcb_component_id:
|
|
1703
|
-
hole_shape:
|
|
1704
|
-
hole_diameter:
|
|
1716
|
+
pcb_group_id: z100.string().optional(),
|
|
1717
|
+
subcircuit_id: z100.string().optional(),
|
|
1718
|
+
pcb_component_id: z100.string().optional(),
|
|
1719
|
+
hole_shape: z100.literal("circle"),
|
|
1720
|
+
hole_diameter: z100.number(),
|
|
1705
1721
|
x: distance,
|
|
1706
1722
|
y: distance,
|
|
1707
|
-
is_covered_with_solder_mask:
|
|
1708
|
-
soldermask_margin:
|
|
1723
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1724
|
+
soldermask_margin: z100.number().optional()
|
|
1709
1725
|
});
|
|
1710
1726
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1711
1727
|
"Defines a circular hole on the PCB"
|
|
1712
1728
|
);
|
|
1713
1729
|
expectTypesMatch(true);
|
|
1714
|
-
var pcb_hole_rect =
|
|
1715
|
-
type:
|
|
1730
|
+
var pcb_hole_rect = z100.object({
|
|
1731
|
+
type: z100.literal("pcb_hole"),
|
|
1716
1732
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1717
|
-
pcb_group_id:
|
|
1718
|
-
subcircuit_id:
|
|
1719
|
-
pcb_component_id:
|
|
1720
|
-
hole_shape:
|
|
1721
|
-
hole_width:
|
|
1722
|
-
hole_height:
|
|
1733
|
+
pcb_group_id: z100.string().optional(),
|
|
1734
|
+
subcircuit_id: z100.string().optional(),
|
|
1735
|
+
pcb_component_id: z100.string().optional(),
|
|
1736
|
+
hole_shape: z100.literal("rect"),
|
|
1737
|
+
hole_width: z100.number(),
|
|
1738
|
+
hole_height: z100.number(),
|
|
1723
1739
|
x: distance,
|
|
1724
1740
|
y: distance,
|
|
1725
|
-
is_covered_with_solder_mask:
|
|
1726
|
-
soldermask_margin:
|
|
1741
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1742
|
+
soldermask_margin: z100.number().optional()
|
|
1727
1743
|
});
|
|
1728
1744
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1729
1745
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1730
1746
|
);
|
|
1731
1747
|
expectTypesMatch(true);
|
|
1732
|
-
var pcb_hole_circle_or_square =
|
|
1733
|
-
type:
|
|
1748
|
+
var pcb_hole_circle_or_square = z100.object({
|
|
1749
|
+
type: z100.literal("pcb_hole"),
|
|
1734
1750
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1735
|
-
pcb_group_id:
|
|
1736
|
-
subcircuit_id:
|
|
1737
|
-
pcb_component_id:
|
|
1738
|
-
hole_shape:
|
|
1739
|
-
hole_diameter:
|
|
1751
|
+
pcb_group_id: z100.string().optional(),
|
|
1752
|
+
subcircuit_id: z100.string().optional(),
|
|
1753
|
+
pcb_component_id: z100.string().optional(),
|
|
1754
|
+
hole_shape: z100.enum(["circle", "square"]),
|
|
1755
|
+
hole_diameter: z100.number(),
|
|
1740
1756
|
x: distance,
|
|
1741
1757
|
y: distance,
|
|
1742
|
-
is_covered_with_solder_mask:
|
|
1743
|
-
soldermask_margin:
|
|
1758
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1759
|
+
soldermask_margin: z100.number().optional()
|
|
1744
1760
|
});
|
|
1745
1761
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1746
1762
|
"Defines a circular or square hole on the PCB"
|
|
1747
1763
|
);
|
|
1748
1764
|
expectTypesMatch(true);
|
|
1749
|
-
var pcb_hole_oval =
|
|
1750
|
-
type:
|
|
1765
|
+
var pcb_hole_oval = z100.object({
|
|
1766
|
+
type: z100.literal("pcb_hole"),
|
|
1751
1767
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1752
|
-
pcb_group_id:
|
|
1753
|
-
subcircuit_id:
|
|
1754
|
-
pcb_component_id:
|
|
1755
|
-
hole_shape:
|
|
1756
|
-
hole_width:
|
|
1757
|
-
hole_height:
|
|
1768
|
+
pcb_group_id: z100.string().optional(),
|
|
1769
|
+
subcircuit_id: z100.string().optional(),
|
|
1770
|
+
pcb_component_id: z100.string().optional(),
|
|
1771
|
+
hole_shape: z100.literal("oval"),
|
|
1772
|
+
hole_width: z100.number(),
|
|
1773
|
+
hole_height: z100.number(),
|
|
1758
1774
|
x: distance,
|
|
1759
1775
|
y: distance,
|
|
1760
|
-
is_covered_with_solder_mask:
|
|
1761
|
-
soldermask_margin:
|
|
1776
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1777
|
+
soldermask_margin: z100.number().optional()
|
|
1762
1778
|
});
|
|
1763
1779
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1764
1780
|
"Defines an oval hole on the PCB"
|
|
1765
1781
|
);
|
|
1766
1782
|
expectTypesMatch(true);
|
|
1767
|
-
var pcb_hole_pill =
|
|
1768
|
-
type:
|
|
1783
|
+
var pcb_hole_pill = z100.object({
|
|
1784
|
+
type: z100.literal("pcb_hole"),
|
|
1769
1785
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1770
|
-
pcb_group_id:
|
|
1771
|
-
subcircuit_id:
|
|
1772
|
-
pcb_component_id:
|
|
1773
|
-
hole_shape:
|
|
1774
|
-
hole_width:
|
|
1775
|
-
hole_height:
|
|
1786
|
+
pcb_group_id: z100.string().optional(),
|
|
1787
|
+
subcircuit_id: z100.string().optional(),
|
|
1788
|
+
pcb_component_id: z100.string().optional(),
|
|
1789
|
+
hole_shape: z100.literal("pill"),
|
|
1790
|
+
hole_width: z100.number(),
|
|
1791
|
+
hole_height: z100.number(),
|
|
1776
1792
|
x: distance,
|
|
1777
1793
|
y: distance,
|
|
1778
|
-
is_covered_with_solder_mask:
|
|
1779
|
-
soldermask_margin:
|
|
1794
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1795
|
+
soldermask_margin: z100.number().optional()
|
|
1780
1796
|
});
|
|
1781
1797
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
1782
1798
|
"Defines a pill-shaped hole on the PCB"
|
|
1783
1799
|
);
|
|
1784
1800
|
expectTypesMatch(true);
|
|
1785
|
-
var pcb_hole_rotated_pill =
|
|
1786
|
-
type:
|
|
1801
|
+
var pcb_hole_rotated_pill = z100.object({
|
|
1802
|
+
type: z100.literal("pcb_hole"),
|
|
1787
1803
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1788
|
-
pcb_group_id:
|
|
1789
|
-
subcircuit_id:
|
|
1790
|
-
pcb_component_id:
|
|
1791
|
-
hole_shape:
|
|
1792
|
-
hole_width:
|
|
1793
|
-
hole_height:
|
|
1804
|
+
pcb_group_id: z100.string().optional(),
|
|
1805
|
+
subcircuit_id: z100.string().optional(),
|
|
1806
|
+
pcb_component_id: z100.string().optional(),
|
|
1807
|
+
hole_shape: z100.literal("rotated_pill"),
|
|
1808
|
+
hole_width: z100.number(),
|
|
1809
|
+
hole_height: z100.number(),
|
|
1794
1810
|
x: distance,
|
|
1795
1811
|
y: distance,
|
|
1796
1812
|
ccw_rotation: rotation,
|
|
1797
|
-
is_covered_with_solder_mask:
|
|
1798
|
-
soldermask_margin:
|
|
1813
|
+
is_covered_with_solder_mask: z100.boolean().optional(),
|
|
1814
|
+
soldermask_margin: z100.number().optional()
|
|
1799
1815
|
});
|
|
1800
1816
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
1801
1817
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -1804,147 +1820,147 @@ expectTypesMatch(true);
|
|
|
1804
1820
|
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);
|
|
1805
1821
|
|
|
1806
1822
|
// src/pcb/pcb_plated_hole.ts
|
|
1807
|
-
import { z as
|
|
1808
|
-
var pcb_plated_hole_circle =
|
|
1809
|
-
type:
|
|
1810
|
-
shape:
|
|
1811
|
-
pcb_group_id:
|
|
1812
|
-
subcircuit_id:
|
|
1813
|
-
outer_diameter:
|
|
1814
|
-
hole_diameter:
|
|
1815
|
-
is_covered_with_solder_mask:
|
|
1823
|
+
import { z as z101 } from "zod";
|
|
1824
|
+
var pcb_plated_hole_circle = z101.object({
|
|
1825
|
+
type: z101.literal("pcb_plated_hole"),
|
|
1826
|
+
shape: z101.literal("circle"),
|
|
1827
|
+
pcb_group_id: z101.string().optional(),
|
|
1828
|
+
subcircuit_id: z101.string().optional(),
|
|
1829
|
+
outer_diameter: z101.number(),
|
|
1830
|
+
hole_diameter: z101.number(),
|
|
1831
|
+
is_covered_with_solder_mask: z101.boolean().optional(),
|
|
1816
1832
|
x: distance,
|
|
1817
1833
|
y: distance,
|
|
1818
|
-
layers:
|
|
1819
|
-
port_hints:
|
|
1820
|
-
pcb_component_id:
|
|
1821
|
-
pcb_port_id:
|
|
1834
|
+
layers: z101.array(layer_ref),
|
|
1835
|
+
port_hints: z101.array(z101.string()).optional(),
|
|
1836
|
+
pcb_component_id: z101.string().optional(),
|
|
1837
|
+
pcb_port_id: z101.string().optional(),
|
|
1822
1838
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1823
|
-
soldermask_margin:
|
|
1839
|
+
soldermask_margin: z101.number().optional()
|
|
1824
1840
|
});
|
|
1825
|
-
var pcb_plated_hole_oval =
|
|
1826
|
-
type:
|
|
1827
|
-
shape:
|
|
1828
|
-
pcb_group_id:
|
|
1829
|
-
subcircuit_id:
|
|
1830
|
-
outer_width:
|
|
1831
|
-
outer_height:
|
|
1832
|
-
hole_width:
|
|
1833
|
-
hole_height:
|
|
1834
|
-
is_covered_with_solder_mask:
|
|
1841
|
+
var pcb_plated_hole_oval = z101.object({
|
|
1842
|
+
type: z101.literal("pcb_plated_hole"),
|
|
1843
|
+
shape: z101.enum(["oval", "pill"]),
|
|
1844
|
+
pcb_group_id: z101.string().optional(),
|
|
1845
|
+
subcircuit_id: z101.string().optional(),
|
|
1846
|
+
outer_width: z101.number(),
|
|
1847
|
+
outer_height: z101.number(),
|
|
1848
|
+
hole_width: z101.number(),
|
|
1849
|
+
hole_height: z101.number(),
|
|
1850
|
+
is_covered_with_solder_mask: z101.boolean().optional(),
|
|
1835
1851
|
x: distance,
|
|
1836
1852
|
y: distance,
|
|
1837
1853
|
ccw_rotation: rotation,
|
|
1838
|
-
layers:
|
|
1839
|
-
port_hints:
|
|
1840
|
-
pcb_component_id:
|
|
1841
|
-
pcb_port_id:
|
|
1854
|
+
layers: z101.array(layer_ref),
|
|
1855
|
+
port_hints: z101.array(z101.string()).optional(),
|
|
1856
|
+
pcb_component_id: z101.string().optional(),
|
|
1857
|
+
pcb_port_id: z101.string().optional(),
|
|
1842
1858
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1843
|
-
soldermask_margin:
|
|
1859
|
+
soldermask_margin: z101.number().optional()
|
|
1844
1860
|
});
|
|
1845
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1846
|
-
type:
|
|
1847
|
-
shape:
|
|
1848
|
-
pcb_group_id:
|
|
1849
|
-
subcircuit_id:
|
|
1850
|
-
hole_shape:
|
|
1851
|
-
pad_shape:
|
|
1852
|
-
hole_diameter:
|
|
1853
|
-
rect_pad_width:
|
|
1854
|
-
rect_pad_height:
|
|
1855
|
-
rect_border_radius:
|
|
1861
|
+
var pcb_circular_hole_with_rect_pad = z101.object({
|
|
1862
|
+
type: z101.literal("pcb_plated_hole"),
|
|
1863
|
+
shape: z101.literal("circular_hole_with_rect_pad"),
|
|
1864
|
+
pcb_group_id: z101.string().optional(),
|
|
1865
|
+
subcircuit_id: z101.string().optional(),
|
|
1866
|
+
hole_shape: z101.literal("circle"),
|
|
1867
|
+
pad_shape: z101.literal("rect"),
|
|
1868
|
+
hole_diameter: z101.number(),
|
|
1869
|
+
rect_pad_width: z101.number(),
|
|
1870
|
+
rect_pad_height: z101.number(),
|
|
1871
|
+
rect_border_radius: z101.number().optional(),
|
|
1856
1872
|
hole_offset_x: distance.default(0),
|
|
1857
1873
|
hole_offset_y: distance.default(0),
|
|
1858
|
-
is_covered_with_solder_mask:
|
|
1874
|
+
is_covered_with_solder_mask: z101.boolean().optional(),
|
|
1859
1875
|
x: distance,
|
|
1860
1876
|
y: distance,
|
|
1861
|
-
layers:
|
|
1862
|
-
port_hints:
|
|
1863
|
-
pcb_component_id:
|
|
1864
|
-
pcb_port_id:
|
|
1877
|
+
layers: z101.array(layer_ref),
|
|
1878
|
+
port_hints: z101.array(z101.string()).optional(),
|
|
1879
|
+
pcb_component_id: z101.string().optional(),
|
|
1880
|
+
pcb_port_id: z101.string().optional(),
|
|
1865
1881
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1866
|
-
soldermask_margin:
|
|
1882
|
+
soldermask_margin: z101.number().optional(),
|
|
1867
1883
|
rect_ccw_rotation: rotation.optional()
|
|
1868
1884
|
});
|
|
1869
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1870
|
-
type:
|
|
1871
|
-
shape:
|
|
1872
|
-
pcb_group_id:
|
|
1873
|
-
subcircuit_id:
|
|
1874
|
-
hole_shape:
|
|
1875
|
-
pad_shape:
|
|
1876
|
-
hole_width:
|
|
1877
|
-
hole_height:
|
|
1878
|
-
rect_pad_width:
|
|
1879
|
-
rect_pad_height:
|
|
1880
|
-
rect_border_radius:
|
|
1885
|
+
var pcb_pill_hole_with_rect_pad = z101.object({
|
|
1886
|
+
type: z101.literal("pcb_plated_hole"),
|
|
1887
|
+
shape: z101.literal("pill_hole_with_rect_pad"),
|
|
1888
|
+
pcb_group_id: z101.string().optional(),
|
|
1889
|
+
subcircuit_id: z101.string().optional(),
|
|
1890
|
+
hole_shape: z101.literal("pill"),
|
|
1891
|
+
pad_shape: z101.literal("rect"),
|
|
1892
|
+
hole_width: z101.number(),
|
|
1893
|
+
hole_height: z101.number(),
|
|
1894
|
+
rect_pad_width: z101.number(),
|
|
1895
|
+
rect_pad_height: z101.number(),
|
|
1896
|
+
rect_border_radius: z101.number().optional(),
|
|
1881
1897
|
hole_offset_x: distance.default(0),
|
|
1882
1898
|
hole_offset_y: distance.default(0),
|
|
1883
|
-
is_covered_with_solder_mask:
|
|
1899
|
+
is_covered_with_solder_mask: z101.boolean().optional(),
|
|
1884
1900
|
x: distance,
|
|
1885
1901
|
y: distance,
|
|
1886
|
-
layers:
|
|
1887
|
-
port_hints:
|
|
1888
|
-
pcb_component_id:
|
|
1889
|
-
pcb_port_id:
|
|
1902
|
+
layers: z101.array(layer_ref),
|
|
1903
|
+
port_hints: z101.array(z101.string()).optional(),
|
|
1904
|
+
pcb_component_id: z101.string().optional(),
|
|
1905
|
+
pcb_port_id: z101.string().optional(),
|
|
1890
1906
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1891
|
-
soldermask_margin:
|
|
1907
|
+
soldermask_margin: z101.number().optional()
|
|
1892
1908
|
});
|
|
1893
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1894
|
-
type:
|
|
1895
|
-
shape:
|
|
1896
|
-
pcb_group_id:
|
|
1897
|
-
subcircuit_id:
|
|
1898
|
-
hole_shape:
|
|
1899
|
-
pad_shape:
|
|
1900
|
-
hole_width:
|
|
1901
|
-
hole_height:
|
|
1909
|
+
var pcb_rotated_pill_hole_with_rect_pad = z101.object({
|
|
1910
|
+
type: z101.literal("pcb_plated_hole"),
|
|
1911
|
+
shape: z101.literal("rotated_pill_hole_with_rect_pad"),
|
|
1912
|
+
pcb_group_id: z101.string().optional(),
|
|
1913
|
+
subcircuit_id: z101.string().optional(),
|
|
1914
|
+
hole_shape: z101.literal("rotated_pill"),
|
|
1915
|
+
pad_shape: z101.literal("rect"),
|
|
1916
|
+
hole_width: z101.number(),
|
|
1917
|
+
hole_height: z101.number(),
|
|
1902
1918
|
hole_ccw_rotation: rotation,
|
|
1903
|
-
rect_pad_width:
|
|
1904
|
-
rect_pad_height:
|
|
1905
|
-
rect_border_radius:
|
|
1919
|
+
rect_pad_width: z101.number(),
|
|
1920
|
+
rect_pad_height: z101.number(),
|
|
1921
|
+
rect_border_radius: z101.number().optional(),
|
|
1906
1922
|
rect_ccw_rotation: rotation,
|
|
1907
1923
|
hole_offset_x: distance.default(0),
|
|
1908
1924
|
hole_offset_y: distance.default(0),
|
|
1909
|
-
is_covered_with_solder_mask:
|
|
1925
|
+
is_covered_with_solder_mask: z101.boolean().optional(),
|
|
1910
1926
|
x: distance,
|
|
1911
1927
|
y: distance,
|
|
1912
|
-
layers:
|
|
1913
|
-
port_hints:
|
|
1914
|
-
pcb_component_id:
|
|
1915
|
-
pcb_port_id:
|
|
1928
|
+
layers: z101.array(layer_ref),
|
|
1929
|
+
port_hints: z101.array(z101.string()).optional(),
|
|
1930
|
+
pcb_component_id: z101.string().optional(),
|
|
1931
|
+
pcb_port_id: z101.string().optional(),
|
|
1916
1932
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1917
|
-
soldermask_margin:
|
|
1933
|
+
soldermask_margin: z101.number().optional()
|
|
1918
1934
|
});
|
|
1919
|
-
var pcb_hole_with_polygon_pad =
|
|
1920
|
-
type:
|
|
1921
|
-
shape:
|
|
1922
|
-
pcb_group_id:
|
|
1923
|
-
subcircuit_id:
|
|
1924
|
-
hole_shape:
|
|
1925
|
-
hole_diameter:
|
|
1926
|
-
hole_width:
|
|
1927
|
-
hole_height:
|
|
1928
|
-
pad_outline:
|
|
1929
|
-
|
|
1935
|
+
var pcb_hole_with_polygon_pad = z101.object({
|
|
1936
|
+
type: z101.literal("pcb_plated_hole"),
|
|
1937
|
+
shape: z101.literal("hole_with_polygon_pad"),
|
|
1938
|
+
pcb_group_id: z101.string().optional(),
|
|
1939
|
+
subcircuit_id: z101.string().optional(),
|
|
1940
|
+
hole_shape: z101.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
1941
|
+
hole_diameter: z101.number().optional(),
|
|
1942
|
+
hole_width: z101.number().optional(),
|
|
1943
|
+
hole_height: z101.number().optional(),
|
|
1944
|
+
pad_outline: z101.array(
|
|
1945
|
+
z101.object({
|
|
1930
1946
|
x: distance,
|
|
1931
1947
|
y: distance
|
|
1932
1948
|
})
|
|
1933
1949
|
).min(3),
|
|
1934
1950
|
hole_offset_x: distance.default(0),
|
|
1935
1951
|
hole_offset_y: distance.default(0),
|
|
1936
|
-
is_covered_with_solder_mask:
|
|
1952
|
+
is_covered_with_solder_mask: z101.boolean().optional(),
|
|
1937
1953
|
x: distance,
|
|
1938
1954
|
y: distance,
|
|
1939
|
-
layers:
|
|
1940
|
-
port_hints:
|
|
1941
|
-
pcb_component_id:
|
|
1942
|
-
pcb_port_id:
|
|
1955
|
+
layers: z101.array(layer_ref),
|
|
1956
|
+
port_hints: z101.array(z101.string()).optional(),
|
|
1957
|
+
pcb_component_id: z101.string().optional(),
|
|
1958
|
+
pcb_port_id: z101.string().optional(),
|
|
1943
1959
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1944
|
-
soldermask_margin:
|
|
1960
|
+
soldermask_margin: z101.number().optional(),
|
|
1945
1961
|
ccw_rotation: rotation.optional()
|
|
1946
1962
|
});
|
|
1947
|
-
var pcb_plated_hole =
|
|
1963
|
+
var pcb_plated_hole = z101.union([
|
|
1948
1964
|
pcb_plated_hole_circle,
|
|
1949
1965
|
pcb_plated_hole_oval,
|
|
1950
1966
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1962,138 +1978,138 @@ expectTypesMatch(true);
|
|
|
1962
1978
|
expectTypesMatch(true);
|
|
1963
1979
|
|
|
1964
1980
|
// src/pcb/pcb_port.ts
|
|
1965
|
-
import { z as
|
|
1966
|
-
var pcb_port =
|
|
1967
|
-
type:
|
|
1981
|
+
import { z as z102 } from "zod";
|
|
1982
|
+
var pcb_port = z102.object({
|
|
1983
|
+
type: z102.literal("pcb_port"),
|
|
1968
1984
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1969
|
-
pcb_group_id:
|
|
1970
|
-
subcircuit_id:
|
|
1971
|
-
source_port_id:
|
|
1972
|
-
pcb_component_id:
|
|
1985
|
+
pcb_group_id: z102.string().optional(),
|
|
1986
|
+
subcircuit_id: z102.string().optional(),
|
|
1987
|
+
source_port_id: z102.string(),
|
|
1988
|
+
pcb_component_id: z102.string().optional(),
|
|
1973
1989
|
x: distance,
|
|
1974
1990
|
y: distance,
|
|
1975
|
-
layers:
|
|
1976
|
-
is_board_pinout:
|
|
1991
|
+
layers: z102.array(layer_ref),
|
|
1992
|
+
is_board_pinout: z102.boolean().optional()
|
|
1977
1993
|
}).describe("Defines a port on the PCB");
|
|
1978
1994
|
expectTypesMatch(true);
|
|
1979
1995
|
|
|
1980
1996
|
// src/pcb/pcb_smtpad.ts
|
|
1981
|
-
import { z as
|
|
1982
|
-
var pcb_smtpad_circle =
|
|
1983
|
-
type:
|
|
1984
|
-
shape:
|
|
1997
|
+
import { z as z103 } from "zod";
|
|
1998
|
+
var pcb_smtpad_circle = z103.object({
|
|
1999
|
+
type: z103.literal("pcb_smtpad"),
|
|
2000
|
+
shape: z103.literal("circle"),
|
|
1985
2001
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1986
|
-
pcb_group_id:
|
|
1987
|
-
subcircuit_id:
|
|
2002
|
+
pcb_group_id: z103.string().optional(),
|
|
2003
|
+
subcircuit_id: z103.string().optional(),
|
|
1988
2004
|
x: distance,
|
|
1989
2005
|
y: distance,
|
|
1990
|
-
radius:
|
|
2006
|
+
radius: z103.number(),
|
|
1991
2007
|
layer: layer_ref,
|
|
1992
|
-
port_hints:
|
|
1993
|
-
pcb_component_id:
|
|
1994
|
-
pcb_port_id:
|
|
1995
|
-
is_covered_with_solder_mask:
|
|
1996
|
-
soldermask_margin:
|
|
2008
|
+
port_hints: z103.array(z103.string()).optional(),
|
|
2009
|
+
pcb_component_id: z103.string().optional(),
|
|
2010
|
+
pcb_port_id: z103.string().optional(),
|
|
2011
|
+
is_covered_with_solder_mask: z103.boolean().optional(),
|
|
2012
|
+
soldermask_margin: z103.number().optional()
|
|
1997
2013
|
});
|
|
1998
|
-
var pcb_smtpad_rect =
|
|
1999
|
-
type:
|
|
2000
|
-
shape:
|
|
2014
|
+
var pcb_smtpad_rect = z103.object({
|
|
2015
|
+
type: z103.literal("pcb_smtpad"),
|
|
2016
|
+
shape: z103.literal("rect"),
|
|
2001
2017
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2002
|
-
pcb_group_id:
|
|
2003
|
-
subcircuit_id:
|
|
2018
|
+
pcb_group_id: z103.string().optional(),
|
|
2019
|
+
subcircuit_id: z103.string().optional(),
|
|
2004
2020
|
x: distance,
|
|
2005
2021
|
y: distance,
|
|
2006
|
-
width:
|
|
2007
|
-
height:
|
|
2008
|
-
rect_border_radius:
|
|
2009
|
-
corner_radius:
|
|
2022
|
+
width: z103.number(),
|
|
2023
|
+
height: z103.number(),
|
|
2024
|
+
rect_border_radius: z103.number().optional(),
|
|
2025
|
+
corner_radius: z103.number().optional(),
|
|
2010
2026
|
layer: layer_ref,
|
|
2011
|
-
port_hints:
|
|
2012
|
-
pcb_component_id:
|
|
2013
|
-
pcb_port_id:
|
|
2014
|
-
is_covered_with_solder_mask:
|
|
2015
|
-
soldermask_margin:
|
|
2016
|
-
soldermask_margin_left:
|
|
2017
|
-
soldermask_margin_top:
|
|
2018
|
-
soldermask_margin_right:
|
|
2019
|
-
soldermask_margin_bottom:
|
|
2027
|
+
port_hints: z103.array(z103.string()).optional(),
|
|
2028
|
+
pcb_component_id: z103.string().optional(),
|
|
2029
|
+
pcb_port_id: z103.string().optional(),
|
|
2030
|
+
is_covered_with_solder_mask: z103.boolean().optional(),
|
|
2031
|
+
soldermask_margin: z103.number().optional(),
|
|
2032
|
+
soldermask_margin_left: z103.number().optional(),
|
|
2033
|
+
soldermask_margin_top: z103.number().optional(),
|
|
2034
|
+
soldermask_margin_right: z103.number().optional(),
|
|
2035
|
+
soldermask_margin_bottom: z103.number().optional()
|
|
2020
2036
|
});
|
|
2021
|
-
var pcb_smtpad_rotated_rect =
|
|
2022
|
-
type:
|
|
2023
|
-
shape:
|
|
2037
|
+
var pcb_smtpad_rotated_rect = z103.object({
|
|
2038
|
+
type: z103.literal("pcb_smtpad"),
|
|
2039
|
+
shape: z103.literal("rotated_rect"),
|
|
2024
2040
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2025
|
-
pcb_group_id:
|
|
2026
|
-
subcircuit_id:
|
|
2041
|
+
pcb_group_id: z103.string().optional(),
|
|
2042
|
+
subcircuit_id: z103.string().optional(),
|
|
2027
2043
|
x: distance,
|
|
2028
2044
|
y: distance,
|
|
2029
|
-
width:
|
|
2030
|
-
height:
|
|
2031
|
-
rect_border_radius:
|
|
2032
|
-
corner_radius:
|
|
2045
|
+
width: z103.number(),
|
|
2046
|
+
height: z103.number(),
|
|
2047
|
+
rect_border_radius: z103.number().optional(),
|
|
2048
|
+
corner_radius: z103.number().optional(),
|
|
2033
2049
|
ccw_rotation: rotation,
|
|
2034
2050
|
layer: layer_ref,
|
|
2035
|
-
port_hints:
|
|
2036
|
-
pcb_component_id:
|
|
2037
|
-
pcb_port_id:
|
|
2038
|
-
is_covered_with_solder_mask:
|
|
2039
|
-
soldermask_margin:
|
|
2040
|
-
soldermask_margin_left:
|
|
2041
|
-
soldermask_margin_top:
|
|
2042
|
-
soldermask_margin_right:
|
|
2043
|
-
soldermask_margin_bottom:
|
|
2051
|
+
port_hints: z103.array(z103.string()).optional(),
|
|
2052
|
+
pcb_component_id: z103.string().optional(),
|
|
2053
|
+
pcb_port_id: z103.string().optional(),
|
|
2054
|
+
is_covered_with_solder_mask: z103.boolean().optional(),
|
|
2055
|
+
soldermask_margin: z103.number().optional(),
|
|
2056
|
+
soldermask_margin_left: z103.number().optional(),
|
|
2057
|
+
soldermask_margin_top: z103.number().optional(),
|
|
2058
|
+
soldermask_margin_right: z103.number().optional(),
|
|
2059
|
+
soldermask_margin_bottom: z103.number().optional()
|
|
2044
2060
|
});
|
|
2045
|
-
var pcb_smtpad_pill =
|
|
2046
|
-
type:
|
|
2047
|
-
shape:
|
|
2061
|
+
var pcb_smtpad_pill = z103.object({
|
|
2062
|
+
type: z103.literal("pcb_smtpad"),
|
|
2063
|
+
shape: z103.literal("pill"),
|
|
2048
2064
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2049
|
-
pcb_group_id:
|
|
2050
|
-
subcircuit_id:
|
|
2065
|
+
pcb_group_id: z103.string().optional(),
|
|
2066
|
+
subcircuit_id: z103.string().optional(),
|
|
2051
2067
|
x: distance,
|
|
2052
2068
|
y: distance,
|
|
2053
|
-
width:
|
|
2054
|
-
height:
|
|
2055
|
-
radius:
|
|
2069
|
+
width: z103.number(),
|
|
2070
|
+
height: z103.number(),
|
|
2071
|
+
radius: z103.number(),
|
|
2056
2072
|
layer: layer_ref,
|
|
2057
|
-
port_hints:
|
|
2058
|
-
pcb_component_id:
|
|
2059
|
-
pcb_port_id:
|
|
2060
|
-
is_covered_with_solder_mask:
|
|
2061
|
-
soldermask_margin:
|
|
2073
|
+
port_hints: z103.array(z103.string()).optional(),
|
|
2074
|
+
pcb_component_id: z103.string().optional(),
|
|
2075
|
+
pcb_port_id: z103.string().optional(),
|
|
2076
|
+
is_covered_with_solder_mask: z103.boolean().optional(),
|
|
2077
|
+
soldermask_margin: z103.number().optional()
|
|
2062
2078
|
});
|
|
2063
|
-
var pcb_smtpad_rotated_pill =
|
|
2064
|
-
type:
|
|
2065
|
-
shape:
|
|
2079
|
+
var pcb_smtpad_rotated_pill = z103.object({
|
|
2080
|
+
type: z103.literal("pcb_smtpad"),
|
|
2081
|
+
shape: z103.literal("rotated_pill"),
|
|
2066
2082
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2067
|
-
pcb_group_id:
|
|
2068
|
-
subcircuit_id:
|
|
2083
|
+
pcb_group_id: z103.string().optional(),
|
|
2084
|
+
subcircuit_id: z103.string().optional(),
|
|
2069
2085
|
x: distance,
|
|
2070
2086
|
y: distance,
|
|
2071
|
-
width:
|
|
2072
|
-
height:
|
|
2073
|
-
radius:
|
|
2087
|
+
width: z103.number(),
|
|
2088
|
+
height: z103.number(),
|
|
2089
|
+
radius: z103.number(),
|
|
2074
2090
|
ccw_rotation: rotation,
|
|
2075
2091
|
layer: layer_ref,
|
|
2076
|
-
port_hints:
|
|
2077
|
-
pcb_component_id:
|
|
2078
|
-
pcb_port_id:
|
|
2079
|
-
is_covered_with_solder_mask:
|
|
2080
|
-
soldermask_margin:
|
|
2092
|
+
port_hints: z103.array(z103.string()).optional(),
|
|
2093
|
+
pcb_component_id: z103.string().optional(),
|
|
2094
|
+
pcb_port_id: z103.string().optional(),
|
|
2095
|
+
is_covered_with_solder_mask: z103.boolean().optional(),
|
|
2096
|
+
soldermask_margin: z103.number().optional()
|
|
2081
2097
|
});
|
|
2082
|
-
var pcb_smtpad_polygon =
|
|
2083
|
-
type:
|
|
2084
|
-
shape:
|
|
2098
|
+
var pcb_smtpad_polygon = z103.object({
|
|
2099
|
+
type: z103.literal("pcb_smtpad"),
|
|
2100
|
+
shape: z103.literal("polygon"),
|
|
2085
2101
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2086
|
-
pcb_group_id:
|
|
2087
|
-
subcircuit_id:
|
|
2088
|
-
points:
|
|
2102
|
+
pcb_group_id: z103.string().optional(),
|
|
2103
|
+
subcircuit_id: z103.string().optional(),
|
|
2104
|
+
points: z103.array(point),
|
|
2089
2105
|
layer: layer_ref,
|
|
2090
|
-
port_hints:
|
|
2091
|
-
pcb_component_id:
|
|
2092
|
-
pcb_port_id:
|
|
2093
|
-
is_covered_with_solder_mask:
|
|
2094
|
-
soldermask_margin:
|
|
2106
|
+
port_hints: z103.array(z103.string()).optional(),
|
|
2107
|
+
pcb_component_id: z103.string().optional(),
|
|
2108
|
+
pcb_port_id: z103.string().optional(),
|
|
2109
|
+
is_covered_with_solder_mask: z103.boolean().optional(),
|
|
2110
|
+
soldermask_margin: z103.number().optional()
|
|
2095
2111
|
});
|
|
2096
|
-
var pcb_smtpad =
|
|
2112
|
+
var pcb_smtpad = z103.discriminatedUnion("shape", [
|
|
2097
2113
|
pcb_smtpad_circle,
|
|
2098
2114
|
pcb_smtpad_rect,
|
|
2099
2115
|
pcb_smtpad_rotated_rect,
|
|
@@ -2109,79 +2125,79 @@ expectTypesMatch(true);
|
|
|
2109
2125
|
expectTypesMatch(true);
|
|
2110
2126
|
|
|
2111
2127
|
// src/pcb/pcb_solder_paste.ts
|
|
2112
|
-
import { z as
|
|
2113
|
-
var pcb_solder_paste_circle =
|
|
2114
|
-
type:
|
|
2115
|
-
shape:
|
|
2128
|
+
import { z as z104 } from "zod";
|
|
2129
|
+
var pcb_solder_paste_circle = z104.object({
|
|
2130
|
+
type: z104.literal("pcb_solder_paste"),
|
|
2131
|
+
shape: z104.literal("circle"),
|
|
2116
2132
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2117
|
-
pcb_group_id:
|
|
2118
|
-
subcircuit_id:
|
|
2133
|
+
pcb_group_id: z104.string().optional(),
|
|
2134
|
+
subcircuit_id: z104.string().optional(),
|
|
2119
2135
|
x: distance,
|
|
2120
2136
|
y: distance,
|
|
2121
|
-
radius:
|
|
2137
|
+
radius: z104.number(),
|
|
2122
2138
|
layer: layer_ref,
|
|
2123
|
-
pcb_component_id:
|
|
2124
|
-
pcb_smtpad_id:
|
|
2139
|
+
pcb_component_id: z104.string().optional(),
|
|
2140
|
+
pcb_smtpad_id: z104.string().optional()
|
|
2125
2141
|
});
|
|
2126
|
-
var pcb_solder_paste_rect =
|
|
2127
|
-
type:
|
|
2128
|
-
shape:
|
|
2142
|
+
var pcb_solder_paste_rect = z104.object({
|
|
2143
|
+
type: z104.literal("pcb_solder_paste"),
|
|
2144
|
+
shape: z104.literal("rect"),
|
|
2129
2145
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2130
|
-
pcb_group_id:
|
|
2131
|
-
subcircuit_id:
|
|
2146
|
+
pcb_group_id: z104.string().optional(),
|
|
2147
|
+
subcircuit_id: z104.string().optional(),
|
|
2132
2148
|
x: distance,
|
|
2133
2149
|
y: distance,
|
|
2134
|
-
width:
|
|
2135
|
-
height:
|
|
2150
|
+
width: z104.number(),
|
|
2151
|
+
height: z104.number(),
|
|
2136
2152
|
layer: layer_ref,
|
|
2137
|
-
pcb_component_id:
|
|
2138
|
-
pcb_smtpad_id:
|
|
2153
|
+
pcb_component_id: z104.string().optional(),
|
|
2154
|
+
pcb_smtpad_id: z104.string().optional()
|
|
2139
2155
|
});
|
|
2140
|
-
var pcb_solder_paste_pill =
|
|
2141
|
-
type:
|
|
2142
|
-
shape:
|
|
2156
|
+
var pcb_solder_paste_pill = z104.object({
|
|
2157
|
+
type: z104.literal("pcb_solder_paste"),
|
|
2158
|
+
shape: z104.literal("pill"),
|
|
2143
2159
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2144
|
-
pcb_group_id:
|
|
2145
|
-
subcircuit_id:
|
|
2160
|
+
pcb_group_id: z104.string().optional(),
|
|
2161
|
+
subcircuit_id: z104.string().optional(),
|
|
2146
2162
|
x: distance,
|
|
2147
2163
|
y: distance,
|
|
2148
|
-
width:
|
|
2149
|
-
height:
|
|
2150
|
-
radius:
|
|
2164
|
+
width: z104.number(),
|
|
2165
|
+
height: z104.number(),
|
|
2166
|
+
radius: z104.number(),
|
|
2151
2167
|
layer: layer_ref,
|
|
2152
|
-
pcb_component_id:
|
|
2153
|
-
pcb_smtpad_id:
|
|
2168
|
+
pcb_component_id: z104.string().optional(),
|
|
2169
|
+
pcb_smtpad_id: z104.string().optional()
|
|
2154
2170
|
});
|
|
2155
|
-
var pcb_solder_paste_rotated_rect =
|
|
2156
|
-
type:
|
|
2157
|
-
shape:
|
|
2171
|
+
var pcb_solder_paste_rotated_rect = z104.object({
|
|
2172
|
+
type: z104.literal("pcb_solder_paste"),
|
|
2173
|
+
shape: z104.literal("rotated_rect"),
|
|
2158
2174
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2159
|
-
pcb_group_id:
|
|
2160
|
-
subcircuit_id:
|
|
2175
|
+
pcb_group_id: z104.string().optional(),
|
|
2176
|
+
subcircuit_id: z104.string().optional(),
|
|
2161
2177
|
x: distance,
|
|
2162
2178
|
y: distance,
|
|
2163
|
-
width:
|
|
2164
|
-
height:
|
|
2179
|
+
width: z104.number(),
|
|
2180
|
+
height: z104.number(),
|
|
2165
2181
|
ccw_rotation: distance,
|
|
2166
2182
|
layer: layer_ref,
|
|
2167
|
-
pcb_component_id:
|
|
2168
|
-
pcb_smtpad_id:
|
|
2183
|
+
pcb_component_id: z104.string().optional(),
|
|
2184
|
+
pcb_smtpad_id: z104.string().optional()
|
|
2169
2185
|
});
|
|
2170
|
-
var pcb_solder_paste_oval =
|
|
2171
|
-
type:
|
|
2172
|
-
shape:
|
|
2186
|
+
var pcb_solder_paste_oval = z104.object({
|
|
2187
|
+
type: z104.literal("pcb_solder_paste"),
|
|
2188
|
+
shape: z104.literal("oval"),
|
|
2173
2189
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2174
|
-
pcb_group_id:
|
|
2175
|
-
subcircuit_id:
|
|
2190
|
+
pcb_group_id: z104.string().optional(),
|
|
2191
|
+
subcircuit_id: z104.string().optional(),
|
|
2176
2192
|
x: distance,
|
|
2177
2193
|
y: distance,
|
|
2178
|
-
width:
|
|
2179
|
-
height:
|
|
2194
|
+
width: z104.number(),
|
|
2195
|
+
height: z104.number(),
|
|
2180
2196
|
layer: layer_ref,
|
|
2181
|
-
pcb_component_id:
|
|
2182
|
-
pcb_smtpad_id:
|
|
2197
|
+
pcb_component_id: z104.string().optional(),
|
|
2198
|
+
pcb_smtpad_id: z104.string().optional()
|
|
2183
2199
|
});
|
|
2184
|
-
var pcb_solder_paste =
|
|
2200
|
+
var pcb_solder_paste = z104.union([
|
|
2185
2201
|
pcb_solder_paste_circle,
|
|
2186
2202
|
pcb_solder_paste_rect,
|
|
2187
2203
|
pcb_solder_paste_pill,
|
|
@@ -2197,193 +2213,193 @@ expectTypesMatch(
|
|
|
2197
2213
|
expectTypesMatch(true);
|
|
2198
2214
|
|
|
2199
2215
|
// src/pcb/pcb_text.ts
|
|
2200
|
-
import { z as
|
|
2201
|
-
var pcb_text =
|
|
2202
|
-
type:
|
|
2216
|
+
import { z as z105 } from "zod";
|
|
2217
|
+
var pcb_text = z105.object({
|
|
2218
|
+
type: z105.literal("pcb_text"),
|
|
2203
2219
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
2204
|
-
pcb_group_id:
|
|
2205
|
-
subcircuit_id:
|
|
2206
|
-
text:
|
|
2220
|
+
pcb_group_id: z105.string().optional(),
|
|
2221
|
+
subcircuit_id: z105.string().optional(),
|
|
2222
|
+
text: z105.string(),
|
|
2207
2223
|
center: point,
|
|
2208
2224
|
layer: layer_ref,
|
|
2209
2225
|
width: length,
|
|
2210
2226
|
height: length,
|
|
2211
|
-
lines:
|
|
2227
|
+
lines: z105.number(),
|
|
2212
2228
|
// @ts-ignore
|
|
2213
|
-
align:
|
|
2229
|
+
align: z105.enum(["bottom-left"])
|
|
2214
2230
|
}).describe("Defines text on the PCB");
|
|
2215
2231
|
expectTypesMatch(true);
|
|
2216
2232
|
|
|
2217
2233
|
// src/pcb/pcb_trace.ts
|
|
2218
|
-
import { z as
|
|
2219
|
-
var pcb_trace_route_point_wire =
|
|
2220
|
-
route_type:
|
|
2234
|
+
import { z as z106 } from "zod";
|
|
2235
|
+
var pcb_trace_route_point_wire = z106.object({
|
|
2236
|
+
route_type: z106.literal("wire"),
|
|
2221
2237
|
x: distance,
|
|
2222
2238
|
y: distance,
|
|
2223
2239
|
width: distance,
|
|
2224
|
-
copper_pour_id:
|
|
2225
|
-
is_inside_copper_pour:
|
|
2226
|
-
start_pcb_port_id:
|
|
2227
|
-
end_pcb_port_id:
|
|
2240
|
+
copper_pour_id: z106.string().optional(),
|
|
2241
|
+
is_inside_copper_pour: z106.boolean().optional(),
|
|
2242
|
+
start_pcb_port_id: z106.string().optional(),
|
|
2243
|
+
end_pcb_port_id: z106.string().optional(),
|
|
2228
2244
|
layer: layer_ref
|
|
2229
2245
|
});
|
|
2230
|
-
var pcb_trace_route_point_via =
|
|
2231
|
-
route_type:
|
|
2246
|
+
var pcb_trace_route_point_via = z106.object({
|
|
2247
|
+
route_type: z106.literal("via"),
|
|
2232
2248
|
x: distance,
|
|
2233
2249
|
y: distance,
|
|
2234
|
-
copper_pour_id:
|
|
2235
|
-
is_inside_copper_pour:
|
|
2250
|
+
copper_pour_id: z106.string().optional(),
|
|
2251
|
+
is_inside_copper_pour: z106.boolean().optional(),
|
|
2236
2252
|
hole_diameter: distance.optional(),
|
|
2237
2253
|
outer_diameter: distance.optional(),
|
|
2238
2254
|
from_layer: layer_ref,
|
|
2239
2255
|
to_layer: layer_ref
|
|
2240
2256
|
});
|
|
2241
|
-
var pcb_trace_route_point_through_pad =
|
|
2242
|
-
route_type:
|
|
2257
|
+
var pcb_trace_route_point_through_pad = z106.object({
|
|
2258
|
+
route_type: z106.literal("through_pad"),
|
|
2243
2259
|
start: point,
|
|
2244
2260
|
end: point,
|
|
2245
2261
|
width: distance,
|
|
2246
2262
|
start_layer: layer_ref,
|
|
2247
2263
|
end_layer: layer_ref,
|
|
2248
|
-
pcb_smtpad_id:
|
|
2249
|
-
pcb_plated_hole_id:
|
|
2264
|
+
pcb_smtpad_id: z106.string().optional(),
|
|
2265
|
+
pcb_plated_hole_id: z106.string().optional()
|
|
2250
2266
|
});
|
|
2251
|
-
var pcb_trace_route_point =
|
|
2267
|
+
var pcb_trace_route_point = z106.union([
|
|
2252
2268
|
pcb_trace_route_point_wire,
|
|
2253
2269
|
pcb_trace_route_point_via,
|
|
2254
2270
|
pcb_trace_route_point_through_pad
|
|
2255
2271
|
]);
|
|
2256
|
-
var pcb_trace =
|
|
2257
|
-
type:
|
|
2258
|
-
source_trace_id:
|
|
2259
|
-
pcb_component_id:
|
|
2272
|
+
var pcb_trace = z106.object({
|
|
2273
|
+
type: z106.literal("pcb_trace"),
|
|
2274
|
+
source_trace_id: z106.string().optional(),
|
|
2275
|
+
pcb_component_id: z106.string().optional(),
|
|
2260
2276
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
2261
|
-
pcb_group_id:
|
|
2262
|
-
subcircuit_id:
|
|
2263
|
-
route_thickness_mode:
|
|
2264
|
-
route_order_index:
|
|
2265
|
-
should_round_corners:
|
|
2266
|
-
trace_length:
|
|
2267
|
-
highlight_color:
|
|
2268
|
-
route:
|
|
2277
|
+
pcb_group_id: z106.string().optional(),
|
|
2278
|
+
subcircuit_id: z106.string().optional(),
|
|
2279
|
+
route_thickness_mode: z106.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
2280
|
+
route_order_index: z106.number().optional(),
|
|
2281
|
+
should_round_corners: z106.boolean().optional(),
|
|
2282
|
+
trace_length: z106.number().optional(),
|
|
2283
|
+
highlight_color: z106.string().optional(),
|
|
2284
|
+
route: z106.array(pcb_trace_route_point)
|
|
2269
2285
|
}).describe("Defines a trace on the PCB");
|
|
2270
2286
|
expectTypesMatch(true);
|
|
2271
2287
|
expectTypesMatch(true);
|
|
2272
2288
|
|
|
2273
2289
|
// src/pcb/pcb_trace_warning.ts
|
|
2274
|
-
import { z as
|
|
2275
|
-
var pcb_trace_warning =
|
|
2276
|
-
type:
|
|
2290
|
+
import { z as z107 } from "zod";
|
|
2291
|
+
var pcb_trace_warning = z107.object({
|
|
2292
|
+
type: z107.literal("pcb_trace_warning"),
|
|
2277
2293
|
pcb_trace_warning_id: getZodPrefixedIdWithDefault("pcb_trace_warning"),
|
|
2278
|
-
warning_type:
|
|
2279
|
-
message:
|
|
2294
|
+
warning_type: z107.literal("pcb_trace_warning").default("pcb_trace_warning"),
|
|
2295
|
+
message: z107.string(),
|
|
2280
2296
|
center: point.optional(),
|
|
2281
|
-
pcb_trace_id:
|
|
2282
|
-
source_trace_id:
|
|
2283
|
-
pcb_component_ids:
|
|
2284
|
-
pcb_port_ids:
|
|
2285
|
-
subcircuit_id:
|
|
2297
|
+
pcb_trace_id: z107.string(),
|
|
2298
|
+
source_trace_id: z107.string(),
|
|
2299
|
+
pcb_component_ids: z107.array(z107.string()),
|
|
2300
|
+
pcb_port_ids: z107.array(z107.string()),
|
|
2301
|
+
subcircuit_id: z107.string().optional()
|
|
2286
2302
|
}).describe("Defines a trace warning on the PCB");
|
|
2287
2303
|
expectTypesMatch(true);
|
|
2288
2304
|
|
|
2289
2305
|
// src/pcb/pcb_trace_too_long_warning.ts
|
|
2290
|
-
import { z as
|
|
2291
|
-
var pcb_trace_too_long_warning =
|
|
2292
|
-
type:
|
|
2306
|
+
import { z as z108 } from "zod";
|
|
2307
|
+
var pcb_trace_too_long_warning = z108.object({
|
|
2308
|
+
type: z108.literal("pcb_trace_too_long_warning"),
|
|
2293
2309
|
pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
|
|
2294
2310
|
"pcb_trace_too_long_warning"
|
|
2295
2311
|
),
|
|
2296
|
-
warning_type:
|
|
2297
|
-
message:
|
|
2298
|
-
pcb_trace_id:
|
|
2299
|
-
source_net_id:
|
|
2300
|
-
source_trace_id:
|
|
2312
|
+
warning_type: z108.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
|
|
2313
|
+
message: z108.string(),
|
|
2314
|
+
pcb_trace_id: z108.string(),
|
|
2315
|
+
source_net_id: z108.string().optional(),
|
|
2316
|
+
source_trace_id: z108.string().optional(),
|
|
2301
2317
|
actual_trace_length: distance,
|
|
2302
2318
|
maximum_trace_length: distance,
|
|
2303
|
-
subcircuit_id:
|
|
2319
|
+
subcircuit_id: z108.string().optional()
|
|
2304
2320
|
}).describe(
|
|
2305
2321
|
"Warning emitted when a PCB trace is longer than its maximum allowed length"
|
|
2306
2322
|
);
|
|
2307
2323
|
expectTypesMatch(true);
|
|
2308
2324
|
|
|
2309
2325
|
// src/pcb/pcb_trace_error.ts
|
|
2310
|
-
import { z as
|
|
2326
|
+
import { z as z109 } from "zod";
|
|
2311
2327
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2312
|
-
type:
|
|
2328
|
+
type: z109.literal("pcb_trace_error"),
|
|
2313
2329
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2314
|
-
error_type:
|
|
2330
|
+
error_type: z109.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2315
2331
|
center: point.optional(),
|
|
2316
|
-
pcb_trace_id:
|
|
2317
|
-
source_trace_id:
|
|
2318
|
-
pcb_component_ids:
|
|
2319
|
-
pcb_port_ids:
|
|
2320
|
-
subcircuit_id:
|
|
2332
|
+
pcb_trace_id: z109.string(),
|
|
2333
|
+
source_trace_id: z109.string(),
|
|
2334
|
+
pcb_component_ids: z109.array(z109.string()),
|
|
2335
|
+
pcb_port_ids: z109.array(z109.string()),
|
|
2336
|
+
subcircuit_id: z109.string().optional()
|
|
2321
2337
|
}).describe("Defines a trace error on the PCB");
|
|
2322
2338
|
expectTypesMatch(true);
|
|
2323
2339
|
|
|
2324
2340
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2325
|
-
import { z as
|
|
2341
|
+
import { z as z110 } from "zod";
|
|
2326
2342
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2327
|
-
type:
|
|
2343
|
+
type: z110.literal("pcb_trace_missing_error"),
|
|
2328
2344
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2329
2345
|
"pcb_trace_missing_error"
|
|
2330
2346
|
),
|
|
2331
|
-
error_type:
|
|
2347
|
+
error_type: z110.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2332
2348
|
center: point.optional(),
|
|
2333
|
-
source_trace_id:
|
|
2334
|
-
pcb_component_ids:
|
|
2335
|
-
pcb_port_ids:
|
|
2336
|
-
subcircuit_id:
|
|
2349
|
+
source_trace_id: z110.string(),
|
|
2350
|
+
pcb_component_ids: z110.array(z110.string()),
|
|
2351
|
+
pcb_port_ids: z110.array(z110.string()),
|
|
2352
|
+
subcircuit_id: z110.string().optional()
|
|
2337
2353
|
}).describe(
|
|
2338
2354
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2339
2355
|
);
|
|
2340
2356
|
expectTypesMatch(true);
|
|
2341
2357
|
|
|
2342
2358
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2343
|
-
import { z as
|
|
2359
|
+
import { z as z111 } from "zod";
|
|
2344
2360
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2345
|
-
type:
|
|
2361
|
+
type: z111.literal("pcb_port_not_matched_error"),
|
|
2346
2362
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2347
|
-
error_type:
|
|
2348
|
-
pcb_component_ids:
|
|
2349
|
-
subcircuit_id:
|
|
2363
|
+
error_type: z111.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2364
|
+
pcb_component_ids: z111.array(z111.string()),
|
|
2365
|
+
subcircuit_id: z111.string().optional()
|
|
2350
2366
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2351
2367
|
expectTypesMatch(true);
|
|
2352
2368
|
|
|
2353
2369
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2354
|
-
import { z as
|
|
2370
|
+
import { z as z112 } from "zod";
|
|
2355
2371
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2356
|
-
type:
|
|
2372
|
+
type: z112.literal("pcb_port_not_connected_error"),
|
|
2357
2373
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2358
2374
|
"pcb_port_not_connected_error"
|
|
2359
2375
|
),
|
|
2360
|
-
error_type:
|
|
2361
|
-
pcb_port_ids:
|
|
2362
|
-
pcb_component_ids:
|
|
2363
|
-
subcircuit_id:
|
|
2376
|
+
error_type: z112.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2377
|
+
pcb_port_ids: z112.array(z112.string()),
|
|
2378
|
+
pcb_component_ids: z112.array(z112.string()),
|
|
2379
|
+
subcircuit_id: z112.string().optional()
|
|
2364
2380
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2365
2381
|
expectTypesMatch(
|
|
2366
2382
|
true
|
|
2367
2383
|
);
|
|
2368
2384
|
|
|
2369
2385
|
// src/pcb/pcb_net.ts
|
|
2370
|
-
import { z as
|
|
2371
|
-
var pcb_net =
|
|
2372
|
-
type:
|
|
2386
|
+
import { z as z113 } from "zod";
|
|
2387
|
+
var pcb_net = z113.object({
|
|
2388
|
+
type: z113.literal("pcb_net"),
|
|
2373
2389
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2374
|
-
source_net_id:
|
|
2375
|
-
highlight_color:
|
|
2390
|
+
source_net_id: z113.string().optional(),
|
|
2391
|
+
highlight_color: z113.string().optional()
|
|
2376
2392
|
}).describe("Defines a net on the PCB");
|
|
2377
2393
|
expectTypesMatch(true);
|
|
2378
2394
|
|
|
2379
2395
|
// src/pcb/pcb_via.ts
|
|
2380
|
-
import { z as
|
|
2381
|
-
var pcb_via =
|
|
2382
|
-
type:
|
|
2396
|
+
import { z as z114 } from "zod";
|
|
2397
|
+
var pcb_via = z114.object({
|
|
2398
|
+
type: z114.literal("pcb_via"),
|
|
2383
2399
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2384
|
-
pcb_group_id:
|
|
2385
|
-
subcircuit_id:
|
|
2386
|
-
subcircuit_connectivity_map_key:
|
|
2400
|
+
pcb_group_id: z114.string().optional(),
|
|
2401
|
+
subcircuit_id: z114.string().optional(),
|
|
2402
|
+
subcircuit_connectivity_map_key: z114.string().optional(),
|
|
2387
2403
|
x: distance,
|
|
2388
2404
|
y: distance,
|
|
2389
2405
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2392,103 +2408,103 @@ var pcb_via = z113.object({
|
|
|
2392
2408
|
from_layer: layer_ref.optional(),
|
|
2393
2409
|
/** @deprecated */
|
|
2394
2410
|
to_layer: layer_ref.optional(),
|
|
2395
|
-
layers:
|
|
2396
|
-
pcb_trace_id:
|
|
2397
|
-
net_is_assignable:
|
|
2398
|
-
net_assigned:
|
|
2399
|
-
is_tented:
|
|
2411
|
+
layers: z114.array(layer_ref),
|
|
2412
|
+
pcb_trace_id: z114.string().optional(),
|
|
2413
|
+
net_is_assignable: z114.boolean().optional(),
|
|
2414
|
+
net_assigned: z114.boolean().optional(),
|
|
2415
|
+
is_tented: z114.boolean().optional()
|
|
2400
2416
|
}).describe("Defines a via on the PCB");
|
|
2401
2417
|
expectTypesMatch(true);
|
|
2402
2418
|
|
|
2403
2419
|
// src/pcb/pcb_board.ts
|
|
2404
|
-
import { z as
|
|
2405
|
-
var pcb_board =
|
|
2406
|
-
type:
|
|
2420
|
+
import { z as z115 } from "zod";
|
|
2421
|
+
var pcb_board = z115.object({
|
|
2422
|
+
type: z115.literal("pcb_board"),
|
|
2407
2423
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2408
|
-
pcb_panel_id:
|
|
2409
|
-
carrier_pcb_board_id:
|
|
2410
|
-
is_subcircuit:
|
|
2411
|
-
subcircuit_id:
|
|
2412
|
-
is_mounted_to_carrier_board:
|
|
2424
|
+
pcb_panel_id: z115.string().optional(),
|
|
2425
|
+
carrier_pcb_board_id: z115.string().optional(),
|
|
2426
|
+
is_subcircuit: z115.boolean().optional(),
|
|
2427
|
+
subcircuit_id: z115.string().optional(),
|
|
2428
|
+
is_mounted_to_carrier_board: z115.boolean().optional(),
|
|
2413
2429
|
width: length.optional(),
|
|
2414
2430
|
height: length.optional(),
|
|
2415
2431
|
center: point,
|
|
2416
|
-
display_offset_x:
|
|
2432
|
+
display_offset_x: z115.string().optional().describe(
|
|
2417
2433
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2418
2434
|
),
|
|
2419
|
-
display_offset_y:
|
|
2435
|
+
display_offset_y: z115.string().optional().describe(
|
|
2420
2436
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2421
2437
|
),
|
|
2422
2438
|
thickness: length.optional().default(1.4),
|
|
2423
|
-
num_layers:
|
|
2424
|
-
outline:
|
|
2425
|
-
shape:
|
|
2426
|
-
material:
|
|
2427
|
-
solder_mask_color:
|
|
2428
|
-
silkscreen_color:
|
|
2439
|
+
num_layers: z115.number().optional().default(4),
|
|
2440
|
+
outline: z115.array(point).optional(),
|
|
2441
|
+
shape: z115.enum(["rect", "polygon"]).optional(),
|
|
2442
|
+
material: z115.enum(["fr4", "fr1"]).default("fr4"),
|
|
2443
|
+
solder_mask_color: z115.string().optional(),
|
|
2444
|
+
silkscreen_color: z115.string().optional(),
|
|
2429
2445
|
anchor_position: point.optional(),
|
|
2430
2446
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2431
|
-
position_mode:
|
|
2447
|
+
position_mode: z115.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2432
2448
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2433
2449
|
expectTypesMatch(true);
|
|
2434
2450
|
|
|
2435
2451
|
// src/pcb/pcb_panel.ts
|
|
2436
|
-
import { z as
|
|
2437
|
-
var pcb_panel =
|
|
2438
|
-
type:
|
|
2452
|
+
import { z as z116 } from "zod";
|
|
2453
|
+
var pcb_panel = z116.object({
|
|
2454
|
+
type: z116.literal("pcb_panel"),
|
|
2439
2455
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2440
2456
|
width: length,
|
|
2441
2457
|
height: length,
|
|
2442
2458
|
center: point,
|
|
2443
2459
|
thickness: length.optional().default(1.4),
|
|
2444
|
-
covered_with_solder_mask:
|
|
2460
|
+
covered_with_solder_mask: z116.boolean().optional().default(true)
|
|
2445
2461
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2446
2462
|
expectTypesMatch(true);
|
|
2447
2463
|
|
|
2448
2464
|
// src/pcb/pcb_placement_error.ts
|
|
2449
|
-
import { z as
|
|
2465
|
+
import { z as z117 } from "zod";
|
|
2450
2466
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2451
|
-
type:
|
|
2467
|
+
type: z117.literal("pcb_placement_error"),
|
|
2452
2468
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2453
|
-
error_type:
|
|
2454
|
-
subcircuit_id:
|
|
2469
|
+
error_type: z117.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2470
|
+
subcircuit_id: z117.string().optional()
|
|
2455
2471
|
}).describe("Defines a placement error on the PCB");
|
|
2456
2472
|
expectTypesMatch(true);
|
|
2457
2473
|
|
|
2458
2474
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2459
|
-
import { z as
|
|
2475
|
+
import { z as z118 } from "zod";
|
|
2460
2476
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2461
|
-
type:
|
|
2477
|
+
type: z118.literal("pcb_panelization_placement_error"),
|
|
2462
2478
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2463
2479
|
"pcb_panelization_placement_error"
|
|
2464
2480
|
),
|
|
2465
|
-
error_type:
|
|
2466
|
-
pcb_panel_id:
|
|
2467
|
-
pcb_board_id:
|
|
2468
|
-
subcircuit_id:
|
|
2481
|
+
error_type: z118.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2482
|
+
pcb_panel_id: z118.string().optional(),
|
|
2483
|
+
pcb_board_id: z118.string().optional(),
|
|
2484
|
+
subcircuit_id: z118.string().optional()
|
|
2469
2485
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2470
2486
|
expectTypesMatch(true);
|
|
2471
2487
|
|
|
2472
2488
|
// src/pcb/pcb_trace_hint.ts
|
|
2473
|
-
import { z as
|
|
2474
|
-
var pcb_trace_hint =
|
|
2475
|
-
type:
|
|
2489
|
+
import { z as z119 } from "zod";
|
|
2490
|
+
var pcb_trace_hint = z119.object({
|
|
2491
|
+
type: z119.literal("pcb_trace_hint"),
|
|
2476
2492
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2477
|
-
pcb_port_id:
|
|
2478
|
-
pcb_component_id:
|
|
2479
|
-
route:
|
|
2480
|
-
subcircuit_id:
|
|
2493
|
+
pcb_port_id: z119.string(),
|
|
2494
|
+
pcb_component_id: z119.string(),
|
|
2495
|
+
route: z119.array(route_hint_point),
|
|
2496
|
+
subcircuit_id: z119.string().optional()
|
|
2481
2497
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2482
2498
|
expectTypesMatch(true);
|
|
2483
2499
|
|
|
2484
2500
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2485
|
-
import { z as
|
|
2486
|
-
var pcb_silkscreen_line =
|
|
2487
|
-
type:
|
|
2501
|
+
import { z as z120 } from "zod";
|
|
2502
|
+
var pcb_silkscreen_line = z120.object({
|
|
2503
|
+
type: z120.literal("pcb_silkscreen_line"),
|
|
2488
2504
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2489
|
-
pcb_component_id:
|
|
2490
|
-
pcb_group_id:
|
|
2491
|
-
subcircuit_id:
|
|
2505
|
+
pcb_component_id: z120.string(),
|
|
2506
|
+
pcb_group_id: z120.string().optional(),
|
|
2507
|
+
subcircuit_id: z120.string().optional(),
|
|
2492
2508
|
stroke_width: distance.default("0.1mm"),
|
|
2493
2509
|
x1: distance,
|
|
2494
2510
|
y1: distance,
|
|
@@ -2499,32 +2515,32 @@ var pcb_silkscreen_line = z119.object({
|
|
|
2499
2515
|
expectTypesMatch(true);
|
|
2500
2516
|
|
|
2501
2517
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2502
|
-
import { z as
|
|
2503
|
-
var pcb_silkscreen_path =
|
|
2504
|
-
type:
|
|
2518
|
+
import { z as z121 } from "zod";
|
|
2519
|
+
var pcb_silkscreen_path = z121.object({
|
|
2520
|
+
type: z121.literal("pcb_silkscreen_path"),
|
|
2505
2521
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2506
|
-
pcb_component_id:
|
|
2507
|
-
pcb_group_id:
|
|
2508
|
-
subcircuit_id:
|
|
2522
|
+
pcb_component_id: z121.string(),
|
|
2523
|
+
pcb_group_id: z121.string().optional(),
|
|
2524
|
+
subcircuit_id: z121.string().optional(),
|
|
2509
2525
|
layer: visible_layer,
|
|
2510
|
-
route:
|
|
2526
|
+
route: z121.array(point),
|
|
2511
2527
|
stroke_width: length
|
|
2512
2528
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2513
2529
|
expectTypesMatch(true);
|
|
2514
2530
|
|
|
2515
2531
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2516
|
-
import { z as
|
|
2517
|
-
var pcb_silkscreen_text =
|
|
2518
|
-
type:
|
|
2532
|
+
import { z as z122 } from "zod";
|
|
2533
|
+
var pcb_silkscreen_text = z122.object({
|
|
2534
|
+
type: z122.literal("pcb_silkscreen_text"),
|
|
2519
2535
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2520
|
-
pcb_group_id:
|
|
2521
|
-
subcircuit_id:
|
|
2522
|
-
font:
|
|
2536
|
+
pcb_group_id: z122.string().optional(),
|
|
2537
|
+
subcircuit_id: z122.string().optional(),
|
|
2538
|
+
font: z122.literal("tscircuit2024").default("tscircuit2024"),
|
|
2523
2539
|
font_size: distance.default("0.2mm"),
|
|
2524
|
-
pcb_component_id:
|
|
2525
|
-
text:
|
|
2526
|
-
is_knockout:
|
|
2527
|
-
knockout_padding:
|
|
2540
|
+
pcb_component_id: z122.string(),
|
|
2541
|
+
text: z122.string(),
|
|
2542
|
+
is_knockout: z122.boolean().default(false).optional(),
|
|
2543
|
+
knockout_padding: z122.object({
|
|
2528
2544
|
left: length,
|
|
2529
2545
|
top: length,
|
|
2530
2546
|
bottom: length,
|
|
@@ -2535,27 +2551,27 @@ var pcb_silkscreen_text = z121.object({
|
|
|
2535
2551
|
bottom: "0.2mm",
|
|
2536
2552
|
right: "0.2mm"
|
|
2537
2553
|
}).optional(),
|
|
2538
|
-
ccw_rotation:
|
|
2554
|
+
ccw_rotation: z122.number().optional(),
|
|
2539
2555
|
layer: layer_ref,
|
|
2540
|
-
is_mirrored:
|
|
2556
|
+
is_mirrored: z122.boolean().default(false).optional(),
|
|
2541
2557
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2542
2558
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2543
2559
|
}).describe("Defines silkscreen text on the PCB");
|
|
2544
2560
|
expectTypesMatch(true);
|
|
2545
2561
|
|
|
2546
2562
|
// src/pcb/pcb_copper_text.ts
|
|
2547
|
-
import { z as
|
|
2548
|
-
var pcb_copper_text =
|
|
2549
|
-
type:
|
|
2563
|
+
import { z as z123 } from "zod";
|
|
2564
|
+
var pcb_copper_text = z123.object({
|
|
2565
|
+
type: z123.literal("pcb_copper_text"),
|
|
2550
2566
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2551
|
-
pcb_group_id:
|
|
2552
|
-
subcircuit_id:
|
|
2553
|
-
font:
|
|
2567
|
+
pcb_group_id: z123.string().optional(),
|
|
2568
|
+
subcircuit_id: z123.string().optional(),
|
|
2569
|
+
font: z123.literal("tscircuit2024").default("tscircuit2024"),
|
|
2554
2570
|
font_size: distance.default("0.2mm"),
|
|
2555
|
-
pcb_component_id:
|
|
2556
|
-
text:
|
|
2557
|
-
is_knockout:
|
|
2558
|
-
knockout_padding:
|
|
2571
|
+
pcb_component_id: z123.string(),
|
|
2572
|
+
text: z123.string(),
|
|
2573
|
+
is_knockout: z123.boolean().default(false).optional(),
|
|
2574
|
+
knockout_padding: z123.object({
|
|
2559
2575
|
left: length,
|
|
2560
2576
|
top: length,
|
|
2561
2577
|
bottom: length,
|
|
@@ -2566,61 +2582,61 @@ var pcb_copper_text = z122.object({
|
|
|
2566
2582
|
bottom: "0.2mm",
|
|
2567
2583
|
right: "0.2mm"
|
|
2568
2584
|
}).optional(),
|
|
2569
|
-
ccw_rotation:
|
|
2585
|
+
ccw_rotation: z123.number().optional(),
|
|
2570
2586
|
layer: layer_ref,
|
|
2571
|
-
is_mirrored:
|
|
2587
|
+
is_mirrored: z123.boolean().default(false).optional(),
|
|
2572
2588
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2573
2589
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2574
2590
|
}).describe("Defines copper text on the PCB");
|
|
2575
2591
|
expectTypesMatch(true);
|
|
2576
2592
|
|
|
2577
2593
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2578
|
-
import { z as
|
|
2579
|
-
var pcb_silkscreen_rect =
|
|
2580
|
-
type:
|
|
2594
|
+
import { z as z124 } from "zod";
|
|
2595
|
+
var pcb_silkscreen_rect = z124.object({
|
|
2596
|
+
type: z124.literal("pcb_silkscreen_rect"),
|
|
2581
2597
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2582
|
-
pcb_component_id:
|
|
2583
|
-
pcb_group_id:
|
|
2584
|
-
subcircuit_id:
|
|
2598
|
+
pcb_component_id: z124.string(),
|
|
2599
|
+
pcb_group_id: z124.string().optional(),
|
|
2600
|
+
subcircuit_id: z124.string().optional(),
|
|
2585
2601
|
center: point,
|
|
2586
2602
|
width: length,
|
|
2587
2603
|
height: length,
|
|
2588
2604
|
layer: layer_ref,
|
|
2589
2605
|
stroke_width: length.default("1mm"),
|
|
2590
2606
|
corner_radius: length.optional(),
|
|
2591
|
-
is_filled:
|
|
2592
|
-
has_stroke:
|
|
2593
|
-
is_stroke_dashed:
|
|
2594
|
-
ccw_rotation:
|
|
2607
|
+
is_filled: z124.boolean().default(true).optional(),
|
|
2608
|
+
has_stroke: z124.boolean().optional(),
|
|
2609
|
+
is_stroke_dashed: z124.boolean().optional(),
|
|
2610
|
+
ccw_rotation: z124.number().optional()
|
|
2595
2611
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2596
2612
|
expectTypesMatch(true);
|
|
2597
2613
|
|
|
2598
2614
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2599
|
-
import { z as
|
|
2600
|
-
var pcb_silkscreen_circle =
|
|
2601
|
-
type:
|
|
2615
|
+
import { z as z125 } from "zod";
|
|
2616
|
+
var pcb_silkscreen_circle = z125.object({
|
|
2617
|
+
type: z125.literal("pcb_silkscreen_circle"),
|
|
2602
2618
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2603
2619
|
"pcb_silkscreen_circle"
|
|
2604
2620
|
),
|
|
2605
|
-
pcb_component_id:
|
|
2606
|
-
pcb_group_id:
|
|
2607
|
-
subcircuit_id:
|
|
2621
|
+
pcb_component_id: z125.string(),
|
|
2622
|
+
pcb_group_id: z125.string().optional(),
|
|
2623
|
+
subcircuit_id: z125.string().optional(),
|
|
2608
2624
|
center: point,
|
|
2609
2625
|
radius: length,
|
|
2610
2626
|
layer: visible_layer,
|
|
2611
2627
|
stroke_width: length.default("1mm"),
|
|
2612
|
-
is_filled:
|
|
2628
|
+
is_filled: z125.boolean().optional()
|
|
2613
2629
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2614
2630
|
expectTypesMatch(true);
|
|
2615
2631
|
|
|
2616
2632
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2617
|
-
import { z as
|
|
2618
|
-
var pcb_silkscreen_oval =
|
|
2619
|
-
type:
|
|
2633
|
+
import { z as z126 } from "zod";
|
|
2634
|
+
var pcb_silkscreen_oval = z126.object({
|
|
2635
|
+
type: z126.literal("pcb_silkscreen_oval"),
|
|
2620
2636
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2621
|
-
pcb_component_id:
|
|
2622
|
-
pcb_group_id:
|
|
2623
|
-
subcircuit_id:
|
|
2637
|
+
pcb_component_id: z126.string(),
|
|
2638
|
+
pcb_group_id: z126.string().optional(),
|
|
2639
|
+
subcircuit_id: z126.string().optional(),
|
|
2624
2640
|
center: point,
|
|
2625
2641
|
radius_x: distance,
|
|
2626
2642
|
radius_y: distance,
|
|
@@ -2630,265 +2646,265 @@ var pcb_silkscreen_oval = z125.object({
|
|
|
2630
2646
|
expectTypesMatch(true);
|
|
2631
2647
|
|
|
2632
2648
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2633
|
-
import { z as
|
|
2634
|
-
var pcb_silkscreen_graphic_base =
|
|
2635
|
-
type:
|
|
2649
|
+
import { z as z127 } from "zod";
|
|
2650
|
+
var pcb_silkscreen_graphic_base = z127.object({
|
|
2651
|
+
type: z127.literal("pcb_silkscreen_graphic"),
|
|
2636
2652
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2637
2653
|
"pcb_silkscreen_graphic"
|
|
2638
2654
|
),
|
|
2639
|
-
pcb_component_id:
|
|
2640
|
-
pcb_group_id:
|
|
2641
|
-
subcircuit_id:
|
|
2655
|
+
pcb_component_id: z127.string(),
|
|
2656
|
+
pcb_group_id: z127.string().optional(),
|
|
2657
|
+
subcircuit_id: z127.string().optional(),
|
|
2642
2658
|
layer: visible_layer,
|
|
2643
2659
|
image_asset: asset.optional()
|
|
2644
2660
|
});
|
|
2645
2661
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2646
|
-
shape:
|
|
2662
|
+
shape: z127.literal("brep"),
|
|
2647
2663
|
brep_shape
|
|
2648
2664
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2649
2665
|
expectTypesMatch(
|
|
2650
2666
|
true
|
|
2651
2667
|
);
|
|
2652
|
-
var pcb_silkscreen_graphic =
|
|
2668
|
+
var pcb_silkscreen_graphic = z127.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2653
2669
|
expectTypesMatch(true);
|
|
2654
2670
|
|
|
2655
2671
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2656
|
-
import { z as
|
|
2657
|
-
var pcb_silkscreen_pill =
|
|
2658
|
-
type:
|
|
2672
|
+
import { z as z128 } from "zod";
|
|
2673
|
+
var pcb_silkscreen_pill = z128.object({
|
|
2674
|
+
type: z128.literal("pcb_silkscreen_pill"),
|
|
2659
2675
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2660
|
-
pcb_component_id:
|
|
2661
|
-
pcb_group_id:
|
|
2662
|
-
subcircuit_id:
|
|
2676
|
+
pcb_component_id: z128.string(),
|
|
2677
|
+
pcb_group_id: z128.string().optional(),
|
|
2678
|
+
subcircuit_id: z128.string().optional(),
|
|
2663
2679
|
center: point,
|
|
2664
2680
|
width: length,
|
|
2665
2681
|
height: length,
|
|
2666
2682
|
layer: layer_ref,
|
|
2667
|
-
ccw_rotation:
|
|
2683
|
+
ccw_rotation: z128.number().optional()
|
|
2668
2684
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2669
2685
|
expectTypesMatch(true);
|
|
2670
2686
|
|
|
2671
2687
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2672
|
-
import { z as
|
|
2673
|
-
var pcb_fabrication_note_text =
|
|
2674
|
-
type:
|
|
2688
|
+
import { z as z129 } from "zod";
|
|
2689
|
+
var pcb_fabrication_note_text = z129.object({
|
|
2690
|
+
type: z129.literal("pcb_fabrication_note_text"),
|
|
2675
2691
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2676
2692
|
"pcb_fabrication_note_text"
|
|
2677
2693
|
),
|
|
2678
|
-
subcircuit_id:
|
|
2679
|
-
pcb_group_id:
|
|
2680
|
-
font:
|
|
2694
|
+
subcircuit_id: z129.string().optional(),
|
|
2695
|
+
pcb_group_id: z129.string().optional(),
|
|
2696
|
+
font: z129.literal("tscircuit2024").default("tscircuit2024"),
|
|
2681
2697
|
font_size: distance.default("1mm"),
|
|
2682
|
-
pcb_component_id:
|
|
2683
|
-
text:
|
|
2684
|
-
ccw_rotation:
|
|
2698
|
+
pcb_component_id: z129.string(),
|
|
2699
|
+
text: z129.string(),
|
|
2700
|
+
ccw_rotation: z129.number().optional(),
|
|
2685
2701
|
layer: visible_layer,
|
|
2686
2702
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2687
|
-
anchor_alignment:
|
|
2688
|
-
color:
|
|
2703
|
+
anchor_alignment: z129.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2704
|
+
color: z129.string().optional()
|
|
2689
2705
|
}).describe(
|
|
2690
2706
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2691
2707
|
);
|
|
2692
2708
|
expectTypesMatch(true);
|
|
2693
2709
|
|
|
2694
2710
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2695
|
-
import { z as
|
|
2696
|
-
var pcb_fabrication_note_path =
|
|
2697
|
-
type:
|
|
2711
|
+
import { z as z130 } from "zod";
|
|
2712
|
+
var pcb_fabrication_note_path = z130.object({
|
|
2713
|
+
type: z130.literal("pcb_fabrication_note_path"),
|
|
2698
2714
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2699
2715
|
"pcb_fabrication_note_path"
|
|
2700
2716
|
),
|
|
2701
|
-
pcb_component_id:
|
|
2702
|
-
subcircuit_id:
|
|
2717
|
+
pcb_component_id: z130.string(),
|
|
2718
|
+
subcircuit_id: z130.string().optional(),
|
|
2703
2719
|
layer: layer_ref,
|
|
2704
|
-
route:
|
|
2720
|
+
route: z130.array(point),
|
|
2705
2721
|
stroke_width: length,
|
|
2706
|
-
color:
|
|
2722
|
+
color: z130.string().optional()
|
|
2707
2723
|
}).describe(
|
|
2708
2724
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2709
2725
|
);
|
|
2710
2726
|
expectTypesMatch(true);
|
|
2711
2727
|
|
|
2712
2728
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2713
|
-
import { z as
|
|
2714
|
-
var pcb_fabrication_note_rect =
|
|
2715
|
-
type:
|
|
2729
|
+
import { z as z131 } from "zod";
|
|
2730
|
+
var pcb_fabrication_note_rect = z131.object({
|
|
2731
|
+
type: z131.literal("pcb_fabrication_note_rect"),
|
|
2716
2732
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2717
2733
|
"pcb_fabrication_note_rect"
|
|
2718
2734
|
),
|
|
2719
|
-
pcb_component_id:
|
|
2720
|
-
pcb_group_id:
|
|
2721
|
-
subcircuit_id:
|
|
2735
|
+
pcb_component_id: z131.string(),
|
|
2736
|
+
pcb_group_id: z131.string().optional(),
|
|
2737
|
+
subcircuit_id: z131.string().optional(),
|
|
2722
2738
|
center: point,
|
|
2723
2739
|
width: length,
|
|
2724
2740
|
height: length,
|
|
2725
2741
|
layer: visible_layer,
|
|
2726
2742
|
stroke_width: length.default("0.1mm"),
|
|
2727
2743
|
corner_radius: length.optional(),
|
|
2728
|
-
is_filled:
|
|
2729
|
-
has_stroke:
|
|
2730
|
-
is_stroke_dashed:
|
|
2731
|
-
color:
|
|
2744
|
+
is_filled: z131.boolean().optional(),
|
|
2745
|
+
has_stroke: z131.boolean().optional(),
|
|
2746
|
+
is_stroke_dashed: z131.boolean().optional(),
|
|
2747
|
+
color: z131.string().optional()
|
|
2732
2748
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2733
2749
|
expectTypesMatch(true);
|
|
2734
2750
|
|
|
2735
2751
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2736
|
-
import { z as
|
|
2737
|
-
var pcb_fabrication_note_dimension =
|
|
2738
|
-
type:
|
|
2752
|
+
import { z as z132 } from "zod";
|
|
2753
|
+
var pcb_fabrication_note_dimension = z132.object({
|
|
2754
|
+
type: z132.literal("pcb_fabrication_note_dimension"),
|
|
2739
2755
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2740
2756
|
"pcb_fabrication_note_dimension"
|
|
2741
2757
|
),
|
|
2742
|
-
pcb_component_id:
|
|
2743
|
-
pcb_group_id:
|
|
2744
|
-
subcircuit_id:
|
|
2758
|
+
pcb_component_id: z132.string(),
|
|
2759
|
+
pcb_group_id: z132.string().optional(),
|
|
2760
|
+
subcircuit_id: z132.string().optional(),
|
|
2745
2761
|
layer: visible_layer,
|
|
2746
2762
|
from: point,
|
|
2747
2763
|
to: point,
|
|
2748
|
-
text:
|
|
2749
|
-
text_ccw_rotation:
|
|
2764
|
+
text: z132.string().optional(),
|
|
2765
|
+
text_ccw_rotation: z132.number().optional(),
|
|
2750
2766
|
offset: length.optional(),
|
|
2751
2767
|
offset_distance: length.optional(),
|
|
2752
|
-
offset_direction:
|
|
2753
|
-
x:
|
|
2754
|
-
y:
|
|
2768
|
+
offset_direction: z132.object({
|
|
2769
|
+
x: z132.number(),
|
|
2770
|
+
y: z132.number()
|
|
2755
2771
|
}).optional(),
|
|
2756
|
-
font:
|
|
2772
|
+
font: z132.literal("tscircuit2024").default("tscircuit2024"),
|
|
2757
2773
|
font_size: length.default("1mm"),
|
|
2758
|
-
color:
|
|
2774
|
+
color: z132.string().optional(),
|
|
2759
2775
|
arrow_size: length.default("1mm")
|
|
2760
2776
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2761
2777
|
expectTypesMatch(true);
|
|
2762
2778
|
|
|
2763
2779
|
// src/pcb/pcb_note_text.ts
|
|
2764
|
-
import { z as
|
|
2765
|
-
var pcb_note_text =
|
|
2766
|
-
type:
|
|
2780
|
+
import { z as z133 } from "zod";
|
|
2781
|
+
var pcb_note_text = z133.object({
|
|
2782
|
+
type: z133.literal("pcb_note_text"),
|
|
2767
2783
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2768
|
-
pcb_component_id:
|
|
2769
|
-
pcb_group_id:
|
|
2770
|
-
subcircuit_id:
|
|
2771
|
-
name:
|
|
2772
|
-
font:
|
|
2784
|
+
pcb_component_id: z133.string().optional(),
|
|
2785
|
+
pcb_group_id: z133.string().optional(),
|
|
2786
|
+
subcircuit_id: z133.string().optional(),
|
|
2787
|
+
name: z133.string().optional(),
|
|
2788
|
+
font: z133.literal("tscircuit2024").default("tscircuit2024"),
|
|
2773
2789
|
font_size: distance.default("1mm"),
|
|
2774
|
-
text:
|
|
2790
|
+
text: z133.string().optional(),
|
|
2775
2791
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2776
|
-
anchor_alignment:
|
|
2792
|
+
anchor_alignment: z133.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2777
2793
|
layer: visible_layer.default("top"),
|
|
2778
|
-
is_mirrored_from_top_view:
|
|
2779
|
-
color:
|
|
2794
|
+
is_mirrored_from_top_view: z133.boolean().optional(),
|
|
2795
|
+
color: z133.string().optional()
|
|
2780
2796
|
}).describe("Defines a documentation note in text on the PCB");
|
|
2781
2797
|
expectTypesMatch(true);
|
|
2782
2798
|
|
|
2783
2799
|
// src/pcb/pcb_note_rect.ts
|
|
2784
|
-
import { z as
|
|
2785
|
-
var pcb_note_rect =
|
|
2786
|
-
type:
|
|
2800
|
+
import { z as z134 } from "zod";
|
|
2801
|
+
var pcb_note_rect = z134.object({
|
|
2802
|
+
type: z134.literal("pcb_note_rect"),
|
|
2787
2803
|
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2788
|
-
pcb_component_id:
|
|
2789
|
-
pcb_group_id:
|
|
2790
|
-
subcircuit_id:
|
|
2791
|
-
name:
|
|
2792
|
-
text:
|
|
2804
|
+
pcb_component_id: z134.string().optional(),
|
|
2805
|
+
pcb_group_id: z134.string().optional(),
|
|
2806
|
+
subcircuit_id: z134.string().optional(),
|
|
2807
|
+
name: z134.string().optional(),
|
|
2808
|
+
text: z134.string().optional(),
|
|
2793
2809
|
center: point,
|
|
2794
2810
|
width: length,
|
|
2795
2811
|
height: length,
|
|
2796
2812
|
layer: visible_layer.default("top"),
|
|
2797
2813
|
stroke_width: length.default("0.1mm"),
|
|
2798
2814
|
corner_radius: length.optional(),
|
|
2799
|
-
is_filled:
|
|
2800
|
-
has_stroke:
|
|
2801
|
-
is_stroke_dashed:
|
|
2802
|
-
color:
|
|
2815
|
+
is_filled: z134.boolean().optional(),
|
|
2816
|
+
has_stroke: z134.boolean().optional(),
|
|
2817
|
+
is_stroke_dashed: z134.boolean().optional(),
|
|
2818
|
+
color: z134.string().optional()
|
|
2803
2819
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2804
2820
|
expectTypesMatch(true);
|
|
2805
2821
|
|
|
2806
2822
|
// src/pcb/pcb_note_path.ts
|
|
2807
|
-
import { z as
|
|
2808
|
-
var pcb_note_path =
|
|
2809
|
-
type:
|
|
2823
|
+
import { z as z135 } from "zod";
|
|
2824
|
+
var pcb_note_path = z135.object({
|
|
2825
|
+
type: z135.literal("pcb_note_path"),
|
|
2810
2826
|
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2811
|
-
pcb_component_id:
|
|
2812
|
-
pcb_group_id:
|
|
2813
|
-
subcircuit_id:
|
|
2814
|
-
name:
|
|
2815
|
-
text:
|
|
2816
|
-
route:
|
|
2827
|
+
pcb_component_id: z135.string().optional(),
|
|
2828
|
+
pcb_group_id: z135.string().optional(),
|
|
2829
|
+
subcircuit_id: z135.string().optional(),
|
|
2830
|
+
name: z135.string().optional(),
|
|
2831
|
+
text: z135.string().optional(),
|
|
2832
|
+
route: z135.array(point),
|
|
2817
2833
|
layer: visible_layer.default("top"),
|
|
2818
2834
|
stroke_width: length.default("0.1mm"),
|
|
2819
|
-
color:
|
|
2835
|
+
color: z135.string().optional()
|
|
2820
2836
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
2821
2837
|
expectTypesMatch(true);
|
|
2822
2838
|
|
|
2823
2839
|
// src/pcb/pcb_note_line.ts
|
|
2824
|
-
import { z as
|
|
2825
|
-
var pcb_note_line =
|
|
2826
|
-
type:
|
|
2840
|
+
import { z as z136 } from "zod";
|
|
2841
|
+
var pcb_note_line = z136.object({
|
|
2842
|
+
type: z136.literal("pcb_note_line"),
|
|
2827
2843
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2828
|
-
pcb_component_id:
|
|
2829
|
-
pcb_group_id:
|
|
2830
|
-
subcircuit_id:
|
|
2831
|
-
name:
|
|
2832
|
-
text:
|
|
2844
|
+
pcb_component_id: z136.string().optional(),
|
|
2845
|
+
pcb_group_id: z136.string().optional(),
|
|
2846
|
+
subcircuit_id: z136.string().optional(),
|
|
2847
|
+
name: z136.string().optional(),
|
|
2848
|
+
text: z136.string().optional(),
|
|
2833
2849
|
x1: distance,
|
|
2834
2850
|
y1: distance,
|
|
2835
2851
|
x2: distance,
|
|
2836
2852
|
y2: distance,
|
|
2837
2853
|
layer: visible_layer.default("top"),
|
|
2838
2854
|
stroke_width: distance.default("0.1mm"),
|
|
2839
|
-
color:
|
|
2840
|
-
is_dashed:
|
|
2855
|
+
color: z136.string().optional(),
|
|
2856
|
+
is_dashed: z136.boolean().optional()
|
|
2841
2857
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2842
2858
|
expectTypesMatch(true);
|
|
2843
2859
|
|
|
2844
2860
|
// src/pcb/pcb_note_dimension.ts
|
|
2845
|
-
import { z as
|
|
2846
|
-
var pcb_note_dimension =
|
|
2847
|
-
type:
|
|
2861
|
+
import { z as z137 } from "zod";
|
|
2862
|
+
var pcb_note_dimension = z137.object({
|
|
2863
|
+
type: z137.literal("pcb_note_dimension"),
|
|
2848
2864
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2849
|
-
pcb_component_id:
|
|
2850
|
-
pcb_group_id:
|
|
2851
|
-
subcircuit_id:
|
|
2852
|
-
name:
|
|
2865
|
+
pcb_component_id: z137.string().optional(),
|
|
2866
|
+
pcb_group_id: z137.string().optional(),
|
|
2867
|
+
subcircuit_id: z137.string().optional(),
|
|
2868
|
+
name: z137.string().optional(),
|
|
2853
2869
|
from: point,
|
|
2854
2870
|
to: point,
|
|
2855
|
-
text:
|
|
2856
|
-
text_ccw_rotation:
|
|
2871
|
+
text: z137.string().optional(),
|
|
2872
|
+
text_ccw_rotation: z137.number().optional(),
|
|
2857
2873
|
offset_distance: length.optional(),
|
|
2858
|
-
offset_direction:
|
|
2859
|
-
x:
|
|
2860
|
-
y:
|
|
2874
|
+
offset_direction: z137.object({
|
|
2875
|
+
x: z137.number(),
|
|
2876
|
+
y: z137.number()
|
|
2861
2877
|
}).optional(),
|
|
2862
|
-
font:
|
|
2878
|
+
font: z137.literal("tscircuit2024").default("tscircuit2024"),
|
|
2863
2879
|
font_size: length.default("1mm"),
|
|
2864
2880
|
layer: visible_layer.default("top"),
|
|
2865
|
-
color:
|
|
2881
|
+
color: z137.string().optional(),
|
|
2866
2882
|
arrow_size: length.default("1mm")
|
|
2867
2883
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2868
2884
|
expectTypesMatch(true);
|
|
2869
2885
|
|
|
2870
2886
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2871
|
-
import { z as
|
|
2887
|
+
import { z as z138 } from "zod";
|
|
2872
2888
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
2873
|
-
type:
|
|
2889
|
+
type: z138.literal("pcb_footprint_overlap_error"),
|
|
2874
2890
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2875
|
-
error_type:
|
|
2876
|
-
pcb_smtpad_ids:
|
|
2877
|
-
pcb_plated_hole_ids:
|
|
2878
|
-
pcb_hole_ids:
|
|
2879
|
-
pcb_keepout_ids:
|
|
2891
|
+
error_type: z138.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2892
|
+
pcb_smtpad_ids: z138.array(z138.string()).optional(),
|
|
2893
|
+
pcb_plated_hole_ids: z138.array(z138.string()).optional(),
|
|
2894
|
+
pcb_hole_ids: z138.array(z138.string()).optional(),
|
|
2895
|
+
pcb_keepout_ids: z138.array(z138.string()).optional()
|
|
2880
2896
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2881
2897
|
expectTypesMatch(
|
|
2882
2898
|
true
|
|
2883
2899
|
);
|
|
2884
2900
|
|
|
2885
2901
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
2886
|
-
import { z as
|
|
2902
|
+
import { z as z139 } from "zod";
|
|
2887
2903
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
2888
|
-
type:
|
|
2904
|
+
type: z139.literal("pcb_courtyard_overlap_error"),
|
|
2889
2905
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2890
|
-
error_type:
|
|
2891
|
-
pcb_component_ids:
|
|
2906
|
+
error_type: z139.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
2907
|
+
pcb_component_ids: z139.tuple([z139.string(), z139.string()])
|
|
2892
2908
|
}).describe(
|
|
2893
2909
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
2894
2910
|
);
|
|
@@ -2897,49 +2913,49 @@ expectTypesMatch(
|
|
|
2897
2913
|
);
|
|
2898
2914
|
|
|
2899
2915
|
// src/pcb/pcb_keepout.ts
|
|
2900
|
-
import { z as
|
|
2901
|
-
var pcb_keepout =
|
|
2902
|
-
type:
|
|
2903
|
-
shape:
|
|
2904
|
-
pcb_group_id:
|
|
2905
|
-
subcircuit_id:
|
|
2916
|
+
import { z as z140 } from "zod";
|
|
2917
|
+
var pcb_keepout = z140.object({
|
|
2918
|
+
type: z140.literal("pcb_keepout"),
|
|
2919
|
+
shape: z140.literal("rect"),
|
|
2920
|
+
pcb_group_id: z140.string().optional(),
|
|
2921
|
+
subcircuit_id: z140.string().optional(),
|
|
2906
2922
|
center: point,
|
|
2907
2923
|
width: distance,
|
|
2908
2924
|
height: distance,
|
|
2909
|
-
pcb_keepout_id:
|
|
2910
|
-
layers:
|
|
2925
|
+
pcb_keepout_id: z140.string(),
|
|
2926
|
+
layers: z140.array(z140.string()),
|
|
2911
2927
|
// Specify layers where the keepout applies
|
|
2912
|
-
description:
|
|
2928
|
+
description: z140.string().optional()
|
|
2913
2929
|
// Optional description of the keepout
|
|
2914
2930
|
}).or(
|
|
2915
|
-
|
|
2916
|
-
type:
|
|
2917
|
-
shape:
|
|
2918
|
-
pcb_group_id:
|
|
2919
|
-
subcircuit_id:
|
|
2931
|
+
z140.object({
|
|
2932
|
+
type: z140.literal("pcb_keepout"),
|
|
2933
|
+
shape: z140.literal("circle"),
|
|
2934
|
+
pcb_group_id: z140.string().optional(),
|
|
2935
|
+
subcircuit_id: z140.string().optional(),
|
|
2920
2936
|
center: point,
|
|
2921
2937
|
radius: distance,
|
|
2922
|
-
pcb_keepout_id:
|
|
2923
|
-
layers:
|
|
2938
|
+
pcb_keepout_id: z140.string(),
|
|
2939
|
+
layers: z140.array(z140.string()),
|
|
2924
2940
|
// Specify layers where the keepout applies
|
|
2925
|
-
description:
|
|
2941
|
+
description: z140.string().optional()
|
|
2926
2942
|
// Optional description of the keepout
|
|
2927
2943
|
})
|
|
2928
2944
|
);
|
|
2929
2945
|
expectTypesMatch(true);
|
|
2930
2946
|
|
|
2931
2947
|
// src/pcb/pcb_cutout.ts
|
|
2932
|
-
import { z as
|
|
2933
|
-
var pcb_cutout_base =
|
|
2934
|
-
type:
|
|
2948
|
+
import { z as z141 } from "zod";
|
|
2949
|
+
var pcb_cutout_base = z141.object({
|
|
2950
|
+
type: z141.literal("pcb_cutout"),
|
|
2935
2951
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2936
|
-
pcb_group_id:
|
|
2937
|
-
subcircuit_id:
|
|
2938
|
-
pcb_board_id:
|
|
2939
|
-
pcb_panel_id:
|
|
2952
|
+
pcb_group_id: z141.string().optional(),
|
|
2953
|
+
subcircuit_id: z141.string().optional(),
|
|
2954
|
+
pcb_board_id: z141.string().optional(),
|
|
2955
|
+
pcb_panel_id: z141.string().optional()
|
|
2940
2956
|
});
|
|
2941
2957
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2942
|
-
shape:
|
|
2958
|
+
shape: z141.literal("rect"),
|
|
2943
2959
|
center: point,
|
|
2944
2960
|
width: length,
|
|
2945
2961
|
height: length,
|
|
@@ -2948,26 +2964,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2948
2964
|
});
|
|
2949
2965
|
expectTypesMatch(true);
|
|
2950
2966
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2951
|
-
shape:
|
|
2967
|
+
shape: z141.literal("circle"),
|
|
2952
2968
|
center: point,
|
|
2953
2969
|
radius: length
|
|
2954
2970
|
});
|
|
2955
2971
|
expectTypesMatch(true);
|
|
2956
2972
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2957
|
-
shape:
|
|
2958
|
-
points:
|
|
2973
|
+
shape: z141.literal("polygon"),
|
|
2974
|
+
points: z141.array(point)
|
|
2959
2975
|
});
|
|
2960
2976
|
expectTypesMatch(true);
|
|
2961
2977
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2962
|
-
shape:
|
|
2963
|
-
route:
|
|
2978
|
+
shape: z141.literal("path"),
|
|
2979
|
+
route: z141.array(point),
|
|
2964
2980
|
slot_width: length,
|
|
2965
2981
|
slot_length: length.optional(),
|
|
2966
2982
|
space_between_slots: length.optional(),
|
|
2967
2983
|
slot_corner_radius: length.optional()
|
|
2968
2984
|
});
|
|
2969
2985
|
expectTypesMatch(true);
|
|
2970
|
-
var pcb_cutout =
|
|
2986
|
+
var pcb_cutout = z141.discriminatedUnion("shape", [
|
|
2971
2987
|
pcb_cutout_rect,
|
|
2972
2988
|
pcb_cutout_circle,
|
|
2973
2989
|
pcb_cutout_polygon,
|
|
@@ -2976,169 +2992,169 @@ var pcb_cutout = z140.discriminatedUnion("shape", [
|
|
|
2976
2992
|
expectTypesMatch(true);
|
|
2977
2993
|
|
|
2978
2994
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2979
|
-
import { z as
|
|
2995
|
+
import { z as z142 } from "zod";
|
|
2980
2996
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
2981
|
-
type:
|
|
2997
|
+
type: z142.literal("pcb_missing_footprint_error"),
|
|
2982
2998
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2983
2999
|
"pcb_missing_footprint_error"
|
|
2984
3000
|
),
|
|
2985
|
-
pcb_group_id:
|
|
2986
|
-
subcircuit_id:
|
|
2987
|
-
error_type:
|
|
2988
|
-
source_component_id:
|
|
3001
|
+
pcb_group_id: z142.string().optional(),
|
|
3002
|
+
subcircuit_id: z142.string().optional(),
|
|
3003
|
+
error_type: z142.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3004
|
+
source_component_id: z142.string()
|
|
2989
3005
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2990
3006
|
expectTypesMatch(
|
|
2991
3007
|
true
|
|
2992
3008
|
);
|
|
2993
3009
|
|
|
2994
3010
|
// src/pcb/external_footprint_load_error.ts
|
|
2995
|
-
import { z as
|
|
3011
|
+
import { z as z143 } from "zod";
|
|
2996
3012
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
2997
|
-
type:
|
|
3013
|
+
type: z143.literal("external_footprint_load_error"),
|
|
2998
3014
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2999
3015
|
"external_footprint_load_error"
|
|
3000
3016
|
),
|
|
3001
|
-
pcb_component_id:
|
|
3002
|
-
source_component_id:
|
|
3003
|
-
pcb_group_id:
|
|
3004
|
-
subcircuit_id:
|
|
3005
|
-
footprinter_string:
|
|
3006
|
-
error_type:
|
|
3017
|
+
pcb_component_id: z143.string(),
|
|
3018
|
+
source_component_id: z143.string(),
|
|
3019
|
+
pcb_group_id: z143.string().optional(),
|
|
3020
|
+
subcircuit_id: z143.string().optional(),
|
|
3021
|
+
footprinter_string: z143.string().optional(),
|
|
3022
|
+
error_type: z143.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3007
3023
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3008
3024
|
expectTypesMatch(true);
|
|
3009
3025
|
|
|
3010
3026
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3011
|
-
import { z as
|
|
3027
|
+
import { z as z144 } from "zod";
|
|
3012
3028
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3013
|
-
type:
|
|
3029
|
+
type: z144.literal("circuit_json_footprint_load_error"),
|
|
3014
3030
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3015
3031
|
"circuit_json_footprint_load_error"
|
|
3016
3032
|
),
|
|
3017
|
-
pcb_component_id:
|
|
3018
|
-
source_component_id:
|
|
3019
|
-
pcb_group_id:
|
|
3020
|
-
subcircuit_id:
|
|
3021
|
-
error_type:
|
|
3022
|
-
circuit_json:
|
|
3033
|
+
pcb_component_id: z144.string(),
|
|
3034
|
+
source_component_id: z144.string(),
|
|
3035
|
+
pcb_group_id: z144.string().optional(),
|
|
3036
|
+
subcircuit_id: z144.string().optional(),
|
|
3037
|
+
error_type: z144.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3038
|
+
circuit_json: z144.array(z144.any()).optional()
|
|
3023
3039
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3024
3040
|
expectTypesMatch(true);
|
|
3025
3041
|
|
|
3026
3042
|
// src/pcb/pcb_group.ts
|
|
3027
|
-
import { z as
|
|
3028
|
-
var pcb_group =
|
|
3029
|
-
type:
|
|
3043
|
+
import { z as z145 } from "zod";
|
|
3044
|
+
var pcb_group = z145.object({
|
|
3045
|
+
type: z145.literal("pcb_group"),
|
|
3030
3046
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3031
|
-
source_group_id:
|
|
3032
|
-
is_subcircuit:
|
|
3033
|
-
subcircuit_id:
|
|
3047
|
+
source_group_id: z145.string(),
|
|
3048
|
+
is_subcircuit: z145.boolean().optional(),
|
|
3049
|
+
subcircuit_id: z145.string().optional(),
|
|
3034
3050
|
width: length.optional(),
|
|
3035
3051
|
height: length.optional(),
|
|
3036
3052
|
center: point,
|
|
3037
|
-
display_offset_x:
|
|
3053
|
+
display_offset_x: z145.string().optional().describe(
|
|
3038
3054
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3039
3055
|
),
|
|
3040
|
-
display_offset_y:
|
|
3056
|
+
display_offset_y: z145.string().optional().describe(
|
|
3041
3057
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3042
3058
|
),
|
|
3043
|
-
outline:
|
|
3059
|
+
outline: z145.array(point).optional(),
|
|
3044
3060
|
anchor_position: point.optional(),
|
|
3045
3061
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3046
|
-
position_mode:
|
|
3047
|
-
positioned_relative_to_pcb_group_id:
|
|
3048
|
-
positioned_relative_to_pcb_board_id:
|
|
3049
|
-
pcb_component_ids:
|
|
3050
|
-
child_layout_mode:
|
|
3051
|
-
name:
|
|
3052
|
-
description:
|
|
3053
|
-
layout_mode:
|
|
3054
|
-
autorouter_configuration:
|
|
3062
|
+
position_mode: z145.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3063
|
+
positioned_relative_to_pcb_group_id: z145.string().optional(),
|
|
3064
|
+
positioned_relative_to_pcb_board_id: z145.string().optional(),
|
|
3065
|
+
pcb_component_ids: z145.array(z145.string()),
|
|
3066
|
+
child_layout_mode: z145.enum(["packed", "none"]).optional(),
|
|
3067
|
+
name: z145.string().optional(),
|
|
3068
|
+
description: z145.string().optional(),
|
|
3069
|
+
layout_mode: z145.string().optional(),
|
|
3070
|
+
autorouter_configuration: z145.object({
|
|
3055
3071
|
trace_clearance: length
|
|
3056
3072
|
}).optional(),
|
|
3057
|
-
autorouter_used_string:
|
|
3073
|
+
autorouter_used_string: z145.string().optional()
|
|
3058
3074
|
}).describe("Defines a group of components on the PCB");
|
|
3059
3075
|
expectTypesMatch(true);
|
|
3060
3076
|
|
|
3061
3077
|
// src/pcb/pcb_autorouting_error.ts
|
|
3062
|
-
import { z as
|
|
3078
|
+
import { z as z146 } from "zod";
|
|
3063
3079
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3064
|
-
type:
|
|
3080
|
+
type: z146.literal("pcb_autorouting_error"),
|
|
3065
3081
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3066
|
-
error_type:
|
|
3067
|
-
subcircuit_id:
|
|
3082
|
+
error_type: z146.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3083
|
+
subcircuit_id: z146.string().optional()
|
|
3068
3084
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3069
3085
|
expectTypesMatch(true);
|
|
3070
3086
|
|
|
3071
3087
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3072
|
-
import { z as
|
|
3073
|
-
var pcb_manual_edit_conflict_warning =
|
|
3074
|
-
type:
|
|
3088
|
+
import { z as z147 } from "zod";
|
|
3089
|
+
var pcb_manual_edit_conflict_warning = z147.object({
|
|
3090
|
+
type: z147.literal("pcb_manual_edit_conflict_warning"),
|
|
3075
3091
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3076
3092
|
"pcb_manual_edit_conflict_warning"
|
|
3077
3093
|
),
|
|
3078
|
-
warning_type:
|
|
3079
|
-
message:
|
|
3080
|
-
pcb_component_id:
|
|
3081
|
-
pcb_group_id:
|
|
3082
|
-
subcircuit_id:
|
|
3083
|
-
source_component_id:
|
|
3094
|
+
warning_type: z147.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3095
|
+
message: z147.string(),
|
|
3096
|
+
pcb_component_id: z147.string(),
|
|
3097
|
+
pcb_group_id: z147.string().optional(),
|
|
3098
|
+
subcircuit_id: z147.string().optional(),
|
|
3099
|
+
source_component_id: z147.string()
|
|
3084
3100
|
}).describe(
|
|
3085
3101
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3086
3102
|
);
|
|
3087
3103
|
expectTypesMatch(true);
|
|
3088
3104
|
|
|
3089
3105
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3090
|
-
import { z as
|
|
3091
|
-
var connectorOrientationDirection =
|
|
3092
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3093
|
-
type:
|
|
3106
|
+
import { z as z148 } from "zod";
|
|
3107
|
+
var connectorOrientationDirection = z148.enum(["x-", "x+", "y+", "y-"]);
|
|
3108
|
+
var pcb_connector_not_in_accessible_orientation_warning = z148.object({
|
|
3109
|
+
type: z148.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3094
3110
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3095
3111
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3096
3112
|
),
|
|
3097
|
-
warning_type:
|
|
3098
|
-
message:
|
|
3099
|
-
pcb_component_id:
|
|
3100
|
-
source_component_id:
|
|
3101
|
-
pcb_board_id:
|
|
3113
|
+
warning_type: z148.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3114
|
+
message: z148.string(),
|
|
3115
|
+
pcb_component_id: z148.string(),
|
|
3116
|
+
source_component_id: z148.string().optional(),
|
|
3117
|
+
pcb_board_id: z148.string().optional(),
|
|
3102
3118
|
facing_direction: connectorOrientationDirection,
|
|
3103
3119
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3104
|
-
subcircuit_id:
|
|
3120
|
+
subcircuit_id: z148.string().optional()
|
|
3105
3121
|
}).describe(
|
|
3106
3122
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3107
3123
|
);
|
|
3108
3124
|
expectTypesMatch(true);
|
|
3109
3125
|
|
|
3110
3126
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3111
|
-
import { z as
|
|
3112
|
-
var supplier_footprint_mismatch_warning =
|
|
3113
|
-
type:
|
|
3127
|
+
import { z as z149 } from "zod";
|
|
3128
|
+
var supplier_footprint_mismatch_warning = z149.object({
|
|
3129
|
+
type: z149.literal("supplier_footprint_mismatch_warning"),
|
|
3114
3130
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3115
3131
|
"supplier_footprint_mismatch_warning"
|
|
3116
3132
|
),
|
|
3117
|
-
warning_type:
|
|
3118
|
-
message:
|
|
3119
|
-
source_component_id:
|
|
3120
|
-
pcb_component_id:
|
|
3121
|
-
pcb_group_id:
|
|
3122
|
-
subcircuit_id:
|
|
3133
|
+
warning_type: z149.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3134
|
+
message: z149.string(),
|
|
3135
|
+
source_component_id: z149.string(),
|
|
3136
|
+
pcb_component_id: z149.string().optional(),
|
|
3137
|
+
pcb_group_id: z149.string().optional(),
|
|
3138
|
+
subcircuit_id: z149.string().optional(),
|
|
3123
3139
|
supplier_name: supplier_name.optional(),
|
|
3124
|
-
supplier_part_number:
|
|
3125
|
-
supplier_footprint_url:
|
|
3126
|
-
footprint_copper_intersection_over_union:
|
|
3140
|
+
supplier_part_number: z149.string().optional(),
|
|
3141
|
+
supplier_footprint_url: z149.string().optional(),
|
|
3142
|
+
footprint_copper_intersection_over_union: z149.number()
|
|
3127
3143
|
}).describe(
|
|
3128
3144
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3129
3145
|
);
|
|
3130
3146
|
expectTypesMatch(true);
|
|
3131
3147
|
|
|
3132
3148
|
// src/pcb/pcb_breakout_point.ts
|
|
3133
|
-
import { z as
|
|
3134
|
-
var pcb_breakout_point =
|
|
3135
|
-
type:
|
|
3149
|
+
import { z as z150 } from "zod";
|
|
3150
|
+
var pcb_breakout_point = z150.object({
|
|
3151
|
+
type: z150.literal("pcb_breakout_point"),
|
|
3136
3152
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3137
|
-
pcb_group_id:
|
|
3138
|
-
subcircuit_id:
|
|
3139
|
-
source_trace_id:
|
|
3140
|
-
source_port_id:
|
|
3141
|
-
source_net_id:
|
|
3153
|
+
pcb_group_id: z150.string(),
|
|
3154
|
+
subcircuit_id: z150.string().optional(),
|
|
3155
|
+
source_trace_id: z150.string().optional(),
|
|
3156
|
+
source_port_id: z150.string().optional(),
|
|
3157
|
+
source_net_id: z150.string().optional(),
|
|
3142
3158
|
x: distance,
|
|
3143
3159
|
y: distance
|
|
3144
3160
|
}).describe(
|
|
@@ -3147,61 +3163,61 @@ var pcb_breakout_point = z149.object({
|
|
|
3147
3163
|
expectTypesMatch(true);
|
|
3148
3164
|
|
|
3149
3165
|
// src/pcb/pcb_ground_plane.ts
|
|
3150
|
-
import { z as
|
|
3151
|
-
var pcb_ground_plane =
|
|
3152
|
-
type:
|
|
3166
|
+
import { z as z151 } from "zod";
|
|
3167
|
+
var pcb_ground_plane = z151.object({
|
|
3168
|
+
type: z151.literal("pcb_ground_plane"),
|
|
3153
3169
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3154
|
-
source_pcb_ground_plane_id:
|
|
3155
|
-
source_net_id:
|
|
3156
|
-
pcb_group_id:
|
|
3157
|
-
subcircuit_id:
|
|
3170
|
+
source_pcb_ground_plane_id: z151.string(),
|
|
3171
|
+
source_net_id: z151.string(),
|
|
3172
|
+
pcb_group_id: z151.string().optional(),
|
|
3173
|
+
subcircuit_id: z151.string().optional()
|
|
3158
3174
|
}).describe("Defines a ground plane on the PCB");
|
|
3159
3175
|
expectTypesMatch(true);
|
|
3160
3176
|
|
|
3161
3177
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3162
|
-
import { z as
|
|
3163
|
-
var pcb_ground_plane_region =
|
|
3164
|
-
type:
|
|
3178
|
+
import { z as z152 } from "zod";
|
|
3179
|
+
var pcb_ground_plane_region = z152.object({
|
|
3180
|
+
type: z152.literal("pcb_ground_plane_region"),
|
|
3165
3181
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3166
3182
|
"pcb_ground_plane_region"
|
|
3167
3183
|
),
|
|
3168
|
-
pcb_ground_plane_id:
|
|
3169
|
-
pcb_group_id:
|
|
3170
|
-
subcircuit_id:
|
|
3184
|
+
pcb_ground_plane_id: z152.string(),
|
|
3185
|
+
pcb_group_id: z152.string().optional(),
|
|
3186
|
+
subcircuit_id: z152.string().optional(),
|
|
3171
3187
|
layer: layer_ref,
|
|
3172
|
-
points:
|
|
3188
|
+
points: z152.array(point)
|
|
3173
3189
|
}).describe("Defines a polygon region of a ground plane");
|
|
3174
3190
|
expectTypesMatch(true);
|
|
3175
3191
|
|
|
3176
3192
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3177
|
-
import { z as
|
|
3178
|
-
var pcb_thermal_spoke =
|
|
3179
|
-
type:
|
|
3193
|
+
import { z as z153 } from "zod";
|
|
3194
|
+
var pcb_thermal_spoke = z153.object({
|
|
3195
|
+
type: z153.literal("pcb_thermal_spoke"),
|
|
3180
3196
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3181
|
-
pcb_ground_plane_id:
|
|
3182
|
-
shape:
|
|
3183
|
-
spoke_count:
|
|
3197
|
+
pcb_ground_plane_id: z153.string(),
|
|
3198
|
+
shape: z153.string(),
|
|
3199
|
+
spoke_count: z153.number(),
|
|
3184
3200
|
spoke_thickness: distance,
|
|
3185
3201
|
spoke_inner_diameter: distance,
|
|
3186
3202
|
spoke_outer_diameter: distance,
|
|
3187
|
-
pcb_plated_hole_id:
|
|
3188
|
-
subcircuit_id:
|
|
3203
|
+
pcb_plated_hole_id: z153.string().optional(),
|
|
3204
|
+
subcircuit_id: z153.string().optional()
|
|
3189
3205
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3190
3206
|
expectTypesMatch(true);
|
|
3191
3207
|
|
|
3192
3208
|
// src/pcb/pcb_copper_pour.ts
|
|
3193
|
-
import { z as
|
|
3194
|
-
var pcb_copper_pour_base =
|
|
3195
|
-
type:
|
|
3209
|
+
import { z as z154 } from "zod";
|
|
3210
|
+
var pcb_copper_pour_base = z154.object({
|
|
3211
|
+
type: z154.literal("pcb_copper_pour"),
|
|
3196
3212
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3197
|
-
pcb_group_id:
|
|
3198
|
-
subcircuit_id:
|
|
3213
|
+
pcb_group_id: z154.string().optional(),
|
|
3214
|
+
subcircuit_id: z154.string().optional(),
|
|
3199
3215
|
layer: layer_ref,
|
|
3200
|
-
source_net_id:
|
|
3201
|
-
covered_with_solder_mask:
|
|
3216
|
+
source_net_id: z154.string().optional(),
|
|
3217
|
+
covered_with_solder_mask: z154.boolean().optional().default(true)
|
|
3202
3218
|
});
|
|
3203
3219
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3204
|
-
shape:
|
|
3220
|
+
shape: z154.literal("rect"),
|
|
3205
3221
|
center: point,
|
|
3206
3222
|
width: length,
|
|
3207
3223
|
height: length,
|
|
@@ -3209,16 +3225,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3209
3225
|
});
|
|
3210
3226
|
expectTypesMatch(true);
|
|
3211
3227
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3212
|
-
shape:
|
|
3228
|
+
shape: z154.literal("brep"),
|
|
3213
3229
|
brep_shape
|
|
3214
3230
|
});
|
|
3215
3231
|
expectTypesMatch(true);
|
|
3216
3232
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3217
|
-
shape:
|
|
3218
|
-
points:
|
|
3233
|
+
shape: z154.literal("polygon"),
|
|
3234
|
+
points: z154.array(point)
|
|
3219
3235
|
});
|
|
3220
3236
|
expectTypesMatch(true);
|
|
3221
|
-
var pcb_copper_pour =
|
|
3237
|
+
var pcb_copper_pour = z154.discriminatedUnion("shape", [
|
|
3222
3238
|
pcb_copper_pour_rect,
|
|
3223
3239
|
pcb_copper_pour_brep,
|
|
3224
3240
|
pcb_copper_pour_polygon
|
|
@@ -3226,99 +3242,99 @@ var pcb_copper_pour = z153.discriminatedUnion("shape", [
|
|
|
3226
3242
|
expectTypesMatch(true);
|
|
3227
3243
|
|
|
3228
3244
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3229
|
-
import { z as
|
|
3245
|
+
import { z as z155 } from "zod";
|
|
3230
3246
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3231
|
-
type:
|
|
3247
|
+
type: z155.literal("pcb_component_outside_board_error"),
|
|
3232
3248
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3233
3249
|
"pcb_component_outside_board_error"
|
|
3234
3250
|
),
|
|
3235
|
-
error_type:
|
|
3236
|
-
pcb_component_id:
|
|
3237
|
-
pcb_board_id:
|
|
3251
|
+
error_type: z155.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3252
|
+
pcb_component_id: z155.string(),
|
|
3253
|
+
pcb_board_id: z155.string(),
|
|
3238
3254
|
component_center: point,
|
|
3239
|
-
component_bounds:
|
|
3240
|
-
min_x:
|
|
3241
|
-
max_x:
|
|
3242
|
-
min_y:
|
|
3243
|
-
max_y:
|
|
3255
|
+
component_bounds: z155.object({
|
|
3256
|
+
min_x: z155.number(),
|
|
3257
|
+
max_x: z155.number(),
|
|
3258
|
+
min_y: z155.number(),
|
|
3259
|
+
max_y: z155.number()
|
|
3244
3260
|
}),
|
|
3245
|
-
subcircuit_id:
|
|
3246
|
-
source_component_id:
|
|
3261
|
+
subcircuit_id: z155.string().optional(),
|
|
3262
|
+
source_component_id: z155.string().optional()
|
|
3247
3263
|
}).describe(
|
|
3248
3264
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3249
3265
|
);
|
|
3250
3266
|
expectTypesMatch(true);
|
|
3251
3267
|
|
|
3252
3268
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3253
|
-
import { z as
|
|
3269
|
+
import { z as z156 } from "zod";
|
|
3254
3270
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3255
|
-
type:
|
|
3271
|
+
type: z156.literal("pcb_component_not_on_board_edge_error"),
|
|
3256
3272
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3257
3273
|
"pcb_component_not_on_board_edge_error"
|
|
3258
3274
|
),
|
|
3259
|
-
error_type:
|
|
3260
|
-
pcb_component_id:
|
|
3261
|
-
pcb_board_id:
|
|
3275
|
+
error_type: z156.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3276
|
+
pcb_component_id: z156.string(),
|
|
3277
|
+
pcb_board_id: z156.string(),
|
|
3262
3278
|
component_center: point,
|
|
3263
|
-
pad_to_nearest_board_edge_distance:
|
|
3264
|
-
source_component_id:
|
|
3265
|
-
subcircuit_id:
|
|
3279
|
+
pad_to_nearest_board_edge_distance: z156.number(),
|
|
3280
|
+
source_component_id: z156.string().optional(),
|
|
3281
|
+
subcircuit_id: z156.string().optional()
|
|
3266
3282
|
}).describe(
|
|
3267
3283
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3268
3284
|
);
|
|
3269
3285
|
expectTypesMatch(true);
|
|
3270
3286
|
|
|
3271
3287
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3272
|
-
import { z as
|
|
3288
|
+
import { z as z157 } from "zod";
|
|
3273
3289
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3274
|
-
type:
|
|
3290
|
+
type: z157.literal("pcb_component_invalid_layer_error"),
|
|
3275
3291
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3276
3292
|
"pcb_component_invalid_layer_error"
|
|
3277
3293
|
),
|
|
3278
|
-
error_type:
|
|
3279
|
-
pcb_component_id:
|
|
3280
|
-
source_component_id:
|
|
3294
|
+
error_type: z157.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3295
|
+
pcb_component_id: z157.string().optional(),
|
|
3296
|
+
source_component_id: z157.string(),
|
|
3281
3297
|
layer: layer_ref,
|
|
3282
|
-
subcircuit_id:
|
|
3298
|
+
subcircuit_id: z157.string().optional()
|
|
3283
3299
|
}).describe(
|
|
3284
3300
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3285
3301
|
);
|
|
3286
3302
|
expectTypesMatch(true);
|
|
3287
3303
|
|
|
3288
3304
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3289
|
-
import { z as
|
|
3305
|
+
import { z as z158 } from "zod";
|
|
3290
3306
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3291
|
-
type:
|
|
3307
|
+
type: z158.literal("pcb_via_clearance_error"),
|
|
3292
3308
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3293
|
-
error_type:
|
|
3294
|
-
pcb_via_ids:
|
|
3309
|
+
error_type: z158.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3310
|
+
pcb_via_ids: z158.array(z158.string()).min(2),
|
|
3295
3311
|
minimum_clearance: distance.optional(),
|
|
3296
3312
|
actual_clearance: distance.optional(),
|
|
3297
|
-
pcb_center:
|
|
3298
|
-
x:
|
|
3299
|
-
y:
|
|
3313
|
+
pcb_center: z158.object({
|
|
3314
|
+
x: z158.number().optional(),
|
|
3315
|
+
y: z158.number().optional()
|
|
3300
3316
|
}).optional(),
|
|
3301
|
-
subcircuit_id:
|
|
3317
|
+
subcircuit_id: z158.string().optional()
|
|
3302
3318
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3303
3319
|
expectTypesMatch(true);
|
|
3304
3320
|
|
|
3305
3321
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3306
|
-
import { z as
|
|
3322
|
+
import { z as z159 } from "zod";
|
|
3307
3323
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3308
|
-
type:
|
|
3324
|
+
type: z159.literal("pcb_via_trace_clearance_error"),
|
|
3309
3325
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3310
3326
|
"pcb_via_trace_clearance_error"
|
|
3311
3327
|
),
|
|
3312
|
-
error_type:
|
|
3313
|
-
pcb_via_id:
|
|
3314
|
-
pcb_trace_id:
|
|
3328
|
+
error_type: z159.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3329
|
+
pcb_via_id: z159.string(),
|
|
3330
|
+
pcb_trace_id: z159.string(),
|
|
3315
3331
|
minimum_clearance: distance.optional(),
|
|
3316
3332
|
actual_clearance: distance.optional(),
|
|
3317
|
-
center:
|
|
3318
|
-
x:
|
|
3319
|
-
y:
|
|
3333
|
+
center: z159.object({
|
|
3334
|
+
x: z159.number().optional(),
|
|
3335
|
+
y: z159.number().optional()
|
|
3320
3336
|
}).optional(),
|
|
3321
|
-
subcircuit_id:
|
|
3337
|
+
subcircuit_id: z159.string().optional()
|
|
3322
3338
|
}).describe(
|
|
3323
3339
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3324
3340
|
);
|
|
@@ -3327,41 +3343,41 @@ expectTypesMatch(
|
|
|
3327
3343
|
);
|
|
3328
3344
|
|
|
3329
3345
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3330
|
-
import { z as
|
|
3346
|
+
import { z as z160 } from "zod";
|
|
3331
3347
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3332
|
-
type:
|
|
3348
|
+
type: z160.literal("pcb_pad_pad_clearance_error"),
|
|
3333
3349
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3334
3350
|
"pcb_pad_pad_clearance_error"
|
|
3335
3351
|
),
|
|
3336
|
-
error_type:
|
|
3337
|
-
pcb_pad_ids:
|
|
3352
|
+
error_type: z160.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3353
|
+
pcb_pad_ids: z160.array(z160.string()).min(2),
|
|
3338
3354
|
minimum_clearance: distance.optional(),
|
|
3339
3355
|
actual_clearance: distance.optional(),
|
|
3340
|
-
center:
|
|
3341
|
-
x:
|
|
3342
|
-
y:
|
|
3356
|
+
center: z160.object({
|
|
3357
|
+
x: z160.number().optional(),
|
|
3358
|
+
y: z160.number().optional()
|
|
3343
3359
|
}).optional(),
|
|
3344
|
-
subcircuit_id:
|
|
3360
|
+
subcircuit_id: z160.string().optional()
|
|
3345
3361
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3346
3362
|
expectTypesMatch(true);
|
|
3347
3363
|
|
|
3348
3364
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3349
|
-
import { z as
|
|
3365
|
+
import { z as z161 } from "zod";
|
|
3350
3366
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3351
|
-
type:
|
|
3367
|
+
type: z161.literal("pcb_pad_trace_clearance_error"),
|
|
3352
3368
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3353
3369
|
"pcb_pad_trace_clearance_error"
|
|
3354
3370
|
),
|
|
3355
|
-
error_type:
|
|
3356
|
-
pcb_pad_id:
|
|
3357
|
-
pcb_trace_id:
|
|
3371
|
+
error_type: z161.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3372
|
+
pcb_pad_id: z161.string(),
|
|
3373
|
+
pcb_trace_id: z161.string(),
|
|
3358
3374
|
minimum_clearance: distance.optional(),
|
|
3359
3375
|
actual_clearance: distance.optional(),
|
|
3360
|
-
center:
|
|
3361
|
-
x:
|
|
3362
|
-
y:
|
|
3376
|
+
center: z161.object({
|
|
3377
|
+
x: z161.number().optional(),
|
|
3378
|
+
y: z161.number().optional()
|
|
3363
3379
|
}).optional(),
|
|
3364
|
-
subcircuit_id:
|
|
3380
|
+
subcircuit_id: z161.string().optional()
|
|
3365
3381
|
}).describe(
|
|
3366
3382
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3367
3383
|
);
|
|
@@ -3370,89 +3386,89 @@ expectTypesMatch(
|
|
|
3370
3386
|
);
|
|
3371
3387
|
|
|
3372
3388
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3373
|
-
import { z as
|
|
3374
|
-
var pcb_courtyard_rect =
|
|
3375
|
-
type:
|
|
3389
|
+
import { z as z162 } from "zod";
|
|
3390
|
+
var pcb_courtyard_rect = z162.object({
|
|
3391
|
+
type: z162.literal("pcb_courtyard_rect"),
|
|
3376
3392
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3377
|
-
pcb_component_id:
|
|
3378
|
-
pcb_group_id:
|
|
3379
|
-
subcircuit_id:
|
|
3393
|
+
pcb_component_id: z162.string(),
|
|
3394
|
+
pcb_group_id: z162.string().optional(),
|
|
3395
|
+
subcircuit_id: z162.string().optional(),
|
|
3380
3396
|
center: point,
|
|
3381
3397
|
width: length,
|
|
3382
3398
|
height: length,
|
|
3383
3399
|
layer: visible_layer,
|
|
3384
3400
|
ccw_rotation: rotation.optional(),
|
|
3385
|
-
color:
|
|
3401
|
+
color: z162.string().optional()
|
|
3386
3402
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3387
3403
|
expectTypesMatch(true);
|
|
3388
3404
|
|
|
3389
3405
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3390
|
-
import { z as
|
|
3391
|
-
var pcb_courtyard_outline =
|
|
3392
|
-
type:
|
|
3406
|
+
import { z as z163 } from "zod";
|
|
3407
|
+
var pcb_courtyard_outline = z163.object({
|
|
3408
|
+
type: z163.literal("pcb_courtyard_outline"),
|
|
3393
3409
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3394
3410
|
"pcb_courtyard_outline"
|
|
3395
3411
|
),
|
|
3396
|
-
pcb_component_id:
|
|
3397
|
-
pcb_group_id:
|
|
3398
|
-
subcircuit_id:
|
|
3412
|
+
pcb_component_id: z163.string(),
|
|
3413
|
+
pcb_group_id: z163.string().optional(),
|
|
3414
|
+
subcircuit_id: z163.string().optional(),
|
|
3399
3415
|
layer: visible_layer,
|
|
3400
|
-
outline:
|
|
3416
|
+
outline: z163.array(point).min(2)
|
|
3401
3417
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3402
3418
|
expectTypesMatch(true);
|
|
3403
3419
|
|
|
3404
3420
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3405
|
-
import { z as
|
|
3406
|
-
var pcb_courtyard_polygon =
|
|
3407
|
-
type:
|
|
3421
|
+
import { z as z164 } from "zod";
|
|
3422
|
+
var pcb_courtyard_polygon = z164.object({
|
|
3423
|
+
type: z164.literal("pcb_courtyard_polygon"),
|
|
3408
3424
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3409
3425
|
"pcb_courtyard_polygon"
|
|
3410
3426
|
),
|
|
3411
|
-
pcb_component_id:
|
|
3412
|
-
pcb_group_id:
|
|
3413
|
-
subcircuit_id:
|
|
3427
|
+
pcb_component_id: z164.string(),
|
|
3428
|
+
pcb_group_id: z164.string().optional(),
|
|
3429
|
+
subcircuit_id: z164.string().optional(),
|
|
3414
3430
|
layer: visible_layer,
|
|
3415
|
-
points:
|
|
3416
|
-
color:
|
|
3431
|
+
points: z164.array(point).min(3),
|
|
3432
|
+
color: z164.string().optional()
|
|
3417
3433
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3418
3434
|
expectTypesMatch(true);
|
|
3419
3435
|
|
|
3420
3436
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3421
|
-
import { z as
|
|
3422
|
-
var pcb_courtyard_circle =
|
|
3423
|
-
type:
|
|
3437
|
+
import { z as z165 } from "zod";
|
|
3438
|
+
var pcb_courtyard_circle = z165.object({
|
|
3439
|
+
type: z165.literal("pcb_courtyard_circle"),
|
|
3424
3440
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3425
3441
|
"pcb_courtyard_circle"
|
|
3426
3442
|
),
|
|
3427
|
-
pcb_component_id:
|
|
3428
|
-
pcb_group_id:
|
|
3429
|
-
subcircuit_id:
|
|
3443
|
+
pcb_component_id: z165.string(),
|
|
3444
|
+
pcb_group_id: z165.string().optional(),
|
|
3445
|
+
subcircuit_id: z165.string().optional(),
|
|
3430
3446
|
center: point,
|
|
3431
3447
|
radius: length,
|
|
3432
3448
|
layer: visible_layer,
|
|
3433
|
-
color:
|
|
3449
|
+
color: z165.string().optional()
|
|
3434
3450
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3435
3451
|
expectTypesMatch(true);
|
|
3436
3452
|
|
|
3437
3453
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3438
|
-
import { z as
|
|
3439
|
-
var pcb_courtyard_pill =
|
|
3440
|
-
type:
|
|
3454
|
+
import { z as z166 } from "zod";
|
|
3455
|
+
var pcb_courtyard_pill = z166.object({
|
|
3456
|
+
type: z166.literal("pcb_courtyard_pill"),
|
|
3441
3457
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3442
|
-
pcb_component_id:
|
|
3443
|
-
pcb_group_id:
|
|
3444
|
-
subcircuit_id:
|
|
3458
|
+
pcb_component_id: z166.string(),
|
|
3459
|
+
pcb_group_id: z166.string().optional(),
|
|
3460
|
+
subcircuit_id: z166.string().optional(),
|
|
3445
3461
|
center: point,
|
|
3446
3462
|
width: length,
|
|
3447
3463
|
height: length,
|
|
3448
3464
|
radius: length,
|
|
3449
3465
|
layer: visible_layer,
|
|
3450
|
-
color:
|
|
3466
|
+
color: z166.string().optional()
|
|
3451
3467
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3452
3468
|
expectTypesMatch(true);
|
|
3453
3469
|
|
|
3454
3470
|
// src/cad/cad_component.ts
|
|
3455
|
-
import { z as
|
|
3471
|
+
import { z as z167 } from "zod";
|
|
3456
3472
|
|
|
3457
3473
|
// src/cad/cad_model_conventions.ts
|
|
3458
3474
|
var cad_model_formats = [
|
|
@@ -3483,49 +3499,49 @@ var cadModelDefaultDirectionMap = {
|
|
|
3483
3499
|
};
|
|
3484
3500
|
|
|
3485
3501
|
// src/cad/cad_component.ts
|
|
3486
|
-
var cad_component =
|
|
3487
|
-
type:
|
|
3488
|
-
cad_component_id:
|
|
3489
|
-
pcb_component_id:
|
|
3490
|
-
source_component_id:
|
|
3502
|
+
var cad_component = z167.object({
|
|
3503
|
+
type: z167.literal("cad_component"),
|
|
3504
|
+
cad_component_id: z167.string(),
|
|
3505
|
+
pcb_component_id: z167.string(),
|
|
3506
|
+
source_component_id: z167.string(),
|
|
3491
3507
|
position: point3,
|
|
3492
3508
|
rotation: point3.optional(),
|
|
3493
3509
|
size: point3.optional(),
|
|
3494
3510
|
layer: layer_ref.optional(),
|
|
3495
|
-
subcircuit_id:
|
|
3511
|
+
subcircuit_id: z167.string().optional(),
|
|
3496
3512
|
// These are all ways to generate/load the 3d model
|
|
3497
|
-
footprinter_string:
|
|
3498
|
-
model_obj_url:
|
|
3499
|
-
model_stl_url:
|
|
3500
|
-
model_3mf_url:
|
|
3501
|
-
model_gltf_url:
|
|
3502
|
-
model_glb_url:
|
|
3503
|
-
model_step_url:
|
|
3504
|
-
model_wrl_url:
|
|
3513
|
+
footprinter_string: z167.string().optional(),
|
|
3514
|
+
model_obj_url: z167.string().optional(),
|
|
3515
|
+
model_stl_url: z167.string().optional(),
|
|
3516
|
+
model_3mf_url: z167.string().optional(),
|
|
3517
|
+
model_gltf_url: z167.string().optional(),
|
|
3518
|
+
model_glb_url: z167.string().optional(),
|
|
3519
|
+
model_step_url: z167.string().optional(),
|
|
3520
|
+
model_wrl_url: z167.string().optional(),
|
|
3505
3521
|
model_asset: asset.optional(),
|
|
3506
|
-
model_unit_to_mm_scale_factor:
|
|
3507
|
-
model_board_normal_direction:
|
|
3522
|
+
model_unit_to_mm_scale_factor: z167.number().optional(),
|
|
3523
|
+
model_board_normal_direction: z167.enum(cad_model_axis_directions).optional().describe(
|
|
3508
3524
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3509
3525
|
),
|
|
3510
3526
|
model_origin_position: point3.optional(),
|
|
3511
|
-
model_origin_alignment:
|
|
3527
|
+
model_origin_alignment: z167.enum([
|
|
3512
3528
|
"unknown",
|
|
3513
3529
|
"center",
|
|
3514
3530
|
"center_of_component_on_board_surface",
|
|
3515
3531
|
"bottom_center_of_component"
|
|
3516
3532
|
]).optional(),
|
|
3517
|
-
model_object_fit:
|
|
3518
|
-
model_jscad:
|
|
3519
|
-
show_as_translucent_model:
|
|
3520
|
-
show_as_bounding_box:
|
|
3521
|
-
anchor_alignment:
|
|
3533
|
+
model_object_fit: z167.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3534
|
+
model_jscad: z167.any().optional(),
|
|
3535
|
+
show_as_translucent_model: z167.boolean().optional(),
|
|
3536
|
+
show_as_bounding_box: z167.boolean().optional(),
|
|
3537
|
+
anchor_alignment: z167.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3522
3538
|
}).describe("Defines a component on the PCB");
|
|
3523
3539
|
expectTypesMatch(true);
|
|
3524
3540
|
|
|
3525
3541
|
// src/simulation/simulation_voltage_source.ts
|
|
3526
|
-
import { z as
|
|
3527
|
-
var wave_shape =
|
|
3528
|
-
var percentage =
|
|
3542
|
+
import { z as z168 } from "zod";
|
|
3543
|
+
var wave_shape = z168.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3544
|
+
var percentage = z168.union([z168.string(), z168.number()]).transform((val) => {
|
|
3529
3545
|
if (typeof val === "string") {
|
|
3530
3546
|
if (val.endsWith("%")) {
|
|
3531
3547
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3534,30 +3550,30 @@ var percentage = z167.union([z167.string(), z167.number()]).transform((val) => {
|
|
|
3534
3550
|
}
|
|
3535
3551
|
return val;
|
|
3536
3552
|
}).pipe(
|
|
3537
|
-
|
|
3553
|
+
z168.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3538
3554
|
);
|
|
3539
|
-
var simulation_dc_voltage_source =
|
|
3540
|
-
type:
|
|
3555
|
+
var simulation_dc_voltage_source = z168.object({
|
|
3556
|
+
type: z168.literal("simulation_voltage_source"),
|
|
3541
3557
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3542
3558
|
"simulation_voltage_source"
|
|
3543
3559
|
),
|
|
3544
|
-
is_dc_source:
|
|
3545
|
-
positive_source_port_id:
|
|
3546
|
-
negative_source_port_id:
|
|
3547
|
-
positive_source_net_id:
|
|
3548
|
-
negative_source_net_id:
|
|
3560
|
+
is_dc_source: z168.literal(true).optional().default(true),
|
|
3561
|
+
positive_source_port_id: z168.string().optional(),
|
|
3562
|
+
negative_source_port_id: z168.string().optional(),
|
|
3563
|
+
positive_source_net_id: z168.string().optional(),
|
|
3564
|
+
negative_source_net_id: z168.string().optional(),
|
|
3549
3565
|
voltage
|
|
3550
3566
|
}).describe("Defines a DC voltage source for simulation");
|
|
3551
|
-
var simulation_ac_voltage_source =
|
|
3552
|
-
type:
|
|
3567
|
+
var simulation_ac_voltage_source = z168.object({
|
|
3568
|
+
type: z168.literal("simulation_voltage_source"),
|
|
3553
3569
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3554
3570
|
"simulation_voltage_source"
|
|
3555
3571
|
),
|
|
3556
|
-
is_dc_source:
|
|
3557
|
-
terminal1_source_port_id:
|
|
3558
|
-
terminal2_source_port_id:
|
|
3559
|
-
terminal1_source_net_id:
|
|
3560
|
-
terminal2_source_net_id:
|
|
3572
|
+
is_dc_source: z168.literal(false),
|
|
3573
|
+
terminal1_source_port_id: z168.string().optional(),
|
|
3574
|
+
terminal2_source_port_id: z168.string().optional(),
|
|
3575
|
+
terminal1_source_net_id: z168.string().optional(),
|
|
3576
|
+
terminal2_source_net_id: z168.string().optional(),
|
|
3561
3577
|
voltage: voltage.optional(),
|
|
3562
3578
|
frequency: frequency.optional(),
|
|
3563
3579
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3570,14 +3586,14 @@ var simulation_ac_voltage_source = z167.object({
|
|
|
3570
3586
|
pulse_width: ms.optional(),
|
|
3571
3587
|
period: ms.optional()
|
|
3572
3588
|
}).describe("Defines an AC voltage source for simulation");
|
|
3573
|
-
var simulation_voltage_source =
|
|
3589
|
+
var simulation_voltage_source = z168.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3574
3590
|
expectTypesMatch(true);
|
|
3575
3591
|
expectTypesMatch(true);
|
|
3576
3592
|
expectTypesMatch(true);
|
|
3577
3593
|
|
|
3578
3594
|
// src/simulation/simulation_current_source.ts
|
|
3579
|
-
import { z as
|
|
3580
|
-
var percentage2 =
|
|
3595
|
+
import { z as z169 } from "zod";
|
|
3596
|
+
var percentage2 = z169.union([z169.string(), z169.number()]).transform((val) => {
|
|
3581
3597
|
if (typeof val === "string") {
|
|
3582
3598
|
if (val.endsWith("%")) {
|
|
3583
3599
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3586,30 +3602,30 @@ var percentage2 = z168.union([z168.string(), z168.number()]).transform((val) =>
|
|
|
3586
3602
|
}
|
|
3587
3603
|
return val;
|
|
3588
3604
|
}).pipe(
|
|
3589
|
-
|
|
3605
|
+
z169.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3590
3606
|
);
|
|
3591
|
-
var simulation_dc_current_source =
|
|
3592
|
-
type:
|
|
3607
|
+
var simulation_dc_current_source = z169.object({
|
|
3608
|
+
type: z169.literal("simulation_current_source"),
|
|
3593
3609
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3594
3610
|
"simulation_current_source"
|
|
3595
3611
|
),
|
|
3596
|
-
is_dc_source:
|
|
3597
|
-
positive_source_port_id:
|
|
3598
|
-
negative_source_port_id:
|
|
3599
|
-
positive_source_net_id:
|
|
3600
|
-
negative_source_net_id:
|
|
3612
|
+
is_dc_source: z169.literal(true).optional().default(true),
|
|
3613
|
+
positive_source_port_id: z169.string().optional(),
|
|
3614
|
+
negative_source_port_id: z169.string().optional(),
|
|
3615
|
+
positive_source_net_id: z169.string().optional(),
|
|
3616
|
+
negative_source_net_id: z169.string().optional(),
|
|
3601
3617
|
current
|
|
3602
3618
|
}).describe("Defines a DC current source for simulation");
|
|
3603
|
-
var simulation_ac_current_source =
|
|
3604
|
-
type:
|
|
3619
|
+
var simulation_ac_current_source = z169.object({
|
|
3620
|
+
type: z169.literal("simulation_current_source"),
|
|
3605
3621
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3606
3622
|
"simulation_current_source"
|
|
3607
3623
|
),
|
|
3608
|
-
is_dc_source:
|
|
3609
|
-
terminal1_source_port_id:
|
|
3610
|
-
terminal2_source_port_id:
|
|
3611
|
-
terminal1_source_net_id:
|
|
3612
|
-
terminal2_source_net_id:
|
|
3624
|
+
is_dc_source: z169.literal(false),
|
|
3625
|
+
terminal1_source_port_id: z169.string().optional(),
|
|
3626
|
+
terminal2_source_port_id: z169.string().optional(),
|
|
3627
|
+
terminal1_source_net_id: z169.string().optional(),
|
|
3628
|
+
terminal2_source_net_id: z169.string().optional(),
|
|
3613
3629
|
current: current.optional(),
|
|
3614
3630
|
frequency: frequency.optional(),
|
|
3615
3631
|
peak_to_peak_current: current.optional(),
|
|
@@ -3617,31 +3633,31 @@ var simulation_ac_current_source = z168.object({
|
|
|
3617
3633
|
phase: rotation.optional(),
|
|
3618
3634
|
duty_cycle: percentage2.optional()
|
|
3619
3635
|
}).describe("Defines an AC current source for simulation");
|
|
3620
|
-
var simulation_current_source =
|
|
3636
|
+
var simulation_current_source = z169.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3621
3637
|
expectTypesMatch(true);
|
|
3622
3638
|
expectTypesMatch(true);
|
|
3623
3639
|
expectTypesMatch(true);
|
|
3624
3640
|
|
|
3625
3641
|
// src/simulation/simulation_experiment.ts
|
|
3626
|
-
import { z as
|
|
3627
|
-
var experiment_type =
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3642
|
+
import { z as z170 } from "zod";
|
|
3643
|
+
var experiment_type = z170.union([
|
|
3644
|
+
z170.literal("spice_dc_sweep"),
|
|
3645
|
+
z170.literal("spice_dc_operating_point"),
|
|
3646
|
+
z170.literal("spice_transient_analysis"),
|
|
3647
|
+
z170.literal("spice_ac_analysis")
|
|
3632
3648
|
]);
|
|
3633
|
-
var spice_simulation_options =
|
|
3634
|
-
method:
|
|
3635
|
-
reltol:
|
|
3636
|
-
abstol:
|
|
3637
|
-
vntol:
|
|
3649
|
+
var spice_simulation_options = z170.object({
|
|
3650
|
+
method: z170.enum(["trap", "gear"]).optional(),
|
|
3651
|
+
reltol: z170.union([z170.number(), z170.string()]).optional(),
|
|
3652
|
+
abstol: z170.union([z170.number(), z170.string()]).optional(),
|
|
3653
|
+
vntol: z170.union([z170.number(), z170.string()]).optional()
|
|
3638
3654
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3639
|
-
var simulation_experiment =
|
|
3640
|
-
type:
|
|
3655
|
+
var simulation_experiment = z170.object({
|
|
3656
|
+
type: z170.literal("simulation_experiment"),
|
|
3641
3657
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3642
3658
|
"simulation_experiment"
|
|
3643
3659
|
),
|
|
3644
|
-
name:
|
|
3660
|
+
name: z170.string(),
|
|
3645
3661
|
experiment_type,
|
|
3646
3662
|
time_per_step: duration_ms.optional(),
|
|
3647
3663
|
start_time_ms: ms.optional(),
|
|
@@ -3651,73 +3667,73 @@ var simulation_experiment = z169.object({
|
|
|
3651
3667
|
expectTypesMatch(true);
|
|
3652
3668
|
|
|
3653
3669
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3654
|
-
import { z as
|
|
3655
|
-
var simulation_transient_voltage_graph =
|
|
3656
|
-
type:
|
|
3670
|
+
import { z as z171 } from "zod";
|
|
3671
|
+
var simulation_transient_voltage_graph = z171.object({
|
|
3672
|
+
type: z171.literal("simulation_transient_voltage_graph"),
|
|
3657
3673
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3658
3674
|
"simulation_transient_voltage_graph"
|
|
3659
3675
|
),
|
|
3660
|
-
simulation_experiment_id:
|
|
3661
|
-
timestamps_ms:
|
|
3662
|
-
voltage_levels:
|
|
3663
|
-
source_component_id:
|
|
3664
|
-
subcircuit_connectivity_map_key:
|
|
3676
|
+
simulation_experiment_id: z171.string(),
|
|
3677
|
+
timestamps_ms: z171.array(z171.number()).optional(),
|
|
3678
|
+
voltage_levels: z171.array(z171.number()),
|
|
3679
|
+
source_component_id: z171.string().optional(),
|
|
3680
|
+
subcircuit_connectivity_map_key: z171.string().optional(),
|
|
3665
3681
|
time_per_step: duration_ms,
|
|
3666
3682
|
start_time_ms: ms,
|
|
3667
3683
|
end_time_ms: ms,
|
|
3668
|
-
name:
|
|
3669
|
-
color:
|
|
3684
|
+
name: z171.string().optional(),
|
|
3685
|
+
color: z171.string().optional()
|
|
3670
3686
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3671
3687
|
expectTypesMatch(true);
|
|
3672
3688
|
|
|
3673
3689
|
// src/simulation/simulation_transient_current_graph.ts
|
|
3674
|
-
import { z as
|
|
3675
|
-
var simulation_transient_current_graph =
|
|
3676
|
-
type:
|
|
3690
|
+
import { z as z172 } from "zod";
|
|
3691
|
+
var simulation_transient_current_graph = z172.object({
|
|
3692
|
+
type: z172.literal("simulation_transient_current_graph"),
|
|
3677
3693
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
3678
3694
|
"simulation_transient_current_graph"
|
|
3679
3695
|
),
|
|
3680
|
-
simulation_experiment_id:
|
|
3681
|
-
timestamps_ms:
|
|
3682
|
-
current_levels:
|
|
3683
|
-
source_component_id:
|
|
3684
|
-
subcircuit_connectivity_map_key:
|
|
3696
|
+
simulation_experiment_id: z172.string(),
|
|
3697
|
+
timestamps_ms: z172.array(z172.number()).optional(),
|
|
3698
|
+
current_levels: z172.array(z172.number()),
|
|
3699
|
+
source_component_id: z172.string().optional(),
|
|
3700
|
+
subcircuit_connectivity_map_key: z172.string().optional(),
|
|
3685
3701
|
time_per_step: duration_ms,
|
|
3686
3702
|
start_time_ms: ms,
|
|
3687
3703
|
end_time_ms: ms,
|
|
3688
|
-
name:
|
|
3689
|
-
color:
|
|
3704
|
+
name: z172.string().optional(),
|
|
3705
|
+
color: z172.string().optional()
|
|
3690
3706
|
}).describe("Stores current measurements over time for a simulation");
|
|
3691
3707
|
expectTypesMatch(true);
|
|
3692
3708
|
|
|
3693
3709
|
// src/simulation/simulation_switch.ts
|
|
3694
|
-
import { z as
|
|
3695
|
-
var simulation_switch =
|
|
3696
|
-
type:
|
|
3710
|
+
import { z as z173 } from "zod";
|
|
3711
|
+
var simulation_switch = z173.object({
|
|
3712
|
+
type: z173.literal("simulation_switch"),
|
|
3697
3713
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3698
|
-
source_component_id:
|
|
3714
|
+
source_component_id: z173.string().optional(),
|
|
3699
3715
|
closes_at: ms.optional(),
|
|
3700
3716
|
opens_at: ms.optional(),
|
|
3701
|
-
starts_closed:
|
|
3717
|
+
starts_closed: z173.boolean().optional(),
|
|
3702
3718
|
switching_frequency: frequency.optional()
|
|
3703
3719
|
}).describe("Defines a switch for simulation timing control");
|
|
3704
3720
|
expectTypesMatch(true);
|
|
3705
3721
|
|
|
3706
3722
|
// src/simulation/simulation_voltage_probe.ts
|
|
3707
|
-
import { z as
|
|
3708
|
-
var simulation_voltage_probe =
|
|
3709
|
-
type:
|
|
3723
|
+
import { z as z174 } from "zod";
|
|
3724
|
+
var simulation_voltage_probe = z174.object({
|
|
3725
|
+
type: z174.literal("simulation_voltage_probe"),
|
|
3710
3726
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3711
3727
|
"simulation_voltage_probe"
|
|
3712
3728
|
),
|
|
3713
|
-
source_component_id:
|
|
3714
|
-
name:
|
|
3715
|
-
signal_input_source_port_id:
|
|
3716
|
-
signal_input_source_net_id:
|
|
3717
|
-
reference_input_source_port_id:
|
|
3718
|
-
reference_input_source_net_id:
|
|
3719
|
-
subcircuit_id:
|
|
3720
|
-
color:
|
|
3729
|
+
source_component_id: z174.string().optional(),
|
|
3730
|
+
name: z174.string().optional(),
|
|
3731
|
+
signal_input_source_port_id: z174.string().optional(),
|
|
3732
|
+
signal_input_source_net_id: z174.string().optional(),
|
|
3733
|
+
reference_input_source_port_id: z174.string().optional(),
|
|
3734
|
+
reference_input_source_net_id: z174.string().optional(),
|
|
3735
|
+
subcircuit_id: z174.string().optional(),
|
|
3736
|
+
color: z174.string().optional()
|
|
3721
3737
|
}).describe(
|
|
3722
3738
|
"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."
|
|
3723
3739
|
).superRefine((data, ctx) => {
|
|
@@ -3727,20 +3743,20 @@ var simulation_voltage_probe = z173.object({
|
|
|
3727
3743
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3728
3744
|
if (has_ports && has_nets) {
|
|
3729
3745
|
ctx.addIssue({
|
|
3730
|
-
code:
|
|
3746
|
+
code: z174.ZodIssueCode.custom,
|
|
3731
3747
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3732
3748
|
});
|
|
3733
3749
|
} else if (has_ports) {
|
|
3734
3750
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3735
3751
|
ctx.addIssue({
|
|
3736
|
-
code:
|
|
3752
|
+
code: z174.ZodIssueCode.custom,
|
|
3737
3753
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3738
3754
|
});
|
|
3739
3755
|
}
|
|
3740
3756
|
} else if (has_nets) {
|
|
3741
3757
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3742
3758
|
ctx.addIssue({
|
|
3743
|
-
code:
|
|
3759
|
+
code: z174.ZodIssueCode.custom,
|
|
3744
3760
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3745
3761
|
});
|
|
3746
3762
|
}
|
|
@@ -3748,7 +3764,7 @@ var simulation_voltage_probe = z173.object({
|
|
|
3748
3764
|
} else {
|
|
3749
3765
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3750
3766
|
ctx.addIssue({
|
|
3751
|
-
code:
|
|
3767
|
+
code: z174.ZodIssueCode.custom,
|
|
3752
3768
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3753
3769
|
});
|
|
3754
3770
|
}
|
|
@@ -3757,20 +3773,20 @@ var simulation_voltage_probe = z173.object({
|
|
|
3757
3773
|
expectTypesMatch(true);
|
|
3758
3774
|
|
|
3759
3775
|
// src/simulation/simulation_current_probe.ts
|
|
3760
|
-
import { z as
|
|
3761
|
-
var simulation_current_probe =
|
|
3762
|
-
type:
|
|
3776
|
+
import { z as z175 } from "zod";
|
|
3777
|
+
var simulation_current_probe = z175.object({
|
|
3778
|
+
type: z175.literal("simulation_current_probe"),
|
|
3763
3779
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
3764
3780
|
"simulation_current_probe"
|
|
3765
3781
|
),
|
|
3766
|
-
source_component_id:
|
|
3767
|
-
name:
|
|
3768
|
-
positive_source_port_id:
|
|
3769
|
-
negative_source_port_id:
|
|
3770
|
-
positive_source_net_id:
|
|
3771
|
-
negative_source_net_id:
|
|
3772
|
-
subcircuit_id:
|
|
3773
|
-
color:
|
|
3782
|
+
source_component_id: z175.string().optional(),
|
|
3783
|
+
name: z175.string().optional(),
|
|
3784
|
+
positive_source_port_id: z175.string().optional(),
|
|
3785
|
+
negative_source_port_id: z175.string().optional(),
|
|
3786
|
+
positive_source_net_id: z175.string().optional(),
|
|
3787
|
+
negative_source_net_id: z175.string().optional(),
|
|
3788
|
+
subcircuit_id: z175.string().optional(),
|
|
3789
|
+
color: z175.string().optional()
|
|
3774
3790
|
}).describe(
|
|
3775
3791
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
3776
3792
|
).superRefine((data, ctx) => {
|
|
@@ -3782,7 +3798,7 @@ var simulation_current_probe = z174.object({
|
|
|
3782
3798
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
3783
3799
|
if (hasPorts && hasNets) {
|
|
3784
3800
|
ctx.addIssue({
|
|
3785
|
-
code:
|
|
3801
|
+
code: z175.ZodIssueCode.custom,
|
|
3786
3802
|
message: "Cannot mix port and net connections in a current probe."
|
|
3787
3803
|
});
|
|
3788
3804
|
return;
|
|
@@ -3790,7 +3806,7 @@ var simulation_current_probe = z174.object({
|
|
|
3790
3806
|
if (hasPorts) {
|
|
3791
3807
|
if (!hasPositivePort || !hasNegativePort) {
|
|
3792
3808
|
ctx.addIssue({
|
|
3793
|
-
code:
|
|
3809
|
+
code: z175.ZodIssueCode.custom,
|
|
3794
3810
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
3795
3811
|
});
|
|
3796
3812
|
}
|
|
@@ -3799,79 +3815,79 @@ var simulation_current_probe = z174.object({
|
|
|
3799
3815
|
if (hasNets) {
|
|
3800
3816
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
3801
3817
|
ctx.addIssue({
|
|
3802
|
-
code:
|
|
3818
|
+
code: z175.ZodIssueCode.custom,
|
|
3803
3819
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
3804
3820
|
});
|
|
3805
3821
|
}
|
|
3806
3822
|
return;
|
|
3807
3823
|
}
|
|
3808
3824
|
ctx.addIssue({
|
|
3809
|
-
code:
|
|
3825
|
+
code: z175.ZodIssueCode.custom,
|
|
3810
3826
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
3811
3827
|
});
|
|
3812
3828
|
});
|
|
3813
3829
|
expectTypesMatch(true);
|
|
3814
3830
|
|
|
3815
3831
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3816
|
-
import { z as
|
|
3832
|
+
import { z as z176 } from "zod";
|
|
3817
3833
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3818
|
-
type:
|
|
3834
|
+
type: z176.literal("simulation_unknown_experiment_error"),
|
|
3819
3835
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
3820
3836
|
"simulation_unknown_experiment_error"
|
|
3821
3837
|
),
|
|
3822
|
-
error_type:
|
|
3823
|
-
simulation_experiment_id:
|
|
3824
|
-
subcircuit_id:
|
|
3838
|
+
error_type: z176.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
3839
|
+
simulation_experiment_id: z176.string().optional(),
|
|
3840
|
+
subcircuit_id: z176.string().optional()
|
|
3825
3841
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3826
3842
|
expectTypesMatch(true);
|
|
3827
3843
|
|
|
3828
3844
|
// src/simulation/simulation_op_amp.ts
|
|
3829
|
-
import { z as
|
|
3830
|
-
var simulation_op_amp =
|
|
3831
|
-
type:
|
|
3845
|
+
import { z as z177 } from "zod";
|
|
3846
|
+
var simulation_op_amp = z177.object({
|
|
3847
|
+
type: z177.literal("simulation_op_amp"),
|
|
3832
3848
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
3833
|
-
source_component_id:
|
|
3834
|
-
inverting_input_source_port_id:
|
|
3835
|
-
non_inverting_input_source_port_id:
|
|
3836
|
-
output_source_port_id:
|
|
3837
|
-
positive_supply_source_port_id:
|
|
3838
|
-
negative_supply_source_port_id:
|
|
3849
|
+
source_component_id: z177.string().optional(),
|
|
3850
|
+
inverting_input_source_port_id: z177.string(),
|
|
3851
|
+
non_inverting_input_source_port_id: z177.string(),
|
|
3852
|
+
output_source_port_id: z177.string(),
|
|
3853
|
+
positive_supply_source_port_id: z177.string(),
|
|
3854
|
+
negative_supply_source_port_id: z177.string()
|
|
3839
3855
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
3840
3856
|
expectTypesMatch(true);
|
|
3841
3857
|
|
|
3842
3858
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
3843
|
-
import { z as
|
|
3844
|
-
var simulation_spice_subcircuit =
|
|
3845
|
-
type:
|
|
3859
|
+
import { z as z178 } from "zod";
|
|
3860
|
+
var simulation_spice_subcircuit = z178.object({
|
|
3861
|
+
type: z178.literal("simulation_spice_subcircuit"),
|
|
3846
3862
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
3847
3863
|
"simulation_spice_subcircuit"
|
|
3848
3864
|
),
|
|
3849
|
-
source_component_id:
|
|
3850
|
-
spice_pin_to_source_port_map:
|
|
3851
|
-
subcircuit_source:
|
|
3865
|
+
source_component_id: z178.string(),
|
|
3866
|
+
spice_pin_to_source_port_map: z178.record(z178.string(), z178.string()),
|
|
3867
|
+
subcircuit_source: z178.string()
|
|
3852
3868
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
3853
3869
|
expectTypesMatch(
|
|
3854
3870
|
true
|
|
3855
3871
|
);
|
|
3856
3872
|
|
|
3857
3873
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
3858
|
-
import { z as
|
|
3874
|
+
import { z as z179 } from "zod";
|
|
3859
3875
|
var hasValue = (value) => value !== void 0;
|
|
3860
|
-
var simulation_oscilloscope_trace =
|
|
3861
|
-
type:
|
|
3876
|
+
var simulation_oscilloscope_trace = z179.object({
|
|
3877
|
+
type: z179.literal("simulation_oscilloscope_trace"),
|
|
3862
3878
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
3863
3879
|
"simulation_oscilloscope_trace"
|
|
3864
3880
|
),
|
|
3865
|
-
simulation_transient_voltage_graph_id:
|
|
3866
|
-
simulation_transient_current_graph_id:
|
|
3867
|
-
simulation_voltage_probe_id:
|
|
3868
|
-
simulation_current_probe_id:
|
|
3869
|
-
display_name:
|
|
3870
|
-
color:
|
|
3871
|
-
display_center_value:
|
|
3872
|
-
display_center_offset_divs:
|
|
3873
|
-
volts_per_div:
|
|
3874
|
-
amps_per_div:
|
|
3881
|
+
simulation_transient_voltage_graph_id: z179.string().optional(),
|
|
3882
|
+
simulation_transient_current_graph_id: z179.string().optional(),
|
|
3883
|
+
simulation_voltage_probe_id: z179.string().optional(),
|
|
3884
|
+
simulation_current_probe_id: z179.string().optional(),
|
|
3885
|
+
display_name: z179.string().optional(),
|
|
3886
|
+
color: z179.string().optional(),
|
|
3887
|
+
display_center_value: z179.number().optional(),
|
|
3888
|
+
display_center_offset_divs: z179.number().optional(),
|
|
3889
|
+
volts_per_div: z179.number().positive().optional(),
|
|
3890
|
+
amps_per_div: z179.number().positive().optional()
|
|
3875
3891
|
}).describe(
|
|
3876
3892
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
3877
3893
|
).superRefine((data, ctx) => {
|
|
@@ -3885,19 +3901,19 @@ var simulation_oscilloscope_trace = z178.object({
|
|
|
3885
3901
|
].filter(hasValue).length;
|
|
3886
3902
|
if (voltageReferences + currentReferences !== 1) {
|
|
3887
3903
|
ctx.addIssue({
|
|
3888
|
-
code:
|
|
3904
|
+
code: z179.ZodIssueCode.custom,
|
|
3889
3905
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
3890
3906
|
});
|
|
3891
3907
|
}
|
|
3892
3908
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
3893
3909
|
ctx.addIssue({
|
|
3894
|
-
code:
|
|
3910
|
+
code: z179.ZodIssueCode.custom,
|
|
3895
3911
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
3896
3912
|
});
|
|
3897
3913
|
}
|
|
3898
3914
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
3899
3915
|
ctx.addIssue({
|
|
3900
|
-
code:
|
|
3916
|
+
code: z179.ZodIssueCode.custom,
|
|
3901
3917
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
3902
3918
|
});
|
|
3903
3919
|
}
|
|
@@ -3905,8 +3921,8 @@ var simulation_oscilloscope_trace = z178.object({
|
|
|
3905
3921
|
expectTypesMatch(true);
|
|
3906
3922
|
|
|
3907
3923
|
// src/any_circuit_element.ts
|
|
3908
|
-
import { z as
|
|
3909
|
-
var any_circuit_element =
|
|
3924
|
+
import { z as z180 } from "zod";
|
|
3925
|
+
var any_circuit_element = z180.union([
|
|
3910
3926
|
source_trace,
|
|
3911
3927
|
source_port,
|
|
3912
3928
|
source_component_internal_connection,
|
|
@@ -4035,6 +4051,7 @@ var any_circuit_element = z179.union([
|
|
|
4035
4051
|
schematic_debug_object,
|
|
4036
4052
|
schematic_voltage_probe,
|
|
4037
4053
|
schematic_manual_edit_conflict_warning,
|
|
4054
|
+
schematic_component_overlap_warning,
|
|
4038
4055
|
schematic_group,
|
|
4039
4056
|
schematic_sheet,
|
|
4040
4057
|
schematic_table,
|
|
@@ -4202,6 +4219,7 @@ export {
|
|
|
4202
4219
|
schematic_box,
|
|
4203
4220
|
schematic_circle,
|
|
4204
4221
|
schematic_component,
|
|
4222
|
+
schematic_component_overlap_warning,
|
|
4205
4223
|
schematic_component_port_arrangement_by_sides,
|
|
4206
4224
|
schematic_component_port_arrangement_by_size,
|
|
4207
4225
|
schematic_debug_line,
|