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