jscad-electronics 0.0.104 → 0.0.106

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/vanilla.js CHANGED
@@ -674,20 +674,22 @@ var getLeadWidth = (pinCount, width10) => {
674
674
  var PinRow = ({
675
675
  numberOfPins,
676
676
  pitch = 2.54,
677
- longSidePinLength = 6
677
+ longSidePinLength = 6,
678
+ invert
678
679
  }) => {
679
680
  const pinThickness = 0.63;
680
681
  const bodyHeight = 2;
681
682
  const bodyWidth = numberOfPins * pitch;
682
683
  const shortSidePinLength = 3;
683
684
  const xoff = -((numberOfPins - 1) / 2) * pitch;
685
+ const flipZ = (z) => invert ? -z + bodyHeight : z;
684
686
  return /* @__PURE__ */ jsxs(Fragment2, { children: [
685
687
  /* @__PURE__ */ jsx(
686
688
  Cuboid,
687
689
  {
688
690
  color: "#222",
689
691
  size: [bodyWidth, pinThickness * 3, bodyHeight],
690
- center: [0, 0, bodyHeight / 2 + 0.012]
692
+ center: [0, 0, flipZ(bodyHeight / 2)]
691
693
  }
692
694
  ),
693
695
  Array.from({ length: numberOfPins }, (_, i) => /* @__PURE__ */ jsxs(Fragment2, { children: [
@@ -700,7 +702,7 @@ var PinRow = ({
700
702
  center: [
701
703
  xoff + i * pitch,
702
704
  0,
703
- bodyHeight * 0.9 + bodyHeight / 2
705
+ flipZ(bodyHeight * 0.9 + bodyHeight / 2)
704
706
  ]
705
707
  }
706
708
  ),
@@ -713,7 +715,11 @@ var PinRow = ({
713
715
  pinThickness / 1.8,
714
716
  shortSidePinLength
715
717
  ],
716
- center: [xoff + i * pitch, 0, bodyHeight + bodyHeight / 2]
718
+ center: [
719
+ xoff + i * pitch,
720
+ 0,
721
+ flipZ(bodyHeight + bodyHeight / 2)
722
+ ]
717
723
  }
718
724
  )
719
725
  ] }) }),
@@ -723,7 +729,11 @@ var PinRow = ({
723
729
  {
724
730
  color: "gold",
725
731
  size: [pinThickness, pinThickness, longSidePinLength * 0.9],
726
- center: [xoff + i * pitch, 0, -longSidePinLength / 2 * 0.9]
732
+ center: [
733
+ xoff + i * pitch,
734
+ 0,
735
+ flipZ(-longSidePinLength / 2 * 0.9)
736
+ ]
727
737
  }
728
738
  ),
729
739
  /* @__PURE__ */ jsx(
@@ -735,7 +745,7 @@ var PinRow = ({
735
745
  pinThickness / 1.8,
736
746
  longSidePinLength
737
747
  ],
738
- center: [xoff + i * pitch, 0, -longSidePinLength / 2]
748
+ center: [xoff + i * pitch, 0, flipZ(-longSidePinLength / 2)]
739
749
  }
740
750
  )
741
751
  ] }) })
@@ -3411,6 +3421,69 @@ var SOT457 = () => {
3411
3421
  ] });
3412
3422
  };
3413
3423
 
3424
+ // lib/SOT-963.tsx
3425
+ var SOT963 = () => {
3426
+ const bodyWidth = 0.8;
3427
+ const bodyLength10 = 1;
3428
+ const bodyHeight = 0.37;
3429
+ const terminalWidth = 0.15;
3430
+ const terminalLength = 0.19;
3431
+ const terminalThickness = 0.12;
3432
+ const pitch = 0.35;
3433
+ const pinsPerSide = 3;
3434
+ const pinSpan = pitch * (pinsPerSide - 1);
3435
+ return /* @__PURE__ */ jsxs(Fragment2, { children: [
3436
+ /* @__PURE__ */ jsx(
3437
+ ChipBody,
3438
+ {
3439
+ center: { x: 0, y: 0, z: 0 },
3440
+ width: bodyWidth,
3441
+ length: bodyLength10,
3442
+ height: bodyHeight,
3443
+ heightAboveSurface: 0,
3444
+ color: "#1a1a1a",
3445
+ taperRatio: 0.15,
3446
+ straightHeightRatio: 0,
3447
+ notchPosition: {
3448
+ x: -bodyWidth / 4,
3449
+ y: pinSpan / 2.2,
3450
+ z: bodyHeight + 0.1
3451
+ }
3452
+ }
3453
+ ),
3454
+ [0, 1, 2].map((i) => {
3455
+ const y = -pinSpan / 2 + i * pitch;
3456
+ return /* @__PURE__ */ jsx(
3457
+ Cuboid,
3458
+ {
3459
+ center: [
3460
+ -bodyWidth / 2 + terminalLength / 2 - 0.1,
3461
+ y,
3462
+ terminalThickness / 2
3463
+ ],
3464
+ size: [terminalLength, terminalWidth, terminalThickness]
3465
+ },
3466
+ `left-${i}`
3467
+ );
3468
+ }),
3469
+ [0, 1, 2].map((i) => {
3470
+ const y = -pinSpan / 2 + i * pitch;
3471
+ return /* @__PURE__ */ jsx(
3472
+ Cuboid,
3473
+ {
3474
+ center: [
3475
+ bodyWidth / 2 - terminalLength / 2 + 0.1,
3476
+ y,
3477
+ terminalThickness / 2
3478
+ ],
3479
+ size: [terminalLength, terminalWidth, terminalThickness]
3480
+ },
3481
+ `right-${i}`
3482
+ );
3483
+ })
3484
+ ] });
3485
+ };
3486
+
3414
3487
  // lib/TO92.tsx
3415
3488
  var TO92 = () => {
3416
3489
  const bodyRadius = 2.4;
@@ -3579,6 +3652,64 @@ var SOT363 = () => {
3579
3652
  };
3580
3653
  var SOT_363_default = SOT363;
3581
3654
 
3655
+ // lib/SOT-886.tsx
3656
+ var SOT886 = () => {
3657
+ const bodyWidth = 1;
3658
+ const bodyLength10 = 1.45;
3659
+ const bodyHeight = 0.5;
3660
+ const terminalWidth = 0.2;
3661
+ const terminalLength = 0.3;
3662
+ const terminalThickness = 0.05;
3663
+ const pitch = 0.5;
3664
+ const pinsPerSide = 3;
3665
+ const pinSpan = pitch * (pinsPerSide - 1);
3666
+ return /* @__PURE__ */ jsxs(Fragment2, { children: [
3667
+ /* @__PURE__ */ jsx(
3668
+ ChipBody,
3669
+ {
3670
+ center: { x: 0, y: 0, z: terminalThickness },
3671
+ width: bodyWidth,
3672
+ length: bodyLength10,
3673
+ height: bodyHeight,
3674
+ heightAboveSurface: 0,
3675
+ color: "#1a1a1a",
3676
+ taperRatio: 0,
3677
+ includeNotch: false
3678
+ }
3679
+ ),
3680
+ [0, 1, 2].map((i) => {
3681
+ const y = -pinSpan / 2 + i * pitch;
3682
+ return /* @__PURE__ */ jsx(
3683
+ Cuboid,
3684
+ {
3685
+ center: [
3686
+ -bodyWidth / 2 + terminalLength / 2,
3687
+ y,
3688
+ terminalThickness / 2
3689
+ ],
3690
+ size: [terminalLength, terminalWidth, terminalThickness]
3691
+ },
3692
+ `left-${i}`
3693
+ );
3694
+ }),
3695
+ [0, 1, 2].map((i) => {
3696
+ const y = -pinSpan / 2 + i * pitch;
3697
+ return /* @__PURE__ */ jsx(
3698
+ Cuboid,
3699
+ {
3700
+ center: [
3701
+ bodyWidth / 2 - terminalLength / 2,
3702
+ y,
3703
+ terminalThickness / 2
3704
+ ],
3705
+ size: [terminalLength, terminalWidth, terminalThickness]
3706
+ },
3707
+ `right-${i}`
3708
+ );
3709
+ })
3710
+ ] });
3711
+ };
3712
+
3582
3713
  // lib/sod-323.tsx
3583
3714
  var SOD323 = () => {
3584
3715
  const fullWidth = 2.5;
@@ -3846,7 +3977,14 @@ var Footprinter3d = ({ footprint }) => {
3846
3977
  }
3847
3978
  case "pinrow":
3848
3979
  if (fpJson.male)
3849
- return /* @__PURE__ */ jsx(PinRow, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
3980
+ return /* @__PURE__ */ jsx(
3981
+ PinRow,
3982
+ {
3983
+ numberOfPins: fpJson.num_pins,
3984
+ pitch: fpJson.p,
3985
+ invert: fpJson.invert
3986
+ }
3987
+ );
3850
3988
  if (fpJson.female)
3851
3989
  return /* @__PURE__ */ jsx(FemaleHeader, { numberOfPins: fpJson.num_pins, pitch: fpJson.p });
3852
3990
  case "cap": {
@@ -3887,6 +4025,10 @@ var Footprinter3d = ({ footprint }) => {
3887
4025
  return /* @__PURE__ */ jsx(SOD323FL, {});
3888
4026
  case "sot363":
3889
4027
  return /* @__PURE__ */ jsx(SOT_363_default, {});
4028
+ case "sot886":
4029
+ return /* @__PURE__ */ jsx(SOT886, {});
4030
+ case "sot963":
4031
+ return /* @__PURE__ */ jsx(SOT963, {});
3890
4032
  case "pushbutton":
3891
4033
  return /* @__PURE__ */ jsx(
3892
4034
  PushButton,