jscad-electronics 0.0.60 → 0.0.62
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.d.ts +5 -1
- package/dist/index.js +160 -60
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +94 -0
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/vanilla.js
CHANGED
|
@@ -1758,6 +1758,96 @@ var SMC = () => {
|
|
|
1758
1758
|
] });
|
|
1759
1759
|
};
|
|
1760
1760
|
|
|
1761
|
+
// lib/SMF.tsx
|
|
1762
|
+
var SMF = () => {
|
|
1763
|
+
const fullWidth = 2.9;
|
|
1764
|
+
const bodyLength10 = 1.9;
|
|
1765
|
+
const bodyHeight = 1.08;
|
|
1766
|
+
const padWidth = 1.2;
|
|
1767
|
+
const padLength = 1;
|
|
1768
|
+
const padThickness = 0.25;
|
|
1769
|
+
const bodyWidth = fullWidth;
|
|
1770
|
+
const leftPadCenterX = -1.3;
|
|
1771
|
+
const rightPadCenterX = 1.3;
|
|
1772
|
+
const taperOffset = 0.2;
|
|
1773
|
+
const straightHeight = bodyHeight * 0.5;
|
|
1774
|
+
const Body = /* @__PURE__ */ jsx(Colorize, { color: "#222", children: /* @__PURE__ */ jsxs(Union, { children: [
|
|
1775
|
+
/* @__PURE__ */ jsx(Translate, { z: straightHeight / 2, children: /* @__PURE__ */ jsx(Cuboid, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
|
|
1776
|
+
/* @__PURE__ */ jsxs(Hull, { children: [
|
|
1777
|
+
/* @__PURE__ */ jsx(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx(Cuboid, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
1778
|
+
/* @__PURE__ */ jsx(Translate, { z: bodyHeight, children: /* @__PURE__ */ jsx(
|
|
1779
|
+
Cuboid,
|
|
1780
|
+
{
|
|
1781
|
+
size: [bodyWidth - taperOffset, bodyLength10 - taperOffset, 0.01]
|
|
1782
|
+
}
|
|
1783
|
+
) })
|
|
1784
|
+
] })
|
|
1785
|
+
] }) });
|
|
1786
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
1787
|
+
/* @__PURE__ */ jsx(
|
|
1788
|
+
Cuboid,
|
|
1789
|
+
{
|
|
1790
|
+
color: "#ccc",
|
|
1791
|
+
size: [padLength, padWidth, padThickness],
|
|
1792
|
+
center: [leftPadCenterX, 0, padThickness / 2]
|
|
1793
|
+
}
|
|
1794
|
+
),
|
|
1795
|
+
/* @__PURE__ */ jsx(
|
|
1796
|
+
Cuboid,
|
|
1797
|
+
{
|
|
1798
|
+
color: "#ccc",
|
|
1799
|
+
size: [padLength, padWidth, padThickness],
|
|
1800
|
+
center: [rightPadCenterX, 0, padThickness / 2]
|
|
1801
|
+
}
|
|
1802
|
+
),
|
|
1803
|
+
Body
|
|
1804
|
+
] });
|
|
1805
|
+
};
|
|
1806
|
+
|
|
1807
|
+
// lib/sod-123F.tsx
|
|
1808
|
+
var SOD123F = () => {
|
|
1809
|
+
const fullWidth = 2.7;
|
|
1810
|
+
const bodyLength10 = 1.6;
|
|
1811
|
+
const bodyHeight = 1.1;
|
|
1812
|
+
const padWidth = 0.6;
|
|
1813
|
+
const padLength = 1;
|
|
1814
|
+
const padThickness = 0.12;
|
|
1815
|
+
const leftPadCenterX = -1.3;
|
|
1816
|
+
const rightPadCenterX = 1.3;
|
|
1817
|
+
const taperOffset = 0.2;
|
|
1818
|
+
const straightHeight = bodyHeight * 0.5;
|
|
1819
|
+
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
1820
|
+
/* @__PURE__ */ jsx(
|
|
1821
|
+
Cuboid,
|
|
1822
|
+
{
|
|
1823
|
+
color: "#ccc",
|
|
1824
|
+
size: [padLength, padWidth, padThickness],
|
|
1825
|
+
center: [leftPadCenterX, 0, padThickness / 2]
|
|
1826
|
+
}
|
|
1827
|
+
),
|
|
1828
|
+
/* @__PURE__ */ jsx(
|
|
1829
|
+
Cuboid,
|
|
1830
|
+
{
|
|
1831
|
+
color: "#ccc",
|
|
1832
|
+
size: [padLength, padWidth, padThickness],
|
|
1833
|
+
center: [rightPadCenterX, 0, padThickness / 2]
|
|
1834
|
+
}
|
|
1835
|
+
),
|
|
1836
|
+
/* @__PURE__ */ jsx(Colorize, { color: "#222", children: /* @__PURE__ */ jsxs(Union, { children: [
|
|
1837
|
+
/* @__PURE__ */ jsx(Translate, { z: straightHeight / 2, children: /* @__PURE__ */ jsx(Cuboid, { size: [fullWidth, bodyLength10, straightHeight] }) }),
|
|
1838
|
+
/* @__PURE__ */ jsxs(Hull, { children: [
|
|
1839
|
+
/* @__PURE__ */ jsx(Translate, { z: straightHeight, children: /* @__PURE__ */ jsx(Cuboid, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
1840
|
+
/* @__PURE__ */ jsx(Translate, { z: bodyHeight, children: /* @__PURE__ */ jsx(
|
|
1841
|
+
Cuboid,
|
|
1842
|
+
{
|
|
1843
|
+
size: [fullWidth - taperOffset, bodyLength10 - taperOffset, 0.01]
|
|
1844
|
+
}
|
|
1845
|
+
) })
|
|
1846
|
+
] })
|
|
1847
|
+
] }) })
|
|
1848
|
+
] });
|
|
1849
|
+
};
|
|
1850
|
+
|
|
1761
1851
|
// lib/Footprinter3d.tsx
|
|
1762
1852
|
var Footprinter3d = ({ footprint }) => {
|
|
1763
1853
|
const fpJson = fp.string(footprint).json();
|
|
@@ -1872,6 +1962,10 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
1872
1962
|
return /* @__PURE__ */ jsx(SMB, {});
|
|
1873
1963
|
case "smc":
|
|
1874
1964
|
return /* @__PURE__ */ jsx(SMC, {});
|
|
1965
|
+
case "smf":
|
|
1966
|
+
return /* @__PURE__ */ jsx(SMF, {});
|
|
1967
|
+
case "sod123f":
|
|
1968
|
+
return /* @__PURE__ */ jsx(SOD123F, {});
|
|
1875
1969
|
}
|
|
1876
1970
|
const colorMatch = footprint.match(/_color\(([^)]+)\)/);
|
|
1877
1971
|
const color = colorMatch ? colorMatch[1] : void 0;
|