jscad-electronics 0.0.59 → 0.0.61
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 +3 -1
- package/dist/index.js +111 -60
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +48 -0
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/vanilla.js
CHANGED
|
@@ -1758,6 +1758,52 @@ 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
|
+
|
|
1761
1807
|
// lib/Footprinter3d.tsx
|
|
1762
1808
|
var Footprinter3d = ({ footprint }) => {
|
|
1763
1809
|
const fpJson = fp.string(footprint).json();
|
|
@@ -1872,6 +1918,8 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
1872
1918
|
return /* @__PURE__ */ jsx(SMB, {});
|
|
1873
1919
|
case "smc":
|
|
1874
1920
|
return /* @__PURE__ */ jsx(SMC, {});
|
|
1921
|
+
case "smf":
|
|
1922
|
+
return /* @__PURE__ */ jsx(SMF, {});
|
|
1875
1923
|
}
|
|
1876
1924
|
const colorMatch = footprint.match(/_color\(([^)]+)\)/);
|
|
1877
1925
|
const color = colorMatch ? colorMatch[1] : void 0;
|