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