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