jscad-electronics 0.0.158 → 0.0.159
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 +10 -1
- package/dist/index.js +446 -307
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +144 -8
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -762,9 +762,9 @@ var ExtrudedPads = ({
|
|
|
762
762
|
};
|
|
763
763
|
|
|
764
764
|
// lib/Footprinter3d.tsx
|
|
765
|
-
import { fp as
|
|
765
|
+
import { fp as fp6 } from "@tscircuit/footprinter";
|
|
766
766
|
import { mp } from "@tscircuit/modelprinter";
|
|
767
|
-
import { Rotate as Rotate19, Translate as
|
|
767
|
+
import { Rotate as Rotate19, Translate as Translate40 } from "jscad-fiber";
|
|
768
768
|
|
|
769
769
|
// lib/DualInlinePackage.tsx
|
|
770
770
|
import { Polygon as Polygon3, ExtrudeLinear as ExtrudeLinear3, Rotate as Rotate3, Translate as Translate6 } from "jscad-fiber";
|
|
@@ -5512,17 +5512,148 @@ var JSTPH2_0mm = ({
|
|
|
5512
5512
|
] });
|
|
5513
5513
|
};
|
|
5514
5514
|
|
|
5515
|
+
// lib/JSTXH2_5mm.tsx
|
|
5516
|
+
import { Colorize as Colorize39, Cuboid as Cuboid47, Subtract as Subtract11, Translate as Translate32 } from "jscad-fiber";
|
|
5517
|
+
import { fp as fp3 } from "@tscircuit/footprinter";
|
|
5518
|
+
import { Fragment as Fragment67, jsx as jsx72, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
5519
|
+
var JSTXH2_5mm = ({
|
|
5520
|
+
numPins = 4,
|
|
5521
|
+
showPins = true,
|
|
5522
|
+
showFootprint = true,
|
|
5523
|
+
bodyColor = "#f8fafc",
|
|
5524
|
+
// Natural white PA 66 nylon housing per spec
|
|
5525
|
+
pinColor = "#635959"
|
|
5526
|
+
// Tin-plated metallic gray posts
|
|
5527
|
+
}) => {
|
|
5528
|
+
const pitch = 2.5;
|
|
5529
|
+
const bodyHeight = 7;
|
|
5530
|
+
const bodyDepth = 5.75;
|
|
5531
|
+
const wallThickness = 0.85;
|
|
5532
|
+
const floorThickness = 1.65;
|
|
5533
|
+
const hollowHeight = bodyHeight - floorThickness;
|
|
5534
|
+
const pinLength = 8.75;
|
|
5535
|
+
const bodyWidth = (numPins - 1) * pitch + 4.9;
|
|
5536
|
+
const startX = -((numPins - 1) * pitch) / 2;
|
|
5537
|
+
const keySlotWidth = 0.8;
|
|
5538
|
+
const keySlotDepth = wallThickness + 0.2;
|
|
5539
|
+
const keySlotHeight = 3.5;
|
|
5540
|
+
const keySlotX = bodyWidth / 2 - 1.3;
|
|
5541
|
+
const lockNotchWidth = Math.min(
|
|
5542
|
+
bodyWidth - 3.4,
|
|
5543
|
+
Math.max(3, (numPins - 1) * pitch * 0.4 + 2.2)
|
|
5544
|
+
);
|
|
5545
|
+
const lockNotchHeight = 2.4;
|
|
5546
|
+
return /* @__PURE__ */ jsxs68(Fragment67, { children: [
|
|
5547
|
+
/* @__PURE__ */ jsx72(Translate32, { offset: [0, 0, bodyHeight / 2], children: /* @__PURE__ */ jsx72(Colorize39, { color: bodyColor, children: /* @__PURE__ */ jsxs68(Subtract11, { children: [
|
|
5548
|
+
/* @__PURE__ */ jsx72(Cuboid47, { size: [bodyWidth, bodyDepth, bodyHeight] }),
|
|
5549
|
+
/* @__PURE__ */ jsx72(Translate32, { offset: [0, 0, (bodyHeight - hollowHeight) / 2 + 0.1], children: /* @__PURE__ */ jsx72(
|
|
5550
|
+
Cuboid47,
|
|
5551
|
+
{
|
|
5552
|
+
size: [
|
|
5553
|
+
bodyWidth - wallThickness * 2,
|
|
5554
|
+
bodyDepth - wallThickness * 2,
|
|
5555
|
+
hollowHeight + 0.2
|
|
5556
|
+
]
|
|
5557
|
+
}
|
|
5558
|
+
) }),
|
|
5559
|
+
/* @__PURE__ */ jsx72(
|
|
5560
|
+
Translate32,
|
|
5561
|
+
{
|
|
5562
|
+
offset: [
|
|
5563
|
+
0,
|
|
5564
|
+
-bodyDepth / 2 + wallThickness / 2,
|
|
5565
|
+
bodyHeight / 2 - lockNotchHeight / 2 + 0.1
|
|
5566
|
+
],
|
|
5567
|
+
children: /* @__PURE__ */ jsx72(
|
|
5568
|
+
Cuboid47,
|
|
5569
|
+
{
|
|
5570
|
+
size: [
|
|
5571
|
+
lockNotchWidth,
|
|
5572
|
+
wallThickness + 0.2,
|
|
5573
|
+
lockNotchHeight + 0.2
|
|
5574
|
+
]
|
|
5575
|
+
}
|
|
5576
|
+
)
|
|
5577
|
+
}
|
|
5578
|
+
),
|
|
5579
|
+
/* @__PURE__ */ jsx72(
|
|
5580
|
+
Translate32,
|
|
5581
|
+
{
|
|
5582
|
+
offset: [
|
|
5583
|
+
-keySlotX,
|
|
5584
|
+
-bodyDepth / 2 + wallThickness / 2,
|
|
5585
|
+
bodyHeight / 2 - keySlotHeight / 2 + 0.1
|
|
5586
|
+
],
|
|
5587
|
+
children: /* @__PURE__ */ jsx72(
|
|
5588
|
+
Cuboid47,
|
|
5589
|
+
{
|
|
5590
|
+
size: [keySlotWidth, keySlotDepth, keySlotHeight + 0.2]
|
|
5591
|
+
}
|
|
5592
|
+
)
|
|
5593
|
+
}
|
|
5594
|
+
),
|
|
5595
|
+
/* @__PURE__ */ jsx72(
|
|
5596
|
+
Translate32,
|
|
5597
|
+
{
|
|
5598
|
+
offset: [
|
|
5599
|
+
keySlotX,
|
|
5600
|
+
-bodyDepth / 2 + wallThickness / 2,
|
|
5601
|
+
bodyHeight / 2 - keySlotHeight / 2 + 0.1
|
|
5602
|
+
],
|
|
5603
|
+
children: /* @__PURE__ */ jsx72(
|
|
5604
|
+
Cuboid47,
|
|
5605
|
+
{
|
|
5606
|
+
size: [keySlotWidth, keySlotDepth, keySlotHeight + 0.2]
|
|
5607
|
+
}
|
|
5608
|
+
)
|
|
5609
|
+
}
|
|
5610
|
+
),
|
|
5611
|
+
Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx72(
|
|
5612
|
+
Translate32,
|
|
5613
|
+
{
|
|
5614
|
+
offset: [
|
|
5615
|
+
startX + i * pitch,
|
|
5616
|
+
-bodyDepth / 2 + 0.3,
|
|
5617
|
+
-bodyHeight / 2 + 0.25
|
|
5618
|
+
],
|
|
5619
|
+
children: /* @__PURE__ */ jsx72(Cuboid47, { size: [1, 0.8, 0.5] })
|
|
5620
|
+
},
|
|
5621
|
+
`vent_${i}`
|
|
5622
|
+
))
|
|
5623
|
+
] }) }) }),
|
|
5624
|
+
showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx72(Colorize39, { color: pinColor, children: /* @__PURE__ */ jsx72(Translate32, { offset: [startX + i * pitch, 0, pinLength / 2 - 3.4], children: /* @__PURE__ */ jsx72(Cuboid47, { size: [0.64, 0.64, pinLength] }) }) }, i)),
|
|
5625
|
+
showFootprint && (() => {
|
|
5626
|
+
try {
|
|
5627
|
+
const circuitJson = fp3.string(`jst${numPins}_xh`).circuitJson();
|
|
5628
|
+
const platedHoles = circuitJson.filter(
|
|
5629
|
+
(e) => e.type === "pcb_plated_hole"
|
|
5630
|
+
);
|
|
5631
|
+
return platedHoles.map((hole, i) => /* @__PURE__ */ jsx72(
|
|
5632
|
+
FootprintPlatedHole,
|
|
5633
|
+
{
|
|
5634
|
+
hole,
|
|
5635
|
+
isPin1: i === 0
|
|
5636
|
+
},
|
|
5637
|
+
`footprint_${i}`
|
|
5638
|
+
));
|
|
5639
|
+
} catch {
|
|
5640
|
+
return null;
|
|
5641
|
+
}
|
|
5642
|
+
})()
|
|
5643
|
+
] });
|
|
5644
|
+
};
|
|
5645
|
+
|
|
5515
5646
|
// lib/FPC.tsx
|
|
5516
5647
|
import {
|
|
5517
|
-
Colorize as
|
|
5518
|
-
Cuboid as
|
|
5648
|
+
Colorize as Colorize40,
|
|
5649
|
+
Cuboid as Cuboid48,
|
|
5519
5650
|
Cylinder as Cylinder15,
|
|
5520
5651
|
Rotate as Rotate14,
|
|
5521
5652
|
RoundedCuboid as RoundedCuboid3,
|
|
5522
|
-
Subtract as
|
|
5523
|
-
Translate as
|
|
5653
|
+
Subtract as Subtract12,
|
|
5654
|
+
Translate as Translate33
|
|
5524
5655
|
} from "jscad-fiber";
|
|
5525
|
-
import { Fragment as
|
|
5656
|
+
import { Fragment as Fragment68, jsx as jsx73, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
5526
5657
|
var HOUSING_COLOR = "#303339";
|
|
5527
5658
|
var HOUSING_SHADOW = "#1f2227";
|
|
5528
5659
|
var ACTUATOR_COLOR = "#eee8d8";
|
|
@@ -5609,9 +5740,9 @@ var FPC = ({
|
|
|
5609
5740
|
const clipCapX = bodyWidth / 2 - 0.23;
|
|
5610
5741
|
const sideBossX = bodyWidth / 2 - 0.32;
|
|
5611
5742
|
const sideBossWidth = 0.68;
|
|
5612
|
-
return /* @__PURE__ */
|
|
5613
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5614
|
-
|
|
5743
|
+
return /* @__PURE__ */ jsxs69(Fragment68, { children: [
|
|
5744
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx73(
|
|
5745
|
+
Cuboid48,
|
|
5615
5746
|
{
|
|
5616
5747
|
color: TIN_COLOR,
|
|
5617
5748
|
center: [direction * endClipX, mountY, 0.07],
|
|
@@ -5619,8 +5750,8 @@ var FPC = ({
|
|
|
5619
5750
|
},
|
|
5620
5751
|
`mount-pad:${direction}`
|
|
5621
5752
|
)),
|
|
5622
|
-
contactRows.map((contact) => /* @__PURE__ */
|
|
5623
|
-
|
|
5753
|
+
contactRows.map((contact) => /* @__PURE__ */ jsx73(
|
|
5754
|
+
Cuboid48,
|
|
5624
5755
|
{
|
|
5625
5756
|
color: TIN_COLOR,
|
|
5626
5757
|
center: [contact.x, terminalCenterY, 0.065],
|
|
@@ -5628,7 +5759,7 @@ var FPC = ({
|
|
|
5628
5759
|
},
|
|
5629
5760
|
`terminal:${contact.index}`
|
|
5630
5761
|
)),
|
|
5631
|
-
/* @__PURE__ */
|
|
5762
|
+
/* @__PURE__ */ jsx73(
|
|
5632
5763
|
RoundedCuboid3,
|
|
5633
5764
|
{
|
|
5634
5765
|
color: HOUSING_SHADOW,
|
|
@@ -5637,8 +5768,8 @@ var FPC = ({
|
|
|
5637
5768
|
roundRadius: 0.1
|
|
5638
5769
|
}
|
|
5639
5770
|
),
|
|
5640
|
-
/* @__PURE__ */
|
|
5641
|
-
/* @__PURE__ */
|
|
5771
|
+
/* @__PURE__ */ jsx73(Colorize40, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs69(Subtract12, { children: [
|
|
5772
|
+
/* @__PURE__ */ jsx73(
|
|
5642
5773
|
RoundedCuboid3,
|
|
5643
5774
|
{
|
|
5644
5775
|
center: [0, housingCenterY, housingBaseHeight + housingHeight / 2],
|
|
@@ -5646,22 +5777,22 @@ var FPC = ({
|
|
|
5646
5777
|
roundRadius: 0.14
|
|
5647
5778
|
}
|
|
5648
5779
|
),
|
|
5649
|
-
/* @__PURE__ */
|
|
5650
|
-
|
|
5780
|
+
/* @__PURE__ */ jsx73(
|
|
5781
|
+
Cuboid48,
|
|
5651
5782
|
{
|
|
5652
5783
|
center: [0, throatCenterY, throatCenterZ],
|
|
5653
5784
|
size: [openingWidth, throatDepth, throatHeight]
|
|
5654
5785
|
}
|
|
5655
5786
|
),
|
|
5656
|
-
/* @__PURE__ */
|
|
5657
|
-
|
|
5787
|
+
/* @__PURE__ */ jsx73(
|
|
5788
|
+
Cuboid48,
|
|
5658
5789
|
{
|
|
5659
5790
|
center: [0, actuatorCenterY, overallHeight - actuatorHeight * 0.72],
|
|
5660
5791
|
size: [actuatorWidth - 0.32, actuatorDepth - 0.16, actuatorHeight]
|
|
5661
5792
|
}
|
|
5662
5793
|
)
|
|
5663
5794
|
] }) }),
|
|
5664
|
-
contactRows.map((contact) => /* @__PURE__ */
|
|
5795
|
+
contactRows.map((contact) => /* @__PURE__ */ jsx73(
|
|
5665
5796
|
RoundedCuboid3,
|
|
5666
5797
|
{
|
|
5667
5798
|
color: TIN_HIGHLIGHT,
|
|
@@ -5671,8 +5802,8 @@ var FPC = ({
|
|
|
5671
5802
|
},
|
|
5672
5803
|
`spring:${contact.index}`
|
|
5673
5804
|
)),
|
|
5674
|
-
contactRows.map((contact) => /* @__PURE__ */
|
|
5675
|
-
|
|
5805
|
+
contactRows.map((contact) => /* @__PURE__ */ jsx73(
|
|
5806
|
+
Cuboid48,
|
|
5676
5807
|
{
|
|
5677
5808
|
color: TIN_COLOR,
|
|
5678
5809
|
center: [
|
|
@@ -5684,8 +5815,8 @@ var FPC = ({
|
|
|
5684
5815
|
},
|
|
5685
5816
|
`terminal-rise:${contact.index}`
|
|
5686
5817
|
)),
|
|
5687
|
-
/* @__PURE__ */
|
|
5688
|
-
|
|
5818
|
+
/* @__PURE__ */ jsx73(
|
|
5819
|
+
Cuboid48,
|
|
5689
5820
|
{
|
|
5690
5821
|
color: HOUSING_SHADOW,
|
|
5691
5822
|
center: [
|
|
@@ -5696,7 +5827,7 @@ var FPC = ({
|
|
|
5696
5827
|
size: [openingWidth + 0.18, 0.16, 0.8]
|
|
5697
5828
|
}
|
|
5698
5829
|
),
|
|
5699
|
-
/* @__PURE__ */
|
|
5830
|
+
/* @__PURE__ */ jsx73(
|
|
5700
5831
|
RoundedCuboid3,
|
|
5701
5832
|
{
|
|
5702
5833
|
color: ACTUATOR_COLOR,
|
|
@@ -5705,8 +5836,8 @@ var FPC = ({
|
|
|
5705
5836
|
roundRadius: 0.11
|
|
5706
5837
|
}
|
|
5707
5838
|
),
|
|
5708
|
-
/* @__PURE__ */
|
|
5709
|
-
|
|
5839
|
+
/* @__PURE__ */ jsx73(
|
|
5840
|
+
Cuboid48,
|
|
5710
5841
|
{
|
|
5711
5842
|
color: ACTUATOR_HIGHLIGHT,
|
|
5712
5843
|
center: [
|
|
@@ -5717,7 +5848,7 @@ var FPC = ({
|
|
|
5717
5848
|
size: [actuatorWidth - 0.36, 0.24, 0.07]
|
|
5718
5849
|
}
|
|
5719
5850
|
),
|
|
5720
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5851
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx73(
|
|
5721
5852
|
RoundedCuboid3,
|
|
5722
5853
|
{
|
|
5723
5854
|
color: ACTUATOR_COLOR,
|
|
@@ -5727,13 +5858,13 @@ var FPC = ({
|
|
|
5727
5858
|
},
|
|
5728
5859
|
`actuator-ear:${direction}`
|
|
5729
5860
|
)),
|
|
5730
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5731
|
-
|
|
5861
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx73(
|
|
5862
|
+
Translate33,
|
|
5732
5863
|
{
|
|
5733
5864
|
x: direction * sideBossX,
|
|
5734
5865
|
y: hingeY,
|
|
5735
5866
|
z: hingeZ,
|
|
5736
|
-
children: /* @__PURE__ */
|
|
5867
|
+
children: /* @__PURE__ */ jsx73(Rotate14, { rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx73(
|
|
5737
5868
|
Cylinder15,
|
|
5738
5869
|
{
|
|
5739
5870
|
color: ACTUATOR_HIGHLIGHT,
|
|
@@ -5744,7 +5875,7 @@ var FPC = ({
|
|
|
5744
5875
|
},
|
|
5745
5876
|
`hinge:${direction}`
|
|
5746
5877
|
)),
|
|
5747
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5878
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx73(
|
|
5748
5879
|
RoundedCuboid3,
|
|
5749
5880
|
{
|
|
5750
5881
|
color: HOLD_DOWN_COLOR,
|
|
@@ -5754,7 +5885,7 @@ var FPC = ({
|
|
|
5754
5885
|
},
|
|
5755
5886
|
`hold-down-wall:${direction}`
|
|
5756
5887
|
)),
|
|
5757
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5888
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx73(
|
|
5758
5889
|
RoundedCuboid3,
|
|
5759
5890
|
{
|
|
5760
5891
|
color: HOLD_DOWN_HIGHLIGHT,
|
|
@@ -5764,16 +5895,16 @@ var FPC = ({
|
|
|
5764
5895
|
},
|
|
5765
5896
|
`hold-down-cap:${direction}`
|
|
5766
5897
|
)),
|
|
5767
|
-
/* @__PURE__ */
|
|
5768
|
-
|
|
5898
|
+
/* @__PURE__ */ jsx73(
|
|
5899
|
+
Cuboid48,
|
|
5769
5900
|
{
|
|
5770
5901
|
color: HOUSING_SHADOW,
|
|
5771
5902
|
center: [0, housingCenterY, 0.025],
|
|
5772
5903
|
size: [openingWidth + 0.7, housingDepth * 0.58, 0.05]
|
|
5773
5904
|
}
|
|
5774
5905
|
),
|
|
5775
|
-
/* @__PURE__ */
|
|
5776
|
-
|
|
5906
|
+
/* @__PURE__ */ jsx73(
|
|
5907
|
+
Cuboid48,
|
|
5777
5908
|
{
|
|
5778
5909
|
color: HOUSING_SHADOW,
|
|
5779
5910
|
center: [
|
|
@@ -5788,8 +5919,8 @@ var FPC = ({
|
|
|
5788
5919
|
};
|
|
5789
5920
|
|
|
5790
5921
|
// lib/SmdPinHeader.tsx
|
|
5791
|
-
import { Colorize as
|
|
5792
|
-
import { Fragment as
|
|
5922
|
+
import { Colorize as Colorize41, Cuboid as Cuboid49, Hull as Hull24, Translate as Translate34 } from "jscad-fiber";
|
|
5923
|
+
import { Fragment as Fragment69, jsx as jsx74, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
5793
5924
|
var SmdPinHeader = ({
|
|
5794
5925
|
numberOfPins,
|
|
5795
5926
|
pitch = 2.54,
|
|
@@ -5804,52 +5935,52 @@ var SmdPinHeader = ({
|
|
|
5804
5935
|
const bodyTop = standoffHeight + bodyHeight;
|
|
5805
5936
|
const tailLength = tailSpan / 2;
|
|
5806
5937
|
const tipChamferHeight = pinThickness * 0.35;
|
|
5807
|
-
return /* @__PURE__ */
|
|
5938
|
+
return /* @__PURE__ */ jsx74(Fragment69, { children: Array.from({ length: numberOfPins }, (_, index) => {
|
|
5808
5939
|
const x = xStart + index * pitch;
|
|
5809
5940
|
const tailDirection = index % 2 === 0 ? 1 : -1;
|
|
5810
5941
|
const postBodyLength = matingPinLength - tipChamferHeight;
|
|
5811
5942
|
const verticalTailLength = standoffHeight - pinThickness / 2;
|
|
5812
|
-
return /* @__PURE__ */
|
|
5813
|
-
/* @__PURE__ */
|
|
5814
|
-
|
|
5943
|
+
return /* @__PURE__ */ jsxs70(Translate34, { x, children: [
|
|
5944
|
+
/* @__PURE__ */ jsx74(
|
|
5945
|
+
Cuboid49,
|
|
5815
5946
|
{
|
|
5816
5947
|
color: "#222",
|
|
5817
5948
|
size: [pitch, bodyWidth, bodyHeight],
|
|
5818
5949
|
center: [0, 0, standoffHeight + bodyHeight / 2]
|
|
5819
5950
|
}
|
|
5820
5951
|
),
|
|
5821
|
-
/* @__PURE__ */
|
|
5822
|
-
/* @__PURE__ */
|
|
5823
|
-
|
|
5952
|
+
/* @__PURE__ */ jsxs70(Colorize41, { color: "#d4af37", children: [
|
|
5953
|
+
/* @__PURE__ */ jsx74(
|
|
5954
|
+
Cuboid49,
|
|
5824
5955
|
{
|
|
5825
5956
|
size: [pinThickness, tailLength, pinThickness],
|
|
5826
5957
|
center: [0, tailDirection * (tailLength / 2), pinThickness / 2]
|
|
5827
5958
|
}
|
|
5828
5959
|
),
|
|
5829
|
-
/* @__PURE__ */
|
|
5830
|
-
|
|
5960
|
+
/* @__PURE__ */ jsx74(
|
|
5961
|
+
Cuboid49,
|
|
5831
5962
|
{
|
|
5832
5963
|
size: [pinThickness, pinThickness, verticalTailLength],
|
|
5833
5964
|
center: [0, 0, pinThickness / 2 + verticalTailLength / 2]
|
|
5834
5965
|
}
|
|
5835
5966
|
),
|
|
5836
|
-
/* @__PURE__ */
|
|
5837
|
-
|
|
5967
|
+
/* @__PURE__ */ jsx74(
|
|
5968
|
+
Cuboid49,
|
|
5838
5969
|
{
|
|
5839
5970
|
size: [pinThickness, pinThickness, postBodyLength],
|
|
5840
5971
|
center: [0, 0, bodyTop + postBodyLength / 2]
|
|
5841
5972
|
}
|
|
5842
5973
|
),
|
|
5843
|
-
/* @__PURE__ */
|
|
5844
|
-
/* @__PURE__ */
|
|
5845
|
-
|
|
5974
|
+
/* @__PURE__ */ jsxs70(Hull24, { children: [
|
|
5975
|
+
/* @__PURE__ */ jsx74(
|
|
5976
|
+
Cuboid49,
|
|
5846
5977
|
{
|
|
5847
5978
|
size: [pinThickness, pinThickness, 0.01],
|
|
5848
5979
|
center: [0, 0, bodyTop + postBodyLength]
|
|
5849
5980
|
}
|
|
5850
5981
|
),
|
|
5851
|
-
/* @__PURE__ */
|
|
5852
|
-
|
|
5982
|
+
/* @__PURE__ */ jsx74(
|
|
5983
|
+
Cuboid49,
|
|
5853
5984
|
{
|
|
5854
5985
|
size: [pinThickness * 0.65, pinThickness * 0.65, 0.01],
|
|
5855
5986
|
center: [0, 0, bodyTop + matingPinLength]
|
|
@@ -5865,9 +5996,9 @@ var SmdPinHeader = ({
|
|
|
5865
5996
|
import { mm } from "@tscircuit/mm";
|
|
5866
5997
|
|
|
5867
5998
|
// lib/utils/getPlatedHoleCenters.ts
|
|
5868
|
-
import { fp as
|
|
5999
|
+
import { fp as fp4 } from "@tscircuit/footprinter";
|
|
5869
6000
|
var getPlatedHoleCenters = (footprint) => {
|
|
5870
|
-
const elements =
|
|
6001
|
+
const elements = fp4.string(footprint).circuitJson();
|
|
5871
6002
|
return elements.filter(
|
|
5872
6003
|
(element) => element.type === "pcb_plated_hole" && Number.isFinite(element.x) && Number.isFinite(element.y)
|
|
5873
6004
|
).map((element) => ({
|
|
@@ -5878,9 +6009,9 @@ var getPlatedHoleCenters = (footprint) => {
|
|
|
5878
6009
|
};
|
|
5879
6010
|
|
|
5880
6011
|
// lib/utils/getSmtPadRects.ts
|
|
5881
|
-
import { fp as
|
|
6012
|
+
import { fp as fp5 } from "@tscircuit/footprinter";
|
|
5882
6013
|
var getSmtPadRects = (footprint) => {
|
|
5883
|
-
const elements =
|
|
6014
|
+
const elements = fp5.string(footprint).circuitJson();
|
|
5884
6015
|
return elements.filter(
|
|
5885
6016
|
(element) => element.type === "pcb_smtpad" && element.shape === "rect" && Number.isFinite(element.x) && Number.isFinite(element.y)
|
|
5886
6017
|
).map((element) => ({
|
|
@@ -5893,7 +6024,7 @@ var getSmtPadRects = (footprint) => {
|
|
|
5893
6024
|
};
|
|
5894
6025
|
|
|
5895
6026
|
// lib/GullWingBody.tsx
|
|
5896
|
-
import { Fragment as
|
|
6027
|
+
import { Fragment as Fragment70, jsx as jsx75, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
5897
6028
|
var GullWingBody = ({
|
|
5898
6029
|
bodyWidth,
|
|
5899
6030
|
bodyLength: bodyLength10,
|
|
@@ -5905,8 +6036,8 @@ var GullWingBody = ({
|
|
|
5905
6036
|
const centerX = pads.reduce((sum, pad) => sum + pad.x, 0) / (pads.length || 1);
|
|
5906
6037
|
const centerY = pads.reduce((sum, pad) => sum + pad.y, 0) / (pads.length || 1);
|
|
5907
6038
|
const leadHeight = bodyHeight * leadHeightRatio;
|
|
5908
|
-
return /* @__PURE__ */
|
|
5909
|
-
/* @__PURE__ */
|
|
6039
|
+
return /* @__PURE__ */ jsxs71(Fragment70, { children: [
|
|
6040
|
+
/* @__PURE__ */ jsx75(
|
|
5910
6041
|
ChipBody,
|
|
5911
6042
|
{
|
|
5912
6043
|
center: { x: centerX, y: centerY, z: 0 },
|
|
@@ -5922,7 +6053,7 @@ var GullWingBody = ({
|
|
|
5922
6053
|
const outerX = pad.x + side * padWidth / 2;
|
|
5923
6054
|
const run = Math.max(Math.abs(outerX - centerX) - bodyWidth / 2, 0.1);
|
|
5924
6055
|
const overlap = Math.min(0.15, bodyWidth * 0.15);
|
|
5925
|
-
return /* @__PURE__ */
|
|
6056
|
+
return /* @__PURE__ */ jsx75(
|
|
5926
6057
|
SmdChipLead,
|
|
5927
6058
|
{
|
|
5928
6059
|
rotation: side > 0 ? Math.PI : 0,
|
|
@@ -5944,8 +6075,8 @@ var GullWingBody = ({
|
|
|
5944
6075
|
};
|
|
5945
6076
|
|
|
5946
6077
|
// lib/ParametricChip.tsx
|
|
5947
|
-
import { Cuboid as
|
|
5948
|
-
import { Fragment as
|
|
6078
|
+
import { Cuboid as Cuboid50 } from "jscad-fiber";
|
|
6079
|
+
import { Fragment as Fragment71, jsx as jsx76, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
5949
6080
|
var ParametricChip = ({
|
|
5950
6081
|
padPitch,
|
|
5951
6082
|
padHeight,
|
|
@@ -5956,25 +6087,25 @@ var ParametricChip = ({
|
|
|
5956
6087
|
const height10 = width10;
|
|
5957
6088
|
const terminatorWidth9 = fullLength10 * 0.2;
|
|
5958
6089
|
const bodyLength10 = fullLength10 - terminatorWidth9 * 2;
|
|
5959
|
-
return /* @__PURE__ */
|
|
5960
|
-
/* @__PURE__ */
|
|
5961
|
-
|
|
6090
|
+
return /* @__PURE__ */ jsxs72(Fragment71, { children: [
|
|
6091
|
+
/* @__PURE__ */ jsx76(
|
|
6092
|
+
Cuboid50,
|
|
5962
6093
|
{
|
|
5963
6094
|
size: [bodyLength10, width10, height10],
|
|
5964
6095
|
offset: [0, 0, height10 / 2],
|
|
5965
6096
|
color
|
|
5966
6097
|
}
|
|
5967
6098
|
),
|
|
5968
|
-
/* @__PURE__ */
|
|
5969
|
-
|
|
6099
|
+
/* @__PURE__ */ jsx76(
|
|
6100
|
+
Cuboid50,
|
|
5970
6101
|
{
|
|
5971
6102
|
size: [terminatorWidth9, height10, width10],
|
|
5972
6103
|
offset: [fullLength10 / 2 - terminatorWidth9 / 2, 0, height10 / 2],
|
|
5973
6104
|
color: "#ccc"
|
|
5974
6105
|
}
|
|
5975
6106
|
),
|
|
5976
|
-
/* @__PURE__ */
|
|
5977
|
-
|
|
6107
|
+
/* @__PURE__ */ jsx76(
|
|
6108
|
+
Cuboid50,
|
|
5978
6109
|
{
|
|
5979
6110
|
size: [terminatorWidth9, height10, width10],
|
|
5980
6111
|
offset: [-fullLength10 / 2 + terminatorWidth9 / 2, 0, height10 / 2],
|
|
@@ -5986,14 +6117,14 @@ var ParametricChip = ({
|
|
|
5986
6117
|
|
|
5987
6118
|
// lib/Led5050.tsx
|
|
5988
6119
|
import {
|
|
5989
|
-
Colorize as
|
|
5990
|
-
Cuboid as
|
|
6120
|
+
Colorize as Colorize42,
|
|
6121
|
+
Cuboid as Cuboid51,
|
|
5991
6122
|
Cylinder as Cylinder16,
|
|
5992
6123
|
Rotate as Rotate15,
|
|
5993
|
-
Subtract as
|
|
5994
|
-
Translate as
|
|
6124
|
+
Subtract as Subtract13,
|
|
6125
|
+
Translate as Translate35
|
|
5995
6126
|
} from "jscad-fiber";
|
|
5996
|
-
import { Fragment as
|
|
6127
|
+
import { Fragment as Fragment72, jsx as jsx77, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
5997
6128
|
var Led5050 = ({
|
|
5998
6129
|
color = "#ffff00",
|
|
5999
6130
|
bodyColor = "#ffffff",
|
|
@@ -6014,10 +6145,10 @@ var Led5050 = ({
|
|
|
6014
6145
|
const cornerCutDepth = 0.3;
|
|
6015
6146
|
const leadYPositions = [-1.7, 0, 1.7];
|
|
6016
6147
|
const leadSides = [-1, 1];
|
|
6017
|
-
return /* @__PURE__ */
|
|
6148
|
+
return /* @__PURE__ */ jsxs73(Fragment72, { children: [
|
|
6018
6149
|
leadYPositions.flatMap(
|
|
6019
|
-
(y) => leadSides.map((side) => /* @__PURE__ */
|
|
6020
|
-
|
|
6150
|
+
(y) => leadSides.map((side) => /* @__PURE__ */ jsx77(
|
|
6151
|
+
Cuboid51,
|
|
6021
6152
|
{
|
|
6022
6153
|
color: leadColor,
|
|
6023
6154
|
size: [leadLength, leadWidth, leadThickness],
|
|
@@ -6026,8 +6157,8 @@ var Led5050 = ({
|
|
|
6026
6157
|
`${side}-${y}`
|
|
6027
6158
|
))
|
|
6028
6159
|
),
|
|
6029
|
-
/* @__PURE__ */
|
|
6030
|
-
/* @__PURE__ */
|
|
6160
|
+
/* @__PURE__ */ jsx77(Colorize42, { color: bodyColor, children: /* @__PURE__ */ jsxs73(Subtract13, { children: [
|
|
6161
|
+
/* @__PURE__ */ jsx77(
|
|
6031
6162
|
ChipBody,
|
|
6032
6163
|
{
|
|
6033
6164
|
width: bodySize,
|
|
@@ -6041,7 +6172,7 @@ var Led5050 = ({
|
|
|
6041
6172
|
includeNotch: false
|
|
6042
6173
|
}
|
|
6043
6174
|
),
|
|
6044
|
-
/* @__PURE__ */
|
|
6175
|
+
/* @__PURE__ */ jsx77(
|
|
6045
6176
|
Cylinder16,
|
|
6046
6177
|
{
|
|
6047
6178
|
radius: lensRadius,
|
|
@@ -6049,19 +6180,19 @@ var Led5050 = ({
|
|
|
6049
6180
|
center: [0, 0, bodyTop - lensHeight / 2]
|
|
6050
6181
|
}
|
|
6051
6182
|
),
|
|
6052
|
-
/* @__PURE__ */
|
|
6053
|
-
|
|
6183
|
+
/* @__PURE__ */ jsx77(
|
|
6184
|
+
Translate35,
|
|
6054
6185
|
{
|
|
6055
6186
|
offset: [
|
|
6056
6187
|
-bodySize / 2,
|
|
6057
6188
|
bodySize / 2,
|
|
6058
6189
|
bodyTop - cornerCutDepth / 2 + 5e-3
|
|
6059
6190
|
],
|
|
6060
|
-
children: /* @__PURE__ */
|
|
6191
|
+
children: /* @__PURE__ */ jsx77(Rotate15, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx77(Cuboid51, { size: [0.9, 0.9, cornerCutDepth + 0.01] }) })
|
|
6061
6192
|
}
|
|
6062
6193
|
)
|
|
6063
6194
|
] }) }),
|
|
6064
|
-
/* @__PURE__ */
|
|
6195
|
+
/* @__PURE__ */ jsx77(
|
|
6065
6196
|
Cylinder16,
|
|
6066
6197
|
{
|
|
6067
6198
|
color,
|
|
@@ -6074,8 +6205,8 @@ var Led5050 = ({
|
|
|
6074
6205
|
};
|
|
6075
6206
|
|
|
6076
6207
|
// lib/Led2835.tsx
|
|
6077
|
-
import { Colorize as
|
|
6078
|
-
import { Fragment as
|
|
6208
|
+
import { Colorize as Colorize43, Cuboid as Cuboid52 } from "jscad-fiber";
|
|
6209
|
+
import { Fragment as Fragment73, jsx as jsx78, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
6079
6210
|
var Led2835 = ({
|
|
6080
6211
|
bodyWidth = 3.5,
|
|
6081
6212
|
bodyLength: bodyLength10 = 2.8,
|
|
@@ -6094,26 +6225,26 @@ var Led2835 = ({
|
|
|
6094
6225
|
const bodyCenterX = (pad1X + pad2X) / 2;
|
|
6095
6226
|
const lensWidth = bodyWidth * 0.55;
|
|
6096
6227
|
const lensLength = bodyLength10 * 0.55;
|
|
6097
|
-
return /* @__PURE__ */
|
|
6228
|
+
return /* @__PURE__ */ jsxs74(Fragment73, { children: [
|
|
6098
6229
|
[
|
|
6099
6230
|
{ x: pad1X, w: pad1Width, key: "pad-1" },
|
|
6100
6231
|
{ x: pad2X, w: pad2Width, key: "pad-2" }
|
|
6101
|
-
].map(({ x, w, key }) => /* @__PURE__ */
|
|
6102
|
-
|
|
6232
|
+
].map(({ x, w, key }) => /* @__PURE__ */ jsx78(Colorize43, { color: padColor, children: /* @__PURE__ */ jsx78(
|
|
6233
|
+
Cuboid52,
|
|
6103
6234
|
{
|
|
6104
6235
|
size: [w, padLength, padThickness],
|
|
6105
6236
|
center: [x, 0, padThickness / 2]
|
|
6106
6237
|
}
|
|
6107
6238
|
) }, key)),
|
|
6108
|
-
/* @__PURE__ */
|
|
6109
|
-
|
|
6239
|
+
/* @__PURE__ */ jsx78(Colorize43, { color: bodyColor, children: /* @__PURE__ */ jsx78(
|
|
6240
|
+
Cuboid52,
|
|
6110
6241
|
{
|
|
6111
6242
|
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6112
6243
|
center: [bodyCenterX, 0, padThickness + bodyHeight / 2]
|
|
6113
6244
|
}
|
|
6114
6245
|
) }),
|
|
6115
|
-
/* @__PURE__ */
|
|
6116
|
-
|
|
6246
|
+
/* @__PURE__ */ jsx78(Colorize43, { color, children: /* @__PURE__ */ jsx78(
|
|
6247
|
+
Cuboid52,
|
|
6117
6248
|
{
|
|
6118
6249
|
size: [lensWidth, lensLength, lensHeight],
|
|
6119
6250
|
center: [
|
|
@@ -6128,15 +6259,15 @@ var Led2835 = ({
|
|
|
6128
6259
|
|
|
6129
6260
|
// lib/RJ45.tsx
|
|
6130
6261
|
import {
|
|
6131
|
-
Colorize as
|
|
6132
|
-
Cuboid as
|
|
6262
|
+
Colorize as Colorize44,
|
|
6263
|
+
Cuboid as Cuboid53,
|
|
6133
6264
|
Cylinder as Cylinder17,
|
|
6134
6265
|
Rotate as Rotate16,
|
|
6135
6266
|
RoundedCuboid as RoundedCuboid4,
|
|
6136
|
-
Subtract as
|
|
6137
|
-
Translate as
|
|
6267
|
+
Subtract as Subtract14,
|
|
6268
|
+
Translate as Translate36
|
|
6138
6269
|
} from "jscad-fiber";
|
|
6139
|
-
import { Fragment as
|
|
6270
|
+
import { Fragment as Fragment74, jsx as jsx79, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
6140
6271
|
var range2 = (length) => Array.from({ length }, (_, index) => index);
|
|
6141
6272
|
var RJ45 = ({
|
|
6142
6273
|
bodyWidth = 16.26,
|
|
@@ -6194,18 +6325,18 @@ var RJ45 = ({
|
|
|
6194
6325
|
const contactY = frontY - frontDirection * Math.max(cavityDepth * 0.48, 1.2);
|
|
6195
6326
|
const contactZ = openingCenterZ + openingHeight * 0.18;
|
|
6196
6327
|
const frontLipY = frontY + frontDirection * shellThickness * 0.2;
|
|
6197
|
-
return /* @__PURE__ */
|
|
6198
|
-
/* @__PURE__ */
|
|
6199
|
-
/* @__PURE__ */
|
|
6200
|
-
/* @__PURE__ */
|
|
6201
|
-
|
|
6328
|
+
return /* @__PURE__ */ jsxs75(Fragment74, { children: [
|
|
6329
|
+
/* @__PURE__ */ jsxs75(Colorize44, { color: shellColor, children: [
|
|
6330
|
+
/* @__PURE__ */ jsxs75(Subtract14, { children: [
|
|
6331
|
+
/* @__PURE__ */ jsx79(
|
|
6332
|
+
Cuboid53,
|
|
6202
6333
|
{
|
|
6203
6334
|
center: [0, bodyCenterY, bodyHeight / 2],
|
|
6204
6335
|
size: [bodyWidth, bodyDepth, bodyHeight]
|
|
6205
6336
|
}
|
|
6206
6337
|
),
|
|
6207
|
-
/* @__PURE__ */
|
|
6208
|
-
|
|
6338
|
+
/* @__PURE__ */ jsx79(
|
|
6339
|
+
Cuboid53,
|
|
6209
6340
|
{
|
|
6210
6341
|
center: [0, cavityCenterY, openingCenterZ],
|
|
6211
6342
|
size: [
|
|
@@ -6216,15 +6347,15 @@ var RJ45 = ({
|
|
|
6216
6347
|
}
|
|
6217
6348
|
)
|
|
6218
6349
|
] }),
|
|
6219
|
-
/* @__PURE__ */
|
|
6220
|
-
|
|
6350
|
+
/* @__PURE__ */ jsx79(
|
|
6351
|
+
Cuboid53,
|
|
6221
6352
|
{
|
|
6222
6353
|
center: [0, frontLipY, 0.72],
|
|
6223
6354
|
size: [openingWidth + 0.5, shellThickness * 1.25, 1.05]
|
|
6224
6355
|
}
|
|
6225
6356
|
),
|
|
6226
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
6227
|
-
|
|
6357
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx79(
|
|
6358
|
+
Cuboid53,
|
|
6228
6359
|
{
|
|
6229
6360
|
center: [direction * shieldPinX, shieldPinY, 0.25],
|
|
6230
6361
|
size: [
|
|
@@ -6235,8 +6366,8 @@ var RJ45 = ({
|
|
|
6235
6366
|
},
|
|
6236
6367
|
`shield-tab:${direction}`
|
|
6237
6368
|
)),
|
|
6238
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
6239
|
-
|
|
6369
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx79(
|
|
6370
|
+
Cuboid53,
|
|
6240
6371
|
{
|
|
6241
6372
|
center: [
|
|
6242
6373
|
direction * bodyWidth * 0.24,
|
|
@@ -6248,9 +6379,9 @@ var RJ45 = ({
|
|
|
6248
6379
|
`top-seam:${direction}`
|
|
6249
6380
|
))
|
|
6250
6381
|
] }),
|
|
6251
|
-
/* @__PURE__ */
|
|
6252
|
-
/* @__PURE__ */
|
|
6253
|
-
/* @__PURE__ */
|
|
6382
|
+
/* @__PURE__ */ jsxs75(Colorize44, { color: housingColor, children: [
|
|
6383
|
+
/* @__PURE__ */ jsxs75(Subtract14, { children: [
|
|
6384
|
+
/* @__PURE__ */ jsx79(
|
|
6254
6385
|
RoundedCuboid4,
|
|
6255
6386
|
{
|
|
6256
6387
|
center: [0, cavityCenterY, openingCenterZ],
|
|
@@ -6262,8 +6393,8 @@ var RJ45 = ({
|
|
|
6262
6393
|
roundRadius: 0.22
|
|
6263
6394
|
}
|
|
6264
6395
|
),
|
|
6265
|
-
/* @__PURE__ */
|
|
6266
|
-
|
|
6396
|
+
/* @__PURE__ */ jsx79(
|
|
6397
|
+
Cuboid53,
|
|
6267
6398
|
{
|
|
6268
6399
|
center: [
|
|
6269
6400
|
0,
|
|
@@ -6278,14 +6409,14 @@ var RJ45 = ({
|
|
|
6278
6409
|
}
|
|
6279
6410
|
)
|
|
6280
6411
|
] }),
|
|
6281
|
-
/* @__PURE__ */
|
|
6282
|
-
|
|
6412
|
+
/* @__PURE__ */ jsx79(
|
|
6413
|
+
Cuboid53,
|
|
6283
6414
|
{
|
|
6284
6415
|
center: [0, backWallY, openingCenterZ],
|
|
6285
6416
|
size: [openingWidth - 1.15, shellThickness, openingHeight - 1.25]
|
|
6286
6417
|
}
|
|
6287
6418
|
),
|
|
6288
|
-
/* @__PURE__ */
|
|
6419
|
+
/* @__PURE__ */ jsx79(
|
|
6289
6420
|
RoundedCuboid4,
|
|
6290
6421
|
{
|
|
6291
6422
|
center: [0, frontY - frontDirection * cavityDepth * 0.28, 1.55],
|
|
@@ -6293,7 +6424,7 @@ var RJ45 = ({
|
|
|
6293
6424
|
roundRadius: 0.16
|
|
6294
6425
|
}
|
|
6295
6426
|
),
|
|
6296
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
6427
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx79(
|
|
6297
6428
|
Cylinder17,
|
|
6298
6429
|
{
|
|
6299
6430
|
center: [direction * locatorHoleX, locatorHoleY, -0.25],
|
|
@@ -6303,8 +6434,8 @@ var RJ45 = ({
|
|
|
6303
6434
|
`locator:${direction}`
|
|
6304
6435
|
))
|
|
6305
6436
|
] }),
|
|
6306
|
-
/* @__PURE__ */
|
|
6307
|
-
signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */
|
|
6437
|
+
/* @__PURE__ */ jsxs75(Colorize44, { color: contactColor, children: [
|
|
6438
|
+
signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx79(
|
|
6308
6439
|
Cylinder17,
|
|
6309
6440
|
{
|
|
6310
6441
|
center: [x, y, 0.15],
|
|
@@ -6313,15 +6444,15 @@ var RJ45 = ({
|
|
|
6313
6444
|
},
|
|
6314
6445
|
`signal-lead:${index}`
|
|
6315
6446
|
)),
|
|
6316
|
-
range2(8).map((index) => /* @__PURE__ */
|
|
6317
|
-
|
|
6447
|
+
range2(8).map((index) => /* @__PURE__ */ jsx79(
|
|
6448
|
+
Translate36,
|
|
6318
6449
|
{
|
|
6319
6450
|
offset: [
|
|
6320
6451
|
(index - 3.5) * contactPitch,
|
|
6321
6452
|
contactY,
|
|
6322
6453
|
contactZ + (index % 2 === 0 ? 0.03 : -0.03)
|
|
6323
6454
|
],
|
|
6324
|
-
children: /* @__PURE__ */
|
|
6455
|
+
children: /* @__PURE__ */ jsx79(Rotate16, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx79(
|
|
6325
6456
|
RoundedCuboid4,
|
|
6326
6457
|
{
|
|
6327
6458
|
size: [Math.max(contactPitch * 0.28, 0.28), 3.25, 0.16],
|
|
@@ -6331,7 +6462,7 @@ var RJ45 = ({
|
|
|
6331
6462
|
},
|
|
6332
6463
|
`socket-contact:${index}`
|
|
6333
6464
|
)),
|
|
6334
|
-
ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */
|
|
6465
|
+
ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx79(
|
|
6335
6466
|
Cylinder17,
|
|
6336
6467
|
{
|
|
6337
6468
|
center: [x, ledPinY, 0.15],
|
|
@@ -6341,8 +6472,8 @@ var RJ45 = ({
|
|
|
6341
6472
|
`led-lead:${index}`
|
|
6342
6473
|
))
|
|
6343
6474
|
] }),
|
|
6344
|
-
ledPins && /* @__PURE__ */
|
|
6345
|
-
/* @__PURE__ */
|
|
6475
|
+
ledPins && /* @__PURE__ */ jsxs75(Fragment74, { children: [
|
|
6476
|
+
/* @__PURE__ */ jsx79(
|
|
6346
6477
|
RoundedCuboid4,
|
|
6347
6478
|
{
|
|
6348
6479
|
color: "#73b744",
|
|
@@ -6355,7 +6486,7 @@ var RJ45 = ({
|
|
|
6355
6486
|
roundRadius: 0.18
|
|
6356
6487
|
}
|
|
6357
6488
|
),
|
|
6358
|
-
/* @__PURE__ */
|
|
6489
|
+
/* @__PURE__ */ jsx79(
|
|
6359
6490
|
RoundedCuboid4,
|
|
6360
6491
|
{
|
|
6361
6492
|
color: "#e0aa35",
|
|
@@ -6373,8 +6504,8 @@ var RJ45 = ({
|
|
|
6373
6504
|
};
|
|
6374
6505
|
|
|
6375
6506
|
// lib/DPAK.tsx
|
|
6376
|
-
import { Colorize as
|
|
6377
|
-
import { Fragment as
|
|
6507
|
+
import { Colorize as Colorize45, Cuboid as Cuboid54, Hull as Hull25 } from "jscad-fiber";
|
|
6508
|
+
import { Fragment as Fragment75, jsx as jsx80, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
6378
6509
|
var DPAK = ({
|
|
6379
6510
|
bodyWidth = 6.1,
|
|
6380
6511
|
bodyLength: bodyLength10 = 6.5,
|
|
@@ -6396,25 +6527,25 @@ var DPAK = ({
|
|
|
6396
6527
|
const bodyFrontX = bodyCenterX - bodyWidth / 2;
|
|
6397
6528
|
const leadZ = tabThickness / 2;
|
|
6398
6529
|
const leadThickness = 0.4;
|
|
6399
|
-
return /* @__PURE__ */
|
|
6400
|
-
/* @__PURE__ */
|
|
6401
|
-
|
|
6530
|
+
return /* @__PURE__ */ jsxs76(Fragment75, { children: [
|
|
6531
|
+
/* @__PURE__ */ jsx80(Colorize45, { color: tabColor, children: /* @__PURE__ */ jsx80(
|
|
6532
|
+
Cuboid54,
|
|
6402
6533
|
{
|
|
6403
6534
|
size: [tabWidth, tabLength, tabThickness],
|
|
6404
6535
|
center: [tabCenterX, 0, tabThickness / 2]
|
|
6405
6536
|
}
|
|
6406
6537
|
) }),
|
|
6407
|
-
/* @__PURE__ */
|
|
6408
|
-
|
|
6538
|
+
/* @__PURE__ */ jsx80(Colorize45, { color, children: /* @__PURE__ */ jsx80(
|
|
6539
|
+
Cuboid54,
|
|
6409
6540
|
{
|
|
6410
6541
|
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6411
6542
|
center: [bodyCenterX, 0, tabThickness + bodyHeight / 2]
|
|
6412
6543
|
}
|
|
6413
6544
|
) }),
|
|
6414
6545
|
[-1, 1].map((side) => {
|
|
6415
|
-
return /* @__PURE__ */
|
|
6416
|
-
/* @__PURE__ */
|
|
6417
|
-
|
|
6546
|
+
return /* @__PURE__ */ jsxs76(Colorize45, { color: leadColor, children: [
|
|
6547
|
+
/* @__PURE__ */ jsx80(
|
|
6548
|
+
Cuboid54,
|
|
6418
6549
|
{
|
|
6419
6550
|
size: [leadContactLength, leadWidth, leadThickness],
|
|
6420
6551
|
center: [
|
|
@@ -6424,9 +6555,9 @@ var DPAK = ({
|
|
|
6424
6555
|
]
|
|
6425
6556
|
}
|
|
6426
6557
|
),
|
|
6427
|
-
/* @__PURE__ */
|
|
6428
|
-
/* @__PURE__ */
|
|
6429
|
-
|
|
6558
|
+
/* @__PURE__ */ jsxs76(Hull25, { children: [
|
|
6559
|
+
/* @__PURE__ */ jsx80(
|
|
6560
|
+
Cuboid54,
|
|
6430
6561
|
{
|
|
6431
6562
|
size: [0.1, leadWidth, leadThickness],
|
|
6432
6563
|
center: [
|
|
@@ -6436,8 +6567,8 @@ var DPAK = ({
|
|
|
6436
6567
|
]
|
|
6437
6568
|
}
|
|
6438
6569
|
),
|
|
6439
|
-
/* @__PURE__ */
|
|
6440
|
-
|
|
6570
|
+
/* @__PURE__ */ jsx80(
|
|
6571
|
+
Cuboid54,
|
|
6441
6572
|
{
|
|
6442
6573
|
size: [0.1, leadWidth, leadThickness],
|
|
6443
6574
|
center: [bodyFrontX, side * pitch, leadZ + tabThickness / 2]
|
|
@@ -6451,13 +6582,13 @@ var DPAK = ({
|
|
|
6451
6582
|
|
|
6452
6583
|
// lib/ElectrolyticCapacitor.tsx
|
|
6453
6584
|
import {
|
|
6454
|
-
Colorize as
|
|
6455
|
-
Cuboid as
|
|
6585
|
+
Colorize as Colorize46,
|
|
6586
|
+
Cuboid as Cuboid55,
|
|
6456
6587
|
Cylinder as Cylinder18,
|
|
6457
6588
|
RoundedCylinder as RoundedCylinder5,
|
|
6458
|
-
Subtract as
|
|
6589
|
+
Subtract as Subtract15
|
|
6459
6590
|
} from "jscad-fiber";
|
|
6460
|
-
import { Fragment as
|
|
6591
|
+
import { Fragment as Fragment76, jsx as jsx81, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
6461
6592
|
var ElectrolyticCapacitor = ({
|
|
6462
6593
|
diameter = 6.3,
|
|
6463
6594
|
heightToDiameterRatio = 1.4,
|
|
@@ -6475,8 +6606,8 @@ var ElectrolyticCapacitor = ({
|
|
|
6475
6606
|
const canTop = canBottom + canHeight;
|
|
6476
6607
|
const grooveWidth = Math.max(diameter * 0.06, 0.2);
|
|
6477
6608
|
const grooveDepth = 0.3;
|
|
6478
|
-
return /* @__PURE__ */
|
|
6479
|
-
/* @__PURE__ */
|
|
6609
|
+
return /* @__PURE__ */ jsxs77(Fragment76, { children: [
|
|
6610
|
+
/* @__PURE__ */ jsx81(Colorize46, { color: baseColor, children: /* @__PURE__ */ jsx81(
|
|
6480
6611
|
Cylinder18,
|
|
6481
6612
|
{
|
|
6482
6613
|
radius: radius - 0.05,
|
|
@@ -6484,8 +6615,8 @@ var ElectrolyticCapacitor = ({
|
|
|
6484
6615
|
center: [0, 0, baseHeight / 2]
|
|
6485
6616
|
}
|
|
6486
6617
|
) }),
|
|
6487
|
-
/* @__PURE__ */
|
|
6488
|
-
/* @__PURE__ */
|
|
6618
|
+
/* @__PURE__ */ jsx81(Colorize46, { color: sleeveColor, children: /* @__PURE__ */ jsxs77(Subtract15, { children: [
|
|
6619
|
+
/* @__PURE__ */ jsx81(
|
|
6489
6620
|
RoundedCylinder5,
|
|
6490
6621
|
{
|
|
6491
6622
|
radius,
|
|
@@ -6494,22 +6625,22 @@ var ElectrolyticCapacitor = ({
|
|
|
6494
6625
|
center: [0, 0, canBottom + canHeight / 2]
|
|
6495
6626
|
}
|
|
6496
6627
|
),
|
|
6497
|
-
/* @__PURE__ */
|
|
6498
|
-
|
|
6628
|
+
/* @__PURE__ */ jsx81(
|
|
6629
|
+
Cuboid55,
|
|
6499
6630
|
{
|
|
6500
6631
|
size: [diameter, grooveWidth, grooveDepth * 2],
|
|
6501
6632
|
center: [0, 0, canTop]
|
|
6502
6633
|
}
|
|
6503
6634
|
),
|
|
6504
|
-
/* @__PURE__ */
|
|
6505
|
-
|
|
6635
|
+
/* @__PURE__ */ jsx81(
|
|
6636
|
+
Cuboid55,
|
|
6506
6637
|
{
|
|
6507
6638
|
size: [grooveWidth, diameter, grooveDepth * 2],
|
|
6508
6639
|
center: [0, 0, canTop]
|
|
6509
6640
|
}
|
|
6510
6641
|
)
|
|
6511
6642
|
] }) }),
|
|
6512
|
-
[-1, 1].map((side) => /* @__PURE__ */
|
|
6643
|
+
[-1, 1].map((side) => /* @__PURE__ */ jsx81(Colorize46, { color: "#c0c0c0", children: /* @__PURE__ */ jsx81(
|
|
6513
6644
|
Cylinder18,
|
|
6514
6645
|
{
|
|
6515
6646
|
radius: leadDiameter / 2,
|
|
@@ -6521,8 +6652,8 @@ var ElectrolyticCapacitor = ({
|
|
|
6521
6652
|
};
|
|
6522
6653
|
|
|
6523
6654
|
// lib/Potentiometer.tsx
|
|
6524
|
-
import { Colorize as
|
|
6525
|
-
import { Fragment as
|
|
6655
|
+
import { Colorize as Colorize47, Cuboid as Cuboid56, Cylinder as Cylinder19, Subtract as Subtract16 } from "jscad-fiber";
|
|
6656
|
+
import { Fragment as Fragment77, jsx as jsx82, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
6526
6657
|
var Potentiometer = ({
|
|
6527
6658
|
bodyWidth = 5.35,
|
|
6528
6659
|
bodyLength: bodyLength10 = 14,
|
|
@@ -6540,16 +6671,16 @@ var Potentiometer = ({
|
|
|
6540
6671
|
const adjusterHeight = 0.8;
|
|
6541
6672
|
const adjusterZ = bodyHeight + adjusterHeight / 2;
|
|
6542
6673
|
const slotWidth = Math.max(adjusterDiameter * 0.16, 0.3);
|
|
6543
|
-
return /* @__PURE__ */
|
|
6544
|
-
/* @__PURE__ */
|
|
6545
|
-
|
|
6674
|
+
return /* @__PURE__ */ jsxs78(Fragment77, { children: [
|
|
6675
|
+
/* @__PURE__ */ jsx82(Colorize47, { color: bodyColor, children: /* @__PURE__ */ jsx82(
|
|
6676
|
+
Cuboid56,
|
|
6546
6677
|
{
|
|
6547
6678
|
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6548
6679
|
center: [bodyCenterX, 0, bodyHeight / 2]
|
|
6549
6680
|
}
|
|
6550
6681
|
) }),
|
|
6551
|
-
/* @__PURE__ */
|
|
6552
|
-
/* @__PURE__ */
|
|
6682
|
+
/* @__PURE__ */ jsx82(Colorize47, { color: adjusterColor, children: /* @__PURE__ */ jsxs78(Subtract16, { children: [
|
|
6683
|
+
/* @__PURE__ */ jsx82(
|
|
6553
6684
|
Cylinder19,
|
|
6554
6685
|
{
|
|
6555
6686
|
radius: adjusterDiameter / 2,
|
|
@@ -6557,15 +6688,15 @@ var Potentiometer = ({
|
|
|
6557
6688
|
center: [bodyCenterX, 0, adjusterZ]
|
|
6558
6689
|
}
|
|
6559
6690
|
),
|
|
6560
|
-
/* @__PURE__ */
|
|
6561
|
-
|
|
6691
|
+
/* @__PURE__ */ jsx82(
|
|
6692
|
+
Cuboid56,
|
|
6562
6693
|
{
|
|
6563
6694
|
size: [adjusterDiameter, slotWidth, adjusterHeight * 0.6],
|
|
6564
6695
|
center: [bodyCenterX, 0, adjusterZ + adjusterHeight / 2]
|
|
6565
6696
|
}
|
|
6566
6697
|
)
|
|
6567
6698
|
] }) }),
|
|
6568
|
-
shaftHeight > 0 && shaftDiameter > 0 ? /* @__PURE__ */
|
|
6699
|
+
shaftHeight > 0 && shaftDiameter > 0 ? /* @__PURE__ */ jsx82(Colorize47, { color: adjusterColor, children: /* @__PURE__ */ jsx82(
|
|
6569
6700
|
Cylinder19,
|
|
6570
6701
|
{
|
|
6571
6702
|
radius: shaftDiameter / 2,
|
|
@@ -6573,7 +6704,7 @@ var Potentiometer = ({
|
|
|
6573
6704
|
center: [bodyCenterX, 0, bodyHeight + shaftHeight / 2]
|
|
6574
6705
|
}
|
|
6575
6706
|
) }) : null,
|
|
6576
|
-
leads.map((lead) => /* @__PURE__ */
|
|
6707
|
+
leads.map((lead) => /* @__PURE__ */ jsx82(Colorize47, { color: "#c0c0c0", children: /* @__PURE__ */ jsx82(
|
|
6577
6708
|
Cylinder19,
|
|
6578
6709
|
{
|
|
6579
6710
|
radius: leadDiameter / 2,
|
|
@@ -6585,8 +6716,8 @@ var Potentiometer = ({
|
|
|
6585
6716
|
};
|
|
6586
6717
|
|
|
6587
6718
|
// lib/SmdPushButton.tsx
|
|
6588
|
-
import { Colorize as
|
|
6589
|
-
import { Fragment as
|
|
6719
|
+
import { Colorize as Colorize48, Cuboid as Cuboid57, Cylinder as Cylinder20 } from "jscad-fiber";
|
|
6720
|
+
import { Fragment as Fragment78, jsx as jsx83, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
6590
6721
|
var SmdPushButton = ({
|
|
6591
6722
|
bodyWidth = 2.9,
|
|
6592
6723
|
bodyLength: bodyLength10 = 3,
|
|
@@ -6602,15 +6733,15 @@ var SmdPushButton = ({
|
|
|
6602
6733
|
leadColor = "#cccccc"
|
|
6603
6734
|
}) => {
|
|
6604
6735
|
const leadThickness = 0.15;
|
|
6605
|
-
return /* @__PURE__ */
|
|
6606
|
-
/* @__PURE__ */
|
|
6607
|
-
|
|
6736
|
+
return /* @__PURE__ */ jsxs79(Fragment78, { children: [
|
|
6737
|
+
/* @__PURE__ */ jsx83(Colorize48, { color: bodyColor, children: /* @__PURE__ */ jsx83(
|
|
6738
|
+
Cuboid57,
|
|
6608
6739
|
{
|
|
6609
6740
|
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6610
6741
|
center: [0, 0, bodyHeight / 2]
|
|
6611
6742
|
}
|
|
6612
6743
|
) }),
|
|
6613
|
-
/* @__PURE__ */
|
|
6744
|
+
/* @__PURE__ */ jsx83(Colorize48, { color: actuatorColor, children: /* @__PURE__ */ jsx83(
|
|
6614
6745
|
Cylinder20,
|
|
6615
6746
|
{
|
|
6616
6747
|
radius: actuatorDiameter / 2,
|
|
@@ -6619,8 +6750,8 @@ var SmdPushButton = ({
|
|
|
6619
6750
|
}
|
|
6620
6751
|
) }),
|
|
6621
6752
|
[-1, 1].flatMap(
|
|
6622
|
-
(sx) => [-1, 1].map((sy) => /* @__PURE__ */
|
|
6623
|
-
|
|
6753
|
+
(sx) => [-1, 1].map((sy) => /* @__PURE__ */ jsx83(Colorize48, { color: leadColor, children: /* @__PURE__ */ jsx83(
|
|
6754
|
+
Cuboid57,
|
|
6624
6755
|
{
|
|
6625
6756
|
size: [padWidth, padLength, leadThickness],
|
|
6626
6757
|
center: [
|
|
@@ -6635,8 +6766,8 @@ var SmdPushButton = ({
|
|
|
6635
6766
|
};
|
|
6636
6767
|
|
|
6637
6768
|
// lib/SOT-563.tsx
|
|
6638
|
-
import { Cuboid as
|
|
6639
|
-
import { Fragment as
|
|
6769
|
+
import { Cuboid as Cuboid58, Translate as Translate38, Rotate as Rotate17, Colorize as Colorize49 } from "jscad-fiber";
|
|
6770
|
+
import { Fragment as Fragment79, jsx as jsx84, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
6640
6771
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
6641
6772
|
const bodyWidth = 1.2;
|
|
6642
6773
|
const bodyLength10 = 1.6;
|
|
@@ -6646,28 +6777,28 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
6646
6777
|
const leadHeight = 0.13;
|
|
6647
6778
|
const leadSpacing = 0.5;
|
|
6648
6779
|
const bodyZOffset = -0.4;
|
|
6649
|
-
return /* @__PURE__ */
|
|
6650
|
-
/* @__PURE__ */
|
|
6780
|
+
return /* @__PURE__ */ jsxs80(Fragment79, { children: [
|
|
6781
|
+
/* @__PURE__ */ jsx84(Rotate17, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx84(Translate38, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx84(Colorize49, { color: "grey", children: /* @__PURE__ */ jsx84(Cuboid58, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
6651
6782
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
6652
6783
|
// Left lead
|
|
6653
|
-
/* @__PURE__ */
|
|
6654
|
-
|
|
6784
|
+
/* @__PURE__ */ jsx84(
|
|
6785
|
+
Translate38,
|
|
6655
6786
|
{
|
|
6656
6787
|
center: [
|
|
6657
6788
|
-bodyWidth / 2 - 0.03,
|
|
6658
6789
|
yOffset * leadSpacing,
|
|
6659
6790
|
leadHeight / 2
|
|
6660
6791
|
],
|
|
6661
|
-
children: /* @__PURE__ */
|
|
6792
|
+
children: /* @__PURE__ */ jsx84(Cuboid58, { size: [leadLength, leadWidth, leadHeight] })
|
|
6662
6793
|
},
|
|
6663
6794
|
`left-${index}`
|
|
6664
6795
|
),
|
|
6665
6796
|
// Right lead
|
|
6666
|
-
/* @__PURE__ */
|
|
6667
|
-
|
|
6797
|
+
/* @__PURE__ */ jsx84(
|
|
6798
|
+
Translate38,
|
|
6668
6799
|
{
|
|
6669
6800
|
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
|
|
6670
|
-
children: /* @__PURE__ */
|
|
6801
|
+
children: /* @__PURE__ */ jsx84(Cuboid58, { size: [leadLength, leadWidth, leadHeight] })
|
|
6671
6802
|
},
|
|
6672
6803
|
`right-${index}`
|
|
6673
6804
|
)
|
|
@@ -6676,9 +6807,9 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
6676
6807
|
};
|
|
6677
6808
|
|
|
6678
6809
|
// lib/FlexScreen.tsx
|
|
6679
|
-
import { Colorize as
|
|
6680
|
-
import { Fragment as
|
|
6681
|
-
import { Fragment as
|
|
6810
|
+
import { Colorize as Colorize50, Rotate as Rotate18, RoundedCuboid as RoundedCuboid5, Translate as Translate39 } from "jscad-fiber";
|
|
6811
|
+
import { Fragment as Fragment80 } from "react";
|
|
6812
|
+
import { Fragment as Fragment81, jsx as jsx85, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
6682
6813
|
var DEFAULT_ASPECT_RATIO = 16 / 9;
|
|
6683
6814
|
var DEFAULT_DIAGONAL = 40;
|
|
6684
6815
|
var EPSILON = 1e-6;
|
|
@@ -6908,7 +7039,7 @@ var CableStrip = ({
|
|
|
6908
7039
|
acrossOffset = 0,
|
|
6909
7040
|
normalOffset = 0,
|
|
6910
7041
|
overlap = 0.03
|
|
6911
|
-
}) => /* @__PURE__ */
|
|
7042
|
+
}) => /* @__PURE__ */ jsx85(Colorize50, { color, children: points.slice(1).map((point, index) => {
|
|
6912
7043
|
const previous = points[index];
|
|
6913
7044
|
const dx = point[0] - previous[0];
|
|
6914
7045
|
const dy = point[1] - previous[1];
|
|
@@ -6926,7 +7057,7 @@ var CableStrip = ({
|
|
|
6926
7057
|
1e-3,
|
|
6927
7058
|
Math.min(width10, thickness, segmentLength) / 2 - 1e-3
|
|
6928
7059
|
);
|
|
6929
|
-
return /* @__PURE__ */
|
|
7060
|
+
return /* @__PURE__ */ jsx85(Translate39, { offset: midpoint, children: /* @__PURE__ */ jsx85(Rotate18, { rotation: [pitch, 0, yaw], children: /* @__PURE__ */ jsx85(
|
|
6930
7061
|
RoundedCuboid5,
|
|
6931
7062
|
{
|
|
6932
7063
|
size: [width10, segmentLength + overlap, thickness],
|
|
@@ -7135,8 +7266,8 @@ var FlexScreen = (props) => {
|
|
|
7135
7266
|
);
|
|
7136
7267
|
const conductorNormalOffset = (flexCableThickness + conductorThickness) / 2;
|
|
7137
7268
|
const stiffenerNormalOffset = -(flexCableThickness + stiffenerThickness) / 2;
|
|
7138
|
-
const assembly = /* @__PURE__ */
|
|
7139
|
-
showFlexCable && /* @__PURE__ */
|
|
7269
|
+
const assembly = /* @__PURE__ */ jsxs81(Fragment81, { children: [
|
|
7270
|
+
showFlexCable && /* @__PURE__ */ jsx85(
|
|
7140
7271
|
CableStrip,
|
|
7141
7272
|
{
|
|
7142
7273
|
points: path,
|
|
@@ -7145,8 +7276,8 @@ var FlexScreen = (props) => {
|
|
|
7145
7276
|
color: flexCableColor
|
|
7146
7277
|
}
|
|
7147
7278
|
),
|
|
7148
|
-
showFlexCable && showStiffeners && resolvedStiffenerLength > EPSILON && /* @__PURE__ */
|
|
7149
|
-
/* @__PURE__ */
|
|
7279
|
+
showFlexCable && showStiffeners && resolvedStiffenerLength > EPSILON && /* @__PURE__ */ jsxs81(Fragment81, { children: [
|
|
7280
|
+
/* @__PURE__ */ jsx85(
|
|
7150
7281
|
CableStrip,
|
|
7151
7282
|
{
|
|
7152
7283
|
points: startStiffener,
|
|
@@ -7156,7 +7287,7 @@ var FlexScreen = (props) => {
|
|
|
7156
7287
|
normalOffset: stiffenerNormalOffset
|
|
7157
7288
|
}
|
|
7158
7289
|
),
|
|
7159
|
-
/* @__PURE__ */
|
|
7290
|
+
/* @__PURE__ */ jsx85(
|
|
7160
7291
|
CableStrip,
|
|
7161
7292
|
{
|
|
7162
7293
|
points: endStiffener,
|
|
@@ -7167,8 +7298,8 @@ var FlexScreen = (props) => {
|
|
|
7167
7298
|
}
|
|
7168
7299
|
)
|
|
7169
7300
|
] }),
|
|
7170
|
-
showFlexCable && showConductors && contactLength > EPSILON && conductorOffsets.map((acrossOffset, index) => /* @__PURE__ */
|
|
7171
|
-
/* @__PURE__ */
|
|
7301
|
+
showFlexCable && showConductors && contactLength > EPSILON && conductorOffsets.map((acrossOffset, index) => /* @__PURE__ */ jsxs81(Fragment80, { children: [
|
|
7302
|
+
/* @__PURE__ */ jsx85(
|
|
7172
7303
|
CableStrip,
|
|
7173
7304
|
{
|
|
7174
7305
|
points: startContacts,
|
|
@@ -7179,7 +7310,7 @@ var FlexScreen = (props) => {
|
|
|
7179
7310
|
normalOffset: conductorNormalOffset
|
|
7180
7311
|
}
|
|
7181
7312
|
),
|
|
7182
|
-
/* @__PURE__ */
|
|
7313
|
+
/* @__PURE__ */ jsx85(
|
|
7183
7314
|
CableStrip,
|
|
7184
7315
|
{
|
|
7185
7316
|
points: endContacts,
|
|
@@ -7191,7 +7322,7 @@ var FlexScreen = (props) => {
|
|
|
7191
7322
|
}
|
|
7192
7323
|
)
|
|
7193
7324
|
] }, `conductor:${index}`)),
|
|
7194
|
-
showScreen && /* @__PURE__ */
|
|
7325
|
+
showScreen && /* @__PURE__ */ jsx85(Translate39, { offset: screenCenter, children: /* @__PURE__ */ jsx85(Rotate18, { rotation: screenRotation ?? presetScreenRotation, children: /* @__PURE__ */ jsx85(
|
|
7195
7326
|
Screen,
|
|
7196
7327
|
{
|
|
7197
7328
|
width: size.width,
|
|
@@ -7206,21 +7337,21 @@ var FlexScreen = (props) => {
|
|
|
7206
7337
|
}
|
|
7207
7338
|
) }) })
|
|
7208
7339
|
] });
|
|
7209
|
-
return /* @__PURE__ */
|
|
7210
|
-
|
|
7340
|
+
return /* @__PURE__ */ jsx85(
|
|
7341
|
+
Translate39,
|
|
7211
7342
|
{
|
|
7212
7343
|
offset: {
|
|
7213
7344
|
x: offset?.x ?? 0,
|
|
7214
7345
|
y: offset?.y ?? 0,
|
|
7215
7346
|
z: offset?.z ?? 0
|
|
7216
7347
|
},
|
|
7217
|
-
children: /* @__PURE__ */
|
|
7348
|
+
children: /* @__PURE__ */ jsx85(Translate39, { offset: start, children: /* @__PURE__ */ jsx85(Rotate18, { rotation, children: /* @__PURE__ */ jsx85(Translate39, { offset: [-start[0], -start[1], -start[2]], children: assembly }) }) })
|
|
7218
7349
|
}
|
|
7219
7350
|
);
|
|
7220
7351
|
};
|
|
7221
7352
|
|
|
7222
7353
|
// lib/Footprinter3d.tsx
|
|
7223
|
-
import { Fragment as
|
|
7354
|
+
import { Fragment as Fragment82, jsx as jsx86 } from "react/jsx-runtime";
|
|
7224
7355
|
var Footprinter3d = ({ footprint }) => {
|
|
7225
7356
|
const modelFn = mp.string(footprint.split("_", 1)[0]).params().fn;
|
|
7226
7357
|
if (mp.getModelNames().includes(modelFn)) {
|
|
@@ -7228,7 +7359,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7228
7359
|
switch (model.fn) {
|
|
7229
7360
|
case "flexscreen": {
|
|
7230
7361
|
const { fn: _, ...flexScreenProps } = model;
|
|
7231
|
-
return /* @__PURE__ */
|
|
7362
|
+
return /* @__PURE__ */ jsx86(FlexScreen, { ...flexScreenProps });
|
|
7232
7363
|
}
|
|
7233
7364
|
}
|
|
7234
7365
|
}
|
|
@@ -7241,8 +7372,12 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7241
7372
|
const pinMatch = footprint.match(/jstph2_0mm(\d+)?/);
|
|
7242
7373
|
const numPins = pinMatch && pinMatch[1] ? pinMatch[1] : "2";
|
|
7243
7374
|
normalizedFootprint = `jst${numPins}_ph`;
|
|
7375
|
+
} else if (footprint.startsWith("jstxh2_5mm")) {
|
|
7376
|
+
const pinMatch = footprint.match(/jstxh2_5mm(\d+)?/);
|
|
7377
|
+
const numPins = pinMatch && pinMatch[1] ? pinMatch[1] : "2";
|
|
7378
|
+
normalizedFootprint = `jst${numPins}_xh`;
|
|
7244
7379
|
}
|
|
7245
|
-
const fpJson =
|
|
7380
|
+
const fpJson = fp6.string(normalizedFootprint).json();
|
|
7246
7381
|
const colorMatch = footprint.match(/_color\(([^)]+)\)/);
|
|
7247
7382
|
const color = colorMatch ? colorMatch[1] : void 0;
|
|
7248
7383
|
const dim = (value, fallback) => {
|
|
@@ -7252,7 +7387,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7252
7387
|
};
|
|
7253
7388
|
switch (fpJson.fn) {
|
|
7254
7389
|
case "crystal":
|
|
7255
|
-
return /* @__PURE__ */
|
|
7390
|
+
return /* @__PURE__ */ jsx86(
|
|
7256
7391
|
Crystal,
|
|
7257
7392
|
{
|
|
7258
7393
|
horizontalPadPitch: fpJson.px,
|
|
@@ -7262,11 +7397,11 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7262
7397
|
}
|
|
7263
7398
|
);
|
|
7264
7399
|
case "dip":
|
|
7265
|
-
return /* @__PURE__ */
|
|
7400
|
+
return /* @__PURE__ */ jsx86(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
7266
7401
|
case "axial":
|
|
7267
|
-
return /* @__PURE__ */
|
|
7402
|
+
return /* @__PURE__ */ jsx86(AxialCapacitor, { pitch: fpJson.p });
|
|
7268
7403
|
case "tssop":
|
|
7269
|
-
return /* @__PURE__ */
|
|
7404
|
+
return /* @__PURE__ */ jsx86(
|
|
7270
7405
|
Tssop,
|
|
7271
7406
|
{
|
|
7272
7407
|
pinCount: fpJson.num_pins,
|
|
@@ -7277,7 +7412,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7277
7412
|
}
|
|
7278
7413
|
);
|
|
7279
7414
|
case "msop":
|
|
7280
|
-
return /* @__PURE__ */
|
|
7415
|
+
return /* @__PURE__ */ jsx86(
|
|
7281
7416
|
MSOP,
|
|
7282
7417
|
{
|
|
7283
7418
|
pinCount: fpJson.num_pins,
|
|
@@ -7288,7 +7423,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7288
7423
|
}
|
|
7289
7424
|
);
|
|
7290
7425
|
case "vssop":
|
|
7291
|
-
return /* @__PURE__ */
|
|
7426
|
+
return /* @__PURE__ */ jsx86(
|
|
7292
7427
|
VSSOP,
|
|
7293
7428
|
{
|
|
7294
7429
|
pinCount: fpJson.num_pins,
|
|
@@ -7300,7 +7435,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7300
7435
|
}
|
|
7301
7436
|
);
|
|
7302
7437
|
case "qfp":
|
|
7303
|
-
return /* @__PURE__ */
|
|
7438
|
+
return /* @__PURE__ */ jsx86(
|
|
7304
7439
|
QFP,
|
|
7305
7440
|
{
|
|
7306
7441
|
pinCount: fpJson.num_pins,
|
|
@@ -7311,12 +7446,12 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7311
7446
|
}
|
|
7312
7447
|
);
|
|
7313
7448
|
case "tqfp":
|
|
7314
|
-
return /* @__PURE__ */
|
|
7449
|
+
return /* @__PURE__ */ jsx86(tqfp_default, {});
|
|
7315
7450
|
case "lqfp":
|
|
7316
|
-
return /* @__PURE__ */
|
|
7451
|
+
return /* @__PURE__ */ jsx86(LQFP, { pinCount: fpJson.num_pins });
|
|
7317
7452
|
case "qfn": {
|
|
7318
7453
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
7319
|
-
return /* @__PURE__ */
|
|
7454
|
+
return /* @__PURE__ */ jsx86(
|
|
7320
7455
|
qfn_default,
|
|
7321
7456
|
{
|
|
7322
7457
|
num_pins: fpJson.num_pins,
|
|
@@ -7334,7 +7469,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7334
7469
|
}
|
|
7335
7470
|
case "dfn": {
|
|
7336
7471
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
7337
|
-
return /* @__PURE__ */
|
|
7472
|
+
return /* @__PURE__ */ jsx86(
|
|
7338
7473
|
DFN,
|
|
7339
7474
|
{
|
|
7340
7475
|
num_pins: fpJson.num_pins,
|
|
@@ -7354,7 +7489,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7354
7489
|
const rowsMatch = footprint.match(/_rows(\d+)/);
|
|
7355
7490
|
const rows = rowsMatch && rowsMatch[1] ? parseInt(rowsMatch[1], 10) : 1;
|
|
7356
7491
|
if (fpJson.male)
|
|
7357
|
-
return /* @__PURE__ */
|
|
7492
|
+
return /* @__PURE__ */ jsx86(
|
|
7358
7493
|
PinRow,
|
|
7359
7494
|
{
|
|
7360
7495
|
numberOfPins: fpJson.num_pins,
|
|
@@ -7366,7 +7501,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7366
7501
|
}
|
|
7367
7502
|
);
|
|
7368
7503
|
if (fpJson.female)
|
|
7369
|
-
return /* @__PURE__ */
|
|
7504
|
+
return /* @__PURE__ */ jsx86(
|
|
7370
7505
|
FemaleHeaderRow,
|
|
7371
7506
|
{
|
|
7372
7507
|
numberOfPins: fpJson.num_pins,
|
|
@@ -7376,7 +7511,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7376
7511
|
);
|
|
7377
7512
|
}
|
|
7378
7513
|
case "smdpinheader":
|
|
7379
|
-
return /* @__PURE__ */
|
|
7514
|
+
return /* @__PURE__ */ jsx86(
|
|
7380
7515
|
SmdPinHeader,
|
|
7381
7516
|
{
|
|
7382
7517
|
numberOfPins: fpJson.num_pins,
|
|
@@ -7385,44 +7520,44 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7385
7520
|
}
|
|
7386
7521
|
);
|
|
7387
7522
|
case "led5050":
|
|
7388
|
-
return /* @__PURE__ */
|
|
7523
|
+
return /* @__PURE__ */ jsx86(Led5050, { color });
|
|
7389
7524
|
case "cap": {
|
|
7390
7525
|
switch (fpJson.imperial) {
|
|
7391
7526
|
case "0402":
|
|
7392
|
-
return /* @__PURE__ */
|
|
7527
|
+
return /* @__PURE__ */ jsx86(A0402, { color: "#856c4d" });
|
|
7393
7528
|
case "0603":
|
|
7394
|
-
return /* @__PURE__ */
|
|
7529
|
+
return /* @__PURE__ */ jsx86(A0603, { color: "#856c4d" });
|
|
7395
7530
|
case "0805":
|
|
7396
|
-
return /* @__PURE__ */
|
|
7531
|
+
return /* @__PURE__ */ jsx86(A0805, { color: "#856c4d" });
|
|
7397
7532
|
case "0201":
|
|
7398
|
-
return /* @__PURE__ */
|
|
7533
|
+
return /* @__PURE__ */ jsx86(A0201, { color: "#856c4d" });
|
|
7399
7534
|
case "01005":
|
|
7400
|
-
return /* @__PURE__ */
|
|
7535
|
+
return /* @__PURE__ */ jsx86(A01005, { color: "#856c4d" });
|
|
7401
7536
|
case "1206":
|
|
7402
|
-
return /* @__PURE__ */
|
|
7537
|
+
return /* @__PURE__ */ jsx86(A1206, { color: "#856c4d" });
|
|
7403
7538
|
case "1210":
|
|
7404
|
-
return /* @__PURE__ */
|
|
7539
|
+
return /* @__PURE__ */ jsx86(A1210, { color: "#856c4d" });
|
|
7405
7540
|
case "2010":
|
|
7406
|
-
return /* @__PURE__ */
|
|
7541
|
+
return /* @__PURE__ */ jsx86(A2010, { color: "#856c4d" });
|
|
7407
7542
|
case "2512":
|
|
7408
|
-
return /* @__PURE__ */
|
|
7543
|
+
return /* @__PURE__ */ jsx86(A2512, { color: "#856c4d" });
|
|
7409
7544
|
}
|
|
7410
7545
|
break;
|
|
7411
7546
|
}
|
|
7412
7547
|
case "sot23":
|
|
7413
7548
|
switch (fpJson.num_pins) {
|
|
7414
7549
|
case 3:
|
|
7415
|
-
return /* @__PURE__ */
|
|
7550
|
+
return /* @__PURE__ */ jsx86(SOT233P, { color });
|
|
7416
7551
|
case 5:
|
|
7417
|
-
return /* @__PURE__ */
|
|
7552
|
+
return /* @__PURE__ */ jsx86(SOT_235_default, {});
|
|
7418
7553
|
}
|
|
7419
7554
|
break;
|
|
7420
7555
|
case "sot25":
|
|
7421
|
-
return /* @__PURE__ */
|
|
7556
|
+
return /* @__PURE__ */ jsx86(SOT_235_default, {});
|
|
7422
7557
|
case "sot":
|
|
7423
7558
|
case "sot343": {
|
|
7424
7559
|
const isSc70 = fpJson.fn === "sot343";
|
|
7425
|
-
return /* @__PURE__ */
|
|
7560
|
+
return /* @__PURE__ */ jsx86(
|
|
7426
7561
|
GullWingBody,
|
|
7427
7562
|
{
|
|
7428
7563
|
pads: getSmtPadRects(normalizedFootprint),
|
|
@@ -7433,10 +7568,10 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7433
7568
|
);
|
|
7434
7569
|
}
|
|
7435
7570
|
case "sot563":
|
|
7436
|
-
return /* @__PURE__ */
|
|
7571
|
+
return /* @__PURE__ */ jsx86(SOT563, {});
|
|
7437
7572
|
case "sot89": {
|
|
7438
7573
|
const padSpan = dim(fpJson.w, 4.2);
|
|
7439
|
-
return /* @__PURE__ */
|
|
7574
|
+
return /* @__PURE__ */ jsx86(
|
|
7440
7575
|
SOT223,
|
|
7441
7576
|
{
|
|
7442
7577
|
fullWidth: padSpan,
|
|
@@ -7451,25 +7586,25 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7451
7586
|
);
|
|
7452
7587
|
}
|
|
7453
7588
|
case "sot457":
|
|
7454
|
-
return /* @__PURE__ */
|
|
7589
|
+
return /* @__PURE__ */ jsx86(SOT457, {});
|
|
7455
7590
|
case "sot223":
|
|
7456
|
-
return /* @__PURE__ */
|
|
7591
|
+
return /* @__PURE__ */ jsx86(SOT223, {});
|
|
7457
7592
|
case "sot23w":
|
|
7458
|
-
return /* @__PURE__ */
|
|
7593
|
+
return /* @__PURE__ */ jsx86(SOT23W, {});
|
|
7459
7594
|
case "sot323":
|
|
7460
|
-
return /* @__PURE__ */
|
|
7595
|
+
return /* @__PURE__ */ jsx86(SOT323, {});
|
|
7461
7596
|
case "sod323f":
|
|
7462
|
-
return /* @__PURE__ */
|
|
7597
|
+
return /* @__PURE__ */ jsx86(SOD323F, {});
|
|
7463
7598
|
case "sod323fl":
|
|
7464
|
-
return /* @__PURE__ */
|
|
7599
|
+
return /* @__PURE__ */ jsx86(SOD323FL, {});
|
|
7465
7600
|
case "sot363":
|
|
7466
|
-
return /* @__PURE__ */
|
|
7601
|
+
return /* @__PURE__ */ jsx86(SOT_363_default, {});
|
|
7467
7602
|
case "sot886":
|
|
7468
|
-
return /* @__PURE__ */
|
|
7603
|
+
return /* @__PURE__ */ jsx86(SOT886, {});
|
|
7469
7604
|
case "sot963":
|
|
7470
|
-
return /* @__PURE__ */
|
|
7605
|
+
return /* @__PURE__ */ jsx86(SOT963, {});
|
|
7471
7606
|
case "pushbutton":
|
|
7472
|
-
return /* @__PURE__ */
|
|
7607
|
+
return /* @__PURE__ */ jsx86(
|
|
7473
7608
|
PushButton,
|
|
7474
7609
|
{
|
|
7475
7610
|
width: fpJson.w,
|
|
@@ -7479,14 +7614,17 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7479
7614
|
);
|
|
7480
7615
|
case "jst":
|
|
7481
7616
|
if (fpJson.zh) {
|
|
7482
|
-
return /* @__PURE__ */
|
|
7617
|
+
return /* @__PURE__ */ jsx86(JSTZH1_5mm, { numPins: fpJson.num_pins });
|
|
7483
7618
|
}
|
|
7484
7619
|
if (fpJson.ph) {
|
|
7485
|
-
return /* @__PURE__ */
|
|
7620
|
+
return /* @__PURE__ */ jsx86(JSTPH2_0mm, { numPins: fpJson.num_pins });
|
|
7621
|
+
}
|
|
7622
|
+
if (fpJson.xh) {
|
|
7623
|
+
return /* @__PURE__ */ jsx86(JSTXH2_5mm, { numPins: fpJson.num_pins });
|
|
7486
7624
|
}
|
|
7487
7625
|
break;
|
|
7488
7626
|
case "fpc":
|
|
7489
|
-
return /* @__PURE__ */
|
|
7627
|
+
return /* @__PURE__ */ jsx86(
|
|
7490
7628
|
FPC,
|
|
7491
7629
|
{
|
|
7492
7630
|
pinCount: fpJson.num_pins,
|
|
@@ -7506,7 +7644,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7506
7644
|
}
|
|
7507
7645
|
);
|
|
7508
7646
|
case "rj45":
|
|
7509
|
-
return /* @__PURE__ */
|
|
7647
|
+
return /* @__PURE__ */ jsx86(
|
|
7510
7648
|
RJ45,
|
|
7511
7649
|
{
|
|
7512
7650
|
bodyWidth: fpJson.w,
|
|
@@ -7532,7 +7670,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7532
7670
|
case "soic":
|
|
7533
7671
|
case "sop8":
|
|
7534
7672
|
case "ssop":
|
|
7535
|
-
return /* @__PURE__ */
|
|
7673
|
+
return /* @__PURE__ */ jsx86(
|
|
7536
7674
|
SOIC,
|
|
7537
7675
|
{
|
|
7538
7676
|
pinCount: fpJson.num_pins,
|
|
@@ -7556,7 +7694,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7556
7694
|
);
|
|
7557
7695
|
const distinct = (values) => new Set(values.map((value) => value.toFixed(3))).size;
|
|
7558
7696
|
const rowsAlongY = signalPads.length > 2 && distinct(signalPads.map((pad) => pad.y)) === 2 && distinct(signalPads.map((pad) => pad.x)) > 2;
|
|
7559
|
-
const dfn = /* @__PURE__ */
|
|
7697
|
+
const dfn = /* @__PURE__ */ jsx86(
|
|
7560
7698
|
DFN,
|
|
7561
7699
|
{
|
|
7562
7700
|
num_pins: fpJson.num_pins,
|
|
@@ -7571,13 +7709,13 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7571
7709
|
} : void 0
|
|
7572
7710
|
}
|
|
7573
7711
|
);
|
|
7574
|
-
return rowsAlongY ? /* @__PURE__ */
|
|
7712
|
+
return rowsAlongY ? /* @__PURE__ */ jsx86(Rotate19, { rotation: [0, 0, "90deg"], children: dfn }) : dfn;
|
|
7575
7713
|
}
|
|
7576
7714
|
case "mlp":
|
|
7577
7715
|
case "lga":
|
|
7578
7716
|
case "quad": {
|
|
7579
7717
|
if (fpJson.legsoutside) {
|
|
7580
|
-
return /* @__PURE__ */
|
|
7718
|
+
return /* @__PURE__ */ jsx86(
|
|
7581
7719
|
QFP,
|
|
7582
7720
|
{
|
|
7583
7721
|
pinCount: fpJson.num_pins,
|
|
@@ -7588,7 +7726,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7588
7726
|
}
|
|
7589
7727
|
);
|
|
7590
7728
|
}
|
|
7591
|
-
return /* @__PURE__ */
|
|
7729
|
+
return /* @__PURE__ */ jsx86(
|
|
7592
7730
|
qfn_default,
|
|
7593
7731
|
{
|
|
7594
7732
|
num_pins: fpJson.num_pins,
|
|
@@ -7604,7 +7742,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7604
7742
|
const pitch = dim(fpJson.p, 0.8);
|
|
7605
7743
|
const columns = fpJson.grid?.x ?? 8;
|
|
7606
7744
|
const rows = fpJson.grid?.y ?? 8;
|
|
7607
|
-
return /* @__PURE__ */
|
|
7745
|
+
return /* @__PURE__ */ jsx86(
|
|
7608
7746
|
BGA,
|
|
7609
7747
|
{
|
|
7610
7748
|
ballPitch: pitch,
|
|
@@ -7617,43 +7755,43 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7617
7755
|
);
|
|
7618
7756
|
}
|
|
7619
7757
|
case "sod523":
|
|
7620
|
-
return /* @__PURE__ */
|
|
7758
|
+
return /* @__PURE__ */ jsx86(SOD523, {});
|
|
7621
7759
|
case "sod723":
|
|
7622
|
-
return /* @__PURE__ */
|
|
7760
|
+
return /* @__PURE__ */ jsx86(SOD723_default, {});
|
|
7623
7761
|
case "sod882":
|
|
7624
|
-
return /* @__PURE__ */
|
|
7762
|
+
return /* @__PURE__ */ jsx86(SOD882, {});
|
|
7625
7763
|
case "sma":
|
|
7626
|
-
return /* @__PURE__ */
|
|
7764
|
+
return /* @__PURE__ */ jsx86(SMA, {});
|
|
7627
7765
|
case "smb":
|
|
7628
|
-
return /* @__PURE__ */
|
|
7766
|
+
return /* @__PURE__ */ jsx86(SMB, {});
|
|
7629
7767
|
case "smc":
|
|
7630
|
-
return /* @__PURE__ */
|
|
7768
|
+
return /* @__PURE__ */ jsx86(SMC, {});
|
|
7631
7769
|
case "smf":
|
|
7632
|
-
return /* @__PURE__ */
|
|
7770
|
+
return /* @__PURE__ */ jsx86(SMF, {});
|
|
7633
7771
|
case "sod123":
|
|
7634
|
-
return /* @__PURE__ */
|
|
7772
|
+
return /* @__PURE__ */ jsx86(SOD123, {});
|
|
7635
7773
|
case "sod123f":
|
|
7636
|
-
return /* @__PURE__ */
|
|
7774
|
+
return /* @__PURE__ */ jsx86(SOD123F, {});
|
|
7637
7775
|
case "sod123fl":
|
|
7638
|
-
return /* @__PURE__ */
|
|
7776
|
+
return /* @__PURE__ */ jsx86(SOD123FL, {});
|
|
7639
7777
|
case "sod123w":
|
|
7640
|
-
return /* @__PURE__ */
|
|
7778
|
+
return /* @__PURE__ */ jsx86(SOD123W, {});
|
|
7641
7779
|
case "sod110":
|
|
7642
|
-
return /* @__PURE__ */
|
|
7780
|
+
return /* @__PURE__ */ jsx86(SOD123W, { bodyWidth: 2.1, bodyLength: 1.4 });
|
|
7643
7781
|
case "sod128":
|
|
7644
|
-
return /* @__PURE__ */
|
|
7782
|
+
return /* @__PURE__ */ jsx86(SOD128, {});
|
|
7645
7783
|
case "sod323":
|
|
7646
|
-
return /* @__PURE__ */
|
|
7784
|
+
return /* @__PURE__ */ jsx86(SOD323, {});
|
|
7647
7785
|
case "sod323w":
|
|
7648
|
-
return /* @__PURE__ */
|
|
7786
|
+
return /* @__PURE__ */ jsx86(SOD323, {});
|
|
7649
7787
|
case "sod80":
|
|
7650
|
-
return /* @__PURE__ */
|
|
7788
|
+
return /* @__PURE__ */ jsx86(MINIMELF, {});
|
|
7651
7789
|
case "sod882d":
|
|
7652
|
-
return /* @__PURE__ */
|
|
7790
|
+
return /* @__PURE__ */ jsx86(SOD882, {});
|
|
7653
7791
|
case "smbf":
|
|
7654
|
-
return /* @__PURE__ */
|
|
7792
|
+
return /* @__PURE__ */ jsx86(SMB, {});
|
|
7655
7793
|
case "led2835":
|
|
7656
|
-
return /* @__PURE__ */
|
|
7794
|
+
return /* @__PURE__ */ jsx86(
|
|
7657
7795
|
Led2835,
|
|
7658
7796
|
{
|
|
7659
7797
|
color,
|
|
@@ -7671,10 +7809,10 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7671
7809
|
const pitch = dim(fpJson.p, 2.5);
|
|
7672
7810
|
const namedDiameter = footprint.match(/_d([\d.]+)/);
|
|
7673
7811
|
const diameter = fpJson.d !== void 0 ? dim(fpJson.d, pitch * 2) : namedDiameter ? Number(namedDiameter[1]) : pitch * 2;
|
|
7674
|
-
return /* @__PURE__ */
|
|
7812
|
+
return /* @__PURE__ */ jsx86(ElectrolyticCapacitor, { diameter, leadPitch: pitch });
|
|
7675
7813
|
}
|
|
7676
7814
|
case "potentiometer":
|
|
7677
|
-
return /* @__PURE__ */
|
|
7815
|
+
return /* @__PURE__ */ jsx86(
|
|
7678
7816
|
Potentiometer,
|
|
7679
7817
|
{
|
|
7680
7818
|
bodyWidth: dim(fpJson.w, 5.35),
|
|
@@ -7684,7 +7822,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7684
7822
|
}
|
|
7685
7823
|
);
|
|
7686
7824
|
case "smdpushbutton":
|
|
7687
|
-
return /* @__PURE__ */
|
|
7825
|
+
return /* @__PURE__ */ jsx86(
|
|
7688
7826
|
SmdPushButton,
|
|
7689
7827
|
{
|
|
7690
7828
|
padSpanX: dim(fpJson.px, 4.2),
|
|
@@ -7700,20 +7838,20 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7700
7838
|
{ x: -halfWidth, pins: fpJson.left ?? 0, key: "left" },
|
|
7701
7839
|
{ x: halfWidth, pins: fpJson.right ?? 0, key: "right" }
|
|
7702
7840
|
];
|
|
7703
|
-
return /* @__PURE__ */
|
|
7841
|
+
return /* @__PURE__ */ jsx86(Fragment82, { children: sides.filter(({ pins }) => pins > 0).map(({ x, pins, key }) => /* @__PURE__ */ jsx86(Translate40, { center: [x, 0, 0], children: /* @__PURE__ */ jsx86(Rotate19, { rotation: [0, 0, "90deg"], children: /* @__PURE__ */ jsx86(PinRow, { numberOfPins: pins, pitch }) }) }, key)) });
|
|
7704
7842
|
}
|
|
7705
7843
|
case "sod923":
|
|
7706
|
-
return /* @__PURE__ */
|
|
7844
|
+
return /* @__PURE__ */ jsx86(SOD923, {});
|
|
7707
7845
|
case "hc49":
|
|
7708
|
-
return /* @__PURE__ */
|
|
7846
|
+
return /* @__PURE__ */ jsx86(HC49, {});
|
|
7709
7847
|
case "micromelf":
|
|
7710
|
-
return /* @__PURE__ */
|
|
7848
|
+
return /* @__PURE__ */ jsx86(MicroMELF, {});
|
|
7711
7849
|
case "minimelf":
|
|
7712
|
-
return /* @__PURE__ */
|
|
7850
|
+
return /* @__PURE__ */ jsx86(MINIMELF, {});
|
|
7713
7851
|
case "melf":
|
|
7714
|
-
return /* @__PURE__ */
|
|
7852
|
+
return /* @__PURE__ */ jsx86(MELF, {});
|
|
7715
7853
|
case "ms012":
|
|
7716
|
-
return /* @__PURE__ */
|
|
7854
|
+
return /* @__PURE__ */ jsx86(
|
|
7717
7855
|
MS012,
|
|
7718
7856
|
{
|
|
7719
7857
|
pinCount: fpJson.num_pins,
|
|
@@ -7723,7 +7861,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7723
7861
|
}
|
|
7724
7862
|
);
|
|
7725
7863
|
case "ms013":
|
|
7726
|
-
return /* @__PURE__ */
|
|
7864
|
+
return /* @__PURE__ */ jsx86(
|
|
7727
7865
|
MS013,
|
|
7728
7866
|
{
|
|
7729
7867
|
pinCount: fpJson.num_pins,
|
|
@@ -7733,19 +7871,19 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7733
7871
|
}
|
|
7734
7872
|
);
|
|
7735
7873
|
case "sot723":
|
|
7736
|
-
return /* @__PURE__ */
|
|
7874
|
+
return /* @__PURE__ */ jsx86(SOT723, {});
|
|
7737
7875
|
case "to220":
|
|
7738
|
-
return /* @__PURE__ */
|
|
7876
|
+
return /* @__PURE__ */ jsx86(TO220, { leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
7739
7877
|
case "to220f":
|
|
7740
|
-
return /* @__PURE__ */
|
|
7878
|
+
return /* @__PURE__ */ jsx86(TO220, { mouldedTab: true, leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
7741
7879
|
case "to92":
|
|
7742
|
-
return /* @__PURE__ */
|
|
7880
|
+
return /* @__PURE__ */ jsx86(TO92, { leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
7743
7881
|
case "to92l":
|
|
7744
7882
|
case "to92s": {
|
|
7745
7883
|
const across = dim(fpJson.w, 4.8);
|
|
7746
7884
|
const along = dim(fpJson.h, 4);
|
|
7747
7885
|
const diameter = Math.max(across, along);
|
|
7748
|
-
return /* @__PURE__ */
|
|
7886
|
+
return /* @__PURE__ */ jsx86(
|
|
7749
7887
|
TO92,
|
|
7750
7888
|
{
|
|
7751
7889
|
bodyDiameter: diameter,
|
|
@@ -7764,7 +7902,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7764
7902
|
dim(fpJson.tabh, isD2Pak ? 10 : 5.8),
|
|
7765
7903
|
isD2Pak ? 10 : 6.5
|
|
7766
7904
|
);
|
|
7767
|
-
return /* @__PURE__ */
|
|
7905
|
+
return /* @__PURE__ */ jsx86(
|
|
7768
7906
|
DPAK,
|
|
7769
7907
|
{
|
|
7770
7908
|
bodyWidth: tabWidth,
|
|
@@ -7781,7 +7919,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7781
7919
|
}
|
|
7782
7920
|
case "stampboard":
|
|
7783
7921
|
case "stampreceiver":
|
|
7784
|
-
return /* @__PURE__ */
|
|
7922
|
+
return /* @__PURE__ */ jsx86(
|
|
7785
7923
|
StampBoard,
|
|
7786
7924
|
{
|
|
7787
7925
|
bodyWidth: fpJson.w,
|
|
@@ -7805,7 +7943,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7805
7943
|
const pinRow = fpJson.pinrow;
|
|
7806
7944
|
const pinRowHoleEdgeToEdgeDist = fpJson.pinRowHoleEdgeToEdgeDist;
|
|
7807
7945
|
const holes = Array.isArray(fpJson.holes) ? fpJson.holes : [];
|
|
7808
|
-
return /* @__PURE__ */
|
|
7946
|
+
return /* @__PURE__ */ jsx86(
|
|
7809
7947
|
MountedPcbModule,
|
|
7810
7948
|
{
|
|
7811
7949
|
numPins: pinRow,
|
|
@@ -7832,29 +7970,29 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7832
7970
|
}
|
|
7833
7971
|
switch (fpJson.imperial) {
|
|
7834
7972
|
case "0402":
|
|
7835
|
-
return /* @__PURE__ */
|
|
7973
|
+
return /* @__PURE__ */ jsx86(A0402, { color });
|
|
7836
7974
|
case "0603":
|
|
7837
|
-
return /* @__PURE__ */
|
|
7975
|
+
return /* @__PURE__ */ jsx86(A0603, { color });
|
|
7838
7976
|
case "0805":
|
|
7839
|
-
return /* @__PURE__ */
|
|
7977
|
+
return /* @__PURE__ */ jsx86(A0805, { color });
|
|
7840
7978
|
case "0201":
|
|
7841
|
-
return /* @__PURE__ */
|
|
7979
|
+
return /* @__PURE__ */ jsx86(A0201, { color });
|
|
7842
7980
|
case "01005":
|
|
7843
|
-
return /* @__PURE__ */
|
|
7981
|
+
return /* @__PURE__ */ jsx86(A01005, { color });
|
|
7844
7982
|
case "1206":
|
|
7845
|
-
return /* @__PURE__ */
|
|
7983
|
+
return /* @__PURE__ */ jsx86(A1206, { color });
|
|
7846
7984
|
case "1210":
|
|
7847
|
-
return /* @__PURE__ */
|
|
7985
|
+
return /* @__PURE__ */ jsx86(A1210, { color });
|
|
7848
7986
|
case "2010":
|
|
7849
|
-
return /* @__PURE__ */
|
|
7987
|
+
return /* @__PURE__ */ jsx86(A2010, { color });
|
|
7850
7988
|
case "2512":
|
|
7851
|
-
return /* @__PURE__ */
|
|
7989
|
+
return /* @__PURE__ */ jsx86(A2512, { color });
|
|
7852
7990
|
}
|
|
7853
7991
|
if ((fpJson.fn === "res" || fpJson.fn === "cap") && fpJson.p !== void 0 && fpJson.ph !== void 0) {
|
|
7854
7992
|
const padPitch = mm(fpJson.p);
|
|
7855
7993
|
const padHeight = mm(fpJson.ph);
|
|
7856
7994
|
if (Number.isFinite(padPitch) && Number.isFinite(padHeight)) {
|
|
7857
|
-
return /* @__PURE__ */
|
|
7995
|
+
return /* @__PURE__ */ jsx86(
|
|
7858
7996
|
ParametricChip,
|
|
7859
7997
|
{
|
|
7860
7998
|
padPitch,
|
|
@@ -7895,6 +8033,7 @@ export {
|
|
|
7895
8033
|
GullWingBody,
|
|
7896
8034
|
HC49,
|
|
7897
8035
|
JSTPH2_0mm,
|
|
8036
|
+
JSTXH2_5mm,
|
|
7898
8037
|
JSTZH1_5mm,
|
|
7899
8038
|
LQFP,
|
|
7900
8039
|
Led2835,
|