jscad-electronics 0.0.129 → 0.0.131

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
  ] });
@@ -942,26 +964,31 @@ var QFP = ({
942
964
  if (!padContactLength) padContactLength = getPadContactLength(pinCount);
943
965
  if (!leadWidth) leadWidth = getLeadWidth(pinCount, bodyWidth);
944
966
  if (!bodyWidth) bodyWidth = pitch * (sidePinCount + 4);
967
+ const footprintPadLength = padContactLength;
945
968
  const bodyLength10 = bodyWidth;
946
969
  const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
947
- const fullLength10 = bodyLength10 + 2 * padContactLength;
970
+ const leadReach = footprintPadLength * 0.5;
971
+ const fullLength10 = bodyLength10 + 2 * leadReach;
948
972
  const fullWidth = fullLength10;
949
973
  const leadHeight = 0.8;
950
974
  const leadThickness = 0.15;
951
- const bodyDistance = (fullWidth - bodyWidth) / 2 + 0.5;
975
+ const bodyDistance = leadReach;
976
+ const fullPadContactLength = leadReach * 0.5;
977
+ const curveLength = leadReach * 0.18;
952
978
  return /* @__PURE__ */ jsxs17(Fragment15, { children: [
953
979
  Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx19(
954
980
  SmdChipLead,
955
981
  {
956
982
  position: {
957
- x: -fullWidth / 2 - 0.4,
983
+ x: -fullWidth / 2,
958
984
  y: i * pitch - pinOffsetToCenter,
959
985
  z: leadThickness / 2
960
986
  },
961
987
  width: leadWidth,
962
988
  thickness: leadThickness,
963
- padContactLength,
989
+ padContactLength: fullPadContactLength,
964
990
  bodyDistance,
991
+ curveLength,
965
992
  height: leadHeight
966
993
  },
967
994
  `left-${i}`
@@ -971,14 +998,15 @@ var QFP = ({
971
998
  {
972
999
  rotation: Math.PI,
973
1000
  position: {
974
- x: fullWidth / 2 + 0.4,
1001
+ x: fullWidth / 2,
975
1002
  y: i * pitch - pinOffsetToCenter,
976
1003
  z: leadThickness / 2
977
1004
  },
978
1005
  width: leadWidth,
979
1006
  thickness: leadThickness,
980
- padContactLength,
1007
+ padContactLength: fullPadContactLength,
981
1008
  bodyDistance,
1009
+ curveLength,
982
1010
  height: leadHeight
983
1011
  },
984
1012
  `right-${i}`
@@ -989,13 +1017,14 @@ var QFP = ({
989
1017
  rotation: Math.PI / 2,
990
1018
  position: {
991
1019
  x: i * pitch - pinOffsetToCenter,
992
- y: -fullLength10 / 2 - 0.4,
1020
+ y: -fullLength10 / 2,
993
1021
  z: leadThickness / 2
994
1022
  },
995
1023
  width: leadWidth,
996
1024
  thickness: leadThickness,
997
- padContactLength,
1025
+ padContactLength: fullPadContactLength,
998
1026
  bodyDistance,
1027
+ curveLength,
999
1028
  height: leadHeight
1000
1029
  },
1001
1030
  `bottom-${i}`
@@ -1006,13 +1035,14 @@ var QFP = ({
1006
1035
  rotation: -Math.PI / 2,
1007
1036
  position: {
1008
1037
  x: i * pitch - pinOffsetToCenter,
1009
- y: fullLength10 / 2 + 0.4,
1038
+ y: fullLength10 / 2,
1010
1039
  z: leadThickness / 2
1011
1040
  },
1012
1041
  width: leadWidth,
1013
1042
  thickness: leadThickness,
1014
- padContactLength,
1043
+ padContactLength: fullPadContactLength,
1015
1044
  bodyDistance,
1045
+ curveLength,
1016
1046
  height: leadHeight
1017
1047
  },
1018
1048
  `top-${i}`