jscad-electronics 0.0.148 → 0.0.150
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 +343 -6
- package/dist/index.js +1011 -334
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +856 -123
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -349,7 +349,7 @@ var BGA = ({
|
|
|
349
349
|
}) => {
|
|
350
350
|
const bodyHeight = packageHeight - standoffHeight;
|
|
351
351
|
const bodyOffset = standoffHeight + bodyHeight / 2;
|
|
352
|
-
const ballOffset =
|
|
352
|
+
const ballOffset = Math.max(standoffHeight / 2, ballDiameter / 2);
|
|
353
353
|
const ballsSoup = footprintString ? fp.string(footprintString).circuitJson() : null;
|
|
354
354
|
return /* @__PURE__ */ jsxs10(Fragment10, { children: [
|
|
355
355
|
/* @__PURE__ */ jsx10(Translate2, { z: bodyOffset, children: /* @__PURE__ */ jsx10(Colorize, { color: "#555", children: /* @__PURE__ */ jsx10(Cuboid10, { size: [packageWidth, packageLength, bodyHeight] }) }) }),
|
|
@@ -602,18 +602,31 @@ var Crystal = ({
|
|
|
602
602
|
import { fp as fp2 } from "@tscircuit/footprinter";
|
|
603
603
|
|
|
604
604
|
// lib/FootprintPad.tsx
|
|
605
|
-
import {
|
|
605
|
+
import {
|
|
606
|
+
Colorize as Colorize4,
|
|
607
|
+
Cuboid as Cuboid12,
|
|
608
|
+
ExtrudeLinear as ExtrudeLinear2,
|
|
609
|
+
Polygon as Polygon2,
|
|
610
|
+
Translate as Translate4
|
|
611
|
+
} from "jscad-fiber";
|
|
606
612
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
613
|
+
var PAD_THICKNESS = 0.01;
|
|
607
614
|
var FootprintPad = ({
|
|
608
615
|
pad,
|
|
609
616
|
isPin1
|
|
610
617
|
}) => {
|
|
618
|
+
const color = isPin1 ? [0, 255, 0] : [255, 0, 0];
|
|
611
619
|
if (pad.shape === "rect") {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
620
|
+
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
|
+
if (pad.shape === "polygon") {
|
|
623
|
+
const points = (pad.points ?? []).map(
|
|
624
|
+
({ x, y }) => [x, y]
|
|
625
|
+
);
|
|
626
|
+
if (points.length < 3) return null;
|
|
627
|
+
return /* @__PURE__ */ jsx13(Colorize4, { color, children: /* @__PURE__ */ jsx13(Translate4, { offset: [0, 0, -5e-3], children: /* @__PURE__ */ jsx13(ExtrudeLinear2, { height: PAD_THICKNESS, children: /* @__PURE__ */ jsx13(Polygon2, { points }) }) }) });
|
|
616
628
|
}
|
|
629
|
+
throw new Error("Shape not supported: " + pad.shape);
|
|
617
630
|
};
|
|
618
631
|
|
|
619
632
|
// lib/FootprintPlatedHole.tsx
|
|
@@ -744,10 +757,11 @@ var ExtrudedPads = ({
|
|
|
744
757
|
};
|
|
745
758
|
|
|
746
759
|
// lib/Footprinter3d.tsx
|
|
747
|
-
import { fp as
|
|
760
|
+
import { fp as fp5 } from "@tscircuit/footprinter";
|
|
761
|
+
import { Rotate as Rotate17, Translate as Translate37 } from "jscad-fiber";
|
|
748
762
|
|
|
749
763
|
// lib/DualInlinePackage.tsx
|
|
750
|
-
import { Polygon as
|
|
764
|
+
import { Polygon as Polygon3, ExtrudeLinear as ExtrudeLinear3, Rotate as Rotate3, Translate as Translate6 } from "jscad-fiber";
|
|
751
765
|
|
|
752
766
|
// lib/utils/range.ts
|
|
753
767
|
var range = (end) => Array.from({ length: end }, (_, i) => i);
|
|
@@ -842,8 +856,8 @@ var heightAboveSurface = 0.5;
|
|
|
842
856
|
var DipPinLeg = ({ x, y, z }) => {
|
|
843
857
|
const isRotated = x > 0;
|
|
844
858
|
return /* @__PURE__ */ jsxs15(Fragment13, { children: [
|
|
845
|
-
/* @__PURE__ */ jsx16(Translate6, { offset: { x: x + 0.25 / 2, y, z }, children: /* @__PURE__ */ jsx16(Rotate3, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx16(
|
|
846
|
-
|
|
859
|
+
/* @__PURE__ */ jsx16(Translate6, { offset: { x: x + 0.25 / 2, y, z }, children: /* @__PURE__ */ jsx16(Rotate3, { rotation: ["-90deg", 0, "90deg"], children: /* @__PURE__ */ jsx16(ExtrudeLinear3, { height: 0.25, children: /* @__PURE__ */ jsx16(
|
|
860
|
+
Polygon3,
|
|
847
861
|
{
|
|
848
862
|
points: svgPathPoints.slice().reverse().map((p) => [p.x, p.y])
|
|
849
863
|
}
|
|
@@ -856,8 +870,8 @@ var DipPinLeg = ({ x, y, z }) => {
|
|
|
856
870
|
y: y + (isRotated ? 1 : -1),
|
|
857
871
|
z
|
|
858
872
|
},
|
|
859
|
-
children: /* @__PURE__ */ jsx16(Rotate3, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx16(
|
|
860
|
-
|
|
873
|
+
children: /* @__PURE__ */ jsx16(Rotate3, { rotation: ["-90deg", "90deg", isRotated ? "180deg" : "0deg"], children: /* @__PURE__ */ jsx16(ExtrudeLinear3, { height: 2, children: /* @__PURE__ */ jsx16(
|
|
874
|
+
Polygon3,
|
|
861
875
|
{
|
|
862
876
|
points: getExpandedStroke(
|
|
863
877
|
[
|
|
@@ -911,8 +925,8 @@ var Dip = ({
|
|
|
911
925
|
|
|
912
926
|
// lib/SmdChipLead.tsx
|
|
913
927
|
import {
|
|
914
|
-
Polygon as
|
|
915
|
-
ExtrudeLinear as
|
|
928
|
+
Polygon as Polygon4,
|
|
929
|
+
ExtrudeLinear as ExtrudeLinear4,
|
|
916
930
|
Translate as Translate7,
|
|
917
931
|
Rotate as Rotate4,
|
|
918
932
|
Colorize as Colorize6
|
|
@@ -943,7 +957,7 @@ var SmdChipLead = (props) => {
|
|
|
943
957
|
const N = 15;
|
|
944
958
|
const points = Array.from({ length: N }).map((_, i) => i / (N - 1) * bodyDistance).map((x) => [x, calculateSCurve(x, props)]);
|
|
945
959
|
const polygon = getExpandedStroke(points, thickness);
|
|
946
|
-
return /* @__PURE__ */ jsx17(Colorize6, { color: "#fff", children: /* @__PURE__ */ jsx17(Translate7, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ jsx17(Rotate4, { rotation: ["90deg", 0, rotation ?? 0], children: /* @__PURE__ */ jsx17(Translate7, { offset: { x: 0, y: 0, z: -width10 / 2 }, children: /* @__PURE__ */ jsx17(
|
|
960
|
+
return /* @__PURE__ */ jsx17(Colorize6, { color: "#fff", children: /* @__PURE__ */ jsx17(Translate7, { offset: { z: 0, y: 0, x: 0, ...props.position }, children: /* @__PURE__ */ jsx17(Rotate4, { 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]) }) }) }) }) }) });
|
|
947
961
|
};
|
|
948
962
|
|
|
949
963
|
// lib/Tssop.tsx
|
|
@@ -1934,8 +1948,8 @@ var FemaleHeaderRow = ({
|
|
|
1934
1948
|
import {
|
|
1935
1949
|
Colorize as Colorize10,
|
|
1936
1950
|
Cylinder as Cylinder4,
|
|
1937
|
-
ExtrudeLinear as
|
|
1938
|
-
Polygon as
|
|
1951
|
+
ExtrudeLinear as ExtrudeLinear5,
|
|
1952
|
+
Polygon as Polygon5,
|
|
1939
1953
|
Rotate as Rotate6,
|
|
1940
1954
|
RoundedCuboid,
|
|
1941
1955
|
Translate as Translate9
|
|
@@ -2110,7 +2124,7 @@ var PushButtonLeg = (props) => {
|
|
|
2110
2124
|
y: position?.y || 0,
|
|
2111
2125
|
z: position?.z || 0
|
|
2112
2126
|
},
|
|
2113
|
-
children: /* @__PURE__ */ jsx29(Rotate6, { rotation: [0, 55, rotation], children: /* @__PURE__ */ jsx29(
|
|
2127
|
+
children: /* @__PURE__ */ jsx29(Rotate6, { rotation: [0, 55, rotation], children: /* @__PURE__ */ jsx29(ExtrudeLinear5, { height: width10, children: /* @__PURE__ */ jsx29(Polygon5, { points: polygon.map((p) => [p.y, p.x]) }) }) })
|
|
2114
2128
|
}
|
|
2115
2129
|
) });
|
|
2116
2130
|
};
|
|
@@ -2444,8 +2458,8 @@ var SMA = () => {
|
|
|
2444
2458
|
import { Cuboid as Cuboid21, Colorize as Colorize14, Union as Union7, Hull as Hull9, Translate as Translate13 } from "jscad-fiber";
|
|
2445
2459
|
import { Fragment as Fragment31, jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2446
2460
|
var SMB = () => {
|
|
2447
|
-
const bodyWidth = 4.
|
|
2448
|
-
const bodyLength10 =
|
|
2461
|
+
const bodyWidth = 4.6;
|
|
2462
|
+
const bodyLength10 = 4;
|
|
2449
2463
|
const bodyHeight = 2.3;
|
|
2450
2464
|
const padWidth = 1.45;
|
|
2451
2465
|
const padThickness = 0.12;
|
|
@@ -2735,12 +2749,14 @@ var SOD123FL = () => {
|
|
|
2735
2749
|
// lib/sod-123W.tsx
|
|
2736
2750
|
import { Colorize as Colorize19, Cuboid as Cuboid26, Hull as Hull14, Translate as Translate18, Union as Union12 } from "jscad-fiber";
|
|
2737
2751
|
import { Fragment as Fragment36, jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2738
|
-
var SOD123W = (
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
const
|
|
2752
|
+
var SOD123W = ({
|
|
2753
|
+
bodyWidth = 2.6,
|
|
2754
|
+
bodyLength: bodyLength10 = 1.7,
|
|
2755
|
+
bodyHeight = 1
|
|
2756
|
+
} = {}) => {
|
|
2757
|
+
const fullWidth = bodyWidth;
|
|
2758
|
+
const padWidth = bodyLength10 * 0.53;
|
|
2759
|
+
const padLength = bodyWidth * 0.35;
|
|
2744
2760
|
const padThickness = 0.2;
|
|
2745
2761
|
const leftPadCenterX = -(fullWidth / 2 - 0.075);
|
|
2746
2762
|
const rightPadCenterX = fullWidth / 2 - 0.075;
|
|
@@ -3009,17 +3025,19 @@ var SOD923 = () => {
|
|
|
3009
3025
|
|
|
3010
3026
|
// lib/SOT-223.tsx
|
|
3011
3027
|
import { Fragment as Fragment40, jsx as jsx44, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
3012
|
-
var SOT223 = (
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3028
|
+
var SOT223 = ({
|
|
3029
|
+
fullWidth = 6.6,
|
|
3030
|
+
bodyWidth = 3.5,
|
|
3031
|
+
bodyLength: bodyLength10 = 6.5,
|
|
3032
|
+
bodyHeight = 1.7,
|
|
3033
|
+
leadWidth = 0.7,
|
|
3034
|
+
tabLeadWidth = 3,
|
|
3035
|
+
padPitch = 2.3,
|
|
3036
|
+
leadHeight = 0.75
|
|
3037
|
+
} = {}) => {
|
|
3038
|
+
const leftLeadWidth = tabLeadWidth;
|
|
3019
3039
|
const leadThickness = 0.25;
|
|
3020
|
-
const leadHeight = 0.75;
|
|
3021
3040
|
const padContactLength = 0.5;
|
|
3022
|
-
const padPitch = 2.3;
|
|
3023
3041
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
3024
3042
|
return /* @__PURE__ */ jsxs40(Fragment40, { children: [
|
|
3025
3043
|
/* @__PURE__ */ jsx44(
|
|
@@ -3901,85 +3919,73 @@ var MS013 = ({
|
|
|
3901
3919
|
import {
|
|
3902
3920
|
Colorize as Colorize27,
|
|
3903
3921
|
Cuboid as Cuboid34,
|
|
3904
|
-
Hull as Hull19,
|
|
3905
|
-
Rotate as Rotate10,
|
|
3906
|
-
Translate as Translate22,
|
|
3907
3922
|
Cylinder as Cylinder7,
|
|
3908
|
-
|
|
3923
|
+
Rotate as Rotate10,
|
|
3924
|
+
Subtract as Subtract4,
|
|
3925
|
+
Translate as Translate22
|
|
3909
3926
|
} from "jscad-fiber";
|
|
3910
3927
|
import { Fragment as Fragment52, jsx as jsx56, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
3911
|
-
var
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
ChipBody,
|
|
3928
|
+
var TO220_DEFAULT_LEADS = [
|
|
3929
|
+
{ x: -2.54, y: -1 },
|
|
3930
|
+
{ x: 0, y: -1 },
|
|
3931
|
+
{ x: 2.54, y: -1 }
|
|
3932
|
+
];
|
|
3933
|
+
var TO220 = ({
|
|
3934
|
+
mouldedTab = false,
|
|
3935
|
+
leads = TO220_DEFAULT_LEADS,
|
|
3936
|
+
bodyWidth = 10,
|
|
3937
|
+
bodyThickness = 4.5,
|
|
3938
|
+
bodyHeight = 9.2,
|
|
3939
|
+
tabHeight = 6.4,
|
|
3940
|
+
tabThickness = 1.4,
|
|
3941
|
+
mountingHoleDiameter = 3.6,
|
|
3942
|
+
standoff = 3,
|
|
3943
|
+
leadLength = 3,
|
|
3944
|
+
bodyColor = "#222",
|
|
3945
|
+
tabColor = "#ccc",
|
|
3946
|
+
leadColor = "#d4b106"
|
|
3947
|
+
} = {}) => {
|
|
3948
|
+
const centerX = leads.reduce((sum, lead) => sum + lead.x, 0) / leads.length;
|
|
3949
|
+
const centerY = leads.reduce((sum, lead) => sum + lead.y, 0) / leads.length;
|
|
3950
|
+
const bodyBottom = standoff;
|
|
3951
|
+
const bodyTop = bodyBottom + bodyHeight;
|
|
3952
|
+
const tabTop = bodyTop + tabHeight;
|
|
3953
|
+
const tabY = centerY + (bodyThickness - tabThickness) / 2;
|
|
3954
|
+
const holeZ = tabTop - Math.max(mountingHoleDiameter * 0.8, 2.6);
|
|
3955
|
+
const leadWidth = 0.8;
|
|
3956
|
+
const leadThickness = 0.5;
|
|
3957
|
+
return /* @__PURE__ */ jsxs52(Fragment52, { children: [
|
|
3958
|
+
/* @__PURE__ */ jsx56(Colorize27, { color: bodyColor, children: /* @__PURE__ */ jsx56(
|
|
3959
|
+
Cuboid34,
|
|
3960
|
+
{
|
|
3961
|
+
size: [bodyWidth, bodyThickness, bodyHeight],
|
|
3962
|
+
center: [centerX, centerY, bodyBottom + bodyHeight / 2]
|
|
3963
|
+
}
|
|
3964
|
+
) }),
|
|
3965
|
+
/* @__PURE__ */ jsx56(Colorize27, { color: mouldedTab ? bodyColor : tabColor, children: /* @__PURE__ */ jsxs52(Subtract4, { children: [
|
|
3966
|
+
/* @__PURE__ */ jsx56(
|
|
3967
|
+
Cuboid34,
|
|
3952
3968
|
{
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
height: bodyHeight,
|
|
3956
|
-
center: { x: fullLength10, y: 0, z: -2.4 },
|
|
3957
|
-
includeNotch: false,
|
|
3958
|
-
straightHeightRatio: 0.3,
|
|
3959
|
-
taperRatio: 0.04,
|
|
3960
|
-
heightAboveSurface: 1
|
|
3969
|
+
size: [bodyWidth, tabThickness, tabHeight],
|
|
3970
|
+
center: [centerX, tabY, bodyTop + tabHeight / 2]
|
|
3961
3971
|
}
|
|
3962
|
-
)
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
/* @__PURE__ */ jsx56(Translate22, { center: [x, y, z], children: /* @__PURE__ */ jsx56(Cuboid34, { size: [prongLength + 0.1, prongWidth, prongHeight] }) })
|
|
3980
|
-
] }, `prong-${i}`);
|
|
3981
|
-
}) })
|
|
3982
|
-
] }) });
|
|
3972
|
+
),
|
|
3973
|
+
/* @__PURE__ */ jsx56(Rotate10, { rotation: ["90deg", 0, 0], children: /* @__PURE__ */ jsx56(Translate22, { center: [centerX, holeZ, -tabY], children: /* @__PURE__ */ jsx56(
|
|
3974
|
+
Cylinder7,
|
|
3975
|
+
{
|
|
3976
|
+
radius: mountingHoleDiameter / 2,
|
|
3977
|
+
height: tabThickness * 3
|
|
3978
|
+
}
|
|
3979
|
+
) }) })
|
|
3980
|
+
] }) }),
|
|
3981
|
+
leads.map((lead) => /* @__PURE__ */ jsx56(Colorize27, { color: leadColor, children: /* @__PURE__ */ jsx56(
|
|
3982
|
+
Cuboid34,
|
|
3983
|
+
{
|
|
3984
|
+
size: [leadWidth, leadThickness, standoff + leadLength],
|
|
3985
|
+
center: [lead.x, lead.y, (standoff - leadLength) / 2]
|
|
3986
|
+
}
|
|
3987
|
+
) }, `lead-${lead.x}-${lead.y}`))
|
|
3988
|
+
] });
|
|
3983
3989
|
};
|
|
3984
3990
|
|
|
3985
3991
|
// lib/SOT-457.tsx
|
|
@@ -4183,50 +4189,106 @@ var SOT963 = () => {
|
|
|
4183
4189
|
import {
|
|
4184
4190
|
Colorize as Colorize28,
|
|
4185
4191
|
Cuboid as Cuboid36,
|
|
4186
|
-
Hull as
|
|
4192
|
+
Hull as Hull19,
|
|
4187
4193
|
Translate as Translate23,
|
|
4188
4194
|
Cylinder as Cylinder8,
|
|
4189
4195
|
Subtract as Subtract5
|
|
4190
4196
|
} from "jscad-fiber";
|
|
4191
|
-
import { jsx as jsx59, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
4192
|
-
var
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4197
|
+
import { Fragment as Fragment55, jsx as jsx59, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
4198
|
+
var TO92_DEFAULT_LEADS = [
|
|
4199
|
+
{ x: -1.27, y: 0.98 },
|
|
4200
|
+
{ x: 0, y: 2.25 },
|
|
4201
|
+
{ x: 1.27, y: 0.98 }
|
|
4202
|
+
];
|
|
4203
|
+
var splitOuterLeads = (leads) => {
|
|
4204
|
+
let outer = [leads[0], leads[leads.length - 1]];
|
|
4205
|
+
let best = -1;
|
|
4206
|
+
for (let i = 0; i < leads.length; i++) {
|
|
4207
|
+
for (let j = i + 1; j < leads.length; j++) {
|
|
4208
|
+
const separation = Math.hypot(
|
|
4209
|
+
leads[i].x - leads[j].x,
|
|
4210
|
+
leads[i].y - leads[j].y
|
|
4211
|
+
);
|
|
4212
|
+
if (separation > best) {
|
|
4213
|
+
best = separation;
|
|
4214
|
+
outer = [leads[i], leads[j]];
|
|
4215
|
+
}
|
|
4216
|
+
}
|
|
4217
|
+
}
|
|
4218
|
+
return { outer, separation: best };
|
|
4219
|
+
};
|
|
4220
|
+
var TO92 = ({
|
|
4221
|
+
bodyDiameter = 4.8,
|
|
4222
|
+
bodyHeight = 4.5,
|
|
4223
|
+
flatCut = 1.1,
|
|
4224
|
+
leads = TO92_DEFAULT_LEADS,
|
|
4225
|
+
standoff = 1.5,
|
|
4226
|
+
leadLength = 3,
|
|
4227
|
+
bodyColor = "#222"
|
|
4228
|
+
} = {}) => {
|
|
4229
|
+
const bodyRadius = bodyDiameter / 2;
|
|
4196
4230
|
const legWidth = 0.4;
|
|
4197
4231
|
const legThickness = 0.25;
|
|
4198
|
-
const
|
|
4199
|
-
const
|
|
4200
|
-
const
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4232
|
+
const { outer, separation } = splitOuterLeads(leads);
|
|
4233
|
+
const [first, last] = outer;
|
|
4234
|
+
const bodyCenter = {
|
|
4235
|
+
x: (first.x + last.x) / 2,
|
|
4236
|
+
y: (first.y + last.y) / 2
|
|
4237
|
+
};
|
|
4238
|
+
const axisLength = Math.max(separation, 1e-3);
|
|
4239
|
+
const axis = {
|
|
4240
|
+
x: (last.x - first.x) / axisLength,
|
|
4241
|
+
y: (last.y - first.y) / axisLength
|
|
4242
|
+
};
|
|
4243
|
+
const exitPitch = separation / 2;
|
|
4244
|
+
const exitFor = (index) => {
|
|
4245
|
+
const offset = (index - (leads.length - 1) / 2) * exitPitch;
|
|
4246
|
+
return {
|
|
4247
|
+
x: bodyCenter.x + axis.x * offset,
|
|
4248
|
+
y: bodyCenter.y + axis.y * offset
|
|
4249
|
+
};
|
|
4250
|
+
};
|
|
4251
|
+
const leadSize = [
|
|
4252
|
+
legThickness,
|
|
4204
4253
|
legWidth,
|
|
4205
4254
|
legThickness
|
|
4206
4255
|
];
|
|
4207
|
-
|
|
4208
|
-
const leadMidPosA = [0, 0, -1.32];
|
|
4209
|
-
const leadMidPosB = [0, 1.28, -2.72];
|
|
4210
|
-
const leadTipPos2 = [0, 1.28, -8.9];
|
|
4211
|
-
const sideLeadZ = -7.5;
|
|
4212
|
-
return /* @__PURE__ */ jsxs55(Translate23, { center: [0, 1, 10.5], children: [
|
|
4256
|
+
return /* @__PURE__ */ jsxs55(Fragment55, { children: [
|
|
4213
4257
|
/* @__PURE__ */ jsx59(Colorize28, { color: bodyColor, children: /* @__PURE__ */ jsxs55(Subtract5, { children: [
|
|
4214
|
-
/* @__PURE__ */ jsx59(
|
|
4215
|
-
|
|
4258
|
+
/* @__PURE__ */ jsx59(
|
|
4259
|
+
Translate23,
|
|
4260
|
+
{
|
|
4261
|
+
center: [bodyCenter.x, bodyCenter.y, standoff + bodyHeight / 2],
|
|
4262
|
+
children: /* @__PURE__ */ jsx59(Cylinder8, { radius: bodyRadius, height: bodyHeight })
|
|
4263
|
+
}
|
|
4264
|
+
),
|
|
4265
|
+
/* @__PURE__ */ jsx59(
|
|
4266
|
+
Translate23,
|
|
4267
|
+
{
|
|
4268
|
+
center: [
|
|
4269
|
+
bodyCenter.x,
|
|
4270
|
+
bodyCenter.y - (bodyRadius - flatCut / 2),
|
|
4271
|
+
standoff + bodyHeight / 2
|
|
4272
|
+
],
|
|
4273
|
+
children: /* @__PURE__ */ jsx59(Cuboid36, { size: [bodyRadius * 2, flatCut, bodyHeight + 0.2] })
|
|
4274
|
+
}
|
|
4275
|
+
)
|
|
4216
4276
|
] }) }),
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
/* @__PURE__ */
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4277
|
+
leads.map((lead, index) => {
|
|
4278
|
+
const exit = exitFor(index);
|
|
4279
|
+
return /* @__PURE__ */ jsxs55(Translate23, { center: [0, 0, 0], children: [
|
|
4280
|
+
/* @__PURE__ */ jsxs55(Hull19, { children: [
|
|
4281
|
+
/* @__PURE__ */ jsx59(Translate23, { center: [lead.x, lead.y, 0], children: /* @__PURE__ */ jsx59(Cuboid36, { size: leadSize }) }),
|
|
4282
|
+
/* @__PURE__ */ jsx59(Translate23, { center: [exit.x, exit.y, standoff], children: /* @__PURE__ */ jsx59(Cuboid36, { size: leadSize }) })
|
|
4283
|
+
] }),
|
|
4284
|
+
/* @__PURE__ */ jsx59(Translate23, { center: [lead.x, lead.y, -leadLength / 2], children: /* @__PURE__ */ jsx59(Cuboid36, { size: [legThickness, legWidth, leadLength] }) })
|
|
4285
|
+
] }, `lead-${lead.x}-${lead.y}`);
|
|
4286
|
+
})
|
|
4225
4287
|
] });
|
|
4226
4288
|
};
|
|
4227
4289
|
|
|
4228
4290
|
// lib/SOT-363.tsx
|
|
4229
|
-
import { Fragment as
|
|
4291
|
+
import { Fragment as Fragment56, jsx as jsx60, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
4230
4292
|
var SOT363 = () => {
|
|
4231
4293
|
const fullWidth = 2;
|
|
4232
4294
|
const bodyWidth = 1.25;
|
|
@@ -4237,7 +4299,7 @@ var SOT363 = () => {
|
|
|
4237
4299
|
const leadHeight = 0.85;
|
|
4238
4300
|
const padContactLength = 0.3;
|
|
4239
4301
|
const extendedBodyDistance = fullWidth - bodyWidth;
|
|
4240
|
-
return /* @__PURE__ */ jsxs56(
|
|
4302
|
+
return /* @__PURE__ */ jsxs56(Fragment56, { children: [
|
|
4241
4303
|
/* @__PURE__ */ jsx60(
|
|
4242
4304
|
SmdChipLead,
|
|
4243
4305
|
{
|
|
@@ -4359,7 +4421,7 @@ var SOT_363_default = SOT363;
|
|
|
4359
4421
|
|
|
4360
4422
|
// lib/SOT-886.tsx
|
|
4361
4423
|
import { Cuboid as Cuboid37 } from "jscad-fiber";
|
|
4362
|
-
import { Fragment as
|
|
4424
|
+
import { Fragment as Fragment57, jsx as jsx61, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
4363
4425
|
var SOT886 = () => {
|
|
4364
4426
|
const bodyWidth = 1;
|
|
4365
4427
|
const bodyLength10 = 1.45;
|
|
@@ -4370,7 +4432,7 @@ var SOT886 = () => {
|
|
|
4370
4432
|
const pitch = 0.5;
|
|
4371
4433
|
const pinsPerSide = 3;
|
|
4372
4434
|
const pinSpan = pitch * (pinsPerSide - 1);
|
|
4373
|
-
return /* @__PURE__ */ jsxs57(
|
|
4435
|
+
return /* @__PURE__ */ jsxs57(Fragment57, { children: [
|
|
4374
4436
|
/* @__PURE__ */ jsx61(
|
|
4375
4437
|
ChipBody,
|
|
4376
4438
|
{
|
|
@@ -4419,11 +4481,11 @@ var SOT886 = () => {
|
|
|
4419
4481
|
|
|
4420
4482
|
// lib/sod-323.tsx
|
|
4421
4483
|
import { Colorize as Colorize29, Cuboid as Cuboid38 } from "jscad-fiber";
|
|
4422
|
-
import { Fragment as
|
|
4484
|
+
import { Fragment as Fragment58, jsx as jsx62, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
4423
4485
|
var SOD323 = () => {
|
|
4424
4486
|
const fullWidth = 2.5;
|
|
4425
|
-
const bodyLength10 = 1.
|
|
4426
|
-
const bodyWidth = 1.
|
|
4487
|
+
const bodyLength10 = 1.4;
|
|
4488
|
+
const bodyWidth = 1.8;
|
|
4427
4489
|
const bodyHeight = 0.95;
|
|
4428
4490
|
const leadWidth = 0.3;
|
|
4429
4491
|
const leadThickness = 0.175;
|
|
@@ -4431,7 +4493,7 @@ var SOD323 = () => {
|
|
|
4431
4493
|
const padCenterX = bodyWidth / 2;
|
|
4432
4494
|
const bodyDistance = 0.45;
|
|
4433
4495
|
const leadHeight = 0.7;
|
|
4434
|
-
return /* @__PURE__ */ jsxs58(
|
|
4496
|
+
return /* @__PURE__ */ jsxs58(Fragment58, { children: [
|
|
4435
4497
|
/* @__PURE__ */ jsx62(
|
|
4436
4498
|
SmdChipLead,
|
|
4437
4499
|
{
|
|
@@ -4490,8 +4552,8 @@ var SOD323 = () => {
|
|
|
4490
4552
|
};
|
|
4491
4553
|
|
|
4492
4554
|
// lib/sod-323F.tsx
|
|
4493
|
-
import { Colorize as Colorize30, Cuboid as Cuboid39, Hull as
|
|
4494
|
-
import { Fragment as
|
|
4555
|
+
import { Colorize as Colorize30, Cuboid as Cuboid39, Hull as Hull21, Translate as Translate25, Union as Union17 } from "jscad-fiber";
|
|
4556
|
+
import { Fragment as Fragment59, jsx as jsx63, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
4495
4557
|
var SOD323F = () => {
|
|
4496
4558
|
const fullWidth = 1.7;
|
|
4497
4559
|
const bodyLength10 = 1.25;
|
|
@@ -4503,7 +4565,7 @@ var SOD323F = () => {
|
|
|
4503
4565
|
const rightPadCenterX = fullWidth / 2 + padLength / 2;
|
|
4504
4566
|
const taperOffset = 0.2;
|
|
4505
4567
|
const straightHeight = padThickness;
|
|
4506
|
-
return /* @__PURE__ */ jsxs59(
|
|
4568
|
+
return /* @__PURE__ */ jsxs59(Fragment59, { children: [
|
|
4507
4569
|
/* @__PURE__ */ jsx63(
|
|
4508
4570
|
Cuboid39,
|
|
4509
4571
|
{
|
|
@@ -4522,7 +4584,7 @@ var SOD323F = () => {
|
|
|
4522
4584
|
),
|
|
4523
4585
|
/* @__PURE__ */ jsx63(Colorize30, { color: "#222", children: /* @__PURE__ */ jsxs59(Union17, { children: [
|
|
4524
4586
|
/* @__PURE__ */ jsx63(Translate25, { z: straightHeight / 2, children: /* @__PURE__ */ jsx63(Cuboid39, { size: [fullWidth, bodyLength10, straightHeight] }) }),
|
|
4525
|
-
/* @__PURE__ */ jsxs59(
|
|
4587
|
+
/* @__PURE__ */ jsxs59(Hull21, { children: [
|
|
4526
4588
|
/* @__PURE__ */ jsx63(Translate25, { z: straightHeight, children: /* @__PURE__ */ jsx63(Cuboid39, { size: [fullWidth, bodyLength10, 0.01] }) }),
|
|
4527
4589
|
/* @__PURE__ */ jsx63(Translate25, { z: bodyHeight, children: /* @__PURE__ */ jsx63(
|
|
4528
4590
|
Cuboid39,
|
|
@@ -4545,7 +4607,7 @@ var SOD323F = () => {
|
|
|
4545
4607
|
|
|
4546
4608
|
// lib/sod-323FL.tsx
|
|
4547
4609
|
import { Colorize as Colorize31, Cuboid as Cuboid40 } from "jscad-fiber";
|
|
4548
|
-
import { Fragment as
|
|
4610
|
+
import { Fragment as Fragment60, jsx as jsx64, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
4549
4611
|
var SOD323FL = () => {
|
|
4550
4612
|
const fullWidth = 1.775;
|
|
4551
4613
|
const bodyLength10 = 1.25;
|
|
@@ -4556,7 +4618,7 @@ var SOD323FL = () => {
|
|
|
4556
4618
|
const leftPadCenterX = -fullWidth / 2 - padLength / 2 + 0.04;
|
|
4557
4619
|
const rightPadCenterX = fullWidth / 2 + padLength / 2 - 0.04;
|
|
4558
4620
|
const taperOffset = 0.2;
|
|
4559
|
-
return /* @__PURE__ */ jsxs60(
|
|
4621
|
+
return /* @__PURE__ */ jsxs60(Fragment60, { children: [
|
|
4560
4622
|
/* @__PURE__ */ jsx64(
|
|
4561
4623
|
Cuboid40,
|
|
4562
4624
|
{
|
|
@@ -4599,10 +4661,10 @@ var SOD323FL = () => {
|
|
|
4599
4661
|
|
|
4600
4662
|
// lib/AxialCapacitor.tsx
|
|
4601
4663
|
import { Colorize as Colorize32, Cylinder as Cylinder9, Rotate as Rotate11, Sphere as Sphere2, Translate as Translate27 } from "jscad-fiber";
|
|
4602
|
-
import { Fragment as
|
|
4664
|
+
import { Fragment as Fragment61, jsx as jsx65, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
4603
4665
|
var AxialCapacitor = ({ pitch = 10 }) => {
|
|
4604
4666
|
const heightToCenterOfCapacitor = 0.5 + 4 / 2;
|
|
4605
|
-
return /* @__PURE__ */ jsxs61(
|
|
4667
|
+
return /* @__PURE__ */ jsxs61(Fragment61, { children: [
|
|
4606
4668
|
/* @__PURE__ */ jsx65(Cylinder9, { height: 4, radius: 0.5, center: [-pitch / 2, 0, 0.5] }),
|
|
4607
4669
|
/* @__PURE__ */ jsx65(
|
|
4608
4670
|
Sphere2,
|
|
@@ -4636,7 +4698,7 @@ var AxialCapacitor = ({ pitch = 10 }) => {
|
|
|
4636
4698
|
|
|
4637
4699
|
// lib/stampboard.tsx
|
|
4638
4700
|
import { Colorize as Colorize33, Cuboid as Cuboid41, Cylinder as Cylinder10, Subtract as Subtract6, Union as Union19 } from "jscad-fiber";
|
|
4639
|
-
import { Fragment as
|
|
4701
|
+
import { Fragment as Fragment62, jsx as jsx66, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
4640
4702
|
var StampBoard = ({
|
|
4641
4703
|
bodyWidth = 21,
|
|
4642
4704
|
boardThickness = 0.5,
|
|
@@ -4769,7 +4831,7 @@ var StampBoard = ({
|
|
|
4769
4831
|
},
|
|
4770
4832
|
index
|
|
4771
4833
|
));
|
|
4772
|
-
return /* @__PURE__ */ jsxs62(
|
|
4834
|
+
return /* @__PURE__ */ jsxs62(Fragment62, { children: [
|
|
4773
4835
|
boardBody,
|
|
4774
4836
|
/* @__PURE__ */ jsx66(Colorize33, { color: "#FFD700", children: innerHoles ? /* @__PURE__ */ jsxs62(Subtract6, { children: [
|
|
4775
4837
|
/* @__PURE__ */ jsx66(Union19, { children: pads.map((pad, index) => /* @__PURE__ */ jsx66(
|
|
@@ -4854,7 +4916,7 @@ var Screen = ({
|
|
|
4854
4916
|
var Display = Screen;
|
|
4855
4917
|
|
|
4856
4918
|
// lib/MountedPcbModule.tsx
|
|
4857
|
-
import { Fragment as
|
|
4919
|
+
import { Fragment as Fragment63, jsx as jsx68, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
4858
4920
|
var MountedPcbModule = ({
|
|
4859
4921
|
numPins = 5,
|
|
4860
4922
|
rows = 1,
|
|
@@ -5022,7 +5084,7 @@ var MountedPcbModule = ({
|
|
|
5022
5084
|
},
|
|
5023
5085
|
`female-pin-3d-${index}`
|
|
5024
5086
|
));
|
|
5025
|
-
return /* @__PURE__ */ jsxs64(
|
|
5087
|
+
return /* @__PURE__ */ jsxs64(Fragment63, { children: [
|
|
5026
5088
|
boardBody,
|
|
5027
5089
|
platedHoles,
|
|
5028
5090
|
!female && !nopin && headerPins,
|
|
@@ -5043,8 +5105,8 @@ var MountedPcbModule = ({
|
|
|
5043
5105
|
};
|
|
5044
5106
|
|
|
5045
5107
|
// lib/SOD723.tsx
|
|
5046
|
-
import { Colorize as Colorize36, Cuboid as Cuboid44, Hull as
|
|
5047
|
-
import { Fragment as
|
|
5108
|
+
import { Colorize as Colorize36, Cuboid as Cuboid44, Hull as Hull23, Translate as Translate29, Union as Union20 } from "jscad-fiber";
|
|
5109
|
+
import { Fragment as Fragment64, jsx as jsx69, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
5048
5110
|
var SOD723 = () => {
|
|
5049
5111
|
const fullWidth = 1.4;
|
|
5050
5112
|
const bodyLength10 = 0.6;
|
|
@@ -5057,7 +5119,7 @@ var SOD723 = () => {
|
|
|
5057
5119
|
const rightPadCenterX = bodyWidth / 2 - padLength / 2 + 0.15;
|
|
5058
5120
|
const taperOffset = 0.2;
|
|
5059
5121
|
const straightHeight = bodyHeight * 0.24;
|
|
5060
|
-
return /* @__PURE__ */ jsxs65(
|
|
5122
|
+
return /* @__PURE__ */ jsxs65(Fragment64, { children: [
|
|
5061
5123
|
/* @__PURE__ */ jsx69(
|
|
5062
5124
|
Cuboid44,
|
|
5063
5125
|
{
|
|
@@ -5076,7 +5138,7 @@ var SOD723 = () => {
|
|
|
5076
5138
|
),
|
|
5077
5139
|
/* @__PURE__ */ jsx69(Colorize36, { color: "#222", children: /* @__PURE__ */ jsxs65(Union20, { children: [
|
|
5078
5140
|
/* @__PURE__ */ jsx69(Translate29, { z: straightHeight / 2, children: /* @__PURE__ */ jsx69(Cuboid44, { size: [bodyWidth, bodyLength10, straightHeight] }) }),
|
|
5079
|
-
/* @__PURE__ */ jsxs65(
|
|
5141
|
+
/* @__PURE__ */ jsxs65(Hull23, { children: [
|
|
5080
5142
|
/* @__PURE__ */ jsx69(Translate29, { z: straightHeight, children: /* @__PURE__ */ jsx69(Cuboid44, { size: [bodyWidth, bodyLength10, 0.01] }) }),
|
|
5081
5143
|
/* @__PURE__ */ jsx69(Translate29, { z: bodyHeight, children: /* @__PURE__ */ jsx69(
|
|
5082
5144
|
Cuboid44,
|
|
@@ -5107,7 +5169,7 @@ import {
|
|
|
5107
5169
|
Subtract as Subtract9,
|
|
5108
5170
|
Translate as Translate30
|
|
5109
5171
|
} from "jscad-fiber";
|
|
5110
|
-
import { Fragment as
|
|
5172
|
+
import { Fragment as Fragment65, jsx as jsx70, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
5111
5173
|
var JSTZH1_5mm = ({
|
|
5112
5174
|
numPins = 7,
|
|
5113
5175
|
showPins = true,
|
|
@@ -5123,7 +5185,7 @@ var JSTZH1_5mm = ({
|
|
|
5123
5185
|
const pinLength = 6;
|
|
5124
5186
|
const bodyWidth = (numPins - 1) * pitch + 4;
|
|
5125
5187
|
const startX = -((numPins - 1) * pitch) / 2;
|
|
5126
|
-
return /* @__PURE__ */ jsxs66(
|
|
5188
|
+
return /* @__PURE__ */ jsxs66(Fragment65, { children: [
|
|
5127
5189
|
/* @__PURE__ */ jsx70(Translate30, { offset: [0, 0, bodyHeight], children: /* @__PURE__ */ jsx70(Rotate12, { angles: [Math.PI, 0, 0], children: /* @__PURE__ */ jsx70(Colorize37, { color: bodyColor, children: /* @__PURE__ */ jsxs66(Subtract9, { children: [
|
|
5128
5190
|
/* @__PURE__ */ jsx70(
|
|
5129
5191
|
Cuboid45,
|
|
@@ -5267,7 +5329,7 @@ import {
|
|
|
5267
5329
|
Subtract as Subtract10,
|
|
5268
5330
|
Translate as Translate31
|
|
5269
5331
|
} from "jscad-fiber";
|
|
5270
|
-
import { Fragment as
|
|
5332
|
+
import { Fragment as Fragment66, jsx as jsx71, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
5271
5333
|
var HOUSING_COLOR = "#303339";
|
|
5272
5334
|
var HOUSING_SHADOW = "#1f2227";
|
|
5273
5335
|
var ACTUATOR_COLOR = "#eee8d8";
|
|
@@ -5354,7 +5416,7 @@ var FPC = ({
|
|
|
5354
5416
|
const clipCapX = bodyWidth / 2 - 0.23;
|
|
5355
5417
|
const sideBossX = bodyWidth / 2 - 0.32;
|
|
5356
5418
|
const sideBossWidth = 0.68;
|
|
5357
|
-
return /* @__PURE__ */ jsxs67(
|
|
5419
|
+
return /* @__PURE__ */ jsxs67(Fragment66, { children: [
|
|
5358
5420
|
[-1, 1].map((direction) => /* @__PURE__ */ jsx71(
|
|
5359
5421
|
Cuboid46,
|
|
5360
5422
|
{
|
|
@@ -5533,8 +5595,8 @@ var FPC = ({
|
|
|
5533
5595
|
};
|
|
5534
5596
|
|
|
5535
5597
|
// lib/SmdPinHeader.tsx
|
|
5536
|
-
import { Colorize as Colorize39, Cuboid as Cuboid47, Hull as
|
|
5537
|
-
import { Fragment as
|
|
5598
|
+
import { Colorize as Colorize39, Cuboid as Cuboid47, Hull as Hull24, Translate as Translate32 } from "jscad-fiber";
|
|
5599
|
+
import { Fragment as Fragment67, jsx as jsx72, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
5538
5600
|
var SmdPinHeader = ({
|
|
5539
5601
|
numberOfPins,
|
|
5540
5602
|
pitch = 2.54,
|
|
@@ -5549,7 +5611,7 @@ var SmdPinHeader = ({
|
|
|
5549
5611
|
const bodyTop = standoffHeight + bodyHeight;
|
|
5550
5612
|
const tailLength = tailSpan / 2;
|
|
5551
5613
|
const tipChamferHeight = pinThickness * 0.35;
|
|
5552
|
-
return /* @__PURE__ */ jsx72(
|
|
5614
|
+
return /* @__PURE__ */ jsx72(Fragment67, { children: Array.from({ length: numberOfPins }, (_, index) => {
|
|
5553
5615
|
const x = xStart + index * pitch;
|
|
5554
5616
|
const tailDirection = index % 2 === 0 ? 1 : -1;
|
|
5555
5617
|
const postBodyLength = matingPinLength - tipChamferHeight;
|
|
@@ -5585,7 +5647,7 @@ var SmdPinHeader = ({
|
|
|
5585
5647
|
center: [0, 0, bodyTop + postBodyLength / 2]
|
|
5586
5648
|
}
|
|
5587
5649
|
),
|
|
5588
|
-
/* @__PURE__ */ jsxs68(
|
|
5650
|
+
/* @__PURE__ */ jsxs68(Hull24, { children: [
|
|
5589
5651
|
/* @__PURE__ */ jsx72(
|
|
5590
5652
|
Cuboid47,
|
|
5591
5653
|
{
|
|
@@ -5609,9 +5671,88 @@ var SmdPinHeader = ({
|
|
|
5609
5671
|
// lib/Footprinter3d.tsx
|
|
5610
5672
|
import { mm } from "@tscircuit/mm";
|
|
5611
5673
|
|
|
5674
|
+
// lib/utils/getPlatedHoleCenters.ts
|
|
5675
|
+
import { fp as fp3 } from "@tscircuit/footprinter";
|
|
5676
|
+
var getPlatedHoleCenters = (footprint) => {
|
|
5677
|
+
const elements = fp3.string(footprint).circuitJson();
|
|
5678
|
+
return elements.filter(
|
|
5679
|
+
(element) => element.type === "pcb_plated_hole" && Number.isFinite(element.x) && Number.isFinite(element.y)
|
|
5680
|
+
).map((element) => ({
|
|
5681
|
+
x: element.x,
|
|
5682
|
+
y: element.y,
|
|
5683
|
+
pin: element.port_hints?.[0]
|
|
5684
|
+
}));
|
|
5685
|
+
};
|
|
5686
|
+
|
|
5687
|
+
// lib/utils/getSmtPadRects.ts
|
|
5688
|
+
import { fp as fp4 } from "@tscircuit/footprinter";
|
|
5689
|
+
var getSmtPadRects = (footprint) => {
|
|
5690
|
+
const elements = fp4.string(footprint).circuitJson();
|
|
5691
|
+
return elements.filter(
|
|
5692
|
+
(element) => element.type === "pcb_smtpad" && element.shape === "rect" && Number.isFinite(element.x) && Number.isFinite(element.y)
|
|
5693
|
+
).map((element) => ({
|
|
5694
|
+
x: element.x,
|
|
5695
|
+
y: element.y,
|
|
5696
|
+
width: element.width ?? 0.4,
|
|
5697
|
+
height: element.height ?? 0.4,
|
|
5698
|
+
pin: element.port_hints?.[0]
|
|
5699
|
+
}));
|
|
5700
|
+
};
|
|
5701
|
+
|
|
5702
|
+
// lib/GullWingBody.tsx
|
|
5703
|
+
import { Fragment as Fragment68, jsx as jsx73, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
5704
|
+
var GullWingBody = ({
|
|
5705
|
+
bodyWidth,
|
|
5706
|
+
bodyLength: bodyLength10,
|
|
5707
|
+
bodyHeight = 1,
|
|
5708
|
+
pads,
|
|
5709
|
+
leadThickness = 0.15,
|
|
5710
|
+
leadHeightRatio = 0.75
|
|
5711
|
+
}) => {
|
|
5712
|
+
const centerX = pads.reduce((sum, pad) => sum + pad.x, 0) / (pads.length || 1);
|
|
5713
|
+
const centerY = pads.reduce((sum, pad) => sum + pad.y, 0) / (pads.length || 1);
|
|
5714
|
+
const leadHeight = bodyHeight * leadHeightRatio;
|
|
5715
|
+
return /* @__PURE__ */ jsxs69(Fragment68, { children: [
|
|
5716
|
+
/* @__PURE__ */ jsx73(
|
|
5717
|
+
ChipBody,
|
|
5718
|
+
{
|
|
5719
|
+
center: { x: centerX, y: centerY, z: 0 },
|
|
5720
|
+
width: bodyWidth,
|
|
5721
|
+
length: bodyLength10,
|
|
5722
|
+
height: bodyHeight
|
|
5723
|
+
}
|
|
5724
|
+
),
|
|
5725
|
+
pads.map((pad) => {
|
|
5726
|
+
const padWidth = pad.width ?? 0.4;
|
|
5727
|
+
const padLength = pad.height ?? 0.4;
|
|
5728
|
+
const side = pad.x >= centerX ? 1 : -1;
|
|
5729
|
+
const outerX = pad.x + side * padWidth / 2;
|
|
5730
|
+
const run = Math.max(Math.abs(outerX - centerX) - bodyWidth / 2, 0.1);
|
|
5731
|
+
const overlap = Math.min(0.15, bodyWidth * 0.15);
|
|
5732
|
+
return /* @__PURE__ */ jsx73(
|
|
5733
|
+
SmdChipLead,
|
|
5734
|
+
{
|
|
5735
|
+
rotation: side > 0 ? Math.PI : 0,
|
|
5736
|
+
position: {
|
|
5737
|
+
x: outerX,
|
|
5738
|
+
y: pad.y,
|
|
5739
|
+
z: leadThickness / 2
|
|
5740
|
+
},
|
|
5741
|
+
width: padLength,
|
|
5742
|
+
thickness: leadThickness,
|
|
5743
|
+
padContactLength: padWidth * 0.6,
|
|
5744
|
+
bodyDistance: run + overlap,
|
|
5745
|
+
height: leadHeight
|
|
5746
|
+
},
|
|
5747
|
+
`lead-${pad.x}-${pad.y}`
|
|
5748
|
+
);
|
|
5749
|
+
})
|
|
5750
|
+
] });
|
|
5751
|
+
};
|
|
5752
|
+
|
|
5612
5753
|
// lib/ParametricChip.tsx
|
|
5613
5754
|
import { Cuboid as Cuboid48 } from "jscad-fiber";
|
|
5614
|
-
import { Fragment as
|
|
5755
|
+
import { Fragment as Fragment69, jsx as jsx74, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
5615
5756
|
var ParametricChip = ({
|
|
5616
5757
|
padPitch,
|
|
5617
5758
|
padHeight,
|
|
@@ -5622,8 +5763,8 @@ var ParametricChip = ({
|
|
|
5622
5763
|
const height10 = width10;
|
|
5623
5764
|
const terminatorWidth9 = fullLength10 * 0.2;
|
|
5624
5765
|
const bodyLength10 = fullLength10 - terminatorWidth9 * 2;
|
|
5625
|
-
return /* @__PURE__ */
|
|
5626
|
-
/* @__PURE__ */
|
|
5766
|
+
return /* @__PURE__ */ jsxs70(Fragment69, { children: [
|
|
5767
|
+
/* @__PURE__ */ jsx74(
|
|
5627
5768
|
Cuboid48,
|
|
5628
5769
|
{
|
|
5629
5770
|
size: [bodyLength10, width10, height10],
|
|
@@ -5631,7 +5772,7 @@ var ParametricChip = ({
|
|
|
5631
5772
|
color
|
|
5632
5773
|
}
|
|
5633
5774
|
),
|
|
5634
|
-
/* @__PURE__ */
|
|
5775
|
+
/* @__PURE__ */ jsx74(
|
|
5635
5776
|
Cuboid48,
|
|
5636
5777
|
{
|
|
5637
5778
|
size: [terminatorWidth9, height10, width10],
|
|
@@ -5639,7 +5780,7 @@ var ParametricChip = ({
|
|
|
5639
5780
|
color: "#ccc"
|
|
5640
5781
|
}
|
|
5641
5782
|
),
|
|
5642
|
-
/* @__PURE__ */
|
|
5783
|
+
/* @__PURE__ */ jsx74(
|
|
5643
5784
|
Cuboid48,
|
|
5644
5785
|
{
|
|
5645
5786
|
size: [terminatorWidth9, height10, width10],
|
|
@@ -5659,7 +5800,7 @@ import {
|
|
|
5659
5800
|
Subtract as Subtract11,
|
|
5660
5801
|
Translate as Translate33
|
|
5661
5802
|
} from "jscad-fiber";
|
|
5662
|
-
import { Fragment as
|
|
5803
|
+
import { Fragment as Fragment70, jsx as jsx75, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
5663
5804
|
var Led5050 = ({
|
|
5664
5805
|
color = "#ffff00",
|
|
5665
5806
|
bodyColor = "#ffffff",
|
|
@@ -5680,9 +5821,9 @@ var Led5050 = ({
|
|
|
5680
5821
|
const cornerCutDepth = 0.3;
|
|
5681
5822
|
const leadYPositions = [-1.7, 0, 1.7];
|
|
5682
5823
|
const leadSides = [-1, 1];
|
|
5683
|
-
return /* @__PURE__ */
|
|
5824
|
+
return /* @__PURE__ */ jsxs71(Fragment70, { children: [
|
|
5684
5825
|
leadYPositions.flatMap(
|
|
5685
|
-
(y) => leadSides.map((side) => /* @__PURE__ */
|
|
5826
|
+
(y) => leadSides.map((side) => /* @__PURE__ */ jsx75(
|
|
5686
5827
|
Cuboid49,
|
|
5687
5828
|
{
|
|
5688
5829
|
color: leadColor,
|
|
@@ -5692,8 +5833,8 @@ var Led5050 = ({
|
|
|
5692
5833
|
`${side}-${y}`
|
|
5693
5834
|
))
|
|
5694
5835
|
),
|
|
5695
|
-
/* @__PURE__ */
|
|
5696
|
-
/* @__PURE__ */
|
|
5836
|
+
/* @__PURE__ */ jsx75(Colorize40, { color: bodyColor, children: /* @__PURE__ */ jsxs71(Subtract11, { children: [
|
|
5837
|
+
/* @__PURE__ */ jsx75(
|
|
5697
5838
|
ChipBody,
|
|
5698
5839
|
{
|
|
5699
5840
|
width: bodySize,
|
|
@@ -5707,7 +5848,7 @@ var Led5050 = ({
|
|
|
5707
5848
|
includeNotch: false
|
|
5708
5849
|
}
|
|
5709
5850
|
),
|
|
5710
|
-
/* @__PURE__ */
|
|
5851
|
+
/* @__PURE__ */ jsx75(
|
|
5711
5852
|
Cylinder14,
|
|
5712
5853
|
{
|
|
5713
5854
|
radius: lensRadius,
|
|
@@ -5715,7 +5856,7 @@ var Led5050 = ({
|
|
|
5715
5856
|
center: [0, 0, bodyTop - lensHeight / 2]
|
|
5716
5857
|
}
|
|
5717
5858
|
),
|
|
5718
|
-
/* @__PURE__ */
|
|
5859
|
+
/* @__PURE__ */ jsx75(
|
|
5719
5860
|
Translate33,
|
|
5720
5861
|
{
|
|
5721
5862
|
offset: [
|
|
@@ -5723,11 +5864,11 @@ var Led5050 = ({
|
|
|
5723
5864
|
bodySize / 2,
|
|
5724
5865
|
bodyTop - cornerCutDepth / 2 + 5e-3
|
|
5725
5866
|
],
|
|
5726
|
-
children: /* @__PURE__ */
|
|
5867
|
+
children: /* @__PURE__ */ jsx75(Rotate14, { rotation: [0, 0, Math.PI / 4], children: /* @__PURE__ */ jsx75(Cuboid49, { size: [0.9, 0.9, cornerCutDepth + 0.01] }) })
|
|
5727
5868
|
}
|
|
5728
5869
|
)
|
|
5729
5870
|
] }) }),
|
|
5730
|
-
/* @__PURE__ */
|
|
5871
|
+
/* @__PURE__ */ jsx75(
|
|
5731
5872
|
Cylinder14,
|
|
5732
5873
|
{
|
|
5733
5874
|
color,
|
|
@@ -5739,17 +5880,70 @@ var Led5050 = ({
|
|
|
5739
5880
|
] });
|
|
5740
5881
|
};
|
|
5741
5882
|
|
|
5883
|
+
// lib/Led2835.tsx
|
|
5884
|
+
import { Colorize as Colorize41, Cuboid as Cuboid50 } from "jscad-fiber";
|
|
5885
|
+
import { Fragment as Fragment71, jsx as jsx76, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
5886
|
+
var Led2835 = ({
|
|
5887
|
+
bodyWidth = 3.5,
|
|
5888
|
+
bodyLength: bodyLength10 = 2.8,
|
|
5889
|
+
bodyHeight = 0.8,
|
|
5890
|
+
color = "#ffe08a",
|
|
5891
|
+
bodyColor = "#f2f2f2",
|
|
5892
|
+
padColor = "#cccccc",
|
|
5893
|
+
pad1X = -0.9,
|
|
5894
|
+
pad1Width = 2.2,
|
|
5895
|
+
pad2X = 1.375,
|
|
5896
|
+
pad2Width = 1.25,
|
|
5897
|
+
padLength = 2.2
|
|
5898
|
+
} = {}) => {
|
|
5899
|
+
const padThickness = 0.1;
|
|
5900
|
+
const lensHeight = 0.15;
|
|
5901
|
+
const bodyCenterX = (pad1X + pad2X) / 2;
|
|
5902
|
+
const lensWidth = bodyWidth * 0.55;
|
|
5903
|
+
const lensLength = bodyLength10 * 0.55;
|
|
5904
|
+
return /* @__PURE__ */ jsxs72(Fragment71, { children: [
|
|
5905
|
+
[
|
|
5906
|
+
{ x: pad1X, w: pad1Width, key: "pad-1" },
|
|
5907
|
+
{ x: pad2X, w: pad2Width, key: "pad-2" }
|
|
5908
|
+
].map(({ x, w, key }) => /* @__PURE__ */ jsx76(Colorize41, { color: padColor, children: /* @__PURE__ */ jsx76(
|
|
5909
|
+
Cuboid50,
|
|
5910
|
+
{
|
|
5911
|
+
size: [w, padLength, padThickness],
|
|
5912
|
+
center: [x, 0, padThickness / 2]
|
|
5913
|
+
}
|
|
5914
|
+
) }, key)),
|
|
5915
|
+
/* @__PURE__ */ jsx76(Colorize41, { color: bodyColor, children: /* @__PURE__ */ jsx76(
|
|
5916
|
+
Cuboid50,
|
|
5917
|
+
{
|
|
5918
|
+
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
5919
|
+
center: [bodyCenterX, 0, padThickness + bodyHeight / 2]
|
|
5920
|
+
}
|
|
5921
|
+
) }),
|
|
5922
|
+
/* @__PURE__ */ jsx76(Colorize41, { color, children: /* @__PURE__ */ jsx76(
|
|
5923
|
+
Cuboid50,
|
|
5924
|
+
{
|
|
5925
|
+
size: [lensWidth, lensLength, lensHeight],
|
|
5926
|
+
center: [
|
|
5927
|
+
bodyCenterX,
|
|
5928
|
+
0,
|
|
5929
|
+
padThickness + bodyHeight + lensHeight / 2 - 0.05
|
|
5930
|
+
]
|
|
5931
|
+
}
|
|
5932
|
+
) })
|
|
5933
|
+
] });
|
|
5934
|
+
};
|
|
5935
|
+
|
|
5742
5936
|
// lib/RJ45.tsx
|
|
5743
5937
|
import {
|
|
5744
|
-
Colorize as
|
|
5745
|
-
Cuboid as
|
|
5938
|
+
Colorize as Colorize42,
|
|
5939
|
+
Cuboid as Cuboid51,
|
|
5746
5940
|
Cylinder as Cylinder15,
|
|
5747
5941
|
Rotate as Rotate15,
|
|
5748
5942
|
RoundedCuboid as RoundedCuboid4,
|
|
5749
5943
|
Subtract as Subtract12,
|
|
5750
5944
|
Translate as Translate34
|
|
5751
5945
|
} from "jscad-fiber";
|
|
5752
|
-
import { Fragment as
|
|
5946
|
+
import { Fragment as Fragment72, jsx as jsx77, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
5753
5947
|
var range2 = (length) => Array.from({ length }, (_, index) => index);
|
|
5754
5948
|
var RJ45 = ({
|
|
5755
5949
|
bodyWidth = 16.26,
|
|
@@ -5807,18 +6001,18 @@ var RJ45 = ({
|
|
|
5807
6001
|
const contactY = frontY - frontDirection * Math.max(cavityDepth * 0.48, 1.2);
|
|
5808
6002
|
const contactZ = openingCenterZ + openingHeight * 0.18;
|
|
5809
6003
|
const frontLipY = frontY + frontDirection * shellThickness * 0.2;
|
|
5810
|
-
return /* @__PURE__ */
|
|
5811
|
-
/* @__PURE__ */
|
|
5812
|
-
/* @__PURE__ */
|
|
5813
|
-
/* @__PURE__ */
|
|
5814
|
-
|
|
6004
|
+
return /* @__PURE__ */ jsxs73(Fragment72, { children: [
|
|
6005
|
+
/* @__PURE__ */ jsxs73(Colorize42, { color: shellColor, children: [
|
|
6006
|
+
/* @__PURE__ */ jsxs73(Subtract12, { children: [
|
|
6007
|
+
/* @__PURE__ */ jsx77(
|
|
6008
|
+
Cuboid51,
|
|
5815
6009
|
{
|
|
5816
6010
|
center: [0, bodyCenterY, bodyHeight / 2],
|
|
5817
6011
|
size: [bodyWidth, bodyDepth, bodyHeight]
|
|
5818
6012
|
}
|
|
5819
6013
|
),
|
|
5820
|
-
/* @__PURE__ */
|
|
5821
|
-
|
|
6014
|
+
/* @__PURE__ */ jsx77(
|
|
6015
|
+
Cuboid51,
|
|
5822
6016
|
{
|
|
5823
6017
|
center: [0, cavityCenterY, openingCenterZ],
|
|
5824
6018
|
size: [
|
|
@@ -5829,15 +6023,15 @@ var RJ45 = ({
|
|
|
5829
6023
|
}
|
|
5830
6024
|
)
|
|
5831
6025
|
] }),
|
|
5832
|
-
/* @__PURE__ */
|
|
5833
|
-
|
|
6026
|
+
/* @__PURE__ */ jsx77(
|
|
6027
|
+
Cuboid51,
|
|
5834
6028
|
{
|
|
5835
6029
|
center: [0, frontLipY, 0.72],
|
|
5836
6030
|
size: [openingWidth + 0.5, shellThickness * 1.25, 1.05]
|
|
5837
6031
|
}
|
|
5838
6032
|
),
|
|
5839
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5840
|
-
|
|
6033
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx77(
|
|
6034
|
+
Cuboid51,
|
|
5841
6035
|
{
|
|
5842
6036
|
center: [direction * shieldPinX, shieldPinY, 0.25],
|
|
5843
6037
|
size: [
|
|
@@ -5848,8 +6042,8 @@ var RJ45 = ({
|
|
|
5848
6042
|
},
|
|
5849
6043
|
`shield-tab:${direction}`
|
|
5850
6044
|
)),
|
|
5851
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
5852
|
-
|
|
6045
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx77(
|
|
6046
|
+
Cuboid51,
|
|
5853
6047
|
{
|
|
5854
6048
|
center: [
|
|
5855
6049
|
direction * bodyWidth * 0.24,
|
|
@@ -5861,9 +6055,9 @@ var RJ45 = ({
|
|
|
5861
6055
|
`top-seam:${direction}`
|
|
5862
6056
|
))
|
|
5863
6057
|
] }),
|
|
5864
|
-
/* @__PURE__ */
|
|
5865
|
-
/* @__PURE__ */
|
|
5866
|
-
/* @__PURE__ */
|
|
6058
|
+
/* @__PURE__ */ jsxs73(Colorize42, { color: housingColor, children: [
|
|
6059
|
+
/* @__PURE__ */ jsxs73(Subtract12, { children: [
|
|
6060
|
+
/* @__PURE__ */ jsx77(
|
|
5867
6061
|
RoundedCuboid4,
|
|
5868
6062
|
{
|
|
5869
6063
|
center: [0, cavityCenterY, openingCenterZ],
|
|
@@ -5875,8 +6069,8 @@ var RJ45 = ({
|
|
|
5875
6069
|
roundRadius: 0.22
|
|
5876
6070
|
}
|
|
5877
6071
|
),
|
|
5878
|
-
/* @__PURE__ */
|
|
5879
|
-
|
|
6072
|
+
/* @__PURE__ */ jsx77(
|
|
6073
|
+
Cuboid51,
|
|
5880
6074
|
{
|
|
5881
6075
|
center: [
|
|
5882
6076
|
0,
|
|
@@ -5891,14 +6085,14 @@ var RJ45 = ({
|
|
|
5891
6085
|
}
|
|
5892
6086
|
)
|
|
5893
6087
|
] }),
|
|
5894
|
-
/* @__PURE__ */
|
|
5895
|
-
|
|
6088
|
+
/* @__PURE__ */ jsx77(
|
|
6089
|
+
Cuboid51,
|
|
5896
6090
|
{
|
|
5897
6091
|
center: [0, backWallY, openingCenterZ],
|
|
5898
6092
|
size: [openingWidth - 1.15, shellThickness, openingHeight - 1.25]
|
|
5899
6093
|
}
|
|
5900
6094
|
),
|
|
5901
|
-
/* @__PURE__ */
|
|
6095
|
+
/* @__PURE__ */ jsx77(
|
|
5902
6096
|
RoundedCuboid4,
|
|
5903
6097
|
{
|
|
5904
6098
|
center: [0, frontY - frontDirection * cavityDepth * 0.28, 1.55],
|
|
@@ -5906,7 +6100,7 @@ var RJ45 = ({
|
|
|
5906
6100
|
roundRadius: 0.16
|
|
5907
6101
|
}
|
|
5908
6102
|
),
|
|
5909
|
-
[-1, 1].map((direction) => /* @__PURE__ */
|
|
6103
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx77(
|
|
5910
6104
|
Cylinder15,
|
|
5911
6105
|
{
|
|
5912
6106
|
center: [direction * locatorHoleX, locatorHoleY, -0.25],
|
|
@@ -5916,8 +6110,8 @@ var RJ45 = ({
|
|
|
5916
6110
|
`locator:${direction}`
|
|
5917
6111
|
))
|
|
5918
6112
|
] }),
|
|
5919
|
-
/* @__PURE__ */
|
|
5920
|
-
signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */
|
|
6113
|
+
/* @__PURE__ */ jsxs73(Colorize42, { color: contactColor, children: [
|
|
6114
|
+
signalPinPositions.map(({ x, y }, index) => /* @__PURE__ */ jsx77(
|
|
5921
6115
|
Cylinder15,
|
|
5922
6116
|
{
|
|
5923
6117
|
center: [x, y, 0.15],
|
|
@@ -5926,7 +6120,7 @@ var RJ45 = ({
|
|
|
5926
6120
|
},
|
|
5927
6121
|
`signal-lead:${index}`
|
|
5928
6122
|
)),
|
|
5929
|
-
range2(8).map((index) => /* @__PURE__ */
|
|
6123
|
+
range2(8).map((index) => /* @__PURE__ */ jsx77(
|
|
5930
6124
|
Translate34,
|
|
5931
6125
|
{
|
|
5932
6126
|
offset: [
|
|
@@ -5934,7 +6128,7 @@ var RJ45 = ({
|
|
|
5934
6128
|
contactY,
|
|
5935
6129
|
contactZ + (index % 2 === 0 ? 0.03 : -0.03)
|
|
5936
6130
|
],
|
|
5937
|
-
children: /* @__PURE__ */
|
|
6131
|
+
children: /* @__PURE__ */ jsx77(Rotate15, { rotation: [frontDirection * 0.2, 0, 0], children: /* @__PURE__ */ jsx77(
|
|
5938
6132
|
RoundedCuboid4,
|
|
5939
6133
|
{
|
|
5940
6134
|
size: [Math.max(contactPitch * 0.28, 0.28), 3.25, 0.16],
|
|
@@ -5944,7 +6138,7 @@ var RJ45 = ({
|
|
|
5944
6138
|
},
|
|
5945
6139
|
`socket-contact:${index}`
|
|
5946
6140
|
)),
|
|
5947
|
-
ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */
|
|
6141
|
+
ledPins && ledPinPositions.map((x, index) => /* @__PURE__ */ jsx77(
|
|
5948
6142
|
Cylinder15,
|
|
5949
6143
|
{
|
|
5950
6144
|
center: [x, ledPinY, 0.15],
|
|
@@ -5954,8 +6148,8 @@ var RJ45 = ({
|
|
|
5954
6148
|
`led-lead:${index}`
|
|
5955
6149
|
))
|
|
5956
6150
|
] }),
|
|
5957
|
-
ledPins && /* @__PURE__ */
|
|
5958
|
-
/* @__PURE__ */
|
|
6151
|
+
ledPins && /* @__PURE__ */ jsxs73(Fragment72, { children: [
|
|
6152
|
+
/* @__PURE__ */ jsx77(
|
|
5959
6153
|
RoundedCuboid4,
|
|
5960
6154
|
{
|
|
5961
6155
|
color: "#73b744",
|
|
@@ -5968,7 +6162,7 @@ var RJ45 = ({
|
|
|
5968
6162
|
roundRadius: 0.18
|
|
5969
6163
|
}
|
|
5970
6164
|
),
|
|
5971
|
-
/* @__PURE__ */
|
|
6165
|
+
/* @__PURE__ */ jsx77(
|
|
5972
6166
|
RoundedCuboid4,
|
|
5973
6167
|
{
|
|
5974
6168
|
color: "#e0aa35",
|
|
@@ -5985,8 +6179,311 @@ var RJ45 = ({
|
|
|
5985
6179
|
] });
|
|
5986
6180
|
};
|
|
5987
6181
|
|
|
6182
|
+
// lib/DPAK.tsx
|
|
6183
|
+
import { Colorize as Colorize43, Cuboid as Cuboid52, Hull as Hull25 } from "jscad-fiber";
|
|
6184
|
+
import { Fragment as Fragment73, jsx as jsx78, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
6185
|
+
var DPAK = ({
|
|
6186
|
+
bodyWidth = 6.1,
|
|
6187
|
+
bodyLength: bodyLength10 = 6.5,
|
|
6188
|
+
bodyHeight = 2.3,
|
|
6189
|
+
tabWidth = 6.2,
|
|
6190
|
+
tabLength = 5.8,
|
|
6191
|
+
span = 6.85,
|
|
6192
|
+
pitch = 2.29,
|
|
6193
|
+
leadWidth = 0.9,
|
|
6194
|
+
leadContactLength = 1.5,
|
|
6195
|
+
color = "#222",
|
|
6196
|
+
tabColor = "#cccccc",
|
|
6197
|
+
leadColor = "#cccccc"
|
|
6198
|
+
}) => {
|
|
6199
|
+
const tabThickness = 0.5;
|
|
6200
|
+
const tabCenterX = span / 2;
|
|
6201
|
+
const leadPadX = -span / 2;
|
|
6202
|
+
const bodyCenterX = tabCenterX + (tabWidth - bodyWidth) / 2;
|
|
6203
|
+
const bodyFrontX = bodyCenterX - bodyWidth / 2;
|
|
6204
|
+
const leadZ = tabThickness / 2;
|
|
6205
|
+
const leadThickness = 0.4;
|
|
6206
|
+
return /* @__PURE__ */ jsxs74(Fragment73, { children: [
|
|
6207
|
+
/* @__PURE__ */ jsx78(Colorize43, { color: tabColor, children: /* @__PURE__ */ jsx78(
|
|
6208
|
+
Cuboid52,
|
|
6209
|
+
{
|
|
6210
|
+
size: [tabWidth, tabLength, tabThickness],
|
|
6211
|
+
center: [tabCenterX, 0, tabThickness / 2]
|
|
6212
|
+
}
|
|
6213
|
+
) }),
|
|
6214
|
+
/* @__PURE__ */ jsx78(Colorize43, { color, children: /* @__PURE__ */ jsx78(
|
|
6215
|
+
Cuboid52,
|
|
6216
|
+
{
|
|
6217
|
+
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6218
|
+
center: [bodyCenterX, 0, tabThickness + bodyHeight / 2]
|
|
6219
|
+
}
|
|
6220
|
+
) }),
|
|
6221
|
+
[-1, 1].map((side) => {
|
|
6222
|
+
return /* @__PURE__ */ jsxs74(Colorize43, { color: leadColor, children: [
|
|
6223
|
+
/* @__PURE__ */ jsx78(
|
|
6224
|
+
Cuboid52,
|
|
6225
|
+
{
|
|
6226
|
+
size: [leadContactLength, leadWidth, leadThickness],
|
|
6227
|
+
center: [
|
|
6228
|
+
leadPadX + leadContactLength / 2,
|
|
6229
|
+
side * pitch,
|
|
6230
|
+
leadThickness / 2
|
|
6231
|
+
]
|
|
6232
|
+
}
|
|
6233
|
+
),
|
|
6234
|
+
/* @__PURE__ */ jsxs74(Hull25, { children: [
|
|
6235
|
+
/* @__PURE__ */ jsx78(
|
|
6236
|
+
Cuboid52,
|
|
6237
|
+
{
|
|
6238
|
+
size: [0.1, leadWidth, leadThickness],
|
|
6239
|
+
center: [
|
|
6240
|
+
leadPadX + leadContactLength,
|
|
6241
|
+
side * pitch,
|
|
6242
|
+
leadThickness / 2
|
|
6243
|
+
]
|
|
6244
|
+
}
|
|
6245
|
+
),
|
|
6246
|
+
/* @__PURE__ */ jsx78(
|
|
6247
|
+
Cuboid52,
|
|
6248
|
+
{
|
|
6249
|
+
size: [0.1, leadWidth, leadThickness],
|
|
6250
|
+
center: [bodyFrontX, side * pitch, leadZ + tabThickness / 2]
|
|
6251
|
+
}
|
|
6252
|
+
)
|
|
6253
|
+
] })
|
|
6254
|
+
] }, `lead-${side}`);
|
|
6255
|
+
})
|
|
6256
|
+
] });
|
|
6257
|
+
};
|
|
6258
|
+
|
|
6259
|
+
// lib/ElectrolyticCapacitor.tsx
|
|
6260
|
+
import {
|
|
6261
|
+
Colorize as Colorize44,
|
|
6262
|
+
Cuboid as Cuboid53,
|
|
6263
|
+
Cylinder as Cylinder16,
|
|
6264
|
+
RoundedCylinder as RoundedCylinder5,
|
|
6265
|
+
Subtract as Subtract13
|
|
6266
|
+
} from "jscad-fiber";
|
|
6267
|
+
import { Fragment as Fragment74, jsx as jsx79, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
6268
|
+
var ElectrolyticCapacitor = ({
|
|
6269
|
+
diameter = 6.3,
|
|
6270
|
+
heightToDiameterRatio = 1.4,
|
|
6271
|
+
height: height10 = diameter * heightToDiameterRatio,
|
|
6272
|
+
leadPitch = 2.5,
|
|
6273
|
+
leadDiameter = 0.6,
|
|
6274
|
+
leadLength = 3,
|
|
6275
|
+
sleeveColor = "#1b2a6b",
|
|
6276
|
+
baseColor = "#1a1a1a"
|
|
6277
|
+
}) => {
|
|
6278
|
+
const radius = diameter / 2;
|
|
6279
|
+
const baseHeight = Math.min(1, diameter * 0.12);
|
|
6280
|
+
const canHeight = Math.max(height10 - baseHeight, 0.1);
|
|
6281
|
+
const canBottom = baseHeight;
|
|
6282
|
+
const canTop = canBottom + canHeight;
|
|
6283
|
+
const grooveWidth = Math.max(diameter * 0.06, 0.2);
|
|
6284
|
+
const grooveDepth = 0.3;
|
|
6285
|
+
return /* @__PURE__ */ jsxs75(Fragment74, { children: [
|
|
6286
|
+
/* @__PURE__ */ jsx79(Colorize44, { color: baseColor, children: /* @__PURE__ */ jsx79(
|
|
6287
|
+
Cylinder16,
|
|
6288
|
+
{
|
|
6289
|
+
radius: radius - 0.05,
|
|
6290
|
+
height: baseHeight,
|
|
6291
|
+
center: [0, 0, baseHeight / 2]
|
|
6292
|
+
}
|
|
6293
|
+
) }),
|
|
6294
|
+
/* @__PURE__ */ jsx79(Colorize44, { color: sleeveColor, children: /* @__PURE__ */ jsxs75(Subtract13, { children: [
|
|
6295
|
+
/* @__PURE__ */ jsx79(
|
|
6296
|
+
RoundedCylinder5,
|
|
6297
|
+
{
|
|
6298
|
+
radius,
|
|
6299
|
+
height: canHeight,
|
|
6300
|
+
roundRadius: Math.min(0.3, radius * 0.15),
|
|
6301
|
+
center: [0, 0, canBottom + canHeight / 2]
|
|
6302
|
+
}
|
|
6303
|
+
),
|
|
6304
|
+
/* @__PURE__ */ jsx79(
|
|
6305
|
+
Cuboid53,
|
|
6306
|
+
{
|
|
6307
|
+
size: [diameter, grooveWidth, grooveDepth * 2],
|
|
6308
|
+
center: [0, 0, canTop]
|
|
6309
|
+
}
|
|
6310
|
+
),
|
|
6311
|
+
/* @__PURE__ */ jsx79(
|
|
6312
|
+
Cuboid53,
|
|
6313
|
+
{
|
|
6314
|
+
size: [grooveWidth, diameter, grooveDepth * 2],
|
|
6315
|
+
center: [0, 0, canTop]
|
|
6316
|
+
}
|
|
6317
|
+
)
|
|
6318
|
+
] }) }),
|
|
6319
|
+
[-1, 1].map((side) => /* @__PURE__ */ jsx79(Colorize44, { color: "#c0c0c0", children: /* @__PURE__ */ jsx79(
|
|
6320
|
+
Cylinder16,
|
|
6321
|
+
{
|
|
6322
|
+
radius: leadDiameter / 2,
|
|
6323
|
+
height: leadLength + baseHeight,
|
|
6324
|
+
center: [side * leadPitch / 2, 0, (baseHeight - leadLength) / 2]
|
|
6325
|
+
}
|
|
6326
|
+
) }, `lead-${side}`))
|
|
6327
|
+
] });
|
|
6328
|
+
};
|
|
6329
|
+
|
|
6330
|
+
// lib/Potentiometer.tsx
|
|
6331
|
+
import { Colorize as Colorize45, Cuboid as Cuboid54, Cylinder as Cylinder17, Subtract as Subtract14 } from "jscad-fiber";
|
|
6332
|
+
import { Fragment as Fragment75, jsx as jsx80, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
6333
|
+
var Potentiometer = ({
|
|
6334
|
+
bodyWidth = 5.35,
|
|
6335
|
+
bodyLength: bodyLength10 = 14,
|
|
6336
|
+
bodyHeight = 4,
|
|
6337
|
+
bodyCenterX = bodyWidth / 2,
|
|
6338
|
+
adjusterDiameter = Math.min(bodyWidth, bodyLength10) * 0.55,
|
|
6339
|
+
shaftDiameter = 0,
|
|
6340
|
+
shaftHeight = 0,
|
|
6341
|
+
leads = [],
|
|
6342
|
+
leadDiameter = 0.6,
|
|
6343
|
+
leadLength = 3,
|
|
6344
|
+
bodyColor = "#1f4fa3",
|
|
6345
|
+
adjusterColor = "#d8d8d8"
|
|
6346
|
+
}) => {
|
|
6347
|
+
const adjusterHeight = 0.8;
|
|
6348
|
+
const adjusterZ = bodyHeight + adjusterHeight / 2;
|
|
6349
|
+
const slotWidth = Math.max(adjusterDiameter * 0.16, 0.3);
|
|
6350
|
+
return /* @__PURE__ */ jsxs76(Fragment75, { children: [
|
|
6351
|
+
/* @__PURE__ */ jsx80(Colorize45, { color: bodyColor, children: /* @__PURE__ */ jsx80(
|
|
6352
|
+
Cuboid54,
|
|
6353
|
+
{
|
|
6354
|
+
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6355
|
+
center: [bodyCenterX, 0, bodyHeight / 2]
|
|
6356
|
+
}
|
|
6357
|
+
) }),
|
|
6358
|
+
/* @__PURE__ */ jsx80(Colorize45, { color: adjusterColor, children: /* @__PURE__ */ jsxs76(Subtract14, { children: [
|
|
6359
|
+
/* @__PURE__ */ jsx80(
|
|
6360
|
+
Cylinder17,
|
|
6361
|
+
{
|
|
6362
|
+
radius: adjusterDiameter / 2,
|
|
6363
|
+
height: adjusterHeight,
|
|
6364
|
+
center: [bodyCenterX, 0, adjusterZ]
|
|
6365
|
+
}
|
|
6366
|
+
),
|
|
6367
|
+
/* @__PURE__ */ jsx80(
|
|
6368
|
+
Cuboid54,
|
|
6369
|
+
{
|
|
6370
|
+
size: [adjusterDiameter, slotWidth, adjusterHeight * 0.6],
|
|
6371
|
+
center: [bodyCenterX, 0, adjusterZ + adjusterHeight / 2]
|
|
6372
|
+
}
|
|
6373
|
+
)
|
|
6374
|
+
] }) }),
|
|
6375
|
+
shaftHeight > 0 && shaftDiameter > 0 ? /* @__PURE__ */ jsx80(Colorize45, { color: adjusterColor, children: /* @__PURE__ */ jsx80(
|
|
6376
|
+
Cylinder17,
|
|
6377
|
+
{
|
|
6378
|
+
radius: shaftDiameter / 2,
|
|
6379
|
+
height: shaftHeight,
|
|
6380
|
+
center: [bodyCenterX, 0, bodyHeight + shaftHeight / 2]
|
|
6381
|
+
}
|
|
6382
|
+
) }) : null,
|
|
6383
|
+
leads.map((lead) => /* @__PURE__ */ jsx80(Colorize45, { color: "#c0c0c0", children: /* @__PURE__ */ jsx80(
|
|
6384
|
+
Cylinder17,
|
|
6385
|
+
{
|
|
6386
|
+
radius: leadDiameter / 2,
|
|
6387
|
+
height: bodyHeight / 2 + leadLength,
|
|
6388
|
+
center: [lead.x, lead.y, (bodyHeight / 2 - leadLength) / 2]
|
|
6389
|
+
}
|
|
6390
|
+
) }, `lead-${lead.x}-${lead.y}`))
|
|
6391
|
+
] });
|
|
6392
|
+
};
|
|
6393
|
+
|
|
6394
|
+
// lib/SmdPushButton.tsx
|
|
6395
|
+
import { Colorize as Colorize46, Cuboid as Cuboid55, Cylinder as Cylinder18 } from "jscad-fiber";
|
|
6396
|
+
import { Fragment as Fragment76, jsx as jsx81, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
6397
|
+
var SmdPushButton = ({
|
|
6398
|
+
bodyWidth = 2.9,
|
|
6399
|
+
bodyLength: bodyLength10 = 3,
|
|
6400
|
+
bodyHeight = 1.4,
|
|
6401
|
+
actuatorDiameter = 1.5,
|
|
6402
|
+
actuatorHeight = 0.5,
|
|
6403
|
+
padSpanX = 4.2,
|
|
6404
|
+
padSpanY = 2.15,
|
|
6405
|
+
padWidth = 1.05,
|
|
6406
|
+
padLength = 0.7,
|
|
6407
|
+
bodyColor = "#2b2b2b",
|
|
6408
|
+
actuatorColor = "#d9d9d9",
|
|
6409
|
+
leadColor = "#cccccc"
|
|
6410
|
+
}) => {
|
|
6411
|
+
const leadThickness = 0.15;
|
|
6412
|
+
return /* @__PURE__ */ jsxs77(Fragment76, { children: [
|
|
6413
|
+
/* @__PURE__ */ jsx81(Colorize46, { color: bodyColor, children: /* @__PURE__ */ jsx81(
|
|
6414
|
+
Cuboid55,
|
|
6415
|
+
{
|
|
6416
|
+
size: [bodyWidth, bodyLength10, bodyHeight],
|
|
6417
|
+
center: [0, 0, bodyHeight / 2]
|
|
6418
|
+
}
|
|
6419
|
+
) }),
|
|
6420
|
+
/* @__PURE__ */ jsx81(Colorize46, { color: actuatorColor, children: /* @__PURE__ */ jsx81(
|
|
6421
|
+
Cylinder18,
|
|
6422
|
+
{
|
|
6423
|
+
radius: actuatorDiameter / 2,
|
|
6424
|
+
height: actuatorHeight,
|
|
6425
|
+
center: [0, 0, bodyHeight + actuatorHeight / 2]
|
|
6426
|
+
}
|
|
6427
|
+
) }),
|
|
6428
|
+
[-1, 1].flatMap(
|
|
6429
|
+
(sx) => [-1, 1].map((sy) => /* @__PURE__ */ jsx81(Colorize46, { color: leadColor, children: /* @__PURE__ */ jsx81(
|
|
6430
|
+
Cuboid55,
|
|
6431
|
+
{
|
|
6432
|
+
size: [padWidth, padLength, leadThickness],
|
|
6433
|
+
center: [
|
|
6434
|
+
sx * padSpanX / 2,
|
|
6435
|
+
sy * padSpanY / 2,
|
|
6436
|
+
leadThickness / 2
|
|
6437
|
+
]
|
|
6438
|
+
}
|
|
6439
|
+
) }, `lead-${sx}-${sy}`))
|
|
6440
|
+
)
|
|
6441
|
+
] });
|
|
6442
|
+
};
|
|
6443
|
+
|
|
6444
|
+
// lib/SOT-563.tsx
|
|
6445
|
+
import { Cuboid as Cuboid56, Translate as Translate36, Rotate as Rotate16, Colorize as Colorize47 } from "jscad-fiber";
|
|
6446
|
+
import { Fragment as Fragment77, jsx as jsx82, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
6447
|
+
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
6448
|
+
const bodyWidth = 1.2;
|
|
6449
|
+
const bodyLength10 = 1.6;
|
|
6450
|
+
const bodyHeight = 0.55;
|
|
6451
|
+
const leadWidth = 0.3;
|
|
6452
|
+
const leadLength = 0.67;
|
|
6453
|
+
const leadHeight = 0.13;
|
|
6454
|
+
const leadSpacing = 0.5;
|
|
6455
|
+
const bodyZOffset = -0.4;
|
|
6456
|
+
return /* @__PURE__ */ jsxs78(Fragment77, { children: [
|
|
6457
|
+
/* @__PURE__ */ jsx82(Rotate16, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx82(Translate36, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx82(Colorize47, { color: "grey", children: /* @__PURE__ */ jsx82(Cuboid56, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
6458
|
+
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
6459
|
+
// Left lead
|
|
6460
|
+
/* @__PURE__ */ jsx82(
|
|
6461
|
+
Translate36,
|
|
6462
|
+
{
|
|
6463
|
+
center: [
|
|
6464
|
+
-bodyWidth / 2 - 0.03,
|
|
6465
|
+
yOffset * leadSpacing,
|
|
6466
|
+
leadHeight / 2
|
|
6467
|
+
],
|
|
6468
|
+
children: /* @__PURE__ */ jsx82(Cuboid56, { size: [leadLength, leadWidth, leadHeight] })
|
|
6469
|
+
},
|
|
6470
|
+
`left-${index}`
|
|
6471
|
+
),
|
|
6472
|
+
// Right lead
|
|
6473
|
+
/* @__PURE__ */ jsx82(
|
|
6474
|
+
Translate36,
|
|
6475
|
+
{
|
|
6476
|
+
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
|
|
6477
|
+
children: /* @__PURE__ */ jsx82(Cuboid56, { size: [leadLength, leadWidth, leadHeight] })
|
|
6478
|
+
},
|
|
6479
|
+
`right-${index}`
|
|
6480
|
+
)
|
|
6481
|
+
])
|
|
6482
|
+
] });
|
|
6483
|
+
};
|
|
6484
|
+
|
|
5988
6485
|
// lib/Footprinter3d.tsx
|
|
5989
|
-
import { jsx as
|
|
6486
|
+
import { Fragment as Fragment78, jsx as jsx83 } from "react/jsx-runtime";
|
|
5990
6487
|
var Footprinter3d = ({ footprint }) => {
|
|
5991
6488
|
let normalizedFootprint = footprint;
|
|
5992
6489
|
if (footprint.startsWith("jstzh1_5mm")) {
|
|
@@ -5994,12 +6491,17 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5994
6491
|
const numPins = pinMatch && pinMatch[1] ? pinMatch[1] : "7";
|
|
5995
6492
|
normalizedFootprint = `zh${numPins}`;
|
|
5996
6493
|
}
|
|
5997
|
-
const fpJson =
|
|
6494
|
+
const fpJson = fp5.string(normalizedFootprint).json();
|
|
5998
6495
|
const colorMatch = footprint.match(/_color\(([^)]+)\)/);
|
|
5999
6496
|
const color = colorMatch ? colorMatch[1] : void 0;
|
|
6497
|
+
const dim = (value, fallback) => {
|
|
6498
|
+
if (value === void 0 || value === null) return fallback;
|
|
6499
|
+
const parsed = mm(value);
|
|
6500
|
+
return Number.isFinite(parsed) ? parsed : fallback;
|
|
6501
|
+
};
|
|
6000
6502
|
switch (fpJson.fn) {
|
|
6001
6503
|
case "crystal":
|
|
6002
|
-
return /* @__PURE__ */
|
|
6504
|
+
return /* @__PURE__ */ jsx83(
|
|
6003
6505
|
Crystal,
|
|
6004
6506
|
{
|
|
6005
6507
|
horizontalPadPitch: fpJson.px,
|
|
@@ -6009,11 +6511,11 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6009
6511
|
}
|
|
6010
6512
|
);
|
|
6011
6513
|
case "dip":
|
|
6012
|
-
return /* @__PURE__ */
|
|
6514
|
+
return /* @__PURE__ */ jsx83(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
6013
6515
|
case "axial":
|
|
6014
|
-
return /* @__PURE__ */
|
|
6516
|
+
return /* @__PURE__ */ jsx83(AxialCapacitor, { pitch: fpJson.p });
|
|
6015
6517
|
case "tssop":
|
|
6016
|
-
return /* @__PURE__ */
|
|
6518
|
+
return /* @__PURE__ */ jsx83(
|
|
6017
6519
|
Tssop,
|
|
6018
6520
|
{
|
|
6019
6521
|
pinCount: fpJson.num_pins,
|
|
@@ -6024,7 +6526,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6024
6526
|
}
|
|
6025
6527
|
);
|
|
6026
6528
|
case "msop":
|
|
6027
|
-
return /* @__PURE__ */
|
|
6529
|
+
return /* @__PURE__ */ jsx83(
|
|
6028
6530
|
MSOP,
|
|
6029
6531
|
{
|
|
6030
6532
|
pinCount: fpJson.num_pins,
|
|
@@ -6035,7 +6537,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6035
6537
|
}
|
|
6036
6538
|
);
|
|
6037
6539
|
case "vssop":
|
|
6038
|
-
return /* @__PURE__ */
|
|
6540
|
+
return /* @__PURE__ */ jsx83(
|
|
6039
6541
|
VSSOP,
|
|
6040
6542
|
{
|
|
6041
6543
|
pinCount: fpJson.num_pins,
|
|
@@ -6047,7 +6549,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6047
6549
|
}
|
|
6048
6550
|
);
|
|
6049
6551
|
case "qfp":
|
|
6050
|
-
return /* @__PURE__ */
|
|
6552
|
+
return /* @__PURE__ */ jsx83(
|
|
6051
6553
|
QFP,
|
|
6052
6554
|
{
|
|
6053
6555
|
pinCount: fpJson.num_pins,
|
|
@@ -6058,12 +6560,12 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6058
6560
|
}
|
|
6059
6561
|
);
|
|
6060
6562
|
case "tqfp":
|
|
6061
|
-
return /* @__PURE__ */
|
|
6563
|
+
return /* @__PURE__ */ jsx83(tqfp_default, {});
|
|
6062
6564
|
case "lqfp":
|
|
6063
|
-
return /* @__PURE__ */
|
|
6565
|
+
return /* @__PURE__ */ jsx83(LQFP, { pinCount: fpJson.num_pins });
|
|
6064
6566
|
case "qfn": {
|
|
6065
6567
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
6066
|
-
return /* @__PURE__ */
|
|
6568
|
+
return /* @__PURE__ */ jsx83(
|
|
6067
6569
|
qfn_default,
|
|
6068
6570
|
{
|
|
6069
6571
|
num_pins: fpJson.num_pins,
|
|
@@ -6081,7 +6583,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6081
6583
|
}
|
|
6082
6584
|
case "dfn": {
|
|
6083
6585
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
6084
|
-
return /* @__PURE__ */
|
|
6586
|
+
return /* @__PURE__ */ jsx83(
|
|
6085
6587
|
DFN,
|
|
6086
6588
|
{
|
|
6087
6589
|
num_pins: fpJson.num_pins,
|
|
@@ -6101,7 +6603,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6101
6603
|
const rowsMatch = footprint.match(/_rows(\d+)/);
|
|
6102
6604
|
const rows = rowsMatch && rowsMatch[1] ? parseInt(rowsMatch[1], 10) : 1;
|
|
6103
6605
|
if (fpJson.male)
|
|
6104
|
-
return /* @__PURE__ */
|
|
6606
|
+
return /* @__PURE__ */ jsx83(
|
|
6105
6607
|
PinRow,
|
|
6106
6608
|
{
|
|
6107
6609
|
numberOfPins: fpJson.num_pins,
|
|
@@ -6114,7 +6616,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6114
6616
|
}
|
|
6115
6617
|
);
|
|
6116
6618
|
if (fpJson.female)
|
|
6117
|
-
return /* @__PURE__ */
|
|
6619
|
+
return /* @__PURE__ */ jsx83(
|
|
6118
6620
|
FemaleHeaderRow,
|
|
6119
6621
|
{
|
|
6120
6622
|
numberOfPins: fpJson.num_pins,
|
|
@@ -6124,7 +6626,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6124
6626
|
);
|
|
6125
6627
|
}
|
|
6126
6628
|
case "smdpinheader":
|
|
6127
|
-
return /* @__PURE__ */
|
|
6629
|
+
return /* @__PURE__ */ jsx83(
|
|
6128
6630
|
SmdPinHeader,
|
|
6129
6631
|
{
|
|
6130
6632
|
numberOfPins: fpJson.num_pins,
|
|
@@ -6133,58 +6635,91 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6133
6635
|
}
|
|
6134
6636
|
);
|
|
6135
6637
|
case "led5050":
|
|
6136
|
-
return /* @__PURE__ */
|
|
6638
|
+
return /* @__PURE__ */ jsx83(Led5050, { color });
|
|
6137
6639
|
case "cap": {
|
|
6138
6640
|
switch (fpJson.imperial) {
|
|
6139
6641
|
case "0402":
|
|
6140
|
-
return /* @__PURE__ */
|
|
6642
|
+
return /* @__PURE__ */ jsx83(A0402, { color: "#856c4d" });
|
|
6141
6643
|
case "0603":
|
|
6142
|
-
return /* @__PURE__ */
|
|
6644
|
+
return /* @__PURE__ */ jsx83(A0603, { color: "#856c4d" });
|
|
6143
6645
|
case "0805":
|
|
6144
|
-
return /* @__PURE__ */
|
|
6646
|
+
return /* @__PURE__ */ jsx83(A0805, { color: "#856c4d" });
|
|
6145
6647
|
case "0201":
|
|
6146
|
-
return /* @__PURE__ */
|
|
6648
|
+
return /* @__PURE__ */ jsx83(A0201, { color: "#856c4d" });
|
|
6147
6649
|
case "01005":
|
|
6148
|
-
return /* @__PURE__ */
|
|
6650
|
+
return /* @__PURE__ */ jsx83(A01005, { color: "#856c4d" });
|
|
6149
6651
|
case "1206":
|
|
6150
|
-
return /* @__PURE__ */
|
|
6652
|
+
return /* @__PURE__ */ jsx83(A1206, { color: "#856c4d" });
|
|
6151
6653
|
case "1210":
|
|
6152
|
-
return /* @__PURE__ */
|
|
6654
|
+
return /* @__PURE__ */ jsx83(A1210, { color: "#856c4d" });
|
|
6153
6655
|
case "2010":
|
|
6154
|
-
return /* @__PURE__ */
|
|
6656
|
+
return /* @__PURE__ */ jsx83(A2010, { color: "#856c4d" });
|
|
6155
6657
|
case "2512":
|
|
6156
|
-
return /* @__PURE__ */
|
|
6658
|
+
return /* @__PURE__ */ jsx83(A2512, { color: "#856c4d" });
|
|
6157
6659
|
}
|
|
6158
6660
|
break;
|
|
6159
6661
|
}
|
|
6160
6662
|
case "sot23":
|
|
6161
6663
|
switch (fpJson.num_pins) {
|
|
6162
6664
|
case 3:
|
|
6163
|
-
return /* @__PURE__ */
|
|
6665
|
+
return /* @__PURE__ */ jsx83(SOT233P, { color });
|
|
6164
6666
|
case 5:
|
|
6165
|
-
return /* @__PURE__ */
|
|
6667
|
+
return /* @__PURE__ */ jsx83(SOT_235_default, {});
|
|
6166
6668
|
}
|
|
6167
6669
|
break;
|
|
6670
|
+
case "sot25":
|
|
6671
|
+
return /* @__PURE__ */ jsx83(SOT_235_default, {});
|
|
6672
|
+
case "sot":
|
|
6673
|
+
case "sot343": {
|
|
6674
|
+
const isSc70 = fpJson.fn === "sot343";
|
|
6675
|
+
return /* @__PURE__ */ jsx83(
|
|
6676
|
+
GullWingBody,
|
|
6677
|
+
{
|
|
6678
|
+
pads: getSmtPadRects(normalizedFootprint),
|
|
6679
|
+
bodyWidth: isSc70 ? 1.25 : 1.6,
|
|
6680
|
+
bodyLength: isSc70 ? 2 : 2.9,
|
|
6681
|
+
bodyHeight: isSc70 ? 1.1 : 1.3
|
|
6682
|
+
}
|
|
6683
|
+
);
|
|
6684
|
+
}
|
|
6685
|
+
case "sot563":
|
|
6686
|
+
return /* @__PURE__ */ jsx83(SOT563, {});
|
|
6687
|
+
case "sot89": {
|
|
6688
|
+
const padSpan = dim(fpJson.w, 4.2);
|
|
6689
|
+
return /* @__PURE__ */ jsx83(
|
|
6690
|
+
SOT223,
|
|
6691
|
+
{
|
|
6692
|
+
fullWidth: padSpan,
|
|
6693
|
+
bodyWidth: padSpan * 0.6,
|
|
6694
|
+
bodyLength: dim(fpJson.h, 4.8) * 0.94,
|
|
6695
|
+
bodyHeight: 1.5,
|
|
6696
|
+
leadWidth: dim(fpJson.pw, 0.48),
|
|
6697
|
+
tabLeadWidth: dim(fpJson.pw, 0.48) * 2,
|
|
6698
|
+
padPitch: dim(fpJson.p, 1.5),
|
|
6699
|
+
leadHeight: 0.66
|
|
6700
|
+
}
|
|
6701
|
+
);
|
|
6702
|
+
}
|
|
6168
6703
|
case "sot457":
|
|
6169
|
-
return /* @__PURE__ */
|
|
6704
|
+
return /* @__PURE__ */ jsx83(SOT457, {});
|
|
6170
6705
|
case "sot223":
|
|
6171
|
-
return /* @__PURE__ */
|
|
6706
|
+
return /* @__PURE__ */ jsx83(SOT223, {});
|
|
6172
6707
|
case "sot23w":
|
|
6173
|
-
return /* @__PURE__ */
|
|
6708
|
+
return /* @__PURE__ */ jsx83(SOT23W, {});
|
|
6174
6709
|
case "sot323":
|
|
6175
|
-
return /* @__PURE__ */
|
|
6710
|
+
return /* @__PURE__ */ jsx83(SOT323, {});
|
|
6176
6711
|
case "sod323f":
|
|
6177
|
-
return /* @__PURE__ */
|
|
6712
|
+
return /* @__PURE__ */ jsx83(SOD323F, {});
|
|
6178
6713
|
case "sod323fl":
|
|
6179
|
-
return /* @__PURE__ */
|
|
6714
|
+
return /* @__PURE__ */ jsx83(SOD323FL, {});
|
|
6180
6715
|
case "sot363":
|
|
6181
|
-
return /* @__PURE__ */
|
|
6716
|
+
return /* @__PURE__ */ jsx83(SOT_363_default, {});
|
|
6182
6717
|
case "sot886":
|
|
6183
|
-
return /* @__PURE__ */
|
|
6718
|
+
return /* @__PURE__ */ jsx83(SOT886, {});
|
|
6184
6719
|
case "sot963":
|
|
6185
|
-
return /* @__PURE__ */
|
|
6720
|
+
return /* @__PURE__ */ jsx83(SOT963, {});
|
|
6186
6721
|
case "pushbutton":
|
|
6187
|
-
return /* @__PURE__ */
|
|
6722
|
+
return /* @__PURE__ */ jsx83(
|
|
6188
6723
|
PushButton,
|
|
6189
6724
|
{
|
|
6190
6725
|
width: fpJson.w,
|
|
@@ -6194,11 +6729,11 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6194
6729
|
);
|
|
6195
6730
|
case "jst":
|
|
6196
6731
|
if (fpJson.zh) {
|
|
6197
|
-
return /* @__PURE__ */
|
|
6732
|
+
return /* @__PURE__ */ jsx83(JSTZH1_5mm, { numPins: fpJson.num_pins });
|
|
6198
6733
|
}
|
|
6199
6734
|
break;
|
|
6200
6735
|
case "fpc":
|
|
6201
|
-
return /* @__PURE__ */
|
|
6736
|
+
return /* @__PURE__ */ jsx83(
|
|
6202
6737
|
FPC,
|
|
6203
6738
|
{
|
|
6204
6739
|
pinCount: fpJson.num_pins,
|
|
@@ -6218,7 +6753,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6218
6753
|
}
|
|
6219
6754
|
);
|
|
6220
6755
|
case "rj45":
|
|
6221
|
-
return /* @__PURE__ */
|
|
6756
|
+
return /* @__PURE__ */ jsx83(
|
|
6222
6757
|
RJ45,
|
|
6223
6758
|
{
|
|
6224
6759
|
bodyWidth: fpJson.w,
|
|
@@ -6242,7 +6777,9 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6242
6777
|
}
|
|
6243
6778
|
);
|
|
6244
6779
|
case "soic":
|
|
6245
|
-
|
|
6780
|
+
case "sop8":
|
|
6781
|
+
case "ssop":
|
|
6782
|
+
return /* @__PURE__ */ jsx83(
|
|
6246
6783
|
SOIC,
|
|
6247
6784
|
{
|
|
6248
6785
|
pinCount: fpJson.num_pins,
|
|
@@ -6252,44 +6789,178 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6252
6789
|
bodyWidth: fpJson.w
|
|
6253
6790
|
}
|
|
6254
6791
|
);
|
|
6792
|
+
case "son":
|
|
6793
|
+
case "wson":
|
|
6794
|
+
case "vson": {
|
|
6795
|
+
const bodyWidth = fpJson.fn === "vson" ? dim(fpJson.grid?.x, 3) : dim(fpJson.w, 3);
|
|
6796
|
+
const bodyLength10 = fpJson.fn === "vson" ? dim(fpJson.grid?.y, 3) : dim(fpJson.h, 3);
|
|
6797
|
+
const thermalPadWidth = dim(fpJson.epw, 0);
|
|
6798
|
+
const thermalPadLength = dim(fpJson.eph, 0);
|
|
6799
|
+
const padLength = fpJson.pl !== void 0 ? dim(fpJson.pl, 0) : void 0;
|
|
6800
|
+
const padWidth = fpJson.pw !== void 0 ? dim(fpJson.pw, 0) : void 0;
|
|
6801
|
+
const signalPads = getSmtPadRects(normalizedFootprint).filter(
|
|
6802
|
+
(pad) => Number(pad.pin ?? 0) <= fpJson.num_pins
|
|
6803
|
+
);
|
|
6804
|
+
const distinct = (values) => new Set(values.map((value) => value.toFixed(3))).size;
|
|
6805
|
+
const rowsAlongY = signalPads.length > 2 && distinct(signalPads.map((pad) => pad.y)) === 2 && distinct(signalPads.map((pad) => pad.x)) > 2;
|
|
6806
|
+
const dfn = /* @__PURE__ */ jsx83(
|
|
6807
|
+
DFN,
|
|
6808
|
+
{
|
|
6809
|
+
num_pins: fpJson.num_pins,
|
|
6810
|
+
bodyWidth: rowsAlongY ? bodyLength10 : bodyWidth,
|
|
6811
|
+
bodyLength: rowsAlongY ? bodyWidth : bodyLength10,
|
|
6812
|
+
pitch: dim(fpJson.p, 0.5),
|
|
6813
|
+
padLength,
|
|
6814
|
+
padWidth,
|
|
6815
|
+
thermalPadSize: fpJson.ep && thermalPadWidth > 0 && thermalPadLength > 0 ? {
|
|
6816
|
+
width: rowsAlongY ? thermalPadLength : thermalPadWidth,
|
|
6817
|
+
length: rowsAlongY ? thermalPadWidth : thermalPadLength
|
|
6818
|
+
} : void 0
|
|
6819
|
+
}
|
|
6820
|
+
);
|
|
6821
|
+
return rowsAlongY ? /* @__PURE__ */ jsx83(Rotate17, { rotation: [0, 0, "90deg"], children: dfn }) : dfn;
|
|
6822
|
+
}
|
|
6823
|
+
case "mlp":
|
|
6824
|
+
case "lga":
|
|
6825
|
+
case "quad": {
|
|
6826
|
+
if (fpJson.legsoutside) {
|
|
6827
|
+
return /* @__PURE__ */ jsx83(
|
|
6828
|
+
QFP,
|
|
6829
|
+
{
|
|
6830
|
+
pinCount: fpJson.num_pins,
|
|
6831
|
+
pitch: dim(fpJson.p, 0.5),
|
|
6832
|
+
leadWidth: dim(fpJson.pw, 0.25),
|
|
6833
|
+
padContactLength: dim(fpJson.pl, 0.25),
|
|
6834
|
+
bodyWidth: dim(fpJson.w, 6)
|
|
6835
|
+
}
|
|
6836
|
+
);
|
|
6837
|
+
}
|
|
6838
|
+
return /* @__PURE__ */ jsx83(
|
|
6839
|
+
qfn_default,
|
|
6840
|
+
{
|
|
6841
|
+
num_pins: fpJson.num_pins,
|
|
6842
|
+
bodyWidth: dim(fpJson.w, 6),
|
|
6843
|
+
bodyLength: dim(fpJson.h, 6),
|
|
6844
|
+
pitch: dim(fpJson.p, 0.5),
|
|
6845
|
+
padLength: dim(fpJson.pl, 0.25),
|
|
6846
|
+
padWidth: dim(fpJson.pw, 0.25)
|
|
6847
|
+
}
|
|
6848
|
+
);
|
|
6849
|
+
}
|
|
6850
|
+
case "bga": {
|
|
6851
|
+
const pitch = dim(fpJson.p, 0.8);
|
|
6852
|
+
const columns = fpJson.grid?.x ?? 8;
|
|
6853
|
+
const rows = fpJson.grid?.y ?? 8;
|
|
6854
|
+
return /* @__PURE__ */ jsx83(
|
|
6855
|
+
BGA,
|
|
6856
|
+
{
|
|
6857
|
+
ballPitch: pitch,
|
|
6858
|
+
ballColumns: columns,
|
|
6859
|
+
ballRows: rows,
|
|
6860
|
+
ballDiameter: pitch * 0.625,
|
|
6861
|
+
packageWidth: columns * pitch,
|
|
6862
|
+
packageLength: rows * pitch
|
|
6863
|
+
}
|
|
6864
|
+
);
|
|
6865
|
+
}
|
|
6255
6866
|
case "sod523":
|
|
6256
|
-
return /* @__PURE__ */
|
|
6867
|
+
return /* @__PURE__ */ jsx83(SOD523, {});
|
|
6257
6868
|
case "sod723":
|
|
6258
|
-
return /* @__PURE__ */
|
|
6869
|
+
return /* @__PURE__ */ jsx83(SOD723_default, {});
|
|
6259
6870
|
case "sod882":
|
|
6260
|
-
return /* @__PURE__ */
|
|
6871
|
+
return /* @__PURE__ */ jsx83(SOD882, {});
|
|
6261
6872
|
case "sma":
|
|
6262
|
-
return /* @__PURE__ */
|
|
6873
|
+
return /* @__PURE__ */ jsx83(SMA, {});
|
|
6263
6874
|
case "smb":
|
|
6264
|
-
return /* @__PURE__ */
|
|
6875
|
+
return /* @__PURE__ */ jsx83(SMB, {});
|
|
6265
6876
|
case "smc":
|
|
6266
|
-
return /* @__PURE__ */
|
|
6877
|
+
return /* @__PURE__ */ jsx83(SMC, {});
|
|
6267
6878
|
case "smf":
|
|
6268
|
-
return /* @__PURE__ */
|
|
6879
|
+
return /* @__PURE__ */ jsx83(SMF, {});
|
|
6269
6880
|
case "sod123":
|
|
6270
|
-
return /* @__PURE__ */
|
|
6881
|
+
return /* @__PURE__ */ jsx83(SOD123, {});
|
|
6271
6882
|
case "sod123f":
|
|
6272
|
-
return /* @__PURE__ */
|
|
6883
|
+
return /* @__PURE__ */ jsx83(SOD123F, {});
|
|
6273
6884
|
case "sod123fl":
|
|
6274
|
-
return /* @__PURE__ */
|
|
6885
|
+
return /* @__PURE__ */ jsx83(SOD123FL, {});
|
|
6275
6886
|
case "sod123w":
|
|
6276
|
-
return /* @__PURE__ */
|
|
6887
|
+
return /* @__PURE__ */ jsx83(SOD123W, {});
|
|
6888
|
+
case "sod110":
|
|
6889
|
+
return /* @__PURE__ */ jsx83(SOD123W, { bodyWidth: 2.1, bodyLength: 1.4 });
|
|
6277
6890
|
case "sod128":
|
|
6278
|
-
return /* @__PURE__ */
|
|
6891
|
+
return /* @__PURE__ */ jsx83(SOD128, {});
|
|
6279
6892
|
case "sod323":
|
|
6280
|
-
return /* @__PURE__ */
|
|
6893
|
+
return /* @__PURE__ */ jsx83(SOD323, {});
|
|
6894
|
+
case "sod323w":
|
|
6895
|
+
return /* @__PURE__ */ jsx83(SOD323, {});
|
|
6896
|
+
case "sod80":
|
|
6897
|
+
return /* @__PURE__ */ jsx83(MINIMELF, {});
|
|
6898
|
+
case "sod882d":
|
|
6899
|
+
return /* @__PURE__ */ jsx83(SOD882, {});
|
|
6900
|
+
case "smbf":
|
|
6901
|
+
return /* @__PURE__ */ jsx83(SMB, {});
|
|
6902
|
+
case "led2835":
|
|
6903
|
+
return /* @__PURE__ */ jsx83(
|
|
6904
|
+
Led2835,
|
|
6905
|
+
{
|
|
6906
|
+
color,
|
|
6907
|
+
bodyWidth: dim(fpJson.w, 3.5),
|
|
6908
|
+
bodyLength: dim(fpJson.h, 2.8),
|
|
6909
|
+
pad1X: dim(fpJson.p1x, -0.9),
|
|
6910
|
+
pad1Width: dim(fpJson.p1w, 2.2),
|
|
6911
|
+
pad2X: dim(fpJson.p2x, 1.375),
|
|
6912
|
+
pad2Width: dim(fpJson.p2w, 1.25),
|
|
6913
|
+
padLength: dim(fpJson.ph, 2.2)
|
|
6914
|
+
}
|
|
6915
|
+
);
|
|
6916
|
+
case "electrolytic":
|
|
6917
|
+
case "radial": {
|
|
6918
|
+
const pitch = dim(fpJson.p, 2.5);
|
|
6919
|
+
const namedDiameter = footprint.match(/_d([\d.]+)/);
|
|
6920
|
+
const diameter = fpJson.d !== void 0 ? dim(fpJson.d, pitch * 2) : namedDiameter ? Number(namedDiameter[1]) : pitch * 2;
|
|
6921
|
+
return /* @__PURE__ */ jsx83(ElectrolyticCapacitor, { diameter, leadPitch: pitch });
|
|
6922
|
+
}
|
|
6923
|
+
case "potentiometer":
|
|
6924
|
+
return /* @__PURE__ */ jsx83(
|
|
6925
|
+
Potentiometer,
|
|
6926
|
+
{
|
|
6927
|
+
bodyWidth: dim(fpJson.w, 5.35),
|
|
6928
|
+
bodyLength: dim(fpJson.ca, 14),
|
|
6929
|
+
bodyHeight: dim(fpJson.h, 4),
|
|
6930
|
+
leads: getPlatedHoleCenters(normalizedFootprint)
|
|
6931
|
+
}
|
|
6932
|
+
);
|
|
6933
|
+
case "smdpushbutton":
|
|
6934
|
+
return /* @__PURE__ */ jsx83(
|
|
6935
|
+
SmdPushButton,
|
|
6936
|
+
{
|
|
6937
|
+
padSpanX: dim(fpJson.px, 4.2),
|
|
6938
|
+
padSpanY: dim(fpJson.py, 2.15),
|
|
6939
|
+
padWidth: dim(fpJson.pw, 1.05),
|
|
6940
|
+
padLength: dim(fpJson.ph, 0.7)
|
|
6941
|
+
}
|
|
6942
|
+
);
|
|
6943
|
+
case "breakoutheaders": {
|
|
6944
|
+
const pitch = dim(fpJson.p, 2.54);
|
|
6945
|
+
const halfWidth = dim(fpJson.w, 10) / 2;
|
|
6946
|
+
const sides = [
|
|
6947
|
+
{ x: -halfWidth, pins: fpJson.left ?? 0, key: "left" },
|
|
6948
|
+
{ x: halfWidth, pins: fpJson.right ?? 0, key: "right" }
|
|
6949
|
+
];
|
|
6950
|
+
return /* @__PURE__ */ jsx83(Fragment78, { children: sides.filter(({ pins }) => pins > 0).map(({ x, pins, key }) => /* @__PURE__ */ jsx83(Translate37, { center: [x, 0, 0], children: /* @__PURE__ */ jsx83(Rotate17, { rotation: [0, 0, "90deg"], children: /* @__PURE__ */ jsx83(PinRow, { numberOfPins: pins, pitch }) }) }, key)) });
|
|
6951
|
+
}
|
|
6281
6952
|
case "sod923":
|
|
6282
|
-
return /* @__PURE__ */
|
|
6953
|
+
return /* @__PURE__ */ jsx83(SOD923, {});
|
|
6283
6954
|
case "hc49":
|
|
6284
|
-
return /* @__PURE__ */
|
|
6955
|
+
return /* @__PURE__ */ jsx83(HC49, {});
|
|
6285
6956
|
case "micromelf":
|
|
6286
|
-
return /* @__PURE__ */
|
|
6957
|
+
return /* @__PURE__ */ jsx83(MicroMELF, {});
|
|
6287
6958
|
case "minimelf":
|
|
6288
|
-
return /* @__PURE__ */
|
|
6959
|
+
return /* @__PURE__ */ jsx83(MINIMELF, {});
|
|
6289
6960
|
case "melf":
|
|
6290
|
-
return /* @__PURE__ */
|
|
6961
|
+
return /* @__PURE__ */ jsx83(MELF, {});
|
|
6291
6962
|
case "ms012":
|
|
6292
|
-
return /* @__PURE__ */
|
|
6963
|
+
return /* @__PURE__ */ jsx83(
|
|
6293
6964
|
MS012,
|
|
6294
6965
|
{
|
|
6295
6966
|
pinCount: fpJson.num_pins,
|
|
@@ -6299,7 +6970,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6299
6970
|
}
|
|
6300
6971
|
);
|
|
6301
6972
|
case "ms013":
|
|
6302
|
-
return /* @__PURE__ */
|
|
6973
|
+
return /* @__PURE__ */ jsx83(
|
|
6303
6974
|
MS013,
|
|
6304
6975
|
{
|
|
6305
6976
|
pinCount: fpJson.num_pins,
|
|
@@ -6309,14 +6980,55 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6309
6980
|
}
|
|
6310
6981
|
);
|
|
6311
6982
|
case "sot723":
|
|
6312
|
-
return /* @__PURE__ */
|
|
6983
|
+
return /* @__PURE__ */ jsx83(SOT723, {});
|
|
6313
6984
|
case "to220":
|
|
6314
|
-
return /* @__PURE__ */
|
|
6985
|
+
return /* @__PURE__ */ jsx83(TO220, { leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
6986
|
+
case "to220f":
|
|
6987
|
+
return /* @__PURE__ */ jsx83(TO220, { mouldedTab: true, leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
6315
6988
|
case "to92":
|
|
6316
|
-
return /* @__PURE__ */
|
|
6989
|
+
return /* @__PURE__ */ jsx83(TO92, { leads: getPlatedHoleCenters(normalizedFootprint) });
|
|
6990
|
+
case "to92l":
|
|
6991
|
+
case "to92s": {
|
|
6992
|
+
const across = dim(fpJson.w, 4.8);
|
|
6993
|
+
const along = dim(fpJson.h, 4);
|
|
6994
|
+
const diameter = Math.max(across, along);
|
|
6995
|
+
return /* @__PURE__ */ jsx83(
|
|
6996
|
+
TO92,
|
|
6997
|
+
{
|
|
6998
|
+
bodyDiameter: diameter,
|
|
6999
|
+
flatCut: Math.max(diameter - Math.min(across, along), 0.4),
|
|
7000
|
+
leads: getPlatedHoleCenters(normalizedFootprint)
|
|
7001
|
+
}
|
|
7002
|
+
);
|
|
7003
|
+
}
|
|
7004
|
+
case "to252":
|
|
7005
|
+
case "dpak":
|
|
7006
|
+
case "to263":
|
|
7007
|
+
case "d2pak": {
|
|
7008
|
+
const isD2Pak = fpJson.fn === "to263" || fpJson.fn === "d2pak";
|
|
7009
|
+
const tabWidth = dim(fpJson.tabw, isD2Pak ? 8.38 : 6.2);
|
|
7010
|
+
const tabLength = Math.min(
|
|
7011
|
+
dim(fpJson.tabh, isD2Pak ? 10 : 5.8),
|
|
7012
|
+
isD2Pak ? 10 : 6.5
|
|
7013
|
+
);
|
|
7014
|
+
return /* @__PURE__ */ jsx83(
|
|
7015
|
+
DPAK,
|
|
7016
|
+
{
|
|
7017
|
+
bodyWidth: tabWidth,
|
|
7018
|
+
bodyLength: dim(fpJson.w, isD2Pak ? 10.1 : 6.6),
|
|
7019
|
+
bodyHeight: isD2Pak ? 4.4 : 2.3,
|
|
7020
|
+
tabWidth,
|
|
7021
|
+
tabLength,
|
|
7022
|
+
span: dim(fpJson.span, isD2Pak ? 10.21 : 6.85),
|
|
7023
|
+
pitch: dim(fpJson.p, isD2Pak ? 2.54 : 2.29),
|
|
7024
|
+
leadWidth: dim(fpJson.pw, 1.5),
|
|
7025
|
+
leadContactLength: dim(fpJson.pl, 3)
|
|
7026
|
+
}
|
|
7027
|
+
);
|
|
7028
|
+
}
|
|
6317
7029
|
case "stampboard":
|
|
6318
7030
|
case "stampreceiver":
|
|
6319
|
-
return /* @__PURE__ */
|
|
7031
|
+
return /* @__PURE__ */ jsx83(
|
|
6320
7032
|
StampBoard,
|
|
6321
7033
|
{
|
|
6322
7034
|
bodyWidth: fpJson.w,
|
|
@@ -6340,7 +7052,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6340
7052
|
const pinRow = fpJson.pinrow;
|
|
6341
7053
|
const pinRowHoleEdgeToEdgeDist = fpJson.pinRowHoleEdgeToEdgeDist;
|
|
6342
7054
|
const holes = Array.isArray(fpJson.holes) ? fpJson.holes : [];
|
|
6343
|
-
return /* @__PURE__ */
|
|
7055
|
+
return /* @__PURE__ */ jsx83(
|
|
6344
7056
|
MountedPcbModule,
|
|
6345
7057
|
{
|
|
6346
7058
|
numPins: pinRow,
|
|
@@ -6367,29 +7079,29 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6367
7079
|
}
|
|
6368
7080
|
switch (fpJson.imperial) {
|
|
6369
7081
|
case "0402":
|
|
6370
|
-
return /* @__PURE__ */
|
|
7082
|
+
return /* @__PURE__ */ jsx83(A0402, { color });
|
|
6371
7083
|
case "0603":
|
|
6372
|
-
return /* @__PURE__ */
|
|
7084
|
+
return /* @__PURE__ */ jsx83(A0603, { color });
|
|
6373
7085
|
case "0805":
|
|
6374
|
-
return /* @__PURE__ */
|
|
7086
|
+
return /* @__PURE__ */ jsx83(A0805, { color });
|
|
6375
7087
|
case "0201":
|
|
6376
|
-
return /* @__PURE__ */
|
|
7088
|
+
return /* @__PURE__ */ jsx83(A0201, { color });
|
|
6377
7089
|
case "01005":
|
|
6378
|
-
return /* @__PURE__ */
|
|
7090
|
+
return /* @__PURE__ */ jsx83(A01005, { color });
|
|
6379
7091
|
case "1206":
|
|
6380
|
-
return /* @__PURE__ */
|
|
7092
|
+
return /* @__PURE__ */ jsx83(A1206, { color });
|
|
6381
7093
|
case "1210":
|
|
6382
|
-
return /* @__PURE__ */
|
|
7094
|
+
return /* @__PURE__ */ jsx83(A1210, { color });
|
|
6383
7095
|
case "2010":
|
|
6384
|
-
return /* @__PURE__ */
|
|
7096
|
+
return /* @__PURE__ */ jsx83(A2010, { color });
|
|
6385
7097
|
case "2512":
|
|
6386
|
-
return /* @__PURE__ */
|
|
7098
|
+
return /* @__PURE__ */ jsx83(A2512, { color });
|
|
6387
7099
|
}
|
|
6388
7100
|
if ((fpJson.fn === "res" || fpJson.fn === "cap") && fpJson.p !== void 0 && fpJson.ph !== void 0) {
|
|
6389
7101
|
const padPitch = mm(fpJson.p);
|
|
6390
7102
|
const padHeight = mm(fpJson.ph);
|
|
6391
7103
|
if (Number.isFinite(padPitch) && Number.isFinite(padHeight)) {
|
|
6392
|
-
return /* @__PURE__ */
|
|
7104
|
+
return /* @__PURE__ */ jsx83(
|
|
6393
7105
|
ParametricChip,
|
|
6394
7106
|
{
|
|
6395
7107
|
padPitch,
|
|
@@ -6401,47 +7113,6 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6401
7113
|
}
|
|
6402
7114
|
return null;
|
|
6403
7115
|
};
|
|
6404
|
-
|
|
6405
|
-
// lib/SOT-563.tsx
|
|
6406
|
-
import { Cuboid as Cuboid51, Translate as Translate35, Rotate as Rotate16, Colorize as Colorize42 } from "jscad-fiber";
|
|
6407
|
-
import { Fragment as Fragment70, jsx as jsx77, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
6408
|
-
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
6409
|
-
const bodyWidth = 1.2;
|
|
6410
|
-
const bodyLength10 = 1.6;
|
|
6411
|
-
const bodyHeight = 0.55;
|
|
6412
|
-
const leadWidth = 0.3;
|
|
6413
|
-
const leadLength = 0.67;
|
|
6414
|
-
const leadHeight = 0.13;
|
|
6415
|
-
const leadSpacing = 0.5;
|
|
6416
|
-
const bodyZOffset = -0.4;
|
|
6417
|
-
return /* @__PURE__ */ jsxs72(Fragment70, { children: [
|
|
6418
|
-
/* @__PURE__ */ jsx77(Rotate16, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx77(Translate35, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx77(Colorize42, { color: "grey", children: /* @__PURE__ */ jsx77(Cuboid51, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
6419
|
-
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
6420
|
-
// Left lead
|
|
6421
|
-
/* @__PURE__ */ jsx77(
|
|
6422
|
-
Translate35,
|
|
6423
|
-
{
|
|
6424
|
-
center: [
|
|
6425
|
-
-bodyWidth / 2 - 0.03,
|
|
6426
|
-
yOffset * leadSpacing,
|
|
6427
|
-
leadHeight / 2
|
|
6428
|
-
],
|
|
6429
|
-
children: /* @__PURE__ */ jsx77(Cuboid51, { size: [leadLength, leadWidth, leadHeight] })
|
|
6430
|
-
},
|
|
6431
|
-
`left-${index}`
|
|
6432
|
-
),
|
|
6433
|
-
// Right lead
|
|
6434
|
-
/* @__PURE__ */ jsx77(
|
|
6435
|
-
Translate35,
|
|
6436
|
-
{
|
|
6437
|
-
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
|
|
6438
|
-
children: /* @__PURE__ */ jsx77(Cuboid51, { size: [leadLength, leadWidth, leadHeight] })
|
|
6439
|
-
},
|
|
6440
|
-
`right-${index}`
|
|
6441
|
-
)
|
|
6442
|
-
])
|
|
6443
|
-
] });
|
|
6444
|
-
};
|
|
6445
7116
|
export {
|
|
6446
7117
|
A01005,
|
|
6447
7118
|
A0201,
|
|
@@ -6457,7 +7128,9 @@ export {
|
|
|
6457
7128
|
ChipBody,
|
|
6458
7129
|
Crystal,
|
|
6459
7130
|
DFN,
|
|
7131
|
+
DPAK,
|
|
6460
7132
|
Display,
|
|
7133
|
+
ElectrolyticCapacitor,
|
|
6461
7134
|
ExtrudedPads,
|
|
6462
7135
|
FPC,
|
|
6463
7136
|
FemaleHeader,
|
|
@@ -6465,9 +7138,11 @@ export {
|
|
|
6465
7138
|
FootprintPad,
|
|
6466
7139
|
FootprintPlatedHole,
|
|
6467
7140
|
Footprinter3d,
|
|
7141
|
+
GullWingBody,
|
|
6468
7142
|
HC49,
|
|
6469
7143
|
JSTZH1_5mm,
|
|
6470
7144
|
LQFP,
|
|
7145
|
+
Led2835,
|
|
6471
7146
|
Led5050,
|
|
6472
7147
|
MELF,
|
|
6473
7148
|
MINIMELF,
|
|
@@ -6478,6 +7153,7 @@ export {
|
|
|
6478
7153
|
MountedPcbModule,
|
|
6479
7154
|
PinHeader,
|
|
6480
7155
|
PinRow,
|
|
7156
|
+
Potentiometer,
|
|
6481
7157
|
QFN,
|
|
6482
7158
|
QFP,
|
|
6483
7159
|
RJ45,
|
|
@@ -6510,6 +7186,7 @@ export {
|
|
|
6510
7186
|
Screen,
|
|
6511
7187
|
SmdChipLead,
|
|
6512
7188
|
SmdPinHeader,
|
|
7189
|
+
SmdPushButton,
|
|
6513
7190
|
StampBoard,
|
|
6514
7191
|
TO220,
|
|
6515
7192
|
TO92,
|