@tscircuit/3d-viewer 0.0.423 → 0.0.425
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.js +1414 -1113
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -144,8 +144,8 @@ var require_dist = __commonJS({
|
|
|
144
144
|
fromValues: (x, y) => [x, y]
|
|
145
145
|
},
|
|
146
146
|
vec3: {
|
|
147
|
-
create: (x, y,
|
|
148
|
-
fromValues: (x, y,
|
|
147
|
+
create: (x, y, z133) => [x, y, z133],
|
|
148
|
+
fromValues: (x, y, z133) => [x, y, z133]
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
151
|
geometries: {
|
|
@@ -532,29 +532,29 @@ var require_fromRotation = __commonJS({
|
|
|
532
532
|
var { sin: sin2, cos: cos2 } = require_trigonometry();
|
|
533
533
|
var identity = require_identity();
|
|
534
534
|
var fromRotation = (out, rad, axis) => {
|
|
535
|
-
let [x, y,
|
|
536
|
-
const lengthSquared = x * x + y * y +
|
|
535
|
+
let [x, y, z133] = axis;
|
|
536
|
+
const lengthSquared = x * x + y * y + z133 * z133;
|
|
537
537
|
if (Math.abs(lengthSquared) < EPS) {
|
|
538
538
|
return identity(out);
|
|
539
539
|
}
|
|
540
540
|
const len = 1 / Math.sqrt(lengthSquared);
|
|
541
541
|
x *= len;
|
|
542
542
|
y *= len;
|
|
543
|
-
|
|
543
|
+
z133 *= len;
|
|
544
544
|
const s = sin2(rad);
|
|
545
545
|
const c = cos2(rad);
|
|
546
546
|
const t = 1 - c;
|
|
547
547
|
out[0] = x * x * t + c;
|
|
548
|
-
out[1] = y * x * t +
|
|
549
|
-
out[2] =
|
|
548
|
+
out[1] = y * x * t + z133 * s;
|
|
549
|
+
out[2] = z133 * x * t - y * s;
|
|
550
550
|
out[3] = 0;
|
|
551
|
-
out[4] = x * y * t -
|
|
551
|
+
out[4] = x * y * t - z133 * s;
|
|
552
552
|
out[5] = y * y * t + c;
|
|
553
|
-
out[6] =
|
|
553
|
+
out[6] = z133 * y * t + x * s;
|
|
554
554
|
out[7] = 0;
|
|
555
|
-
out[8] = x *
|
|
556
|
-
out[9] = y *
|
|
557
|
-
out[10] =
|
|
555
|
+
out[8] = x * z133 * t + y * s;
|
|
556
|
+
out[9] = y * z133 * t - x * s;
|
|
557
|
+
out[10] = z133 * z133 * t + c;
|
|
558
558
|
out[11] = 0;
|
|
559
559
|
out[12] = 0;
|
|
560
560
|
out[13] = 0;
|
|
@@ -808,8 +808,8 @@ var require_distance = __commonJS({
|
|
|
808
808
|
var distance2 = (a, b) => {
|
|
809
809
|
const x = b[0] - a[0];
|
|
810
810
|
const y = b[1] - a[1];
|
|
811
|
-
const
|
|
812
|
-
return Math.sqrt(x * x + y * y +
|
|
811
|
+
const z133 = b[2] - a[2];
|
|
812
|
+
return Math.sqrt(x * x + y * y + z133 * z133);
|
|
813
813
|
};
|
|
814
814
|
module.exports = distance2;
|
|
815
815
|
}
|
|
@@ -857,11 +857,11 @@ var require_fromValues2 = __commonJS({
|
|
|
857
857
|
"node_modules/@jscad/modeling/src/maths/vec3/fromValues.js"(exports, module) {
|
|
858
858
|
"use strict";
|
|
859
859
|
var create = require_create2();
|
|
860
|
-
var fromValues = (x, y,
|
|
860
|
+
var fromValues = (x, y, z133) => {
|
|
861
861
|
const out = create();
|
|
862
862
|
out[0] = x;
|
|
863
863
|
out[1] = y;
|
|
864
|
-
out[2] =
|
|
864
|
+
out[2] = z133;
|
|
865
865
|
return out;
|
|
866
866
|
};
|
|
867
867
|
module.exports = fromValues;
|
|
@@ -872,10 +872,10 @@ var require_fromValues2 = __commonJS({
|
|
|
872
872
|
var require_fromVec2 = __commonJS({
|
|
873
873
|
"node_modules/@jscad/modeling/src/maths/vec3/fromVec2.js"(exports, module) {
|
|
874
874
|
"use strict";
|
|
875
|
-
var fromVector2 = (out, vector,
|
|
875
|
+
var fromVector2 = (out, vector, z133 = 0) => {
|
|
876
876
|
out[0] = vector[0];
|
|
877
877
|
out[1] = vector[1];
|
|
878
|
-
out[2] =
|
|
878
|
+
out[2] = z133;
|
|
879
879
|
return out;
|
|
880
880
|
};
|
|
881
881
|
module.exports = fromVector2;
|
|
@@ -889,8 +889,8 @@ var require_length = __commonJS({
|
|
|
889
889
|
var length2 = (vector) => {
|
|
890
890
|
const x = vector[0];
|
|
891
891
|
const y = vector[1];
|
|
892
|
-
const
|
|
893
|
-
return Math.sqrt(x * x + y * y +
|
|
892
|
+
const z133 = vector[2];
|
|
893
|
+
return Math.sqrt(x * x + y * y + z133 * z133);
|
|
894
894
|
};
|
|
895
895
|
module.exports = length2;
|
|
896
896
|
}
|
|
@@ -973,14 +973,14 @@ var require_normalize = __commonJS({
|
|
|
973
973
|
var normalize = (out, vector) => {
|
|
974
974
|
const x = vector[0];
|
|
975
975
|
const y = vector[1];
|
|
976
|
-
const
|
|
977
|
-
let len = x * x + y * y +
|
|
976
|
+
const z133 = vector[2];
|
|
977
|
+
let len = x * x + y * y + z133 * z133;
|
|
978
978
|
if (len > 0) {
|
|
979
979
|
len = 1 / Math.sqrt(len);
|
|
980
980
|
}
|
|
981
981
|
out[0] = x * len;
|
|
982
982
|
out[1] = y * len;
|
|
983
|
-
out[2] =
|
|
983
|
+
out[2] = z133 * len;
|
|
984
984
|
return out;
|
|
985
985
|
};
|
|
986
986
|
module.exports = normalize;
|
|
@@ -1053,7 +1053,7 @@ var require_rotateY = __commonJS({
|
|
|
1053
1053
|
var require_rotateZ = __commonJS({
|
|
1054
1054
|
"node_modules/@jscad/modeling/src/maths/vec3/rotateZ.js"(exports, module) {
|
|
1055
1055
|
"use strict";
|
|
1056
|
-
var
|
|
1056
|
+
var rotateZ3 = (out, vector, origin, radians) => {
|
|
1057
1057
|
const p = [];
|
|
1058
1058
|
const r = [];
|
|
1059
1059
|
p[0] = vector[0] - origin[0];
|
|
@@ -1065,7 +1065,7 @@ var require_rotateZ = __commonJS({
|
|
|
1065
1065
|
out[2] = vector[2];
|
|
1066
1066
|
return out;
|
|
1067
1067
|
};
|
|
1068
|
-
module.exports =
|
|
1068
|
+
module.exports = rotateZ3;
|
|
1069
1069
|
}
|
|
1070
1070
|
});
|
|
1071
1071
|
|
|
@@ -1104,8 +1104,8 @@ var require_squaredDistance = __commonJS({
|
|
|
1104
1104
|
var squaredDistance = (a, b) => {
|
|
1105
1105
|
const x = b[0] - a[0];
|
|
1106
1106
|
const y = b[1] - a[1];
|
|
1107
|
-
const
|
|
1108
|
-
return x * x + y * y +
|
|
1107
|
+
const z133 = b[2] - a[2];
|
|
1108
|
+
return x * x + y * y + z133 * z133;
|
|
1109
1109
|
};
|
|
1110
1110
|
module.exports = squaredDistance;
|
|
1111
1111
|
}
|
|
@@ -1118,8 +1118,8 @@ var require_squaredLength = __commonJS({
|
|
|
1118
1118
|
var squaredLength = (vector) => {
|
|
1119
1119
|
const x = vector[0];
|
|
1120
1120
|
const y = vector[1];
|
|
1121
|
-
const
|
|
1122
|
-
return x * x + y * y +
|
|
1121
|
+
const z133 = vector[2];
|
|
1122
|
+
return x * x + y * y + z133 * z133;
|
|
1123
1123
|
};
|
|
1124
1124
|
module.exports = squaredLength;
|
|
1125
1125
|
}
|
|
@@ -1129,13 +1129,13 @@ var require_squaredLength = __commonJS({
|
|
|
1129
1129
|
var require_subtract = __commonJS({
|
|
1130
1130
|
"node_modules/@jscad/modeling/src/maths/vec3/subtract.js"(exports, module) {
|
|
1131
1131
|
"use strict";
|
|
1132
|
-
var
|
|
1132
|
+
var subtract5 = (out, a, b) => {
|
|
1133
1133
|
out[0] = a[0] - b[0];
|
|
1134
1134
|
out[1] = a[1] - b[1];
|
|
1135
1135
|
out[2] = a[2] - b[2];
|
|
1136
1136
|
return out;
|
|
1137
1137
|
};
|
|
1138
|
-
module.exports =
|
|
1138
|
+
module.exports = subtract5;
|
|
1139
1139
|
}
|
|
1140
1140
|
});
|
|
1141
1141
|
|
|
@@ -1155,12 +1155,12 @@ var require_transform = __commonJS({
|
|
|
1155
1155
|
var transform2 = (out, vector, matrix) => {
|
|
1156
1156
|
const x = vector[0];
|
|
1157
1157
|
const y = vector[1];
|
|
1158
|
-
const
|
|
1159
|
-
let w = matrix[3] * x + matrix[7] * y + matrix[11] *
|
|
1158
|
+
const z133 = vector[2];
|
|
1159
|
+
let w = matrix[3] * x + matrix[7] * y + matrix[11] * z133 + matrix[15];
|
|
1160
1160
|
w = w || 1;
|
|
1161
|
-
out[0] = (matrix[0] * x + matrix[4] * y + matrix[8] *
|
|
1162
|
-
out[1] = (matrix[1] * x + matrix[5] * y + matrix[9] *
|
|
1163
|
-
out[2] = (matrix[2] * x + matrix[6] * y + matrix[10] *
|
|
1161
|
+
out[0] = (matrix[0] * x + matrix[4] * y + matrix[8] * z133 + matrix[12]) / w;
|
|
1162
|
+
out[1] = (matrix[1] * x + matrix[5] * y + matrix[9] * z133 + matrix[13]) / w;
|
|
1163
|
+
out[2] = (matrix[2] * x + matrix[6] * y + matrix[10] * z133 + matrix[14]) / w;
|
|
1164
1164
|
return out;
|
|
1165
1165
|
};
|
|
1166
1166
|
module.exports = transform2;
|
|
@@ -1362,8 +1362,8 @@ var require_isMirroring = __commonJS({
|
|
|
1362
1362
|
var isMirroring = (matrix) => {
|
|
1363
1363
|
const x = matrix[4] * matrix[9] - matrix[8] * matrix[5];
|
|
1364
1364
|
const y = matrix[8] * matrix[1] - matrix[0] * matrix[9];
|
|
1365
|
-
const
|
|
1366
|
-
const d = x * matrix[2] + y * matrix[6] +
|
|
1365
|
+
const z133 = matrix[0] * matrix[5] - matrix[4] * matrix[1];
|
|
1366
|
+
const d = x * matrix[2] + y * matrix[6] + z133 * matrix[10];
|
|
1367
1367
|
return d < 0;
|
|
1368
1368
|
};
|
|
1369
1369
|
module.exports = isMirroring;
|
|
@@ -1465,15 +1465,15 @@ var require_rotate = __commonJS({
|
|
|
1465
1465
|
var { sin: sin2, cos: cos2 } = require_trigonometry();
|
|
1466
1466
|
var copy = require_copy();
|
|
1467
1467
|
var rotate2 = (out, matrix, radians, axis) => {
|
|
1468
|
-
let [x, y,
|
|
1469
|
-
const lengthSquared = x * x + y * y +
|
|
1468
|
+
let [x, y, z133] = axis;
|
|
1469
|
+
const lengthSquared = x * x + y * y + z133 * z133;
|
|
1470
1470
|
if (Math.abs(lengthSquared) < EPS) {
|
|
1471
1471
|
return copy(out, matrix);
|
|
1472
1472
|
}
|
|
1473
1473
|
const len = 1 / Math.sqrt(lengthSquared);
|
|
1474
1474
|
x *= len;
|
|
1475
1475
|
y *= len;
|
|
1476
|
-
|
|
1476
|
+
z133 *= len;
|
|
1477
1477
|
const s = sin2(radians);
|
|
1478
1478
|
const c = cos2(radians);
|
|
1479
1479
|
const t = 1 - c;
|
|
@@ -1490,14 +1490,14 @@ var require_rotate = __commonJS({
|
|
|
1490
1490
|
const a22 = matrix[10];
|
|
1491
1491
|
const a23 = matrix[11];
|
|
1492
1492
|
const b00 = x * x * t + c;
|
|
1493
|
-
const b01 = y * x * t +
|
|
1494
|
-
const b02 =
|
|
1495
|
-
const b10 = x * y * t -
|
|
1493
|
+
const b01 = y * x * t + z133 * s;
|
|
1494
|
+
const b02 = z133 * x * t - y * s;
|
|
1495
|
+
const b10 = x * y * t - z133 * s;
|
|
1496
1496
|
const b11 = y * y * t + c;
|
|
1497
|
-
const b12 =
|
|
1498
|
-
const b20 = x *
|
|
1499
|
-
const b21 = y *
|
|
1500
|
-
const b22 =
|
|
1497
|
+
const b12 = z133 * y * t + x * s;
|
|
1498
|
+
const b20 = x * z133 * t + y * s;
|
|
1499
|
+
const b21 = y * z133 * t - x * s;
|
|
1500
|
+
const b22 = z133 * z133 * t + c;
|
|
1501
1501
|
out[0] = a00 * b00 + a10 * b01 + a20 * b02;
|
|
1502
1502
|
out[1] = a01 * b00 + a11 * b01 + a21 * b02;
|
|
1503
1503
|
out[2] = a02 * b00 + a12 * b01 + a22 * b02;
|
|
@@ -1607,7 +1607,7 @@ var require_rotateZ2 = __commonJS({
|
|
|
1607
1607
|
"node_modules/@jscad/modeling/src/maths/mat4/rotateZ.js"(exports, module) {
|
|
1608
1608
|
"use strict";
|
|
1609
1609
|
var { sin: sin2, cos: cos2 } = require_trigonometry();
|
|
1610
|
-
var
|
|
1610
|
+
var rotateZ3 = (out, matrix, radians) => {
|
|
1611
1611
|
const s = sin2(radians);
|
|
1612
1612
|
const c = cos2(radians);
|
|
1613
1613
|
const a00 = matrix[0];
|
|
@@ -1638,7 +1638,7 @@ var require_rotateZ2 = __commonJS({
|
|
|
1638
1638
|
out[7] = a13 * c - a03 * s;
|
|
1639
1639
|
return out;
|
|
1640
1640
|
};
|
|
1641
|
-
module.exports =
|
|
1641
|
+
module.exports = rotateZ3;
|
|
1642
1642
|
}
|
|
1643
1643
|
});
|
|
1644
1644
|
|
|
@@ -1649,7 +1649,7 @@ var require_scale2 = __commonJS({
|
|
|
1649
1649
|
var scale2 = (out, matrix, dimensions) => {
|
|
1650
1650
|
const x = dimensions[0];
|
|
1651
1651
|
const y = dimensions[1];
|
|
1652
|
-
const
|
|
1652
|
+
const z133 = dimensions[2];
|
|
1653
1653
|
out[0] = matrix[0] * x;
|
|
1654
1654
|
out[1] = matrix[1] * x;
|
|
1655
1655
|
out[2] = matrix[2] * x;
|
|
@@ -1658,10 +1658,10 @@ var require_scale2 = __commonJS({
|
|
|
1658
1658
|
out[5] = matrix[5] * y;
|
|
1659
1659
|
out[6] = matrix[6] * y;
|
|
1660
1660
|
out[7] = matrix[7] * y;
|
|
1661
|
-
out[8] = matrix[8] *
|
|
1662
|
-
out[9] = matrix[9] *
|
|
1663
|
-
out[10] = matrix[10] *
|
|
1664
|
-
out[11] = matrix[11] *
|
|
1661
|
+
out[8] = matrix[8] * z133;
|
|
1662
|
+
out[9] = matrix[9] * z133;
|
|
1663
|
+
out[10] = matrix[10] * z133;
|
|
1664
|
+
out[11] = matrix[11] * z133;
|
|
1665
1665
|
out[12] = matrix[12];
|
|
1666
1666
|
out[13] = matrix[13];
|
|
1667
1667
|
out[14] = matrix[14];
|
|
@@ -1676,7 +1676,7 @@ var require_scale2 = __commonJS({
|
|
|
1676
1676
|
var require_subtract2 = __commonJS({
|
|
1677
1677
|
"node_modules/@jscad/modeling/src/maths/mat4/subtract.js"(exports, module) {
|
|
1678
1678
|
"use strict";
|
|
1679
|
-
var
|
|
1679
|
+
var subtract5 = (out, a, b) => {
|
|
1680
1680
|
out[0] = a[0] - b[0];
|
|
1681
1681
|
out[1] = a[1] - b[1];
|
|
1682
1682
|
out[2] = a[2] - b[2];
|
|
@@ -1695,7 +1695,7 @@ var require_subtract2 = __commonJS({
|
|
|
1695
1695
|
out[15] = a[15] - b[15];
|
|
1696
1696
|
return out;
|
|
1697
1697
|
};
|
|
1698
|
-
module.exports =
|
|
1698
|
+
module.exports = subtract5;
|
|
1699
1699
|
}
|
|
1700
1700
|
});
|
|
1701
1701
|
|
|
@@ -1712,10 +1712,10 @@ var require_toString2 = __commonJS({
|
|
|
1712
1712
|
var require_translate = __commonJS({
|
|
1713
1713
|
"node_modules/@jscad/modeling/src/maths/mat4/translate.js"(exports, module) {
|
|
1714
1714
|
"use strict";
|
|
1715
|
-
var
|
|
1715
|
+
var translate8 = (out, matrix, offsets) => {
|
|
1716
1716
|
const x = offsets[0];
|
|
1717
1717
|
const y = offsets[1];
|
|
1718
|
-
const
|
|
1718
|
+
const z133 = offsets[2];
|
|
1719
1719
|
let a00;
|
|
1720
1720
|
let a01;
|
|
1721
1721
|
let a02;
|
|
@@ -1729,10 +1729,10 @@ var require_translate = __commonJS({
|
|
|
1729
1729
|
let a22;
|
|
1730
1730
|
let a23;
|
|
1731
1731
|
if (matrix === out) {
|
|
1732
|
-
out[12] = matrix[0] * x + matrix[4] * y + matrix[8] *
|
|
1733
|
-
out[13] = matrix[1] * x + matrix[5] * y + matrix[9] *
|
|
1734
|
-
out[14] = matrix[2] * x + matrix[6] * y + matrix[10] *
|
|
1735
|
-
out[15] = matrix[3] * x + matrix[7] * y + matrix[11] *
|
|
1732
|
+
out[12] = matrix[0] * x + matrix[4] * y + matrix[8] * z133 + matrix[12];
|
|
1733
|
+
out[13] = matrix[1] * x + matrix[5] * y + matrix[9] * z133 + matrix[13];
|
|
1734
|
+
out[14] = matrix[2] * x + matrix[6] * y + matrix[10] * z133 + matrix[14];
|
|
1735
|
+
out[15] = matrix[3] * x + matrix[7] * y + matrix[11] * z133 + matrix[15];
|
|
1736
1736
|
} else {
|
|
1737
1737
|
a00 = matrix[0];
|
|
1738
1738
|
a01 = matrix[1];
|
|
@@ -1758,14 +1758,14 @@ var require_translate = __commonJS({
|
|
|
1758
1758
|
out[9] = a21;
|
|
1759
1759
|
out[10] = a22;
|
|
1760
1760
|
out[11] = a23;
|
|
1761
|
-
out[12] = a00 * x + a10 * y + a20 *
|
|
1762
|
-
out[13] = a01 * x + a11 * y + a21 *
|
|
1763
|
-
out[14] = a02 * x + a12 * y + a22 *
|
|
1764
|
-
out[15] = a03 * x + a13 * y + a23 *
|
|
1761
|
+
out[12] = a00 * x + a10 * y + a20 * z133 + matrix[12];
|
|
1762
|
+
out[13] = a01 * x + a11 * y + a21 * z133 + matrix[13];
|
|
1763
|
+
out[14] = a02 * x + a12 * y + a22 * z133 + matrix[14];
|
|
1764
|
+
out[15] = a03 * x + a13 * y + a23 * z133 + matrix[15];
|
|
1765
1765
|
}
|
|
1766
1766
|
return out;
|
|
1767
1767
|
};
|
|
1768
|
-
module.exports =
|
|
1768
|
+
module.exports = translate8;
|
|
1769
1769
|
}
|
|
1770
1770
|
});
|
|
1771
1771
|
|
|
@@ -2205,12 +2205,12 @@ var require_squaredLength2 = __commonJS({
|
|
|
2205
2205
|
var require_subtract3 = __commonJS({
|
|
2206
2206
|
"node_modules/@jscad/modeling/src/maths/vec2/subtract.js"(exports, module) {
|
|
2207
2207
|
"use strict";
|
|
2208
|
-
var
|
|
2208
|
+
var subtract5 = (out, a, b) => {
|
|
2209
2209
|
out[0] = a[0] - b[0];
|
|
2210
2210
|
out[1] = a[1] - b[1];
|
|
2211
2211
|
return out;
|
|
2212
2212
|
};
|
|
2213
|
-
module.exports =
|
|
2213
|
+
module.exports = subtract5;
|
|
2214
2214
|
}
|
|
2215
2215
|
});
|
|
2216
2216
|
|
|
@@ -2671,14 +2671,14 @@ var require_point_line_distance = __commonJS({
|
|
|
2671
2671
|
"node_modules/@jscad/modeling/src/operations/hulls/quickhull/point-line-distance.js"(exports, module) {
|
|
2672
2672
|
"use strict";
|
|
2673
2673
|
var cross = require_cross();
|
|
2674
|
-
var
|
|
2674
|
+
var subtract5 = require_subtract();
|
|
2675
2675
|
var squaredLength = require_squaredLength();
|
|
2676
2676
|
var distanceSquared = (p, a, b) => {
|
|
2677
2677
|
const ab = [];
|
|
2678
2678
|
const ap = [];
|
|
2679
2679
|
const cr = [];
|
|
2680
|
-
|
|
2681
|
-
|
|
2680
|
+
subtract5(ab, b, a);
|
|
2681
|
+
subtract5(ap, p, a);
|
|
2682
2682
|
const area = squaredLength(cross(cr, ap, ab));
|
|
2683
2683
|
const s = squaredLength(ab);
|
|
2684
2684
|
if (s === 0) {
|
|
@@ -2697,11 +2697,11 @@ var require_get_plane_normal = __commonJS({
|
|
|
2697
2697
|
"use strict";
|
|
2698
2698
|
var cross = require_cross();
|
|
2699
2699
|
var normalize = require_normalize();
|
|
2700
|
-
var
|
|
2700
|
+
var subtract5 = require_subtract();
|
|
2701
2701
|
var planeNormal = (out, point1, point2, point32) => {
|
|
2702
2702
|
const tmp = [0, 0, 0];
|
|
2703
|
-
|
|
2704
|
-
|
|
2703
|
+
subtract5(out, point1, point2);
|
|
2704
|
+
subtract5(tmp, point2, point32);
|
|
2705
2705
|
cross(out, out, tmp);
|
|
2706
2706
|
return normalize(out, out);
|
|
2707
2707
|
};
|
|
@@ -2915,7 +2915,7 @@ var require_Face = __commonJS({
|
|
|
2915
2915
|
var length2 = require_length();
|
|
2916
2916
|
var normalize = require_normalize();
|
|
2917
2917
|
var scale2 = require_scale();
|
|
2918
|
-
var
|
|
2918
|
+
var subtract5 = require_subtract();
|
|
2919
2919
|
var HalfEdge = require_HalfEdge();
|
|
2920
2920
|
var VISIBLE = 0;
|
|
2921
2921
|
var NON_CONVEX = 1;
|
|
@@ -2949,14 +2949,14 @@ var require_Face = __commonJS({
|
|
|
2949
2949
|
const e0 = this.edge;
|
|
2950
2950
|
const e1 = e0.next;
|
|
2951
2951
|
let e2 = e1.next;
|
|
2952
|
-
const v2 =
|
|
2952
|
+
const v2 = subtract5([], e1.head().point, e0.head().point);
|
|
2953
2953
|
const t = [];
|
|
2954
2954
|
const v1 = [];
|
|
2955
2955
|
this.nVertices = 2;
|
|
2956
2956
|
this.normal = [0, 0, 0];
|
|
2957
2957
|
while (e2 !== e0) {
|
|
2958
2958
|
copy(v1, v2);
|
|
2959
|
-
|
|
2959
|
+
subtract5(v2, e2.head().point, e0.head().point);
|
|
2960
2960
|
add(this.normal, this.normal, cross(t, v1, v2));
|
|
2961
2961
|
e2 = e2.next;
|
|
2962
2962
|
this.nVertices += 1;
|
|
@@ -2980,7 +2980,7 @@ var require_Face = __commonJS({
|
|
|
2980
2980
|
} while (edge !== this.edge);
|
|
2981
2981
|
const p1 = maxEdge.tail().point;
|
|
2982
2982
|
const p2 = maxEdge.head().point;
|
|
2983
|
-
const maxVector =
|
|
2983
|
+
const maxVector = subtract5([], p2, p1);
|
|
2984
2984
|
const maxLength = Math.sqrt(maxSquaredLength);
|
|
2985
2985
|
scale2(maxVector, maxVector, 1 / maxLength);
|
|
2986
2986
|
const maxProjection = dot(this.normal, maxVector);
|
|
@@ -3831,11 +3831,11 @@ var require_fromValues4 = __commonJS({
|
|
|
3831
3831
|
"node_modules/@jscad/modeling/src/maths/vec4/fromValues.js"(exports, module) {
|
|
3832
3832
|
"use strict";
|
|
3833
3833
|
var create = require_create7();
|
|
3834
|
-
var fromValues = (x, y,
|
|
3834
|
+
var fromValues = (x, y, z133, w) => {
|
|
3835
3835
|
const out = create();
|
|
3836
3836
|
out[0] = x;
|
|
3837
3837
|
out[1] = y;
|
|
3838
|
-
out[2] =
|
|
3838
|
+
out[2] = z133;
|
|
3839
3839
|
out[3] = w;
|
|
3840
3840
|
return out;
|
|
3841
3841
|
};
|
|
@@ -3993,8 +3993,8 @@ var require_projectionOfPoint = __commonJS({
|
|
|
3993
3993
|
const a = point2[0] * plane[0] + point2[1] * plane[1] + point2[2] * plane[2] - plane[3];
|
|
3994
3994
|
const x = point2[0] - a * plane[0];
|
|
3995
3995
|
const y = point2[1] - a * plane[1];
|
|
3996
|
-
const
|
|
3997
|
-
return vec3.fromValues(x, y,
|
|
3996
|
+
const z133 = point2[2] - a * plane[2];
|
|
3997
|
+
return vec3.fromValues(x, y, z133);
|
|
3998
3998
|
};
|
|
3999
3999
|
module.exports = projectionOfPoint;
|
|
4000
4000
|
}
|
|
@@ -4298,11 +4298,11 @@ var require_transform5 = __commonJS({
|
|
|
4298
4298
|
"node_modules/@jscad/modeling/src/maths/vec4/transform.js"(exports, module) {
|
|
4299
4299
|
"use strict";
|
|
4300
4300
|
var transform2 = (out, vector, matrix) => {
|
|
4301
|
-
const [x, y,
|
|
4302
|
-
out[0] = matrix[0] * x + matrix[4] * y + matrix[8] *
|
|
4303
|
-
out[1] = matrix[1] * x + matrix[5] * y + matrix[9] *
|
|
4304
|
-
out[2] = matrix[2] * x + matrix[6] * y + matrix[10] *
|
|
4305
|
-
out[3] = matrix[3] * x + matrix[7] * y + matrix[11] *
|
|
4301
|
+
const [x, y, z133, w] = vector;
|
|
4302
|
+
out[0] = matrix[0] * x + matrix[4] * y + matrix[8] * z133 + matrix[12] * w;
|
|
4303
|
+
out[1] = matrix[1] * x + matrix[5] * y + matrix[9] * z133 + matrix[13] * w;
|
|
4304
|
+
out[2] = matrix[2] * x + matrix[6] * y + matrix[10] * z133 + matrix[14] * w;
|
|
4305
|
+
out[3] = matrix[3] * x + matrix[7] * y + matrix[11] * z133 + matrix[15] * w;
|
|
4306
4306
|
return out;
|
|
4307
4307
|
};
|
|
4308
4308
|
module.exports = transform2;
|
|
@@ -4364,8 +4364,8 @@ var require_measureBoundingSphere = __commonJS({
|
|
|
4364
4364
|
out[2] = (minz[2] + maxz[2]) * 0.5;
|
|
4365
4365
|
const x = out[0] - maxx[0];
|
|
4366
4366
|
const y = out[1] - maxy[1];
|
|
4367
|
-
const
|
|
4368
|
-
out[3] = Math.sqrt(x * x + y * y +
|
|
4367
|
+
const z133 = out[2] - maxz[2];
|
|
4368
|
+
out[3] = Math.sqrt(x * x + y * y + z133 * z133);
|
|
4369
4369
|
cache.set(polygon3, out);
|
|
4370
4370
|
return out;
|
|
4371
4371
|
};
|
|
@@ -5426,7 +5426,7 @@ var require_colorize = __commonJS({
|
|
|
5426
5426
|
newpoly.color = color;
|
|
5427
5427
|
return newpoly;
|
|
5428
5428
|
};
|
|
5429
|
-
var
|
|
5429
|
+
var colorize7 = (color, ...objects) => {
|
|
5430
5430
|
if (!Array.isArray(color)) throw new Error("color must be an array");
|
|
5431
5431
|
if (color.length < 3) throw new Error("color must contain R, G and B values");
|
|
5432
5432
|
if (color.length === 3) color = [color[0], color[1], color[2], 1];
|
|
@@ -5442,7 +5442,7 @@ var require_colorize = __commonJS({
|
|
|
5442
5442
|
});
|
|
5443
5443
|
return results.length === 1 ? results[0] : results;
|
|
5444
5444
|
};
|
|
5445
|
-
module.exports =
|
|
5445
|
+
module.exports = colorize7;
|
|
5446
5446
|
}
|
|
5447
5447
|
});
|
|
5448
5448
|
|
|
@@ -8397,7 +8397,7 @@ var require_roundedRectangle = __commonJS({
|
|
|
8397
8397
|
var geom2 = require_geom2();
|
|
8398
8398
|
var { isGTE, isNumberArray } = require_commonChecks();
|
|
8399
8399
|
var rectangle = require_rectangle();
|
|
8400
|
-
var
|
|
8400
|
+
var roundedRectangle4 = (options) => {
|
|
8401
8401
|
const defaults = {
|
|
8402
8402
|
center: [0, 0],
|
|
8403
8403
|
size: [2, 2],
|
|
@@ -8437,7 +8437,7 @@ var require_roundedRectangle = __commonJS({
|
|
|
8437
8437
|
}
|
|
8438
8438
|
return geom2.fromPoints(corner0Points.concat(corner1Points, corner2Points, corner3Points));
|
|
8439
8439
|
};
|
|
8440
|
-
module.exports =
|
|
8440
|
+
module.exports = roundedRectangle4;
|
|
8441
8441
|
}
|
|
8442
8442
|
});
|
|
8443
8443
|
|
|
@@ -9727,12 +9727,12 @@ var require_rotate3 = __commonJS({
|
|
|
9727
9727
|
};
|
|
9728
9728
|
var rotateX = (angle, ...objects) => rotate2([angle, 0, 0], objects);
|
|
9729
9729
|
var rotateY = (angle, ...objects) => rotate2([0, angle, 0], objects);
|
|
9730
|
-
var
|
|
9730
|
+
var rotateZ3 = (angle, ...objects) => rotate2([0, 0, angle], objects);
|
|
9731
9731
|
module.exports = {
|
|
9732
9732
|
rotate: rotate2,
|
|
9733
9733
|
rotateX,
|
|
9734
9734
|
rotateY,
|
|
9735
|
-
rotateZ:
|
|
9735
|
+
rotateZ: rotateZ3
|
|
9736
9736
|
};
|
|
9737
9737
|
}
|
|
9738
9738
|
});
|
|
@@ -9746,7 +9746,7 @@ var require_translate2 = __commonJS({
|
|
|
9746
9746
|
var geom2 = require_geom2();
|
|
9747
9747
|
var geom3 = require_geom3();
|
|
9748
9748
|
var path2 = require_path2();
|
|
9749
|
-
var
|
|
9749
|
+
var translate8 = (offset4, ...objects) => {
|
|
9750
9750
|
if (!Array.isArray(offset4)) throw new Error("offset must be an array");
|
|
9751
9751
|
objects = flatten(objects);
|
|
9752
9752
|
if (objects.length === 0) throw new Error("wrong number of arguments");
|
|
@@ -9761,11 +9761,11 @@ var require_translate2 = __commonJS({
|
|
|
9761
9761
|
});
|
|
9762
9762
|
return results.length === 1 ? results[0] : results;
|
|
9763
9763
|
};
|
|
9764
|
-
var translateX = (offset4, ...objects) =>
|
|
9765
|
-
var translateY = (offset4, ...objects) =>
|
|
9766
|
-
var translateZ = (offset4, ...objects) =>
|
|
9764
|
+
var translateX = (offset4, ...objects) => translate8([offset4, 0, 0], objects);
|
|
9765
|
+
var translateY = (offset4, ...objects) => translate8([0, offset4, 0], objects);
|
|
9766
|
+
var translateZ = (offset4, ...objects) => translate8([0, 0, offset4], objects);
|
|
9767
9767
|
module.exports = {
|
|
9768
|
-
translate:
|
|
9768
|
+
translate: translate8,
|
|
9769
9769
|
translateX,
|
|
9770
9770
|
translateY,
|
|
9771
9771
|
translateZ
|
|
@@ -9780,7 +9780,7 @@ var require_torus = __commonJS({
|
|
|
9780
9780
|
var { TAU } = require_constants();
|
|
9781
9781
|
var extrudeRotate = require_extrudeRotate();
|
|
9782
9782
|
var { rotate: rotate2 } = require_rotate3();
|
|
9783
|
-
var { translate:
|
|
9783
|
+
var { translate: translate8 } = require_translate2();
|
|
9784
9784
|
var circle = require_circle();
|
|
9785
9785
|
var { isGT, isGTE } = require_commonChecks();
|
|
9786
9786
|
var torus = (options) => {
|
|
@@ -9805,7 +9805,7 @@ var require_torus = __commonJS({
|
|
|
9805
9805
|
if (innerRotation !== 0) {
|
|
9806
9806
|
innerCircle = rotate2([0, 0, innerRotation], innerCircle);
|
|
9807
9807
|
}
|
|
9808
|
-
innerCircle =
|
|
9808
|
+
innerCircle = translate8([outerRadius, 0], innerCircle);
|
|
9809
9809
|
const extrudeOptions = {
|
|
9810
9810
|
startAngle,
|
|
9811
9811
|
angle: outerRotation,
|
|
@@ -11612,7 +11612,7 @@ var require_subtractGeom3 = __commonJS({
|
|
|
11612
11612
|
var flatten = require_flatten();
|
|
11613
11613
|
var retessellate = require_retessellate();
|
|
11614
11614
|
var subtractSub = require_subtractGeom3Sub();
|
|
11615
|
-
var
|
|
11615
|
+
var subtract5 = (...geometries) => {
|
|
11616
11616
|
geometries = flatten(geometries);
|
|
11617
11617
|
let newgeometry = geometries.shift();
|
|
11618
11618
|
geometries.forEach((geometry) => {
|
|
@@ -11621,7 +11621,7 @@ var require_subtractGeom3 = __commonJS({
|
|
|
11621
11621
|
newgeometry = retessellate(newgeometry);
|
|
11622
11622
|
return newgeometry;
|
|
11623
11623
|
};
|
|
11624
|
-
module.exports =
|
|
11624
|
+
module.exports = subtract5;
|
|
11625
11625
|
}
|
|
11626
11626
|
});
|
|
11627
11627
|
|
|
@@ -11635,14 +11635,14 @@ var require_subtractGeom2 = __commonJS({
|
|
|
11635
11635
|
var fromFakePolygons = require_fromFakePolygons();
|
|
11636
11636
|
var to3DWalls = require_to3DWalls();
|
|
11637
11637
|
var subtractGeom3 = require_subtractGeom3();
|
|
11638
|
-
var
|
|
11638
|
+
var subtract5 = (...geometries) => {
|
|
11639
11639
|
geometries = flatten(geometries);
|
|
11640
11640
|
const newgeometries = geometries.map((geometry) => to3DWalls({ z0: -1, z1: 1 }, geometry));
|
|
11641
11641
|
const newgeom3 = subtractGeom3(newgeometries);
|
|
11642
11642
|
const epsilon = measureEpsilon(newgeom3);
|
|
11643
11643
|
return fromFakePolygons(epsilon, geom3.toPolygons(newgeom3));
|
|
11644
11644
|
};
|
|
11645
|
-
module.exports =
|
|
11645
|
+
module.exports = subtract5;
|
|
11646
11646
|
}
|
|
11647
11647
|
});
|
|
11648
11648
|
|
|
@@ -11656,7 +11656,7 @@ var require_subtract4 = __commonJS({
|
|
|
11656
11656
|
var geom3 = require_geom3();
|
|
11657
11657
|
var subtractGeom2 = require_subtractGeom2();
|
|
11658
11658
|
var subtractGeom3 = require_subtractGeom3();
|
|
11659
|
-
var
|
|
11659
|
+
var subtract5 = (...geometries) => {
|
|
11660
11660
|
geometries = flatten(geometries);
|
|
11661
11661
|
if (geometries.length === 0) throw new Error("wrong number of arguments");
|
|
11662
11662
|
if (!areAllShapesTheSameType(geometries)) {
|
|
@@ -11667,7 +11667,7 @@ var require_subtract4 = __commonJS({
|
|
|
11667
11667
|
if (geom3.isA(geometry)) return subtractGeom3(geometries);
|
|
11668
11668
|
return geometry;
|
|
11669
11669
|
};
|
|
11670
|
-
module.exports =
|
|
11670
|
+
module.exports = subtract5;
|
|
11671
11671
|
}
|
|
11672
11672
|
});
|
|
11673
11673
|
|
|
@@ -11709,7 +11709,7 @@ var require_unionGeom3 = __commonJS({
|
|
|
11709
11709
|
var flatten = require_flatten();
|
|
11710
11710
|
var retessellate = require_retessellate();
|
|
11711
11711
|
var unionSub = require_unionGeom3Sub();
|
|
11712
|
-
var
|
|
11712
|
+
var union4 = (...geometries) => {
|
|
11713
11713
|
geometries = flatten(geometries);
|
|
11714
11714
|
let i;
|
|
11715
11715
|
for (i = 1; i < geometries.length; i += 2) {
|
|
@@ -11719,7 +11719,7 @@ var require_unionGeom3 = __commonJS({
|
|
|
11719
11719
|
newgeometry = retessellate(newgeometry);
|
|
11720
11720
|
return newgeometry;
|
|
11721
11721
|
};
|
|
11722
|
-
module.exports =
|
|
11722
|
+
module.exports = union4;
|
|
11723
11723
|
}
|
|
11724
11724
|
});
|
|
11725
11725
|
|
|
@@ -11733,14 +11733,14 @@ var require_unionGeom2 = __commonJS({
|
|
|
11733
11733
|
var fromFakePolygons = require_fromFakePolygons();
|
|
11734
11734
|
var to3DWalls = require_to3DWalls();
|
|
11735
11735
|
var unionGeom3 = require_unionGeom3();
|
|
11736
|
-
var
|
|
11736
|
+
var union4 = (...geometries) => {
|
|
11737
11737
|
geometries = flatten(geometries);
|
|
11738
11738
|
const newgeometries = geometries.map((geometry) => to3DWalls({ z0: -1, z1: 1 }, geometry));
|
|
11739
11739
|
const newgeom3 = unionGeom3(newgeometries);
|
|
11740
11740
|
const epsilon = measureEpsilon(newgeom3);
|
|
11741
11741
|
return fromFakePolygons(epsilon, geom3.toPolygons(newgeom3));
|
|
11742
11742
|
};
|
|
11743
|
-
module.exports =
|
|
11743
|
+
module.exports = union4;
|
|
11744
11744
|
}
|
|
11745
11745
|
});
|
|
11746
11746
|
|
|
@@ -11754,7 +11754,7 @@ var require_union = __commonJS({
|
|
|
11754
11754
|
var geom3 = require_geom3();
|
|
11755
11755
|
var unionGeom2 = require_unionGeom2();
|
|
11756
11756
|
var unionGeom3 = require_unionGeom3();
|
|
11757
|
-
var
|
|
11757
|
+
var union4 = (...geometries) => {
|
|
11758
11758
|
geometries = flatten(geometries);
|
|
11759
11759
|
if (geometries.length === 0) throw new Error("wrong number of arguments");
|
|
11760
11760
|
if (!areAllShapesTheSameType(geometries)) {
|
|
@@ -11765,7 +11765,7 @@ var require_union = __commonJS({
|
|
|
11765
11765
|
if (geom3.isA(geometry)) return unionGeom3(geometries);
|
|
11766
11766
|
return geometry;
|
|
11767
11767
|
};
|
|
11768
|
-
module.exports =
|
|
11768
|
+
module.exports = union4;
|
|
11769
11769
|
}
|
|
11770
11770
|
});
|
|
11771
11771
|
|
|
@@ -12155,7 +12155,7 @@ var require_expandGeom3 = __commonJS({
|
|
|
12155
12155
|
"node_modules/@jscad/modeling/src/operations/expansions/expandGeom3.js"(exports, module) {
|
|
12156
12156
|
"use strict";
|
|
12157
12157
|
var geom3 = require_geom3();
|
|
12158
|
-
var
|
|
12158
|
+
var union4 = require_union();
|
|
12159
12159
|
var expandShell = require_expandShell();
|
|
12160
12160
|
var expandGeom3 = (options, geometry) => {
|
|
12161
12161
|
const defaults = {
|
|
@@ -12171,7 +12171,7 @@ var require_expandGeom3 = __commonJS({
|
|
|
12171
12171
|
if (polygons.length === 0) throw new Error("the given geometry cannot be empty");
|
|
12172
12172
|
options = { delta, corners, segments };
|
|
12173
12173
|
const expanded = expandShell(options, geometry);
|
|
12174
|
-
return
|
|
12174
|
+
return union4(geometry, expanded);
|
|
12175
12175
|
};
|
|
12176
12176
|
module.exports = expandGeom3;
|
|
12177
12177
|
}
|
|
@@ -12451,7 +12451,7 @@ var require_extrudeLinear = __commonJS({
|
|
|
12451
12451
|
var path2 = require_path2();
|
|
12452
12452
|
var extrudeLinearGeom2 = require_extrudeLinearGeom2();
|
|
12453
12453
|
var extrudeLinearPath2 = require_extrudeLinearPath2();
|
|
12454
|
-
var
|
|
12454
|
+
var extrudeLinear7 = (options, ...objects) => {
|
|
12455
12455
|
const defaults = {
|
|
12456
12456
|
height: 1,
|
|
12457
12457
|
twistAngle: 0,
|
|
@@ -12469,7 +12469,7 @@ var require_extrudeLinear = __commonJS({
|
|
|
12469
12469
|
});
|
|
12470
12470
|
return results.length === 1 ? results[0] : results;
|
|
12471
12471
|
};
|
|
12472
|
-
module.exports =
|
|
12472
|
+
module.exports = extrudeLinear7;
|
|
12473
12473
|
}
|
|
12474
12474
|
});
|
|
12475
12475
|
|
|
@@ -12886,7 +12886,7 @@ var require_hullChain = __commonJS({
|
|
|
12886
12886
|
"node_modules/@jscad/modeling/src/operations/hulls/hullChain.js"(exports, module) {
|
|
12887
12887
|
"use strict";
|
|
12888
12888
|
var flatten = require_flatten();
|
|
12889
|
-
var
|
|
12889
|
+
var union4 = require_union();
|
|
12890
12890
|
var hull = require_hull();
|
|
12891
12891
|
var hullChain = (...geometries) => {
|
|
12892
12892
|
geometries = flatten(geometries);
|
|
@@ -12895,7 +12895,7 @@ var require_hullChain = __commonJS({
|
|
|
12895
12895
|
for (let i = 1; i < geometries.length; i++) {
|
|
12896
12896
|
hulls.push(hull(geometries[i - 1], geometries[i]));
|
|
12897
12897
|
}
|
|
12898
|
-
return
|
|
12898
|
+
return union4(hulls);
|
|
12899
12899
|
};
|
|
12900
12900
|
module.exports = hullChain;
|
|
12901
12901
|
}
|
|
@@ -13528,7 +13528,7 @@ var require_align = __commonJS({
|
|
|
13528
13528
|
var flatten = require_flatten();
|
|
13529
13529
|
var padArrayToLength = require_padArrayToLength();
|
|
13530
13530
|
var measureAggregateBoundingBox = require_measureAggregateBoundingBox();
|
|
13531
|
-
var { translate:
|
|
13531
|
+
var { translate: translate8 } = require_translate2();
|
|
13532
13532
|
var validateOptions = (options) => {
|
|
13533
13533
|
if (!Array.isArray(options.modes) || options.modes.length > 3) throw new Error("align(): modes must be an array of length <= 3");
|
|
13534
13534
|
options.modes = padArrayToLength(options.modes, "none", 3);
|
|
@@ -13565,7 +13565,7 @@ var require_align = __commonJS({
|
|
|
13565
13565
|
translation[i] = relativeTo[i] - bounds[0][i];
|
|
13566
13566
|
}
|
|
13567
13567
|
}
|
|
13568
|
-
return
|
|
13568
|
+
return translate8(translation, geometry);
|
|
13569
13569
|
};
|
|
13570
13570
|
var align = (options, ...geometries) => {
|
|
13571
13571
|
const defaults = {
|
|
@@ -13602,7 +13602,7 @@ var require_center = __commonJS({
|
|
|
13602
13602
|
var geom3 = require_geom3();
|
|
13603
13603
|
var path2 = require_path2();
|
|
13604
13604
|
var measureBoundingBox = require_measureBoundingBox2();
|
|
13605
|
-
var { translate:
|
|
13605
|
+
var { translate: translate8 } = require_translate2();
|
|
13606
13606
|
var centerGeometry = (options, object) => {
|
|
13607
13607
|
const defaults = {
|
|
13608
13608
|
axes: [true, true, true],
|
|
@@ -13614,7 +13614,7 @@ var require_center = __commonJS({
|
|
|
13614
13614
|
if (axes[0]) offset4[0] = relativeTo[0] - (bounds[0][0] + (bounds[1][0] - bounds[0][0]) / 2);
|
|
13615
13615
|
if (axes[1]) offset4[1] = relativeTo[1] - (bounds[0][1] + (bounds[1][1] - bounds[0][1]) / 2);
|
|
13616
13616
|
if (axes[2]) offset4[2] = relativeTo[2] - (bounds[0][2] + (bounds[1][2] - bounds[0][2]) / 2);
|
|
13617
|
-
return
|
|
13617
|
+
return translate8(offset4, object);
|
|
13618
13618
|
};
|
|
13619
13619
|
var center = (options, ...objects) => {
|
|
13620
13620
|
const defaults = {
|
|
@@ -14750,7 +14750,7 @@ var import_jscad_planner = __toESM(require_dist(), 1);
|
|
|
14750
14750
|
var import_modeling = __toESM(require_src(), 1);
|
|
14751
14751
|
|
|
14752
14752
|
// node_modules/@tscircuit/footprinter/dist/index.js
|
|
14753
|
-
import { z as
|
|
14753
|
+
import { z as z131 } from "zod";
|
|
14754
14754
|
|
|
14755
14755
|
// node_modules/@tscircuit/mm/dist/index.js
|
|
14756
14756
|
var unitToMm = {
|
|
@@ -14830,9 +14830,9 @@ import { z as z48 } from "zod";
|
|
|
14830
14830
|
import { z as z49 } from "zod";
|
|
14831
14831
|
import { z as z50 } from "zod";
|
|
14832
14832
|
import { z as z51 } from "zod";
|
|
14833
|
-
import { z as z53 } from "zod";
|
|
14834
14833
|
import { z as z52 } from "zod";
|
|
14835
14834
|
import { z as z54 } from "zod";
|
|
14835
|
+
import { z as z53 } from "zod";
|
|
14836
14836
|
import { z as z55 } from "zod";
|
|
14837
14837
|
import { z as z56 } from "zod";
|
|
14838
14838
|
import { z as z57 } from "zod";
|
|
@@ -14902,6 +14902,13 @@ import { z as z120 } from "zod";
|
|
|
14902
14902
|
import { z as z121 } from "zod";
|
|
14903
14903
|
import { z as z122 } from "zod";
|
|
14904
14904
|
import { z as z123 } from "zod";
|
|
14905
|
+
import { z as z124 } from "zod";
|
|
14906
|
+
import { z as z125 } from "zod";
|
|
14907
|
+
import { z as z126 } from "zod";
|
|
14908
|
+
import { z as z127 } from "zod";
|
|
14909
|
+
import { z as z128 } from "zod";
|
|
14910
|
+
import { z as z129 } from "zod";
|
|
14911
|
+
import { z as z130 } from "zod";
|
|
14905
14912
|
var unitMappings = {
|
|
14906
14913
|
Hz: {
|
|
14907
14914
|
baseUnit: "Hz",
|
|
@@ -15448,7 +15455,8 @@ var source_port = z36.object({
|
|
|
15448
15455
|
port_hints: z36.array(z36.string()).optional(),
|
|
15449
15456
|
name: z36.string(),
|
|
15450
15457
|
source_port_id: z36.string(),
|
|
15451
|
-
source_component_id: z36.string(),
|
|
15458
|
+
source_component_id: z36.string().optional(),
|
|
15459
|
+
source_group_id: z36.string().optional(),
|
|
15452
15460
|
subcircuit_id: z36.string().optional(),
|
|
15453
15461
|
subcircuit_connectivity_map_key: z36.string().optional()
|
|
15454
15462
|
});
|
|
@@ -15539,178 +15547,191 @@ var source_manually_placed_via = z43.object({
|
|
|
15539
15547
|
source_trace_id: z43.string().optional()
|
|
15540
15548
|
}).describe("Defines a via that is manually placed in the source domain");
|
|
15541
15549
|
expectTypesMatch(true);
|
|
15542
|
-
var
|
|
15543
|
-
type: z44.literal("
|
|
15544
|
-
|
|
15550
|
+
var unknown_error_finding_part = z44.object({
|
|
15551
|
+
type: z44.literal("unknown_error_finding_part"),
|
|
15552
|
+
unknown_error_finding_part_id: getZodPrefixedIdWithDefault(
|
|
15553
|
+
"unknown_error_finding_part"
|
|
15554
|
+
),
|
|
15555
|
+
error_type: z44.literal("unknown_error_finding_part").default("unknown_error_finding_part"),
|
|
15556
|
+
message: z44.string(),
|
|
15557
|
+
source_component_id: z44.string().optional(),
|
|
15558
|
+
subcircuit_id: z44.string().optional()
|
|
15559
|
+
}).describe(
|
|
15560
|
+
"Error emitted when an unexpected error occurs while finding a part"
|
|
15561
|
+
);
|
|
15562
|
+
expectTypesMatch(true);
|
|
15563
|
+
var schematic_box = z45.object({
|
|
15564
|
+
type: z45.literal("schematic_box"),
|
|
15565
|
+
schematic_component_id: z45.string().optional(),
|
|
15545
15566
|
width: distance,
|
|
15546
15567
|
height: distance,
|
|
15547
|
-
is_dashed:
|
|
15568
|
+
is_dashed: z45.boolean().default(false),
|
|
15548
15569
|
x: distance,
|
|
15549
15570
|
y: distance,
|
|
15550
|
-
subcircuit_id:
|
|
15571
|
+
subcircuit_id: z45.string().optional()
|
|
15551
15572
|
}).describe("Draws a box on the schematic");
|
|
15552
15573
|
expectTypesMatch(true);
|
|
15553
|
-
var schematic_path =
|
|
15554
|
-
type:
|
|
15555
|
-
schematic_component_id:
|
|
15556
|
-
fill_color:
|
|
15557
|
-
is_filled:
|
|
15558
|
-
points:
|
|
15559
|
-
subcircuit_id:
|
|
15574
|
+
var schematic_path = z46.object({
|
|
15575
|
+
type: z46.literal("schematic_path"),
|
|
15576
|
+
schematic_component_id: z46.string(),
|
|
15577
|
+
fill_color: z46.enum(["red", "blue"]).optional(),
|
|
15578
|
+
is_filled: z46.boolean().optional(),
|
|
15579
|
+
points: z46.array(point),
|
|
15580
|
+
subcircuit_id: z46.string().optional()
|
|
15560
15581
|
});
|
|
15561
15582
|
expectTypesMatch(true);
|
|
15562
|
-
var schematic_pin_styles =
|
|
15563
|
-
|
|
15583
|
+
var schematic_pin_styles = z47.record(
|
|
15584
|
+
z47.object({
|
|
15564
15585
|
left_margin: length.optional(),
|
|
15565
15586
|
right_margin: length.optional(),
|
|
15566
15587
|
top_margin: length.optional(),
|
|
15567
15588
|
bottom_margin: length.optional()
|
|
15568
15589
|
})
|
|
15569
15590
|
);
|
|
15570
|
-
var schematic_component_port_arrangement_by_size =
|
|
15571
|
-
left_size:
|
|
15572
|
-
right_size:
|
|
15573
|
-
top_size:
|
|
15574
|
-
bottom_size:
|
|
15591
|
+
var schematic_component_port_arrangement_by_size = z47.object({
|
|
15592
|
+
left_size: z47.number(),
|
|
15593
|
+
right_size: z47.number(),
|
|
15594
|
+
top_size: z47.number().optional(),
|
|
15595
|
+
bottom_size: z47.number().optional()
|
|
15575
15596
|
});
|
|
15576
15597
|
expectTypesMatch(true);
|
|
15577
|
-
var schematic_component_port_arrangement_by_sides =
|
|
15578
|
-
left_side:
|
|
15579
|
-
pins:
|
|
15598
|
+
var schematic_component_port_arrangement_by_sides = z47.object({
|
|
15599
|
+
left_side: z47.object({
|
|
15600
|
+
pins: z47.array(z47.number()),
|
|
15580
15601
|
// @ts-ignore
|
|
15581
|
-
direction:
|
|
15602
|
+
direction: z47.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
15582
15603
|
}).optional(),
|
|
15583
|
-
right_side:
|
|
15584
|
-
pins:
|
|
15604
|
+
right_side: z47.object({
|
|
15605
|
+
pins: z47.array(z47.number()),
|
|
15585
15606
|
// @ts-ignore
|
|
15586
|
-
direction:
|
|
15607
|
+
direction: z47.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
15587
15608
|
}).optional(),
|
|
15588
|
-
top_side:
|
|
15589
|
-
pins:
|
|
15609
|
+
top_side: z47.object({
|
|
15610
|
+
pins: z47.array(z47.number()),
|
|
15590
15611
|
// @ts-ignore
|
|
15591
|
-
direction:
|
|
15612
|
+
direction: z47.enum(["left-to-right", "right-to-left"]).optional()
|
|
15592
15613
|
}).optional(),
|
|
15593
|
-
bottom_side:
|
|
15594
|
-
pins:
|
|
15614
|
+
bottom_side: z47.object({
|
|
15615
|
+
pins: z47.array(z47.number()),
|
|
15595
15616
|
// @ts-ignore
|
|
15596
|
-
direction:
|
|
15617
|
+
direction: z47.enum(["left-to-right", "right-to-left"]).optional()
|
|
15597
15618
|
}).optional()
|
|
15598
15619
|
});
|
|
15599
15620
|
expectTypesMatch(true);
|
|
15600
|
-
var port_arrangement =
|
|
15621
|
+
var port_arrangement = z47.union([
|
|
15601
15622
|
schematic_component_port_arrangement_by_size,
|
|
15602
15623
|
schematic_component_port_arrangement_by_sides
|
|
15603
15624
|
]);
|
|
15604
|
-
var schematic_component =
|
|
15605
|
-
type:
|
|
15625
|
+
var schematic_component = z47.object({
|
|
15626
|
+
type: z47.literal("schematic_component"),
|
|
15606
15627
|
size,
|
|
15607
15628
|
center: point,
|
|
15608
|
-
source_component_id:
|
|
15609
|
-
schematic_component_id:
|
|
15629
|
+
source_component_id: z47.string().optional(),
|
|
15630
|
+
schematic_component_id: z47.string(),
|
|
15610
15631
|
pin_spacing: length.optional(),
|
|
15611
15632
|
pin_styles: schematic_pin_styles.optional(),
|
|
15612
15633
|
box_width: length.optional(),
|
|
15613
|
-
symbol_name:
|
|
15634
|
+
symbol_name: z47.string().optional(),
|
|
15614
15635
|
port_arrangement: port_arrangement.optional(),
|
|
15615
|
-
port_labels:
|
|
15616
|
-
symbol_display_value:
|
|
15617
|
-
subcircuit_id:
|
|
15618
|
-
schematic_group_id:
|
|
15619
|
-
is_schematic_group:
|
|
15620
|
-
source_group_id:
|
|
15621
|
-
is_box_with_pins:
|
|
15636
|
+
port_labels: z47.record(z47.string()).optional(),
|
|
15637
|
+
symbol_display_value: z47.string().optional(),
|
|
15638
|
+
subcircuit_id: z47.string().optional(),
|
|
15639
|
+
schematic_group_id: z47.string().optional(),
|
|
15640
|
+
is_schematic_group: z47.boolean().optional(),
|
|
15641
|
+
source_group_id: z47.string().optional(),
|
|
15642
|
+
is_box_with_pins: z47.boolean().optional().default(true)
|
|
15622
15643
|
});
|
|
15623
15644
|
expectTypesMatch(true);
|
|
15624
|
-
var schematic_line =
|
|
15625
|
-
type:
|
|
15645
|
+
var schematic_line = z48.object({
|
|
15646
|
+
type: z48.literal("schematic_line"),
|
|
15626
15647
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
15627
|
-
schematic_component_id:
|
|
15648
|
+
schematic_component_id: z48.string(),
|
|
15628
15649
|
x1: distance,
|
|
15629
15650
|
y1: distance,
|
|
15630
15651
|
x2: distance,
|
|
15631
15652
|
y2: distance,
|
|
15632
15653
|
stroke_width: distance.nullable().optional(),
|
|
15633
|
-
color:
|
|
15634
|
-
is_dashed:
|
|
15635
|
-
subcircuit_id:
|
|
15654
|
+
color: z48.string().default("#000000"),
|
|
15655
|
+
is_dashed: z48.boolean().default(false),
|
|
15656
|
+
subcircuit_id: z48.string().optional()
|
|
15636
15657
|
}).describe("Draws a styled line on the schematic");
|
|
15637
15658
|
expectTypesMatch(true);
|
|
15638
|
-
var schematic_rect =
|
|
15639
|
-
type:
|
|
15659
|
+
var schematic_rect = z49.object({
|
|
15660
|
+
type: z49.literal("schematic_rect"),
|
|
15640
15661
|
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
15641
|
-
schematic_component_id:
|
|
15662
|
+
schematic_component_id: z49.string(),
|
|
15642
15663
|
center: point,
|
|
15643
15664
|
width: distance,
|
|
15644
15665
|
height: distance,
|
|
15645
15666
|
rotation: rotation.default(0),
|
|
15646
15667
|
stroke_width: distance.nullable().optional(),
|
|
15647
|
-
color:
|
|
15648
|
-
is_filled:
|
|
15649
|
-
fill_color:
|
|
15650
|
-
is_dashed:
|
|
15651
|
-
subcircuit_id:
|
|
15668
|
+
color: z49.string().default("#000000"),
|
|
15669
|
+
is_filled: z49.boolean().default(false),
|
|
15670
|
+
fill_color: z49.string().optional(),
|
|
15671
|
+
is_dashed: z49.boolean().default(false),
|
|
15672
|
+
subcircuit_id: z49.string().optional()
|
|
15652
15673
|
}).describe("Draws a styled rectangle on the schematic");
|
|
15653
15674
|
expectTypesMatch(true);
|
|
15654
|
-
var schematic_circle =
|
|
15655
|
-
type:
|
|
15675
|
+
var schematic_circle = z50.object({
|
|
15676
|
+
type: z50.literal("schematic_circle"),
|
|
15656
15677
|
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
15657
|
-
schematic_component_id:
|
|
15678
|
+
schematic_component_id: z50.string(),
|
|
15658
15679
|
center: point,
|
|
15659
15680
|
radius: distance,
|
|
15660
15681
|
stroke_width: distance.nullable().optional(),
|
|
15661
|
-
color:
|
|
15662
|
-
is_filled:
|
|
15663
|
-
fill_color:
|
|
15664
|
-
is_dashed:
|
|
15665
|
-
subcircuit_id:
|
|
15682
|
+
color: z50.string().default("#000000"),
|
|
15683
|
+
is_filled: z50.boolean().default(false),
|
|
15684
|
+
fill_color: z50.string().optional(),
|
|
15685
|
+
is_dashed: z50.boolean().default(false),
|
|
15686
|
+
subcircuit_id: z50.string().optional()
|
|
15666
15687
|
}).describe("Draws a styled circle on the schematic");
|
|
15667
15688
|
expectTypesMatch(true);
|
|
15668
|
-
var schematic_arc =
|
|
15669
|
-
type:
|
|
15689
|
+
var schematic_arc = z51.object({
|
|
15690
|
+
type: z51.literal("schematic_arc"),
|
|
15670
15691
|
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
15671
|
-
schematic_component_id:
|
|
15692
|
+
schematic_component_id: z51.string(),
|
|
15672
15693
|
center: point,
|
|
15673
15694
|
radius: distance,
|
|
15674
15695
|
start_angle_degrees: rotation,
|
|
15675
15696
|
end_angle_degrees: rotation,
|
|
15676
|
-
direction:
|
|
15697
|
+
direction: z51.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
15677
15698
|
stroke_width: distance.nullable().optional(),
|
|
15678
|
-
color:
|
|
15679
|
-
is_dashed:
|
|
15680
|
-
subcircuit_id:
|
|
15699
|
+
color: z51.string().default("#000000"),
|
|
15700
|
+
is_dashed: z51.boolean().default(false),
|
|
15701
|
+
subcircuit_id: z51.string().optional()
|
|
15681
15702
|
}).describe("Draws a styled arc on the schematic");
|
|
15682
15703
|
expectTypesMatch(true);
|
|
15683
|
-
var schematic_trace =
|
|
15684
|
-
type:
|
|
15685
|
-
schematic_trace_id:
|
|
15686
|
-
source_trace_id:
|
|
15687
|
-
junctions:
|
|
15688
|
-
|
|
15689
|
-
x:
|
|
15690
|
-
y:
|
|
15704
|
+
var schematic_trace = z52.object({
|
|
15705
|
+
type: z52.literal("schematic_trace"),
|
|
15706
|
+
schematic_trace_id: z52.string(),
|
|
15707
|
+
source_trace_id: z52.string().optional(),
|
|
15708
|
+
junctions: z52.array(
|
|
15709
|
+
z52.object({
|
|
15710
|
+
x: z52.number(),
|
|
15711
|
+
y: z52.number()
|
|
15691
15712
|
})
|
|
15692
15713
|
),
|
|
15693
|
-
edges:
|
|
15694
|
-
|
|
15695
|
-
from:
|
|
15696
|
-
x:
|
|
15697
|
-
y:
|
|
15714
|
+
edges: z52.array(
|
|
15715
|
+
z52.object({
|
|
15716
|
+
from: z52.object({
|
|
15717
|
+
x: z52.number(),
|
|
15718
|
+
y: z52.number()
|
|
15698
15719
|
}),
|
|
15699
|
-
to:
|
|
15700
|
-
x:
|
|
15701
|
-
y:
|
|
15720
|
+
to: z52.object({
|
|
15721
|
+
x: z52.number(),
|
|
15722
|
+
y: z52.number()
|
|
15702
15723
|
}),
|
|
15703
|
-
is_crossing:
|
|
15704
|
-
from_schematic_port_id:
|
|
15705
|
-
to_schematic_port_id:
|
|
15724
|
+
is_crossing: z52.boolean().optional(),
|
|
15725
|
+
from_schematic_port_id: z52.string().optional(),
|
|
15726
|
+
to_schematic_port_id: z52.string().optional()
|
|
15706
15727
|
})
|
|
15707
15728
|
),
|
|
15708
|
-
subcircuit_id:
|
|
15729
|
+
subcircuit_id: z52.string().optional(),
|
|
15709
15730
|
// TODO: make required in a future release
|
|
15710
|
-
subcircuit_connectivity_map_key:
|
|
15731
|
+
subcircuit_connectivity_map_key: z52.string().optional()
|
|
15711
15732
|
});
|
|
15712
15733
|
expectTypesMatch(true);
|
|
15713
|
-
var fivePointAnchor =
|
|
15734
|
+
var fivePointAnchor = z53.enum([
|
|
15714
15735
|
"center",
|
|
15715
15736
|
"left",
|
|
15716
15737
|
"right",
|
|
@@ -15718,229 +15739,238 @@ var fivePointAnchor = z52.enum([
|
|
|
15718
15739
|
"bottom"
|
|
15719
15740
|
]);
|
|
15720
15741
|
expectTypesMatch(true);
|
|
15721
|
-
var schematic_text =
|
|
15722
|
-
type:
|
|
15723
|
-
schematic_component_id:
|
|
15724
|
-
schematic_text_id:
|
|
15725
|
-
text:
|
|
15726
|
-
font_size:
|
|
15727
|
-
position:
|
|
15742
|
+
var schematic_text = z54.object({
|
|
15743
|
+
type: z54.literal("schematic_text"),
|
|
15744
|
+
schematic_component_id: z54.string().optional(),
|
|
15745
|
+
schematic_text_id: z54.string(),
|
|
15746
|
+
text: z54.string(),
|
|
15747
|
+
font_size: z54.number().default(0.18),
|
|
15748
|
+
position: z54.object({
|
|
15728
15749
|
x: distance,
|
|
15729
15750
|
y: distance
|
|
15730
15751
|
}),
|
|
15731
|
-
rotation:
|
|
15732
|
-
anchor:
|
|
15733
|
-
color:
|
|
15734
|
-
subcircuit_id:
|
|
15752
|
+
rotation: z54.number().default(0),
|
|
15753
|
+
anchor: z54.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
15754
|
+
color: z54.string().default("#000000"),
|
|
15755
|
+
subcircuit_id: z54.string().optional()
|
|
15735
15756
|
});
|
|
15736
15757
|
expectTypesMatch(true);
|
|
15737
|
-
var schematic_port =
|
|
15738
|
-
type:
|
|
15739
|
-
schematic_port_id:
|
|
15740
|
-
source_port_id:
|
|
15741
|
-
schematic_component_id:
|
|
15758
|
+
var schematic_port = z55.object({
|
|
15759
|
+
type: z55.literal("schematic_port"),
|
|
15760
|
+
schematic_port_id: z55.string(),
|
|
15761
|
+
source_port_id: z55.string(),
|
|
15762
|
+
schematic_component_id: z55.string().optional(),
|
|
15742
15763
|
center: point,
|
|
15743
|
-
facing_direction:
|
|
15744
|
-
distance_from_component_edge:
|
|
15745
|
-
side_of_component:
|
|
15746
|
-
true_ccw_index:
|
|
15747
|
-
pin_number:
|
|
15748
|
-
display_pin_label:
|
|
15749
|
-
subcircuit_id:
|
|
15750
|
-
is_connected:
|
|
15751
|
-
has_input_arrow:
|
|
15752
|
-
has_output_arrow:
|
|
15764
|
+
facing_direction: z55.enum(["up", "down", "left", "right"]).optional(),
|
|
15765
|
+
distance_from_component_edge: z55.number().optional(),
|
|
15766
|
+
side_of_component: z55.enum(["top", "bottom", "left", "right"]).optional(),
|
|
15767
|
+
true_ccw_index: z55.number().optional(),
|
|
15768
|
+
pin_number: z55.number().optional(),
|
|
15769
|
+
display_pin_label: z55.string().optional(),
|
|
15770
|
+
subcircuit_id: z55.string().optional(),
|
|
15771
|
+
is_connected: z55.boolean().optional(),
|
|
15772
|
+
has_input_arrow: z55.boolean().optional(),
|
|
15773
|
+
has_output_arrow: z55.boolean().optional()
|
|
15753
15774
|
}).describe("Defines a port on a schematic component");
|
|
15754
15775
|
expectTypesMatch(true);
|
|
15755
|
-
var schematic_net_label =
|
|
15756
|
-
type:
|
|
15776
|
+
var schematic_net_label = z56.object({
|
|
15777
|
+
type: z56.literal("schematic_net_label"),
|
|
15757
15778
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
15758
|
-
schematic_trace_id:
|
|
15759
|
-
source_trace_id:
|
|
15760
|
-
source_net_id:
|
|
15779
|
+
schematic_trace_id: z56.string().optional(),
|
|
15780
|
+
source_trace_id: z56.string().optional(),
|
|
15781
|
+
source_net_id: z56.string(),
|
|
15761
15782
|
center: point,
|
|
15762
15783
|
anchor_position: point.optional(),
|
|
15763
|
-
anchor_side:
|
|
15764
|
-
text:
|
|
15765
|
-
symbol_name:
|
|
15766
|
-
is_movable:
|
|
15767
|
-
subcircuit_id:
|
|
15784
|
+
anchor_side: z56.enum(["top", "bottom", "left", "right"]),
|
|
15785
|
+
text: z56.string(),
|
|
15786
|
+
symbol_name: z56.string().optional(),
|
|
15787
|
+
is_movable: z56.boolean().optional(),
|
|
15788
|
+
subcircuit_id: z56.string().optional()
|
|
15768
15789
|
});
|
|
15769
15790
|
expectTypesMatch(true);
|
|
15770
|
-
var schematic_error =
|
|
15771
|
-
type:
|
|
15772
|
-
schematic_error_id:
|
|
15791
|
+
var schematic_error = z57.object({
|
|
15792
|
+
type: z57.literal("schematic_error"),
|
|
15793
|
+
schematic_error_id: z57.string(),
|
|
15773
15794
|
// eventually each error type should be broken out into a dir of files
|
|
15774
|
-
error_type:
|
|
15775
|
-
message:
|
|
15776
|
-
subcircuit_id:
|
|
15795
|
+
error_type: z57.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
15796
|
+
message: z57.string(),
|
|
15797
|
+
subcircuit_id: z57.string().optional()
|
|
15777
15798
|
}).describe("Defines a schematic error on the schematic");
|
|
15778
15799
|
expectTypesMatch(true);
|
|
15779
|
-
var schematic_layout_error =
|
|
15780
|
-
type:
|
|
15800
|
+
var schematic_layout_error = z58.object({
|
|
15801
|
+
type: z58.literal("schematic_layout_error"),
|
|
15781
15802
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
15782
15803
|
"schematic_layout_error"
|
|
15783
15804
|
),
|
|
15784
|
-
error_type:
|
|
15785
|
-
message:
|
|
15786
|
-
source_group_id:
|
|
15787
|
-
schematic_group_id:
|
|
15788
|
-
subcircuit_id:
|
|
15805
|
+
error_type: z58.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
15806
|
+
message: z58.string(),
|
|
15807
|
+
source_group_id: z58.string(),
|
|
15808
|
+
schematic_group_id: z58.string(),
|
|
15809
|
+
subcircuit_id: z58.string().optional()
|
|
15789
15810
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
15790
15811
|
expectTypesMatch(true);
|
|
15791
|
-
var schematic_debug_object_base =
|
|
15792
|
-
type:
|
|
15793
|
-
label:
|
|
15794
|
-
subcircuit_id:
|
|
15812
|
+
var schematic_debug_object_base = z59.object({
|
|
15813
|
+
type: z59.literal("schematic_debug_object"),
|
|
15814
|
+
label: z59.string().optional(),
|
|
15815
|
+
subcircuit_id: z59.string().optional()
|
|
15795
15816
|
});
|
|
15796
15817
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
15797
|
-
shape:
|
|
15818
|
+
shape: z59.literal("rect"),
|
|
15798
15819
|
center: point,
|
|
15799
15820
|
size
|
|
15800
15821
|
});
|
|
15801
15822
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
15802
|
-
shape:
|
|
15823
|
+
shape: z59.literal("line"),
|
|
15803
15824
|
start: point,
|
|
15804
15825
|
end: point
|
|
15805
15826
|
});
|
|
15806
15827
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
15807
|
-
shape:
|
|
15828
|
+
shape: z59.literal("point"),
|
|
15808
15829
|
center: point
|
|
15809
15830
|
});
|
|
15810
|
-
var schematic_debug_object =
|
|
15831
|
+
var schematic_debug_object = z59.discriminatedUnion("shape", [
|
|
15811
15832
|
schematic_debug_rect,
|
|
15812
15833
|
schematic_debug_line,
|
|
15813
15834
|
schematic_debug_point
|
|
15814
15835
|
]);
|
|
15815
15836
|
expectTypesMatch(true);
|
|
15816
|
-
var schematic_voltage_probe =
|
|
15817
|
-
type:
|
|
15818
|
-
schematic_voltage_probe_id:
|
|
15837
|
+
var schematic_voltage_probe = z60.object({
|
|
15838
|
+
type: z60.literal("schematic_voltage_probe"),
|
|
15839
|
+
schematic_voltage_probe_id: z60.string(),
|
|
15819
15840
|
position: point,
|
|
15820
|
-
schematic_trace_id:
|
|
15841
|
+
schematic_trace_id: z60.string(),
|
|
15821
15842
|
voltage: voltage.optional(),
|
|
15822
|
-
subcircuit_id:
|
|
15843
|
+
subcircuit_id: z60.string().optional()
|
|
15823
15844
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
15824
15845
|
expectTypesMatch(true);
|
|
15825
|
-
var schematic_manual_edit_conflict_warning =
|
|
15826
|
-
type:
|
|
15846
|
+
var schematic_manual_edit_conflict_warning = z61.object({
|
|
15847
|
+
type: z61.literal("schematic_manual_edit_conflict_warning"),
|
|
15827
15848
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
15828
15849
|
"schematic_manual_edit_conflict_warning"
|
|
15829
15850
|
),
|
|
15830
|
-
warning_type:
|
|
15831
|
-
message:
|
|
15832
|
-
schematic_component_id:
|
|
15833
|
-
schematic_group_id:
|
|
15834
|
-
subcircuit_id:
|
|
15835
|
-
source_component_id:
|
|
15851
|
+
warning_type: z61.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
15852
|
+
message: z61.string(),
|
|
15853
|
+
schematic_component_id: z61.string(),
|
|
15854
|
+
schematic_group_id: z61.string().optional(),
|
|
15855
|
+
subcircuit_id: z61.string().optional(),
|
|
15856
|
+
source_component_id: z61.string()
|
|
15836
15857
|
}).describe(
|
|
15837
15858
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
15838
15859
|
);
|
|
15839
15860
|
expectTypesMatch(true);
|
|
15840
|
-
var schematic_group =
|
|
15841
|
-
type:
|
|
15861
|
+
var schematic_group = z62.object({
|
|
15862
|
+
type: z62.literal("schematic_group"),
|
|
15842
15863
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
15843
|
-
source_group_id:
|
|
15844
|
-
is_subcircuit:
|
|
15845
|
-
subcircuit_id:
|
|
15864
|
+
source_group_id: z62.string(),
|
|
15865
|
+
is_subcircuit: z62.boolean().optional(),
|
|
15866
|
+
subcircuit_id: z62.string().optional(),
|
|
15846
15867
|
width: length,
|
|
15847
15868
|
height: length,
|
|
15848
15869
|
center: point,
|
|
15849
|
-
schematic_component_ids:
|
|
15850
|
-
show_as_schematic_box:
|
|
15851
|
-
name:
|
|
15852
|
-
description:
|
|
15870
|
+
schematic_component_ids: z62.array(z62.string()),
|
|
15871
|
+
show_as_schematic_box: z62.boolean().optional(),
|
|
15872
|
+
name: z62.string().optional(),
|
|
15873
|
+
description: z62.string().optional()
|
|
15853
15874
|
}).describe("Defines a group of components on the schematic");
|
|
15854
15875
|
expectTypesMatch(true);
|
|
15855
|
-
var schematic_table =
|
|
15856
|
-
type:
|
|
15876
|
+
var schematic_table = z63.object({
|
|
15877
|
+
type: z63.literal("schematic_table"),
|
|
15857
15878
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
15858
15879
|
anchor_position: point,
|
|
15859
|
-
column_widths:
|
|
15860
|
-
row_heights:
|
|
15880
|
+
column_widths: z63.array(distance),
|
|
15881
|
+
row_heights: z63.array(distance),
|
|
15861
15882
|
cell_padding: distance.optional(),
|
|
15862
15883
|
border_width: distance.optional(),
|
|
15863
|
-
subcircuit_id:
|
|
15864
|
-
schematic_component_id:
|
|
15884
|
+
subcircuit_id: z63.string().optional(),
|
|
15885
|
+
schematic_component_id: z63.string().optional(),
|
|
15865
15886
|
anchor: ninePointAnchor.optional()
|
|
15866
15887
|
}).describe("Defines a table on the schematic");
|
|
15867
15888
|
expectTypesMatch(true);
|
|
15868
|
-
var schematic_table_cell =
|
|
15869
|
-
type:
|
|
15889
|
+
var schematic_table_cell = z64.object({
|
|
15890
|
+
type: z64.literal("schematic_table_cell"),
|
|
15870
15891
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
15871
15892
|
"schematic_table_cell"
|
|
15872
15893
|
),
|
|
15873
|
-
schematic_table_id:
|
|
15874
|
-
start_row_index:
|
|
15875
|
-
end_row_index:
|
|
15876
|
-
start_column_index:
|
|
15877
|
-
end_column_index:
|
|
15878
|
-
text:
|
|
15894
|
+
schematic_table_id: z64.string(),
|
|
15895
|
+
start_row_index: z64.number(),
|
|
15896
|
+
end_row_index: z64.number(),
|
|
15897
|
+
start_column_index: z64.number(),
|
|
15898
|
+
end_column_index: z64.number(),
|
|
15899
|
+
text: z64.string().optional(),
|
|
15879
15900
|
center: point,
|
|
15880
15901
|
width: distance,
|
|
15881
15902
|
height: distance,
|
|
15882
|
-
horizontal_align:
|
|
15883
|
-
vertical_align:
|
|
15903
|
+
horizontal_align: z64.enum(["left", "center", "right"]).optional(),
|
|
15904
|
+
vertical_align: z64.enum(["top", "middle", "bottom"]).optional(),
|
|
15884
15905
|
font_size: distance.optional(),
|
|
15885
|
-
subcircuit_id:
|
|
15906
|
+
subcircuit_id: z64.string().optional()
|
|
15886
15907
|
}).describe("Defines a cell within a schematic_table");
|
|
15887
15908
|
expectTypesMatch(true);
|
|
15888
|
-
var
|
|
15909
|
+
var schematic_sheet = z65.object({
|
|
15910
|
+
type: z65.literal("schematic_sheet"),
|
|
15911
|
+
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
15912
|
+
name: z65.string().optional(),
|
|
15913
|
+
subcircuit_id: z65.string().optional()
|
|
15914
|
+
}).describe(
|
|
15915
|
+
"Defines a schematic sheet or page that components can be placed on"
|
|
15916
|
+
);
|
|
15917
|
+
expectTypesMatch(true);
|
|
15918
|
+
var point_with_bulge = z66.object({
|
|
15889
15919
|
x: distance,
|
|
15890
15920
|
y: distance,
|
|
15891
|
-
bulge:
|
|
15921
|
+
bulge: z66.number().optional()
|
|
15892
15922
|
});
|
|
15893
15923
|
expectTypesMatch(true);
|
|
15894
|
-
var ring =
|
|
15895
|
-
vertices:
|
|
15924
|
+
var ring = z66.object({
|
|
15925
|
+
vertices: z66.array(point_with_bulge)
|
|
15896
15926
|
});
|
|
15897
15927
|
expectTypesMatch(true);
|
|
15898
|
-
var brep_shape =
|
|
15928
|
+
var brep_shape = z66.object({
|
|
15899
15929
|
outer_ring: ring,
|
|
15900
|
-
inner_rings:
|
|
15930
|
+
inner_rings: z66.array(ring).default([])
|
|
15901
15931
|
});
|
|
15902
15932
|
expectTypesMatch(true);
|
|
15903
|
-
var pcb_route_hint =
|
|
15933
|
+
var pcb_route_hint = z67.object({
|
|
15904
15934
|
x: distance,
|
|
15905
15935
|
y: distance,
|
|
15906
|
-
via:
|
|
15936
|
+
via: z67.boolean().optional(),
|
|
15907
15937
|
via_to_layer: layer_ref.optional()
|
|
15908
15938
|
});
|
|
15909
|
-
var pcb_route_hints =
|
|
15939
|
+
var pcb_route_hints = z67.array(pcb_route_hint);
|
|
15910
15940
|
expectTypesMatch(true);
|
|
15911
15941
|
expectTypesMatch(true);
|
|
15912
|
-
var route_hint_point =
|
|
15942
|
+
var route_hint_point = z68.object({
|
|
15913
15943
|
x: distance,
|
|
15914
15944
|
y: distance,
|
|
15915
|
-
via:
|
|
15945
|
+
via: z68.boolean().optional(),
|
|
15916
15946
|
to_layer: layer_ref.optional(),
|
|
15917
15947
|
trace_width: distance.optional()
|
|
15918
15948
|
});
|
|
15919
15949
|
expectTypesMatch(true);
|
|
15920
|
-
var pcb_component =
|
|
15921
|
-
type:
|
|
15950
|
+
var pcb_component = z69.object({
|
|
15951
|
+
type: z69.literal("pcb_component"),
|
|
15922
15952
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
15923
|
-
source_component_id:
|
|
15953
|
+
source_component_id: z69.string(),
|
|
15924
15954
|
center: point,
|
|
15925
15955
|
layer: layer_ref,
|
|
15926
15956
|
rotation,
|
|
15927
15957
|
width: length,
|
|
15928
15958
|
height: length,
|
|
15929
|
-
do_not_place:
|
|
15930
|
-
subcircuit_id:
|
|
15931
|
-
pcb_group_id:
|
|
15932
|
-
obstructs_within_bounds:
|
|
15959
|
+
do_not_place: z69.boolean().optional(),
|
|
15960
|
+
subcircuit_id: z69.string().optional(),
|
|
15961
|
+
pcb_group_id: z69.string().optional(),
|
|
15962
|
+
obstructs_within_bounds: z69.boolean().default(true).describe(
|
|
15933
15963
|
"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"
|
|
15934
15964
|
)
|
|
15935
15965
|
}).describe("Defines a component on the PCB");
|
|
15936
15966
|
expectTypesMatch(true);
|
|
15937
|
-
var pcb_hole_circle_or_square =
|
|
15938
|
-
type:
|
|
15967
|
+
var pcb_hole_circle_or_square = z70.object({
|
|
15968
|
+
type: z70.literal("pcb_hole"),
|
|
15939
15969
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
15940
|
-
pcb_group_id:
|
|
15941
|
-
subcircuit_id:
|
|
15942
|
-
hole_shape:
|
|
15943
|
-
hole_diameter:
|
|
15970
|
+
pcb_group_id: z70.string().optional(),
|
|
15971
|
+
subcircuit_id: z70.string().optional(),
|
|
15972
|
+
hole_shape: z70.enum(["circle", "square"]),
|
|
15973
|
+
hole_diameter: z70.number(),
|
|
15944
15974
|
x: distance,
|
|
15945
15975
|
y: distance
|
|
15946
15976
|
});
|
|
@@ -15948,14 +15978,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
|
15948
15978
|
"Defines a circular or square hole on the PCB"
|
|
15949
15979
|
);
|
|
15950
15980
|
expectTypesMatch(true);
|
|
15951
|
-
var pcb_hole_oval =
|
|
15952
|
-
type:
|
|
15981
|
+
var pcb_hole_oval = z70.object({
|
|
15982
|
+
type: z70.literal("pcb_hole"),
|
|
15953
15983
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
15954
|
-
pcb_group_id:
|
|
15955
|
-
subcircuit_id:
|
|
15956
|
-
hole_shape:
|
|
15957
|
-
hole_width:
|
|
15958
|
-
hole_height:
|
|
15984
|
+
pcb_group_id: z70.string().optional(),
|
|
15985
|
+
subcircuit_id: z70.string().optional(),
|
|
15986
|
+
hole_shape: z70.literal("oval"),
|
|
15987
|
+
hole_width: z70.number(),
|
|
15988
|
+
hole_height: z70.number(),
|
|
15959
15989
|
x: distance,
|
|
15960
15990
|
y: distance
|
|
15961
15991
|
});
|
|
@@ -15963,14 +15993,14 @@ var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
|
15963
15993
|
"Defines an oval hole on the PCB"
|
|
15964
15994
|
);
|
|
15965
15995
|
expectTypesMatch(true);
|
|
15966
|
-
var pcb_hole_pill =
|
|
15967
|
-
type:
|
|
15996
|
+
var pcb_hole_pill = z70.object({
|
|
15997
|
+
type: z70.literal("pcb_hole"),
|
|
15968
15998
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
15969
|
-
pcb_group_id:
|
|
15970
|
-
subcircuit_id:
|
|
15971
|
-
hole_shape:
|
|
15972
|
-
hole_width:
|
|
15973
|
-
hole_height:
|
|
15999
|
+
pcb_group_id: z70.string().optional(),
|
|
16000
|
+
subcircuit_id: z70.string().optional(),
|
|
16001
|
+
hole_shape: z70.literal("pill"),
|
|
16002
|
+
hole_width: z70.number(),
|
|
16003
|
+
hole_height: z70.number(),
|
|
15974
16004
|
x: distance,
|
|
15975
16005
|
y: distance
|
|
15976
16006
|
});
|
|
@@ -15978,14 +16008,14 @@ var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
|
15978
16008
|
"Defines a pill-shaped hole on the PCB"
|
|
15979
16009
|
);
|
|
15980
16010
|
expectTypesMatch(true);
|
|
15981
|
-
var pcb_hole_rotated_pill =
|
|
15982
|
-
type:
|
|
16011
|
+
var pcb_hole_rotated_pill = z70.object({
|
|
16012
|
+
type: z70.literal("pcb_hole"),
|
|
15983
16013
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
15984
|
-
pcb_group_id:
|
|
15985
|
-
subcircuit_id:
|
|
15986
|
-
hole_shape:
|
|
15987
|
-
hole_width:
|
|
15988
|
-
hole_height:
|
|
16014
|
+
pcb_group_id: z70.string().optional(),
|
|
16015
|
+
subcircuit_id: z70.string().optional(),
|
|
16016
|
+
hole_shape: z70.literal("rotated_pill"),
|
|
16017
|
+
hole_width: z70.number(),
|
|
16018
|
+
hole_height: z70.number(),
|
|
15989
16019
|
x: distance,
|
|
15990
16020
|
y: distance,
|
|
15991
16021
|
ccw_rotation: rotation
|
|
@@ -15995,107 +16025,107 @@ var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
|
15995
16025
|
);
|
|
15996
16026
|
expectTypesMatch(true);
|
|
15997
16027
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill);
|
|
15998
|
-
var pcb_plated_hole_circle =
|
|
15999
|
-
type:
|
|
16000
|
-
shape:
|
|
16001
|
-
pcb_group_id:
|
|
16002
|
-
subcircuit_id:
|
|
16003
|
-
outer_diameter:
|
|
16004
|
-
hole_diameter:
|
|
16028
|
+
var pcb_plated_hole_circle = z71.object({
|
|
16029
|
+
type: z71.literal("pcb_plated_hole"),
|
|
16030
|
+
shape: z71.literal("circle"),
|
|
16031
|
+
pcb_group_id: z71.string().optional(),
|
|
16032
|
+
subcircuit_id: z71.string().optional(),
|
|
16033
|
+
outer_diameter: z71.number(),
|
|
16034
|
+
hole_diameter: z71.number(),
|
|
16005
16035
|
x: distance,
|
|
16006
16036
|
y: distance,
|
|
16007
|
-
layers:
|
|
16008
|
-
port_hints:
|
|
16009
|
-
pcb_component_id:
|
|
16010
|
-
pcb_port_id:
|
|
16037
|
+
layers: z71.array(layer_ref),
|
|
16038
|
+
port_hints: z71.array(z71.string()).optional(),
|
|
16039
|
+
pcb_component_id: z71.string().optional(),
|
|
16040
|
+
pcb_port_id: z71.string().optional(),
|
|
16011
16041
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16012
16042
|
});
|
|
16013
|
-
var pcb_plated_hole_oval =
|
|
16014
|
-
type:
|
|
16015
|
-
shape:
|
|
16016
|
-
pcb_group_id:
|
|
16017
|
-
subcircuit_id:
|
|
16018
|
-
outer_width:
|
|
16019
|
-
outer_height:
|
|
16020
|
-
hole_width:
|
|
16021
|
-
hole_height:
|
|
16043
|
+
var pcb_plated_hole_oval = z71.object({
|
|
16044
|
+
type: z71.literal("pcb_plated_hole"),
|
|
16045
|
+
shape: z71.enum(["oval", "pill"]),
|
|
16046
|
+
pcb_group_id: z71.string().optional(),
|
|
16047
|
+
subcircuit_id: z71.string().optional(),
|
|
16048
|
+
outer_width: z71.number(),
|
|
16049
|
+
outer_height: z71.number(),
|
|
16050
|
+
hole_width: z71.number(),
|
|
16051
|
+
hole_height: z71.number(),
|
|
16022
16052
|
x: distance,
|
|
16023
16053
|
y: distance,
|
|
16024
16054
|
ccw_rotation: rotation,
|
|
16025
|
-
layers:
|
|
16026
|
-
port_hints:
|
|
16027
|
-
pcb_component_id:
|
|
16028
|
-
pcb_port_id:
|
|
16055
|
+
layers: z71.array(layer_ref),
|
|
16056
|
+
port_hints: z71.array(z71.string()).optional(),
|
|
16057
|
+
pcb_component_id: z71.string().optional(),
|
|
16058
|
+
pcb_port_id: z71.string().optional(),
|
|
16029
16059
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16030
16060
|
});
|
|
16031
|
-
var pcb_circular_hole_with_rect_pad =
|
|
16032
|
-
type:
|
|
16033
|
-
shape:
|
|
16034
|
-
pcb_group_id:
|
|
16035
|
-
subcircuit_id:
|
|
16036
|
-
hole_shape:
|
|
16037
|
-
pad_shape:
|
|
16038
|
-
hole_diameter:
|
|
16039
|
-
rect_pad_width:
|
|
16040
|
-
rect_pad_height:
|
|
16041
|
-
rect_border_radius:
|
|
16061
|
+
var pcb_circular_hole_with_rect_pad = z71.object({
|
|
16062
|
+
type: z71.literal("pcb_plated_hole"),
|
|
16063
|
+
shape: z71.literal("circular_hole_with_rect_pad"),
|
|
16064
|
+
pcb_group_id: z71.string().optional(),
|
|
16065
|
+
subcircuit_id: z71.string().optional(),
|
|
16066
|
+
hole_shape: z71.literal("circle"),
|
|
16067
|
+
pad_shape: z71.literal("rect"),
|
|
16068
|
+
hole_diameter: z71.number(),
|
|
16069
|
+
rect_pad_width: z71.number(),
|
|
16070
|
+
rect_pad_height: z71.number(),
|
|
16071
|
+
rect_border_radius: z71.number().optional(),
|
|
16042
16072
|
hole_offset_x: distance.default(0),
|
|
16043
16073
|
hole_offset_y: distance.default(0),
|
|
16044
16074
|
x: distance,
|
|
16045
16075
|
y: distance,
|
|
16046
|
-
layers:
|
|
16047
|
-
port_hints:
|
|
16048
|
-
pcb_component_id:
|
|
16049
|
-
pcb_port_id:
|
|
16076
|
+
layers: z71.array(layer_ref),
|
|
16077
|
+
port_hints: z71.array(z71.string()).optional(),
|
|
16078
|
+
pcb_component_id: z71.string().optional(),
|
|
16079
|
+
pcb_port_id: z71.string().optional(),
|
|
16050
16080
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16051
16081
|
});
|
|
16052
|
-
var pcb_pill_hole_with_rect_pad =
|
|
16053
|
-
type:
|
|
16054
|
-
shape:
|
|
16055
|
-
pcb_group_id:
|
|
16056
|
-
subcircuit_id:
|
|
16057
|
-
hole_shape:
|
|
16058
|
-
pad_shape:
|
|
16059
|
-
hole_width:
|
|
16060
|
-
hole_height:
|
|
16061
|
-
rect_pad_width:
|
|
16062
|
-
rect_pad_height:
|
|
16063
|
-
rect_border_radius:
|
|
16082
|
+
var pcb_pill_hole_with_rect_pad = z71.object({
|
|
16083
|
+
type: z71.literal("pcb_plated_hole"),
|
|
16084
|
+
shape: z71.literal("pill_hole_with_rect_pad"),
|
|
16085
|
+
pcb_group_id: z71.string().optional(),
|
|
16086
|
+
subcircuit_id: z71.string().optional(),
|
|
16087
|
+
hole_shape: z71.literal("pill"),
|
|
16088
|
+
pad_shape: z71.literal("rect"),
|
|
16089
|
+
hole_width: z71.number(),
|
|
16090
|
+
hole_height: z71.number(),
|
|
16091
|
+
rect_pad_width: z71.number(),
|
|
16092
|
+
rect_pad_height: z71.number(),
|
|
16093
|
+
rect_border_radius: z71.number().optional(),
|
|
16064
16094
|
hole_offset_x: distance.default(0),
|
|
16065
16095
|
hole_offset_y: distance.default(0),
|
|
16066
16096
|
x: distance,
|
|
16067
16097
|
y: distance,
|
|
16068
|
-
layers:
|
|
16069
|
-
port_hints:
|
|
16070
|
-
pcb_component_id:
|
|
16071
|
-
pcb_port_id:
|
|
16098
|
+
layers: z71.array(layer_ref),
|
|
16099
|
+
port_hints: z71.array(z71.string()).optional(),
|
|
16100
|
+
pcb_component_id: z71.string().optional(),
|
|
16101
|
+
pcb_port_id: z71.string().optional(),
|
|
16072
16102
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16073
16103
|
});
|
|
16074
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
16075
|
-
type:
|
|
16076
|
-
shape:
|
|
16077
|
-
pcb_group_id:
|
|
16078
|
-
subcircuit_id:
|
|
16079
|
-
hole_shape:
|
|
16080
|
-
pad_shape:
|
|
16081
|
-
hole_width:
|
|
16082
|
-
hole_height:
|
|
16104
|
+
var pcb_rotated_pill_hole_with_rect_pad = z71.object({
|
|
16105
|
+
type: z71.literal("pcb_plated_hole"),
|
|
16106
|
+
shape: z71.literal("rotated_pill_hole_with_rect_pad"),
|
|
16107
|
+
pcb_group_id: z71.string().optional(),
|
|
16108
|
+
subcircuit_id: z71.string().optional(),
|
|
16109
|
+
hole_shape: z71.literal("rotated_pill"),
|
|
16110
|
+
pad_shape: z71.literal("rect"),
|
|
16111
|
+
hole_width: z71.number(),
|
|
16112
|
+
hole_height: z71.number(),
|
|
16083
16113
|
hole_ccw_rotation: rotation,
|
|
16084
|
-
rect_pad_width:
|
|
16085
|
-
rect_pad_height:
|
|
16086
|
-
rect_border_radius:
|
|
16114
|
+
rect_pad_width: z71.number(),
|
|
16115
|
+
rect_pad_height: z71.number(),
|
|
16116
|
+
rect_border_radius: z71.number().optional(),
|
|
16087
16117
|
rect_ccw_rotation: rotation,
|
|
16088
16118
|
hole_offset_x: distance.default(0),
|
|
16089
16119
|
hole_offset_y: distance.default(0),
|
|
16090
16120
|
x: distance,
|
|
16091
16121
|
y: distance,
|
|
16092
|
-
layers:
|
|
16093
|
-
port_hints:
|
|
16094
|
-
pcb_component_id:
|
|
16095
|
-
pcb_port_id:
|
|
16122
|
+
layers: z71.array(layer_ref),
|
|
16123
|
+
port_hints: z71.array(z71.string()).optional(),
|
|
16124
|
+
pcb_component_id: z71.string().optional(),
|
|
16125
|
+
pcb_port_id: z71.string().optional(),
|
|
16096
16126
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16097
16127
|
});
|
|
16098
|
-
var pcb_plated_hole =
|
|
16128
|
+
var pcb_plated_hole = z71.union([
|
|
16099
16129
|
pcb_plated_hole_circle,
|
|
16100
16130
|
pcb_plated_hole_oval,
|
|
16101
16131
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -16109,118 +16139,120 @@ expectTypesMatch(true);
|
|
|
16109
16139
|
expectTypesMatch(true);
|
|
16110
16140
|
expectTypesMatch(true);
|
|
16111
16141
|
expectTypesMatch(true);
|
|
16112
|
-
var pcb_port =
|
|
16113
|
-
type:
|
|
16142
|
+
var pcb_port = z72.object({
|
|
16143
|
+
type: z72.literal("pcb_port"),
|
|
16114
16144
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
16115
|
-
pcb_group_id:
|
|
16116
|
-
subcircuit_id:
|
|
16117
|
-
source_port_id:
|
|
16118
|
-
pcb_component_id:
|
|
16145
|
+
pcb_group_id: z72.string().optional(),
|
|
16146
|
+
subcircuit_id: z72.string().optional(),
|
|
16147
|
+
source_port_id: z72.string(),
|
|
16148
|
+
pcb_component_id: z72.string().optional(),
|
|
16119
16149
|
x: distance,
|
|
16120
16150
|
y: distance,
|
|
16121
|
-
layers:
|
|
16122
|
-
is_board_pinout:
|
|
16151
|
+
layers: z72.array(layer_ref),
|
|
16152
|
+
is_board_pinout: z72.boolean().optional()
|
|
16123
16153
|
}).describe("Defines a port on the PCB");
|
|
16124
16154
|
expectTypesMatch(true);
|
|
16125
|
-
var pcb_smtpad_circle =
|
|
16126
|
-
type:
|
|
16127
|
-
shape:
|
|
16155
|
+
var pcb_smtpad_circle = z73.object({
|
|
16156
|
+
type: z73.literal("pcb_smtpad"),
|
|
16157
|
+
shape: z73.literal("circle"),
|
|
16128
16158
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16129
|
-
pcb_group_id:
|
|
16130
|
-
subcircuit_id:
|
|
16159
|
+
pcb_group_id: z73.string().optional(),
|
|
16160
|
+
subcircuit_id: z73.string().optional(),
|
|
16131
16161
|
x: distance,
|
|
16132
16162
|
y: distance,
|
|
16133
|
-
radius:
|
|
16163
|
+
radius: z73.number(),
|
|
16134
16164
|
layer: layer_ref,
|
|
16135
|
-
port_hints:
|
|
16136
|
-
pcb_component_id:
|
|
16137
|
-
pcb_port_id:
|
|
16138
|
-
is_covered_with_solder_mask:
|
|
16139
|
-
});
|
|
16140
|
-
var pcb_smtpad_rect =
|
|
16141
|
-
type:
|
|
16142
|
-
shape:
|
|
16165
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16166
|
+
pcb_component_id: z73.string().optional(),
|
|
16167
|
+
pcb_port_id: z73.string().optional(),
|
|
16168
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
16169
|
+
});
|
|
16170
|
+
var pcb_smtpad_rect = z73.object({
|
|
16171
|
+
type: z73.literal("pcb_smtpad"),
|
|
16172
|
+
shape: z73.literal("rect"),
|
|
16143
16173
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16144
|
-
pcb_group_id:
|
|
16145
|
-
subcircuit_id:
|
|
16174
|
+
pcb_group_id: z73.string().optional(),
|
|
16175
|
+
subcircuit_id: z73.string().optional(),
|
|
16146
16176
|
x: distance,
|
|
16147
16177
|
y: distance,
|
|
16148
|
-
width:
|
|
16149
|
-
height:
|
|
16150
|
-
rect_border_radius:
|
|
16178
|
+
width: z73.number(),
|
|
16179
|
+
height: z73.number(),
|
|
16180
|
+
rect_border_radius: z73.number().optional(),
|
|
16181
|
+
corner_radius: z73.number().optional(),
|
|
16151
16182
|
layer: layer_ref,
|
|
16152
|
-
port_hints:
|
|
16153
|
-
pcb_component_id:
|
|
16154
|
-
pcb_port_id:
|
|
16155
|
-
is_covered_with_solder_mask:
|
|
16156
|
-
});
|
|
16157
|
-
var pcb_smtpad_rotated_rect =
|
|
16158
|
-
type:
|
|
16159
|
-
shape:
|
|
16183
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16184
|
+
pcb_component_id: z73.string().optional(),
|
|
16185
|
+
pcb_port_id: z73.string().optional(),
|
|
16186
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
16187
|
+
});
|
|
16188
|
+
var pcb_smtpad_rotated_rect = z73.object({
|
|
16189
|
+
type: z73.literal("pcb_smtpad"),
|
|
16190
|
+
shape: z73.literal("rotated_rect"),
|
|
16160
16191
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16161
|
-
pcb_group_id:
|
|
16162
|
-
subcircuit_id:
|
|
16192
|
+
pcb_group_id: z73.string().optional(),
|
|
16193
|
+
subcircuit_id: z73.string().optional(),
|
|
16163
16194
|
x: distance,
|
|
16164
16195
|
y: distance,
|
|
16165
|
-
width:
|
|
16166
|
-
height:
|
|
16167
|
-
rect_border_radius:
|
|
16196
|
+
width: z73.number(),
|
|
16197
|
+
height: z73.number(),
|
|
16198
|
+
rect_border_radius: z73.number().optional(),
|
|
16199
|
+
corner_radius: z73.number().optional(),
|
|
16168
16200
|
ccw_rotation: rotation,
|
|
16169
16201
|
layer: layer_ref,
|
|
16170
|
-
port_hints:
|
|
16171
|
-
pcb_component_id:
|
|
16172
|
-
pcb_port_id:
|
|
16173
|
-
is_covered_with_solder_mask:
|
|
16174
|
-
});
|
|
16175
|
-
var pcb_smtpad_pill =
|
|
16176
|
-
type:
|
|
16177
|
-
shape:
|
|
16202
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16203
|
+
pcb_component_id: z73.string().optional(),
|
|
16204
|
+
pcb_port_id: z73.string().optional(),
|
|
16205
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
16206
|
+
});
|
|
16207
|
+
var pcb_smtpad_pill = z73.object({
|
|
16208
|
+
type: z73.literal("pcb_smtpad"),
|
|
16209
|
+
shape: z73.literal("pill"),
|
|
16178
16210
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16179
|
-
pcb_group_id:
|
|
16180
|
-
subcircuit_id:
|
|
16211
|
+
pcb_group_id: z73.string().optional(),
|
|
16212
|
+
subcircuit_id: z73.string().optional(),
|
|
16181
16213
|
x: distance,
|
|
16182
16214
|
y: distance,
|
|
16183
|
-
width:
|
|
16184
|
-
height:
|
|
16185
|
-
radius:
|
|
16215
|
+
width: z73.number(),
|
|
16216
|
+
height: z73.number(),
|
|
16217
|
+
radius: z73.number(),
|
|
16186
16218
|
layer: layer_ref,
|
|
16187
|
-
port_hints:
|
|
16188
|
-
pcb_component_id:
|
|
16189
|
-
pcb_port_id:
|
|
16190
|
-
is_covered_with_solder_mask:
|
|
16191
|
-
});
|
|
16192
|
-
var pcb_smtpad_rotated_pill =
|
|
16193
|
-
type:
|
|
16194
|
-
shape:
|
|
16219
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16220
|
+
pcb_component_id: z73.string().optional(),
|
|
16221
|
+
pcb_port_id: z73.string().optional(),
|
|
16222
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
16223
|
+
});
|
|
16224
|
+
var pcb_smtpad_rotated_pill = z73.object({
|
|
16225
|
+
type: z73.literal("pcb_smtpad"),
|
|
16226
|
+
shape: z73.literal("rotated_pill"),
|
|
16195
16227
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16196
|
-
pcb_group_id:
|
|
16197
|
-
subcircuit_id:
|
|
16228
|
+
pcb_group_id: z73.string().optional(),
|
|
16229
|
+
subcircuit_id: z73.string().optional(),
|
|
16198
16230
|
x: distance,
|
|
16199
16231
|
y: distance,
|
|
16200
|
-
width:
|
|
16201
|
-
height:
|
|
16202
|
-
radius:
|
|
16232
|
+
width: z73.number(),
|
|
16233
|
+
height: z73.number(),
|
|
16234
|
+
radius: z73.number(),
|
|
16203
16235
|
ccw_rotation: rotation,
|
|
16204
16236
|
layer: layer_ref,
|
|
16205
|
-
port_hints:
|
|
16206
|
-
pcb_component_id:
|
|
16207
|
-
pcb_port_id:
|
|
16208
|
-
is_covered_with_solder_mask:
|
|
16209
|
-
});
|
|
16210
|
-
var pcb_smtpad_polygon =
|
|
16211
|
-
type:
|
|
16212
|
-
shape:
|
|
16237
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16238
|
+
pcb_component_id: z73.string().optional(),
|
|
16239
|
+
pcb_port_id: z73.string().optional(),
|
|
16240
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
16241
|
+
});
|
|
16242
|
+
var pcb_smtpad_polygon = z73.object({
|
|
16243
|
+
type: z73.literal("pcb_smtpad"),
|
|
16244
|
+
shape: z73.literal("polygon"),
|
|
16213
16245
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16214
|
-
pcb_group_id:
|
|
16215
|
-
subcircuit_id:
|
|
16216
|
-
points:
|
|
16246
|
+
pcb_group_id: z73.string().optional(),
|
|
16247
|
+
subcircuit_id: z73.string().optional(),
|
|
16248
|
+
points: z73.array(point),
|
|
16217
16249
|
layer: layer_ref,
|
|
16218
|
-
port_hints:
|
|
16219
|
-
pcb_component_id:
|
|
16220
|
-
pcb_port_id:
|
|
16221
|
-
is_covered_with_solder_mask:
|
|
16250
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16251
|
+
pcb_component_id: z73.string().optional(),
|
|
16252
|
+
pcb_port_id: z73.string().optional(),
|
|
16253
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
16222
16254
|
});
|
|
16223
|
-
var pcb_smtpad =
|
|
16255
|
+
var pcb_smtpad = z73.discriminatedUnion("shape", [
|
|
16224
16256
|
pcb_smtpad_circle,
|
|
16225
16257
|
pcb_smtpad_rect,
|
|
16226
16258
|
pcb_smtpad_rotated_rect,
|
|
@@ -16234,78 +16266,78 @@ expectTypesMatch(true);
|
|
|
16234
16266
|
expectTypesMatch(true);
|
|
16235
16267
|
expectTypesMatch(true);
|
|
16236
16268
|
expectTypesMatch(true);
|
|
16237
|
-
var pcb_solder_paste_circle =
|
|
16238
|
-
type:
|
|
16239
|
-
shape:
|
|
16269
|
+
var pcb_solder_paste_circle = z74.object({
|
|
16270
|
+
type: z74.literal("pcb_solder_paste"),
|
|
16271
|
+
shape: z74.literal("circle"),
|
|
16240
16272
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16241
|
-
pcb_group_id:
|
|
16242
|
-
subcircuit_id:
|
|
16273
|
+
pcb_group_id: z74.string().optional(),
|
|
16274
|
+
subcircuit_id: z74.string().optional(),
|
|
16243
16275
|
x: distance,
|
|
16244
16276
|
y: distance,
|
|
16245
|
-
radius:
|
|
16277
|
+
radius: z74.number(),
|
|
16246
16278
|
layer: layer_ref,
|
|
16247
|
-
pcb_component_id:
|
|
16248
|
-
pcb_smtpad_id:
|
|
16279
|
+
pcb_component_id: z74.string().optional(),
|
|
16280
|
+
pcb_smtpad_id: z74.string().optional()
|
|
16249
16281
|
});
|
|
16250
|
-
var pcb_solder_paste_rect =
|
|
16251
|
-
type:
|
|
16252
|
-
shape:
|
|
16282
|
+
var pcb_solder_paste_rect = z74.object({
|
|
16283
|
+
type: z74.literal("pcb_solder_paste"),
|
|
16284
|
+
shape: z74.literal("rect"),
|
|
16253
16285
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16254
|
-
pcb_group_id:
|
|
16255
|
-
subcircuit_id:
|
|
16286
|
+
pcb_group_id: z74.string().optional(),
|
|
16287
|
+
subcircuit_id: z74.string().optional(),
|
|
16256
16288
|
x: distance,
|
|
16257
16289
|
y: distance,
|
|
16258
|
-
width:
|
|
16259
|
-
height:
|
|
16290
|
+
width: z74.number(),
|
|
16291
|
+
height: z74.number(),
|
|
16260
16292
|
layer: layer_ref,
|
|
16261
|
-
pcb_component_id:
|
|
16262
|
-
pcb_smtpad_id:
|
|
16293
|
+
pcb_component_id: z74.string().optional(),
|
|
16294
|
+
pcb_smtpad_id: z74.string().optional()
|
|
16263
16295
|
});
|
|
16264
|
-
var pcb_solder_paste_pill =
|
|
16265
|
-
type:
|
|
16266
|
-
shape:
|
|
16296
|
+
var pcb_solder_paste_pill = z74.object({
|
|
16297
|
+
type: z74.literal("pcb_solder_paste"),
|
|
16298
|
+
shape: z74.literal("pill"),
|
|
16267
16299
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16268
|
-
pcb_group_id:
|
|
16269
|
-
subcircuit_id:
|
|
16300
|
+
pcb_group_id: z74.string().optional(),
|
|
16301
|
+
subcircuit_id: z74.string().optional(),
|
|
16270
16302
|
x: distance,
|
|
16271
16303
|
y: distance,
|
|
16272
|
-
width:
|
|
16273
|
-
height:
|
|
16274
|
-
radius:
|
|
16304
|
+
width: z74.number(),
|
|
16305
|
+
height: z74.number(),
|
|
16306
|
+
radius: z74.number(),
|
|
16275
16307
|
layer: layer_ref,
|
|
16276
|
-
pcb_component_id:
|
|
16277
|
-
pcb_smtpad_id:
|
|
16308
|
+
pcb_component_id: z74.string().optional(),
|
|
16309
|
+
pcb_smtpad_id: z74.string().optional()
|
|
16278
16310
|
});
|
|
16279
|
-
var pcb_solder_paste_rotated_rect =
|
|
16280
|
-
type:
|
|
16281
|
-
shape:
|
|
16311
|
+
var pcb_solder_paste_rotated_rect = z74.object({
|
|
16312
|
+
type: z74.literal("pcb_solder_paste"),
|
|
16313
|
+
shape: z74.literal("rotated_rect"),
|
|
16282
16314
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16283
|
-
pcb_group_id:
|
|
16284
|
-
subcircuit_id:
|
|
16315
|
+
pcb_group_id: z74.string().optional(),
|
|
16316
|
+
subcircuit_id: z74.string().optional(),
|
|
16285
16317
|
x: distance,
|
|
16286
16318
|
y: distance,
|
|
16287
|
-
width:
|
|
16288
|
-
height:
|
|
16319
|
+
width: z74.number(),
|
|
16320
|
+
height: z74.number(),
|
|
16289
16321
|
ccw_rotation: distance,
|
|
16290
16322
|
layer: layer_ref,
|
|
16291
|
-
pcb_component_id:
|
|
16292
|
-
pcb_smtpad_id:
|
|
16323
|
+
pcb_component_id: z74.string().optional(),
|
|
16324
|
+
pcb_smtpad_id: z74.string().optional()
|
|
16293
16325
|
});
|
|
16294
|
-
var pcb_solder_paste_oval =
|
|
16295
|
-
type:
|
|
16296
|
-
shape:
|
|
16326
|
+
var pcb_solder_paste_oval = z74.object({
|
|
16327
|
+
type: z74.literal("pcb_solder_paste"),
|
|
16328
|
+
shape: z74.literal("oval"),
|
|
16297
16329
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16298
|
-
pcb_group_id:
|
|
16299
|
-
subcircuit_id:
|
|
16330
|
+
pcb_group_id: z74.string().optional(),
|
|
16331
|
+
subcircuit_id: z74.string().optional(),
|
|
16300
16332
|
x: distance,
|
|
16301
16333
|
y: distance,
|
|
16302
|
-
width:
|
|
16303
|
-
height:
|
|
16334
|
+
width: z74.number(),
|
|
16335
|
+
height: z74.number(),
|
|
16304
16336
|
layer: layer_ref,
|
|
16305
|
-
pcb_component_id:
|
|
16306
|
-
pcb_smtpad_id:
|
|
16337
|
+
pcb_component_id: z74.string().optional(),
|
|
16338
|
+
pcb_smtpad_id: z74.string().optional()
|
|
16307
16339
|
});
|
|
16308
|
-
var pcb_solder_paste =
|
|
16340
|
+
var pcb_solder_paste = z74.union([
|
|
16309
16341
|
pcb_solder_paste_circle,
|
|
16310
16342
|
pcb_solder_paste_rect,
|
|
16311
16343
|
pcb_solder_paste_pill,
|
|
@@ -16319,123 +16351,123 @@ expectTypesMatch(
|
|
|
16319
16351
|
true
|
|
16320
16352
|
);
|
|
16321
16353
|
expectTypesMatch(true);
|
|
16322
|
-
var pcb_text =
|
|
16323
|
-
type:
|
|
16354
|
+
var pcb_text = z75.object({
|
|
16355
|
+
type: z75.literal("pcb_text"),
|
|
16324
16356
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
16325
|
-
pcb_group_id:
|
|
16326
|
-
subcircuit_id:
|
|
16327
|
-
text:
|
|
16357
|
+
pcb_group_id: z75.string().optional(),
|
|
16358
|
+
subcircuit_id: z75.string().optional(),
|
|
16359
|
+
text: z75.string(),
|
|
16328
16360
|
center: point,
|
|
16329
16361
|
layer: layer_ref,
|
|
16330
16362
|
width: length,
|
|
16331
16363
|
height: length,
|
|
16332
|
-
lines:
|
|
16364
|
+
lines: z75.number(),
|
|
16333
16365
|
// @ts-ignore
|
|
16334
|
-
align:
|
|
16366
|
+
align: z75.enum(["bottom-left"])
|
|
16335
16367
|
}).describe("Defines text on the PCB");
|
|
16336
16368
|
expectTypesMatch(true);
|
|
16337
|
-
var pcb_trace_route_point_wire =
|
|
16338
|
-
route_type:
|
|
16369
|
+
var pcb_trace_route_point_wire = z76.object({
|
|
16370
|
+
route_type: z76.literal("wire"),
|
|
16339
16371
|
x: distance,
|
|
16340
16372
|
y: distance,
|
|
16341
16373
|
width: distance,
|
|
16342
|
-
start_pcb_port_id:
|
|
16343
|
-
end_pcb_port_id:
|
|
16374
|
+
start_pcb_port_id: z76.string().optional(),
|
|
16375
|
+
end_pcb_port_id: z76.string().optional(),
|
|
16344
16376
|
layer: layer_ref
|
|
16345
16377
|
});
|
|
16346
|
-
var pcb_trace_route_point_via =
|
|
16347
|
-
route_type:
|
|
16378
|
+
var pcb_trace_route_point_via = z76.object({
|
|
16379
|
+
route_type: z76.literal("via"),
|
|
16348
16380
|
x: distance,
|
|
16349
16381
|
y: distance,
|
|
16350
16382
|
hole_diameter: distance.optional(),
|
|
16351
16383
|
outer_diameter: distance.optional(),
|
|
16352
|
-
from_layer:
|
|
16353
|
-
to_layer:
|
|
16384
|
+
from_layer: z76.string(),
|
|
16385
|
+
to_layer: z76.string()
|
|
16354
16386
|
});
|
|
16355
|
-
var pcb_trace_route_point =
|
|
16387
|
+
var pcb_trace_route_point = z76.union([
|
|
16356
16388
|
pcb_trace_route_point_wire,
|
|
16357
16389
|
pcb_trace_route_point_via
|
|
16358
16390
|
]);
|
|
16359
|
-
var pcb_trace =
|
|
16360
|
-
type:
|
|
16361
|
-
source_trace_id:
|
|
16362
|
-
pcb_component_id:
|
|
16391
|
+
var pcb_trace = z76.object({
|
|
16392
|
+
type: z76.literal("pcb_trace"),
|
|
16393
|
+
source_trace_id: z76.string().optional(),
|
|
16394
|
+
pcb_component_id: z76.string().optional(),
|
|
16363
16395
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
16364
|
-
pcb_group_id:
|
|
16365
|
-
subcircuit_id:
|
|
16366
|
-
route_thickness_mode:
|
|
16367
|
-
route_order_index:
|
|
16368
|
-
should_round_corners:
|
|
16369
|
-
trace_length:
|
|
16370
|
-
highlight_color:
|
|
16371
|
-
route:
|
|
16396
|
+
pcb_group_id: z76.string().optional(),
|
|
16397
|
+
subcircuit_id: z76.string().optional(),
|
|
16398
|
+
route_thickness_mode: z76.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
16399
|
+
route_order_index: z76.number().optional(),
|
|
16400
|
+
should_round_corners: z76.boolean().optional(),
|
|
16401
|
+
trace_length: z76.number().optional(),
|
|
16402
|
+
highlight_color: z76.string().optional(),
|
|
16403
|
+
route: z76.array(pcb_trace_route_point)
|
|
16372
16404
|
}).describe("Defines a trace on the PCB");
|
|
16373
16405
|
expectTypesMatch(true);
|
|
16374
16406
|
expectTypesMatch(true);
|
|
16375
|
-
var pcb_trace_error =
|
|
16376
|
-
type:
|
|
16407
|
+
var pcb_trace_error = z77.object({
|
|
16408
|
+
type: z77.literal("pcb_trace_error"),
|
|
16377
16409
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
16378
|
-
error_type:
|
|
16379
|
-
message:
|
|
16410
|
+
error_type: z77.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
16411
|
+
message: z77.string(),
|
|
16380
16412
|
center: point.optional(),
|
|
16381
|
-
pcb_trace_id:
|
|
16382
|
-
source_trace_id:
|
|
16383
|
-
pcb_component_ids:
|
|
16384
|
-
pcb_port_ids:
|
|
16385
|
-
subcircuit_id:
|
|
16413
|
+
pcb_trace_id: z77.string(),
|
|
16414
|
+
source_trace_id: z77.string(),
|
|
16415
|
+
pcb_component_ids: z77.array(z77.string()),
|
|
16416
|
+
pcb_port_ids: z77.array(z77.string()),
|
|
16417
|
+
subcircuit_id: z77.string().optional()
|
|
16386
16418
|
}).describe("Defines a trace error on the PCB");
|
|
16387
16419
|
expectTypesMatch(true);
|
|
16388
|
-
var pcb_trace_missing_error =
|
|
16389
|
-
type:
|
|
16420
|
+
var pcb_trace_missing_error = z78.object({
|
|
16421
|
+
type: z78.literal("pcb_trace_missing_error"),
|
|
16390
16422
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
16391
16423
|
"pcb_trace_missing_error"
|
|
16392
16424
|
),
|
|
16393
|
-
error_type:
|
|
16394
|
-
message:
|
|
16425
|
+
error_type: z78.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
16426
|
+
message: z78.string(),
|
|
16395
16427
|
center: point.optional(),
|
|
16396
|
-
source_trace_id:
|
|
16397
|
-
pcb_component_ids:
|
|
16398
|
-
pcb_port_ids:
|
|
16399
|
-
subcircuit_id:
|
|
16428
|
+
source_trace_id: z78.string(),
|
|
16429
|
+
pcb_component_ids: z78.array(z78.string()),
|
|
16430
|
+
pcb_port_ids: z78.array(z78.string()),
|
|
16431
|
+
subcircuit_id: z78.string().optional()
|
|
16400
16432
|
}).describe(
|
|
16401
16433
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
16402
16434
|
);
|
|
16403
16435
|
expectTypesMatch(true);
|
|
16404
|
-
var pcb_port_not_matched_error =
|
|
16405
|
-
type:
|
|
16436
|
+
var pcb_port_not_matched_error = z79.object({
|
|
16437
|
+
type: z79.literal("pcb_port_not_matched_error"),
|
|
16406
16438
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
16407
|
-
error_type:
|
|
16408
|
-
message:
|
|
16409
|
-
pcb_component_ids:
|
|
16410
|
-
subcircuit_id:
|
|
16439
|
+
error_type: z79.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
16440
|
+
message: z79.string(),
|
|
16441
|
+
pcb_component_ids: z79.array(z79.string()),
|
|
16442
|
+
subcircuit_id: z79.string().optional()
|
|
16411
16443
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
16412
16444
|
expectTypesMatch(true);
|
|
16413
|
-
var pcb_port_not_connected_error =
|
|
16414
|
-
type:
|
|
16445
|
+
var pcb_port_not_connected_error = z80.object({
|
|
16446
|
+
type: z80.literal("pcb_port_not_connected_error"),
|
|
16415
16447
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
16416
16448
|
"pcb_port_not_connected_error"
|
|
16417
16449
|
),
|
|
16418
|
-
error_type:
|
|
16419
|
-
message:
|
|
16420
|
-
pcb_port_ids:
|
|
16421
|
-
pcb_component_ids:
|
|
16422
|
-
subcircuit_id:
|
|
16450
|
+
error_type: z80.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
16451
|
+
message: z80.string(),
|
|
16452
|
+
pcb_port_ids: z80.array(z80.string()),
|
|
16453
|
+
pcb_component_ids: z80.array(z80.string()),
|
|
16454
|
+
subcircuit_id: z80.string().optional()
|
|
16423
16455
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
16424
16456
|
expectTypesMatch(
|
|
16425
16457
|
true
|
|
16426
16458
|
);
|
|
16427
|
-
var pcb_net =
|
|
16428
|
-
type:
|
|
16459
|
+
var pcb_net = z81.object({
|
|
16460
|
+
type: z81.literal("pcb_net"),
|
|
16429
16461
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
16430
|
-
source_net_id:
|
|
16431
|
-
highlight_color:
|
|
16462
|
+
source_net_id: z81.string().optional(),
|
|
16463
|
+
highlight_color: z81.string().optional()
|
|
16432
16464
|
}).describe("Defines a net on the PCB");
|
|
16433
16465
|
expectTypesMatch(true);
|
|
16434
|
-
var pcb_via =
|
|
16435
|
-
type:
|
|
16466
|
+
var pcb_via = z82.object({
|
|
16467
|
+
type: z82.literal("pcb_via"),
|
|
16436
16468
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
16437
|
-
pcb_group_id:
|
|
16438
|
-
subcircuit_id:
|
|
16469
|
+
pcb_group_id: z82.string().optional(),
|
|
16470
|
+
subcircuit_id: z82.string().optional(),
|
|
16439
16471
|
x: distance,
|
|
16440
16472
|
y: distance,
|
|
16441
16473
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -16444,47 +16476,58 @@ var pcb_via = z80.object({
|
|
|
16444
16476
|
from_layer: layer_ref.optional(),
|
|
16445
16477
|
/** @deprecated */
|
|
16446
16478
|
to_layer: layer_ref.optional(),
|
|
16447
|
-
layers:
|
|
16448
|
-
pcb_trace_id:
|
|
16479
|
+
layers: z82.array(layer_ref),
|
|
16480
|
+
pcb_trace_id: z82.string().optional(),
|
|
16481
|
+
net_is_assignable: z82.boolean().optional(),
|
|
16482
|
+
net_assigned: z82.boolean().optional()
|
|
16449
16483
|
}).describe("Defines a via on the PCB");
|
|
16450
16484
|
expectTypesMatch(true);
|
|
16451
|
-
var pcb_board =
|
|
16452
|
-
type:
|
|
16485
|
+
var pcb_board = z83.object({
|
|
16486
|
+
type: z83.literal("pcb_board"),
|
|
16453
16487
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
16454
|
-
|
|
16455
|
-
|
|
16488
|
+
pcb_panel_id: z83.string().optional(),
|
|
16489
|
+
is_subcircuit: z83.boolean().optional(),
|
|
16490
|
+
subcircuit_id: z83.string().optional(),
|
|
16456
16491
|
width: length,
|
|
16457
16492
|
height: length,
|
|
16458
16493
|
center: point,
|
|
16459
16494
|
thickness: length.optional().default(1.4),
|
|
16460
|
-
num_layers:
|
|
16461
|
-
outline:
|
|
16462
|
-
material:
|
|
16495
|
+
num_layers: z83.number().optional().default(4),
|
|
16496
|
+
outline: z83.array(point).optional(),
|
|
16497
|
+
material: z83.enum(["fr4", "fr1"]).default("fr4")
|
|
16463
16498
|
}).describe("Defines the board outline of the PCB");
|
|
16464
16499
|
expectTypesMatch(true);
|
|
16465
|
-
var
|
|
16466
|
-
type:
|
|
16500
|
+
var pcb_panel = z84.object({
|
|
16501
|
+
type: z84.literal("pcb_panel"),
|
|
16502
|
+
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
16503
|
+
width: length,
|
|
16504
|
+
height: length,
|
|
16505
|
+
covered_with_solder_mask: z84.boolean().optional().default(true)
|
|
16506
|
+
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
16507
|
+
expectTypesMatch(true);
|
|
16508
|
+
var pcb_placement_error = z85.object({
|
|
16509
|
+
type: z85.literal("pcb_placement_error"),
|
|
16467
16510
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
16468
|
-
error_type:
|
|
16469
|
-
message:
|
|
16470
|
-
subcircuit_id:
|
|
16511
|
+
error_type: z85.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
16512
|
+
message: z85.string(),
|
|
16513
|
+
subcircuit_id: z85.string().optional()
|
|
16471
16514
|
}).describe("Defines a placement error on the PCB");
|
|
16472
16515
|
expectTypesMatch(true);
|
|
16473
|
-
var pcb_trace_hint =
|
|
16474
|
-
type:
|
|
16516
|
+
var pcb_trace_hint = z86.object({
|
|
16517
|
+
type: z86.literal("pcb_trace_hint"),
|
|
16475
16518
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
16476
|
-
pcb_port_id:
|
|
16477
|
-
pcb_component_id:
|
|
16478
|
-
route:
|
|
16479
|
-
subcircuit_id:
|
|
16519
|
+
pcb_port_id: z86.string(),
|
|
16520
|
+
pcb_component_id: z86.string(),
|
|
16521
|
+
route: z86.array(route_hint_point),
|
|
16522
|
+
subcircuit_id: z86.string().optional()
|
|
16480
16523
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
16481
16524
|
expectTypesMatch(true);
|
|
16482
|
-
var pcb_silkscreen_line =
|
|
16483
|
-
type:
|
|
16525
|
+
var pcb_silkscreen_line = z87.object({
|
|
16526
|
+
type: z87.literal("pcb_silkscreen_line"),
|
|
16484
16527
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
16485
|
-
pcb_component_id:
|
|
16486
|
-
pcb_group_id:
|
|
16487
|
-
subcircuit_id:
|
|
16528
|
+
pcb_component_id: z87.string(),
|
|
16529
|
+
pcb_group_id: z87.string().optional(),
|
|
16530
|
+
subcircuit_id: z87.string().optional(),
|
|
16488
16531
|
stroke_width: distance.default("0.1mm"),
|
|
16489
16532
|
x1: distance,
|
|
16490
16533
|
y1: distance,
|
|
@@ -16493,28 +16536,28 @@ var pcb_silkscreen_line = z84.object({
|
|
|
16493
16536
|
layer: visible_layer
|
|
16494
16537
|
}).describe("Defines a silkscreen line on the PCB");
|
|
16495
16538
|
expectTypesMatch(true);
|
|
16496
|
-
var pcb_silkscreen_path =
|
|
16497
|
-
type:
|
|
16539
|
+
var pcb_silkscreen_path = z88.object({
|
|
16540
|
+
type: z88.literal("pcb_silkscreen_path"),
|
|
16498
16541
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
16499
|
-
pcb_component_id:
|
|
16500
|
-
pcb_group_id:
|
|
16501
|
-
subcircuit_id:
|
|
16542
|
+
pcb_component_id: z88.string(),
|
|
16543
|
+
pcb_group_id: z88.string().optional(),
|
|
16544
|
+
subcircuit_id: z88.string().optional(),
|
|
16502
16545
|
layer: visible_layer,
|
|
16503
|
-
route:
|
|
16546
|
+
route: z88.array(point),
|
|
16504
16547
|
stroke_width: length
|
|
16505
16548
|
}).describe("Defines a silkscreen path on the PCB");
|
|
16506
16549
|
expectTypesMatch(true);
|
|
16507
|
-
var pcb_silkscreen_text =
|
|
16508
|
-
type:
|
|
16550
|
+
var pcb_silkscreen_text = z89.object({
|
|
16551
|
+
type: z89.literal("pcb_silkscreen_text"),
|
|
16509
16552
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
16510
|
-
pcb_group_id:
|
|
16511
|
-
subcircuit_id:
|
|
16512
|
-
font:
|
|
16553
|
+
pcb_group_id: z89.string().optional(),
|
|
16554
|
+
subcircuit_id: z89.string().optional(),
|
|
16555
|
+
font: z89.literal("tscircuit2024").default("tscircuit2024"),
|
|
16513
16556
|
font_size: distance.default("0.2mm"),
|
|
16514
|
-
pcb_component_id:
|
|
16515
|
-
text:
|
|
16516
|
-
is_knockout:
|
|
16517
|
-
knockout_padding:
|
|
16557
|
+
pcb_component_id: z89.string(),
|
|
16558
|
+
text: z89.string(),
|
|
16559
|
+
is_knockout: z89.boolean().default(false).optional(),
|
|
16560
|
+
knockout_padding: z89.object({
|
|
16518
16561
|
left: length,
|
|
16519
16562
|
top: length,
|
|
16520
16563
|
bottom: length,
|
|
@@ -16525,248 +16568,299 @@ var pcb_silkscreen_text = z86.object({
|
|
|
16525
16568
|
bottom: "0.2mm",
|
|
16526
16569
|
right: "0.2mm"
|
|
16527
16570
|
}).optional(),
|
|
16528
|
-
ccw_rotation:
|
|
16571
|
+
ccw_rotation: z89.number().optional(),
|
|
16529
16572
|
layer: layer_ref,
|
|
16530
|
-
is_mirrored:
|
|
16573
|
+
is_mirrored: z89.boolean().default(false).optional(),
|
|
16531
16574
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16532
16575
|
anchor_alignment: ninePointAnchor.default("center")
|
|
16533
16576
|
}).describe("Defines silkscreen text on the PCB");
|
|
16534
16577
|
expectTypesMatch(true);
|
|
16535
|
-
var
|
|
16536
|
-
type:
|
|
16578
|
+
var pcb_copper_text = z90.object({
|
|
16579
|
+
type: z90.literal("pcb_copper_text"),
|
|
16580
|
+
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
16581
|
+
pcb_group_id: z90.string().optional(),
|
|
16582
|
+
subcircuit_id: z90.string().optional(),
|
|
16583
|
+
font: z90.literal("tscircuit2024").default("tscircuit2024"),
|
|
16584
|
+
font_size: distance.default("0.2mm"),
|
|
16585
|
+
pcb_component_id: z90.string(),
|
|
16586
|
+
text: z90.string(),
|
|
16587
|
+
is_knockout: z90.boolean().default(false).optional(),
|
|
16588
|
+
knockout_padding: z90.object({
|
|
16589
|
+
left: length,
|
|
16590
|
+
top: length,
|
|
16591
|
+
bottom: length,
|
|
16592
|
+
right: length
|
|
16593
|
+
}).default({
|
|
16594
|
+
left: "0.2mm",
|
|
16595
|
+
top: "0.2mm",
|
|
16596
|
+
bottom: "0.2mm",
|
|
16597
|
+
right: "0.2mm"
|
|
16598
|
+
}).optional(),
|
|
16599
|
+
ccw_rotation: z90.number().optional(),
|
|
16600
|
+
layer: layer_ref,
|
|
16601
|
+
is_mirrored: z90.boolean().default(false).optional(),
|
|
16602
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16603
|
+
anchor_alignment: ninePointAnchor.default("center")
|
|
16604
|
+
}).describe("Defines copper text on the PCB");
|
|
16605
|
+
expectTypesMatch(true);
|
|
16606
|
+
var pcb_silkscreen_rect = z91.object({
|
|
16607
|
+
type: z91.literal("pcb_silkscreen_rect"),
|
|
16537
16608
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
16538
|
-
pcb_component_id:
|
|
16539
|
-
pcb_group_id:
|
|
16540
|
-
subcircuit_id:
|
|
16609
|
+
pcb_component_id: z91.string(),
|
|
16610
|
+
pcb_group_id: z91.string().optional(),
|
|
16611
|
+
subcircuit_id: z91.string().optional(),
|
|
16541
16612
|
center: point,
|
|
16542
16613
|
width: length,
|
|
16543
16614
|
height: length,
|
|
16544
16615
|
layer: layer_ref,
|
|
16545
16616
|
stroke_width: length.default("1mm"),
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
|
|
16617
|
+
corner_radius: length.optional(),
|
|
16618
|
+
is_filled: z91.boolean().default(true).optional(),
|
|
16619
|
+
has_stroke: z91.boolean().optional(),
|
|
16620
|
+
is_stroke_dashed: z91.boolean().optional()
|
|
16549
16621
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
16550
16622
|
expectTypesMatch(true);
|
|
16551
|
-
var pcb_silkscreen_circle =
|
|
16552
|
-
type:
|
|
16623
|
+
var pcb_silkscreen_circle = z92.object({
|
|
16624
|
+
type: z92.literal("pcb_silkscreen_circle"),
|
|
16553
16625
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
16554
16626
|
"pcb_silkscreen_circle"
|
|
16555
16627
|
),
|
|
16556
|
-
pcb_component_id:
|
|
16557
|
-
pcb_group_id:
|
|
16558
|
-
subcircuit_id:
|
|
16628
|
+
pcb_component_id: z92.string(),
|
|
16629
|
+
pcb_group_id: z92.string().optional(),
|
|
16630
|
+
subcircuit_id: z92.string().optional(),
|
|
16559
16631
|
center: point,
|
|
16560
16632
|
radius: length,
|
|
16561
16633
|
layer: visible_layer,
|
|
16562
16634
|
stroke_width: length.default("1mm")
|
|
16563
16635
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
16564
16636
|
expectTypesMatch(true);
|
|
16565
|
-
var pcb_silkscreen_oval =
|
|
16566
|
-
type:
|
|
16637
|
+
var pcb_silkscreen_oval = z93.object({
|
|
16638
|
+
type: z93.literal("pcb_silkscreen_oval"),
|
|
16567
16639
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
16568
|
-
pcb_component_id:
|
|
16569
|
-
pcb_group_id:
|
|
16570
|
-
subcircuit_id:
|
|
16640
|
+
pcb_component_id: z93.string(),
|
|
16641
|
+
pcb_group_id: z93.string().optional(),
|
|
16642
|
+
subcircuit_id: z93.string().optional(),
|
|
16571
16643
|
center: point,
|
|
16572
16644
|
radius_x: distance,
|
|
16573
16645
|
radius_y: distance,
|
|
16574
16646
|
layer: visible_layer
|
|
16575
16647
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
16576
16648
|
expectTypesMatch(true);
|
|
16577
|
-
var pcb_fabrication_note_text =
|
|
16578
|
-
type:
|
|
16649
|
+
var pcb_fabrication_note_text = z94.object({
|
|
16650
|
+
type: z94.literal("pcb_fabrication_note_text"),
|
|
16579
16651
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
16580
16652
|
"pcb_fabrication_note_text"
|
|
16581
16653
|
),
|
|
16582
|
-
subcircuit_id:
|
|
16583
|
-
pcb_group_id:
|
|
16584
|
-
font:
|
|
16654
|
+
subcircuit_id: z94.string().optional(),
|
|
16655
|
+
pcb_group_id: z94.string().optional(),
|
|
16656
|
+
font: z94.literal("tscircuit2024").default("tscircuit2024"),
|
|
16585
16657
|
font_size: distance.default("1mm"),
|
|
16586
|
-
pcb_component_id:
|
|
16587
|
-
text:
|
|
16658
|
+
pcb_component_id: z94.string(),
|
|
16659
|
+
text: z94.string(),
|
|
16588
16660
|
layer: visible_layer,
|
|
16589
16661
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16590
|
-
anchor_alignment:
|
|
16591
|
-
color:
|
|
16662
|
+
anchor_alignment: z94.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
16663
|
+
color: z94.string().optional()
|
|
16592
16664
|
}).describe(
|
|
16593
16665
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
16594
16666
|
);
|
|
16595
16667
|
expectTypesMatch(true);
|
|
16596
|
-
var pcb_fabrication_note_path =
|
|
16597
|
-
type:
|
|
16668
|
+
var pcb_fabrication_note_path = z95.object({
|
|
16669
|
+
type: z95.literal("pcb_fabrication_note_path"),
|
|
16598
16670
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
16599
16671
|
"pcb_fabrication_note_path"
|
|
16600
16672
|
),
|
|
16601
|
-
pcb_component_id:
|
|
16602
|
-
subcircuit_id:
|
|
16673
|
+
pcb_component_id: z95.string(),
|
|
16674
|
+
subcircuit_id: z95.string().optional(),
|
|
16603
16675
|
layer: layer_ref,
|
|
16604
|
-
route:
|
|
16676
|
+
route: z95.array(point),
|
|
16605
16677
|
stroke_width: length,
|
|
16606
|
-
color:
|
|
16678
|
+
color: z95.string().optional()
|
|
16607
16679
|
}).describe(
|
|
16608
16680
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
16609
16681
|
);
|
|
16610
16682
|
expectTypesMatch(true);
|
|
16611
|
-
var pcb_fabrication_note_rect =
|
|
16612
|
-
type:
|
|
16683
|
+
var pcb_fabrication_note_rect = z96.object({
|
|
16684
|
+
type: z96.literal("pcb_fabrication_note_rect"),
|
|
16613
16685
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
16614
16686
|
"pcb_fabrication_note_rect"
|
|
16615
16687
|
),
|
|
16616
|
-
pcb_component_id:
|
|
16617
|
-
pcb_group_id:
|
|
16618
|
-
subcircuit_id:
|
|
16688
|
+
pcb_component_id: z96.string(),
|
|
16689
|
+
pcb_group_id: z96.string().optional(),
|
|
16690
|
+
subcircuit_id: z96.string().optional(),
|
|
16619
16691
|
center: point,
|
|
16620
16692
|
width: length,
|
|
16621
16693
|
height: length,
|
|
16622
16694
|
layer: visible_layer,
|
|
16623
16695
|
stroke_width: length.default("0.1mm"),
|
|
16624
|
-
|
|
16625
|
-
|
|
16626
|
-
|
|
16627
|
-
|
|
16696
|
+
corner_radius: length.optional(),
|
|
16697
|
+
is_filled: z96.boolean().optional(),
|
|
16698
|
+
has_stroke: z96.boolean().optional(),
|
|
16699
|
+
is_stroke_dashed: z96.boolean().optional(),
|
|
16700
|
+
color: z96.string().optional()
|
|
16628
16701
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
16629
16702
|
expectTypesMatch(true);
|
|
16630
|
-
var pcb_fabrication_note_dimension =
|
|
16631
|
-
type:
|
|
16703
|
+
var pcb_fabrication_note_dimension = z97.object({
|
|
16704
|
+
type: z97.literal("pcb_fabrication_note_dimension"),
|
|
16632
16705
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
16633
16706
|
"pcb_fabrication_note_dimension"
|
|
16634
16707
|
),
|
|
16635
|
-
pcb_component_id:
|
|
16636
|
-
pcb_group_id:
|
|
16637
|
-
subcircuit_id:
|
|
16708
|
+
pcb_component_id: z97.string(),
|
|
16709
|
+
pcb_group_id: z97.string().optional(),
|
|
16710
|
+
subcircuit_id: z97.string().optional(),
|
|
16638
16711
|
layer: visible_layer,
|
|
16639
16712
|
from: point,
|
|
16640
16713
|
to: point,
|
|
16641
|
-
text:
|
|
16714
|
+
text: z97.string().optional(),
|
|
16715
|
+
text_ccw_rotation: z97.number().optional(),
|
|
16642
16716
|
offset: length.optional(),
|
|
16643
|
-
|
|
16717
|
+
offset_distance: length.optional(),
|
|
16718
|
+
offset_direction: z97.object({
|
|
16719
|
+
x: z97.number(),
|
|
16720
|
+
y: z97.number()
|
|
16721
|
+
}).optional(),
|
|
16722
|
+
font: z97.literal("tscircuit2024").default("tscircuit2024"),
|
|
16644
16723
|
font_size: length.default("1mm"),
|
|
16645
|
-
color:
|
|
16724
|
+
color: z97.string().optional(),
|
|
16646
16725
|
arrow_size: length.default("1mm")
|
|
16647
16726
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
16648
16727
|
expectTypesMatch(true);
|
|
16649
|
-
var pcb_note_text =
|
|
16650
|
-
type:
|
|
16728
|
+
var pcb_note_text = z98.object({
|
|
16729
|
+
type: z98.literal("pcb_note_text"),
|
|
16651
16730
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
16652
|
-
pcb_component_id:
|
|
16653
|
-
pcb_group_id:
|
|
16654
|
-
subcircuit_id:
|
|
16655
|
-
|
|
16731
|
+
pcb_component_id: z98.string().optional(),
|
|
16732
|
+
pcb_group_id: z98.string().optional(),
|
|
16733
|
+
subcircuit_id: z98.string().optional(),
|
|
16734
|
+
name: z98.string().optional(),
|
|
16735
|
+
font: z98.literal("tscircuit2024").default("tscircuit2024"),
|
|
16656
16736
|
font_size: distance.default("1mm"),
|
|
16657
|
-
text:
|
|
16737
|
+
text: z98.string().optional(),
|
|
16658
16738
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16659
|
-
anchor_alignment:
|
|
16660
|
-
color:
|
|
16739
|
+
anchor_alignment: z98.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
16740
|
+
color: z98.string().optional()
|
|
16661
16741
|
}).describe("Defines a documentation note in text on the PCB");
|
|
16662
16742
|
expectTypesMatch(true);
|
|
16663
|
-
var pcb_note_rect =
|
|
16664
|
-
type:
|
|
16743
|
+
var pcb_note_rect = z99.object({
|
|
16744
|
+
type: z99.literal("pcb_note_rect"),
|
|
16665
16745
|
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
16666
|
-
pcb_component_id:
|
|
16667
|
-
pcb_group_id:
|
|
16668
|
-
subcircuit_id:
|
|
16746
|
+
pcb_component_id: z99.string().optional(),
|
|
16747
|
+
pcb_group_id: z99.string().optional(),
|
|
16748
|
+
subcircuit_id: z99.string().optional(),
|
|
16749
|
+
name: z99.string().optional(),
|
|
16750
|
+
text: z99.string().optional(),
|
|
16669
16751
|
center: point,
|
|
16670
16752
|
width: length,
|
|
16671
16753
|
height: length,
|
|
16672
16754
|
stroke_width: length.default("0.1mm"),
|
|
16673
|
-
|
|
16674
|
-
|
|
16675
|
-
|
|
16676
|
-
|
|
16755
|
+
corner_radius: length.optional(),
|
|
16756
|
+
is_filled: z99.boolean().optional(),
|
|
16757
|
+
has_stroke: z99.boolean().optional(),
|
|
16758
|
+
is_stroke_dashed: z99.boolean().optional(),
|
|
16759
|
+
color: z99.string().optional()
|
|
16677
16760
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
16678
16761
|
expectTypesMatch(true);
|
|
16679
|
-
var pcb_note_path =
|
|
16680
|
-
type:
|
|
16762
|
+
var pcb_note_path = z100.object({
|
|
16763
|
+
type: z100.literal("pcb_note_path"),
|
|
16681
16764
|
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
16682
|
-
pcb_component_id:
|
|
16683
|
-
pcb_group_id:
|
|
16684
|
-
subcircuit_id:
|
|
16685
|
-
|
|
16765
|
+
pcb_component_id: z100.string().optional(),
|
|
16766
|
+
pcb_group_id: z100.string().optional(),
|
|
16767
|
+
subcircuit_id: z100.string().optional(),
|
|
16768
|
+
name: z100.string().optional(),
|
|
16769
|
+
text: z100.string().optional(),
|
|
16770
|
+
route: z100.array(point),
|
|
16686
16771
|
stroke_width: length.default("0.1mm"),
|
|
16687
|
-
color:
|
|
16772
|
+
color: z100.string().optional()
|
|
16688
16773
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
16689
16774
|
expectTypesMatch(true);
|
|
16690
|
-
var pcb_note_line =
|
|
16691
|
-
type:
|
|
16775
|
+
var pcb_note_line = z101.object({
|
|
16776
|
+
type: z101.literal("pcb_note_line"),
|
|
16692
16777
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
16693
|
-
pcb_component_id:
|
|
16694
|
-
pcb_group_id:
|
|
16695
|
-
subcircuit_id:
|
|
16778
|
+
pcb_component_id: z101.string().optional(),
|
|
16779
|
+
pcb_group_id: z101.string().optional(),
|
|
16780
|
+
subcircuit_id: z101.string().optional(),
|
|
16781
|
+
name: z101.string().optional(),
|
|
16782
|
+
text: z101.string().optional(),
|
|
16696
16783
|
x1: distance,
|
|
16697
16784
|
y1: distance,
|
|
16698
16785
|
x2: distance,
|
|
16699
16786
|
y2: distance,
|
|
16700
16787
|
stroke_width: distance.default("0.1mm"),
|
|
16701
|
-
color:
|
|
16702
|
-
is_dashed:
|
|
16788
|
+
color: z101.string().optional(),
|
|
16789
|
+
is_dashed: z101.boolean().optional()
|
|
16703
16790
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
16704
16791
|
expectTypesMatch(true);
|
|
16705
|
-
var pcb_note_dimension =
|
|
16706
|
-
type:
|
|
16792
|
+
var pcb_note_dimension = z102.object({
|
|
16793
|
+
type: z102.literal("pcb_note_dimension"),
|
|
16707
16794
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
16708
|
-
pcb_component_id:
|
|
16709
|
-
pcb_group_id:
|
|
16710
|
-
subcircuit_id:
|
|
16795
|
+
pcb_component_id: z102.string().optional(),
|
|
16796
|
+
pcb_group_id: z102.string().optional(),
|
|
16797
|
+
subcircuit_id: z102.string().optional(),
|
|
16798
|
+
name: z102.string().optional(),
|
|
16711
16799
|
from: point,
|
|
16712
16800
|
to: point,
|
|
16713
|
-
text:
|
|
16714
|
-
|
|
16801
|
+
text: z102.string().optional(),
|
|
16802
|
+
text_ccw_rotation: z102.number().optional(),
|
|
16803
|
+
offset_distance: length.optional(),
|
|
16804
|
+
offset_direction: z102.object({
|
|
16805
|
+
x: z102.number(),
|
|
16806
|
+
y: z102.number()
|
|
16807
|
+
}).optional(),
|
|
16808
|
+
font: z102.literal("tscircuit2024").default("tscircuit2024"),
|
|
16715
16809
|
font_size: length.default("1mm"),
|
|
16716
|
-
color:
|
|
16810
|
+
color: z102.string().optional(),
|
|
16717
16811
|
arrow_size: length.default("1mm")
|
|
16718
16812
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
16719
16813
|
expectTypesMatch(true);
|
|
16720
|
-
var pcb_footprint_overlap_error =
|
|
16721
|
-
type:
|
|
16814
|
+
var pcb_footprint_overlap_error = z103.object({
|
|
16815
|
+
type: z103.literal("pcb_footprint_overlap_error"),
|
|
16722
16816
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
16723
|
-
error_type:
|
|
16724
|
-
message:
|
|
16725
|
-
pcb_smtpad_ids:
|
|
16726
|
-
pcb_plated_hole_ids:
|
|
16727
|
-
pcb_hole_ids:
|
|
16728
|
-
pcb_keepout_ids:
|
|
16817
|
+
error_type: z103.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
16818
|
+
message: z103.string(),
|
|
16819
|
+
pcb_smtpad_ids: z103.array(z103.string()).optional(),
|
|
16820
|
+
pcb_plated_hole_ids: z103.array(z103.string()).optional(),
|
|
16821
|
+
pcb_hole_ids: z103.array(z103.string()).optional(),
|
|
16822
|
+
pcb_keepout_ids: z103.array(z103.string()).optional()
|
|
16729
16823
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
16730
16824
|
expectTypesMatch(
|
|
16731
16825
|
true
|
|
16732
16826
|
);
|
|
16733
|
-
var pcb_keepout =
|
|
16734
|
-
type:
|
|
16735
|
-
shape:
|
|
16736
|
-
pcb_group_id:
|
|
16737
|
-
subcircuit_id:
|
|
16827
|
+
var pcb_keepout = z104.object({
|
|
16828
|
+
type: z104.literal("pcb_keepout"),
|
|
16829
|
+
shape: z104.literal("rect"),
|
|
16830
|
+
pcb_group_id: z104.string().optional(),
|
|
16831
|
+
subcircuit_id: z104.string().optional(),
|
|
16738
16832
|
center: point,
|
|
16739
16833
|
width: distance,
|
|
16740
16834
|
height: distance,
|
|
16741
|
-
pcb_keepout_id:
|
|
16742
|
-
layers:
|
|
16835
|
+
pcb_keepout_id: z104.string(),
|
|
16836
|
+
layers: z104.array(z104.string()),
|
|
16743
16837
|
// Specify layers where the keepout applies
|
|
16744
|
-
description:
|
|
16838
|
+
description: z104.string().optional()
|
|
16745
16839
|
// Optional description of the keepout
|
|
16746
16840
|
}).or(
|
|
16747
|
-
|
|
16748
|
-
type:
|
|
16749
|
-
shape:
|
|
16750
|
-
pcb_group_id:
|
|
16751
|
-
subcircuit_id:
|
|
16841
|
+
z104.object({
|
|
16842
|
+
type: z104.literal("pcb_keepout"),
|
|
16843
|
+
shape: z104.literal("circle"),
|
|
16844
|
+
pcb_group_id: z104.string().optional(),
|
|
16845
|
+
subcircuit_id: z104.string().optional(),
|
|
16752
16846
|
center: point,
|
|
16753
16847
|
radius: distance,
|
|
16754
|
-
pcb_keepout_id:
|
|
16755
|
-
layers:
|
|
16848
|
+
pcb_keepout_id: z104.string(),
|
|
16849
|
+
layers: z104.array(z104.string()),
|
|
16756
16850
|
// Specify layers where the keepout applies
|
|
16757
|
-
description:
|
|
16851
|
+
description: z104.string().optional()
|
|
16758
16852
|
// Optional description of the keepout
|
|
16759
16853
|
})
|
|
16760
16854
|
);
|
|
16761
16855
|
expectTypesMatch(true);
|
|
16762
|
-
var pcb_cutout_base =
|
|
16763
|
-
type:
|
|
16856
|
+
var pcb_cutout_base = z105.object({
|
|
16857
|
+
type: z105.literal("pcb_cutout"),
|
|
16764
16858
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
16765
|
-
pcb_group_id:
|
|
16766
|
-
subcircuit_id:
|
|
16859
|
+
pcb_group_id: z105.string().optional(),
|
|
16860
|
+
subcircuit_id: z105.string().optional()
|
|
16767
16861
|
});
|
|
16768
16862
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
16769
|
-
shape:
|
|
16863
|
+
shape: z105.literal("rect"),
|
|
16770
16864
|
center: point,
|
|
16771
16865
|
width: length,
|
|
16772
16866
|
height: length,
|
|
@@ -16774,164 +16868,168 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
16774
16868
|
});
|
|
16775
16869
|
expectTypesMatch(true);
|
|
16776
16870
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
16777
|
-
shape:
|
|
16871
|
+
shape: z105.literal("circle"),
|
|
16778
16872
|
center: point,
|
|
16779
16873
|
radius: length
|
|
16780
16874
|
});
|
|
16781
16875
|
expectTypesMatch(true);
|
|
16782
16876
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
16783
|
-
shape:
|
|
16784
|
-
points:
|
|
16877
|
+
shape: z105.literal("polygon"),
|
|
16878
|
+
points: z105.array(point)
|
|
16785
16879
|
});
|
|
16786
16880
|
expectTypesMatch(true);
|
|
16787
|
-
var pcb_cutout =
|
|
16881
|
+
var pcb_cutout = z105.discriminatedUnion("shape", [
|
|
16788
16882
|
pcb_cutout_rect,
|
|
16789
16883
|
pcb_cutout_circle,
|
|
16790
16884
|
pcb_cutout_polygon
|
|
16791
16885
|
]).describe("Defines a cutout on the PCB, removing board material.");
|
|
16792
16886
|
expectTypesMatch(true);
|
|
16793
|
-
var pcb_missing_footprint_error =
|
|
16794
|
-
type:
|
|
16887
|
+
var pcb_missing_footprint_error = z106.object({
|
|
16888
|
+
type: z106.literal("pcb_missing_footprint_error"),
|
|
16795
16889
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
16796
16890
|
"pcb_missing_footprint_error"
|
|
16797
16891
|
),
|
|
16798
|
-
pcb_group_id:
|
|
16799
|
-
subcircuit_id:
|
|
16800
|
-
error_type:
|
|
16801
|
-
source_component_id:
|
|
16802
|
-
message:
|
|
16892
|
+
pcb_group_id: z106.string().optional(),
|
|
16893
|
+
subcircuit_id: z106.string().optional(),
|
|
16894
|
+
error_type: z106.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
16895
|
+
source_component_id: z106.string(),
|
|
16896
|
+
message: z106.string()
|
|
16803
16897
|
}).describe("Defines a missing footprint error on the PCB");
|
|
16804
16898
|
expectTypesMatch(
|
|
16805
16899
|
true
|
|
16806
16900
|
);
|
|
16807
|
-
var external_footprint_load_error =
|
|
16808
|
-
type:
|
|
16901
|
+
var external_footprint_load_error = z107.object({
|
|
16902
|
+
type: z107.literal("external_footprint_load_error"),
|
|
16809
16903
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
16810
16904
|
"external_footprint_load_error"
|
|
16811
16905
|
),
|
|
16812
|
-
pcb_component_id:
|
|
16813
|
-
source_component_id:
|
|
16814
|
-
pcb_group_id:
|
|
16815
|
-
subcircuit_id:
|
|
16816
|
-
footprinter_string:
|
|
16817
|
-
error_type:
|
|
16818
|
-
message:
|
|
16906
|
+
pcb_component_id: z107.string(),
|
|
16907
|
+
source_component_id: z107.string(),
|
|
16908
|
+
pcb_group_id: z107.string().optional(),
|
|
16909
|
+
subcircuit_id: z107.string().optional(),
|
|
16910
|
+
footprinter_string: z107.string().optional(),
|
|
16911
|
+
error_type: z107.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
16912
|
+
message: z107.string()
|
|
16819
16913
|
}).describe("Defines an error when an external footprint fails to load");
|
|
16820
16914
|
expectTypesMatch(true);
|
|
16821
|
-
var circuit_json_footprint_load_error =
|
|
16822
|
-
type:
|
|
16915
|
+
var circuit_json_footprint_load_error = z108.object({
|
|
16916
|
+
type: z108.literal("circuit_json_footprint_load_error"),
|
|
16823
16917
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
16824
16918
|
"circuit_json_footprint_load_error"
|
|
16825
16919
|
),
|
|
16826
|
-
pcb_component_id:
|
|
16827
|
-
source_component_id:
|
|
16828
|
-
pcb_group_id:
|
|
16829
|
-
subcircuit_id:
|
|
16830
|
-
error_type:
|
|
16831
|
-
message:
|
|
16832
|
-
circuit_json:
|
|
16920
|
+
pcb_component_id: z108.string(),
|
|
16921
|
+
source_component_id: z108.string(),
|
|
16922
|
+
pcb_group_id: z108.string().optional(),
|
|
16923
|
+
subcircuit_id: z108.string().optional(),
|
|
16924
|
+
error_type: z108.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
16925
|
+
message: z108.string(),
|
|
16926
|
+
circuit_json: z108.array(z108.any()).optional()
|
|
16833
16927
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
16834
16928
|
expectTypesMatch(true);
|
|
16835
|
-
var pcb_group =
|
|
16836
|
-
type:
|
|
16929
|
+
var pcb_group = z109.object({
|
|
16930
|
+
type: z109.literal("pcb_group"),
|
|
16837
16931
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
16838
|
-
source_group_id:
|
|
16839
|
-
is_subcircuit:
|
|
16840
|
-
subcircuit_id:
|
|
16841
|
-
width: length,
|
|
16842
|
-
height: length,
|
|
16932
|
+
source_group_id: z109.string(),
|
|
16933
|
+
is_subcircuit: z109.boolean().optional(),
|
|
16934
|
+
subcircuit_id: z109.string().optional(),
|
|
16935
|
+
width: length.optional(),
|
|
16936
|
+
height: length.optional(),
|
|
16843
16937
|
center: point,
|
|
16844
|
-
|
|
16845
|
-
|
|
16846
|
-
|
|
16847
|
-
|
|
16848
|
-
|
|
16938
|
+
outline: z109.array(point).optional(),
|
|
16939
|
+
anchor_position: point.optional(),
|
|
16940
|
+
anchor_alignment: z109.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).optional(),
|
|
16941
|
+
pcb_component_ids: z109.array(z109.string()),
|
|
16942
|
+
name: z109.string().optional(),
|
|
16943
|
+
description: z109.string().optional(),
|
|
16944
|
+
layout_mode: z109.string().optional(),
|
|
16945
|
+
autorouter_configuration: z109.object({
|
|
16849
16946
|
trace_clearance: length
|
|
16850
16947
|
}).optional(),
|
|
16851
|
-
autorouter_used_string:
|
|
16948
|
+
autorouter_used_string: z109.string().optional()
|
|
16852
16949
|
}).describe("Defines a group of components on the PCB");
|
|
16853
16950
|
expectTypesMatch(true);
|
|
16854
|
-
var pcb_autorouting_error =
|
|
16855
|
-
type:
|
|
16951
|
+
var pcb_autorouting_error = z110.object({
|
|
16952
|
+
type: z110.literal("pcb_autorouting_error"),
|
|
16856
16953
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
16857
|
-
error_type:
|
|
16858
|
-
message:
|
|
16859
|
-
subcircuit_id:
|
|
16954
|
+
error_type: z110.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
16955
|
+
message: z110.string(),
|
|
16956
|
+
subcircuit_id: z110.string().optional()
|
|
16860
16957
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
16861
16958
|
expectTypesMatch(true);
|
|
16862
|
-
var pcb_manual_edit_conflict_warning =
|
|
16863
|
-
type:
|
|
16959
|
+
var pcb_manual_edit_conflict_warning = z111.object({
|
|
16960
|
+
type: z111.literal("pcb_manual_edit_conflict_warning"),
|
|
16864
16961
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
16865
16962
|
"pcb_manual_edit_conflict_warning"
|
|
16866
16963
|
),
|
|
16867
|
-
warning_type:
|
|
16868
|
-
message:
|
|
16869
|
-
pcb_component_id:
|
|
16870
|
-
pcb_group_id:
|
|
16871
|
-
subcircuit_id:
|
|
16872
|
-
source_component_id:
|
|
16964
|
+
warning_type: z111.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
16965
|
+
message: z111.string(),
|
|
16966
|
+
pcb_component_id: z111.string(),
|
|
16967
|
+
pcb_group_id: z111.string().optional(),
|
|
16968
|
+
subcircuit_id: z111.string().optional(),
|
|
16969
|
+
source_component_id: z111.string()
|
|
16873
16970
|
}).describe(
|
|
16874
16971
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
16875
16972
|
);
|
|
16876
16973
|
expectTypesMatch(true);
|
|
16877
|
-
var pcb_breakout_point =
|
|
16878
|
-
type:
|
|
16974
|
+
var pcb_breakout_point = z112.object({
|
|
16975
|
+
type: z112.literal("pcb_breakout_point"),
|
|
16879
16976
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
16880
|
-
pcb_group_id:
|
|
16881
|
-
subcircuit_id:
|
|
16882
|
-
source_trace_id:
|
|
16883
|
-
source_port_id:
|
|
16884
|
-
source_net_id:
|
|
16977
|
+
pcb_group_id: z112.string(),
|
|
16978
|
+
subcircuit_id: z112.string().optional(),
|
|
16979
|
+
source_trace_id: z112.string().optional(),
|
|
16980
|
+
source_port_id: z112.string().optional(),
|
|
16981
|
+
source_net_id: z112.string().optional(),
|
|
16885
16982
|
x: distance,
|
|
16886
16983
|
y: distance
|
|
16887
16984
|
}).describe(
|
|
16888
16985
|
"Defines a routing target within a pcb_group for a source_trace or source_net"
|
|
16889
16986
|
);
|
|
16890
16987
|
expectTypesMatch(true);
|
|
16891
|
-
var pcb_ground_plane =
|
|
16892
|
-
type:
|
|
16988
|
+
var pcb_ground_plane = z113.object({
|
|
16989
|
+
type: z113.literal("pcb_ground_plane"),
|
|
16893
16990
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
16894
|
-
source_pcb_ground_plane_id:
|
|
16895
|
-
source_net_id:
|
|
16896
|
-
pcb_group_id:
|
|
16897
|
-
subcircuit_id:
|
|
16991
|
+
source_pcb_ground_plane_id: z113.string(),
|
|
16992
|
+
source_net_id: z113.string(),
|
|
16993
|
+
pcb_group_id: z113.string().optional(),
|
|
16994
|
+
subcircuit_id: z113.string().optional()
|
|
16898
16995
|
}).describe("Defines a ground plane on the PCB");
|
|
16899
16996
|
expectTypesMatch(true);
|
|
16900
|
-
var pcb_ground_plane_region =
|
|
16901
|
-
type:
|
|
16997
|
+
var pcb_ground_plane_region = z114.object({
|
|
16998
|
+
type: z114.literal("pcb_ground_plane_region"),
|
|
16902
16999
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
16903
17000
|
"pcb_ground_plane_region"
|
|
16904
17001
|
),
|
|
16905
|
-
pcb_ground_plane_id:
|
|
16906
|
-
pcb_group_id:
|
|
16907
|
-
subcircuit_id:
|
|
17002
|
+
pcb_ground_plane_id: z114.string(),
|
|
17003
|
+
pcb_group_id: z114.string().optional(),
|
|
17004
|
+
subcircuit_id: z114.string().optional(),
|
|
16908
17005
|
layer: layer_ref,
|
|
16909
|
-
points:
|
|
17006
|
+
points: z114.array(point)
|
|
16910
17007
|
}).describe("Defines a polygon region of a ground plane");
|
|
16911
17008
|
expectTypesMatch(true);
|
|
16912
|
-
var pcb_thermal_spoke =
|
|
16913
|
-
type:
|
|
17009
|
+
var pcb_thermal_spoke = z115.object({
|
|
17010
|
+
type: z115.literal("pcb_thermal_spoke"),
|
|
16914
17011
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
16915
|
-
pcb_ground_plane_id:
|
|
16916
|
-
shape:
|
|
16917
|
-
spoke_count:
|
|
17012
|
+
pcb_ground_plane_id: z115.string(),
|
|
17013
|
+
shape: z115.string(),
|
|
17014
|
+
spoke_count: z115.number(),
|
|
16918
17015
|
spoke_thickness: distance,
|
|
16919
17016
|
spoke_inner_diameter: distance,
|
|
16920
17017
|
spoke_outer_diameter: distance,
|
|
16921
|
-
pcb_plated_hole_id:
|
|
16922
|
-
subcircuit_id:
|
|
17018
|
+
pcb_plated_hole_id: z115.string().optional(),
|
|
17019
|
+
subcircuit_id: z115.string().optional()
|
|
16923
17020
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
16924
17021
|
expectTypesMatch(true);
|
|
16925
|
-
var pcb_copper_pour_base =
|
|
16926
|
-
type:
|
|
17022
|
+
var pcb_copper_pour_base = z116.object({
|
|
17023
|
+
type: z116.literal("pcb_copper_pour"),
|
|
16927
17024
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
16928
|
-
pcb_group_id:
|
|
16929
|
-
subcircuit_id:
|
|
17025
|
+
pcb_group_id: z116.string().optional(),
|
|
17026
|
+
subcircuit_id: z116.string().optional(),
|
|
16930
17027
|
layer: layer_ref,
|
|
16931
|
-
source_net_id:
|
|
17028
|
+
source_net_id: z116.string().optional(),
|
|
17029
|
+
covered_with_solder_mask: z116.boolean().optional().default(true)
|
|
16932
17030
|
});
|
|
16933
17031
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
16934
|
-
shape:
|
|
17032
|
+
shape: z116.literal("rect"),
|
|
16935
17033
|
center: point,
|
|
16936
17034
|
width: length,
|
|
16937
17035
|
height: length,
|
|
@@ -16939,116 +17037,140 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
16939
17037
|
});
|
|
16940
17038
|
expectTypesMatch(true);
|
|
16941
17039
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
16942
|
-
shape:
|
|
17040
|
+
shape: z116.literal("brep"),
|
|
16943
17041
|
brep_shape
|
|
16944
17042
|
});
|
|
16945
17043
|
expectTypesMatch(true);
|
|
16946
17044
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
16947
|
-
shape:
|
|
16948
|
-
points:
|
|
17045
|
+
shape: z116.literal("polygon"),
|
|
17046
|
+
points: z116.array(point)
|
|
16949
17047
|
});
|
|
16950
17048
|
expectTypesMatch(true);
|
|
16951
|
-
var pcb_copper_pour =
|
|
17049
|
+
var pcb_copper_pour = z116.discriminatedUnion("shape", [
|
|
16952
17050
|
pcb_copper_pour_rect,
|
|
16953
17051
|
pcb_copper_pour_brep,
|
|
16954
17052
|
pcb_copper_pour_polygon
|
|
16955
17053
|
]).describe("Defines a copper pour on the PCB.");
|
|
16956
17054
|
expectTypesMatch(true);
|
|
16957
|
-
var pcb_component_outside_board_error =
|
|
16958
|
-
type:
|
|
17055
|
+
var pcb_component_outside_board_error = z117.object({
|
|
17056
|
+
type: z117.literal("pcb_component_outside_board_error"),
|
|
16959
17057
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
16960
17058
|
"pcb_component_outside_board_error"
|
|
16961
17059
|
),
|
|
16962
|
-
error_type:
|
|
16963
|
-
message:
|
|
16964
|
-
pcb_component_id:
|
|
16965
|
-
pcb_board_id:
|
|
17060
|
+
error_type: z117.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
17061
|
+
message: z117.string(),
|
|
17062
|
+
pcb_component_id: z117.string(),
|
|
17063
|
+
pcb_board_id: z117.string(),
|
|
16966
17064
|
component_center: point,
|
|
16967
|
-
component_bounds:
|
|
16968
|
-
min_x:
|
|
16969
|
-
max_x:
|
|
16970
|
-
min_y:
|
|
16971
|
-
max_y:
|
|
17065
|
+
component_bounds: z117.object({
|
|
17066
|
+
min_x: z117.number(),
|
|
17067
|
+
max_x: z117.number(),
|
|
17068
|
+
min_y: z117.number(),
|
|
17069
|
+
max_y: z117.number()
|
|
16972
17070
|
}),
|
|
16973
|
-
subcircuit_id:
|
|
16974
|
-
source_component_id:
|
|
17071
|
+
subcircuit_id: z117.string().optional(),
|
|
17072
|
+
source_component_id: z117.string().optional()
|
|
16975
17073
|
}).describe(
|
|
16976
17074
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
16977
17075
|
);
|
|
16978
17076
|
expectTypesMatch(true);
|
|
16979
|
-
var
|
|
16980
|
-
type:
|
|
17077
|
+
var pcb_component_invalid_layer_error = z118.object({
|
|
17078
|
+
type: z118.literal("pcb_component_invalid_layer_error"),
|
|
17079
|
+
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
17080
|
+
"pcb_component_invalid_layer_error"
|
|
17081
|
+
),
|
|
17082
|
+
error_type: z118.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
17083
|
+
message: z118.string(),
|
|
17084
|
+
pcb_component_id: z118.string().optional(),
|
|
17085
|
+
source_component_id: z118.string(),
|
|
17086
|
+
layer: layer_ref,
|
|
17087
|
+
subcircuit_id: z118.string().optional()
|
|
17088
|
+
}).describe(
|
|
17089
|
+
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
17090
|
+
);
|
|
17091
|
+
expectTypesMatch(true);
|
|
17092
|
+
var pcb_via_clearance_error = z119.object({
|
|
17093
|
+
type: z119.literal("pcb_via_clearance_error"),
|
|
16981
17094
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
16982
|
-
error_type:
|
|
16983
|
-
message:
|
|
16984
|
-
pcb_via_ids:
|
|
17095
|
+
error_type: z119.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
17096
|
+
message: z119.string(),
|
|
17097
|
+
pcb_via_ids: z119.array(z119.string()).min(2),
|
|
16985
17098
|
minimum_clearance: distance.optional(),
|
|
16986
17099
|
actual_clearance: distance.optional(),
|
|
16987
|
-
pcb_center:
|
|
16988
|
-
x:
|
|
16989
|
-
y:
|
|
17100
|
+
pcb_center: z119.object({
|
|
17101
|
+
x: z119.number().optional(),
|
|
17102
|
+
y: z119.number().optional()
|
|
16990
17103
|
}).optional(),
|
|
16991
|
-
subcircuit_id:
|
|
17104
|
+
subcircuit_id: z119.string().optional()
|
|
16992
17105
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
16993
17106
|
expectTypesMatch(true);
|
|
16994
|
-
var pcb_courtyard_rect =
|
|
16995
|
-
type:
|
|
17107
|
+
var pcb_courtyard_rect = z120.object({
|
|
17108
|
+
type: z120.literal("pcb_courtyard_rect"),
|
|
16996
17109
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
16997
|
-
pcb_component_id:
|
|
16998
|
-
pcb_group_id:
|
|
16999
|
-
subcircuit_id:
|
|
17110
|
+
pcb_component_id: z120.string(),
|
|
17111
|
+
pcb_group_id: z120.string().optional(),
|
|
17112
|
+
subcircuit_id: z120.string().optional(),
|
|
17000
17113
|
center: point,
|
|
17001
17114
|
width: length,
|
|
17002
17115
|
height: length,
|
|
17003
17116
|
layer: visible_layer,
|
|
17004
|
-
|
|
17005
|
-
is_filled: z115.boolean().optional(),
|
|
17006
|
-
has_stroke: z115.boolean().optional(),
|
|
17007
|
-
is_stroke_dashed: z115.boolean().optional(),
|
|
17008
|
-
color: z115.string().optional()
|
|
17117
|
+
color: z120.string().optional()
|
|
17009
17118
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
17010
17119
|
expectTypesMatch(true);
|
|
17011
|
-
var pcb_courtyard_outline =
|
|
17012
|
-
type:
|
|
17120
|
+
var pcb_courtyard_outline = z121.object({
|
|
17121
|
+
type: z121.literal("pcb_courtyard_outline"),
|
|
17013
17122
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
17014
17123
|
"pcb_courtyard_outline"
|
|
17015
17124
|
),
|
|
17016
|
-
pcb_component_id:
|
|
17017
|
-
pcb_group_id:
|
|
17018
|
-
subcircuit_id:
|
|
17125
|
+
pcb_component_id: z121.string(),
|
|
17126
|
+
pcb_group_id: z121.string().optional(),
|
|
17127
|
+
subcircuit_id: z121.string().optional(),
|
|
17019
17128
|
layer: visible_layer,
|
|
17020
|
-
outline:
|
|
17129
|
+
outline: z121.array(point).min(2),
|
|
17021
17130
|
stroke_width: length.default("0.1mm"),
|
|
17022
|
-
is_closed:
|
|
17023
|
-
is_stroke_dashed:
|
|
17024
|
-
color:
|
|
17131
|
+
is_closed: z121.boolean().optional(),
|
|
17132
|
+
is_stroke_dashed: z121.boolean().optional(),
|
|
17133
|
+
color: z121.string().optional()
|
|
17025
17134
|
}).describe("Defines a courtyard outline on the PCB");
|
|
17026
17135
|
expectTypesMatch(true);
|
|
17027
|
-
var
|
|
17028
|
-
type:
|
|
17029
|
-
|
|
17030
|
-
|
|
17031
|
-
|
|
17136
|
+
var pcb_courtyard_polygon = z122.object({
|
|
17137
|
+
type: z122.literal("pcb_courtyard_polygon"),
|
|
17138
|
+
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
17139
|
+
"pcb_courtyard_polygon"
|
|
17140
|
+
),
|
|
17141
|
+
pcb_component_id: z122.string(),
|
|
17142
|
+
pcb_group_id: z122.string().optional(),
|
|
17143
|
+
subcircuit_id: z122.string().optional(),
|
|
17144
|
+
layer: visible_layer,
|
|
17145
|
+
points: z122.array(point).min(3),
|
|
17146
|
+
color: z122.string().optional()
|
|
17147
|
+
}).describe("Defines a courtyard polygon on the PCB");
|
|
17148
|
+
expectTypesMatch(true);
|
|
17149
|
+
var cad_component = z123.object({
|
|
17150
|
+
type: z123.literal("cad_component"),
|
|
17151
|
+
cad_component_id: z123.string(),
|
|
17152
|
+
pcb_component_id: z123.string(),
|
|
17153
|
+
source_component_id: z123.string(),
|
|
17032
17154
|
position: point3,
|
|
17033
17155
|
rotation: point3.optional(),
|
|
17034
17156
|
size: point3.optional(),
|
|
17035
17157
|
layer: layer_ref.optional(),
|
|
17036
|
-
subcircuit_id:
|
|
17158
|
+
subcircuit_id: z123.string().optional(),
|
|
17037
17159
|
// These are all ways to generate/load the 3d model
|
|
17038
|
-
footprinter_string:
|
|
17039
|
-
model_obj_url:
|
|
17040
|
-
model_stl_url:
|
|
17041
|
-
model_3mf_url:
|
|
17042
|
-
model_gltf_url:
|
|
17043
|
-
model_glb_url:
|
|
17044
|
-
model_step_url:
|
|
17045
|
-
model_wrl_url:
|
|
17046
|
-
model_unit_to_mm_scale_factor:
|
|
17047
|
-
model_jscad:
|
|
17160
|
+
footprinter_string: z123.string().optional(),
|
|
17161
|
+
model_obj_url: z123.string().optional(),
|
|
17162
|
+
model_stl_url: z123.string().optional(),
|
|
17163
|
+
model_3mf_url: z123.string().optional(),
|
|
17164
|
+
model_gltf_url: z123.string().optional(),
|
|
17165
|
+
model_glb_url: z123.string().optional(),
|
|
17166
|
+
model_step_url: z123.string().optional(),
|
|
17167
|
+
model_wrl_url: z123.string().optional(),
|
|
17168
|
+
model_unit_to_mm_scale_factor: z123.number().optional(),
|
|
17169
|
+
model_jscad: z123.any().optional()
|
|
17048
17170
|
}).describe("Defines a component on the PCB");
|
|
17049
17171
|
expectTypesMatch(true);
|
|
17050
|
-
var wave_shape =
|
|
17051
|
-
var percentage =
|
|
17172
|
+
var wave_shape = z124.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
17173
|
+
var percentage = z124.union([z124.string(), z124.number()]).transform((val) => {
|
|
17052
17174
|
if (typeof val === "string") {
|
|
17053
17175
|
if (val.endsWith("%")) {
|
|
17054
17176
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17057,30 +17179,30 @@ var percentage = z118.union([z118.string(), z118.number()]).transform((val) => {
|
|
|
17057
17179
|
}
|
|
17058
17180
|
return val;
|
|
17059
17181
|
}).pipe(
|
|
17060
|
-
|
|
17182
|
+
z124.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
17061
17183
|
);
|
|
17062
|
-
var simulation_dc_voltage_source =
|
|
17063
|
-
type:
|
|
17184
|
+
var simulation_dc_voltage_source = z124.object({
|
|
17185
|
+
type: z124.literal("simulation_voltage_source"),
|
|
17064
17186
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
17065
17187
|
"simulation_voltage_source"
|
|
17066
17188
|
),
|
|
17067
|
-
is_dc_source:
|
|
17068
|
-
positive_source_port_id:
|
|
17069
|
-
negative_source_port_id:
|
|
17070
|
-
positive_source_net_id:
|
|
17071
|
-
negative_source_net_id:
|
|
17189
|
+
is_dc_source: z124.literal(true).optional().default(true),
|
|
17190
|
+
positive_source_port_id: z124.string().optional(),
|
|
17191
|
+
negative_source_port_id: z124.string().optional(),
|
|
17192
|
+
positive_source_net_id: z124.string().optional(),
|
|
17193
|
+
negative_source_net_id: z124.string().optional(),
|
|
17072
17194
|
voltage
|
|
17073
17195
|
}).describe("Defines a DC voltage source for simulation");
|
|
17074
|
-
var simulation_ac_voltage_source =
|
|
17075
|
-
type:
|
|
17196
|
+
var simulation_ac_voltage_source = z124.object({
|
|
17197
|
+
type: z124.literal("simulation_voltage_source"),
|
|
17076
17198
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
17077
17199
|
"simulation_voltage_source"
|
|
17078
17200
|
),
|
|
17079
|
-
is_dc_source:
|
|
17080
|
-
terminal1_source_port_id:
|
|
17081
|
-
terminal2_source_port_id:
|
|
17082
|
-
terminal1_source_net_id:
|
|
17083
|
-
terminal2_source_net_id:
|
|
17201
|
+
is_dc_source: z124.literal(false),
|
|
17202
|
+
terminal1_source_port_id: z124.string().optional(),
|
|
17203
|
+
terminal2_source_port_id: z124.string().optional(),
|
|
17204
|
+
terminal1_source_net_id: z124.string().optional(),
|
|
17205
|
+
terminal2_source_net_id: z124.string().optional(),
|
|
17084
17206
|
voltage: voltage.optional(),
|
|
17085
17207
|
frequency: frequency.optional(),
|
|
17086
17208
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -17088,62 +17210,64 @@ var simulation_ac_voltage_source = z118.object({
|
|
|
17088
17210
|
phase: rotation.optional(),
|
|
17089
17211
|
duty_cycle: percentage.optional()
|
|
17090
17212
|
}).describe("Defines an AC voltage source for simulation");
|
|
17091
|
-
var simulation_voltage_source =
|
|
17213
|
+
var simulation_voltage_source = z124.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
17092
17214
|
expectTypesMatch(true);
|
|
17093
17215
|
expectTypesMatch(true);
|
|
17094
17216
|
expectTypesMatch(true);
|
|
17095
|
-
var experiment_type =
|
|
17096
|
-
|
|
17097
|
-
|
|
17098
|
-
|
|
17099
|
-
|
|
17217
|
+
var experiment_type = z125.union([
|
|
17218
|
+
z125.literal("spice_dc_sweep"),
|
|
17219
|
+
z125.literal("spice_dc_operating_point"),
|
|
17220
|
+
z125.literal("spice_transient_analysis"),
|
|
17221
|
+
z125.literal("spice_ac_analysis")
|
|
17100
17222
|
]);
|
|
17101
|
-
var simulation_experiment =
|
|
17102
|
-
type:
|
|
17223
|
+
var simulation_experiment = z125.object({
|
|
17224
|
+
type: z125.literal("simulation_experiment"),
|
|
17103
17225
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
17104
17226
|
"simulation_experiment"
|
|
17105
17227
|
),
|
|
17106
|
-
name:
|
|
17228
|
+
name: z125.string(),
|
|
17107
17229
|
experiment_type,
|
|
17108
17230
|
time_per_step: duration_ms.optional(),
|
|
17109
17231
|
start_time_ms: ms.optional(),
|
|
17110
17232
|
end_time_ms: ms.optional()
|
|
17111
17233
|
}).describe("Defines a simulation experiment configuration");
|
|
17112
17234
|
expectTypesMatch(true);
|
|
17113
|
-
var simulation_transient_voltage_graph =
|
|
17114
|
-
type:
|
|
17235
|
+
var simulation_transient_voltage_graph = z126.object({
|
|
17236
|
+
type: z126.literal("simulation_transient_voltage_graph"),
|
|
17115
17237
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
17116
17238
|
"simulation_transient_voltage_graph"
|
|
17117
17239
|
),
|
|
17118
|
-
simulation_experiment_id:
|
|
17119
|
-
timestamps_ms:
|
|
17120
|
-
voltage_levels:
|
|
17121
|
-
schematic_voltage_probe_id:
|
|
17122
|
-
|
|
17240
|
+
simulation_experiment_id: z126.string(),
|
|
17241
|
+
timestamps_ms: z126.array(z126.number()).optional(),
|
|
17242
|
+
voltage_levels: z126.array(z126.number()),
|
|
17243
|
+
schematic_voltage_probe_id: z126.string().optional(),
|
|
17244
|
+
simulation_voltage_probe_id: z126.string().optional(),
|
|
17245
|
+
subcircuit_connectivity_map_key: z126.string().optional(),
|
|
17123
17246
|
time_per_step: duration_ms,
|
|
17124
17247
|
start_time_ms: ms,
|
|
17125
17248
|
end_time_ms: ms,
|
|
17126
|
-
name:
|
|
17249
|
+
name: z126.string().optional()
|
|
17127
17250
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
17128
17251
|
expectTypesMatch(true);
|
|
17129
|
-
var simulation_switch =
|
|
17130
|
-
type:
|
|
17252
|
+
var simulation_switch = z127.object({
|
|
17253
|
+
type: z127.literal("simulation_switch"),
|
|
17131
17254
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
17255
|
+
source_component_id: z127.string().optional(),
|
|
17132
17256
|
closes_at: ms.optional(),
|
|
17133
17257
|
opens_at: ms.optional(),
|
|
17134
|
-
starts_closed:
|
|
17258
|
+
starts_closed: z127.boolean().optional(),
|
|
17135
17259
|
switching_frequency: frequency.optional()
|
|
17136
17260
|
}).describe("Defines a switch for simulation timing control");
|
|
17137
17261
|
expectTypesMatch(true);
|
|
17138
|
-
var simulation_voltage_probe =
|
|
17139
|
-
type:
|
|
17262
|
+
var simulation_voltage_probe = z128.object({
|
|
17263
|
+
type: z128.literal("simulation_voltage_probe"),
|
|
17140
17264
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
17141
17265
|
"simulation_voltage_probe"
|
|
17142
17266
|
),
|
|
17143
|
-
source_port_id:
|
|
17144
|
-
source_net_id:
|
|
17145
|
-
name:
|
|
17146
|
-
subcircuit_id:
|
|
17267
|
+
source_port_id: z128.string().optional(),
|
|
17268
|
+
source_net_id: z128.string().optional(),
|
|
17269
|
+
name: z128.string().optional(),
|
|
17270
|
+
subcircuit_id: z128.string().optional()
|
|
17147
17271
|
}).describe(
|
|
17148
17272
|
"Defines a voltage probe for simulation, connected to a port or a net"
|
|
17149
17273
|
).refine(
|
|
@@ -17153,7 +17277,18 @@ var simulation_voltage_probe = z122.object({
|
|
|
17153
17277
|
}
|
|
17154
17278
|
);
|
|
17155
17279
|
expectTypesMatch(true);
|
|
17156
|
-
var
|
|
17280
|
+
var simulation_unknown_experiment_error = z129.object({
|
|
17281
|
+
type: z129.literal("simulation_unknown_experiment_error"),
|
|
17282
|
+
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
17283
|
+
"simulation_unknown_experiment_error"
|
|
17284
|
+
),
|
|
17285
|
+
error_type: z129.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
17286
|
+
message: z129.string(),
|
|
17287
|
+
simulation_experiment_id: z129.string().optional(),
|
|
17288
|
+
subcircuit_id: z129.string().optional()
|
|
17289
|
+
}).describe("An unknown error occurred during the simulation experiment.");
|
|
17290
|
+
expectTypesMatch(true);
|
|
17291
|
+
var any_circuit_element = z130.union([
|
|
17157
17292
|
source_trace,
|
|
17158
17293
|
source_port,
|
|
17159
17294
|
any_source_component,
|
|
@@ -17182,6 +17317,7 @@ var any_circuit_element = z123.union([
|
|
|
17182
17317
|
source_project_metadata,
|
|
17183
17318
|
source_trace_not_connected_error,
|
|
17184
17319
|
source_pin_missing_trace_warning,
|
|
17320
|
+
unknown_error_finding_part,
|
|
17185
17321
|
pcb_component,
|
|
17186
17322
|
pcb_hole,
|
|
17187
17323
|
pcb_missing_footprint_error,
|
|
@@ -17198,11 +17334,13 @@ var any_circuit_element = z123.union([
|
|
|
17198
17334
|
pcb_smtpad,
|
|
17199
17335
|
pcb_solder_paste,
|
|
17200
17336
|
pcb_board,
|
|
17337
|
+
pcb_panel,
|
|
17201
17338
|
pcb_group,
|
|
17202
17339
|
pcb_trace_hint,
|
|
17203
17340
|
pcb_silkscreen_line,
|
|
17204
17341
|
pcb_silkscreen_path,
|
|
17205
17342
|
pcb_silkscreen_text,
|
|
17343
|
+
pcb_copper_text,
|
|
17206
17344
|
pcb_silkscreen_rect,
|
|
17207
17345
|
pcb_silkscreen_circle,
|
|
17208
17346
|
pcb_silkscreen_oval,
|
|
@@ -17230,8 +17368,10 @@ var any_circuit_element = z123.union([
|
|
|
17230
17368
|
pcb_thermal_spoke,
|
|
17231
17369
|
pcb_copper_pour,
|
|
17232
17370
|
pcb_component_outside_board_error,
|
|
17371
|
+
pcb_component_invalid_layer_error,
|
|
17233
17372
|
pcb_courtyard_rect,
|
|
17234
17373
|
pcb_courtyard_outline,
|
|
17374
|
+
pcb_courtyard_polygon,
|
|
17235
17375
|
schematic_box,
|
|
17236
17376
|
schematic_text,
|
|
17237
17377
|
schematic_line,
|
|
@@ -17249,6 +17389,7 @@ var any_circuit_element = z123.union([
|
|
|
17249
17389
|
schematic_voltage_probe,
|
|
17250
17390
|
schematic_manual_edit_conflict_warning,
|
|
17251
17391
|
schematic_group,
|
|
17392
|
+
schematic_sheet,
|
|
17252
17393
|
schematic_table,
|
|
17253
17394
|
schematic_table_cell,
|
|
17254
17395
|
cad_component,
|
|
@@ -17256,7 +17397,8 @@ var any_circuit_element = z123.union([
|
|
|
17256
17397
|
simulation_experiment,
|
|
17257
17398
|
simulation_transient_voltage_graph,
|
|
17258
17399
|
simulation_switch,
|
|
17259
|
-
simulation_voltage_probe
|
|
17400
|
+
simulation_voltage_probe,
|
|
17401
|
+
simulation_unknown_experiment_error
|
|
17260
17402
|
]);
|
|
17261
17403
|
expectTypesMatch(true);
|
|
17262
17404
|
expectStringUnionsMatch(true);
|
|
@@ -17271,7 +17413,7 @@ import { z as z710 } from "zod";
|
|
|
17271
17413
|
import { z as z910 } from "zod";
|
|
17272
17414
|
import "zod";
|
|
17273
17415
|
import "zod";
|
|
17274
|
-
import { z as
|
|
17416
|
+
import { z as z1210 } from "zod";
|
|
17275
17417
|
import { z as z132 } from "zod";
|
|
17276
17418
|
import { z as z142 } from "zod";
|
|
17277
17419
|
import { z as z152 } from "zod";
|
|
@@ -17447,12 +17589,12 @@ function convertMilToMm(value) {
|
|
|
17447
17589
|
}
|
|
17448
17590
|
return Number(value);
|
|
17449
17591
|
}
|
|
17450
|
-
var lengthInMm =
|
|
17451
|
-
var extendDipDef = (newDefaults) =>
|
|
17452
|
-
fn:
|
|
17453
|
-
num_pins:
|
|
17454
|
-
wide:
|
|
17455
|
-
narrow:
|
|
17592
|
+
var lengthInMm = z131.union([z131.string(), z131.number()]).transform((val) => convertMilToMm(val));
|
|
17593
|
+
var extendDipDef = (newDefaults) => z131.object({
|
|
17594
|
+
fn: z131.string(),
|
|
17595
|
+
num_pins: z131.number().optional().default(6),
|
|
17596
|
+
wide: z131.boolean().optional(),
|
|
17597
|
+
narrow: z131.boolean().optional(),
|
|
17456
17598
|
w: lengthInMm.optional(),
|
|
17457
17599
|
p: lengthInMm.default(newDefaults.p ?? "2.54mm"),
|
|
17458
17600
|
id: lengthInMm.optional(),
|
|
@@ -18889,24 +19031,24 @@ function determinePinlabelAnchorSide({
|
|
|
18889
19031
|
}
|
|
18890
19032
|
return pinlabelAnchorSide;
|
|
18891
19033
|
}
|
|
18892
|
-
var pinrow_def =
|
|
18893
|
-
fn:
|
|
18894
|
-
num_pins:
|
|
18895
|
-
rows:
|
|
19034
|
+
var pinrow_def = z1210.object({
|
|
19035
|
+
fn: z1210.string(),
|
|
19036
|
+
num_pins: z1210.number().optional().default(6),
|
|
19037
|
+
rows: z1210.union([z1210.string(), z1210.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
|
|
18896
19038
|
p: length.default("0.1in").describe("pitch"),
|
|
18897
19039
|
id: length.default("1.0mm").describe("inner diameter"),
|
|
18898
19040
|
od: length.default("1.5mm").describe("outer diameter"),
|
|
18899
|
-
male:
|
|
18900
|
-
female:
|
|
18901
|
-
pinlabeltextalignleft:
|
|
18902
|
-
pinlabeltextaligncenter:
|
|
18903
|
-
pinlabeltextalignright:
|
|
18904
|
-
pinlabelverticallyinverted:
|
|
18905
|
-
pinlabelorthogonal:
|
|
18906
|
-
nosquareplating:
|
|
18907
|
-
nopinlabels:
|
|
18908
|
-
doublesidedpinlabel:
|
|
18909
|
-
bottomsidepinlabel:
|
|
19041
|
+
male: z1210.boolean().optional().describe("for male pin headers"),
|
|
19042
|
+
female: z1210.boolean().optional().describe("for female pin headers"),
|
|
19043
|
+
pinlabeltextalignleft: z1210.boolean().optional().default(false),
|
|
19044
|
+
pinlabeltextaligncenter: z1210.boolean().optional().default(false),
|
|
19045
|
+
pinlabeltextalignright: z1210.boolean().optional().default(false),
|
|
19046
|
+
pinlabelverticallyinverted: z1210.boolean().optional().default(false),
|
|
19047
|
+
pinlabelorthogonal: z1210.boolean().optional().default(false),
|
|
19048
|
+
nosquareplating: z1210.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
|
|
19049
|
+
nopinlabels: z1210.boolean().optional().default(false).describe("omit silkscreen pin labels"),
|
|
19050
|
+
doublesidedpinlabel: z1210.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
|
|
19051
|
+
bottomsidepinlabel: z1210.boolean().optional().default(false).describe(
|
|
18910
19052
|
"place the silkscreen reference text on the bottom layer instead of top"
|
|
18911
19053
|
)
|
|
18912
19054
|
}).transform((data) => {
|
|
@@ -18920,7 +19062,7 @@ var pinrow_def = z125.object({
|
|
|
18920
19062
|
}).superRefine((data, ctx) => {
|
|
18921
19063
|
if (data.male && data.female) {
|
|
18922
19064
|
ctx.addIssue({
|
|
18923
|
-
code:
|
|
19065
|
+
code: z1210.ZodIssueCode.custom,
|
|
18924
19066
|
message: "'male' and 'female' cannot both be true; it should be male or female.",
|
|
18925
19067
|
path: ["male", "female"]
|
|
18926
19068
|
});
|
|
@@ -24177,7 +24319,7 @@ var m2host = (raw_params) => {
|
|
|
24177
24319
|
}
|
|
24178
24320
|
const centerX = (minX + maxX) / 2;
|
|
24179
24321
|
const centerY = (minY + maxY) / 2;
|
|
24180
|
-
const
|
|
24322
|
+
const translate8 = (el) => {
|
|
24181
24323
|
if (typeof el.x === "number") el.x -= centerX;
|
|
24182
24324
|
if (typeof el.y === "number") el.y -= centerY;
|
|
24183
24325
|
if (el.center) {
|
|
@@ -24191,9 +24333,9 @@ var m2host = (raw_params) => {
|
|
|
24191
24333
|
}));
|
|
24192
24334
|
}
|
|
24193
24335
|
};
|
|
24194
|
-
for (const pad2 of pads)
|
|
24195
|
-
|
|
24196
|
-
|
|
24336
|
+
for (const pad2 of pads) translate8(pad2);
|
|
24337
|
+
translate8(cutout);
|
|
24338
|
+
translate8(pin1Marker);
|
|
24197
24339
|
return {
|
|
24198
24340
|
circuitJson: [
|
|
24199
24341
|
...pads,
|
|
@@ -24552,17 +24694,17 @@ var svgPathPoints = normalizeOnY([
|
|
|
24552
24694
|
]);
|
|
24553
24695
|
var DIP_PIN_HEIGHT = 5.47;
|
|
24554
24696
|
var heightAboveSurface = 0.5;
|
|
24555
|
-
var DipPinLeg = ({ x, y, z:
|
|
24697
|
+
var DipPinLeg = ({ x, y, z: z133 }) => {
|
|
24556
24698
|
const isRotated = x > 0;
|
|
24557
24699
|
return /* @__PURE__ */ jsxs(Fragment22, { children: [
|
|
24558
|
-
/* @__PURE__ */ jsx5(Translate, { offset: { x: x + 0.25 / 2, y, z:
|
|
24700
|
+
/* @__PURE__ */ jsx5(Translate, { offset: { x: x + 0.25 / 2, y, z: z133 }, children: /* @__PURE__ */ jsx5(Rotate, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx5(ExtrudeLinear, { height: 0.25, children: /* @__PURE__ */ jsx5(Polygon, { points: svgPathPoints.map((p) => [p.x, p.y]) }) }) }) }),
|
|
24559
24701
|
/* @__PURE__ */ jsx5(
|
|
24560
24702
|
Translate,
|
|
24561
24703
|
{
|
|
24562
24704
|
offset: {
|
|
24563
24705
|
x,
|
|
24564
24706
|
y: y + (isRotated ? 1 : -1),
|
|
24565
|
-
z:
|
|
24707
|
+
z: z133
|
|
24566
24708
|
},
|
|
24567
24709
|
children: /* @__PURE__ */ jsx5(Rotate, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx5(ExtrudeLinear, { height: 2, children: /* @__PURE__ */ jsx5(
|
|
24568
24710
|
Polygon,
|
|
@@ -26647,7 +26789,7 @@ import * as THREE14 from "three";
|
|
|
26647
26789
|
// package.json
|
|
26648
26790
|
var package_default = {
|
|
26649
26791
|
name: "@tscircuit/3d-viewer",
|
|
26650
|
-
version: "0.0.
|
|
26792
|
+
version: "0.0.424",
|
|
26651
26793
|
main: "./dist/index.js",
|
|
26652
26794
|
module: "./dist/index.js",
|
|
26653
26795
|
type: "module",
|
|
@@ -26708,7 +26850,7 @@ var package_default = {
|
|
|
26708
26850
|
"@vitejs/plugin-react": "^4.3.4",
|
|
26709
26851
|
"bun-match-svg": "^0.0.9",
|
|
26710
26852
|
"bun-types": "1.2.1",
|
|
26711
|
-
"circuit-json": "0.0.
|
|
26853
|
+
"circuit-json": "0.0.300",
|
|
26712
26854
|
"circuit-to-svg": "^0.0.179",
|
|
26713
26855
|
debug: "^4.4.0",
|
|
26714
26856
|
"jscad-electronics": "^0.0.48",
|
|
@@ -27359,11 +27501,11 @@ var useCameraController = ({
|
|
|
27359
27501
|
}) => {
|
|
27360
27502
|
const controlsRef = useRef5(null);
|
|
27361
27503
|
const baseDistance = useMemo14(() => {
|
|
27362
|
-
const [x, y,
|
|
27504
|
+
const [x, y, z133] = initialCameraPosition ?? [5, 5, 5];
|
|
27363
27505
|
const distance2 = Math.hypot(
|
|
27364
27506
|
x - defaultTarget.x,
|
|
27365
27507
|
y - defaultTarget.y,
|
|
27366
|
-
|
|
27508
|
+
z133 - defaultTarget.z
|
|
27367
27509
|
);
|
|
27368
27510
|
return distance2 > 0 ? distance2 : 5;
|
|
27369
27511
|
}, [initialCameraPosition, defaultTarget]);
|
|
@@ -27810,10 +27952,10 @@ var createBoardGeomFromCircuitJson = (circuitJson, opts = {}) => {
|
|
|
27810
27952
|
};
|
|
27811
27953
|
|
|
27812
27954
|
// src/BoardGeomBuilder.ts
|
|
27813
|
-
var
|
|
27814
|
-
var
|
|
27815
|
-
var
|
|
27816
|
-
var
|
|
27955
|
+
var import_transforms6 = __toESM(require_transforms(), 1);
|
|
27956
|
+
var import_primitives8 = __toESM(require_primitives(), 1);
|
|
27957
|
+
var import_colors6 = __toESM(require_colors(), 1);
|
|
27958
|
+
var import_booleans4 = __toESM(require_booleans(), 1);
|
|
27817
27959
|
import { su as su3 } from "@tscircuit/circuit-json-util";
|
|
27818
27960
|
|
|
27819
27961
|
// src/geoms/plated-hole.ts
|
|
@@ -28196,7 +28338,7 @@ var platedHole = (plated_hole, ctx, options = {}) => {
|
|
|
28196
28338
|
};
|
|
28197
28339
|
|
|
28198
28340
|
// src/BoardGeomBuilder.ts
|
|
28199
|
-
var
|
|
28341
|
+
var import_extrusions6 = __toESM(require_extrusions(), 1);
|
|
28200
28342
|
var import_expansions4 = __toESM(require_expansions(), 1);
|
|
28201
28343
|
|
|
28202
28344
|
// src/geoms/create-geoms-for-silkscreen-text.ts
|
|
@@ -28608,9 +28750,71 @@ function createSilkscreenLineGeom(sl, ctx) {
|
|
|
28608
28750
|
return lineGeom;
|
|
28609
28751
|
}
|
|
28610
28752
|
|
|
28611
|
-
// src/geoms/
|
|
28753
|
+
// src/geoms/create-geoms-for-silkscreen-rect.ts
|
|
28612
28754
|
var import_primitives6 = __toESM(require_primitives(), 1);
|
|
28755
|
+
var import_extrusions5 = __toESM(require_extrusions(), 1);
|
|
28756
|
+
var import_transforms5 = __toESM(require_transforms(), 1);
|
|
28757
|
+
var import_colors5 = __toESM(require_colors(), 1);
|
|
28613
28758
|
var import_booleans2 = __toESM(require_booleans(), 1);
|
|
28759
|
+
var RECT_SEGMENTS = 64;
|
|
28760
|
+
function createSilkscreenRectGeom(rect, ctx) {
|
|
28761
|
+
const width10 = coerceDimensionToMm(rect.width, 0);
|
|
28762
|
+
const height10 = coerceDimensionToMm(rect.height, 0);
|
|
28763
|
+
if (width10 <= 0 || height10 <= 0) return void 0;
|
|
28764
|
+
const centerX = parseDimensionToMm(rect.center?.x) ?? 0;
|
|
28765
|
+
const centerY = parseDimensionToMm(rect.center?.y) ?? 0;
|
|
28766
|
+
const rawBorderRadius = extractRectBorderRadius(rect);
|
|
28767
|
+
const borderRadius = clampRectBorderRadius(
|
|
28768
|
+
width10,
|
|
28769
|
+
height10,
|
|
28770
|
+
typeof rawBorderRadius === "string" ? parseDimensionToMm(rawBorderRadius) : rawBorderRadius
|
|
28771
|
+
);
|
|
28772
|
+
const createRectGeom = (rectWidth, rectHeight, radius) => (0, import_extrusions5.extrudeLinear)(
|
|
28773
|
+
{ height: 0.012 },
|
|
28774
|
+
(0, import_primitives6.roundedRectangle)({
|
|
28775
|
+
size: [rectWidth, rectHeight],
|
|
28776
|
+
roundRadius: radius,
|
|
28777
|
+
segments: RECT_SEGMENTS
|
|
28778
|
+
})
|
|
28779
|
+
);
|
|
28780
|
+
const isFilled = rect.is_filled ?? true;
|
|
28781
|
+
const hasStroke = rect.has_stroke ?? false;
|
|
28782
|
+
const strokeWidth = hasStroke ? coerceDimensionToMm(rect.stroke_width, 0.1) : 0;
|
|
28783
|
+
let fillGeom;
|
|
28784
|
+
if (isFilled) {
|
|
28785
|
+
fillGeom = createRectGeom(width10, height10, borderRadius);
|
|
28786
|
+
}
|
|
28787
|
+
let strokeGeom;
|
|
28788
|
+
if (hasStroke && strokeWidth > 0) {
|
|
28789
|
+
const outerGeom = createRectGeom(width10, height10, borderRadius);
|
|
28790
|
+
const innerWidth = width10 - strokeWidth * 2;
|
|
28791
|
+
const innerHeight = height10 - strokeWidth * 2;
|
|
28792
|
+
if (innerWidth > 0 && innerHeight > 0) {
|
|
28793
|
+
const innerRadius = clampRectBorderRadius(
|
|
28794
|
+
innerWidth,
|
|
28795
|
+
innerHeight,
|
|
28796
|
+
Math.max(borderRadius - strokeWidth, 0)
|
|
28797
|
+
);
|
|
28798
|
+
const innerGeom = createRectGeom(innerWidth, innerHeight, innerRadius);
|
|
28799
|
+
strokeGeom = (0, import_booleans2.subtract)(outerGeom, innerGeom);
|
|
28800
|
+
} else {
|
|
28801
|
+
strokeGeom = outerGeom;
|
|
28802
|
+
}
|
|
28803
|
+
}
|
|
28804
|
+
let rectGeom = fillGeom;
|
|
28805
|
+
if (strokeGeom) {
|
|
28806
|
+
rectGeom = rectGeom ? (0, import_booleans2.union)(rectGeom, strokeGeom) : strokeGeom;
|
|
28807
|
+
}
|
|
28808
|
+
if (!rectGeom) return void 0;
|
|
28809
|
+
const layerSign = rect.layer === "bottom" ? -1 : 1;
|
|
28810
|
+
const zPos = layerSign * ctx.pcbThickness / 2 + layerSign * M * 1.5;
|
|
28811
|
+
rectGeom = (0, import_transforms5.translate)([centerX, centerY, zPos], rectGeom);
|
|
28812
|
+
return (0, import_colors5.colorize)([1, 1, 1], rectGeom);
|
|
28813
|
+
}
|
|
28814
|
+
|
|
28815
|
+
// src/geoms/brep-converter.ts
|
|
28816
|
+
var import_primitives7 = __toESM(require_primitives(), 1);
|
|
28817
|
+
var import_booleans3 = __toESM(require_booleans(), 1);
|
|
28614
28818
|
function segmentToPoints(p1, p2, bulge, arcSegments) {
|
|
28615
28819
|
if (!bulge || Math.abs(bulge) < 1e-9) {
|
|
28616
28820
|
return [];
|
|
@@ -28678,7 +28882,7 @@ function createGeom2FromBRep(brep, arcSegments = 16) {
|
|
|
28678
28882
|
if (arePointsClockwise2(outerPoints)) {
|
|
28679
28883
|
outerPoints.reverse();
|
|
28680
28884
|
}
|
|
28681
|
-
const outerGeom = (0,
|
|
28885
|
+
const outerGeom = (0, import_primitives7.polygon)({ points: outerPoints });
|
|
28682
28886
|
if (!brep.inner_rings || brep.inner_rings.length === 0) {
|
|
28683
28887
|
return outerGeom;
|
|
28684
28888
|
}
|
|
@@ -28687,10 +28891,10 @@ function createGeom2FromBRep(brep, arcSegments = 16) {
|
|
|
28687
28891
|
if (arePointsClockwise2(innerPoints)) {
|
|
28688
28892
|
innerPoints.reverse();
|
|
28689
28893
|
}
|
|
28690
|
-
return (0,
|
|
28894
|
+
return (0, import_primitives7.polygon)({ points: innerPoints });
|
|
28691
28895
|
});
|
|
28692
28896
|
if (innerGeoms.length === 0) return outerGeom;
|
|
28693
|
-
return (0,
|
|
28897
|
+
return (0, import_booleans3.subtract)(outerGeom, innerGeoms);
|
|
28694
28898
|
}
|
|
28695
28899
|
|
|
28696
28900
|
// src/BoardGeomBuilder.ts
|
|
@@ -28700,15 +28904,15 @@ var BOARD_CLIP_XY_OUTSET = 0.05;
|
|
|
28700
28904
|
var createCenteredRectPadGeom = (width10, height10, thickness, rectBorderRadius) => {
|
|
28701
28905
|
const clampedRadius = clampRectBorderRadius(width10, height10, rectBorderRadius);
|
|
28702
28906
|
if (clampedRadius <= 0) {
|
|
28703
|
-
return (0,
|
|
28907
|
+
return (0, import_primitives8.cuboid)({ center: [0, 0, 0], size: [width10, height10, thickness] });
|
|
28704
28908
|
}
|
|
28705
|
-
const rect2d = (0,
|
|
28909
|
+
const rect2d = (0, import_primitives8.roundedRectangle)({
|
|
28706
28910
|
size: [width10, height10],
|
|
28707
28911
|
roundRadius: clampedRadius,
|
|
28708
28912
|
segments: PAD_ROUNDED_SEGMENTS
|
|
28709
28913
|
});
|
|
28710
|
-
const extruded = (0,
|
|
28711
|
-
return (0,
|
|
28914
|
+
const extruded = (0, import_extrusions6.extrudeLinear)({ height: thickness }, rect2d);
|
|
28915
|
+
return (0, import_transforms6.translate)([0, 0, -thickness / 2], extruded);
|
|
28712
28916
|
};
|
|
28713
28917
|
var buildStateOrder = [
|
|
28714
28918
|
"initializing",
|
|
@@ -28721,6 +28925,7 @@ var buildStateOrder = [
|
|
|
28721
28925
|
"processing_vias",
|
|
28722
28926
|
"processing_silkscreen_text",
|
|
28723
28927
|
"processing_silkscreen_lines",
|
|
28928
|
+
"processing_silkscreen_rects",
|
|
28724
28929
|
"processing_silkscreen_paths",
|
|
28725
28930
|
"finalizing",
|
|
28726
28931
|
"done"
|
|
@@ -28736,6 +28941,7 @@ var BoardGeomBuilder = class {
|
|
|
28736
28941
|
silkscreenTexts;
|
|
28737
28942
|
silkscreenPaths;
|
|
28738
28943
|
silkscreenLines;
|
|
28944
|
+
silkscreenRects;
|
|
28739
28945
|
pcb_cutouts;
|
|
28740
28946
|
pcb_copper_pours;
|
|
28741
28947
|
boardGeom = null;
|
|
@@ -28749,6 +28955,7 @@ var BoardGeomBuilder = class {
|
|
|
28749
28955
|
silkscreenTextGeoms = [];
|
|
28750
28956
|
silkscreenPathGeoms = [];
|
|
28751
28957
|
silkscreenLineGeoms = [];
|
|
28958
|
+
silkscreenRectGeoms = [];
|
|
28752
28959
|
copperPourGeoms = [];
|
|
28753
28960
|
boardClipGeom = null;
|
|
28754
28961
|
state = "initializing";
|
|
@@ -28783,6 +28990,7 @@ var BoardGeomBuilder = class {
|
|
|
28783
28990
|
this.silkscreenTexts = su3(circuitJson).pcb_silkscreen_text.list();
|
|
28784
28991
|
this.silkscreenPaths = su3(circuitJson).pcb_silkscreen_path.list();
|
|
28785
28992
|
this.silkscreenLines = su3(circuitJson).pcb_silkscreen_line.list();
|
|
28993
|
+
this.silkscreenRects = su3(circuitJson).pcb_silkscreen_rect.list();
|
|
28786
28994
|
this.pcb_cutouts = su3(circuitJson).pcb_cutout.list();
|
|
28787
28995
|
this.pcb_copper_pours = circuitJson.filter(
|
|
28788
28996
|
(e) => e.type === "pcb_copper_pour"
|
|
@@ -28807,11 +29015,11 @@ var BoardGeomBuilder = class {
|
|
|
28807
29015
|
{ xyOutset: BOARD_CLIP_XY_OUTSET }
|
|
28808
29016
|
);
|
|
28809
29017
|
} else {
|
|
28810
|
-
this.boardGeom = (0,
|
|
29018
|
+
this.boardGeom = (0, import_primitives8.cuboid)({
|
|
28811
29019
|
size: [this.board.width, this.board.height, this.ctx.pcbThickness],
|
|
28812
29020
|
center: [this.board.center.x, this.board.center.y, 0]
|
|
28813
29021
|
});
|
|
28814
|
-
this.boardClipGeom = (0,
|
|
29022
|
+
this.boardClipGeom = (0, import_primitives8.cuboid)({
|
|
28815
29023
|
size: [
|
|
28816
29024
|
this.board.width + 2 * BOARD_CLIP_XY_OUTSET,
|
|
28817
29025
|
this.board.height + 2 * BOARD_CLIP_XY_OUTSET,
|
|
@@ -28891,6 +29099,14 @@ var BoardGeomBuilder = class {
|
|
|
28891
29099
|
this.goToNextState();
|
|
28892
29100
|
}
|
|
28893
29101
|
break;
|
|
29102
|
+
case "processing_silkscreen_rects":
|
|
29103
|
+
if (this.currentIndex < this.silkscreenRects.length) {
|
|
29104
|
+
this.processSilkscreenRect(this.silkscreenRects[this.currentIndex]);
|
|
29105
|
+
this.currentIndex++;
|
|
29106
|
+
} else {
|
|
29107
|
+
this.goToNextState();
|
|
29108
|
+
}
|
|
29109
|
+
break;
|
|
28894
29110
|
case "processing_silkscreen_paths":
|
|
28895
29111
|
if (this.currentIndex < this.silkscreenPaths.length) {
|
|
28896
29112
|
this.processSilkscreenPath(this.silkscreenPaths[this.currentIndex]);
|
|
@@ -28929,17 +29145,17 @@ var BoardGeomBuilder = class {
|
|
|
28929
29145
|
const cutoutHeight = this.ctx.pcbThickness * 1.5;
|
|
28930
29146
|
switch (cutout.shape) {
|
|
28931
29147
|
case "rect":
|
|
28932
|
-
cutoutGeom = (0,
|
|
29148
|
+
cutoutGeom = (0, import_primitives8.cuboid)({
|
|
28933
29149
|
center: [cutout.center.x, cutout.center.y, 0],
|
|
28934
29150
|
size: [cutout.width, cutout.height, cutoutHeight]
|
|
28935
29151
|
});
|
|
28936
29152
|
if (cutout.rotation) {
|
|
28937
29153
|
const rotationRadians = cutout.rotation * Math.PI / 180;
|
|
28938
|
-
cutoutGeom = (0,
|
|
29154
|
+
cutoutGeom = (0, import_transforms6.rotateZ)(rotationRadians, cutoutGeom);
|
|
28939
29155
|
}
|
|
28940
29156
|
break;
|
|
28941
29157
|
case "circle":
|
|
28942
|
-
cutoutGeom = (0,
|
|
29158
|
+
cutoutGeom = (0, import_primitives8.cylinder)({
|
|
28943
29159
|
center: [cutout.center.x, cutout.center.y, 0],
|
|
28944
29160
|
radius: cutout.radius,
|
|
28945
29161
|
height: cutoutHeight
|
|
@@ -28956,13 +29172,13 @@ var BoardGeomBuilder = class {
|
|
|
28956
29172
|
if (arePointsClockwise(pointsVec2)) {
|
|
28957
29173
|
pointsVec2 = pointsVec2.reverse();
|
|
28958
29174
|
}
|
|
28959
|
-
const polygon2d = (0,
|
|
28960
|
-
cutoutGeom = (0,
|
|
28961
|
-
cutoutGeom = (0,
|
|
29175
|
+
const polygon2d = (0, import_primitives8.polygon)({ points: pointsVec2 });
|
|
29176
|
+
cutoutGeom = (0, import_extrusions6.extrudeLinear)({ height: cutoutHeight }, polygon2d);
|
|
29177
|
+
cutoutGeom = (0, import_transforms6.translate)([0, 0, -cutoutHeight / 2], cutoutGeom);
|
|
28962
29178
|
break;
|
|
28963
29179
|
}
|
|
28964
29180
|
if (cutoutGeom) {
|
|
28965
|
-
this.boardGeom = (0,
|
|
29181
|
+
this.boardGeom = (0, import_booleans4.subtract)(this.boardGeom, cutoutGeom);
|
|
28966
29182
|
}
|
|
28967
29183
|
}
|
|
28968
29184
|
processCopperPour(pour) {
|
|
@@ -28970,22 +29186,22 @@ var BoardGeomBuilder = class {
|
|
|
28970
29186
|
const zPos = layerSign * this.ctx.pcbThickness / 2 + layerSign * BOARD_SURFACE_OFFSET.copper;
|
|
28971
29187
|
let pourGeom = null;
|
|
28972
29188
|
if (pour.shape === "rect") {
|
|
28973
|
-
let baseGeom = (0,
|
|
29189
|
+
let baseGeom = (0, import_primitives8.cuboid)({
|
|
28974
29190
|
center: [0, 0, 0],
|
|
28975
29191
|
// Create at origin for rotation
|
|
28976
29192
|
size: [pour.width, pour.height, M]
|
|
28977
29193
|
});
|
|
28978
29194
|
if ("rotation" in pour && pour.rotation) {
|
|
28979
29195
|
const rotationRadians = pour.rotation * Math.PI / 180;
|
|
28980
|
-
baseGeom = (0,
|
|
29196
|
+
baseGeom = (0, import_transforms6.rotateZ)(rotationRadians, baseGeom);
|
|
28981
29197
|
}
|
|
28982
|
-
pourGeom = (0,
|
|
29198
|
+
pourGeom = (0, import_transforms6.translate)([pour.center.x, pour.center.y, zPos], baseGeom);
|
|
28983
29199
|
} else if (pour.shape === "brep") {
|
|
28984
29200
|
const brepShape = pour.brep_shape;
|
|
28985
29201
|
if (brepShape && brepShape.outer_ring) {
|
|
28986
29202
|
const pourGeom2 = createGeom2FromBRep(brepShape);
|
|
28987
|
-
pourGeom = (0,
|
|
28988
|
-
pourGeom = (0,
|
|
29203
|
+
pourGeom = (0, import_extrusions6.extrudeLinear)({ height: M }, pourGeom2);
|
|
29204
|
+
pourGeom = (0, import_transforms6.translate)([0, 0, zPos], pourGeom);
|
|
28989
29205
|
}
|
|
28990
29206
|
} else if (pour.shape === "polygon") {
|
|
28991
29207
|
let pointsVec2 = pour.points.map((p) => [p.x, p.y]);
|
|
@@ -28998,15 +29214,17 @@ var BoardGeomBuilder = class {
|
|
|
28998
29214
|
if (arePointsClockwise(pointsVec2)) {
|
|
28999
29215
|
pointsVec2 = pointsVec2.reverse();
|
|
29000
29216
|
}
|
|
29001
|
-
const polygon2d = (0,
|
|
29002
|
-
pourGeom = (0,
|
|
29003
|
-
pourGeom = (0,
|
|
29217
|
+
const polygon2d = (0, import_primitives8.polygon)({ points: pointsVec2 });
|
|
29218
|
+
pourGeom = (0, import_extrusions6.extrudeLinear)({ height: M }, polygon2d);
|
|
29219
|
+
pourGeom = (0, import_transforms6.translate)([0, 0, zPos], pourGeom);
|
|
29004
29220
|
}
|
|
29005
29221
|
if (pourGeom) {
|
|
29006
29222
|
if (this.boardClipGeom) {
|
|
29007
|
-
pourGeom = (0,
|
|
29223
|
+
pourGeom = (0, import_booleans4.intersect)(this.boardClipGeom, pourGeom);
|
|
29008
29224
|
}
|
|
29009
|
-
const
|
|
29225
|
+
const covered = pour.covered_with_solder_mask !== false;
|
|
29226
|
+
const pourMaterialColor = covered ? tracesMaterialColors[this.board.material] ?? colors.fr4GreenSolderWithMask : colors.copper;
|
|
29227
|
+
const coloredPourGeom = (0, import_colors6.colorize)(pourMaterialColor, pourGeom);
|
|
29010
29228
|
this.copperPourGeoms.push(coloredPourGeom);
|
|
29011
29229
|
}
|
|
29012
29230
|
}
|
|
@@ -29015,7 +29233,7 @@ var BoardGeomBuilder = class {
|
|
|
29015
29233
|
if (ph.shape === "circle" || ph.shape === "circular_hole_with_rect_pad") {
|
|
29016
29234
|
let cyGeom = null;
|
|
29017
29235
|
if (ph.shape === "circular_hole_with_rect_pad") {
|
|
29018
|
-
cyGeom = (0,
|
|
29236
|
+
cyGeom = (0, import_primitives8.cylinder)({
|
|
29019
29237
|
center: [
|
|
29020
29238
|
ph.x + (ph.hole_offset_x || 0),
|
|
29021
29239
|
ph.y + (ph.hole_offset_y || 0),
|
|
@@ -29027,7 +29245,7 @@ var BoardGeomBuilder = class {
|
|
|
29027
29245
|
// Ensure it cuts through
|
|
29028
29246
|
});
|
|
29029
29247
|
} else {
|
|
29030
|
-
cyGeom = (0,
|
|
29248
|
+
cyGeom = (0, import_primitives8.cylinder)({
|
|
29031
29249
|
center: [ph.x, ph.y, 0],
|
|
29032
29250
|
radius: ph.hole_diameter / 2 + M,
|
|
29033
29251
|
// Add margin for subtraction
|
|
@@ -29036,10 +29254,10 @@ var BoardGeomBuilder = class {
|
|
|
29036
29254
|
});
|
|
29037
29255
|
}
|
|
29038
29256
|
if (!opts.dontCutBoard) {
|
|
29039
|
-
this.boardGeom = (0,
|
|
29257
|
+
this.boardGeom = (0, import_booleans4.subtract)(this.boardGeom, cyGeom);
|
|
29040
29258
|
}
|
|
29041
29259
|
this.padGeoms = this.padGeoms.map(
|
|
29042
|
-
(pg) => (0,
|
|
29260
|
+
(pg) => (0, import_colors6.colorize)(colors.copper, (0, import_booleans4.subtract)(pg, cyGeom))
|
|
29043
29261
|
);
|
|
29044
29262
|
const platedHoleGeom = platedHole(ph, this.ctx, {
|
|
29045
29263
|
clipGeom: this.boardClipGeom
|
|
@@ -29053,8 +29271,8 @@ var BoardGeomBuilder = class {
|
|
|
29053
29271
|
const rectLength = Math.abs(holeWidth - holeHeight);
|
|
29054
29272
|
let pillHole;
|
|
29055
29273
|
if (ph.shape === "pill_hole_with_rect_pad") {
|
|
29056
|
-
pillHole = (0,
|
|
29057
|
-
(0,
|
|
29274
|
+
pillHole = (0, import_booleans4.union)(
|
|
29275
|
+
(0, import_primitives8.cuboid)({
|
|
29058
29276
|
center: [
|
|
29059
29277
|
ph.x + (ph.hole_offset_x || 0),
|
|
29060
29278
|
ph.y + (ph.hole_offset_y || 0),
|
|
@@ -29062,7 +29280,7 @@ var BoardGeomBuilder = class {
|
|
|
29062
29280
|
],
|
|
29063
29281
|
size: shouldRotate ? [holeHeight, rectLength, this.ctx.pcbThickness * 1.5] : [rectLength, holeHeight, this.ctx.pcbThickness * 1.5]
|
|
29064
29282
|
}),
|
|
29065
|
-
(0,
|
|
29283
|
+
(0, import_primitives8.cylinder)({
|
|
29066
29284
|
center: shouldRotate ? [
|
|
29067
29285
|
ph.x + (ph.hole_offset_x || 0),
|
|
29068
29286
|
ph.y + (ph.hole_offset_y || 0) - rectLength / 2,
|
|
@@ -29075,7 +29293,7 @@ var BoardGeomBuilder = class {
|
|
|
29075
29293
|
radius: holeRadius,
|
|
29076
29294
|
height: this.ctx.pcbThickness * 1.5
|
|
29077
29295
|
}),
|
|
29078
|
-
(0,
|
|
29296
|
+
(0, import_primitives8.cylinder)({
|
|
29079
29297
|
center: shouldRotate ? [
|
|
29080
29298
|
ph.x + (ph.hole_offset_x || 0),
|
|
29081
29299
|
ph.y + (ph.hole_offset_y || 0) + rectLength / 2,
|
|
@@ -29090,17 +29308,17 @@ var BoardGeomBuilder = class {
|
|
|
29090
29308
|
})
|
|
29091
29309
|
);
|
|
29092
29310
|
} else {
|
|
29093
|
-
pillHole = (0,
|
|
29094
|
-
(0,
|
|
29311
|
+
pillHole = (0, import_booleans4.union)(
|
|
29312
|
+
(0, import_primitives8.cuboid)({
|
|
29095
29313
|
center: [ph.x, ph.y, 0],
|
|
29096
29314
|
size: shouldRotate ? [holeHeight, rectLength, this.ctx.pcbThickness * 1.5] : [rectLength, holeHeight, this.ctx.pcbThickness * 1.5]
|
|
29097
29315
|
}),
|
|
29098
|
-
(0,
|
|
29316
|
+
(0, import_primitives8.cylinder)({
|
|
29099
29317
|
center: shouldRotate ? [ph.x, ph.y - rectLength / 2, 0] : [ph.x - rectLength / 2, ph.y, 0],
|
|
29100
29318
|
radius: holeRadius,
|
|
29101
29319
|
height: this.ctx.pcbThickness * 1.5
|
|
29102
29320
|
}),
|
|
29103
|
-
(0,
|
|
29321
|
+
(0, import_primitives8.cylinder)({
|
|
29104
29322
|
center: shouldRotate ? [ph.x, ph.y + rectLength / 2, 0] : [ph.x + rectLength / 2, ph.y, 0],
|
|
29105
29323
|
radius: holeRadius,
|
|
29106
29324
|
height: this.ctx.pcbThickness * 1.5
|
|
@@ -29108,10 +29326,10 @@ var BoardGeomBuilder = class {
|
|
|
29108
29326
|
);
|
|
29109
29327
|
}
|
|
29110
29328
|
if (!opts.dontCutBoard) {
|
|
29111
|
-
this.boardGeom = (0,
|
|
29329
|
+
this.boardGeom = (0, import_booleans4.subtract)(this.boardGeom, pillHole);
|
|
29112
29330
|
}
|
|
29113
29331
|
this.padGeoms = this.padGeoms.map(
|
|
29114
|
-
(pg) => (0,
|
|
29332
|
+
(pg) => (0, import_colors6.colorize)(colors.copper, (0, import_booleans4.subtract)(pg, pillHole))
|
|
29115
29333
|
);
|
|
29116
29334
|
const platedHoleGeom = platedHole(ph, this.ctx, {
|
|
29117
29335
|
clipGeom: this.boardClipGeom
|
|
@@ -29124,22 +29342,22 @@ var BoardGeomBuilder = class {
|
|
|
29124
29342
|
const holeDepth = this.ctx.pcbThickness * 1.5;
|
|
29125
29343
|
const copperInset = 0.02;
|
|
29126
29344
|
if (hole.hole_shape === "round" || hole.hole_shape === "circle") {
|
|
29127
|
-
const cyGeom = (0,
|
|
29345
|
+
const cyGeom = (0, import_primitives8.cylinder)({
|
|
29128
29346
|
center: [hole.x, hole.y, 0],
|
|
29129
29347
|
radius: hole.hole_diameter / 2 + M,
|
|
29130
29348
|
height: holeDepth
|
|
29131
29349
|
});
|
|
29132
|
-
this.boardGeom = (0,
|
|
29350
|
+
this.boardGeom = (0, import_booleans4.subtract)(this.boardGeom, cyGeom);
|
|
29133
29351
|
this.padGeoms = this.padGeoms.map(
|
|
29134
|
-
(pg) => (0,
|
|
29352
|
+
(pg) => (0, import_colors6.colorize)(colors.copper, (0, import_booleans4.subtract)(pg, cyGeom))
|
|
29135
29353
|
);
|
|
29136
|
-
const copperCut = (0,
|
|
29354
|
+
const copperCut = (0, import_primitives8.cylinder)({
|
|
29137
29355
|
center: [hole.x, hole.y, 0],
|
|
29138
29356
|
radius: hole.hole_diameter / 2 + M / 2,
|
|
29139
29357
|
height: holeDepth
|
|
29140
29358
|
});
|
|
29141
29359
|
this.platedHoleGeoms = this.platedHoleGeoms.map(
|
|
29142
|
-
(phg) => (0,
|
|
29360
|
+
(phg) => (0, import_colors6.colorize)(colors.copper, (0, import_booleans4.subtract)(phg, copperCut))
|
|
29143
29361
|
);
|
|
29144
29362
|
} else if (hole.hole_shape === "pill" || hole.hole_shape === "rotated_pill") {
|
|
29145
29363
|
const holeWidth = hole.hole_width;
|
|
@@ -29149,34 +29367,34 @@ var BoardGeomBuilder = class {
|
|
|
29149
29367
|
const isRotated = hole.hole_shape === "rotated_pill";
|
|
29150
29368
|
let pillHole;
|
|
29151
29369
|
if (holeWidth > holeHeight) {
|
|
29152
|
-
pillHole = (0,
|
|
29153
|
-
(0,
|
|
29370
|
+
pillHole = (0, import_booleans4.union)(
|
|
29371
|
+
(0, import_primitives8.cuboid)({
|
|
29154
29372
|
center: [hole.x, hole.y, 0],
|
|
29155
29373
|
size: [rectLength, holeHeight, holeDepth]
|
|
29156
29374
|
}),
|
|
29157
|
-
(0,
|
|
29375
|
+
(0, import_primitives8.cylinder)({
|
|
29158
29376
|
center: [hole.x - rectLength / 2, hole.y, 0],
|
|
29159
29377
|
radius: holeRadius,
|
|
29160
29378
|
height: holeDepth
|
|
29161
29379
|
}),
|
|
29162
|
-
(0,
|
|
29380
|
+
(0, import_primitives8.cylinder)({
|
|
29163
29381
|
center: [hole.x + rectLength / 2, hole.y, 0],
|
|
29164
29382
|
radius: holeRadius,
|
|
29165
29383
|
height: holeDepth
|
|
29166
29384
|
})
|
|
29167
29385
|
);
|
|
29168
29386
|
} else {
|
|
29169
|
-
pillHole = (0,
|
|
29170
|
-
(0,
|
|
29387
|
+
pillHole = (0, import_booleans4.union)(
|
|
29388
|
+
(0, import_primitives8.cuboid)({
|
|
29171
29389
|
center: [hole.x, hole.y, 0],
|
|
29172
29390
|
size: [holeWidth, rectLength, holeDepth]
|
|
29173
29391
|
}),
|
|
29174
|
-
(0,
|
|
29392
|
+
(0, import_primitives8.cylinder)({
|
|
29175
29393
|
center: [hole.x, hole.y - rectLength / 2, 0],
|
|
29176
29394
|
radius: holeRadius,
|
|
29177
29395
|
height: holeDepth
|
|
29178
29396
|
}),
|
|
29179
|
-
(0,
|
|
29397
|
+
(0, import_primitives8.cylinder)({
|
|
29180
29398
|
center: [hole.x, hole.y + rectLength / 2, 0],
|
|
29181
29399
|
radius: holeRadius,
|
|
29182
29400
|
height: holeDepth
|
|
@@ -29185,15 +29403,15 @@ var BoardGeomBuilder = class {
|
|
|
29185
29403
|
}
|
|
29186
29404
|
if (isRotated) {
|
|
29187
29405
|
const rotationRadians = hole.ccw_rotation * Math.PI / 180;
|
|
29188
|
-
pillHole = (0,
|
|
29406
|
+
pillHole = (0, import_transforms6.rotateZ)(rotationRadians, pillHole);
|
|
29189
29407
|
}
|
|
29190
|
-
this.boardGeom = (0,
|
|
29408
|
+
this.boardGeom = (0, import_booleans4.subtract)(this.boardGeom, pillHole);
|
|
29191
29409
|
this.padGeoms = this.padGeoms.map(
|
|
29192
|
-
(pg) => (0,
|
|
29410
|
+
(pg) => (0, import_colors6.colorize)(colors.copper, (0, import_booleans4.subtract)(pg, pillHole))
|
|
29193
29411
|
);
|
|
29194
29412
|
const copperPill = (0, import_expansions4.expand)({ delta: -copperInset }, pillHole);
|
|
29195
29413
|
this.platedHoleGeoms = this.platedHoleGeoms.map(
|
|
29196
|
-
(phg) => (0,
|
|
29414
|
+
(phg) => (0, import_colors6.colorize)(colors.copper, (0, import_booleans4.subtract)(phg, copperPill))
|
|
29197
29415
|
);
|
|
29198
29416
|
}
|
|
29199
29417
|
}
|
|
@@ -29208,12 +29426,12 @@ var BoardGeomBuilder = class {
|
|
|
29208
29426
|
M,
|
|
29209
29427
|
rectBorderRadius
|
|
29210
29428
|
);
|
|
29211
|
-
const positionedPadGeom = (0,
|
|
29429
|
+
const positionedPadGeom = (0, import_transforms6.translate)([pad2.x, pad2.y, zPos], basePadGeom);
|
|
29212
29430
|
let finalPadGeom = positionedPadGeom;
|
|
29213
29431
|
if (this.boardClipGeom) {
|
|
29214
|
-
finalPadGeom = (0,
|
|
29432
|
+
finalPadGeom = (0, import_booleans4.intersect)(this.boardClipGeom, finalPadGeom);
|
|
29215
29433
|
}
|
|
29216
|
-
finalPadGeom = (0,
|
|
29434
|
+
finalPadGeom = (0, import_colors6.colorize)(colors.copper, finalPadGeom);
|
|
29217
29435
|
this.padGeoms.push(finalPadGeom);
|
|
29218
29436
|
} else if (pad2.shape === "rotated_rect") {
|
|
29219
29437
|
let basePadGeom = createCenteredRectPadGeom(
|
|
@@ -29223,24 +29441,24 @@ var BoardGeomBuilder = class {
|
|
|
29223
29441
|
rectBorderRadius
|
|
29224
29442
|
);
|
|
29225
29443
|
const rotationRadians = pad2.ccw_rotation * Math.PI / 180;
|
|
29226
|
-
basePadGeom = (0,
|
|
29227
|
-
const positionedPadGeom = (0,
|
|
29444
|
+
basePadGeom = (0, import_transforms6.rotateZ)(rotationRadians, basePadGeom);
|
|
29445
|
+
const positionedPadGeom = (0, import_transforms6.translate)([pad2.x, pad2.y, zPos], basePadGeom);
|
|
29228
29446
|
let finalPadGeom = positionedPadGeom;
|
|
29229
29447
|
if (this.boardClipGeom) {
|
|
29230
|
-
finalPadGeom = (0,
|
|
29448
|
+
finalPadGeom = (0, import_booleans4.intersect)(this.boardClipGeom, finalPadGeom);
|
|
29231
29449
|
}
|
|
29232
|
-
finalPadGeom = (0,
|
|
29450
|
+
finalPadGeom = (0, import_colors6.colorize)(colors.copper, finalPadGeom);
|
|
29233
29451
|
this.padGeoms.push(finalPadGeom);
|
|
29234
29452
|
} else if (pad2.shape === "circle") {
|
|
29235
|
-
let padGeom = (0,
|
|
29453
|
+
let padGeom = (0, import_primitives8.cylinder)({
|
|
29236
29454
|
center: [pad2.x, pad2.y, zPos],
|
|
29237
29455
|
radius: pad2.radius,
|
|
29238
29456
|
height: M
|
|
29239
29457
|
});
|
|
29240
29458
|
if (this.boardClipGeom) {
|
|
29241
|
-
padGeom = (0,
|
|
29459
|
+
padGeom = (0, import_booleans4.intersect)(this.boardClipGeom, padGeom);
|
|
29242
29460
|
}
|
|
29243
|
-
padGeom = (0,
|
|
29461
|
+
padGeom = (0, import_colors6.colorize)(colors.copper, padGeom);
|
|
29244
29462
|
this.padGeoms.push(padGeom);
|
|
29245
29463
|
}
|
|
29246
29464
|
}
|
|
@@ -29254,14 +29472,14 @@ var BoardGeomBuilder = class {
|
|
|
29254
29472
|
if (currentSegmentPoints.length >= 2 && currentLayer) {
|
|
29255
29473
|
const layerSign = currentLayer === "bottom" ? -1 : 1;
|
|
29256
29474
|
const zCenter = layerSign * this.ctx.pcbThickness / 2 + layerSign * BOARD_SURFACE_OFFSET.traces;
|
|
29257
|
-
const linePath = (0,
|
|
29475
|
+
const linePath = (0, import_primitives8.line)(currentSegmentPoints);
|
|
29258
29476
|
const expandedPath = (0, import_expansions4.expand)(
|
|
29259
29477
|
{ delta: currentWidth / 2, corners: "round" },
|
|
29260
29478
|
linePath
|
|
29261
29479
|
);
|
|
29262
|
-
let traceGeom = (0,
|
|
29480
|
+
let traceGeom = (0, import_transforms6.translate)(
|
|
29263
29481
|
[0, 0, zCenter - M / 2],
|
|
29264
|
-
(0,
|
|
29482
|
+
(0, import_extrusions6.extrudeLinear)({ height: M }, expandedPath)
|
|
29265
29483
|
);
|
|
29266
29484
|
const startPointCoords = currentSegmentPoints[0];
|
|
29267
29485
|
const endPointCoords = currentSegmentPoints[currentSegmentPoints.length - 1];
|
|
@@ -29270,27 +29488,27 @@ var BoardGeomBuilder = class {
|
|
|
29270
29488
|
startPointCoords[1]
|
|
29271
29489
|
);
|
|
29272
29490
|
if (startHole) {
|
|
29273
|
-
const cuttingCylinder = (0,
|
|
29491
|
+
const cuttingCylinder = (0, import_primitives8.cylinder)({
|
|
29274
29492
|
center: [startPointCoords[0], startPointCoords[1], zCenter],
|
|
29275
29493
|
radius: startHole.diameter / 2 + M,
|
|
29276
29494
|
height: M
|
|
29277
29495
|
});
|
|
29278
|
-
traceGeom = (0,
|
|
29496
|
+
traceGeom = (0, import_booleans4.subtract)(traceGeom, cuttingCylinder);
|
|
29279
29497
|
}
|
|
29280
29498
|
const endHole = this.getHoleToCut(endPointCoords[0], endPointCoords[1]);
|
|
29281
29499
|
if (endHole) {
|
|
29282
|
-
const cuttingCylinder = (0,
|
|
29500
|
+
const cuttingCylinder = (0, import_primitives8.cylinder)({
|
|
29283
29501
|
center: [endPointCoords[0], endPointCoords[1], zCenter],
|
|
29284
29502
|
radius: endHole.diameter / 2 + M,
|
|
29285
29503
|
height: M
|
|
29286
29504
|
});
|
|
29287
|
-
traceGeom = (0,
|
|
29505
|
+
traceGeom = (0, import_booleans4.subtract)(traceGeom, cuttingCylinder);
|
|
29288
29506
|
}
|
|
29289
29507
|
const tracesMaterialColor = tracesMaterialColors[this.board.material] ?? colors.fr4GreenSolderWithMask;
|
|
29290
29508
|
if (this.boardClipGeom) {
|
|
29291
|
-
traceGeom = (0,
|
|
29509
|
+
traceGeom = (0, import_booleans4.intersect)(this.boardClipGeom, traceGeom);
|
|
29292
29510
|
}
|
|
29293
|
-
traceGeom = (0,
|
|
29511
|
+
traceGeom = (0, import_colors6.colorize)(tracesMaterialColor, traceGeom);
|
|
29294
29512
|
this.traceGeoms.push(traceGeom);
|
|
29295
29513
|
}
|
|
29296
29514
|
currentSegmentPoints = [];
|
|
@@ -29357,7 +29575,7 @@ var BoardGeomBuilder = class {
|
|
|
29357
29575
|
point2[0] + xOffset + st.anchor_position.x,
|
|
29358
29576
|
point2[1] + yOffset + st.anchor_position.y
|
|
29359
29577
|
]);
|
|
29360
|
-
const textPath = (0,
|
|
29578
|
+
const textPath = (0, import_primitives8.line)(alignedOutline);
|
|
29361
29579
|
const fontSize = st.font_size || 0.25;
|
|
29362
29580
|
const expansionDelta = Math.min(
|
|
29363
29581
|
Math.max(0.01, fontSize * 0.1),
|
|
@@ -29369,19 +29587,19 @@ var BoardGeomBuilder = class {
|
|
|
29369
29587
|
);
|
|
29370
29588
|
let textGeom;
|
|
29371
29589
|
if (st.layer === "bottom") {
|
|
29372
|
-
textGeom = (0,
|
|
29590
|
+
textGeom = (0, import_transforms6.translate)(
|
|
29373
29591
|
[0, 0, -this.ctx.pcbThickness / 2 - M],
|
|
29374
29592
|
// Position above board
|
|
29375
|
-
(0,
|
|
29593
|
+
(0, import_extrusions6.extrudeLinear)({ height: 0.012 }, expandedPath)
|
|
29376
29594
|
);
|
|
29377
29595
|
} else {
|
|
29378
|
-
textGeom = (0,
|
|
29596
|
+
textGeom = (0, import_transforms6.translate)(
|
|
29379
29597
|
[0, 0, this.ctx.pcbThickness / 2 + M],
|
|
29380
29598
|
// Position above board
|
|
29381
|
-
(0,
|
|
29599
|
+
(0, import_extrusions6.extrudeLinear)({ height: 0.012 }, expandedPath)
|
|
29382
29600
|
);
|
|
29383
29601
|
}
|
|
29384
|
-
textGeom = (0,
|
|
29602
|
+
textGeom = (0, import_colors6.colorize)([1, 1, 1], textGeom);
|
|
29385
29603
|
this.silkscreenTextGeoms.push(textGeom);
|
|
29386
29604
|
}
|
|
29387
29605
|
}
|
|
@@ -29397,10 +29615,16 @@ var BoardGeomBuilder = class {
|
|
|
29397
29615
|
this.silkscreenLineGeoms.push(lineGeom);
|
|
29398
29616
|
}
|
|
29399
29617
|
}
|
|
29618
|
+
processSilkscreenRect(sr) {
|
|
29619
|
+
const rectGeom = createSilkscreenRectGeom(sr, this.ctx);
|
|
29620
|
+
if (rectGeom) {
|
|
29621
|
+
this.silkscreenRectGeoms.push(rectGeom);
|
|
29622
|
+
}
|
|
29623
|
+
}
|
|
29400
29624
|
finalize() {
|
|
29401
29625
|
if (!this.boardGeom) return;
|
|
29402
29626
|
const boardMaterialColor = boardMaterialColors[this.board.material] ?? colors.fr4Green;
|
|
29403
|
-
this.boardGeom = (0,
|
|
29627
|
+
this.boardGeom = (0, import_colors6.colorize)(boardMaterialColor, this.boardGeom);
|
|
29404
29628
|
this.finalGeoms = [
|
|
29405
29629
|
this.boardGeom,
|
|
29406
29630
|
...this.platedHoleGeoms,
|
|
@@ -29410,6 +29634,7 @@ var BoardGeomBuilder = class {
|
|
|
29410
29634
|
...this.copperPourGeoms,
|
|
29411
29635
|
...this.silkscreenTextGeoms,
|
|
29412
29636
|
...this.silkscreenLineGeoms,
|
|
29637
|
+
...this.silkscreenRectGeoms,
|
|
29413
29638
|
...this.silkscreenPathGeoms
|
|
29414
29639
|
];
|
|
29415
29640
|
if (this.onCompleteCallback) {
|
|
@@ -29927,10 +30152,12 @@ function createSilkscreenTextureForLayer({
|
|
|
29927
30152
|
const pcbSilkscreenTexts = su6(circuitJson).pcb_silkscreen_text.list();
|
|
29928
30153
|
const pcbSilkscreenPaths = su6(circuitJson).pcb_silkscreen_path.list();
|
|
29929
30154
|
const pcbSilkscreenLines = su6(circuitJson).pcb_silkscreen_line.list();
|
|
30155
|
+
const pcbSilkscreenRects = su6(circuitJson).pcb_silkscreen_rect.list();
|
|
29930
30156
|
const textsOnLayer = pcbSilkscreenTexts.filter((t) => t.layer === layer);
|
|
29931
30157
|
const pathsOnLayer = pcbSilkscreenPaths.filter((p) => p.layer === layer);
|
|
29932
30158
|
const linesOnLayer = pcbSilkscreenLines.filter((l) => l.layer === layer);
|
|
29933
|
-
|
|
30159
|
+
const rectsOnLayer = pcbSilkscreenRects.filter((r) => r.layer === layer);
|
|
30160
|
+
if (textsOnLayer.length === 0 && pathsOnLayer.length === 0 && linesOnLayer.length === 0 && rectsOnLayer.length === 0) {
|
|
29934
30161
|
return null;
|
|
29935
30162
|
}
|
|
29936
30163
|
const canvas = document.createElement("canvas");
|
|
@@ -29975,6 +30202,77 @@ function createSilkscreenTextureForLayer({
|
|
|
29975
30202
|
});
|
|
29976
30203
|
ctx.stroke();
|
|
29977
30204
|
});
|
|
30205
|
+
rectsOnLayer.forEach((rect) => {
|
|
30206
|
+
const width10 = coerceDimensionToMm(rect.width, 0);
|
|
30207
|
+
const height10 = coerceDimensionToMm(rect.height, 0);
|
|
30208
|
+
if (width10 <= 0 || height10 <= 0) return;
|
|
30209
|
+
const centerXmm = parseDimensionToMm(rect.center?.x) ?? 0;
|
|
30210
|
+
const centerYmm = parseDimensionToMm(rect.center?.y) ?? 0;
|
|
30211
|
+
const canvasCenterX = canvasXFromPcb(centerXmm);
|
|
30212
|
+
const canvasCenterY = canvasYFromPcb(centerYmm);
|
|
30213
|
+
const rawRadius = extractRectBorderRadius(rect);
|
|
30214
|
+
const borderRadiusInput = typeof rawRadius === "string" ? parseDimensionToMm(rawRadius) : rawRadius;
|
|
30215
|
+
const borderRadiusMm = clampRectBorderRadius(
|
|
30216
|
+
width10,
|
|
30217
|
+
height10,
|
|
30218
|
+
borderRadiusInput
|
|
30219
|
+
);
|
|
30220
|
+
ctx.save();
|
|
30221
|
+
ctx.translate(canvasCenterX, canvasCenterY);
|
|
30222
|
+
const halfWidthPx = width10 / 2 * traceTextureResolution;
|
|
30223
|
+
const halfHeightPx = height10 / 2 * traceTextureResolution;
|
|
30224
|
+
const borderRadiusPx = Math.min(
|
|
30225
|
+
borderRadiusMm * traceTextureResolution,
|
|
30226
|
+
halfWidthPx,
|
|
30227
|
+
halfHeightPx
|
|
30228
|
+
);
|
|
30229
|
+
const hasStroke = rect.has_stroke ?? false;
|
|
30230
|
+
const isFilled = rect.is_filled ?? true;
|
|
30231
|
+
const isDashed = rect.is_stroke_dashed ?? false;
|
|
30232
|
+
const strokeWidthPx = hasStroke ? coerceDimensionToMm(rect.stroke_width, 0.1) * traceTextureResolution : 0;
|
|
30233
|
+
const drawRoundedRectPath = (x, y, rectWidth, rectHeight, radius) => {
|
|
30234
|
+
ctx.beginPath();
|
|
30235
|
+
if (radius <= 0) {
|
|
30236
|
+
ctx.rect(x, y, rectWidth, rectHeight);
|
|
30237
|
+
} else {
|
|
30238
|
+
const r = radius;
|
|
30239
|
+
const right = x + rectWidth;
|
|
30240
|
+
const bottom = y + rectHeight;
|
|
30241
|
+
ctx.moveTo(x + r, y);
|
|
30242
|
+
ctx.lineTo(right - r, y);
|
|
30243
|
+
ctx.quadraticCurveTo(right, y, right, y + r);
|
|
30244
|
+
ctx.lineTo(right, bottom - r);
|
|
30245
|
+
ctx.quadraticCurveTo(right, bottom, right - r, bottom);
|
|
30246
|
+
ctx.lineTo(x + r, bottom);
|
|
30247
|
+
ctx.quadraticCurveTo(x, bottom, x, bottom - r);
|
|
30248
|
+
ctx.lineTo(x, y + r);
|
|
30249
|
+
ctx.quadraticCurveTo(x, y, x + r, y);
|
|
30250
|
+
ctx.closePath();
|
|
30251
|
+
}
|
|
30252
|
+
};
|
|
30253
|
+
drawRoundedRectPath(
|
|
30254
|
+
-halfWidthPx,
|
|
30255
|
+
-halfHeightPx,
|
|
30256
|
+
halfWidthPx * 2,
|
|
30257
|
+
halfHeightPx * 2,
|
|
30258
|
+
borderRadiusPx
|
|
30259
|
+
);
|
|
30260
|
+
if (isFilled) {
|
|
30261
|
+
ctx.fill();
|
|
30262
|
+
}
|
|
30263
|
+
if (hasStroke && strokeWidthPx > 0) {
|
|
30264
|
+
ctx.lineWidth = strokeWidthPx;
|
|
30265
|
+
if (isDashed) {
|
|
30266
|
+
const dashLength = Math.max(strokeWidthPx * 2, 1);
|
|
30267
|
+
ctx.setLineDash([dashLength, dashLength]);
|
|
30268
|
+
}
|
|
30269
|
+
ctx.stroke();
|
|
30270
|
+
if (isDashed) {
|
|
30271
|
+
ctx.setLineDash([]);
|
|
30272
|
+
}
|
|
30273
|
+
}
|
|
30274
|
+
ctx.restore();
|
|
30275
|
+
});
|
|
29978
30276
|
textsOnLayer.forEach((textS) => {
|
|
29979
30277
|
const fontSize = textS.font_size || 0.25;
|
|
29980
30278
|
const textStrokeWidth = Math.min(Math.max(0.01, fontSize * 0.1), fontSize * 0.05) * traceTextureResolution;
|
|
@@ -30753,7 +31051,6 @@ function createManifoldBoard(Manifold, CrossSection, boardData, pcbThickness, ma
|
|
|
30753
31051
|
|
|
30754
31052
|
// src/utils/manifold/process-copper-pours.ts
|
|
30755
31053
|
import * as THREE23 from "three";
|
|
30756
|
-
var COPPER_COLOR4 = new THREE23.Color(...colors.copper);
|
|
30757
31054
|
var arePointsClockwise4 = (points) => {
|
|
30758
31055
|
let area = 0;
|
|
30759
31056
|
for (let i = 0; i < points.length; i++) {
|
|
@@ -30819,7 +31116,7 @@ function ringToPoints2(ring2, arcSegments) {
|
|
|
30819
31116
|
}
|
|
30820
31117
|
return allPoints;
|
|
30821
31118
|
}
|
|
30822
|
-
function processCopperPoursForManifold(Manifold, CrossSection, circuitJson, pcbThickness, manifoldInstancesForCleanup, holeUnion, boardClipVolume) {
|
|
31119
|
+
function processCopperPoursForManifold(Manifold, CrossSection, circuitJson, pcbThickness, manifoldInstancesForCleanup, boardMaterial, holeUnion, boardClipVolume) {
|
|
30823
31120
|
const copperPourGeoms = [];
|
|
30824
31121
|
const copperPours = circuitJson.filter(
|
|
30825
31122
|
(e) => e.type === "pcb_copper_pour"
|
|
@@ -30911,11 +31208,14 @@ function processCopperPoursForManifold(Manifold, CrossSection, circuitJson, pcbT
|
|
|
30911
31208
|
manifoldInstancesForCleanup.push(clipped);
|
|
30912
31209
|
pourOp = clipped;
|
|
30913
31210
|
}
|
|
31211
|
+
const covered = pour.covered_with_solder_mask !== false;
|
|
31212
|
+
const pourColorArr = covered ? tracesMaterialColors[boardMaterial] ?? colors.fr4GreenSolderWithMask : colors.copper;
|
|
31213
|
+
const pourColor = new THREE23.Color(...pourColorArr);
|
|
30914
31214
|
const threeGeom = manifoldMeshToThreeGeometry(pourOp.getMesh());
|
|
30915
31215
|
copperPourGeoms.push({
|
|
30916
31216
|
key: `coppour-${pour.pcb_copper_pour_id}`,
|
|
30917
31217
|
geometry: threeGeom,
|
|
30918
|
-
color:
|
|
31218
|
+
color: pourColor
|
|
30919
31219
|
});
|
|
30920
31220
|
}
|
|
30921
31221
|
}
|
|
@@ -31210,6 +31510,7 @@ var useManifoldBoardBuilder = (manifoldJSModule, circuitJson) => {
|
|
|
31210
31510
|
circuitJson,
|
|
31211
31511
|
currentPcbThickness,
|
|
31212
31512
|
manifoldInstancesForCleanup.current,
|
|
31513
|
+
boardData.material,
|
|
31213
31514
|
holeUnion,
|
|
31214
31515
|
boardClipVolume
|
|
31215
31516
|
);
|