jscad-electronics 0.0.157 → 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 +508 -364
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +148 -8
- package/dist/vanilla.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -605,6 +605,7 @@ import { fp as fp2 } from "@tscircuit/footprinter";
|
|
|
605
605
|
import {
|
|
606
606
|
Colorize as Colorize4,
|
|
607
607
|
Cuboid as Cuboid12,
|
|
608
|
+
Cylinder as Cylinder3,
|
|
608
609
|
ExtrudeLinear as ExtrudeLinear2,
|
|
609
610
|
Polygon as Polygon2,
|
|
610
611
|
Translate as Translate4
|
|
@@ -619,6 +620,10 @@ var FootprintPad = ({
|
|
|
619
620
|
if (pad.shape === "rect") {
|
|
620
621
|
return /* @__PURE__ */ jsx13(Colorize4, { color, children: /* @__PURE__ */ jsx13(Translate4, { offset: [pad.x, pad.y, -5e-3], children: /* @__PURE__ */ jsx13(Cuboid12, { size: [pad.width, pad.height, PAD_THICKNESS] }) }) });
|
|
621
622
|
}
|
|
623
|
+
if (pad.shape === "circle") {
|
|
624
|
+
const radius = pad.radius ?? pad.r ?? 0.25;
|
|
625
|
+
return /* @__PURE__ */ jsx13(Colorize4, { color, children: /* @__PURE__ */ jsx13(Translate4, { offset: [pad.x, pad.y, -5e-3], children: /* @__PURE__ */ jsx13(Cylinder3, { radius, height: PAD_THICKNESS }) }) });
|
|
626
|
+
}
|
|
622
627
|
if (pad.shape === "polygon") {
|
|
623
628
|
const points = (pad.points ?? []).map(
|
|
624
629
|
({ x, y }) => [x, y]
|
|
@@ -634,7 +639,7 @@ import {
|
|
|
634
639
|
Colorize as Colorize5,
|
|
635
640
|
Cuboid as Cuboid13,
|
|
636
641
|
Translate as Translate5,
|
|
637
|
-
Cylinder as
|
|
642
|
+
Cylinder as Cylinder4,
|
|
638
643
|
Subtract as Subtract2,
|
|
639
644
|
Hull as Hull3
|
|
640
645
|
} from "jscad-fiber";
|
|
@@ -646,8 +651,8 @@ var FootprintPlatedHole = ({
|
|
|
646
651
|
const color = isPin1 ? "#00ff00" : "#b87333";
|
|
647
652
|
if (hole.shape === "circle") {
|
|
648
653
|
return /* @__PURE__ */ jsx14(Colorize5, { color, children: /* @__PURE__ */ jsx14(Translate5, { offset: [hole.x, hole.y, -5e-3], children: /* @__PURE__ */ jsxs13(Subtract2, { children: [
|
|
649
|
-
/* @__PURE__ */ jsx14(
|
|
650
|
-
/* @__PURE__ */ jsx14(
|
|
654
|
+
/* @__PURE__ */ jsx14(Cylinder4, { radius: hole.outer_diameter / 2, height: 0.01 }),
|
|
655
|
+
/* @__PURE__ */ jsx14(Cylinder4, { radius: hole.hole_diameter / 2, height: 0.01 })
|
|
651
656
|
] }) }) });
|
|
652
657
|
}
|
|
653
658
|
if (hole.shape === "circular_hole_with_rect_pad") {
|
|
@@ -659,7 +664,7 @@ var FootprintPlatedHole = ({
|
|
|
659
664
|
center: [0, 0, 0]
|
|
660
665
|
}
|
|
661
666
|
),
|
|
662
|
-
/* @__PURE__ */ jsx14(
|
|
667
|
+
/* @__PURE__ */ jsx14(Cylinder4, { radius: hole.hole_diameter / 2, height: 0.01 })
|
|
663
668
|
] }) }) });
|
|
664
669
|
}
|
|
665
670
|
if (hole.shape === "pill") {
|
|
@@ -672,7 +677,7 @@ var FootprintPlatedHole = ({
|
|
|
672
677
|
return /* @__PURE__ */ jsx14(Colorize5, { color, children: /* @__PURE__ */ jsx14(Translate5, { offset: [hole.x, hole.y, 0], children: /* @__PURE__ */ jsxs13(Subtract2, { children: [
|
|
673
678
|
/* @__PURE__ */ jsxs13(Hull3, { children: [
|
|
674
679
|
/* @__PURE__ */ jsx14(
|
|
675
|
-
|
|
680
|
+
Cylinder4,
|
|
676
681
|
{
|
|
677
682
|
radius,
|
|
678
683
|
height: 0.01,
|
|
@@ -684,7 +689,7 @@ var FootprintPlatedHole = ({
|
|
|
684
689
|
}
|
|
685
690
|
),
|
|
686
691
|
/* @__PURE__ */ jsx14(
|
|
687
|
-
|
|
692
|
+
Cylinder4,
|
|
688
693
|
{
|
|
689
694
|
radius,
|
|
690
695
|
height: 0.01,
|
|
@@ -696,9 +701,9 @@ var FootprintPlatedHole = ({
|
|
|
696
701
|
}
|
|
697
702
|
)
|
|
698
703
|
] }),
|
|
699
|
-
holeWidth === holeHeight ? /* @__PURE__ */ jsx14(
|
|
704
|
+
holeWidth === holeHeight ? /* @__PURE__ */ jsx14(Cylinder4, { radius: holeWidth / 2, height: 0.01 }) : /* @__PURE__ */ jsxs13(Hull3, { children: [
|
|
700
705
|
/* @__PURE__ */ jsx14(
|
|
701
|
-
|
|
706
|
+
Cylinder4,
|
|
702
707
|
{
|
|
703
708
|
radius: Math.min(holeWidth, holeHeight) / 2,
|
|
704
709
|
height: 0.01,
|
|
@@ -710,7 +715,7 @@ var FootprintPlatedHole = ({
|
|
|
710
715
|
}
|
|
711
716
|
),
|
|
712
717
|
/* @__PURE__ */ jsx14(
|
|
713
|
-
|
|
718
|
+
Cylinder4,
|
|
714
719
|
{
|
|
715
720
|
radius: Math.min(holeWidth, holeHeight) / 2,
|
|
716
721
|
height: 0.01,
|
|
@@ -757,9 +762,9 @@ var ExtrudedPads = ({
|
|
|
757
762
|
};
|
|
758
763
|
|
|
759
764
|
// lib/Footprinter3d.tsx
|
|
760
|
-
import { fp as
|
|
765
|
+
import { fp as fp6 } from "@tscircuit/footprinter";
|
|
761
766
|
import { mp } from "@tscircuit/modelprinter";
|
|
762
|
-
import { Rotate as Rotate19, Translate as
|
|
767
|
+
import { Rotate as Rotate19, Translate as Translate40 } from "jscad-fiber";
|
|
763
768
|
|
|
764
769
|
// lib/DualInlinePackage.tsx
|
|
765
770
|
import { Polygon as Polygon3, ExtrudeLinear as ExtrudeLinear3, Rotate as Rotate3, Translate as Translate6 } from "jscad-fiber";
|
|
@@ -1947,7 +1952,7 @@ var FemaleHeaderRow = ({
|
|
|
1947
1952
|
// lib/PushButton.tsx
|
|
1948
1953
|
import {
|
|
1949
1954
|
Colorize as Colorize10,
|
|
1950
|
-
Cylinder as
|
|
1955
|
+
Cylinder as Cylinder5,
|
|
1951
1956
|
ExtrudeLinear as ExtrudeLinear5,
|
|
1952
1957
|
Polygon as Polygon5,
|
|
1953
1958
|
Rotate as Rotate6,
|
|
@@ -1984,7 +1989,7 @@ var PushButton = ({
|
|
|
1984
1989
|
}
|
|
1985
1990
|
),
|
|
1986
1991
|
/* @__PURE__ */ jsx29(
|
|
1987
|
-
|
|
1992
|
+
Cylinder5,
|
|
1988
1993
|
{
|
|
1989
1994
|
color: "#1a1a1f",
|
|
1990
1995
|
height: bodyHeight * 0.8,
|
|
@@ -1993,7 +1998,7 @@ var PushButton = ({
|
|
|
1993
1998
|
}
|
|
1994
1999
|
),
|
|
1995
2000
|
/* @__PURE__ */ jsx29(
|
|
1996
|
-
|
|
2001
|
+
Cylinder5,
|
|
1997
2002
|
{
|
|
1998
2003
|
color: "#1a1a1f",
|
|
1999
2004
|
height: bodyHeight * 0.2,
|
|
@@ -2006,7 +2011,7 @@ var PushButton = ({
|
|
|
2006
2011
|
}
|
|
2007
2012
|
),
|
|
2008
2013
|
/* @__PURE__ */ jsx29(
|
|
2009
|
-
|
|
2014
|
+
Cylinder5,
|
|
2010
2015
|
{
|
|
2011
2016
|
color: "#1a1a1f",
|
|
2012
2017
|
height: bodyHeight * 0.2,
|
|
@@ -2019,7 +2024,7 @@ var PushButton = ({
|
|
|
2019
2024
|
}
|
|
2020
2025
|
),
|
|
2021
2026
|
/* @__PURE__ */ jsx29(
|
|
2022
|
-
|
|
2027
|
+
Cylinder5,
|
|
2023
2028
|
{
|
|
2024
2029
|
color: "#1a1a1f",
|
|
2025
2030
|
height: bodyHeight * 0.2,
|
|
@@ -2032,7 +2037,7 @@ var PushButton = ({
|
|
|
2032
2037
|
}
|
|
2033
2038
|
),
|
|
2034
2039
|
/* @__PURE__ */ jsx29(
|
|
2035
|
-
|
|
2040
|
+
Cylinder5,
|
|
2036
2041
|
{
|
|
2037
2042
|
color: "#1a1a1f",
|
|
2038
2043
|
height: bodyHeight * 0.2,
|
|
@@ -3549,7 +3554,7 @@ var DFN = ({
|
|
|
3549
3554
|
};
|
|
3550
3555
|
|
|
3551
3556
|
// lib/hc49.tsx
|
|
3552
|
-
import { Colorize as Colorize23, Cylinder as
|
|
3557
|
+
import { Colorize as Colorize23, Cylinder as Cylinder6, Hull as Hull18, RoundedCylinder } from "jscad-fiber";
|
|
3553
3558
|
import { Fragment as Fragment46, jsx as jsx50, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
3554
3559
|
var HC49 = ({
|
|
3555
3560
|
bodyLength: bodyLength10 = 10.2,
|
|
@@ -3611,7 +3616,7 @@ var HC49 = ({
|
|
|
3611
3616
|
] }),
|
|
3612
3617
|
/* @__PURE__ */ jsxs46(Colorize23, { color: leadColor, children: [
|
|
3613
3618
|
/* @__PURE__ */ jsx50(
|
|
3614
|
-
|
|
3619
|
+
Cylinder6,
|
|
3615
3620
|
{
|
|
3616
3621
|
height: leadLength + bodyHeight / 2,
|
|
3617
3622
|
radius: leadDiameter / 2,
|
|
@@ -3619,7 +3624,7 @@ var HC49 = ({
|
|
|
3619
3624
|
}
|
|
3620
3625
|
),
|
|
3621
3626
|
/* @__PURE__ */ jsx50(
|
|
3622
|
-
|
|
3627
|
+
Cylinder6,
|
|
3623
3628
|
{
|
|
3624
3629
|
height: leadLength + bodyHeight / 2,
|
|
3625
3630
|
radius: leadDiameter / 2,
|
|
@@ -3633,7 +3638,7 @@ var HC49 = ({
|
|
|
3633
3638
|
// lib/MicroMELF.tsx
|
|
3634
3639
|
import {
|
|
3635
3640
|
Colorize as Colorize24,
|
|
3636
|
-
Cylinder as
|
|
3641
|
+
Cylinder as Cylinder7,
|
|
3637
3642
|
RoundedCylinder as RoundedCylinder2,
|
|
3638
3643
|
Rotate as Rotate7,
|
|
3639
3644
|
RoundedCuboid as RoundedCuboid2
|
|
@@ -3658,7 +3663,7 @@ var MicroMELF = ({
|
|
|
3658
3663
|
}
|
|
3659
3664
|
),
|
|
3660
3665
|
/* @__PURE__ */ jsx51(
|
|
3661
|
-
|
|
3666
|
+
Cylinder7,
|
|
3662
3667
|
{
|
|
3663
3668
|
height: padLength / 2,
|
|
3664
3669
|
radius: bodyDiameter / 2 - padLength,
|
|
@@ -3919,7 +3924,7 @@ var MS013 = ({
|
|
|
3919
3924
|
import {
|
|
3920
3925
|
Colorize as Colorize27,
|
|
3921
3926
|
Cuboid as Cuboid34,
|
|
3922
|
-
Cylinder as
|
|
3927
|
+
Cylinder as Cylinder8,
|
|
3923
3928
|
Rotate as Rotate10,
|
|
3924
3929
|
Subtract as Subtract4,
|
|
3925
3930
|
Translate as Translate22
|
|
@@ -3971,7 +3976,7 @@ var TO220 = ({
|
|
|
3971
3976
|
}
|
|
3972
3977
|
),
|
|
3973
3978
|
/* @__PURE__ */ jsx56(Rotate10, { rotation: ["90deg", 0, 0], children: /* @__PURE__ */ jsx56(Translate22, { center: [centerX, holeZ, -tabY], children: /* @__PURE__ */ jsx56(
|
|
3974
|
-
|
|
3979
|
+
Cylinder8,
|
|
3975
3980
|
{
|
|
3976
3981
|
radius: mountingHoleDiameter / 2,
|
|
3977
3982
|
height: tabThickness * 3
|
|
@@ -4191,7 +4196,7 @@ import {
|
|
|
4191
4196
|
Cuboid as Cuboid36,
|
|
4192
4197
|
Hull as Hull19,
|
|
4193
4198
|
Translate as Translate23,
|
|
4194
|
-
Cylinder as
|
|
4199
|
+
Cylinder as Cylinder9,
|
|
4195
4200
|
Subtract as Subtract5
|
|
4196
4201
|
} from "jscad-fiber";
|
|
4197
4202
|
import { Fragment as Fragment55, jsx as jsx59, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
@@ -4259,7 +4264,7 @@ var TO92 = ({
|
|
|
4259
4264
|
Translate23,
|
|
4260
4265
|
{
|
|
4261
4266
|
center: [bodyCenter.x, bodyCenter.y, standoff + bodyHeight / 2],
|
|
4262
|
-
children: /* @__PURE__ */ jsx59(
|
|
4267
|
+
children: /* @__PURE__ */ jsx59(Cylinder9, { radius: bodyRadius, height: bodyHeight })
|
|
4263
4268
|
}
|
|
4264
4269
|
),
|
|
4265
4270
|
/* @__PURE__ */ jsx59(
|
|
@@ -4660,12 +4665,12 @@ var SOD323FL = () => {
|
|
|
4660
4665
|
};
|
|
4661
4666
|
|
|
4662
4667
|
// lib/AxialCapacitor.tsx
|
|
4663
|
-
import { Colorize as Colorize32, Cylinder as
|
|
4668
|
+
import { Colorize as Colorize32, Cylinder as Cylinder10, Rotate as Rotate11, Sphere as Sphere2, Translate as Translate27 } from "jscad-fiber";
|
|
4664
4669
|
import { Fragment as Fragment61, jsx as jsx65, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
4665
4670
|
var AxialCapacitor = ({ pitch = 10 }) => {
|
|
4666
4671
|
const heightToCenterOfCapacitor = 0.5 + 4 / 2;
|
|
4667
4672
|
return /* @__PURE__ */ jsxs61(Fragment61, { children: [
|
|
4668
|
-
/* @__PURE__ */ jsx65(
|
|
4673
|
+
/* @__PURE__ */ jsx65(Cylinder10, { height: 4, radius: 0.5, center: [-pitch / 2, 0, 0.5] }),
|
|
4669
4674
|
/* @__PURE__ */ jsx65(
|
|
4670
4675
|
Sphere2,
|
|
4671
4676
|
{
|
|
@@ -4675,7 +4680,7 @@ var AxialCapacitor = ({ pitch = 10 }) => {
|
|
|
4675
4680
|
),
|
|
4676
4681
|
/* @__PURE__ */ jsx65(Translate27, { x: -2.5, y: 0, z: heightToCenterOfCapacitor, children: /* @__PURE__ */ jsxs61(Rotate11, { rotation: [0, Math.PI / 2, 0], children: [
|
|
4677
4682
|
/* @__PURE__ */ jsx65(
|
|
4678
|
-
|
|
4683
|
+
Cylinder10,
|
|
4679
4684
|
{
|
|
4680
4685
|
height: pitch,
|
|
4681
4686
|
radius: 0.5,
|
|
@@ -4683,7 +4688,7 @@ var AxialCapacitor = ({ pitch = 10 }) => {
|
|
|
4683
4688
|
}
|
|
4684
4689
|
),
|
|
4685
4690
|
/* @__PURE__ */ jsx65(Colorize32, { color: "#d2b48c", children: /* @__PURE__ */ jsx65(
|
|
4686
|
-
|
|
4691
|
+
Cylinder10,
|
|
4687
4692
|
{
|
|
4688
4693
|
height: 5,
|
|
4689
4694
|
radius: 1.3,
|
|
@@ -4691,13 +4696,13 @@ var AxialCapacitor = ({ pitch = 10 }) => {
|
|
|
4691
4696
|
}
|
|
4692
4697
|
) })
|
|
4693
4698
|
] }) }),
|
|
4694
|
-
/* @__PURE__ */ jsx65(
|
|
4699
|
+
/* @__PURE__ */ jsx65(Cylinder10, { height: 4, radius: 0.5, center: [pitch / 2, 0, 0.5] }),
|
|
4695
4700
|
/* @__PURE__ */ jsx65(Sphere2, { radius: 0.5, center: [pitch / 2, 0, heightToCenterOfCapacitor] })
|
|
4696
4701
|
] });
|
|
4697
4702
|
};
|
|
4698
4703
|
|
|
4699
4704
|
// lib/stampboard.tsx
|
|
4700
|
-
import { Colorize as Colorize33, Cuboid as Cuboid41, Cylinder as
|
|
4705
|
+
import { Colorize as Colorize33, Cuboid as Cuboid41, Cylinder as Cylinder11, Subtract as Subtract6, Union as Union19 } from "jscad-fiber";
|
|
4701
4706
|
import { Fragment as Fragment62, jsx as jsx66, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
4702
4707
|
var StampBoard = ({
|
|
4703
4708
|
bodyWidth = 21,
|
|
@@ -4814,7 +4819,7 @@ var StampBoard = ({
|
|
|
4814
4819
|
))
|
|
4815
4820
|
] }) });
|
|
4816
4821
|
const holePads = innerHoles && holes.map((hole, index) => /* @__PURE__ */ jsx66(
|
|
4817
|
-
|
|
4822
|
+
Cylinder11,
|
|
4818
4823
|
{
|
|
4819
4824
|
color: "black",
|
|
4820
4825
|
center: [hole.x, hole.y, boardCenterZ],
|
|
@@ -4848,7 +4853,7 @@ var StampBoard = ({
|
|
|
4848
4853
|
};
|
|
4849
4854
|
|
|
4850
4855
|
// lib/MountedPcbModule.tsx
|
|
4851
|
-
import { Colorize as Colorize35, Cuboid as Cuboid43, Cylinder as
|
|
4856
|
+
import { Colorize as Colorize35, Cuboid as Cuboid43, Cylinder as Cylinder12, Subtract as Subtract8 } from "jscad-fiber";
|
|
4852
4857
|
|
|
4853
4858
|
// lib/Screen.tsx
|
|
4854
4859
|
import { Colorize as Colorize34, Cuboid as Cuboid42, Subtract as Subtract7, Translate as Translate28 } from "jscad-fiber";
|
|
@@ -5026,7 +5031,7 @@ var MountedPcbModule = ({
|
|
|
5026
5031
|
}
|
|
5027
5032
|
),
|
|
5028
5033
|
holePositions.map((hole, index) => /* @__PURE__ */ jsx68(
|
|
5029
|
-
|
|
5034
|
+
Cylinder12,
|
|
5030
5035
|
{
|
|
5031
5036
|
center: [hole.x, hole.y, boardCenterZ + boardOffsetZ],
|
|
5032
5037
|
radius: od / 2,
|
|
@@ -5035,7 +5040,7 @@ var MountedPcbModule = ({
|
|
|
5035
5040
|
`hole-${index}`
|
|
5036
5041
|
)),
|
|
5037
5042
|
pins.map((pin, index) => /* @__PURE__ */ jsx68(
|
|
5038
|
-
|
|
5043
|
+
Cylinder12,
|
|
5039
5044
|
{
|
|
5040
5045
|
center: [pin.x, pin.y, boardCenterZ + boardOffsetZ],
|
|
5041
5046
|
radius: od / 2,
|
|
@@ -5046,7 +5051,7 @@ var MountedPcbModule = ({
|
|
|
5046
5051
|
] }) });
|
|
5047
5052
|
const platedHoles = pins.map((pin, index) => /* @__PURE__ */ jsx68(Colorize35, { color: "#FFD700", children: /* @__PURE__ */ jsxs64(Subtract8, { children: [
|
|
5048
5053
|
/* @__PURE__ */ jsx68(
|
|
5049
|
-
|
|
5054
|
+
Cylinder12,
|
|
5050
5055
|
{
|
|
5051
5056
|
center: [pin.x, pin.y, boardThickness / 2 + boardOffsetZ],
|
|
5052
5057
|
radius: od / 2,
|
|
@@ -5054,7 +5059,7 @@ var MountedPcbModule = ({
|
|
|
5054
5059
|
}
|
|
5055
5060
|
),
|
|
5056
5061
|
/* @__PURE__ */ jsx68(
|
|
5057
|
-
|
|
5062
|
+
Cylinder12,
|
|
5058
5063
|
{
|
|
5059
5064
|
center: [pin.x, pin.y, boardThickness / 2 + boardOffsetZ],
|
|
5060
5065
|
radius: id / 2,
|
|
@@ -5164,7 +5169,7 @@ var SOD723_default = SOD723;
|
|
|
5164
5169
|
import {
|
|
5165
5170
|
Colorize as Colorize37,
|
|
5166
5171
|
Cuboid as Cuboid45,
|
|
5167
|
-
Cylinder as
|
|
5172
|
+
Cylinder as Cylinder13,
|
|
5168
5173
|
Rotate as Rotate12,
|
|
5169
5174
|
Subtract as Subtract9,
|
|
5170
5175
|
Translate as Translate30
|
|
@@ -5272,7 +5277,7 @@ var JSTZH1_5mm = ({
|
|
|
5272
5277
|
)
|
|
5273
5278
|
] }) }) }) }),
|
|
5274
5279
|
showPins && Array.from({ length: numPins }).map((_, i) => /* @__PURE__ */ jsx70(Colorize37, { color: pinColor, children: /* @__PURE__ */ jsx70(
|
|
5275
|
-
|
|
5280
|
+
Cylinder13,
|
|
5276
5281
|
{
|
|
5277
5282
|
height: pinLength,
|
|
5278
5283
|
radius: 0.35,
|
|
@@ -5323,7 +5328,7 @@ var JSTZH1_5mm = ({
|
|
|
5323
5328
|
import {
|
|
5324
5329
|
Colorize as Colorize38,
|
|
5325
5330
|
Cuboid as Cuboid46,
|
|
5326
|
-
Cylinder as
|
|
5331
|
+
Cylinder as Cylinder14,
|
|
5327
5332
|
Rotate as Rotate13,
|
|
5328
5333
|
Subtract as Subtract10,
|
|
5329
5334
|
Translate as Translate31
|
|
@@ -5439,7 +5444,7 @@ var JSTPH2_0mm = ({
|
|
|
5439
5444
|
}
|
|
5440
5445
|
),
|
|
5441
5446
|
/* @__PURE__ */ jsx71(Translate31, { offset: [-bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(Rotate13, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
|
|
5442
|
-
|
|
5447
|
+
Cylinder14,
|
|
5443
5448
|
{
|
|
5444
5449
|
height: wallThickness * 3,
|
|
5445
5450
|
radius: topReliefWidth / 2
|
|
@@ -5453,7 +5458,7 @@ var JSTPH2_0mm = ({
|
|
|
5453
5458
|
}
|
|
5454
5459
|
),
|
|
5455
5460
|
/* @__PURE__ */ jsx71(Translate31, { offset: [bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(Rotate13, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
|
|
5456
|
-
|
|
5461
|
+
Cylinder14,
|
|
5457
5462
|
{
|
|
5458
5463
|
height: wallThickness * 3,
|
|
5459
5464
|
radius: topReliefWidth / 2
|
|
@@ -5507,17 +5512,148 @@ var JSTPH2_0mm = ({
|
|
|
5507
5512
|
] });
|
|
5508
5513
|
};
|
|
5509
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
|
+
|
|
5510
5646
|
// lib/FPC.tsx
|
|
5511
5647
|
import {
|
|
5512
|
-
Colorize as
|
|
5513
|
-
Cuboid as
|
|
5514
|
-
Cylinder as
|
|
5648
|
+
Colorize as Colorize40,
|
|
5649
|
+
Cuboid as Cuboid48,
|
|
5650
|
+
Cylinder as Cylinder15,
|
|
5515
5651
|
Rotate as Rotate14,
|
|
5516
5652
|
RoundedCuboid as RoundedCuboid3,
|
|
5517
|
-
Subtract as
|
|
5518
|
-
Translate as
|
|
5653
|
+
Subtract as Subtract12,
|
|
5654
|
+
Translate as Translate33
|
|
5519
5655
|
} from "jscad-fiber";
|
|
5520
|
-
import { Fragment as
|
|
5656
|
+
import { Fragment as Fragment68, jsx as jsx73, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
5521
5657
|
var HOUSING_COLOR = "#303339";
|
|
5522
5658
|
var HOUSING_SHADOW = "#1f2227";
|
|
5523
5659
|
var ACTUATOR_COLOR = "#eee8d8";
|
|
@@ -5604,9 +5740,9 @@ var FPC = ({
|
|
|
5604
5740
|
const clipCapX = bodyWidth / 2 - 0.23;
|
|
5605
5741
|
const sideBossX = bodyWidth / 2 - 0.32;
|
|
5606
5742
|
const sideBossWidth = 0.68;
|
|
5607
|
-
return /* @__PURE__ */
|
|
5608
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5609
|
-
|
|
5743
|
+
return /* @__PURE__ */ jsxs69(Fragment68, { children: [
|
|
5744
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx73(
|
|
5745
|
+
Cuboid48,
|
|
5610
5746
|
{
|
|
5611
5747
|
color: TIN_COLOR,
|
|
5612
5748
|
center: [direction * endClipX, mountY, 0.07],
|
|
@@ -5614,8 +5750,8 @@ var FPC = ({
|
|
|
5614
5750
|
},
|
|
5615
5751
|
`mount-pad:${direction}`
|
|
5616
5752
|
)),
|
|
5617
|
-
contactRows.map((contact) => /* @__PURE__ */
|
|
5618
|
-
|
|
5753
|
+
contactRows.map((contact) => /* @__PURE__ */ jsx73(
|
|
5754
|
+
Cuboid48,
|
|
5619
5755
|
{
|
|
5620
5756
|
color: TIN_COLOR,
|
|
5621
5757
|
center: [contact.x, terminalCenterY, 0.065],
|
|
@@ -5623,7 +5759,7 @@ var FPC = ({
|
|
|
5623
5759
|
},
|
|
5624
5760
|
`terminal:${contact.index}`
|
|
5625
5761
|
)),
|
|
5626
|
-
/* @__PURE__ */
|
|
5762
|
+
/* @__PURE__ */ jsx73(
|
|
5627
5763
|
RoundedCuboid3,
|
|
5628
5764
|
{
|
|
5629
5765
|
color: HOUSING_SHADOW,
|
|
@@ -5632,8 +5768,8 @@ var FPC = ({
|
|
|
5632
5768
|
roundRadius: 0.1
|
|
5633
5769
|
}
|
|
5634
5770
|
),
|
|
5635
|
-
/* @__PURE__ */
|
|
5636
|
-
/* @__PURE__ */
|
|
5771
|
+
/* @__PURE__ */ jsx73(Colorize40, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs69(Subtract12, { children: [
|
|
5772
|
+
/* @__PURE__ */ jsx73(
|
|
5637
5773
|
RoundedCuboid3,
|
|
5638
5774
|
{
|
|
5639
5775
|
center: [0, housingCenterY, housingBaseHeight + housingHeight / 2],
|
|
@@ -5641,22 +5777,22 @@ var FPC = ({
|
|
|
5641
5777
|
roundRadius: 0.14
|
|
5642
5778
|
}
|
|
5643
5779
|
),
|
|
5644
|
-
/* @__PURE__ */
|
|
5645
|
-
|
|
5780
|
+
/* @__PURE__ */ jsx73(
|
|
5781
|
+
Cuboid48,
|
|
5646
5782
|
{
|
|
5647
5783
|
center: [0, throatCenterY, throatCenterZ],
|
|
5648
5784
|
size: [openingWidth, throatDepth, throatHeight]
|
|
5649
5785
|
}
|
|
5650
5786
|
),
|
|
5651
|
-
/* @__PURE__ */
|
|
5652
|
-
|
|
5787
|
+
/* @__PURE__ */ jsx73(
|
|
5788
|
+
Cuboid48,
|
|
5653
5789
|
{
|
|
5654
5790
|
center: [0, actuatorCenterY, overallHeight - actuatorHeight * 0.72],
|
|
5655
5791
|
size: [actuatorWidth - 0.32, actuatorDepth - 0.16, actuatorHeight]
|
|
5656
5792
|
}
|
|
5657
5793
|
)
|
|
5658
5794
|
] }) }),
|
|
5659
|
-
contactRows.map((contact) => /* @__PURE__ */
|
|
5795
|
+
contactRows.map((contact) => /* @__PURE__ */ jsx73(
|
|
5660
5796
|
RoundedCuboid3,
|
|
5661
5797
|
{
|
|
5662
5798
|
color: TIN_HIGHLIGHT,
|
|
@@ -5666,8 +5802,8 @@ var FPC = ({
|
|
|
5666
5802
|
},
|
|
5667
5803
|
`spring:${contact.index}`
|
|
5668
5804
|
)),
|
|
5669
|
-
contactRows.map((contact) => /* @__PURE__ */
|
|
5670
|
-
|
|
5805
|
+
contactRows.map((contact) => /* @__PURE__ */ jsx73(
|
|
5806
|
+
Cuboid48,
|
|
5671
5807
|
{
|
|
5672
5808
|
color: TIN_COLOR,
|
|
5673
5809
|
center: [
|
|
@@ -5679,8 +5815,8 @@ var FPC = ({
|
|
|
5679
5815
|
},
|
|
5680
5816
|
`terminal-rise:${contact.index}`
|
|
5681
5817
|
)),
|
|
5682
|
-
/* @__PURE__ */
|
|
5683
|
-
|
|
5818
|
+
/* @__PURE__ */ jsx73(
|
|
5819
|
+
Cuboid48,
|
|
5684
5820
|
{
|
|
5685
5821
|
color: HOUSING_SHADOW,
|
|
5686
5822
|
center: [
|
|
@@ -5691,7 +5827,7 @@ var FPC = ({
|
|
|
5691
5827
|
size: [openingWidth + 0.18, 0.16, 0.8]
|
|
5692
5828
|
}
|
|
5693
5829
|
),
|
|
5694
|
-
/* @__PURE__ */
|
|
5830
|
+
/* @__PURE__ */ jsx73(
|
|
5695
5831
|
RoundedCuboid3,
|
|
5696
5832
|
{
|
|
5697
5833
|
color: ACTUATOR_COLOR,
|
|
@@ -5700,8 +5836,8 @@ var FPC = ({
|
|
|
5700
5836
|
roundRadius: 0.11
|
|
5701
5837
|
}
|
|
5702
5838
|
),
|
|
5703
|
-
/* @__PURE__ */
|
|
5704
|
-
|
|
5839
|
+
/* @__PURE__ */ jsx73(
|
|
5840
|
+
Cuboid48,
|
|
5705
5841
|
{
|
|
5706
5842
|
color: ACTUATOR_HIGHLIGHT,
|
|
5707
5843
|
center: [
|
|
@@ -5712,7 +5848,7 @@ var FPC = ({
|
|
|
5712
5848
|
size: [actuatorWidth - 0.36, 0.24, 0.07]
|
|
5713
5849
|
}
|
|
5714
5850
|
),
|
|
5715
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5851
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx73(
|
|
5716
5852
|
RoundedCuboid3,
|
|
5717
5853
|
{
|
|
5718
5854
|
color: ACTUATOR_COLOR,
|
|
@@ -5722,14 +5858,14 @@ var FPC = ({
|
|
|
5722
5858
|
},
|
|
5723
5859
|
`actuator-ear:${direction}`
|
|
5724
5860
|
)),
|
|
5725
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5726
|
-
|
|
5861
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx73(
|
|
5862
|
+
Translate33,
|
|
5727
5863
|
{
|
|
5728
5864
|
x: direction * sideBossX,
|
|
5729
5865
|
y: hingeY,
|
|
5730
5866
|
z: hingeZ,
|
|
5731
|
-
children: /* @__PURE__ */
|
|
5732
|
-
|
|
5867
|
+
children: /* @__PURE__ */ jsx73(Rotate14, { rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx73(
|
|
5868
|
+
Cylinder15,
|
|
5733
5869
|
{
|
|
5734
5870
|
color: ACTUATOR_HIGHLIGHT,
|
|
5735
5871
|
height: sideBossWidth + 0.12,
|
|
@@ -5739,7 +5875,7 @@ var FPC = ({
|
|
|
5739
5875
|
},
|
|
5740
5876
|
`hinge:${direction}`
|
|
5741
5877
|
)),
|
|
5742
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5878
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx73(
|
|
5743
5879
|
RoundedCuboid3,
|
|
5744
5880
|
{
|
|
5745
5881
|
color: HOLD_DOWN_COLOR,
|
|
@@ -5749,7 +5885,7 @@ var FPC = ({
|
|
|
5749
5885
|
},
|
|
5750
5886
|
`hold-down-wall:${direction}`
|
|
5751
5887
|
)),
|
|
5752
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5888
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx73(
|
|
5753
5889
|
RoundedCuboid3,
|
|
5754
5890
|
{
|
|
5755
5891
|
color: HOLD_DOWN_HIGHLIGHT,
|
|
@@ -5759,16 +5895,16 @@ var FPC = ({
|
|
|
5759
5895
|
},
|
|
5760
5896
|
`hold-down-cap:${direction}`
|
|
5761
5897
|
)),
|
|
5762
|
-
/* @__PURE__ */
|
|
5763
|
-
|
|
5898
|
+
/* @__PURE__ */ jsx73(
|
|
5899
|
+
Cuboid48,
|
|
5764
5900
|
{
|
|
5765
5901
|
color: HOUSING_SHADOW,
|
|
5766
5902
|
center: [0, housingCenterY, 0.025],
|
|
5767
5903
|
size: [openingWidth + 0.7, housingDepth * 0.58, 0.05]
|
|
5768
5904
|
}
|
|
5769
5905
|
),
|
|
5770
|
-
/* @__PURE__ */
|
|
5771
|
-
|
|
5906
|
+
/* @__PURE__ */ jsx73(
|
|
5907
|
+
Cuboid48,
|
|
5772
5908
|
{
|
|
5773
5909
|
color: HOUSING_SHADOW,
|
|
5774
5910
|
center: [
|
|
@@ -5783,8 +5919,8 @@ var FPC = ({
|
|
|
5783
5919
|
};
|
|
5784
5920
|
|
|
5785
5921
|
// lib/SmdPinHeader.tsx
|
|
5786
|
-
import { Colorize as
|
|
5787
|
-
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";
|
|
5788
5924
|
var SmdPinHeader = ({
|
|
5789
5925
|
numberOfPins,
|
|
5790
5926
|
pitch = 2.54,
|
|
@@ -5799,52 +5935,52 @@ var SmdPinHeader = ({
|
|
|
5799
5935
|
const bodyTop = standoffHeight + bodyHeight;
|
|
5800
5936
|
const tailLength = tailSpan / 2;
|
|
5801
5937
|
const tipChamferHeight = pinThickness * 0.35;
|
|
5802
|
-
return /* @__PURE__ */
|
|
5938
|
+
return /* @__PURE__ */ jsx74(Fragment69, { children: Array.from({ length: numberOfPins }, (_, index) => {
|
|
5803
5939
|
const x = xStart + index * pitch;
|
|
5804
5940
|
const tailDirection = index % 2 === 0 ? 1 : -1;
|
|
5805
5941
|
const postBodyLength = matingPinLength - tipChamferHeight;
|
|
5806
5942
|
const verticalTailLength = standoffHeight - pinThickness / 2;
|
|
5807
|
-
return /* @__PURE__ */
|
|
5808
|
-
/* @__PURE__ */
|
|
5809
|
-
|
|
5943
|
+
return /* @__PURE__ */ jsxs70(Translate34, { x, children: [
|
|
5944
|
+
/* @__PURE__ */ jsx74(
|
|
5945
|
+
Cuboid49,
|
|
5810
5946
|
{
|
|
5811
5947
|
color: "#222",
|
|
5812
5948
|
size: [pitch, bodyWidth, bodyHeight],
|
|
5813
5949
|
center: [0, 0, standoffHeight + bodyHeight / 2]
|
|
5814
5950
|
}
|
|
5815
5951
|
),
|
|
5816
|
-
/* @__PURE__ */
|
|
5817
|
-
/* @__PURE__ */
|
|
5818
|
-
|
|
5952
|
+
/* @__PURE__ */ jsxs70(Colorize41, { color: "#d4af37", children: [
|
|
5953
|
+
/* @__PURE__ */ jsx74(
|
|
5954
|
+
Cuboid49,
|
|
5819
5955
|
{
|
|
5820
5956
|
size: [pinThickness, tailLength, pinThickness],
|
|
5821
5957
|
center: [0, tailDirection * (tailLength / 2), pinThickness / 2]
|
|
5822
5958
|
}
|
|
5823
5959
|
),
|
|
5824
|
-
/* @__PURE__ */
|
|
5825
|
-
|
|
5960
|
+
/* @__PURE__ */ jsx74(
|
|
5961
|
+
Cuboid49,
|
|
5826
5962
|
{
|
|
5827
5963
|
size: [pinThickness, pinThickness, verticalTailLength],
|
|
5828
5964
|
center: [0, 0, pinThickness / 2 + verticalTailLength / 2]
|
|
5829
5965
|
}
|
|
5830
5966
|
),
|
|
5831
|
-
/* @__PURE__ */
|
|
5832
|
-
|
|
5967
|
+
/* @__PURE__ */ jsx74(
|
|
5968
|
+
Cuboid49,
|
|
5833
5969
|
{
|
|
5834
5970
|
size: [pinThickness, pinThickness, postBodyLength],
|
|
5835
5971
|
center: [0, 0, bodyTop + postBodyLength / 2]
|
|
5836
5972
|
}
|
|
5837
5973
|
),
|
|
5838
|
-
/* @__PURE__ */
|
|
5839
|
-
/* @__PURE__ */
|
|
5840
|
-
|
|
5974
|
+
/* @__PURE__ */ jsxs70(Hull24, { children: [
|
|
5975
|
+
/* @__PURE__ */ jsx74(
|
|
5976
|
+
Cuboid49,
|
|
5841
5977
|
{
|
|
5842
5978
|
size: [pinThickness, pinThickness, 0.01],
|
|
5843
5979
|
center: [0, 0, bodyTop + postBodyLength]
|
|
5844
5980
|
}
|
|
5845
5981
|
),
|
|
5846
|
-
/* @__PURE__ */
|
|
5847
|
-
|
|
5982
|
+
/* @__PURE__ */ jsx74(
|
|
5983
|
+
Cuboid49,
|
|
5848
5984
|
{
|
|
5849
5985
|
size: [pinThickness * 0.65, pinThickness * 0.65, 0.01],
|
|
5850
5986
|
center: [0, 0, bodyTop + matingPinLength]
|
|
@@ -5860,9 +5996,9 @@ var SmdPinHeader = ({
|
|
|
5860
5996
|
import { mm } from "@tscircuit/mm";
|
|
5861
5997
|
|
|
5862
5998
|
// lib/utils/getPlatedHoleCenters.ts
|
|
5863
|
-
import { fp as
|
|
5999
|
+
import { fp as fp4 } from "@tscircuit/footprinter";
|
|
5864
6000
|
var getPlatedHoleCenters = (footprint) => {
|
|
5865
|
-
const elements =
|
|
6001
|
+
const elements = fp4.string(footprint).circuitJson();
|
|
5866
6002
|
return elements.filter(
|
|
5867
6003
|
(element) => element.type === "pcb_plated_hole" && Number.isFinite(element.x) && Number.isFinite(element.y)
|
|
5868
6004
|
).map((element) => ({
|
|
@@ -5873,9 +6009,9 @@ var getPlatedHoleCenters = (footprint) => {
|
|
|
5873
6009
|
};
|
|
5874
6010
|
|
|
5875
6011
|
// lib/utils/getSmtPadRects.ts
|
|
5876
|
-
import { fp as
|
|
6012
|
+
import { fp as fp5 } from "@tscircuit/footprinter";
|
|
5877
6013
|
var getSmtPadRects = (footprint) => {
|
|
5878
|
-
const elements =
|
|
6014
|
+
const elements = fp5.string(footprint).circuitJson();
|
|
5879
6015
|
return elements.filter(
|
|
5880
6016
|
(element) => element.type === "pcb_smtpad" && element.shape === "rect" && Number.isFinite(element.x) && Number.isFinite(element.y)
|
|
5881
6017
|
).map((element) => ({
|
|
@@ -5888,7 +6024,7 @@ var getSmtPadRects = (footprint) => {
|
|
|
5888
6024
|
};
|
|
5889
6025
|
|
|
5890
6026
|
// lib/GullWingBody.tsx
|
|
5891
|
-
import { Fragment as
|
|
6027
|
+
import { Fragment as Fragment70, jsx as jsx75, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
5892
6028
|
var GullWingBody = ({
|
|
5893
6029
|
bodyWidth,
|
|
5894
6030
|
bodyLength: bodyLength10,
|
|
@@ -5900,8 +6036,8 @@ var GullWingBody = ({
|
|
|
5900
6036
|
const centerX = pads.reduce((sum, pad) => sum + pad.x, 0) / (pads.length || 1);
|
|
5901
6037
|
const centerY = pads.reduce((sum, pad) => sum + pad.y, 0) / (pads.length || 1);
|
|
5902
6038
|
const leadHeight = bodyHeight * leadHeightRatio;
|
|
5903
|
-
return /* @__PURE__ */
|
|
5904
|
-
/* @__PURE__ */
|
|
6039
|
+
return /* @__PURE__ */ jsxs71(Fragment70, { children: [
|
|
6040
|
+
/* @__PURE__ */ jsx75(
|
|
5905
6041
|
ChipBody,
|
|
5906
6042
|
{
|
|
5907
6043
|
center: { x: centerX, y: centerY, z: 0 },
|
|
@@ -5917,7 +6053,7 @@ var GullWingBody = ({
|
|
|
5917
6053
|
const outerX = pad.x + side * padWidth / 2;
|
|
5918
6054
|
const run = Math.max(Math.abs(outerX - centerX) - bodyWidth / 2, 0.1);
|
|
5919
6055
|
const overlap = Math.min(0.15, bodyWidth * 0.15);
|
|
5920
|
-
return /* @__PURE__ */
|
|
6056
|
+
return /* @__PURE__ */ jsx75(
|
|
5921
6057
|
SmdChipLead,
|
|
5922
6058
|
{
|
|
5923
6059
|
rotation: side > 0 ? Math.PI : 0,
|
|
@@ -5939,8 +6075,8 @@ var GullWingBody = ({
|
|
|
5939
6075
|
};
|
|
5940
6076
|
|
|
5941
6077
|
// lib/ParametricChip.tsx
|
|
5942
|
-
import { Cuboid as
|
|
5943
|
-
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";
|
|
5944
6080
|
var ParametricChip = ({
|
|
5945
6081
|
padPitch,
|
|
5946
6082
|
padHeight,
|
|
@@ -5951,25 +6087,25 @@ var ParametricChip = ({
|
|
|
5951
6087
|
const height10 = width10;
|
|
5952
6088
|
const terminatorWidth9 = fullLength10 * 0.2;
|
|
5953
6089
|
const bodyLength10 = fullLength10 - terminatorWidth9 * 2;
|
|
5954
|
-
return /* @__PURE__ */
|
|
5955
|
-
/* @__PURE__ */
|
|
5956
|
-
|
|
6090
|
+
return /* @__PURE__ */ jsxs72(Fragment71, { children: [
|
|
6091
|
+
/* @__PURE__ */ jsx76(
|
|
6092
|
+
Cuboid50,
|
|
5957
6093
|
{
|
|
5958
6094
|
size: [bodyLength10, width10, height10],
|
|
5959
6095
|
offset: [0, 0, height10 / 2],
|
|
5960
6096
|
color
|
|
5961
6097
|
}
|
|
5962
6098
|
),
|
|
5963
|
-
/* @__PURE__ */
|
|
5964
|
-
|
|
6099
|
+
/* @__PURE__ */ jsx76(
|
|
6100
|
+
Cuboid50,
|
|
5965
6101
|
{
|
|
5966
6102
|
size: [terminatorWidth9, height10, width10],
|
|
5967
6103
|
offset: [fullLength10 / 2 - terminatorWidth9 / 2, 0, height10 / 2],
|
|
5968
6104
|
color: "#ccc"
|
|
5969
6105
|
}
|
|
5970
6106
|
),
|
|
5971
|
-
/* @__PURE__ */
|
|
5972
|
-
|
|
6107
|
+
/* @__PURE__ */ jsx76(
|
|
6108
|
+
Cuboid50,
|
|
5973
6109
|
{
|
|
5974
6110
|
size: [terminatorWidth9, height10, width10],
|
|
5975
6111
|
offset: [-fullLength10 / 2 + terminatorWidth9 / 2, 0, height10 / 2],
|
|
@@ -5981,14 +6117,14 @@ var ParametricChip = ({
|
|
|
5981
6117
|
|
|
5982
6118
|
// lib/Led5050.tsx
|
|
5983
6119
|
import {
|
|
5984
|
-
Colorize as
|
|
5985
|
-
Cuboid as
|
|
5986
|
-
Cylinder as
|
|
6120
|
+
Colorize as Colorize42,
|
|
6121
|
+
Cuboid as Cuboid51,
|
|
6122
|
+
Cylinder as Cylinder16,
|
|
5987
6123
|
Rotate as Rotate15,
|
|
5988
|
-
Subtract as
|
|
5989
|
-
Translate as
|
|
6124
|
+
Subtract as Subtract13,
|
|
6125
|
+
Translate as Translate35
|
|
5990
6126
|
} from "jscad-fiber";
|
|
5991
|
-
import { Fragment as
|
|
6127
|
+
import { Fragment as Fragment72, jsx as jsx77, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
5992
6128
|
var Led5050 = ({
|
|
5993
6129
|
color = "#ffff00",
|
|
5994
6130
|
bodyColor = "#ffffff",
|
|
@@ -6009,10 +6145,10 @@ var Led5050 = ({
|
|
|
6009
6145
|
const cornerCutDepth = 0.3;
|
|
6010
6146
|
const leadYPositions = [-1.7, 0, 1.7];
|
|
6011
6147
|
const leadSides = [-1, 1];
|
|
6012
|
-
return /* @__PURE__ */
|
|
6148
|
+
return /* @__PURE__ */ jsxs73(Fragment72, { children: [
|
|
6013
6149
|
leadYPositions.flatMap(
|
|
6014
|
-
(y) => leadSides.map((side) => /* @__PURE__ */
|
|
6015
|
-
|
|
6150
|
+
(y) => leadSides.map((side) => /* @__PURE__ */ jsx77(
|
|
6151
|
+
Cuboid51,
|
|
6016
6152
|
{
|
|
6017
6153
|
color: leadColor,
|
|
6018
6154
|
size: [leadLength, leadWidth, leadThickness],
|
|
@@ -6021,8 +6157,8 @@ var Led5050 = ({
|
|
|
6021
6157
|
`${side}-${y}`
|
|
6022
6158
|
))
|
|
6023
6159
|
),
|
|
6024
|
-
/* @__PURE__ */
|
|
6025
|
-
/* @__PURE__ */
|
|
6160
|
+
/* @__PURE__ */ jsx77(Colorize42, { color: bodyColor, children: /* @__PURE__ */ jsxs73(Subtract13, { children: [
|
|
6161
|
+
/* @__PURE__ */ jsx77(
|
|
6026
6162
|
ChipBody,
|
|
6027
6163
|
{
|
|
6028
6164
|
width: bodySize,
|
|
@@ -6036,28 +6172,28 @@ var Led5050 = ({
|
|
|
6036
6172
|
includeNotch: false
|
|
6037
6173
|
}
|
|
6038
6174
|
),
|
|
6039
|
-
/* @__PURE__ */
|
|
6040
|
-
|
|
6175
|
+
/* @__PURE__ */ jsx77(
|
|
6176
|
+
Cylinder16,
|
|
6041
6177
|
{
|
|
6042
6178
|
radius: lensRadius,
|
|
6043
6179
|
height: lensHeight,
|
|
6044
6180
|
center: [0, 0, bodyTop - lensHeight / 2]
|
|
6045
6181
|
}
|
|
6046
6182
|
),
|
|
6047
|
-
/* @__PURE__ */
|
|
6048
|
-
|
|
6183
|
+
/* @__PURE__ */ jsx77(
|
|
6184
|
+
Translate35,
|
|
6049
6185
|
{
|
|
6050
6186
|
offset: [
|
|
6051
6187
|
-bodySize / 2,
|
|
6052
6188
|
bodySize / 2,
|
|
6053
6189
|
bodyTop - cornerCutDepth / 2 + 5e-3
|
|
6054
6190
|
],
|
|
6055
|
-
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] }) })
|
|
6056
6192
|
}
|
|
6057
6193
|
)
|
|
6058
6194
|
] }) }),
|
|
6059
|
-
/* @__PURE__ */
|
|
6060
|
-
|
|
6195
|
+
/* @__PURE__ */ jsx77(
|
|
6196
|
+
Cylinder16,
|
|
6061
6197
|
{
|
|
6062
6198
|
color,
|
|
6063
6199
|
radius: lensRadius,
|
|
@@ -6069,8 +6205,8 @@ var Led5050 = ({
|
|
|
6069
6205
|
};
|
|
6070
6206
|
|
|
6071
6207
|
// lib/Led2835.tsx
|
|
6072
|
-
import { Colorize as
|
|
6073
|
-
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";
|
|
6074
6210
|
var Led2835 = ({
|
|
6075
6211
|
bodyWidth = 3.5,
|
|
6076
6212
|
bodyLength: bodyLength10 = 2.8,
|
|
@@ -6089,26 +6225,26 @@ var Led2835 = ({
|
|
|
6089
6225
|
const bodyCenterX = (pad1X + pad2X) / 2;
|
|
6090
6226
|
const lensWidth = bodyWidth * 0.55;
|
|
6091
6227
|
const lensLength = bodyLength10 * 0.55;
|
|
6092
|
-
return /* @__PURE__ */
|
|
6228
|
+
return /* @__PURE__ */ jsxs74(Fragment73, { children: [
|
|
6093
6229
|
[
|
|
6094
6230
|
{ x: pad1X, w: pad1Width, key: "pad-1" },
|
|
6095
6231
|
{ x: pad2X, w: pad2Width, key: "pad-2" }
|
|
6096
|
-
].map(({ x, w, key }) => /* @__PURE__ */
|
|
6097
|
-
|
|
6232
|
+
].map(({ x, w, key }) => /* @__PURE__ */ jsx78(Colorize43, { color: padColor, children: /* @__PURE__ */ jsx78(
|
|
6233
|
+
Cuboid52,
|
|
6098
6234
|
{
|
|
6099
6235
|
size: [w, padLength, padThickness],
|
|
6100
6236
|
center: [x, 0, padThickness / 2]
|
|
6101
6237
|
}
|
|
6102
6238
|
) }, key)),
|
|
6103
|
-
/* @__PURE__ */
|
|
6104
|
-
|
|
6239
|
+
/* @__PURE__ */ jsx78(Colorize43, { color: bodyColor, children: /* @__PURE__ */ jsx78(
|
|
6240
|
+
Cuboid52,
|
|
6105
6241
|
{
|
|
6106
6242
|
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6107
6243
|
center: [bodyCenterX, 0, padThickness + bodyHeight / 2]
|
|
6108
6244
|
}
|
|
6109
6245
|
) }),
|
|
6110
|
-
/* @__PURE__ */
|
|
6111
|
-
|
|
6246
|
+
/* @__PURE__ */ jsx78(Colorize43, { color, children: /* @__PURE__ */ jsx78(
|
|
6247
|
+
Cuboid52,
|
|
6112
6248
|
{
|
|
6113
6249
|
size: [lensWidth, lensLength, lensHeight],
|
|
6114
6250
|
center: [
|
|
@@ -6123,15 +6259,15 @@ var Led2835 = ({
|
|
|
6123
6259
|
|
|
6124
6260
|
// lib/RJ45.tsx
|
|
6125
6261
|
import {
|
|
6126
|
-
Colorize as
|
|
6127
|
-
Cuboid as
|
|
6128
|
-
Cylinder as
|
|
6262
|
+
Colorize as Colorize44,
|
|
6263
|
+
Cuboid as Cuboid53,
|
|
6264
|
+
Cylinder as Cylinder17,
|
|
6129
6265
|
Rotate as Rotate16,
|
|
6130
6266
|
RoundedCuboid as RoundedCuboid4,
|
|
6131
|
-
Subtract as
|
|
6132
|
-
Translate as
|
|
6267
|
+
Subtract as Subtract14,
|
|
6268
|
+
Translate as Translate36
|
|
6133
6269
|
} from "jscad-fiber";
|
|
6134
|
-
import { Fragment as
|
|
6270
|
+
import { Fragment as Fragment74, jsx as jsx79, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
6135
6271
|
var range2 = (length) => Array.from({ length }, (_, index) => index);
|
|
6136
6272
|
var RJ45 = ({
|
|
6137
6273
|
bodyWidth = 16.26,
|
|
@@ -6189,18 +6325,18 @@ var RJ45 = ({
|
|
|
6189
6325
|
const contactY = frontY - frontDirection * Math.max(cavityDepth * 0.48, 1.2);
|
|
6190
6326
|
const contactZ = openingCenterZ + openingHeight * 0.18;
|
|
6191
6327
|
const frontLipY = frontY + frontDirection * shellThickness * 0.2;
|
|
6192
|
-
return /* @__PURE__ */
|
|
6193
|
-
/* @__PURE__ */
|
|
6194
|
-
/* @__PURE__ */
|
|
6195
|
-
/* @__PURE__ */
|
|
6196
|
-
|
|
6328
|
+
return /* @__PURE__ */ jsxs75(Fragment74, { children: [
|
|
6329
|
+
/* @__PURE__ */ jsxs75(Colorize44, { color: shellColor, children: [
|
|
6330
|
+
/* @__PURE__ */ jsxs75(Subtract14, { children: [
|
|
6331
|
+
/* @__PURE__ */ jsx79(
|
|
6332
|
+
Cuboid53,
|
|
6197
6333
|
{
|
|
6198
6334
|
center: [0, bodyCenterY, bodyHeight / 2],
|
|
6199
6335
|
size: [bodyWidth, bodyDepth, bodyHeight]
|
|
6200
6336
|
}
|
|
6201
6337
|
),
|
|
6202
|
-
/* @__PURE__ */
|
|
6203
|
-
|
|
6338
|
+
/* @__PURE__ */ jsx79(
|
|
6339
|
+
Cuboid53,
|
|
6204
6340
|
{
|
|
6205
6341
|
center: [0, cavityCenterY, openingCenterZ],
|
|
6206
6342
|
size: [
|
|
@@ -6211,15 +6347,15 @@ var RJ45 = ({
|
|
|
6211
6347
|
}
|
|
6212
6348
|
)
|
|
6213
6349
|
] }),
|
|
6214
|
-
/* @__PURE__ */
|
|
6215
|
-
|
|
6350
|
+
/* @__PURE__ */ jsx79(
|
|
6351
|
+
Cuboid53,
|
|
6216
6352
|
{
|
|
6217
6353
|
center: [0, frontLipY, 0.72],
|
|
6218
6354
|
size: [openingWidth + 0.5, shellThickness * 1.25, 1.05]
|
|
6219
6355
|
}
|
|
6220
6356
|
),
|
|
6221
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
6222
|
-
|
|
6357
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx79(
|
|
6358
|
+
Cuboid53,
|
|
6223
6359
|
{
|
|
6224
6360
|
center: [direction * shieldPinX, shieldPinY, 0.25],
|
|
6225
6361
|
size: [
|
|
@@ -6230,8 +6366,8 @@ var RJ45 = ({
|
|
|
6230
6366
|
},
|
|
6231
6367
|
`shield-tab:${direction}`
|
|
6232
6368
|
)),
|
|
6233
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
6234
|
-
|
|
6369
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx79(
|
|
6370
|
+
Cuboid53,
|
|
6235
6371
|
{
|
|
6236
6372
|
center: [
|
|
6237
6373
|
direction * bodyWidth * 0.24,
|
|
@@ -6243,9 +6379,9 @@ var RJ45 = ({
|
|
|
6243
6379
|
`top-seam:${direction}`
|
|
6244
6380
|
))
|
|
6245
6381
|
] }),
|
|
6246
|
-
/* @__PURE__ */
|
|
6247
|
-
/* @__PURE__ */
|
|
6248
|
-
/* @__PURE__ */
|
|
6382
|
+
/* @__PURE__ */ jsxs75(Colorize44, { color: housingColor, children: [
|
|
6383
|
+
/* @__PURE__ */ jsxs75(Subtract14, { children: [
|
|
6384
|
+
/* @__PURE__ */ jsx79(
|
|
6249
6385
|
RoundedCuboid4,
|
|
6250
6386
|
{
|
|
6251
6387
|
center: [0, cavityCenterY, openingCenterZ],
|
|
@@ -6257,8 +6393,8 @@ var RJ45 = ({
|
|
|
6257
6393
|
roundRadius: 0.22
|
|
6258
6394
|
}
|
|
6259
6395
|
),
|
|
6260
|
-
/* @__PURE__ */
|
|
6261
|
-
|
|
6396
|
+
/* @__PURE__ */ jsx79(
|
|
6397
|
+
Cuboid53,
|
|
6262
6398
|
{
|
|
6263
6399
|
center: [
|
|
6264
6400
|
0,
|
|
@@ -6273,14 +6409,14 @@ var RJ45 = ({
|
|
|
6273
6409
|
}
|
|
6274
6410
|
)
|
|
6275
6411
|
] }),
|
|
6276
|
-
/* @__PURE__ */
|
|
6277
|
-
|
|
6412
|
+
/* @__PURE__ */ jsx79(
|
|
6413
|
+
Cuboid53,
|
|
6278
6414
|
{
|
|
6279
6415
|
center: [0, backWallY, openingCenterZ],
|
|
6280
6416
|
size: [openingWidth - 1.15, shellThickness, openingHeight - 1.25]
|
|
6281
6417
|
}
|
|
6282
6418
|
),
|
|
6283
|
-
/* @__PURE__ */
|
|
6419
|
+
/* @__PURE__ */ jsx79(
|
|
6284
6420
|
RoundedCuboid4,
|
|
6285
6421
|
{
|
|
6286
6422
|
center: [0, frontY - frontDirection * cavityDepth * 0.28, 1.55],
|
|
@@ -6288,8 +6424,8 @@ var RJ45 = ({
|
|
|
6288
6424
|
roundRadius: 0.16
|
|
6289
6425
|
}
|
|
6290
6426
|
),
|
|
6291
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
6292
|
-
|
|
6427
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx79(
|
|
6428
|
+
Cylinder17,
|
|
6293
6429
|
{
|
|
6294
6430
|
center: [direction * locatorHoleX, locatorHoleY, -0.25],
|
|
6295
6431
|
radius: Math.max(locatorHoleDiameter * 0.41, 0.65),
|
|
@@ -6298,9 +6434,9 @@ var RJ45 = ({
|
|
|
6298
6434
|
`locator:${direction}`
|
|
6299
6435
|
))
|
|
6300
6436
|
] }),
|
|
6301
|
-
/* @__PURE__ */
|
|
6302
|
-
signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */
|
|
6303
|
-
|
|
6437
|
+
/* @__PURE__ */ jsxs75(Colorize44, { color: contactColor, children: [
|
|
6438
|
+
signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx79(
|
|
6439
|
+
Cylinder17,
|
|
6304
6440
|
{
|
|
6305
6441
|
center: [x, y, 0.15],
|
|
6306
6442
|
radius: signalLeadRadius,
|
|
@@ -6308,15 +6444,15 @@ var RJ45 = ({
|
|
|
6308
6444
|
},
|
|
6309
6445
|
`signal-lead:${index}`
|
|
6310
6446
|
)),
|
|
6311
|
-
range2(8).map((index) => /* @__PURE__ */
|
|
6312
|
-
|
|
6447
|
+
range2(8).map((index) => /* @__PURE__ */ jsx79(
|
|
6448
|
+
Translate36,
|
|
6313
6449
|
{
|
|
6314
6450
|
offset: [
|
|
6315
6451
|
(index - 3.5) * contactPitch,
|
|
6316
6452
|
contactY,
|
|
6317
6453
|
contactZ + (index % 2 === 0 ? 0.03 : -0.03)
|
|
6318
6454
|
],
|
|
6319
|
-
children: /* @__PURE__ */
|
|
6455
|
+
children: /* @__PURE__ */ jsx79(Rotate16, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx79(
|
|
6320
6456
|
RoundedCuboid4,
|
|
6321
6457
|
{
|
|
6322
6458
|
size: [Math.max(contactPitch * 0.28, 0.28), 3.25, 0.16],
|
|
@@ -6326,8 +6462,8 @@ var RJ45 = ({
|
|
|
6326
6462
|
},
|
|
6327
6463
|
`socket-contact:${index}`
|
|
6328
6464
|
)),
|
|
6329
|
-
ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */
|
|
6330
|
-
|
|
6465
|
+
ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx79(
|
|
6466
|
+
Cylinder17,
|
|
6331
6467
|
{
|
|
6332
6468
|
center: [x, ledPinY, 0.15],
|
|
6333
6469
|
radius: signalLeadRadius,
|
|
@@ -6336,8 +6472,8 @@ var RJ45 = ({
|
|
|
6336
6472
|
`led-lead:${index}`
|
|
6337
6473
|
))
|
|
6338
6474
|
] }),
|
|
6339
|
-
ledPins && /* @__PURE__ */
|
|
6340
|
-
/* @__PURE__ */
|
|
6475
|
+
ledPins && /* @__PURE__ */ jsxs75(Fragment74, { children: [
|
|
6476
|
+
/* @__PURE__ */ jsx79(
|
|
6341
6477
|
RoundedCuboid4,
|
|
6342
6478
|
{
|
|
6343
6479
|
color: "#73b744",
|
|
@@ -6350,7 +6486,7 @@ var RJ45 = ({
|
|
|
6350
6486
|
roundRadius: 0.18
|
|
6351
6487
|
}
|
|
6352
6488
|
),
|
|
6353
|
-
/* @__PURE__ */
|
|
6489
|
+
/* @__PURE__ */ jsx79(
|
|
6354
6490
|
RoundedCuboid4,
|
|
6355
6491
|
{
|
|
6356
6492
|
color: "#e0aa35",
|
|
@@ -6368,8 +6504,8 @@ var RJ45 = ({
|
|
|
6368
6504
|
};
|
|
6369
6505
|
|
|
6370
6506
|
// lib/DPAK.tsx
|
|
6371
|
-
import { Colorize as
|
|
6372
|
-
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";
|
|
6373
6509
|
var DPAK = ({
|
|
6374
6510
|
bodyWidth = 6.1,
|
|
6375
6511
|
bodyLength: bodyLength10 = 6.5,
|
|
@@ -6391,25 +6527,25 @@ var DPAK = ({
|
|
|
6391
6527
|
const bodyFrontX = bodyCenterX - bodyWidth / 2;
|
|
6392
6528
|
const leadZ = tabThickness / 2;
|
|
6393
6529
|
const leadThickness = 0.4;
|
|
6394
|
-
return /* @__PURE__ */
|
|
6395
|
-
/* @__PURE__ */
|
|
6396
|
-
|
|
6530
|
+
return /* @__PURE__ */ jsxs76(Fragment75, { children: [
|
|
6531
|
+
/* @__PURE__ */ jsx80(Colorize45, { color: tabColor, children: /* @__PURE__ */ jsx80(
|
|
6532
|
+
Cuboid54,
|
|
6397
6533
|
{
|
|
6398
6534
|
size: [tabWidth, tabLength, tabThickness],
|
|
6399
6535
|
center: [tabCenterX, 0, tabThickness / 2]
|
|
6400
6536
|
}
|
|
6401
6537
|
) }),
|
|
6402
|
-
/* @__PURE__ */
|
|
6403
|
-
|
|
6538
|
+
/* @__PURE__ */ jsx80(Colorize45, { color, children: /* @__PURE__ */ jsx80(
|
|
6539
|
+
Cuboid54,
|
|
6404
6540
|
{
|
|
6405
6541
|
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6406
6542
|
center: [bodyCenterX, 0, tabThickness + bodyHeight / 2]
|
|
6407
6543
|
}
|
|
6408
6544
|
) }),
|
|
6409
6545
|
[-1, 1].map((side) => {
|
|
6410
|
-
return /* @__PURE__ */
|
|
6411
|
-
/* @__PURE__ */
|
|
6412
|
-
|
|
6546
|
+
return /* @__PURE__ */ jsxs76(Colorize45, { color: leadColor, children: [
|
|
6547
|
+
/* @__PURE__ */ jsx80(
|
|
6548
|
+
Cuboid54,
|
|
6413
6549
|
{
|
|
6414
6550
|
size: [leadContactLength, leadWidth, leadThickness],
|
|
6415
6551
|
center: [
|
|
@@ -6419,9 +6555,9 @@ var DPAK = ({
|
|
|
6419
6555
|
]
|
|
6420
6556
|
}
|
|
6421
6557
|
),
|
|
6422
|
-
/* @__PURE__ */
|
|
6423
|
-
/* @__PURE__ */
|
|
6424
|
-
|
|
6558
|
+
/* @__PURE__ */ jsxs76(Hull25, { children: [
|
|
6559
|
+
/* @__PURE__ */ jsx80(
|
|
6560
|
+
Cuboid54,
|
|
6425
6561
|
{
|
|
6426
6562
|
size: [0.1, leadWidth, leadThickness],
|
|
6427
6563
|
center: [
|
|
@@ -6431,8 +6567,8 @@ var DPAK = ({
|
|
|
6431
6567
|
]
|
|
6432
6568
|
}
|
|
6433
6569
|
),
|
|
6434
|
-
/* @__PURE__ */
|
|
6435
|
-
|
|
6570
|
+
/* @__PURE__ */ jsx80(
|
|
6571
|
+
Cuboid54,
|
|
6436
6572
|
{
|
|
6437
6573
|
size: [0.1, leadWidth, leadThickness],
|
|
6438
6574
|
center: [bodyFrontX, side * pitch, leadZ + tabThickness / 2]
|
|
@@ -6446,13 +6582,13 @@ var DPAK = ({
|
|
|
6446
6582
|
|
|
6447
6583
|
// lib/ElectrolyticCapacitor.tsx
|
|
6448
6584
|
import {
|
|
6449
|
-
Colorize as
|
|
6450
|
-
Cuboid as
|
|
6451
|
-
Cylinder as
|
|
6585
|
+
Colorize as Colorize46,
|
|
6586
|
+
Cuboid as Cuboid55,
|
|
6587
|
+
Cylinder as Cylinder18,
|
|
6452
6588
|
RoundedCylinder as RoundedCylinder5,
|
|
6453
|
-
Subtract as
|
|
6589
|
+
Subtract as Subtract15
|
|
6454
6590
|
} from "jscad-fiber";
|
|
6455
|
-
import { Fragment as
|
|
6591
|
+
import { Fragment as Fragment76, jsx as jsx81, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
6456
6592
|
var ElectrolyticCapacitor = ({
|
|
6457
6593
|
diameter = 6.3,
|
|
6458
6594
|
heightToDiameterRatio = 1.4,
|
|
@@ -6470,17 +6606,17 @@ var ElectrolyticCapacitor = ({
|
|
|
6470
6606
|
const canTop = canBottom + canHeight;
|
|
6471
6607
|
const grooveWidth = Math.max(diameter * 0.06, 0.2);
|
|
6472
6608
|
const grooveDepth = 0.3;
|
|
6473
|
-
return /* @__PURE__ */
|
|
6474
|
-
/* @__PURE__ */
|
|
6475
|
-
|
|
6609
|
+
return /* @__PURE__ */ jsxs77(Fragment76, { children: [
|
|
6610
|
+
/* @__PURE__ */ jsx81(Colorize46, { color: baseColor, children: /* @__PURE__ */ jsx81(
|
|
6611
|
+
Cylinder18,
|
|
6476
6612
|
{
|
|
6477
6613
|
radius: radius - 0.05,
|
|
6478
6614
|
height: baseHeight,
|
|
6479
6615
|
center: [0, 0, baseHeight / 2]
|
|
6480
6616
|
}
|
|
6481
6617
|
) }),
|
|
6482
|
-
/* @__PURE__ */
|
|
6483
|
-
/* @__PURE__ */
|
|
6618
|
+
/* @__PURE__ */ jsx81(Colorize46, { color: sleeveColor, children: /* @__PURE__ */ jsxs77(Subtract15, { children: [
|
|
6619
|
+
/* @__PURE__ */ jsx81(
|
|
6484
6620
|
RoundedCylinder5,
|
|
6485
6621
|
{
|
|
6486
6622
|
radius,
|
|
@@ -6489,23 +6625,23 @@ var ElectrolyticCapacitor = ({
|
|
|
6489
6625
|
center: [0, 0, canBottom + canHeight / 2]
|
|
6490
6626
|
}
|
|
6491
6627
|
),
|
|
6492
|
-
/* @__PURE__ */
|
|
6493
|
-
|
|
6628
|
+
/* @__PURE__ */ jsx81(
|
|
6629
|
+
Cuboid55,
|
|
6494
6630
|
{
|
|
6495
6631
|
size: [diameter, grooveWidth, grooveDepth * 2],
|
|
6496
6632
|
center: [0, 0, canTop]
|
|
6497
6633
|
}
|
|
6498
6634
|
),
|
|
6499
|
-
/* @__PURE__ */
|
|
6500
|
-
|
|
6635
|
+
/* @__PURE__ */ jsx81(
|
|
6636
|
+
Cuboid55,
|
|
6501
6637
|
{
|
|
6502
6638
|
size: [grooveWidth, diameter, grooveDepth * 2],
|
|
6503
6639
|
center: [0, 0, canTop]
|
|
6504
6640
|
}
|
|
6505
6641
|
)
|
|
6506
6642
|
] }) }),
|
|
6507
|
-
[-1, 1].map((side) => /* @__PURE__ */
|
|
6508
|
-
|
|
6643
|
+
[-1, 1].map((side) => /* @__PURE__ */ jsx81(Colorize46, { color: "#c0c0c0", children: /* @__PURE__ */ jsx81(
|
|
6644
|
+
Cylinder18,
|
|
6509
6645
|
{
|
|
6510
6646
|
radius: leadDiameter / 2,
|
|
6511
6647
|
height: leadLength + baseHeight,
|
|
@@ -6516,8 +6652,8 @@ var ElectrolyticCapacitor = ({
|
|
|
6516
6652
|
};
|
|
6517
6653
|
|
|
6518
6654
|
// lib/Potentiometer.tsx
|
|
6519
|
-
import { Colorize as
|
|
6520
|
-
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";
|
|
6521
6657
|
var Potentiometer = ({
|
|
6522
6658
|
bodyWidth = 5.35,
|
|
6523
6659
|
bodyLength: bodyLength10 = 14,
|
|
@@ -6535,41 +6671,41 @@ var Potentiometer = ({
|
|
|
6535
6671
|
const adjusterHeight = 0.8;
|
|
6536
6672
|
const adjusterZ = bodyHeight + adjusterHeight / 2;
|
|
6537
6673
|
const slotWidth = Math.max(adjusterDiameter * 0.16, 0.3);
|
|
6538
|
-
return /* @__PURE__ */
|
|
6539
|
-
/* @__PURE__ */
|
|
6540
|
-
|
|
6674
|
+
return /* @__PURE__ */ jsxs78(Fragment77, { children: [
|
|
6675
|
+
/* @__PURE__ */ jsx82(Colorize47, { color: bodyColor, children: /* @__PURE__ */ jsx82(
|
|
6676
|
+
Cuboid56,
|
|
6541
6677
|
{
|
|
6542
6678
|
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6543
6679
|
center: [bodyCenterX, 0, bodyHeight / 2]
|
|
6544
6680
|
}
|
|
6545
6681
|
) }),
|
|
6546
|
-
/* @__PURE__ */
|
|
6547
|
-
/* @__PURE__ */
|
|
6548
|
-
|
|
6682
|
+
/* @__PURE__ */ jsx82(Colorize47, { color: adjusterColor, children: /* @__PURE__ */ jsxs78(Subtract16, { children: [
|
|
6683
|
+
/* @__PURE__ */ jsx82(
|
|
6684
|
+
Cylinder19,
|
|
6549
6685
|
{
|
|
6550
6686
|
radius: adjusterDiameter / 2,
|
|
6551
6687
|
height: adjusterHeight,
|
|
6552
6688
|
center: [bodyCenterX, 0, adjusterZ]
|
|
6553
6689
|
}
|
|
6554
6690
|
),
|
|
6555
|
-
/* @__PURE__ */
|
|
6556
|
-
|
|
6691
|
+
/* @__PURE__ */ jsx82(
|
|
6692
|
+
Cuboid56,
|
|
6557
6693
|
{
|
|
6558
6694
|
size: [adjusterDiameter, slotWidth, adjusterHeight * 0.6],
|
|
6559
6695
|
center: [bodyCenterX, 0, adjusterZ + adjusterHeight / 2]
|
|
6560
6696
|
}
|
|
6561
6697
|
)
|
|
6562
6698
|
] }) }),
|
|
6563
|
-
shaftHeight > 0 && shaftDiameter > 0 ? /* @__PURE__ */
|
|
6564
|
-
|
|
6699
|
+
shaftHeight > 0 && shaftDiameter > 0 ? /* @__PURE__ */ jsx82(Colorize47, { color: adjusterColor, children: /* @__PURE__ */ jsx82(
|
|
6700
|
+
Cylinder19,
|
|
6565
6701
|
{
|
|
6566
6702
|
radius: shaftDiameter / 2,
|
|
6567
6703
|
height: shaftHeight,
|
|
6568
6704
|
center: [bodyCenterX, 0, bodyHeight + shaftHeight / 2]
|
|
6569
6705
|
}
|
|
6570
6706
|
) }) : null,
|
|
6571
|
-
leads.map((lead) => /* @__PURE__ */
|
|
6572
|
-
|
|
6707
|
+
leads.map((lead) => /* @__PURE__ */ jsx82(Colorize47, { color: "#c0c0c0", children: /* @__PURE__ */ jsx82(
|
|
6708
|
+
Cylinder19,
|
|
6573
6709
|
{
|
|
6574
6710
|
radius: leadDiameter / 2,
|
|
6575
6711
|
height: bodyHeight / 2 + leadLength,
|
|
@@ -6580,8 +6716,8 @@ var Potentiometer = ({
|
|
|
6580
6716
|
};
|
|
6581
6717
|
|
|
6582
6718
|
// lib/SmdPushButton.tsx
|
|
6583
|
-
import { Colorize as
|
|
6584
|
-
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";
|
|
6585
6721
|
var SmdPushButton = ({
|
|
6586
6722
|
bodyWidth = 2.9,
|
|
6587
6723
|
bodyLength: bodyLength10 = 3,
|
|
@@ -6597,16 +6733,16 @@ var SmdPushButton = ({
|
|
|
6597
6733
|
leadColor = "#cccccc"
|
|
6598
6734
|
}) => {
|
|
6599
6735
|
const leadThickness = 0.15;
|
|
6600
|
-
return /* @__PURE__ */
|
|
6601
|
-
/* @__PURE__ */
|
|
6602
|
-
|
|
6736
|
+
return /* @__PURE__ */ jsxs79(Fragment78, { children: [
|
|
6737
|
+
/* @__PURE__ */ jsx83(Colorize48, { color: bodyColor, children: /* @__PURE__ */ jsx83(
|
|
6738
|
+
Cuboid57,
|
|
6603
6739
|
{
|
|
6604
6740
|
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6605
6741
|
center: [0, 0, bodyHeight / 2]
|
|
6606
6742
|
}
|
|
6607
6743
|
) }),
|
|
6608
|
-
/* @__PURE__ */
|
|
6609
|
-
|
|
6744
|
+
/* @__PURE__ */ jsx83(Colorize48, { color: actuatorColor, children: /* @__PURE__ */ jsx83(
|
|
6745
|
+
Cylinder20,
|
|
6610
6746
|
{
|
|
6611
6747
|
radius: actuatorDiameter / 2,
|
|
6612
6748
|
height: actuatorHeight,
|
|
@@ -6614,8 +6750,8 @@ var SmdPushButton = ({
|
|
|
6614
6750
|
}
|
|
6615
6751
|
) }),
|
|
6616
6752
|
[-1, 1].flatMap(
|
|
6617
|
-
(sx) => [-1, 1].map((sy) => /* @__PURE__ */
|
|
6618
|
-
|
|
6753
|
+
(sx) => [-1, 1].map((sy) => /* @__PURE__ */ jsx83(Colorize48, { color: leadColor, children: /* @__PURE__ */ jsx83(
|
|
6754
|
+
Cuboid57,
|
|
6619
6755
|
{
|
|
6620
6756
|
size: [padWidth, padLength, leadThickness],
|
|
6621
6757
|
center: [
|
|
@@ -6630,8 +6766,8 @@ var SmdPushButton = ({
|
|
|
6630
6766
|
};
|
|
6631
6767
|
|
|
6632
6768
|
// lib/SOT-563.tsx
|
|
6633
|
-
import { Cuboid as
|
|
6634
|
-
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";
|
|
6635
6771
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
6636
6772
|
const bodyWidth = 1.2;
|
|
6637
6773
|
const bodyLength10 = 1.6;
|
|
@@ -6641,28 +6777,28 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
6641
6777
|
const leadHeight = 0.13;
|
|
6642
6778
|
const leadSpacing = 0.5;
|
|
6643
6779
|
const bodyZOffset = -0.4;
|
|
6644
|
-
return /* @__PURE__ */
|
|
6645
|
-
/* @__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] }) }) }) }),
|
|
6646
6782
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
6647
6783
|
// Left lead
|
|
6648
|
-
/* @__PURE__ */
|
|
6649
|
-
|
|
6784
|
+
/* @__PURE__ */ jsx84(
|
|
6785
|
+
Translate38,
|
|
6650
6786
|
{
|
|
6651
6787
|
center: [
|
|
6652
6788
|
-bodyWidth / 2 - 0.03,
|
|
6653
6789
|
yOffset * leadSpacing,
|
|
6654
6790
|
leadHeight / 2
|
|
6655
6791
|
],
|
|
6656
|
-
children: /* @__PURE__ */
|
|
6792
|
+
children: /* @__PURE__ */ jsx84(Cuboid58, { size: [leadLength, leadWidth, leadHeight] })
|
|
6657
6793
|
},
|
|
6658
6794
|
`left-${index}`
|
|
6659
6795
|
),
|
|
6660
6796
|
// Right lead
|
|
6661
|
-
/* @__PURE__ */
|
|
6662
|
-
|
|
6797
|
+
/* @__PURE__ */ jsx84(
|
|
6798
|
+
Translate38,
|
|
6663
6799
|
{
|
|
6664
6800
|
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
|
|
6665
|
-
children: /* @__PURE__ */
|
|
6801
|
+
children: /* @__PURE__ */ jsx84(Cuboid58, { size: [leadLength, leadWidth, leadHeight] })
|
|
6666
6802
|
},
|
|
6667
6803
|
`right-${index}`
|
|
6668
6804
|
)
|
|
@@ -6671,9 +6807,9 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
6671
6807
|
};
|
|
6672
6808
|
|
|
6673
6809
|
// lib/FlexScreen.tsx
|
|
6674
|
-
import { Colorize as
|
|
6675
|
-
import { Fragment as
|
|
6676
|
-
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";
|
|
6677
6813
|
var DEFAULT_ASPECT_RATIO = 16 / 9;
|
|
6678
6814
|
var DEFAULT_DIAGONAL = 40;
|
|
6679
6815
|
var EPSILON = 1e-6;
|
|
@@ -6903,7 +7039,7 @@ var CableStrip = ({
|
|
|
6903
7039
|
acrossOffset = 0,
|
|
6904
7040
|
normalOffset = 0,
|
|
6905
7041
|
overlap = 0.03
|
|
6906
|
-
}) => /* @__PURE__ */
|
|
7042
|
+
}) => /* @__PURE__ */ jsx85(Colorize50, { color, children: points.slice(1).map((point, index) => {
|
|
6907
7043
|
const previous = points[index];
|
|
6908
7044
|
const dx = point[0] - previous[0];
|
|
6909
7045
|
const dy = point[1] - previous[1];
|
|
@@ -6921,7 +7057,7 @@ var CableStrip = ({
|
|
|
6921
7057
|
1e-3,
|
|
6922
7058
|
Math.min(width10, thickness, segmentLength) / 2 - 1e-3
|
|
6923
7059
|
);
|
|
6924
|
-
return /* @__PURE__ */
|
|
7060
|
+
return /* @__PURE__ */ jsx85(Translate39, { offset: midpoint, children: /* @__PURE__ */ jsx85(Rotate18, { rotation: [pitch, 0, yaw], children: /* @__PURE__ */ jsx85(
|
|
6925
7061
|
RoundedCuboid5,
|
|
6926
7062
|
{
|
|
6927
7063
|
size: [width10, segmentLength + overlap, thickness],
|
|
@@ -7130,8 +7266,8 @@ var FlexScreen = (props) => {
|
|
|
7130
7266
|
);
|
|
7131
7267
|
const conductorNormalOffset = (flexCableThickness + conductorThickness) / 2;
|
|
7132
7268
|
const stiffenerNormalOffset = -(flexCableThickness + stiffenerThickness) / 2;
|
|
7133
|
-
const assembly = /* @__PURE__ */
|
|
7134
|
-
showFlexCable && /* @__PURE__ */
|
|
7269
|
+
const assembly = /* @__PURE__ */ jsxs81(Fragment81, { children: [
|
|
7270
|
+
showFlexCable && /* @__PURE__ */ jsx85(
|
|
7135
7271
|
CableStrip,
|
|
7136
7272
|
{
|
|
7137
7273
|
points: path,
|
|
@@ -7140,8 +7276,8 @@ var FlexScreen = (props) => {
|
|
|
7140
7276
|
color: flexCableColor
|
|
7141
7277
|
}
|
|
7142
7278
|
),
|
|
7143
|
-
showFlexCable && showStiffeners && resolvedStiffenerLength > EPSILON && /* @__PURE__ */
|
|
7144
|
-
/* @__PURE__ */
|
|
7279
|
+
showFlexCable && showStiffeners && resolvedStiffenerLength > EPSILON && /* @__PURE__ */ jsxs81(Fragment81, { children: [
|
|
7280
|
+
/* @__PURE__ */ jsx85(
|
|
7145
7281
|
CableStrip,
|
|
7146
7282
|
{
|
|
7147
7283
|
points: startStiffener,
|
|
@@ -7151,7 +7287,7 @@ var FlexScreen = (props) => {
|
|
|
7151
7287
|
normalOffset: stiffenerNormalOffset
|
|
7152
7288
|
}
|
|
7153
7289
|
),
|
|
7154
|
-
/* @__PURE__ */
|
|
7290
|
+
/* @__PURE__ */ jsx85(
|
|
7155
7291
|
CableStrip,
|
|
7156
7292
|
{
|
|
7157
7293
|
points: endStiffener,
|
|
@@ -7162,8 +7298,8 @@ var FlexScreen = (props) => {
|
|
|
7162
7298
|
}
|
|
7163
7299
|
)
|
|
7164
7300
|
] }),
|
|
7165
|
-
showFlexCable && showConductors && contactLength > EPSILON && conductorOffsets.map((acrossOffset, index) => /* @__PURE__ */
|
|
7166
|
-
/* @__PURE__ */
|
|
7301
|
+
showFlexCable && showConductors && contactLength > EPSILON && conductorOffsets.map((acrossOffset, index) => /* @__PURE__ */ jsxs81(Fragment80, { children: [
|
|
7302
|
+
/* @__PURE__ */ jsx85(
|
|
7167
7303
|
CableStrip,
|
|
7168
7304
|
{
|
|
7169
7305
|
points: startContacts,
|
|
@@ -7174,7 +7310,7 @@ var FlexScreen = (props) => {
|
|
|
7174
7310
|
normalOffset: conductorNormalOffset
|
|
7175
7311
|
}
|
|
7176
7312
|
),
|
|
7177
|
-
/* @__PURE__ */
|
|
7313
|
+
/* @__PURE__ */ jsx85(
|
|
7178
7314
|
CableStrip,
|
|
7179
7315
|
{
|
|
7180
7316
|
points: endContacts,
|
|
@@ -7186,7 +7322,7 @@ var FlexScreen = (props) => {
|
|
|
7186
7322
|
}
|
|
7187
7323
|
)
|
|
7188
7324
|
] }, `conductor:${index}`)),
|
|
7189
|
-
showScreen && /* @__PURE__ */
|
|
7325
|
+
showScreen && /* @__PURE__ */ jsx85(Translate39, { offset: screenCenter, children: /* @__PURE__ */ jsx85(Rotate18, { rotation: screenRotation ?? presetScreenRotation, children: /* @__PURE__ */ jsx85(
|
|
7190
7326
|
Screen,
|
|
7191
7327
|
{
|
|
7192
7328
|
width: size.width,
|
|
@@ -7201,21 +7337,21 @@ var FlexScreen = (props) => {
|
|
|
7201
7337
|
}
|
|
7202
7338
|
) }) })
|
|
7203
7339
|
] });
|
|
7204
|
-
return /* @__PURE__ */
|
|
7205
|
-
|
|
7340
|
+
return /* @__PURE__ */ jsx85(
|
|
7341
|
+
Translate39,
|
|
7206
7342
|
{
|
|
7207
7343
|
offset: {
|
|
7208
7344
|
x: offset?.x ?? 0,
|
|
7209
7345
|
y: offset?.y ?? 0,
|
|
7210
7346
|
z: offset?.z ?? 0
|
|
7211
7347
|
},
|
|
7212
|
-
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 }) }) })
|
|
7213
7349
|
}
|
|
7214
7350
|
);
|
|
7215
7351
|
};
|
|
7216
7352
|
|
|
7217
7353
|
// lib/Footprinter3d.tsx
|
|
7218
|
-
import { Fragment as
|
|
7354
|
+
import { Fragment as Fragment82, jsx as jsx86 } from "react/jsx-runtime";
|
|
7219
7355
|
var Footprinter3d = ({ footprint }) => {
|
|
7220
7356
|
const modelFn = mp.string(footprint.split("_", 1)[0]).params().fn;
|
|
7221
7357
|
if (mp.getModelNames().includes(modelFn)) {
|
|
@@ -7223,7 +7359,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7223
7359
|
switch (model.fn) {
|
|
7224
7360
|
case "flexscreen": {
|
|
7225
7361
|
const { fn: _, ...flexScreenProps } = model;
|
|
7226
|
-
return /* @__PURE__ */
|
|
7362
|
+
return /* @__PURE__ */ jsx86(FlexScreen, { ...flexScreenProps });
|
|
7227
7363
|
}
|
|
7228
7364
|
}
|
|
7229
7365
|
}
|
|
@@ -7236,8 +7372,12 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7236
7372
|
const pinMatch = footprint.match(/jstph2_0mm(\d+)?/);
|
|
7237
7373
|
const numPins = pinMatch && pinMatch[1] ? pinMatch[1] : "2";
|
|
7238
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`;
|
|
7239
7379
|
}
|
|
7240
|
-
const fpJson =
|
|
7380
|
+
const fpJson = fp6.string(normalizedFootprint).json();
|
|
7241
7381
|
const colorMatch = footprint.match(/_color\(([^)]+)\)/);
|
|
7242
7382
|
const color = colorMatch ? colorMatch[1] : void 0;
|
|
7243
7383
|
const dim = (value, fallback) => {
|
|
@@ -7247,7 +7387,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7247
7387
|
};
|
|
7248
7388
|
switch (fpJson.fn) {
|
|
7249
7389
|
case "crystal":
|
|
7250
|
-
return /* @__PURE__ */
|
|
7390
|
+
return /* @__PURE__ */ jsx86(
|
|
7251
7391
|
Crystal,
|
|
7252
7392
|
{
|
|
7253
7393
|
horizontalPadPitch: fpJson.px,
|
|
@@ -7257,11 +7397,11 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7257
7397
|
}
|
|
7258
7398
|
);
|
|
7259
7399
|
case "dip":
|
|
7260
|
-
return /* @__PURE__ */
|
|
7400
|
+
return /* @__PURE__ */ jsx86(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
7261
7401
|
case "axial":
|
|
7262
|
-
return /* @__PURE__ */
|
|
7402
|
+
return /* @__PURE__ */ jsx86(AxialCapacitor, { pitch: fpJson.p });
|
|
7263
7403
|
case "tssop":
|
|
7264
|
-
return /* @__PURE__ */
|
|
7404
|
+
return /* @__PURE__ */ jsx86(
|
|
7265
7405
|
Tssop,
|
|
7266
7406
|
{
|
|
7267
7407
|
pinCount: fpJson.num_pins,
|
|
@@ -7272,7 +7412,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7272
7412
|
}
|
|
7273
7413
|
);
|
|
7274
7414
|
case "msop":
|
|
7275
|
-
return /* @__PURE__ */
|
|
7415
|
+
return /* @__PURE__ */ jsx86(
|
|
7276
7416
|
MSOP,
|
|
7277
7417
|
{
|
|
7278
7418
|
pinCount: fpJson.num_pins,
|
|
@@ -7283,7 +7423,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7283
7423
|
}
|
|
7284
7424
|
);
|
|
7285
7425
|
case "vssop":
|
|
7286
|
-
return /* @__PURE__ */
|
|
7426
|
+
return /* @__PURE__ */ jsx86(
|
|
7287
7427
|
VSSOP,
|
|
7288
7428
|
{
|
|
7289
7429
|
pinCount: fpJson.num_pins,
|
|
@@ -7295,7 +7435,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7295
7435
|
}
|
|
7296
7436
|
);
|
|
7297
7437
|
case "qfp":
|
|
7298
|
-
return /* @__PURE__ */
|
|
7438
|
+
return /* @__PURE__ */ jsx86(
|
|
7299
7439
|
QFP,
|
|
7300
7440
|
{
|
|
7301
7441
|
pinCount: fpJson.num_pins,
|
|
@@ -7306,12 +7446,12 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7306
7446
|
}
|
|
7307
7447
|
);
|
|
7308
7448
|
case "tqfp":
|
|
7309
|
-
return /* @__PURE__ */
|
|
7449
|
+
return /* @__PURE__ */ jsx86(tqfp_default, {});
|
|
7310
7450
|
case "lqfp":
|
|
7311
|
-
return /* @__PURE__ */
|
|
7451
|
+
return /* @__PURE__ */ jsx86(LQFP, { pinCount: fpJson.num_pins });
|
|
7312
7452
|
case "qfn": {
|
|
7313
7453
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
7314
|
-
return /* @__PURE__ */
|
|
7454
|
+
return /* @__PURE__ */ jsx86(
|
|
7315
7455
|
qfn_default,
|
|
7316
7456
|
{
|
|
7317
7457
|
num_pins: fpJson.num_pins,
|
|
@@ -7329,7 +7469,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7329
7469
|
}
|
|
7330
7470
|
case "dfn": {
|
|
7331
7471
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
7332
|
-
return /* @__PURE__ */
|
|
7472
|
+
return /* @__PURE__ */ jsx86(
|
|
7333
7473
|
DFN,
|
|
7334
7474
|
{
|
|
7335
7475
|
num_pins: fpJson.num_pins,
|
|
@@ -7349,7 +7489,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7349
7489
|
const rowsMatch = footprint.match(/_rows(\d+)/);
|
|
7350
7490
|
const rows = rowsMatch && rowsMatch[1] ? parseInt(rowsMatch[1], 10) : 1;
|
|
7351
7491
|
if (fpJson.male)
|
|
7352
|
-
return /* @__PURE__ */
|
|
7492
|
+
return /* @__PURE__ */ jsx86(
|
|
7353
7493
|
PinRow,
|
|
7354
7494
|
{
|
|
7355
7495
|
numberOfPins: fpJson.num_pins,
|
|
@@ -7361,7 +7501,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7361
7501
|
}
|
|
7362
7502
|
);
|
|
7363
7503
|
if (fpJson.female)
|
|
7364
|
-
return /* @__PURE__ */
|
|
7504
|
+
return /* @__PURE__ */ jsx86(
|
|
7365
7505
|
FemaleHeaderRow,
|
|
7366
7506
|
{
|
|
7367
7507
|
numberOfPins: fpJson.num_pins,
|
|
@@ -7371,7 +7511,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7371
7511
|
);
|
|
7372
7512
|
}
|
|
7373
7513
|
case "smdpinheader":
|
|
7374
|
-
return /* @__PURE__ */
|
|
7514
|
+
return /* @__PURE__ */ jsx86(
|
|
7375
7515
|
SmdPinHeader,
|
|
7376
7516
|
{
|
|
7377
7517
|
numberOfPins: fpJson.num_pins,
|
|
@@ -7380,44 +7520,44 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7380
7520
|
}
|
|
7381
7521
|
);
|
|
7382
7522
|
case "led5050":
|
|
7383
|
-
return /* @__PURE__ */
|
|
7523
|
+
return /* @__PURE__ */ jsx86(Led5050, { color });
|
|
7384
7524
|
case "cap": {
|
|
7385
7525
|
switch (fpJson.imperial) {
|
|
7386
7526
|
case "0402":
|
|
7387
|
-
return /* @__PURE__ */
|
|
7527
|
+
return /* @__PURE__ */ jsx86(A0402, { color: "#856c4d" });
|
|
7388
7528
|
case "0603":
|
|
7389
|
-
return /* @__PURE__ */
|
|
7529
|
+
return /* @__PURE__ */ jsx86(A0603, { color: "#856c4d" });
|
|
7390
7530
|
case "0805":
|
|
7391
|
-
return /* @__PURE__ */
|
|
7531
|
+
return /* @__PURE__ */ jsx86(A0805, { color: "#856c4d" });
|
|
7392
7532
|
case "0201":
|
|
7393
|
-
return /* @__PURE__ */
|
|
7533
|
+
return /* @__PURE__ */ jsx86(A0201, { color: "#856c4d" });
|
|
7394
7534
|
case "01005":
|
|
7395
|
-
return /* @__PURE__ */
|
|
7535
|
+
return /* @__PURE__ */ jsx86(A01005, { color: "#856c4d" });
|
|
7396
7536
|
case "1206":
|
|
7397
|
-
return /* @__PURE__ */
|
|
7537
|
+
return /* @__PURE__ */ jsx86(A1206, { color: "#856c4d" });
|
|
7398
7538
|
case "1210":
|
|
7399
|
-
return /* @__PURE__ */
|
|
7539
|
+
return /* @__PURE__ */ jsx86(A1210, { color: "#856c4d" });
|
|
7400
7540
|
case "2010":
|
|
7401
|
-
return /* @__PURE__ */
|
|
7541
|
+
return /* @__PURE__ */ jsx86(A2010, { color: "#856c4d" });
|
|
7402
7542
|
case "2512":
|
|
7403
|
-
return /* @__PURE__ */
|
|
7543
|
+
return /* @__PURE__ */ jsx86(A2512, { color: "#856c4d" });
|
|
7404
7544
|
}
|
|
7405
7545
|
break;
|
|
7406
7546
|
}
|
|
7407
7547
|
case "sot23":
|
|
7408
7548
|
switch (fpJson.num_pins) {
|
|
7409
7549
|
case 3:
|
|
7410
|
-
return /* @__PURE__ */
|
|
7550
|
+
return /* @__PURE__ */ jsx86(SOT233P, { color });
|
|
7411
7551
|
case 5:
|
|
7412
|
-
return /* @__PURE__ */
|
|
7552
|
+
return /* @__PURE__ */ jsx86(SOT_235_default, {});
|
|
7413
7553
|
}
|
|
7414
7554
|
break;
|
|
7415
7555
|
case "sot25":
|
|
7416
|
-
return /* @__PURE__ */
|
|
7556
|
+
return /* @__PURE__ */ jsx86(SOT_235_default, {});
|
|
7417
7557
|
case "sot":
|
|
7418
7558
|
case "sot343": {
|
|
7419
7559
|
const isSc70 = fpJson.fn === "sot343";
|
|
7420
|
-
return /* @__PURE__ */
|
|
7560
|
+
return /* @__PURE__ */ jsx86(
|
|
7421
7561
|
GullWingBody,
|
|
7422
7562
|
{
|
|
7423
7563
|
pads: getSmtPadRects(normalizedFootprint),
|
|
@@ -7428,10 +7568,10 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7428
7568
|
);
|
|
7429
7569
|
}
|
|
7430
7570
|
case "sot563":
|
|
7431
|
-
return /* @__PURE__ */
|
|
7571
|
+
return /* @__PURE__ */ jsx86(SOT563, {});
|
|
7432
7572
|
case "sot89": {
|
|
7433
7573
|
const padSpan = dim(fpJson.w, 4.2);
|
|
7434
|
-
return /* @__PURE__ */
|
|
7574
|
+
return /* @__PURE__ */ jsx86(
|
|
7435
7575
|
SOT223,
|
|
7436
7576
|
{
|
|
7437
7577
|
fullWidth: padSpan,
|
|
@@ -7446,25 +7586,25 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7446
7586
|
);
|
|
7447
7587
|
}
|
|
7448
7588
|
case "sot457":
|
|
7449
|
-
return /* @__PURE__ */
|
|
7589
|
+
return /* @__PURE__ */ jsx86(SOT457, {});
|
|
7450
7590
|
case "sot223":
|
|
7451
|
-
return /* @__PURE__ */
|
|
7591
|
+
return /* @__PURE__ */ jsx86(SOT223, {});
|
|
7452
7592
|
case "sot23w":
|
|
7453
|
-
return /* @__PURE__ */
|
|
7593
|
+
return /* @__PURE__ */ jsx86(SOT23W, {});
|
|
7454
7594
|
case "sot323":
|
|
7455
|
-
return /* @__PURE__ */
|
|
7595
|
+
return /* @__PURE__ */ jsx86(SOT323, {});
|
|
7456
7596
|
case "sod323f":
|
|
7457
|
-
return /* @__PURE__ */
|
|
7597
|
+
return /* @__PURE__ */ jsx86(SOD323F, {});
|
|
7458
7598
|
case "sod323fl":
|
|
7459
|
-
return /* @__PURE__ */
|
|
7599
|
+
return /* @__PURE__ */ jsx86(SOD323FL, {});
|
|
7460
7600
|
case "sot363":
|
|
7461
|
-
return /* @__PURE__ */
|
|
7601
|
+
return /* @__PURE__ */ jsx86(SOT_363_default, {});
|
|
7462
7602
|
case "sot886":
|
|
7463
|
-
return /* @__PURE__ */
|
|
7603
|
+
return /* @__PURE__ */ jsx86(SOT886, {});
|
|
7464
7604
|
case "sot963":
|
|
7465
|
-
return /* @__PURE__ */
|
|
7605
|
+
return /* @__PURE__ */ jsx86(SOT963, {});
|
|
7466
7606
|
case "pushbutton":
|
|
7467
|
-
return /* @__PURE__ */
|
|
7607
|
+
return /* @__PURE__ */ jsx86(
|
|
7468
7608
|
PushButton,
|
|
7469
7609
|
{
|
|
7470
7610
|
width: fpJson.w,
|
|
@@ -7474,14 +7614,17 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7474
7614
|
);
|
|
7475
7615
|
case "jst":
|
|
7476
7616
|
if (fpJson.zh) {
|
|
7477
|
-
return /* @__PURE__ */
|
|
7617
|
+
return /* @__PURE__ */ jsx86(JSTZH1_5mm, { numPins: fpJson.num_pins });
|
|
7478
7618
|
}
|
|
7479
7619
|
if (fpJson.ph) {
|
|
7480
|
-
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 });
|
|
7481
7624
|
}
|
|
7482
7625
|
break;
|
|
7483
7626
|
case "fpc":
|
|
7484
|
-
return /* @__PURE__ */
|
|
7627
|
+
return /* @__PURE__ */ jsx86(
|
|
7485
7628
|
FPC,
|
|
7486
7629
|
{
|
|
7487
7630
|
pinCount: fpJson.num_pins,
|
|
@@ -7501,7 +7644,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7501
7644
|
}
|
|
7502
7645
|
);
|
|
7503
7646
|
case "rj45":
|
|
7504
|
-
return /* @__PURE__ */
|
|
7647
|
+
return /* @__PURE__ */ jsx86(
|
|
7505
7648
|
RJ45,
|
|
7506
7649
|
{
|
|
7507
7650
|
bodyWidth: fpJson.w,
|
|
@@ -7527,7 +7670,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7527
7670
|
case "soic":
|
|
7528
7671
|
case "sop8":
|
|
7529
7672
|
case "ssop":
|
|
7530
|
-
return /* @__PURE__ */
|
|
7673
|
+
return /* @__PURE__ */ jsx86(
|
|
7531
7674
|
SOIC,
|
|
7532
7675
|
{
|
|
7533
7676
|
pinCount: fpJson.num_pins,
|
|
@@ -7551,7 +7694,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7551
7694
|
);
|
|
7552
7695
|
const distinct = (values) => new Set(values.map((value) => value.toFixed(3))).size;
|
|
7553
7696
|
const rowsAlongY = signalPads.length > 2 && distinct(signalPads.map((pad) => pad.y)) === 2 && distinct(signalPads.map((pad) => pad.x)) > 2;
|
|
7554
|
-
const dfn = /* @__PURE__ */
|
|
7697
|
+
const dfn = /* @__PURE__ */ jsx86(
|
|
7555
7698
|
DFN,
|
|
7556
7699
|
{
|
|
7557
7700
|
num_pins: fpJson.num_pins,
|
|
@@ -7566,13 +7709,13 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7566
7709
|
} : void 0
|
|
7567
7710
|
}
|
|
7568
7711
|
);
|
|
7569
|
-
return rowsAlongY ? /* @__PURE__ */
|
|
7712
|
+
return rowsAlongY ? /* @__PURE__ */ jsx86(Rotate19, { rotation: [0, 0, "90deg"], children: dfn }) : dfn;
|
|
7570
7713
|
}
|
|
7571
7714
|
case "mlp":
|
|
7572
7715
|
case "lga":
|
|
7573
7716
|
case "quad": {
|
|
7574
7717
|
if (fpJson.legsoutside) {
|
|
7575
|
-
return /* @__PURE__ */
|
|
7718
|
+
return /* @__PURE__ */ jsx86(
|
|
7576
7719
|
QFP,
|
|
7577
7720
|
{
|
|
7578
7721
|
pinCount: fpJson.num_pins,
|
|
@@ -7583,7 +7726,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7583
7726
|
}
|
|
7584
7727
|
);
|
|
7585
7728
|
}
|
|
7586
|
-
return /* @__PURE__ */
|
|
7729
|
+
return /* @__PURE__ */ jsx86(
|
|
7587
7730
|
qfn_default,
|
|
7588
7731
|
{
|
|
7589
7732
|
num_pins: fpJson.num_pins,
|
|
@@ -7599,7 +7742,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7599
7742
|
const pitch = dim(fpJson.p, 0.8);
|
|
7600
7743
|
const columns = fpJson.grid?.x ?? 8;
|
|
7601
7744
|
const rows = fpJson.grid?.y ?? 8;
|
|
7602
|
-
return /* @__PURE__ */
|
|
7745
|
+
return /* @__PURE__ */ jsx86(
|
|
7603
7746
|
BGA,
|
|
7604
7747
|
{
|
|
7605
7748
|
ballPitch: pitch,
|
|
@@ -7612,43 +7755,43 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7612
7755
|
);
|
|
7613
7756
|
}
|
|
7614
7757
|
case "sod523":
|
|
7615
|
-
return /* @__PURE__ */
|
|
7758
|
+
return /* @__PURE__ */ jsx86(SOD523, {});
|
|
7616
7759
|
case "sod723":
|
|
7617
|
-
return /* @__PURE__ */
|
|
7760
|
+
return /* @__PURE__ */ jsx86(SOD723_default, {});
|
|
7618
7761
|
case "sod882":
|
|
7619
|
-
return /* @__PURE__ */
|
|
7762
|
+
return /* @__PURE__ */ jsx86(SOD882, {});
|
|
7620
7763
|
case "sma":
|
|
7621
|
-
return /* @__PURE__ */
|
|
7764
|
+
return /* @__PURE__ */ jsx86(SMA, {});
|
|
7622
7765
|
case "smb":
|
|
7623
|
-
return /* @__PURE__ */
|
|
7766
|
+
return /* @__PURE__ */ jsx86(SMB, {});
|
|
7624
7767
|
case "smc":
|
|
7625
|
-
return /* @__PURE__ */
|
|
7768
|
+
return /* @__PURE__ */ jsx86(SMC, {});
|
|
7626
7769
|
case "smf":
|
|
7627
|
-
return /* @__PURE__ */
|
|
7770
|
+
return /* @__PURE__ */ jsx86(SMF, {});
|
|
7628
7771
|
case "sod123":
|
|
7629
|
-
return /* @__PURE__ */
|
|
7772
|
+
return /* @__PURE__ */ jsx86(SOD123, {});
|
|
7630
7773
|
case "sod123f":
|
|
7631
|
-
return /* @__PURE__ */
|
|
7774
|
+
return /* @__PURE__ */ jsx86(SOD123F, {});
|
|
7632
7775
|
case "sod123fl":
|
|
7633
|
-
return /* @__PURE__ */
|
|
7776
|
+
return /* @__PURE__ */ jsx86(SOD123FL, {});
|
|
7634
7777
|
case "sod123w":
|
|
7635
|
-
return /* @__PURE__ */
|
|
7778
|
+
return /* @__PURE__ */ jsx86(SOD123W, {});
|
|
7636
7779
|
case "sod110":
|
|
7637
|
-
return /* @__PURE__ */
|
|
7780
|
+
return /* @__PURE__ */ jsx86(SOD123W, { bodyWidth: 2.1, bodyLength: 1.4 });
|
|
7638
7781
|
case "sod128":
|
|
7639
|
-
return /* @__PURE__ */
|
|
7782
|
+
return /* @__PURE__ */ jsx86(SOD128, {});
|
|
7640
7783
|
case "sod323":
|
|
7641
|
-
return /* @__PURE__ */
|
|
7784
|
+
return /* @__PURE__ */ jsx86(SOD323, {});
|
|
7642
7785
|
case "sod323w":
|
|
7643
|
-
return /* @__PURE__ */
|
|
7786
|
+
return /* @__PURE__ */ jsx86(SOD323, {});
|
|
7644
7787
|
case "sod80":
|
|
7645
|
-
return /* @__PURE__ */
|
|
7788
|
+
return /* @__PURE__ */ jsx86(MINIMELF, {});
|
|
7646
7789
|
case "sod882d":
|
|
7647
|
-
return /* @__PURE__ */
|
|
7790
|
+
return /* @__PURE__ */ jsx86(SOD882, {});
|
|
7648
7791
|
case "smbf":
|
|
7649
|
-
return /* @__PURE__ */
|
|
7792
|
+
return /* @__PURE__ */ jsx86(SMB, {});
|
|
7650
7793
|
case "led2835":
|
|
7651
|
-
return /* @__PURE__ */
|
|
7794
|
+
return /* @__PURE__ */ jsx86(
|
|
7652
7795
|
Led2835,
|
|
7653
7796
|
{
|
|
7654
7797
|
color,
|
|
@@ -7666,10 +7809,10 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7666
7809
|
const pitch = dim(fpJson.p, 2.5);
|
|
7667
7810
|
const namedDiameter = footprint.match(/_d([\d.]+)/);
|
|
7668
7811
|
const diameter = fpJson.d !== void 0 ? dim(fpJson.d, pitch * 2) : namedDiameter ? Number(namedDiameter[1]) : pitch * 2;
|
|
7669
|
-
return /* @__PURE__ */
|
|
7812
|
+
return /* @__PURE__ */ jsx86(ElectrolyticCapacitor, { diameter, leadPitch: pitch });
|
|
7670
7813
|
}
|
|
7671
7814
|
case "potentiometer":
|
|
7672
|
-
return /* @__PURE__ */
|
|
7815
|
+
return /* @__PURE__ */ jsx86(
|
|
7673
7816
|
Potentiometer,
|
|
7674
7817
|
{
|
|
7675
7818
|
bodyWidth: dim(fpJson.w, 5.35),
|
|
@@ -7679,7 +7822,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7679
7822
|
}
|
|
7680
7823
|
);
|
|
7681
7824
|
case "smdpushbutton":
|
|
7682
|
-
return /* @__PURE__ */
|
|
7825
|
+
return /* @__PURE__ */ jsx86(
|
|
7683
7826
|
SmdPushButton,
|
|
7684
7827
|
{
|
|
7685
7828
|
padSpanX: dim(fpJson.px, 4.2),
|
|
@@ -7695,20 +7838,20 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7695
7838
|
{ x: -halfWidth, pins: fpJson.left ?? 0, key: "left" },
|
|
7696
7839
|
{ x: halfWidth, pins: fpJson.right ?? 0, key: "right" }
|
|
7697
7840
|
];
|
|
7698
|
-
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)) });
|
|
7699
7842
|
}
|
|
7700
7843
|
case "sod923":
|
|
7701
|
-
return /* @__PURE__ */
|
|
7844
|
+
return /* @__PURE__ */ jsx86(SOD923, {});
|
|
7702
7845
|
case "hc49":
|
|
7703
|
-
return /* @__PURE__ */
|
|
7846
|
+
return /* @__PURE__ */ jsx86(HC49, {});
|
|
7704
7847
|
case "micromelf":
|
|
7705
|
-
return /* @__PURE__ */
|
|
7848
|
+
return /* @__PURE__ */ jsx86(MicroMELF, {});
|
|
7706
7849
|
case "minimelf":
|
|
7707
|
-
return /* @__PURE__ */
|
|
7850
|
+
return /* @__PURE__ */ jsx86(MINIMELF, {});
|
|
7708
7851
|
case "melf":
|
|
7709
|
-
return /* @__PURE__ */
|
|
7852
|
+
return /* @__PURE__ */ jsx86(MELF, {});
|
|
7710
7853
|
case "ms012":
|
|
7711
|
-
return /* @__PURE__ */
|
|
7854
|
+
return /* @__PURE__ */ jsx86(
|
|
7712
7855
|
MS012,
|
|
7713
7856
|
{
|
|
7714
7857
|
pinCount: fpJson.num_pins,
|
|
@@ -7718,7 +7861,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7718
7861
|
}
|
|
7719
7862
|
);
|
|
7720
7863
|
case "ms013":
|
|
7721
|
-
return /* @__PURE__ */
|
|
7864
|
+
return /* @__PURE__ */ jsx86(
|
|
7722
7865
|
MS013,
|
|
7723
7866
|
{
|
|
7724
7867
|
pinCount: fpJson.num_pins,
|
|
@@ -7728,19 +7871,19 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7728
7871
|
}
|
|
7729
7872
|
);
|
|
7730
7873
|
case "sot723":
|
|
7731
|
-
return /* @__PURE__ */
|
|
7874
|
+
return /* @__PURE__ */ jsx86(SOT723, {});
|
|
7732
7875
|
case "to220":
|
|
7733
|
-
return /* @__PURE__ */
|
|
7876
|
+
return /* @__PURE__ */ jsx86(TO220, { leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
7734
7877
|
case "to220f":
|
|
7735
|
-
return /* @__PURE__ */
|
|
7878
|
+
return /* @__PURE__ */ jsx86(TO220, { mouldedTab: true, leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
7736
7879
|
case "to92":
|
|
7737
|
-
return /* @__PURE__ */
|
|
7880
|
+
return /* @__PURE__ */ jsx86(TO92, { leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
7738
7881
|
case "to92l":
|
|
7739
7882
|
case "to92s": {
|
|
7740
7883
|
const across = dim(fpJson.w, 4.8);
|
|
7741
7884
|
const along = dim(fpJson.h, 4);
|
|
7742
7885
|
const diameter = Math.max(across, along);
|
|
7743
|
-
return /* @__PURE__ */
|
|
7886
|
+
return /* @__PURE__ */ jsx86(
|
|
7744
7887
|
TO92,
|
|
7745
7888
|
{
|
|
7746
7889
|
bodyDiameter: diameter,
|
|
@@ -7759,7 +7902,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7759
7902
|
dim(fpJson.tabh, isD2Pak ? 10 : 5.8),
|
|
7760
7903
|
isD2Pak ? 10 : 6.5
|
|
7761
7904
|
);
|
|
7762
|
-
return /* @__PURE__ */
|
|
7905
|
+
return /* @__PURE__ */ jsx86(
|
|
7763
7906
|
DPAK,
|
|
7764
7907
|
{
|
|
7765
7908
|
bodyWidth: tabWidth,
|
|
@@ -7776,7 +7919,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7776
7919
|
}
|
|
7777
7920
|
case "stampboard":
|
|
7778
7921
|
case "stampreceiver":
|
|
7779
|
-
return /* @__PURE__ */
|
|
7922
|
+
return /* @__PURE__ */ jsx86(
|
|
7780
7923
|
StampBoard,
|
|
7781
7924
|
{
|
|
7782
7925
|
bodyWidth: fpJson.w,
|
|
@@ -7800,7 +7943,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7800
7943
|
const pinRow = fpJson.pinrow;
|
|
7801
7944
|
const pinRowHoleEdgeToEdgeDist = fpJson.pinRowHoleEdgeToEdgeDist;
|
|
7802
7945
|
const holes = Array.isArray(fpJson.holes) ? fpJson.holes : [];
|
|
7803
|
-
return /* @__PURE__ */
|
|
7946
|
+
return /* @__PURE__ */ jsx86(
|
|
7804
7947
|
MountedPcbModule,
|
|
7805
7948
|
{
|
|
7806
7949
|
numPins: pinRow,
|
|
@@ -7827,29 +7970,29 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7827
7970
|
}
|
|
7828
7971
|
switch (fpJson.imperial) {
|
|
7829
7972
|
case "0402":
|
|
7830
|
-
return /* @__PURE__ */
|
|
7973
|
+
return /* @__PURE__ */ jsx86(A0402, { color });
|
|
7831
7974
|
case "0603":
|
|
7832
|
-
return /* @__PURE__ */
|
|
7975
|
+
return /* @__PURE__ */ jsx86(A0603, { color });
|
|
7833
7976
|
case "0805":
|
|
7834
|
-
return /* @__PURE__ */
|
|
7977
|
+
return /* @__PURE__ */ jsx86(A0805, { color });
|
|
7835
7978
|
case "0201":
|
|
7836
|
-
return /* @__PURE__ */
|
|
7979
|
+
return /* @__PURE__ */ jsx86(A0201, { color });
|
|
7837
7980
|
case "01005":
|
|
7838
|
-
return /* @__PURE__ */
|
|
7981
|
+
return /* @__PURE__ */ jsx86(A01005, { color });
|
|
7839
7982
|
case "1206":
|
|
7840
|
-
return /* @__PURE__ */
|
|
7983
|
+
return /* @__PURE__ */ jsx86(A1206, { color });
|
|
7841
7984
|
case "1210":
|
|
7842
|
-
return /* @__PURE__ */
|
|
7985
|
+
return /* @__PURE__ */ jsx86(A1210, { color });
|
|
7843
7986
|
case "2010":
|
|
7844
|
-
return /* @__PURE__ */
|
|
7987
|
+
return /* @__PURE__ */ jsx86(A2010, { color });
|
|
7845
7988
|
case "2512":
|
|
7846
|
-
return /* @__PURE__ */
|
|
7989
|
+
return /* @__PURE__ */ jsx86(A2512, { color });
|
|
7847
7990
|
}
|
|
7848
7991
|
if ((fpJson.fn === "res" || fpJson.fn === "cap") && fpJson.p !== void 0 && fpJson.ph !== void 0) {
|
|
7849
7992
|
const padPitch = mm(fpJson.p);
|
|
7850
7993
|
const padHeight = mm(fpJson.ph);
|
|
7851
7994
|
if (Number.isFinite(padPitch) && Number.isFinite(padHeight)) {
|
|
7852
|
-
return /* @__PURE__ */
|
|
7995
|
+
return /* @__PURE__ */ jsx86(
|
|
7853
7996
|
ParametricChip,
|
|
7854
7997
|
{
|
|
7855
7998
|
padPitch,
|
|
@@ -7890,6 +8033,7 @@ export {
|
|
|
7890
8033
|
GullWingBody,
|
|
7891
8034
|
HC49,
|
|
7892
8035
|
JSTPH2_0mm,
|
|
8036
|
+
JSTXH2_5mm,
|
|
7893
8037
|
JSTZH1_5mm,
|
|
7894
8038
|
LQFP,
|
|
7895
8039
|
Led2835,
|