jscad-electronics 0.0.118 → 0.0.119

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 CHANGED
@@ -262,9 +262,10 @@ declare const PinHeader: ({ x, y, pinThickness, shortSidePinLength, longSidePinL
262
262
  rightangle?: boolean;
263
263
  }) => react_jsx_runtime.JSX.Element;
264
264
 
265
- declare const FemaleHeader: ({ x, y, pitch, legsLength, innerDiameter, bodyHeight, bodyLength, bodyWidth, flipZ, }: {
265
+ declare const FemaleHeader: ({ x, y, z, pitch, legsLength, innerDiameter, bodyHeight, bodyLength, bodyWidth, flipZ, }: {
266
266
  x: number;
267
267
  y: number;
268
+ z?: number;
268
269
  pitch?: number;
269
270
  legsLength?: number;
270
271
  innerDiameter?: number;
@@ -389,7 +390,7 @@ declare const TO220: () => react_jsx_runtime.JSX.Element;
389
390
 
390
391
  declare const TO92: () => react_jsx_runtime.JSX.Element;
391
392
 
392
- declare const MountedPcbModule: ({ numPins, rows, p, id, od, boardThickness, width, height, pinRowSide, holes, holeInset, pinRowHoleEdgeToEdgeDist, nopin, }: {
393
+ declare const MountedPcbModule: ({ numPins, rows, p, id, od, boardThickness, width, height, pinRowSide, holes, holeInset, pinRowHoleEdgeToEdgeDist, female, nopin, }: {
393
394
  numPins?: number;
394
395
  rows?: number;
395
396
  p?: number;
@@ -402,6 +403,7 @@ declare const MountedPcbModule: ({ numPins, rows, p, id, od, boardThickness, wid
402
403
  holes?: string[];
403
404
  holeInset?: number;
404
405
  pinRowHoleEdgeToEdgeDist?: number;
406
+ female?: boolean;
405
407
  nopin?: boolean;
406
408
  }) => react_jsx_runtime.JSX.Element;
407
409
 
package/dist/index.js CHANGED
@@ -1496,6 +1496,7 @@ import { Fragment as Fragment21, jsx as jsx25, jsxs as jsxs22 } from "react/jsx-
1496
1496
  var FemaleHeader = ({
1497
1497
  x,
1498
1498
  y,
1499
+ z = 0,
1499
1500
  pitch = 2.54,
1500
1501
  legsLength = 3,
1501
1502
  innerDiameter = 0.945,
@@ -1513,7 +1514,7 @@ var FemaleHeader = ({
1513
1514
  {
1514
1515
  color: "#000",
1515
1516
  size: [bodyLength10, bodyWidth, bodyHeight],
1516
- center: [x, y, flipZ(bodyHeight / 2)]
1517
+ center: [x, y, flipZ(z + bodyHeight / 2)]
1517
1518
  }
1518
1519
  ),
1519
1520
  innerDiameter ? /* @__PURE__ */ jsx25(
@@ -1521,14 +1522,14 @@ var FemaleHeader = ({
1521
1522
  {
1522
1523
  height: bodyHeight + 0.1,
1523
1524
  radius: innerDiameter / 2,
1524
- center: [x, y, flipZ(bodyHeight / 2)],
1525
+ center: [x, y, flipZ(z + bodyHeight / 2)],
1525
1526
  color: "#222"
1526
1527
  }
1527
1528
  ) : /* @__PURE__ */ jsx25(
1528
1529
  Cuboid16,
1529
1530
  {
1530
1531
  size: [gapWidth, gapWidth, bodyHeight],
1531
- center: [x, y, flipZ(bodyHeight / 2)]
1532
+ center: [x, y, flipZ(z + bodyHeight / 2)]
1532
1533
  }
1533
1534
  )
1534
1535
  ] }) }),
@@ -1539,7 +1540,7 @@ var FemaleHeader = ({
1539
1540
  {
1540
1541
  color: "silver",
1541
1542
  size: [pinThickness, pinThickness, legsLength * 0.9],
1542
- center: [x, y, flipZ(-legsLength / 2 * 0.9)]
1543
+ center: [x, y, flipZ(z + -legsLength / 2 * 0.9)]
1543
1544
  }
1544
1545
  ),
1545
1546
  /* @__PURE__ */ jsx25(
@@ -1547,7 +1548,7 @@ var FemaleHeader = ({
1547
1548
  {
1548
1549
  color: "silver",
1549
1550
  size: [pinThickness / 1.8, pinThickness / 1.8, legsLength],
1550
- center: [x, y, flipZ(-legsLength / 2)]
1551
+ center: [x, y, flipZ(z + -legsLength / 2)]
1551
1552
  }
1552
1553
  )
1553
1554
  ] }),
@@ -1556,7 +1557,7 @@ var FemaleHeader = ({
1556
1557
  {
1557
1558
  color: "silver",
1558
1559
  size: [gapWidth, gapWidth, gapWidth * 0.5],
1559
- center: [x, y, flipZ(gapWidth / 2 * 0.5)]
1560
+ center: [x, y, flipZ(z + gapWidth / 2 * 0.5)]
1560
1561
  }
1561
1562
  )
1562
1563
  ] })
@@ -4392,6 +4393,7 @@ var MountedPcbModule = ({
4392
4393
  holes = [],
4393
4394
  holeInset = 1,
4394
4395
  pinRowHoleEdgeToEdgeDist = 2,
4396
+ female,
4395
4397
  nopin
4396
4398
  }) => {
4397
4399
  const boardCenterZ = boardThickness / 2;
@@ -4470,7 +4472,7 @@ var MountedPcbModule = ({
4470
4472
  const pinBodyHeight = 2;
4471
4473
  const longSidePinLength = 6;
4472
4474
  const shortSidePinLength = 3;
4473
- const boardOffsetZ = nopin ? 0 : pinBodyHeight;
4475
+ const boardOffsetZ = nopin || female ? 0 : pinBodyHeight;
4474
4476
  const boardBody = /* @__PURE__ */ jsx64(Colorize33, { color: "#008080", children: /* @__PURE__ */ jsxs60(Subtract7, { children: [
4475
4477
  /* @__PURE__ */ jsx64(
4476
4478
  Cuboid41,
@@ -4529,10 +4531,20 @@ var MountedPcbModule = ({
4529
4531
  },
4530
4532
  `pin-3d-${index}`
4531
4533
  ));
4534
+ const femaleHeaderRow = pins.map((pin, index) => /* @__PURE__ */ jsx64(
4535
+ FemaleHeader,
4536
+ {
4537
+ x: pin.x,
4538
+ y: pin.y,
4539
+ flipZ: (z) => -z
4540
+ },
4541
+ `female-pin-3d-${index}`
4542
+ ));
4532
4543
  return /* @__PURE__ */ jsxs60(Fragment59, { children: [
4533
4544
  boardBody,
4534
4545
  platedHoles,
4535
- !nopin && headerPins
4546
+ !female && !nopin && headerPins,
4547
+ female && femaleHeaderRow
4536
4548
  ] });
4537
4549
  };
4538
4550
 
@@ -4816,7 +4828,8 @@ var Footprinter3d = ({ footprint }) => {
4816
4828
  holes,
4817
4829
  holeInset,
4818
4830
  pinRowHoleEdgeToEdgeDist,
4819
- nopin: fpJson.nopin
4831
+ nopin: fpJson.nopin,
4832
+ female: fpJson.female
4820
4833
  }
4821
4834
  );
4822
4835
  }