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/vanilla.js CHANGED
@@ -442,50 +442,72 @@ var Tssop = ({
442
442
  bodyWidth
443
443
  }) => {
444
444
  const sidePinCount = Math.ceil(pinCount / 2);
445
- const fullLength10 = pitch * pinCount / 2 + leadWidth / 2;
445
+ const isSmallTssop = sidePinCount <= 4;
446
446
  const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
447
- const leadThickness = 0.25;
447
+ const bodyLength10 = pitch * Math.max(sidePinCount - 1, 0) + (isSmallTssop ? 1.5 : 1.15);
448
+ const bodyVisualWidth = bodyWidth - (isSmallTssop ? 0.66 : 0.58);
449
+ const leadThickness = 0.15;
450
+ const leadHeight = 0.8;
451
+ const bodyHeight = 1.22;
452
+ const bodyStandoff = 0.24;
453
+ const padContactLength = leadLength * 0.5;
454
+ const leadReach = padContactLength + Math.max(0.22, Math.min(0.4, leadLength * 0.65));
455
+ const leadStartOffset = bodyWidth / 2 + leadLength / 2;
456
+ const curveLength = leadReach * 0.1;
457
+ const notchInset = Math.min(Math.min(bodyVisualWidth, bodyLength10) * 0.18, 1);
458
+ const notchRadius = Math.min(
459
+ Math.min(bodyVisualWidth, bodyLength10) * 0.12,
460
+ 0.45
461
+ );
448
462
  return /* @__PURE__ */ jsxs(Fragment2, { children: [
449
463
  Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
450
464
  SmdChipLead,
451
465
  {
452
466
  position: {
453
- x: -bodyWidth / 2 - leadLength,
467
+ x: -leadStartOffset,
454
468
  y: i * pitch - pinOffsetToCenter,
455
469
  z: leadThickness / 2
456
470
  },
457
471
  width: leadWidth,
458
472
  thickness: leadThickness,
459
- padContactLength: leadLength,
460
- bodyDistance: leadLength + 1,
461
- height: 0.8
473
+ padContactLength,
474
+ bodyDistance: leadReach,
475
+ curveLength,
476
+ height: leadHeight
462
477
  },
463
- i
478
+ `left-${i}`
464
479
  )),
465
480
  Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
466
481
  SmdChipLead,
467
482
  {
468
483
  rotation: Math.PI,
469
484
  position: {
470
- x: bodyWidth / 2 + leadLength,
485
+ x: leadStartOffset,
471
486
  y: i * pitch - pinOffsetToCenter,
472
487
  z: leadThickness / 2
473
488
  },
474
489
  width: leadWidth,
475
490
  thickness: leadThickness,
476
- padContactLength: leadLength,
477
- bodyDistance: leadLength + 1,
478
- height: 0.8
491
+ padContactLength,
492
+ bodyDistance: leadReach,
493
+ curveLength,
494
+ height: leadHeight
479
495
  },
480
- i
496
+ `right-${i}`
481
497
  )),
482
498
  /* @__PURE__ */ jsx(
483
499
  ChipBody,
484
500
  {
485
- center: { x: 0, y: 0, z: leadThickness / 2 },
486
- width: bodyWidth - leadWidth - 1,
487
- length: fullLength10,
488
- height: 1.5
501
+ center: { x: 0, y: 0, z: 0 },
502
+ width: bodyVisualWidth,
503
+ length: bodyLength10,
504
+ height: bodyHeight,
505
+ notchPosition: {
506
+ x: -(bodyVisualWidth / 2 - notchInset - 0.2),
507
+ y: bodyLength10 / 2 - notchInset - 0.2,
508
+ z: bodyHeight
509
+ },
510
+ notchRadius
489
511
  }
490
512
  )
491
513
  ] });
@@ -669,26 +691,31 @@ var QFP = ({
669
691
  if (!padContactLength) padContactLength = getPadContactLength(pinCount);
670
692
  if (!leadWidth) leadWidth = getLeadWidth(pinCount, bodyWidth);
671
693
  if (!bodyWidth) bodyWidth = pitch * (sidePinCount + 4);
694
+ const footprintPadLength = padContactLength;
672
695
  const bodyLength10 = bodyWidth;
673
696
  const pinOffsetToCenter = (sidePinCount - 1) * pitch / 2;
674
- const fullLength10 = bodyLength10 + 2 * padContactLength;
697
+ const leadReach = footprintPadLength * 0.5;
698
+ const fullLength10 = bodyLength10 + 2 * leadReach;
675
699
  const fullWidth = fullLength10;
676
700
  const leadHeight = 0.8;
677
701
  const leadThickness = 0.15;
678
- const bodyDistance = (fullWidth - bodyWidth) / 2 + 0.5;
702
+ const bodyDistance = leadReach;
703
+ const fullPadContactLength = leadReach * 0.5;
704
+ const curveLength = leadReach * 0.18;
679
705
  return /* @__PURE__ */ jsxs(Fragment2, { children: [
680
706
  Array.from({ length: sidePinCount }).map((_, i) => /* @__PURE__ */ jsx(
681
707
  SmdChipLead,
682
708
  {
683
709
  position: {
684
- x: -fullWidth / 2 - 0.4,
710
+ x: -fullWidth / 2,
685
711
  y: i * pitch - pinOffsetToCenter,
686
712
  z: leadThickness / 2
687
713
  },
688
714
  width: leadWidth,
689
715
  thickness: leadThickness,
690
- padContactLength,
716
+ padContactLength: fullPadContactLength,
691
717
  bodyDistance,
718
+ curveLength,
692
719
  height: leadHeight
693
720
  },
694
721
  `left-${i}`
@@ -698,14 +725,15 @@ var QFP = ({
698
725
  {
699
726
  rotation: Math.PI,
700
727
  position: {
701
- x: fullWidth / 2 + 0.4,
728
+ x: fullWidth / 2,
702
729
  y: i * pitch - pinOffsetToCenter,
703
730
  z: leadThickness / 2
704
731
  },
705
732
  width: leadWidth,
706
733
  thickness: leadThickness,
707
- padContactLength,
734
+ padContactLength: fullPadContactLength,
708
735
  bodyDistance,
736
+ curveLength,
709
737
  height: leadHeight
710
738
  },
711
739
  `right-${i}`
@@ -716,13 +744,14 @@ var QFP = ({
716
744
  rotation: Math.PI / 2,
717
745
  position: {
718
746
  x: i * pitch - pinOffsetToCenter,
719
- y: -fullLength10 / 2 - 0.4,
747
+ y: -fullLength10 / 2,
720
748
  z: leadThickness / 2
721
749
  },
722
750
  width: leadWidth,
723
751
  thickness: leadThickness,
724
- padContactLength,
752
+ padContactLength: fullPadContactLength,
725
753
  bodyDistance,
754
+ curveLength,
726
755
  height: leadHeight
727
756
  },
728
757
  `bottom-${i}`
@@ -733,13 +762,14 @@ var QFP = ({
733
762
  rotation: -Math.PI / 2,
734
763
  position: {
735
764
  x: i * pitch - pinOffsetToCenter,
736
- y: fullLength10 / 2 + 0.4,
765
+ y: fullLength10 / 2,
737
766
  z: leadThickness / 2
738
767
  },
739
768
  width: leadWidth,
740
769
  thickness: leadThickness,
741
- padContactLength,
770
+ padContactLength: fullPadContactLength,
742
771
  bodyDistance,
772
+ curveLength,
743
773
  height: leadHeight
744
774
  },
745
775
  `top-${i}`