jscad-electronics 0.0.70 → 0.0.72
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 +7 -2
- package/dist/index.js +271 -63
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +207 -3
- package/dist/vanilla.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -75,8 +75,9 @@ interface ChipBodyProps {
|
|
|
75
75
|
notchRotation?: [number, number, number];
|
|
76
76
|
notchLength?: number;
|
|
77
77
|
notchWidth?: number;
|
|
78
|
+
chamferSize?: number;
|
|
78
79
|
}
|
|
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;
|
|
80
|
+
declare const ChipBody: ({ center, width, length, height, heightAboveSurface, color, taperRatio, faceRatio, straightHeightRatio, includeNotch, notchRadius, notchPosition, notchRotation, notchLength, notchWidth, chamferSize, }: ChipBodyProps) => react_jsx_runtime.JSX.Element;
|
|
80
81
|
|
|
81
82
|
declare const ExtrudedPads: ({ circuitJson, footprint, }: {
|
|
82
83
|
circuitJson?: AnyCircuitElement[];
|
|
@@ -170,6 +171,8 @@ declare const QFP: ({ pinCount, pitch, leadWidth, padContactLength, bodyWidth, }
|
|
|
170
171
|
bodyWidth?: number;
|
|
171
172
|
}) => react_jsx_runtime.JSX.Element;
|
|
172
173
|
|
|
174
|
+
declare const TQFP: () => react_jsx_runtime.JSX.Element;
|
|
175
|
+
|
|
173
176
|
declare const SOD123: ({ fullWidth, fullLength }: {
|
|
174
177
|
fullWidth?: number | undefined;
|
|
175
178
|
fullLength?: number | undefined;
|
|
@@ -199,4 +202,6 @@ declare const SOD923: () => react_jsx_runtime.JSX.Element;
|
|
|
199
202
|
|
|
200
203
|
declare const SOT223: () => react_jsx_runtime.JSX.Element;
|
|
201
204
|
|
|
202
|
-
|
|
205
|
+
declare const SOT323: () => react_jsx_runtime.JSX.Element;
|
|
206
|
+
|
|
207
|
+
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, SOT323, SOT563, SOT723, SmdChipLead, type SmdChipLeadProps, TQFP, Tssop, VSSOP };
|
package/dist/index.js
CHANGED
|
@@ -411,7 +411,8 @@ var ChipBody = ({
|
|
|
411
411
|
notchPosition,
|
|
412
412
|
notchRotation = [0, 0, 0],
|
|
413
413
|
notchLength = 0.5,
|
|
414
|
-
notchWidth = 0.25
|
|
414
|
+
notchWidth = 0.25,
|
|
415
|
+
chamferSize = 0
|
|
415
416
|
}) => {
|
|
416
417
|
const straightHeight = height10 * straightHeightRatio;
|
|
417
418
|
const taperHeight = height10 - straightHeight;
|
|
@@ -436,10 +437,32 @@ var ChipBody = ({
|
|
|
436
437
|
/* @__PURE__ */ jsx11(Translate3, { z: straightHeight + taperHeight, children: /* @__PURE__ */ jsx11(Cuboid11, { size: [faceWidth, faceLength, 0.01] }) })
|
|
437
438
|
] })
|
|
438
439
|
] });
|
|
440
|
+
const chamferCutout = (xPos, yPos) => /* @__PURE__ */ jsx11(Translate3, { offset: { x: xPos, y: yPos, z: 0 }, children: /* @__PURE__ */ jsx11(Rotate2, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx11(
|
|
441
|
+
Cuboid11,
|
|
442
|
+
{
|
|
443
|
+
size: [
|
|
444
|
+
chamferSize * Math.SQRT2,
|
|
445
|
+
chamferSize * Math.SQRT2,
|
|
446
|
+
height10 * 3
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
) }) });
|
|
450
|
+
let finalBody = body;
|
|
451
|
+
if (chamferSize > 0) {
|
|
452
|
+
const xOffset = width10 / 2;
|
|
453
|
+
const yOffset = length / 2;
|
|
454
|
+
finalBody = /* @__PURE__ */ jsxs11(Subtract, { children: [
|
|
455
|
+
body,
|
|
456
|
+
chamferCutout(xOffset, yOffset),
|
|
457
|
+
chamferCutout(-xOffset, yOffset),
|
|
458
|
+
chamferCutout(xOffset, -yOffset),
|
|
459
|
+
chamferCutout(-xOffset, -yOffset)
|
|
460
|
+
] });
|
|
461
|
+
}
|
|
439
462
|
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
|
-
|
|
463
|
+
finalBody,
|
|
441
464
|
/* @__PURE__ */ jsx11(Translate3, { offset: actualNotchPosition, children: /* @__PURE__ */ jsx11(Rotate2, { rotation: notchRotation, children: /* @__PURE__ */ jsx11(Cylinder, { radius: notchLength, height: notchWidth }) }) })
|
|
442
|
-
] }) :
|
|
465
|
+
] }) : finalBody }) }) });
|
|
443
466
|
};
|
|
444
467
|
|
|
445
468
|
// lib/ExtrudedPads.tsx
|
|
@@ -2209,15 +2232,194 @@ var SOT223 = () => {
|
|
|
2209
2232
|
] });
|
|
2210
2233
|
};
|
|
2211
2234
|
|
|
2235
|
+
// lib/tqfp.tsx
|
|
2236
|
+
import { Fragment as Fragment31, jsx as jsx35, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2237
|
+
var TQFP = () => {
|
|
2238
|
+
const pinCount = 64;
|
|
2239
|
+
const pitch = 0.5;
|
|
2240
|
+
const leadWidth = 0.2;
|
|
2241
|
+
const padContactLength = 0.45;
|
|
2242
|
+
const bodyWidth = 9;
|
|
2243
|
+
const sidePinCount = pinCount / 4;
|
|
2244
|
+
const bodyLength10 = bodyWidth;
|
|
2245
|
+
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
2246
|
+
const fullLength10 = bodyLength10 + 2 * padContactLength + 0.6;
|
|
2247
|
+
const fullWidth = fullLength10;
|
|
2248
|
+
const leadHeight = 0.8;
|
|
2249
|
+
const leadThickness = 0.25;
|
|
2250
|
+
const bodyDistance = (fullWidth - bodyWidth) / 2 + 0.2;
|
|
2251
|
+
return /* @__PURE__ */ jsxs33(Fragment31, { children: [
|
|
2252
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx35(
|
|
2253
|
+
SmdChipLead,
|
|
2254
|
+
{
|
|
2255
|
+
position: {
|
|
2256
|
+
x: -fullWidth / 2,
|
|
2257
|
+
y: i * pitch - pinOffsetToCenter,
|
|
2258
|
+
z: leadThickness / 2
|
|
2259
|
+
},
|
|
2260
|
+
width: leadWidth,
|
|
2261
|
+
thickness: leadThickness,
|
|
2262
|
+
padContactLength,
|
|
2263
|
+
bodyDistance,
|
|
2264
|
+
height: leadHeight
|
|
2265
|
+
},
|
|
2266
|
+
`left-${i}`
|
|
2267
|
+
)),
|
|
2268
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx35(
|
|
2269
|
+
SmdChipLead,
|
|
2270
|
+
{
|
|
2271
|
+
rotation: Math.PI,
|
|
2272
|
+
position: {
|
|
2273
|
+
x: fullWidth / 2,
|
|
2274
|
+
y: i * pitch - pinOffsetToCenter,
|
|
2275
|
+
z: leadThickness / 2
|
|
2276
|
+
},
|
|
2277
|
+
width: leadWidth,
|
|
2278
|
+
thickness: leadThickness,
|
|
2279
|
+
padContactLength,
|
|
2280
|
+
bodyDistance,
|
|
2281
|
+
height: leadHeight
|
|
2282
|
+
},
|
|
2283
|
+
`right-${i}`
|
|
2284
|
+
)),
|
|
2285
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx35(
|
|
2286
|
+
SmdChipLead,
|
|
2287
|
+
{
|
|
2288
|
+
rotation: Math.PI / 2,
|
|
2289
|
+
position: {
|
|
2290
|
+
x: i * pitch - pinOffsetToCenter,
|
|
2291
|
+
y: -fullLength10 / 2,
|
|
2292
|
+
z: leadThickness / 2
|
|
2293
|
+
},
|
|
2294
|
+
width: leadWidth,
|
|
2295
|
+
thickness: leadThickness,
|
|
2296
|
+
padContactLength,
|
|
2297
|
+
bodyDistance,
|
|
2298
|
+
height: leadHeight
|
|
2299
|
+
},
|
|
2300
|
+
`bottom-${i}`
|
|
2301
|
+
)),
|
|
2302
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx35(
|
|
2303
|
+
SmdChipLead,
|
|
2304
|
+
{
|
|
2305
|
+
rotation: -Math.PI / 2,
|
|
2306
|
+
position: {
|
|
2307
|
+
x: i * pitch - pinOffsetToCenter,
|
|
2308
|
+
y: fullLength10 / 2,
|
|
2309
|
+
z: leadThickness / 2
|
|
2310
|
+
},
|
|
2311
|
+
width: leadWidth,
|
|
2312
|
+
thickness: leadThickness,
|
|
2313
|
+
padContactLength,
|
|
2314
|
+
bodyDistance,
|
|
2315
|
+
height: leadHeight
|
|
2316
|
+
},
|
|
2317
|
+
`top-${i}`
|
|
2318
|
+
)),
|
|
2319
|
+
/* @__PURE__ */ jsx35(
|
|
2320
|
+
ChipBody,
|
|
2321
|
+
{
|
|
2322
|
+
center: { x: 0, y: 0, z: leadThickness / 2 },
|
|
2323
|
+
width: bodyWidth,
|
|
2324
|
+
length: bodyLength10,
|
|
2325
|
+
height: 1.2,
|
|
2326
|
+
chamferSize: 0.6,
|
|
2327
|
+
taperRatio: 0.05,
|
|
2328
|
+
notchPosition: { x: 3.5, y: 3.5, z: 1.2 }
|
|
2329
|
+
}
|
|
2330
|
+
)
|
|
2331
|
+
] });
|
|
2332
|
+
};
|
|
2333
|
+
var tqfp_default = TQFP;
|
|
2334
|
+
|
|
2335
|
+
// lib/SOT-323.tsx
|
|
2336
|
+
import { Fragment as Fragment32, jsx as jsx36, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2337
|
+
var SOT323 = () => {
|
|
2338
|
+
const fullWidth = 2.05;
|
|
2339
|
+
const bodyWidth = 1.25;
|
|
2340
|
+
const bodyLength10 = 2;
|
|
2341
|
+
const bodyHeight = 0.9;
|
|
2342
|
+
const leadWidth = 0.3;
|
|
2343
|
+
const leadThickness = 0.18;
|
|
2344
|
+
const leadHeight = 0.65;
|
|
2345
|
+
const padContactLength = 0.2;
|
|
2346
|
+
const padPitch = 0.65;
|
|
2347
|
+
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
2348
|
+
return /* @__PURE__ */ jsxs34(Fragment32, { children: [
|
|
2349
|
+
/* @__PURE__ */ jsx36(
|
|
2350
|
+
SmdChipLead,
|
|
2351
|
+
{
|
|
2352
|
+
rotation: Math.PI,
|
|
2353
|
+
position: {
|
|
2354
|
+
x: fullWidth / 2 + extendedBodyDistance / 4,
|
|
2355
|
+
y: 0,
|
|
2356
|
+
z: leadThickness / 2
|
|
2357
|
+
},
|
|
2358
|
+
width: leadWidth,
|
|
2359
|
+
thickness: leadThickness,
|
|
2360
|
+
padContactLength,
|
|
2361
|
+
bodyDistance: extendedBodyDistance,
|
|
2362
|
+
height: leadHeight
|
|
2363
|
+
},
|
|
2364
|
+
4
|
|
2365
|
+
),
|
|
2366
|
+
/* @__PURE__ */ jsx36(
|
|
2367
|
+
SmdChipLead,
|
|
2368
|
+
{
|
|
2369
|
+
position: {
|
|
2370
|
+
x: -fullWidth / 2 - extendedBodyDistance / 4,
|
|
2371
|
+
y: -padPitch,
|
|
2372
|
+
z: leadThickness / 2
|
|
2373
|
+
},
|
|
2374
|
+
width: leadWidth,
|
|
2375
|
+
thickness: leadThickness,
|
|
2376
|
+
padContactLength,
|
|
2377
|
+
bodyDistance: extendedBodyDistance,
|
|
2378
|
+
height: leadHeight
|
|
2379
|
+
},
|
|
2380
|
+
1
|
|
2381
|
+
),
|
|
2382
|
+
/* @__PURE__ */ jsx36(
|
|
2383
|
+
SmdChipLead,
|
|
2384
|
+
{
|
|
2385
|
+
position: {
|
|
2386
|
+
x: -fullWidth / 2 - extendedBodyDistance / 4,
|
|
2387
|
+
y: padPitch,
|
|
2388
|
+
z: leadThickness / 2
|
|
2389
|
+
},
|
|
2390
|
+
width: leadWidth,
|
|
2391
|
+
thickness: leadThickness,
|
|
2392
|
+
padContactLength,
|
|
2393
|
+
bodyDistance: extendedBodyDistance,
|
|
2394
|
+
height: leadHeight
|
|
2395
|
+
},
|
|
2396
|
+
2
|
|
2397
|
+
),
|
|
2398
|
+
/* @__PURE__ */ jsx36(
|
|
2399
|
+
ChipBody,
|
|
2400
|
+
{
|
|
2401
|
+
center: { x: 0, y: 0, z: 0 },
|
|
2402
|
+
width: bodyWidth,
|
|
2403
|
+
length: bodyLength10,
|
|
2404
|
+
height: bodyHeight,
|
|
2405
|
+
includeNotch: false,
|
|
2406
|
+
taperRatio: 0.06,
|
|
2407
|
+
straightHeightRatio: 0.7,
|
|
2408
|
+
heightAboveSurface: 0.05
|
|
2409
|
+
}
|
|
2410
|
+
)
|
|
2411
|
+
] });
|
|
2412
|
+
};
|
|
2413
|
+
|
|
2212
2414
|
// lib/Footprinter3d.tsx
|
|
2213
|
-
import { jsx as
|
|
2415
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2214
2416
|
var Footprinter3d = ({ footprint }) => {
|
|
2215
2417
|
const fpJson = fp3.string(footprint).json();
|
|
2216
2418
|
switch (fpJson.fn) {
|
|
2217
2419
|
case "dip":
|
|
2218
|
-
return /* @__PURE__ */
|
|
2420
|
+
return /* @__PURE__ */ jsx37(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
2219
2421
|
case "tssop":
|
|
2220
|
-
return /* @__PURE__ */
|
|
2422
|
+
return /* @__PURE__ */ jsx37(
|
|
2221
2423
|
Tssop,
|
|
2222
2424
|
{
|
|
2223
2425
|
pinCount: fpJson.num_pins,
|
|
@@ -2228,7 +2430,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2228
2430
|
}
|
|
2229
2431
|
);
|
|
2230
2432
|
case "vssop":
|
|
2231
|
-
return /* @__PURE__ */
|
|
2433
|
+
return /* @__PURE__ */ jsx37(
|
|
2232
2434
|
VSSOP,
|
|
2233
2435
|
{
|
|
2234
2436
|
pinCount: fpJson.num_pins,
|
|
@@ -2240,7 +2442,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2240
2442
|
}
|
|
2241
2443
|
);
|
|
2242
2444
|
case "qfp":
|
|
2243
|
-
return /* @__PURE__ */
|
|
2445
|
+
return /* @__PURE__ */ jsx37(
|
|
2244
2446
|
QFP,
|
|
2245
2447
|
{
|
|
2246
2448
|
pinCount: fpJson.num_pins,
|
|
@@ -2250,9 +2452,11 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2250
2452
|
bodyWidth: fpJson.w
|
|
2251
2453
|
}
|
|
2252
2454
|
);
|
|
2455
|
+
case "tqfp":
|
|
2456
|
+
return /* @__PURE__ */ jsx37(tqfp_default, {});
|
|
2253
2457
|
case "qfn":
|
|
2254
2458
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
2255
|
-
return /* @__PURE__ */
|
|
2459
|
+
return /* @__PURE__ */ jsx37(
|
|
2256
2460
|
qfn_default,
|
|
2257
2461
|
{
|
|
2258
2462
|
num_pins: fpJson.num_pins,
|
|
@@ -2269,37 +2473,39 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2269
2473
|
);
|
|
2270
2474
|
case "pinrow":
|
|
2271
2475
|
if (fpJson.male)
|
|
2272
|
-
return /* @__PURE__ */
|
|
2476
|
+
return /* @__PURE__ */ jsx37(PinRow, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
|
|
2273
2477
|
if (fpJson.female)
|
|
2274
|
-
return /* @__PURE__ */
|
|
2478
|
+
return /* @__PURE__ */ jsx37(FemaleHeader, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
|
|
2275
2479
|
case "cap": {
|
|
2276
2480
|
switch (fpJson.imperial) {
|
|
2277
2481
|
case "0402":
|
|
2278
|
-
return /* @__PURE__ */
|
|
2482
|
+
return /* @__PURE__ */ jsx37(A0402, { color: "#856c4d" });
|
|
2279
2483
|
case "0603":
|
|
2280
|
-
return /* @__PURE__ */
|
|
2484
|
+
return /* @__PURE__ */ jsx37(A0603, { color: "#856c4d" });
|
|
2281
2485
|
case "0805":
|
|
2282
|
-
return /* @__PURE__ */
|
|
2486
|
+
return /* @__PURE__ */ jsx37(A0805, { color: "#856c4d" });
|
|
2283
2487
|
case "0201":
|
|
2284
|
-
return /* @__PURE__ */
|
|
2488
|
+
return /* @__PURE__ */ jsx37(A0201, { color: "#856c4d" });
|
|
2285
2489
|
case "01005":
|
|
2286
|
-
return /* @__PURE__ */
|
|
2490
|
+
return /* @__PURE__ */ jsx37(A01005, { color: "#856c4d" });
|
|
2287
2491
|
case "1206":
|
|
2288
|
-
return /* @__PURE__ */
|
|
2492
|
+
return /* @__PURE__ */ jsx37(A1206, { color: "#856c4d" });
|
|
2289
2493
|
case "1210":
|
|
2290
|
-
return /* @__PURE__ */
|
|
2494
|
+
return /* @__PURE__ */ jsx37(A1210, { color: "#856c4d" });
|
|
2291
2495
|
case "2010":
|
|
2292
|
-
return /* @__PURE__ */
|
|
2496
|
+
return /* @__PURE__ */ jsx37(A2010, { color: "#856c4d" });
|
|
2293
2497
|
case "2512":
|
|
2294
|
-
return /* @__PURE__ */
|
|
2498
|
+
return /* @__PURE__ */ jsx37(A2512, { color: "#856c4d" });
|
|
2295
2499
|
}
|
|
2296
2500
|
}
|
|
2297
2501
|
case "sot235":
|
|
2298
|
-
return /* @__PURE__ */
|
|
2502
|
+
return /* @__PURE__ */ jsx37(SOT_235_default, {});
|
|
2299
2503
|
case "sot223":
|
|
2300
|
-
return /* @__PURE__ */
|
|
2504
|
+
return /* @__PURE__ */ jsx37(SOT223, {});
|
|
2505
|
+
case "sot323":
|
|
2506
|
+
return /* @__PURE__ */ jsx37(SOT323, {});
|
|
2301
2507
|
case "pushbutton":
|
|
2302
|
-
return /* @__PURE__ */
|
|
2508
|
+
return /* @__PURE__ */ jsx37(
|
|
2303
2509
|
PushButton,
|
|
2304
2510
|
{
|
|
2305
2511
|
width: fpJson.w,
|
|
@@ -2308,7 +2514,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2308
2514
|
}
|
|
2309
2515
|
);
|
|
2310
2516
|
case "soic":
|
|
2311
|
-
return /* @__PURE__ */
|
|
2517
|
+
return /* @__PURE__ */ jsx37(
|
|
2312
2518
|
SOIC,
|
|
2313
2519
|
{
|
|
2314
2520
|
pinCount: fpJson.num_pins,
|
|
@@ -2319,49 +2525,49 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2319
2525
|
}
|
|
2320
2526
|
);
|
|
2321
2527
|
case "sod523":
|
|
2322
|
-
return /* @__PURE__ */
|
|
2528
|
+
return /* @__PURE__ */ jsx37(SOD523, {});
|
|
2323
2529
|
case "sma":
|
|
2324
|
-
return /* @__PURE__ */
|
|
2530
|
+
return /* @__PURE__ */ jsx37(SMA, {});
|
|
2325
2531
|
case "smb":
|
|
2326
|
-
return /* @__PURE__ */
|
|
2532
|
+
return /* @__PURE__ */ jsx37(SMB, {});
|
|
2327
2533
|
case "smc":
|
|
2328
|
-
return /* @__PURE__ */
|
|
2534
|
+
return /* @__PURE__ */ jsx37(SMC, {});
|
|
2329
2535
|
case "smf":
|
|
2330
|
-
return /* @__PURE__ */
|
|
2536
|
+
return /* @__PURE__ */ jsx37(SMF, {});
|
|
2331
2537
|
case "sod123f":
|
|
2332
|
-
return /* @__PURE__ */
|
|
2538
|
+
return /* @__PURE__ */ jsx37(SOD123F, {});
|
|
2333
2539
|
case "sod123fl":
|
|
2334
|
-
return /* @__PURE__ */
|
|
2540
|
+
return /* @__PURE__ */ jsx37(SOD123FL, {});
|
|
2335
2541
|
case "sod923":
|
|
2336
|
-
return /* @__PURE__ */
|
|
2542
|
+
return /* @__PURE__ */ jsx37(SOD923, {});
|
|
2337
2543
|
}
|
|
2338
2544
|
const colorMatch = footprint.match(/_color\(([^)]+)\)/);
|
|
2339
2545
|
const color = colorMatch ? colorMatch[1] : void 0;
|
|
2340
2546
|
switch (fpJson.imperial) {
|
|
2341
2547
|
case "0402":
|
|
2342
|
-
return /* @__PURE__ */
|
|
2548
|
+
return /* @__PURE__ */ jsx37(A0402, { color });
|
|
2343
2549
|
case "0603":
|
|
2344
|
-
return /* @__PURE__ */
|
|
2550
|
+
return /* @__PURE__ */ jsx37(A0603, { color });
|
|
2345
2551
|
case "0805":
|
|
2346
|
-
return /* @__PURE__ */
|
|
2552
|
+
return /* @__PURE__ */ jsx37(A0805, { color });
|
|
2347
2553
|
case "0201":
|
|
2348
|
-
return /* @__PURE__ */
|
|
2554
|
+
return /* @__PURE__ */ jsx37(A0201, { color });
|
|
2349
2555
|
case "01005":
|
|
2350
|
-
return /* @__PURE__ */
|
|
2556
|
+
return /* @__PURE__ */ jsx37(A01005, { color });
|
|
2351
2557
|
case "1206":
|
|
2352
|
-
return /* @__PURE__ */
|
|
2558
|
+
return /* @__PURE__ */ jsx37(A1206, { color });
|
|
2353
2559
|
case "1210":
|
|
2354
|
-
return /* @__PURE__ */
|
|
2560
|
+
return /* @__PURE__ */ jsx37(A1210, { color });
|
|
2355
2561
|
case "2010":
|
|
2356
|
-
return /* @__PURE__ */
|
|
2562
|
+
return /* @__PURE__ */ jsx37(A2010, { color });
|
|
2357
2563
|
case "2512":
|
|
2358
|
-
return /* @__PURE__ */
|
|
2564
|
+
return /* @__PURE__ */ jsx37(A2512, { color });
|
|
2359
2565
|
}
|
|
2360
2566
|
return null;
|
|
2361
2567
|
};
|
|
2362
2568
|
|
|
2363
2569
|
// lib/SOT-23-3P.tsx
|
|
2364
|
-
import { Fragment as
|
|
2570
|
+
import { Fragment as Fragment33, jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2365
2571
|
var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
2366
2572
|
const bodyWidth = 1.3;
|
|
2367
2573
|
const bodyLength10 = 2.9;
|
|
@@ -2372,8 +2578,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
2372
2578
|
const padContactLength = 0.4;
|
|
2373
2579
|
const padThickness = leadThickness / 2;
|
|
2374
2580
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
2375
|
-
return /* @__PURE__ */
|
|
2376
|
-
/* @__PURE__ */
|
|
2581
|
+
return /* @__PURE__ */ jsxs35(Fragment33, { children: [
|
|
2582
|
+
/* @__PURE__ */ jsx38(
|
|
2377
2583
|
SmdChipLead,
|
|
2378
2584
|
{
|
|
2379
2585
|
rotation: Math.PI,
|
|
@@ -2390,7 +2596,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
2390
2596
|
},
|
|
2391
2597
|
1
|
|
2392
2598
|
),
|
|
2393
|
-
/* @__PURE__ */
|
|
2599
|
+
/* @__PURE__ */ jsx38(
|
|
2394
2600
|
SmdChipLead,
|
|
2395
2601
|
{
|
|
2396
2602
|
rotation: Math.PI,
|
|
@@ -2407,7 +2613,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
2407
2613
|
},
|
|
2408
2614
|
2
|
|
2409
2615
|
),
|
|
2410
|
-
/* @__PURE__ */
|
|
2616
|
+
/* @__PURE__ */ jsx38(
|
|
2411
2617
|
SmdChipLead,
|
|
2412
2618
|
{
|
|
2413
2619
|
position: {
|
|
@@ -2423,7 +2629,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
2423
2629
|
},
|
|
2424
2630
|
3
|
|
2425
2631
|
),
|
|
2426
|
-
/* @__PURE__ */
|
|
2632
|
+
/* @__PURE__ */ jsx38(
|
|
2427
2633
|
ChipBody,
|
|
2428
2634
|
{
|
|
2429
2635
|
center: { x: 0, y: 0, z: 0 },
|
|
@@ -2437,7 +2643,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
2437
2643
|
|
|
2438
2644
|
// lib/SOT-563.tsx
|
|
2439
2645
|
import { Cuboid as Cuboid26, Translate as Translate17, Rotate as Rotate6, Colorize as Colorize18 } from "jscad-fiber";
|
|
2440
|
-
import { Fragment as
|
|
2646
|
+
import { Fragment as Fragment34, jsx as jsx39, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2441
2647
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
2442
2648
|
const bodyWidth = 1.2;
|
|
2443
2649
|
const bodyLength10 = 1.6;
|
|
@@ -2447,11 +2653,11 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2447
2653
|
const leadHeight = 0.13;
|
|
2448
2654
|
const leadSpacing = 0.5;
|
|
2449
2655
|
const bodyZOffset = -0.4;
|
|
2450
|
-
return /* @__PURE__ */
|
|
2451
|
-
/* @__PURE__ */
|
|
2656
|
+
return /* @__PURE__ */ jsxs36(Fragment34, { children: [
|
|
2657
|
+
/* @__PURE__ */ jsx39(Rotate6, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx39(Translate17, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx39(Colorize18, { color: "grey", children: /* @__PURE__ */ jsx39(Cuboid26, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
2452
2658
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
2453
2659
|
// Left lead
|
|
2454
|
-
/* @__PURE__ */
|
|
2660
|
+
/* @__PURE__ */ jsx39(
|
|
2455
2661
|
Translate17,
|
|
2456
2662
|
{
|
|
2457
2663
|
center: [
|
|
@@ -2459,16 +2665,16 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2459
2665
|
yOffset * leadSpacing,
|
|
2460
2666
|
leadHeight / 2
|
|
2461
2667
|
],
|
|
2462
|
-
children: /* @__PURE__ */
|
|
2668
|
+
children: /* @__PURE__ */ jsx39(Cuboid26, { size: [leadLength, leadWidth, leadHeight] })
|
|
2463
2669
|
},
|
|
2464
2670
|
`left-${index}`
|
|
2465
2671
|
),
|
|
2466
2672
|
// Right lead
|
|
2467
|
-
/* @__PURE__ */
|
|
2673
|
+
/* @__PURE__ */ jsx39(
|
|
2468
2674
|
Translate17,
|
|
2469
2675
|
{
|
|
2470
2676
|
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
|
|
2471
|
-
children: /* @__PURE__ */
|
|
2677
|
+
children: /* @__PURE__ */ jsx39(Cuboid26, { size: [leadLength, leadWidth, leadHeight] })
|
|
2472
2678
|
},
|
|
2473
2679
|
`right-${index}`
|
|
2474
2680
|
)
|
|
@@ -2478,7 +2684,7 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2478
2684
|
|
|
2479
2685
|
// lib/SOT-723.tsx
|
|
2480
2686
|
import { Cuboid as Cuboid27, Translate as Translate18, Rotate as Rotate7, Colorize as Colorize19 } from "jscad-fiber";
|
|
2481
|
-
import { Fragment as
|
|
2687
|
+
import { Fragment as Fragment35, jsx as jsx40, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
2482
2688
|
var getCcwSot723Coords = (pn) => {
|
|
2483
2689
|
if (pn === 1) {
|
|
2484
2690
|
return { x: 0, y: 0 };
|
|
@@ -2496,11 +2702,11 @@ var SOT723 = () => {
|
|
|
2496
2702
|
const leadLength = 0.3;
|
|
2497
2703
|
const leadHeight = 0.1;
|
|
2498
2704
|
const centerLeadWidth = 0.42;
|
|
2499
|
-
return /* @__PURE__ */
|
|
2500
|
-
/* @__PURE__ */
|
|
2705
|
+
return /* @__PURE__ */ jsxs37(Fragment35, { children: [
|
|
2706
|
+
/* @__PURE__ */ jsx40(Rotate7, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx40(Translate18, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ jsx40(Colorize19, { color: "grey", children: /* @__PURE__ */ jsx40(Cuboid27, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
2501
2707
|
[1, 2, 3].map((pn) => {
|
|
2502
2708
|
const { x, y } = getCcwSot723Coords(pn);
|
|
2503
|
-
return /* @__PURE__ */
|
|
2709
|
+
return /* @__PURE__ */ jsx40(Translate18, { center: [x, y, 0], children: /* @__PURE__ */ jsx40(
|
|
2504
2710
|
Cuboid27,
|
|
2505
2711
|
{
|
|
2506
2712
|
size: [
|
|
@@ -2515,7 +2721,7 @@ var SOT723 = () => {
|
|
|
2515
2721
|
};
|
|
2516
2722
|
|
|
2517
2723
|
// lib/sod-123.tsx
|
|
2518
|
-
import { Fragment as
|
|
2724
|
+
import { Fragment as Fragment36, jsx as jsx41, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
2519
2725
|
var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
2520
2726
|
const bodyWidth = 2.9;
|
|
2521
2727
|
const bodyLength10 = 1.3;
|
|
@@ -2526,8 +2732,8 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2526
2732
|
const padContactLength = 0.4;
|
|
2527
2733
|
const padThickness = leadThickness / 2;
|
|
2528
2734
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
2529
|
-
return /* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2735
|
+
return /* @__PURE__ */ jsxs38(Fragment36, { children: [
|
|
2736
|
+
/* @__PURE__ */ jsx41(
|
|
2531
2737
|
SmdChipLead,
|
|
2532
2738
|
{
|
|
2533
2739
|
position: {
|
|
@@ -2543,7 +2749,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2543
2749
|
},
|
|
2544
2750
|
1
|
|
2545
2751
|
),
|
|
2546
|
-
/* @__PURE__ */
|
|
2752
|
+
/* @__PURE__ */ jsx41(
|
|
2547
2753
|
SmdChipLead,
|
|
2548
2754
|
{
|
|
2549
2755
|
rotation: Math.PI,
|
|
@@ -2560,7 +2766,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
2560
2766
|
},
|
|
2561
2767
|
2
|
|
2562
2768
|
),
|
|
2563
|
-
/* @__PURE__ */
|
|
2769
|
+
/* @__PURE__ */ jsx41(
|
|
2564
2770
|
ChipBody,
|
|
2565
2771
|
{
|
|
2566
2772
|
center: { x: 0, y: 0, z: 0 },
|
|
@@ -2601,9 +2807,11 @@ export {
|
|
|
2601
2807
|
SOD923,
|
|
2602
2808
|
SOT223,
|
|
2603
2809
|
SOT233P,
|
|
2810
|
+
SOT323,
|
|
2604
2811
|
SOT563,
|
|
2605
2812
|
SOT723,
|
|
2606
2813
|
SmdChipLead,
|
|
2814
|
+
TQFP,
|
|
2607
2815
|
Tssop,
|
|
2608
2816
|
VSSOP
|
|
2609
2817
|
};
|