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/vanilla.js CHANGED
@@ -1429,6 +1429,7 @@ var A2512 = ({ color = "#333" }) => {
1429
1429
  var FemaleHeader = ({
1430
1430
  x,
1431
1431
  y,
1432
+ z = 0,
1432
1433
  pitch = 2.54,
1433
1434
  legsLength = 3,
1434
1435
  innerDiameter = 0.945,
@@ -1446,7 +1447,7 @@ var FemaleHeader = ({
1446
1447
  {
1447
1448
  color: "#000",
1448
1449
  size: [bodyLength10, bodyWidth, bodyHeight],
1449
- center: [x, y, flipZ(bodyHeight / 2)]
1450
+ center: [x, y, flipZ(z + bodyHeight / 2)]
1450
1451
  }
1451
1452
  ),
1452
1453
  innerDiameter ? /* @__PURE__ */ jsx(
@@ -1454,14 +1455,14 @@ var FemaleHeader = ({
1454
1455
  {
1455
1456
  height: bodyHeight + 0.1,
1456
1457
  radius: innerDiameter / 2,
1457
- center: [x, y, flipZ(bodyHeight / 2)],
1458
+ center: [x, y, flipZ(z + bodyHeight / 2)],
1458
1459
  color: "#222"
1459
1460
  }
1460
1461
  ) : /* @__PURE__ */ jsx(
1461
1462
  Cuboid,
1462
1463
  {
1463
1464
  size: [gapWidth, gapWidth, bodyHeight],
1464
- center: [x, y, flipZ(bodyHeight / 2)]
1465
+ center: [x, y, flipZ(z + bodyHeight / 2)]
1465
1466
  }
1466
1467
  )
1467
1468
  ] }) }),
@@ -1472,7 +1473,7 @@ var FemaleHeader = ({
1472
1473
  {
1473
1474
  color: "silver",
1474
1475
  size: [pinThickness, pinThickness, legsLength * 0.9],
1475
- center: [x, y, flipZ(-legsLength / 2 * 0.9)]
1476
+ center: [x, y, flipZ(z + -legsLength / 2 * 0.9)]
1476
1477
  }
1477
1478
  ),
1478
1479
  /* @__PURE__ */ jsx(
@@ -1480,7 +1481,7 @@ var FemaleHeader = ({
1480
1481
  {
1481
1482
  color: "silver",
1482
1483
  size: [pinThickness / 1.8, pinThickness / 1.8, legsLength],
1483
- center: [x, y, flipZ(-legsLength / 2)]
1484
+ center: [x, y, flipZ(z + -legsLength / 2)]
1484
1485
  }
1485
1486
  )
1486
1487
  ] }),
@@ -1489,7 +1490,7 @@ var FemaleHeader = ({
1489
1490
  {
1490
1491
  color: "silver",
1491
1492
  size: [gapWidth, gapWidth, gapWidth * 0.5],
1492
- center: [x, y, flipZ(gapWidth / 2 * 0.5)]
1493
+ center: [x, y, flipZ(z + gapWidth / 2 * 0.5)]
1493
1494
  }
1494
1495
  )
1495
1496
  ] })
@@ -4229,6 +4230,7 @@ var MountedPcbModule = ({
4229
4230
  holes = [],
4230
4231
  holeInset = 1,
4231
4232
  pinRowHoleEdgeToEdgeDist = 2,
4233
+ female,
4232
4234
  nopin
4233
4235
  }) => {
4234
4236
  const boardCenterZ = boardThickness / 2;
@@ -4307,7 +4309,7 @@ var MountedPcbModule = ({
4307
4309
  const pinBodyHeight = 2;
4308
4310
  const longSidePinLength = 6;
4309
4311
  const shortSidePinLength = 3;
4310
- const boardOffsetZ = nopin ? 0 : pinBodyHeight;
4312
+ const boardOffsetZ = nopin || female ? 0 : pinBodyHeight;
4311
4313
  const boardBody = /* @__PURE__ */ jsx(Colorize, { color: "#008080", children: /* @__PURE__ */ jsxs(Subtract, { children: [
4312
4314
  /* @__PURE__ */ jsx(
4313
4315
  Cuboid,
@@ -4366,10 +4368,20 @@ var MountedPcbModule = ({
4366
4368
  },
4367
4369
  `pin-3d-${index}`
4368
4370
  ));
4371
+ const femaleHeaderRow = pins.map((pin, index) => /* @__PURE__ */ jsx(
4372
+ FemaleHeader,
4373
+ {
4374
+ x: pin.x,
4375
+ y: pin.y,
4376
+ flipZ: (z) => -z
4377
+ },
4378
+ `female-pin-3d-${index}`
4379
+ ));
4369
4380
  return /* @__PURE__ */ jsxs(Fragment2, { children: [
4370
4381
  boardBody,
4371
4382
  platedHoles,
4372
- !nopin && headerPins
4383
+ !female && !nopin && headerPins,
4384
+ female && femaleHeaderRow
4373
4385
  ] });
4374
4386
  };
4375
4387
 
@@ -4652,7 +4664,8 @@ var Footprinter3d = ({ footprint }) => {
4652
4664
  holes,
4653
4665
  holeInset,
4654
4666
  pinRowHoleEdgeToEdgeDist,
4655
- nopin: fpJson.nopin
4667
+ nopin: fpJson.nopin,
4668
+ female: fpJson.female
4656
4669
  }
4657
4670
  );
4658
4671
  }