jscad-electronics 0.0.68 → 0.0.70
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 +18 -2
- package/dist/index.js +206 -82
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +132 -22
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -61,8 +61,22 @@ interface ChipBodyProps {
|
|
|
61
61
|
y: number;
|
|
62
62
|
z: number;
|
|
63
63
|
};
|
|
64
|
+
color?: string;
|
|
65
|
+
taperRatio?: number;
|
|
66
|
+
faceRatio?: number;
|
|
67
|
+
straightHeightRatio?: number;
|
|
68
|
+
includeNotch?: boolean;
|
|
69
|
+
notchRadius?: number;
|
|
70
|
+
notchPosition?: {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
z: number;
|
|
74
|
+
};
|
|
75
|
+
notchRotation?: [number, number, number];
|
|
76
|
+
notchLength?: number;
|
|
77
|
+
notchWidth?: number;
|
|
64
78
|
}
|
|
65
|
-
declare const ChipBody: ({ center, width, length, height, heightAboveSurface, }: ChipBodyProps) => react_jsx_runtime.JSX.Element;
|
|
79
|
+
declare const ChipBody: ({ center, width, length, height, heightAboveSurface, color, taperRatio, faceRatio, straightHeightRatio, includeNotch, notchRadius, notchPosition, notchRotation, notchLength, notchWidth, }: ChipBodyProps) => react_jsx_runtime.JSX.Element;
|
|
66
80
|
|
|
67
81
|
declare const ExtrudedPads: ({ circuitJson, footprint, }: {
|
|
68
82
|
circuitJson?: AnyCircuitElement[];
|
|
@@ -183,4 +197,6 @@ declare const SOD123FL: () => react_jsx_runtime.JSX.Element;
|
|
|
183
197
|
|
|
184
198
|
declare const SOD923: () => react_jsx_runtime.JSX.Element;
|
|
185
199
|
|
|
186
|
-
|
|
200
|
+
declare const SOT223: () => react_jsx_runtime.JSX.Element;
|
|
201
|
+
|
|
202
|
+
export { A01005, A0201, A0402, A0603, A0805, A1206, A1210, A2010, A2512, BGA, ChipBody, type ChipBodyProps, ExtrudedPads, FootprintPad, FootprintPlatedHole, Footprinter3d, PinRow, QFN, QFP, SMA, SMB, SMC, SMF, SOD123, SOD123F, SOD123FL, SOD523, SOD923, SOT223, SOT233P, SOT563, SOT723, SmdChipLead, type SmdChipLeadProps, Tssop, VSSOP };
|
package/dist/index.js
CHANGED
|
@@ -401,31 +401,45 @@ var ChipBody = ({
|
|
|
401
401
|
width: width10,
|
|
402
402
|
length,
|
|
403
403
|
height: height10,
|
|
404
|
-
heightAboveSurface: heightAboveSurface2 = 0.15
|
|
404
|
+
heightAboveSurface: heightAboveSurface2 = 0.15,
|
|
405
|
+
color = "#555",
|
|
406
|
+
taperRatio = 0.12,
|
|
407
|
+
faceRatio = 0.75,
|
|
408
|
+
straightHeightRatio = 0.5,
|
|
409
|
+
includeNotch = true,
|
|
410
|
+
notchRadius,
|
|
411
|
+
notchPosition,
|
|
412
|
+
notchRotation = [0, 0, 0],
|
|
413
|
+
notchLength = 0.5,
|
|
414
|
+
notchWidth = 0.25
|
|
405
415
|
}) => {
|
|
406
|
-
const straightHeight = height10 *
|
|
416
|
+
const straightHeight = height10 * straightHeightRatio;
|
|
407
417
|
const taperHeight = height10 - straightHeight;
|
|
408
|
-
const taperInset = Math.min(width10, length) *
|
|
409
|
-
const faceWidth = Math.max(width10 - taperInset, width10 *
|
|
410
|
-
const faceLength = Math.max(length - taperInset, length *
|
|
411
|
-
const
|
|
412
|
-
const
|
|
413
|
-
const
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
] }),
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */ jsx11(Translate3, { z: straightHeight, children: /* @__PURE__ */ jsx11(Cuboid11, { size: [width10, length, 0.01] }) }),
|
|
424
|
-
/* @__PURE__ */ jsx11(Translate3, { z: straightHeight + taperHeight, children: /* @__PURE__ */ jsx11(Cuboid11, { size: [faceWidth, faceLength, 0.01] }) })
|
|
425
|
-
] })
|
|
418
|
+
const taperInset = Math.min(width10, length) * taperRatio;
|
|
419
|
+
const faceWidth = Math.max(width10 - taperInset, width10 * faceRatio);
|
|
420
|
+
const faceLength = Math.max(length - taperInset, length * faceRatio);
|
|
421
|
+
const defaultNotchRadius = Math.min(width10, length) * 0.12;
|
|
422
|
+
const actualNotchRadius = notchRadius ?? defaultNotchRadius;
|
|
423
|
+
const defaultNotchPosition = {
|
|
424
|
+
x: 0,
|
|
425
|
+
y: length / 2 - actualNotchRadius * 0.25,
|
|
426
|
+
z: height10
|
|
427
|
+
};
|
|
428
|
+
const actualNotchPosition = notchPosition ?? defaultNotchPosition;
|
|
429
|
+
const body = /* @__PURE__ */ jsxs11(Union2, { children: [
|
|
430
|
+
/* @__PURE__ */ jsxs11(Hull, { children: [
|
|
431
|
+
/* @__PURE__ */ jsx11(Translate3, { z: 5e-3, children: /* @__PURE__ */ jsx11(Cuboid11, { size: [faceWidth, faceLength, 0.01] }) }),
|
|
432
|
+
/* @__PURE__ */ jsx11(Translate3, { z: straightHeight, children: /* @__PURE__ */ jsx11(Cuboid11, { size: [width10, length, 0.01] }) })
|
|
426
433
|
] }),
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
|
|
434
|
+
/* @__PURE__ */ jsxs11(Hull, { children: [
|
|
435
|
+
/* @__PURE__ */ jsx11(Translate3, { z: straightHeight, children: /* @__PURE__ */ jsx11(Cuboid11, { size: [width10, length, 0.01] }) }),
|
|
436
|
+
/* @__PURE__ */ jsx11(Translate3, { z: straightHeight + taperHeight, children: /* @__PURE__ */ jsx11(Cuboid11, { size: [faceWidth, faceLength, 0.01] }) })
|
|
437
|
+
] })
|
|
438
|
+
] });
|
|
439
|
+
return /* @__PURE__ */ jsx11(Colorize2, { color, children: /* @__PURE__ */ jsx11(Translate3, { offset: center, children: /* @__PURE__ */ jsx11(Translate3, { offset: { x: 0, y: 0, z: heightAboveSurface2 }, children: includeNotch ? /* @__PURE__ */ jsxs11(Subtract, { children: [
|
|
440
|
+
body,
|
|
441
|
+
/* @__PURE__ */ jsx11(Translate3, { offset: actualNotchPosition, children: /* @__PURE__ */ jsx11(Rotate2, { rotation: notchRotation, children: /* @__PURE__ */ jsx11(Cylinder, { radius: notchLength, height: notchWidth }) }) })
|
|
442
|
+
] }) : body }) }) });
|
|
429
443
|
};
|
|
430
444
|
|
|
431
445
|
// lib/ExtrudedPads.tsx
|
|
@@ -443,7 +457,7 @@ var FootprintPad = ({ pad }) => {
|
|
|
443
457
|
};
|
|
444
458
|
|
|
445
459
|
// lib/FootprintPlatedHole.tsx
|
|
446
|
-
import { Colorize as Colorize4, Translate as Translate5, Cylinder as Cylinder2, Subtract as Subtract2 } from "jscad-fiber";
|
|
460
|
+
import { Colorize as Colorize4, Cuboid as Cuboid13, Translate as Translate5, Cylinder as Cylinder2, Subtract as Subtract2 } from "jscad-fiber";
|
|
447
461
|
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
448
462
|
var FootprintPlatedHole = ({ hole }) => {
|
|
449
463
|
if (hole.shape === "circle") {
|
|
@@ -452,6 +466,18 @@ var FootprintPlatedHole = ({ hole }) => {
|
|
|
452
466
|
/* @__PURE__ */ jsx13(Cylinder2, { radius: hole.hole_diameter / 2, height: 0.01 })
|
|
453
467
|
] }) }) });
|
|
454
468
|
}
|
|
469
|
+
if (hole.shape === "circular_hole_with_rect_pad") {
|
|
470
|
+
return /* @__PURE__ */ jsx13(Colorize4, { color: "#b87333", children: /* @__PURE__ */ jsx13(Translate5, { offset: [hole.x, hole.y, 0], children: /* @__PURE__ */ jsxs12(Subtract2, { children: [
|
|
471
|
+
/* @__PURE__ */ jsx13(
|
|
472
|
+
Cuboid13,
|
|
473
|
+
{
|
|
474
|
+
size: [hole.rect_pad_width, hole.rect_pad_width, 0.01],
|
|
475
|
+
center: [0, 0, 0]
|
|
476
|
+
}
|
|
477
|
+
),
|
|
478
|
+
/* @__PURE__ */ jsx13(Cylinder2, { radius: hole.hole_diameter / 2, height: 0.01 })
|
|
479
|
+
] }) }) });
|
|
480
|
+
}
|
|
455
481
|
throw new Error("Shape not supported: " + hole.shape);
|
|
456
482
|
};
|
|
457
483
|
|
|
@@ -2088,15 +2114,110 @@ var SOD923 = () => {
|
|
|
2088
2114
|
] });
|
|
2089
2115
|
};
|
|
2090
2116
|
|
|
2117
|
+
// lib/SOT-223.tsx
|
|
2118
|
+
import { Fragment as Fragment30, jsx as jsx34, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2119
|
+
var SOT223 = () => {
|
|
2120
|
+
const fullWidth = 6.6;
|
|
2121
|
+
const bodyWidth = 3.5;
|
|
2122
|
+
const bodyLength10 = 6.5;
|
|
2123
|
+
const bodyHeight = 1.7;
|
|
2124
|
+
const leadWidth = 0.7;
|
|
2125
|
+
const leftLeadWidth = 3;
|
|
2126
|
+
const leadThickness = 0.25;
|
|
2127
|
+
const leadHeight = 0.75;
|
|
2128
|
+
const padContactLength = 0.5;
|
|
2129
|
+
const padPitch = 2.3;
|
|
2130
|
+
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
2131
|
+
return /* @__PURE__ */ jsxs32(Fragment30, { children: [
|
|
2132
|
+
/* @__PURE__ */ jsx34(
|
|
2133
|
+
SmdChipLead,
|
|
2134
|
+
{
|
|
2135
|
+
rotation: Math.PI,
|
|
2136
|
+
position: {
|
|
2137
|
+
x: fullWidth / 2 + extendedBodyDistance / 4,
|
|
2138
|
+
y: 0,
|
|
2139
|
+
z: leadThickness / 2
|
|
2140
|
+
},
|
|
2141
|
+
width: leftLeadWidth,
|
|
2142
|
+
thickness: leadThickness,
|
|
2143
|
+
padContactLength,
|
|
2144
|
+
bodyDistance: extendedBodyDistance,
|
|
2145
|
+
height: leadHeight
|
|
2146
|
+
},
|
|
2147
|
+
4
|
|
2148
|
+
),
|
|
2149
|
+
/* @__PURE__ */ jsx34(
|
|
2150
|
+
SmdChipLead,
|
|
2151
|
+
{
|
|
2152
|
+
position: {
|
|
2153
|
+
x: -fullWidth / 2 - extendedBodyDistance / 4,
|
|
2154
|
+
y: 0,
|
|
2155
|
+
z: leadThickness / 2
|
|
2156
|
+
},
|
|
2157
|
+
width: leadWidth,
|
|
2158
|
+
thickness: leadThickness,
|
|
2159
|
+
padContactLength,
|
|
2160
|
+
bodyDistance: extendedBodyDistance,
|
|
2161
|
+
height: leadHeight
|
|
2162
|
+
},
|
|
2163
|
+
3
|
|
2164
|
+
),
|
|
2165
|
+
/* @__PURE__ */ jsx34(
|
|
2166
|
+
SmdChipLead,
|
|
2167
|
+
{
|
|
2168
|
+
position: {
|
|
2169
|
+
x: -fullWidth / 2 - extendedBodyDistance / 4,
|
|
2170
|
+
y: -padPitch,
|
|
2171
|
+
z: leadThickness / 2
|
|
2172
|
+
},
|
|
2173
|
+
width: leadWidth,
|
|
2174
|
+
thickness: leadThickness,
|
|
2175
|
+
padContactLength,
|
|
2176
|
+
bodyDistance: extendedBodyDistance,
|
|
2177
|
+
height: leadHeight
|
|
2178
|
+
},
|
|
2179
|
+
1
|
|
2180
|
+
),
|
|
2181
|
+
/* @__PURE__ */ jsx34(
|
|
2182
|
+
SmdChipLead,
|
|
2183
|
+
{
|
|
2184
|
+
position: {
|
|
2185
|
+
x: -fullWidth / 2 - extendedBodyDistance / 4,
|
|
2186
|
+
y: padPitch,
|
|
2187
|
+
z: leadThickness / 2
|
|
2188
|
+
},
|
|
2189
|
+
width: leadWidth,
|
|
2190
|
+
thickness: leadThickness,
|
|
2191
|
+
padContactLength,
|
|
2192
|
+
bodyDistance: extendedBodyDistance,
|
|
2193
|
+
height: leadHeight
|
|
2194
|
+
},
|
|
2195
|
+
2
|
|
2196
|
+
),
|
|
2197
|
+
/* @__PURE__ */ jsx34(
|
|
2198
|
+
ChipBody,
|
|
2199
|
+
{
|
|
2200
|
+
center: { x: 0, y: 0, z: 0 },
|
|
2201
|
+
width: bodyWidth,
|
|
2202
|
+
length: bodyLength10,
|
|
2203
|
+
height: bodyHeight,
|
|
2204
|
+
includeNotch: false,
|
|
2205
|
+
taperRatio: 0.06,
|
|
2206
|
+
straightHeightRatio: 0.45
|
|
2207
|
+
}
|
|
2208
|
+
)
|
|
2209
|
+
] });
|
|
2210
|
+
};
|
|
2211
|
+
|
|
2091
2212
|
// lib/Footprinter3d.tsx
|
|
2092
|
-
import { jsx as
|
|
2213
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2093
2214
|
var Footprinter3d = ({ footprint }) => {
|
|
2094
2215
|
const fpJson = fp3.string(footprint).json();
|
|
2095
2216
|
switch (fpJson.fn) {
|
|
2096
2217
|
case "dip":
|
|
2097
|
-
return /* @__PURE__ */
|
|
2218
|
+
return /* @__PURE__ */ jsx35(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
2098
2219
|
case "tssop":
|
|
2099
|
-
return /* @__PURE__ */
|
|
2220
|
+
return /* @__PURE__ */ jsx35(
|
|
2100
2221
|
Tssop,
|
|
2101
2222
|
{
|
|
2102
2223
|
pinCount: fpJson.num_pins,
|
|
@@ -2107,7 +2228,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2107
2228
|
}
|
|
2108
2229
|
);
|
|
2109
2230
|
case "vssop":
|
|
2110
|
-
return /* @__PURE__ */
|
|
2231
|
+
return /* @__PURE__ */ jsx35(
|
|
2111
2232
|
VSSOP,
|
|
2112
2233
|
{
|
|
2113
2234
|
pinCount: fpJson.num_pins,
|
|
@@ -2119,7 +2240,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2119
2240
|
}
|
|
2120
2241
|
);
|
|
2121
2242
|
case "qfp":
|
|
2122
|
-
return /* @__PURE__ */
|
|
2243
|
+
return /* @__PURE__ */ jsx35(
|
|
2123
2244
|
QFP,
|
|
2124
2245
|
{
|
|
2125
2246
|
pinCount: fpJson.num_pins,
|
|
@@ -2131,7 +2252,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2131
2252
|
);
|
|
2132
2253
|
case "qfn":
|
|
2133
2254
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
2134
|
-
return /* @__PURE__ */
|
|
2255
|
+
return /* @__PURE__ */ jsx35(
|
|
2135
2256
|
qfn_default,
|
|
2136
2257
|
{
|
|
2137
2258
|
num_pins: fpJson.num_pins,
|
|
@@ -2148,35 +2269,37 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2148
2269
|
);
|
|
2149
2270
|
case "pinrow":
|
|
2150
2271
|
if (fpJson.male)
|
|
2151
|
-
return /* @__PURE__ */
|
|
2272
|
+
return /* @__PURE__ */ jsx35(PinRow, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
|
|
2152
2273
|
if (fpJson.female)
|
|
2153
|
-
return /* @__PURE__ */
|
|
2274
|
+
return /* @__PURE__ */ jsx35(FemaleHeader, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
|
|
2154
2275
|
case "cap": {
|
|
2155
2276
|
switch (fpJson.imperial) {
|
|
2156
2277
|
case "0402":
|
|
2157
|
-
return /* @__PURE__ */
|
|
2278
|
+
return /* @__PURE__ */ jsx35(A0402, { color: "#856c4d" });
|
|
2158
2279
|
case "0603":
|
|
2159
|
-
return /* @__PURE__ */
|
|
2280
|
+
return /* @__PURE__ */ jsx35(A0603, { color: "#856c4d" });
|
|
2160
2281
|
case "0805":
|
|
2161
|
-
return /* @__PURE__ */
|
|
2282
|
+
return /* @__PURE__ */ jsx35(A0805, { color: "#856c4d" });
|
|
2162
2283
|
case "0201":
|
|
2163
|
-
return /* @__PURE__ */
|
|
2284
|
+
return /* @__PURE__ */ jsx35(A0201, { color: "#856c4d" });
|
|
2164
2285
|
case "01005":
|
|
2165
|
-
return /* @__PURE__ */
|
|
2286
|
+
return /* @__PURE__ */ jsx35(A01005, { color: "#856c4d" });
|
|
2166
2287
|
case "1206":
|
|
2167
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ jsx35(A1206, { color: "#856c4d" });
|
|
2168
2289
|
case "1210":
|
|
2169
|
-
return /* @__PURE__ */
|
|
2290
|
+
return /* @__PURE__ */ jsx35(A1210, { color: "#856c4d" });
|
|
2170
2291
|
case "2010":
|
|
2171
|
-
return /* @__PURE__ */
|
|
2292
|
+
return /* @__PURE__ */ jsx35(A2010, { color: "#856c4d" });
|
|
2172
2293
|
case "2512":
|
|
2173
|
-
return /* @__PURE__ */
|
|
2294
|
+
return /* @__PURE__ */ jsx35(A2512, { color: "#856c4d" });
|
|
2174
2295
|
}
|
|
2175
2296
|
}
|
|
2176
2297
|
case "sot235":
|
|
2177
|
-
return /* @__PURE__ */
|
|
2298
|
+
return /* @__PURE__ */ jsx35(SOT_235_default, {});
|
|
2299
|
+
case "sot223":
|
|
2300
|
+
return /* @__PURE__ */ jsx35(SOT223, {});
|
|
2178
2301
|
case "pushbutton":
|
|
2179
|
-
return /* @__PURE__ */
|
|
2302
|
+
return /* @__PURE__ */ jsx35(
|
|
2180
2303
|
PushButton,
|
|
2181
2304
|
{
|
|
2182
2305
|
width: fpJson.w,
|
|
@@ -2185,7 +2308,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2185
2308
|
}
|
|
2186
2309
|
);
|
|
2187
2310
|
case "soic":
|
|
2188
|
-
return /* @__PURE__ */
|
|
2311
|
+
return /* @__PURE__ */ jsx35(
|
|
2189
2312
|
SOIC,
|
|
2190
2313
|
{
|
|
2191
2314
|
pinCount: fpJson.num_pins,
|
|
@@ -2196,49 +2319,49 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2196
2319
|
}
|
|
2197
2320
|
);
|
|
2198
2321
|
case "sod523":
|
|
2199
|
-
return /* @__PURE__ */
|
|
2322
|
+
return /* @__PURE__ */ jsx35(SOD523, {});
|
|
2200
2323
|
case "sma":
|
|
2201
|
-
return /* @__PURE__ */
|
|
2324
|
+
return /* @__PURE__ */ jsx35(SMA, {});
|
|
2202
2325
|
case "smb":
|
|
2203
|
-
return /* @__PURE__ */
|
|
2326
|
+
return /* @__PURE__ */ jsx35(SMB, {});
|
|
2204
2327
|
case "smc":
|
|
2205
|
-
return /* @__PURE__ */
|
|
2328
|
+
return /* @__PURE__ */ jsx35(SMC, {});
|
|
2206
2329
|
case "smf":
|
|
2207
|
-
return /* @__PURE__ */
|
|
2330
|
+
return /* @__PURE__ */ jsx35(SMF, {});
|
|
2208
2331
|
case "sod123f":
|
|
2209
|
-
return /* @__PURE__ */
|
|
2332
|
+
return /* @__PURE__ */ jsx35(SOD123F, {});
|
|
2210
2333
|
case "sod123fl":
|
|
2211
|
-
return /* @__PURE__ */
|
|
2334
|
+
return /* @__PURE__ */ jsx35(SOD123FL, {});
|
|
2212
2335
|
case "sod923":
|
|
2213
|
-
return /* @__PURE__ */
|
|
2336
|
+
return /* @__PURE__ */ jsx35(SOD923, {});
|
|
2214
2337
|
}
|
|
2215
2338
|
const colorMatch = footprint.match(/_color\(([^)]+)\)/);
|
|
2216
2339
|
const color = colorMatch ? colorMatch[1] : void 0;
|
|
2217
2340
|
switch (fpJson.imperial) {
|
|
2218
2341
|
case "0402":
|
|
2219
|
-
return /* @__PURE__ */
|
|
2342
|
+
return /* @__PURE__ */ jsx35(A0402, { color });
|
|
2220
2343
|
case "0603":
|
|
2221
|
-
return /* @__PURE__ */
|
|
2344
|
+
return /* @__PURE__ */ jsx35(A0603, { color });
|
|
2222
2345
|
case "0805":
|
|
2223
|
-
return /* @__PURE__ */
|
|
2346
|
+
return /* @__PURE__ */ jsx35(A0805, { color });
|
|
2224
2347
|
case "0201":
|
|
2225
|
-
return /* @__PURE__ */
|
|
2348
|
+
return /* @__PURE__ */ jsx35(A0201, { color });
|
|
2226
2349
|
case "01005":
|
|
2227
|
-
return /* @__PURE__ */
|
|
2350
|
+
return /* @__PURE__ */ jsx35(A01005, { color });
|
|
2228
2351
|
case "1206":
|
|
2229
|
-
return /* @__PURE__ */
|
|
2352
|
+
return /* @__PURE__ */ jsx35(A1206, { color });
|
|
2230
2353
|
case "1210":
|
|
2231
|
-
return /* @__PURE__ */
|
|
2354
|
+
return /* @__PURE__ */ jsx35(A1210, { color });
|
|
2232
2355
|
case "2010":
|
|
2233
|
-
return /* @__PURE__ */
|
|
2356
|
+
return /* @__PURE__ */ jsx35(A2010, { color });
|
|
2234
2357
|
case "2512":
|
|
2235
|
-
return /* @__PURE__ */
|
|
2358
|
+
return /* @__PURE__ */ jsx35(A2512, { color });
|
|
2236
2359
|
}
|
|
2237
2360
|
return null;
|
|
2238
2361
|
};
|
|
2239
2362
|
|
|
2240
2363
|
// lib/SOT-23-3P.tsx
|
|
2241
|
-
import { Fragment as
|
|
2364
|
+
import { Fragment as Fragment31, jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2242
2365
|
var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
2243
2366
|
const bodyWidth = 1.3;
|
|
2244
2367
|
const bodyLength10 = 2.9;
|
|
@@ -2249,8 +2372,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
2249
2372
|
const padContactLength = 0.4;
|
|
2250
2373
|
const padThickness = leadThickness / 2;
|
|
2251
2374
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
2252
|
-
return /* @__PURE__ */
|
|
2253
|
-
/* @__PURE__ */
|
|
2375
|
+
return /* @__PURE__ */ jsxs33(Fragment31, { children: [
|
|
2376
|
+
/* @__PURE__ */ jsx36(
|
|
2254
2377
|
SmdChipLead,
|
|
2255
2378
|
{
|
|
2256
2379
|
rotation: Math.PI,
|
|
@@ -2267,7 +2390,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
2267
2390
|
},
|
|
2268
2391
|
1
|
|
2269
2392
|
),
|
|
2270
|
-
/* @__PURE__ */
|
|
2393
|
+
/* @__PURE__ */ jsx36(
|
|
2271
2394
|
SmdChipLead,
|
|
2272
2395
|
{
|
|
2273
2396
|
rotation: Math.PI,
|
|
@@ -2284,7 +2407,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
2284
2407
|
},
|
|
2285
2408
|
2
|
|
2286
2409
|
),
|
|
2287
|
-
/* @__PURE__ */
|
|
2410
|
+
/* @__PURE__ */ jsx36(
|
|
2288
2411
|
SmdChipLead,
|
|
2289
2412
|
{
|
|
2290
2413
|
position: {
|
|
@@ -2300,7 +2423,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
2300
2423
|
},
|
|
2301
2424
|
3
|
|
2302
2425
|
),
|
|
2303
|
-
/* @__PURE__ */
|
|
2426
|
+
/* @__PURE__ */ jsx36(
|
|
2304
2427
|
ChipBody,
|
|
2305
2428
|
{
|
|
2306
2429
|
center: { x: 0, y: 0, z: 0 },
|
|
@@ -2314,7 +2437,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
2314
2437
|
|
|
2315
2438
|
// lib/SOT-563.tsx
|
|
2316
2439
|
import { Cuboid as Cuboid26, Translate as Translate17, Rotate as Rotate6, Colorize as Colorize18 } from "jscad-fiber";
|
|
2317
|
-
import { Fragment as
|
|
2440
|
+
import { Fragment as Fragment32, jsx as jsx37, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2318
2441
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
2319
2442
|
const bodyWidth = 1.2;
|
|
2320
2443
|
const bodyLength10 = 1.6;
|
|
@@ -2324,11 +2447,11 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2324
2447
|
const leadHeight = 0.13;
|
|
2325
2448
|
const leadSpacing = 0.5;
|
|
2326
2449
|
const bodyZOffset = -0.4;
|
|
2327
|
-
return /* @__PURE__ */
|
|
2328
|
-
/* @__PURE__ */
|
|
2450
|
+
return /* @__PURE__ */ jsxs34(Fragment32, { children: [
|
|
2451
|
+
/* @__PURE__ */ jsx37(Rotate6, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx37(Translate17, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx37(Colorize18, { color: "grey", children: /* @__PURE__ */ jsx37(Cuboid26, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
2329
2452
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
2330
2453
|
// Left lead
|
|
2331
|
-
/* @__PURE__ */
|
|
2454
|
+
/* @__PURE__ */ jsx37(
|
|
2332
2455
|
Translate17,
|
|
2333
2456
|
{
|
|
2334
2457
|
center: [
|
|
@@ -2336,16 +2459,16 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2336
2459
|
yOffset * leadSpacing,
|
|
2337
2460
|
leadHeight / 2
|
|
2338
2461
|
],
|
|
2339
|
-
children: /* @__PURE__ */
|
|
2462
|
+
children: /* @__PURE__ */ jsx37(Cuboid26, { size: [leadLength, leadWidth, leadHeight] })
|
|
2340
2463
|
},
|
|
2341
2464
|
`left-${index}`
|
|
2342
2465
|
),
|
|
2343
2466
|
// Right lead
|
|
2344
|
-
/* @__PURE__ */
|
|
2467
|
+
/* @__PURE__ */ jsx37(
|
|
2345
2468
|
Translate17,
|
|
2346
2469
|
{
|
|
2347
2470
|
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
|
|
2348
|
-
children: /* @__PURE__ */
|
|
2471
|
+
children: /* @__PURE__ */ jsx37(Cuboid26, { size: [leadLength, leadWidth, leadHeight] })
|
|
2349
2472
|
},
|
|
2350
2473
|
`right-${index}`
|
|
2351
2474
|
)
|
|
@@ -2355,7 +2478,7 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2355
2478
|
|
|
2356
2479
|
// lib/SOT-723.tsx
|
|
2357
2480
|
import { Cuboid as Cuboid27, Translate as Translate18, Rotate as Rotate7, Colorize as Colorize19 } from "jscad-fiber";
|
|
2358
|
-
import { Fragment as
|
|
2481
|
+
import { Fragment as Fragment33, jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2359
2482
|
var getCcwSot723Coords = (pn) => {
|
|
2360
2483
|
if (pn === 1) {
|
|
2361
2484
|
return { x: 0, y: 0 };
|
|
@@ -2373,11 +2496,11 @@ var SOT723 = () => {
|
|
|
2373
2496
|
const leadLength = 0.3;
|
|
2374
2497
|
const leadHeight = 0.1;
|
|
2375
2498
|
const centerLeadWidth = 0.42;
|
|
2376
|
-
return /* @__PURE__ */
|
|
2377
|
-
/* @__PURE__ */
|
|
2499
|
+
return /* @__PURE__ */ jsxs35(Fragment33, { children: [
|
|
2500
|
+
/* @__PURE__ */ jsx38(Rotate7, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx38(Translate18, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ jsx38(Colorize19, { color: "grey", children: /* @__PURE__ */ jsx38(Cuboid27, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
2378
2501
|
[1, 2, 3].map((pn) => {
|
|
2379
2502
|
const { x, y } = getCcwSot723Coords(pn);
|
|
2380
|
-
return /* @__PURE__ */
|
|
2503
|
+
return /* @__PURE__ */ jsx38(Translate18, { center: [x, y, 0], children: /* @__PURE__ */ jsx38(
|
|
2381
2504
|
Cuboid27,
|
|
2382
2505
|
{
|
|
2383
2506
|
size: [
|
|
@@ -2392,7 +2515,7 @@ var SOT723 = () => {
|
|
|
2392
2515
|
};
|
|
2393
2516
|
|
|
2394
2517
|
// lib/sod-123.tsx
|
|
2395
|
-
import { Fragment as
|
|
2518
|
+
import { Fragment as Fragment34, jsx as jsx39, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2396
2519
|
var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
2397
2520
|
const bodyWidth = 2.9;
|
|
2398
2521
|
const bodyLength10 = 1.3;
|
|
@@ -2403,8 +2526,8 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2403
2526
|
const padContactLength = 0.4;
|
|
2404
2527
|
const padThickness = leadThickness / 2;
|
|
2405
2528
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
2406
|
-
return /* @__PURE__ */
|
|
2407
|
-
/* @__PURE__ */
|
|
2529
|
+
return /* @__PURE__ */ jsxs36(Fragment34, { children: [
|
|
2530
|
+
/* @__PURE__ */ jsx39(
|
|
2408
2531
|
SmdChipLead,
|
|
2409
2532
|
{
|
|
2410
2533
|
position: {
|
|
@@ -2420,7 +2543,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2420
2543
|
},
|
|
2421
2544
|
1
|
|
2422
2545
|
),
|
|
2423
|
-
/* @__PURE__ */
|
|
2546
|
+
/* @__PURE__ */ jsx39(
|
|
2424
2547
|
SmdChipLead,
|
|
2425
2548
|
{
|
|
2426
2549
|
rotation: Math.PI,
|
|
@@ -2437,7 +2560,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2437
2560
|
},
|
|
2438
2561
|
2
|
|
2439
2562
|
),
|
|
2440
|
-
/* @__PURE__ */
|
|
2563
|
+
/* @__PURE__ */ jsx39(
|
|
2441
2564
|
ChipBody,
|
|
2442
2565
|
{
|
|
2443
2566
|
center: { x: 0, y: 0, z: 0 },
|
|
@@ -2476,6 +2599,7 @@ export {
|
|
|
2476
2599
|
SOD123FL,
|
|
2477
2600
|
SOD523,
|
|
2478
2601
|
SOD923,
|
|
2602
|
+
SOT223,
|
|
2479
2603
|
SOT233P,
|
|
2480
2604
|
SOT563,
|
|
2481
2605
|
SOT723,
|