jscad-electronics 0.0.159 → 0.0.160
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 +11 -1
- package/dist/index.js +345 -162
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +172 -4
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -608,6 +608,7 @@ import {
|
|
|
608
608
|
Cylinder as Cylinder3,
|
|
609
609
|
ExtrudeLinear as ExtrudeLinear2,
|
|
610
610
|
Polygon as Polygon2,
|
|
611
|
+
Rotate as Rotate3,
|
|
611
612
|
Translate as Translate4
|
|
612
613
|
} from "jscad-fiber";
|
|
613
614
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
@@ -617,8 +618,18 @@ var FootprintPad = ({
|
|
|
617
618
|
isPin1
|
|
618
619
|
}) => {
|
|
619
620
|
const color = isPin1 ? [0, 255, 0] : [255, 0, 0];
|
|
620
|
-
if (pad.shape === "rect") {
|
|
621
|
-
return /* @__PURE__ */ jsx13(Colorize4, { color, children: /* @__PURE__ */ jsx13(Translate4, { offset: [pad.x, pad.y, -5e-3], children: /* @__PURE__ */ jsx13(
|
|
621
|
+
if (pad.shape === "rect" || pad.shape === "rotated_rect") {
|
|
622
|
+
return /* @__PURE__ */ jsx13(Colorize4, { color, children: /* @__PURE__ */ jsx13(Translate4, { offset: [pad.x, pad.y, -5e-3], children: /* @__PURE__ */ jsx13(
|
|
623
|
+
Rotate3,
|
|
624
|
+
{
|
|
625
|
+
angles: [
|
|
626
|
+
0,
|
|
627
|
+
0,
|
|
628
|
+
pad.shape === "rotated_rect" ? pad.ccw_rotation * Math.PI / 180 : 0
|
|
629
|
+
],
|
|
630
|
+
children: /* @__PURE__ */ jsx13(Cuboid12, { size: [pad.width, pad.height, PAD_THICKNESS] })
|
|
631
|
+
}
|
|
632
|
+
) }) });
|
|
622
633
|
}
|
|
623
634
|
if (pad.shape === "circle") {
|
|
624
635
|
const radius = pad.radius ?? pad.r ?? 0.25;
|
|
@@ -762,12 +773,12 @@ var ExtrudedPads = ({
|
|
|
762
773
|
};
|
|
763
774
|
|
|
764
775
|
// lib/Footprinter3d.tsx
|
|
765
|
-
import { fp as
|
|
776
|
+
import { fp as fp8 } from "@tscircuit/footprinter";
|
|
766
777
|
import { mp } from "@tscircuit/modelprinter";
|
|
767
|
-
import { Rotate as
|
|
778
|
+
import { Rotate as Rotate22, Translate as Translate41 } from "jscad-fiber";
|
|
768
779
|
|
|
769
780
|
// lib/DualInlinePackage.tsx
|
|
770
|
-
import { Polygon as Polygon3, ExtrudeLinear as ExtrudeLinear3, Rotate as
|
|
781
|
+
import { Polygon as Polygon3, ExtrudeLinear as ExtrudeLinear3, Rotate as Rotate4, Translate as Translate6 } from "jscad-fiber";
|
|
771
782
|
|
|
772
783
|
// lib/utils/range.ts
|
|
773
784
|
var range = (end) => Array.from({ length: end }, (_, i) => i);
|
|
@@ -862,7 +873,7 @@ var heightAboveSurface = 0.5;
|
|
|
862
873
|
var DipPinLeg = ({ x, y, z }) => {
|
|
863
874
|
const isRotated = x > 0;
|
|
864
875
|
return /* @__PURE__ */ jsxs15(Fragment13, { children: [
|
|
865
|
-
/* @__PURE__ */ jsx16(Translate6, { offset: { x: x + 0.25 / 2, y, z }, children: /* @__PURE__ */ jsx16(
|
|
876
|
+
/* @__PURE__ */ jsx16(Translate6, { offset: { x: x + 0.25 / 2, y, z }, children: /* @__PURE__ */ jsx16(Rotate4, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx16(ExtrudeLinear3, { height: 0.25, children: /* @__PURE__ */ jsx16(
|
|
866
877
|
Polygon3,
|
|
867
878
|
{
|
|
868
879
|
points: svgPathPoints.slice().reverse().map((p) => [p.x, p.y])
|
|
@@ -876,7 +887,7 @@ var DipPinLeg = ({ x, y, z }) => {
|
|
|
876
887
|
y: y + (isRotated ? 1 : -1),
|
|
877
888
|
z
|
|
878
889
|
},
|
|
879
|
-
children: /* @__PURE__ */ jsx16(
|
|
890
|
+
children: /* @__PURE__ */ jsx16(Rotate4, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx16(ExtrudeLinear3, { height: 2, children: /* @__PURE__ */ jsx16(
|
|
880
891
|
Polygon3,
|
|
881
892
|
{
|
|
882
893
|
points: getExpandedStroke(
|
|
@@ -934,7 +945,7 @@ import {
|
|
|
934
945
|
Polygon as Polygon4,
|
|
935
946
|
ExtrudeLinear as ExtrudeLinear4,
|
|
936
947
|
Translate as Translate7,
|
|
937
|
-
Rotate as
|
|
948
|
+
Rotate as Rotate5,
|
|
938
949
|
Colorize as Colorize6
|
|
939
950
|
} from "jscad-fiber";
|
|
940
951
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
@@ -963,7 +974,7 @@ var SmdChipLead = (props) => {
|
|
|
963
974
|
const N = 15;
|
|
964
975
|
const points = Array.from({ length: N }).map((_, i) => i / (N - 1) * bodyDistance).map((x) => [x, calculateSCurve(x, props)]);
|
|
965
976
|
const polygon = getExpandedStroke(points, thickness);
|
|
966
|
-
return /* @__PURE__ */ jsx17(Colorize6, { color: "#fff", children: /* @__PURE__ */ jsx17(Translate7, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ jsx17(
|
|
977
|
+
return /* @__PURE__ */ jsx17(Colorize6, { color: "#fff", children: /* @__PURE__ */ jsx17(Translate7, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ jsx17(Rotate5, { rotation: ["90deg", 0, rotation ?? 0], children: /* @__PURE__ */ jsx17(Translate7, { offset: { x: 0, y: 0, z: -width10 / 2 }, children: /* @__PURE__ */ jsx17(ExtrudeLinear4, { height: width10, children: /* @__PURE__ */ jsx17(Polygon4, { points: polygon.map((p) => [p.x, p.y]) }) }) }) }) }) });
|
|
967
978
|
};
|
|
968
979
|
|
|
969
980
|
// lib/Tssop.tsx
|
|
@@ -1267,7 +1278,7 @@ var getLeadWidth = (pinCount, width10) => {
|
|
|
1267
1278
|
};
|
|
1268
1279
|
|
|
1269
1280
|
// lib/PinHeader.tsx
|
|
1270
|
-
import { Colorize as Colorize7, Cuboid as Cuboid14, Hull as Hull4, Rotate as
|
|
1281
|
+
import { Colorize as Colorize7, Cuboid as Cuboid14, Hull as Hull4, Rotate as Rotate6, Translate as Translate8 } from "jscad-fiber";
|
|
1271
1282
|
import { Fragment as Fragment17, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1272
1283
|
var PIN_METAL_COLOR = "#c0c0c0";
|
|
1273
1284
|
var PinHeader = ({
|
|
@@ -1329,7 +1340,7 @@ var PinHeader = ({
|
|
|
1329
1340
|
}
|
|
1330
1341
|
)
|
|
1331
1342
|
] }) }),
|
|
1332
|
-
/* @__PURE__ */ jsx21(Colorize7, { color: PIN_METAL_COLOR, children: /* @__PURE__ */ jsx21(Translate8, { y: rightangle ? -3.9 : 0, z: rightangle ? 1 : 0, children: /* @__PURE__ */ jsx21(
|
|
1343
|
+
/* @__PURE__ */ jsx21(Colorize7, { color: PIN_METAL_COLOR, children: /* @__PURE__ */ jsx21(Translate8, { y: rightangle ? -3.9 : 0, z: rightangle ? 1 : 0, children: /* @__PURE__ */ jsx21(Rotate6, { rotation: rightangle ? [-Math.PI / 2, 0, 0] : [0, 0, 0], children: /* @__PURE__ */ jsxs19(Hull4, { children: [
|
|
1333
1344
|
/* @__PURE__ */ jsx21(
|
|
1334
1345
|
Cuboid14,
|
|
1335
1346
|
{
|
|
@@ -1955,7 +1966,7 @@ import {
|
|
|
1955
1966
|
Cylinder as Cylinder5,
|
|
1956
1967
|
ExtrudeLinear as ExtrudeLinear5,
|
|
1957
1968
|
Polygon as Polygon5,
|
|
1958
|
-
Rotate as
|
|
1969
|
+
Rotate as Rotate7,
|
|
1959
1970
|
RoundedCuboid,
|
|
1960
1971
|
Translate as Translate9
|
|
1961
1972
|
} from "jscad-fiber";
|
|
@@ -2129,7 +2140,7 @@ var PushButtonLeg = (props) => {
|
|
|
2129
2140
|
y: position?.y || 0,
|
|
2130
2141
|
z: position?.z || 0
|
|
2131
2142
|
},
|
|
2132
|
-
children: /* @__PURE__ */ jsx29(
|
|
2143
|
+
children: /* @__PURE__ */ jsx29(Rotate7, { rotation: [0, 55, rotation], children: /* @__PURE__ */ jsx29(ExtrudeLinear5, { height: width10, children: /* @__PURE__ */ jsx29(Polygon5, { points: polygon.map((p) => [p.y, p.x]) }) }) })
|
|
2133
2144
|
}
|
|
2134
2145
|
) });
|
|
2135
2146
|
};
|
|
@@ -3640,7 +3651,7 @@ import {
|
|
|
3640
3651
|
Colorize as Colorize24,
|
|
3641
3652
|
Cylinder as Cylinder7,
|
|
3642
3653
|
RoundedCylinder as RoundedCylinder2,
|
|
3643
|
-
Rotate as
|
|
3654
|
+
Rotate as Rotate8,
|
|
3644
3655
|
RoundedCuboid as RoundedCuboid2
|
|
3645
3656
|
} from "jscad-fiber";
|
|
3646
3657
|
import { Fragment as Fragment47, jsx as jsx51, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
@@ -3653,7 +3664,7 @@ var MicroMELF = ({
|
|
|
3653
3664
|
}) => {
|
|
3654
3665
|
const padLength = 0.2;
|
|
3655
3666
|
return /* @__PURE__ */ jsxs47(Fragment47, { children: [
|
|
3656
|
-
/* @__PURE__ */ jsx51(Colorize24, { color, children: /* @__PURE__ */ jsxs47(
|
|
3667
|
+
/* @__PURE__ */ jsx51(Colorize24, { color, children: /* @__PURE__ */ jsxs47(Rotate8, { rotation: [0, "90deg", 0], children: [
|
|
3657
3668
|
/* @__PURE__ */ jsx51(
|
|
3658
3669
|
RoundedCuboid2,
|
|
3659
3670
|
{
|
|
@@ -3671,7 +3682,7 @@ var MicroMELF = ({
|
|
|
3671
3682
|
}
|
|
3672
3683
|
)
|
|
3673
3684
|
] }) }),
|
|
3674
|
-
/* @__PURE__ */ jsx51(Colorize24, { color: cathodeIdentification, children: /* @__PURE__ */ jsx51(
|
|
3685
|
+
/* @__PURE__ */ jsx51(Colorize24, { color: cathodeIdentification, children: /* @__PURE__ */ jsx51(Rotate8, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx51(
|
|
3675
3686
|
RoundedCuboid2,
|
|
3676
3687
|
{
|
|
3677
3688
|
size: [bodyDiameter * 1.01, bodyDiameter * 1.01, bodyLength10 / 3],
|
|
@@ -3679,7 +3690,7 @@ var MicroMELF = ({
|
|
|
3679
3690
|
center: [-bodyDiameter / 2, 0, -bodyLength10 / 4 + 0.1]
|
|
3680
3691
|
}
|
|
3681
3692
|
) }) }),
|
|
3682
|
-
/* @__PURE__ */ jsx51(Colorize24, { color: contactColor, children: /* @__PURE__ */ jsx51(
|
|
3693
|
+
/* @__PURE__ */ jsx51(Colorize24, { color: contactColor, children: /* @__PURE__ */ jsx51(Rotate8, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx51(
|
|
3683
3694
|
RoundedCylinder2,
|
|
3684
3695
|
{
|
|
3685
3696
|
height: padLength,
|
|
@@ -3688,7 +3699,7 @@ var MicroMELF = ({
|
|
|
3688
3699
|
center: [-bodyDiameter / 2, 0, -bodyLength10 / 2]
|
|
3689
3700
|
}
|
|
3690
3701
|
) }) }),
|
|
3691
|
-
/* @__PURE__ */ jsx51(Colorize24, { color: contactColor, children: /* @__PURE__ */ jsx51(
|
|
3702
|
+
/* @__PURE__ */ jsx51(Colorize24, { color: contactColor, children: /* @__PURE__ */ jsx51(Rotate8, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx51(
|
|
3692
3703
|
RoundedCylinder2,
|
|
3693
3704
|
{
|
|
3694
3705
|
height: padLength,
|
|
@@ -3701,7 +3712,7 @@ var MicroMELF = ({
|
|
|
3701
3712
|
};
|
|
3702
3713
|
|
|
3703
3714
|
// lib/MINIMELF.tsx
|
|
3704
|
-
import { Colorize as Colorize25, RoundedCylinder as RoundedCylinder3, Rotate as
|
|
3715
|
+
import { Colorize as Colorize25, RoundedCylinder as RoundedCylinder3, Rotate as Rotate9 } from "jscad-fiber";
|
|
3705
3716
|
import { Fragment as Fragment48, jsx as jsx52, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
3706
3717
|
var MINIMELF = ({
|
|
3707
3718
|
bodyLength: bodyLength10 = 3.5,
|
|
@@ -3711,7 +3722,7 @@ var MINIMELF = ({
|
|
|
3711
3722
|
}) => {
|
|
3712
3723
|
const padLength = 0.5;
|
|
3713
3724
|
return /* @__PURE__ */ jsxs48(Fragment48, { children: [
|
|
3714
|
-
/* @__PURE__ */ jsx52(Colorize25, { color, children: /* @__PURE__ */ jsx52(
|
|
3725
|
+
/* @__PURE__ */ jsx52(Colorize25, { color, children: /* @__PURE__ */ jsx52(Rotate9, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx52(
|
|
3715
3726
|
RoundedCylinder3,
|
|
3716
3727
|
{
|
|
3717
3728
|
height: bodyLength10,
|
|
@@ -3720,7 +3731,7 @@ var MINIMELF = ({
|
|
|
3720
3731
|
center: [-bodyDiameter / 2, 0, 0]
|
|
3721
3732
|
}
|
|
3722
3733
|
) }) }),
|
|
3723
|
-
/* @__PURE__ */ jsx52(Colorize25, { color: contactColor, children: /* @__PURE__ */ jsx52(
|
|
3734
|
+
/* @__PURE__ */ jsx52(Colorize25, { color: contactColor, children: /* @__PURE__ */ jsx52(Rotate9, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx52(
|
|
3724
3735
|
RoundedCylinder3,
|
|
3725
3736
|
{
|
|
3726
3737
|
height: padLength,
|
|
@@ -3729,7 +3740,7 @@ var MINIMELF = ({
|
|
|
3729
3740
|
center: [-bodyDiameter / 2, 0, -bodyLength10 / 2]
|
|
3730
3741
|
}
|
|
3731
3742
|
) }) }),
|
|
3732
|
-
/* @__PURE__ */ jsx52(Colorize25, { color: contactColor, children: /* @__PURE__ */ jsx52(
|
|
3743
|
+
/* @__PURE__ */ jsx52(Colorize25, { color: contactColor, children: /* @__PURE__ */ jsx52(Rotate9, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx52(
|
|
3733
3744
|
RoundedCylinder3,
|
|
3734
3745
|
{
|
|
3735
3746
|
height: padLength,
|
|
@@ -3742,7 +3753,7 @@ var MINIMELF = ({
|
|
|
3742
3753
|
};
|
|
3743
3754
|
|
|
3744
3755
|
// lib/MELF.tsx
|
|
3745
|
-
import { Colorize as Colorize26, RoundedCylinder as RoundedCylinder4, Rotate as
|
|
3756
|
+
import { Colorize as Colorize26, RoundedCylinder as RoundedCylinder4, Rotate as Rotate10 } from "jscad-fiber";
|
|
3746
3757
|
import { Fragment as Fragment49, jsx as jsx53, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
3747
3758
|
var MELF = ({
|
|
3748
3759
|
bodyLength: bodyLength10 = 3.9,
|
|
@@ -3752,7 +3763,7 @@ var MELF = ({
|
|
|
3752
3763
|
}) => {
|
|
3753
3764
|
const padLength = 0.55;
|
|
3754
3765
|
return /* @__PURE__ */ jsxs49(Fragment49, { children: [
|
|
3755
|
-
/* @__PURE__ */ jsx53(Colorize26, { color, children: /* @__PURE__ */ jsx53(
|
|
3766
|
+
/* @__PURE__ */ jsx53(Colorize26, { color, children: /* @__PURE__ */ jsx53(Rotate10, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx53(
|
|
3756
3767
|
RoundedCylinder4,
|
|
3757
3768
|
{
|
|
3758
3769
|
height: bodyLength10,
|
|
@@ -3761,7 +3772,7 @@ var MELF = ({
|
|
|
3761
3772
|
center: [-bodyDiameter / 2, 0, 0]
|
|
3762
3773
|
}
|
|
3763
3774
|
) }) }),
|
|
3764
|
-
/* @__PURE__ */ jsx53(Colorize26, { color: contactColor, children: /* @__PURE__ */ jsx53(
|
|
3775
|
+
/* @__PURE__ */ jsx53(Colorize26, { color: contactColor, children: /* @__PURE__ */ jsx53(Rotate10, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx53(
|
|
3765
3776
|
RoundedCylinder4,
|
|
3766
3777
|
{
|
|
3767
3778
|
height: padLength,
|
|
@@ -3770,7 +3781,7 @@ var MELF = ({
|
|
|
3770
3781
|
center: [-bodyDiameter / 2, 0, -bodyLength10 / 2]
|
|
3771
3782
|
}
|
|
3772
3783
|
) }) }),
|
|
3773
|
-
/* @__PURE__ */ jsx53(Colorize26, { color: contactColor, children: /* @__PURE__ */ jsx53(
|
|
3784
|
+
/* @__PURE__ */ jsx53(Colorize26, { color: contactColor, children: /* @__PURE__ */ jsx53(Rotate10, { rotation: [0, "90deg", 0], children: /* @__PURE__ */ jsx53(
|
|
3774
3785
|
RoundedCylinder4,
|
|
3775
3786
|
{
|
|
3776
3787
|
height: padLength,
|
|
@@ -3925,7 +3936,7 @@ import {
|
|
|
3925
3936
|
Colorize as Colorize27,
|
|
3926
3937
|
Cuboid as Cuboid34,
|
|
3927
3938
|
Cylinder as Cylinder8,
|
|
3928
|
-
Rotate as
|
|
3939
|
+
Rotate as Rotate11,
|
|
3929
3940
|
Subtract as Subtract4,
|
|
3930
3941
|
Translate as Translate22
|
|
3931
3942
|
} from "jscad-fiber";
|
|
@@ -3975,7 +3986,7 @@ var TO220 = ({
|
|
|
3975
3986
|
center: [centerX, tabY, bodyTop + tabHeight / 2]
|
|
3976
3987
|
}
|
|
3977
3988
|
),
|
|
3978
|
-
/* @__PURE__ */ jsx56(
|
|
3989
|
+
/* @__PURE__ */ jsx56(Rotate11, { rotation: ["90deg", 0, 0], children: /* @__PURE__ */ jsx56(Translate22, { center: [centerX, holeZ, -tabY], children: /* @__PURE__ */ jsx56(
|
|
3979
3990
|
Cylinder8,
|
|
3980
3991
|
{
|
|
3981
3992
|
radius: mountingHoleDiameter / 2,
|
|
@@ -4665,7 +4676,7 @@ var SOD323FL = () => {
|
|
|
4665
4676
|
};
|
|
4666
4677
|
|
|
4667
4678
|
// lib/AxialCapacitor.tsx
|
|
4668
|
-
import { Colorize as Colorize32, Cylinder as Cylinder10, Rotate as
|
|
4679
|
+
import { Colorize as Colorize32, Cylinder as Cylinder10, Rotate as Rotate12, Sphere as Sphere2, Translate as Translate27 } from "jscad-fiber";
|
|
4669
4680
|
import { Fragment as Fragment61, jsx as jsx65, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
4670
4681
|
var AxialCapacitor = ({ pitch = 10 }) => {
|
|
4671
4682
|
const heightToCenterOfCapacitor = 0.5 + 4 / 2;
|
|
@@ -4678,7 +4689,7 @@ var AxialCapacitor = ({ pitch = 10 }) => {
|
|
|
4678
4689
|
center: [-pitch / 2, 0, heightToCenterOfCapacitor]
|
|
4679
4690
|
}
|
|
4680
4691
|
),
|
|
4681
|
-
/* @__PURE__ */ jsx65(Translate27, { x: -2.5, y: 0, z: heightToCenterOfCapacitor, children: /* @__PURE__ */ jsxs61(
|
|
4692
|
+
/* @__PURE__ */ jsx65(Translate27, { x: -2.5, y: 0, z: heightToCenterOfCapacitor, children: /* @__PURE__ */ jsxs61(Rotate12, { rotation: [0, Math.PI / 2, 0], children: [
|
|
4682
4693
|
/* @__PURE__ */ jsx65(
|
|
4683
4694
|
Cylinder10,
|
|
4684
4695
|
{
|
|
@@ -5170,7 +5181,7 @@ import {
|
|
|
5170
5181
|
Colorize as Colorize37,
|
|
5171
5182
|
Cuboid as Cuboid45,
|
|
5172
5183
|
Cylinder as Cylinder13,
|
|
5173
|
-
Rotate as
|
|
5184
|
+
Rotate as Rotate13,
|
|
5174
5185
|
Subtract as Subtract9,
|
|
5175
5186
|
Translate as Translate30
|
|
5176
5187
|
} from "jscad-fiber";
|
|
@@ -5191,7 +5202,7 @@ var JSTZH1_5mm = ({
|
|
|
5191
5202
|
const bodyWidth = (numPins - 1) * pitch + 4;
|
|
5192
5203
|
const startX = -((numPins - 1) * pitch) / 2;
|
|
5193
5204
|
return /* @__PURE__ */ jsxs66(Fragment65, { children: [
|
|
5194
|
-
/* @__PURE__ */ jsx70(Translate30, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx70(
|
|
5205
|
+
/* @__PURE__ */ jsx70(Translate30, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx70(Rotate13, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx70(Colorize37, { color: bodyColor, children: /* @__PURE__ */ jsxs66(Subtract9, { children: [
|
|
5195
5206
|
/* @__PURE__ */ jsx70(
|
|
5196
5207
|
Cuboid45,
|
|
5197
5208
|
{
|
|
@@ -5329,7 +5340,7 @@ import {
|
|
|
5329
5340
|
Colorize as Colorize38,
|
|
5330
5341
|
Cuboid as Cuboid46,
|
|
5331
5342
|
Cylinder as Cylinder14,
|
|
5332
|
-
Rotate as
|
|
5343
|
+
Rotate as Rotate14,
|
|
5333
5344
|
Subtract as Subtract10,
|
|
5334
5345
|
Translate as Translate31
|
|
5335
5346
|
} from "jscad-fiber";
|
|
@@ -5358,7 +5369,7 @@ var JSTPH2_0mm = ({
|
|
|
5358
5369
|
const topReliefWidth = 0.8;
|
|
5359
5370
|
const topReliefDepth = 0.65;
|
|
5360
5371
|
return /* @__PURE__ */ jsxs67(Fragment66, { children: [
|
|
5361
|
-
/* @__PURE__ */ jsx71(Translate31, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx71(
|
|
5372
|
+
/* @__PURE__ */ jsx71(Translate31, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx71(Rotate14, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx71(Colorize38, { color: bodyColor, children: /* @__PURE__ */ jsxs67(Subtract10, { children: [
|
|
5362
5373
|
/* @__PURE__ */ jsx71(
|
|
5363
5374
|
Cuboid46,
|
|
5364
5375
|
{
|
|
@@ -5443,7 +5454,7 @@ var JSTPH2_0mm = ({
|
|
|
5443
5454
|
center: [-bodyWidth / 2, 0, topReliefDepth / 2]
|
|
5444
5455
|
}
|
|
5445
5456
|
),
|
|
5446
|
-
/* @__PURE__ */ jsx71(Translate31, { offset: [-bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(
|
|
5457
|
+
/* @__PURE__ */ jsx71(Translate31, { offset: [-bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(Rotate14, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
|
|
5447
5458
|
Cylinder14,
|
|
5448
5459
|
{
|
|
5449
5460
|
height: wallThickness * 3,
|
|
@@ -5457,7 +5468,7 @@ var JSTPH2_0mm = ({
|
|
|
5457
5468
|
center: [bodyWidth / 2, 0, topReliefDepth / 2]
|
|
5458
5469
|
}
|
|
5459
5470
|
),
|
|
5460
|
-
/* @__PURE__ */ jsx71(Translate31, { offset: [bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(
|
|
5471
|
+
/* @__PURE__ */ jsx71(Translate31, { offset: [bodyWidth / 2, 0, topReliefDepth], children: /* @__PURE__ */ jsx71(Rotate14, { angles: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx71(
|
|
5461
5472
|
Cylinder14,
|
|
5462
5473
|
{
|
|
5463
5474
|
height: wallThickness * 3,
|
|
@@ -5648,7 +5659,7 @@ import {
|
|
|
5648
5659
|
Colorize as Colorize40,
|
|
5649
5660
|
Cuboid as Cuboid48,
|
|
5650
5661
|
Cylinder as Cylinder15,
|
|
5651
|
-
Rotate as
|
|
5662
|
+
Rotate as Rotate15,
|
|
5652
5663
|
RoundedCuboid as RoundedCuboid3,
|
|
5653
5664
|
Subtract as Subtract12,
|
|
5654
5665
|
Translate as Translate33
|
|
@@ -5864,7 +5875,7 @@ var FPC = ({
|
|
|
5864
5875
|
x: direction * sideBossX,
|
|
5865
5876
|
y: hingeY,
|
|
5866
5877
|
z: hingeZ,
|
|
5867
|
-
children: /* @__PURE__ */ jsx73(
|
|
5878
|
+
children: /* @__PURE__ */ jsx73(Rotate15, { rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx73(
|
|
5868
5879
|
Cylinder15,
|
|
5869
5880
|
{
|
|
5870
5881
|
color: ACTUATOR_HIGHLIGHT,
|
|
@@ -6120,7 +6131,7 @@ import {
|
|
|
6120
6131
|
Colorize as Colorize42,
|
|
6121
6132
|
Cuboid as Cuboid51,
|
|
6122
6133
|
Cylinder as Cylinder16,
|
|
6123
|
-
Rotate as
|
|
6134
|
+
Rotate as Rotate16,
|
|
6124
6135
|
Subtract as Subtract13,
|
|
6125
6136
|
Translate as Translate35
|
|
6126
6137
|
} from "jscad-fiber";
|
|
@@ -6188,7 +6199,7 @@ var Led5050 = ({
|
|
|
6188
6199
|
bodySize / 2,
|
|
6189
6200
|
bodyTop - cornerCutDepth / 2 + 5e-3
|
|
6190
6201
|
],
|
|
6191
|
-
children: /* @__PURE__ */ jsx77(
|
|
6202
|
+
children: /* @__PURE__ */ jsx77(Rotate16, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx77(Cuboid51, { size: [0.9, 0.9, cornerCutDepth + 0.01] }) })
|
|
6192
6203
|
}
|
|
6193
6204
|
)
|
|
6194
6205
|
] }) }),
|
|
@@ -6262,7 +6273,7 @@ import {
|
|
|
6262
6273
|
Colorize as Colorize44,
|
|
6263
6274
|
Cuboid as Cuboid53,
|
|
6264
6275
|
Cylinder as Cylinder17,
|
|
6265
|
-
Rotate as
|
|
6276
|
+
Rotate as Rotate17,
|
|
6266
6277
|
RoundedCuboid as RoundedCuboid4,
|
|
6267
6278
|
Subtract as Subtract14,
|
|
6268
6279
|
Translate as Translate36
|
|
@@ -6452,7 +6463,7 @@ var RJ45 = ({
|
|
|
6452
6463
|
contactY,
|
|
6453
6464
|
contactZ + (index % 2 === 0 ? 0.03 : -0.03)
|
|
6454
6465
|
],
|
|
6455
|
-
children: /* @__PURE__ */ jsx79(
|
|
6466
|
+
children: /* @__PURE__ */ jsx79(Rotate17, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx79(
|
|
6456
6467
|
RoundedCuboid4,
|
|
6457
6468
|
{
|
|
6458
6469
|
size: [Math.max(contactPitch * 0.28, 0.28), 3.25, 0.16],
|
|
@@ -6766,7 +6777,7 @@ var SmdPushButton = ({
|
|
|
6766
6777
|
};
|
|
6767
6778
|
|
|
6768
6779
|
// lib/SOT-563.tsx
|
|
6769
|
-
import { Cuboid as Cuboid58, Translate as Translate38, Rotate as
|
|
6780
|
+
import { Cuboid as Cuboid58, Translate as Translate38, Rotate as Rotate18, Colorize as Colorize49 } from "jscad-fiber";
|
|
6770
6781
|
import { Fragment as Fragment79, jsx as jsx84, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
6771
6782
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
6772
6783
|
const bodyWidth = 1.2;
|
|
@@ -6778,7 +6789,7 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
6778
6789
|
const leadSpacing = 0.5;
|
|
6779
6790
|
const bodyZOffset = -0.4;
|
|
6780
6791
|
return /* @__PURE__ */ jsxs80(Fragment79, { children: [
|
|
6781
|
-
/* @__PURE__ */ jsx84(
|
|
6792
|
+
/* @__PURE__ */ jsx84(Rotate18, { 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] }) }) }) }),
|
|
6782
6793
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
6783
6794
|
// Left lead
|
|
6784
6795
|
/* @__PURE__ */ jsx84(
|
|
@@ -6806,10 +6817,176 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
6806
6817
|
] });
|
|
6807
6818
|
};
|
|
6808
6819
|
|
|
6820
|
+
// lib/UsbCMidmount.tsx
|
|
6821
|
+
import { fp as fp6 } from "@tscircuit/footprinter";
|
|
6822
|
+
import {
|
|
6823
|
+
Colorize as Colorize50,
|
|
6824
|
+
Cuboid as Cuboid59,
|
|
6825
|
+
Cylinder as Cylinder21,
|
|
6826
|
+
Hull as Hull26,
|
|
6827
|
+
Rotate as Rotate19,
|
|
6828
|
+
Subtract as Subtract17,
|
|
6829
|
+
Translate as Translate39
|
|
6830
|
+
} from "jscad-fiber";
|
|
6831
|
+
import { jsx as jsx85, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
6832
|
+
var Capsule = ({
|
|
6833
|
+
width: width10,
|
|
6834
|
+
height: height10,
|
|
6835
|
+
depth
|
|
6836
|
+
}) => /* @__PURE__ */ jsx85(Hull26, { children: [-1, 1].map((side) => /* @__PURE__ */ jsx85(Translate39, { offset: [side * (width10 - height10) / 2, 0, 0], children: /* @__PURE__ */ jsx85(Rotate19, { rotation: [Math.PI / 2, 0, 0], children: /* @__PURE__ */ jsx85(Cylinder21, { radius: height10 / 2, height: depth }) }) }, side)) });
|
|
6837
|
+
var UsbCMidmount = ({
|
|
6838
|
+
footprint = "usbcmidmount16"
|
|
6839
|
+
}) => {
|
|
6840
|
+
const canonical = footprint.replace(/_pin1location\([^)]*\)/g, "");
|
|
6841
|
+
const params = fp6.string(canonical).json();
|
|
6842
|
+
const elements = fp6.string(canonical).circuitJson();
|
|
6843
|
+
const pads = elements.filter(
|
|
6844
|
+
(e) => e.type === "pcb_smtpad" && e.shape === "rect"
|
|
6845
|
+
);
|
|
6846
|
+
const slots = elements.filter((e) => e.type === "pcb_plated_hole");
|
|
6847
|
+
const holes = elements.filter((e) => e.type === "pcb_hole");
|
|
6848
|
+
const target = fp6.string(footprint).circuitJson().find((e) => e.type === "pcb_plated_hole");
|
|
6849
|
+
const first = slots[0];
|
|
6850
|
+
const angle = first && target && "x" in target ? Math.atan2(target.y, target.x) - Math.atan2(first.y, first.x) : 0;
|
|
6851
|
+
const width10 = 8.94, height10 = 3.2, wall = 0.22;
|
|
6852
|
+
const back = params.rowy + 0.23, front = -params.bodybottom;
|
|
6853
|
+
const depth = back - front, centerY = (back + front) / 2, centerZ = 1.65;
|
|
6854
|
+
if (!Number.isFinite(depth) || depth < 3 || slots.length !== 4)
|
|
6855
|
+
throw new Error(
|
|
6856
|
+
"UsbCMidmount requires four mounting slots and a positive body depth"
|
|
6857
|
+
);
|
|
6858
|
+
const tabBottom = -0.9, tabTop = centerZ + 0.1;
|
|
6859
|
+
return /* @__PURE__ */ jsxs81(Rotate19, { rotation: [0, 0, angle], children: [
|
|
6860
|
+
/* @__PURE__ */ jsx85(Colorize50, { color: "#b8bdc4", children: /* @__PURE__ */ jsx85(Translate39, { offset: [0, centerY, centerZ], children: /* @__PURE__ */ jsxs81(Subtract17, { children: [
|
|
6861
|
+
/* @__PURE__ */ jsx85(Capsule, { width: width10, height: height10, depth }),
|
|
6862
|
+
/* @__PURE__ */ jsx85(
|
|
6863
|
+
Capsule,
|
|
6864
|
+
{
|
|
6865
|
+
width: width10 - wall * 2,
|
|
6866
|
+
height: height10 - wall * 2,
|
|
6867
|
+
depth: depth + 0.2
|
|
6868
|
+
}
|
|
6869
|
+
)
|
|
6870
|
+
] }) }) }),
|
|
6871
|
+
/* @__PURE__ */ jsxs81(Colorize50, { color: "#242529", children: [
|
|
6872
|
+
/* @__PURE__ */ jsx85(
|
|
6873
|
+
Cuboid59,
|
|
6874
|
+
{
|
|
6875
|
+
size: [6.65, depth - 1.1, 0.7],
|
|
6876
|
+
center: [0, centerY + 0.3, centerZ]
|
|
6877
|
+
}
|
|
6878
|
+
),
|
|
6879
|
+
/* @__PURE__ */ jsx85(Cuboid59, { size: [7.6, 1, 2.45], center: [0, back - 0.65, centerZ] }),
|
|
6880
|
+
holes.map(
|
|
6881
|
+
(hole, i) => "x" in hole && "hole_diameter" in hole ? /* @__PURE__ */ jsx85(
|
|
6882
|
+
Cylinder21,
|
|
6883
|
+
{
|
|
6884
|
+
radius: hole.hole_diameter * 0.42,
|
|
6885
|
+
height: 0.8,
|
|
6886
|
+
center: [hole.x, hole.y, -0.3]
|
|
6887
|
+
},
|
|
6888
|
+
i
|
|
6889
|
+
) : null
|
|
6890
|
+
)
|
|
6891
|
+
] }),
|
|
6892
|
+
/* @__PURE__ */ jsxs81(Colorize50, { color: "#d3ad57", children: [
|
|
6893
|
+
[-1, 1].flatMap(
|
|
6894
|
+
(side) => [-2.75, -2.25, -1.25, -0.25, 0.25, 1.25, 2.25, 2.75].map((x) => /* @__PURE__ */ jsx85(
|
|
6895
|
+
Cuboid59,
|
|
6896
|
+
{
|
|
6897
|
+
size: [0.24, depth - 2, 0.04],
|
|
6898
|
+
center: [x, centerY + 0.1, centerZ + side * 0.365]
|
|
6899
|
+
},
|
|
6900
|
+
`${side}-${x}`
|
|
6901
|
+
))
|
|
6902
|
+
),
|
|
6903
|
+
pads.map((pad, i) => /* @__PURE__ */ jsx85(
|
|
6904
|
+
Cuboid59,
|
|
6905
|
+
{
|
|
6906
|
+
size: [
|
|
6907
|
+
Math.min(pad.width * 0.7, 0.35),
|
|
6908
|
+
pad.height * 0.8 + 0.35,
|
|
6909
|
+
0.15
|
|
6910
|
+
],
|
|
6911
|
+
center: [pad.x, pad.y - 0.175, 0.075]
|
|
6912
|
+
},
|
|
6913
|
+
i
|
|
6914
|
+
))
|
|
6915
|
+
] }),
|
|
6916
|
+
/* @__PURE__ */ jsx85(Colorize50, { color: "#b8bdc4", children: slots.map((slot, i) => /* @__PURE__ */ jsx85(
|
|
6917
|
+
Cuboid59,
|
|
6918
|
+
{
|
|
6919
|
+
size: [
|
|
6920
|
+
0.4,
|
|
6921
|
+
"hole_height" in slot ? Math.max(0.3, slot.hole_height - 0.2) : 1,
|
|
6922
|
+
tabTop - tabBottom
|
|
6923
|
+
],
|
|
6924
|
+
center: [slot.x, slot.y, (tabTop + tabBottom) / 2]
|
|
6925
|
+
},
|
|
6926
|
+
i
|
|
6927
|
+
)) })
|
|
6928
|
+
] });
|
|
6929
|
+
};
|
|
6930
|
+
|
|
6931
|
+
// lib/SOT143.tsx
|
|
6932
|
+
import { fp as fp7 } from "@tscircuit/footprinter";
|
|
6933
|
+
import { Rotate as Rotate20 } from "jscad-fiber";
|
|
6934
|
+
import { jsx as jsx86, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
6935
|
+
var getPads = (footprint) => fp7.string(footprint).circuitJson().filter(
|
|
6936
|
+
(element) => element.type === "pcb_smtpad" && (element.shape === "rect" || element.shape === "rotated_rect")
|
|
6937
|
+
).map((pad) => ({ x: pad.x, y: pad.y, pin: pad.port_hints?.[0] }));
|
|
6938
|
+
var SOT143 = ({ footprint = "sot143" }) => {
|
|
6939
|
+
const pads = getPads(footprint);
|
|
6940
|
+
if (pads.length !== 4) throw new Error("SOT143 requires four signal pads");
|
|
6941
|
+
const canonical = getPads("sot143");
|
|
6942
|
+
const options = fp7.string(footprint).json();
|
|
6943
|
+
const origin = canonical[1];
|
|
6944
|
+
const target = pads.find((pad) => pad.pin === "2");
|
|
6945
|
+
const angle = options.pin1location ? Math.round(
|
|
6946
|
+
(Math.atan2(target.y, target.x) - Math.atan2(origin.y, origin.x)) / (Math.PI / 2)
|
|
6947
|
+
) * (Math.PI / 2) : 0;
|
|
6948
|
+
const local = pads.map((pad) => ({
|
|
6949
|
+
...pad,
|
|
6950
|
+
x: pad.x * Math.cos(angle) + pad.y * Math.sin(angle),
|
|
6951
|
+
y: -pad.x * Math.sin(angle) + pad.y * Math.cos(angle)
|
|
6952
|
+
}));
|
|
6953
|
+
return /* @__PURE__ */ jsxs82(Rotate20, { rotation: [0, 0, angle], children: [
|
|
6954
|
+
/* @__PURE__ */ jsx86(
|
|
6955
|
+
ChipBody,
|
|
6956
|
+
{
|
|
6957
|
+
width: 2.9,
|
|
6958
|
+
length: 1.3,
|
|
6959
|
+
height: 0.95,
|
|
6960
|
+
heightAboveSurface: 0.05,
|
|
6961
|
+
center: { x: 0, y: 0, z: 0 },
|
|
6962
|
+
includeNotch: false,
|
|
6963
|
+
taperRatio: 0.06
|
|
6964
|
+
}
|
|
6965
|
+
),
|
|
6966
|
+
local.map((pad) => {
|
|
6967
|
+
const side = pad.y < 0 ? -1 : 1;
|
|
6968
|
+
const leadWidth = pad.pin === "1" ? 0.83 : 0.43;
|
|
6969
|
+
return /* @__PURE__ */ jsx86(
|
|
6970
|
+
SmdChipLead,
|
|
6971
|
+
{
|
|
6972
|
+
width: leadWidth,
|
|
6973
|
+
thickness: 0.12,
|
|
6974
|
+
height: 0.45,
|
|
6975
|
+
padContactLength: 0.3,
|
|
6976
|
+
bodyDistance: 0.6,
|
|
6977
|
+
rotation: side < 0 ? Math.PI / 2 : -Math.PI / 2,
|
|
6978
|
+
position: { x: pad.x, y: side * 1.15, z: 0.06 }
|
|
6979
|
+
},
|
|
6980
|
+
pad.pin
|
|
6981
|
+
);
|
|
6982
|
+
})
|
|
6983
|
+
] });
|
|
6984
|
+
};
|
|
6985
|
+
|
|
6809
6986
|
// lib/FlexScreen.tsx
|
|
6810
|
-
import { Colorize as
|
|
6987
|
+
import { Colorize as Colorize51, Rotate as Rotate21, RoundedCuboid as RoundedCuboid5, Translate as Translate40 } from "jscad-fiber";
|
|
6811
6988
|
import { Fragment as Fragment80 } from "react";
|
|
6812
|
-
import { Fragment as Fragment81, jsx as
|
|
6989
|
+
import { Fragment as Fragment81, jsx as jsx87, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
6813
6990
|
var DEFAULT_ASPECT_RATIO = 16 / 9;
|
|
6814
6991
|
var DEFAULT_DIAGONAL = 40;
|
|
6815
6992
|
var EPSILON = 1e-6;
|
|
@@ -7039,7 +7216,7 @@ var CableStrip = ({
|
|
|
7039
7216
|
acrossOffset = 0,
|
|
7040
7217
|
normalOffset = 0,
|
|
7041
7218
|
overlap = 0.03
|
|
7042
|
-
}) => /* @__PURE__ */
|
|
7219
|
+
}) => /* @__PURE__ */ jsx87(Colorize51, { color, children: points.slice(1).map((point, index) => {
|
|
7043
7220
|
const previous = points[index];
|
|
7044
7221
|
const dx = point[0] - previous[0];
|
|
7045
7222
|
const dy = point[1] - previous[1];
|
|
@@ -7057,7 +7234,7 @@ var CableStrip = ({
|
|
|
7057
7234
|
1e-3,
|
|
7058
7235
|
Math.min(width10, thickness, segmentLength) / 2 - 1e-3
|
|
7059
7236
|
);
|
|
7060
|
-
return /* @__PURE__ */
|
|
7237
|
+
return /* @__PURE__ */ jsx87(Translate40, { offset: midpoint, children: /* @__PURE__ */ jsx87(Rotate21, { rotation: [pitch, 0, yaw], children: /* @__PURE__ */ jsx87(
|
|
7061
7238
|
RoundedCuboid5,
|
|
7062
7239
|
{
|
|
7063
7240
|
size: [width10, segmentLength + overlap, thickness],
|
|
@@ -7266,8 +7443,8 @@ var FlexScreen = (props) => {
|
|
|
7266
7443
|
);
|
|
7267
7444
|
const conductorNormalOffset = (flexCableThickness + conductorThickness) / 2;
|
|
7268
7445
|
const stiffenerNormalOffset = -(flexCableThickness + stiffenerThickness) / 2;
|
|
7269
|
-
const assembly = /* @__PURE__ */
|
|
7270
|
-
showFlexCable && /* @__PURE__ */
|
|
7446
|
+
const assembly = /* @__PURE__ */ jsxs83(Fragment81, { children: [
|
|
7447
|
+
showFlexCable && /* @__PURE__ */ jsx87(
|
|
7271
7448
|
CableStrip,
|
|
7272
7449
|
{
|
|
7273
7450
|
points: path,
|
|
@@ -7276,8 +7453,8 @@ var FlexScreen = (props) => {
|
|
|
7276
7453
|
color: flexCableColor
|
|
7277
7454
|
}
|
|
7278
7455
|
),
|
|
7279
|
-
showFlexCable && showStiffeners && resolvedStiffenerLength > EPSILON && /* @__PURE__ */
|
|
7280
|
-
/* @__PURE__ */
|
|
7456
|
+
showFlexCable && showStiffeners && resolvedStiffenerLength > EPSILON && /* @__PURE__ */ jsxs83(Fragment81, { children: [
|
|
7457
|
+
/* @__PURE__ */ jsx87(
|
|
7281
7458
|
CableStrip,
|
|
7282
7459
|
{
|
|
7283
7460
|
points: startStiffener,
|
|
@@ -7287,7 +7464,7 @@ var FlexScreen = (props) => {
|
|
|
7287
7464
|
normalOffset: stiffenerNormalOffset
|
|
7288
7465
|
}
|
|
7289
7466
|
),
|
|
7290
|
-
/* @__PURE__ */
|
|
7467
|
+
/* @__PURE__ */ jsx87(
|
|
7291
7468
|
CableStrip,
|
|
7292
7469
|
{
|
|
7293
7470
|
points: endStiffener,
|
|
@@ -7298,8 +7475,8 @@ var FlexScreen = (props) => {
|
|
|
7298
7475
|
}
|
|
7299
7476
|
)
|
|
7300
7477
|
] }),
|
|
7301
|
-
showFlexCable && showConductors && contactLength > EPSILON && conductorOffsets.map((acrossOffset, index) => /* @__PURE__ */
|
|
7302
|
-
/* @__PURE__ */
|
|
7478
|
+
showFlexCable && showConductors && contactLength > EPSILON && conductorOffsets.map((acrossOffset, index) => /* @__PURE__ */ jsxs83(Fragment80, { children: [
|
|
7479
|
+
/* @__PURE__ */ jsx87(
|
|
7303
7480
|
CableStrip,
|
|
7304
7481
|
{
|
|
7305
7482
|
points: startContacts,
|
|
@@ -7310,7 +7487,7 @@ var FlexScreen = (props) => {
|
|
|
7310
7487
|
normalOffset: conductorNormalOffset
|
|
7311
7488
|
}
|
|
7312
7489
|
),
|
|
7313
|
-
/* @__PURE__ */
|
|
7490
|
+
/* @__PURE__ */ jsx87(
|
|
7314
7491
|
CableStrip,
|
|
7315
7492
|
{
|
|
7316
7493
|
points: endContacts,
|
|
@@ -7322,7 +7499,7 @@ var FlexScreen = (props) => {
|
|
|
7322
7499
|
}
|
|
7323
7500
|
)
|
|
7324
7501
|
] }, `conductor:${index}`)),
|
|
7325
|
-
showScreen && /* @__PURE__ */
|
|
7502
|
+
showScreen && /* @__PURE__ */ jsx87(Translate40, { offset: screenCenter, children: /* @__PURE__ */ jsx87(Rotate21, { rotation: screenRotation ?? presetScreenRotation, children: /* @__PURE__ */ jsx87(
|
|
7326
7503
|
Screen,
|
|
7327
7504
|
{
|
|
7328
7505
|
width: size.width,
|
|
@@ -7337,21 +7514,21 @@ var FlexScreen = (props) => {
|
|
|
7337
7514
|
}
|
|
7338
7515
|
) }) })
|
|
7339
7516
|
] });
|
|
7340
|
-
return /* @__PURE__ */
|
|
7341
|
-
|
|
7517
|
+
return /* @__PURE__ */ jsx87(
|
|
7518
|
+
Translate40,
|
|
7342
7519
|
{
|
|
7343
7520
|
offset: {
|
|
7344
7521
|
x: offset?.x ?? 0,
|
|
7345
7522
|
y: offset?.y ?? 0,
|
|
7346
7523
|
z: offset?.z ?? 0
|
|
7347
7524
|
},
|
|
7348
|
-
children: /* @__PURE__ */
|
|
7525
|
+
children: /* @__PURE__ */ jsx87(Translate40, { offset: start, children: /* @__PURE__ */ jsx87(Rotate21, { rotation, children: /* @__PURE__ */ jsx87(Translate40, { offset: [-start[0], -start[1], -start[2]], children: assembly }) }) })
|
|
7349
7526
|
}
|
|
7350
7527
|
);
|
|
7351
7528
|
};
|
|
7352
7529
|
|
|
7353
7530
|
// lib/Footprinter3d.tsx
|
|
7354
|
-
import { Fragment as Fragment82, jsx as
|
|
7531
|
+
import { Fragment as Fragment82, jsx as jsx88 } from "react/jsx-runtime";
|
|
7355
7532
|
var Footprinter3d = ({ footprint }) => {
|
|
7356
7533
|
const modelFn = mp.string(footprint.split("_", 1)[0]).params().fn;
|
|
7357
7534
|
if (mp.getModelNames().includes(modelFn)) {
|
|
@@ -7359,7 +7536,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7359
7536
|
switch (model.fn) {
|
|
7360
7537
|
case "flexscreen": {
|
|
7361
7538
|
const { fn: _, ...flexScreenProps } = model;
|
|
7362
|
-
return /* @__PURE__ */
|
|
7539
|
+
return /* @__PURE__ */ jsx88(FlexScreen, { ...flexScreenProps });
|
|
7363
7540
|
}
|
|
7364
7541
|
}
|
|
7365
7542
|
}
|
|
@@ -7377,7 +7554,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7377
7554
|
const numPins = pinMatch && pinMatch[1] ? pinMatch[1] : "2";
|
|
7378
7555
|
normalizedFootprint = `jst${numPins}_xh`;
|
|
7379
7556
|
}
|
|
7380
|
-
const fpJson =
|
|
7557
|
+
const fpJson = fp8.string(normalizedFootprint).json();
|
|
7381
7558
|
const colorMatch = footprint.match(/_color\(([^)]+)\)/);
|
|
7382
7559
|
const color = colorMatch ? colorMatch[1] : void 0;
|
|
7383
7560
|
const dim = (value, fallback) => {
|
|
@@ -7387,7 +7564,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7387
7564
|
};
|
|
7388
7565
|
switch (fpJson.fn) {
|
|
7389
7566
|
case "crystal":
|
|
7390
|
-
return /* @__PURE__ */
|
|
7567
|
+
return /* @__PURE__ */ jsx88(
|
|
7391
7568
|
Crystal,
|
|
7392
7569
|
{
|
|
7393
7570
|
horizontalPadPitch: fpJson.px,
|
|
@@ -7397,11 +7574,11 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7397
7574
|
}
|
|
7398
7575
|
);
|
|
7399
7576
|
case "dip":
|
|
7400
|
-
return /* @__PURE__ */
|
|
7577
|
+
return /* @__PURE__ */ jsx88(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
7401
7578
|
case "axial":
|
|
7402
|
-
return /* @__PURE__ */
|
|
7579
|
+
return /* @__PURE__ */ jsx88(AxialCapacitor, { pitch: fpJson.p });
|
|
7403
7580
|
case "tssop":
|
|
7404
|
-
return /* @__PURE__ */
|
|
7581
|
+
return /* @__PURE__ */ jsx88(
|
|
7405
7582
|
Tssop,
|
|
7406
7583
|
{
|
|
7407
7584
|
pinCount: fpJson.num_pins,
|
|
@@ -7412,7 +7589,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7412
7589
|
}
|
|
7413
7590
|
);
|
|
7414
7591
|
case "msop":
|
|
7415
|
-
return /* @__PURE__ */
|
|
7592
|
+
return /* @__PURE__ */ jsx88(
|
|
7416
7593
|
MSOP,
|
|
7417
7594
|
{
|
|
7418
7595
|
pinCount: fpJson.num_pins,
|
|
@@ -7423,7 +7600,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7423
7600
|
}
|
|
7424
7601
|
);
|
|
7425
7602
|
case "vssop":
|
|
7426
|
-
return /* @__PURE__ */
|
|
7603
|
+
return /* @__PURE__ */ jsx88(
|
|
7427
7604
|
VSSOP,
|
|
7428
7605
|
{
|
|
7429
7606
|
pinCount: fpJson.num_pins,
|
|
@@ -7435,7 +7612,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7435
7612
|
}
|
|
7436
7613
|
);
|
|
7437
7614
|
case "qfp":
|
|
7438
|
-
return /* @__PURE__ */
|
|
7615
|
+
return /* @__PURE__ */ jsx88(
|
|
7439
7616
|
QFP,
|
|
7440
7617
|
{
|
|
7441
7618
|
pinCount: fpJson.num_pins,
|
|
@@ -7446,12 +7623,12 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7446
7623
|
}
|
|
7447
7624
|
);
|
|
7448
7625
|
case "tqfp":
|
|
7449
|
-
return /* @__PURE__ */
|
|
7626
|
+
return /* @__PURE__ */ jsx88(tqfp_default, {});
|
|
7450
7627
|
case "lqfp":
|
|
7451
|
-
return /* @__PURE__ */
|
|
7628
|
+
return /* @__PURE__ */ jsx88(LQFP, { pinCount: fpJson.num_pins });
|
|
7452
7629
|
case "qfn": {
|
|
7453
7630
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
7454
|
-
return /* @__PURE__ */
|
|
7631
|
+
return /* @__PURE__ */ jsx88(
|
|
7455
7632
|
qfn_default,
|
|
7456
7633
|
{
|
|
7457
7634
|
num_pins: fpJson.num_pins,
|
|
@@ -7469,7 +7646,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7469
7646
|
}
|
|
7470
7647
|
case "dfn": {
|
|
7471
7648
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
7472
|
-
return /* @__PURE__ */
|
|
7649
|
+
return /* @__PURE__ */ jsx88(
|
|
7473
7650
|
DFN,
|
|
7474
7651
|
{
|
|
7475
7652
|
num_pins: fpJson.num_pins,
|
|
@@ -7489,7 +7666,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7489
7666
|
const rowsMatch = footprint.match(/_rows(\d+)/);
|
|
7490
7667
|
const rows = rowsMatch && rowsMatch[1] ? parseInt(rowsMatch[1], 10) : 1;
|
|
7491
7668
|
if (fpJson.male)
|
|
7492
|
-
return /* @__PURE__ */
|
|
7669
|
+
return /* @__PURE__ */ jsx88(
|
|
7493
7670
|
PinRow,
|
|
7494
7671
|
{
|
|
7495
7672
|
numberOfPins: fpJson.num_pins,
|
|
@@ -7501,7 +7678,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7501
7678
|
}
|
|
7502
7679
|
);
|
|
7503
7680
|
if (fpJson.female)
|
|
7504
|
-
return /* @__PURE__ */
|
|
7681
|
+
return /* @__PURE__ */ jsx88(
|
|
7505
7682
|
FemaleHeaderRow,
|
|
7506
7683
|
{
|
|
7507
7684
|
numberOfPins: fpJson.num_pins,
|
|
@@ -7511,7 +7688,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7511
7688
|
);
|
|
7512
7689
|
}
|
|
7513
7690
|
case "smdpinheader":
|
|
7514
|
-
return /* @__PURE__ */
|
|
7691
|
+
return /* @__PURE__ */ jsx88(
|
|
7515
7692
|
SmdPinHeader,
|
|
7516
7693
|
{
|
|
7517
7694
|
numberOfPins: fpJson.num_pins,
|
|
@@ -7520,44 +7697,44 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7520
7697
|
}
|
|
7521
7698
|
);
|
|
7522
7699
|
case "led5050":
|
|
7523
|
-
return /* @__PURE__ */
|
|
7700
|
+
return /* @__PURE__ */ jsx88(Led5050, { color });
|
|
7524
7701
|
case "cap": {
|
|
7525
7702
|
switch (fpJson.imperial) {
|
|
7526
7703
|
case "0402":
|
|
7527
|
-
return /* @__PURE__ */
|
|
7704
|
+
return /* @__PURE__ */ jsx88(A0402, { color: "#856c4d" });
|
|
7528
7705
|
case "0603":
|
|
7529
|
-
return /* @__PURE__ */
|
|
7706
|
+
return /* @__PURE__ */ jsx88(A0603, { color: "#856c4d" });
|
|
7530
7707
|
case "0805":
|
|
7531
|
-
return /* @__PURE__ */
|
|
7708
|
+
return /* @__PURE__ */ jsx88(A0805, { color: "#856c4d" });
|
|
7532
7709
|
case "0201":
|
|
7533
|
-
return /* @__PURE__ */
|
|
7710
|
+
return /* @__PURE__ */ jsx88(A0201, { color: "#856c4d" });
|
|
7534
7711
|
case "01005":
|
|
7535
|
-
return /* @__PURE__ */
|
|
7712
|
+
return /* @__PURE__ */ jsx88(A01005, { color: "#856c4d" });
|
|
7536
7713
|
case "1206":
|
|
7537
|
-
return /* @__PURE__ */
|
|
7714
|
+
return /* @__PURE__ */ jsx88(A1206, { color: "#856c4d" });
|
|
7538
7715
|
case "1210":
|
|
7539
|
-
return /* @__PURE__ */
|
|
7716
|
+
return /* @__PURE__ */ jsx88(A1210, { color: "#856c4d" });
|
|
7540
7717
|
case "2010":
|
|
7541
|
-
return /* @__PURE__ */
|
|
7718
|
+
return /* @__PURE__ */ jsx88(A2010, { color: "#856c4d" });
|
|
7542
7719
|
case "2512":
|
|
7543
|
-
return /* @__PURE__ */
|
|
7720
|
+
return /* @__PURE__ */ jsx88(A2512, { color: "#856c4d" });
|
|
7544
7721
|
}
|
|
7545
7722
|
break;
|
|
7546
7723
|
}
|
|
7547
7724
|
case "sot23":
|
|
7548
7725
|
switch (fpJson.num_pins) {
|
|
7549
7726
|
case 3:
|
|
7550
|
-
return /* @__PURE__ */
|
|
7727
|
+
return /* @__PURE__ */ jsx88(SOT233P, { color });
|
|
7551
7728
|
case 5:
|
|
7552
|
-
return /* @__PURE__ */
|
|
7729
|
+
return /* @__PURE__ */ jsx88(SOT_235_default, {});
|
|
7553
7730
|
}
|
|
7554
7731
|
break;
|
|
7555
7732
|
case "sot25":
|
|
7556
|
-
return /* @__PURE__ */
|
|
7733
|
+
return /* @__PURE__ */ jsx88(SOT_235_default, {});
|
|
7557
7734
|
case "sot":
|
|
7558
7735
|
case "sot343": {
|
|
7559
7736
|
const isSc70 = fpJson.fn === "sot343";
|
|
7560
|
-
return /* @__PURE__ */
|
|
7737
|
+
return /* @__PURE__ */ jsx88(
|
|
7561
7738
|
GullWingBody,
|
|
7562
7739
|
{
|
|
7563
7740
|
pads: getSmtPadRects(normalizedFootprint),
|
|
@@ -7568,10 +7745,10 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7568
7745
|
);
|
|
7569
7746
|
}
|
|
7570
7747
|
case "sot563":
|
|
7571
|
-
return /* @__PURE__ */
|
|
7748
|
+
return /* @__PURE__ */ jsx88(SOT563, {});
|
|
7572
7749
|
case "sot89": {
|
|
7573
7750
|
const padSpan = dim(fpJson.w, 4.2);
|
|
7574
|
-
return /* @__PURE__ */
|
|
7751
|
+
return /* @__PURE__ */ jsx88(
|
|
7575
7752
|
SOT223,
|
|
7576
7753
|
{
|
|
7577
7754
|
fullWidth: padSpan,
|
|
@@ -7586,25 +7763,29 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7586
7763
|
);
|
|
7587
7764
|
}
|
|
7588
7765
|
case "sot457":
|
|
7589
|
-
return /* @__PURE__ */
|
|
7766
|
+
return /* @__PURE__ */ jsx88(SOT457, {});
|
|
7767
|
+
case "usbcmidmount":
|
|
7768
|
+
return /* @__PURE__ */ jsx88(UsbCMidmount, { footprint: normalizedFootprint });
|
|
7769
|
+
case "sot143":
|
|
7770
|
+
return /* @__PURE__ */ jsx88(SOT143, { footprint: normalizedFootprint });
|
|
7590
7771
|
case "sot223":
|
|
7591
|
-
return /* @__PURE__ */
|
|
7772
|
+
return /* @__PURE__ */ jsx88(SOT223, {});
|
|
7592
7773
|
case "sot23w":
|
|
7593
|
-
return /* @__PURE__ */
|
|
7774
|
+
return /* @__PURE__ */ jsx88(SOT23W, {});
|
|
7594
7775
|
case "sot323":
|
|
7595
|
-
return /* @__PURE__ */
|
|
7776
|
+
return /* @__PURE__ */ jsx88(SOT323, {});
|
|
7596
7777
|
case "sod323f":
|
|
7597
|
-
return /* @__PURE__ */
|
|
7778
|
+
return /* @__PURE__ */ jsx88(SOD323F, {});
|
|
7598
7779
|
case "sod323fl":
|
|
7599
|
-
return /* @__PURE__ */
|
|
7780
|
+
return /* @__PURE__ */ jsx88(SOD323FL, {});
|
|
7600
7781
|
case "sot363":
|
|
7601
|
-
return /* @__PURE__ */
|
|
7782
|
+
return /* @__PURE__ */ jsx88(SOT_363_default, {});
|
|
7602
7783
|
case "sot886":
|
|
7603
|
-
return /* @__PURE__ */
|
|
7784
|
+
return /* @__PURE__ */ jsx88(SOT886, {});
|
|
7604
7785
|
case "sot963":
|
|
7605
|
-
return /* @__PURE__ */
|
|
7786
|
+
return /* @__PURE__ */ jsx88(SOT963, {});
|
|
7606
7787
|
case "pushbutton":
|
|
7607
|
-
return /* @__PURE__ */
|
|
7788
|
+
return /* @__PURE__ */ jsx88(
|
|
7608
7789
|
PushButton,
|
|
7609
7790
|
{
|
|
7610
7791
|
width: fpJson.w,
|
|
@@ -7614,17 +7795,17 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7614
7795
|
);
|
|
7615
7796
|
case "jst":
|
|
7616
7797
|
if (fpJson.zh) {
|
|
7617
|
-
return /* @__PURE__ */
|
|
7798
|
+
return /* @__PURE__ */ jsx88(JSTZH1_5mm, { numPins: fpJson.num_pins });
|
|
7618
7799
|
}
|
|
7619
7800
|
if (fpJson.ph) {
|
|
7620
|
-
return /* @__PURE__ */
|
|
7801
|
+
return /* @__PURE__ */ jsx88(JSTPH2_0mm, { numPins: fpJson.num_pins });
|
|
7621
7802
|
}
|
|
7622
7803
|
if (fpJson.xh) {
|
|
7623
|
-
return /* @__PURE__ */
|
|
7804
|
+
return /* @__PURE__ */ jsx88(JSTXH2_5mm, { numPins: fpJson.num_pins });
|
|
7624
7805
|
}
|
|
7625
7806
|
break;
|
|
7626
7807
|
case "fpc":
|
|
7627
|
-
return /* @__PURE__ */
|
|
7808
|
+
return /* @__PURE__ */ jsx88(
|
|
7628
7809
|
FPC,
|
|
7629
7810
|
{
|
|
7630
7811
|
pinCount: fpJson.num_pins,
|
|
@@ -7644,7 +7825,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7644
7825
|
}
|
|
7645
7826
|
);
|
|
7646
7827
|
case "rj45":
|
|
7647
|
-
return /* @__PURE__ */
|
|
7828
|
+
return /* @__PURE__ */ jsx88(
|
|
7648
7829
|
RJ45,
|
|
7649
7830
|
{
|
|
7650
7831
|
bodyWidth: fpJson.w,
|
|
@@ -7670,7 +7851,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7670
7851
|
case "soic":
|
|
7671
7852
|
case "sop8":
|
|
7672
7853
|
case "ssop":
|
|
7673
|
-
return /* @__PURE__ */
|
|
7854
|
+
return /* @__PURE__ */ jsx88(
|
|
7674
7855
|
SOIC,
|
|
7675
7856
|
{
|
|
7676
7857
|
pinCount: fpJson.num_pins,
|
|
@@ -7694,7 +7875,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7694
7875
|
);
|
|
7695
7876
|
const distinct = (values) => new Set(values.map((value) => value.toFixed(3))).size;
|
|
7696
7877
|
const rowsAlongY = signalPads.length > 2 && distinct(signalPads.map((pad) => pad.y)) === 2 && distinct(signalPads.map((pad) => pad.x)) > 2;
|
|
7697
|
-
const dfn = /* @__PURE__ */
|
|
7878
|
+
const dfn = /* @__PURE__ */ jsx88(
|
|
7698
7879
|
DFN,
|
|
7699
7880
|
{
|
|
7700
7881
|
num_pins: fpJson.num_pins,
|
|
@@ -7709,13 +7890,13 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7709
7890
|
} : void 0
|
|
7710
7891
|
}
|
|
7711
7892
|
);
|
|
7712
|
-
return rowsAlongY ? /* @__PURE__ */
|
|
7893
|
+
return rowsAlongY ? /* @__PURE__ */ jsx88(Rotate22, { rotation: [0, 0, "90deg"], children: dfn }) : dfn;
|
|
7713
7894
|
}
|
|
7714
7895
|
case "mlp":
|
|
7715
7896
|
case "lga":
|
|
7716
7897
|
case "quad": {
|
|
7717
7898
|
if (fpJson.legsoutside) {
|
|
7718
|
-
return /* @__PURE__ */
|
|
7899
|
+
return /* @__PURE__ */ jsx88(
|
|
7719
7900
|
QFP,
|
|
7720
7901
|
{
|
|
7721
7902
|
pinCount: fpJson.num_pins,
|
|
@@ -7726,7 +7907,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7726
7907
|
}
|
|
7727
7908
|
);
|
|
7728
7909
|
}
|
|
7729
|
-
return /* @__PURE__ */
|
|
7910
|
+
return /* @__PURE__ */ jsx88(
|
|
7730
7911
|
qfn_default,
|
|
7731
7912
|
{
|
|
7732
7913
|
num_pins: fpJson.num_pins,
|
|
@@ -7742,7 +7923,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7742
7923
|
const pitch = dim(fpJson.p, 0.8);
|
|
7743
7924
|
const columns = fpJson.grid?.x ?? 8;
|
|
7744
7925
|
const rows = fpJson.grid?.y ?? 8;
|
|
7745
|
-
return /* @__PURE__ */
|
|
7926
|
+
return /* @__PURE__ */ jsx88(
|
|
7746
7927
|
BGA,
|
|
7747
7928
|
{
|
|
7748
7929
|
ballPitch: pitch,
|
|
@@ -7755,43 +7936,43 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7755
7936
|
);
|
|
7756
7937
|
}
|
|
7757
7938
|
case "sod523":
|
|
7758
|
-
return /* @__PURE__ */
|
|
7939
|
+
return /* @__PURE__ */ jsx88(SOD523, {});
|
|
7759
7940
|
case "sod723":
|
|
7760
|
-
return /* @__PURE__ */
|
|
7941
|
+
return /* @__PURE__ */ jsx88(SOD723_default, {});
|
|
7761
7942
|
case "sod882":
|
|
7762
|
-
return /* @__PURE__ */
|
|
7943
|
+
return /* @__PURE__ */ jsx88(SOD882, {});
|
|
7763
7944
|
case "sma":
|
|
7764
|
-
return /* @__PURE__ */
|
|
7945
|
+
return /* @__PURE__ */ jsx88(SMA, {});
|
|
7765
7946
|
case "smb":
|
|
7766
|
-
return /* @__PURE__ */
|
|
7947
|
+
return /* @__PURE__ */ jsx88(SMB, {});
|
|
7767
7948
|
case "smc":
|
|
7768
|
-
return /* @__PURE__ */
|
|
7949
|
+
return /* @__PURE__ */ jsx88(SMC, {});
|
|
7769
7950
|
case "smf":
|
|
7770
|
-
return /* @__PURE__ */
|
|
7951
|
+
return /* @__PURE__ */ jsx88(SMF, {});
|
|
7771
7952
|
case "sod123":
|
|
7772
|
-
return /* @__PURE__ */
|
|
7953
|
+
return /* @__PURE__ */ jsx88(SOD123, {});
|
|
7773
7954
|
case "sod123f":
|
|
7774
|
-
return /* @__PURE__ */
|
|
7955
|
+
return /* @__PURE__ */ jsx88(SOD123F, {});
|
|
7775
7956
|
case "sod123fl":
|
|
7776
|
-
return /* @__PURE__ */
|
|
7957
|
+
return /* @__PURE__ */ jsx88(SOD123FL, {});
|
|
7777
7958
|
case "sod123w":
|
|
7778
|
-
return /* @__PURE__ */
|
|
7959
|
+
return /* @__PURE__ */ jsx88(SOD123W, {});
|
|
7779
7960
|
case "sod110":
|
|
7780
|
-
return /* @__PURE__ */
|
|
7961
|
+
return /* @__PURE__ */ jsx88(SOD123W, { bodyWidth: 2.1, bodyLength: 1.4 });
|
|
7781
7962
|
case "sod128":
|
|
7782
|
-
return /* @__PURE__ */
|
|
7963
|
+
return /* @__PURE__ */ jsx88(SOD128, {});
|
|
7783
7964
|
case "sod323":
|
|
7784
|
-
return /* @__PURE__ */
|
|
7965
|
+
return /* @__PURE__ */ jsx88(SOD323, {});
|
|
7785
7966
|
case "sod323w":
|
|
7786
|
-
return /* @__PURE__ */
|
|
7967
|
+
return /* @__PURE__ */ jsx88(SOD323, {});
|
|
7787
7968
|
case "sod80":
|
|
7788
|
-
return /* @__PURE__ */
|
|
7969
|
+
return /* @__PURE__ */ jsx88(MINIMELF, {});
|
|
7789
7970
|
case "sod882d":
|
|
7790
|
-
return /* @__PURE__ */
|
|
7971
|
+
return /* @__PURE__ */ jsx88(SOD882, {});
|
|
7791
7972
|
case "smbf":
|
|
7792
|
-
return /* @__PURE__ */
|
|
7973
|
+
return /* @__PURE__ */ jsx88(SMB, {});
|
|
7793
7974
|
case "led2835":
|
|
7794
|
-
return /* @__PURE__ */
|
|
7975
|
+
return /* @__PURE__ */ jsx88(
|
|
7795
7976
|
Led2835,
|
|
7796
7977
|
{
|
|
7797
7978
|
color,
|
|
@@ -7809,10 +7990,10 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7809
7990
|
const pitch = dim(fpJson.p, 2.5);
|
|
7810
7991
|
const namedDiameter = footprint.match(/_d([\d.]+)/);
|
|
7811
7992
|
const diameter = fpJson.d !== void 0 ? dim(fpJson.d, pitch * 2) : namedDiameter ? Number(namedDiameter[1]) : pitch * 2;
|
|
7812
|
-
return /* @__PURE__ */
|
|
7993
|
+
return /* @__PURE__ */ jsx88(ElectrolyticCapacitor, { diameter, leadPitch: pitch });
|
|
7813
7994
|
}
|
|
7814
7995
|
case "potentiometer":
|
|
7815
|
-
return /* @__PURE__ */
|
|
7996
|
+
return /* @__PURE__ */ jsx88(
|
|
7816
7997
|
Potentiometer,
|
|
7817
7998
|
{
|
|
7818
7999
|
bodyWidth: dim(fpJson.w, 5.35),
|
|
@@ -7822,7 +8003,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7822
8003
|
}
|
|
7823
8004
|
);
|
|
7824
8005
|
case "smdpushbutton":
|
|
7825
|
-
return /* @__PURE__ */
|
|
8006
|
+
return /* @__PURE__ */ jsx88(
|
|
7826
8007
|
SmdPushButton,
|
|
7827
8008
|
{
|
|
7828
8009
|
padSpanX: dim(fpJson.px, 4.2),
|
|
@@ -7838,20 +8019,20 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7838
8019
|
{ x: -halfWidth, pins: fpJson.left ?? 0, key: "left" },
|
|
7839
8020
|
{ x: halfWidth, pins: fpJson.right ?? 0, key: "right" }
|
|
7840
8021
|
];
|
|
7841
|
-
return /* @__PURE__ */
|
|
8022
|
+
return /* @__PURE__ */ jsx88(Fragment82, { children: sides.filter(({ pins }) => pins > 0).map(({ x, pins, key }) => /* @__PURE__ */ jsx88(Translate41, { center: [x, 0, 0], children: /* @__PURE__ */ jsx88(Rotate22, { rotation: [0, 0, "90deg"], children: /* @__PURE__ */ jsx88(PinRow, { numberOfPins: pins, pitch }) }) }, key)) });
|
|
7842
8023
|
}
|
|
7843
8024
|
case "sod923":
|
|
7844
|
-
return /* @__PURE__ */
|
|
8025
|
+
return /* @__PURE__ */ jsx88(SOD923, {});
|
|
7845
8026
|
case "hc49":
|
|
7846
|
-
return /* @__PURE__ */
|
|
8027
|
+
return /* @__PURE__ */ jsx88(HC49, {});
|
|
7847
8028
|
case "micromelf":
|
|
7848
|
-
return /* @__PURE__ */
|
|
8029
|
+
return /* @__PURE__ */ jsx88(MicroMELF, {});
|
|
7849
8030
|
case "minimelf":
|
|
7850
|
-
return /* @__PURE__ */
|
|
8031
|
+
return /* @__PURE__ */ jsx88(MINIMELF, {});
|
|
7851
8032
|
case "melf":
|
|
7852
|
-
return /* @__PURE__ */
|
|
8033
|
+
return /* @__PURE__ */ jsx88(MELF, {});
|
|
7853
8034
|
case "ms012":
|
|
7854
|
-
return /* @__PURE__ */
|
|
8035
|
+
return /* @__PURE__ */ jsx88(
|
|
7855
8036
|
MS012,
|
|
7856
8037
|
{
|
|
7857
8038
|
pinCount: fpJson.num_pins,
|
|
@@ -7861,7 +8042,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7861
8042
|
}
|
|
7862
8043
|
);
|
|
7863
8044
|
case "ms013":
|
|
7864
|
-
return /* @__PURE__ */
|
|
8045
|
+
return /* @__PURE__ */ jsx88(
|
|
7865
8046
|
MS013,
|
|
7866
8047
|
{
|
|
7867
8048
|
pinCount: fpJson.num_pins,
|
|
@@ -7871,19 +8052,19 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7871
8052
|
}
|
|
7872
8053
|
);
|
|
7873
8054
|
case "sot723":
|
|
7874
|
-
return /* @__PURE__ */
|
|
8055
|
+
return /* @__PURE__ */ jsx88(SOT723, {});
|
|
7875
8056
|
case "to220":
|
|
7876
|
-
return /* @__PURE__ */
|
|
8057
|
+
return /* @__PURE__ */ jsx88(TO220, { leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
7877
8058
|
case "to220f":
|
|
7878
|
-
return /* @__PURE__ */
|
|
8059
|
+
return /* @__PURE__ */ jsx88(TO220, { mouldedTab: true, leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
7879
8060
|
case "to92":
|
|
7880
|
-
return /* @__PURE__ */
|
|
8061
|
+
return /* @__PURE__ */ jsx88(TO92, { leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
7881
8062
|
case "to92l":
|
|
7882
8063
|
case "to92s": {
|
|
7883
8064
|
const across = dim(fpJson.w, 4.8);
|
|
7884
8065
|
const along = dim(fpJson.h, 4);
|
|
7885
8066
|
const diameter = Math.max(across, along);
|
|
7886
|
-
return /* @__PURE__ */
|
|
8067
|
+
return /* @__PURE__ */ jsx88(
|
|
7887
8068
|
TO92,
|
|
7888
8069
|
{
|
|
7889
8070
|
bodyDiameter: diameter,
|
|
@@ -7902,7 +8083,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7902
8083
|
dim(fpJson.tabh, isD2Pak ? 10 : 5.8),
|
|
7903
8084
|
isD2Pak ? 10 : 6.5
|
|
7904
8085
|
);
|
|
7905
|
-
return /* @__PURE__ */
|
|
8086
|
+
return /* @__PURE__ */ jsx88(
|
|
7906
8087
|
DPAK,
|
|
7907
8088
|
{
|
|
7908
8089
|
bodyWidth: tabWidth,
|
|
@@ -7919,7 +8100,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7919
8100
|
}
|
|
7920
8101
|
case "stampboard":
|
|
7921
8102
|
case "stampreceiver":
|
|
7922
|
-
return /* @__PURE__ */
|
|
8103
|
+
return /* @__PURE__ */ jsx88(
|
|
7923
8104
|
StampBoard,
|
|
7924
8105
|
{
|
|
7925
8106
|
bodyWidth: fpJson.w,
|
|
@@ -7943,7 +8124,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7943
8124
|
const pinRow = fpJson.pinrow;
|
|
7944
8125
|
const pinRowHoleEdgeToEdgeDist = fpJson.pinRowHoleEdgeToEdgeDist;
|
|
7945
8126
|
const holes = Array.isArray(fpJson.holes) ? fpJson.holes : [];
|
|
7946
|
-
return /* @__PURE__ */
|
|
8127
|
+
return /* @__PURE__ */ jsx88(
|
|
7947
8128
|
MountedPcbModule,
|
|
7948
8129
|
{
|
|
7949
8130
|
numPins: pinRow,
|
|
@@ -7970,29 +8151,29 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
7970
8151
|
}
|
|
7971
8152
|
switch (fpJson.imperial) {
|
|
7972
8153
|
case "0402":
|
|
7973
|
-
return /* @__PURE__ */
|
|
8154
|
+
return /* @__PURE__ */ jsx88(A0402, { color });
|
|
7974
8155
|
case "0603":
|
|
7975
|
-
return /* @__PURE__ */
|
|
8156
|
+
return /* @__PURE__ */ jsx88(A0603, { color });
|
|
7976
8157
|
case "0805":
|
|
7977
|
-
return /* @__PURE__ */
|
|
8158
|
+
return /* @__PURE__ */ jsx88(A0805, { color });
|
|
7978
8159
|
case "0201":
|
|
7979
|
-
return /* @__PURE__ */
|
|
8160
|
+
return /* @__PURE__ */ jsx88(A0201, { color });
|
|
7980
8161
|
case "01005":
|
|
7981
|
-
return /* @__PURE__ */
|
|
8162
|
+
return /* @__PURE__ */ jsx88(A01005, { color });
|
|
7982
8163
|
case "1206":
|
|
7983
|
-
return /* @__PURE__ */
|
|
8164
|
+
return /* @__PURE__ */ jsx88(A1206, { color });
|
|
7984
8165
|
case "1210":
|
|
7985
|
-
return /* @__PURE__ */
|
|
8166
|
+
return /* @__PURE__ */ jsx88(A1210, { color });
|
|
7986
8167
|
case "2010":
|
|
7987
|
-
return /* @__PURE__ */
|
|
8168
|
+
return /* @__PURE__ */ jsx88(A2010, { color });
|
|
7988
8169
|
case "2512":
|
|
7989
|
-
return /* @__PURE__ */
|
|
8170
|
+
return /* @__PURE__ */ jsx88(A2512, { color });
|
|
7990
8171
|
}
|
|
7991
8172
|
if ((fpJson.fn === "res" || fpJson.fn === "cap") && fpJson.p !== void 0 && fpJson.ph !== void 0) {
|
|
7992
8173
|
const padPitch = mm(fpJson.p);
|
|
7993
8174
|
const padHeight = mm(fpJson.ph);
|
|
7994
8175
|
if (Number.isFinite(padPitch) && Number.isFinite(padHeight)) {
|
|
7995
|
-
return /* @__PURE__ */
|
|
8176
|
+
return /* @__PURE__ */ jsx88(
|
|
7996
8177
|
ParametricChip,
|
|
7997
8178
|
{
|
|
7998
8179
|
padPitch,
|
|
@@ -8067,6 +8248,7 @@ export {
|
|
|
8067
8248
|
SOD723,
|
|
8068
8249
|
SOD882,
|
|
8069
8250
|
SOD923,
|
|
8251
|
+
SOT143,
|
|
8070
8252
|
SOT223,
|
|
8071
8253
|
SOT233P,
|
|
8072
8254
|
SOT23W,
|
|
@@ -8086,6 +8268,7 @@ export {
|
|
|
8086
8268
|
TO92,
|
|
8087
8269
|
TQFP,
|
|
8088
8270
|
Tssop,
|
|
8271
|
+
UsbCMidmount,
|
|
8089
8272
|
VSSOP,
|
|
8090
8273
|
resolveFlexScreenSize
|
|
8091
8274
|
};
|