@tscircuit/3d-viewer 0.0.441 → 0.0.442
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 +1182 -1136
- 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, z135) => [x, y, z135],
|
|
148
|
+
fromValues: (x, y, z135) => [x, y, z135]
|
|
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, z135] = axis;
|
|
536
|
+
const lengthSquared = x * x + y * y + z135 * z135;
|
|
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
|
+
z135 *= 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 + z135 * s;
|
|
549
|
+
out[2] = z135 * x * t - y * s;
|
|
550
550
|
out[3] = 0;
|
|
551
|
-
out[4] = x * y * t -
|
|
551
|
+
out[4] = x * y * t - z135 * s;
|
|
552
552
|
out[5] = y * y * t + c;
|
|
553
|
-
out[6] =
|
|
553
|
+
out[6] = z135 * y * t + x * s;
|
|
554
554
|
out[7] = 0;
|
|
555
|
-
out[8] = x *
|
|
556
|
-
out[9] = y *
|
|
557
|
-
out[10] =
|
|
555
|
+
out[8] = x * z135 * t + y * s;
|
|
556
|
+
out[9] = y * z135 * t - x * s;
|
|
557
|
+
out[10] = z135 * z135 * 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 z135 = b[2] - a[2];
|
|
812
|
+
return Math.sqrt(x * x + y * y + z135 * z135);
|
|
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, z135) => {
|
|
861
861
|
const out = create();
|
|
862
862
|
out[0] = x;
|
|
863
863
|
out[1] = y;
|
|
864
|
-
out[2] =
|
|
864
|
+
out[2] = z135;
|
|
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, z135 = 0) => {
|
|
876
876
|
out[0] = vector[0];
|
|
877
877
|
out[1] = vector[1];
|
|
878
|
-
out[2] =
|
|
878
|
+
out[2] = z135;
|
|
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 z135 = vector[2];
|
|
893
|
+
return Math.sqrt(x * x + y * y + z135 * z135);
|
|
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 z135 = vector[2];
|
|
977
|
+
let len = x * x + y * y + z135 * z135;
|
|
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] = z135 * len;
|
|
984
984
|
return out;
|
|
985
985
|
};
|
|
986
986
|
module.exports = normalize;
|
|
@@ -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 z135 = b[2] - a[2];
|
|
1108
|
+
return x * x + y * y + z135 * z135;
|
|
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 z135 = vector[2];
|
|
1122
|
+
return x * x + y * y + z135 * z135;
|
|
1123
1123
|
};
|
|
1124
1124
|
module.exports = squaredLength;
|
|
1125
1125
|
}
|
|
@@ -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 z135 = vector[2];
|
|
1159
|
+
let w = matrix[3] * x + matrix[7] * y + matrix[11] * z135 + 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] * z135 + matrix[12]) / w;
|
|
1162
|
+
out[1] = (matrix[1] * x + matrix[5] * y + matrix[9] * z135 + matrix[13]) / w;
|
|
1163
|
+
out[2] = (matrix[2] * x + matrix[6] * y + matrix[10] * z135 + 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 z135 = matrix[0] * matrix[5] - matrix[4] * matrix[1];
|
|
1366
|
+
const d = x * matrix[2] + y * matrix[6] + z135 * matrix[10];
|
|
1367
1367
|
return d < 0;
|
|
1368
1368
|
};
|
|
1369
1369
|
module.exports = isMirroring;
|
|
@@ -1464,16 +1464,16 @@ var require_rotate = __commonJS({
|
|
|
1464
1464
|
var { EPS } = require_constants();
|
|
1465
1465
|
var { sin: sin2, cos: cos2 } = require_trigonometry();
|
|
1466
1466
|
var copy = require_copy();
|
|
1467
|
-
var
|
|
1468
|
-
let [x, y,
|
|
1469
|
-
const lengthSquared = x * x + y * y +
|
|
1467
|
+
var rotate3 = (out, matrix, radians, axis) => {
|
|
1468
|
+
let [x, y, z135] = axis;
|
|
1469
|
+
const lengthSquared = x * x + y * y + z135 * z135;
|
|
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
|
+
z135 *= 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 + z135 * s;
|
|
1494
|
+
const b02 = z135 * x * t - y * s;
|
|
1495
|
+
const b10 = x * y * t - z135 * 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 = z135 * y * t + x * s;
|
|
1498
|
+
const b20 = x * z135 * t + y * s;
|
|
1499
|
+
const b21 = y * z135 * t - x * s;
|
|
1500
|
+
const b22 = z135 * z135 * 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;
|
|
@@ -1518,7 +1518,7 @@ var require_rotate = __commonJS({
|
|
|
1518
1518
|
}
|
|
1519
1519
|
return out;
|
|
1520
1520
|
};
|
|
1521
|
-
module.exports =
|
|
1521
|
+
module.exports = rotate3;
|
|
1522
1522
|
}
|
|
1523
1523
|
});
|
|
1524
1524
|
|
|
@@ -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 z135 = 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] * z135;
|
|
1662
|
+
out[9] = matrix[9] * z135;
|
|
1663
|
+
out[10] = matrix[10] * z135;
|
|
1664
|
+
out[11] = matrix[11] * z135;
|
|
1665
1665
|
out[12] = matrix[12];
|
|
1666
1666
|
out[13] = matrix[13];
|
|
1667
1667
|
out[14] = matrix[14];
|
|
@@ -1715,7 +1715,7 @@ var require_translate = __commonJS({
|
|
|
1715
1715
|
var translate10 = (out, matrix, offsets) => {
|
|
1716
1716
|
const x = offsets[0];
|
|
1717
1717
|
const y = offsets[1];
|
|
1718
|
-
const
|
|
1718
|
+
const z135 = 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] * z135 + matrix[12];
|
|
1733
|
+
out[13] = matrix[1] * x + matrix[5] * y + matrix[9] * z135 + matrix[13];
|
|
1734
|
+
out[14] = matrix[2] * x + matrix[6] * y + matrix[10] * z135 + matrix[14];
|
|
1735
|
+
out[15] = matrix[3] * x + matrix[7] * y + matrix[11] * z135 + matrix[15];
|
|
1736
1736
|
} else {
|
|
1737
1737
|
a00 = matrix[0];
|
|
1738
1738
|
a01 = matrix[1];
|
|
@@ -1758,10 +1758,10 @@ 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 * z135 + matrix[12];
|
|
1762
|
+
out[13] = a01 * x + a11 * y + a21 * z135 + matrix[13];
|
|
1763
|
+
out[14] = a02 * x + a12 * y + a22 * z135 + matrix[14];
|
|
1764
|
+
out[15] = a03 * x + a13 * y + a23 * z135 + matrix[15];
|
|
1765
1765
|
}
|
|
1766
1766
|
return out;
|
|
1767
1767
|
};
|
|
@@ -2105,7 +2105,7 @@ var require_negate2 = __commonJS({
|
|
|
2105
2105
|
var require_rotate2 = __commonJS({
|
|
2106
2106
|
"node_modules/@jscad/modeling/src/maths/vec2/rotate.js"(exports, module) {
|
|
2107
2107
|
"use strict";
|
|
2108
|
-
var
|
|
2108
|
+
var rotate3 = (out, vector, origin, radians) => {
|
|
2109
2109
|
const x = vector[0] - origin[0];
|
|
2110
2110
|
const y = vector[1] - origin[1];
|
|
2111
2111
|
const c = Math.cos(radians);
|
|
@@ -2114,7 +2114,7 @@ var require_rotate2 = __commonJS({
|
|
|
2114
2114
|
out[1] = x * s + y * c + origin[1];
|
|
2115
2115
|
return out;
|
|
2116
2116
|
};
|
|
2117
|
-
module.exports =
|
|
2117
|
+
module.exports = rotate3;
|
|
2118
2118
|
}
|
|
2119
2119
|
});
|
|
2120
2120
|
|
|
@@ -2124,8 +2124,8 @@ var require_normal = __commonJS({
|
|
|
2124
2124
|
"use strict";
|
|
2125
2125
|
var { TAU } = require_constants();
|
|
2126
2126
|
var create = require_create4();
|
|
2127
|
-
var
|
|
2128
|
-
var normal = (out, vector) =>
|
|
2127
|
+
var rotate3 = require_rotate2();
|
|
2128
|
+
var normal = (out, vector) => rotate3(out, vector, create(), TAU / 4);
|
|
2129
2129
|
module.exports = normal;
|
|
2130
2130
|
}
|
|
2131
2131
|
});
|
|
@@ -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, z135, w) => {
|
|
3835
3835
|
const out = create();
|
|
3836
3836
|
out[0] = x;
|
|
3837
3837
|
out[1] = y;
|
|
3838
|
-
out[2] =
|
|
3838
|
+
out[2] = z135;
|
|
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 z135 = point2[2] - a * plane[2];
|
|
3997
|
+
return vec3.fromValues(x, y, z135);
|
|
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, z135, w] = vector;
|
|
4302
|
+
out[0] = matrix[0] * x + matrix[4] * y + matrix[8] * z135 + matrix[12] * w;
|
|
4303
|
+
out[1] = matrix[1] * x + matrix[5] * y + matrix[9] * z135 + matrix[13] * w;
|
|
4304
|
+
out[2] = matrix[2] * x + matrix[6] * y + matrix[10] * z135 + matrix[14] * w;
|
|
4305
|
+
out[3] = matrix[3] * x + matrix[7] * y + matrix[11] * z135 + 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 z135 = out[2] - maxz[2];
|
|
4368
|
+
out[3] = Math.sqrt(x * x + y * y + z135 * z135);
|
|
4369
4369
|
cache.set(polygon3, out);
|
|
4370
4370
|
return out;
|
|
4371
4371
|
};
|
|
@@ -9707,7 +9707,7 @@ var require_rotate3 = __commonJS({
|
|
|
9707
9707
|
var geom2 = require_geom2();
|
|
9708
9708
|
var geom3 = require_geom3();
|
|
9709
9709
|
var path2 = require_path2();
|
|
9710
|
-
var
|
|
9710
|
+
var rotate3 = (angles, ...objects) => {
|
|
9711
9711
|
if (!Array.isArray(angles)) throw new Error("angles must be an array");
|
|
9712
9712
|
objects = flatten(objects);
|
|
9713
9713
|
if (objects.length === 0) throw new Error("wrong number of arguments");
|
|
@@ -9725,11 +9725,11 @@ var require_rotate3 = __commonJS({
|
|
|
9725
9725
|
});
|
|
9726
9726
|
return results.length === 1 ? results[0] : results;
|
|
9727
9727
|
};
|
|
9728
|
-
var rotateX = (angle, ...objects) =>
|
|
9729
|
-
var rotateY = (angle, ...objects) =>
|
|
9730
|
-
var rotateZ4 = (angle, ...objects) =>
|
|
9728
|
+
var rotateX = (angle, ...objects) => rotate3([angle, 0, 0], objects);
|
|
9729
|
+
var rotateY = (angle, ...objects) => rotate3([0, angle, 0], objects);
|
|
9730
|
+
var rotateZ4 = (angle, ...objects) => rotate3([0, 0, angle], objects);
|
|
9731
9731
|
module.exports = {
|
|
9732
|
-
rotate:
|
|
9732
|
+
rotate: rotate3,
|
|
9733
9733
|
rotateX,
|
|
9734
9734
|
rotateY,
|
|
9735
9735
|
rotateZ: rotateZ4
|
|
@@ -9779,7 +9779,7 @@ var require_torus = __commonJS({
|
|
|
9779
9779
|
"use strict";
|
|
9780
9780
|
var { TAU } = require_constants();
|
|
9781
9781
|
var extrudeRotate = require_extrudeRotate();
|
|
9782
|
-
var { rotate:
|
|
9782
|
+
var { rotate: rotate3 } = require_rotate3();
|
|
9783
9783
|
var { translate: translate10 } = require_translate2();
|
|
9784
9784
|
var circle2 = require_circle();
|
|
9785
9785
|
var { isGT, isGTE } = require_commonChecks();
|
|
@@ -9803,7 +9803,7 @@ var require_torus = __commonJS({
|
|
|
9803
9803
|
if (innerRadius >= outerRadius) throw new Error("inner circle is too large to rotate about the outer circle");
|
|
9804
9804
|
let innerCircle = circle2({ radius: innerRadius, segments: innerSegments });
|
|
9805
9805
|
if (innerRotation !== 0) {
|
|
9806
|
-
innerCircle =
|
|
9806
|
+
innerCircle = rotate3([0, 0, innerRotation], innerCircle);
|
|
9807
9807
|
}
|
|
9808
9808
|
innerCircle = translate10([outerRadius, 0], innerCircle);
|
|
9809
9809
|
const extrudeOptions = {
|
|
@@ -14751,7 +14751,7 @@ var import_jscad_planner = __toESM(require_dist(), 1);
|
|
|
14751
14751
|
var import_modeling = __toESM(require_src(), 1);
|
|
14752
14752
|
|
|
14753
14753
|
// node_modules/@tscircuit/footprinter/dist/index.js
|
|
14754
|
-
import { z as
|
|
14754
|
+
import { z as z133 } from "zod";
|
|
14755
14755
|
|
|
14756
14756
|
// node_modules/@tscircuit/mm/dist/index.js
|
|
14757
14757
|
var unitToMm = {
|
|
@@ -14833,9 +14833,9 @@ import { z as z50 } from "zod";
|
|
|
14833
14833
|
import { z as z51 } from "zod";
|
|
14834
14834
|
import { z as z52 } from "zod";
|
|
14835
14835
|
import { z as z53 } from "zod";
|
|
14836
|
-
import { z as z55 } from "zod";
|
|
14837
14836
|
import { z as z54 } from "zod";
|
|
14838
14837
|
import { z as z56 } from "zod";
|
|
14838
|
+
import { z as z55 } from "zod";
|
|
14839
14839
|
import { z as z57 } from "zod";
|
|
14840
14840
|
import { z as z58 } from "zod";
|
|
14841
14841
|
import { z as z59 } from "zod";
|
|
@@ -14911,6 +14911,7 @@ import { z as z128 } from "zod";
|
|
|
14911
14911
|
import { z as z129 } from "zod";
|
|
14912
14912
|
import { z as z130 } from "zod";
|
|
14913
14913
|
import { z as z131 } from "zod";
|
|
14914
|
+
import { z as z132 } from "zod";
|
|
14914
14915
|
var unitMappings = {
|
|
14915
14916
|
Hz: {
|
|
14916
14917
|
baseUnit: "Hz",
|
|
@@ -15556,191 +15557,205 @@ var source_manually_placed_via = z44.object({
|
|
|
15556
15557
|
source_trace_id: z44.string().optional()
|
|
15557
15558
|
}).describe("Defines a via that is manually placed in the source domain");
|
|
15558
15559
|
expectTypesMatch(true);
|
|
15559
|
-
var
|
|
15560
|
-
type: z45.literal("
|
|
15561
|
-
|
|
15562
|
-
"
|
|
15560
|
+
var source_pin_must_be_connected_error = z45.object({
|
|
15561
|
+
type: z45.literal("source_pin_must_be_connected_error"),
|
|
15562
|
+
source_pin_must_be_connected_error_id: getZodPrefixedIdWithDefault(
|
|
15563
|
+
"source_pin_must_be_connected_error"
|
|
15563
15564
|
),
|
|
15564
|
-
error_type: z45.literal("
|
|
15565
|
+
error_type: z45.literal("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),
|
|
15565
15566
|
message: z45.string(),
|
|
15566
|
-
source_component_id: z45.string()
|
|
15567
|
+
source_component_id: z45.string(),
|
|
15568
|
+
source_port_id: z45.string(),
|
|
15567
15569
|
subcircuit_id: z45.string().optional()
|
|
15570
|
+
}).describe(
|
|
15571
|
+
"Error emitted when a pin with mustBeConnected attribute is not connected to any trace"
|
|
15572
|
+
);
|
|
15573
|
+
expectTypesMatch(true);
|
|
15574
|
+
var unknown_error_finding_part = z46.object({
|
|
15575
|
+
type: z46.literal("unknown_error_finding_part"),
|
|
15576
|
+
unknown_error_finding_part_id: getZodPrefixedIdWithDefault(
|
|
15577
|
+
"unknown_error_finding_part"
|
|
15578
|
+
),
|
|
15579
|
+
error_type: z46.literal("unknown_error_finding_part").default("unknown_error_finding_part"),
|
|
15580
|
+
message: z46.string(),
|
|
15581
|
+
source_component_id: z46.string().optional(),
|
|
15582
|
+
subcircuit_id: z46.string().optional()
|
|
15568
15583
|
}).describe(
|
|
15569
15584
|
"Error emitted when an unexpected error occurs while finding a part"
|
|
15570
15585
|
);
|
|
15571
15586
|
expectTypesMatch(true);
|
|
15572
|
-
var schematic_box =
|
|
15573
|
-
type:
|
|
15574
|
-
schematic_component_id:
|
|
15587
|
+
var schematic_box = z47.object({
|
|
15588
|
+
type: z47.literal("schematic_box"),
|
|
15589
|
+
schematic_component_id: z47.string().optional(),
|
|
15575
15590
|
width: distance,
|
|
15576
15591
|
height: distance,
|
|
15577
|
-
is_dashed:
|
|
15592
|
+
is_dashed: z47.boolean().default(false),
|
|
15578
15593
|
x: distance,
|
|
15579
15594
|
y: distance,
|
|
15580
|
-
subcircuit_id:
|
|
15595
|
+
subcircuit_id: z47.string().optional()
|
|
15581
15596
|
}).describe("Draws a box on the schematic");
|
|
15582
15597
|
expectTypesMatch(true);
|
|
15583
|
-
var schematic_path =
|
|
15584
|
-
type:
|
|
15585
|
-
schematic_component_id:
|
|
15586
|
-
fill_color:
|
|
15587
|
-
is_filled:
|
|
15588
|
-
points:
|
|
15589
|
-
subcircuit_id:
|
|
15598
|
+
var schematic_path = z48.object({
|
|
15599
|
+
type: z48.literal("schematic_path"),
|
|
15600
|
+
schematic_component_id: z48.string(),
|
|
15601
|
+
fill_color: z48.enum(["red", "blue"]).optional(),
|
|
15602
|
+
is_filled: z48.boolean().optional(),
|
|
15603
|
+
points: z48.array(point),
|
|
15604
|
+
subcircuit_id: z48.string().optional()
|
|
15590
15605
|
});
|
|
15591
15606
|
expectTypesMatch(true);
|
|
15592
|
-
var schematic_pin_styles =
|
|
15593
|
-
|
|
15607
|
+
var schematic_pin_styles = z49.record(
|
|
15608
|
+
z49.object({
|
|
15594
15609
|
left_margin: length.optional(),
|
|
15595
15610
|
right_margin: length.optional(),
|
|
15596
15611
|
top_margin: length.optional(),
|
|
15597
15612
|
bottom_margin: length.optional()
|
|
15598
15613
|
})
|
|
15599
15614
|
);
|
|
15600
|
-
var schematic_component_port_arrangement_by_size =
|
|
15601
|
-
left_size:
|
|
15602
|
-
right_size:
|
|
15603
|
-
top_size:
|
|
15604
|
-
bottom_size:
|
|
15615
|
+
var schematic_component_port_arrangement_by_size = z49.object({
|
|
15616
|
+
left_size: z49.number(),
|
|
15617
|
+
right_size: z49.number(),
|
|
15618
|
+
top_size: z49.number().optional(),
|
|
15619
|
+
bottom_size: z49.number().optional()
|
|
15605
15620
|
});
|
|
15606
15621
|
expectTypesMatch(true);
|
|
15607
|
-
var schematic_component_port_arrangement_by_sides =
|
|
15608
|
-
left_side:
|
|
15609
|
-
pins:
|
|
15622
|
+
var schematic_component_port_arrangement_by_sides = z49.object({
|
|
15623
|
+
left_side: z49.object({
|
|
15624
|
+
pins: z49.array(z49.number()),
|
|
15610
15625
|
// @ts-ignore
|
|
15611
|
-
direction:
|
|
15626
|
+
direction: z49.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
15612
15627
|
}).optional(),
|
|
15613
|
-
right_side:
|
|
15614
|
-
pins:
|
|
15628
|
+
right_side: z49.object({
|
|
15629
|
+
pins: z49.array(z49.number()),
|
|
15615
15630
|
// @ts-ignore
|
|
15616
|
-
direction:
|
|
15631
|
+
direction: z49.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
15617
15632
|
}).optional(),
|
|
15618
|
-
top_side:
|
|
15619
|
-
pins:
|
|
15633
|
+
top_side: z49.object({
|
|
15634
|
+
pins: z49.array(z49.number()),
|
|
15620
15635
|
// @ts-ignore
|
|
15621
|
-
direction:
|
|
15636
|
+
direction: z49.enum(["left-to-right", "right-to-left"]).optional()
|
|
15622
15637
|
}).optional(),
|
|
15623
|
-
bottom_side:
|
|
15624
|
-
pins:
|
|
15638
|
+
bottom_side: z49.object({
|
|
15639
|
+
pins: z49.array(z49.number()),
|
|
15625
15640
|
// @ts-ignore
|
|
15626
|
-
direction:
|
|
15641
|
+
direction: z49.enum(["left-to-right", "right-to-left"]).optional()
|
|
15627
15642
|
}).optional()
|
|
15628
15643
|
});
|
|
15629
15644
|
expectTypesMatch(true);
|
|
15630
|
-
var port_arrangement =
|
|
15645
|
+
var port_arrangement = z49.union([
|
|
15631
15646
|
schematic_component_port_arrangement_by_size,
|
|
15632
15647
|
schematic_component_port_arrangement_by_sides
|
|
15633
15648
|
]);
|
|
15634
|
-
var schematic_component =
|
|
15635
|
-
type:
|
|
15649
|
+
var schematic_component = z49.object({
|
|
15650
|
+
type: z49.literal("schematic_component"),
|
|
15636
15651
|
size,
|
|
15637
15652
|
center: point,
|
|
15638
|
-
source_component_id:
|
|
15639
|
-
schematic_component_id:
|
|
15653
|
+
source_component_id: z49.string().optional(),
|
|
15654
|
+
schematic_component_id: z49.string(),
|
|
15640
15655
|
pin_spacing: length.optional(),
|
|
15641
15656
|
pin_styles: schematic_pin_styles.optional(),
|
|
15642
15657
|
box_width: length.optional(),
|
|
15643
|
-
symbol_name:
|
|
15658
|
+
symbol_name: z49.string().optional(),
|
|
15644
15659
|
port_arrangement: port_arrangement.optional(),
|
|
15645
|
-
port_labels:
|
|
15646
|
-
symbol_display_value:
|
|
15647
|
-
subcircuit_id:
|
|
15648
|
-
schematic_group_id:
|
|
15649
|
-
is_schematic_group:
|
|
15650
|
-
source_group_id:
|
|
15651
|
-
is_box_with_pins:
|
|
15660
|
+
port_labels: z49.record(z49.string()).optional(),
|
|
15661
|
+
symbol_display_value: z49.string().optional(),
|
|
15662
|
+
subcircuit_id: z49.string().optional(),
|
|
15663
|
+
schematic_group_id: z49.string().optional(),
|
|
15664
|
+
is_schematic_group: z49.boolean().optional(),
|
|
15665
|
+
source_group_id: z49.string().optional(),
|
|
15666
|
+
is_box_with_pins: z49.boolean().optional().default(true)
|
|
15652
15667
|
});
|
|
15653
15668
|
expectTypesMatch(true);
|
|
15654
|
-
var schematic_line =
|
|
15655
|
-
type:
|
|
15669
|
+
var schematic_line = z50.object({
|
|
15670
|
+
type: z50.literal("schematic_line"),
|
|
15656
15671
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
15657
|
-
schematic_component_id:
|
|
15672
|
+
schematic_component_id: z50.string(),
|
|
15658
15673
|
x1: distance,
|
|
15659
15674
|
y1: distance,
|
|
15660
15675
|
x2: distance,
|
|
15661
15676
|
y2: distance,
|
|
15662
15677
|
stroke_width: distance.nullable().optional(),
|
|
15663
|
-
color:
|
|
15664
|
-
is_dashed:
|
|
15665
|
-
subcircuit_id:
|
|
15678
|
+
color: z50.string().default("#000000"),
|
|
15679
|
+
is_dashed: z50.boolean().default(false),
|
|
15680
|
+
subcircuit_id: z50.string().optional()
|
|
15666
15681
|
}).describe("Draws a styled line on the schematic");
|
|
15667
15682
|
expectTypesMatch(true);
|
|
15668
|
-
var schematic_rect =
|
|
15669
|
-
type:
|
|
15683
|
+
var schematic_rect = z51.object({
|
|
15684
|
+
type: z51.literal("schematic_rect"),
|
|
15670
15685
|
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
15671
|
-
schematic_component_id:
|
|
15686
|
+
schematic_component_id: z51.string(),
|
|
15672
15687
|
center: point,
|
|
15673
15688
|
width: distance,
|
|
15674
15689
|
height: distance,
|
|
15675
15690
|
rotation: rotation.default(0),
|
|
15676
15691
|
stroke_width: distance.nullable().optional(),
|
|
15677
|
-
color:
|
|
15678
|
-
is_filled:
|
|
15679
|
-
fill_color:
|
|
15680
|
-
is_dashed:
|
|
15681
|
-
subcircuit_id:
|
|
15692
|
+
color: z51.string().default("#000000"),
|
|
15693
|
+
is_filled: z51.boolean().default(false),
|
|
15694
|
+
fill_color: z51.string().optional(),
|
|
15695
|
+
is_dashed: z51.boolean().default(false),
|
|
15696
|
+
subcircuit_id: z51.string().optional()
|
|
15682
15697
|
}).describe("Draws a styled rectangle on the schematic");
|
|
15683
15698
|
expectTypesMatch(true);
|
|
15684
|
-
var schematic_circle =
|
|
15685
|
-
type:
|
|
15699
|
+
var schematic_circle = z52.object({
|
|
15700
|
+
type: z52.literal("schematic_circle"),
|
|
15686
15701
|
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
15687
|
-
schematic_component_id:
|
|
15702
|
+
schematic_component_id: z52.string(),
|
|
15688
15703
|
center: point,
|
|
15689
15704
|
radius: distance,
|
|
15690
15705
|
stroke_width: distance.nullable().optional(),
|
|
15691
|
-
color:
|
|
15692
|
-
is_filled:
|
|
15693
|
-
fill_color:
|
|
15694
|
-
is_dashed:
|
|
15695
|
-
subcircuit_id:
|
|
15706
|
+
color: z52.string().default("#000000"),
|
|
15707
|
+
is_filled: z52.boolean().default(false),
|
|
15708
|
+
fill_color: z52.string().optional(),
|
|
15709
|
+
is_dashed: z52.boolean().default(false),
|
|
15710
|
+
subcircuit_id: z52.string().optional()
|
|
15696
15711
|
}).describe("Draws a styled circle on the schematic");
|
|
15697
15712
|
expectTypesMatch(true);
|
|
15698
|
-
var schematic_arc =
|
|
15699
|
-
type:
|
|
15713
|
+
var schematic_arc = z53.object({
|
|
15714
|
+
type: z53.literal("schematic_arc"),
|
|
15700
15715
|
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
15701
|
-
schematic_component_id:
|
|
15716
|
+
schematic_component_id: z53.string(),
|
|
15702
15717
|
center: point,
|
|
15703
15718
|
radius: distance,
|
|
15704
15719
|
start_angle_degrees: rotation,
|
|
15705
15720
|
end_angle_degrees: rotation,
|
|
15706
|
-
direction:
|
|
15721
|
+
direction: z53.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
15707
15722
|
stroke_width: distance.nullable().optional(),
|
|
15708
|
-
color:
|
|
15709
|
-
is_dashed:
|
|
15710
|
-
subcircuit_id:
|
|
15723
|
+
color: z53.string().default("#000000"),
|
|
15724
|
+
is_dashed: z53.boolean().default(false),
|
|
15725
|
+
subcircuit_id: z53.string().optional()
|
|
15711
15726
|
}).describe("Draws a styled arc on the schematic");
|
|
15712
15727
|
expectTypesMatch(true);
|
|
15713
|
-
var schematic_trace =
|
|
15714
|
-
type:
|
|
15715
|
-
schematic_trace_id:
|
|
15716
|
-
source_trace_id:
|
|
15717
|
-
junctions:
|
|
15718
|
-
|
|
15719
|
-
x:
|
|
15720
|
-
y:
|
|
15728
|
+
var schematic_trace = z54.object({
|
|
15729
|
+
type: z54.literal("schematic_trace"),
|
|
15730
|
+
schematic_trace_id: z54.string(),
|
|
15731
|
+
source_trace_id: z54.string().optional(),
|
|
15732
|
+
junctions: z54.array(
|
|
15733
|
+
z54.object({
|
|
15734
|
+
x: z54.number(),
|
|
15735
|
+
y: z54.number()
|
|
15721
15736
|
})
|
|
15722
15737
|
),
|
|
15723
|
-
edges:
|
|
15724
|
-
|
|
15725
|
-
from:
|
|
15726
|
-
x:
|
|
15727
|
-
y:
|
|
15738
|
+
edges: z54.array(
|
|
15739
|
+
z54.object({
|
|
15740
|
+
from: z54.object({
|
|
15741
|
+
x: z54.number(),
|
|
15742
|
+
y: z54.number()
|
|
15728
15743
|
}),
|
|
15729
|
-
to:
|
|
15730
|
-
x:
|
|
15731
|
-
y:
|
|
15744
|
+
to: z54.object({
|
|
15745
|
+
x: z54.number(),
|
|
15746
|
+
y: z54.number()
|
|
15732
15747
|
}),
|
|
15733
|
-
is_crossing:
|
|
15734
|
-
from_schematic_port_id:
|
|
15735
|
-
to_schematic_port_id:
|
|
15748
|
+
is_crossing: z54.boolean().optional(),
|
|
15749
|
+
from_schematic_port_id: z54.string().optional(),
|
|
15750
|
+
to_schematic_port_id: z54.string().optional()
|
|
15736
15751
|
})
|
|
15737
15752
|
),
|
|
15738
|
-
subcircuit_id:
|
|
15753
|
+
subcircuit_id: z54.string().optional(),
|
|
15739
15754
|
// TODO: make required in a future release
|
|
15740
|
-
subcircuit_connectivity_map_key:
|
|
15755
|
+
subcircuit_connectivity_map_key: z54.string().optional()
|
|
15741
15756
|
});
|
|
15742
15757
|
expectTypesMatch(true);
|
|
15743
|
-
var fivePointAnchor =
|
|
15758
|
+
var fivePointAnchor = z55.enum([
|
|
15744
15759
|
"center",
|
|
15745
15760
|
"left",
|
|
15746
15761
|
"right",
|
|
@@ -15748,464 +15763,476 @@ var fivePointAnchor = z54.enum([
|
|
|
15748
15763
|
"bottom"
|
|
15749
15764
|
]);
|
|
15750
15765
|
expectTypesMatch(true);
|
|
15751
|
-
var schematic_text =
|
|
15752
|
-
type:
|
|
15753
|
-
schematic_component_id:
|
|
15754
|
-
schematic_text_id:
|
|
15755
|
-
text:
|
|
15756
|
-
font_size:
|
|
15757
|
-
position:
|
|
15766
|
+
var schematic_text = z56.object({
|
|
15767
|
+
type: z56.literal("schematic_text"),
|
|
15768
|
+
schematic_component_id: z56.string().optional(),
|
|
15769
|
+
schematic_text_id: z56.string(),
|
|
15770
|
+
text: z56.string(),
|
|
15771
|
+
font_size: z56.number().default(0.18),
|
|
15772
|
+
position: z56.object({
|
|
15758
15773
|
x: distance,
|
|
15759
15774
|
y: distance
|
|
15760
15775
|
}),
|
|
15761
|
-
rotation:
|
|
15762
|
-
anchor:
|
|
15763
|
-
color:
|
|
15764
|
-
subcircuit_id:
|
|
15776
|
+
rotation: z56.number().default(0),
|
|
15777
|
+
anchor: z56.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
15778
|
+
color: z56.string().default("#000000"),
|
|
15779
|
+
subcircuit_id: z56.string().optional()
|
|
15765
15780
|
});
|
|
15766
15781
|
expectTypesMatch(true);
|
|
15767
|
-
var schematic_port =
|
|
15768
|
-
type:
|
|
15769
|
-
schematic_port_id:
|
|
15770
|
-
source_port_id:
|
|
15771
|
-
schematic_component_id:
|
|
15782
|
+
var schematic_port = z57.object({
|
|
15783
|
+
type: z57.literal("schematic_port"),
|
|
15784
|
+
schematic_port_id: z57.string(),
|
|
15785
|
+
source_port_id: z57.string(),
|
|
15786
|
+
schematic_component_id: z57.string().optional(),
|
|
15772
15787
|
center: point,
|
|
15773
|
-
facing_direction:
|
|
15774
|
-
distance_from_component_edge:
|
|
15775
|
-
side_of_component:
|
|
15776
|
-
true_ccw_index:
|
|
15777
|
-
pin_number:
|
|
15778
|
-
display_pin_label:
|
|
15779
|
-
subcircuit_id:
|
|
15780
|
-
is_connected:
|
|
15781
|
-
has_input_arrow:
|
|
15782
|
-
has_output_arrow:
|
|
15788
|
+
facing_direction: z57.enum(["up", "down", "left", "right"]).optional(),
|
|
15789
|
+
distance_from_component_edge: z57.number().optional(),
|
|
15790
|
+
side_of_component: z57.enum(["top", "bottom", "left", "right"]).optional(),
|
|
15791
|
+
true_ccw_index: z57.number().optional(),
|
|
15792
|
+
pin_number: z57.number().optional(),
|
|
15793
|
+
display_pin_label: z57.string().optional(),
|
|
15794
|
+
subcircuit_id: z57.string().optional(),
|
|
15795
|
+
is_connected: z57.boolean().optional(),
|
|
15796
|
+
has_input_arrow: z57.boolean().optional(),
|
|
15797
|
+
has_output_arrow: z57.boolean().optional()
|
|
15783
15798
|
}).describe("Defines a port on a schematic component");
|
|
15784
15799
|
expectTypesMatch(true);
|
|
15785
|
-
var schematic_net_label =
|
|
15786
|
-
type:
|
|
15800
|
+
var schematic_net_label = z58.object({
|
|
15801
|
+
type: z58.literal("schematic_net_label"),
|
|
15787
15802
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
15788
|
-
schematic_trace_id:
|
|
15789
|
-
source_trace_id:
|
|
15790
|
-
source_net_id:
|
|
15803
|
+
schematic_trace_id: z58.string().optional(),
|
|
15804
|
+
source_trace_id: z58.string().optional(),
|
|
15805
|
+
source_net_id: z58.string(),
|
|
15791
15806
|
center: point,
|
|
15792
15807
|
anchor_position: point.optional(),
|
|
15793
|
-
anchor_side:
|
|
15794
|
-
text:
|
|
15795
|
-
symbol_name:
|
|
15796
|
-
is_movable:
|
|
15797
|
-
subcircuit_id:
|
|
15808
|
+
anchor_side: z58.enum(["top", "bottom", "left", "right"]),
|
|
15809
|
+
text: z58.string(),
|
|
15810
|
+
symbol_name: z58.string().optional(),
|
|
15811
|
+
is_movable: z58.boolean().optional(),
|
|
15812
|
+
subcircuit_id: z58.string().optional()
|
|
15798
15813
|
});
|
|
15799
15814
|
expectTypesMatch(true);
|
|
15800
|
-
var schematic_error =
|
|
15801
|
-
type:
|
|
15802
|
-
schematic_error_id:
|
|
15815
|
+
var schematic_error = z59.object({
|
|
15816
|
+
type: z59.literal("schematic_error"),
|
|
15817
|
+
schematic_error_id: z59.string(),
|
|
15803
15818
|
// eventually each error type should be broken out into a dir of files
|
|
15804
|
-
error_type:
|
|
15805
|
-
message:
|
|
15806
|
-
subcircuit_id:
|
|
15819
|
+
error_type: z59.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
15820
|
+
message: z59.string(),
|
|
15821
|
+
subcircuit_id: z59.string().optional()
|
|
15807
15822
|
}).describe("Defines a schematic error on the schematic");
|
|
15808
15823
|
expectTypesMatch(true);
|
|
15809
|
-
var schematic_layout_error =
|
|
15810
|
-
type:
|
|
15824
|
+
var schematic_layout_error = z60.object({
|
|
15825
|
+
type: z60.literal("schematic_layout_error"),
|
|
15811
15826
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
15812
15827
|
"schematic_layout_error"
|
|
15813
15828
|
),
|
|
15814
|
-
error_type:
|
|
15815
|
-
message:
|
|
15816
|
-
source_group_id:
|
|
15817
|
-
schematic_group_id:
|
|
15818
|
-
subcircuit_id:
|
|
15829
|
+
error_type: z60.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
15830
|
+
message: z60.string(),
|
|
15831
|
+
source_group_id: z60.string(),
|
|
15832
|
+
schematic_group_id: z60.string(),
|
|
15833
|
+
subcircuit_id: z60.string().optional()
|
|
15819
15834
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
15820
15835
|
expectTypesMatch(true);
|
|
15821
|
-
var schematic_debug_object_base =
|
|
15822
|
-
type:
|
|
15823
|
-
label:
|
|
15824
|
-
subcircuit_id:
|
|
15836
|
+
var schematic_debug_object_base = z61.object({
|
|
15837
|
+
type: z61.literal("schematic_debug_object"),
|
|
15838
|
+
label: z61.string().optional(),
|
|
15839
|
+
subcircuit_id: z61.string().optional()
|
|
15825
15840
|
});
|
|
15826
15841
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
15827
|
-
shape:
|
|
15842
|
+
shape: z61.literal("rect"),
|
|
15828
15843
|
center: point,
|
|
15829
15844
|
size
|
|
15830
15845
|
});
|
|
15831
15846
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
15832
|
-
shape:
|
|
15847
|
+
shape: z61.literal("line"),
|
|
15833
15848
|
start: point,
|
|
15834
15849
|
end: point
|
|
15835
15850
|
});
|
|
15836
15851
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
15837
|
-
shape:
|
|
15852
|
+
shape: z61.literal("point"),
|
|
15838
15853
|
center: point
|
|
15839
15854
|
});
|
|
15840
|
-
var schematic_debug_object =
|
|
15855
|
+
var schematic_debug_object = z61.discriminatedUnion("shape", [
|
|
15841
15856
|
schematic_debug_rect,
|
|
15842
15857
|
schematic_debug_line,
|
|
15843
15858
|
schematic_debug_point
|
|
15844
15859
|
]);
|
|
15845
15860
|
expectTypesMatch(true);
|
|
15846
|
-
var schematic_voltage_probe =
|
|
15847
|
-
type:
|
|
15848
|
-
schematic_voltage_probe_id:
|
|
15849
|
-
source_component_id:
|
|
15850
|
-
name:
|
|
15861
|
+
var schematic_voltage_probe = z62.object({
|
|
15862
|
+
type: z62.literal("schematic_voltage_probe"),
|
|
15863
|
+
schematic_voltage_probe_id: z62.string(),
|
|
15864
|
+
source_component_id: z62.string().optional(),
|
|
15865
|
+
name: z62.string().optional(),
|
|
15851
15866
|
position: point,
|
|
15852
|
-
schematic_trace_id:
|
|
15867
|
+
schematic_trace_id: z62.string(),
|
|
15853
15868
|
voltage: voltage.optional(),
|
|
15854
|
-
subcircuit_id:
|
|
15855
|
-
color:
|
|
15869
|
+
subcircuit_id: z62.string().optional(),
|
|
15870
|
+
color: z62.string().optional()
|
|
15856
15871
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
15857
15872
|
expectTypesMatch(true);
|
|
15858
|
-
var schematic_manual_edit_conflict_warning =
|
|
15859
|
-
type:
|
|
15873
|
+
var schematic_manual_edit_conflict_warning = z63.object({
|
|
15874
|
+
type: z63.literal("schematic_manual_edit_conflict_warning"),
|
|
15860
15875
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
15861
15876
|
"schematic_manual_edit_conflict_warning"
|
|
15862
15877
|
),
|
|
15863
|
-
warning_type:
|
|
15864
|
-
message:
|
|
15865
|
-
schematic_component_id:
|
|
15866
|
-
schematic_group_id:
|
|
15867
|
-
subcircuit_id:
|
|
15868
|
-
source_component_id:
|
|
15878
|
+
warning_type: z63.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
15879
|
+
message: z63.string(),
|
|
15880
|
+
schematic_component_id: z63.string(),
|
|
15881
|
+
schematic_group_id: z63.string().optional(),
|
|
15882
|
+
subcircuit_id: z63.string().optional(),
|
|
15883
|
+
source_component_id: z63.string()
|
|
15869
15884
|
}).describe(
|
|
15870
15885
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
15871
15886
|
);
|
|
15872
15887
|
expectTypesMatch(true);
|
|
15873
|
-
var schematic_group =
|
|
15874
|
-
type:
|
|
15888
|
+
var schematic_group = z64.object({
|
|
15889
|
+
type: z64.literal("schematic_group"),
|
|
15875
15890
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
15876
|
-
source_group_id:
|
|
15877
|
-
is_subcircuit:
|
|
15878
|
-
subcircuit_id:
|
|
15891
|
+
source_group_id: z64.string(),
|
|
15892
|
+
is_subcircuit: z64.boolean().optional(),
|
|
15893
|
+
subcircuit_id: z64.string().optional(),
|
|
15879
15894
|
width: length,
|
|
15880
15895
|
height: length,
|
|
15881
15896
|
center: point,
|
|
15882
|
-
schematic_component_ids:
|
|
15883
|
-
show_as_schematic_box:
|
|
15884
|
-
name:
|
|
15885
|
-
description:
|
|
15897
|
+
schematic_component_ids: z64.array(z64.string()),
|
|
15898
|
+
show_as_schematic_box: z64.boolean().optional(),
|
|
15899
|
+
name: z64.string().optional(),
|
|
15900
|
+
description: z64.string().optional()
|
|
15886
15901
|
}).describe("Defines a group of components on the schematic");
|
|
15887
15902
|
expectTypesMatch(true);
|
|
15888
|
-
var schematic_table =
|
|
15889
|
-
type:
|
|
15903
|
+
var schematic_table = z65.object({
|
|
15904
|
+
type: z65.literal("schematic_table"),
|
|
15890
15905
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
15891
15906
|
anchor_position: point,
|
|
15892
|
-
column_widths:
|
|
15893
|
-
row_heights:
|
|
15907
|
+
column_widths: z65.array(distance),
|
|
15908
|
+
row_heights: z65.array(distance),
|
|
15894
15909
|
cell_padding: distance.optional(),
|
|
15895
15910
|
border_width: distance.optional(),
|
|
15896
|
-
subcircuit_id:
|
|
15897
|
-
schematic_component_id:
|
|
15911
|
+
subcircuit_id: z65.string().optional(),
|
|
15912
|
+
schematic_component_id: z65.string().optional(),
|
|
15898
15913
|
anchor: ninePointAnchor.optional()
|
|
15899
15914
|
}).describe("Defines a table on the schematic");
|
|
15900
15915
|
expectTypesMatch(true);
|
|
15901
|
-
var schematic_table_cell =
|
|
15902
|
-
type:
|
|
15916
|
+
var schematic_table_cell = z66.object({
|
|
15917
|
+
type: z66.literal("schematic_table_cell"),
|
|
15903
15918
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
15904
15919
|
"schematic_table_cell"
|
|
15905
15920
|
),
|
|
15906
|
-
schematic_table_id:
|
|
15907
|
-
start_row_index:
|
|
15908
|
-
end_row_index:
|
|
15909
|
-
start_column_index:
|
|
15910
|
-
end_column_index:
|
|
15911
|
-
text:
|
|
15921
|
+
schematic_table_id: z66.string(),
|
|
15922
|
+
start_row_index: z66.number(),
|
|
15923
|
+
end_row_index: z66.number(),
|
|
15924
|
+
start_column_index: z66.number(),
|
|
15925
|
+
end_column_index: z66.number(),
|
|
15926
|
+
text: z66.string().optional(),
|
|
15912
15927
|
center: point,
|
|
15913
15928
|
width: distance,
|
|
15914
15929
|
height: distance,
|
|
15915
|
-
horizontal_align:
|
|
15916
|
-
vertical_align:
|
|
15930
|
+
horizontal_align: z66.enum(["left", "center", "right"]).optional(),
|
|
15931
|
+
vertical_align: z66.enum(["top", "middle", "bottom"]).optional(),
|
|
15917
15932
|
font_size: distance.optional(),
|
|
15918
|
-
subcircuit_id:
|
|
15933
|
+
subcircuit_id: z66.string().optional()
|
|
15919
15934
|
}).describe("Defines a cell within a schematic_table");
|
|
15920
15935
|
expectTypesMatch(true);
|
|
15921
|
-
var schematic_sheet =
|
|
15922
|
-
type:
|
|
15936
|
+
var schematic_sheet = z67.object({
|
|
15937
|
+
type: z67.literal("schematic_sheet"),
|
|
15923
15938
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
15924
|
-
name:
|
|
15925
|
-
subcircuit_id:
|
|
15939
|
+
name: z67.string().optional(),
|
|
15940
|
+
subcircuit_id: z67.string().optional()
|
|
15926
15941
|
}).describe(
|
|
15927
15942
|
"Defines a schematic sheet or page that components can be placed on"
|
|
15928
15943
|
);
|
|
15929
15944
|
expectTypesMatch(true);
|
|
15930
|
-
var point_with_bulge =
|
|
15945
|
+
var point_with_bulge = z68.object({
|
|
15931
15946
|
x: distance,
|
|
15932
15947
|
y: distance,
|
|
15933
|
-
bulge:
|
|
15948
|
+
bulge: z68.number().optional()
|
|
15934
15949
|
});
|
|
15935
15950
|
expectTypesMatch(true);
|
|
15936
|
-
var ring =
|
|
15937
|
-
vertices:
|
|
15951
|
+
var ring = z68.object({
|
|
15952
|
+
vertices: z68.array(point_with_bulge)
|
|
15938
15953
|
});
|
|
15939
15954
|
expectTypesMatch(true);
|
|
15940
|
-
var brep_shape =
|
|
15955
|
+
var brep_shape = z68.object({
|
|
15941
15956
|
outer_ring: ring,
|
|
15942
|
-
inner_rings:
|
|
15957
|
+
inner_rings: z68.array(ring).default([])
|
|
15943
15958
|
});
|
|
15944
15959
|
expectTypesMatch(true);
|
|
15945
|
-
var pcb_route_hint =
|
|
15960
|
+
var pcb_route_hint = z69.object({
|
|
15946
15961
|
x: distance,
|
|
15947
15962
|
y: distance,
|
|
15948
|
-
via:
|
|
15963
|
+
via: z69.boolean().optional(),
|
|
15949
15964
|
via_to_layer: layer_ref.optional()
|
|
15950
15965
|
});
|
|
15951
|
-
var pcb_route_hints =
|
|
15966
|
+
var pcb_route_hints = z69.array(pcb_route_hint);
|
|
15952
15967
|
expectTypesMatch(true);
|
|
15953
15968
|
expectTypesMatch(true);
|
|
15954
|
-
var route_hint_point =
|
|
15969
|
+
var route_hint_point = z70.object({
|
|
15955
15970
|
x: distance,
|
|
15956
15971
|
y: distance,
|
|
15957
|
-
via:
|
|
15972
|
+
via: z70.boolean().optional(),
|
|
15958
15973
|
to_layer: layer_ref.optional(),
|
|
15959
15974
|
trace_width: distance.optional()
|
|
15960
15975
|
});
|
|
15961
15976
|
expectTypesMatch(true);
|
|
15962
|
-
var pcb_component =
|
|
15963
|
-
type:
|
|
15977
|
+
var pcb_component = z71.object({
|
|
15978
|
+
type: z71.literal("pcb_component"),
|
|
15964
15979
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
15965
|
-
source_component_id:
|
|
15980
|
+
source_component_id: z71.string(),
|
|
15966
15981
|
center: point,
|
|
15967
15982
|
layer: layer_ref,
|
|
15968
15983
|
rotation,
|
|
15969
15984
|
width: length,
|
|
15970
15985
|
height: length,
|
|
15971
|
-
do_not_place:
|
|
15972
|
-
subcircuit_id:
|
|
15973
|
-
pcb_group_id:
|
|
15974
|
-
position_mode:
|
|
15975
|
-
positioned_relative_to_pcb_group_id:
|
|
15976
|
-
obstructs_within_bounds:
|
|
15986
|
+
do_not_place: z71.boolean().optional(),
|
|
15987
|
+
subcircuit_id: z71.string().optional(),
|
|
15988
|
+
pcb_group_id: z71.string().optional(),
|
|
15989
|
+
position_mode: z71.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
15990
|
+
positioned_relative_to_pcb_group_id: z71.string().optional(),
|
|
15991
|
+
obstructs_within_bounds: z71.boolean().default(true).describe(
|
|
15977
15992
|
"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"
|
|
15978
15993
|
)
|
|
15979
15994
|
}).describe("Defines a component on the PCB");
|
|
15980
15995
|
expectTypesMatch(true);
|
|
15981
|
-
var pcb_hole_circle =
|
|
15982
|
-
type:
|
|
15996
|
+
var pcb_hole_circle = z72.object({
|
|
15997
|
+
type: z72.literal("pcb_hole"),
|
|
15983
15998
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
15984
|
-
pcb_group_id:
|
|
15985
|
-
subcircuit_id:
|
|
15986
|
-
hole_shape:
|
|
15987
|
-
hole_diameter:
|
|
15999
|
+
pcb_group_id: z72.string().optional(),
|
|
16000
|
+
subcircuit_id: z72.string().optional(),
|
|
16001
|
+
hole_shape: z72.literal("circle"),
|
|
16002
|
+
hole_diameter: z72.number(),
|
|
15988
16003
|
x: distance,
|
|
15989
16004
|
y: distance,
|
|
15990
|
-
|
|
16005
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
16006
|
+
soldermask_margin: z72.number().optional()
|
|
15991
16007
|
});
|
|
15992
16008
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
15993
16009
|
"Defines a circular hole on the PCB"
|
|
15994
16010
|
);
|
|
15995
16011
|
expectTypesMatch(true);
|
|
15996
|
-
var pcb_hole_rect =
|
|
15997
|
-
type:
|
|
16012
|
+
var pcb_hole_rect = z72.object({
|
|
16013
|
+
type: z72.literal("pcb_hole"),
|
|
15998
16014
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
15999
|
-
pcb_group_id:
|
|
16000
|
-
subcircuit_id:
|
|
16001
|
-
hole_shape:
|
|
16002
|
-
hole_width:
|
|
16003
|
-
hole_height:
|
|
16015
|
+
pcb_group_id: z72.string().optional(),
|
|
16016
|
+
subcircuit_id: z72.string().optional(),
|
|
16017
|
+
hole_shape: z72.literal("rect"),
|
|
16018
|
+
hole_width: z72.number(),
|
|
16019
|
+
hole_height: z72.number(),
|
|
16004
16020
|
x: distance,
|
|
16005
16021
|
y: distance,
|
|
16006
|
-
|
|
16022
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
16023
|
+
soldermask_margin: z72.number().optional()
|
|
16007
16024
|
});
|
|
16008
16025
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
16009
16026
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
16010
16027
|
);
|
|
16011
16028
|
expectTypesMatch(true);
|
|
16012
|
-
var pcb_hole_circle_or_square =
|
|
16013
|
-
type:
|
|
16029
|
+
var pcb_hole_circle_or_square = z72.object({
|
|
16030
|
+
type: z72.literal("pcb_hole"),
|
|
16014
16031
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
16015
|
-
pcb_group_id:
|
|
16016
|
-
subcircuit_id:
|
|
16017
|
-
hole_shape:
|
|
16018
|
-
hole_diameter:
|
|
16032
|
+
pcb_group_id: z72.string().optional(),
|
|
16033
|
+
subcircuit_id: z72.string().optional(),
|
|
16034
|
+
hole_shape: z72.enum(["circle", "square"]),
|
|
16035
|
+
hole_diameter: z72.number(),
|
|
16019
16036
|
x: distance,
|
|
16020
16037
|
y: distance,
|
|
16021
|
-
|
|
16038
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
16039
|
+
soldermask_margin: z72.number().optional()
|
|
16022
16040
|
});
|
|
16023
16041
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
16024
16042
|
"Defines a circular or square hole on the PCB"
|
|
16025
16043
|
);
|
|
16026
16044
|
expectTypesMatch(true);
|
|
16027
|
-
var pcb_hole_oval =
|
|
16028
|
-
type:
|
|
16045
|
+
var pcb_hole_oval = z72.object({
|
|
16046
|
+
type: z72.literal("pcb_hole"),
|
|
16029
16047
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
16030
|
-
pcb_group_id:
|
|
16031
|
-
subcircuit_id:
|
|
16032
|
-
hole_shape:
|
|
16033
|
-
hole_width:
|
|
16034
|
-
hole_height:
|
|
16048
|
+
pcb_group_id: z72.string().optional(),
|
|
16049
|
+
subcircuit_id: z72.string().optional(),
|
|
16050
|
+
hole_shape: z72.literal("oval"),
|
|
16051
|
+
hole_width: z72.number(),
|
|
16052
|
+
hole_height: z72.number(),
|
|
16035
16053
|
x: distance,
|
|
16036
16054
|
y: distance,
|
|
16037
|
-
|
|
16055
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
16056
|
+
soldermask_margin: z72.number().optional()
|
|
16038
16057
|
});
|
|
16039
16058
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
16040
16059
|
"Defines an oval hole on the PCB"
|
|
16041
16060
|
);
|
|
16042
16061
|
expectTypesMatch(true);
|
|
16043
|
-
var pcb_hole_pill =
|
|
16044
|
-
type:
|
|
16062
|
+
var pcb_hole_pill = z72.object({
|
|
16063
|
+
type: z72.literal("pcb_hole"),
|
|
16045
16064
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
16046
|
-
pcb_group_id:
|
|
16047
|
-
subcircuit_id:
|
|
16048
|
-
hole_shape:
|
|
16049
|
-
hole_width:
|
|
16050
|
-
hole_height:
|
|
16065
|
+
pcb_group_id: z72.string().optional(),
|
|
16066
|
+
subcircuit_id: z72.string().optional(),
|
|
16067
|
+
hole_shape: z72.literal("pill"),
|
|
16068
|
+
hole_width: z72.number(),
|
|
16069
|
+
hole_height: z72.number(),
|
|
16051
16070
|
x: distance,
|
|
16052
16071
|
y: distance,
|
|
16053
|
-
|
|
16072
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
16073
|
+
soldermask_margin: z72.number().optional()
|
|
16054
16074
|
});
|
|
16055
16075
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
16056
16076
|
"Defines a pill-shaped hole on the PCB"
|
|
16057
16077
|
);
|
|
16058
16078
|
expectTypesMatch(true);
|
|
16059
|
-
var pcb_hole_rotated_pill =
|
|
16060
|
-
type:
|
|
16079
|
+
var pcb_hole_rotated_pill = z72.object({
|
|
16080
|
+
type: z72.literal("pcb_hole"),
|
|
16061
16081
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
16062
|
-
pcb_group_id:
|
|
16063
|
-
subcircuit_id:
|
|
16064
|
-
hole_shape:
|
|
16065
|
-
hole_width:
|
|
16066
|
-
hole_height:
|
|
16082
|
+
pcb_group_id: z72.string().optional(),
|
|
16083
|
+
subcircuit_id: z72.string().optional(),
|
|
16084
|
+
hole_shape: z72.literal("rotated_pill"),
|
|
16085
|
+
hole_width: z72.number(),
|
|
16086
|
+
hole_height: z72.number(),
|
|
16067
16087
|
x: distance,
|
|
16068
16088
|
y: distance,
|
|
16069
16089
|
ccw_rotation: rotation,
|
|
16070
|
-
|
|
16090
|
+
is_covered_with_solder_mask: z72.boolean().optional(),
|
|
16091
|
+
soldermask_margin: z72.number().optional()
|
|
16071
16092
|
});
|
|
16072
16093
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
16073
16094
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
16074
16095
|
);
|
|
16075
16096
|
expectTypesMatch(true);
|
|
16076
16097
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill).or(pcb_hole_circle).or(pcb_hole_rect);
|
|
16077
|
-
var pcb_plated_hole_circle =
|
|
16078
|
-
type:
|
|
16079
|
-
shape:
|
|
16080
|
-
pcb_group_id:
|
|
16081
|
-
subcircuit_id:
|
|
16082
|
-
outer_diameter:
|
|
16083
|
-
hole_diameter:
|
|
16098
|
+
var pcb_plated_hole_circle = z73.object({
|
|
16099
|
+
type: z73.literal("pcb_plated_hole"),
|
|
16100
|
+
shape: z73.literal("circle"),
|
|
16101
|
+
pcb_group_id: z73.string().optional(),
|
|
16102
|
+
subcircuit_id: z73.string().optional(),
|
|
16103
|
+
outer_diameter: z73.number(),
|
|
16104
|
+
hole_diameter: z73.number(),
|
|
16084
16105
|
x: distance,
|
|
16085
16106
|
y: distance,
|
|
16086
|
-
layers:
|
|
16087
|
-
port_hints:
|
|
16088
|
-
pcb_component_id:
|
|
16089
|
-
pcb_port_id:
|
|
16107
|
+
layers: z73.array(layer_ref),
|
|
16108
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16109
|
+
pcb_component_id: z73.string().optional(),
|
|
16110
|
+
pcb_port_id: z73.string().optional(),
|
|
16090
16111
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
16091
|
-
soldermask_margin:
|
|
16112
|
+
soldermask_margin: z73.number().optional(),
|
|
16113
|
+
is_covered_with_solder_mask: z73.boolean().optional()
|
|
16092
16114
|
});
|
|
16093
|
-
var pcb_plated_hole_oval =
|
|
16094
|
-
type:
|
|
16095
|
-
shape:
|
|
16096
|
-
pcb_group_id:
|
|
16097
|
-
subcircuit_id:
|
|
16098
|
-
outer_width:
|
|
16099
|
-
outer_height:
|
|
16100
|
-
hole_width:
|
|
16101
|
-
hole_height:
|
|
16115
|
+
var pcb_plated_hole_oval = z73.object({
|
|
16116
|
+
type: z73.literal("pcb_plated_hole"),
|
|
16117
|
+
shape: z73.enum(["oval", "pill"]),
|
|
16118
|
+
pcb_group_id: z73.string().optional(),
|
|
16119
|
+
subcircuit_id: z73.string().optional(),
|
|
16120
|
+
outer_width: z73.number(),
|
|
16121
|
+
outer_height: z73.number(),
|
|
16122
|
+
hole_width: z73.number(),
|
|
16123
|
+
hole_height: z73.number(),
|
|
16124
|
+
is_covered_with_solder_mask: z73.boolean().optional(),
|
|
16102
16125
|
x: distance,
|
|
16103
16126
|
y: distance,
|
|
16104
16127
|
ccw_rotation: rotation,
|
|
16105
|
-
layers:
|
|
16106
|
-
port_hints:
|
|
16107
|
-
pcb_component_id:
|
|
16108
|
-
pcb_port_id:
|
|
16128
|
+
layers: z73.array(layer_ref),
|
|
16129
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16130
|
+
pcb_component_id: z73.string().optional(),
|
|
16131
|
+
pcb_port_id: z73.string().optional(),
|
|
16109
16132
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
16110
|
-
soldermask_margin:
|
|
16133
|
+
soldermask_margin: z73.number().optional()
|
|
16111
16134
|
});
|
|
16112
|
-
var pcb_circular_hole_with_rect_pad =
|
|
16113
|
-
type:
|
|
16114
|
-
shape:
|
|
16115
|
-
pcb_group_id:
|
|
16116
|
-
subcircuit_id:
|
|
16117
|
-
hole_shape:
|
|
16118
|
-
pad_shape:
|
|
16119
|
-
hole_diameter:
|
|
16120
|
-
rect_pad_width:
|
|
16121
|
-
rect_pad_height:
|
|
16122
|
-
rect_border_radius:
|
|
16135
|
+
var pcb_circular_hole_with_rect_pad = z73.object({
|
|
16136
|
+
type: z73.literal("pcb_plated_hole"),
|
|
16137
|
+
shape: z73.literal("circular_hole_with_rect_pad"),
|
|
16138
|
+
pcb_group_id: z73.string().optional(),
|
|
16139
|
+
subcircuit_id: z73.string().optional(),
|
|
16140
|
+
hole_shape: z73.literal("circle"),
|
|
16141
|
+
pad_shape: z73.literal("rect"),
|
|
16142
|
+
hole_diameter: z73.number(),
|
|
16143
|
+
rect_pad_width: z73.number(),
|
|
16144
|
+
rect_pad_height: z73.number(),
|
|
16145
|
+
rect_border_radius: z73.number().optional(),
|
|
16123
16146
|
hole_offset_x: distance.default(0),
|
|
16124
16147
|
hole_offset_y: distance.default(0),
|
|
16148
|
+
is_covered_with_solder_mask: z73.boolean().optional(),
|
|
16125
16149
|
x: distance,
|
|
16126
16150
|
y: distance,
|
|
16127
|
-
layers:
|
|
16128
|
-
port_hints:
|
|
16129
|
-
pcb_component_id:
|
|
16130
|
-
pcb_port_id:
|
|
16151
|
+
layers: z73.array(layer_ref),
|
|
16152
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16153
|
+
pcb_component_id: z73.string().optional(),
|
|
16154
|
+
pcb_port_id: z73.string().optional(),
|
|
16131
16155
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
16132
|
-
soldermask_margin:
|
|
16156
|
+
soldermask_margin: z73.number().optional()
|
|
16133
16157
|
});
|
|
16134
|
-
var pcb_pill_hole_with_rect_pad =
|
|
16135
|
-
type:
|
|
16136
|
-
shape:
|
|
16137
|
-
pcb_group_id:
|
|
16138
|
-
subcircuit_id:
|
|
16139
|
-
hole_shape:
|
|
16140
|
-
pad_shape:
|
|
16141
|
-
hole_width:
|
|
16142
|
-
hole_height:
|
|
16143
|
-
rect_pad_width:
|
|
16144
|
-
rect_pad_height:
|
|
16145
|
-
rect_border_radius:
|
|
16158
|
+
var pcb_pill_hole_with_rect_pad = z73.object({
|
|
16159
|
+
type: z73.literal("pcb_plated_hole"),
|
|
16160
|
+
shape: z73.literal("pill_hole_with_rect_pad"),
|
|
16161
|
+
pcb_group_id: z73.string().optional(),
|
|
16162
|
+
subcircuit_id: z73.string().optional(),
|
|
16163
|
+
hole_shape: z73.literal("pill"),
|
|
16164
|
+
pad_shape: z73.literal("rect"),
|
|
16165
|
+
hole_width: z73.number(),
|
|
16166
|
+
hole_height: z73.number(),
|
|
16167
|
+
rect_pad_width: z73.number(),
|
|
16168
|
+
rect_pad_height: z73.number(),
|
|
16169
|
+
rect_border_radius: z73.number().optional(),
|
|
16146
16170
|
hole_offset_x: distance.default(0),
|
|
16147
16171
|
hole_offset_y: distance.default(0),
|
|
16172
|
+
is_covered_with_solder_mask: z73.boolean().optional(),
|
|
16148
16173
|
x: distance,
|
|
16149
16174
|
y: distance,
|
|
16150
|
-
layers:
|
|
16151
|
-
port_hints:
|
|
16152
|
-
pcb_component_id:
|
|
16153
|
-
pcb_port_id:
|
|
16175
|
+
layers: z73.array(layer_ref),
|
|
16176
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16177
|
+
pcb_component_id: z73.string().optional(),
|
|
16178
|
+
pcb_port_id: z73.string().optional(),
|
|
16154
16179
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
16155
|
-
soldermask_margin:
|
|
16180
|
+
soldermask_margin: z73.number().optional()
|
|
16156
16181
|
});
|
|
16157
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
16158
|
-
type:
|
|
16159
|
-
shape:
|
|
16160
|
-
pcb_group_id:
|
|
16161
|
-
subcircuit_id:
|
|
16162
|
-
hole_shape:
|
|
16163
|
-
pad_shape:
|
|
16164
|
-
hole_width:
|
|
16165
|
-
hole_height:
|
|
16182
|
+
var pcb_rotated_pill_hole_with_rect_pad = z73.object({
|
|
16183
|
+
type: z73.literal("pcb_plated_hole"),
|
|
16184
|
+
shape: z73.literal("rotated_pill_hole_with_rect_pad"),
|
|
16185
|
+
pcb_group_id: z73.string().optional(),
|
|
16186
|
+
subcircuit_id: z73.string().optional(),
|
|
16187
|
+
hole_shape: z73.literal("rotated_pill"),
|
|
16188
|
+
pad_shape: z73.literal("rect"),
|
|
16189
|
+
hole_width: z73.number(),
|
|
16190
|
+
hole_height: z73.number(),
|
|
16166
16191
|
hole_ccw_rotation: rotation,
|
|
16167
|
-
rect_pad_width:
|
|
16168
|
-
rect_pad_height:
|
|
16169
|
-
rect_border_radius:
|
|
16192
|
+
rect_pad_width: z73.number(),
|
|
16193
|
+
rect_pad_height: z73.number(),
|
|
16194
|
+
rect_border_radius: z73.number().optional(),
|
|
16170
16195
|
rect_ccw_rotation: rotation,
|
|
16171
16196
|
hole_offset_x: distance.default(0),
|
|
16172
16197
|
hole_offset_y: distance.default(0),
|
|
16198
|
+
is_covered_with_solder_mask: z73.boolean().optional(),
|
|
16173
16199
|
x: distance,
|
|
16174
16200
|
y: distance,
|
|
16175
|
-
layers:
|
|
16176
|
-
port_hints:
|
|
16177
|
-
pcb_component_id:
|
|
16178
|
-
pcb_port_id:
|
|
16201
|
+
layers: z73.array(layer_ref),
|
|
16202
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16203
|
+
pcb_component_id: z73.string().optional(),
|
|
16204
|
+
pcb_port_id: z73.string().optional(),
|
|
16179
16205
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
16180
|
-
soldermask_margin:
|
|
16206
|
+
soldermask_margin: z73.number().optional()
|
|
16181
16207
|
});
|
|
16182
|
-
var pcb_hole_with_polygon_pad =
|
|
16183
|
-
type:
|
|
16184
|
-
shape:
|
|
16185
|
-
pcb_group_id:
|
|
16186
|
-
subcircuit_id:
|
|
16187
|
-
hole_shape:
|
|
16188
|
-
hole_diameter:
|
|
16189
|
-
hole_width:
|
|
16190
|
-
hole_height:
|
|
16191
|
-
pad_outline:
|
|
16192
|
-
|
|
16208
|
+
var pcb_hole_with_polygon_pad = z73.object({
|
|
16209
|
+
type: z73.literal("pcb_plated_hole"),
|
|
16210
|
+
shape: z73.literal("hole_with_polygon_pad"),
|
|
16211
|
+
pcb_group_id: z73.string().optional(),
|
|
16212
|
+
subcircuit_id: z73.string().optional(),
|
|
16213
|
+
hole_shape: z73.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
16214
|
+
hole_diameter: z73.number().optional(),
|
|
16215
|
+
hole_width: z73.number().optional(),
|
|
16216
|
+
hole_height: z73.number().optional(),
|
|
16217
|
+
pad_outline: z73.array(
|
|
16218
|
+
z73.object({
|
|
16193
16219
|
x: distance,
|
|
16194
16220
|
y: distance
|
|
16195
16221
|
})
|
|
16196
16222
|
).min(3),
|
|
16197
16223
|
hole_offset_x: distance.default(0),
|
|
16198
16224
|
hole_offset_y: distance.default(0),
|
|
16225
|
+
is_covered_with_solder_mask: z73.boolean().optional(),
|
|
16199
16226
|
x: distance,
|
|
16200
16227
|
y: distance,
|
|
16201
|
-
layers:
|
|
16202
|
-
port_hints:
|
|
16203
|
-
pcb_component_id:
|
|
16204
|
-
pcb_port_id:
|
|
16228
|
+
layers: z73.array(layer_ref),
|
|
16229
|
+
port_hints: z73.array(z73.string()).optional(),
|
|
16230
|
+
pcb_component_id: z73.string().optional(),
|
|
16231
|
+
pcb_port_id: z73.string().optional(),
|
|
16205
16232
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
16206
|
-
soldermask_margin:
|
|
16233
|
+
soldermask_margin: z73.number().optional()
|
|
16207
16234
|
});
|
|
16208
|
-
var pcb_plated_hole =
|
|
16235
|
+
var pcb_plated_hole = z73.union([
|
|
16209
16236
|
pcb_plated_hole_circle,
|
|
16210
16237
|
pcb_plated_hole_oval,
|
|
16211
16238
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -16221,126 +16248,126 @@ expectTypesMatch(true);
|
|
|
16221
16248
|
expectTypesMatch(true);
|
|
16222
16249
|
expectTypesMatch(true);
|
|
16223
16250
|
expectTypesMatch(true);
|
|
16224
|
-
var pcb_port =
|
|
16225
|
-
type:
|
|
16251
|
+
var pcb_port = z74.object({
|
|
16252
|
+
type: z74.literal("pcb_port"),
|
|
16226
16253
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
16227
|
-
pcb_group_id:
|
|
16228
|
-
subcircuit_id:
|
|
16229
|
-
source_port_id:
|
|
16230
|
-
pcb_component_id:
|
|
16254
|
+
pcb_group_id: z74.string().optional(),
|
|
16255
|
+
subcircuit_id: z74.string().optional(),
|
|
16256
|
+
source_port_id: z74.string(),
|
|
16257
|
+
pcb_component_id: z74.string().optional(),
|
|
16231
16258
|
x: distance,
|
|
16232
16259
|
y: distance,
|
|
16233
|
-
layers:
|
|
16234
|
-
is_board_pinout:
|
|
16260
|
+
layers: z74.array(layer_ref),
|
|
16261
|
+
is_board_pinout: z74.boolean().optional()
|
|
16235
16262
|
}).describe("Defines a port on the PCB");
|
|
16236
16263
|
expectTypesMatch(true);
|
|
16237
|
-
var pcb_smtpad_circle =
|
|
16238
|
-
type:
|
|
16239
|
-
shape:
|
|
16264
|
+
var pcb_smtpad_circle = z75.object({
|
|
16265
|
+
type: z75.literal("pcb_smtpad"),
|
|
16266
|
+
shape: z75.literal("circle"),
|
|
16240
16267
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16241
|
-
pcb_group_id:
|
|
16242
|
-
subcircuit_id:
|
|
16268
|
+
pcb_group_id: z75.string().optional(),
|
|
16269
|
+
subcircuit_id: z75.string().optional(),
|
|
16243
16270
|
x: distance,
|
|
16244
16271
|
y: distance,
|
|
16245
|
-
radius:
|
|
16272
|
+
radius: z75.number(),
|
|
16246
16273
|
layer: layer_ref,
|
|
16247
|
-
port_hints:
|
|
16248
|
-
pcb_component_id:
|
|
16249
|
-
pcb_port_id:
|
|
16250
|
-
is_covered_with_solder_mask:
|
|
16251
|
-
soldermask_margin:
|
|
16274
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
16275
|
+
pcb_component_id: z75.string().optional(),
|
|
16276
|
+
pcb_port_id: z75.string().optional(),
|
|
16277
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
16278
|
+
soldermask_margin: z75.number().optional()
|
|
16252
16279
|
});
|
|
16253
|
-
var pcb_smtpad_rect =
|
|
16254
|
-
type:
|
|
16255
|
-
shape:
|
|
16280
|
+
var pcb_smtpad_rect = z75.object({
|
|
16281
|
+
type: z75.literal("pcb_smtpad"),
|
|
16282
|
+
shape: z75.literal("rect"),
|
|
16256
16283
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16257
|
-
pcb_group_id:
|
|
16258
|
-
subcircuit_id:
|
|
16284
|
+
pcb_group_id: z75.string().optional(),
|
|
16285
|
+
subcircuit_id: z75.string().optional(),
|
|
16259
16286
|
x: distance,
|
|
16260
16287
|
y: distance,
|
|
16261
|
-
width:
|
|
16262
|
-
height:
|
|
16263
|
-
rect_border_radius:
|
|
16264
|
-
corner_radius:
|
|
16288
|
+
width: z75.number(),
|
|
16289
|
+
height: z75.number(),
|
|
16290
|
+
rect_border_radius: z75.number().optional(),
|
|
16291
|
+
corner_radius: z75.number().optional(),
|
|
16265
16292
|
layer: layer_ref,
|
|
16266
|
-
port_hints:
|
|
16267
|
-
pcb_component_id:
|
|
16268
|
-
pcb_port_id:
|
|
16269
|
-
is_covered_with_solder_mask:
|
|
16270
|
-
soldermask_margin:
|
|
16293
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
16294
|
+
pcb_component_id: z75.string().optional(),
|
|
16295
|
+
pcb_port_id: z75.string().optional(),
|
|
16296
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
16297
|
+
soldermask_margin: z75.number().optional()
|
|
16271
16298
|
});
|
|
16272
|
-
var pcb_smtpad_rotated_rect =
|
|
16273
|
-
type:
|
|
16274
|
-
shape:
|
|
16299
|
+
var pcb_smtpad_rotated_rect = z75.object({
|
|
16300
|
+
type: z75.literal("pcb_smtpad"),
|
|
16301
|
+
shape: z75.literal("rotated_rect"),
|
|
16275
16302
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16276
|
-
pcb_group_id:
|
|
16277
|
-
subcircuit_id:
|
|
16303
|
+
pcb_group_id: z75.string().optional(),
|
|
16304
|
+
subcircuit_id: z75.string().optional(),
|
|
16278
16305
|
x: distance,
|
|
16279
16306
|
y: distance,
|
|
16280
|
-
width:
|
|
16281
|
-
height:
|
|
16282
|
-
rect_border_radius:
|
|
16283
|
-
corner_radius:
|
|
16307
|
+
width: z75.number(),
|
|
16308
|
+
height: z75.number(),
|
|
16309
|
+
rect_border_radius: z75.number().optional(),
|
|
16310
|
+
corner_radius: z75.number().optional(),
|
|
16284
16311
|
ccw_rotation: rotation,
|
|
16285
16312
|
layer: layer_ref,
|
|
16286
|
-
port_hints:
|
|
16287
|
-
pcb_component_id:
|
|
16288
|
-
pcb_port_id:
|
|
16289
|
-
is_covered_with_solder_mask:
|
|
16290
|
-
soldermask_margin:
|
|
16313
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
16314
|
+
pcb_component_id: z75.string().optional(),
|
|
16315
|
+
pcb_port_id: z75.string().optional(),
|
|
16316
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
16317
|
+
soldermask_margin: z75.number().optional()
|
|
16291
16318
|
});
|
|
16292
|
-
var pcb_smtpad_pill =
|
|
16293
|
-
type:
|
|
16294
|
-
shape:
|
|
16319
|
+
var pcb_smtpad_pill = z75.object({
|
|
16320
|
+
type: z75.literal("pcb_smtpad"),
|
|
16321
|
+
shape: z75.literal("pill"),
|
|
16295
16322
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16296
|
-
pcb_group_id:
|
|
16297
|
-
subcircuit_id:
|
|
16323
|
+
pcb_group_id: z75.string().optional(),
|
|
16324
|
+
subcircuit_id: z75.string().optional(),
|
|
16298
16325
|
x: distance,
|
|
16299
16326
|
y: distance,
|
|
16300
|
-
width:
|
|
16301
|
-
height:
|
|
16302
|
-
radius:
|
|
16327
|
+
width: z75.number(),
|
|
16328
|
+
height: z75.number(),
|
|
16329
|
+
radius: z75.number(),
|
|
16303
16330
|
layer: layer_ref,
|
|
16304
|
-
port_hints:
|
|
16305
|
-
pcb_component_id:
|
|
16306
|
-
pcb_port_id:
|
|
16307
|
-
is_covered_with_solder_mask:
|
|
16308
|
-
soldermask_margin:
|
|
16331
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
16332
|
+
pcb_component_id: z75.string().optional(),
|
|
16333
|
+
pcb_port_id: z75.string().optional(),
|
|
16334
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
16335
|
+
soldermask_margin: z75.number().optional()
|
|
16309
16336
|
});
|
|
16310
|
-
var pcb_smtpad_rotated_pill =
|
|
16311
|
-
type:
|
|
16312
|
-
shape:
|
|
16337
|
+
var pcb_smtpad_rotated_pill = z75.object({
|
|
16338
|
+
type: z75.literal("pcb_smtpad"),
|
|
16339
|
+
shape: z75.literal("rotated_pill"),
|
|
16313
16340
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16314
|
-
pcb_group_id:
|
|
16315
|
-
subcircuit_id:
|
|
16341
|
+
pcb_group_id: z75.string().optional(),
|
|
16342
|
+
subcircuit_id: z75.string().optional(),
|
|
16316
16343
|
x: distance,
|
|
16317
16344
|
y: distance,
|
|
16318
|
-
width:
|
|
16319
|
-
height:
|
|
16320
|
-
radius:
|
|
16345
|
+
width: z75.number(),
|
|
16346
|
+
height: z75.number(),
|
|
16347
|
+
radius: z75.number(),
|
|
16321
16348
|
ccw_rotation: rotation,
|
|
16322
16349
|
layer: layer_ref,
|
|
16323
|
-
port_hints:
|
|
16324
|
-
pcb_component_id:
|
|
16325
|
-
pcb_port_id:
|
|
16326
|
-
is_covered_with_solder_mask:
|
|
16327
|
-
soldermask_margin:
|
|
16350
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
16351
|
+
pcb_component_id: z75.string().optional(),
|
|
16352
|
+
pcb_port_id: z75.string().optional(),
|
|
16353
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
16354
|
+
soldermask_margin: z75.number().optional()
|
|
16328
16355
|
});
|
|
16329
|
-
var pcb_smtpad_polygon =
|
|
16330
|
-
type:
|
|
16331
|
-
shape:
|
|
16356
|
+
var pcb_smtpad_polygon = z75.object({
|
|
16357
|
+
type: z75.literal("pcb_smtpad"),
|
|
16358
|
+
shape: z75.literal("polygon"),
|
|
16332
16359
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16333
|
-
pcb_group_id:
|
|
16334
|
-
subcircuit_id:
|
|
16335
|
-
points:
|
|
16360
|
+
pcb_group_id: z75.string().optional(),
|
|
16361
|
+
subcircuit_id: z75.string().optional(),
|
|
16362
|
+
points: z75.array(point),
|
|
16336
16363
|
layer: layer_ref,
|
|
16337
|
-
port_hints:
|
|
16338
|
-
pcb_component_id:
|
|
16339
|
-
pcb_port_id:
|
|
16340
|
-
is_covered_with_solder_mask:
|
|
16341
|
-
soldermask_margin:
|
|
16364
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
16365
|
+
pcb_component_id: z75.string().optional(),
|
|
16366
|
+
pcb_port_id: z75.string().optional(),
|
|
16367
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
16368
|
+
soldermask_margin: z75.number().optional()
|
|
16342
16369
|
});
|
|
16343
|
-
var pcb_smtpad =
|
|
16370
|
+
var pcb_smtpad = z75.discriminatedUnion("shape", [
|
|
16344
16371
|
pcb_smtpad_circle,
|
|
16345
16372
|
pcb_smtpad_rect,
|
|
16346
16373
|
pcb_smtpad_rotated_rect,
|
|
@@ -16354,78 +16381,78 @@ expectTypesMatch(true);
|
|
|
16354
16381
|
expectTypesMatch(true);
|
|
16355
16382
|
expectTypesMatch(true);
|
|
16356
16383
|
expectTypesMatch(true);
|
|
16357
|
-
var pcb_solder_paste_circle =
|
|
16358
|
-
type:
|
|
16359
|
-
shape:
|
|
16384
|
+
var pcb_solder_paste_circle = z76.object({
|
|
16385
|
+
type: z76.literal("pcb_solder_paste"),
|
|
16386
|
+
shape: z76.literal("circle"),
|
|
16360
16387
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16361
|
-
pcb_group_id:
|
|
16362
|
-
subcircuit_id:
|
|
16388
|
+
pcb_group_id: z76.string().optional(),
|
|
16389
|
+
subcircuit_id: z76.string().optional(),
|
|
16363
16390
|
x: distance,
|
|
16364
16391
|
y: distance,
|
|
16365
|
-
radius:
|
|
16392
|
+
radius: z76.number(),
|
|
16366
16393
|
layer: layer_ref,
|
|
16367
|
-
pcb_component_id:
|
|
16368
|
-
pcb_smtpad_id:
|
|
16394
|
+
pcb_component_id: z76.string().optional(),
|
|
16395
|
+
pcb_smtpad_id: z76.string().optional()
|
|
16369
16396
|
});
|
|
16370
|
-
var pcb_solder_paste_rect =
|
|
16371
|
-
type:
|
|
16372
|
-
shape:
|
|
16397
|
+
var pcb_solder_paste_rect = z76.object({
|
|
16398
|
+
type: z76.literal("pcb_solder_paste"),
|
|
16399
|
+
shape: z76.literal("rect"),
|
|
16373
16400
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16374
|
-
pcb_group_id:
|
|
16375
|
-
subcircuit_id:
|
|
16401
|
+
pcb_group_id: z76.string().optional(),
|
|
16402
|
+
subcircuit_id: z76.string().optional(),
|
|
16376
16403
|
x: distance,
|
|
16377
16404
|
y: distance,
|
|
16378
|
-
width:
|
|
16379
|
-
height:
|
|
16405
|
+
width: z76.number(),
|
|
16406
|
+
height: z76.number(),
|
|
16380
16407
|
layer: layer_ref,
|
|
16381
|
-
pcb_component_id:
|
|
16382
|
-
pcb_smtpad_id:
|
|
16408
|
+
pcb_component_id: z76.string().optional(),
|
|
16409
|
+
pcb_smtpad_id: z76.string().optional()
|
|
16383
16410
|
});
|
|
16384
|
-
var pcb_solder_paste_pill =
|
|
16385
|
-
type:
|
|
16386
|
-
shape:
|
|
16411
|
+
var pcb_solder_paste_pill = z76.object({
|
|
16412
|
+
type: z76.literal("pcb_solder_paste"),
|
|
16413
|
+
shape: z76.literal("pill"),
|
|
16387
16414
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16388
|
-
pcb_group_id:
|
|
16389
|
-
subcircuit_id:
|
|
16415
|
+
pcb_group_id: z76.string().optional(),
|
|
16416
|
+
subcircuit_id: z76.string().optional(),
|
|
16390
16417
|
x: distance,
|
|
16391
16418
|
y: distance,
|
|
16392
|
-
width:
|
|
16393
|
-
height:
|
|
16394
|
-
radius:
|
|
16419
|
+
width: z76.number(),
|
|
16420
|
+
height: z76.number(),
|
|
16421
|
+
radius: z76.number(),
|
|
16395
16422
|
layer: layer_ref,
|
|
16396
|
-
pcb_component_id:
|
|
16397
|
-
pcb_smtpad_id:
|
|
16423
|
+
pcb_component_id: z76.string().optional(),
|
|
16424
|
+
pcb_smtpad_id: z76.string().optional()
|
|
16398
16425
|
});
|
|
16399
|
-
var pcb_solder_paste_rotated_rect =
|
|
16400
|
-
type:
|
|
16401
|
-
shape:
|
|
16426
|
+
var pcb_solder_paste_rotated_rect = z76.object({
|
|
16427
|
+
type: z76.literal("pcb_solder_paste"),
|
|
16428
|
+
shape: z76.literal("rotated_rect"),
|
|
16402
16429
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16403
|
-
pcb_group_id:
|
|
16404
|
-
subcircuit_id:
|
|
16430
|
+
pcb_group_id: z76.string().optional(),
|
|
16431
|
+
subcircuit_id: z76.string().optional(),
|
|
16405
16432
|
x: distance,
|
|
16406
16433
|
y: distance,
|
|
16407
|
-
width:
|
|
16408
|
-
height:
|
|
16434
|
+
width: z76.number(),
|
|
16435
|
+
height: z76.number(),
|
|
16409
16436
|
ccw_rotation: distance,
|
|
16410
16437
|
layer: layer_ref,
|
|
16411
|
-
pcb_component_id:
|
|
16412
|
-
pcb_smtpad_id:
|
|
16438
|
+
pcb_component_id: z76.string().optional(),
|
|
16439
|
+
pcb_smtpad_id: z76.string().optional()
|
|
16413
16440
|
});
|
|
16414
|
-
var pcb_solder_paste_oval =
|
|
16415
|
-
type:
|
|
16416
|
-
shape:
|
|
16441
|
+
var pcb_solder_paste_oval = z76.object({
|
|
16442
|
+
type: z76.literal("pcb_solder_paste"),
|
|
16443
|
+
shape: z76.literal("oval"),
|
|
16417
16444
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16418
|
-
pcb_group_id:
|
|
16419
|
-
subcircuit_id:
|
|
16445
|
+
pcb_group_id: z76.string().optional(),
|
|
16446
|
+
subcircuit_id: z76.string().optional(),
|
|
16420
16447
|
x: distance,
|
|
16421
16448
|
y: distance,
|
|
16422
|
-
width:
|
|
16423
|
-
height:
|
|
16449
|
+
width: z76.number(),
|
|
16450
|
+
height: z76.number(),
|
|
16424
16451
|
layer: layer_ref,
|
|
16425
|
-
pcb_component_id:
|
|
16426
|
-
pcb_smtpad_id:
|
|
16452
|
+
pcb_component_id: z76.string().optional(),
|
|
16453
|
+
pcb_smtpad_id: z76.string().optional()
|
|
16427
16454
|
});
|
|
16428
|
-
var pcb_solder_paste =
|
|
16455
|
+
var pcb_solder_paste = z76.union([
|
|
16429
16456
|
pcb_solder_paste_circle,
|
|
16430
16457
|
pcb_solder_paste_rect,
|
|
16431
16458
|
pcb_solder_paste_pill,
|
|
@@ -16439,124 +16466,124 @@ expectTypesMatch(
|
|
|
16439
16466
|
true
|
|
16440
16467
|
);
|
|
16441
16468
|
expectTypesMatch(true);
|
|
16442
|
-
var pcb_text =
|
|
16443
|
-
type:
|
|
16469
|
+
var pcb_text = z77.object({
|
|
16470
|
+
type: z77.literal("pcb_text"),
|
|
16444
16471
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
16445
|
-
pcb_group_id:
|
|
16446
|
-
subcircuit_id:
|
|
16447
|
-
text:
|
|
16472
|
+
pcb_group_id: z77.string().optional(),
|
|
16473
|
+
subcircuit_id: z77.string().optional(),
|
|
16474
|
+
text: z77.string(),
|
|
16448
16475
|
center: point,
|
|
16449
16476
|
layer: layer_ref,
|
|
16450
16477
|
width: length,
|
|
16451
16478
|
height: length,
|
|
16452
|
-
lines:
|
|
16479
|
+
lines: z77.number(),
|
|
16453
16480
|
// @ts-ignore
|
|
16454
|
-
align:
|
|
16481
|
+
align: z77.enum(["bottom-left"])
|
|
16455
16482
|
}).describe("Defines text on the PCB");
|
|
16456
16483
|
expectTypesMatch(true);
|
|
16457
|
-
var pcb_trace_route_point_wire =
|
|
16458
|
-
route_type:
|
|
16484
|
+
var pcb_trace_route_point_wire = z78.object({
|
|
16485
|
+
route_type: z78.literal("wire"),
|
|
16459
16486
|
x: distance,
|
|
16460
16487
|
y: distance,
|
|
16461
16488
|
width: distance,
|
|
16462
|
-
start_pcb_port_id:
|
|
16463
|
-
end_pcb_port_id:
|
|
16489
|
+
start_pcb_port_id: z78.string().optional(),
|
|
16490
|
+
end_pcb_port_id: z78.string().optional(),
|
|
16464
16491
|
layer: layer_ref
|
|
16465
16492
|
});
|
|
16466
|
-
var pcb_trace_route_point_via =
|
|
16467
|
-
route_type:
|
|
16493
|
+
var pcb_trace_route_point_via = z78.object({
|
|
16494
|
+
route_type: z78.literal("via"),
|
|
16468
16495
|
x: distance,
|
|
16469
16496
|
y: distance,
|
|
16470
16497
|
hole_diameter: distance.optional(),
|
|
16471
16498
|
outer_diameter: distance.optional(),
|
|
16472
|
-
from_layer:
|
|
16473
|
-
to_layer:
|
|
16499
|
+
from_layer: z78.string(),
|
|
16500
|
+
to_layer: z78.string()
|
|
16474
16501
|
});
|
|
16475
|
-
var pcb_trace_route_point =
|
|
16502
|
+
var pcb_trace_route_point = z78.union([
|
|
16476
16503
|
pcb_trace_route_point_wire,
|
|
16477
16504
|
pcb_trace_route_point_via
|
|
16478
16505
|
]);
|
|
16479
|
-
var pcb_trace =
|
|
16480
|
-
type:
|
|
16481
|
-
source_trace_id:
|
|
16482
|
-
pcb_component_id:
|
|
16506
|
+
var pcb_trace = z78.object({
|
|
16507
|
+
type: z78.literal("pcb_trace"),
|
|
16508
|
+
source_trace_id: z78.string().optional(),
|
|
16509
|
+
pcb_component_id: z78.string().optional(),
|
|
16483
16510
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
16484
|
-
pcb_group_id:
|
|
16485
|
-
subcircuit_id:
|
|
16486
|
-
route_thickness_mode:
|
|
16487
|
-
route_order_index:
|
|
16488
|
-
should_round_corners:
|
|
16489
|
-
trace_length:
|
|
16490
|
-
highlight_color:
|
|
16491
|
-
route:
|
|
16511
|
+
pcb_group_id: z78.string().optional(),
|
|
16512
|
+
subcircuit_id: z78.string().optional(),
|
|
16513
|
+
route_thickness_mode: z78.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
16514
|
+
route_order_index: z78.number().optional(),
|
|
16515
|
+
should_round_corners: z78.boolean().optional(),
|
|
16516
|
+
trace_length: z78.number().optional(),
|
|
16517
|
+
highlight_color: z78.string().optional(),
|
|
16518
|
+
route: z78.array(pcb_trace_route_point)
|
|
16492
16519
|
}).describe("Defines a trace on the PCB");
|
|
16493
16520
|
expectTypesMatch(true);
|
|
16494
16521
|
expectTypesMatch(true);
|
|
16495
|
-
var pcb_trace_error =
|
|
16496
|
-
type:
|
|
16522
|
+
var pcb_trace_error = z79.object({
|
|
16523
|
+
type: z79.literal("pcb_trace_error"),
|
|
16497
16524
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
16498
|
-
error_type:
|
|
16499
|
-
message:
|
|
16525
|
+
error_type: z79.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
16526
|
+
message: z79.string(),
|
|
16500
16527
|
center: point.optional(),
|
|
16501
|
-
pcb_trace_id:
|
|
16502
|
-
source_trace_id:
|
|
16503
|
-
pcb_component_ids:
|
|
16504
|
-
pcb_port_ids:
|
|
16505
|
-
subcircuit_id:
|
|
16528
|
+
pcb_trace_id: z79.string(),
|
|
16529
|
+
source_trace_id: z79.string(),
|
|
16530
|
+
pcb_component_ids: z79.array(z79.string()),
|
|
16531
|
+
pcb_port_ids: z79.array(z79.string()),
|
|
16532
|
+
subcircuit_id: z79.string().optional()
|
|
16506
16533
|
}).describe("Defines a trace error on the PCB");
|
|
16507
16534
|
expectTypesMatch(true);
|
|
16508
|
-
var pcb_trace_missing_error =
|
|
16509
|
-
type:
|
|
16535
|
+
var pcb_trace_missing_error = z80.object({
|
|
16536
|
+
type: z80.literal("pcb_trace_missing_error"),
|
|
16510
16537
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
16511
16538
|
"pcb_trace_missing_error"
|
|
16512
16539
|
),
|
|
16513
|
-
error_type:
|
|
16514
|
-
message:
|
|
16540
|
+
error_type: z80.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
16541
|
+
message: z80.string(),
|
|
16515
16542
|
center: point.optional(),
|
|
16516
|
-
source_trace_id:
|
|
16517
|
-
pcb_component_ids:
|
|
16518
|
-
pcb_port_ids:
|
|
16519
|
-
subcircuit_id:
|
|
16543
|
+
source_trace_id: z80.string(),
|
|
16544
|
+
pcb_component_ids: z80.array(z80.string()),
|
|
16545
|
+
pcb_port_ids: z80.array(z80.string()),
|
|
16546
|
+
subcircuit_id: z80.string().optional()
|
|
16520
16547
|
}).describe(
|
|
16521
16548
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
16522
16549
|
);
|
|
16523
16550
|
expectTypesMatch(true);
|
|
16524
|
-
var pcb_port_not_matched_error =
|
|
16525
|
-
type:
|
|
16551
|
+
var pcb_port_not_matched_error = z81.object({
|
|
16552
|
+
type: z81.literal("pcb_port_not_matched_error"),
|
|
16526
16553
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
16527
|
-
error_type:
|
|
16528
|
-
message:
|
|
16529
|
-
pcb_component_ids:
|
|
16530
|
-
subcircuit_id:
|
|
16554
|
+
error_type: z81.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
16555
|
+
message: z81.string(),
|
|
16556
|
+
pcb_component_ids: z81.array(z81.string()),
|
|
16557
|
+
subcircuit_id: z81.string().optional()
|
|
16531
16558
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
16532
16559
|
expectTypesMatch(true);
|
|
16533
|
-
var pcb_port_not_connected_error =
|
|
16534
|
-
type:
|
|
16560
|
+
var pcb_port_not_connected_error = z82.object({
|
|
16561
|
+
type: z82.literal("pcb_port_not_connected_error"),
|
|
16535
16562
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
16536
16563
|
"pcb_port_not_connected_error"
|
|
16537
16564
|
),
|
|
16538
|
-
error_type:
|
|
16539
|
-
message:
|
|
16540
|
-
pcb_port_ids:
|
|
16541
|
-
pcb_component_ids:
|
|
16542
|
-
subcircuit_id:
|
|
16565
|
+
error_type: z82.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
16566
|
+
message: z82.string(),
|
|
16567
|
+
pcb_port_ids: z82.array(z82.string()),
|
|
16568
|
+
pcb_component_ids: z82.array(z82.string()),
|
|
16569
|
+
subcircuit_id: z82.string().optional()
|
|
16543
16570
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
16544
16571
|
expectTypesMatch(
|
|
16545
16572
|
true
|
|
16546
16573
|
);
|
|
16547
|
-
var pcb_net =
|
|
16548
|
-
type:
|
|
16574
|
+
var pcb_net = z83.object({
|
|
16575
|
+
type: z83.literal("pcb_net"),
|
|
16549
16576
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
16550
|
-
source_net_id:
|
|
16551
|
-
highlight_color:
|
|
16577
|
+
source_net_id: z83.string().optional(),
|
|
16578
|
+
highlight_color: z83.string().optional()
|
|
16552
16579
|
}).describe("Defines a net on the PCB");
|
|
16553
16580
|
expectTypesMatch(true);
|
|
16554
|
-
var pcb_via =
|
|
16555
|
-
type:
|
|
16581
|
+
var pcb_via = z84.object({
|
|
16582
|
+
type: z84.literal("pcb_via"),
|
|
16556
16583
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
16557
|
-
pcb_group_id:
|
|
16558
|
-
subcircuit_id:
|
|
16559
|
-
subcircuit_connectivity_map_key:
|
|
16584
|
+
pcb_group_id: z84.string().optional(),
|
|
16585
|
+
subcircuit_id: z84.string().optional(),
|
|
16586
|
+
subcircuit_connectivity_map_key: z84.string().optional(),
|
|
16560
16587
|
x: distance,
|
|
16561
16588
|
y: distance,
|
|
16562
16589
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -16565,60 +16592,60 @@ var pcb_via = z83.object({
|
|
|
16565
16592
|
from_layer: layer_ref.optional(),
|
|
16566
16593
|
/** @deprecated */
|
|
16567
16594
|
to_layer: layer_ref.optional(),
|
|
16568
|
-
layers:
|
|
16569
|
-
pcb_trace_id:
|
|
16570
|
-
net_is_assignable:
|
|
16571
|
-
net_assigned:
|
|
16595
|
+
layers: z84.array(layer_ref),
|
|
16596
|
+
pcb_trace_id: z84.string().optional(),
|
|
16597
|
+
net_is_assignable: z84.boolean().optional(),
|
|
16598
|
+
net_assigned: z84.boolean().optional()
|
|
16572
16599
|
}).describe("Defines a via on the PCB");
|
|
16573
16600
|
expectTypesMatch(true);
|
|
16574
|
-
var pcb_board =
|
|
16575
|
-
type:
|
|
16601
|
+
var pcb_board = z85.object({
|
|
16602
|
+
type: z85.literal("pcb_board"),
|
|
16576
16603
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
16577
|
-
pcb_panel_id:
|
|
16578
|
-
is_subcircuit:
|
|
16579
|
-
subcircuit_id:
|
|
16604
|
+
pcb_panel_id: z85.string().optional(),
|
|
16605
|
+
is_subcircuit: z85.boolean().optional(),
|
|
16606
|
+
subcircuit_id: z85.string().optional(),
|
|
16580
16607
|
width: length.optional(),
|
|
16581
16608
|
height: length.optional(),
|
|
16582
16609
|
center: point,
|
|
16583
16610
|
thickness: length.optional().default(1.4),
|
|
16584
|
-
num_layers:
|
|
16585
|
-
outline:
|
|
16586
|
-
shape:
|
|
16587
|
-
material:
|
|
16611
|
+
num_layers: z85.number().optional().default(4),
|
|
16612
|
+
outline: z85.array(point).optional(),
|
|
16613
|
+
shape: z85.enum(["rect", "polygon"]).optional(),
|
|
16614
|
+
material: z85.enum(["fr4", "fr1"]).default("fr4")
|
|
16588
16615
|
}).describe("Defines the board outline of the PCB");
|
|
16589
16616
|
expectTypesMatch(true);
|
|
16590
|
-
var pcb_panel =
|
|
16591
|
-
type:
|
|
16617
|
+
var pcb_panel = z86.object({
|
|
16618
|
+
type: z86.literal("pcb_panel"),
|
|
16592
16619
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
16593
16620
|
width: length,
|
|
16594
16621
|
height: length,
|
|
16595
16622
|
center: point,
|
|
16596
|
-
covered_with_solder_mask:
|
|
16623
|
+
covered_with_solder_mask: z86.boolean().optional().default(true)
|
|
16597
16624
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
16598
16625
|
expectTypesMatch(true);
|
|
16599
|
-
var pcb_placement_error =
|
|
16600
|
-
type:
|
|
16626
|
+
var pcb_placement_error = z87.object({
|
|
16627
|
+
type: z87.literal("pcb_placement_error"),
|
|
16601
16628
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
16602
|
-
error_type:
|
|
16603
|
-
message:
|
|
16604
|
-
subcircuit_id:
|
|
16629
|
+
error_type: z87.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
16630
|
+
message: z87.string(),
|
|
16631
|
+
subcircuit_id: z87.string().optional()
|
|
16605
16632
|
}).describe("Defines a placement error on the PCB");
|
|
16606
16633
|
expectTypesMatch(true);
|
|
16607
|
-
var pcb_trace_hint =
|
|
16608
|
-
type:
|
|
16634
|
+
var pcb_trace_hint = z88.object({
|
|
16635
|
+
type: z88.literal("pcb_trace_hint"),
|
|
16609
16636
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
16610
|
-
pcb_port_id:
|
|
16611
|
-
pcb_component_id:
|
|
16612
|
-
route:
|
|
16613
|
-
subcircuit_id:
|
|
16637
|
+
pcb_port_id: z88.string(),
|
|
16638
|
+
pcb_component_id: z88.string(),
|
|
16639
|
+
route: z88.array(route_hint_point),
|
|
16640
|
+
subcircuit_id: z88.string().optional()
|
|
16614
16641
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
16615
16642
|
expectTypesMatch(true);
|
|
16616
|
-
var pcb_silkscreen_line =
|
|
16617
|
-
type:
|
|
16643
|
+
var pcb_silkscreen_line = z89.object({
|
|
16644
|
+
type: z89.literal("pcb_silkscreen_line"),
|
|
16618
16645
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
16619
|
-
pcb_component_id:
|
|
16620
|
-
pcb_group_id:
|
|
16621
|
-
subcircuit_id:
|
|
16646
|
+
pcb_component_id: z89.string(),
|
|
16647
|
+
pcb_group_id: z89.string().optional(),
|
|
16648
|
+
subcircuit_id: z89.string().optional(),
|
|
16622
16649
|
stroke_width: distance.default("0.1mm"),
|
|
16623
16650
|
x1: distance,
|
|
16624
16651
|
y1: distance,
|
|
@@ -16627,28 +16654,28 @@ var pcb_silkscreen_line = z88.object({
|
|
|
16627
16654
|
layer: visible_layer
|
|
16628
16655
|
}).describe("Defines a silkscreen line on the PCB");
|
|
16629
16656
|
expectTypesMatch(true);
|
|
16630
|
-
var pcb_silkscreen_path =
|
|
16631
|
-
type:
|
|
16657
|
+
var pcb_silkscreen_path = z90.object({
|
|
16658
|
+
type: z90.literal("pcb_silkscreen_path"),
|
|
16632
16659
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
16633
|
-
pcb_component_id:
|
|
16634
|
-
pcb_group_id:
|
|
16635
|
-
subcircuit_id:
|
|
16660
|
+
pcb_component_id: z90.string(),
|
|
16661
|
+
pcb_group_id: z90.string().optional(),
|
|
16662
|
+
subcircuit_id: z90.string().optional(),
|
|
16636
16663
|
layer: visible_layer,
|
|
16637
|
-
route:
|
|
16664
|
+
route: z90.array(point),
|
|
16638
16665
|
stroke_width: length
|
|
16639
16666
|
}).describe("Defines a silkscreen path on the PCB");
|
|
16640
16667
|
expectTypesMatch(true);
|
|
16641
|
-
var pcb_silkscreen_text =
|
|
16642
|
-
type:
|
|
16668
|
+
var pcb_silkscreen_text = z91.object({
|
|
16669
|
+
type: z91.literal("pcb_silkscreen_text"),
|
|
16643
16670
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
16644
|
-
pcb_group_id:
|
|
16645
|
-
subcircuit_id:
|
|
16646
|
-
font:
|
|
16671
|
+
pcb_group_id: z91.string().optional(),
|
|
16672
|
+
subcircuit_id: z91.string().optional(),
|
|
16673
|
+
font: z91.literal("tscircuit2024").default("tscircuit2024"),
|
|
16647
16674
|
font_size: distance.default("0.2mm"),
|
|
16648
|
-
pcb_component_id:
|
|
16649
|
-
text:
|
|
16650
|
-
is_knockout:
|
|
16651
|
-
knockout_padding:
|
|
16675
|
+
pcb_component_id: z91.string(),
|
|
16676
|
+
text: z91.string(),
|
|
16677
|
+
is_knockout: z91.boolean().default(false).optional(),
|
|
16678
|
+
knockout_padding: z91.object({
|
|
16652
16679
|
left: length,
|
|
16653
16680
|
top: length,
|
|
16654
16681
|
bottom: length,
|
|
@@ -16659,24 +16686,24 @@ var pcb_silkscreen_text = z90.object({
|
|
|
16659
16686
|
bottom: "0.2mm",
|
|
16660
16687
|
right: "0.2mm"
|
|
16661
16688
|
}).optional(),
|
|
16662
|
-
ccw_rotation:
|
|
16689
|
+
ccw_rotation: z91.number().optional(),
|
|
16663
16690
|
layer: layer_ref,
|
|
16664
|
-
is_mirrored:
|
|
16691
|
+
is_mirrored: z91.boolean().default(false).optional(),
|
|
16665
16692
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16666
16693
|
anchor_alignment: ninePointAnchor.default("center")
|
|
16667
16694
|
}).describe("Defines silkscreen text on the PCB");
|
|
16668
16695
|
expectTypesMatch(true);
|
|
16669
|
-
var pcb_copper_text =
|
|
16670
|
-
type:
|
|
16696
|
+
var pcb_copper_text = z92.object({
|
|
16697
|
+
type: z92.literal("pcb_copper_text"),
|
|
16671
16698
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
16672
|
-
pcb_group_id:
|
|
16673
|
-
subcircuit_id:
|
|
16674
|
-
font:
|
|
16699
|
+
pcb_group_id: z92.string().optional(),
|
|
16700
|
+
subcircuit_id: z92.string().optional(),
|
|
16701
|
+
font: z92.literal("tscircuit2024").default("tscircuit2024"),
|
|
16675
16702
|
font_size: distance.default("0.2mm"),
|
|
16676
|
-
pcb_component_id:
|
|
16677
|
-
text:
|
|
16678
|
-
is_knockout:
|
|
16679
|
-
knockout_padding:
|
|
16703
|
+
pcb_component_id: z92.string(),
|
|
16704
|
+
text: z92.string(),
|
|
16705
|
+
is_knockout: z92.boolean().default(false).optional(),
|
|
16706
|
+
knockout_padding: z92.object({
|
|
16680
16707
|
left: length,
|
|
16681
16708
|
top: length,
|
|
16682
16709
|
bottom: length,
|
|
@@ -16687,273 +16714,273 @@ var pcb_copper_text = z91.object({
|
|
|
16687
16714
|
bottom: "0.2mm",
|
|
16688
16715
|
right: "0.2mm"
|
|
16689
16716
|
}).optional(),
|
|
16690
|
-
ccw_rotation:
|
|
16717
|
+
ccw_rotation: z92.number().optional(),
|
|
16691
16718
|
layer: layer_ref,
|
|
16692
|
-
is_mirrored:
|
|
16719
|
+
is_mirrored: z92.boolean().default(false).optional(),
|
|
16693
16720
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16694
16721
|
anchor_alignment: ninePointAnchor.default("center")
|
|
16695
16722
|
}).describe("Defines copper text on the PCB");
|
|
16696
16723
|
expectTypesMatch(true);
|
|
16697
|
-
var pcb_silkscreen_rect =
|
|
16698
|
-
type:
|
|
16724
|
+
var pcb_silkscreen_rect = z93.object({
|
|
16725
|
+
type: z93.literal("pcb_silkscreen_rect"),
|
|
16699
16726
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
16700
|
-
pcb_component_id:
|
|
16701
|
-
pcb_group_id:
|
|
16702
|
-
subcircuit_id:
|
|
16727
|
+
pcb_component_id: z93.string(),
|
|
16728
|
+
pcb_group_id: z93.string().optional(),
|
|
16729
|
+
subcircuit_id: z93.string().optional(),
|
|
16703
16730
|
center: point,
|
|
16704
16731
|
width: length,
|
|
16705
16732
|
height: length,
|
|
16706
16733
|
layer: layer_ref,
|
|
16707
16734
|
stroke_width: length.default("1mm"),
|
|
16708
16735
|
corner_radius: length.optional(),
|
|
16709
|
-
is_filled:
|
|
16710
|
-
has_stroke:
|
|
16711
|
-
is_stroke_dashed:
|
|
16736
|
+
is_filled: z93.boolean().default(true).optional(),
|
|
16737
|
+
has_stroke: z93.boolean().optional(),
|
|
16738
|
+
is_stroke_dashed: z93.boolean().optional()
|
|
16712
16739
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
16713
16740
|
expectTypesMatch(true);
|
|
16714
|
-
var pcb_silkscreen_circle =
|
|
16715
|
-
type:
|
|
16741
|
+
var pcb_silkscreen_circle = z94.object({
|
|
16742
|
+
type: z94.literal("pcb_silkscreen_circle"),
|
|
16716
16743
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
16717
16744
|
"pcb_silkscreen_circle"
|
|
16718
16745
|
),
|
|
16719
|
-
pcb_component_id:
|
|
16720
|
-
pcb_group_id:
|
|
16721
|
-
subcircuit_id:
|
|
16746
|
+
pcb_component_id: z94.string(),
|
|
16747
|
+
pcb_group_id: z94.string().optional(),
|
|
16748
|
+
subcircuit_id: z94.string().optional(),
|
|
16722
16749
|
center: point,
|
|
16723
16750
|
radius: length,
|
|
16724
16751
|
layer: visible_layer,
|
|
16725
16752
|
stroke_width: length.default("1mm")
|
|
16726
16753
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
16727
16754
|
expectTypesMatch(true);
|
|
16728
|
-
var pcb_silkscreen_oval =
|
|
16729
|
-
type:
|
|
16755
|
+
var pcb_silkscreen_oval = z95.object({
|
|
16756
|
+
type: z95.literal("pcb_silkscreen_oval"),
|
|
16730
16757
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
16731
|
-
pcb_component_id:
|
|
16732
|
-
pcb_group_id:
|
|
16733
|
-
subcircuit_id:
|
|
16758
|
+
pcb_component_id: z95.string(),
|
|
16759
|
+
pcb_group_id: z95.string().optional(),
|
|
16760
|
+
subcircuit_id: z95.string().optional(),
|
|
16734
16761
|
center: point,
|
|
16735
16762
|
radius_x: distance,
|
|
16736
16763
|
radius_y: distance,
|
|
16737
16764
|
layer: visible_layer
|
|
16738
16765
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
16739
16766
|
expectTypesMatch(true);
|
|
16740
|
-
var pcb_fabrication_note_text =
|
|
16741
|
-
type:
|
|
16767
|
+
var pcb_fabrication_note_text = z96.object({
|
|
16768
|
+
type: z96.literal("pcb_fabrication_note_text"),
|
|
16742
16769
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
16743
16770
|
"pcb_fabrication_note_text"
|
|
16744
16771
|
),
|
|
16745
|
-
subcircuit_id:
|
|
16746
|
-
pcb_group_id:
|
|
16747
|
-
font:
|
|
16772
|
+
subcircuit_id: z96.string().optional(),
|
|
16773
|
+
pcb_group_id: z96.string().optional(),
|
|
16774
|
+
font: z96.literal("tscircuit2024").default("tscircuit2024"),
|
|
16748
16775
|
font_size: distance.default("1mm"),
|
|
16749
|
-
pcb_component_id:
|
|
16750
|
-
text:
|
|
16776
|
+
pcb_component_id: z96.string(),
|
|
16777
|
+
text: z96.string(),
|
|
16751
16778
|
layer: visible_layer,
|
|
16752
16779
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16753
|
-
anchor_alignment:
|
|
16754
|
-
color:
|
|
16780
|
+
anchor_alignment: z96.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
16781
|
+
color: z96.string().optional()
|
|
16755
16782
|
}).describe(
|
|
16756
16783
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
16757
16784
|
);
|
|
16758
16785
|
expectTypesMatch(true);
|
|
16759
|
-
var pcb_fabrication_note_path =
|
|
16760
|
-
type:
|
|
16786
|
+
var pcb_fabrication_note_path = z97.object({
|
|
16787
|
+
type: z97.literal("pcb_fabrication_note_path"),
|
|
16761
16788
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
16762
16789
|
"pcb_fabrication_note_path"
|
|
16763
16790
|
),
|
|
16764
|
-
pcb_component_id:
|
|
16765
|
-
subcircuit_id:
|
|
16791
|
+
pcb_component_id: z97.string(),
|
|
16792
|
+
subcircuit_id: z97.string().optional(),
|
|
16766
16793
|
layer: layer_ref,
|
|
16767
|
-
route:
|
|
16794
|
+
route: z97.array(point),
|
|
16768
16795
|
stroke_width: length,
|
|
16769
|
-
color:
|
|
16796
|
+
color: z97.string().optional()
|
|
16770
16797
|
}).describe(
|
|
16771
16798
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
16772
16799
|
);
|
|
16773
16800
|
expectTypesMatch(true);
|
|
16774
|
-
var pcb_fabrication_note_rect =
|
|
16775
|
-
type:
|
|
16801
|
+
var pcb_fabrication_note_rect = z98.object({
|
|
16802
|
+
type: z98.literal("pcb_fabrication_note_rect"),
|
|
16776
16803
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
16777
16804
|
"pcb_fabrication_note_rect"
|
|
16778
16805
|
),
|
|
16779
|
-
pcb_component_id:
|
|
16780
|
-
pcb_group_id:
|
|
16781
|
-
subcircuit_id:
|
|
16806
|
+
pcb_component_id: z98.string(),
|
|
16807
|
+
pcb_group_id: z98.string().optional(),
|
|
16808
|
+
subcircuit_id: z98.string().optional(),
|
|
16782
16809
|
center: point,
|
|
16783
16810
|
width: length,
|
|
16784
16811
|
height: length,
|
|
16785
16812
|
layer: visible_layer,
|
|
16786
16813
|
stroke_width: length.default("0.1mm"),
|
|
16787
16814
|
corner_radius: length.optional(),
|
|
16788
|
-
is_filled:
|
|
16789
|
-
has_stroke:
|
|
16790
|
-
is_stroke_dashed:
|
|
16791
|
-
color:
|
|
16815
|
+
is_filled: z98.boolean().optional(),
|
|
16816
|
+
has_stroke: z98.boolean().optional(),
|
|
16817
|
+
is_stroke_dashed: z98.boolean().optional(),
|
|
16818
|
+
color: z98.string().optional()
|
|
16792
16819
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
16793
16820
|
expectTypesMatch(true);
|
|
16794
|
-
var pcb_fabrication_note_dimension =
|
|
16795
|
-
type:
|
|
16821
|
+
var pcb_fabrication_note_dimension = z99.object({
|
|
16822
|
+
type: z99.literal("pcb_fabrication_note_dimension"),
|
|
16796
16823
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
16797
16824
|
"pcb_fabrication_note_dimension"
|
|
16798
16825
|
),
|
|
16799
|
-
pcb_component_id:
|
|
16800
|
-
pcb_group_id:
|
|
16801
|
-
subcircuit_id:
|
|
16826
|
+
pcb_component_id: z99.string(),
|
|
16827
|
+
pcb_group_id: z99.string().optional(),
|
|
16828
|
+
subcircuit_id: z99.string().optional(),
|
|
16802
16829
|
layer: visible_layer,
|
|
16803
16830
|
from: point,
|
|
16804
16831
|
to: point,
|
|
16805
|
-
text:
|
|
16806
|
-
text_ccw_rotation:
|
|
16832
|
+
text: z99.string().optional(),
|
|
16833
|
+
text_ccw_rotation: z99.number().optional(),
|
|
16807
16834
|
offset: length.optional(),
|
|
16808
16835
|
offset_distance: length.optional(),
|
|
16809
|
-
offset_direction:
|
|
16810
|
-
x:
|
|
16811
|
-
y:
|
|
16836
|
+
offset_direction: z99.object({
|
|
16837
|
+
x: z99.number(),
|
|
16838
|
+
y: z99.number()
|
|
16812
16839
|
}).optional(),
|
|
16813
|
-
font:
|
|
16840
|
+
font: z99.literal("tscircuit2024").default("tscircuit2024"),
|
|
16814
16841
|
font_size: length.default("1mm"),
|
|
16815
|
-
color:
|
|
16842
|
+
color: z99.string().optional(),
|
|
16816
16843
|
arrow_size: length.default("1mm")
|
|
16817
16844
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
16818
16845
|
expectTypesMatch(true);
|
|
16819
|
-
var pcb_note_text =
|
|
16820
|
-
type:
|
|
16846
|
+
var pcb_note_text = z100.object({
|
|
16847
|
+
type: z100.literal("pcb_note_text"),
|
|
16821
16848
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
16822
|
-
pcb_component_id: z99.string().optional(),
|
|
16823
|
-
pcb_group_id: z99.string().optional(),
|
|
16824
|
-
subcircuit_id: z99.string().optional(),
|
|
16825
|
-
name: z99.string().optional(),
|
|
16826
|
-
font: z99.literal("tscircuit2024").default("tscircuit2024"),
|
|
16827
|
-
font_size: distance.default("1mm"),
|
|
16828
|
-
text: z99.string().optional(),
|
|
16829
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16830
|
-
anchor_alignment: z99.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
16831
|
-
color: z99.string().optional()
|
|
16832
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
16833
|
-
expectTypesMatch(true);
|
|
16834
|
-
var pcb_note_rect = z100.object({
|
|
16835
|
-
type: z100.literal("pcb_note_rect"),
|
|
16836
|
-
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
16837
16849
|
pcb_component_id: z100.string().optional(),
|
|
16838
16850
|
pcb_group_id: z100.string().optional(),
|
|
16839
16851
|
subcircuit_id: z100.string().optional(),
|
|
16840
16852
|
name: z100.string().optional(),
|
|
16853
|
+
font: z100.literal("tscircuit2024").default("tscircuit2024"),
|
|
16854
|
+
font_size: distance.default("1mm"),
|
|
16841
16855
|
text: z100.string().optional(),
|
|
16842
|
-
|
|
16843
|
-
|
|
16844
|
-
height: length,
|
|
16845
|
-
stroke_width: length.default("0.1mm"),
|
|
16846
|
-
corner_radius: length.optional(),
|
|
16847
|
-
is_filled: z100.boolean().optional(),
|
|
16848
|
-
has_stroke: z100.boolean().optional(),
|
|
16849
|
-
is_stroke_dashed: z100.boolean().optional(),
|
|
16856
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16857
|
+
anchor_alignment: z100.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
16850
16858
|
color: z100.string().optional()
|
|
16851
|
-
}).describe("Defines a
|
|
16859
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
16852
16860
|
expectTypesMatch(true);
|
|
16853
|
-
var
|
|
16854
|
-
type: z101.literal("
|
|
16855
|
-
|
|
16861
|
+
var pcb_note_rect = z101.object({
|
|
16862
|
+
type: z101.literal("pcb_note_rect"),
|
|
16863
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
16856
16864
|
pcb_component_id: z101.string().optional(),
|
|
16857
16865
|
pcb_group_id: z101.string().optional(),
|
|
16858
16866
|
subcircuit_id: z101.string().optional(),
|
|
16859
16867
|
name: z101.string().optional(),
|
|
16860
16868
|
text: z101.string().optional(),
|
|
16861
|
-
|
|
16869
|
+
center: point,
|
|
16870
|
+
width: length,
|
|
16871
|
+
height: length,
|
|
16862
16872
|
stroke_width: length.default("0.1mm"),
|
|
16873
|
+
corner_radius: length.optional(),
|
|
16874
|
+
is_filled: z101.boolean().optional(),
|
|
16875
|
+
has_stroke: z101.boolean().optional(),
|
|
16876
|
+
is_stroke_dashed: z101.boolean().optional(),
|
|
16863
16877
|
color: z101.string().optional()
|
|
16864
|
-
}).describe("Defines a
|
|
16878
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
16865
16879
|
expectTypesMatch(true);
|
|
16866
|
-
var
|
|
16867
|
-
type: z102.literal("
|
|
16868
|
-
|
|
16880
|
+
var pcb_note_path = z102.object({
|
|
16881
|
+
type: z102.literal("pcb_note_path"),
|
|
16882
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
16869
16883
|
pcb_component_id: z102.string().optional(),
|
|
16870
16884
|
pcb_group_id: z102.string().optional(),
|
|
16871
16885
|
subcircuit_id: z102.string().optional(),
|
|
16872
16886
|
name: z102.string().optional(),
|
|
16873
16887
|
text: z102.string().optional(),
|
|
16888
|
+
route: z102.array(point),
|
|
16889
|
+
stroke_width: length.default("0.1mm"),
|
|
16890
|
+
color: z102.string().optional()
|
|
16891
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
16892
|
+
expectTypesMatch(true);
|
|
16893
|
+
var pcb_note_line = z103.object({
|
|
16894
|
+
type: z103.literal("pcb_note_line"),
|
|
16895
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
16896
|
+
pcb_component_id: z103.string().optional(),
|
|
16897
|
+
pcb_group_id: z103.string().optional(),
|
|
16898
|
+
subcircuit_id: z103.string().optional(),
|
|
16899
|
+
name: z103.string().optional(),
|
|
16900
|
+
text: z103.string().optional(),
|
|
16874
16901
|
x1: distance,
|
|
16875
16902
|
y1: distance,
|
|
16876
16903
|
x2: distance,
|
|
16877
16904
|
y2: distance,
|
|
16878
16905
|
stroke_width: distance.default("0.1mm"),
|
|
16879
|
-
color:
|
|
16880
|
-
is_dashed:
|
|
16906
|
+
color: z103.string().optional(),
|
|
16907
|
+
is_dashed: z103.boolean().optional()
|
|
16881
16908
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
16882
16909
|
expectTypesMatch(true);
|
|
16883
|
-
var pcb_note_dimension =
|
|
16884
|
-
type:
|
|
16910
|
+
var pcb_note_dimension = z104.object({
|
|
16911
|
+
type: z104.literal("pcb_note_dimension"),
|
|
16885
16912
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
16886
|
-
pcb_component_id:
|
|
16887
|
-
pcb_group_id:
|
|
16888
|
-
subcircuit_id:
|
|
16889
|
-
name:
|
|
16913
|
+
pcb_component_id: z104.string().optional(),
|
|
16914
|
+
pcb_group_id: z104.string().optional(),
|
|
16915
|
+
subcircuit_id: z104.string().optional(),
|
|
16916
|
+
name: z104.string().optional(),
|
|
16890
16917
|
from: point,
|
|
16891
16918
|
to: point,
|
|
16892
|
-
text:
|
|
16893
|
-
text_ccw_rotation:
|
|
16919
|
+
text: z104.string().optional(),
|
|
16920
|
+
text_ccw_rotation: z104.number().optional(),
|
|
16894
16921
|
offset_distance: length.optional(),
|
|
16895
|
-
offset_direction:
|
|
16896
|
-
x:
|
|
16897
|
-
y:
|
|
16922
|
+
offset_direction: z104.object({
|
|
16923
|
+
x: z104.number(),
|
|
16924
|
+
y: z104.number()
|
|
16898
16925
|
}).optional(),
|
|
16899
|
-
font:
|
|
16926
|
+
font: z104.literal("tscircuit2024").default("tscircuit2024"),
|
|
16900
16927
|
font_size: length.default("1mm"),
|
|
16901
|
-
color:
|
|
16928
|
+
color: z104.string().optional(),
|
|
16902
16929
|
arrow_size: length.default("1mm")
|
|
16903
16930
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
16904
16931
|
expectTypesMatch(true);
|
|
16905
|
-
var pcb_footprint_overlap_error =
|
|
16906
|
-
type:
|
|
16932
|
+
var pcb_footprint_overlap_error = z105.object({
|
|
16933
|
+
type: z105.literal("pcb_footprint_overlap_error"),
|
|
16907
16934
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
16908
|
-
error_type:
|
|
16909
|
-
message:
|
|
16910
|
-
pcb_smtpad_ids:
|
|
16911
|
-
pcb_plated_hole_ids:
|
|
16912
|
-
pcb_hole_ids:
|
|
16913
|
-
pcb_keepout_ids:
|
|
16935
|
+
error_type: z105.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
16936
|
+
message: z105.string(),
|
|
16937
|
+
pcb_smtpad_ids: z105.array(z105.string()).optional(),
|
|
16938
|
+
pcb_plated_hole_ids: z105.array(z105.string()).optional(),
|
|
16939
|
+
pcb_hole_ids: z105.array(z105.string()).optional(),
|
|
16940
|
+
pcb_keepout_ids: z105.array(z105.string()).optional()
|
|
16914
16941
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
16915
16942
|
expectTypesMatch(
|
|
16916
16943
|
true
|
|
16917
16944
|
);
|
|
16918
|
-
var pcb_keepout =
|
|
16919
|
-
type:
|
|
16920
|
-
shape:
|
|
16921
|
-
pcb_group_id:
|
|
16922
|
-
subcircuit_id:
|
|
16945
|
+
var pcb_keepout = z106.object({
|
|
16946
|
+
type: z106.literal("pcb_keepout"),
|
|
16947
|
+
shape: z106.literal("rect"),
|
|
16948
|
+
pcb_group_id: z106.string().optional(),
|
|
16949
|
+
subcircuit_id: z106.string().optional(),
|
|
16923
16950
|
center: point,
|
|
16924
16951
|
width: distance,
|
|
16925
16952
|
height: distance,
|
|
16926
|
-
pcb_keepout_id:
|
|
16927
|
-
layers:
|
|
16953
|
+
pcb_keepout_id: z106.string(),
|
|
16954
|
+
layers: z106.array(z106.string()),
|
|
16928
16955
|
// Specify layers where the keepout applies
|
|
16929
|
-
description:
|
|
16956
|
+
description: z106.string().optional()
|
|
16930
16957
|
// Optional description of the keepout
|
|
16931
16958
|
}).or(
|
|
16932
|
-
|
|
16933
|
-
type:
|
|
16934
|
-
shape:
|
|
16935
|
-
pcb_group_id:
|
|
16936
|
-
subcircuit_id:
|
|
16959
|
+
z106.object({
|
|
16960
|
+
type: z106.literal("pcb_keepout"),
|
|
16961
|
+
shape: z106.literal("circle"),
|
|
16962
|
+
pcb_group_id: z106.string().optional(),
|
|
16963
|
+
subcircuit_id: z106.string().optional(),
|
|
16937
16964
|
center: point,
|
|
16938
16965
|
radius: distance,
|
|
16939
|
-
pcb_keepout_id:
|
|
16940
|
-
layers:
|
|
16966
|
+
pcb_keepout_id: z106.string(),
|
|
16967
|
+
layers: z106.array(z106.string()),
|
|
16941
16968
|
// Specify layers where the keepout applies
|
|
16942
|
-
description:
|
|
16969
|
+
description: z106.string().optional()
|
|
16943
16970
|
// Optional description of the keepout
|
|
16944
16971
|
})
|
|
16945
16972
|
);
|
|
16946
16973
|
expectTypesMatch(true);
|
|
16947
|
-
var pcb_cutout_base =
|
|
16948
|
-
type:
|
|
16974
|
+
var pcb_cutout_base = z107.object({
|
|
16975
|
+
type: z107.literal("pcb_cutout"),
|
|
16949
16976
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
16950
|
-
pcb_group_id:
|
|
16951
|
-
subcircuit_id:
|
|
16952
|
-
pcb_board_id:
|
|
16953
|
-
pcb_panel_id:
|
|
16977
|
+
pcb_group_id: z107.string().optional(),
|
|
16978
|
+
subcircuit_id: z107.string().optional(),
|
|
16979
|
+
pcb_board_id: z107.string().optional(),
|
|
16980
|
+
pcb_panel_id: z107.string().optional()
|
|
16954
16981
|
});
|
|
16955
16982
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
16956
|
-
shape:
|
|
16983
|
+
shape: z107.literal("rect"),
|
|
16957
16984
|
center: point,
|
|
16958
16985
|
width: length,
|
|
16959
16986
|
height: length,
|
|
@@ -16962,179 +16989,179 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
16962
16989
|
});
|
|
16963
16990
|
expectTypesMatch(true);
|
|
16964
16991
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
16965
|
-
shape:
|
|
16992
|
+
shape: z107.literal("circle"),
|
|
16966
16993
|
center: point,
|
|
16967
16994
|
radius: length
|
|
16968
16995
|
});
|
|
16969
16996
|
expectTypesMatch(true);
|
|
16970
16997
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
16971
|
-
shape:
|
|
16972
|
-
points:
|
|
16998
|
+
shape: z107.literal("polygon"),
|
|
16999
|
+
points: z107.array(point)
|
|
16973
17000
|
});
|
|
16974
17001
|
expectTypesMatch(true);
|
|
16975
17002
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
16976
|
-
shape:
|
|
16977
|
-
route:
|
|
17003
|
+
shape: z107.literal("path"),
|
|
17004
|
+
route: z107.array(point),
|
|
16978
17005
|
slot_width: length,
|
|
16979
17006
|
slot_length: length.optional(),
|
|
16980
17007
|
space_between_slots: length.optional(),
|
|
16981
17008
|
slot_corner_radius: length.optional()
|
|
16982
17009
|
});
|
|
16983
17010
|
expectTypesMatch(true);
|
|
16984
|
-
var pcb_cutout =
|
|
17011
|
+
var pcb_cutout = z107.discriminatedUnion("shape", [
|
|
16985
17012
|
pcb_cutout_rect,
|
|
16986
17013
|
pcb_cutout_circle,
|
|
16987
17014
|
pcb_cutout_polygon,
|
|
16988
17015
|
pcb_cutout_path
|
|
16989
17016
|
]).describe("Defines a cutout on the PCB, removing board material.");
|
|
16990
17017
|
expectTypesMatch(true);
|
|
16991
|
-
var pcb_missing_footprint_error =
|
|
16992
|
-
type:
|
|
17018
|
+
var pcb_missing_footprint_error = z108.object({
|
|
17019
|
+
type: z108.literal("pcb_missing_footprint_error"),
|
|
16993
17020
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
16994
17021
|
"pcb_missing_footprint_error"
|
|
16995
17022
|
),
|
|
16996
|
-
pcb_group_id:
|
|
16997
|
-
subcircuit_id:
|
|
16998
|
-
error_type:
|
|
16999
|
-
source_component_id:
|
|
17000
|
-
message:
|
|
17023
|
+
pcb_group_id: z108.string().optional(),
|
|
17024
|
+
subcircuit_id: z108.string().optional(),
|
|
17025
|
+
error_type: z108.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
17026
|
+
source_component_id: z108.string(),
|
|
17027
|
+
message: z108.string()
|
|
17001
17028
|
}).describe("Defines a missing footprint error on the PCB");
|
|
17002
17029
|
expectTypesMatch(
|
|
17003
17030
|
true
|
|
17004
17031
|
);
|
|
17005
|
-
var external_footprint_load_error =
|
|
17006
|
-
type:
|
|
17032
|
+
var external_footprint_load_error = z109.object({
|
|
17033
|
+
type: z109.literal("external_footprint_load_error"),
|
|
17007
17034
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
17008
17035
|
"external_footprint_load_error"
|
|
17009
17036
|
),
|
|
17010
|
-
pcb_component_id:
|
|
17011
|
-
source_component_id:
|
|
17012
|
-
pcb_group_id:
|
|
17013
|
-
subcircuit_id:
|
|
17014
|
-
footprinter_string:
|
|
17015
|
-
error_type:
|
|
17016
|
-
message:
|
|
17037
|
+
pcb_component_id: z109.string(),
|
|
17038
|
+
source_component_id: z109.string(),
|
|
17039
|
+
pcb_group_id: z109.string().optional(),
|
|
17040
|
+
subcircuit_id: z109.string().optional(),
|
|
17041
|
+
footprinter_string: z109.string().optional(),
|
|
17042
|
+
error_type: z109.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
17043
|
+
message: z109.string()
|
|
17017
17044
|
}).describe("Defines an error when an external footprint fails to load");
|
|
17018
17045
|
expectTypesMatch(true);
|
|
17019
|
-
var circuit_json_footprint_load_error =
|
|
17020
|
-
type:
|
|
17046
|
+
var circuit_json_footprint_load_error = z110.object({
|
|
17047
|
+
type: z110.literal("circuit_json_footprint_load_error"),
|
|
17021
17048
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
17022
17049
|
"circuit_json_footprint_load_error"
|
|
17023
17050
|
),
|
|
17024
|
-
pcb_component_id:
|
|
17025
|
-
source_component_id:
|
|
17026
|
-
pcb_group_id:
|
|
17027
|
-
subcircuit_id:
|
|
17028
|
-
error_type:
|
|
17029
|
-
message:
|
|
17030
|
-
circuit_json:
|
|
17051
|
+
pcb_component_id: z110.string(),
|
|
17052
|
+
source_component_id: z110.string(),
|
|
17053
|
+
pcb_group_id: z110.string().optional(),
|
|
17054
|
+
subcircuit_id: z110.string().optional(),
|
|
17055
|
+
error_type: z110.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
17056
|
+
message: z110.string(),
|
|
17057
|
+
circuit_json: z110.array(z110.any()).optional()
|
|
17031
17058
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
17032
17059
|
expectTypesMatch(true);
|
|
17033
|
-
var pcb_group =
|
|
17034
|
-
type:
|
|
17060
|
+
var pcb_group = z111.object({
|
|
17061
|
+
type: z111.literal("pcb_group"),
|
|
17035
17062
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
17036
|
-
source_group_id:
|
|
17037
|
-
is_subcircuit:
|
|
17038
|
-
subcircuit_id:
|
|
17063
|
+
source_group_id: z111.string(),
|
|
17064
|
+
is_subcircuit: z111.boolean().optional(),
|
|
17065
|
+
subcircuit_id: z111.string().optional(),
|
|
17039
17066
|
width: length.optional(),
|
|
17040
17067
|
height: length.optional(),
|
|
17041
17068
|
center: point,
|
|
17042
|
-
outline:
|
|
17069
|
+
outline: z111.array(point).optional(),
|
|
17043
17070
|
anchor_position: point.optional(),
|
|
17044
|
-
anchor_alignment:
|
|
17045
|
-
pcb_component_ids:
|
|
17046
|
-
child_layout_mode:
|
|
17047
|
-
name:
|
|
17048
|
-
description:
|
|
17049
|
-
layout_mode:
|
|
17050
|
-
autorouter_configuration:
|
|
17071
|
+
anchor_alignment: z111.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).optional(),
|
|
17072
|
+
pcb_component_ids: z111.array(z111.string()),
|
|
17073
|
+
child_layout_mode: z111.enum(["packed", "none"]).optional(),
|
|
17074
|
+
name: z111.string().optional(),
|
|
17075
|
+
description: z111.string().optional(),
|
|
17076
|
+
layout_mode: z111.string().optional(),
|
|
17077
|
+
autorouter_configuration: z111.object({
|
|
17051
17078
|
trace_clearance: length
|
|
17052
17079
|
}).optional(),
|
|
17053
|
-
autorouter_used_string:
|
|
17080
|
+
autorouter_used_string: z111.string().optional()
|
|
17054
17081
|
}).describe("Defines a group of components on the PCB");
|
|
17055
17082
|
expectTypesMatch(true);
|
|
17056
|
-
var pcb_autorouting_error =
|
|
17057
|
-
type:
|
|
17083
|
+
var pcb_autorouting_error = z112.object({
|
|
17084
|
+
type: z112.literal("pcb_autorouting_error"),
|
|
17058
17085
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
17059
|
-
error_type:
|
|
17060
|
-
message:
|
|
17061
|
-
subcircuit_id:
|
|
17086
|
+
error_type: z112.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
17087
|
+
message: z112.string(),
|
|
17088
|
+
subcircuit_id: z112.string().optional()
|
|
17062
17089
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
17063
17090
|
expectTypesMatch(true);
|
|
17064
|
-
var pcb_manual_edit_conflict_warning =
|
|
17065
|
-
type:
|
|
17091
|
+
var pcb_manual_edit_conflict_warning = z113.object({
|
|
17092
|
+
type: z113.literal("pcb_manual_edit_conflict_warning"),
|
|
17066
17093
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
17067
17094
|
"pcb_manual_edit_conflict_warning"
|
|
17068
17095
|
),
|
|
17069
|
-
warning_type:
|
|
17070
|
-
message:
|
|
17071
|
-
pcb_component_id:
|
|
17072
|
-
pcb_group_id:
|
|
17073
|
-
subcircuit_id:
|
|
17074
|
-
source_component_id:
|
|
17096
|
+
warning_type: z113.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
17097
|
+
message: z113.string(),
|
|
17098
|
+
pcb_component_id: z113.string(),
|
|
17099
|
+
pcb_group_id: z113.string().optional(),
|
|
17100
|
+
subcircuit_id: z113.string().optional(),
|
|
17101
|
+
source_component_id: z113.string()
|
|
17075
17102
|
}).describe(
|
|
17076
17103
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
17077
17104
|
);
|
|
17078
17105
|
expectTypesMatch(true);
|
|
17079
|
-
var pcb_breakout_point =
|
|
17080
|
-
type:
|
|
17106
|
+
var pcb_breakout_point = z114.object({
|
|
17107
|
+
type: z114.literal("pcb_breakout_point"),
|
|
17081
17108
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
17082
|
-
pcb_group_id:
|
|
17083
|
-
subcircuit_id:
|
|
17084
|
-
source_trace_id:
|
|
17085
|
-
source_port_id:
|
|
17086
|
-
source_net_id:
|
|
17109
|
+
pcb_group_id: z114.string(),
|
|
17110
|
+
subcircuit_id: z114.string().optional(),
|
|
17111
|
+
source_trace_id: z114.string().optional(),
|
|
17112
|
+
source_port_id: z114.string().optional(),
|
|
17113
|
+
source_net_id: z114.string().optional(),
|
|
17087
17114
|
x: distance,
|
|
17088
17115
|
y: distance
|
|
17089
17116
|
}).describe(
|
|
17090
17117
|
"Defines a routing target within a pcb_group for a source_trace or source_net"
|
|
17091
17118
|
);
|
|
17092
17119
|
expectTypesMatch(true);
|
|
17093
|
-
var pcb_ground_plane =
|
|
17094
|
-
type:
|
|
17120
|
+
var pcb_ground_plane = z115.object({
|
|
17121
|
+
type: z115.literal("pcb_ground_plane"),
|
|
17095
17122
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
17096
|
-
source_pcb_ground_plane_id:
|
|
17097
|
-
source_net_id:
|
|
17098
|
-
pcb_group_id:
|
|
17099
|
-
subcircuit_id:
|
|
17123
|
+
source_pcb_ground_plane_id: z115.string(),
|
|
17124
|
+
source_net_id: z115.string(),
|
|
17125
|
+
pcb_group_id: z115.string().optional(),
|
|
17126
|
+
subcircuit_id: z115.string().optional()
|
|
17100
17127
|
}).describe("Defines a ground plane on the PCB");
|
|
17101
17128
|
expectTypesMatch(true);
|
|
17102
|
-
var pcb_ground_plane_region =
|
|
17103
|
-
type:
|
|
17129
|
+
var pcb_ground_plane_region = z116.object({
|
|
17130
|
+
type: z116.literal("pcb_ground_plane_region"),
|
|
17104
17131
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
17105
17132
|
"pcb_ground_plane_region"
|
|
17106
17133
|
),
|
|
17107
|
-
pcb_ground_plane_id:
|
|
17108
|
-
pcb_group_id:
|
|
17109
|
-
subcircuit_id:
|
|
17134
|
+
pcb_ground_plane_id: z116.string(),
|
|
17135
|
+
pcb_group_id: z116.string().optional(),
|
|
17136
|
+
subcircuit_id: z116.string().optional(),
|
|
17110
17137
|
layer: layer_ref,
|
|
17111
|
-
points:
|
|
17138
|
+
points: z116.array(point)
|
|
17112
17139
|
}).describe("Defines a polygon region of a ground plane");
|
|
17113
17140
|
expectTypesMatch(true);
|
|
17114
|
-
var pcb_thermal_spoke =
|
|
17115
|
-
type:
|
|
17141
|
+
var pcb_thermal_spoke = z117.object({
|
|
17142
|
+
type: z117.literal("pcb_thermal_spoke"),
|
|
17116
17143
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
17117
|
-
pcb_ground_plane_id:
|
|
17118
|
-
shape:
|
|
17119
|
-
spoke_count:
|
|
17144
|
+
pcb_ground_plane_id: z117.string(),
|
|
17145
|
+
shape: z117.string(),
|
|
17146
|
+
spoke_count: z117.number(),
|
|
17120
17147
|
spoke_thickness: distance,
|
|
17121
17148
|
spoke_inner_diameter: distance,
|
|
17122
17149
|
spoke_outer_diameter: distance,
|
|
17123
|
-
pcb_plated_hole_id:
|
|
17124
|
-
subcircuit_id:
|
|
17150
|
+
pcb_plated_hole_id: z117.string().optional(),
|
|
17151
|
+
subcircuit_id: z117.string().optional()
|
|
17125
17152
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
17126
17153
|
expectTypesMatch(true);
|
|
17127
|
-
var pcb_copper_pour_base =
|
|
17128
|
-
type:
|
|
17154
|
+
var pcb_copper_pour_base = z118.object({
|
|
17155
|
+
type: z118.literal("pcb_copper_pour"),
|
|
17129
17156
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
17130
|
-
pcb_group_id:
|
|
17131
|
-
subcircuit_id:
|
|
17157
|
+
pcb_group_id: z118.string().optional(),
|
|
17158
|
+
subcircuit_id: z118.string().optional(),
|
|
17132
17159
|
layer: layer_ref,
|
|
17133
|
-
source_net_id:
|
|
17134
|
-
covered_with_solder_mask:
|
|
17160
|
+
source_net_id: z118.string().optional(),
|
|
17161
|
+
covered_with_solder_mask: z118.boolean().optional().default(true)
|
|
17135
17162
|
});
|
|
17136
17163
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
17137
|
-
shape:
|
|
17164
|
+
shape: z118.literal("rect"),
|
|
17138
17165
|
center: point,
|
|
17139
17166
|
width: length,
|
|
17140
17167
|
height: length,
|
|
@@ -17142,140 +17169,140 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
17142
17169
|
});
|
|
17143
17170
|
expectTypesMatch(true);
|
|
17144
17171
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
17145
|
-
shape:
|
|
17172
|
+
shape: z118.literal("brep"),
|
|
17146
17173
|
brep_shape
|
|
17147
17174
|
});
|
|
17148
17175
|
expectTypesMatch(true);
|
|
17149
17176
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
17150
|
-
shape:
|
|
17151
|
-
points:
|
|
17177
|
+
shape: z118.literal("polygon"),
|
|
17178
|
+
points: z118.array(point)
|
|
17152
17179
|
});
|
|
17153
17180
|
expectTypesMatch(true);
|
|
17154
|
-
var pcb_copper_pour =
|
|
17181
|
+
var pcb_copper_pour = z118.discriminatedUnion("shape", [
|
|
17155
17182
|
pcb_copper_pour_rect,
|
|
17156
17183
|
pcb_copper_pour_brep,
|
|
17157
17184
|
pcb_copper_pour_polygon
|
|
17158
17185
|
]).describe("Defines a copper pour on the PCB.");
|
|
17159
17186
|
expectTypesMatch(true);
|
|
17160
|
-
var pcb_component_outside_board_error =
|
|
17161
|
-
type:
|
|
17187
|
+
var pcb_component_outside_board_error = z119.object({
|
|
17188
|
+
type: z119.literal("pcb_component_outside_board_error"),
|
|
17162
17189
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
17163
17190
|
"pcb_component_outside_board_error"
|
|
17164
17191
|
),
|
|
17165
|
-
error_type:
|
|
17166
|
-
message:
|
|
17167
|
-
pcb_component_id:
|
|
17168
|
-
pcb_board_id:
|
|
17192
|
+
error_type: z119.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
17193
|
+
message: z119.string(),
|
|
17194
|
+
pcb_component_id: z119.string(),
|
|
17195
|
+
pcb_board_id: z119.string(),
|
|
17169
17196
|
component_center: point,
|
|
17170
|
-
component_bounds:
|
|
17171
|
-
min_x:
|
|
17172
|
-
max_x:
|
|
17173
|
-
min_y:
|
|
17174
|
-
max_y:
|
|
17197
|
+
component_bounds: z119.object({
|
|
17198
|
+
min_x: z119.number(),
|
|
17199
|
+
max_x: z119.number(),
|
|
17200
|
+
min_y: z119.number(),
|
|
17201
|
+
max_y: z119.number()
|
|
17175
17202
|
}),
|
|
17176
|
-
subcircuit_id:
|
|
17177
|
-
source_component_id:
|
|
17203
|
+
subcircuit_id: z119.string().optional(),
|
|
17204
|
+
source_component_id: z119.string().optional()
|
|
17178
17205
|
}).describe(
|
|
17179
17206
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
17180
17207
|
);
|
|
17181
17208
|
expectTypesMatch(true);
|
|
17182
|
-
var pcb_component_invalid_layer_error =
|
|
17183
|
-
type:
|
|
17209
|
+
var pcb_component_invalid_layer_error = z120.object({
|
|
17210
|
+
type: z120.literal("pcb_component_invalid_layer_error"),
|
|
17184
17211
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
17185
17212
|
"pcb_component_invalid_layer_error"
|
|
17186
17213
|
),
|
|
17187
|
-
error_type:
|
|
17188
|
-
message:
|
|
17189
|
-
pcb_component_id:
|
|
17190
|
-
source_component_id:
|
|
17214
|
+
error_type: z120.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
17215
|
+
message: z120.string(),
|
|
17216
|
+
pcb_component_id: z120.string().optional(),
|
|
17217
|
+
source_component_id: z120.string(),
|
|
17191
17218
|
layer: layer_ref,
|
|
17192
|
-
subcircuit_id:
|
|
17219
|
+
subcircuit_id: z120.string().optional()
|
|
17193
17220
|
}).describe(
|
|
17194
17221
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
17195
17222
|
);
|
|
17196
17223
|
expectTypesMatch(true);
|
|
17197
|
-
var pcb_via_clearance_error =
|
|
17198
|
-
type:
|
|
17224
|
+
var pcb_via_clearance_error = z121.object({
|
|
17225
|
+
type: z121.literal("pcb_via_clearance_error"),
|
|
17199
17226
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
17200
|
-
error_type:
|
|
17201
|
-
message:
|
|
17202
|
-
pcb_via_ids:
|
|
17227
|
+
error_type: z121.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
17228
|
+
message: z121.string(),
|
|
17229
|
+
pcb_via_ids: z121.array(z121.string()).min(2),
|
|
17203
17230
|
minimum_clearance: distance.optional(),
|
|
17204
17231
|
actual_clearance: distance.optional(),
|
|
17205
|
-
pcb_center:
|
|
17206
|
-
x:
|
|
17207
|
-
y:
|
|
17232
|
+
pcb_center: z121.object({
|
|
17233
|
+
x: z121.number().optional(),
|
|
17234
|
+
y: z121.number().optional()
|
|
17208
17235
|
}).optional(),
|
|
17209
|
-
subcircuit_id:
|
|
17236
|
+
subcircuit_id: z121.string().optional()
|
|
17210
17237
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
17211
17238
|
expectTypesMatch(true);
|
|
17212
|
-
var pcb_courtyard_rect =
|
|
17213
|
-
type:
|
|
17239
|
+
var pcb_courtyard_rect = z122.object({
|
|
17240
|
+
type: z122.literal("pcb_courtyard_rect"),
|
|
17214
17241
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
17215
|
-
pcb_component_id:
|
|
17216
|
-
pcb_group_id:
|
|
17217
|
-
subcircuit_id:
|
|
17242
|
+
pcb_component_id: z122.string(),
|
|
17243
|
+
pcb_group_id: z122.string().optional(),
|
|
17244
|
+
subcircuit_id: z122.string().optional(),
|
|
17218
17245
|
center: point,
|
|
17219
17246
|
width: length,
|
|
17220
17247
|
height: length,
|
|
17221
17248
|
layer: visible_layer,
|
|
17222
|
-
color:
|
|
17249
|
+
color: z122.string().optional()
|
|
17223
17250
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
17224
17251
|
expectTypesMatch(true);
|
|
17225
|
-
var pcb_courtyard_outline =
|
|
17226
|
-
type:
|
|
17252
|
+
var pcb_courtyard_outline = z123.object({
|
|
17253
|
+
type: z123.literal("pcb_courtyard_outline"),
|
|
17227
17254
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
17228
17255
|
"pcb_courtyard_outline"
|
|
17229
17256
|
),
|
|
17230
|
-
pcb_component_id:
|
|
17231
|
-
pcb_group_id:
|
|
17232
|
-
subcircuit_id:
|
|
17257
|
+
pcb_component_id: z123.string(),
|
|
17258
|
+
pcb_group_id: z123.string().optional(),
|
|
17259
|
+
subcircuit_id: z123.string().optional(),
|
|
17233
17260
|
layer: visible_layer,
|
|
17234
|
-
outline:
|
|
17261
|
+
outline: z123.array(point).min(2),
|
|
17235
17262
|
stroke_width: length.default("0.1mm"),
|
|
17236
|
-
is_closed:
|
|
17237
|
-
is_stroke_dashed:
|
|
17238
|
-
color:
|
|
17263
|
+
is_closed: z123.boolean().optional(),
|
|
17264
|
+
is_stroke_dashed: z123.boolean().optional(),
|
|
17265
|
+
color: z123.string().optional()
|
|
17239
17266
|
}).describe("Defines a courtyard outline on the PCB");
|
|
17240
17267
|
expectTypesMatch(true);
|
|
17241
|
-
var pcb_courtyard_polygon =
|
|
17242
|
-
type:
|
|
17268
|
+
var pcb_courtyard_polygon = z124.object({
|
|
17269
|
+
type: z124.literal("pcb_courtyard_polygon"),
|
|
17243
17270
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
17244
17271
|
"pcb_courtyard_polygon"
|
|
17245
17272
|
),
|
|
17246
|
-
pcb_component_id:
|
|
17247
|
-
pcb_group_id:
|
|
17248
|
-
subcircuit_id:
|
|
17273
|
+
pcb_component_id: z124.string(),
|
|
17274
|
+
pcb_group_id: z124.string().optional(),
|
|
17275
|
+
subcircuit_id: z124.string().optional(),
|
|
17249
17276
|
layer: visible_layer,
|
|
17250
|
-
points:
|
|
17251
|
-
color:
|
|
17277
|
+
points: z124.array(point).min(3),
|
|
17278
|
+
color: z124.string().optional()
|
|
17252
17279
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
17253
17280
|
expectTypesMatch(true);
|
|
17254
|
-
var cad_component =
|
|
17255
|
-
type:
|
|
17256
|
-
cad_component_id:
|
|
17257
|
-
pcb_component_id:
|
|
17258
|
-
source_component_id:
|
|
17281
|
+
var cad_component = z125.object({
|
|
17282
|
+
type: z125.literal("cad_component"),
|
|
17283
|
+
cad_component_id: z125.string(),
|
|
17284
|
+
pcb_component_id: z125.string(),
|
|
17285
|
+
source_component_id: z125.string(),
|
|
17259
17286
|
position: point3,
|
|
17260
17287
|
rotation: point3.optional(),
|
|
17261
17288
|
size: point3.optional(),
|
|
17262
17289
|
layer: layer_ref.optional(),
|
|
17263
|
-
subcircuit_id:
|
|
17290
|
+
subcircuit_id: z125.string().optional(),
|
|
17264
17291
|
// These are all ways to generate/load the 3d model
|
|
17265
|
-
footprinter_string:
|
|
17266
|
-
model_obj_url:
|
|
17267
|
-
model_stl_url:
|
|
17268
|
-
model_3mf_url:
|
|
17269
|
-
model_gltf_url:
|
|
17270
|
-
model_glb_url:
|
|
17271
|
-
model_step_url:
|
|
17272
|
-
model_wrl_url:
|
|
17273
|
-
model_unit_to_mm_scale_factor:
|
|
17274
|
-
model_jscad:
|
|
17292
|
+
footprinter_string: z125.string().optional(),
|
|
17293
|
+
model_obj_url: z125.string().optional(),
|
|
17294
|
+
model_stl_url: z125.string().optional(),
|
|
17295
|
+
model_3mf_url: z125.string().optional(),
|
|
17296
|
+
model_gltf_url: z125.string().optional(),
|
|
17297
|
+
model_glb_url: z125.string().optional(),
|
|
17298
|
+
model_step_url: z125.string().optional(),
|
|
17299
|
+
model_wrl_url: z125.string().optional(),
|
|
17300
|
+
model_unit_to_mm_scale_factor: z125.number().optional(),
|
|
17301
|
+
model_jscad: z125.any().optional()
|
|
17275
17302
|
}).describe("Defines a component on the PCB");
|
|
17276
17303
|
expectTypesMatch(true);
|
|
17277
|
-
var wave_shape =
|
|
17278
|
-
var percentage =
|
|
17304
|
+
var wave_shape = z126.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
17305
|
+
var percentage = z126.union([z126.string(), z126.number()]).transform((val) => {
|
|
17279
17306
|
if (typeof val === "string") {
|
|
17280
17307
|
if (val.endsWith("%")) {
|
|
17281
17308
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17284,30 +17311,30 @@ var percentage = z125.union([z125.string(), z125.number()]).transform((val) => {
|
|
|
17284
17311
|
}
|
|
17285
17312
|
return val;
|
|
17286
17313
|
}).pipe(
|
|
17287
|
-
|
|
17314
|
+
z126.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
17288
17315
|
);
|
|
17289
|
-
var simulation_dc_voltage_source =
|
|
17290
|
-
type:
|
|
17316
|
+
var simulation_dc_voltage_source = z126.object({
|
|
17317
|
+
type: z126.literal("simulation_voltage_source"),
|
|
17291
17318
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
17292
17319
|
"simulation_voltage_source"
|
|
17293
17320
|
),
|
|
17294
|
-
is_dc_source:
|
|
17295
|
-
positive_source_port_id:
|
|
17296
|
-
negative_source_port_id:
|
|
17297
|
-
positive_source_net_id:
|
|
17298
|
-
negative_source_net_id:
|
|
17321
|
+
is_dc_source: z126.literal(true).optional().default(true),
|
|
17322
|
+
positive_source_port_id: z126.string().optional(),
|
|
17323
|
+
negative_source_port_id: z126.string().optional(),
|
|
17324
|
+
positive_source_net_id: z126.string().optional(),
|
|
17325
|
+
negative_source_net_id: z126.string().optional(),
|
|
17299
17326
|
voltage
|
|
17300
17327
|
}).describe("Defines a DC voltage source for simulation");
|
|
17301
|
-
var simulation_ac_voltage_source =
|
|
17302
|
-
type:
|
|
17328
|
+
var simulation_ac_voltage_source = z126.object({
|
|
17329
|
+
type: z126.literal("simulation_voltage_source"),
|
|
17303
17330
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
17304
17331
|
"simulation_voltage_source"
|
|
17305
17332
|
),
|
|
17306
|
-
is_dc_source:
|
|
17307
|
-
terminal1_source_port_id:
|
|
17308
|
-
terminal2_source_port_id:
|
|
17309
|
-
terminal1_source_net_id:
|
|
17310
|
-
terminal2_source_net_id:
|
|
17333
|
+
is_dc_source: z126.literal(false),
|
|
17334
|
+
terminal1_source_port_id: z126.string().optional(),
|
|
17335
|
+
terminal2_source_port_id: z126.string().optional(),
|
|
17336
|
+
terminal1_source_net_id: z126.string().optional(),
|
|
17337
|
+
terminal2_source_net_id: z126.string().optional(),
|
|
17311
17338
|
voltage: voltage.optional(),
|
|
17312
17339
|
frequency: frequency.optional(),
|
|
17313
17340
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -17315,66 +17342,66 @@ var simulation_ac_voltage_source = z125.object({
|
|
|
17315
17342
|
phase: rotation.optional(),
|
|
17316
17343
|
duty_cycle: percentage.optional()
|
|
17317
17344
|
}).describe("Defines an AC voltage source for simulation");
|
|
17318
|
-
var simulation_voltage_source =
|
|
17345
|
+
var simulation_voltage_source = z126.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
17319
17346
|
expectTypesMatch(true);
|
|
17320
17347
|
expectTypesMatch(true);
|
|
17321
17348
|
expectTypesMatch(true);
|
|
17322
|
-
var experiment_type =
|
|
17323
|
-
|
|
17324
|
-
|
|
17325
|
-
|
|
17326
|
-
|
|
17349
|
+
var experiment_type = z127.union([
|
|
17350
|
+
z127.literal("spice_dc_sweep"),
|
|
17351
|
+
z127.literal("spice_dc_operating_point"),
|
|
17352
|
+
z127.literal("spice_transient_analysis"),
|
|
17353
|
+
z127.literal("spice_ac_analysis")
|
|
17327
17354
|
]);
|
|
17328
|
-
var simulation_experiment =
|
|
17329
|
-
type:
|
|
17355
|
+
var simulation_experiment = z127.object({
|
|
17356
|
+
type: z127.literal("simulation_experiment"),
|
|
17330
17357
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
17331
17358
|
"simulation_experiment"
|
|
17332
17359
|
),
|
|
17333
|
-
name:
|
|
17360
|
+
name: z127.string(),
|
|
17334
17361
|
experiment_type,
|
|
17335
17362
|
time_per_step: duration_ms.optional(),
|
|
17336
17363
|
start_time_ms: ms.optional(),
|
|
17337
17364
|
end_time_ms: ms.optional()
|
|
17338
17365
|
}).describe("Defines a simulation experiment configuration");
|
|
17339
17366
|
expectTypesMatch(true);
|
|
17340
|
-
var simulation_transient_voltage_graph =
|
|
17341
|
-
type:
|
|
17367
|
+
var simulation_transient_voltage_graph = z128.object({
|
|
17368
|
+
type: z128.literal("simulation_transient_voltage_graph"),
|
|
17342
17369
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
17343
17370
|
"simulation_transient_voltage_graph"
|
|
17344
17371
|
),
|
|
17345
|
-
simulation_experiment_id:
|
|
17346
|
-
timestamps_ms:
|
|
17347
|
-
voltage_levels:
|
|
17348
|
-
source_component_id:
|
|
17349
|
-
subcircuit_connectivity_map_key:
|
|
17372
|
+
simulation_experiment_id: z128.string(),
|
|
17373
|
+
timestamps_ms: z128.array(z128.number()).optional(),
|
|
17374
|
+
voltage_levels: z128.array(z128.number()),
|
|
17375
|
+
source_component_id: z128.string().optional(),
|
|
17376
|
+
subcircuit_connectivity_map_key: z128.string().optional(),
|
|
17350
17377
|
time_per_step: duration_ms,
|
|
17351
17378
|
start_time_ms: ms,
|
|
17352
17379
|
end_time_ms: ms,
|
|
17353
|
-
name:
|
|
17354
|
-
color:
|
|
17380
|
+
name: z128.string().optional(),
|
|
17381
|
+
color: z128.string().optional()
|
|
17355
17382
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
17356
17383
|
expectTypesMatch(true);
|
|
17357
|
-
var simulation_switch =
|
|
17358
|
-
type:
|
|
17384
|
+
var simulation_switch = z129.object({
|
|
17385
|
+
type: z129.literal("simulation_switch"),
|
|
17359
17386
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
17360
|
-
source_component_id:
|
|
17387
|
+
source_component_id: z129.string().optional(),
|
|
17361
17388
|
closes_at: ms.optional(),
|
|
17362
17389
|
opens_at: ms.optional(),
|
|
17363
|
-
starts_closed:
|
|
17390
|
+
starts_closed: z129.boolean().optional(),
|
|
17364
17391
|
switching_frequency: frequency.optional()
|
|
17365
17392
|
}).describe("Defines a switch for simulation timing control");
|
|
17366
17393
|
expectTypesMatch(true);
|
|
17367
|
-
var simulation_voltage_probe =
|
|
17368
|
-
type:
|
|
17394
|
+
var simulation_voltage_probe = z130.object({
|
|
17395
|
+
type: z130.literal("simulation_voltage_probe"),
|
|
17369
17396
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
17370
17397
|
"simulation_voltage_probe"
|
|
17371
17398
|
),
|
|
17372
|
-
source_component_id:
|
|
17373
|
-
name:
|
|
17374
|
-
source_port_id:
|
|
17375
|
-
source_net_id:
|
|
17376
|
-
subcircuit_id:
|
|
17377
|
-
color:
|
|
17399
|
+
source_component_id: z130.string().optional(),
|
|
17400
|
+
name: z130.string().optional(),
|
|
17401
|
+
source_port_id: z130.string().optional(),
|
|
17402
|
+
source_net_id: z130.string().optional(),
|
|
17403
|
+
subcircuit_id: z130.string().optional(),
|
|
17404
|
+
color: z130.string().optional()
|
|
17378
17405
|
}).describe(
|
|
17379
17406
|
"Defines a voltage probe for simulation, connected to a port or a net"
|
|
17380
17407
|
).refine(
|
|
@@ -17384,18 +17411,18 @@ var simulation_voltage_probe = z129.object({
|
|
|
17384
17411
|
}
|
|
17385
17412
|
);
|
|
17386
17413
|
expectTypesMatch(true);
|
|
17387
|
-
var simulation_unknown_experiment_error =
|
|
17388
|
-
type:
|
|
17414
|
+
var simulation_unknown_experiment_error = z131.object({
|
|
17415
|
+
type: z131.literal("simulation_unknown_experiment_error"),
|
|
17389
17416
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
17390
17417
|
"simulation_unknown_experiment_error"
|
|
17391
17418
|
),
|
|
17392
|
-
error_type:
|
|
17393
|
-
message:
|
|
17394
|
-
simulation_experiment_id:
|
|
17395
|
-
subcircuit_id:
|
|
17419
|
+
error_type: z131.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
17420
|
+
message: z131.string(),
|
|
17421
|
+
simulation_experiment_id: z131.string().optional(),
|
|
17422
|
+
subcircuit_id: z131.string().optional()
|
|
17396
17423
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
17397
17424
|
expectTypesMatch(true);
|
|
17398
|
-
var any_circuit_element =
|
|
17425
|
+
var any_circuit_element = z132.union([
|
|
17399
17426
|
source_trace,
|
|
17400
17427
|
source_port,
|
|
17401
17428
|
any_source_component,
|
|
@@ -17424,6 +17451,7 @@ var any_circuit_element = z131.union([
|
|
|
17424
17451
|
source_project_metadata,
|
|
17425
17452
|
source_trace_not_connected_error,
|
|
17426
17453
|
source_pin_missing_trace_warning,
|
|
17454
|
+
source_pin_must_be_connected_error,
|
|
17427
17455
|
unknown_error_finding_part,
|
|
17428
17456
|
pcb_component,
|
|
17429
17457
|
pcb_hole,
|
|
@@ -17521,7 +17549,7 @@ import { z as z910 } from "zod";
|
|
|
17521
17549
|
import "zod";
|
|
17522
17550
|
import "zod";
|
|
17523
17551
|
import { z as z1210 } from "zod";
|
|
17524
|
-
import { z as
|
|
17552
|
+
import { z as z134 } from "zod";
|
|
17525
17553
|
import { z as z142 } from "zod";
|
|
17526
17554
|
import { z as z152 } from "zod";
|
|
17527
17555
|
import { z as z162 } from "zod";
|
|
@@ -17696,12 +17724,12 @@ function convertMilToMm(value) {
|
|
|
17696
17724
|
}
|
|
17697
17725
|
return Number(value);
|
|
17698
17726
|
}
|
|
17699
|
-
var lengthInMm =
|
|
17700
|
-
var extendDipDef = (newDefaults) =>
|
|
17701
|
-
fn:
|
|
17702
|
-
num_pins:
|
|
17703
|
-
wide:
|
|
17704
|
-
narrow:
|
|
17727
|
+
var lengthInMm = z133.union([z133.string(), z133.number()]).transform((val) => convertMilToMm(val));
|
|
17728
|
+
var extendDipDef = (newDefaults) => z133.object({
|
|
17729
|
+
fn: z133.string(),
|
|
17730
|
+
num_pins: z133.number().optional().default(6),
|
|
17731
|
+
wide: z133.boolean().optional(),
|
|
17732
|
+
narrow: z133.boolean().optional(),
|
|
17705
17733
|
w: lengthInMm.optional(),
|
|
17706
17734
|
p: lengthInMm.default(newDefaults.p ?? "2.54mm"),
|
|
17707
17735
|
id: lengthInMm.optional(),
|
|
@@ -19407,13 +19435,13 @@ var ms013 = (raw_params) => {
|
|
|
19407
19435
|
parameters
|
|
19408
19436
|
};
|
|
19409
19437
|
};
|
|
19410
|
-
var sot723_def =
|
|
19411
|
-
fn:
|
|
19412
|
-
num_pins:
|
|
19413
|
-
w:
|
|
19414
|
-
h:
|
|
19415
|
-
pl:
|
|
19416
|
-
pw:
|
|
19438
|
+
var sot723_def = z134.object({
|
|
19439
|
+
fn: z134.string(),
|
|
19440
|
+
num_pins: z134.literal(3).default(3),
|
|
19441
|
+
w: z134.string().default("1.2mm"),
|
|
19442
|
+
h: z134.string().default("1.2mm"),
|
|
19443
|
+
pl: z134.string().default("0.3mm"),
|
|
19444
|
+
pw: z134.string().default("0.32mm")
|
|
19417
19445
|
});
|
|
19418
19446
|
var sot723 = (raw_params) => {
|
|
19419
19447
|
const parameters = sot723_def.parse(raw_params);
|
|
@@ -24839,10 +24867,10 @@ var svgPathPoints = normalizeOnY([
|
|
|
24839
24867
|
]);
|
|
24840
24868
|
var DIP_PIN_HEIGHT = 5.47;
|
|
24841
24869
|
var heightAboveSurface = 0.5;
|
|
24842
|
-
var DipPinLeg = ({ x, y, z:
|
|
24870
|
+
var DipPinLeg = ({ x, y, z: z135 }) => {
|
|
24843
24871
|
const isRotated = x > 0;
|
|
24844
24872
|
return /* @__PURE__ */ jsxs(Fragment22, { children: [
|
|
24845
|
-
/* @__PURE__ */ jsx5(Translate, { offset: { x: x + 0.25 / 2, y, z:
|
|
24873
|
+
/* @__PURE__ */ jsx5(Translate, { offset: { x: x + 0.25 / 2, y, z: z135 }, children: /* @__PURE__ */ jsx5(Rotate, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx5(ExtrudeLinear, { height: 0.25, children: /* @__PURE__ */ jsx5(
|
|
24846
24874
|
Polygon,
|
|
24847
24875
|
{
|
|
24848
24876
|
points: svgPathPoints.slice().reverse().map((p) => [p.x, p.y])
|
|
@@ -24854,7 +24882,7 @@ var DipPinLeg = ({ x, y, z: z134 }) => {
|
|
|
24854
24882
|
offset: {
|
|
24855
24883
|
x,
|
|
24856
24884
|
y: y + (isRotated ? 1 : -1),
|
|
24857
|
-
z:
|
|
24885
|
+
z: z135
|
|
24858
24886
|
},
|
|
24859
24887
|
children: /* @__PURE__ */ jsx5(Rotate, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx5(ExtrudeLinear, { height: 2, children: /* @__PURE__ */ jsx5(
|
|
24860
24888
|
Polygon,
|
|
@@ -28281,7 +28309,7 @@ import * as THREE15 from "three";
|
|
|
28281
28309
|
// package.json
|
|
28282
28310
|
var package_default = {
|
|
28283
28311
|
name: "@tscircuit/3d-viewer",
|
|
28284
|
-
version: "0.0.
|
|
28312
|
+
version: "0.0.441",
|
|
28285
28313
|
main: "./dist/index.js",
|
|
28286
28314
|
module: "./dist/index.js",
|
|
28287
28315
|
type: "module",
|
|
@@ -28342,7 +28370,7 @@ var package_default = {
|
|
|
28342
28370
|
"@vitejs/plugin-react": "^4.3.4",
|
|
28343
28371
|
"bun-match-svg": "^0.0.9",
|
|
28344
28372
|
"bun-types": "1.2.1",
|
|
28345
|
-
"circuit-json": "0.0.
|
|
28373
|
+
"circuit-json": "0.0.320",
|
|
28346
28374
|
"circuit-to-svg": "^0.0.179",
|
|
28347
28375
|
debug: "^4.4.0",
|
|
28348
28376
|
"jscad-electronics": "^0.0.89",
|
|
@@ -28446,11 +28474,11 @@ var CameraControllerProvider = ({ children, defaultTarget, initialCameraPosition
|
|
|
28446
28474
|
new THREE9.Euler(0, 0, 0)
|
|
28447
28475
|
);
|
|
28448
28476
|
const baseDistance = useMemo8(() => {
|
|
28449
|
-
const [x, y,
|
|
28477
|
+
const [x, y, z135] = initialCameraPosition ?? [5, -5, 5];
|
|
28450
28478
|
const distance2 = Math.hypot(
|
|
28451
28479
|
x - defaultTarget.x,
|
|
28452
28480
|
y - defaultTarget.y,
|
|
28453
|
-
|
|
28481
|
+
z135 - defaultTarget.z
|
|
28454
28482
|
);
|
|
28455
28483
|
return distance2 > 0 ? distance2 : 5;
|
|
28456
28484
|
}, [initialCameraPosition, defaultTarget]);
|
|
@@ -29835,6 +29863,13 @@ var platedHole = (plated_hole, ctx, options = {}) => {
|
|
|
29835
29863
|
return (0, import_colors2.colorize)(colors.copper, (0, import_booleans2.subtract)(finalCopper, drill));
|
|
29836
29864
|
}
|
|
29837
29865
|
if (plated_hole.shape === "pill") {
|
|
29866
|
+
const rotationRadians = (plated_hole.ccw_rotation || 0) * Math.PI / 180;
|
|
29867
|
+
const rotateAroundCenter = (geom) => {
|
|
29868
|
+
if (!rotationRadians) return geom;
|
|
29869
|
+
const toOrigin = (0, import_transforms3.translate)([-plated_hole.x, -plated_hole.y, 0], geom);
|
|
29870
|
+
const rotated = (0, import_transforms3.rotate)([0, 0, rotationRadians], toOrigin);
|
|
29871
|
+
return (0, import_transforms3.translate)([plated_hole.x, plated_hole.y, 0], rotated);
|
|
29872
|
+
};
|
|
29838
29873
|
const shouldRotate = plated_hole.hole_height > plated_hole.hole_width;
|
|
29839
29874
|
const holeWidth = shouldRotate ? plated_hole.hole_height : plated_hole.hole_width;
|
|
29840
29875
|
const holeHeight = shouldRotate ? plated_hole.hole_width : plated_hole.hole_height;
|
|
@@ -29891,8 +29926,8 @@ var platedHole = (plated_hole, ctx, options = {}) => {
|
|
|
29891
29926
|
height: throughDrillHeight
|
|
29892
29927
|
});
|
|
29893
29928
|
const drillUnion = (0, import_booleans2.union)(drillRect, drillLeftCap, drillRightCap);
|
|
29894
|
-
const copperSolid = maybeClip(outerBarrel, clipGeom);
|
|
29895
|
-
const drill = drillUnion;
|
|
29929
|
+
const copperSolid = maybeClip(rotateAroundCenter(outerBarrel), clipGeom);
|
|
29930
|
+
const drill = rotateAroundCenter(drillUnion);
|
|
29896
29931
|
return (0, import_colors2.colorize)(colors.copper, (0, import_booleans2.subtract)(copperSolid, drill));
|
|
29897
29932
|
}
|
|
29898
29933
|
if (plated_hole.shape === "pill_hole_with_rect_pad") {
|
|
@@ -30163,7 +30198,7 @@ function compose(...matrices) {
|
|
|
30163
30198
|
|
|
30164
30199
|
// node_modules/transformation-matrix/src/rotate.js
|
|
30165
30200
|
var { cos, sin, PI } = Math;
|
|
30166
|
-
function
|
|
30201
|
+
function rotate2(angle, cx, cy) {
|
|
30167
30202
|
const cosAngle = cos(angle);
|
|
30168
30203
|
const sinAngle = sin(angle);
|
|
30169
30204
|
const rotationMatrix = {
|
|
@@ -30379,7 +30414,7 @@ function createSilkscreenTextGeoms(silkscreenText) {
|
|
|
30379
30414
|
const rad = rotationDegrees * Math.PI / 180;
|
|
30380
30415
|
transforms.push(
|
|
30381
30416
|
translate4(centerX, centerY),
|
|
30382
|
-
|
|
30417
|
+
rotate2(rad),
|
|
30383
30418
|
translate4(-centerX, -centerY)
|
|
30384
30419
|
);
|
|
30385
30420
|
}
|
|
@@ -31121,66 +31156,34 @@ var BoardGeomBuilder = class {
|
|
|
31121
31156
|
clipGeom: this.boardClipGeom
|
|
31122
31157
|
});
|
|
31123
31158
|
this.platedHoleGeoms.push(platedHoleGeom);
|
|
31124
|
-
} else if (ph.shape === "pill" || ph.shape === "
|
|
31159
|
+
} else if (ph.shape === "pill" || ph.shape === "oval") {
|
|
31125
31160
|
const shouldRotate = ph.hole_height > ph.hole_width;
|
|
31126
31161
|
const holeWidth = shouldRotate ? ph.hole_height : ph.hole_width;
|
|
31127
31162
|
const holeHeight = shouldRotate ? ph.hole_width : ph.hole_height;
|
|
31128
31163
|
const holeRadius = holeHeight / 2;
|
|
31129
31164
|
const rectLength = Math.abs(holeWidth - holeHeight);
|
|
31130
31165
|
let pillHole;
|
|
31131
|
-
|
|
31132
|
-
|
|
31133
|
-
|
|
31134
|
-
|
|
31135
|
-
|
|
31136
|
-
|
|
31137
|
-
|
|
31138
|
-
|
|
31139
|
-
|
|
31140
|
-
|
|
31141
|
-
|
|
31142
|
-
|
|
31143
|
-
|
|
31144
|
-
|
|
31145
|
-
|
|
31146
|
-
|
|
31147
|
-
|
|
31148
|
-
|
|
31149
|
-
|
|
31150
|
-
|
|
31151
|
-
|
|
31152
|
-
height: this.ctx.pcbThickness * 1.5
|
|
31153
|
-
}),
|
|
31154
|
-
(0, import_primitives10.cylinder)({
|
|
31155
|
-
center: shouldRotate ? [
|
|
31156
|
-
ph.x + (ph.hole_offset_x || 0),
|
|
31157
|
-
ph.y + (ph.hole_offset_y || 0) + rectLength / 2,
|
|
31158
|
-
0
|
|
31159
|
-
] : [
|
|
31160
|
-
ph.x + (ph.hole_offset_x || 0) + rectLength / 2,
|
|
31161
|
-
ph.y + (ph.hole_offset_y || 0),
|
|
31162
|
-
0
|
|
31163
|
-
],
|
|
31164
|
-
radius: holeRadius,
|
|
31165
|
-
height: this.ctx.pcbThickness * 1.5
|
|
31166
|
-
})
|
|
31167
|
-
);
|
|
31168
|
-
} else {
|
|
31169
|
-
pillHole = (0, import_booleans6.union)(
|
|
31170
|
-
(0, import_primitives10.cuboid)({
|
|
31171
|
-
center: [ph.x, ph.y, 0],
|
|
31172
|
-
size: shouldRotate ? [holeHeight, rectLength, this.ctx.pcbThickness * 1.5] : [rectLength, holeHeight, this.ctx.pcbThickness * 1.5]
|
|
31173
|
-
}),
|
|
31174
|
-
(0, import_primitives10.cylinder)({
|
|
31175
|
-
center: shouldRotate ? [ph.x, ph.y - rectLength / 2, 0] : [ph.x - rectLength / 2, ph.y, 0],
|
|
31176
|
-
radius: holeRadius,
|
|
31177
|
-
height: this.ctx.pcbThickness * 1.5
|
|
31178
|
-
}),
|
|
31179
|
-
(0, import_primitives10.cylinder)({
|
|
31180
|
-
center: shouldRotate ? [ph.x, ph.y + rectLength / 2, 0] : [ph.x + rectLength / 2, ph.y, 0],
|
|
31181
|
-
radius: holeRadius,
|
|
31182
|
-
height: this.ctx.pcbThickness * 1.5
|
|
31183
|
-
})
|
|
31166
|
+
pillHole = (0, import_booleans6.union)(
|
|
31167
|
+
(0, import_primitives10.cuboid)({
|
|
31168
|
+
center: [ph.x, ph.y, 0],
|
|
31169
|
+
size: shouldRotate ? [holeHeight, rectLength, this.ctx.pcbThickness * 1.5] : [rectLength, holeHeight, this.ctx.pcbThickness * 1.5]
|
|
31170
|
+
}),
|
|
31171
|
+
(0, import_primitives10.cylinder)({
|
|
31172
|
+
center: shouldRotate ? [ph.x, ph.y - rectLength / 2, 0] : [ph.x - rectLength / 2, ph.y, 0],
|
|
31173
|
+
radius: holeRadius,
|
|
31174
|
+
height: this.ctx.pcbThickness * 1.5
|
|
31175
|
+
}),
|
|
31176
|
+
(0, import_primitives10.cylinder)({
|
|
31177
|
+
center: shouldRotate ? [ph.x, ph.y + rectLength / 2, 0] : [ph.x + rectLength / 2, ph.y, 0],
|
|
31178
|
+
radius: holeRadius,
|
|
31179
|
+
height: this.ctx.pcbThickness * 1.5
|
|
31180
|
+
})
|
|
31181
|
+
);
|
|
31182
|
+
if (ph.ccw_rotation) {
|
|
31183
|
+
const rotationRadians = ph.ccw_rotation * Math.PI / 180;
|
|
31184
|
+
pillHole = (0, import_transforms8.translate)(
|
|
31185
|
+
[ph.x, ph.y, 0],
|
|
31186
|
+
(0, import_transforms8.rotateZ)(rotationRadians, (0, import_transforms8.translate)([-ph.x, -ph.y, 0], pillHole))
|
|
31184
31187
|
);
|
|
31185
31188
|
}
|
|
31186
31189
|
if (!opts.dontCutBoard) {
|
|
@@ -31193,6 +31196,49 @@ var BoardGeomBuilder = class {
|
|
|
31193
31196
|
clipGeom: this.boardClipGeom
|
|
31194
31197
|
});
|
|
31195
31198
|
this.platedHoleGeoms.push(platedHoleGeom);
|
|
31199
|
+
} else if (ph.shape === "pill_hole_with_rect_pad") {
|
|
31200
|
+
const shouldRotate = ph.hole_height > ph.hole_width;
|
|
31201
|
+
const holeWidth = shouldRotate ? ph.hole_height : ph.hole_width;
|
|
31202
|
+
const holeHeight = shouldRotate ? ph.hole_width : ph.hole_height;
|
|
31203
|
+
const holeRadius = holeHeight / 2;
|
|
31204
|
+
const rectLength = Math.abs(holeWidth - holeHeight);
|
|
31205
|
+
let pillHole;
|
|
31206
|
+
pillHole = (0, import_booleans6.union)(
|
|
31207
|
+
(0, import_primitives10.cuboid)({
|
|
31208
|
+
center: [
|
|
31209
|
+
ph.x + (ph.hole_offset_x || 0),
|
|
31210
|
+
ph.y + (ph.hole_offset_y || 0),
|
|
31211
|
+
0
|
|
31212
|
+
],
|
|
31213
|
+
size: shouldRotate ? [holeHeight, rectLength, this.ctx.pcbThickness * 1.5] : [rectLength, holeHeight, this.ctx.pcbThickness * 1.5]
|
|
31214
|
+
}),
|
|
31215
|
+
(0, import_primitives10.cylinder)({
|
|
31216
|
+
center: shouldRotate ? [
|
|
31217
|
+
ph.x + (ph.hole_offset_x || 0),
|
|
31218
|
+
ph.y + (ph.hole_offset_y || 0) - rectLength / 2,
|
|
31219
|
+
0
|
|
31220
|
+
] : [
|
|
31221
|
+
ph.x + (ph.hole_offset_x || 0) - rectLength / 2,
|
|
31222
|
+
ph.y + (ph.hole_offset_y || 0),
|
|
31223
|
+
0
|
|
31224
|
+
],
|
|
31225
|
+
radius: holeRadius,
|
|
31226
|
+
height: this.ctx.pcbThickness * 1.5
|
|
31227
|
+
}),
|
|
31228
|
+
(0, import_primitives10.cylinder)({
|
|
31229
|
+
center: shouldRotate ? [
|
|
31230
|
+
ph.x + (ph.hole_offset_x || 0),
|
|
31231
|
+
ph.y + (ph.hole_offset_y || 0) + rectLength / 2,
|
|
31232
|
+
0
|
|
31233
|
+
] : [
|
|
31234
|
+
ph.x + (ph.hole_offset_x || 0) + rectLength / 2,
|
|
31235
|
+
ph.y + (ph.hole_offset_y || 0),
|
|
31236
|
+
0
|
|
31237
|
+
],
|
|
31238
|
+
radius: holeRadius,
|
|
31239
|
+
height: this.ctx.pcbThickness * 1.5
|
|
31240
|
+
})
|
|
31241
|
+
);
|
|
31196
31242
|
} else if (ph.shape === "hole_with_polygon_pad") {
|
|
31197
31243
|
const padOutline = ph.pad_outline;
|
|
31198
31244
|
if (!Array.isArray(padOutline) || padOutline.length < 3) {
|
|
@@ -32428,7 +32474,7 @@ function createSilkscreenTextureForLayer({
|
|
|
32428
32474
|
const rad = rotationDeg * Math.PI / 180;
|
|
32429
32475
|
transformMatrices.push(
|
|
32430
32476
|
translate4(textCenterX, textCenterY),
|
|
32431
|
-
|
|
32477
|
+
rotate2(rad),
|
|
32432
32478
|
translate4(-textCenterX, -textCenterY)
|
|
32433
32479
|
);
|
|
32434
32480
|
}
|