@tscircuit/3d-viewer 0.0.435 → 0.0.436
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1210 -1090
- 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, z134) => [x, y, z134],
|
|
148
|
+
fromValues: (x, y, z134) => [x, y, z134]
|
|
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, z134] = axis;
|
|
536
|
+
const lengthSquared = x * x + y * y + z134 * z134;
|
|
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
|
+
z134 *= 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 + z134 * s;
|
|
549
|
+
out[2] = z134 * x * t - y * s;
|
|
550
550
|
out[3] = 0;
|
|
551
|
-
out[4] = x * y * t -
|
|
551
|
+
out[4] = x * y * t - z134 * s;
|
|
552
552
|
out[5] = y * y * t + c;
|
|
553
|
-
out[6] =
|
|
553
|
+
out[6] = z134 * y * t + x * s;
|
|
554
554
|
out[7] = 0;
|
|
555
|
-
out[8] = x *
|
|
556
|
-
out[9] = y *
|
|
557
|
-
out[10] =
|
|
555
|
+
out[8] = x * z134 * t + y * s;
|
|
556
|
+
out[9] = y * z134 * t - x * s;
|
|
557
|
+
out[10] = z134 * z134 * 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 z134 = b[2] - a[2];
|
|
812
|
+
return Math.sqrt(x * x + y * y + z134 * z134);
|
|
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, z134) => {
|
|
861
861
|
const out = create();
|
|
862
862
|
out[0] = x;
|
|
863
863
|
out[1] = y;
|
|
864
|
-
out[2] =
|
|
864
|
+
out[2] = z134;
|
|
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, z134 = 0) => {
|
|
876
876
|
out[0] = vector[0];
|
|
877
877
|
out[1] = vector[1];
|
|
878
|
-
out[2] =
|
|
878
|
+
out[2] = z134;
|
|
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 z134 = vector[2];
|
|
893
|
+
return Math.sqrt(x * x + y * y + z134 * z134);
|
|
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 z134 = vector[2];
|
|
977
|
+
let len = x * x + y * y + z134 * z134;
|
|
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] = z134 * 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 z134 = b[2] - a[2];
|
|
1108
|
+
return x * x + y * y + z134 * z134;
|
|
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 z134 = vector[2];
|
|
1122
|
+
return x * x + y * y + z134 * z134;
|
|
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 z134 = vector[2];
|
|
1159
|
+
let w = matrix[3] * x + matrix[7] * y + matrix[11] * z134 + 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] * z134 + matrix[12]) / w;
|
|
1162
|
+
out[1] = (matrix[1] * x + matrix[5] * y + matrix[9] * z134 + matrix[13]) / w;
|
|
1163
|
+
out[2] = (matrix[2] * x + matrix[6] * y + matrix[10] * z134 + 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 z134 = matrix[0] * matrix[5] - matrix[4] * matrix[1];
|
|
1366
|
+
const d = x * matrix[2] + y * matrix[6] + z134 * matrix[10];
|
|
1367
1367
|
return d < 0;
|
|
1368
1368
|
};
|
|
1369
1369
|
module.exports = isMirroring;
|
|
@@ -1465,15 +1465,15 @@ var require_rotate = __commonJS({
|
|
|
1465
1465
|
var { sin: sin2, cos: cos2 } = require_trigonometry();
|
|
1466
1466
|
var copy = require_copy();
|
|
1467
1467
|
var rotate2 = (out, matrix, radians, axis) => {
|
|
1468
|
-
let [x, y,
|
|
1469
|
-
const lengthSquared = x * x + y * y +
|
|
1468
|
+
let [x, y, z134] = axis;
|
|
1469
|
+
const lengthSquared = x * x + y * y + z134 * z134;
|
|
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
|
+
z134 *= 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 + z134 * s;
|
|
1494
|
+
const b02 = z134 * x * t - y * s;
|
|
1495
|
+
const b10 = x * y * t - z134 * 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 = z134 * y * t + x * s;
|
|
1498
|
+
const b20 = x * z134 * t + y * s;
|
|
1499
|
+
const b21 = y * z134 * t - x * s;
|
|
1500
|
+
const b22 = z134 * z134 * 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;
|
|
@@ -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 z134 = 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] * z134;
|
|
1662
|
+
out[9] = matrix[9] * z134;
|
|
1663
|
+
out[10] = matrix[10] * z134;
|
|
1664
|
+
out[11] = matrix[11] * z134;
|
|
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 translate9 = (out, matrix, offsets) => {
|
|
1716
1716
|
const x = offsets[0];
|
|
1717
1717
|
const y = offsets[1];
|
|
1718
|
-
const
|
|
1718
|
+
const z134 = 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] * z134 + matrix[12];
|
|
1733
|
+
out[13] = matrix[1] * x + matrix[5] * y + matrix[9] * z134 + matrix[13];
|
|
1734
|
+
out[14] = matrix[2] * x + matrix[6] * y + matrix[10] * z134 + matrix[14];
|
|
1735
|
+
out[15] = matrix[3] * x + matrix[7] * y + matrix[11] * z134 + 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 * z134 + matrix[12];
|
|
1762
|
+
out[13] = a01 * x + a11 * y + a21 * z134 + matrix[13];
|
|
1763
|
+
out[14] = a02 * x + a12 * y + a22 * z134 + matrix[14];
|
|
1764
|
+
out[15] = a03 * x + a13 * y + a23 * z134 + matrix[15];
|
|
1765
1765
|
}
|
|
1766
1766
|
return out;
|
|
1767
1767
|
};
|
|
@@ -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, z134, w) => {
|
|
3835
3835
|
const out = create();
|
|
3836
3836
|
out[0] = x;
|
|
3837
3837
|
out[1] = y;
|
|
3838
|
-
out[2] =
|
|
3838
|
+
out[2] = z134;
|
|
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 z134 = point2[2] - a * plane[2];
|
|
3997
|
+
return vec3.fromValues(x, y, z134);
|
|
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, z134, w] = vector;
|
|
4302
|
+
out[0] = matrix[0] * x + matrix[4] * y + matrix[8] * z134 + matrix[12] * w;
|
|
4303
|
+
out[1] = matrix[1] * x + matrix[5] * y + matrix[9] * z134 + matrix[13] * w;
|
|
4304
|
+
out[2] = matrix[2] * x + matrix[6] * y + matrix[10] * z134 + matrix[14] * w;
|
|
4305
|
+
out[3] = matrix[3] * x + matrix[7] * y + matrix[11] * z134 + 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 z134 = out[2] - maxz[2];
|
|
4368
|
+
out[3] = Math.sqrt(x * x + y * y + z134 * z134);
|
|
4369
4369
|
cache.set(polygon3, out);
|
|
4370
4370
|
return out;
|
|
4371
4371
|
};
|
|
@@ -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 z132 } from "zod";
|
|
14755
14755
|
|
|
14756
14756
|
// node_modules/@tscircuit/mm/dist/index.js
|
|
14757
14757
|
var unitToMm = {
|
|
@@ -14795,7 +14795,7 @@ import { z as z12 } from "zod";
|
|
|
14795
14795
|
import { z as z13 } from "zod";
|
|
14796
14796
|
import { z as z14 } from "zod";
|
|
14797
14797
|
import { z as z15 } from "zod";
|
|
14798
|
-
import { z as
|
|
14798
|
+
import { z as z36 } from "zod";
|
|
14799
14799
|
import { z as z16 } from "zod";
|
|
14800
14800
|
import { z as z17 } from "zod";
|
|
14801
14801
|
import { z as z18 } from "zod";
|
|
@@ -14815,15 +14815,15 @@ import { z as z31 } from "zod";
|
|
|
14815
14815
|
import { z as z32 } from "zod";
|
|
14816
14816
|
import { z as z33 } from "zod";
|
|
14817
14817
|
import { z as z34 } from "zod";
|
|
14818
|
-
import { z as
|
|
14818
|
+
import { z as z35 } from "zod";
|
|
14819
14819
|
import { z as z37 } from "zod";
|
|
14820
14820
|
import { z as z38 } from "zod";
|
|
14821
14821
|
import { z as z39 } from "zod";
|
|
14822
14822
|
import { z as z40 } from "zod";
|
|
14823
14823
|
import { z as z41 } from "zod";
|
|
14824
|
-
import { z as z43 } from "zod";
|
|
14825
14824
|
import { z as z42 } from "zod";
|
|
14826
14825
|
import { z as z44 } from "zod";
|
|
14826
|
+
import { z as z43 } from "zod";
|
|
14827
14827
|
import { z as z45 } from "zod";
|
|
14828
14828
|
import { z as z46 } from "zod";
|
|
14829
14829
|
import { z as z47 } from "zod";
|
|
@@ -14832,9 +14832,9 @@ import { z as z49 } from "zod";
|
|
|
14832
14832
|
import { z as z50 } from "zod";
|
|
14833
14833
|
import { z as z51 } from "zod";
|
|
14834
14834
|
import { z as z52 } from "zod";
|
|
14835
|
-
import { z as z54 } from "zod";
|
|
14836
14835
|
import { z as z53 } from "zod";
|
|
14837
14836
|
import { z as z55 } from "zod";
|
|
14837
|
+
import { z as z54 } from "zod";
|
|
14838
14838
|
import { z as z56 } from "zod";
|
|
14839
14839
|
import { z as z57 } from "zod";
|
|
14840
14840
|
import { z as z58 } from "zod";
|
|
@@ -14910,6 +14910,7 @@ import { z as z127 } from "zod";
|
|
|
14910
14910
|
import { z as z128 } from "zod";
|
|
14911
14911
|
import { z as z129 } from "zod";
|
|
14912
14912
|
import { z as z130 } from "zod";
|
|
14913
|
+
import { z as z131 } from "zod";
|
|
14913
14914
|
var unitMappings = {
|
|
14914
14915
|
Hz: {
|
|
14915
14916
|
baseUnit: "Hz",
|
|
@@ -15421,7 +15422,13 @@ var source_pin_missing_trace_warning = z34.object({
|
|
|
15421
15422
|
"Warning emitted when a source component pin is missing a trace connection"
|
|
15422
15423
|
);
|
|
15423
15424
|
expectTypesMatch(true);
|
|
15424
|
-
var
|
|
15425
|
+
var source_simple_voltage_probe = source_component_base.extend({
|
|
15426
|
+
ftype: z35.literal("simple_voltage_probe")
|
|
15427
|
+
});
|
|
15428
|
+
expectTypesMatch(
|
|
15429
|
+
true
|
|
15430
|
+
);
|
|
15431
|
+
var any_source_component = z36.union([
|
|
15425
15432
|
source_simple_resistor,
|
|
15426
15433
|
source_simple_capacitor,
|
|
15427
15434
|
source_simple_diode,
|
|
@@ -15442,6 +15449,7 @@ var any_source_component = z35.union([
|
|
|
15442
15449
|
source_simple_test_point,
|
|
15443
15450
|
source_simple_mosfet,
|
|
15444
15451
|
source_simple_fuse,
|
|
15452
|
+
source_simple_voltage_probe,
|
|
15445
15453
|
source_project_metadata,
|
|
15446
15454
|
source_missing_property_error,
|
|
15447
15455
|
source_failed_to_create_component_error,
|
|
@@ -15450,70 +15458,70 @@ var any_source_component = z35.union([
|
|
|
15450
15458
|
source_pin_missing_trace_warning
|
|
15451
15459
|
]);
|
|
15452
15460
|
expectTypesMatch(true);
|
|
15453
|
-
var source_port =
|
|
15454
|
-
type:
|
|
15455
|
-
pin_number:
|
|
15456
|
-
port_hints:
|
|
15457
|
-
name:
|
|
15458
|
-
source_port_id:
|
|
15459
|
-
source_component_id:
|
|
15460
|
-
source_group_id:
|
|
15461
|
-
subcircuit_id: z36.string().optional(),
|
|
15462
|
-
subcircuit_connectivity_map_key: z36.string().optional()
|
|
15463
|
-
});
|
|
15464
|
-
expectTypesMatch(true);
|
|
15465
|
-
var source_trace = z37.object({
|
|
15466
|
-
type: z37.literal("source_trace"),
|
|
15467
|
-
source_trace_id: z37.string(),
|
|
15468
|
-
connected_source_port_ids: z37.array(z37.string()),
|
|
15469
|
-
connected_source_net_ids: z37.array(z37.string()),
|
|
15461
|
+
var source_port = z37.object({
|
|
15462
|
+
type: z37.literal("source_port"),
|
|
15463
|
+
pin_number: z37.number().optional(),
|
|
15464
|
+
port_hints: z37.array(z37.string()).optional(),
|
|
15465
|
+
name: z37.string(),
|
|
15466
|
+
source_port_id: z37.string(),
|
|
15467
|
+
source_component_id: z37.string().optional(),
|
|
15468
|
+
source_group_id: z37.string().optional(),
|
|
15470
15469
|
subcircuit_id: z37.string().optional(),
|
|
15471
|
-
subcircuit_connectivity_map_key: z37.string().optional()
|
|
15472
|
-
max_length: z37.number().optional(),
|
|
15473
|
-
min_trace_thickness: z37.number().optional(),
|
|
15474
|
-
display_name: z37.string().optional()
|
|
15470
|
+
subcircuit_connectivity_map_key: z37.string().optional()
|
|
15475
15471
|
});
|
|
15476
15472
|
expectTypesMatch(true);
|
|
15477
|
-
var
|
|
15478
|
-
type: z38.literal("
|
|
15479
|
-
|
|
15473
|
+
var source_trace = z38.object({
|
|
15474
|
+
type: z38.literal("source_trace"),
|
|
15475
|
+
source_trace_id: z38.string(),
|
|
15476
|
+
connected_source_port_ids: z38.array(z38.string()),
|
|
15477
|
+
connected_source_net_ids: z38.array(z38.string()),
|
|
15480
15478
|
subcircuit_id: z38.string().optional(),
|
|
15481
|
-
|
|
15482
|
-
|
|
15483
|
-
|
|
15484
|
-
|
|
15485
|
-
name: z38.string().optional(),
|
|
15486
|
-
was_automatically_named: z38.boolean().optional()
|
|
15479
|
+
subcircuit_connectivity_map_key: z38.string().optional(),
|
|
15480
|
+
max_length: z38.number().optional(),
|
|
15481
|
+
min_trace_thickness: z38.number().optional(),
|
|
15482
|
+
display_name: z38.string().optional()
|
|
15487
15483
|
});
|
|
15488
15484
|
expectTypesMatch(true);
|
|
15489
|
-
var
|
|
15490
|
-
type: z39.literal("
|
|
15491
|
-
|
|
15492
|
-
name: z39.string(),
|
|
15493
|
-
member_source_group_ids: z39.array(z39.string()),
|
|
15494
|
-
is_power: z39.boolean().optional(),
|
|
15495
|
-
is_ground: z39.boolean().optional(),
|
|
15496
|
-
is_digital_signal: z39.boolean().optional(),
|
|
15497
|
-
is_analog_signal: z39.boolean().optional(),
|
|
15498
|
-
is_positive_voltage_source: z39.boolean().optional(),
|
|
15499
|
-
trace_width: z39.number().optional(),
|
|
15485
|
+
var source_group = z39.object({
|
|
15486
|
+
type: z39.literal("source_group"),
|
|
15487
|
+
source_group_id: z39.string(),
|
|
15500
15488
|
subcircuit_id: z39.string().optional(),
|
|
15501
|
-
|
|
15489
|
+
parent_subcircuit_id: z39.string().optional(),
|
|
15490
|
+
parent_source_group_id: z39.string().optional(),
|
|
15491
|
+
is_subcircuit: z39.boolean().optional(),
|
|
15492
|
+
show_as_schematic_box: z39.boolean().optional(),
|
|
15493
|
+
name: z39.string().optional(),
|
|
15494
|
+
was_automatically_named: z39.boolean().optional()
|
|
15502
15495
|
});
|
|
15503
15496
|
expectTypesMatch(true);
|
|
15504
|
-
var
|
|
15505
|
-
type: z40.literal("
|
|
15506
|
-
|
|
15507
|
-
|
|
15508
|
-
|
|
15509
|
-
|
|
15497
|
+
var source_net = z40.object({
|
|
15498
|
+
type: z40.literal("source_net"),
|
|
15499
|
+
source_net_id: z40.string(),
|
|
15500
|
+
name: z40.string(),
|
|
15501
|
+
member_source_group_ids: z40.array(z40.string()),
|
|
15502
|
+
is_power: z40.boolean().optional(),
|
|
15503
|
+
is_ground: z40.boolean().optional(),
|
|
15504
|
+
is_digital_signal: z40.boolean().optional(),
|
|
15505
|
+
is_analog_signal: z40.boolean().optional(),
|
|
15506
|
+
is_positive_voltage_source: z40.boolean().optional(),
|
|
15507
|
+
trace_width: z40.number().optional(),
|
|
15508
|
+
subcircuit_id: z40.string().optional(),
|
|
15509
|
+
subcircuit_connectivity_map_key: z40.string().optional()
|
|
15510
|
+
});
|
|
15510
15511
|
expectTypesMatch(true);
|
|
15511
|
-
var
|
|
15512
|
-
type: z41.literal("
|
|
15513
|
-
|
|
15512
|
+
var source_board = z41.object({
|
|
15513
|
+
type: z41.literal("source_board"),
|
|
15514
|
+
source_board_id: z41.string(),
|
|
15514
15515
|
source_group_id: z41.string(),
|
|
15515
|
-
|
|
15516
|
-
|
|
15516
|
+
title: z41.string().optional()
|
|
15517
|
+
}).describe("Defines a board in the source domain");
|
|
15518
|
+
expectTypesMatch(true);
|
|
15519
|
+
var source_pcb_ground_plane = z42.object({
|
|
15520
|
+
type: z42.literal("source_pcb_ground_plane"),
|
|
15521
|
+
source_pcb_ground_plane_id: z42.string(),
|
|
15522
|
+
source_group_id: z42.string(),
|
|
15523
|
+
source_net_id: z42.string(),
|
|
15524
|
+
subcircuit_id: z42.string().optional()
|
|
15517
15525
|
}).describe("Defines a ground plane in the source domain");
|
|
15518
15526
|
expectTypesMatch(true);
|
|
15519
15527
|
var all_layers = [
|
|
@@ -15526,9 +15534,9 @@ var all_layers = [
|
|
|
15526
15534
|
"inner5",
|
|
15527
15535
|
"inner6"
|
|
15528
15536
|
];
|
|
15529
|
-
var layer_string =
|
|
15537
|
+
var layer_string = z43.enum(all_layers);
|
|
15530
15538
|
var layer_ref = layer_string.or(
|
|
15531
|
-
|
|
15539
|
+
z43.object({
|
|
15532
15540
|
name: layer_string
|
|
15533
15541
|
})
|
|
15534
15542
|
).transform((layer) => {
|
|
@@ -15538,201 +15546,201 @@ var layer_ref = layer_string.or(
|
|
|
15538
15546
|
return layer.name;
|
|
15539
15547
|
});
|
|
15540
15548
|
expectTypesMatch(true);
|
|
15541
|
-
var visible_layer =
|
|
15542
|
-
var source_manually_placed_via =
|
|
15543
|
-
type:
|
|
15544
|
-
source_manually_placed_via_id:
|
|
15545
|
-
source_group_id:
|
|
15546
|
-
source_net_id:
|
|
15547
|
-
subcircuit_id:
|
|
15548
|
-
source_trace_id:
|
|
15549
|
+
var visible_layer = z43.enum(["top", "bottom"]);
|
|
15550
|
+
var source_manually_placed_via = z44.object({
|
|
15551
|
+
type: z44.literal("source_manually_placed_via"),
|
|
15552
|
+
source_manually_placed_via_id: z44.string(),
|
|
15553
|
+
source_group_id: z44.string(),
|
|
15554
|
+
source_net_id: z44.string(),
|
|
15555
|
+
subcircuit_id: z44.string().optional(),
|
|
15556
|
+
source_trace_id: z44.string().optional()
|
|
15549
15557
|
}).describe("Defines a via that is manually placed in the source domain");
|
|
15550
15558
|
expectTypesMatch(true);
|
|
15551
|
-
var unknown_error_finding_part =
|
|
15552
|
-
type:
|
|
15559
|
+
var unknown_error_finding_part = z45.object({
|
|
15560
|
+
type: z45.literal("unknown_error_finding_part"),
|
|
15553
15561
|
unknown_error_finding_part_id: getZodPrefixedIdWithDefault(
|
|
15554
15562
|
"unknown_error_finding_part"
|
|
15555
15563
|
),
|
|
15556
|
-
error_type:
|
|
15557
|
-
message:
|
|
15558
|
-
source_component_id:
|
|
15559
|
-
subcircuit_id:
|
|
15564
|
+
error_type: z45.literal("unknown_error_finding_part").default("unknown_error_finding_part"),
|
|
15565
|
+
message: z45.string(),
|
|
15566
|
+
source_component_id: z45.string().optional(),
|
|
15567
|
+
subcircuit_id: z45.string().optional()
|
|
15560
15568
|
}).describe(
|
|
15561
15569
|
"Error emitted when an unexpected error occurs while finding a part"
|
|
15562
15570
|
);
|
|
15563
15571
|
expectTypesMatch(true);
|
|
15564
|
-
var schematic_box =
|
|
15565
|
-
type:
|
|
15566
|
-
schematic_component_id:
|
|
15572
|
+
var schematic_box = z46.object({
|
|
15573
|
+
type: z46.literal("schematic_box"),
|
|
15574
|
+
schematic_component_id: z46.string().optional(),
|
|
15567
15575
|
width: distance,
|
|
15568
15576
|
height: distance,
|
|
15569
|
-
is_dashed:
|
|
15577
|
+
is_dashed: z46.boolean().default(false),
|
|
15570
15578
|
x: distance,
|
|
15571
15579
|
y: distance,
|
|
15572
|
-
subcircuit_id:
|
|
15580
|
+
subcircuit_id: z46.string().optional()
|
|
15573
15581
|
}).describe("Draws a box on the schematic");
|
|
15574
15582
|
expectTypesMatch(true);
|
|
15575
|
-
var schematic_path =
|
|
15576
|
-
type:
|
|
15577
|
-
schematic_component_id:
|
|
15578
|
-
fill_color:
|
|
15579
|
-
is_filled:
|
|
15580
|
-
points:
|
|
15581
|
-
subcircuit_id:
|
|
15583
|
+
var schematic_path = z47.object({
|
|
15584
|
+
type: z47.literal("schematic_path"),
|
|
15585
|
+
schematic_component_id: z47.string(),
|
|
15586
|
+
fill_color: z47.enum(["red", "blue"]).optional(),
|
|
15587
|
+
is_filled: z47.boolean().optional(),
|
|
15588
|
+
points: z47.array(point),
|
|
15589
|
+
subcircuit_id: z47.string().optional()
|
|
15582
15590
|
});
|
|
15583
15591
|
expectTypesMatch(true);
|
|
15584
|
-
var schematic_pin_styles =
|
|
15585
|
-
|
|
15592
|
+
var schematic_pin_styles = z48.record(
|
|
15593
|
+
z48.object({
|
|
15586
15594
|
left_margin: length.optional(),
|
|
15587
15595
|
right_margin: length.optional(),
|
|
15588
15596
|
top_margin: length.optional(),
|
|
15589
15597
|
bottom_margin: length.optional()
|
|
15590
15598
|
})
|
|
15591
15599
|
);
|
|
15592
|
-
var schematic_component_port_arrangement_by_size =
|
|
15593
|
-
left_size:
|
|
15594
|
-
right_size:
|
|
15595
|
-
top_size:
|
|
15596
|
-
bottom_size:
|
|
15600
|
+
var schematic_component_port_arrangement_by_size = z48.object({
|
|
15601
|
+
left_size: z48.number(),
|
|
15602
|
+
right_size: z48.number(),
|
|
15603
|
+
top_size: z48.number().optional(),
|
|
15604
|
+
bottom_size: z48.number().optional()
|
|
15597
15605
|
});
|
|
15598
15606
|
expectTypesMatch(true);
|
|
15599
|
-
var schematic_component_port_arrangement_by_sides =
|
|
15600
|
-
left_side:
|
|
15601
|
-
pins:
|
|
15607
|
+
var schematic_component_port_arrangement_by_sides = z48.object({
|
|
15608
|
+
left_side: z48.object({
|
|
15609
|
+
pins: z48.array(z48.number()),
|
|
15602
15610
|
// @ts-ignore
|
|
15603
|
-
direction:
|
|
15611
|
+
direction: z48.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
15604
15612
|
}).optional(),
|
|
15605
|
-
right_side:
|
|
15606
|
-
pins:
|
|
15613
|
+
right_side: z48.object({
|
|
15614
|
+
pins: z48.array(z48.number()),
|
|
15607
15615
|
// @ts-ignore
|
|
15608
|
-
direction:
|
|
15616
|
+
direction: z48.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
15609
15617
|
}).optional(),
|
|
15610
|
-
top_side:
|
|
15611
|
-
pins:
|
|
15618
|
+
top_side: z48.object({
|
|
15619
|
+
pins: z48.array(z48.number()),
|
|
15612
15620
|
// @ts-ignore
|
|
15613
|
-
direction:
|
|
15621
|
+
direction: z48.enum(["left-to-right", "right-to-left"]).optional()
|
|
15614
15622
|
}).optional(),
|
|
15615
|
-
bottom_side:
|
|
15616
|
-
pins:
|
|
15623
|
+
bottom_side: z48.object({
|
|
15624
|
+
pins: z48.array(z48.number()),
|
|
15617
15625
|
// @ts-ignore
|
|
15618
|
-
direction:
|
|
15626
|
+
direction: z48.enum(["left-to-right", "right-to-left"]).optional()
|
|
15619
15627
|
}).optional()
|
|
15620
15628
|
});
|
|
15621
15629
|
expectTypesMatch(true);
|
|
15622
|
-
var port_arrangement =
|
|
15630
|
+
var port_arrangement = z48.union([
|
|
15623
15631
|
schematic_component_port_arrangement_by_size,
|
|
15624
15632
|
schematic_component_port_arrangement_by_sides
|
|
15625
15633
|
]);
|
|
15626
|
-
var schematic_component =
|
|
15627
|
-
type:
|
|
15634
|
+
var schematic_component = z48.object({
|
|
15635
|
+
type: z48.literal("schematic_component"),
|
|
15628
15636
|
size,
|
|
15629
15637
|
center: point,
|
|
15630
|
-
source_component_id:
|
|
15631
|
-
schematic_component_id:
|
|
15638
|
+
source_component_id: z48.string().optional(),
|
|
15639
|
+
schematic_component_id: z48.string(),
|
|
15632
15640
|
pin_spacing: length.optional(),
|
|
15633
15641
|
pin_styles: schematic_pin_styles.optional(),
|
|
15634
15642
|
box_width: length.optional(),
|
|
15635
|
-
symbol_name:
|
|
15643
|
+
symbol_name: z48.string().optional(),
|
|
15636
15644
|
port_arrangement: port_arrangement.optional(),
|
|
15637
|
-
port_labels:
|
|
15638
|
-
symbol_display_value:
|
|
15639
|
-
subcircuit_id:
|
|
15640
|
-
schematic_group_id:
|
|
15641
|
-
is_schematic_group:
|
|
15642
|
-
source_group_id:
|
|
15643
|
-
is_box_with_pins:
|
|
15645
|
+
port_labels: z48.record(z48.string()).optional(),
|
|
15646
|
+
symbol_display_value: z48.string().optional(),
|
|
15647
|
+
subcircuit_id: z48.string().optional(),
|
|
15648
|
+
schematic_group_id: z48.string().optional(),
|
|
15649
|
+
is_schematic_group: z48.boolean().optional(),
|
|
15650
|
+
source_group_id: z48.string().optional(),
|
|
15651
|
+
is_box_with_pins: z48.boolean().optional().default(true)
|
|
15644
15652
|
});
|
|
15645
15653
|
expectTypesMatch(true);
|
|
15646
|
-
var schematic_line =
|
|
15647
|
-
type:
|
|
15654
|
+
var schematic_line = z49.object({
|
|
15655
|
+
type: z49.literal("schematic_line"),
|
|
15648
15656
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
15649
|
-
schematic_component_id:
|
|
15657
|
+
schematic_component_id: z49.string(),
|
|
15650
15658
|
x1: distance,
|
|
15651
15659
|
y1: distance,
|
|
15652
15660
|
x2: distance,
|
|
15653
15661
|
y2: distance,
|
|
15654
15662
|
stroke_width: distance.nullable().optional(),
|
|
15655
|
-
color:
|
|
15656
|
-
is_dashed:
|
|
15657
|
-
subcircuit_id:
|
|
15663
|
+
color: z49.string().default("#000000"),
|
|
15664
|
+
is_dashed: z49.boolean().default(false),
|
|
15665
|
+
subcircuit_id: z49.string().optional()
|
|
15658
15666
|
}).describe("Draws a styled line on the schematic");
|
|
15659
15667
|
expectTypesMatch(true);
|
|
15660
|
-
var schematic_rect =
|
|
15661
|
-
type:
|
|
15668
|
+
var schematic_rect = z50.object({
|
|
15669
|
+
type: z50.literal("schematic_rect"),
|
|
15662
15670
|
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
15663
|
-
schematic_component_id:
|
|
15671
|
+
schematic_component_id: z50.string(),
|
|
15664
15672
|
center: point,
|
|
15665
15673
|
width: distance,
|
|
15666
15674
|
height: distance,
|
|
15667
15675
|
rotation: rotation.default(0),
|
|
15668
15676
|
stroke_width: distance.nullable().optional(),
|
|
15669
|
-
color:
|
|
15670
|
-
is_filled:
|
|
15671
|
-
fill_color:
|
|
15672
|
-
is_dashed:
|
|
15673
|
-
subcircuit_id:
|
|
15677
|
+
color: z50.string().default("#000000"),
|
|
15678
|
+
is_filled: z50.boolean().default(false),
|
|
15679
|
+
fill_color: z50.string().optional(),
|
|
15680
|
+
is_dashed: z50.boolean().default(false),
|
|
15681
|
+
subcircuit_id: z50.string().optional()
|
|
15674
15682
|
}).describe("Draws a styled rectangle on the schematic");
|
|
15675
15683
|
expectTypesMatch(true);
|
|
15676
|
-
var schematic_circle =
|
|
15677
|
-
type:
|
|
15684
|
+
var schematic_circle = z51.object({
|
|
15685
|
+
type: z51.literal("schematic_circle"),
|
|
15678
15686
|
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
15679
|
-
schematic_component_id:
|
|
15687
|
+
schematic_component_id: z51.string(),
|
|
15680
15688
|
center: point,
|
|
15681
15689
|
radius: distance,
|
|
15682
15690
|
stroke_width: distance.nullable().optional(),
|
|
15683
|
-
color:
|
|
15684
|
-
is_filled:
|
|
15685
|
-
fill_color:
|
|
15686
|
-
is_dashed:
|
|
15687
|
-
subcircuit_id:
|
|
15691
|
+
color: z51.string().default("#000000"),
|
|
15692
|
+
is_filled: z51.boolean().default(false),
|
|
15693
|
+
fill_color: z51.string().optional(),
|
|
15694
|
+
is_dashed: z51.boolean().default(false),
|
|
15695
|
+
subcircuit_id: z51.string().optional()
|
|
15688
15696
|
}).describe("Draws a styled circle on the schematic");
|
|
15689
15697
|
expectTypesMatch(true);
|
|
15690
|
-
var schematic_arc =
|
|
15691
|
-
type:
|
|
15698
|
+
var schematic_arc = z52.object({
|
|
15699
|
+
type: z52.literal("schematic_arc"),
|
|
15692
15700
|
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
15693
|
-
schematic_component_id:
|
|
15701
|
+
schematic_component_id: z52.string(),
|
|
15694
15702
|
center: point,
|
|
15695
15703
|
radius: distance,
|
|
15696
15704
|
start_angle_degrees: rotation,
|
|
15697
15705
|
end_angle_degrees: rotation,
|
|
15698
|
-
direction:
|
|
15706
|
+
direction: z52.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
15699
15707
|
stroke_width: distance.nullable().optional(),
|
|
15700
|
-
color:
|
|
15701
|
-
is_dashed:
|
|
15702
|
-
subcircuit_id:
|
|
15708
|
+
color: z52.string().default("#000000"),
|
|
15709
|
+
is_dashed: z52.boolean().default(false),
|
|
15710
|
+
subcircuit_id: z52.string().optional()
|
|
15703
15711
|
}).describe("Draws a styled arc on the schematic");
|
|
15704
15712
|
expectTypesMatch(true);
|
|
15705
|
-
var schematic_trace =
|
|
15706
|
-
type:
|
|
15707
|
-
schematic_trace_id:
|
|
15708
|
-
source_trace_id:
|
|
15709
|
-
junctions:
|
|
15710
|
-
|
|
15711
|
-
x:
|
|
15712
|
-
y:
|
|
15713
|
+
var schematic_trace = z53.object({
|
|
15714
|
+
type: z53.literal("schematic_trace"),
|
|
15715
|
+
schematic_trace_id: z53.string(),
|
|
15716
|
+
source_trace_id: z53.string().optional(),
|
|
15717
|
+
junctions: z53.array(
|
|
15718
|
+
z53.object({
|
|
15719
|
+
x: z53.number(),
|
|
15720
|
+
y: z53.number()
|
|
15713
15721
|
})
|
|
15714
15722
|
),
|
|
15715
|
-
edges:
|
|
15716
|
-
|
|
15717
|
-
from:
|
|
15718
|
-
x:
|
|
15719
|
-
y:
|
|
15723
|
+
edges: z53.array(
|
|
15724
|
+
z53.object({
|
|
15725
|
+
from: z53.object({
|
|
15726
|
+
x: z53.number(),
|
|
15727
|
+
y: z53.number()
|
|
15720
15728
|
}),
|
|
15721
|
-
to:
|
|
15722
|
-
x:
|
|
15723
|
-
y:
|
|
15729
|
+
to: z53.object({
|
|
15730
|
+
x: z53.number(),
|
|
15731
|
+
y: z53.number()
|
|
15724
15732
|
}),
|
|
15725
|
-
is_crossing:
|
|
15726
|
-
from_schematic_port_id:
|
|
15727
|
-
to_schematic_port_id:
|
|
15733
|
+
is_crossing: z53.boolean().optional(),
|
|
15734
|
+
from_schematic_port_id: z53.string().optional(),
|
|
15735
|
+
to_schematic_port_id: z53.string().optional()
|
|
15728
15736
|
})
|
|
15729
15737
|
),
|
|
15730
|
-
subcircuit_id:
|
|
15738
|
+
subcircuit_id: z53.string().optional(),
|
|
15731
15739
|
// TODO: make required in a future release
|
|
15732
|
-
subcircuit_connectivity_map_key:
|
|
15740
|
+
subcircuit_connectivity_map_key: z53.string().optional()
|
|
15733
15741
|
});
|
|
15734
15742
|
expectTypesMatch(true);
|
|
15735
|
-
var fivePointAnchor =
|
|
15743
|
+
var fivePointAnchor = z54.enum([
|
|
15736
15744
|
"center",
|
|
15737
15745
|
"left",
|
|
15738
15746
|
"right",
|
|
@@ -15740,240 +15748,270 @@ var fivePointAnchor = z53.enum([
|
|
|
15740
15748
|
"bottom"
|
|
15741
15749
|
]);
|
|
15742
15750
|
expectTypesMatch(true);
|
|
15743
|
-
var schematic_text =
|
|
15744
|
-
type:
|
|
15745
|
-
schematic_component_id:
|
|
15746
|
-
schematic_text_id:
|
|
15747
|
-
text:
|
|
15748
|
-
font_size:
|
|
15749
|
-
position:
|
|
15751
|
+
var schematic_text = z55.object({
|
|
15752
|
+
type: z55.literal("schematic_text"),
|
|
15753
|
+
schematic_component_id: z55.string().optional(),
|
|
15754
|
+
schematic_text_id: z55.string(),
|
|
15755
|
+
text: z55.string(),
|
|
15756
|
+
font_size: z55.number().default(0.18),
|
|
15757
|
+
position: z55.object({
|
|
15750
15758
|
x: distance,
|
|
15751
15759
|
y: distance
|
|
15752
15760
|
}),
|
|
15753
|
-
rotation:
|
|
15754
|
-
anchor:
|
|
15755
|
-
color:
|
|
15756
|
-
subcircuit_id:
|
|
15761
|
+
rotation: z55.number().default(0),
|
|
15762
|
+
anchor: z55.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
15763
|
+
color: z55.string().default("#000000"),
|
|
15764
|
+
subcircuit_id: z55.string().optional()
|
|
15757
15765
|
});
|
|
15758
15766
|
expectTypesMatch(true);
|
|
15759
|
-
var schematic_port =
|
|
15760
|
-
type:
|
|
15761
|
-
schematic_port_id:
|
|
15762
|
-
source_port_id:
|
|
15763
|
-
schematic_component_id:
|
|
15767
|
+
var schematic_port = z56.object({
|
|
15768
|
+
type: z56.literal("schematic_port"),
|
|
15769
|
+
schematic_port_id: z56.string(),
|
|
15770
|
+
source_port_id: z56.string(),
|
|
15771
|
+
schematic_component_id: z56.string().optional(),
|
|
15764
15772
|
center: point,
|
|
15765
|
-
facing_direction:
|
|
15766
|
-
distance_from_component_edge:
|
|
15767
|
-
side_of_component:
|
|
15768
|
-
true_ccw_index:
|
|
15769
|
-
pin_number:
|
|
15770
|
-
display_pin_label:
|
|
15771
|
-
subcircuit_id:
|
|
15772
|
-
is_connected:
|
|
15773
|
-
has_input_arrow:
|
|
15774
|
-
has_output_arrow:
|
|
15773
|
+
facing_direction: z56.enum(["up", "down", "left", "right"]).optional(),
|
|
15774
|
+
distance_from_component_edge: z56.number().optional(),
|
|
15775
|
+
side_of_component: z56.enum(["top", "bottom", "left", "right"]).optional(),
|
|
15776
|
+
true_ccw_index: z56.number().optional(),
|
|
15777
|
+
pin_number: z56.number().optional(),
|
|
15778
|
+
display_pin_label: z56.string().optional(),
|
|
15779
|
+
subcircuit_id: z56.string().optional(),
|
|
15780
|
+
is_connected: z56.boolean().optional(),
|
|
15781
|
+
has_input_arrow: z56.boolean().optional(),
|
|
15782
|
+
has_output_arrow: z56.boolean().optional()
|
|
15775
15783
|
}).describe("Defines a port on a schematic component");
|
|
15776
15784
|
expectTypesMatch(true);
|
|
15777
|
-
var schematic_net_label =
|
|
15778
|
-
type:
|
|
15785
|
+
var schematic_net_label = z57.object({
|
|
15786
|
+
type: z57.literal("schematic_net_label"),
|
|
15779
15787
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
15780
|
-
schematic_trace_id:
|
|
15781
|
-
source_trace_id:
|
|
15782
|
-
source_net_id:
|
|
15788
|
+
schematic_trace_id: z57.string().optional(),
|
|
15789
|
+
source_trace_id: z57.string().optional(),
|
|
15790
|
+
source_net_id: z57.string(),
|
|
15783
15791
|
center: point,
|
|
15784
15792
|
anchor_position: point.optional(),
|
|
15785
|
-
anchor_side:
|
|
15786
|
-
text:
|
|
15787
|
-
symbol_name:
|
|
15788
|
-
is_movable:
|
|
15789
|
-
subcircuit_id:
|
|
15793
|
+
anchor_side: z57.enum(["top", "bottom", "left", "right"]),
|
|
15794
|
+
text: z57.string(),
|
|
15795
|
+
symbol_name: z57.string().optional(),
|
|
15796
|
+
is_movable: z57.boolean().optional(),
|
|
15797
|
+
subcircuit_id: z57.string().optional()
|
|
15790
15798
|
});
|
|
15791
15799
|
expectTypesMatch(true);
|
|
15792
|
-
var schematic_error =
|
|
15793
|
-
type:
|
|
15794
|
-
schematic_error_id:
|
|
15800
|
+
var schematic_error = z58.object({
|
|
15801
|
+
type: z58.literal("schematic_error"),
|
|
15802
|
+
schematic_error_id: z58.string(),
|
|
15795
15803
|
// eventually each error type should be broken out into a dir of files
|
|
15796
|
-
error_type:
|
|
15797
|
-
message:
|
|
15798
|
-
subcircuit_id:
|
|
15804
|
+
error_type: z58.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
15805
|
+
message: z58.string(),
|
|
15806
|
+
subcircuit_id: z58.string().optional()
|
|
15799
15807
|
}).describe("Defines a schematic error on the schematic");
|
|
15800
15808
|
expectTypesMatch(true);
|
|
15801
|
-
var schematic_layout_error =
|
|
15802
|
-
type:
|
|
15809
|
+
var schematic_layout_error = z59.object({
|
|
15810
|
+
type: z59.literal("schematic_layout_error"),
|
|
15803
15811
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
15804
15812
|
"schematic_layout_error"
|
|
15805
15813
|
),
|
|
15806
|
-
error_type:
|
|
15807
|
-
message:
|
|
15808
|
-
source_group_id:
|
|
15809
|
-
schematic_group_id:
|
|
15810
|
-
subcircuit_id:
|
|
15814
|
+
error_type: z59.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
15815
|
+
message: z59.string(),
|
|
15816
|
+
source_group_id: z59.string(),
|
|
15817
|
+
schematic_group_id: z59.string(),
|
|
15818
|
+
subcircuit_id: z59.string().optional()
|
|
15811
15819
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
15812
15820
|
expectTypesMatch(true);
|
|
15813
|
-
var schematic_debug_object_base =
|
|
15814
|
-
type:
|
|
15815
|
-
label:
|
|
15816
|
-
subcircuit_id:
|
|
15821
|
+
var schematic_debug_object_base = z60.object({
|
|
15822
|
+
type: z60.literal("schematic_debug_object"),
|
|
15823
|
+
label: z60.string().optional(),
|
|
15824
|
+
subcircuit_id: z60.string().optional()
|
|
15817
15825
|
});
|
|
15818
15826
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
15819
|
-
shape:
|
|
15827
|
+
shape: z60.literal("rect"),
|
|
15820
15828
|
center: point,
|
|
15821
15829
|
size
|
|
15822
15830
|
});
|
|
15823
15831
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
15824
|
-
shape:
|
|
15832
|
+
shape: z60.literal("line"),
|
|
15825
15833
|
start: point,
|
|
15826
15834
|
end: point
|
|
15827
15835
|
});
|
|
15828
15836
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
15829
|
-
shape:
|
|
15837
|
+
shape: z60.literal("point"),
|
|
15830
15838
|
center: point
|
|
15831
15839
|
});
|
|
15832
|
-
var schematic_debug_object =
|
|
15840
|
+
var schematic_debug_object = z60.discriminatedUnion("shape", [
|
|
15833
15841
|
schematic_debug_rect,
|
|
15834
15842
|
schematic_debug_line,
|
|
15835
15843
|
schematic_debug_point
|
|
15836
15844
|
]);
|
|
15837
15845
|
expectTypesMatch(true);
|
|
15838
|
-
var schematic_voltage_probe =
|
|
15839
|
-
type:
|
|
15840
|
-
schematic_voltage_probe_id:
|
|
15846
|
+
var schematic_voltage_probe = z61.object({
|
|
15847
|
+
type: z61.literal("schematic_voltage_probe"),
|
|
15848
|
+
schematic_voltage_probe_id: z61.string(),
|
|
15849
|
+
source_component_id: z61.string().optional(),
|
|
15841
15850
|
position: point,
|
|
15842
|
-
schematic_trace_id:
|
|
15851
|
+
schematic_trace_id: z61.string(),
|
|
15843
15852
|
voltage: voltage.optional(),
|
|
15844
|
-
subcircuit_id:
|
|
15853
|
+
subcircuit_id: z61.string().optional()
|
|
15845
15854
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
15846
15855
|
expectTypesMatch(true);
|
|
15847
|
-
var schematic_manual_edit_conflict_warning =
|
|
15848
|
-
type:
|
|
15856
|
+
var schematic_manual_edit_conflict_warning = z62.object({
|
|
15857
|
+
type: z62.literal("schematic_manual_edit_conflict_warning"),
|
|
15849
15858
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
15850
15859
|
"schematic_manual_edit_conflict_warning"
|
|
15851
15860
|
),
|
|
15852
|
-
warning_type:
|
|
15853
|
-
message:
|
|
15854
|
-
schematic_component_id:
|
|
15855
|
-
schematic_group_id:
|
|
15856
|
-
subcircuit_id:
|
|
15857
|
-
source_component_id:
|
|
15861
|
+
warning_type: z62.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
15862
|
+
message: z62.string(),
|
|
15863
|
+
schematic_component_id: z62.string(),
|
|
15864
|
+
schematic_group_id: z62.string().optional(),
|
|
15865
|
+
subcircuit_id: z62.string().optional(),
|
|
15866
|
+
source_component_id: z62.string()
|
|
15858
15867
|
}).describe(
|
|
15859
15868
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
15860
15869
|
);
|
|
15861
15870
|
expectTypesMatch(true);
|
|
15862
|
-
var schematic_group =
|
|
15863
|
-
type:
|
|
15871
|
+
var schematic_group = z63.object({
|
|
15872
|
+
type: z63.literal("schematic_group"),
|
|
15864
15873
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
15865
|
-
source_group_id:
|
|
15866
|
-
is_subcircuit:
|
|
15867
|
-
subcircuit_id:
|
|
15874
|
+
source_group_id: z63.string(),
|
|
15875
|
+
is_subcircuit: z63.boolean().optional(),
|
|
15876
|
+
subcircuit_id: z63.string().optional(),
|
|
15868
15877
|
width: length,
|
|
15869
15878
|
height: length,
|
|
15870
15879
|
center: point,
|
|
15871
|
-
schematic_component_ids:
|
|
15872
|
-
show_as_schematic_box:
|
|
15873
|
-
name:
|
|
15874
|
-
description:
|
|
15880
|
+
schematic_component_ids: z63.array(z63.string()),
|
|
15881
|
+
show_as_schematic_box: z63.boolean().optional(),
|
|
15882
|
+
name: z63.string().optional(),
|
|
15883
|
+
description: z63.string().optional()
|
|
15875
15884
|
}).describe("Defines a group of components on the schematic");
|
|
15876
15885
|
expectTypesMatch(true);
|
|
15877
|
-
var schematic_table =
|
|
15878
|
-
type:
|
|
15886
|
+
var schematic_table = z64.object({
|
|
15887
|
+
type: z64.literal("schematic_table"),
|
|
15879
15888
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
15880
15889
|
anchor_position: point,
|
|
15881
|
-
column_widths:
|
|
15882
|
-
row_heights:
|
|
15890
|
+
column_widths: z64.array(distance),
|
|
15891
|
+
row_heights: z64.array(distance),
|
|
15883
15892
|
cell_padding: distance.optional(),
|
|
15884
15893
|
border_width: distance.optional(),
|
|
15885
|
-
subcircuit_id:
|
|
15886
|
-
schematic_component_id:
|
|
15894
|
+
subcircuit_id: z64.string().optional(),
|
|
15895
|
+
schematic_component_id: z64.string().optional(),
|
|
15887
15896
|
anchor: ninePointAnchor.optional()
|
|
15888
15897
|
}).describe("Defines a table on the schematic");
|
|
15889
15898
|
expectTypesMatch(true);
|
|
15890
|
-
var schematic_table_cell =
|
|
15891
|
-
type:
|
|
15899
|
+
var schematic_table_cell = z65.object({
|
|
15900
|
+
type: z65.literal("schematic_table_cell"),
|
|
15892
15901
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
15893
15902
|
"schematic_table_cell"
|
|
15894
15903
|
),
|
|
15895
|
-
schematic_table_id:
|
|
15896
|
-
start_row_index:
|
|
15897
|
-
end_row_index:
|
|
15898
|
-
start_column_index:
|
|
15899
|
-
end_column_index:
|
|
15900
|
-
text:
|
|
15904
|
+
schematic_table_id: z65.string(),
|
|
15905
|
+
start_row_index: z65.number(),
|
|
15906
|
+
end_row_index: z65.number(),
|
|
15907
|
+
start_column_index: z65.number(),
|
|
15908
|
+
end_column_index: z65.number(),
|
|
15909
|
+
text: z65.string().optional(),
|
|
15901
15910
|
center: point,
|
|
15902
15911
|
width: distance,
|
|
15903
15912
|
height: distance,
|
|
15904
|
-
horizontal_align:
|
|
15905
|
-
vertical_align:
|
|
15913
|
+
horizontal_align: z65.enum(["left", "center", "right"]).optional(),
|
|
15914
|
+
vertical_align: z65.enum(["top", "middle", "bottom"]).optional(),
|
|
15906
15915
|
font_size: distance.optional(),
|
|
15907
|
-
subcircuit_id:
|
|
15916
|
+
subcircuit_id: z65.string().optional()
|
|
15908
15917
|
}).describe("Defines a cell within a schematic_table");
|
|
15909
15918
|
expectTypesMatch(true);
|
|
15910
|
-
var schematic_sheet =
|
|
15911
|
-
type:
|
|
15919
|
+
var schematic_sheet = z66.object({
|
|
15920
|
+
type: z66.literal("schematic_sheet"),
|
|
15912
15921
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
15913
|
-
name:
|
|
15914
|
-
subcircuit_id:
|
|
15922
|
+
name: z66.string().optional(),
|
|
15923
|
+
subcircuit_id: z66.string().optional()
|
|
15915
15924
|
}).describe(
|
|
15916
15925
|
"Defines a schematic sheet or page that components can be placed on"
|
|
15917
15926
|
);
|
|
15918
15927
|
expectTypesMatch(true);
|
|
15919
|
-
var point_with_bulge =
|
|
15928
|
+
var point_with_bulge = z67.object({
|
|
15920
15929
|
x: distance,
|
|
15921
15930
|
y: distance,
|
|
15922
|
-
bulge:
|
|
15931
|
+
bulge: z67.number().optional()
|
|
15923
15932
|
});
|
|
15924
15933
|
expectTypesMatch(true);
|
|
15925
|
-
var ring =
|
|
15926
|
-
vertices:
|
|
15934
|
+
var ring = z67.object({
|
|
15935
|
+
vertices: z67.array(point_with_bulge)
|
|
15927
15936
|
});
|
|
15928
15937
|
expectTypesMatch(true);
|
|
15929
|
-
var brep_shape =
|
|
15938
|
+
var brep_shape = z67.object({
|
|
15930
15939
|
outer_ring: ring,
|
|
15931
|
-
inner_rings:
|
|
15940
|
+
inner_rings: z67.array(ring).default([])
|
|
15932
15941
|
});
|
|
15933
15942
|
expectTypesMatch(true);
|
|
15934
|
-
var pcb_route_hint =
|
|
15943
|
+
var pcb_route_hint = z68.object({
|
|
15935
15944
|
x: distance,
|
|
15936
15945
|
y: distance,
|
|
15937
|
-
via:
|
|
15946
|
+
via: z68.boolean().optional(),
|
|
15938
15947
|
via_to_layer: layer_ref.optional()
|
|
15939
15948
|
});
|
|
15940
|
-
var pcb_route_hints =
|
|
15949
|
+
var pcb_route_hints = z68.array(pcb_route_hint);
|
|
15941
15950
|
expectTypesMatch(true);
|
|
15942
15951
|
expectTypesMatch(true);
|
|
15943
|
-
var route_hint_point =
|
|
15952
|
+
var route_hint_point = z69.object({
|
|
15944
15953
|
x: distance,
|
|
15945
15954
|
y: distance,
|
|
15946
|
-
via:
|
|
15955
|
+
via: z69.boolean().optional(),
|
|
15947
15956
|
to_layer: layer_ref.optional(),
|
|
15948
15957
|
trace_width: distance.optional()
|
|
15949
15958
|
});
|
|
15950
15959
|
expectTypesMatch(true);
|
|
15951
|
-
var pcb_component =
|
|
15952
|
-
type:
|
|
15960
|
+
var pcb_component = z70.object({
|
|
15961
|
+
type: z70.literal("pcb_component"),
|
|
15953
15962
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
15954
|
-
source_component_id:
|
|
15963
|
+
source_component_id: z70.string(),
|
|
15955
15964
|
center: point,
|
|
15956
15965
|
layer: layer_ref,
|
|
15957
15966
|
rotation,
|
|
15958
15967
|
width: length,
|
|
15959
15968
|
height: length,
|
|
15960
|
-
do_not_place:
|
|
15961
|
-
subcircuit_id:
|
|
15962
|
-
pcb_group_id:
|
|
15963
|
-
position_mode:
|
|
15964
|
-
positioned_relative_to_pcb_group_id:
|
|
15965
|
-
obstructs_within_bounds:
|
|
15969
|
+
do_not_place: z70.boolean().optional(),
|
|
15970
|
+
subcircuit_id: z70.string().optional(),
|
|
15971
|
+
pcb_group_id: z70.string().optional(),
|
|
15972
|
+
position_mode: z70.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
15973
|
+
positioned_relative_to_pcb_group_id: z70.string().optional(),
|
|
15974
|
+
obstructs_within_bounds: z70.boolean().default(true).describe(
|
|
15966
15975
|
"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"
|
|
15967
15976
|
)
|
|
15968
15977
|
}).describe("Defines a component on the PCB");
|
|
15969
15978
|
expectTypesMatch(true);
|
|
15970
|
-
var
|
|
15971
|
-
type:
|
|
15979
|
+
var pcb_hole_circle = z71.object({
|
|
15980
|
+
type: z71.literal("pcb_hole"),
|
|
15972
15981
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
15973
|
-
pcb_group_id:
|
|
15974
|
-
subcircuit_id:
|
|
15975
|
-
hole_shape:
|
|
15976
|
-
hole_diameter:
|
|
15982
|
+
pcb_group_id: z71.string().optional(),
|
|
15983
|
+
subcircuit_id: z71.string().optional(),
|
|
15984
|
+
hole_shape: z71.literal("circle"),
|
|
15985
|
+
hole_diameter: z71.number(),
|
|
15986
|
+
x: distance,
|
|
15987
|
+
y: distance
|
|
15988
|
+
});
|
|
15989
|
+
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
15990
|
+
"Defines a circular hole on the PCB"
|
|
15991
|
+
);
|
|
15992
|
+
expectTypesMatch(true);
|
|
15993
|
+
var pcb_hole_rect = z71.object({
|
|
15994
|
+
type: z71.literal("pcb_hole"),
|
|
15995
|
+
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
15996
|
+
pcb_group_id: z71.string().optional(),
|
|
15997
|
+
subcircuit_id: z71.string().optional(),
|
|
15998
|
+
hole_shape: z71.literal("rect"),
|
|
15999
|
+
hole_width: z71.number(),
|
|
16000
|
+
hole_height: z71.number(),
|
|
16001
|
+
x: distance,
|
|
16002
|
+
y: distance
|
|
16003
|
+
});
|
|
16004
|
+
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
16005
|
+
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
16006
|
+
);
|
|
16007
|
+
expectTypesMatch(true);
|
|
16008
|
+
var pcb_hole_circle_or_square = z71.object({
|
|
16009
|
+
type: z71.literal("pcb_hole"),
|
|
16010
|
+
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
16011
|
+
pcb_group_id: z71.string().optional(),
|
|
16012
|
+
subcircuit_id: z71.string().optional(),
|
|
16013
|
+
hole_shape: z71.enum(["circle", "square"]),
|
|
16014
|
+
hole_diameter: z71.number(),
|
|
15977
16015
|
x: distance,
|
|
15978
16016
|
y: distance
|
|
15979
16017
|
});
|
|
@@ -15981,14 +16019,14 @@ var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
|
15981
16019
|
"Defines a circular or square hole on the PCB"
|
|
15982
16020
|
);
|
|
15983
16021
|
expectTypesMatch(true);
|
|
15984
|
-
var pcb_hole_oval =
|
|
15985
|
-
type:
|
|
16022
|
+
var pcb_hole_oval = z71.object({
|
|
16023
|
+
type: z71.literal("pcb_hole"),
|
|
15986
16024
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
15987
|
-
pcb_group_id:
|
|
15988
|
-
subcircuit_id:
|
|
15989
|
-
hole_shape:
|
|
15990
|
-
hole_width:
|
|
15991
|
-
hole_height:
|
|
16025
|
+
pcb_group_id: z71.string().optional(),
|
|
16026
|
+
subcircuit_id: z71.string().optional(),
|
|
16027
|
+
hole_shape: z71.literal("oval"),
|
|
16028
|
+
hole_width: z71.number(),
|
|
16029
|
+
hole_height: z71.number(),
|
|
15992
16030
|
x: distance,
|
|
15993
16031
|
y: distance
|
|
15994
16032
|
});
|
|
@@ -15996,14 +16034,14 @@ var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
|
15996
16034
|
"Defines an oval hole on the PCB"
|
|
15997
16035
|
);
|
|
15998
16036
|
expectTypesMatch(true);
|
|
15999
|
-
var pcb_hole_pill =
|
|
16000
|
-
type:
|
|
16037
|
+
var pcb_hole_pill = z71.object({
|
|
16038
|
+
type: z71.literal("pcb_hole"),
|
|
16001
16039
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
16002
|
-
pcb_group_id:
|
|
16003
|
-
subcircuit_id:
|
|
16004
|
-
hole_shape:
|
|
16005
|
-
hole_width:
|
|
16006
|
-
hole_height:
|
|
16040
|
+
pcb_group_id: z71.string().optional(),
|
|
16041
|
+
subcircuit_id: z71.string().optional(),
|
|
16042
|
+
hole_shape: z71.literal("pill"),
|
|
16043
|
+
hole_width: z71.number(),
|
|
16044
|
+
hole_height: z71.number(),
|
|
16007
16045
|
x: distance,
|
|
16008
16046
|
y: distance
|
|
16009
16047
|
});
|
|
@@ -16011,14 +16049,14 @@ var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
|
16011
16049
|
"Defines a pill-shaped hole on the PCB"
|
|
16012
16050
|
);
|
|
16013
16051
|
expectTypesMatch(true);
|
|
16014
|
-
var pcb_hole_rotated_pill =
|
|
16015
|
-
type:
|
|
16052
|
+
var pcb_hole_rotated_pill = z71.object({
|
|
16053
|
+
type: z71.literal("pcb_hole"),
|
|
16016
16054
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
16017
|
-
pcb_group_id:
|
|
16018
|
-
subcircuit_id:
|
|
16019
|
-
hole_shape:
|
|
16020
|
-
hole_width:
|
|
16021
|
-
hole_height:
|
|
16055
|
+
pcb_group_id: z71.string().optional(),
|
|
16056
|
+
subcircuit_id: z71.string().optional(),
|
|
16057
|
+
hole_shape: z71.literal("rotated_pill"),
|
|
16058
|
+
hole_width: z71.number(),
|
|
16059
|
+
hole_height: z71.number(),
|
|
16022
16060
|
x: distance,
|
|
16023
16061
|
y: distance,
|
|
16024
16062
|
ccw_rotation: rotation
|
|
@@ -16027,113 +16065,139 @@ var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
|
16027
16065
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
16028
16066
|
);
|
|
16029
16067
|
expectTypesMatch(true);
|
|
16030
|
-
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill);
|
|
16031
|
-
var pcb_plated_hole_circle =
|
|
16032
|
-
type:
|
|
16033
|
-
shape:
|
|
16034
|
-
pcb_group_id:
|
|
16035
|
-
subcircuit_id:
|
|
16036
|
-
outer_diameter:
|
|
16037
|
-
hole_diameter:
|
|
16068
|
+
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);
|
|
16069
|
+
var pcb_plated_hole_circle = z72.object({
|
|
16070
|
+
type: z72.literal("pcb_plated_hole"),
|
|
16071
|
+
shape: z72.literal("circle"),
|
|
16072
|
+
pcb_group_id: z72.string().optional(),
|
|
16073
|
+
subcircuit_id: z72.string().optional(),
|
|
16074
|
+
outer_diameter: z72.number(),
|
|
16075
|
+
hole_diameter: z72.number(),
|
|
16038
16076
|
x: distance,
|
|
16039
16077
|
y: distance,
|
|
16040
|
-
layers:
|
|
16041
|
-
port_hints:
|
|
16042
|
-
pcb_component_id:
|
|
16043
|
-
pcb_port_id:
|
|
16078
|
+
layers: z72.array(layer_ref),
|
|
16079
|
+
port_hints: z72.array(z72.string()).optional(),
|
|
16080
|
+
pcb_component_id: z72.string().optional(),
|
|
16081
|
+
pcb_port_id: z72.string().optional(),
|
|
16044
16082
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16045
16083
|
});
|
|
16046
|
-
var pcb_plated_hole_oval =
|
|
16047
|
-
type:
|
|
16048
|
-
shape:
|
|
16049
|
-
pcb_group_id:
|
|
16050
|
-
subcircuit_id:
|
|
16051
|
-
outer_width:
|
|
16052
|
-
outer_height:
|
|
16053
|
-
hole_width:
|
|
16054
|
-
hole_height:
|
|
16084
|
+
var pcb_plated_hole_oval = z72.object({
|
|
16085
|
+
type: z72.literal("pcb_plated_hole"),
|
|
16086
|
+
shape: z72.enum(["oval", "pill"]),
|
|
16087
|
+
pcb_group_id: z72.string().optional(),
|
|
16088
|
+
subcircuit_id: z72.string().optional(),
|
|
16089
|
+
outer_width: z72.number(),
|
|
16090
|
+
outer_height: z72.number(),
|
|
16091
|
+
hole_width: z72.number(),
|
|
16092
|
+
hole_height: z72.number(),
|
|
16055
16093
|
x: distance,
|
|
16056
16094
|
y: distance,
|
|
16057
16095
|
ccw_rotation: rotation,
|
|
16058
|
-
layers:
|
|
16059
|
-
port_hints:
|
|
16060
|
-
pcb_component_id:
|
|
16061
|
-
pcb_port_id:
|
|
16096
|
+
layers: z72.array(layer_ref),
|
|
16097
|
+
port_hints: z72.array(z72.string()).optional(),
|
|
16098
|
+
pcb_component_id: z72.string().optional(),
|
|
16099
|
+
pcb_port_id: z72.string().optional(),
|
|
16062
16100
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16063
16101
|
});
|
|
16064
|
-
var pcb_circular_hole_with_rect_pad =
|
|
16065
|
-
type:
|
|
16066
|
-
shape:
|
|
16067
|
-
pcb_group_id:
|
|
16068
|
-
subcircuit_id:
|
|
16069
|
-
hole_shape:
|
|
16070
|
-
pad_shape:
|
|
16071
|
-
hole_diameter:
|
|
16072
|
-
rect_pad_width:
|
|
16073
|
-
rect_pad_height:
|
|
16074
|
-
rect_border_radius:
|
|
16102
|
+
var pcb_circular_hole_with_rect_pad = z72.object({
|
|
16103
|
+
type: z72.literal("pcb_plated_hole"),
|
|
16104
|
+
shape: z72.literal("circular_hole_with_rect_pad"),
|
|
16105
|
+
pcb_group_id: z72.string().optional(),
|
|
16106
|
+
subcircuit_id: z72.string().optional(),
|
|
16107
|
+
hole_shape: z72.literal("circle"),
|
|
16108
|
+
pad_shape: z72.literal("rect"),
|
|
16109
|
+
hole_diameter: z72.number(),
|
|
16110
|
+
rect_pad_width: z72.number(),
|
|
16111
|
+
rect_pad_height: z72.number(),
|
|
16112
|
+
rect_border_radius: z72.number().optional(),
|
|
16075
16113
|
hole_offset_x: distance.default(0),
|
|
16076
16114
|
hole_offset_y: distance.default(0),
|
|
16077
16115
|
x: distance,
|
|
16078
16116
|
y: distance,
|
|
16079
|
-
layers:
|
|
16080
|
-
port_hints:
|
|
16081
|
-
pcb_component_id:
|
|
16082
|
-
pcb_port_id:
|
|
16117
|
+
layers: z72.array(layer_ref),
|
|
16118
|
+
port_hints: z72.array(z72.string()).optional(),
|
|
16119
|
+
pcb_component_id: z72.string().optional(),
|
|
16120
|
+
pcb_port_id: z72.string().optional(),
|
|
16083
16121
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16084
16122
|
});
|
|
16085
|
-
var pcb_pill_hole_with_rect_pad =
|
|
16086
|
-
type:
|
|
16087
|
-
shape:
|
|
16088
|
-
pcb_group_id:
|
|
16089
|
-
subcircuit_id:
|
|
16090
|
-
hole_shape:
|
|
16091
|
-
pad_shape:
|
|
16092
|
-
hole_width:
|
|
16093
|
-
hole_height:
|
|
16094
|
-
rect_pad_width:
|
|
16095
|
-
rect_pad_height:
|
|
16096
|
-
rect_border_radius:
|
|
16123
|
+
var pcb_pill_hole_with_rect_pad = z72.object({
|
|
16124
|
+
type: z72.literal("pcb_plated_hole"),
|
|
16125
|
+
shape: z72.literal("pill_hole_with_rect_pad"),
|
|
16126
|
+
pcb_group_id: z72.string().optional(),
|
|
16127
|
+
subcircuit_id: z72.string().optional(),
|
|
16128
|
+
hole_shape: z72.literal("pill"),
|
|
16129
|
+
pad_shape: z72.literal("rect"),
|
|
16130
|
+
hole_width: z72.number(),
|
|
16131
|
+
hole_height: z72.number(),
|
|
16132
|
+
rect_pad_width: z72.number(),
|
|
16133
|
+
rect_pad_height: z72.number(),
|
|
16134
|
+
rect_border_radius: z72.number().optional(),
|
|
16097
16135
|
hole_offset_x: distance.default(0),
|
|
16098
16136
|
hole_offset_y: distance.default(0),
|
|
16099
16137
|
x: distance,
|
|
16100
16138
|
y: distance,
|
|
16101
|
-
layers:
|
|
16102
|
-
port_hints:
|
|
16103
|
-
pcb_component_id:
|
|
16104
|
-
pcb_port_id:
|
|
16139
|
+
layers: z72.array(layer_ref),
|
|
16140
|
+
port_hints: z72.array(z72.string()).optional(),
|
|
16141
|
+
pcb_component_id: z72.string().optional(),
|
|
16142
|
+
pcb_port_id: z72.string().optional(),
|
|
16105
16143
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16106
16144
|
});
|
|
16107
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
16108
|
-
type:
|
|
16109
|
-
shape:
|
|
16110
|
-
pcb_group_id:
|
|
16111
|
-
subcircuit_id:
|
|
16112
|
-
hole_shape:
|
|
16113
|
-
pad_shape:
|
|
16114
|
-
hole_width:
|
|
16115
|
-
hole_height:
|
|
16145
|
+
var pcb_rotated_pill_hole_with_rect_pad = z72.object({
|
|
16146
|
+
type: z72.literal("pcb_plated_hole"),
|
|
16147
|
+
shape: z72.literal("rotated_pill_hole_with_rect_pad"),
|
|
16148
|
+
pcb_group_id: z72.string().optional(),
|
|
16149
|
+
subcircuit_id: z72.string().optional(),
|
|
16150
|
+
hole_shape: z72.literal("rotated_pill"),
|
|
16151
|
+
pad_shape: z72.literal("rect"),
|
|
16152
|
+
hole_width: z72.number(),
|
|
16153
|
+
hole_height: z72.number(),
|
|
16116
16154
|
hole_ccw_rotation: rotation,
|
|
16117
|
-
rect_pad_width:
|
|
16118
|
-
rect_pad_height:
|
|
16119
|
-
rect_border_radius:
|
|
16155
|
+
rect_pad_width: z72.number(),
|
|
16156
|
+
rect_pad_height: z72.number(),
|
|
16157
|
+
rect_border_radius: z72.number().optional(),
|
|
16120
16158
|
rect_ccw_rotation: rotation,
|
|
16121
16159
|
hole_offset_x: distance.default(0),
|
|
16122
16160
|
hole_offset_y: distance.default(0),
|
|
16123
16161
|
x: distance,
|
|
16124
16162
|
y: distance,
|
|
16125
|
-
layers:
|
|
16126
|
-
port_hints:
|
|
16127
|
-
pcb_component_id:
|
|
16128
|
-
pcb_port_id:
|
|
16163
|
+
layers: z72.array(layer_ref),
|
|
16164
|
+
port_hints: z72.array(z72.string()).optional(),
|
|
16165
|
+
pcb_component_id: z72.string().optional(),
|
|
16166
|
+
pcb_port_id: z72.string().optional(),
|
|
16167
|
+
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16168
|
+
});
|
|
16169
|
+
var pcb_hole_with_polygon_pad = z72.object({
|
|
16170
|
+
type: z72.literal("pcb_plated_hole"),
|
|
16171
|
+
shape: z72.literal("hole_with_polygon_pad"),
|
|
16172
|
+
pcb_group_id: z72.string().optional(),
|
|
16173
|
+
subcircuit_id: z72.string().optional(),
|
|
16174
|
+
hole_shape: z72.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
16175
|
+
hole_diameter: z72.number().optional(),
|
|
16176
|
+
hole_width: z72.number().optional(),
|
|
16177
|
+
hole_height: z72.number().optional(),
|
|
16178
|
+
pad_outline: z72.array(
|
|
16179
|
+
z72.object({
|
|
16180
|
+
x: distance,
|
|
16181
|
+
y: distance
|
|
16182
|
+
})
|
|
16183
|
+
).min(3),
|
|
16184
|
+
hole_offset_x: distance.default(0),
|
|
16185
|
+
hole_offset_y: distance.default(0),
|
|
16186
|
+
x: distance,
|
|
16187
|
+
y: distance,
|
|
16188
|
+
layers: z72.array(layer_ref),
|
|
16189
|
+
port_hints: z72.array(z72.string()).optional(),
|
|
16190
|
+
pcb_component_id: z72.string().optional(),
|
|
16191
|
+
pcb_port_id: z72.string().optional(),
|
|
16129
16192
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole")
|
|
16130
16193
|
});
|
|
16131
|
-
var pcb_plated_hole =
|
|
16194
|
+
var pcb_plated_hole = z72.union([
|
|
16132
16195
|
pcb_plated_hole_circle,
|
|
16133
16196
|
pcb_plated_hole_oval,
|
|
16134
16197
|
pcb_circular_hole_with_rect_pad,
|
|
16135
16198
|
pcb_pill_hole_with_rect_pad,
|
|
16136
|
-
pcb_rotated_pill_hole_with_rect_pad
|
|
16199
|
+
pcb_rotated_pill_hole_with_rect_pad,
|
|
16200
|
+
pcb_hole_with_polygon_pad
|
|
16137
16201
|
]);
|
|
16138
16202
|
expectTypesMatch(
|
|
16139
16203
|
true
|
|
@@ -16142,120 +16206,121 @@ expectTypesMatch(true);
|
|
|
16142
16206
|
expectTypesMatch(true);
|
|
16143
16207
|
expectTypesMatch(true);
|
|
16144
16208
|
expectTypesMatch(true);
|
|
16145
|
-
|
|
16146
|
-
|
|
16209
|
+
expectTypesMatch(true);
|
|
16210
|
+
var pcb_port = z73.object({
|
|
16211
|
+
type: z73.literal("pcb_port"),
|
|
16147
16212
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
16148
|
-
pcb_group_id:
|
|
16149
|
-
subcircuit_id:
|
|
16150
|
-
source_port_id:
|
|
16151
|
-
pcb_component_id:
|
|
16213
|
+
pcb_group_id: z73.string().optional(),
|
|
16214
|
+
subcircuit_id: z73.string().optional(),
|
|
16215
|
+
source_port_id: z73.string(),
|
|
16216
|
+
pcb_component_id: z73.string().optional(),
|
|
16152
16217
|
x: distance,
|
|
16153
16218
|
y: distance,
|
|
16154
|
-
layers:
|
|
16155
|
-
is_board_pinout:
|
|
16219
|
+
layers: z73.array(layer_ref),
|
|
16220
|
+
is_board_pinout: z73.boolean().optional()
|
|
16156
16221
|
}).describe("Defines a port on the PCB");
|
|
16157
16222
|
expectTypesMatch(true);
|
|
16158
|
-
var pcb_smtpad_circle =
|
|
16159
|
-
type:
|
|
16160
|
-
shape:
|
|
16223
|
+
var pcb_smtpad_circle = z74.object({
|
|
16224
|
+
type: z74.literal("pcb_smtpad"),
|
|
16225
|
+
shape: z74.literal("circle"),
|
|
16161
16226
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16162
|
-
pcb_group_id:
|
|
16163
|
-
subcircuit_id:
|
|
16227
|
+
pcb_group_id: z74.string().optional(),
|
|
16228
|
+
subcircuit_id: z74.string().optional(),
|
|
16164
16229
|
x: distance,
|
|
16165
16230
|
y: distance,
|
|
16166
|
-
radius:
|
|
16231
|
+
radius: z74.number(),
|
|
16167
16232
|
layer: layer_ref,
|
|
16168
|
-
port_hints:
|
|
16169
|
-
pcb_component_id:
|
|
16170
|
-
pcb_port_id:
|
|
16171
|
-
is_covered_with_solder_mask:
|
|
16233
|
+
port_hints: z74.array(z74.string()).optional(),
|
|
16234
|
+
pcb_component_id: z74.string().optional(),
|
|
16235
|
+
pcb_port_id: z74.string().optional(),
|
|
16236
|
+
is_covered_with_solder_mask: z74.boolean().optional()
|
|
16172
16237
|
});
|
|
16173
|
-
var pcb_smtpad_rect =
|
|
16174
|
-
type:
|
|
16175
|
-
shape:
|
|
16238
|
+
var pcb_smtpad_rect = z74.object({
|
|
16239
|
+
type: z74.literal("pcb_smtpad"),
|
|
16240
|
+
shape: z74.literal("rect"),
|
|
16176
16241
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16177
|
-
pcb_group_id:
|
|
16178
|
-
subcircuit_id:
|
|
16242
|
+
pcb_group_id: z74.string().optional(),
|
|
16243
|
+
subcircuit_id: z74.string().optional(),
|
|
16179
16244
|
x: distance,
|
|
16180
16245
|
y: distance,
|
|
16181
|
-
width:
|
|
16182
|
-
height:
|
|
16183
|
-
rect_border_radius:
|
|
16184
|
-
corner_radius:
|
|
16246
|
+
width: z74.number(),
|
|
16247
|
+
height: z74.number(),
|
|
16248
|
+
rect_border_radius: z74.number().optional(),
|
|
16249
|
+
corner_radius: z74.number().optional(),
|
|
16185
16250
|
layer: layer_ref,
|
|
16186
|
-
port_hints:
|
|
16187
|
-
pcb_component_id:
|
|
16188
|
-
pcb_port_id:
|
|
16189
|
-
is_covered_with_solder_mask:
|
|
16251
|
+
port_hints: z74.array(z74.string()).optional(),
|
|
16252
|
+
pcb_component_id: z74.string().optional(),
|
|
16253
|
+
pcb_port_id: z74.string().optional(),
|
|
16254
|
+
is_covered_with_solder_mask: z74.boolean().optional()
|
|
16190
16255
|
});
|
|
16191
|
-
var pcb_smtpad_rotated_rect =
|
|
16192
|
-
type:
|
|
16193
|
-
shape:
|
|
16256
|
+
var pcb_smtpad_rotated_rect = z74.object({
|
|
16257
|
+
type: z74.literal("pcb_smtpad"),
|
|
16258
|
+
shape: z74.literal("rotated_rect"),
|
|
16194
16259
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16195
|
-
pcb_group_id:
|
|
16196
|
-
subcircuit_id:
|
|
16260
|
+
pcb_group_id: z74.string().optional(),
|
|
16261
|
+
subcircuit_id: z74.string().optional(),
|
|
16197
16262
|
x: distance,
|
|
16198
16263
|
y: distance,
|
|
16199
|
-
width:
|
|
16200
|
-
height:
|
|
16201
|
-
rect_border_radius:
|
|
16202
|
-
corner_radius:
|
|
16264
|
+
width: z74.number(),
|
|
16265
|
+
height: z74.number(),
|
|
16266
|
+
rect_border_radius: z74.number().optional(),
|
|
16267
|
+
corner_radius: z74.number().optional(),
|
|
16203
16268
|
ccw_rotation: rotation,
|
|
16204
16269
|
layer: layer_ref,
|
|
16205
|
-
port_hints:
|
|
16206
|
-
pcb_component_id:
|
|
16207
|
-
pcb_port_id:
|
|
16208
|
-
is_covered_with_solder_mask:
|
|
16270
|
+
port_hints: z74.array(z74.string()).optional(),
|
|
16271
|
+
pcb_component_id: z74.string().optional(),
|
|
16272
|
+
pcb_port_id: z74.string().optional(),
|
|
16273
|
+
is_covered_with_solder_mask: z74.boolean().optional()
|
|
16209
16274
|
});
|
|
16210
|
-
var pcb_smtpad_pill =
|
|
16211
|
-
type:
|
|
16212
|
-
shape:
|
|
16275
|
+
var pcb_smtpad_pill = z74.object({
|
|
16276
|
+
type: z74.literal("pcb_smtpad"),
|
|
16277
|
+
shape: z74.literal("pill"),
|
|
16213
16278
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16214
|
-
pcb_group_id:
|
|
16215
|
-
subcircuit_id:
|
|
16279
|
+
pcb_group_id: z74.string().optional(),
|
|
16280
|
+
subcircuit_id: z74.string().optional(),
|
|
16216
16281
|
x: distance,
|
|
16217
16282
|
y: distance,
|
|
16218
|
-
width:
|
|
16219
|
-
height:
|
|
16220
|
-
radius:
|
|
16283
|
+
width: z74.number(),
|
|
16284
|
+
height: z74.number(),
|
|
16285
|
+
radius: z74.number(),
|
|
16221
16286
|
layer: layer_ref,
|
|
16222
|
-
port_hints:
|
|
16223
|
-
pcb_component_id:
|
|
16224
|
-
pcb_port_id:
|
|
16225
|
-
is_covered_with_solder_mask:
|
|
16287
|
+
port_hints: z74.array(z74.string()).optional(),
|
|
16288
|
+
pcb_component_id: z74.string().optional(),
|
|
16289
|
+
pcb_port_id: z74.string().optional(),
|
|
16290
|
+
is_covered_with_solder_mask: z74.boolean().optional()
|
|
16226
16291
|
});
|
|
16227
|
-
var pcb_smtpad_rotated_pill =
|
|
16228
|
-
type:
|
|
16229
|
-
shape:
|
|
16292
|
+
var pcb_smtpad_rotated_pill = z74.object({
|
|
16293
|
+
type: z74.literal("pcb_smtpad"),
|
|
16294
|
+
shape: z74.literal("rotated_pill"),
|
|
16230
16295
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16231
|
-
pcb_group_id:
|
|
16232
|
-
subcircuit_id:
|
|
16296
|
+
pcb_group_id: z74.string().optional(),
|
|
16297
|
+
subcircuit_id: z74.string().optional(),
|
|
16233
16298
|
x: distance,
|
|
16234
16299
|
y: distance,
|
|
16235
|
-
width:
|
|
16236
|
-
height:
|
|
16237
|
-
radius:
|
|
16300
|
+
width: z74.number(),
|
|
16301
|
+
height: z74.number(),
|
|
16302
|
+
radius: z74.number(),
|
|
16238
16303
|
ccw_rotation: rotation,
|
|
16239
16304
|
layer: layer_ref,
|
|
16240
|
-
port_hints:
|
|
16241
|
-
pcb_component_id:
|
|
16242
|
-
pcb_port_id:
|
|
16243
|
-
is_covered_with_solder_mask:
|
|
16305
|
+
port_hints: z74.array(z74.string()).optional(),
|
|
16306
|
+
pcb_component_id: z74.string().optional(),
|
|
16307
|
+
pcb_port_id: z74.string().optional(),
|
|
16308
|
+
is_covered_with_solder_mask: z74.boolean().optional()
|
|
16244
16309
|
});
|
|
16245
|
-
var pcb_smtpad_polygon =
|
|
16246
|
-
type:
|
|
16247
|
-
shape:
|
|
16310
|
+
var pcb_smtpad_polygon = z74.object({
|
|
16311
|
+
type: z74.literal("pcb_smtpad"),
|
|
16312
|
+
shape: z74.literal("polygon"),
|
|
16248
16313
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
16249
|
-
pcb_group_id:
|
|
16250
|
-
subcircuit_id:
|
|
16251
|
-
points:
|
|
16314
|
+
pcb_group_id: z74.string().optional(),
|
|
16315
|
+
subcircuit_id: z74.string().optional(),
|
|
16316
|
+
points: z74.array(point),
|
|
16252
16317
|
layer: layer_ref,
|
|
16253
|
-
port_hints:
|
|
16254
|
-
pcb_component_id:
|
|
16255
|
-
pcb_port_id:
|
|
16256
|
-
is_covered_with_solder_mask:
|
|
16318
|
+
port_hints: z74.array(z74.string()).optional(),
|
|
16319
|
+
pcb_component_id: z74.string().optional(),
|
|
16320
|
+
pcb_port_id: z74.string().optional(),
|
|
16321
|
+
is_covered_with_solder_mask: z74.boolean().optional()
|
|
16257
16322
|
});
|
|
16258
|
-
var pcb_smtpad =
|
|
16323
|
+
var pcb_smtpad = z74.discriminatedUnion("shape", [
|
|
16259
16324
|
pcb_smtpad_circle,
|
|
16260
16325
|
pcb_smtpad_rect,
|
|
16261
16326
|
pcb_smtpad_rotated_rect,
|
|
@@ -16269,78 +16334,78 @@ expectTypesMatch(true);
|
|
|
16269
16334
|
expectTypesMatch(true);
|
|
16270
16335
|
expectTypesMatch(true);
|
|
16271
16336
|
expectTypesMatch(true);
|
|
16272
|
-
var pcb_solder_paste_circle =
|
|
16273
|
-
type:
|
|
16274
|
-
shape:
|
|
16337
|
+
var pcb_solder_paste_circle = z75.object({
|
|
16338
|
+
type: z75.literal("pcb_solder_paste"),
|
|
16339
|
+
shape: z75.literal("circle"),
|
|
16275
16340
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16276
|
-
pcb_group_id:
|
|
16277
|
-
subcircuit_id:
|
|
16341
|
+
pcb_group_id: z75.string().optional(),
|
|
16342
|
+
subcircuit_id: z75.string().optional(),
|
|
16278
16343
|
x: distance,
|
|
16279
16344
|
y: distance,
|
|
16280
|
-
radius:
|
|
16345
|
+
radius: z75.number(),
|
|
16281
16346
|
layer: layer_ref,
|
|
16282
|
-
pcb_component_id:
|
|
16283
|
-
pcb_smtpad_id:
|
|
16347
|
+
pcb_component_id: z75.string().optional(),
|
|
16348
|
+
pcb_smtpad_id: z75.string().optional()
|
|
16284
16349
|
});
|
|
16285
|
-
var pcb_solder_paste_rect =
|
|
16286
|
-
type:
|
|
16287
|
-
shape:
|
|
16350
|
+
var pcb_solder_paste_rect = z75.object({
|
|
16351
|
+
type: z75.literal("pcb_solder_paste"),
|
|
16352
|
+
shape: z75.literal("rect"),
|
|
16288
16353
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16289
|
-
pcb_group_id:
|
|
16290
|
-
subcircuit_id:
|
|
16354
|
+
pcb_group_id: z75.string().optional(),
|
|
16355
|
+
subcircuit_id: z75.string().optional(),
|
|
16291
16356
|
x: distance,
|
|
16292
16357
|
y: distance,
|
|
16293
|
-
width:
|
|
16294
|
-
height:
|
|
16358
|
+
width: z75.number(),
|
|
16359
|
+
height: z75.number(),
|
|
16295
16360
|
layer: layer_ref,
|
|
16296
|
-
pcb_component_id:
|
|
16297
|
-
pcb_smtpad_id:
|
|
16361
|
+
pcb_component_id: z75.string().optional(),
|
|
16362
|
+
pcb_smtpad_id: z75.string().optional()
|
|
16298
16363
|
});
|
|
16299
|
-
var pcb_solder_paste_pill =
|
|
16300
|
-
type:
|
|
16301
|
-
shape:
|
|
16364
|
+
var pcb_solder_paste_pill = z75.object({
|
|
16365
|
+
type: z75.literal("pcb_solder_paste"),
|
|
16366
|
+
shape: z75.literal("pill"),
|
|
16302
16367
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16303
|
-
pcb_group_id:
|
|
16304
|
-
subcircuit_id:
|
|
16368
|
+
pcb_group_id: z75.string().optional(),
|
|
16369
|
+
subcircuit_id: z75.string().optional(),
|
|
16305
16370
|
x: distance,
|
|
16306
16371
|
y: distance,
|
|
16307
|
-
width:
|
|
16308
|
-
height:
|
|
16309
|
-
radius:
|
|
16372
|
+
width: z75.number(),
|
|
16373
|
+
height: z75.number(),
|
|
16374
|
+
radius: z75.number(),
|
|
16310
16375
|
layer: layer_ref,
|
|
16311
|
-
pcb_component_id:
|
|
16312
|
-
pcb_smtpad_id:
|
|
16376
|
+
pcb_component_id: z75.string().optional(),
|
|
16377
|
+
pcb_smtpad_id: z75.string().optional()
|
|
16313
16378
|
});
|
|
16314
|
-
var pcb_solder_paste_rotated_rect =
|
|
16315
|
-
type:
|
|
16316
|
-
shape:
|
|
16379
|
+
var pcb_solder_paste_rotated_rect = z75.object({
|
|
16380
|
+
type: z75.literal("pcb_solder_paste"),
|
|
16381
|
+
shape: z75.literal("rotated_rect"),
|
|
16317
16382
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16318
|
-
pcb_group_id:
|
|
16319
|
-
subcircuit_id:
|
|
16383
|
+
pcb_group_id: z75.string().optional(),
|
|
16384
|
+
subcircuit_id: z75.string().optional(),
|
|
16320
16385
|
x: distance,
|
|
16321
16386
|
y: distance,
|
|
16322
|
-
width:
|
|
16323
|
-
height:
|
|
16387
|
+
width: z75.number(),
|
|
16388
|
+
height: z75.number(),
|
|
16324
16389
|
ccw_rotation: distance,
|
|
16325
16390
|
layer: layer_ref,
|
|
16326
|
-
pcb_component_id:
|
|
16327
|
-
pcb_smtpad_id:
|
|
16391
|
+
pcb_component_id: z75.string().optional(),
|
|
16392
|
+
pcb_smtpad_id: z75.string().optional()
|
|
16328
16393
|
});
|
|
16329
|
-
var pcb_solder_paste_oval =
|
|
16330
|
-
type:
|
|
16331
|
-
shape:
|
|
16394
|
+
var pcb_solder_paste_oval = z75.object({
|
|
16395
|
+
type: z75.literal("pcb_solder_paste"),
|
|
16396
|
+
shape: z75.literal("oval"),
|
|
16332
16397
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
16333
|
-
pcb_group_id:
|
|
16334
|
-
subcircuit_id:
|
|
16398
|
+
pcb_group_id: z75.string().optional(),
|
|
16399
|
+
subcircuit_id: z75.string().optional(),
|
|
16335
16400
|
x: distance,
|
|
16336
16401
|
y: distance,
|
|
16337
|
-
width:
|
|
16338
|
-
height:
|
|
16402
|
+
width: z75.number(),
|
|
16403
|
+
height: z75.number(),
|
|
16339
16404
|
layer: layer_ref,
|
|
16340
|
-
pcb_component_id:
|
|
16341
|
-
pcb_smtpad_id:
|
|
16405
|
+
pcb_component_id: z75.string().optional(),
|
|
16406
|
+
pcb_smtpad_id: z75.string().optional()
|
|
16342
16407
|
});
|
|
16343
|
-
var pcb_solder_paste =
|
|
16408
|
+
var pcb_solder_paste = z75.union([
|
|
16344
16409
|
pcb_solder_paste_circle,
|
|
16345
16410
|
pcb_solder_paste_rect,
|
|
16346
16411
|
pcb_solder_paste_pill,
|
|
@@ -16354,123 +16419,124 @@ expectTypesMatch(
|
|
|
16354
16419
|
true
|
|
16355
16420
|
);
|
|
16356
16421
|
expectTypesMatch(true);
|
|
16357
|
-
var pcb_text =
|
|
16358
|
-
type:
|
|
16422
|
+
var pcb_text = z76.object({
|
|
16423
|
+
type: z76.literal("pcb_text"),
|
|
16359
16424
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
16360
|
-
pcb_group_id:
|
|
16361
|
-
subcircuit_id:
|
|
16362
|
-
text:
|
|
16425
|
+
pcb_group_id: z76.string().optional(),
|
|
16426
|
+
subcircuit_id: z76.string().optional(),
|
|
16427
|
+
text: z76.string(),
|
|
16363
16428
|
center: point,
|
|
16364
16429
|
layer: layer_ref,
|
|
16365
16430
|
width: length,
|
|
16366
16431
|
height: length,
|
|
16367
|
-
lines:
|
|
16432
|
+
lines: z76.number(),
|
|
16368
16433
|
// @ts-ignore
|
|
16369
|
-
align:
|
|
16434
|
+
align: z76.enum(["bottom-left"])
|
|
16370
16435
|
}).describe("Defines text on the PCB");
|
|
16371
16436
|
expectTypesMatch(true);
|
|
16372
|
-
var pcb_trace_route_point_wire =
|
|
16373
|
-
route_type:
|
|
16437
|
+
var pcb_trace_route_point_wire = z77.object({
|
|
16438
|
+
route_type: z77.literal("wire"),
|
|
16374
16439
|
x: distance,
|
|
16375
16440
|
y: distance,
|
|
16376
16441
|
width: distance,
|
|
16377
|
-
start_pcb_port_id:
|
|
16378
|
-
end_pcb_port_id:
|
|
16442
|
+
start_pcb_port_id: z77.string().optional(),
|
|
16443
|
+
end_pcb_port_id: z77.string().optional(),
|
|
16379
16444
|
layer: layer_ref
|
|
16380
16445
|
});
|
|
16381
|
-
var pcb_trace_route_point_via =
|
|
16382
|
-
route_type:
|
|
16446
|
+
var pcb_trace_route_point_via = z77.object({
|
|
16447
|
+
route_type: z77.literal("via"),
|
|
16383
16448
|
x: distance,
|
|
16384
16449
|
y: distance,
|
|
16385
16450
|
hole_diameter: distance.optional(),
|
|
16386
16451
|
outer_diameter: distance.optional(),
|
|
16387
|
-
from_layer:
|
|
16388
|
-
to_layer:
|
|
16452
|
+
from_layer: z77.string(),
|
|
16453
|
+
to_layer: z77.string()
|
|
16389
16454
|
});
|
|
16390
|
-
var pcb_trace_route_point =
|
|
16455
|
+
var pcb_trace_route_point = z77.union([
|
|
16391
16456
|
pcb_trace_route_point_wire,
|
|
16392
16457
|
pcb_trace_route_point_via
|
|
16393
16458
|
]);
|
|
16394
|
-
var pcb_trace =
|
|
16395
|
-
type:
|
|
16396
|
-
source_trace_id:
|
|
16397
|
-
pcb_component_id:
|
|
16459
|
+
var pcb_trace = z77.object({
|
|
16460
|
+
type: z77.literal("pcb_trace"),
|
|
16461
|
+
source_trace_id: z77.string().optional(),
|
|
16462
|
+
pcb_component_id: z77.string().optional(),
|
|
16398
16463
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
16399
|
-
pcb_group_id:
|
|
16400
|
-
subcircuit_id:
|
|
16401
|
-
route_thickness_mode:
|
|
16402
|
-
route_order_index:
|
|
16403
|
-
should_round_corners:
|
|
16404
|
-
trace_length:
|
|
16405
|
-
highlight_color:
|
|
16406
|
-
route:
|
|
16464
|
+
pcb_group_id: z77.string().optional(),
|
|
16465
|
+
subcircuit_id: z77.string().optional(),
|
|
16466
|
+
route_thickness_mode: z77.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
16467
|
+
route_order_index: z77.number().optional(),
|
|
16468
|
+
should_round_corners: z77.boolean().optional(),
|
|
16469
|
+
trace_length: z77.number().optional(),
|
|
16470
|
+
highlight_color: z77.string().optional(),
|
|
16471
|
+
route: z77.array(pcb_trace_route_point)
|
|
16407
16472
|
}).describe("Defines a trace on the PCB");
|
|
16408
16473
|
expectTypesMatch(true);
|
|
16409
16474
|
expectTypesMatch(true);
|
|
16410
|
-
var pcb_trace_error =
|
|
16411
|
-
type:
|
|
16475
|
+
var pcb_trace_error = z78.object({
|
|
16476
|
+
type: z78.literal("pcb_trace_error"),
|
|
16412
16477
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
16413
|
-
error_type:
|
|
16414
|
-
message:
|
|
16478
|
+
error_type: z78.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
16479
|
+
message: z78.string(),
|
|
16415
16480
|
center: point.optional(),
|
|
16416
|
-
pcb_trace_id:
|
|
16417
|
-
source_trace_id:
|
|
16418
|
-
pcb_component_ids:
|
|
16419
|
-
pcb_port_ids:
|
|
16420
|
-
subcircuit_id:
|
|
16481
|
+
pcb_trace_id: z78.string(),
|
|
16482
|
+
source_trace_id: z78.string(),
|
|
16483
|
+
pcb_component_ids: z78.array(z78.string()),
|
|
16484
|
+
pcb_port_ids: z78.array(z78.string()),
|
|
16485
|
+
subcircuit_id: z78.string().optional()
|
|
16421
16486
|
}).describe("Defines a trace error on the PCB");
|
|
16422
16487
|
expectTypesMatch(true);
|
|
16423
|
-
var pcb_trace_missing_error =
|
|
16424
|
-
type:
|
|
16488
|
+
var pcb_trace_missing_error = z79.object({
|
|
16489
|
+
type: z79.literal("pcb_trace_missing_error"),
|
|
16425
16490
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
16426
16491
|
"pcb_trace_missing_error"
|
|
16427
16492
|
),
|
|
16428
|
-
error_type:
|
|
16429
|
-
message:
|
|
16493
|
+
error_type: z79.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
16494
|
+
message: z79.string(),
|
|
16430
16495
|
center: point.optional(),
|
|
16431
|
-
source_trace_id:
|
|
16432
|
-
pcb_component_ids:
|
|
16433
|
-
pcb_port_ids:
|
|
16434
|
-
subcircuit_id:
|
|
16496
|
+
source_trace_id: z79.string(),
|
|
16497
|
+
pcb_component_ids: z79.array(z79.string()),
|
|
16498
|
+
pcb_port_ids: z79.array(z79.string()),
|
|
16499
|
+
subcircuit_id: z79.string().optional()
|
|
16435
16500
|
}).describe(
|
|
16436
16501
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
16437
16502
|
);
|
|
16438
16503
|
expectTypesMatch(true);
|
|
16439
|
-
var pcb_port_not_matched_error =
|
|
16440
|
-
type:
|
|
16504
|
+
var pcb_port_not_matched_error = z80.object({
|
|
16505
|
+
type: z80.literal("pcb_port_not_matched_error"),
|
|
16441
16506
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
16442
|
-
error_type:
|
|
16443
|
-
message:
|
|
16444
|
-
pcb_component_ids:
|
|
16445
|
-
subcircuit_id:
|
|
16507
|
+
error_type: z80.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
16508
|
+
message: z80.string(),
|
|
16509
|
+
pcb_component_ids: z80.array(z80.string()),
|
|
16510
|
+
subcircuit_id: z80.string().optional()
|
|
16446
16511
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
16447
16512
|
expectTypesMatch(true);
|
|
16448
|
-
var pcb_port_not_connected_error =
|
|
16449
|
-
type:
|
|
16513
|
+
var pcb_port_not_connected_error = z81.object({
|
|
16514
|
+
type: z81.literal("pcb_port_not_connected_error"),
|
|
16450
16515
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
16451
16516
|
"pcb_port_not_connected_error"
|
|
16452
16517
|
),
|
|
16453
|
-
error_type:
|
|
16454
|
-
message:
|
|
16455
|
-
pcb_port_ids:
|
|
16456
|
-
pcb_component_ids:
|
|
16457
|
-
subcircuit_id:
|
|
16518
|
+
error_type: z81.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
16519
|
+
message: z81.string(),
|
|
16520
|
+
pcb_port_ids: z81.array(z81.string()),
|
|
16521
|
+
pcb_component_ids: z81.array(z81.string()),
|
|
16522
|
+
subcircuit_id: z81.string().optional()
|
|
16458
16523
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
16459
16524
|
expectTypesMatch(
|
|
16460
16525
|
true
|
|
16461
16526
|
);
|
|
16462
|
-
var pcb_net =
|
|
16463
|
-
type:
|
|
16527
|
+
var pcb_net = z82.object({
|
|
16528
|
+
type: z82.literal("pcb_net"),
|
|
16464
16529
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
16465
|
-
source_net_id:
|
|
16466
|
-
highlight_color:
|
|
16530
|
+
source_net_id: z82.string().optional(),
|
|
16531
|
+
highlight_color: z82.string().optional()
|
|
16467
16532
|
}).describe("Defines a net on the PCB");
|
|
16468
16533
|
expectTypesMatch(true);
|
|
16469
|
-
var pcb_via =
|
|
16470
|
-
type:
|
|
16534
|
+
var pcb_via = z83.object({
|
|
16535
|
+
type: z83.literal("pcb_via"),
|
|
16471
16536
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
16472
|
-
pcb_group_id:
|
|
16473
|
-
subcircuit_id:
|
|
16537
|
+
pcb_group_id: z83.string().optional(),
|
|
16538
|
+
subcircuit_id: z83.string().optional(),
|
|
16539
|
+
subcircuit_connectivity_map_key: z83.string().optional(),
|
|
16474
16540
|
x: distance,
|
|
16475
16541
|
y: distance,
|
|
16476
16542
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -16479,59 +16545,60 @@ var pcb_via = z82.object({
|
|
|
16479
16545
|
from_layer: layer_ref.optional(),
|
|
16480
16546
|
/** @deprecated */
|
|
16481
16547
|
to_layer: layer_ref.optional(),
|
|
16482
|
-
layers:
|
|
16483
|
-
pcb_trace_id:
|
|
16484
|
-
net_is_assignable:
|
|
16485
|
-
net_assigned:
|
|
16548
|
+
layers: z83.array(layer_ref),
|
|
16549
|
+
pcb_trace_id: z83.string().optional(),
|
|
16550
|
+
net_is_assignable: z83.boolean().optional(),
|
|
16551
|
+
net_assigned: z83.boolean().optional()
|
|
16486
16552
|
}).describe("Defines a via on the PCB");
|
|
16487
16553
|
expectTypesMatch(true);
|
|
16488
|
-
var pcb_board =
|
|
16489
|
-
type:
|
|
16554
|
+
var pcb_board = z84.object({
|
|
16555
|
+
type: z84.literal("pcb_board"),
|
|
16490
16556
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
16491
|
-
pcb_panel_id:
|
|
16492
|
-
is_subcircuit:
|
|
16493
|
-
subcircuit_id:
|
|
16557
|
+
pcb_panel_id: z84.string().optional(),
|
|
16558
|
+
is_subcircuit: z84.boolean().optional(),
|
|
16559
|
+
subcircuit_id: z84.string().optional(),
|
|
16494
16560
|
width: length.optional(),
|
|
16495
16561
|
height: length.optional(),
|
|
16496
16562
|
center: point,
|
|
16497
16563
|
thickness: length.optional().default(1.4),
|
|
16498
|
-
num_layers:
|
|
16499
|
-
outline:
|
|
16500
|
-
shape:
|
|
16501
|
-
material:
|
|
16564
|
+
num_layers: z84.number().optional().default(4),
|
|
16565
|
+
outline: z84.array(point).optional(),
|
|
16566
|
+
shape: z84.enum(["rect", "polygon"]).optional(),
|
|
16567
|
+
material: z84.enum(["fr4", "fr1"]).default("fr4")
|
|
16502
16568
|
}).describe("Defines the board outline of the PCB");
|
|
16503
16569
|
expectTypesMatch(true);
|
|
16504
|
-
var pcb_panel =
|
|
16505
|
-
type:
|
|
16570
|
+
var pcb_panel = z85.object({
|
|
16571
|
+
type: z85.literal("pcb_panel"),
|
|
16506
16572
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
16507
16573
|
width: length,
|
|
16508
16574
|
height: length,
|
|
16509
|
-
|
|
16575
|
+
center: point,
|
|
16576
|
+
covered_with_solder_mask: z85.boolean().optional().default(true)
|
|
16510
16577
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
16511
16578
|
expectTypesMatch(true);
|
|
16512
|
-
var pcb_placement_error =
|
|
16513
|
-
type:
|
|
16579
|
+
var pcb_placement_error = z86.object({
|
|
16580
|
+
type: z86.literal("pcb_placement_error"),
|
|
16514
16581
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
16515
|
-
error_type:
|
|
16516
|
-
message:
|
|
16517
|
-
subcircuit_id:
|
|
16582
|
+
error_type: z86.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
16583
|
+
message: z86.string(),
|
|
16584
|
+
subcircuit_id: z86.string().optional()
|
|
16518
16585
|
}).describe("Defines a placement error on the PCB");
|
|
16519
16586
|
expectTypesMatch(true);
|
|
16520
|
-
var pcb_trace_hint =
|
|
16521
|
-
type:
|
|
16587
|
+
var pcb_trace_hint = z87.object({
|
|
16588
|
+
type: z87.literal("pcb_trace_hint"),
|
|
16522
16589
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
16523
|
-
pcb_port_id:
|
|
16524
|
-
pcb_component_id:
|
|
16525
|
-
route:
|
|
16526
|
-
subcircuit_id:
|
|
16590
|
+
pcb_port_id: z87.string(),
|
|
16591
|
+
pcb_component_id: z87.string(),
|
|
16592
|
+
route: z87.array(route_hint_point),
|
|
16593
|
+
subcircuit_id: z87.string().optional()
|
|
16527
16594
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
16528
16595
|
expectTypesMatch(true);
|
|
16529
|
-
var pcb_silkscreen_line =
|
|
16530
|
-
type:
|
|
16596
|
+
var pcb_silkscreen_line = z88.object({
|
|
16597
|
+
type: z88.literal("pcb_silkscreen_line"),
|
|
16531
16598
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
16532
|
-
pcb_component_id:
|
|
16533
|
-
pcb_group_id:
|
|
16534
|
-
subcircuit_id:
|
|
16599
|
+
pcb_component_id: z88.string(),
|
|
16600
|
+
pcb_group_id: z88.string().optional(),
|
|
16601
|
+
subcircuit_id: z88.string().optional(),
|
|
16535
16602
|
stroke_width: distance.default("0.1mm"),
|
|
16536
16603
|
x1: distance,
|
|
16537
16604
|
y1: distance,
|
|
@@ -16540,28 +16607,28 @@ var pcb_silkscreen_line = z87.object({
|
|
|
16540
16607
|
layer: visible_layer
|
|
16541
16608
|
}).describe("Defines a silkscreen line on the PCB");
|
|
16542
16609
|
expectTypesMatch(true);
|
|
16543
|
-
var pcb_silkscreen_path =
|
|
16544
|
-
type:
|
|
16610
|
+
var pcb_silkscreen_path = z89.object({
|
|
16611
|
+
type: z89.literal("pcb_silkscreen_path"),
|
|
16545
16612
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
16546
|
-
pcb_component_id:
|
|
16547
|
-
pcb_group_id:
|
|
16548
|
-
subcircuit_id:
|
|
16613
|
+
pcb_component_id: z89.string(),
|
|
16614
|
+
pcb_group_id: z89.string().optional(),
|
|
16615
|
+
subcircuit_id: z89.string().optional(),
|
|
16549
16616
|
layer: visible_layer,
|
|
16550
|
-
route:
|
|
16617
|
+
route: z89.array(point),
|
|
16551
16618
|
stroke_width: length
|
|
16552
16619
|
}).describe("Defines a silkscreen path on the PCB");
|
|
16553
16620
|
expectTypesMatch(true);
|
|
16554
|
-
var pcb_silkscreen_text =
|
|
16555
|
-
type:
|
|
16621
|
+
var pcb_silkscreen_text = z90.object({
|
|
16622
|
+
type: z90.literal("pcb_silkscreen_text"),
|
|
16556
16623
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
16557
|
-
pcb_group_id:
|
|
16558
|
-
subcircuit_id:
|
|
16559
|
-
font:
|
|
16624
|
+
pcb_group_id: z90.string().optional(),
|
|
16625
|
+
subcircuit_id: z90.string().optional(),
|
|
16626
|
+
font: z90.literal("tscircuit2024").default("tscircuit2024"),
|
|
16560
16627
|
font_size: distance.default("0.2mm"),
|
|
16561
|
-
pcb_component_id:
|
|
16562
|
-
text:
|
|
16563
|
-
is_knockout:
|
|
16564
|
-
knockout_padding:
|
|
16628
|
+
pcb_component_id: z90.string(),
|
|
16629
|
+
text: z90.string(),
|
|
16630
|
+
is_knockout: z90.boolean().default(false).optional(),
|
|
16631
|
+
knockout_padding: z90.object({
|
|
16565
16632
|
left: length,
|
|
16566
16633
|
top: length,
|
|
16567
16634
|
bottom: length,
|
|
@@ -16572,24 +16639,24 @@ var pcb_silkscreen_text = z89.object({
|
|
|
16572
16639
|
bottom: "0.2mm",
|
|
16573
16640
|
right: "0.2mm"
|
|
16574
16641
|
}).optional(),
|
|
16575
|
-
ccw_rotation:
|
|
16642
|
+
ccw_rotation: z90.number().optional(),
|
|
16576
16643
|
layer: layer_ref,
|
|
16577
|
-
is_mirrored:
|
|
16644
|
+
is_mirrored: z90.boolean().default(false).optional(),
|
|
16578
16645
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16579
16646
|
anchor_alignment: ninePointAnchor.default("center")
|
|
16580
16647
|
}).describe("Defines silkscreen text on the PCB");
|
|
16581
16648
|
expectTypesMatch(true);
|
|
16582
|
-
var pcb_copper_text =
|
|
16583
|
-
type:
|
|
16649
|
+
var pcb_copper_text = z91.object({
|
|
16650
|
+
type: z91.literal("pcb_copper_text"),
|
|
16584
16651
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
16585
|
-
pcb_group_id:
|
|
16586
|
-
subcircuit_id:
|
|
16587
|
-
font:
|
|
16652
|
+
pcb_group_id: z91.string().optional(),
|
|
16653
|
+
subcircuit_id: z91.string().optional(),
|
|
16654
|
+
font: z91.literal("tscircuit2024").default("tscircuit2024"),
|
|
16588
16655
|
font_size: distance.default("0.2mm"),
|
|
16589
|
-
pcb_component_id:
|
|
16590
|
-
text:
|
|
16591
|
-
is_knockout:
|
|
16592
|
-
knockout_padding:
|
|
16656
|
+
pcb_component_id: z91.string(),
|
|
16657
|
+
text: z91.string(),
|
|
16658
|
+
is_knockout: z91.boolean().default(false).optional(),
|
|
16659
|
+
knockout_padding: z91.object({
|
|
16593
16660
|
left: length,
|
|
16594
16661
|
top: length,
|
|
16595
16662
|
bottom: length,
|
|
@@ -16600,271 +16667,271 @@ var pcb_copper_text = z90.object({
|
|
|
16600
16667
|
bottom: "0.2mm",
|
|
16601
16668
|
right: "0.2mm"
|
|
16602
16669
|
}).optional(),
|
|
16603
|
-
ccw_rotation:
|
|
16670
|
+
ccw_rotation: z91.number().optional(),
|
|
16604
16671
|
layer: layer_ref,
|
|
16605
|
-
is_mirrored:
|
|
16672
|
+
is_mirrored: z91.boolean().default(false).optional(),
|
|
16606
16673
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16607
16674
|
anchor_alignment: ninePointAnchor.default("center")
|
|
16608
16675
|
}).describe("Defines copper text on the PCB");
|
|
16609
16676
|
expectTypesMatch(true);
|
|
16610
|
-
var pcb_silkscreen_rect =
|
|
16611
|
-
type:
|
|
16677
|
+
var pcb_silkscreen_rect = z92.object({
|
|
16678
|
+
type: z92.literal("pcb_silkscreen_rect"),
|
|
16612
16679
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
16613
|
-
pcb_component_id:
|
|
16614
|
-
pcb_group_id:
|
|
16615
|
-
subcircuit_id:
|
|
16680
|
+
pcb_component_id: z92.string(),
|
|
16681
|
+
pcb_group_id: z92.string().optional(),
|
|
16682
|
+
subcircuit_id: z92.string().optional(),
|
|
16616
16683
|
center: point,
|
|
16617
16684
|
width: length,
|
|
16618
16685
|
height: length,
|
|
16619
16686
|
layer: layer_ref,
|
|
16620
16687
|
stroke_width: length.default("1mm"),
|
|
16621
16688
|
corner_radius: length.optional(),
|
|
16622
|
-
is_filled:
|
|
16623
|
-
has_stroke:
|
|
16624
|
-
is_stroke_dashed:
|
|
16689
|
+
is_filled: z92.boolean().default(true).optional(),
|
|
16690
|
+
has_stroke: z92.boolean().optional(),
|
|
16691
|
+
is_stroke_dashed: z92.boolean().optional()
|
|
16625
16692
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
16626
16693
|
expectTypesMatch(true);
|
|
16627
|
-
var pcb_silkscreen_circle =
|
|
16628
|
-
type:
|
|
16694
|
+
var pcb_silkscreen_circle = z93.object({
|
|
16695
|
+
type: z93.literal("pcb_silkscreen_circle"),
|
|
16629
16696
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
16630
16697
|
"pcb_silkscreen_circle"
|
|
16631
16698
|
),
|
|
16632
|
-
pcb_component_id:
|
|
16633
|
-
pcb_group_id:
|
|
16634
|
-
subcircuit_id:
|
|
16699
|
+
pcb_component_id: z93.string(),
|
|
16700
|
+
pcb_group_id: z93.string().optional(),
|
|
16701
|
+
subcircuit_id: z93.string().optional(),
|
|
16635
16702
|
center: point,
|
|
16636
16703
|
radius: length,
|
|
16637
16704
|
layer: visible_layer,
|
|
16638
16705
|
stroke_width: length.default("1mm")
|
|
16639
16706
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
16640
16707
|
expectTypesMatch(true);
|
|
16641
|
-
var pcb_silkscreen_oval =
|
|
16642
|
-
type:
|
|
16708
|
+
var pcb_silkscreen_oval = z94.object({
|
|
16709
|
+
type: z94.literal("pcb_silkscreen_oval"),
|
|
16643
16710
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
16644
|
-
pcb_component_id:
|
|
16645
|
-
pcb_group_id:
|
|
16646
|
-
subcircuit_id:
|
|
16711
|
+
pcb_component_id: z94.string(),
|
|
16712
|
+
pcb_group_id: z94.string().optional(),
|
|
16713
|
+
subcircuit_id: z94.string().optional(),
|
|
16647
16714
|
center: point,
|
|
16648
16715
|
radius_x: distance,
|
|
16649
16716
|
radius_y: distance,
|
|
16650
16717
|
layer: visible_layer
|
|
16651
16718
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
16652
16719
|
expectTypesMatch(true);
|
|
16653
|
-
var pcb_fabrication_note_text =
|
|
16654
|
-
type:
|
|
16720
|
+
var pcb_fabrication_note_text = z95.object({
|
|
16721
|
+
type: z95.literal("pcb_fabrication_note_text"),
|
|
16655
16722
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
16656
16723
|
"pcb_fabrication_note_text"
|
|
16657
16724
|
),
|
|
16658
|
-
subcircuit_id:
|
|
16659
|
-
pcb_group_id:
|
|
16660
|
-
font:
|
|
16725
|
+
subcircuit_id: z95.string().optional(),
|
|
16726
|
+
pcb_group_id: z95.string().optional(),
|
|
16727
|
+
font: z95.literal("tscircuit2024").default("tscircuit2024"),
|
|
16661
16728
|
font_size: distance.default("1mm"),
|
|
16662
|
-
pcb_component_id:
|
|
16663
|
-
text:
|
|
16729
|
+
pcb_component_id: z95.string(),
|
|
16730
|
+
text: z95.string(),
|
|
16664
16731
|
layer: visible_layer,
|
|
16665
16732
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16666
|
-
anchor_alignment:
|
|
16667
|
-
color:
|
|
16733
|
+
anchor_alignment: z95.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
16734
|
+
color: z95.string().optional()
|
|
16668
16735
|
}).describe(
|
|
16669
16736
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
16670
16737
|
);
|
|
16671
16738
|
expectTypesMatch(true);
|
|
16672
|
-
var pcb_fabrication_note_path =
|
|
16673
|
-
type:
|
|
16739
|
+
var pcb_fabrication_note_path = z96.object({
|
|
16740
|
+
type: z96.literal("pcb_fabrication_note_path"),
|
|
16674
16741
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
16675
16742
|
"pcb_fabrication_note_path"
|
|
16676
16743
|
),
|
|
16677
|
-
pcb_component_id:
|
|
16678
|
-
subcircuit_id:
|
|
16744
|
+
pcb_component_id: z96.string(),
|
|
16745
|
+
subcircuit_id: z96.string().optional(),
|
|
16679
16746
|
layer: layer_ref,
|
|
16680
|
-
route:
|
|
16747
|
+
route: z96.array(point),
|
|
16681
16748
|
stroke_width: length,
|
|
16682
|
-
color:
|
|
16749
|
+
color: z96.string().optional()
|
|
16683
16750
|
}).describe(
|
|
16684
16751
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
16685
16752
|
);
|
|
16686
16753
|
expectTypesMatch(true);
|
|
16687
|
-
var pcb_fabrication_note_rect =
|
|
16688
|
-
type:
|
|
16754
|
+
var pcb_fabrication_note_rect = z97.object({
|
|
16755
|
+
type: z97.literal("pcb_fabrication_note_rect"),
|
|
16689
16756
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
16690
16757
|
"pcb_fabrication_note_rect"
|
|
16691
16758
|
),
|
|
16692
|
-
pcb_component_id:
|
|
16693
|
-
pcb_group_id:
|
|
16694
|
-
subcircuit_id:
|
|
16759
|
+
pcb_component_id: z97.string(),
|
|
16760
|
+
pcb_group_id: z97.string().optional(),
|
|
16761
|
+
subcircuit_id: z97.string().optional(),
|
|
16695
16762
|
center: point,
|
|
16696
16763
|
width: length,
|
|
16697
16764
|
height: length,
|
|
16698
16765
|
layer: visible_layer,
|
|
16699
16766
|
stroke_width: length.default("0.1mm"),
|
|
16700
16767
|
corner_radius: length.optional(),
|
|
16701
|
-
is_filled:
|
|
16702
|
-
has_stroke:
|
|
16703
|
-
is_stroke_dashed:
|
|
16704
|
-
color:
|
|
16768
|
+
is_filled: z97.boolean().optional(),
|
|
16769
|
+
has_stroke: z97.boolean().optional(),
|
|
16770
|
+
is_stroke_dashed: z97.boolean().optional(),
|
|
16771
|
+
color: z97.string().optional()
|
|
16705
16772
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
16706
16773
|
expectTypesMatch(true);
|
|
16707
|
-
var pcb_fabrication_note_dimension =
|
|
16708
|
-
type:
|
|
16774
|
+
var pcb_fabrication_note_dimension = z98.object({
|
|
16775
|
+
type: z98.literal("pcb_fabrication_note_dimension"),
|
|
16709
16776
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
16710
16777
|
"pcb_fabrication_note_dimension"
|
|
16711
16778
|
),
|
|
16712
|
-
pcb_component_id:
|
|
16713
|
-
pcb_group_id:
|
|
16714
|
-
subcircuit_id:
|
|
16779
|
+
pcb_component_id: z98.string(),
|
|
16780
|
+
pcb_group_id: z98.string().optional(),
|
|
16781
|
+
subcircuit_id: z98.string().optional(),
|
|
16715
16782
|
layer: visible_layer,
|
|
16716
16783
|
from: point,
|
|
16717
16784
|
to: point,
|
|
16718
|
-
text:
|
|
16719
|
-
text_ccw_rotation:
|
|
16785
|
+
text: z98.string().optional(),
|
|
16786
|
+
text_ccw_rotation: z98.number().optional(),
|
|
16720
16787
|
offset: length.optional(),
|
|
16721
16788
|
offset_distance: length.optional(),
|
|
16722
|
-
offset_direction:
|
|
16723
|
-
x:
|
|
16724
|
-
y:
|
|
16789
|
+
offset_direction: z98.object({
|
|
16790
|
+
x: z98.number(),
|
|
16791
|
+
y: z98.number()
|
|
16725
16792
|
}).optional(),
|
|
16726
|
-
font:
|
|
16793
|
+
font: z98.literal("tscircuit2024").default("tscircuit2024"),
|
|
16727
16794
|
font_size: length.default("1mm"),
|
|
16728
|
-
color:
|
|
16795
|
+
color: z98.string().optional(),
|
|
16729
16796
|
arrow_size: length.default("1mm")
|
|
16730
16797
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
16731
16798
|
expectTypesMatch(true);
|
|
16732
|
-
var pcb_note_text =
|
|
16733
|
-
type:
|
|
16799
|
+
var pcb_note_text = z99.object({
|
|
16800
|
+
type: z99.literal("pcb_note_text"),
|
|
16734
16801
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
16735
|
-
pcb_component_id: z98.string().optional(),
|
|
16736
|
-
pcb_group_id: z98.string().optional(),
|
|
16737
|
-
subcircuit_id: z98.string().optional(),
|
|
16738
|
-
name: z98.string().optional(),
|
|
16739
|
-
font: z98.literal("tscircuit2024").default("tscircuit2024"),
|
|
16740
|
-
font_size: distance.default("1mm"),
|
|
16741
|
-
text: z98.string().optional(),
|
|
16742
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16743
|
-
anchor_alignment: z98.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
16744
|
-
color: z98.string().optional()
|
|
16745
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
16746
|
-
expectTypesMatch(true);
|
|
16747
|
-
var pcb_note_rect = z99.object({
|
|
16748
|
-
type: z99.literal("pcb_note_rect"),
|
|
16749
|
-
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
16750
16802
|
pcb_component_id: z99.string().optional(),
|
|
16751
16803
|
pcb_group_id: z99.string().optional(),
|
|
16752
16804
|
subcircuit_id: z99.string().optional(),
|
|
16753
16805
|
name: z99.string().optional(),
|
|
16806
|
+
font: z99.literal("tscircuit2024").default("tscircuit2024"),
|
|
16807
|
+
font_size: distance.default("1mm"),
|
|
16754
16808
|
text: z99.string().optional(),
|
|
16755
|
-
|
|
16756
|
-
|
|
16757
|
-
height: length,
|
|
16758
|
-
stroke_width: length.default("0.1mm"),
|
|
16759
|
-
corner_radius: length.optional(),
|
|
16760
|
-
is_filled: z99.boolean().optional(),
|
|
16761
|
-
has_stroke: z99.boolean().optional(),
|
|
16762
|
-
is_stroke_dashed: z99.boolean().optional(),
|
|
16809
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
16810
|
+
anchor_alignment: z99.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
16763
16811
|
color: z99.string().optional()
|
|
16764
|
-
}).describe("Defines a
|
|
16812
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
16765
16813
|
expectTypesMatch(true);
|
|
16766
|
-
var
|
|
16767
|
-
type: z100.literal("
|
|
16768
|
-
|
|
16814
|
+
var pcb_note_rect = z100.object({
|
|
16815
|
+
type: z100.literal("pcb_note_rect"),
|
|
16816
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
16769
16817
|
pcb_component_id: z100.string().optional(),
|
|
16770
16818
|
pcb_group_id: z100.string().optional(),
|
|
16771
16819
|
subcircuit_id: z100.string().optional(),
|
|
16772
16820
|
name: z100.string().optional(),
|
|
16773
16821
|
text: z100.string().optional(),
|
|
16774
|
-
|
|
16822
|
+
center: point,
|
|
16823
|
+
width: length,
|
|
16824
|
+
height: length,
|
|
16775
16825
|
stroke_width: length.default("0.1mm"),
|
|
16826
|
+
corner_radius: length.optional(),
|
|
16827
|
+
is_filled: z100.boolean().optional(),
|
|
16828
|
+
has_stroke: z100.boolean().optional(),
|
|
16829
|
+
is_stroke_dashed: z100.boolean().optional(),
|
|
16776
16830
|
color: z100.string().optional()
|
|
16777
|
-
}).describe("Defines a
|
|
16831
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
16778
16832
|
expectTypesMatch(true);
|
|
16779
|
-
var
|
|
16780
|
-
type: z101.literal("
|
|
16781
|
-
|
|
16833
|
+
var pcb_note_path = z101.object({
|
|
16834
|
+
type: z101.literal("pcb_note_path"),
|
|
16835
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
16782
16836
|
pcb_component_id: z101.string().optional(),
|
|
16783
16837
|
pcb_group_id: z101.string().optional(),
|
|
16784
16838
|
subcircuit_id: z101.string().optional(),
|
|
16785
16839
|
name: z101.string().optional(),
|
|
16786
16840
|
text: z101.string().optional(),
|
|
16841
|
+
route: z101.array(point),
|
|
16842
|
+
stroke_width: length.default("0.1mm"),
|
|
16843
|
+
color: z101.string().optional()
|
|
16844
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
16845
|
+
expectTypesMatch(true);
|
|
16846
|
+
var pcb_note_line = z102.object({
|
|
16847
|
+
type: z102.literal("pcb_note_line"),
|
|
16848
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
16849
|
+
pcb_component_id: z102.string().optional(),
|
|
16850
|
+
pcb_group_id: z102.string().optional(),
|
|
16851
|
+
subcircuit_id: z102.string().optional(),
|
|
16852
|
+
name: z102.string().optional(),
|
|
16853
|
+
text: z102.string().optional(),
|
|
16787
16854
|
x1: distance,
|
|
16788
16855
|
y1: distance,
|
|
16789
16856
|
x2: distance,
|
|
16790
16857
|
y2: distance,
|
|
16791
16858
|
stroke_width: distance.default("0.1mm"),
|
|
16792
|
-
color:
|
|
16793
|
-
is_dashed:
|
|
16859
|
+
color: z102.string().optional(),
|
|
16860
|
+
is_dashed: z102.boolean().optional()
|
|
16794
16861
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
16795
16862
|
expectTypesMatch(true);
|
|
16796
|
-
var pcb_note_dimension =
|
|
16797
|
-
type:
|
|
16863
|
+
var pcb_note_dimension = z103.object({
|
|
16864
|
+
type: z103.literal("pcb_note_dimension"),
|
|
16798
16865
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
16799
|
-
pcb_component_id:
|
|
16800
|
-
pcb_group_id:
|
|
16801
|
-
subcircuit_id:
|
|
16802
|
-
name:
|
|
16866
|
+
pcb_component_id: z103.string().optional(),
|
|
16867
|
+
pcb_group_id: z103.string().optional(),
|
|
16868
|
+
subcircuit_id: z103.string().optional(),
|
|
16869
|
+
name: z103.string().optional(),
|
|
16803
16870
|
from: point,
|
|
16804
16871
|
to: point,
|
|
16805
|
-
text:
|
|
16806
|
-
text_ccw_rotation:
|
|
16872
|
+
text: z103.string().optional(),
|
|
16873
|
+
text_ccw_rotation: z103.number().optional(),
|
|
16807
16874
|
offset_distance: length.optional(),
|
|
16808
|
-
offset_direction:
|
|
16809
|
-
x:
|
|
16810
|
-
y:
|
|
16875
|
+
offset_direction: z103.object({
|
|
16876
|
+
x: z103.number(),
|
|
16877
|
+
y: z103.number()
|
|
16811
16878
|
}).optional(),
|
|
16812
|
-
font:
|
|
16879
|
+
font: z103.literal("tscircuit2024").default("tscircuit2024"),
|
|
16813
16880
|
font_size: length.default("1mm"),
|
|
16814
|
-
color:
|
|
16881
|
+
color: z103.string().optional(),
|
|
16815
16882
|
arrow_size: length.default("1mm")
|
|
16816
16883
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
16817
16884
|
expectTypesMatch(true);
|
|
16818
|
-
var pcb_footprint_overlap_error =
|
|
16819
|
-
type:
|
|
16885
|
+
var pcb_footprint_overlap_error = z104.object({
|
|
16886
|
+
type: z104.literal("pcb_footprint_overlap_error"),
|
|
16820
16887
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
16821
|
-
error_type:
|
|
16822
|
-
message:
|
|
16823
|
-
pcb_smtpad_ids:
|
|
16824
|
-
pcb_plated_hole_ids:
|
|
16825
|
-
pcb_hole_ids:
|
|
16826
|
-
pcb_keepout_ids:
|
|
16888
|
+
error_type: z104.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
16889
|
+
message: z104.string(),
|
|
16890
|
+
pcb_smtpad_ids: z104.array(z104.string()).optional(),
|
|
16891
|
+
pcb_plated_hole_ids: z104.array(z104.string()).optional(),
|
|
16892
|
+
pcb_hole_ids: z104.array(z104.string()).optional(),
|
|
16893
|
+
pcb_keepout_ids: z104.array(z104.string()).optional()
|
|
16827
16894
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
16828
16895
|
expectTypesMatch(
|
|
16829
16896
|
true
|
|
16830
16897
|
);
|
|
16831
|
-
var pcb_keepout =
|
|
16832
|
-
type:
|
|
16833
|
-
shape:
|
|
16834
|
-
pcb_group_id:
|
|
16835
|
-
subcircuit_id:
|
|
16898
|
+
var pcb_keepout = z105.object({
|
|
16899
|
+
type: z105.literal("pcb_keepout"),
|
|
16900
|
+
shape: z105.literal("rect"),
|
|
16901
|
+
pcb_group_id: z105.string().optional(),
|
|
16902
|
+
subcircuit_id: z105.string().optional(),
|
|
16836
16903
|
center: point,
|
|
16837
16904
|
width: distance,
|
|
16838
16905
|
height: distance,
|
|
16839
|
-
pcb_keepout_id:
|
|
16840
|
-
layers:
|
|
16906
|
+
pcb_keepout_id: z105.string(),
|
|
16907
|
+
layers: z105.array(z105.string()),
|
|
16841
16908
|
// Specify layers where the keepout applies
|
|
16842
|
-
description:
|
|
16909
|
+
description: z105.string().optional()
|
|
16843
16910
|
// Optional description of the keepout
|
|
16844
16911
|
}).or(
|
|
16845
|
-
|
|
16846
|
-
type:
|
|
16847
|
-
shape:
|
|
16848
|
-
pcb_group_id:
|
|
16849
|
-
subcircuit_id:
|
|
16912
|
+
z105.object({
|
|
16913
|
+
type: z105.literal("pcb_keepout"),
|
|
16914
|
+
shape: z105.literal("circle"),
|
|
16915
|
+
pcb_group_id: z105.string().optional(),
|
|
16916
|
+
subcircuit_id: z105.string().optional(),
|
|
16850
16917
|
center: point,
|
|
16851
16918
|
radius: distance,
|
|
16852
|
-
pcb_keepout_id:
|
|
16853
|
-
layers:
|
|
16919
|
+
pcb_keepout_id: z105.string(),
|
|
16920
|
+
layers: z105.array(z105.string()),
|
|
16854
16921
|
// Specify layers where the keepout applies
|
|
16855
|
-
description:
|
|
16922
|
+
description: z105.string().optional()
|
|
16856
16923
|
// Optional description of the keepout
|
|
16857
16924
|
})
|
|
16858
16925
|
);
|
|
16859
16926
|
expectTypesMatch(true);
|
|
16860
|
-
var pcb_cutout_base =
|
|
16861
|
-
type:
|
|
16927
|
+
var pcb_cutout_base = z106.object({
|
|
16928
|
+
type: z106.literal("pcb_cutout"),
|
|
16862
16929
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
16863
|
-
pcb_group_id:
|
|
16864
|
-
subcircuit_id:
|
|
16930
|
+
pcb_group_id: z106.string().optional(),
|
|
16931
|
+
subcircuit_id: z106.string().optional()
|
|
16865
16932
|
});
|
|
16866
16933
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
16867
|
-
shape:
|
|
16934
|
+
shape: z106.literal("rect"),
|
|
16868
16935
|
center: point,
|
|
16869
16936
|
width: length,
|
|
16870
16937
|
height: length,
|
|
@@ -16872,169 +16939,169 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
16872
16939
|
});
|
|
16873
16940
|
expectTypesMatch(true);
|
|
16874
16941
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
16875
|
-
shape:
|
|
16942
|
+
shape: z106.literal("circle"),
|
|
16876
16943
|
center: point,
|
|
16877
16944
|
radius: length
|
|
16878
16945
|
});
|
|
16879
16946
|
expectTypesMatch(true);
|
|
16880
16947
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
16881
|
-
shape:
|
|
16882
|
-
points:
|
|
16948
|
+
shape: z106.literal("polygon"),
|
|
16949
|
+
points: z106.array(point)
|
|
16883
16950
|
});
|
|
16884
16951
|
expectTypesMatch(true);
|
|
16885
|
-
var pcb_cutout =
|
|
16952
|
+
var pcb_cutout = z106.discriminatedUnion("shape", [
|
|
16886
16953
|
pcb_cutout_rect,
|
|
16887
16954
|
pcb_cutout_circle,
|
|
16888
16955
|
pcb_cutout_polygon
|
|
16889
16956
|
]).describe("Defines a cutout on the PCB, removing board material.");
|
|
16890
16957
|
expectTypesMatch(true);
|
|
16891
|
-
var pcb_missing_footprint_error =
|
|
16892
|
-
type:
|
|
16958
|
+
var pcb_missing_footprint_error = z107.object({
|
|
16959
|
+
type: z107.literal("pcb_missing_footprint_error"),
|
|
16893
16960
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
16894
16961
|
"pcb_missing_footprint_error"
|
|
16895
16962
|
),
|
|
16896
|
-
pcb_group_id:
|
|
16897
|
-
subcircuit_id:
|
|
16898
|
-
error_type:
|
|
16899
|
-
source_component_id:
|
|
16900
|
-
message:
|
|
16963
|
+
pcb_group_id: z107.string().optional(),
|
|
16964
|
+
subcircuit_id: z107.string().optional(),
|
|
16965
|
+
error_type: z107.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
16966
|
+
source_component_id: z107.string(),
|
|
16967
|
+
message: z107.string()
|
|
16901
16968
|
}).describe("Defines a missing footprint error on the PCB");
|
|
16902
16969
|
expectTypesMatch(
|
|
16903
16970
|
true
|
|
16904
16971
|
);
|
|
16905
|
-
var external_footprint_load_error =
|
|
16906
|
-
type:
|
|
16972
|
+
var external_footprint_load_error = z108.object({
|
|
16973
|
+
type: z108.literal("external_footprint_load_error"),
|
|
16907
16974
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
16908
16975
|
"external_footprint_load_error"
|
|
16909
16976
|
),
|
|
16910
|
-
pcb_component_id:
|
|
16911
|
-
source_component_id:
|
|
16912
|
-
pcb_group_id:
|
|
16913
|
-
subcircuit_id:
|
|
16914
|
-
footprinter_string:
|
|
16915
|
-
error_type:
|
|
16916
|
-
message:
|
|
16977
|
+
pcb_component_id: z108.string(),
|
|
16978
|
+
source_component_id: z108.string(),
|
|
16979
|
+
pcb_group_id: z108.string().optional(),
|
|
16980
|
+
subcircuit_id: z108.string().optional(),
|
|
16981
|
+
footprinter_string: z108.string().optional(),
|
|
16982
|
+
error_type: z108.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
16983
|
+
message: z108.string()
|
|
16917
16984
|
}).describe("Defines an error when an external footprint fails to load");
|
|
16918
16985
|
expectTypesMatch(true);
|
|
16919
|
-
var circuit_json_footprint_load_error =
|
|
16920
|
-
type:
|
|
16986
|
+
var circuit_json_footprint_load_error = z109.object({
|
|
16987
|
+
type: z109.literal("circuit_json_footprint_load_error"),
|
|
16921
16988
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
16922
16989
|
"circuit_json_footprint_load_error"
|
|
16923
16990
|
),
|
|
16924
|
-
pcb_component_id:
|
|
16925
|
-
source_component_id:
|
|
16926
|
-
pcb_group_id:
|
|
16927
|
-
subcircuit_id:
|
|
16928
|
-
error_type:
|
|
16929
|
-
message:
|
|
16930
|
-
circuit_json:
|
|
16991
|
+
pcb_component_id: z109.string(),
|
|
16992
|
+
source_component_id: z109.string(),
|
|
16993
|
+
pcb_group_id: z109.string().optional(),
|
|
16994
|
+
subcircuit_id: z109.string().optional(),
|
|
16995
|
+
error_type: z109.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
16996
|
+
message: z109.string(),
|
|
16997
|
+
circuit_json: z109.array(z109.any()).optional()
|
|
16931
16998
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
16932
16999
|
expectTypesMatch(true);
|
|
16933
|
-
var pcb_group =
|
|
16934
|
-
type:
|
|
17000
|
+
var pcb_group = z110.object({
|
|
17001
|
+
type: z110.literal("pcb_group"),
|
|
16935
17002
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
16936
|
-
source_group_id:
|
|
16937
|
-
is_subcircuit:
|
|
16938
|
-
subcircuit_id:
|
|
17003
|
+
source_group_id: z110.string(),
|
|
17004
|
+
is_subcircuit: z110.boolean().optional(),
|
|
17005
|
+
subcircuit_id: z110.string().optional(),
|
|
16939
17006
|
width: length.optional(),
|
|
16940
17007
|
height: length.optional(),
|
|
16941
17008
|
center: point,
|
|
16942
|
-
outline:
|
|
17009
|
+
outline: z110.array(point).optional(),
|
|
16943
17010
|
anchor_position: point.optional(),
|
|
16944
|
-
anchor_alignment:
|
|
16945
|
-
pcb_component_ids:
|
|
16946
|
-
child_layout_mode:
|
|
16947
|
-
name:
|
|
16948
|
-
description:
|
|
16949
|
-
layout_mode:
|
|
16950
|
-
autorouter_configuration:
|
|
17011
|
+
anchor_alignment: z110.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).optional(),
|
|
17012
|
+
pcb_component_ids: z110.array(z110.string()),
|
|
17013
|
+
child_layout_mode: z110.enum(["packed", "none"]).optional(),
|
|
17014
|
+
name: z110.string().optional(),
|
|
17015
|
+
description: z110.string().optional(),
|
|
17016
|
+
layout_mode: z110.string().optional(),
|
|
17017
|
+
autorouter_configuration: z110.object({
|
|
16951
17018
|
trace_clearance: length
|
|
16952
17019
|
}).optional(),
|
|
16953
|
-
autorouter_used_string:
|
|
17020
|
+
autorouter_used_string: z110.string().optional()
|
|
16954
17021
|
}).describe("Defines a group of components on the PCB");
|
|
16955
17022
|
expectTypesMatch(true);
|
|
16956
|
-
var pcb_autorouting_error =
|
|
16957
|
-
type:
|
|
17023
|
+
var pcb_autorouting_error = z111.object({
|
|
17024
|
+
type: z111.literal("pcb_autorouting_error"),
|
|
16958
17025
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
16959
|
-
error_type:
|
|
16960
|
-
message:
|
|
16961
|
-
subcircuit_id:
|
|
17026
|
+
error_type: z111.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
17027
|
+
message: z111.string(),
|
|
17028
|
+
subcircuit_id: z111.string().optional()
|
|
16962
17029
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
16963
17030
|
expectTypesMatch(true);
|
|
16964
|
-
var pcb_manual_edit_conflict_warning =
|
|
16965
|
-
type:
|
|
17031
|
+
var pcb_manual_edit_conflict_warning = z112.object({
|
|
17032
|
+
type: z112.literal("pcb_manual_edit_conflict_warning"),
|
|
16966
17033
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
16967
17034
|
"pcb_manual_edit_conflict_warning"
|
|
16968
17035
|
),
|
|
16969
|
-
warning_type:
|
|
16970
|
-
message:
|
|
16971
|
-
pcb_component_id:
|
|
16972
|
-
pcb_group_id:
|
|
16973
|
-
subcircuit_id:
|
|
16974
|
-
source_component_id:
|
|
17036
|
+
warning_type: z112.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
17037
|
+
message: z112.string(),
|
|
17038
|
+
pcb_component_id: z112.string(),
|
|
17039
|
+
pcb_group_id: z112.string().optional(),
|
|
17040
|
+
subcircuit_id: z112.string().optional(),
|
|
17041
|
+
source_component_id: z112.string()
|
|
16975
17042
|
}).describe(
|
|
16976
17043
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
16977
17044
|
);
|
|
16978
17045
|
expectTypesMatch(true);
|
|
16979
|
-
var pcb_breakout_point =
|
|
16980
|
-
type:
|
|
17046
|
+
var pcb_breakout_point = z113.object({
|
|
17047
|
+
type: z113.literal("pcb_breakout_point"),
|
|
16981
17048
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
16982
|
-
pcb_group_id:
|
|
16983
|
-
subcircuit_id:
|
|
16984
|
-
source_trace_id:
|
|
16985
|
-
source_port_id:
|
|
16986
|
-
source_net_id:
|
|
17049
|
+
pcb_group_id: z113.string(),
|
|
17050
|
+
subcircuit_id: z113.string().optional(),
|
|
17051
|
+
source_trace_id: z113.string().optional(),
|
|
17052
|
+
source_port_id: z113.string().optional(),
|
|
17053
|
+
source_net_id: z113.string().optional(),
|
|
16987
17054
|
x: distance,
|
|
16988
17055
|
y: distance
|
|
16989
17056
|
}).describe(
|
|
16990
17057
|
"Defines a routing target within a pcb_group for a source_trace or source_net"
|
|
16991
17058
|
);
|
|
16992
17059
|
expectTypesMatch(true);
|
|
16993
|
-
var pcb_ground_plane =
|
|
16994
|
-
type:
|
|
17060
|
+
var pcb_ground_plane = z114.object({
|
|
17061
|
+
type: z114.literal("pcb_ground_plane"),
|
|
16995
17062
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
16996
|
-
source_pcb_ground_plane_id:
|
|
16997
|
-
source_net_id:
|
|
16998
|
-
pcb_group_id:
|
|
16999
|
-
subcircuit_id:
|
|
17063
|
+
source_pcb_ground_plane_id: z114.string(),
|
|
17064
|
+
source_net_id: z114.string(),
|
|
17065
|
+
pcb_group_id: z114.string().optional(),
|
|
17066
|
+
subcircuit_id: z114.string().optional()
|
|
17000
17067
|
}).describe("Defines a ground plane on the PCB");
|
|
17001
17068
|
expectTypesMatch(true);
|
|
17002
|
-
var pcb_ground_plane_region =
|
|
17003
|
-
type:
|
|
17069
|
+
var pcb_ground_plane_region = z115.object({
|
|
17070
|
+
type: z115.literal("pcb_ground_plane_region"),
|
|
17004
17071
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
17005
17072
|
"pcb_ground_plane_region"
|
|
17006
17073
|
),
|
|
17007
|
-
pcb_ground_plane_id:
|
|
17008
|
-
pcb_group_id:
|
|
17009
|
-
subcircuit_id:
|
|
17074
|
+
pcb_ground_plane_id: z115.string(),
|
|
17075
|
+
pcb_group_id: z115.string().optional(),
|
|
17076
|
+
subcircuit_id: z115.string().optional(),
|
|
17010
17077
|
layer: layer_ref,
|
|
17011
|
-
points:
|
|
17078
|
+
points: z115.array(point)
|
|
17012
17079
|
}).describe("Defines a polygon region of a ground plane");
|
|
17013
17080
|
expectTypesMatch(true);
|
|
17014
|
-
var pcb_thermal_spoke =
|
|
17015
|
-
type:
|
|
17081
|
+
var pcb_thermal_spoke = z116.object({
|
|
17082
|
+
type: z116.literal("pcb_thermal_spoke"),
|
|
17016
17083
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
17017
|
-
pcb_ground_plane_id:
|
|
17018
|
-
shape:
|
|
17019
|
-
spoke_count:
|
|
17084
|
+
pcb_ground_plane_id: z116.string(),
|
|
17085
|
+
shape: z116.string(),
|
|
17086
|
+
spoke_count: z116.number(),
|
|
17020
17087
|
spoke_thickness: distance,
|
|
17021
17088
|
spoke_inner_diameter: distance,
|
|
17022
17089
|
spoke_outer_diameter: distance,
|
|
17023
|
-
pcb_plated_hole_id:
|
|
17024
|
-
subcircuit_id:
|
|
17090
|
+
pcb_plated_hole_id: z116.string().optional(),
|
|
17091
|
+
subcircuit_id: z116.string().optional()
|
|
17025
17092
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
17026
17093
|
expectTypesMatch(true);
|
|
17027
|
-
var pcb_copper_pour_base =
|
|
17028
|
-
type:
|
|
17094
|
+
var pcb_copper_pour_base = z117.object({
|
|
17095
|
+
type: z117.literal("pcb_copper_pour"),
|
|
17029
17096
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
17030
|
-
pcb_group_id:
|
|
17031
|
-
subcircuit_id:
|
|
17097
|
+
pcb_group_id: z117.string().optional(),
|
|
17098
|
+
subcircuit_id: z117.string().optional(),
|
|
17032
17099
|
layer: layer_ref,
|
|
17033
|
-
source_net_id:
|
|
17034
|
-
covered_with_solder_mask:
|
|
17100
|
+
source_net_id: z117.string().optional(),
|
|
17101
|
+
covered_with_solder_mask: z117.boolean().optional().default(true)
|
|
17035
17102
|
});
|
|
17036
17103
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
17037
|
-
shape:
|
|
17104
|
+
shape: z117.literal("rect"),
|
|
17038
17105
|
center: point,
|
|
17039
17106
|
width: length,
|
|
17040
17107
|
height: length,
|
|
@@ -17042,140 +17109,140 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
17042
17109
|
});
|
|
17043
17110
|
expectTypesMatch(true);
|
|
17044
17111
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
17045
|
-
shape:
|
|
17112
|
+
shape: z117.literal("brep"),
|
|
17046
17113
|
brep_shape
|
|
17047
17114
|
});
|
|
17048
17115
|
expectTypesMatch(true);
|
|
17049
17116
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
17050
|
-
shape:
|
|
17051
|
-
points:
|
|
17117
|
+
shape: z117.literal("polygon"),
|
|
17118
|
+
points: z117.array(point)
|
|
17052
17119
|
});
|
|
17053
17120
|
expectTypesMatch(true);
|
|
17054
|
-
var pcb_copper_pour =
|
|
17121
|
+
var pcb_copper_pour = z117.discriminatedUnion("shape", [
|
|
17055
17122
|
pcb_copper_pour_rect,
|
|
17056
17123
|
pcb_copper_pour_brep,
|
|
17057
17124
|
pcb_copper_pour_polygon
|
|
17058
17125
|
]).describe("Defines a copper pour on the PCB.");
|
|
17059
17126
|
expectTypesMatch(true);
|
|
17060
|
-
var pcb_component_outside_board_error =
|
|
17061
|
-
type:
|
|
17127
|
+
var pcb_component_outside_board_error = z118.object({
|
|
17128
|
+
type: z118.literal("pcb_component_outside_board_error"),
|
|
17062
17129
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
17063
17130
|
"pcb_component_outside_board_error"
|
|
17064
17131
|
),
|
|
17065
|
-
error_type:
|
|
17066
|
-
message:
|
|
17067
|
-
pcb_component_id:
|
|
17068
|
-
pcb_board_id:
|
|
17132
|
+
error_type: z118.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
17133
|
+
message: z118.string(),
|
|
17134
|
+
pcb_component_id: z118.string(),
|
|
17135
|
+
pcb_board_id: z118.string(),
|
|
17069
17136
|
component_center: point,
|
|
17070
|
-
component_bounds:
|
|
17071
|
-
min_x:
|
|
17072
|
-
max_x:
|
|
17073
|
-
min_y:
|
|
17074
|
-
max_y:
|
|
17137
|
+
component_bounds: z118.object({
|
|
17138
|
+
min_x: z118.number(),
|
|
17139
|
+
max_x: z118.number(),
|
|
17140
|
+
min_y: z118.number(),
|
|
17141
|
+
max_y: z118.number()
|
|
17075
17142
|
}),
|
|
17076
|
-
subcircuit_id:
|
|
17077
|
-
source_component_id:
|
|
17143
|
+
subcircuit_id: z118.string().optional(),
|
|
17144
|
+
source_component_id: z118.string().optional()
|
|
17078
17145
|
}).describe(
|
|
17079
17146
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
17080
17147
|
);
|
|
17081
17148
|
expectTypesMatch(true);
|
|
17082
|
-
var pcb_component_invalid_layer_error =
|
|
17083
|
-
type:
|
|
17149
|
+
var pcb_component_invalid_layer_error = z119.object({
|
|
17150
|
+
type: z119.literal("pcb_component_invalid_layer_error"),
|
|
17084
17151
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
17085
17152
|
"pcb_component_invalid_layer_error"
|
|
17086
17153
|
),
|
|
17087
|
-
error_type:
|
|
17088
|
-
message:
|
|
17089
|
-
pcb_component_id:
|
|
17090
|
-
source_component_id:
|
|
17154
|
+
error_type: z119.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
17155
|
+
message: z119.string(),
|
|
17156
|
+
pcb_component_id: z119.string().optional(),
|
|
17157
|
+
source_component_id: z119.string(),
|
|
17091
17158
|
layer: layer_ref,
|
|
17092
|
-
subcircuit_id:
|
|
17159
|
+
subcircuit_id: z119.string().optional()
|
|
17093
17160
|
}).describe(
|
|
17094
17161
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
17095
17162
|
);
|
|
17096
17163
|
expectTypesMatch(true);
|
|
17097
|
-
var pcb_via_clearance_error =
|
|
17098
|
-
type:
|
|
17164
|
+
var pcb_via_clearance_error = z120.object({
|
|
17165
|
+
type: z120.literal("pcb_via_clearance_error"),
|
|
17099
17166
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
17100
|
-
error_type:
|
|
17101
|
-
message:
|
|
17102
|
-
pcb_via_ids:
|
|
17167
|
+
error_type: z120.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
17168
|
+
message: z120.string(),
|
|
17169
|
+
pcb_via_ids: z120.array(z120.string()).min(2),
|
|
17103
17170
|
minimum_clearance: distance.optional(),
|
|
17104
17171
|
actual_clearance: distance.optional(),
|
|
17105
|
-
pcb_center:
|
|
17106
|
-
x:
|
|
17107
|
-
y:
|
|
17172
|
+
pcb_center: z120.object({
|
|
17173
|
+
x: z120.number().optional(),
|
|
17174
|
+
y: z120.number().optional()
|
|
17108
17175
|
}).optional(),
|
|
17109
|
-
subcircuit_id:
|
|
17176
|
+
subcircuit_id: z120.string().optional()
|
|
17110
17177
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
17111
17178
|
expectTypesMatch(true);
|
|
17112
|
-
var pcb_courtyard_rect =
|
|
17113
|
-
type:
|
|
17179
|
+
var pcb_courtyard_rect = z121.object({
|
|
17180
|
+
type: z121.literal("pcb_courtyard_rect"),
|
|
17114
17181
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
17115
|
-
pcb_component_id:
|
|
17116
|
-
pcb_group_id:
|
|
17117
|
-
subcircuit_id:
|
|
17182
|
+
pcb_component_id: z121.string(),
|
|
17183
|
+
pcb_group_id: z121.string().optional(),
|
|
17184
|
+
subcircuit_id: z121.string().optional(),
|
|
17118
17185
|
center: point,
|
|
17119
17186
|
width: length,
|
|
17120
17187
|
height: length,
|
|
17121
17188
|
layer: visible_layer,
|
|
17122
|
-
color:
|
|
17189
|
+
color: z121.string().optional()
|
|
17123
17190
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
17124
17191
|
expectTypesMatch(true);
|
|
17125
|
-
var pcb_courtyard_outline =
|
|
17126
|
-
type:
|
|
17192
|
+
var pcb_courtyard_outline = z122.object({
|
|
17193
|
+
type: z122.literal("pcb_courtyard_outline"),
|
|
17127
17194
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
17128
17195
|
"pcb_courtyard_outline"
|
|
17129
17196
|
),
|
|
17130
|
-
pcb_component_id:
|
|
17131
|
-
pcb_group_id:
|
|
17132
|
-
subcircuit_id:
|
|
17197
|
+
pcb_component_id: z122.string(),
|
|
17198
|
+
pcb_group_id: z122.string().optional(),
|
|
17199
|
+
subcircuit_id: z122.string().optional(),
|
|
17133
17200
|
layer: visible_layer,
|
|
17134
|
-
outline:
|
|
17201
|
+
outline: z122.array(point).min(2),
|
|
17135
17202
|
stroke_width: length.default("0.1mm"),
|
|
17136
|
-
is_closed:
|
|
17137
|
-
is_stroke_dashed:
|
|
17138
|
-
color:
|
|
17203
|
+
is_closed: z122.boolean().optional(),
|
|
17204
|
+
is_stroke_dashed: z122.boolean().optional(),
|
|
17205
|
+
color: z122.string().optional()
|
|
17139
17206
|
}).describe("Defines a courtyard outline on the PCB");
|
|
17140
17207
|
expectTypesMatch(true);
|
|
17141
|
-
var pcb_courtyard_polygon =
|
|
17142
|
-
type:
|
|
17208
|
+
var pcb_courtyard_polygon = z123.object({
|
|
17209
|
+
type: z123.literal("pcb_courtyard_polygon"),
|
|
17143
17210
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
17144
17211
|
"pcb_courtyard_polygon"
|
|
17145
17212
|
),
|
|
17146
|
-
pcb_component_id:
|
|
17147
|
-
pcb_group_id:
|
|
17148
|
-
subcircuit_id:
|
|
17213
|
+
pcb_component_id: z123.string(),
|
|
17214
|
+
pcb_group_id: z123.string().optional(),
|
|
17215
|
+
subcircuit_id: z123.string().optional(),
|
|
17149
17216
|
layer: visible_layer,
|
|
17150
|
-
points:
|
|
17151
|
-
color:
|
|
17217
|
+
points: z123.array(point).min(3),
|
|
17218
|
+
color: z123.string().optional()
|
|
17152
17219
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
17153
17220
|
expectTypesMatch(true);
|
|
17154
|
-
var cad_component =
|
|
17155
|
-
type:
|
|
17156
|
-
cad_component_id:
|
|
17157
|
-
pcb_component_id:
|
|
17158
|
-
source_component_id:
|
|
17221
|
+
var cad_component = z124.object({
|
|
17222
|
+
type: z124.literal("cad_component"),
|
|
17223
|
+
cad_component_id: z124.string(),
|
|
17224
|
+
pcb_component_id: z124.string(),
|
|
17225
|
+
source_component_id: z124.string(),
|
|
17159
17226
|
position: point3,
|
|
17160
17227
|
rotation: point3.optional(),
|
|
17161
17228
|
size: point3.optional(),
|
|
17162
17229
|
layer: layer_ref.optional(),
|
|
17163
|
-
subcircuit_id:
|
|
17230
|
+
subcircuit_id: z124.string().optional(),
|
|
17164
17231
|
// These are all ways to generate/load the 3d model
|
|
17165
|
-
footprinter_string:
|
|
17166
|
-
model_obj_url:
|
|
17167
|
-
model_stl_url:
|
|
17168
|
-
model_3mf_url:
|
|
17169
|
-
model_gltf_url:
|
|
17170
|
-
model_glb_url:
|
|
17171
|
-
model_step_url:
|
|
17172
|
-
model_wrl_url:
|
|
17173
|
-
model_unit_to_mm_scale_factor:
|
|
17174
|
-
model_jscad:
|
|
17232
|
+
footprinter_string: z124.string().optional(),
|
|
17233
|
+
model_obj_url: z124.string().optional(),
|
|
17234
|
+
model_stl_url: z124.string().optional(),
|
|
17235
|
+
model_3mf_url: z124.string().optional(),
|
|
17236
|
+
model_gltf_url: z124.string().optional(),
|
|
17237
|
+
model_glb_url: z124.string().optional(),
|
|
17238
|
+
model_step_url: z124.string().optional(),
|
|
17239
|
+
model_wrl_url: z124.string().optional(),
|
|
17240
|
+
model_unit_to_mm_scale_factor: z124.number().optional(),
|
|
17241
|
+
model_jscad: z124.any().optional()
|
|
17175
17242
|
}).describe("Defines a component on the PCB");
|
|
17176
17243
|
expectTypesMatch(true);
|
|
17177
|
-
var wave_shape =
|
|
17178
|
-
var percentage =
|
|
17244
|
+
var wave_shape = z125.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
17245
|
+
var percentage = z125.union([z125.string(), z125.number()]).transform((val) => {
|
|
17179
17246
|
if (typeof val === "string") {
|
|
17180
17247
|
if (val.endsWith("%")) {
|
|
17181
17248
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17184,30 +17251,30 @@ var percentage = z124.union([z124.string(), z124.number()]).transform((val) => {
|
|
|
17184
17251
|
}
|
|
17185
17252
|
return val;
|
|
17186
17253
|
}).pipe(
|
|
17187
|
-
|
|
17254
|
+
z125.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
17188
17255
|
);
|
|
17189
|
-
var simulation_dc_voltage_source =
|
|
17190
|
-
type:
|
|
17256
|
+
var simulation_dc_voltage_source = z125.object({
|
|
17257
|
+
type: z125.literal("simulation_voltage_source"),
|
|
17191
17258
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
17192
17259
|
"simulation_voltage_source"
|
|
17193
17260
|
),
|
|
17194
|
-
is_dc_source:
|
|
17195
|
-
positive_source_port_id:
|
|
17196
|
-
negative_source_port_id:
|
|
17197
|
-
positive_source_net_id:
|
|
17198
|
-
negative_source_net_id:
|
|
17261
|
+
is_dc_source: z125.literal(true).optional().default(true),
|
|
17262
|
+
positive_source_port_id: z125.string().optional(),
|
|
17263
|
+
negative_source_port_id: z125.string().optional(),
|
|
17264
|
+
positive_source_net_id: z125.string().optional(),
|
|
17265
|
+
negative_source_net_id: z125.string().optional(),
|
|
17199
17266
|
voltage
|
|
17200
17267
|
}).describe("Defines a DC voltage source for simulation");
|
|
17201
|
-
var simulation_ac_voltage_source =
|
|
17202
|
-
type:
|
|
17268
|
+
var simulation_ac_voltage_source = z125.object({
|
|
17269
|
+
type: z125.literal("simulation_voltage_source"),
|
|
17203
17270
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
17204
17271
|
"simulation_voltage_source"
|
|
17205
17272
|
),
|
|
17206
|
-
is_dc_source:
|
|
17207
|
-
terminal1_source_port_id:
|
|
17208
|
-
terminal2_source_port_id:
|
|
17209
|
-
terminal1_source_net_id:
|
|
17210
|
-
terminal2_source_net_id:
|
|
17273
|
+
is_dc_source: z125.literal(false),
|
|
17274
|
+
terminal1_source_port_id: z125.string().optional(),
|
|
17275
|
+
terminal2_source_port_id: z125.string().optional(),
|
|
17276
|
+
terminal1_source_net_id: z125.string().optional(),
|
|
17277
|
+
terminal2_source_net_id: z125.string().optional(),
|
|
17211
17278
|
voltage: voltage.optional(),
|
|
17212
17279
|
frequency: frequency.optional(),
|
|
17213
17280
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -17215,64 +17282,63 @@ var simulation_ac_voltage_source = z124.object({
|
|
|
17215
17282
|
phase: rotation.optional(),
|
|
17216
17283
|
duty_cycle: percentage.optional()
|
|
17217
17284
|
}).describe("Defines an AC voltage source for simulation");
|
|
17218
|
-
var simulation_voltage_source =
|
|
17285
|
+
var simulation_voltage_source = z125.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
17219
17286
|
expectTypesMatch(true);
|
|
17220
17287
|
expectTypesMatch(true);
|
|
17221
17288
|
expectTypesMatch(true);
|
|
17222
|
-
var experiment_type =
|
|
17223
|
-
|
|
17224
|
-
|
|
17225
|
-
|
|
17226
|
-
|
|
17289
|
+
var experiment_type = z126.union([
|
|
17290
|
+
z126.literal("spice_dc_sweep"),
|
|
17291
|
+
z126.literal("spice_dc_operating_point"),
|
|
17292
|
+
z126.literal("spice_transient_analysis"),
|
|
17293
|
+
z126.literal("spice_ac_analysis")
|
|
17227
17294
|
]);
|
|
17228
|
-
var simulation_experiment =
|
|
17229
|
-
type:
|
|
17295
|
+
var simulation_experiment = z126.object({
|
|
17296
|
+
type: z126.literal("simulation_experiment"),
|
|
17230
17297
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
17231
17298
|
"simulation_experiment"
|
|
17232
17299
|
),
|
|
17233
|
-
name:
|
|
17300
|
+
name: z126.string(),
|
|
17234
17301
|
experiment_type,
|
|
17235
17302
|
time_per_step: duration_ms.optional(),
|
|
17236
17303
|
start_time_ms: ms.optional(),
|
|
17237
17304
|
end_time_ms: ms.optional()
|
|
17238
17305
|
}).describe("Defines a simulation experiment configuration");
|
|
17239
17306
|
expectTypesMatch(true);
|
|
17240
|
-
var simulation_transient_voltage_graph =
|
|
17241
|
-
type:
|
|
17307
|
+
var simulation_transient_voltage_graph = z127.object({
|
|
17308
|
+
type: z127.literal("simulation_transient_voltage_graph"),
|
|
17242
17309
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
17243
17310
|
"simulation_transient_voltage_graph"
|
|
17244
17311
|
),
|
|
17245
|
-
simulation_experiment_id:
|
|
17246
|
-
timestamps_ms:
|
|
17247
|
-
voltage_levels:
|
|
17248
|
-
|
|
17249
|
-
|
|
17250
|
-
subcircuit_connectivity_map_key: z126.string().optional(),
|
|
17312
|
+
simulation_experiment_id: z127.string(),
|
|
17313
|
+
timestamps_ms: z127.array(z127.number()).optional(),
|
|
17314
|
+
voltage_levels: z127.array(z127.number()),
|
|
17315
|
+
source_component_id: z127.string().optional(),
|
|
17316
|
+
subcircuit_connectivity_map_key: z127.string().optional(),
|
|
17251
17317
|
time_per_step: duration_ms,
|
|
17252
17318
|
start_time_ms: ms,
|
|
17253
17319
|
end_time_ms: ms,
|
|
17254
|
-
name:
|
|
17320
|
+
name: z127.string().optional()
|
|
17255
17321
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
17256
17322
|
expectTypesMatch(true);
|
|
17257
|
-
var simulation_switch =
|
|
17258
|
-
type:
|
|
17323
|
+
var simulation_switch = z128.object({
|
|
17324
|
+
type: z128.literal("simulation_switch"),
|
|
17259
17325
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
17260
|
-
source_component_id:
|
|
17326
|
+
source_component_id: z128.string().optional(),
|
|
17261
17327
|
closes_at: ms.optional(),
|
|
17262
17328
|
opens_at: ms.optional(),
|
|
17263
|
-
starts_closed:
|
|
17329
|
+
starts_closed: z128.boolean().optional(),
|
|
17264
17330
|
switching_frequency: frequency.optional()
|
|
17265
17331
|
}).describe("Defines a switch for simulation timing control");
|
|
17266
17332
|
expectTypesMatch(true);
|
|
17267
|
-
var simulation_voltage_probe =
|
|
17268
|
-
type:
|
|
17333
|
+
var simulation_voltage_probe = z129.object({
|
|
17334
|
+
type: z129.literal("simulation_voltage_probe"),
|
|
17269
17335
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
17270
17336
|
"simulation_voltage_probe"
|
|
17271
17337
|
),
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
17275
|
-
subcircuit_id:
|
|
17338
|
+
source_component_id: z129.string().optional(),
|
|
17339
|
+
source_port_id: z129.string().optional(),
|
|
17340
|
+
source_net_id: z129.string().optional(),
|
|
17341
|
+
subcircuit_id: z129.string().optional()
|
|
17276
17342
|
}).describe(
|
|
17277
17343
|
"Defines a voltage probe for simulation, connected to a port or a net"
|
|
17278
17344
|
).refine(
|
|
@@ -17282,18 +17348,18 @@ var simulation_voltage_probe = z128.object({
|
|
|
17282
17348
|
}
|
|
17283
17349
|
);
|
|
17284
17350
|
expectTypesMatch(true);
|
|
17285
|
-
var simulation_unknown_experiment_error =
|
|
17286
|
-
type:
|
|
17351
|
+
var simulation_unknown_experiment_error = z130.object({
|
|
17352
|
+
type: z130.literal("simulation_unknown_experiment_error"),
|
|
17287
17353
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
17288
17354
|
"simulation_unknown_experiment_error"
|
|
17289
17355
|
),
|
|
17290
|
-
error_type:
|
|
17291
|
-
message:
|
|
17292
|
-
simulation_experiment_id:
|
|
17293
|
-
subcircuit_id:
|
|
17356
|
+
error_type: z130.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
17357
|
+
message: z130.string(),
|
|
17358
|
+
simulation_experiment_id: z130.string().optional(),
|
|
17359
|
+
subcircuit_id: z130.string().optional()
|
|
17294
17360
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
17295
17361
|
expectTypesMatch(true);
|
|
17296
|
-
var any_circuit_element =
|
|
17362
|
+
var any_circuit_element = z131.union([
|
|
17297
17363
|
source_trace,
|
|
17298
17364
|
source_port,
|
|
17299
17365
|
any_source_component,
|
|
@@ -17419,7 +17485,7 @@ import { z as z910 } from "zod";
|
|
|
17419
17485
|
import "zod";
|
|
17420
17486
|
import "zod";
|
|
17421
17487
|
import { z as z1210 } from "zod";
|
|
17422
|
-
import { z as
|
|
17488
|
+
import { z as z133 } from "zod";
|
|
17423
17489
|
import { z as z142 } from "zod";
|
|
17424
17490
|
import { z as z152 } from "zod";
|
|
17425
17491
|
import { z as z162 } from "zod";
|
|
@@ -17594,12 +17660,12 @@ function convertMilToMm(value) {
|
|
|
17594
17660
|
}
|
|
17595
17661
|
return Number(value);
|
|
17596
17662
|
}
|
|
17597
|
-
var lengthInMm =
|
|
17598
|
-
var extendDipDef = (newDefaults) =>
|
|
17599
|
-
fn:
|
|
17600
|
-
num_pins:
|
|
17601
|
-
wide:
|
|
17602
|
-
narrow:
|
|
17663
|
+
var lengthInMm = z132.union([z132.string(), z132.number()]).transform((val) => convertMilToMm(val));
|
|
17664
|
+
var extendDipDef = (newDefaults) => z132.object({
|
|
17665
|
+
fn: z132.string(),
|
|
17666
|
+
num_pins: z132.number().optional().default(6),
|
|
17667
|
+
wide: z132.boolean().optional(),
|
|
17668
|
+
narrow: z132.boolean().optional(),
|
|
17603
17669
|
w: lengthInMm.optional(),
|
|
17604
17670
|
p: lengthInMm.default(newDefaults.p ?? "2.54mm"),
|
|
17605
17671
|
id: lengthInMm.optional(),
|
|
@@ -19305,13 +19371,13 @@ var ms013 = (raw_params) => {
|
|
|
19305
19371
|
parameters
|
|
19306
19372
|
};
|
|
19307
19373
|
};
|
|
19308
|
-
var sot723_def =
|
|
19309
|
-
fn:
|
|
19310
|
-
num_pins:
|
|
19311
|
-
w:
|
|
19312
|
-
h:
|
|
19313
|
-
pl:
|
|
19314
|
-
pw:
|
|
19374
|
+
var sot723_def = z133.object({
|
|
19375
|
+
fn: z133.string(),
|
|
19376
|
+
num_pins: z133.literal(3).default(3),
|
|
19377
|
+
w: z133.string().default("1.2mm"),
|
|
19378
|
+
h: z133.string().default("1.2mm"),
|
|
19379
|
+
pl: z133.string().default("0.3mm"),
|
|
19380
|
+
pw: z133.string().default("0.32mm")
|
|
19315
19381
|
});
|
|
19316
19382
|
var sot723 = (raw_params) => {
|
|
19317
19383
|
const parameters = sot723_def.parse(raw_params);
|
|
@@ -24737,10 +24803,10 @@ var svgPathPoints = normalizeOnY([
|
|
|
24737
24803
|
]);
|
|
24738
24804
|
var DIP_PIN_HEIGHT = 5.47;
|
|
24739
24805
|
var heightAboveSurface = 0.5;
|
|
24740
|
-
var DipPinLeg = ({ x, y, z:
|
|
24806
|
+
var DipPinLeg = ({ x, y, z: z134 }) => {
|
|
24741
24807
|
const isRotated = x > 0;
|
|
24742
24808
|
return /* @__PURE__ */ jsxs(Fragment22, { children: [
|
|
24743
|
-
/* @__PURE__ */ jsx5(Translate, { offset: { x: x + 0.25 / 2, y, z:
|
|
24809
|
+
/* @__PURE__ */ jsx5(Translate, { offset: { x: x + 0.25 / 2, y, z: z134 }, children: /* @__PURE__ */ jsx5(Rotate, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx5(ExtrudeLinear, { height: 0.25, children: /* @__PURE__ */ jsx5(
|
|
24744
24810
|
Polygon,
|
|
24745
24811
|
{
|
|
24746
24812
|
points: svgPathPoints.slice().reverse().map((p) => [p.x, p.y])
|
|
@@ -24752,7 +24818,7 @@ var DipPinLeg = ({ x, y, z: z133 }) => {
|
|
|
24752
24818
|
offset: {
|
|
24753
24819
|
x,
|
|
24754
24820
|
y: y + (isRotated ? 1 : -1),
|
|
24755
|
-
z:
|
|
24821
|
+
z: z134
|
|
24756
24822
|
},
|
|
24757
24823
|
children: /* @__PURE__ */ jsx5(Rotate, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx5(ExtrudeLinear, { height: 2, children: /* @__PURE__ */ jsx5(
|
|
24758
24824
|
Polygon,
|
|
@@ -28175,7 +28241,7 @@ import * as THREE15 from "three";
|
|
|
28175
28241
|
// package.json
|
|
28176
28242
|
var package_default = {
|
|
28177
28243
|
name: "@tscircuit/3d-viewer",
|
|
28178
|
-
version: "0.0.
|
|
28244
|
+
version: "0.0.435",
|
|
28179
28245
|
main: "./dist/index.js",
|
|
28180
28246
|
module: "./dist/index.js",
|
|
28181
28247
|
type: "module",
|
|
@@ -28236,7 +28302,7 @@ var package_default = {
|
|
|
28236
28302
|
"@vitejs/plugin-react": "^4.3.4",
|
|
28237
28303
|
"bun-match-svg": "^0.0.9",
|
|
28238
28304
|
"bun-types": "1.2.1",
|
|
28239
|
-
"circuit-json": "0.0.
|
|
28305
|
+
"circuit-json": "0.0.311",
|
|
28240
28306
|
"circuit-to-svg": "^0.0.179",
|
|
28241
28307
|
debug: "^4.4.0",
|
|
28242
28308
|
"jscad-electronics": "^0.0.89",
|
|
@@ -28340,11 +28406,11 @@ var CameraControllerProvider = ({ children, defaultTarget, initialCameraPosition
|
|
|
28340
28406
|
new THREE9.Euler(0, 0, 0)
|
|
28341
28407
|
);
|
|
28342
28408
|
const baseDistance = useMemo8(() => {
|
|
28343
|
-
const [x, y,
|
|
28409
|
+
const [x, y, z134] = initialCameraPosition ?? [5, -5, 5];
|
|
28344
28410
|
const distance2 = Math.hypot(
|
|
28345
28411
|
x - defaultTarget.x,
|
|
28346
28412
|
y - defaultTarget.y,
|
|
28347
|
-
|
|
28413
|
+
z134 - defaultTarget.z
|
|
28348
28414
|
);
|
|
28349
28415
|
return distance2 > 0 ? distance2 : 5;
|
|
28350
28416
|
}, [initialCameraPosition, defaultTarget]);
|
|
@@ -29426,27 +29492,40 @@ var createBoardGeomWithOutline = (board, depth = 1.2, options = {}) => {
|
|
|
29426
29492
|
|
|
29427
29493
|
// src/soup-to-3d/index.ts
|
|
29428
29494
|
var createSimplifiedBoardGeom = (circuitJson) => {
|
|
29429
|
-
const
|
|
29430
|
-
|
|
29431
|
-
|
|
29432
|
-
|
|
29495
|
+
const panels = circuitJson.filter(
|
|
29496
|
+
(e) => e.type === "pcb_panel"
|
|
29497
|
+
);
|
|
29498
|
+
const boards = su2(circuitJson).pcb_board.list();
|
|
29499
|
+
let boardOrPanel;
|
|
29500
|
+
let pcbThickness = 1.2;
|
|
29501
|
+
if (panels.length > 0) {
|
|
29502
|
+
boardOrPanel = panels[0];
|
|
29503
|
+
} else {
|
|
29504
|
+
const boardsNotInPanel = boards.filter(
|
|
29505
|
+
(b) => !b.pcb_panel_id
|
|
29506
|
+
);
|
|
29507
|
+
boardOrPanel = boardsNotInPanel[0];
|
|
29508
|
+
if (!boardOrPanel) {
|
|
29509
|
+
console.warn("No pcb_board or pcb_panel found for simplified geometry");
|
|
29510
|
+
return [];
|
|
29511
|
+
}
|
|
29512
|
+
pcbThickness = boardOrPanel.thickness ?? 1.2;
|
|
29433
29513
|
}
|
|
29434
29514
|
let boardGeom;
|
|
29435
|
-
|
|
29436
|
-
if (board.outline && board.outline.length > 0) {
|
|
29515
|
+
if ("outline" in boardOrPanel && boardOrPanel.outline && boardOrPanel.outline.length > 0) {
|
|
29437
29516
|
boardGeom = createBoardGeomWithOutline(
|
|
29438
29517
|
{
|
|
29439
|
-
outline:
|
|
29518
|
+
outline: boardOrPanel.outline
|
|
29440
29519
|
},
|
|
29441
29520
|
pcbThickness
|
|
29442
29521
|
);
|
|
29443
29522
|
} else {
|
|
29444
29523
|
boardGeom = (0, import_primitives2.cuboid)({
|
|
29445
|
-
size: [
|
|
29446
|
-
center: [
|
|
29524
|
+
size: [boardOrPanel.width ?? 10, boardOrPanel.height ?? 10, pcbThickness],
|
|
29525
|
+
center: [boardOrPanel.center.x, boardOrPanel.center.y, 0]
|
|
29447
29526
|
});
|
|
29448
29527
|
}
|
|
29449
|
-
const material = boardMaterialColors[
|
|
29528
|
+
const material = boardMaterialColors["material" in boardOrPanel ? boardOrPanel.material ?? "fr4" : "fr4"] ?? colors.fr4Green;
|
|
29450
29529
|
return [(0, import_colors.colorize)(material, boardGeom)];
|
|
29451
29530
|
};
|
|
29452
29531
|
var createBoardGeomFromCircuitJson = (circuitJson, opts = {}) => {
|
|
@@ -30535,7 +30614,27 @@ var BoardGeomBuilder = class {
|
|
|
30535
30614
|
constructor(circuitJson, onComplete) {
|
|
30536
30615
|
this.circuitJson = circuitJson;
|
|
30537
30616
|
this.onCompleteCallback = onComplete;
|
|
30538
|
-
|
|
30617
|
+
const panels = circuitJson.filter(
|
|
30618
|
+
(e) => e.type === "pcb_panel"
|
|
30619
|
+
);
|
|
30620
|
+
const boards = su3(circuitJson).pcb_board.list();
|
|
30621
|
+
if (panels.length > 0) {
|
|
30622
|
+
const panel = panels[0];
|
|
30623
|
+
this.board = {
|
|
30624
|
+
type: "pcb_board",
|
|
30625
|
+
pcb_board_id: panel.pcb_panel_id,
|
|
30626
|
+
center: panel.center,
|
|
30627
|
+
width: panel.width,
|
|
30628
|
+
height: panel.height,
|
|
30629
|
+
thickness: 1.6,
|
|
30630
|
+
// Default thickness
|
|
30631
|
+
material: "fr4",
|
|
30632
|
+
num_layers: 2
|
|
30633
|
+
};
|
|
30634
|
+
} else {
|
|
30635
|
+
const boardsNotInPanel = boards.filter((b) => !b.pcb_panel_id);
|
|
30636
|
+
this.board = boardsNotInPanel[0];
|
|
30637
|
+
}
|
|
30539
30638
|
this.plated_holes = su3(circuitJson).pcb_plated_hole.list();
|
|
30540
30639
|
this.holes = su3(circuitJson).pcb_hole.list();
|
|
30541
30640
|
this.pads = su3(circuitJson).pcb_smtpad.list();
|
|
@@ -31228,7 +31327,10 @@ var useBoardGeomBuilder = (circuitJson) => {
|
|
|
31228
31327
|
setBoardGeom(null);
|
|
31229
31328
|
return;
|
|
31230
31329
|
}
|
|
31231
|
-
|
|
31330
|
+
const hasBoardOrPanel = circuitJson.some(
|
|
31331
|
+
(e) => e.type === "pcb_board" || e.type === "pcb_panel"
|
|
31332
|
+
);
|
|
31333
|
+
if (!hasBoardOrPanel) {
|
|
31232
31334
|
setBoardGeom(null);
|
|
31233
31335
|
return;
|
|
31234
31336
|
}
|
|
@@ -33097,8 +33199,26 @@ var useManifoldBoardBuilder = (manifoldJSModule, circuitJson) => {
|
|
|
33097
33199
|
const [isLoading, setIsLoading] = useState15(true);
|
|
33098
33200
|
const manifoldInstancesForCleanup = useRef9([]);
|
|
33099
33201
|
const boardData = useMemo19(() => {
|
|
33202
|
+
const panels = circuitJson.filter(
|
|
33203
|
+
(e) => e.type === "pcb_panel"
|
|
33204
|
+
);
|
|
33100
33205
|
const boards = su14(circuitJson).pcb_board.list();
|
|
33101
|
-
|
|
33206
|
+
if (panels.length > 0) {
|
|
33207
|
+
const panel = panels[0];
|
|
33208
|
+
return {
|
|
33209
|
+
type: "pcb_board",
|
|
33210
|
+
pcb_board_id: panel.pcb_panel_id,
|
|
33211
|
+
center: panel.center,
|
|
33212
|
+
width: panel.width,
|
|
33213
|
+
height: panel.height,
|
|
33214
|
+
thickness: 1.6,
|
|
33215
|
+
// Default thickness
|
|
33216
|
+
material: "fr4",
|
|
33217
|
+
num_layers: 2
|
|
33218
|
+
};
|
|
33219
|
+
}
|
|
33220
|
+
const boardsNotInPanel = boards.filter((b) => !b.pcb_panel_id);
|
|
33221
|
+
return boardsNotInPanel.length > 0 ? boardsNotInPanel[0] : null;
|
|
33102
33222
|
}, [circuitJson]);
|
|
33103
33223
|
const isFauxBoard = useMemo19(() => {
|
|
33104
33224
|
const boards = su14(circuitJson).pcb_board.list();
|