jscad-electronics 0.0.5 → 0.0.7
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 +5 -2
- package/dist/index.js +73 -48
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -86,9 +86,12 @@ interface SmdChipLeadProps {
|
|
|
86
86
|
*/
|
|
87
87
|
declare const SmdChipLead: (props: SmdChipLeadProps) => react_jsx_runtime.JSX.Element;
|
|
88
88
|
|
|
89
|
-
declare const Tssop: ({ pinCount,
|
|
89
|
+
declare const Tssop: ({ pinCount, pl, pw, p, bodyWidth, }: {
|
|
90
90
|
pinCount: number;
|
|
91
|
-
|
|
91
|
+
p: number;
|
|
92
|
+
pw: number;
|
|
93
|
+
pl: number;
|
|
94
|
+
bodyWidth: number;
|
|
92
95
|
}) => react_jsx_runtime.JSX.Element;
|
|
93
96
|
|
|
94
97
|
declare const QFN: ({ fullWidth, height, thermalPadSize, }: {
|
package/dist/index.js
CHANGED
|
@@ -78487,7 +78487,7 @@ var ExtrudedPads = ({
|
|
|
78487
78487
|
};
|
|
78488
78488
|
|
|
78489
78489
|
// lib/Footprinter3d.tsx
|
|
78490
|
-
import { fp as
|
|
78490
|
+
import { fp as fp4 } from "@tscircuit/footprinter";
|
|
78491
78491
|
|
|
78492
78492
|
// lib/DualInlinePackage.tsx
|
|
78493
78493
|
var import_jscad_fiber8 = __toESM(require_dist(), 1);
|
|
@@ -78643,6 +78643,9 @@ var Dip = ({
|
|
|
78643
78643
|
] });
|
|
78644
78644
|
};
|
|
78645
78645
|
|
|
78646
|
+
// lib/Tssop.tsx
|
|
78647
|
+
import "@tscircuit/footprinter";
|
|
78648
|
+
|
|
78646
78649
|
// lib/SmdChipLead.tsx
|
|
78647
78650
|
var import_jscad_fiber9 = __toESM(require_dist(), 1);
|
|
78648
78651
|
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -78678,24 +78681,27 @@ var SmdChipLead = (props) => {
|
|
|
78678
78681
|
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
78679
78682
|
var Tssop = ({
|
|
78680
78683
|
pinCount,
|
|
78681
|
-
|
|
78684
|
+
pl,
|
|
78685
|
+
pw,
|
|
78686
|
+
p,
|
|
78687
|
+
bodyWidth
|
|
78682
78688
|
}) => {
|
|
78683
78689
|
const sidePinLength = Math.ceil(pinCount / 2);
|
|
78684
|
-
const fullLength4 =
|
|
78685
|
-
const pinOffsetToCenter = (sidePinLength - 1) *
|
|
78690
|
+
const fullLength4 = p * pinCount / 2 + pw / 2;
|
|
78691
|
+
const pinOffsetToCenter = (sidePinLength - 1) * p / 2;
|
|
78686
78692
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
78687
78693
|
Array.from({ length: sidePinLength }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
78688
78694
|
SmdChipLead,
|
|
78689
78695
|
{
|
|
78690
78696
|
position: {
|
|
78691
|
-
x: -
|
|
78692
|
-
y: i *
|
|
78697
|
+
x: -bodyWidth / 2 - 0.9,
|
|
78698
|
+
y: i * p - pinOffsetToCenter,
|
|
78693
78699
|
z: 0
|
|
78694
78700
|
},
|
|
78695
|
-
width:
|
|
78696
|
-
thickness: 0.
|
|
78697
|
-
padContactLength:
|
|
78698
|
-
bodyDistance:
|
|
78701
|
+
width: pw,
|
|
78702
|
+
thickness: 0.25,
|
|
78703
|
+
padContactLength: pl,
|
|
78704
|
+
bodyDistance: pl + 0.4,
|
|
78699
78705
|
height: 0.8
|
|
78700
78706
|
},
|
|
78701
78707
|
i
|
|
@@ -78704,11 +78710,15 @@ var Tssop = ({
|
|
|
78704
78710
|
SmdChipLead,
|
|
78705
78711
|
{
|
|
78706
78712
|
rotation: Math.PI,
|
|
78707
|
-
position: {
|
|
78708
|
-
|
|
78709
|
-
|
|
78710
|
-
|
|
78711
|
-
|
|
78713
|
+
position: {
|
|
78714
|
+
x: bodyWidth / 2 + 0.9,
|
|
78715
|
+
y: i * p - pinOffsetToCenter,
|
|
78716
|
+
z: 0
|
|
78717
|
+
},
|
|
78718
|
+
width: pw,
|
|
78719
|
+
thickness: 0.25,
|
|
78720
|
+
padContactLength: pl,
|
|
78721
|
+
bodyDistance: pl + 0.4,
|
|
78712
78722
|
height: 0.8
|
|
78713
78723
|
},
|
|
78714
78724
|
i
|
|
@@ -78717,7 +78727,7 @@ var Tssop = ({
|
|
|
78717
78727
|
ChipBody,
|
|
78718
78728
|
{
|
|
78719
78729
|
center: { x: 0, y: 0, z: 0 },
|
|
78720
|
-
width:
|
|
78730
|
+
width: bodyWidth,
|
|
78721
78731
|
length: fullLength4,
|
|
78722
78732
|
height: 1.5
|
|
78723
78733
|
}
|
|
@@ -78728,14 +78738,32 @@ var Tssop = ({
|
|
|
78728
78738
|
// lib/Footprinter3d.tsx
|
|
78729
78739
|
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
|
|
78730
78740
|
var Footprinter3d = ({ footprint }) => {
|
|
78731
|
-
const fpJson =
|
|
78741
|
+
const fpJson = fp4.string(footprint).json();
|
|
78732
78742
|
switch (fpJson.fn) {
|
|
78733
78743
|
case "dip":
|
|
78734
78744
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Dip, { numPins: fpJson.num_pins });
|
|
78735
78745
|
case "tssop":
|
|
78736
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
78746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
78747
|
+
Tssop,
|
|
78748
|
+
{
|
|
78749
|
+
pinCount: fpJson.num_pins,
|
|
78750
|
+
pl: fpJson.pl,
|
|
78751
|
+
pw: fpJson.pw,
|
|
78752
|
+
p: fpJson.p,
|
|
78753
|
+
bodyWidth: fpJson.w
|
|
78754
|
+
}
|
|
78755
|
+
);
|
|
78737
78756
|
case "soic":
|
|
78738
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
78757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
78758
|
+
Tssop,
|
|
78759
|
+
{
|
|
78760
|
+
pinCount: fpJson.num_pins,
|
|
78761
|
+
pl: fpJson.pl,
|
|
78762
|
+
pw: fpJson.pw,
|
|
78763
|
+
p: fpJson.p,
|
|
78764
|
+
bodyWidth: fpJson.w
|
|
78765
|
+
}
|
|
78766
|
+
);
|
|
78739
78767
|
}
|
|
78740
78768
|
switch (fpJson.imperial) {
|
|
78741
78769
|
case "0402":
|
|
@@ -78757,9 +78785,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78757
78785
|
const leadWidth = 0.4;
|
|
78758
78786
|
const leadThickness = 0.15;
|
|
78759
78787
|
const leadHeight = 0.95;
|
|
78760
|
-
const padContactLength = 0.
|
|
78761
|
-
const leadYOffset = 0.1;
|
|
78762
|
-
const bodyYOffset = -0.11;
|
|
78788
|
+
const padContactLength = 0.4;
|
|
78763
78789
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
78764
78790
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
78765
78791
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
@@ -78767,9 +78793,9 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78767
78793
|
{
|
|
78768
78794
|
rotation: Math.PI,
|
|
78769
78795
|
position: {
|
|
78770
|
-
x: fullWidth / 2
|
|
78771
|
-
y:
|
|
78772
|
-
z:
|
|
78796
|
+
x: fullWidth / 2,
|
|
78797
|
+
y: -1,
|
|
78798
|
+
z: 0
|
|
78773
78799
|
},
|
|
78774
78800
|
width: leadWidth,
|
|
78775
78801
|
thickness: leadThickness,
|
|
@@ -78784,9 +78810,9 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78784
78810
|
{
|
|
78785
78811
|
rotation: Math.PI,
|
|
78786
78812
|
position: {
|
|
78787
|
-
x: fullWidth / 2
|
|
78788
|
-
y:
|
|
78789
|
-
z: 0
|
|
78813
|
+
x: fullWidth / 2,
|
|
78814
|
+
y: 1,
|
|
78815
|
+
z: 0
|
|
78790
78816
|
},
|
|
78791
78817
|
width: leadWidth,
|
|
78792
78818
|
thickness: leadThickness,
|
|
@@ -78800,8 +78826,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78800
78826
|
SmdChipLead,
|
|
78801
78827
|
{
|
|
78802
78828
|
position: {
|
|
78803
|
-
x: -fullWidth / 2
|
|
78804
|
-
y:
|
|
78829
|
+
x: -fullWidth / 2,
|
|
78830
|
+
y: 0,
|
|
78805
78831
|
z: 0
|
|
78806
78832
|
},
|
|
78807
78833
|
width: leadWidth,
|
|
@@ -78815,7 +78841,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78815
78841
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
78816
78842
|
ChipBody,
|
|
78817
78843
|
{
|
|
78818
|
-
center: { x: 0, y:
|
|
78844
|
+
center: { x: 0, y: 0, z: 0 },
|
|
78819
78845
|
width: bodyWidth,
|
|
78820
78846
|
length: bodyLength4,
|
|
78821
78847
|
height: bodyHeight
|
|
@@ -78827,25 +78853,24 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength4 = 2.8 }) => {
|
|
|
78827
78853
|
// lib/SOT-563.tsx
|
|
78828
78854
|
var import_jscad_fiber10 = __toESM(require_dist(), 1);
|
|
78829
78855
|
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
|
|
78830
|
-
var SOT563 = ({ fullWidth =
|
|
78831
|
-
const bodyWidth = 1.
|
|
78856
|
+
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength4 = 1.6 }) => {
|
|
78857
|
+
const bodyWidth = 1.2;
|
|
78832
78858
|
const bodyLength4 = 1.6;
|
|
78833
78859
|
const bodyHeight = 0.55;
|
|
78834
78860
|
const leadWidth = 0.3;
|
|
78835
|
-
const leadLength = 0.
|
|
78836
|
-
const leadHeight = 0.
|
|
78861
|
+
const leadLength = 0.67;
|
|
78862
|
+
const leadHeight = 0.13;
|
|
78837
78863
|
const leadSpacing = 0.5;
|
|
78838
|
-
const bodyYOffset = leadHeight / 2;
|
|
78839
78864
|
const bodyZOffset = -0.3;
|
|
78840
78865
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
78841
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jscad_fiber10.Rotate, { rotation: [
|
|
78866
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jscad_fiber10.Rotate, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jscad_fiber10.Translate, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jscad_fiber10.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jscad_fiber10.Cuboid, { size: [bodyWidth, bodyLength4, bodyHeight] }) }) }) }),
|
|
78842
78867
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
78843
78868
|
// Left lead
|
|
78844
78869
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
78845
78870
|
import_jscad_fiber10.Translate,
|
|
78846
78871
|
{
|
|
78847
|
-
center: [-
|
|
78848
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jscad_fiber10.Cuboid, { size: [leadWidth, leadHeight
|
|
78872
|
+
center: [-bodyWidth / 2 - 0.03, yOffset * leadSpacing, 0],
|
|
78873
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jscad_fiber10.Cuboid, { size: [leadLength, leadWidth, leadHeight] })
|
|
78849
78874
|
},
|
|
78850
78875
|
`left-${index}`
|
|
78851
78876
|
),
|
|
@@ -78853,8 +78878,8 @@ var SOT563 = ({ fullWidth = 2, fullLength: fullLength4 = 1.6 }) => {
|
|
|
78853
78878
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
78854
78879
|
import_jscad_fiber10.Translate,
|
|
78855
78880
|
{
|
|
78856
|
-
center: [
|
|
78857
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jscad_fiber10.Cuboid, { size: [leadWidth, leadHeight
|
|
78881
|
+
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, 0],
|
|
78882
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jscad_fiber10.Cuboid, { size: [leadLength, leadWidth, leadHeight] })
|
|
78858
78883
|
},
|
|
78859
78884
|
`right-${index}`
|
|
78860
78885
|
)
|
|
@@ -78869,13 +78894,13 @@ var getCcwSot723Coords = (pn) => {
|
|
|
78869
78894
|
if (pn === 1) {
|
|
78870
78895
|
return { x: 0, y: 0 };
|
|
78871
78896
|
} else if (pn === 2) {
|
|
78872
|
-
return { x:
|
|
78897
|
+
return { x: 1, y: -0.4 };
|
|
78873
78898
|
} else {
|
|
78874
|
-
return { x:
|
|
78899
|
+
return { x: 1, y: 0.4 };
|
|
78875
78900
|
}
|
|
78876
78901
|
};
|
|
78877
78902
|
var SOT723 = () => {
|
|
78878
|
-
const bodyWidth =
|
|
78903
|
+
const bodyWidth = 0.8;
|
|
78879
78904
|
const bodyLength4 = 1.2;
|
|
78880
78905
|
const bodyHeight = 0.5;
|
|
78881
78906
|
const leadWidth = 0.32;
|
|
@@ -78883,16 +78908,16 @@ var SOT723 = () => {
|
|
|
78883
78908
|
const leadHeight = 0.1;
|
|
78884
78909
|
const centerLeadWidth = 0.42;
|
|
78885
78910
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
78886
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Rotate, { rotation: [
|
|
78911
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Rotate, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Translate, { center: [0.475, leadHeight / 2, -0.25], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Colorize, { color: "grey", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Cuboid, { size: [bodyWidth, bodyLength4, bodyHeight] }) }) }) }),
|
|
78887
78912
|
[1, 2, 3].map((pn) => {
|
|
78888
78913
|
const { x, y } = getCcwSot723Coords(pn);
|
|
78889
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Translate, { center: [x,
|
|
78914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jscad_fiber11.Translate, { center: [x, y, 0], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
78890
78915
|
import_jscad_fiber11.Cuboid,
|
|
78891
78916
|
{
|
|
78892
78917
|
size: [
|
|
78918
|
+
leadLength,
|
|
78893
78919
|
pn === 1 ? centerLeadWidth : leadWidth,
|
|
78894
|
-
leadHeight
|
|
78895
|
-
leadLength
|
|
78920
|
+
leadHeight
|
|
78896
78921
|
]
|
|
78897
78922
|
}
|
|
78898
78923
|
) }, `lead-${pn}`);
|