jscad-electronics 0.0.135 → 0.0.136

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 CHANGED
@@ -1590,7 +1590,7 @@ var SOT23W = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
1590
1590
  };
1591
1591
 
1592
1592
  // lib/FemaleHeader.tsx
1593
- import { Colorize as Colorize8, Cuboid as Cuboid16, Cylinder as Cylinder3, Hull as Hull4, Subtract as Subtract3 } from "jscad-fiber";
1593
+ import { Colorize as Colorize8, Cuboid as Cuboid16, Hull as Hull4, Subtract as Subtract3 } from "jscad-fiber";
1594
1594
  import { Fragment as Fragment21, jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
1595
1595
  var FemaleHeader = ({
1596
1596
  x,
@@ -1604,7 +1604,14 @@ var FemaleHeader = ({
1604
1604
  bodyWidth = pitch,
1605
1605
  flipZ
1606
1606
  }) => {
1607
- const pinThickness = innerDiameter / 1.5;
1607
+ const effectiveInnerDiameter = innerDiameter || 0.945;
1608
+ const pinThickness = effectiveInnerDiameter / 1.5;
1609
+ const socketWidth = effectiveInnerDiameter;
1610
+ const socketEntryWidth = socketWidth * 1.8;
1611
+ const socketEntryHeight = Math.min(bodyHeight * 0.18, pitch * 0.24);
1612
+ const socketDepth = bodyHeight + 0.1;
1613
+ const socketCenterZ = flipZ(z + socketDepth / 2);
1614
+ const socketEntryBaseZ = z + bodyHeight - socketEntryHeight;
1608
1615
  const gapWidth = pinThickness * 1.6;
1609
1616
  return /* @__PURE__ */ jsxs22(Fragment21, { children: [
1610
1617
  /* @__PURE__ */ jsx25(Colorize8, { color: "#1a1a1a", children: /* @__PURE__ */ jsxs22(Subtract3, { children: [
@@ -1616,21 +1623,29 @@ var FemaleHeader = ({
1616
1623
  center: [x, y, flipZ(z + bodyHeight / 2)]
1617
1624
  }
1618
1625
  ),
1619
- innerDiameter ? /* @__PURE__ */ jsx25(
1620
- Cylinder3,
1621
- {
1622
- height: bodyHeight + 0.1,
1623
- radius: innerDiameter / 2,
1624
- center: [x, y, flipZ(z + bodyHeight / 2)],
1625
- color: "#222"
1626
- }
1627
- ) : /* @__PURE__ */ jsx25(
1626
+ /* @__PURE__ */ jsx25(
1628
1627
  Cuboid16,
1629
1628
  {
1630
- size: [gapWidth, gapWidth, bodyHeight],
1631
- center: [x, y, flipZ(z + bodyHeight / 2)]
1629
+ size: [socketWidth, socketWidth, socketDepth],
1630
+ center: [x, y, socketCenterZ]
1632
1631
  }
1633
- )
1632
+ ),
1633
+ /* @__PURE__ */ jsxs22(Hull4, { children: [
1634
+ /* @__PURE__ */ jsx25(
1635
+ Cuboid16,
1636
+ {
1637
+ size: [socketWidth, socketWidth, 0.01],
1638
+ center: [x, y, flipZ(socketEntryBaseZ)]
1639
+ }
1640
+ ),
1641
+ /* @__PURE__ */ jsx25(
1642
+ Cuboid16,
1643
+ {
1644
+ size: [socketEntryWidth, socketEntryWidth, 0.01],
1645
+ center: [x, y, flipZ(z + bodyHeight)]
1646
+ }
1647
+ )
1648
+ ] })
1634
1649
  ] }) }),
1635
1650
  /* @__PURE__ */ jsxs22(Colorize8, { color: "silver", children: [
1636
1651
  /* @__PURE__ */ jsxs22(Hull4, { children: [
@@ -1701,7 +1716,7 @@ var FemaleHeaderRow = ({
1701
1716
  // lib/PushButton.tsx
1702
1717
  import {
1703
1718
  Colorize as Colorize9,
1704
- Cylinder as Cylinder4,
1719
+ Cylinder as Cylinder3,
1705
1720
  ExtrudeLinear as ExtrudeLinear3,
1706
1721
  Polygon as Polygon3,
1707
1722
  Rotate as Rotate6,
@@ -1738,7 +1753,7 @@ var PushButton = ({
1738
1753
  }
1739
1754
  ),
1740
1755
  /* @__PURE__ */ jsx27(
1741
- Cylinder4,
1756
+ Cylinder3,
1742
1757
  {
1743
1758
  color: "#1a1a1f",
1744
1759
  height: bodyHeight * 0.8,
@@ -1747,7 +1762,7 @@ var PushButton = ({
1747
1762
  }
1748
1763
  ),
1749
1764
  /* @__PURE__ */ jsx27(
1750
- Cylinder4,
1765
+ Cylinder3,
1751
1766
  {
1752
1767
  color: "#1a1a1f",
1753
1768
  height: bodyHeight * 0.2,
@@ -1760,7 +1775,7 @@ var PushButton = ({
1760
1775
  }
1761
1776
  ),
1762
1777
  /* @__PURE__ */ jsx27(
1763
- Cylinder4,
1778
+ Cylinder3,
1764
1779
  {
1765
1780
  color: "#1a1a1f",
1766
1781
  height: bodyHeight * 0.2,
@@ -1773,7 +1788,7 @@ var PushButton = ({
1773
1788
  }
1774
1789
  ),
1775
1790
  /* @__PURE__ */ jsx27(
1776
- Cylinder4,
1791
+ Cylinder3,
1777
1792
  {
1778
1793
  color: "#1a1a1f",
1779
1794
  height: bodyHeight * 0.2,
@@ -1786,7 +1801,7 @@ var PushButton = ({
1786
1801
  }
1787
1802
  ),
1788
1803
  /* @__PURE__ */ jsx27(
1789
- Cylinder4,
1804
+ Cylinder3,
1790
1805
  {
1791
1806
  color: "#1a1a1f",
1792
1807
  height: bodyHeight * 0.2,
@@ -3222,7 +3237,7 @@ var DFN = ({
3222
3237
  };
3223
3238
 
3224
3239
  // lib/hc49.tsx
3225
- import { Colorize as Colorize22, Cylinder as Cylinder5, Hull as Hull17, RoundedCylinder } from "jscad-fiber";
3240
+ import { Colorize as Colorize22, Cylinder as Cylinder4, Hull as Hull17, RoundedCylinder } from "jscad-fiber";
3226
3241
  import { Fragment as Fragment43, jsx as jsx47, jsxs as jsxs43 } from "react/jsx-runtime";
3227
3242
  var HC49 = ({
3228
3243
  bodyLength: bodyLength10 = 10.2,
@@ -3284,7 +3299,7 @@ var HC49 = ({
3284
3299
  ] }),
3285
3300
  /* @__PURE__ */ jsxs43(Colorize22, { color: leadColor, children: [
3286
3301
  /* @__PURE__ */ jsx47(
3287
- Cylinder5,
3302
+ Cylinder4,
3288
3303
  {
3289
3304
  height: leadLength + bodyHeight / 2,
3290
3305
  radius: leadDiameter / 2,
@@ -3292,7 +3307,7 @@ var HC49 = ({
3292
3307
  }
3293
3308
  ),
3294
3309
  /* @__PURE__ */ jsx47(
3295
- Cylinder5,
3310
+ Cylinder4,
3296
3311
  {
3297
3312
  height: leadLength + bodyHeight / 2,
3298
3313
  radius: leadDiameter / 2,
@@ -3306,7 +3321,7 @@ var HC49 = ({
3306
3321
  // lib/MicroMELF.tsx
3307
3322
  import {
3308
3323
  Colorize as Colorize23,
3309
- Cylinder as Cylinder6,
3324
+ Cylinder as Cylinder5,
3310
3325
  RoundedCylinder as RoundedCylinder2,
3311
3326
  Rotate as Rotate7,
3312
3327
  RoundedCuboid as RoundedCuboid2
@@ -3331,7 +3346,7 @@ var MicroMELF = ({
3331
3346
  }
3332
3347
  ),
3333
3348
  /* @__PURE__ */ jsx48(
3334
- Cylinder6,
3349
+ Cylinder5,
3335
3350
  {
3336
3351
  height: padLength / 2,
3337
3352
  radius: bodyDiameter / 2 - padLength,
@@ -3595,7 +3610,7 @@ import {
3595
3610
  Hull as Hull18,
3596
3611
  Rotate as Rotate10,
3597
3612
  Translate as Translate22,
3598
- Cylinder as Cylinder7,
3613
+ Cylinder as Cylinder6,
3599
3614
  Subtract as Subtract4
3600
3615
  } from "jscad-fiber";
3601
3616
  import { Fragment as Fragment49, jsx as jsx53, jsxs as jsxs49 } from "react/jsx-runtime";
@@ -3629,7 +3644,7 @@ var TO220 = () => {
3629
3644
  }
3630
3645
  ),
3631
3646
  /* @__PURE__ */ jsx53(
3632
- Cylinder7,
3647
+ Cylinder6,
3633
3648
  {
3634
3649
  color: "black",
3635
3650
  center: [padCenterX, 0, padThickness - 2],
@@ -3876,7 +3891,7 @@ import {
3876
3891
  Cuboid as Cuboid35,
3877
3892
  Hull as Hull19,
3878
3893
  Translate as Translate23,
3879
- Cylinder as Cylinder8,
3894
+ Cylinder as Cylinder7,
3880
3895
  Subtract as Subtract5
3881
3896
  } from "jscad-fiber";
3882
3897
  import { jsx as jsx56, jsxs as jsxs52 } from "react/jsx-runtime";
@@ -3902,7 +3917,7 @@ var TO92 = () => {
3902
3917
  const sideLeadZ = -7.5;
3903
3918
  return /* @__PURE__ */ jsxs52(Translate23, { center: [0, 1, 10.5], children: [
3904
3919
  /* @__PURE__ */ jsx56(Colorize27, { color: bodyColor, children: /* @__PURE__ */ jsxs52(Subtract5, { children: [
3905
- /* @__PURE__ */ jsx56(Translate23, { center: [0, 0, bodyZ], children: /* @__PURE__ */ jsx56(Cylinder8, { radius: bodyRadius, height: bodyHeight }) }),
3920
+ /* @__PURE__ */ jsx56(Translate23, { center: [0, 0, bodyZ], children: /* @__PURE__ */ jsx56(Cylinder7, { radius: bodyRadius, height: bodyHeight }) }),
3906
3921
  /* @__PURE__ */ jsx56(Translate23, { center: [0, -(bodyRadius - flatCut / 2), bodyZ], children: /* @__PURE__ */ jsx56(Cuboid35, { size: [bodyRadius * 2, flatCut, bodyHeight + 0.2] }) })
3907
3922
  ] }) }),
3908
3923
  /* @__PURE__ */ jsx56(Translate23, { center: leadTipPos1, children: /* @__PURE__ */ jsx56(Cuboid35, { size: leadTipSize }) }),
@@ -4289,12 +4304,12 @@ var SOD323FL = () => {
4289
4304
  };
4290
4305
 
4291
4306
  // lib/AxialCapacitor.tsx
4292
- import { Colorize as Colorize31, Cylinder as Cylinder9, Rotate as Rotate11, Sphere as Sphere2, Translate as Translate27 } from "jscad-fiber";
4307
+ import { Colorize as Colorize31, Cylinder as Cylinder8, Rotate as Rotate11, Sphere as Sphere2, Translate as Translate27 } from "jscad-fiber";
4293
4308
  import { Fragment as Fragment57, jsx as jsx62, jsxs as jsxs58 } from "react/jsx-runtime";
4294
4309
  var AxialCapacitor = ({ pitch = 10 }) => {
4295
4310
  const heightToCenterOfCapacitor = 0.5 + 4 / 2;
4296
4311
  return /* @__PURE__ */ jsxs58(Fragment57, { children: [
4297
- /* @__PURE__ */ jsx62(Cylinder9, { height: 4, radius: 0.5, center: [-pitch / 2, 0, 0.5] }),
4312
+ /* @__PURE__ */ jsx62(Cylinder8, { height: 4, radius: 0.5, center: [-pitch / 2, 0, 0.5] }),
4298
4313
  /* @__PURE__ */ jsx62(
4299
4314
  Sphere2,
4300
4315
  {
@@ -4304,7 +4319,7 @@ var AxialCapacitor = ({ pitch = 10 }) => {
4304
4319
  ),
4305
4320
  /* @__PURE__ */ jsx62(Translate27, { x: -2.5, y: 0, z: heightToCenterOfCapacitor, children: /* @__PURE__ */ jsxs58(Rotate11, { rotation: [0, Math.PI / 2, 0], children: [
4306
4321
  /* @__PURE__ */ jsx62(
4307
- Cylinder9,
4322
+ Cylinder8,
4308
4323
  {
4309
4324
  height: pitch,
4310
4325
  radius: 0.5,
@@ -4312,7 +4327,7 @@ var AxialCapacitor = ({ pitch = 10 }) => {
4312
4327
  }
4313
4328
  ),
4314
4329
  /* @__PURE__ */ jsx62(Colorize31, { color: "#d2b48c", children: /* @__PURE__ */ jsx62(
4315
- Cylinder9,
4330
+ Cylinder8,
4316
4331
  {
4317
4332
  height: 5,
4318
4333
  radius: 1.3,
@@ -4320,13 +4335,13 @@ var AxialCapacitor = ({ pitch = 10 }) => {
4320
4335
  }
4321
4336
  ) })
4322
4337
  ] }) }),
4323
- /* @__PURE__ */ jsx62(Cylinder9, { height: 4, radius: 0.5, center: [pitch / 2, 0, 0.5] }),
4338
+ /* @__PURE__ */ jsx62(Cylinder8, { height: 4, radius: 0.5, center: [pitch / 2, 0, 0.5] }),
4324
4339
  /* @__PURE__ */ jsx62(Sphere2, { radius: 0.5, center: [pitch / 2, 0, heightToCenterOfCapacitor] })
4325
4340
  ] });
4326
4341
  };
4327
4342
 
4328
4343
  // lib/stampboard.tsx
4329
- import { Colorize as Colorize32, Cuboid as Cuboid40, Cylinder as Cylinder10, Subtract as Subtract6, Union as Union19 } from "jscad-fiber";
4344
+ import { Colorize as Colorize32, Cuboid as Cuboid40, Cylinder as Cylinder9, Subtract as Subtract6, Union as Union19 } from "jscad-fiber";
4330
4345
  import { Fragment as Fragment58, jsx as jsx63, jsxs as jsxs59 } from "react/jsx-runtime";
4331
4346
  var StampBoard = ({
4332
4347
  bodyWidth = 21,
@@ -4443,7 +4458,7 @@ var StampBoard = ({
4443
4458
  ))
4444
4459
  ] }) });
4445
4460
  const holePads = innerHoles && holes.map((hole, index) => /* @__PURE__ */ jsx63(
4446
- Cylinder10,
4461
+ Cylinder9,
4447
4462
  {
4448
4463
  color: "black",
4449
4464
  center: [hole.x, hole.y, boardCenterZ],
@@ -4477,7 +4492,7 @@ var StampBoard = ({
4477
4492
  };
4478
4493
 
4479
4494
  // lib/MountedPcbModule.tsx
4480
- import { Colorize as Colorize34, Cuboid as Cuboid42, Cylinder as Cylinder11, Subtract as Subtract8 } from "jscad-fiber";
4495
+ import { Colorize as Colorize34, Cuboid as Cuboid42, Cylinder as Cylinder10, Subtract as Subtract8 } from "jscad-fiber";
4481
4496
 
4482
4497
  // lib/Screen.tsx
4483
4498
  import { Colorize as Colorize33, Cuboid as Cuboid41, Subtract as Subtract7, Translate as Translate28 } from "jscad-fiber";
@@ -4655,7 +4670,7 @@ var MountedPcbModule = ({
4655
4670
  }
4656
4671
  ),
4657
4672
  holePositions.map((hole, index) => /* @__PURE__ */ jsx65(
4658
- Cylinder11,
4673
+ Cylinder10,
4659
4674
  {
4660
4675
  center: [hole.x, hole.y, boardCenterZ + boardOffsetZ],
4661
4676
  radius: od / 2,
@@ -4664,7 +4679,7 @@ var MountedPcbModule = ({
4664
4679
  `hole-${index}`
4665
4680
  )),
4666
4681
  pins.map((pin, index) => /* @__PURE__ */ jsx65(
4667
- Cylinder11,
4682
+ Cylinder10,
4668
4683
  {
4669
4684
  center: [pin.x, pin.y, boardCenterZ + boardOffsetZ],
4670
4685
  radius: od / 2,
@@ -4675,7 +4690,7 @@ var MountedPcbModule = ({
4675
4690
  ] }) });
4676
4691
  const platedHoles = pins.map((pin, index) => /* @__PURE__ */ jsx65(Colorize34, { color: "#FFD700", children: /* @__PURE__ */ jsxs61(Subtract8, { children: [
4677
4692
  /* @__PURE__ */ jsx65(
4678
- Cylinder11,
4693
+ Cylinder10,
4679
4694
  {
4680
4695
  center: [pin.x, pin.y, boardThickness / 2 + boardOffsetZ],
4681
4696
  radius: od / 2,
@@ -4683,7 +4698,7 @@ var MountedPcbModule = ({
4683
4698
  }
4684
4699
  ),
4685
4700
  /* @__PURE__ */ jsx65(
4686
- Cylinder11,
4701
+ Cylinder10,
4687
4702
  {
4688
4703
  center: [pin.x, pin.y, boardThickness / 2 + boardOffsetZ],
4689
4704
  radius: id / 2,
@@ -4793,7 +4808,7 @@ var SOD723_default = SOD723;
4793
4808
  import {
4794
4809
  Colorize as Colorize36,
4795
4810
  Cuboid as Cuboid44,
4796
- Cylinder as Cylinder12,
4811
+ Cylinder as Cylinder11,
4797
4812
  Rotate as Rotate12,
4798
4813
  Subtract as Subtract9,
4799
4814
  Translate as Translate30
@@ -4901,7 +4916,7 @@ var JSTZH1_5mm = ({
4901
4916
  )
4902
4917
  ] }) }) }) }),
4903
4918
  showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx67(Colorize36, { color: pinColor, children: /* @__PURE__ */ jsx67(
4904
- Cylinder12,
4919
+ Cylinder11,
4905
4920
  {
4906
4921
  height: pinLength,
4907
4922
  radius: 0.35,