circuit-json 0.0.460 → 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 +109 -11
- package/dist/index.mjs +1231 -1182
- 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,116 +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
|
-
source_net_id:
|
|
2456
|
-
net_is_assignable:
|
|
2457
|
-
net_assigned:
|
|
2458
|
-
is_tented:
|
|
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()
|
|
2459
2505
|
}).describe("Defines a via on the PCB");
|
|
2460
2506
|
expectTypesMatch(true);
|
|
2461
2507
|
|
|
2462
2508
|
// src/pcb/pcb_board.ts
|
|
2463
|
-
import { z as
|
|
2464
|
-
var pcb_board =
|
|
2465
|
-
type:
|
|
2509
|
+
import { z as z117 } from "zod";
|
|
2510
|
+
var pcb_board = z117.object({
|
|
2511
|
+
type: z117.literal("pcb_board"),
|
|
2466
2512
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2467
|
-
pcb_panel_id:
|
|
2468
|
-
carrier_pcb_board_id:
|
|
2469
|
-
is_subcircuit:
|
|
2470
|
-
subcircuit_id:
|
|
2471
|
-
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(),
|
|
2472
2518
|
width: length.optional(),
|
|
2473
2519
|
height: length.optional(),
|
|
2474
2520
|
center: point,
|
|
2475
|
-
display_offset_x:
|
|
2521
|
+
display_offset_x: z117.string().optional().describe(
|
|
2476
2522
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2477
2523
|
),
|
|
2478
|
-
display_offset_y:
|
|
2524
|
+
display_offset_y: z117.string().optional().describe(
|
|
2479
2525
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2480
2526
|
),
|
|
2481
2527
|
thickness: length.optional().default(1.4),
|
|
2482
|
-
num_layers:
|
|
2483
|
-
outline:
|
|
2484
|
-
shape:
|
|
2485
|
-
material:
|
|
2486
|
-
solder_mask_color:
|
|
2487
|
-
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(),
|
|
2488
2534
|
anchor_position: point.optional(),
|
|
2489
2535
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2490
|
-
position_mode:
|
|
2536
|
+
position_mode: z117.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2491
2537
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2492
2538
|
expectTypesMatch(true);
|
|
2493
2539
|
|
|
2494
2540
|
// src/pcb/pcb_panel.ts
|
|
2495
|
-
import { z as
|
|
2496
|
-
var pcb_panel =
|
|
2497
|
-
type:
|
|
2541
|
+
import { z as z118 } from "zod";
|
|
2542
|
+
var pcb_panel = z118.object({
|
|
2543
|
+
type: z118.literal("pcb_panel"),
|
|
2498
2544
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2499
2545
|
width: length,
|
|
2500
2546
|
height: length,
|
|
2501
2547
|
center: point,
|
|
2502
2548
|
thickness: length.optional().default(1.4),
|
|
2503
|
-
covered_with_solder_mask:
|
|
2549
|
+
covered_with_solder_mask: z118.boolean().optional().default(true)
|
|
2504
2550
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2505
2551
|
expectTypesMatch(true);
|
|
2506
2552
|
|
|
2507
2553
|
// src/pcb/pcb_placement_error.ts
|
|
2508
|
-
import { z as
|
|
2554
|
+
import { z as z119 } from "zod";
|
|
2509
2555
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2510
|
-
type:
|
|
2556
|
+
type: z119.literal("pcb_placement_error"),
|
|
2511
2557
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2512
|
-
error_type:
|
|
2513
|
-
subcircuit_id:
|
|
2558
|
+
error_type: z119.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2559
|
+
subcircuit_id: z119.string().optional()
|
|
2514
2560
|
}).describe("Defines a placement error on the PCB");
|
|
2515
2561
|
expectTypesMatch(true);
|
|
2516
2562
|
|
|
2517
2563
|
// src/pcb/pcb_packing_error.ts
|
|
2518
|
-
import { z as
|
|
2564
|
+
import { z as z120 } from "zod";
|
|
2519
2565
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
2520
|
-
type:
|
|
2566
|
+
type: z120.literal("pcb_packing_error"),
|
|
2521
2567
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
2522
|
-
error_type:
|
|
2523
|
-
pcb_group_id:
|
|
2524
|
-
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()
|
|
2525
2571
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
2526
2572
|
expectTypesMatch(true);
|
|
2527
2573
|
|
|
2528
2574
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2529
|
-
import { z as
|
|
2575
|
+
import { z as z121 } from "zod";
|
|
2530
2576
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2531
|
-
type:
|
|
2577
|
+
type: z121.literal("pcb_panelization_placement_error"),
|
|
2532
2578
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2533
2579
|
"pcb_panelization_placement_error"
|
|
2534
2580
|
),
|
|
2535
|
-
error_type:
|
|
2536
|
-
pcb_panel_id:
|
|
2537
|
-
pcb_board_id:
|
|
2538
|
-
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()
|
|
2539
2585
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2540
2586
|
expectTypesMatch(true);
|
|
2541
2587
|
|
|
2542
2588
|
// src/pcb/pcb_trace_hint.ts
|
|
2543
|
-
import { z as
|
|
2544
|
-
var pcb_trace_hint =
|
|
2545
|
-
type:
|
|
2589
|
+
import { z as z122 } from "zod";
|
|
2590
|
+
var pcb_trace_hint = z122.object({
|
|
2591
|
+
type: z122.literal("pcb_trace_hint"),
|
|
2546
2592
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2547
|
-
pcb_port_id:
|
|
2548
|
-
pcb_component_id:
|
|
2549
|
-
route:
|
|
2550
|
-
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()
|
|
2551
2597
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2552
2598
|
expectTypesMatch(true);
|
|
2553
2599
|
|
|
2554
2600
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2555
|
-
import { z as
|
|
2556
|
-
var pcb_silkscreen_line =
|
|
2557
|
-
type:
|
|
2601
|
+
import { z as z123 } from "zod";
|
|
2602
|
+
var pcb_silkscreen_line = z123.object({
|
|
2603
|
+
type: z123.literal("pcb_silkscreen_line"),
|
|
2558
2604
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2559
|
-
pcb_component_id:
|
|
2560
|
-
pcb_group_id:
|
|
2561
|
-
subcircuit_id:
|
|
2605
|
+
pcb_component_id: z123.string(),
|
|
2606
|
+
pcb_group_id: z123.string().optional(),
|
|
2607
|
+
subcircuit_id: z123.string().optional(),
|
|
2562
2608
|
stroke_width: distance.default("0.1mm"),
|
|
2563
2609
|
x1: distance,
|
|
2564
2610
|
y1: distance,
|
|
@@ -2569,32 +2615,32 @@ var pcb_silkscreen_line = z122.object({
|
|
|
2569
2615
|
expectTypesMatch(true);
|
|
2570
2616
|
|
|
2571
2617
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2572
|
-
import { z as
|
|
2573
|
-
var pcb_silkscreen_path =
|
|
2574
|
-
type:
|
|
2618
|
+
import { z as z124 } from "zod";
|
|
2619
|
+
var pcb_silkscreen_path = z124.object({
|
|
2620
|
+
type: z124.literal("pcb_silkscreen_path"),
|
|
2575
2621
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2576
|
-
pcb_component_id:
|
|
2577
|
-
pcb_group_id:
|
|
2578
|
-
subcircuit_id:
|
|
2622
|
+
pcb_component_id: z124.string(),
|
|
2623
|
+
pcb_group_id: z124.string().optional(),
|
|
2624
|
+
subcircuit_id: z124.string().optional(),
|
|
2579
2625
|
layer: visible_layer,
|
|
2580
|
-
route:
|
|
2626
|
+
route: z124.array(point),
|
|
2581
2627
|
stroke_width: length
|
|
2582
2628
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2583
2629
|
expectTypesMatch(true);
|
|
2584
2630
|
|
|
2585
2631
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2586
|
-
import { z as
|
|
2587
|
-
var pcb_silkscreen_text =
|
|
2588
|
-
type:
|
|
2632
|
+
import { z as z125 } from "zod";
|
|
2633
|
+
var pcb_silkscreen_text = z125.object({
|
|
2634
|
+
type: z125.literal("pcb_silkscreen_text"),
|
|
2589
2635
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2590
|
-
pcb_group_id:
|
|
2591
|
-
subcircuit_id:
|
|
2592
|
-
font:
|
|
2636
|
+
pcb_group_id: z125.string().optional(),
|
|
2637
|
+
subcircuit_id: z125.string().optional(),
|
|
2638
|
+
font: z125.literal("tscircuit2024").default("tscircuit2024"),
|
|
2593
2639
|
font_size: distance.default("0.2mm"),
|
|
2594
|
-
pcb_component_id:
|
|
2595
|
-
text:
|
|
2596
|
-
is_knockout:
|
|
2597
|
-
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({
|
|
2598
2644
|
left: length,
|
|
2599
2645
|
top: length,
|
|
2600
2646
|
bottom: length,
|
|
@@ -2605,27 +2651,27 @@ var pcb_silkscreen_text = z124.object({
|
|
|
2605
2651
|
bottom: "0.2mm",
|
|
2606
2652
|
right: "0.2mm"
|
|
2607
2653
|
}).optional(),
|
|
2608
|
-
ccw_rotation:
|
|
2654
|
+
ccw_rotation: z125.number().optional(),
|
|
2609
2655
|
layer: layer_ref,
|
|
2610
|
-
is_mirrored:
|
|
2656
|
+
is_mirrored: z125.boolean().default(false).optional(),
|
|
2611
2657
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2612
2658
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2613
2659
|
}).describe("Defines silkscreen text on the PCB");
|
|
2614
2660
|
expectTypesMatch(true);
|
|
2615
2661
|
|
|
2616
2662
|
// src/pcb/pcb_copper_text.ts
|
|
2617
|
-
import { z as
|
|
2618
|
-
var pcb_copper_text =
|
|
2619
|
-
type:
|
|
2663
|
+
import { z as z126 } from "zod";
|
|
2664
|
+
var pcb_copper_text = z126.object({
|
|
2665
|
+
type: z126.literal("pcb_copper_text"),
|
|
2620
2666
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2621
|
-
pcb_group_id:
|
|
2622
|
-
subcircuit_id:
|
|
2623
|
-
font:
|
|
2667
|
+
pcb_group_id: z126.string().optional(),
|
|
2668
|
+
subcircuit_id: z126.string().optional(),
|
|
2669
|
+
font: z126.literal("tscircuit2024").default("tscircuit2024"),
|
|
2624
2670
|
font_size: distance.default("0.2mm"),
|
|
2625
|
-
pcb_component_id:
|
|
2626
|
-
text:
|
|
2627
|
-
is_knockout:
|
|
2628
|
-
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({
|
|
2629
2675
|
left: length,
|
|
2630
2676
|
top: length,
|
|
2631
2677
|
bottom: length,
|
|
@@ -2636,61 +2682,61 @@ var pcb_copper_text = z125.object({
|
|
|
2636
2682
|
bottom: "0.2mm",
|
|
2637
2683
|
right: "0.2mm"
|
|
2638
2684
|
}).optional(),
|
|
2639
|
-
ccw_rotation:
|
|
2685
|
+
ccw_rotation: z126.number().optional(),
|
|
2640
2686
|
layer: layer_ref,
|
|
2641
|
-
is_mirrored:
|
|
2687
|
+
is_mirrored: z126.boolean().default(false).optional(),
|
|
2642
2688
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2643
2689
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2644
2690
|
}).describe("Defines copper text on the PCB");
|
|
2645
2691
|
expectTypesMatch(true);
|
|
2646
2692
|
|
|
2647
2693
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2648
|
-
import { z as
|
|
2649
|
-
var pcb_silkscreen_rect =
|
|
2650
|
-
type:
|
|
2694
|
+
import { z as z127 } from "zod";
|
|
2695
|
+
var pcb_silkscreen_rect = z127.object({
|
|
2696
|
+
type: z127.literal("pcb_silkscreen_rect"),
|
|
2651
2697
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2652
|
-
pcb_component_id:
|
|
2653
|
-
pcb_group_id:
|
|
2654
|
-
subcircuit_id:
|
|
2698
|
+
pcb_component_id: z127.string(),
|
|
2699
|
+
pcb_group_id: z127.string().optional(),
|
|
2700
|
+
subcircuit_id: z127.string().optional(),
|
|
2655
2701
|
center: point,
|
|
2656
2702
|
width: length,
|
|
2657
2703
|
height: length,
|
|
2658
2704
|
layer: layer_ref,
|
|
2659
2705
|
stroke_width: length.default("1mm"),
|
|
2660
2706
|
corner_radius: length.optional(),
|
|
2661
|
-
is_filled:
|
|
2662
|
-
has_stroke:
|
|
2663
|
-
is_stroke_dashed:
|
|
2664
|
-
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()
|
|
2665
2711
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2666
2712
|
expectTypesMatch(true);
|
|
2667
2713
|
|
|
2668
2714
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2669
|
-
import { z as
|
|
2670
|
-
var pcb_silkscreen_circle =
|
|
2671
|
-
type:
|
|
2715
|
+
import { z as z128 } from "zod";
|
|
2716
|
+
var pcb_silkscreen_circle = z128.object({
|
|
2717
|
+
type: z128.literal("pcb_silkscreen_circle"),
|
|
2672
2718
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2673
2719
|
"pcb_silkscreen_circle"
|
|
2674
2720
|
),
|
|
2675
|
-
pcb_component_id:
|
|
2676
|
-
pcb_group_id:
|
|
2677
|
-
subcircuit_id:
|
|
2721
|
+
pcb_component_id: z128.string(),
|
|
2722
|
+
pcb_group_id: z128.string().optional(),
|
|
2723
|
+
subcircuit_id: z128.string().optional(),
|
|
2678
2724
|
center: point,
|
|
2679
2725
|
radius: length,
|
|
2680
2726
|
layer: visible_layer,
|
|
2681
2727
|
stroke_width: length.default("1mm"),
|
|
2682
|
-
is_filled:
|
|
2728
|
+
is_filled: z128.boolean().optional()
|
|
2683
2729
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2684
2730
|
expectTypesMatch(true);
|
|
2685
2731
|
|
|
2686
2732
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2687
|
-
import { z as
|
|
2688
|
-
var pcb_silkscreen_oval =
|
|
2689
|
-
type:
|
|
2733
|
+
import { z as z129 } from "zod";
|
|
2734
|
+
var pcb_silkscreen_oval = z129.object({
|
|
2735
|
+
type: z129.literal("pcb_silkscreen_oval"),
|
|
2690
2736
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2691
|
-
pcb_component_id:
|
|
2692
|
-
pcb_group_id:
|
|
2693
|
-
subcircuit_id:
|
|
2737
|
+
pcb_component_id: z129.string(),
|
|
2738
|
+
pcb_group_id: z129.string().optional(),
|
|
2739
|
+
subcircuit_id: z129.string().optional(),
|
|
2694
2740
|
center: point,
|
|
2695
2741
|
radius_x: distance,
|
|
2696
2742
|
radius_y: distance,
|
|
@@ -2700,265 +2746,265 @@ var pcb_silkscreen_oval = z128.object({
|
|
|
2700
2746
|
expectTypesMatch(true);
|
|
2701
2747
|
|
|
2702
2748
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2703
|
-
import { z as
|
|
2704
|
-
var pcb_silkscreen_graphic_base =
|
|
2705
|
-
type:
|
|
2749
|
+
import { z as z130 } from "zod";
|
|
2750
|
+
var pcb_silkscreen_graphic_base = z130.object({
|
|
2751
|
+
type: z130.literal("pcb_silkscreen_graphic"),
|
|
2706
2752
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2707
2753
|
"pcb_silkscreen_graphic"
|
|
2708
2754
|
),
|
|
2709
|
-
pcb_component_id:
|
|
2710
|
-
pcb_group_id:
|
|
2711
|
-
subcircuit_id:
|
|
2755
|
+
pcb_component_id: z130.string(),
|
|
2756
|
+
pcb_group_id: z130.string().optional(),
|
|
2757
|
+
subcircuit_id: z130.string().optional(),
|
|
2712
2758
|
layer: visible_layer,
|
|
2713
2759
|
image_asset: asset.optional()
|
|
2714
2760
|
});
|
|
2715
2761
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2716
|
-
shape:
|
|
2762
|
+
shape: z130.literal("brep"),
|
|
2717
2763
|
brep_shape
|
|
2718
2764
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2719
2765
|
expectTypesMatch(
|
|
2720
2766
|
true
|
|
2721
2767
|
);
|
|
2722
|
-
var pcb_silkscreen_graphic =
|
|
2768
|
+
var pcb_silkscreen_graphic = z130.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2723
2769
|
expectTypesMatch(true);
|
|
2724
2770
|
|
|
2725
2771
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2726
|
-
import { z as
|
|
2727
|
-
var pcb_silkscreen_pill =
|
|
2728
|
-
type:
|
|
2772
|
+
import { z as z131 } from "zod";
|
|
2773
|
+
var pcb_silkscreen_pill = z131.object({
|
|
2774
|
+
type: z131.literal("pcb_silkscreen_pill"),
|
|
2729
2775
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2730
|
-
pcb_component_id:
|
|
2731
|
-
pcb_group_id:
|
|
2732
|
-
subcircuit_id:
|
|
2776
|
+
pcb_component_id: z131.string(),
|
|
2777
|
+
pcb_group_id: z131.string().optional(),
|
|
2778
|
+
subcircuit_id: z131.string().optional(),
|
|
2733
2779
|
center: point,
|
|
2734
2780
|
width: length,
|
|
2735
2781
|
height: length,
|
|
2736
2782
|
layer: layer_ref,
|
|
2737
|
-
ccw_rotation:
|
|
2783
|
+
ccw_rotation: z131.number().optional()
|
|
2738
2784
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2739
2785
|
expectTypesMatch(true);
|
|
2740
2786
|
|
|
2741
2787
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2742
|
-
import { z as
|
|
2743
|
-
var pcb_fabrication_note_text =
|
|
2744
|
-
type:
|
|
2788
|
+
import { z as z132 } from "zod";
|
|
2789
|
+
var pcb_fabrication_note_text = z132.object({
|
|
2790
|
+
type: z132.literal("pcb_fabrication_note_text"),
|
|
2745
2791
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2746
2792
|
"pcb_fabrication_note_text"
|
|
2747
2793
|
),
|
|
2748
|
-
subcircuit_id:
|
|
2749
|
-
pcb_group_id:
|
|
2750
|
-
font:
|
|
2794
|
+
subcircuit_id: z132.string().optional(),
|
|
2795
|
+
pcb_group_id: z132.string().optional(),
|
|
2796
|
+
font: z132.literal("tscircuit2024").default("tscircuit2024"),
|
|
2751
2797
|
font_size: distance.default("1mm"),
|
|
2752
|
-
pcb_component_id:
|
|
2753
|
-
text:
|
|
2754
|
-
ccw_rotation:
|
|
2798
|
+
pcb_component_id: z132.string(),
|
|
2799
|
+
text: z132.string(),
|
|
2800
|
+
ccw_rotation: z132.number().optional(),
|
|
2755
2801
|
layer: visible_layer,
|
|
2756
2802
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2757
|
-
anchor_alignment:
|
|
2758
|
-
color:
|
|
2803
|
+
anchor_alignment: z132.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2804
|
+
color: z132.string().optional()
|
|
2759
2805
|
}).describe(
|
|
2760
2806
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2761
2807
|
);
|
|
2762
2808
|
expectTypesMatch(true);
|
|
2763
2809
|
|
|
2764
2810
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2765
|
-
import { z as
|
|
2766
|
-
var pcb_fabrication_note_path =
|
|
2767
|
-
type:
|
|
2811
|
+
import { z as z133 } from "zod";
|
|
2812
|
+
var pcb_fabrication_note_path = z133.object({
|
|
2813
|
+
type: z133.literal("pcb_fabrication_note_path"),
|
|
2768
2814
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2769
2815
|
"pcb_fabrication_note_path"
|
|
2770
2816
|
),
|
|
2771
|
-
pcb_component_id:
|
|
2772
|
-
subcircuit_id:
|
|
2817
|
+
pcb_component_id: z133.string(),
|
|
2818
|
+
subcircuit_id: z133.string().optional(),
|
|
2773
2819
|
layer: layer_ref,
|
|
2774
|
-
route:
|
|
2820
|
+
route: z133.array(point),
|
|
2775
2821
|
stroke_width: length,
|
|
2776
|
-
color:
|
|
2822
|
+
color: z133.string().optional()
|
|
2777
2823
|
}).describe(
|
|
2778
2824
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2779
2825
|
);
|
|
2780
2826
|
expectTypesMatch(true);
|
|
2781
2827
|
|
|
2782
2828
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2783
|
-
import { z as
|
|
2784
|
-
var pcb_fabrication_note_rect =
|
|
2785
|
-
type:
|
|
2829
|
+
import { z as z134 } from "zod";
|
|
2830
|
+
var pcb_fabrication_note_rect = z134.object({
|
|
2831
|
+
type: z134.literal("pcb_fabrication_note_rect"),
|
|
2786
2832
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2787
2833
|
"pcb_fabrication_note_rect"
|
|
2788
2834
|
),
|
|
2789
|
-
pcb_component_id:
|
|
2790
|
-
pcb_group_id:
|
|
2791
|
-
subcircuit_id:
|
|
2835
|
+
pcb_component_id: z134.string(),
|
|
2836
|
+
pcb_group_id: z134.string().optional(),
|
|
2837
|
+
subcircuit_id: z134.string().optional(),
|
|
2792
2838
|
center: point,
|
|
2793
2839
|
width: length,
|
|
2794
2840
|
height: length,
|
|
2795
2841
|
layer: visible_layer,
|
|
2796
2842
|
stroke_width: length.default("0.1mm"),
|
|
2797
2843
|
corner_radius: length.optional(),
|
|
2798
|
-
is_filled:
|
|
2799
|
-
has_stroke:
|
|
2800
|
-
is_stroke_dashed:
|
|
2801
|
-
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()
|
|
2802
2848
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2803
2849
|
expectTypesMatch(true);
|
|
2804
2850
|
|
|
2805
2851
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2806
|
-
import { z as
|
|
2807
|
-
var pcb_fabrication_note_dimension =
|
|
2808
|
-
type:
|
|
2852
|
+
import { z as z135 } from "zod";
|
|
2853
|
+
var pcb_fabrication_note_dimension = z135.object({
|
|
2854
|
+
type: z135.literal("pcb_fabrication_note_dimension"),
|
|
2809
2855
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2810
2856
|
"pcb_fabrication_note_dimension"
|
|
2811
2857
|
),
|
|
2812
|
-
pcb_component_id:
|
|
2813
|
-
pcb_group_id:
|
|
2814
|
-
subcircuit_id:
|
|
2858
|
+
pcb_component_id: z135.string(),
|
|
2859
|
+
pcb_group_id: z135.string().optional(),
|
|
2860
|
+
subcircuit_id: z135.string().optional(),
|
|
2815
2861
|
layer: visible_layer,
|
|
2816
2862
|
from: point,
|
|
2817
2863
|
to: point,
|
|
2818
|
-
text:
|
|
2819
|
-
text_ccw_rotation:
|
|
2864
|
+
text: z135.string().optional(),
|
|
2865
|
+
text_ccw_rotation: z135.number().optional(),
|
|
2820
2866
|
offset: length.optional(),
|
|
2821
2867
|
offset_distance: length.optional(),
|
|
2822
|
-
offset_direction:
|
|
2823
|
-
x:
|
|
2824
|
-
y:
|
|
2868
|
+
offset_direction: z135.object({
|
|
2869
|
+
x: z135.number(),
|
|
2870
|
+
y: z135.number()
|
|
2825
2871
|
}).optional(),
|
|
2826
|
-
font:
|
|
2872
|
+
font: z135.literal("tscircuit2024").default("tscircuit2024"),
|
|
2827
2873
|
font_size: length.default("1mm"),
|
|
2828
|
-
color:
|
|
2874
|
+
color: z135.string().optional(),
|
|
2829
2875
|
arrow_size: length.default("1mm")
|
|
2830
2876
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2831
2877
|
expectTypesMatch(true);
|
|
2832
2878
|
|
|
2833
2879
|
// src/pcb/pcb_note_text.ts
|
|
2834
|
-
import { z as z135 } from "zod";
|
|
2835
|
-
var pcb_note_text = z135.object({
|
|
2836
|
-
type: z135.literal("pcb_note_text"),
|
|
2837
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2838
|
-
pcb_component_id: z135.string().optional(),
|
|
2839
|
-
pcb_group_id: z135.string().optional(),
|
|
2840
|
-
subcircuit_id: z135.string().optional(),
|
|
2841
|
-
name: z135.string().optional(),
|
|
2842
|
-
font: z135.literal("tscircuit2024").default("tscircuit2024"),
|
|
2843
|
-
font_size: distance.default("1mm"),
|
|
2844
|
-
text: z135.string().optional(),
|
|
2845
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2846
|
-
anchor_alignment: z135.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2847
|
-
layer: visible_layer.default("top"),
|
|
2848
|
-
is_mirrored_from_top_view: z135.boolean().optional(),
|
|
2849
|
-
color: z135.string().optional()
|
|
2850
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2851
|
-
expectTypesMatch(true);
|
|
2852
|
-
|
|
2853
|
-
// src/pcb/pcb_note_rect.ts
|
|
2854
2880
|
import { z as z136 } from "zod";
|
|
2855
|
-
var
|
|
2856
|
-
type: z136.literal("
|
|
2857
|
-
|
|
2881
|
+
var pcb_note_text = z136.object({
|
|
2882
|
+
type: z136.literal("pcb_note_text"),
|
|
2883
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2858
2884
|
pcb_component_id: z136.string().optional(),
|
|
2859
2885
|
pcb_group_id: z136.string().optional(),
|
|
2860
2886
|
subcircuit_id: z136.string().optional(),
|
|
2861
2887
|
name: z136.string().optional(),
|
|
2888
|
+
font: z136.literal("tscircuit2024").default("tscircuit2024"),
|
|
2889
|
+
font_size: distance.default("1mm"),
|
|
2862
2890
|
text: z136.string().optional(),
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
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"),
|
|
2866
2893
|
layer: visible_layer.default("top"),
|
|
2867
|
-
|
|
2868
|
-
corner_radius: length.optional(),
|
|
2869
|
-
is_filled: z136.boolean().optional(),
|
|
2870
|
-
has_stroke: z136.boolean().optional(),
|
|
2871
|
-
is_stroke_dashed: z136.boolean().optional(),
|
|
2894
|
+
is_mirrored_from_top_view: z136.boolean().optional(),
|
|
2872
2895
|
color: z136.string().optional()
|
|
2873
|
-
}).describe("Defines a
|
|
2896
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2874
2897
|
expectTypesMatch(true);
|
|
2875
2898
|
|
|
2876
|
-
// src/pcb/
|
|
2899
|
+
// src/pcb/pcb_note_rect.ts
|
|
2877
2900
|
import { z as z137 } from "zod";
|
|
2878
|
-
var
|
|
2879
|
-
type: z137.literal("
|
|
2880
|
-
|
|
2901
|
+
var pcb_note_rect = z137.object({
|
|
2902
|
+
type: z137.literal("pcb_note_rect"),
|
|
2903
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2881
2904
|
pcb_component_id: z137.string().optional(),
|
|
2882
2905
|
pcb_group_id: z137.string().optional(),
|
|
2883
2906
|
subcircuit_id: z137.string().optional(),
|
|
2884
2907
|
name: z137.string().optional(),
|
|
2885
2908
|
text: z137.string().optional(),
|
|
2886
|
-
|
|
2909
|
+
center: point,
|
|
2910
|
+
width: length,
|
|
2911
|
+
height: length,
|
|
2887
2912
|
layer: visible_layer.default("top"),
|
|
2888
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(),
|
|
2889
2918
|
color: z137.string().optional()
|
|
2890
|
-
}).describe("Defines a
|
|
2919
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2891
2920
|
expectTypesMatch(true);
|
|
2892
2921
|
|
|
2893
|
-
// src/pcb/
|
|
2922
|
+
// src/pcb/pcb_note_path.ts
|
|
2894
2923
|
import { z as z138 } from "zod";
|
|
2895
|
-
var
|
|
2896
|
-
type: z138.literal("
|
|
2897
|
-
|
|
2924
|
+
var pcb_note_path = z138.object({
|
|
2925
|
+
type: z138.literal("pcb_note_path"),
|
|
2926
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2898
2927
|
pcb_component_id: z138.string().optional(),
|
|
2899
2928
|
pcb_group_id: z138.string().optional(),
|
|
2900
2929
|
subcircuit_id: z138.string().optional(),
|
|
2901
2930
|
name: z138.string().optional(),
|
|
2902
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(),
|
|
2903
2949
|
x1: distance,
|
|
2904
2950
|
y1: distance,
|
|
2905
2951
|
x2: distance,
|
|
2906
2952
|
y2: distance,
|
|
2907
2953
|
layer: visible_layer.default("top"),
|
|
2908
2954
|
stroke_width: distance.default("0.1mm"),
|
|
2909
|
-
color:
|
|
2910
|
-
is_dashed:
|
|
2955
|
+
color: z139.string().optional(),
|
|
2956
|
+
is_dashed: z139.boolean().optional()
|
|
2911
2957
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2912
2958
|
expectTypesMatch(true);
|
|
2913
2959
|
|
|
2914
2960
|
// src/pcb/pcb_note_dimension.ts
|
|
2915
|
-
import { z as
|
|
2916
|
-
var pcb_note_dimension =
|
|
2917
|
-
type:
|
|
2961
|
+
import { z as z140 } from "zod";
|
|
2962
|
+
var pcb_note_dimension = z140.object({
|
|
2963
|
+
type: z140.literal("pcb_note_dimension"),
|
|
2918
2964
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2919
|
-
pcb_component_id:
|
|
2920
|
-
pcb_group_id:
|
|
2921
|
-
subcircuit_id:
|
|
2922
|
-
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(),
|
|
2923
2969
|
from: point,
|
|
2924
2970
|
to: point,
|
|
2925
|
-
text:
|
|
2926
|
-
text_ccw_rotation:
|
|
2971
|
+
text: z140.string().optional(),
|
|
2972
|
+
text_ccw_rotation: z140.number().optional(),
|
|
2927
2973
|
offset_distance: length.optional(),
|
|
2928
|
-
offset_direction:
|
|
2929
|
-
x:
|
|
2930
|
-
y:
|
|
2974
|
+
offset_direction: z140.object({
|
|
2975
|
+
x: z140.number(),
|
|
2976
|
+
y: z140.number()
|
|
2931
2977
|
}).optional(),
|
|
2932
|
-
font:
|
|
2978
|
+
font: z140.literal("tscircuit2024").default("tscircuit2024"),
|
|
2933
2979
|
font_size: length.default("1mm"),
|
|
2934
2980
|
layer: visible_layer.default("top"),
|
|
2935
|
-
color:
|
|
2981
|
+
color: z140.string().optional(),
|
|
2936
2982
|
arrow_size: length.default("1mm")
|
|
2937
2983
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2938
2984
|
expectTypesMatch(true);
|
|
2939
2985
|
|
|
2940
2986
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2941
|
-
import { z as
|
|
2987
|
+
import { z as z141 } from "zod";
|
|
2942
2988
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
2943
|
-
type:
|
|
2989
|
+
type: z141.literal("pcb_footprint_overlap_error"),
|
|
2944
2990
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2945
|
-
error_type:
|
|
2946
|
-
pcb_smtpad_ids:
|
|
2947
|
-
pcb_plated_hole_ids:
|
|
2948
|
-
pcb_hole_ids:
|
|
2949
|
-
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()
|
|
2950
2996
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2951
2997
|
expectTypesMatch(
|
|
2952
2998
|
true
|
|
2953
2999
|
);
|
|
2954
3000
|
|
|
2955
3001
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
2956
|
-
import { z as
|
|
3002
|
+
import { z as z142 } from "zod";
|
|
2957
3003
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
2958
|
-
type:
|
|
3004
|
+
type: z142.literal("pcb_courtyard_overlap_error"),
|
|
2959
3005
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2960
|
-
error_type:
|
|
2961
|
-
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()])
|
|
2962
3008
|
}).describe(
|
|
2963
3009
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
2964
3010
|
);
|
|
@@ -2967,51 +3013,51 @@ expectTypesMatch(
|
|
|
2967
3013
|
);
|
|
2968
3014
|
|
|
2969
3015
|
// src/pcb/pcb_keepout.ts
|
|
2970
|
-
import { z as
|
|
2971
|
-
var pcb_keepout =
|
|
2972
|
-
type:
|
|
2973
|
-
shape:
|
|
2974
|
-
pcb_group_id:
|
|
2975
|
-
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(),
|
|
2976
3022
|
center: point,
|
|
2977
3023
|
width: distance,
|
|
2978
3024
|
height: distance,
|
|
2979
|
-
pcb_keepout_id:
|
|
2980
|
-
layers:
|
|
3025
|
+
pcb_keepout_id: z143.string(),
|
|
3026
|
+
layers: z143.array(z143.string()),
|
|
2981
3027
|
// Specify layers where the keepout applies
|
|
2982
|
-
description:
|
|
3028
|
+
description: z143.string().optional(),
|
|
2983
3029
|
// Optional description of the keepout
|
|
2984
|
-
excluded_pcb_component_ids:
|
|
3030
|
+
excluded_pcb_component_ids: z143.array(z143.string()).optional()
|
|
2985
3031
|
}).or(
|
|
2986
|
-
|
|
2987
|
-
type:
|
|
2988
|
-
shape:
|
|
2989
|
-
pcb_group_id:
|
|
2990
|
-
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(),
|
|
2991
3037
|
center: point,
|
|
2992
3038
|
radius: distance,
|
|
2993
|
-
pcb_keepout_id:
|
|
2994
|
-
layers:
|
|
3039
|
+
pcb_keepout_id: z143.string(),
|
|
3040
|
+
layers: z143.array(z143.string()),
|
|
2995
3041
|
// Specify layers where the keepout applies
|
|
2996
|
-
description:
|
|
3042
|
+
description: z143.string().optional(),
|
|
2997
3043
|
// Optional description of the keepout
|
|
2998
|
-
excluded_pcb_component_ids:
|
|
3044
|
+
excluded_pcb_component_ids: z143.array(z143.string()).optional()
|
|
2999
3045
|
})
|
|
3000
3046
|
);
|
|
3001
3047
|
expectTypesMatch(true);
|
|
3002
3048
|
|
|
3003
3049
|
// src/pcb/pcb_cutout.ts
|
|
3004
|
-
import { z as
|
|
3005
|
-
var pcb_cutout_base =
|
|
3006
|
-
type:
|
|
3050
|
+
import { z as z144 } from "zod";
|
|
3051
|
+
var pcb_cutout_base = z144.object({
|
|
3052
|
+
type: z144.literal("pcb_cutout"),
|
|
3007
3053
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3008
|
-
pcb_group_id:
|
|
3009
|
-
subcircuit_id:
|
|
3010
|
-
pcb_board_id:
|
|
3011
|
-
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()
|
|
3012
3058
|
});
|
|
3013
3059
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3014
|
-
shape:
|
|
3060
|
+
shape: z144.literal("rect"),
|
|
3015
3061
|
center: point,
|
|
3016
3062
|
width: length,
|
|
3017
3063
|
height: length,
|
|
@@ -3020,26 +3066,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3020
3066
|
});
|
|
3021
3067
|
expectTypesMatch(true);
|
|
3022
3068
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3023
|
-
shape:
|
|
3069
|
+
shape: z144.literal("circle"),
|
|
3024
3070
|
center: point,
|
|
3025
3071
|
radius: length
|
|
3026
3072
|
});
|
|
3027
3073
|
expectTypesMatch(true);
|
|
3028
3074
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3029
|
-
shape:
|
|
3030
|
-
points:
|
|
3075
|
+
shape: z144.literal("polygon"),
|
|
3076
|
+
points: z144.array(point)
|
|
3031
3077
|
});
|
|
3032
3078
|
expectTypesMatch(true);
|
|
3033
3079
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3034
|
-
shape:
|
|
3035
|
-
route:
|
|
3080
|
+
shape: z144.literal("path"),
|
|
3081
|
+
route: z144.array(point),
|
|
3036
3082
|
slot_width: length,
|
|
3037
3083
|
slot_length: length.optional(),
|
|
3038
3084
|
space_between_slots: length.optional(),
|
|
3039
3085
|
slot_corner_radius: length.optional()
|
|
3040
3086
|
});
|
|
3041
3087
|
expectTypesMatch(true);
|
|
3042
|
-
var pcb_cutout =
|
|
3088
|
+
var pcb_cutout = z144.discriminatedUnion("shape", [
|
|
3043
3089
|
pcb_cutout_rect,
|
|
3044
3090
|
pcb_cutout_circle,
|
|
3045
3091
|
pcb_cutout_polygon,
|
|
@@ -3048,169 +3094,169 @@ var pcb_cutout = z143.discriminatedUnion("shape", [
|
|
|
3048
3094
|
expectTypesMatch(true);
|
|
3049
3095
|
|
|
3050
3096
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3051
|
-
import { z as
|
|
3097
|
+
import { z as z145 } from "zod";
|
|
3052
3098
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3053
|
-
type:
|
|
3099
|
+
type: z145.literal("pcb_missing_footprint_error"),
|
|
3054
3100
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3055
3101
|
"pcb_missing_footprint_error"
|
|
3056
3102
|
),
|
|
3057
|
-
pcb_group_id:
|
|
3058
|
-
subcircuit_id:
|
|
3059
|
-
error_type:
|
|
3060
|
-
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()
|
|
3061
3107
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3062
3108
|
expectTypesMatch(
|
|
3063
3109
|
true
|
|
3064
3110
|
);
|
|
3065
3111
|
|
|
3066
3112
|
// src/pcb/external_footprint_load_error.ts
|
|
3067
|
-
import { z as
|
|
3113
|
+
import { z as z146 } from "zod";
|
|
3068
3114
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3069
|
-
type:
|
|
3115
|
+
type: z146.literal("external_footprint_load_error"),
|
|
3070
3116
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3071
3117
|
"external_footprint_load_error"
|
|
3072
3118
|
),
|
|
3073
|
-
pcb_component_id:
|
|
3074
|
-
source_component_id:
|
|
3075
|
-
pcb_group_id:
|
|
3076
|
-
subcircuit_id:
|
|
3077
|
-
footprinter_string:
|
|
3078
|
-
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")
|
|
3079
3125
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3080
3126
|
expectTypesMatch(true);
|
|
3081
3127
|
|
|
3082
3128
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3083
|
-
import { z as
|
|
3129
|
+
import { z as z147 } from "zod";
|
|
3084
3130
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3085
|
-
type:
|
|
3131
|
+
type: z147.literal("circuit_json_footprint_load_error"),
|
|
3086
3132
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3087
3133
|
"circuit_json_footprint_load_error"
|
|
3088
3134
|
),
|
|
3089
|
-
pcb_component_id:
|
|
3090
|
-
source_component_id:
|
|
3091
|
-
pcb_group_id:
|
|
3092
|
-
subcircuit_id:
|
|
3093
|
-
error_type:
|
|
3094
|
-
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()
|
|
3095
3141
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3096
3142
|
expectTypesMatch(true);
|
|
3097
3143
|
|
|
3098
3144
|
// src/pcb/pcb_group.ts
|
|
3099
|
-
import { z as
|
|
3100
|
-
var pcb_group =
|
|
3101
|
-
type:
|
|
3145
|
+
import { z as z148 } from "zod";
|
|
3146
|
+
var pcb_group = z148.object({
|
|
3147
|
+
type: z148.literal("pcb_group"),
|
|
3102
3148
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3103
|
-
source_group_id:
|
|
3104
|
-
is_subcircuit:
|
|
3105
|
-
subcircuit_id:
|
|
3149
|
+
source_group_id: z148.string(),
|
|
3150
|
+
is_subcircuit: z148.boolean().optional(),
|
|
3151
|
+
subcircuit_id: z148.string().optional(),
|
|
3106
3152
|
width: length.optional(),
|
|
3107
3153
|
height: length.optional(),
|
|
3108
3154
|
center: point,
|
|
3109
|
-
display_offset_x:
|
|
3155
|
+
display_offset_x: z148.string().optional().describe(
|
|
3110
3156
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3111
3157
|
),
|
|
3112
|
-
display_offset_y:
|
|
3158
|
+
display_offset_y: z148.string().optional().describe(
|
|
3113
3159
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3114
3160
|
),
|
|
3115
|
-
outline:
|
|
3161
|
+
outline: z148.array(point).optional(),
|
|
3116
3162
|
anchor_position: point.optional(),
|
|
3117
3163
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3118
|
-
position_mode:
|
|
3119
|
-
positioned_relative_to_pcb_group_id:
|
|
3120
|
-
positioned_relative_to_pcb_board_id:
|
|
3121
|
-
pcb_component_ids:
|
|
3122
|
-
child_layout_mode:
|
|
3123
|
-
name:
|
|
3124
|
-
description:
|
|
3125
|
-
layout_mode:
|
|
3126
|
-
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({
|
|
3127
3173
|
trace_clearance: length
|
|
3128
3174
|
}).optional(),
|
|
3129
|
-
autorouter_used_string:
|
|
3175
|
+
autorouter_used_string: z148.string().optional()
|
|
3130
3176
|
}).describe("Defines a group of components on the PCB");
|
|
3131
3177
|
expectTypesMatch(true);
|
|
3132
3178
|
|
|
3133
3179
|
// src/pcb/pcb_autorouting_error.ts
|
|
3134
|
-
import { z as
|
|
3180
|
+
import { z as z149 } from "zod";
|
|
3135
3181
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3136
|
-
type:
|
|
3182
|
+
type: z149.literal("pcb_autorouting_error"),
|
|
3137
3183
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3138
|
-
error_type:
|
|
3139
|
-
subcircuit_id:
|
|
3184
|
+
error_type: z149.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3185
|
+
subcircuit_id: z149.string().optional()
|
|
3140
3186
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3141
3187
|
expectTypesMatch(true);
|
|
3142
3188
|
|
|
3143
3189
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3144
|
-
import { z as
|
|
3145
|
-
var pcb_manual_edit_conflict_warning =
|
|
3146
|
-
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"),
|
|
3147
3193
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3148
3194
|
"pcb_manual_edit_conflict_warning"
|
|
3149
3195
|
),
|
|
3150
|
-
warning_type:
|
|
3151
|
-
message:
|
|
3152
|
-
pcb_component_id:
|
|
3153
|
-
pcb_group_id:
|
|
3154
|
-
subcircuit_id:
|
|
3155
|
-
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()
|
|
3156
3202
|
}).describe(
|
|
3157
3203
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3158
3204
|
);
|
|
3159
3205
|
expectTypesMatch(true);
|
|
3160
3206
|
|
|
3161
3207
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3162
|
-
import { z as
|
|
3163
|
-
var connectorOrientationDirection =
|
|
3164
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3165
|
-
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"),
|
|
3166
3212
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3167
3213
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3168
3214
|
),
|
|
3169
|
-
warning_type:
|
|
3170
|
-
message:
|
|
3171
|
-
pcb_component_id:
|
|
3172
|
-
source_component_id:
|
|
3173
|
-
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(),
|
|
3174
3220
|
facing_direction: connectorOrientationDirection,
|
|
3175
3221
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3176
|
-
subcircuit_id:
|
|
3222
|
+
subcircuit_id: z151.string().optional()
|
|
3177
3223
|
}).describe(
|
|
3178
3224
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3179
3225
|
);
|
|
3180
3226
|
expectTypesMatch(true);
|
|
3181
3227
|
|
|
3182
3228
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3183
|
-
import { z as
|
|
3184
|
-
var supplier_footprint_mismatch_warning =
|
|
3185
|
-
type:
|
|
3229
|
+
import { z as z152 } from "zod";
|
|
3230
|
+
var supplier_footprint_mismatch_warning = z152.object({
|
|
3231
|
+
type: z152.literal("supplier_footprint_mismatch_warning"),
|
|
3186
3232
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3187
3233
|
"supplier_footprint_mismatch_warning"
|
|
3188
3234
|
),
|
|
3189
|
-
warning_type:
|
|
3190
|
-
message:
|
|
3191
|
-
source_component_id:
|
|
3192
|
-
pcb_component_id:
|
|
3193
|
-
pcb_group_id:
|
|
3194
|
-
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(),
|
|
3195
3241
|
supplier_name: supplier_name.optional(),
|
|
3196
|
-
supplier_part_number:
|
|
3197
|
-
supplier_footprint_url:
|
|
3198
|
-
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()
|
|
3199
3245
|
}).describe(
|
|
3200
3246
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3201
3247
|
);
|
|
3202
3248
|
expectTypesMatch(true);
|
|
3203
3249
|
|
|
3204
3250
|
// src/pcb/pcb_breakout_point.ts
|
|
3205
|
-
import { z as
|
|
3206
|
-
var pcb_breakout_point =
|
|
3207
|
-
type:
|
|
3251
|
+
import { z as z153 } from "zod";
|
|
3252
|
+
var pcb_breakout_point = z153.object({
|
|
3253
|
+
type: z153.literal("pcb_breakout_point"),
|
|
3208
3254
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3209
|
-
pcb_group_id:
|
|
3210
|
-
subcircuit_id:
|
|
3211
|
-
source_trace_id:
|
|
3212
|
-
source_port_id:
|
|
3213
|
-
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(),
|
|
3214
3260
|
x: distance,
|
|
3215
3261
|
y: distance
|
|
3216
3262
|
}).describe(
|
|
@@ -3219,61 +3265,61 @@ var pcb_breakout_point = z152.object({
|
|
|
3219
3265
|
expectTypesMatch(true);
|
|
3220
3266
|
|
|
3221
3267
|
// src/pcb/pcb_ground_plane.ts
|
|
3222
|
-
import { z as
|
|
3223
|
-
var pcb_ground_plane =
|
|
3224
|
-
type:
|
|
3268
|
+
import { z as z154 } from "zod";
|
|
3269
|
+
var pcb_ground_plane = z154.object({
|
|
3270
|
+
type: z154.literal("pcb_ground_plane"),
|
|
3225
3271
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3226
|
-
source_pcb_ground_plane_id:
|
|
3227
|
-
source_net_id:
|
|
3228
|
-
pcb_group_id:
|
|
3229
|
-
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()
|
|
3230
3276
|
}).describe("Defines a ground plane on the PCB");
|
|
3231
3277
|
expectTypesMatch(true);
|
|
3232
3278
|
|
|
3233
3279
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3234
|
-
import { z as
|
|
3235
|
-
var pcb_ground_plane_region =
|
|
3236
|
-
type:
|
|
3280
|
+
import { z as z155 } from "zod";
|
|
3281
|
+
var pcb_ground_plane_region = z155.object({
|
|
3282
|
+
type: z155.literal("pcb_ground_plane_region"),
|
|
3237
3283
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3238
3284
|
"pcb_ground_plane_region"
|
|
3239
3285
|
),
|
|
3240
|
-
pcb_ground_plane_id:
|
|
3241
|
-
pcb_group_id:
|
|
3242
|
-
subcircuit_id:
|
|
3286
|
+
pcb_ground_plane_id: z155.string(),
|
|
3287
|
+
pcb_group_id: z155.string().optional(),
|
|
3288
|
+
subcircuit_id: z155.string().optional(),
|
|
3243
3289
|
layer: layer_ref,
|
|
3244
|
-
points:
|
|
3290
|
+
points: z155.array(point)
|
|
3245
3291
|
}).describe("Defines a polygon region of a ground plane");
|
|
3246
3292
|
expectTypesMatch(true);
|
|
3247
3293
|
|
|
3248
3294
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3249
|
-
import { z as
|
|
3250
|
-
var pcb_thermal_spoke =
|
|
3251
|
-
type:
|
|
3295
|
+
import { z as z156 } from "zod";
|
|
3296
|
+
var pcb_thermal_spoke = z156.object({
|
|
3297
|
+
type: z156.literal("pcb_thermal_spoke"),
|
|
3252
3298
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3253
|
-
pcb_ground_plane_id:
|
|
3254
|
-
shape:
|
|
3255
|
-
spoke_count:
|
|
3299
|
+
pcb_ground_plane_id: z156.string(),
|
|
3300
|
+
shape: z156.string(),
|
|
3301
|
+
spoke_count: z156.number(),
|
|
3256
3302
|
spoke_thickness: distance,
|
|
3257
3303
|
spoke_inner_diameter: distance,
|
|
3258
3304
|
spoke_outer_diameter: distance,
|
|
3259
|
-
pcb_plated_hole_id:
|
|
3260
|
-
subcircuit_id:
|
|
3305
|
+
pcb_plated_hole_id: z156.string().optional(),
|
|
3306
|
+
subcircuit_id: z156.string().optional()
|
|
3261
3307
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3262
3308
|
expectTypesMatch(true);
|
|
3263
3309
|
|
|
3264
3310
|
// src/pcb/pcb_copper_pour.ts
|
|
3265
|
-
import { z as
|
|
3266
|
-
var pcb_copper_pour_base =
|
|
3267
|
-
type:
|
|
3311
|
+
import { z as z157 } from "zod";
|
|
3312
|
+
var pcb_copper_pour_base = z157.object({
|
|
3313
|
+
type: z157.literal("pcb_copper_pour"),
|
|
3268
3314
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3269
|
-
pcb_group_id:
|
|
3270
|
-
subcircuit_id:
|
|
3315
|
+
pcb_group_id: z157.string().optional(),
|
|
3316
|
+
subcircuit_id: z157.string().optional(),
|
|
3271
3317
|
layer: layer_ref,
|
|
3272
|
-
source_net_id:
|
|
3273
|
-
covered_with_solder_mask:
|
|
3318
|
+
source_net_id: z157.string().optional(),
|
|
3319
|
+
covered_with_solder_mask: z157.boolean().optional().default(true)
|
|
3274
3320
|
});
|
|
3275
3321
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3276
|
-
shape:
|
|
3322
|
+
shape: z157.literal("rect"),
|
|
3277
3323
|
center: point,
|
|
3278
3324
|
width: length,
|
|
3279
3325
|
height: length,
|
|
@@ -3281,16 +3327,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3281
3327
|
});
|
|
3282
3328
|
expectTypesMatch(true);
|
|
3283
3329
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3284
|
-
shape:
|
|
3330
|
+
shape: z157.literal("brep"),
|
|
3285
3331
|
brep_shape
|
|
3286
3332
|
});
|
|
3287
3333
|
expectTypesMatch(true);
|
|
3288
3334
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3289
|
-
shape:
|
|
3290
|
-
points:
|
|
3335
|
+
shape: z157.literal("polygon"),
|
|
3336
|
+
points: z157.array(point)
|
|
3291
3337
|
});
|
|
3292
3338
|
expectTypesMatch(true);
|
|
3293
|
-
var pcb_copper_pour =
|
|
3339
|
+
var pcb_copper_pour = z157.discriminatedUnion("shape", [
|
|
3294
3340
|
pcb_copper_pour_rect,
|
|
3295
3341
|
pcb_copper_pour_brep,
|
|
3296
3342
|
pcb_copper_pour_polygon
|
|
@@ -3298,99 +3344,99 @@ var pcb_copper_pour = z156.discriminatedUnion("shape", [
|
|
|
3298
3344
|
expectTypesMatch(true);
|
|
3299
3345
|
|
|
3300
3346
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3301
|
-
import { z as
|
|
3347
|
+
import { z as z158 } from "zod";
|
|
3302
3348
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3303
|
-
type:
|
|
3349
|
+
type: z158.literal("pcb_component_outside_board_error"),
|
|
3304
3350
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3305
3351
|
"pcb_component_outside_board_error"
|
|
3306
3352
|
),
|
|
3307
|
-
error_type:
|
|
3308
|
-
pcb_component_id:
|
|
3309
|
-
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(),
|
|
3310
3356
|
component_center: point,
|
|
3311
|
-
component_bounds:
|
|
3312
|
-
min_x:
|
|
3313
|
-
max_x:
|
|
3314
|
-
min_y:
|
|
3315
|
-
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()
|
|
3316
3362
|
}),
|
|
3317
|
-
subcircuit_id:
|
|
3318
|
-
source_component_id:
|
|
3363
|
+
subcircuit_id: z158.string().optional(),
|
|
3364
|
+
source_component_id: z158.string().optional()
|
|
3319
3365
|
}).describe(
|
|
3320
3366
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3321
3367
|
);
|
|
3322
3368
|
expectTypesMatch(true);
|
|
3323
3369
|
|
|
3324
3370
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3325
|
-
import { z as
|
|
3371
|
+
import { z as z159 } from "zod";
|
|
3326
3372
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3327
|
-
type:
|
|
3373
|
+
type: z159.literal("pcb_component_not_on_board_edge_error"),
|
|
3328
3374
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3329
3375
|
"pcb_component_not_on_board_edge_error"
|
|
3330
3376
|
),
|
|
3331
|
-
error_type:
|
|
3332
|
-
pcb_component_id:
|
|
3333
|
-
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(),
|
|
3334
3380
|
component_center: point,
|
|
3335
|
-
pad_to_nearest_board_edge_distance:
|
|
3336
|
-
source_component_id:
|
|
3337
|
-
subcircuit_id:
|
|
3381
|
+
pad_to_nearest_board_edge_distance: z159.number(),
|
|
3382
|
+
source_component_id: z159.string().optional(),
|
|
3383
|
+
subcircuit_id: z159.string().optional()
|
|
3338
3384
|
}).describe(
|
|
3339
3385
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3340
3386
|
);
|
|
3341
3387
|
expectTypesMatch(true);
|
|
3342
3388
|
|
|
3343
3389
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3344
|
-
import { z as
|
|
3390
|
+
import { z as z160 } from "zod";
|
|
3345
3391
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3346
|
-
type:
|
|
3392
|
+
type: z160.literal("pcb_component_invalid_layer_error"),
|
|
3347
3393
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3348
3394
|
"pcb_component_invalid_layer_error"
|
|
3349
3395
|
),
|
|
3350
|
-
error_type:
|
|
3351
|
-
pcb_component_id:
|
|
3352
|
-
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(),
|
|
3353
3399
|
layer: layer_ref,
|
|
3354
|
-
subcircuit_id:
|
|
3400
|
+
subcircuit_id: z160.string().optional()
|
|
3355
3401
|
}).describe(
|
|
3356
3402
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3357
3403
|
);
|
|
3358
3404
|
expectTypesMatch(true);
|
|
3359
3405
|
|
|
3360
3406
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3361
|
-
import { z as
|
|
3407
|
+
import { z as z161 } from "zod";
|
|
3362
3408
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3363
|
-
type:
|
|
3409
|
+
type: z161.literal("pcb_via_clearance_error"),
|
|
3364
3410
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3365
|
-
error_type:
|
|
3366
|
-
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),
|
|
3367
3413
|
minimum_clearance: distance.optional(),
|
|
3368
3414
|
actual_clearance: distance.optional(),
|
|
3369
|
-
pcb_center:
|
|
3370
|
-
x:
|
|
3371
|
-
y:
|
|
3415
|
+
pcb_center: z161.object({
|
|
3416
|
+
x: z161.number().optional(),
|
|
3417
|
+
y: z161.number().optional()
|
|
3372
3418
|
}).optional(),
|
|
3373
|
-
subcircuit_id:
|
|
3419
|
+
subcircuit_id: z161.string().optional()
|
|
3374
3420
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3375
3421
|
expectTypesMatch(true);
|
|
3376
3422
|
|
|
3377
3423
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3378
|
-
import { z as
|
|
3424
|
+
import { z as z162 } from "zod";
|
|
3379
3425
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3380
|
-
type:
|
|
3426
|
+
type: z162.literal("pcb_via_trace_clearance_error"),
|
|
3381
3427
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3382
3428
|
"pcb_via_trace_clearance_error"
|
|
3383
3429
|
),
|
|
3384
|
-
error_type:
|
|
3385
|
-
pcb_via_id:
|
|
3386
|
-
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(),
|
|
3387
3433
|
minimum_clearance: distance.optional(),
|
|
3388
3434
|
actual_clearance: distance.optional(),
|
|
3389
|
-
center:
|
|
3390
|
-
x:
|
|
3391
|
-
y:
|
|
3435
|
+
center: z162.object({
|
|
3436
|
+
x: z162.number().optional(),
|
|
3437
|
+
y: z162.number().optional()
|
|
3392
3438
|
}).optional(),
|
|
3393
|
-
subcircuit_id:
|
|
3439
|
+
subcircuit_id: z162.string().optional()
|
|
3394
3440
|
}).describe(
|
|
3395
3441
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3396
3442
|
);
|
|
@@ -3399,41 +3445,41 @@ expectTypesMatch(
|
|
|
3399
3445
|
);
|
|
3400
3446
|
|
|
3401
3447
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3402
|
-
import { z as
|
|
3448
|
+
import { z as z163 } from "zod";
|
|
3403
3449
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3404
|
-
type:
|
|
3450
|
+
type: z163.literal("pcb_pad_pad_clearance_error"),
|
|
3405
3451
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3406
3452
|
"pcb_pad_pad_clearance_error"
|
|
3407
3453
|
),
|
|
3408
|
-
error_type:
|
|
3409
|
-
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),
|
|
3410
3456
|
minimum_clearance: distance.optional(),
|
|
3411
3457
|
actual_clearance: distance.optional(),
|
|
3412
|
-
center:
|
|
3413
|
-
x:
|
|
3414
|
-
y:
|
|
3458
|
+
center: z163.object({
|
|
3459
|
+
x: z163.number().optional(),
|
|
3460
|
+
y: z163.number().optional()
|
|
3415
3461
|
}).optional(),
|
|
3416
|
-
subcircuit_id:
|
|
3462
|
+
subcircuit_id: z163.string().optional()
|
|
3417
3463
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3418
3464
|
expectTypesMatch(true);
|
|
3419
3465
|
|
|
3420
3466
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3421
|
-
import { z as
|
|
3467
|
+
import { z as z164 } from "zod";
|
|
3422
3468
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3423
|
-
type:
|
|
3469
|
+
type: z164.literal("pcb_pad_trace_clearance_error"),
|
|
3424
3470
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3425
3471
|
"pcb_pad_trace_clearance_error"
|
|
3426
3472
|
),
|
|
3427
|
-
error_type:
|
|
3428
|
-
pcb_pad_id:
|
|
3429
|
-
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(),
|
|
3430
3476
|
minimum_clearance: distance.optional(),
|
|
3431
3477
|
actual_clearance: distance.optional(),
|
|
3432
|
-
center:
|
|
3433
|
-
x:
|
|
3434
|
-
y:
|
|
3478
|
+
center: z164.object({
|
|
3479
|
+
x: z164.number().optional(),
|
|
3480
|
+
y: z164.number().optional()
|
|
3435
3481
|
}).optional(),
|
|
3436
|
-
subcircuit_id:
|
|
3482
|
+
subcircuit_id: z164.string().optional()
|
|
3437
3483
|
}).describe(
|
|
3438
3484
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3439
3485
|
);
|
|
@@ -3442,89 +3488,89 @@ expectTypesMatch(
|
|
|
3442
3488
|
);
|
|
3443
3489
|
|
|
3444
3490
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3445
|
-
import { z as
|
|
3446
|
-
var pcb_courtyard_rect =
|
|
3447
|
-
type:
|
|
3491
|
+
import { z as z165 } from "zod";
|
|
3492
|
+
var pcb_courtyard_rect = z165.object({
|
|
3493
|
+
type: z165.literal("pcb_courtyard_rect"),
|
|
3448
3494
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3449
|
-
pcb_component_id:
|
|
3450
|
-
pcb_group_id:
|
|
3451
|
-
subcircuit_id:
|
|
3495
|
+
pcb_component_id: z165.string(),
|
|
3496
|
+
pcb_group_id: z165.string().optional(),
|
|
3497
|
+
subcircuit_id: z165.string().optional(),
|
|
3452
3498
|
center: point,
|
|
3453
3499
|
width: length,
|
|
3454
3500
|
height: length,
|
|
3455
3501
|
layer: visible_layer,
|
|
3456
3502
|
ccw_rotation: rotation.optional(),
|
|
3457
|
-
color:
|
|
3503
|
+
color: z165.string().optional()
|
|
3458
3504
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3459
3505
|
expectTypesMatch(true);
|
|
3460
3506
|
|
|
3461
3507
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3462
|
-
import { z as
|
|
3463
|
-
var pcb_courtyard_outline =
|
|
3464
|
-
type:
|
|
3508
|
+
import { z as z166 } from "zod";
|
|
3509
|
+
var pcb_courtyard_outline = z166.object({
|
|
3510
|
+
type: z166.literal("pcb_courtyard_outline"),
|
|
3465
3511
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3466
3512
|
"pcb_courtyard_outline"
|
|
3467
3513
|
),
|
|
3468
|
-
pcb_component_id:
|
|
3469
|
-
pcb_group_id:
|
|
3470
|
-
subcircuit_id:
|
|
3514
|
+
pcb_component_id: z166.string(),
|
|
3515
|
+
pcb_group_id: z166.string().optional(),
|
|
3516
|
+
subcircuit_id: z166.string().optional(),
|
|
3471
3517
|
layer: visible_layer,
|
|
3472
|
-
outline:
|
|
3518
|
+
outline: z166.array(point).min(2)
|
|
3473
3519
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3474
3520
|
expectTypesMatch(true);
|
|
3475
3521
|
|
|
3476
3522
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3477
|
-
import { z as
|
|
3478
|
-
var pcb_courtyard_polygon =
|
|
3479
|
-
type:
|
|
3523
|
+
import { z as z167 } from "zod";
|
|
3524
|
+
var pcb_courtyard_polygon = z167.object({
|
|
3525
|
+
type: z167.literal("pcb_courtyard_polygon"),
|
|
3480
3526
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3481
3527
|
"pcb_courtyard_polygon"
|
|
3482
3528
|
),
|
|
3483
|
-
pcb_component_id:
|
|
3484
|
-
pcb_group_id:
|
|
3485
|
-
subcircuit_id:
|
|
3529
|
+
pcb_component_id: z167.string(),
|
|
3530
|
+
pcb_group_id: z167.string().optional(),
|
|
3531
|
+
subcircuit_id: z167.string().optional(),
|
|
3486
3532
|
layer: visible_layer,
|
|
3487
|
-
points:
|
|
3488
|
-
color:
|
|
3533
|
+
points: z167.array(point).min(3),
|
|
3534
|
+
color: z167.string().optional()
|
|
3489
3535
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3490
3536
|
expectTypesMatch(true);
|
|
3491
3537
|
|
|
3492
3538
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3493
|
-
import { z as
|
|
3494
|
-
var pcb_courtyard_circle =
|
|
3495
|
-
type:
|
|
3539
|
+
import { z as z168 } from "zod";
|
|
3540
|
+
var pcb_courtyard_circle = z168.object({
|
|
3541
|
+
type: z168.literal("pcb_courtyard_circle"),
|
|
3496
3542
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3497
3543
|
"pcb_courtyard_circle"
|
|
3498
3544
|
),
|
|
3499
|
-
pcb_component_id:
|
|
3500
|
-
pcb_group_id:
|
|
3501
|
-
subcircuit_id:
|
|
3545
|
+
pcb_component_id: z168.string(),
|
|
3546
|
+
pcb_group_id: z168.string().optional(),
|
|
3547
|
+
subcircuit_id: z168.string().optional(),
|
|
3502
3548
|
center: point,
|
|
3503
3549
|
radius: length,
|
|
3504
3550
|
layer: visible_layer,
|
|
3505
|
-
color:
|
|
3551
|
+
color: z168.string().optional()
|
|
3506
3552
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3507
3553
|
expectTypesMatch(true);
|
|
3508
3554
|
|
|
3509
3555
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3510
|
-
import { z as
|
|
3511
|
-
var pcb_courtyard_pill =
|
|
3512
|
-
type:
|
|
3556
|
+
import { z as z169 } from "zod";
|
|
3557
|
+
var pcb_courtyard_pill = z169.object({
|
|
3558
|
+
type: z169.literal("pcb_courtyard_pill"),
|
|
3513
3559
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3514
|
-
pcb_component_id:
|
|
3515
|
-
pcb_group_id:
|
|
3516
|
-
subcircuit_id:
|
|
3560
|
+
pcb_component_id: z169.string(),
|
|
3561
|
+
pcb_group_id: z169.string().optional(),
|
|
3562
|
+
subcircuit_id: z169.string().optional(),
|
|
3517
3563
|
center: point,
|
|
3518
3564
|
width: length,
|
|
3519
3565
|
height: length,
|
|
3520
3566
|
radius: length,
|
|
3521
3567
|
layer: visible_layer,
|
|
3522
|
-
color:
|
|
3568
|
+
color: z169.string().optional()
|
|
3523
3569
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3524
3570
|
expectTypesMatch(true);
|
|
3525
3571
|
|
|
3526
3572
|
// src/cad/cad_component.ts
|
|
3527
|
-
import { z as
|
|
3573
|
+
import { z as z170 } from "zod";
|
|
3528
3574
|
|
|
3529
3575
|
// src/cad/cad_model_conventions.ts
|
|
3530
3576
|
var cad_model_formats = [
|
|
@@ -3555,49 +3601,49 @@ var cadModelDefaultDirectionMap = {
|
|
|
3555
3601
|
};
|
|
3556
3602
|
|
|
3557
3603
|
// src/cad/cad_component.ts
|
|
3558
|
-
var cad_component =
|
|
3559
|
-
type:
|
|
3560
|
-
cad_component_id:
|
|
3561
|
-
pcb_component_id:
|
|
3562
|
-
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(),
|
|
3563
3609
|
position: point3,
|
|
3564
3610
|
rotation: point3.optional(),
|
|
3565
3611
|
size: point3.optional(),
|
|
3566
3612
|
layer: layer_ref.optional(),
|
|
3567
|
-
subcircuit_id:
|
|
3613
|
+
subcircuit_id: z170.string().optional(),
|
|
3568
3614
|
// These are all ways to generate/load the 3d model
|
|
3569
|
-
footprinter_string:
|
|
3570
|
-
model_obj_url:
|
|
3571
|
-
model_stl_url:
|
|
3572
|
-
model_3mf_url:
|
|
3573
|
-
model_gltf_url:
|
|
3574
|
-
model_glb_url:
|
|
3575
|
-
model_step_url:
|
|
3576
|
-
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(),
|
|
3577
3623
|
model_asset: asset.optional(),
|
|
3578
|
-
model_unit_to_mm_scale_factor:
|
|
3579
|
-
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(
|
|
3580
3626
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3581
3627
|
),
|
|
3582
3628
|
model_origin_position: point3.optional(),
|
|
3583
|
-
model_origin_alignment:
|
|
3629
|
+
model_origin_alignment: z170.enum([
|
|
3584
3630
|
"unknown",
|
|
3585
3631
|
"center",
|
|
3586
3632
|
"center_of_component_on_board_surface",
|
|
3587
3633
|
"bottom_center_of_component"
|
|
3588
3634
|
]).optional(),
|
|
3589
|
-
model_object_fit:
|
|
3590
|
-
model_jscad:
|
|
3591
|
-
show_as_translucent_model:
|
|
3592
|
-
show_as_bounding_box:
|
|
3593
|
-
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")
|
|
3594
3640
|
}).describe("Defines a component on the PCB");
|
|
3595
3641
|
expectTypesMatch(true);
|
|
3596
3642
|
|
|
3597
3643
|
// src/simulation/simulation_voltage_source.ts
|
|
3598
|
-
import { z as
|
|
3599
|
-
var wave_shape =
|
|
3600
|
-
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) => {
|
|
3601
3647
|
if (typeof val === "string") {
|
|
3602
3648
|
if (val.endsWith("%")) {
|
|
3603
3649
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3606,32 +3652,32 @@ var percentage = z170.union([z170.string(), z170.number()]).transform((val) => {
|
|
|
3606
3652
|
}
|
|
3607
3653
|
return val;
|
|
3608
3654
|
}).pipe(
|
|
3609
|
-
|
|
3655
|
+
z171.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3610
3656
|
);
|
|
3611
|
-
var simulation_dc_voltage_source =
|
|
3612
|
-
type:
|
|
3657
|
+
var simulation_dc_voltage_source = z171.object({
|
|
3658
|
+
type: z171.literal("simulation_voltage_source"),
|
|
3613
3659
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3614
3660
|
"simulation_voltage_source"
|
|
3615
3661
|
),
|
|
3616
|
-
is_dc_source:
|
|
3617
|
-
positive_source_port_id:
|
|
3618
|
-
negative_source_port_id:
|
|
3619
|
-
positive_source_net_id:
|
|
3620
|
-
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(),
|
|
3621
3667
|
voltage,
|
|
3622
3668
|
ac_magnitude: voltage.optional(),
|
|
3623
3669
|
ac_phase: rotation.optional()
|
|
3624
3670
|
}).describe("Defines a DC voltage source for simulation");
|
|
3625
|
-
var simulation_ac_voltage_source =
|
|
3626
|
-
type:
|
|
3671
|
+
var simulation_ac_voltage_source = z171.object({
|
|
3672
|
+
type: z171.literal("simulation_voltage_source"),
|
|
3627
3673
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3628
3674
|
"simulation_voltage_source"
|
|
3629
3675
|
),
|
|
3630
|
-
is_dc_source:
|
|
3631
|
-
terminal1_source_port_id:
|
|
3632
|
-
terminal2_source_port_id:
|
|
3633
|
-
terminal1_source_net_id:
|
|
3634
|
-
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(),
|
|
3635
3681
|
voltage: voltage.optional(),
|
|
3636
3682
|
frequency: frequency.optional(),
|
|
3637
3683
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3646,14 +3692,14 @@ var simulation_ac_voltage_source = z170.object({
|
|
|
3646
3692
|
ac_magnitude: voltage.optional(),
|
|
3647
3693
|
ac_phase: rotation.optional()
|
|
3648
3694
|
}).describe("Defines an AC voltage source for simulation");
|
|
3649
|
-
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");
|
|
3650
3696
|
expectTypesMatch(true);
|
|
3651
3697
|
expectTypesMatch(true);
|
|
3652
3698
|
expectTypesMatch(true);
|
|
3653
3699
|
|
|
3654
3700
|
// src/simulation/simulation_current_source.ts
|
|
3655
|
-
import { z as
|
|
3656
|
-
var percentage2 =
|
|
3701
|
+
import { z as z172 } from "zod";
|
|
3702
|
+
var percentage2 = z172.union([z172.string(), z172.number()]).transform((val) => {
|
|
3657
3703
|
if (typeof val === "string") {
|
|
3658
3704
|
if (val.endsWith("%")) {
|
|
3659
3705
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3662,32 +3708,32 @@ var percentage2 = z171.union([z171.string(), z171.number()]).transform((val) =>
|
|
|
3662
3708
|
}
|
|
3663
3709
|
return val;
|
|
3664
3710
|
}).pipe(
|
|
3665
|
-
|
|
3711
|
+
z172.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3666
3712
|
);
|
|
3667
|
-
var simulation_dc_current_source =
|
|
3668
|
-
type:
|
|
3713
|
+
var simulation_dc_current_source = z172.object({
|
|
3714
|
+
type: z172.literal("simulation_current_source"),
|
|
3669
3715
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3670
3716
|
"simulation_current_source"
|
|
3671
3717
|
),
|
|
3672
|
-
is_dc_source:
|
|
3673
|
-
positive_source_port_id:
|
|
3674
|
-
negative_source_port_id:
|
|
3675
|
-
positive_source_net_id:
|
|
3676
|
-
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(),
|
|
3677
3723
|
current,
|
|
3678
3724
|
ac_magnitude: current.optional(),
|
|
3679
3725
|
ac_phase: rotation.optional()
|
|
3680
3726
|
}).describe("Defines a DC current source for simulation");
|
|
3681
|
-
var simulation_ac_current_source =
|
|
3682
|
-
type:
|
|
3727
|
+
var simulation_ac_current_source = z172.object({
|
|
3728
|
+
type: z172.literal("simulation_current_source"),
|
|
3683
3729
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3684
3730
|
"simulation_current_source"
|
|
3685
3731
|
),
|
|
3686
|
-
is_dc_source:
|
|
3687
|
-
terminal1_source_port_id:
|
|
3688
|
-
terminal2_source_port_id:
|
|
3689
|
-
terminal1_source_net_id:
|
|
3690
|
-
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(),
|
|
3691
3737
|
current: current.optional(),
|
|
3692
3738
|
frequency: frequency.optional(),
|
|
3693
3739
|
peak_to_peak_current: current.optional(),
|
|
@@ -3697,58 +3743,58 @@ var simulation_ac_current_source = z171.object({
|
|
|
3697
3743
|
ac_magnitude: current.optional(),
|
|
3698
3744
|
ac_phase: rotation.optional()
|
|
3699
3745
|
}).describe("Defines an AC current source for simulation");
|
|
3700
|
-
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");
|
|
3701
3747
|
expectTypesMatch(true);
|
|
3702
3748
|
expectTypesMatch(true);
|
|
3703
3749
|
expectTypesMatch(true);
|
|
3704
3750
|
|
|
3705
3751
|
// src/simulation/simulation_experiment.ts
|
|
3706
|
-
import { z as
|
|
3752
|
+
import { z as z174 } from "zod";
|
|
3707
3753
|
|
|
3708
3754
|
// src/simulation/simulation_units.ts
|
|
3709
|
-
import { z as
|
|
3710
|
-
var simulation_dc_sweep_unit =
|
|
3755
|
+
import { z as z173 } from "zod";
|
|
3756
|
+
var simulation_dc_sweep_unit = z173.custom(
|
|
3711
3757
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
3712
3758
|
);
|
|
3713
|
-
var simulation_parameter_unit =
|
|
3759
|
+
var simulation_parameter_unit = z173.custom(
|
|
3714
3760
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
3715
3761
|
);
|
|
3716
3762
|
|
|
3717
3763
|
// src/simulation/simulation_experiment.ts
|
|
3718
|
-
var experiment_type =
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
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")
|
|
3723
3769
|
]);
|
|
3724
|
-
var spice_simulation_options =
|
|
3725
|
-
method:
|
|
3726
|
-
reltol:
|
|
3727
|
-
abstol:
|
|
3728
|
-
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()
|
|
3729
3775
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3730
|
-
var simulation_experiment =
|
|
3731
|
-
type:
|
|
3776
|
+
var simulation_experiment = z174.object({
|
|
3777
|
+
type: z174.literal("simulation_experiment"),
|
|
3732
3778
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3733
3779
|
"simulation_experiment"
|
|
3734
3780
|
),
|
|
3735
|
-
name:
|
|
3781
|
+
name: z174.string(),
|
|
3736
3782
|
experiment_type,
|
|
3737
3783
|
time_per_step: duration_ms.optional(),
|
|
3738
3784
|
start_time_ms: ms.optional(),
|
|
3739
3785
|
end_time_ms: ms.optional(),
|
|
3740
3786
|
spice_options: spice_simulation_options.optional(),
|
|
3741
|
-
dc_sweep_voltage_source_id:
|
|
3742
|
-
dc_sweep_current_source_id:
|
|
3743
|
-
dc_sweep_start:
|
|
3744
|
-
dc_sweep_stop:
|
|
3745
|
-
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(),
|
|
3746
3792
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
3747
|
-
ac_sweep_type:
|
|
3748
|
-
ac_samples_per_interval:
|
|
3749
|
-
ac_sample_count:
|
|
3750
|
-
ac_start_frequency_hz:
|
|
3751
|
-
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()
|
|
3752
3798
|
}).superRefine((experiment, context) => {
|
|
3753
3799
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
3754
3800
|
const requiredFields = [
|
|
@@ -3760,7 +3806,7 @@ var simulation_experiment = z173.object({
|
|
|
3760
3806
|
for (const field of requiredFields) {
|
|
3761
3807
|
if (experiment[field] === void 0) {
|
|
3762
3808
|
context.addIssue({
|
|
3763
|
-
code:
|
|
3809
|
+
code: z174.ZodIssueCode.custom,
|
|
3764
3810
|
path: [field],
|
|
3765
3811
|
message: `${field} is required for a DC sweep`
|
|
3766
3812
|
});
|
|
@@ -3770,7 +3816,7 @@ var simulation_experiment = z173.object({
|
|
|
3770
3816
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
3771
3817
|
if (hasVoltageSource === hasCurrentSource) {
|
|
3772
3818
|
context.addIssue({
|
|
3773
|
-
code:
|
|
3819
|
+
code: z174.ZodIssueCode.custom,
|
|
3774
3820
|
path: ["dc_sweep_voltage_source_id"],
|
|
3775
3821
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
3776
3822
|
});
|
|
@@ -3779,35 +3825,35 @@ var simulation_experiment = z173.object({
|
|
|
3779
3825
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
3780
3826
|
if (experiment.ac_sweep_type === void 0) {
|
|
3781
3827
|
context.addIssue({
|
|
3782
|
-
code:
|
|
3828
|
+
code: z174.ZodIssueCode.custom,
|
|
3783
3829
|
path: ["ac_sweep_type"],
|
|
3784
3830
|
message: "ac_sweep_type is required for an AC analysis"
|
|
3785
3831
|
});
|
|
3786
3832
|
}
|
|
3787
3833
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
3788
3834
|
context.addIssue({
|
|
3789
|
-
code:
|
|
3835
|
+
code: z174.ZodIssueCode.custom,
|
|
3790
3836
|
path: ["ac_start_frequency_hz"],
|
|
3791
3837
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
3792
3838
|
});
|
|
3793
3839
|
}
|
|
3794
3840
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
3795
3841
|
context.addIssue({
|
|
3796
|
-
code:
|
|
3842
|
+
code: z174.ZodIssueCode.custom,
|
|
3797
3843
|
path: ["ac_stop_frequency_hz"],
|
|
3798
3844
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
3799
3845
|
});
|
|
3800
3846
|
}
|
|
3801
3847
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
3802
3848
|
context.addIssue({
|
|
3803
|
-
code:
|
|
3849
|
+
code: z174.ZodIssueCode.custom,
|
|
3804
3850
|
path: ["ac_sample_count"],
|
|
3805
3851
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
3806
3852
|
});
|
|
3807
3853
|
}
|
|
3808
3854
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
3809
3855
|
context.addIssue({
|
|
3810
|
-
code:
|
|
3856
|
+
code: z174.ZodIssueCode.custom,
|
|
3811
3857
|
path: ["ac_samples_per_interval"],
|
|
3812
3858
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
3813
3859
|
});
|
|
@@ -3817,87 +3863,87 @@ var simulation_experiment = z173.object({
|
|
|
3817
3863
|
expectTypesMatch(true);
|
|
3818
3864
|
|
|
3819
3865
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3820
|
-
import { z as
|
|
3866
|
+
import { z as z176 } from "zod";
|
|
3821
3867
|
|
|
3822
3868
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
3823
|
-
import { z as
|
|
3824
|
-
var simulation_parameter_sweep_coordinate =
|
|
3825
|
-
simulation_parameter_sweep_id:
|
|
3826
|
-
sweep_index:
|
|
3827
|
-
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(),
|
|
3828
3874
|
parameter_unit: simulation_parameter_unit
|
|
3829
3875
|
});
|
|
3830
3876
|
expectTypesMatch(true);
|
|
3831
3877
|
|
|
3832
3878
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3833
|
-
var simulation_transient_voltage_graph =
|
|
3834
|
-
type:
|
|
3879
|
+
var simulation_transient_voltage_graph = z176.object({
|
|
3880
|
+
type: z176.literal("simulation_transient_voltage_graph"),
|
|
3835
3881
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3836
3882
|
"simulation_transient_voltage_graph"
|
|
3837
3883
|
),
|
|
3838
|
-
simulation_experiment_id:
|
|
3884
|
+
simulation_experiment_id: z176.string(),
|
|
3839
3885
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
3840
|
-
timestamps_ms:
|
|
3841
|
-
voltage_levels:
|
|
3842
|
-
source_component_id:
|
|
3843
|
-
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(),
|
|
3844
3890
|
time_per_step: duration_ms,
|
|
3845
3891
|
start_time_ms: ms,
|
|
3846
3892
|
end_time_ms: ms,
|
|
3847
|
-
name:
|
|
3848
|
-
color:
|
|
3893
|
+
name: z176.string().optional(),
|
|
3894
|
+
color: z176.string().optional()
|
|
3849
3895
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3850
3896
|
expectTypesMatch(true);
|
|
3851
3897
|
|
|
3852
3898
|
// src/simulation/simulation_transient_current_graph.ts
|
|
3853
|
-
import { z as
|
|
3854
|
-
var simulation_transient_current_graph =
|
|
3855
|
-
type:
|
|
3899
|
+
import { z as z177 } from "zod";
|
|
3900
|
+
var simulation_transient_current_graph = z177.object({
|
|
3901
|
+
type: z177.literal("simulation_transient_current_graph"),
|
|
3856
3902
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
3857
3903
|
"simulation_transient_current_graph"
|
|
3858
3904
|
),
|
|
3859
|
-
simulation_experiment_id:
|
|
3905
|
+
simulation_experiment_id: z177.string(),
|
|
3860
3906
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
3861
|
-
timestamps_ms:
|
|
3862
|
-
current_levels:
|
|
3863
|
-
source_component_id:
|
|
3864
|
-
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(),
|
|
3865
3911
|
time_per_step: duration_ms,
|
|
3866
3912
|
start_time_ms: ms,
|
|
3867
3913
|
end_time_ms: ms,
|
|
3868
|
-
name:
|
|
3869
|
-
color:
|
|
3914
|
+
name: z177.string().optional(),
|
|
3915
|
+
color: z177.string().optional()
|
|
3870
3916
|
}).describe("Stores current measurements over time for a simulation");
|
|
3871
3917
|
expectTypesMatch(true);
|
|
3872
3918
|
|
|
3873
3919
|
// src/simulation/simulation_switch.ts
|
|
3874
|
-
import { z as
|
|
3875
|
-
var simulation_switch =
|
|
3876
|
-
type:
|
|
3920
|
+
import { z as z178 } from "zod";
|
|
3921
|
+
var simulation_switch = z178.object({
|
|
3922
|
+
type: z178.literal("simulation_switch"),
|
|
3877
3923
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3878
|
-
source_component_id:
|
|
3924
|
+
source_component_id: z178.string().optional(),
|
|
3879
3925
|
closes_at: ms.optional(),
|
|
3880
3926
|
opens_at: ms.optional(),
|
|
3881
|
-
starts_closed:
|
|
3927
|
+
starts_closed: z178.boolean().optional(),
|
|
3882
3928
|
switching_frequency: frequency.optional()
|
|
3883
3929
|
}).describe("Defines a switch for simulation timing control");
|
|
3884
3930
|
expectTypesMatch(true);
|
|
3885
3931
|
|
|
3886
3932
|
// src/simulation/simulation_voltage_probe.ts
|
|
3887
|
-
import { z as
|
|
3888
|
-
var simulation_voltage_probe =
|
|
3889
|
-
type:
|
|
3933
|
+
import { z as z179 } from "zod";
|
|
3934
|
+
var simulation_voltage_probe = z179.object({
|
|
3935
|
+
type: z179.literal("simulation_voltage_probe"),
|
|
3890
3936
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3891
3937
|
"simulation_voltage_probe"
|
|
3892
3938
|
),
|
|
3893
|
-
source_component_id:
|
|
3894
|
-
name:
|
|
3895
|
-
signal_input_source_port_id:
|
|
3896
|
-
signal_input_source_net_id:
|
|
3897
|
-
reference_input_source_port_id:
|
|
3898
|
-
reference_input_source_net_id:
|
|
3899
|
-
subcircuit_id:
|
|
3900
|
-
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()
|
|
3901
3947
|
}).describe(
|
|
3902
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."
|
|
3903
3949
|
).superRefine((data, ctx) => {
|
|
@@ -3907,20 +3953,20 @@ var simulation_voltage_probe = z178.object({
|
|
|
3907
3953
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3908
3954
|
if (has_ports && has_nets) {
|
|
3909
3955
|
ctx.addIssue({
|
|
3910
|
-
code:
|
|
3956
|
+
code: z179.ZodIssueCode.custom,
|
|
3911
3957
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3912
3958
|
});
|
|
3913
3959
|
} else if (has_ports) {
|
|
3914
3960
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3915
3961
|
ctx.addIssue({
|
|
3916
|
-
code:
|
|
3962
|
+
code: z179.ZodIssueCode.custom,
|
|
3917
3963
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3918
3964
|
});
|
|
3919
3965
|
}
|
|
3920
3966
|
} else if (has_nets) {
|
|
3921
3967
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3922
3968
|
ctx.addIssue({
|
|
3923
|
-
code:
|
|
3969
|
+
code: z179.ZodIssueCode.custom,
|
|
3924
3970
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3925
3971
|
});
|
|
3926
3972
|
}
|
|
@@ -3928,7 +3974,7 @@ var simulation_voltage_probe = z178.object({
|
|
|
3928
3974
|
} else {
|
|
3929
3975
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3930
3976
|
ctx.addIssue({
|
|
3931
|
-
code:
|
|
3977
|
+
code: z179.ZodIssueCode.custom,
|
|
3932
3978
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3933
3979
|
});
|
|
3934
3980
|
}
|
|
@@ -3937,20 +3983,20 @@ var simulation_voltage_probe = z178.object({
|
|
|
3937
3983
|
expectTypesMatch(true);
|
|
3938
3984
|
|
|
3939
3985
|
// src/simulation/simulation_current_probe.ts
|
|
3940
|
-
import { z as
|
|
3941
|
-
var simulation_current_probe =
|
|
3942
|
-
type:
|
|
3986
|
+
import { z as z180 } from "zod";
|
|
3987
|
+
var simulation_current_probe = z180.object({
|
|
3988
|
+
type: z180.literal("simulation_current_probe"),
|
|
3943
3989
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
3944
3990
|
"simulation_current_probe"
|
|
3945
3991
|
),
|
|
3946
|
-
source_component_id:
|
|
3947
|
-
name:
|
|
3948
|
-
positive_source_port_id:
|
|
3949
|
-
negative_source_port_id:
|
|
3950
|
-
positive_source_net_id:
|
|
3951
|
-
negative_source_net_id:
|
|
3952
|
-
subcircuit_id:
|
|
3953
|
-
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()
|
|
3954
4000
|
}).describe(
|
|
3955
4001
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
3956
4002
|
).superRefine((data, ctx) => {
|
|
@@ -3962,7 +4008,7 @@ var simulation_current_probe = z179.object({
|
|
|
3962
4008
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
3963
4009
|
if (hasPorts && hasNets) {
|
|
3964
4010
|
ctx.addIssue({
|
|
3965
|
-
code:
|
|
4011
|
+
code: z180.ZodIssueCode.custom,
|
|
3966
4012
|
message: "Cannot mix port and net connections in a current probe."
|
|
3967
4013
|
});
|
|
3968
4014
|
return;
|
|
@@ -3970,7 +4016,7 @@ var simulation_current_probe = z179.object({
|
|
|
3970
4016
|
if (hasPorts) {
|
|
3971
4017
|
if (!hasPositivePort || !hasNegativePort) {
|
|
3972
4018
|
ctx.addIssue({
|
|
3973
|
-
code:
|
|
4019
|
+
code: z180.ZodIssueCode.custom,
|
|
3974
4020
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
3975
4021
|
});
|
|
3976
4022
|
}
|
|
@@ -3979,71 +4025,71 @@ var simulation_current_probe = z179.object({
|
|
|
3979
4025
|
if (hasNets) {
|
|
3980
4026
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
3981
4027
|
ctx.addIssue({
|
|
3982
|
-
code:
|
|
4028
|
+
code: z180.ZodIssueCode.custom,
|
|
3983
4029
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
3984
4030
|
});
|
|
3985
4031
|
}
|
|
3986
4032
|
return;
|
|
3987
4033
|
}
|
|
3988
4034
|
ctx.addIssue({
|
|
3989
|
-
code:
|
|
4035
|
+
code: z180.ZodIssueCode.custom,
|
|
3990
4036
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
3991
4037
|
});
|
|
3992
4038
|
});
|
|
3993
4039
|
expectTypesMatch(true);
|
|
3994
4040
|
|
|
3995
4041
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3996
|
-
import { z as
|
|
4042
|
+
import { z as z181 } from "zod";
|
|
3997
4043
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3998
|
-
type:
|
|
4044
|
+
type: z181.literal("simulation_unknown_experiment_error"),
|
|
3999
4045
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4000
4046
|
"simulation_unknown_experiment_error"
|
|
4001
4047
|
),
|
|
4002
|
-
error_type:
|
|
4003
|
-
simulation_experiment_id:
|
|
4004
|
-
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()
|
|
4005
4051
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4006
4052
|
expectTypesMatch(true);
|
|
4007
4053
|
|
|
4008
4054
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4009
|
-
import { z as
|
|
4010
|
-
var simulation_parameter_type =
|
|
4055
|
+
import { z as z182 } from "zod";
|
|
4056
|
+
var simulation_parameter_type = z182.enum([
|
|
4011
4057
|
"resistance",
|
|
4012
4058
|
"capacitance",
|
|
4013
4059
|
"inductance",
|
|
4014
4060
|
"voltage",
|
|
4015
4061
|
"current"
|
|
4016
4062
|
]);
|
|
4017
|
-
var simulation_parameter_sweep_base =
|
|
4018
|
-
type:
|
|
4063
|
+
var simulation_parameter_sweep_base = z182.object({
|
|
4064
|
+
type: z182.literal("simulation_parameter_sweep"),
|
|
4019
4065
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4020
4066
|
"simulation_parameter_sweep"
|
|
4021
4067
|
),
|
|
4022
|
-
simulation_experiment_id:
|
|
4023
|
-
name:
|
|
4024
|
-
parameter_values:
|
|
4068
|
+
simulation_experiment_id: z182.string(),
|
|
4069
|
+
name: z182.string().optional(),
|
|
4070
|
+
parameter_values: z182.array(z182.number()).min(1),
|
|
4025
4071
|
parameter_unit: simulation_parameter_unit
|
|
4026
4072
|
});
|
|
4027
|
-
var simulation_parameter_sweep =
|
|
4073
|
+
var simulation_parameter_sweep = z182.discriminatedUnion("parameter_type", [
|
|
4028
4074
|
simulation_parameter_sweep_base.extend({
|
|
4029
|
-
parameter_type:
|
|
4030
|
-
resistor_source_component_id:
|
|
4075
|
+
parameter_type: z182.literal("resistance"),
|
|
4076
|
+
resistor_source_component_id: z182.string()
|
|
4031
4077
|
}),
|
|
4032
4078
|
simulation_parameter_sweep_base.extend({
|
|
4033
|
-
parameter_type:
|
|
4034
|
-
capacitor_source_component_id:
|
|
4079
|
+
parameter_type: z182.literal("capacitance"),
|
|
4080
|
+
capacitor_source_component_id: z182.string()
|
|
4035
4081
|
}),
|
|
4036
4082
|
simulation_parameter_sweep_base.extend({
|
|
4037
|
-
parameter_type:
|
|
4038
|
-
inductor_source_component_id:
|
|
4083
|
+
parameter_type: z182.literal("inductance"),
|
|
4084
|
+
inductor_source_component_id: z182.string()
|
|
4039
4085
|
}),
|
|
4040
4086
|
simulation_parameter_sweep_base.extend({
|
|
4041
|
-
parameter_type:
|
|
4042
|
-
source_net_id:
|
|
4087
|
+
parameter_type: z182.literal("voltage"),
|
|
4088
|
+
source_net_id: z182.string()
|
|
4043
4089
|
}),
|
|
4044
4090
|
simulation_parameter_sweep_base.extend({
|
|
4045
|
-
parameter_type:
|
|
4046
|
-
current_source_component_id:
|
|
4091
|
+
parameter_type: z182.literal("current"),
|
|
4092
|
+
current_source_component_id: z182.string()
|
|
4047
4093
|
})
|
|
4048
4094
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4049
4095
|
expectTypesMatch(
|
|
@@ -4051,52 +4097,52 @@ expectTypesMatch(
|
|
|
4051
4097
|
);
|
|
4052
4098
|
|
|
4053
4099
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4054
|
-
import { z as
|
|
4055
|
-
var simulation_dc_operating_point_voltage =
|
|
4056
|
-
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"),
|
|
4057
4103
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4058
4104
|
"simulation_dc_operating_point_voltage"
|
|
4059
4105
|
),
|
|
4060
|
-
simulation_experiment_id:
|
|
4106
|
+
simulation_experiment_id: z183.string(),
|
|
4061
4107
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4062
|
-
simulation_voltage_probe_id:
|
|
4063
|
-
voltage:
|
|
4064
|
-
name:
|
|
4065
|
-
color:
|
|
4108
|
+
simulation_voltage_probe_id: z183.string(),
|
|
4109
|
+
voltage: z183.number(),
|
|
4110
|
+
name: z183.string().optional(),
|
|
4111
|
+
color: z183.string().optional()
|
|
4066
4112
|
});
|
|
4067
4113
|
expectTypesMatch(true);
|
|
4068
4114
|
|
|
4069
4115
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4070
|
-
import { z as
|
|
4071
|
-
var simulation_dc_operating_point_current =
|
|
4072
|
-
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"),
|
|
4073
4119
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4074
4120
|
"simulation_dc_operating_point_current"
|
|
4075
4121
|
),
|
|
4076
|
-
simulation_experiment_id:
|
|
4122
|
+
simulation_experiment_id: z184.string(),
|
|
4077
4123
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4078
|
-
simulation_current_probe_id:
|
|
4079
|
-
current:
|
|
4080
|
-
name:
|
|
4081
|
-
color:
|
|
4124
|
+
simulation_current_probe_id: z184.string(),
|
|
4125
|
+
current: z184.number(),
|
|
4126
|
+
name: z184.string().optional(),
|
|
4127
|
+
color: z184.string().optional()
|
|
4082
4128
|
});
|
|
4083
4129
|
expectTypesMatch(true);
|
|
4084
4130
|
|
|
4085
4131
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4086
|
-
import { z as
|
|
4087
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4088
|
-
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"),
|
|
4089
4135
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4090
4136
|
"simulation_dc_sweep_voltage_graph"
|
|
4091
4137
|
),
|
|
4092
|
-
simulation_experiment_id:
|
|
4138
|
+
simulation_experiment_id: z185.string(),
|
|
4093
4139
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4094
|
-
simulation_voltage_probe_id:
|
|
4095
|
-
sweep_values:
|
|
4140
|
+
simulation_voltage_probe_id: z185.string(),
|
|
4141
|
+
sweep_values: z185.array(z185.number()),
|
|
4096
4142
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4097
|
-
voltage_levels:
|
|
4098
|
-
name:
|
|
4099
|
-
color:
|
|
4143
|
+
voltage_levels: z185.array(z185.number()),
|
|
4144
|
+
name: z185.string().optional(),
|
|
4145
|
+
color: z185.string().optional()
|
|
4100
4146
|
}).refine(
|
|
4101
4147
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4102
4148
|
{
|
|
@@ -4106,20 +4152,20 @@ var simulation_dc_sweep_voltage_graph = z184.object({
|
|
|
4106
4152
|
expectTypesMatch(true);
|
|
4107
4153
|
|
|
4108
4154
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
4109
|
-
import { z as
|
|
4110
|
-
var simulation_dc_sweep_current_graph =
|
|
4111
|
-
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"),
|
|
4112
4158
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4113
4159
|
"simulation_dc_sweep_current_graph"
|
|
4114
4160
|
),
|
|
4115
|
-
simulation_experiment_id:
|
|
4161
|
+
simulation_experiment_id: z186.string(),
|
|
4116
4162
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4117
|
-
simulation_current_probe_id:
|
|
4118
|
-
sweep_values:
|
|
4163
|
+
simulation_current_probe_id: z186.string(),
|
|
4164
|
+
sweep_values: z186.array(z186.number()),
|
|
4119
4165
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4120
|
-
current_levels:
|
|
4121
|
-
name:
|
|
4122
|
-
color:
|
|
4166
|
+
current_levels: z186.array(z186.number()),
|
|
4167
|
+
name: z186.string().optional(),
|
|
4168
|
+
color: z186.string().optional()
|
|
4123
4169
|
}).refine(
|
|
4124
4170
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4125
4171
|
{
|
|
@@ -4129,29 +4175,29 @@ var simulation_dc_sweep_current_graph = z185.object({
|
|
|
4129
4175
|
expectTypesMatch(true);
|
|
4130
4176
|
|
|
4131
4177
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4132
|
-
import { z as
|
|
4178
|
+
import { z as z188 } from "zod";
|
|
4133
4179
|
|
|
4134
4180
|
// src/simulation/simulation_complex_sample.ts
|
|
4135
|
-
import { z as
|
|
4136
|
-
var simulation_complex_sample =
|
|
4137
|
-
re:
|
|
4138
|
-
im:
|
|
4181
|
+
import { z as z187 } from "zod";
|
|
4182
|
+
var simulation_complex_sample = z187.object({
|
|
4183
|
+
re: z187.number(),
|
|
4184
|
+
im: z187.number()
|
|
4139
4185
|
});
|
|
4140
4186
|
expectTypesMatch(true);
|
|
4141
4187
|
|
|
4142
4188
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4143
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4144
|
-
type:
|
|
4189
|
+
var simulation_ac_sweep_voltage_graph = z188.object({
|
|
4190
|
+
type: z188.literal("simulation_ac_sweep_voltage_graph"),
|
|
4145
4191
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4146
4192
|
"simulation_ac_sweep_voltage_graph"
|
|
4147
4193
|
),
|
|
4148
|
-
simulation_experiment_id:
|
|
4194
|
+
simulation_experiment_id: z188.string(),
|
|
4149
4195
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4150
|
-
simulation_voltage_probe_id:
|
|
4151
|
-
frequencies_hz:
|
|
4152
|
-
complex_voltages:
|
|
4153
|
-
name:
|
|
4154
|
-
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()
|
|
4155
4201
|
}).refine(
|
|
4156
4202
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4157
4203
|
{
|
|
@@ -4161,19 +4207,19 @@ var simulation_ac_sweep_voltage_graph = z187.object({
|
|
|
4161
4207
|
expectTypesMatch(true);
|
|
4162
4208
|
|
|
4163
4209
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
4164
|
-
import { z as
|
|
4165
|
-
var simulation_ac_sweep_current_graph =
|
|
4166
|
-
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"),
|
|
4167
4213
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4168
4214
|
"simulation_ac_sweep_current_graph"
|
|
4169
4215
|
),
|
|
4170
|
-
simulation_experiment_id:
|
|
4216
|
+
simulation_experiment_id: z189.string(),
|
|
4171
4217
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4172
|
-
simulation_current_probe_id:
|
|
4173
|
-
frequencies_hz:
|
|
4174
|
-
complex_currents:
|
|
4175
|
-
name:
|
|
4176
|
-
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()
|
|
4177
4223
|
}).refine(
|
|
4178
4224
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4179
4225
|
{
|
|
@@ -4183,52 +4229,52 @@ var simulation_ac_sweep_current_graph = z188.object({
|
|
|
4183
4229
|
expectTypesMatch(true);
|
|
4184
4230
|
|
|
4185
4231
|
// src/simulation/simulation_op_amp.ts
|
|
4186
|
-
import { z as
|
|
4187
|
-
var simulation_op_amp =
|
|
4188
|
-
type:
|
|
4232
|
+
import { z as z190 } from "zod";
|
|
4233
|
+
var simulation_op_amp = z190.object({
|
|
4234
|
+
type: z190.literal("simulation_op_amp"),
|
|
4189
4235
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
4190
|
-
source_component_id:
|
|
4191
|
-
inverting_input_source_port_id:
|
|
4192
|
-
non_inverting_input_source_port_id:
|
|
4193
|
-
output_source_port_id:
|
|
4194
|
-
positive_supply_source_port_id:
|
|
4195
|
-
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()
|
|
4196
4242
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4197
4243
|
expectTypesMatch(true);
|
|
4198
4244
|
|
|
4199
4245
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
4200
|
-
import { z as
|
|
4201
|
-
var simulation_spice_subcircuit =
|
|
4202
|
-
type:
|
|
4246
|
+
import { z as z191 } from "zod";
|
|
4247
|
+
var simulation_spice_subcircuit = z191.object({
|
|
4248
|
+
type: z191.literal("simulation_spice_subcircuit"),
|
|
4203
4249
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4204
4250
|
"simulation_spice_subcircuit"
|
|
4205
4251
|
),
|
|
4206
|
-
source_component_id:
|
|
4207
|
-
spice_pin_to_source_port_map:
|
|
4208
|
-
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()
|
|
4209
4255
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4210
4256
|
expectTypesMatch(
|
|
4211
4257
|
true
|
|
4212
4258
|
);
|
|
4213
4259
|
|
|
4214
4260
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
4215
|
-
import { z as
|
|
4261
|
+
import { z as z192 } from "zod";
|
|
4216
4262
|
var hasValue = (value) => value !== void 0;
|
|
4217
|
-
var simulation_oscilloscope_trace =
|
|
4218
|
-
type:
|
|
4263
|
+
var simulation_oscilloscope_trace = z192.object({
|
|
4264
|
+
type: z192.literal("simulation_oscilloscope_trace"),
|
|
4219
4265
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4220
4266
|
"simulation_oscilloscope_trace"
|
|
4221
4267
|
),
|
|
4222
|
-
simulation_transient_voltage_graph_id:
|
|
4223
|
-
simulation_transient_current_graph_id:
|
|
4224
|
-
simulation_voltage_probe_id:
|
|
4225
|
-
simulation_current_probe_id:
|
|
4226
|
-
display_name:
|
|
4227
|
-
color:
|
|
4228
|
-
display_center_value:
|
|
4229
|
-
display_center_offset_divs:
|
|
4230
|
-
volts_per_div:
|
|
4231
|
-
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()
|
|
4232
4278
|
}).describe(
|
|
4233
4279
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4234
4280
|
).superRefine((data, ctx) => {
|
|
@@ -4242,19 +4288,19 @@ var simulation_oscilloscope_trace = z191.object({
|
|
|
4242
4288
|
].filter(hasValue).length;
|
|
4243
4289
|
if (voltageReferences + currentReferences !== 1) {
|
|
4244
4290
|
ctx.addIssue({
|
|
4245
|
-
code:
|
|
4291
|
+
code: z192.ZodIssueCode.custom,
|
|
4246
4292
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4247
4293
|
});
|
|
4248
4294
|
}
|
|
4249
4295
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4250
4296
|
ctx.addIssue({
|
|
4251
|
-
code:
|
|
4297
|
+
code: z192.ZodIssueCode.custom,
|
|
4252
4298
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4253
4299
|
});
|
|
4254
4300
|
}
|
|
4255
4301
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4256
4302
|
ctx.addIssue({
|
|
4257
|
-
code:
|
|
4303
|
+
code: z192.ZodIssueCode.custom,
|
|
4258
4304
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4259
4305
|
});
|
|
4260
4306
|
}
|
|
@@ -4262,8 +4308,8 @@ var simulation_oscilloscope_trace = z191.object({
|
|
|
4262
4308
|
expectTypesMatch(true);
|
|
4263
4309
|
|
|
4264
4310
|
// src/any_circuit_element.ts
|
|
4265
|
-
import { z as
|
|
4266
|
-
var any_circuit_element =
|
|
4311
|
+
import { z as z193 } from "zod";
|
|
4312
|
+
var any_circuit_element = z193.union([
|
|
4267
4313
|
source_trace,
|
|
4268
4314
|
source_port,
|
|
4269
4315
|
source_component_internal_connection,
|
|
@@ -4446,6 +4492,9 @@ export {
|
|
|
4446
4492
|
frequency,
|
|
4447
4493
|
getZodPrefixedIdWithDefault,
|
|
4448
4494
|
inductance,
|
|
4495
|
+
insertionDirectionToCanonical,
|
|
4496
|
+
insertionDirectionToVector,
|
|
4497
|
+
insertion_direction,
|
|
4449
4498
|
kicadAt,
|
|
4450
4499
|
kicadEffects,
|
|
4451
4500
|
kicadFont,
|