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