jscad-electronics 0.0.97 → 0.0.99
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 +10 -1
- package/dist/index.js +277 -122
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +150 -0
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/vanilla.js
CHANGED
|
@@ -3133,6 +3133,74 @@ var MS012 = ({
|
|
|
3133
3133
|
] });
|
|
3134
3134
|
};
|
|
3135
3135
|
|
|
3136
|
+
// lib/ms013.tsx
|
|
3137
|
+
var MS013 = ({
|
|
3138
|
+
pinCount = 16,
|
|
3139
|
+
padContactLength = 0.6,
|
|
3140
|
+
leadWidth = 0.41,
|
|
3141
|
+
pitch = 1.27
|
|
3142
|
+
}) => {
|
|
3143
|
+
if (pinCount !== 16) {
|
|
3144
|
+
throw new Error("MS013 only supports 16 pins");
|
|
3145
|
+
}
|
|
3146
|
+
const sidePinCount = pinCount / 2;
|
|
3147
|
+
const bodyWidth = 7.5;
|
|
3148
|
+
const bodyLength10 = 10.3;
|
|
3149
|
+
const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
|
|
3150
|
+
const leadThickness = 0.2;
|
|
3151
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
3152
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
|
|
3153
|
+
SmdChipLead,
|
|
3154
|
+
{
|
|
3155
|
+
position: {
|
|
3156
|
+
x: -bodyWidth / 2 - padContactLength - 0.3,
|
|
3157
|
+
y: i * pitch - pinOffsetToCenter,
|
|
3158
|
+
z: leadThickness / 2
|
|
3159
|
+
},
|
|
3160
|
+
width: leadWidth,
|
|
3161
|
+
thickness: leadThickness,
|
|
3162
|
+
padContactLength,
|
|
3163
|
+
bodyDistance: padContactLength + 0.4,
|
|
3164
|
+
height: 0.85
|
|
3165
|
+
},
|
|
3166
|
+
i
|
|
3167
|
+
)),
|
|
3168
|
+
Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
|
|
3169
|
+
SmdChipLead,
|
|
3170
|
+
{
|
|
3171
|
+
rotation: Math.PI,
|
|
3172
|
+
position: {
|
|
3173
|
+
x: bodyWidth / 2 + padContactLength + 0.3,
|
|
3174
|
+
y: i * pitch - pinOffsetToCenter,
|
|
3175
|
+
z: leadThickness / 2
|
|
3176
|
+
},
|
|
3177
|
+
width: leadWidth,
|
|
3178
|
+
thickness: leadThickness,
|
|
3179
|
+
padContactLength,
|
|
3180
|
+
bodyDistance: padContactLength + 0.4,
|
|
3181
|
+
height: 0.85
|
|
3182
|
+
},
|
|
3183
|
+
`right-${i}`
|
|
3184
|
+
)),
|
|
3185
|
+
/* @__PURE__ */ jsx(
|
|
3186
|
+
ChipBody,
|
|
3187
|
+
{
|
|
3188
|
+
center: { x: 0, y: 0, z: leadThickness / 2 },
|
|
3189
|
+
width: bodyWidth,
|
|
3190
|
+
length: bodyLength10,
|
|
3191
|
+
height: 1.1,
|
|
3192
|
+
notchPosition: {
|
|
3193
|
+
x: bodyWidth / 2 - 1.5,
|
|
3194
|
+
y: bodyLength10 / 2 - 1.5,
|
|
3195
|
+
z: 1.1
|
|
3196
|
+
},
|
|
3197
|
+
heightAboveSurface: 0.17,
|
|
3198
|
+
taperRatio: 0.05
|
|
3199
|
+
}
|
|
3200
|
+
)
|
|
3201
|
+
] });
|
|
3202
|
+
};
|
|
3203
|
+
|
|
3136
3204
|
// lib/TO220.tsx
|
|
3137
3205
|
var TO220 = () => {
|
|
3138
3206
|
const fullLength10 = 20;
|
|
@@ -3507,6 +3575,76 @@ var SOT363 = () => {
|
|
|
3507
3575
|
};
|
|
3508
3576
|
var SOT_363_default = SOT363;
|
|
3509
3577
|
|
|
3578
|
+
// lib/sod-323.tsx
|
|
3579
|
+
var SOD323 = () => {
|
|
3580
|
+
const fullWidth = 2.5;
|
|
3581
|
+
const bodyLength10 = 1.25;
|
|
3582
|
+
const bodyWidth = 1.7;
|
|
3583
|
+
const bodyHeight = 0.95;
|
|
3584
|
+
const leadWidth = 0.3;
|
|
3585
|
+
const leadThickness = 0.175;
|
|
3586
|
+
const padContactLength = 0.3;
|
|
3587
|
+
const padCenterX = bodyWidth / 2;
|
|
3588
|
+
const bodyDistance = 0.45;
|
|
3589
|
+
const leadHeight = 0.7;
|
|
3590
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
3591
|
+
/* @__PURE__ */ jsx(
|
|
3592
|
+
SmdChipLead,
|
|
3593
|
+
{
|
|
3594
|
+
position: {
|
|
3595
|
+
x: -fullWidth / 2,
|
|
3596
|
+
y: 0,
|
|
3597
|
+
z: leadThickness / 2
|
|
3598
|
+
},
|
|
3599
|
+
width: leadWidth,
|
|
3600
|
+
thickness: leadThickness,
|
|
3601
|
+
padContactLength,
|
|
3602
|
+
bodyDistance,
|
|
3603
|
+
height: leadHeight
|
|
3604
|
+
},
|
|
3605
|
+
1
|
|
3606
|
+
),
|
|
3607
|
+
/* @__PURE__ */ jsx(
|
|
3608
|
+
SmdChipLead,
|
|
3609
|
+
{
|
|
3610
|
+
rotation: Math.PI,
|
|
3611
|
+
position: {
|
|
3612
|
+
x: fullWidth / 2,
|
|
3613
|
+
y: 0,
|
|
3614
|
+
z: leadThickness / 2
|
|
3615
|
+
},
|
|
3616
|
+
width: leadWidth,
|
|
3617
|
+
thickness: leadThickness,
|
|
3618
|
+
padContactLength,
|
|
3619
|
+
bodyDistance,
|
|
3620
|
+
height: leadHeight
|
|
3621
|
+
},
|
|
3622
|
+
1
|
|
3623
|
+
),
|
|
3624
|
+
/* @__PURE__ */ jsx(Colorize, { color: "#222", children: /* @__PURE__ */ jsx(
|
|
3625
|
+
ChipBody,
|
|
3626
|
+
{
|
|
3627
|
+
center: { x: 0, y: 0, z: 0 },
|
|
3628
|
+
width: bodyWidth,
|
|
3629
|
+
length: bodyLength10,
|
|
3630
|
+
height: bodyHeight,
|
|
3631
|
+
includeNotch: false,
|
|
3632
|
+
taperRatio: 0.06,
|
|
3633
|
+
straightHeightRatio: 0.7,
|
|
3634
|
+
heightAboveSurface: 0.05
|
|
3635
|
+
}
|
|
3636
|
+
) }),
|
|
3637
|
+
/* @__PURE__ */ jsx(
|
|
3638
|
+
Cuboid,
|
|
3639
|
+
{
|
|
3640
|
+
color: "#777",
|
|
3641
|
+
size: [bodyWidth / 3, bodyLength10 - 0.075, 0.02],
|
|
3642
|
+
center: [-padCenterX * 2 / 3 + 0.035, 0, bodyHeight + 0.05]
|
|
3643
|
+
}
|
|
3644
|
+
)
|
|
3645
|
+
] });
|
|
3646
|
+
};
|
|
3647
|
+
|
|
3510
3648
|
// lib/Footprinter3d.tsx
|
|
3511
3649
|
var Footprinter3d = ({ footprint }) => {
|
|
3512
3650
|
const fpJson = fp.string(footprint).json();
|
|
@@ -3677,6 +3815,8 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
3677
3815
|
return /* @__PURE__ */ jsx(SOD123W, {});
|
|
3678
3816
|
case "sod128":
|
|
3679
3817
|
return /* @__PURE__ */ jsx(SOD128, {});
|
|
3818
|
+
case "sod323":
|
|
3819
|
+
return /* @__PURE__ */ jsx(SOD323, {});
|
|
3680
3820
|
case "sod923":
|
|
3681
3821
|
return /* @__PURE__ */ jsx(SOD923, {});
|
|
3682
3822
|
case "hc49":
|
|
@@ -3697,6 +3837,16 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
3697
3837
|
pitch: fpJson.p
|
|
3698
3838
|
}
|
|
3699
3839
|
);
|
|
3840
|
+
case "ms013":
|
|
3841
|
+
return /* @__PURE__ */ jsx(
|
|
3842
|
+
MS013,
|
|
3843
|
+
{
|
|
3844
|
+
pinCount: fpJson.num_pins,
|
|
3845
|
+
padContactLength: fpJson.pl,
|
|
3846
|
+
leadWidth: fpJson.pw,
|
|
3847
|
+
pitch: fpJson.p
|
|
3848
|
+
}
|
|
3849
|
+
);
|
|
3700
3850
|
case "sot723":
|
|
3701
3851
|
return /* @__PURE__ */ jsx(SOT723, {});
|
|
3702
3852
|
case "to220":
|