jscad-electronics 0.0.109 → 0.0.111

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
@@ -679,7 +679,9 @@ var PinRow = ({
679
679
  longSidePinLength = 6,
680
680
  invert,
681
681
  faceup,
682
- rows = 1
682
+ rows = 1,
683
+ smd,
684
+ rightangle
683
685
  }) => {
684
686
  const pinThickness = 0.63;
685
687
  const bodyHeight = 2;
@@ -692,21 +694,37 @@ var PinRow = ({
692
694
  const bodyCenterY = rows > 1 ? -((rows - 1) * rowSpacing) / 2 : 0;
693
695
  const flipZ = (z) => invert || faceup ? -z + bodyHeight : z;
694
696
  return /* @__PURE__ */ jsxs(Fragment2, { children: [
695
- /* @__PURE__ */ jsx(
697
+ /* @__PURE__ */ jsx(Translate, { y: rightangle ? -3 : 0, children: /* @__PURE__ */ jsx(
696
698
  Cuboid,
697
699
  {
698
700
  color: "#222",
699
701
  size: [bodyWidth, bodyDepth, bodyHeight],
700
702
  center: [0, bodyCenterY, flipZ(bodyHeight / 2)]
701
703
  }
702
- ),
704
+ ) }),
703
705
  Array.from({ length: numberOfPins }, (_, i) => {
704
706
  const row = Math.floor(i / pinsPerRow);
705
707
  const col = i % pinsPerRow;
706
708
  const x = xoff + col * pitch;
707
709
  const y = -row * rowSpacing;
708
710
  return /* @__PURE__ */ jsxs(Fragment2, { children: [
709
- !faceup && /* @__PURE__ */ jsx(Colorize, { color: "gold", children: /* @__PURE__ */ jsxs(Hull, { children: [
711
+ !faceup && /* @__PURE__ */ jsx(Colorize, { color: "gold", children: smd ? /* @__PURE__ */ jsx(
712
+ SmdChipLead,
713
+ {
714
+ rotation: -Math.PI / 2,
715
+ position: {
716
+ x,
717
+ y: y + 1,
718
+ z: pinThickness / 2
719
+ },
720
+ thickness: pinThickness,
721
+ width: pinThickness,
722
+ height: pinThickness,
723
+ padContactLength: 2,
724
+ bodyDistance: 3
725
+ },
726
+ `short-smd-${i}`
727
+ ) : /* @__PURE__ */ jsxs(Hull, { children: [
710
728
  /* @__PURE__ */ jsx(
711
729
  Cuboid,
712
730
  {
@@ -732,28 +750,39 @@ var PinRow = ({
732
750
  }
733
751
  )
734
752
  ] }) }, `short-${i}`),
735
- /* @__PURE__ */ jsx(Colorize, { color: "gold", children: /* @__PURE__ */ jsxs(Hull, { children: [
736
- /* @__PURE__ */ jsx(
737
- Cuboid,
738
- {
739
- color: "gold",
740
- size: [pinThickness, pinThickness, longSidePinLength * 0.9],
741
- center: [x, y, flipZ(-longSidePinLength / 2 * 0.9)]
742
- }
743
- ),
744
- /* @__PURE__ */ jsx(
745
- Cuboid,
746
- {
747
- color: "gold",
748
- size: [
749
- pinThickness / 1.8,
750
- pinThickness / 1.8,
751
- longSidePinLength
752
- ],
753
- center: [x, y, flipZ(-longSidePinLength / 2)]
754
- }
755
- )
756
- ] }) }, `long-${i}`)
753
+ /* @__PURE__ */ jsx(Colorize, { color: "gold", children: /* @__PURE__ */ jsx(Translate, { y: rightangle ? -3.9 : 0, z: rightangle ? 1 : 0, children: /* @__PURE__ */ jsx(
754
+ Rotate,
755
+ {
756
+ rotation: rightangle ? [-Math.PI / 2, 0, 0] : [0, 0, 0],
757
+ children: /* @__PURE__ */ jsxs(Hull, { children: [
758
+ /* @__PURE__ */ jsx(
759
+ Cuboid,
760
+ {
761
+ color: "gold",
762
+ size: [
763
+ pinThickness,
764
+ pinThickness,
765
+ longSidePinLength * 0.9
766
+ ],
767
+ center: [x, y, flipZ(-longSidePinLength / 2 * 0.9)]
768
+ }
769
+ ),
770
+ /* @__PURE__ */ jsx(
771
+ Cuboid,
772
+ {
773
+ color: "gold",
774
+ size: [
775
+ pinThickness / 1.8,
776
+ pinThickness / 1.8,
777
+ longSidePinLength
778
+ ],
779
+ center: [x, y, flipZ(-longSidePinLength / 2)]
780
+ }
781
+ )
782
+ ] })
783
+ },
784
+ `rotate-${i}`
785
+ ) }) }, `long-${i}`)
757
786
  ] });
758
787
  })
759
788
  ] });
@@ -4006,7 +4035,9 @@ var Footprinter3d = ({ footprint }) => {
4006
4035
  pitch: fpJson.p,
4007
4036
  invert: fpJson.invert,
4008
4037
  faceup: fpJson.faceup,
4009
- rows
4038
+ rows,
4039
+ smd: fpJson.smd || fpJson.surface_mount,
4040
+ rightangle: fpJson.rightangle
4010
4041
  }
4011
4042
  );
4012
4043
  if (fpJson.female)