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