jscad-electronics 0.0.57 → 0.0.59

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
@@ -1618,6 +1618,146 @@ var SMA = () => {
1618
1618
  ] });
1619
1619
  };
1620
1620
 
1621
+ // lib/SMB.tsx
1622
+ var SMB = () => {
1623
+ const bodyWidth = 4.4;
1624
+ const bodyLength10 = 3.4;
1625
+ const bodyHeight = 2.3;
1626
+ const padWidth = 1.45;
1627
+ const padThickness = 0.12;
1628
+ const leadThickness = 0.2;
1629
+ const leadHeight = 1.14;
1630
+ const taperOffset = 0.4;
1631
+ const straightHeight = bodyHeight * 0.5;
1632
+ const Body = /* @__PURE__ */ jsx(Colorize, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs(Union, { children: [
1633
+ /* @__PURE__ */ jsxs(Hull, { children: [
1634
+ /* @__PURE__ */ jsx(Translate, { z: padThickness + 0.01, children: /* @__PURE__ */ jsx(
1635
+ Cuboid,
1636
+ {
1637
+ size: [bodyWidth - taperOffset, bodyLength10 - taperOffset, 0.03]
1638
+ }
1639
+ ) }),
1640
+ /* @__PURE__ */ jsx(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx(Cuboid, { size: [bodyWidth, bodyLength10, 0.01] }) })
1641
+ ] }),
1642
+ /* @__PURE__ */ jsxs(Hull, { children: [
1643
+ /* @__PURE__ */ jsx(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx(Cuboid, { size: [bodyWidth, bodyLength10, 0.01] }) }),
1644
+ /* @__PURE__ */ jsx(Translate, { z: bodyHeight, children: /* @__PURE__ */ jsx(
1645
+ Cuboid,
1646
+ {
1647
+ size: [bodyWidth - taperOffset, bodyLength10 - taperOffset, 0.01]
1648
+ }
1649
+ ) })
1650
+ ] })
1651
+ ] }) });
1652
+ const Lead = ({ xDir }) => {
1653
+ const verticalGap = 1;
1654
+ const lowerPadGap = 1;
1655
+ const lowerPadX = xDir * (bodyLength10 / 2 - bodyHeight * 0.8 / 2 + lowerPadGap);
1656
+ const verticalLeadX = xDir * (bodyLength10 / 2 - leadThickness / 2 + verticalGap);
1657
+ const bodyEdgeX = xDir * (bodyLength10 / 2 - leadThickness / 2);
1658
+ const bridgeLength = Math.abs(bodyEdgeX - verticalLeadX);
1659
+ const bridgeCenterX = (verticalLeadX + bodyEdgeX) / 2;
1660
+ return /* @__PURE__ */ jsx(Colorize, { color: "#c0c0c0", children: /* @__PURE__ */ jsxs(Union, { children: [
1661
+ /* @__PURE__ */ jsx(
1662
+ Cuboid,
1663
+ {
1664
+ size: [bodyHeight * 0.8, padWidth, leadThickness],
1665
+ center: [lowerPadX, 0, leadThickness / 2]
1666
+ }
1667
+ ),
1668
+ /* @__PURE__ */ jsx(
1669
+ Cuboid,
1670
+ {
1671
+ size: [leadThickness, padWidth, leadHeight],
1672
+ center: [verticalLeadX, 0, leadHeight / 2 + leadThickness]
1673
+ }
1674
+ ),
1675
+ /* @__PURE__ */ jsx(
1676
+ Cuboid,
1677
+ {
1678
+ size: [bridgeLength, padWidth, leadThickness],
1679
+ center: [bridgeCenterX, 0, leadThickness / 2 + leadHeight]
1680
+ }
1681
+ )
1682
+ ] }) });
1683
+ };
1684
+ return /* @__PURE__ */ jsxs(Fragment2, { children: [
1685
+ /* @__PURE__ */ jsx(Lead, { xDir: 1 }),
1686
+ /* @__PURE__ */ jsx(Lead, { xDir: -1 }),
1687
+ Body
1688
+ ] });
1689
+ };
1690
+
1691
+ // lib/SMC.tsx
1692
+ var SMC = () => {
1693
+ const bodyWidth = 6.8;
1694
+ const bodyLength10 = 6;
1695
+ const bodyHeight = 2.3;
1696
+ const padWidth = 2.95;
1697
+ const padThickness = 0.2;
1698
+ const leadThickness = 0.2;
1699
+ const leadHeight = 1.14;
1700
+ const taperOffset = 0.4;
1701
+ const straightHeight = bodyHeight * 0.5;
1702
+ const Body = /* @__PURE__ */ jsx(Colorize, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs(Union, { children: [
1703
+ /* @__PURE__ */ jsxs(Hull, { children: [
1704
+ /* @__PURE__ */ jsx(Translate, { z: padThickness + 0.01, children: /* @__PURE__ */ jsx(
1705
+ Cuboid,
1706
+ {
1707
+ size: [bodyWidth - taperOffset, bodyLength10 - taperOffset, 0.03]
1708
+ }
1709
+ ) }),
1710
+ /* @__PURE__ */ jsx(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx(Cuboid, { size: [bodyWidth, bodyLength10, 0.01] }) })
1711
+ ] }),
1712
+ /* @__PURE__ */ jsxs(Hull, { children: [
1713
+ /* @__PURE__ */ jsx(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx(Cuboid, { size: [bodyWidth, bodyLength10, 0.01] }) }),
1714
+ /* @__PURE__ */ jsx(Translate, { z: bodyHeight, children: /* @__PURE__ */ jsx(
1715
+ Cuboid,
1716
+ {
1717
+ size: [bodyWidth - taperOffset, bodyLength10 - taperOffset, 0.01]
1718
+ }
1719
+ ) })
1720
+ ] })
1721
+ ] }) });
1722
+ const Lead = ({ xDir }) => {
1723
+ const verticalGap = 1;
1724
+ const lowerPadGap = 1;
1725
+ const lowerPadX = xDir * (bodyLength10 / 2 - bodyHeight * 0.8 / 2 + lowerPadGap);
1726
+ const verticalLeadX = xDir * (bodyLength10 / 2 - leadThickness / 2 + verticalGap);
1727
+ const bodyEdgeX = xDir * (bodyLength10 / 2 - leadThickness / 2);
1728
+ const bridgeLength = Math.abs(bodyEdgeX - verticalLeadX);
1729
+ const bridgeCenterX = (verticalLeadX + bodyEdgeX) / 2;
1730
+ return /* @__PURE__ */ jsx(Colorize, { color: "#c0c0c0", children: /* @__PURE__ */ jsxs(Union, { children: [
1731
+ /* @__PURE__ */ jsx(
1732
+ Cuboid,
1733
+ {
1734
+ size: [bodyHeight * 0.8, padWidth, leadThickness],
1735
+ center: [lowerPadX, 0, leadThickness / 2]
1736
+ }
1737
+ ),
1738
+ /* @__PURE__ */ jsx(
1739
+ Cuboid,
1740
+ {
1741
+ size: [leadThickness, padWidth, leadHeight],
1742
+ center: [verticalLeadX, 0, leadHeight / 2 + leadThickness]
1743
+ }
1744
+ ),
1745
+ /* @__PURE__ */ jsx(
1746
+ Cuboid,
1747
+ {
1748
+ size: [bridgeLength, padWidth, leadThickness],
1749
+ center: [bridgeCenterX, 0, leadThickness / 2 + leadHeight]
1750
+ }
1751
+ )
1752
+ ] }) });
1753
+ };
1754
+ return /* @__PURE__ */ jsxs(Fragment2, { children: [
1755
+ /* @__PURE__ */ jsx(Lead, { xDir: 1 }),
1756
+ /* @__PURE__ */ jsx(Lead, { xDir: -1 }),
1757
+ Body
1758
+ ] });
1759
+ };
1760
+
1621
1761
  // lib/Footprinter3d.tsx
1622
1762
  var Footprinter3d = ({ footprint }) => {
1623
1763
  const fpJson = fp.string(footprint).json();
@@ -1728,6 +1868,10 @@ var Footprinter3d = ({ footprint }) => {
1728
1868
  return /* @__PURE__ */ jsx(SOD523, {});
1729
1869
  case "sma":
1730
1870
  return /* @__PURE__ */ jsx(SMA, {});
1871
+ case "smb":
1872
+ return /* @__PURE__ */ jsx(SMB, {});
1873
+ case "smc":
1874
+ return /* @__PURE__ */ jsx(SMC, {});
1731
1875
  }
1732
1876
  const colorMatch = footprint.match(/_color\(([^)]+)\)/);
1733
1877
  const color = colorMatch ? colorMatch[1] : void 0;