jscad-electronics 0.0.130 → 0.0.132

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.js CHANGED
@@ -818,50 +818,72 @@ var Tssop = ({
818
818
  bodyWidth
819
819
  }) => {
820
820
  const sidePinCount = Math.ceil(pinCount / 2);
821
- const fullLength10 = pitch * pinCount / 2 + leadWidth / 2;
821
+ const isSmallTssop = sidePinCount <= 4;
822
822
  const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
823
- const leadThickness = 0.25;
823
+ const bodyLength10 = pitch * Math.max(sidePinCount - 1, 0) + (isSmallTssop ? 1.5 : 1.15);
824
+ const bodyVisualWidth = bodyWidth - (isSmallTssop ? 0.66 : 0.58);
825
+ const leadThickness = 0.15;
826
+ const leadHeight = 0.8;
827
+ const bodyHeight = 1.22;
828
+ const bodyStandoff = 0.24;
829
+ const padContactLength = leadLength * 0.5;
830
+ const leadReach = padContactLength + Math.max(0.22, Math.min(0.4, leadLength * 0.65));
831
+ const leadStartOffset = bodyWidth / 2 + leadLength / 2;
832
+ const curveLength = leadReach * 0.1;
833
+ const notchInset = Math.min(Math.min(bodyVisualWidth, bodyLength10) * 0.18, 1);
834
+ const notchRadius = Math.min(
835
+ Math.min(bodyVisualWidth, bodyLength10) * 0.12,
836
+ 0.45
837
+ );
824
838
  return /* @__PURE__ */ jsxs15(Fragment13, { children: [
825
839
  Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx17(
826
840
  SmdChipLead,
827
841
  {
828
842
  position: {
829
- x: -bodyWidth / 2 - leadLength,
843
+ x: -leadStartOffset,
830
844
  y: i * pitch - pinOffsetToCenter,
831
845
  z: leadThickness / 2
832
846
  },
833
847
  width: leadWidth,
834
848
  thickness: leadThickness,
835
- padContactLength: leadLength,
836
- bodyDistance: leadLength + 1,
837
- height: 0.8
849
+ padContactLength,
850
+ bodyDistance: leadReach,
851
+ curveLength,
852
+ height: leadHeight
838
853
  },
839
- i
854
+ `left-${i}`
840
855
  )),
841
856
  Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx17(
842
857
  SmdChipLead,
843
858
  {
844
859
  rotation: Math.PI,
845
860
  position: {
846
- x: bodyWidth / 2 + leadLength,
861
+ x: leadStartOffset,
847
862
  y: i * pitch - pinOffsetToCenter,
848
863
  z: leadThickness / 2
849
864
  },
850
865
  width: leadWidth,
851
866
  thickness: leadThickness,
852
- padContactLength: leadLength,
853
- bodyDistance: leadLength + 1,
854
- height: 0.8
867
+ padContactLength,
868
+ bodyDistance: leadReach,
869
+ curveLength,
870
+ height: leadHeight
855
871
  },
856
- i
872
+ `right-${i}`
857
873
  )),
858
874
  /* @__PURE__ */ jsx17(
859
875
  ChipBody,
860
876
  {
861
- center: { x: 0, y: 0, z: leadThickness / 2 },
862
- width: bodyWidth - leadWidth - 1,
863
- length: fullLength10,
864
- height: 1.5
877
+ center: { x: 0, y: 0, z: 0 },
878
+ width: bodyVisualWidth,
879
+ length: bodyLength10,
880
+ height: bodyHeight,
881
+ notchPosition: {
882
+ x: -(bodyVisualWidth / 2 - notchInset - 0.2),
883
+ y: bodyLength10 / 2 - notchInset - 0.2,
884
+ z: bodyHeight
885
+ },
886
+ notchRadius
865
887
  }
866
888
  )
867
889
  ] });