jscad-electronics 0.0.28 → 0.0.29
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 +31 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -77300,7 +77300,7 @@ var require_dist = __commonJS({
|
|
|
77300
77300
|
Cube: () => Cube2,
|
|
77301
77301
|
Cuboid: () => Cuboid19,
|
|
77302
77302
|
Custom: () => Custom,
|
|
77303
|
-
Cylinder: () =>
|
|
77303
|
+
Cylinder: () => Cylinder5,
|
|
77304
77304
|
CylinderElliptic: () => CylinderElliptic,
|
|
77305
77305
|
Ellipsoid: () => Ellipsoid,
|
|
77306
77306
|
ExtrudeFromSlices: () => ExtrudeFromSlices,
|
|
@@ -77841,7 +77841,7 @@ var require_dist = __commonJS({
|
|
|
77841
77841
|
var CylinderBase = ({ radius, height: height10 }) => {
|
|
77842
77842
|
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("cylinder", { radius, height: height10 });
|
|
77843
77843
|
};
|
|
77844
|
-
var
|
|
77844
|
+
var Cylinder5 = withColorProp(
|
|
77845
77845
|
withOffsetProp(withRotationProp(CylinderBase))
|
|
77846
77846
|
);
|
|
77847
77847
|
var import_jsx_runtime122 = require_jsx_runtime();
|
|
@@ -79533,11 +79533,14 @@ var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
|
|
|
79533
79533
|
var FemaleHeader = ({
|
|
79534
79534
|
numberOfPins,
|
|
79535
79535
|
pitch = 2.54,
|
|
79536
|
-
legsLength = 3
|
|
79536
|
+
legsLength = 3,
|
|
79537
|
+
outerDiameter = 0.945,
|
|
79538
|
+
innerDiameter = 0.945
|
|
79537
79539
|
}) => {
|
|
79538
|
-
const pinThickness =
|
|
79540
|
+
const pinThickness = innerDiameter / 1.5;
|
|
79541
|
+
const bodyDepth = pinThickness * 2 + outerDiameter;
|
|
79539
79542
|
const bodyHeight = 5;
|
|
79540
|
-
const bodyWidth = numberOfPins * pitch;
|
|
79543
|
+
const bodyWidth = (numberOfPins - 1) * pitch + outerDiameter + pitch / 2;
|
|
79541
79544
|
const gapWidth = pinThickness * 1.6;
|
|
79542
79545
|
const xoff = -((numberOfPins - 1) / 2) * pitch;
|
|
79543
79546
|
const Body = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jscad_fiber18.Colorize, { color: "#1a1a1a", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jscad_fiber18.Subtract, { children: [
|
|
@@ -79545,21 +79548,34 @@ var FemaleHeader = ({
|
|
|
79545
79548
|
import_jscad_fiber18.Cuboid,
|
|
79546
79549
|
{
|
|
79547
79550
|
color: "#000",
|
|
79548
|
-
size: [bodyWidth,
|
|
79551
|
+
size: [bodyWidth, bodyDepth, bodyHeight],
|
|
79549
79552
|
center: [0, 0, bodyHeight / 2]
|
|
79550
79553
|
}
|
|
79551
79554
|
),
|
|
79552
|
-
Array.from(
|
|
79553
|
-
|
|
79554
|
-
|
|
79555
|
-
|
|
79556
|
-
|
|
79557
|
-
|
|
79558
|
-
|
|
79555
|
+
Array.from(
|
|
79556
|
+
{ length: numberOfPins },
|
|
79557
|
+
(_, i) => innerDiameter ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
79558
|
+
import_jscad_fiber18.Cylinder,
|
|
79559
|
+
{
|
|
79560
|
+
height: bodyHeight + 0.1,
|
|
79561
|
+
radius: innerDiameter / 2,
|
|
79562
|
+
center: [xoff + i * pitch, 0, bodyHeight / 2],
|
|
79563
|
+
color: "#222"
|
|
79564
|
+
},
|
|
79565
|
+
i
|
|
79566
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
79567
|
+
import_jscad_fiber18.Cuboid,
|
|
79568
|
+
{
|
|
79569
|
+
size: [gapWidth, gapWidth, bodyHeight],
|
|
79570
|
+
center: [xoff + i * pitch, 0, bodyHeight / 2]
|
|
79571
|
+
},
|
|
79572
|
+
i
|
|
79573
|
+
)
|
|
79574
|
+
)
|
|
79559
79575
|
] }) });
|
|
79560
79576
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
79561
79577
|
Body,
|
|
79562
|
-
Array.from({ length: numberOfPins }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime22.
|
|
79578
|
+
Array.from({ length: numberOfPins }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jscad_fiber18.Colorize, { color: "silver", children: [
|
|
79563
79579
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jscad_fiber18.Hull, { children: [
|
|
79564
79580
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
79565
79581
|
import_jscad_fiber18.Cuboid,
|
|
@@ -79586,7 +79602,7 @@ var FemaleHeader = ({
|
|
|
79586
79602
|
center: [xoff + i * pitch, 0, gapWidth / 2 * 0.5]
|
|
79587
79603
|
}
|
|
79588
79604
|
)
|
|
79589
|
-
] }
|
|
79605
|
+
] }, i))
|
|
79590
79606
|
] });
|
|
79591
79607
|
};
|
|
79592
79608
|
|