jscad-electronics 0.0.81 → 0.0.83
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 +25 -1
- package/dist/index.js +437 -276
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +154 -1
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/vanilla.js
CHANGED
|
@@ -108,7 +108,7 @@ var ChipBody = ({
|
|
|
108
108
|
}
|
|
109
109
|
return /* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Translate, { offset: center, children: /* @__PURE__ */ jsx(Translate, { offset: { x: 0, y: 0, z: heightAboveSurface2 }, children: includeNotch ? /* @__PURE__ */ jsxs(Subtract, { children: [
|
|
110
110
|
finalBody,
|
|
111
|
-
/* @__PURE__ */ jsx(Translate, { offset: actualNotchPosition, children: /* @__PURE__ */ jsx(Rotate, { rotation: notchRotation, children: /* @__PURE__ */ jsx(Cylinder, { radius:
|
|
111
|
+
/* @__PURE__ */ jsx(Translate, { offset: actualNotchPosition, children: /* @__PURE__ */ jsx(Rotate, { rotation: notchRotation, children: /* @__PURE__ */ jsx(Cylinder, { radius: actualNotchRadius, height: notchWidth }) }) })
|
|
112
112
|
] }) : finalBody }) }) });
|
|
113
113
|
};
|
|
114
114
|
|
|
@@ -356,6 +356,66 @@ var Tssop = ({
|
|
|
356
356
|
] });
|
|
357
357
|
};
|
|
358
358
|
|
|
359
|
+
// lib/MSOP.tsx
|
|
360
|
+
var MSOP = ({
|
|
361
|
+
pinCount,
|
|
362
|
+
padContactLength = 0.4,
|
|
363
|
+
leadWidth = 0.2,
|
|
364
|
+
pitch = 0.65,
|
|
365
|
+
bodyWidth = 3
|
|
366
|
+
}) => {
|
|
367
|
+
const sidePinCount = Math.ceil(pinCount / 2);
|
|
368
|
+
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
369
|
+
const leadThickness = 0.2;
|
|
370
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
371
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
|
|
372
|
+
SmdChipLead,
|
|
373
|
+
{
|
|
374
|
+
position: {
|
|
375
|
+
x: -bodyWidth / 2 - padContactLength - 0.3,
|
|
376
|
+
y: i * pitch - pinOffsetToCenter,
|
|
377
|
+
z: leadThickness / 2
|
|
378
|
+
},
|
|
379
|
+
width: leadWidth,
|
|
380
|
+
thickness: leadThickness,
|
|
381
|
+
padContactLength,
|
|
382
|
+
bodyDistance: padContactLength + 0.4,
|
|
383
|
+
height: 0.6
|
|
384
|
+
},
|
|
385
|
+
i
|
|
386
|
+
)),
|
|
387
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
|
|
388
|
+
SmdChipLead,
|
|
389
|
+
{
|
|
390
|
+
rotation: Math.PI,
|
|
391
|
+
position: {
|
|
392
|
+
x: bodyWidth / 2 + padContactLength + 0.3,
|
|
393
|
+
y: i * pitch - pinOffsetToCenter,
|
|
394
|
+
z: leadThickness / 2
|
|
395
|
+
},
|
|
396
|
+
width: leadWidth,
|
|
397
|
+
thickness: leadThickness,
|
|
398
|
+
padContactLength,
|
|
399
|
+
bodyDistance: padContactLength + 0.4,
|
|
400
|
+
height: 0.6
|
|
401
|
+
},
|
|
402
|
+
i
|
|
403
|
+
)),
|
|
404
|
+
/* @__PURE__ */ jsx(
|
|
405
|
+
ChipBody,
|
|
406
|
+
{
|
|
407
|
+
center: { x: 0, y: 0, z: leadThickness / 2 },
|
|
408
|
+
width: bodyWidth,
|
|
409
|
+
length: bodyWidth,
|
|
410
|
+
height: 1.1,
|
|
411
|
+
notchRadius: 0.35,
|
|
412
|
+
heightAboveSurface: 0.1,
|
|
413
|
+
taperRatio: 0.09
|
|
414
|
+
}
|
|
415
|
+
)
|
|
416
|
+
] });
|
|
417
|
+
};
|
|
418
|
+
|
|
359
419
|
// lib/A0402.tsx
|
|
360
420
|
var fullLength = 1;
|
|
361
421
|
var width = 0.5;
|
|
@@ -2518,6 +2578,84 @@ var HC49 = ({
|
|
|
2518
2578
|
] });
|
|
2519
2579
|
};
|
|
2520
2580
|
|
|
2581
|
+
// lib/MINIMELF.tsx
|
|
2582
|
+
var MINIMELF = ({
|
|
2583
|
+
bodyLength: bodyLength10 = 3.5,
|
|
2584
|
+
bodyDiameter = 1.5,
|
|
2585
|
+
color = "#3a3a3aff",
|
|
2586
|
+
contactColor = "#c6c6c6"
|
|
2587
|
+
}) => {
|
|
2588
|
+
const padLength = 0.5;
|
|
2589
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
2590
|
+
/* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Rotate, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx(
|
|
2591
|
+
RoundedCylinder,
|
|
2592
|
+
{
|
|
2593
|
+
height: bodyLength10,
|
|
2594
|
+
radius: bodyDiameter / 2,
|
|
2595
|
+
roundRadius: 0.3,
|
|
2596
|
+
center: [-bodyDiameter / 2, 0, 0]
|
|
2597
|
+
}
|
|
2598
|
+
) }) }),
|
|
2599
|
+
/* @__PURE__ */ jsx(Colorize, { color: contactColor, children: /* @__PURE__ */ jsx(Rotate, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx(
|
|
2600
|
+
RoundedCylinder,
|
|
2601
|
+
{
|
|
2602
|
+
height: padLength,
|
|
2603
|
+
radius: bodyDiameter / 2,
|
|
2604
|
+
roundRadius: 0.2,
|
|
2605
|
+
center: [-bodyDiameter / 2, 0, -bodyLength10 / 2]
|
|
2606
|
+
}
|
|
2607
|
+
) }) }),
|
|
2608
|
+
/* @__PURE__ */ jsx(Colorize, { color: contactColor, children: /* @__PURE__ */ jsx(Rotate, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx(
|
|
2609
|
+
RoundedCylinder,
|
|
2610
|
+
{
|
|
2611
|
+
height: padLength,
|
|
2612
|
+
radius: bodyDiameter / 2,
|
|
2613
|
+
roundRadius: 0.2,
|
|
2614
|
+
center: [-bodyDiameter / 2, 0, bodyLength10 / 2]
|
|
2615
|
+
}
|
|
2616
|
+
) }) })
|
|
2617
|
+
] });
|
|
2618
|
+
};
|
|
2619
|
+
|
|
2620
|
+
// lib/MELF.tsx
|
|
2621
|
+
var MELF = ({
|
|
2622
|
+
bodyLength: bodyLength10 = 3.9,
|
|
2623
|
+
bodyDiameter = 2.5,
|
|
2624
|
+
color = "#3a3a3aff",
|
|
2625
|
+
contactColor = "#c6c6c6"
|
|
2626
|
+
}) => {
|
|
2627
|
+
const padLength = 0.55;
|
|
2628
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
2629
|
+
/* @__PURE__ */ jsx(Colorize, { color, children: /* @__PURE__ */ jsx(Rotate, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx(
|
|
2630
|
+
RoundedCylinder,
|
|
2631
|
+
{
|
|
2632
|
+
height: bodyLength10,
|
|
2633
|
+
radius: bodyDiameter / 2,
|
|
2634
|
+
roundRadius: 0.3,
|
|
2635
|
+
center: [-bodyDiameter / 2, 0, 0]
|
|
2636
|
+
}
|
|
2637
|
+
) }) }),
|
|
2638
|
+
/* @__PURE__ */ jsx(Colorize, { color: contactColor, children: /* @__PURE__ */ jsx(Rotate, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx(
|
|
2639
|
+
RoundedCylinder,
|
|
2640
|
+
{
|
|
2641
|
+
height: padLength,
|
|
2642
|
+
radius: bodyDiameter / 2,
|
|
2643
|
+
roundRadius: 0.2,
|
|
2644
|
+
center: [-bodyDiameter / 2, 0, -bodyLength10 / 2]
|
|
2645
|
+
}
|
|
2646
|
+
) }) }),
|
|
2647
|
+
/* @__PURE__ */ jsx(Colorize, { color: contactColor, children: /* @__PURE__ */ jsx(Rotate, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx(
|
|
2648
|
+
RoundedCylinder,
|
|
2649
|
+
{
|
|
2650
|
+
height: padLength,
|
|
2651
|
+
radius: bodyDiameter / 2,
|
|
2652
|
+
roundRadius: 0.2,
|
|
2653
|
+
center: [-bodyDiameter / 2, 0, bodyLength10 / 2]
|
|
2654
|
+
}
|
|
2655
|
+
) }) })
|
|
2656
|
+
] });
|
|
2657
|
+
};
|
|
2658
|
+
|
|
2521
2659
|
// lib/ms012.tsx
|
|
2522
2660
|
var MS012 = ({
|
|
2523
2661
|
pinCount,
|
|
@@ -2599,6 +2737,17 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2599
2737
|
bodyWidth: fpJson.w
|
|
2600
2738
|
}
|
|
2601
2739
|
);
|
|
2740
|
+
case "msop":
|
|
2741
|
+
return /* @__PURE__ */ jsx(
|
|
2742
|
+
MSOP,
|
|
2743
|
+
{
|
|
2744
|
+
pinCount: fpJson.num_pins,
|
|
2745
|
+
padContactLength: fpJson.pl,
|
|
2746
|
+
leadWidth: fpJson.pw,
|
|
2747
|
+
pitch: fpJson.p,
|
|
2748
|
+
bodyWidth: fpJson.w
|
|
2749
|
+
}
|
|
2750
|
+
);
|
|
2602
2751
|
case "vssop":
|
|
2603
2752
|
return /* @__PURE__ */ jsx(
|
|
2604
2753
|
VSSOP,
|
|
@@ -2733,6 +2882,10 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
2733
2882
|
return /* @__PURE__ */ jsx(SOD923, {});
|
|
2734
2883
|
case "hc49":
|
|
2735
2884
|
return /* @__PURE__ */ jsx(HC49, {});
|
|
2885
|
+
case "minimelf":
|
|
2886
|
+
return /* @__PURE__ */ jsx(MINIMELF, {});
|
|
2887
|
+
case "melf":
|
|
2888
|
+
return /* @__PURE__ */ jsx(MELF, {});
|
|
2736
2889
|
case "ms012":
|
|
2737
2890
|
return /* @__PURE__ */ jsx(
|
|
2738
2891
|
MS012,
|