jscad-electronics 0.0.1 → 0.0.2
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 +3 -7
- package/dist/index.js +209 -332
- package/package.json +7 -3
package/dist/index.d.ts
CHANGED
|
@@ -25,13 +25,14 @@ interface ChipBodyProps {
|
|
|
25
25
|
width: number;
|
|
26
26
|
length: number;
|
|
27
27
|
height: number;
|
|
28
|
+
heightAboveSurface?: number;
|
|
28
29
|
center: {
|
|
29
30
|
x: number;
|
|
30
31
|
y: number;
|
|
31
32
|
z: number;
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
|
-
declare const ChipBody: ({ center, width, length, height }: ChipBodyProps) => react_jsx_runtime.JSX.Element;
|
|
35
|
+
declare const ChipBody: ({ center, width, length, height, heightAboveSurface, }: ChipBodyProps) => react_jsx_runtime.JSX.Element;
|
|
35
36
|
|
|
36
37
|
declare const ExtrudedPads: ({ soup, footprint, }: {
|
|
37
38
|
soup?: AnySoupElement[];
|
|
@@ -85,11 +86,6 @@ interface SmdChipLeadProps {
|
|
|
85
86
|
*/
|
|
86
87
|
declare const SmdChipLead: (props: SmdChipLeadProps) => react_jsx_runtime.JSX.Element;
|
|
87
88
|
|
|
88
|
-
declare const Tssop20: ({ pinCount, fullWidth, }: {
|
|
89
|
-
pinCount: number;
|
|
90
|
-
fullWidth?: number;
|
|
91
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
92
|
-
|
|
93
89
|
declare const Tssop: ({ pinCount, fullWidth, }: {
|
|
94
90
|
pinCount: number;
|
|
95
91
|
fullWidth?: number;
|
|
@@ -110,4 +106,4 @@ declare const SOD123: ({ fullWidth, fullLength }: {
|
|
|
110
106
|
fullLength?: number | undefined;
|
|
111
107
|
}) => react_jsx_runtime.JSX.Element;
|
|
112
108
|
|
|
113
|
-
export { A0402, A0603, A0805, BGA, ChipBody, type ChipBodyProps, ExtrudedPads, FootprintPad, FootprintPlatedHole, Footprinter3d, QFN, QFP, SOD123, SOT233P, SOT563, SOT723, SmdChipLead, type SmdChipLeadProps, Tssop
|
|
109
|
+
export { A0402, A0603, A0805, BGA, ChipBody, type ChipBodyProps, ExtrudedPads, FootprintPad, FootprintPlatedHole, Footprinter3d, QFN, QFP, SOD123, SOT233P, SOT563, SOT723, SmdChipLead, type SmdChipLeadProps, Tssop };
|
package/dist/index.js
CHANGED
|
@@ -23704,10 +23704,10 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
23704
23704
|
return jsxWithValidation(type, props, key, false);
|
|
23705
23705
|
}
|
|
23706
23706
|
}
|
|
23707
|
-
var
|
|
23707
|
+
var jsx19 = jsxWithValidationDynamic;
|
|
23708
23708
|
var jsxs14 = jsxWithValidationStatic;
|
|
23709
23709
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
23710
|
-
exports.jsx =
|
|
23710
|
+
exports.jsx = jsx19;
|
|
23711
23711
|
exports.jsxs = jsxs14;
|
|
23712
23712
|
})();
|
|
23713
23713
|
}
|
|
@@ -24109,168 +24109,11 @@ var require_color_string = __commonJS({
|
|
|
24109
24109
|
}
|
|
24110
24110
|
});
|
|
24111
24111
|
|
|
24112
|
-
// node_modules/color
|
|
24113
|
-
var require_color_name2 = __commonJS({
|
|
24114
|
-
"node_modules/color/node_modules/color-name/index.js"(exports, module) {
|
|
24115
|
-
"use strict";
|
|
24116
|
-
module.exports = {
|
|
24117
|
-
"aliceblue": [240, 248, 255],
|
|
24118
|
-
"antiquewhite": [250, 235, 215],
|
|
24119
|
-
"aqua": [0, 255, 255],
|
|
24120
|
-
"aquamarine": [127, 255, 212],
|
|
24121
|
-
"azure": [240, 255, 255],
|
|
24122
|
-
"beige": [245, 245, 220],
|
|
24123
|
-
"bisque": [255, 228, 196],
|
|
24124
|
-
"black": [0, 0, 0],
|
|
24125
|
-
"blanchedalmond": [255, 235, 205],
|
|
24126
|
-
"blue": [0, 0, 255],
|
|
24127
|
-
"blueviolet": [138, 43, 226],
|
|
24128
|
-
"brown": [165, 42, 42],
|
|
24129
|
-
"burlywood": [222, 184, 135],
|
|
24130
|
-
"cadetblue": [95, 158, 160],
|
|
24131
|
-
"chartreuse": [127, 255, 0],
|
|
24132
|
-
"chocolate": [210, 105, 30],
|
|
24133
|
-
"coral": [255, 127, 80],
|
|
24134
|
-
"cornflowerblue": [100, 149, 237],
|
|
24135
|
-
"cornsilk": [255, 248, 220],
|
|
24136
|
-
"crimson": [220, 20, 60],
|
|
24137
|
-
"cyan": [0, 255, 255],
|
|
24138
|
-
"darkblue": [0, 0, 139],
|
|
24139
|
-
"darkcyan": [0, 139, 139],
|
|
24140
|
-
"darkgoldenrod": [184, 134, 11],
|
|
24141
|
-
"darkgray": [169, 169, 169],
|
|
24142
|
-
"darkgreen": [0, 100, 0],
|
|
24143
|
-
"darkgrey": [169, 169, 169],
|
|
24144
|
-
"darkkhaki": [189, 183, 107],
|
|
24145
|
-
"darkmagenta": [139, 0, 139],
|
|
24146
|
-
"darkolivegreen": [85, 107, 47],
|
|
24147
|
-
"darkorange": [255, 140, 0],
|
|
24148
|
-
"darkorchid": [153, 50, 204],
|
|
24149
|
-
"darkred": [139, 0, 0],
|
|
24150
|
-
"darksalmon": [233, 150, 122],
|
|
24151
|
-
"darkseagreen": [143, 188, 143],
|
|
24152
|
-
"darkslateblue": [72, 61, 139],
|
|
24153
|
-
"darkslategray": [47, 79, 79],
|
|
24154
|
-
"darkslategrey": [47, 79, 79],
|
|
24155
|
-
"darkturquoise": [0, 206, 209],
|
|
24156
|
-
"darkviolet": [148, 0, 211],
|
|
24157
|
-
"deeppink": [255, 20, 147],
|
|
24158
|
-
"deepskyblue": [0, 191, 255],
|
|
24159
|
-
"dimgray": [105, 105, 105],
|
|
24160
|
-
"dimgrey": [105, 105, 105],
|
|
24161
|
-
"dodgerblue": [30, 144, 255],
|
|
24162
|
-
"firebrick": [178, 34, 34],
|
|
24163
|
-
"floralwhite": [255, 250, 240],
|
|
24164
|
-
"forestgreen": [34, 139, 34],
|
|
24165
|
-
"fuchsia": [255, 0, 255],
|
|
24166
|
-
"gainsboro": [220, 220, 220],
|
|
24167
|
-
"ghostwhite": [248, 248, 255],
|
|
24168
|
-
"gold": [255, 215, 0],
|
|
24169
|
-
"goldenrod": [218, 165, 32],
|
|
24170
|
-
"gray": [128, 128, 128],
|
|
24171
|
-
"green": [0, 128, 0],
|
|
24172
|
-
"greenyellow": [173, 255, 47],
|
|
24173
|
-
"grey": [128, 128, 128],
|
|
24174
|
-
"honeydew": [240, 255, 240],
|
|
24175
|
-
"hotpink": [255, 105, 180],
|
|
24176
|
-
"indianred": [205, 92, 92],
|
|
24177
|
-
"indigo": [75, 0, 130],
|
|
24178
|
-
"ivory": [255, 255, 240],
|
|
24179
|
-
"khaki": [240, 230, 140],
|
|
24180
|
-
"lavender": [230, 230, 250],
|
|
24181
|
-
"lavenderblush": [255, 240, 245],
|
|
24182
|
-
"lawngreen": [124, 252, 0],
|
|
24183
|
-
"lemonchiffon": [255, 250, 205],
|
|
24184
|
-
"lightblue": [173, 216, 230],
|
|
24185
|
-
"lightcoral": [240, 128, 128],
|
|
24186
|
-
"lightcyan": [224, 255, 255],
|
|
24187
|
-
"lightgoldenrodyellow": [250, 250, 210],
|
|
24188
|
-
"lightgray": [211, 211, 211],
|
|
24189
|
-
"lightgreen": [144, 238, 144],
|
|
24190
|
-
"lightgrey": [211, 211, 211],
|
|
24191
|
-
"lightpink": [255, 182, 193],
|
|
24192
|
-
"lightsalmon": [255, 160, 122],
|
|
24193
|
-
"lightseagreen": [32, 178, 170],
|
|
24194
|
-
"lightskyblue": [135, 206, 250],
|
|
24195
|
-
"lightslategray": [119, 136, 153],
|
|
24196
|
-
"lightslategrey": [119, 136, 153],
|
|
24197
|
-
"lightsteelblue": [176, 196, 222],
|
|
24198
|
-
"lightyellow": [255, 255, 224],
|
|
24199
|
-
"lime": [0, 255, 0],
|
|
24200
|
-
"limegreen": [50, 205, 50],
|
|
24201
|
-
"linen": [250, 240, 230],
|
|
24202
|
-
"magenta": [255, 0, 255],
|
|
24203
|
-
"maroon": [128, 0, 0],
|
|
24204
|
-
"mediumaquamarine": [102, 205, 170],
|
|
24205
|
-
"mediumblue": [0, 0, 205],
|
|
24206
|
-
"mediumorchid": [186, 85, 211],
|
|
24207
|
-
"mediumpurple": [147, 112, 219],
|
|
24208
|
-
"mediumseagreen": [60, 179, 113],
|
|
24209
|
-
"mediumslateblue": [123, 104, 238],
|
|
24210
|
-
"mediumspringgreen": [0, 250, 154],
|
|
24211
|
-
"mediumturquoise": [72, 209, 204],
|
|
24212
|
-
"mediumvioletred": [199, 21, 133],
|
|
24213
|
-
"midnightblue": [25, 25, 112],
|
|
24214
|
-
"mintcream": [245, 255, 250],
|
|
24215
|
-
"mistyrose": [255, 228, 225],
|
|
24216
|
-
"moccasin": [255, 228, 181],
|
|
24217
|
-
"navajowhite": [255, 222, 173],
|
|
24218
|
-
"navy": [0, 0, 128],
|
|
24219
|
-
"oldlace": [253, 245, 230],
|
|
24220
|
-
"olive": [128, 128, 0],
|
|
24221
|
-
"olivedrab": [107, 142, 35],
|
|
24222
|
-
"orange": [255, 165, 0],
|
|
24223
|
-
"orangered": [255, 69, 0],
|
|
24224
|
-
"orchid": [218, 112, 214],
|
|
24225
|
-
"palegoldenrod": [238, 232, 170],
|
|
24226
|
-
"palegreen": [152, 251, 152],
|
|
24227
|
-
"paleturquoise": [175, 238, 238],
|
|
24228
|
-
"palevioletred": [219, 112, 147],
|
|
24229
|
-
"papayawhip": [255, 239, 213],
|
|
24230
|
-
"peachpuff": [255, 218, 185],
|
|
24231
|
-
"peru": [205, 133, 63],
|
|
24232
|
-
"pink": [255, 192, 203],
|
|
24233
|
-
"plum": [221, 160, 221],
|
|
24234
|
-
"powderblue": [176, 224, 230],
|
|
24235
|
-
"purple": [128, 0, 128],
|
|
24236
|
-
"rebeccapurple": [102, 51, 153],
|
|
24237
|
-
"red": [255, 0, 0],
|
|
24238
|
-
"rosybrown": [188, 143, 143],
|
|
24239
|
-
"royalblue": [65, 105, 225],
|
|
24240
|
-
"saddlebrown": [139, 69, 19],
|
|
24241
|
-
"salmon": [250, 128, 114],
|
|
24242
|
-
"sandybrown": [244, 164, 96],
|
|
24243
|
-
"seagreen": [46, 139, 87],
|
|
24244
|
-
"seashell": [255, 245, 238],
|
|
24245
|
-
"sienna": [160, 82, 45],
|
|
24246
|
-
"silver": [192, 192, 192],
|
|
24247
|
-
"skyblue": [135, 206, 235],
|
|
24248
|
-
"slateblue": [106, 90, 205],
|
|
24249
|
-
"slategray": [112, 128, 144],
|
|
24250
|
-
"slategrey": [112, 128, 144],
|
|
24251
|
-
"snow": [255, 250, 250],
|
|
24252
|
-
"springgreen": [0, 255, 127],
|
|
24253
|
-
"steelblue": [70, 130, 180],
|
|
24254
|
-
"tan": [210, 180, 140],
|
|
24255
|
-
"teal": [0, 128, 128],
|
|
24256
|
-
"thistle": [216, 191, 216],
|
|
24257
|
-
"tomato": [255, 99, 71],
|
|
24258
|
-
"turquoise": [64, 224, 208],
|
|
24259
|
-
"violet": [238, 130, 238],
|
|
24260
|
-
"wheat": [245, 222, 179],
|
|
24261
|
-
"white": [255, 255, 255],
|
|
24262
|
-
"whitesmoke": [245, 245, 245],
|
|
24263
|
-
"yellow": [255, 255, 0],
|
|
24264
|
-
"yellowgreen": [154, 205, 50]
|
|
24265
|
-
};
|
|
24266
|
-
}
|
|
24267
|
-
});
|
|
24268
|
-
|
|
24269
|
-
// node_modules/color/node_modules/color-convert/conversions.js
|
|
24112
|
+
// node_modules/color-convert/conversions.js
|
|
24270
24113
|
var require_conversions = __commonJS({
|
|
24271
|
-
"node_modules/color
|
|
24114
|
+
"node_modules/color-convert/conversions.js"(exports, module) {
|
|
24272
24115
|
"use strict";
|
|
24273
|
-
var cssKeywords =
|
|
24116
|
+
var cssKeywords = require_color_name();
|
|
24274
24117
|
var reverseKeywords = {};
|
|
24275
24118
|
for (const key of Object.keys(cssKeywords)) {
|
|
24276
24119
|
reverseKeywords[cssKeywords[key]] = key;
|
|
@@ -24938,9 +24781,9 @@ var require_conversions = __commonJS({
|
|
|
24938
24781
|
}
|
|
24939
24782
|
});
|
|
24940
24783
|
|
|
24941
|
-
// node_modules/color
|
|
24784
|
+
// node_modules/color-convert/route.js
|
|
24942
24785
|
var require_route = __commonJS({
|
|
24943
|
-
"node_modules/color
|
|
24786
|
+
"node_modules/color-convert/route.js"(exports, module) {
|
|
24944
24787
|
"use strict";
|
|
24945
24788
|
var conversions = require_conversions();
|
|
24946
24789
|
function buildGraph() {
|
|
@@ -25009,9 +24852,9 @@ var require_route = __commonJS({
|
|
|
25009
24852
|
}
|
|
25010
24853
|
});
|
|
25011
24854
|
|
|
25012
|
-
// node_modules/color
|
|
24855
|
+
// node_modules/color-convert/index.js
|
|
25013
24856
|
var require_color_convert = __commonJS({
|
|
25014
|
-
"node_modules/color
|
|
24857
|
+
"node_modules/color-convert/index.js"(exports, module) {
|
|
25015
24858
|
"use strict";
|
|
25016
24859
|
var conversions = require_conversions();
|
|
25017
24860
|
var route = require_route();
|
|
@@ -39343,8 +39186,8 @@ var require_three = __commonJS({
|
|
|
39343
39186
|
function randFloat2(low, high) {
|
|
39344
39187
|
return low + Math.random() * (high - low);
|
|
39345
39188
|
}
|
|
39346
|
-
function randFloatSpread2(
|
|
39347
|
-
return
|
|
39189
|
+
function randFloatSpread2(range2) {
|
|
39190
|
+
return range2 * (0.5 - Math.random());
|
|
39348
39191
|
}
|
|
39349
39192
|
function seededRandom2(s) {
|
|
39350
39193
|
if (s !== void 0) _seed2 = s;
|
|
@@ -47221,26 +47064,26 @@ var require_three = __commonJS({
|
|
|
47221
47064
|
let mergeIndex = 0;
|
|
47222
47065
|
for (let i = 1; i < updateRanges.length; i++) {
|
|
47223
47066
|
const previousRange = updateRanges[mergeIndex];
|
|
47224
|
-
const
|
|
47225
|
-
if (
|
|
47067
|
+
const range2 = updateRanges[i];
|
|
47068
|
+
if (range2.start <= previousRange.start + previousRange.count + 1) {
|
|
47226
47069
|
previousRange.count = Math.max(
|
|
47227
47070
|
previousRange.count,
|
|
47228
|
-
|
|
47071
|
+
range2.start + range2.count - previousRange.start
|
|
47229
47072
|
);
|
|
47230
47073
|
} else {
|
|
47231
47074
|
++mergeIndex;
|
|
47232
|
-
updateRanges[mergeIndex] =
|
|
47075
|
+
updateRanges[mergeIndex] = range2;
|
|
47233
47076
|
}
|
|
47234
47077
|
}
|
|
47235
47078
|
updateRanges.length = mergeIndex + 1;
|
|
47236
47079
|
for (let i = 0, l = updateRanges.length; i < l; i++) {
|
|
47237
|
-
const
|
|
47080
|
+
const range2 = updateRanges[i];
|
|
47238
47081
|
gl.bufferSubData(
|
|
47239
47082
|
bufferType,
|
|
47240
|
-
|
|
47083
|
+
range2.start * array.BYTES_PER_ELEMENT,
|
|
47241
47084
|
array,
|
|
47242
|
-
|
|
47243
|
-
|
|
47085
|
+
range2.start,
|
|
47086
|
+
range2.count
|
|
47244
47087
|
);
|
|
47245
47088
|
}
|
|
47246
47089
|
attribute.clearUpdateRanges();
|
|
@@ -59172,8 +59015,8 @@ void main() {
|
|
|
59172
59015
|
this.sortObjects = source.sortObjects;
|
|
59173
59016
|
this.boundingBox = source.boundingBox !== null ? source.boundingBox.clone() : null;
|
|
59174
59017
|
this.boundingSphere = source.boundingSphere !== null ? source.boundingSphere.clone() : null;
|
|
59175
|
-
this._drawRanges = source._drawRanges.map((
|
|
59176
|
-
this._reservedRanges = source._reservedRanges.map((
|
|
59018
|
+
this._drawRanges = source._drawRanges.map((range2) => ({ ...range2 }));
|
|
59019
|
+
this._reservedRanges = source._reservedRanges.map((range2) => ({ ...range2 }));
|
|
59177
59020
|
this._drawInfo = source._drawInfo.map((inf) => ({ ...inf }));
|
|
59178
59021
|
this._bounds = source._bounds.map((bound) => ({
|
|
59179
59022
|
boxInitialized: bound.boxInitialized,
|
|
@@ -59274,9 +59117,9 @@ void main() {
|
|
|
59274
59117
|
culled = !_frustum.intersectsSphere(_sphere$2);
|
|
59275
59118
|
}
|
|
59276
59119
|
if (!culled) {
|
|
59277
|
-
const
|
|
59278
|
-
multiDrawStarts[count] =
|
|
59279
|
-
multiDrawCounts[count] =
|
|
59120
|
+
const range2 = drawRanges[geometryId];
|
|
59121
|
+
multiDrawStarts[count] = range2.start * bytesPerElement;
|
|
59122
|
+
multiDrawCounts[count] = range2.count;
|
|
59280
59123
|
indirectArray[count] = i;
|
|
59281
59124
|
count++;
|
|
59282
59125
|
}
|
|
@@ -70463,8 +70306,8 @@ function randInt(low, high) {
|
|
|
70463
70306
|
function randFloat(low, high) {
|
|
70464
70307
|
return low + Math.random() * (high - low);
|
|
70465
70308
|
}
|
|
70466
|
-
function randFloatSpread(
|
|
70467
|
-
return
|
|
70309
|
+
function randFloatSpread(range2) {
|
|
70310
|
+
return range2 * (0.5 - Math.random());
|
|
70468
70311
|
}
|
|
70469
70312
|
function seededRandom(s) {
|
|
70470
70313
|
if (s !== void 0) _seed = s;
|
|
@@ -77477,8 +77320,8 @@ var require_dist = __commonJS({
|
|
|
77477
77320
|
RoundedCylinder: () => RoundedCylinder,
|
|
77478
77321
|
Sphere: () => Sphere2,
|
|
77479
77322
|
Torus: () => Torus,
|
|
77480
|
-
Translate: () =>
|
|
77481
|
-
Union: () =>
|
|
77323
|
+
Translate: () => Translate10,
|
|
77324
|
+
Union: () => Union3,
|
|
77482
77325
|
convertCSGToThreeGeom: () => convertCSGToThreeGeom,
|
|
77483
77326
|
createJSCADRenderer: () => createJSCADRenderer,
|
|
77484
77327
|
normalizePointToArray: () => normalizePointToArray,
|
|
@@ -77801,9 +77644,9 @@ var require_dist = __commonJS({
|
|
|
77801
77644
|
};
|
|
77802
77645
|
return hostConfig2;
|
|
77803
77646
|
}
|
|
77804
|
-
var
|
|
77647
|
+
var import_jsx_runtime19 = require_jsx_runtime();
|
|
77805
77648
|
function Circle({ radius }) {
|
|
77806
|
-
return /* @__PURE__ */ (0,
|
|
77649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("circle", { radius });
|
|
77807
77650
|
}
|
|
77808
77651
|
var import_color = __toESM2(require_color(), 1);
|
|
77809
77652
|
var import_jsx_runtime22 = require_jsx_runtime();
|
|
@@ -77833,7 +77676,7 @@ var require_dist = __commonJS({
|
|
|
77833
77676
|
}
|
|
77834
77677
|
return [point.x, point.y, point.z];
|
|
77835
77678
|
};
|
|
77836
|
-
function
|
|
77679
|
+
function Translate10({
|
|
77837
77680
|
offset,
|
|
77838
77681
|
center,
|
|
77839
77682
|
x,
|
|
@@ -77857,7 +77700,7 @@ var require_dist = __commonJS({
|
|
|
77857
77700
|
if (!center && !offset) {
|
|
77858
77701
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WrappedComponent, { ...restProps });
|
|
77859
77702
|
}
|
|
77860
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
77703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Translate10, { offset: center || offset, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WrappedComponent, { ...restProps }) });
|
|
77861
77704
|
};
|
|
77862
77705
|
WithOffset.displayName = `WithOffset(${WrappedComponent.displayName || WrappedComponent.name || "Component"})`;
|
|
77863
77706
|
return WithOffset;
|
|
@@ -77992,9 +77835,9 @@ var require_dist = __commonJS({
|
|
|
77992
77835
|
function Polygon3({ points }) {
|
|
77993
77836
|
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("jscadPolygon", { points });
|
|
77994
77837
|
}
|
|
77995
|
-
var
|
|
77838
|
+
var import_jsx_runtime20 = require_jsx_runtime();
|
|
77996
77839
|
function Project({ axis, origin, children }) {
|
|
77997
|
-
return /* @__PURE__ */ (0,
|
|
77840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("project", { axis, origin, children });
|
|
77998
77841
|
}
|
|
77999
77842
|
var import_jsx_runtime21 = require_jsx_runtime();
|
|
78000
77843
|
function Rectangle({ size }) {
|
|
@@ -78088,7 +77931,7 @@ var require_dist = __commonJS({
|
|
|
78088
77931
|
};
|
|
78089
77932
|
var Torus = withOffsetProp(withColorProp(TorusBase));
|
|
78090
77933
|
var import_jsx_runtime27 = require_jsx_runtime();
|
|
78091
|
-
function
|
|
77934
|
+
function Union3({ children }) {
|
|
78092
77935
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("union", { children });
|
|
78093
77936
|
}
|
|
78094
77937
|
var jscad = __toESM2(require_src(), 1);
|
|
@@ -78219,6 +78062,9 @@ var require_dist = __commonJS({
|
|
|
78219
78062
|
scene.add(directionalLight3);
|
|
78220
78063
|
const gridHelper = new THREE.GridHelper(100, 100);
|
|
78221
78064
|
gridHelper.visible = showGrid;
|
|
78065
|
+
if (zAxisUp) {
|
|
78066
|
+
gridHelper.rotation.x = -Math.PI / 2;
|
|
78067
|
+
}
|
|
78222
78068
|
scene.add(gridHelper);
|
|
78223
78069
|
gridRef.current = gridHelper;
|
|
78224
78070
|
for (const csg of jscadGeoms) {
|
|
@@ -78389,8 +78235,8 @@ var A0402 = () => {
|
|
|
78389
78235
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78390
78236
|
import_jscad_fiber.Cuboid,
|
|
78391
78237
|
{
|
|
78392
|
-
size: [bodyLength,
|
|
78393
|
-
offset: [0, height / 2
|
|
78238
|
+
size: [bodyLength, width, height],
|
|
78239
|
+
offset: [0, 0, height / 2],
|
|
78394
78240
|
color: "#333"
|
|
78395
78241
|
}
|
|
78396
78242
|
),
|
|
@@ -78398,7 +78244,7 @@ var A0402 = () => {
|
|
|
78398
78244
|
import_jscad_fiber.Cuboid,
|
|
78399
78245
|
{
|
|
78400
78246
|
size: [terminatorWidth, height, width],
|
|
78401
|
-
offset: [fullLength / 2 - terminatorWidth / 2, height / 2
|
|
78247
|
+
offset: [fullLength / 2 - terminatorWidth / 2, 0, height / 2],
|
|
78402
78248
|
color: "#ccc"
|
|
78403
78249
|
}
|
|
78404
78250
|
),
|
|
@@ -78406,7 +78252,7 @@ var A0402 = () => {
|
|
|
78406
78252
|
import_jscad_fiber.Cuboid,
|
|
78407
78253
|
{
|
|
78408
78254
|
size: [terminatorWidth, height, width],
|
|
78409
|
-
offset: [-fullLength / 2 + terminatorWidth / 2, height / 2
|
|
78255
|
+
offset: [-fullLength / 2 + terminatorWidth / 2, 0, height / 2],
|
|
78410
78256
|
color: "#ccc"
|
|
78411
78257
|
}
|
|
78412
78258
|
)
|
|
@@ -78426,24 +78272,24 @@ var A0603 = () => {
|
|
|
78426
78272
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
78427
78273
|
import_jscad_fiber2.Cuboid,
|
|
78428
78274
|
{
|
|
78429
|
-
size: [bodyLength2,
|
|
78430
|
-
offset: [0, height2 / 2
|
|
78275
|
+
size: [bodyLength2, width2, height2],
|
|
78276
|
+
offset: [0, 0, height2 / 2],
|
|
78431
78277
|
color: "#333"
|
|
78432
78278
|
}
|
|
78433
78279
|
),
|
|
78434
78280
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
78435
78281
|
import_jscad_fiber2.Cuboid,
|
|
78436
78282
|
{
|
|
78437
|
-
size: [terminatorLength,
|
|
78438
|
-
offset: [fullLength2 / 2 - terminatorLength / 2, height2 / 2
|
|
78283
|
+
size: [terminatorLength, width2, height2],
|
|
78284
|
+
offset: [fullLength2 / 2 - terminatorLength / 2, 0, height2 / 2],
|
|
78439
78285
|
color: "#ccc"
|
|
78440
78286
|
}
|
|
78441
78287
|
),
|
|
78442
78288
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
78443
78289
|
import_jscad_fiber2.Cuboid,
|
|
78444
78290
|
{
|
|
78445
|
-
size: [terminatorLength,
|
|
78446
|
-
offset: [-fullLength2 / 2 + terminatorLength / 2, height2 / 2
|
|
78291
|
+
size: [terminatorLength, width2, height2],
|
|
78292
|
+
offset: [-fullLength2 / 2 + terminatorLength / 2, 0, height2 / 2],
|
|
78447
78293
|
color: "#ccc"
|
|
78448
78294
|
}
|
|
78449
78295
|
)
|
|
@@ -78463,24 +78309,24 @@ var A0805 = () => {
|
|
|
78463
78309
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
78464
78310
|
import_jscad_fiber3.Cuboid,
|
|
78465
78311
|
{
|
|
78466
|
-
size: [bodyLength3,
|
|
78467
|
-
offset: [0, height3 / 2
|
|
78312
|
+
size: [bodyLength3, width3, height3],
|
|
78313
|
+
offset: [0, 0, height3 / 2],
|
|
78468
78314
|
color: "#333"
|
|
78469
78315
|
}
|
|
78470
78316
|
),
|
|
78471
78317
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
78472
78318
|
import_jscad_fiber3.Cuboid,
|
|
78473
78319
|
{
|
|
78474
|
-
size: [terminatorWidth2,
|
|
78475
|
-
offset: [fullLength3 / 2 - terminatorWidth2 / 2, height3 / 2
|
|
78320
|
+
size: [terminatorWidth2, width3, height3],
|
|
78321
|
+
offset: [fullLength3 / 2 - terminatorWidth2 / 2, 0, height3 / 2],
|
|
78476
78322
|
color: "#ccc"
|
|
78477
78323
|
}
|
|
78478
78324
|
),
|
|
78479
78325
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
78480
78326
|
import_jscad_fiber3.Cuboid,
|
|
78481
78327
|
{
|
|
78482
|
-
size: [terminatorWidth2,
|
|
78483
|
-
offset: [-fullLength3 / 2 + terminatorWidth2 / 2, height3 / 2
|
|
78328
|
+
size: [terminatorWidth2, width3, height3],
|
|
78329
|
+
offset: [-fullLength3 / 2 + terminatorWidth2 / 2, 0, height3 / 2],
|
|
78484
78330
|
color: "#ccc"
|
|
78485
78331
|
}
|
|
78486
78332
|
)
|
|
@@ -78513,12 +78359,7 @@ var BGA = ({
|
|
|
78513
78359
|
return result.soup();
|
|
78514
78360
|
}, [footprintString]);
|
|
78515
78361
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
78516
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jscad_fiber4.Translate, { z: bodyOffset, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jscad_fiber4.Colorize, { color: "#555", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
78517
|
-
import_jscad_fiber4.Cuboid,
|
|
78518
|
-
{
|
|
78519
|
-
size: [packageWidth, packageLength, bodyHeight]
|
|
78520
|
-
}
|
|
78521
|
-
) }) }),
|
|
78362
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jscad_fiber4.Translate, { z: bodyOffset, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jscad_fiber4.Colorize, { color: "#555", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jscad_fiber4.Cuboid, { size: [packageWidth, packageLength, bodyHeight] }) }) }),
|
|
78522
78363
|
!footprintString && Array.from({ length: ballRows * ballColumns }).map((_, index) => {
|
|
78523
78364
|
if (missingBalls.includes(index + 1)) return null;
|
|
78524
78365
|
const row = Math.floor(index / ballColumns);
|
|
@@ -78539,8 +78380,14 @@ var BGA = ({
|
|
|
78539
78380
|
// lib/ChipBody.tsx
|
|
78540
78381
|
var import_jscad_fiber5 = __toESM(require_dist(), 1);
|
|
78541
78382
|
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
78542
|
-
var ChipBody = ({
|
|
78543
|
-
|
|
78383
|
+
var ChipBody = ({
|
|
78384
|
+
center,
|
|
78385
|
+
width: width4,
|
|
78386
|
+
length,
|
|
78387
|
+
height: height4,
|
|
78388
|
+
heightAboveSurface = 0.15
|
|
78389
|
+
}) => {
|
|
78390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jscad_fiber5.Colorize, { color: "#555", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jscad_fiber5.Translate, { offset: center, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jscad_fiber5.Translate, { offset: { x: 0, y: 0, z: height4 / 2 + heightAboveSurface }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jscad_fiber5.RoundedCuboid, { roundRadius: 0.2, size: [width4, length, height4] }) }) }) });
|
|
78544
78391
|
};
|
|
78545
78392
|
|
|
78546
78393
|
// lib/ExtrudedPads.tsx
|
|
@@ -78562,7 +78409,7 @@ var import_jscad_fiber7 = __toESM(require_dist(), 1);
|
|
|
78562
78409
|
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
78563
78410
|
var FootprintPlatedHole = ({ hole }) => {
|
|
78564
78411
|
if (hole.shape === "circle") {
|
|
78565
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Colorize, { color: [255, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Translate, { offset: [hole.x,
|
|
78412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Colorize, { color: [255, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Translate, { offset: [hole.x, hole.y, 0], children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jscad_fiber7.Cylinder, { radius: hole.outer_diameter, height: 0.01 }) }) });
|
|
78566
78413
|
}
|
|
78567
78414
|
throw new Error("Shape not supported: " + hole.shape);
|
|
78568
78415
|
};
|
|
@@ -78592,27 +78439,11 @@ var ExtrudedPads = ({
|
|
|
78592
78439
|
// lib/Footprinter3d.tsx
|
|
78593
78440
|
import { fp as fp3 } from "@tscircuit/footprinter";
|
|
78594
78441
|
|
|
78595
|
-
// lib/
|
|
78442
|
+
// lib/DualInlinePackage.tsx
|
|
78596
78443
|
var import_jscad_fiber8 = __toESM(require_dist(), 1);
|
|
78597
|
-
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
|
|
78598
|
-
var Dip = ({ numPins = 8 }) => {
|
|
78599
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jscad_fiber8.ExtrudeLinear, { height: 10, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
78600
|
-
import_jscad_fiber8.Polygon,
|
|
78601
|
-
{
|
|
78602
|
-
points: [
|
|
78603
|
-
[0, 0],
|
|
78604
|
-
[1, 2],
|
|
78605
|
-
[5, 2],
|
|
78606
|
-
[6, 0],
|
|
78607
|
-
[5, -2],
|
|
78608
|
-
[1, -2]
|
|
78609
|
-
]
|
|
78610
|
-
}
|
|
78611
|
-
) });
|
|
78612
|
-
};
|
|
78613
78444
|
|
|
78614
|
-
// lib/
|
|
78615
|
-
var
|
|
78445
|
+
// lib/utils/range.ts
|
|
78446
|
+
var range = (end) => Array.from({ length: end }, (_, i) => i);
|
|
78616
78447
|
|
|
78617
78448
|
// lib/utils/getExpandedStroke.ts
|
|
78618
78449
|
function getExpandedStroke(strokeInput, width4) {
|
|
@@ -78673,7 +78504,97 @@ function getExpandedStroke(strokeInput, width4) {
|
|
|
78673
78504
|
return [...leftSide, ...rightSide];
|
|
78674
78505
|
}
|
|
78675
78506
|
|
|
78507
|
+
// lib/DualInlinePackage.tsx
|
|
78508
|
+
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
|
|
78509
|
+
var normalizeOnY = (points) => {
|
|
78510
|
+
const minX = Math.min(...points.map((p) => p.x));
|
|
78511
|
+
const maxX = Math.max(...points.map((p) => p.x));
|
|
78512
|
+
const minY = Math.min(...points.map((p) => p.y));
|
|
78513
|
+
const maxY = Math.max(...points.map((p) => p.y));
|
|
78514
|
+
const height4 = maxY - minY;
|
|
78515
|
+
const factor = 5.47 / height4;
|
|
78516
|
+
return points.map((p) => ({
|
|
78517
|
+
x: (p.x - minX - (maxX - minX) / 2) * factor,
|
|
78518
|
+
y: (p.y - minY) * factor
|
|
78519
|
+
}));
|
|
78520
|
+
};
|
|
78521
|
+
var svgPathPoints = normalizeOnY([
|
|
78522
|
+
{ x: 20, y: 105 },
|
|
78523
|
+
{ x: 20, y: 109 },
|
|
78524
|
+
{ x: 20, y: 102 },
|
|
78525
|
+
{ x: 26, y: 102 },
|
|
78526
|
+
{ x: 26, y: 109 },
|
|
78527
|
+
{ x: 24, y: 111 },
|
|
78528
|
+
{ x: 24, y: 118 },
|
|
78529
|
+
{ x: 22, y: 118 },
|
|
78530
|
+
{ x: 22, y: 111 },
|
|
78531
|
+
{ x: 20, y: 109 }
|
|
78532
|
+
]);
|
|
78533
|
+
var DipPinLeg = ({ x, y, z }) => {
|
|
78534
|
+
const isRotated = x > 0;
|
|
78535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
78536
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jscad_fiber8.Translate, { offset: { x: x + 0.25 / 2, y, z }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jscad_fiber8.Rotate, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jscad_fiber8.ExtrudeLinear, { height: 0.25, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jscad_fiber8.Polygon, { points: svgPathPoints.map((p) => [p.x, p.y]) }) }) }) }),
|
|
78537
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
78538
|
+
import_jscad_fiber8.Translate,
|
|
78539
|
+
{
|
|
78540
|
+
offset: {
|
|
78541
|
+
x,
|
|
78542
|
+
y: y + (isRotated ? 1 : -1),
|
|
78543
|
+
z
|
|
78544
|
+
},
|
|
78545
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jscad_fiber8.Rotate, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jscad_fiber8.ExtrudeLinear, { height: 2, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
78546
|
+
import_jscad_fiber8.Polygon,
|
|
78547
|
+
{
|
|
78548
|
+
points: getExpandedStroke(
|
|
78549
|
+
[
|
|
78550
|
+
[0, 0],
|
|
78551
|
+
[-1, 0],
|
|
78552
|
+
[-1, -1]
|
|
78553
|
+
],
|
|
78554
|
+
0.25
|
|
78555
|
+
).map((p) => [p.x, p.y])
|
|
78556
|
+
}
|
|
78557
|
+
) }) })
|
|
78558
|
+
}
|
|
78559
|
+
)
|
|
78560
|
+
] });
|
|
78561
|
+
};
|
|
78562
|
+
var Dip = ({
|
|
78563
|
+
numPins = 8,
|
|
78564
|
+
pitch = 2.54,
|
|
78565
|
+
bodyWidth = 6.4
|
|
78566
|
+
}) => {
|
|
78567
|
+
const numPinsOnEachSide = Math.floor(numPins / 2);
|
|
78568
|
+
const crossBodyPinWidth = bodyWidth + 1;
|
|
78569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
78570
|
+
range(numPins).map((i) => {
|
|
78571
|
+
const yRow = i % numPinsOnEachSide;
|
|
78572
|
+
const xRow = (Math.floor(i / numPinsOnEachSide) - 0.5) * 2;
|
|
78573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
78574
|
+
DipPinLeg,
|
|
78575
|
+
{
|
|
78576
|
+
x: xRow * crossBodyPinWidth / 2,
|
|
78577
|
+
y: yRow * pitch - (numPinsOnEachSide - 1) / 2 * pitch,
|
|
78578
|
+
z: 5.47 / 2
|
|
78579
|
+
},
|
|
78580
|
+
i
|
|
78581
|
+
);
|
|
78582
|
+
}),
|
|
78583
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
78584
|
+
ChipBody,
|
|
78585
|
+
{
|
|
78586
|
+
width: bodyWidth,
|
|
78587
|
+
length: 10 / 4 * numPinsOnEachSide,
|
|
78588
|
+
height: 5.1 - 0.5,
|
|
78589
|
+
heightAboveSurface: 0.5,
|
|
78590
|
+
center: { x: 0, y: 0, z: 0 }
|
|
78591
|
+
}
|
|
78592
|
+
)
|
|
78593
|
+
] });
|
|
78594
|
+
};
|
|
78595
|
+
|
|
78676
78596
|
// lib/SmdChipLead.tsx
|
|
78597
|
+
var import_jscad_fiber9 = __toESM(require_dist(), 1);
|
|
78677
78598
|
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
78678
78599
|
function calculateSCurve(x, {
|
|
78679
78600
|
height: height4,
|
|
@@ -78700,7 +78621,7 @@ var SmdChipLead = (props) => {
|
|
|
78700
78621
|
const N = 15;
|
|
78701
78622
|
const points = Array.from({ length: N }).map((_, i) => i / (N - 1) * bodyDistance).map((x) => [x, calculateSCurve(x, props)]);
|
|
78702
78623
|
const polygon = getExpandedStroke(points, thickness);
|
|
78703
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber9.Colorize, { color: "#fff", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber9.Translate, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber9.Rotate, { rotation: [0, rotation ?? 0
|
|
78624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber9.Colorize, { color: "#fff", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber9.Translate, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber9.Rotate, { rotation: ["90deg", 0, rotation ?? 0], children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber9.Translate, { offset: { x: 0, y: 0, z: -width4 / 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber9.ExtrudeLinear, { height: width4, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jscad_fiber9.Polygon, { points: polygon.map((p) => [p.x, p.y]) }) }) }) }) }) });
|
|
78704
78625
|
};
|
|
78705
78626
|
|
|
78706
78627
|
// lib/Tssop.tsx
|
|
@@ -78718,8 +78639,8 @@ var Tssop = ({
|
|
|
78718
78639
|
{
|
|
78719
78640
|
position: {
|
|
78720
78641
|
x: -fullWidth / 2,
|
|
78721
|
-
y:
|
|
78722
|
-
z:
|
|
78642
|
+
y: i * 1.27 - pinOffsetToCenter,
|
|
78643
|
+
z: 0
|
|
78723
78644
|
},
|
|
78724
78645
|
width: 0.25,
|
|
78725
78646
|
thickness: 0.15,
|
|
@@ -78733,7 +78654,7 @@ var Tssop = ({
|
|
|
78733
78654
|
SmdChipLead,
|
|
78734
78655
|
{
|
|
78735
78656
|
rotation: Math.PI,
|
|
78736
|
-
position: { x: fullWidth / 2, y:
|
|
78657
|
+
position: { x: fullWidth / 2, y: i * 1.27 - pinOffsetToCenter, z: 0 },
|
|
78737
78658
|
width: 0.25,
|
|
78738
78659
|
thickness: 0.15,
|
|
78739
78660
|
padContactLength: 0.6,
|
|
@@ -78763,6 +78684,16 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
78763
78684
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Dip, { numPins: fpJson.num_pins });
|
|
78764
78685
|
case "tssop":
|
|
78765
78686
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Tssop, { pinCount: fpJson.num_pins });
|
|
78687
|
+
case "soic":
|
|
78688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Tssop, { pinCount: fpJson.num_pins });
|
|
78689
|
+
}
|
|
78690
|
+
switch (fpJson.imperial) {
|
|
78691
|
+
case "0402":
|
|
78692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(A0402, {});
|
|
78693
|
+
case "0603":
|
|
78694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(A0603, {});
|
|
78695
|
+
case "0805":
|
|
78696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(A0805, {});
|
|
78766
78697
|
}
|
|
78767
78698
|
return null;
|
|
78768
78699
|
};
|
|
@@ -78905,76 +78836,23 @@ var SOT723 = () => {
|
|
|
78905
78836
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Rotate, { rotation: [90 / 180 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Translate, { center: [0.475, leadHeight / 2, 0], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Cuboid, { size: [bodyWidth - 0.5, bodyLength4, bodyHeight] }) }) }) }),
|
|
78906
78837
|
[1, 2, 3].map((pn) => {
|
|
78907
78838
|
const { x, y } = getCcwSot723Coords(pn);
|
|
78908
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Translate, { center: [x, 0, y], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
78909
|
-
|
|
78910
|
-
|
|
78911
|
-
|
|
78912
|
-
|
|
78839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Translate, { center: [x, 0, y], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
78840
|
+
import_jscad_fiber11.Cuboid,
|
|
78841
|
+
{
|
|
78842
|
+
size: [
|
|
78843
|
+
pn === 1 ? centerLeadWidth : leadWidth,
|
|
78844
|
+
leadHeight,
|
|
78845
|
+
leadLength
|
|
78846
|
+
]
|
|
78847
|
+
}
|
|
78848
|
+
) }, `lead-${pn}`);
|
|
78913
78849
|
})
|
|
78914
78850
|
] });
|
|
78915
78851
|
};
|
|
78916
78852
|
|
|
78917
|
-
// lib/TSSOP-20.tsx
|
|
78918
|
-
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
78919
|
-
var Tssop20 = ({
|
|
78920
|
-
pinCount,
|
|
78921
|
-
fullWidth = 6.5
|
|
78922
|
-
}) => {
|
|
78923
|
-
const sidePinCount = Math.ceil(pinCount / 2);
|
|
78924
|
-
const pitch = 0.65;
|
|
78925
|
-
const fullLength4 = (sidePinCount + 0.75) * pitch;
|
|
78926
|
-
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
78927
|
-
const bodyWidth = 4.5;
|
|
78928
|
-
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
78929
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
78930
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
78931
|
-
SmdChipLead,
|
|
78932
|
-
{
|
|
78933
|
-
position: {
|
|
78934
|
-
x: -fullWidth / 2 - 0.3,
|
|
78935
|
-
y: 0,
|
|
78936
|
-
z: i * pitch - pinOffsetToCenter
|
|
78937
|
-
},
|
|
78938
|
-
width: 0.25,
|
|
78939
|
-
thickness: 0.15,
|
|
78940
|
-
padContactLength: 0.6,
|
|
78941
|
-
bodyDistance,
|
|
78942
|
-
height: 0.8
|
|
78943
|
-
},
|
|
78944
|
-
`left-${i}`
|
|
78945
|
-
)),
|
|
78946
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
78947
|
-
SmdChipLead,
|
|
78948
|
-
{
|
|
78949
|
-
rotation: Math.PI,
|
|
78950
|
-
position: {
|
|
78951
|
-
x: fullWidth / 2 + 0.3,
|
|
78952
|
-
y: 0,
|
|
78953
|
-
z: i * pitch - pinOffsetToCenter
|
|
78954
|
-
},
|
|
78955
|
-
width: 0.25,
|
|
78956
|
-
thickness: 0.15,
|
|
78957
|
-
padContactLength: 0.6,
|
|
78958
|
-
bodyDistance,
|
|
78959
|
-
height: 0.8
|
|
78960
|
-
},
|
|
78961
|
-
`right-${i}`
|
|
78962
|
-
)),
|
|
78963
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
78964
|
-
ChipBody,
|
|
78965
|
-
{
|
|
78966
|
-
center: { x: 0, y: 0.4 / 2, z: 0 },
|
|
78967
|
-
width: bodyWidth + 0.7,
|
|
78968
|
-
length: fullLength4,
|
|
78969
|
-
height: 1.2
|
|
78970
|
-
}
|
|
78971
|
-
)
|
|
78972
|
-
] });
|
|
78973
|
-
};
|
|
78974
|
-
|
|
78975
78853
|
// lib/qfn.tsx
|
|
78976
78854
|
var import_jscad_fiber12 = __toESM(require_dist(), 1);
|
|
78977
|
-
var
|
|
78855
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
78978
78856
|
var QFN = ({
|
|
78979
78857
|
fullWidth = 5,
|
|
78980
78858
|
height: height4 = 0.8,
|
|
@@ -78983,15 +78861,15 @@ var QFN = ({
|
|
|
78983
78861
|
const bodyWidth = fullWidth;
|
|
78984
78862
|
const bodyLength4 = fullWidth;
|
|
78985
78863
|
const thermalPadHeight = 0.1;
|
|
78986
|
-
return /* @__PURE__ */ (0,
|
|
78987
|
-
/* @__PURE__ */ (0,
|
|
78864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
78865
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jscad_fiber12.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
78988
78866
|
import_jscad_fiber12.Cuboid,
|
|
78989
78867
|
{
|
|
78990
78868
|
center: { x: 0, y: 0, z: height4 / 2 },
|
|
78991
78869
|
size: [bodyWidth, bodyLength4, height4]
|
|
78992
78870
|
}
|
|
78993
78871
|
) }),
|
|
78994
|
-
/* @__PURE__ */ (0,
|
|
78872
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
78995
78873
|
import_jscad_fiber12.Cuboid,
|
|
78996
78874
|
{
|
|
78997
78875
|
center: { x: 0, y: 0, z: -thermalPadHeight / 2 },
|
|
@@ -79002,7 +78880,7 @@ var QFN = ({
|
|
|
79002
78880
|
};
|
|
79003
78881
|
|
|
79004
78882
|
// lib/qfp.tsx
|
|
79005
|
-
var
|
|
78883
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
79006
78884
|
var QFP = ({
|
|
79007
78885
|
pinCount
|
|
79008
78886
|
}) => {
|
|
@@ -79018,14 +78896,14 @@ var QFP = ({
|
|
|
79018
78896
|
const leadThickness = 0.15;
|
|
79019
78897
|
const padContactLength = 0.6;
|
|
79020
78898
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
79021
|
-
return /* @__PURE__ */ (0,
|
|
79022
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0,
|
|
78899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
78900
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79023
78901
|
SmdChipLead,
|
|
79024
78902
|
{
|
|
79025
78903
|
position: {
|
|
79026
78904
|
x: -fullWidth / 2,
|
|
79027
|
-
y:
|
|
79028
|
-
z:
|
|
78905
|
+
y: i * pinSpacing - pinOffsetToCenter,
|
|
78906
|
+
z: 0
|
|
79029
78907
|
},
|
|
79030
78908
|
width: leadWidth,
|
|
79031
78909
|
thickness: leadThickness,
|
|
@@ -79035,14 +78913,14 @@ var QFP = ({
|
|
|
79035
78913
|
},
|
|
79036
78914
|
`left-${i}`
|
|
79037
78915
|
)),
|
|
79038
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0,
|
|
78916
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79039
78917
|
SmdChipLead,
|
|
79040
78918
|
{
|
|
79041
78919
|
rotation: Math.PI,
|
|
79042
78920
|
position: {
|
|
79043
78921
|
x: fullWidth / 2,
|
|
79044
|
-
y:
|
|
79045
|
-
z:
|
|
78922
|
+
y: i * pinSpacing - pinOffsetToCenter,
|
|
78923
|
+
z: 0
|
|
79046
78924
|
},
|
|
79047
78925
|
width: leadWidth,
|
|
79048
78926
|
thickness: leadThickness,
|
|
@@ -79052,14 +78930,14 @@ var QFP = ({
|
|
|
79052
78930
|
},
|
|
79053
78931
|
`right-${i}`
|
|
79054
78932
|
)),
|
|
79055
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0,
|
|
78933
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79056
78934
|
SmdChipLead,
|
|
79057
78935
|
{
|
|
79058
|
-
rotation:
|
|
78936
|
+
rotation: Math.PI / 2,
|
|
79059
78937
|
position: {
|
|
79060
78938
|
x: i * pinSpacing - pinOffsetToCenter,
|
|
79061
|
-
y:
|
|
79062
|
-
z:
|
|
78939
|
+
y: -fullLength4 / 2,
|
|
78940
|
+
z: 0
|
|
79063
78941
|
},
|
|
79064
78942
|
width: leadWidth,
|
|
79065
78943
|
thickness: leadThickness,
|
|
@@ -79069,14 +78947,14 @@ var QFP = ({
|
|
|
79069
78947
|
},
|
|
79070
78948
|
`bottom-${i}`
|
|
79071
78949
|
)),
|
|
79072
|
-
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0,
|
|
78950
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79073
78951
|
SmdChipLead,
|
|
79074
78952
|
{
|
|
79075
|
-
rotation:
|
|
78953
|
+
rotation: -Math.PI / 2,
|
|
79076
78954
|
position: {
|
|
79077
78955
|
x: i * pinSpacing - pinOffsetToCenter,
|
|
79078
|
-
y:
|
|
79079
|
-
z:
|
|
78956
|
+
y: fullLength4 / 2,
|
|
78957
|
+
z: 0
|
|
79080
78958
|
},
|
|
79081
78959
|
width: leadWidth,
|
|
79082
78960
|
thickness: leadThickness,
|
|
@@ -79086,10 +78964,10 @@ var QFP = ({
|
|
|
79086
78964
|
},
|
|
79087
78965
|
`top-${i}`
|
|
79088
78966
|
)),
|
|
79089
|
-
/* @__PURE__ */ (0,
|
|
78967
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
79090
78968
|
ChipBody,
|
|
79091
78969
|
{
|
|
79092
|
-
center: { x: 0, y: leadHeight / 2
|
|
78970
|
+
center: { x: 0, y: 0, z: leadHeight / 2 },
|
|
79093
78971
|
width: bodyWidth,
|
|
79094
78972
|
length: bodyLength4,
|
|
79095
78973
|
height: 1.5
|
|
@@ -79099,7 +78977,7 @@ var QFP = ({
|
|
|
79099
78977
|
};
|
|
79100
78978
|
|
|
79101
78979
|
// lib/sod-123.tsx
|
|
79102
|
-
var
|
|
78980
|
+
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
79103
78981
|
var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
79104
78982
|
const bodyWidth = 2.9;
|
|
79105
78983
|
const bodyLength4 = 1.3;
|
|
@@ -79111,8 +78989,8 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79111
78989
|
const leadYOffset = leadHeight / 1 - 0.4;
|
|
79112
78990
|
const bodyYOffset = leadHeight / 2 - 0.4;
|
|
79113
78991
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
79114
|
-
return /* @__PURE__ */ (0,
|
|
79115
|
-
/* @__PURE__ */ (0,
|
|
78992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
78993
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
79116
78994
|
SmdChipLead,
|
|
79117
78995
|
{
|
|
79118
78996
|
position: {
|
|
@@ -79128,7 +79006,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79128
79006
|
},
|
|
79129
79007
|
1
|
|
79130
79008
|
),
|
|
79131
|
-
/* @__PURE__ */ (0,
|
|
79009
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
79132
79010
|
SmdChipLead,
|
|
79133
79011
|
{
|
|
79134
79012
|
rotation: Math.PI,
|
|
@@ -79145,7 +79023,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength4 = 1.6 }) => {
|
|
|
79145
79023
|
},
|
|
79146
79024
|
2
|
|
79147
79025
|
),
|
|
79148
|
-
/* @__PURE__ */ (0,
|
|
79026
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
79149
79027
|
ChipBody,
|
|
79150
79028
|
{
|
|
79151
79029
|
center: { x: 0, y: bodyYOffset, z: 0 },
|
|
@@ -79173,8 +79051,7 @@ export {
|
|
|
79173
79051
|
SOT563,
|
|
79174
79052
|
SOT723,
|
|
79175
79053
|
SmdChipLead,
|
|
79176
|
-
Tssop
|
|
79177
|
-
Tssop20
|
|
79054
|
+
Tssop
|
|
79178
79055
|
};
|
|
79179
79056
|
/*! Bundled license information:
|
|
79180
79057
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jscad-electronics",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -13,13 +13,17 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"start": "cosmos",
|
|
15
15
|
"build": "tsup ./lib/index.ts --dts --format esm",
|
|
16
|
+
"vercel-build": "bun run build:site",
|
|
17
|
+
"format": "biome format --write .",
|
|
18
|
+
"format:check": "biome format .",
|
|
16
19
|
"build:site": "cosmos-export"
|
|
17
20
|
},
|
|
18
21
|
"devDependencies": {
|
|
19
22
|
"@biomejs/biome": "^1.8.3",
|
|
20
23
|
"@tscircuit/soup": "^0.0.41",
|
|
21
|
-
"@types/react": "^18.3.
|
|
22
|
-
"
|
|
24
|
+
"@types/react": "^18.3.10",
|
|
25
|
+
"@types/react-dom": "^18.3.0",
|
|
26
|
+
"jscad-fiber": "^0.0.64",
|
|
23
27
|
"react": "^18.3.1",
|
|
24
28
|
"react-cosmos": "^6.1.1",
|
|
25
29
|
"react-cosmos-plugin-vite": "^6.1.1",
|