jscad-electronics 0.0.140 → 0.0.141
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 +13 -1
- package/dist/index.js +174 -90
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +81 -0
- package/dist/vanilla.js.map +1 -1
- package/package.json +2 -2
package/dist/vanilla.js
CHANGED
|
@@ -5042,6 +5042,78 @@ var FPC = ({
|
|
|
5042
5042
|
] });
|
|
5043
5043
|
};
|
|
5044
5044
|
|
|
5045
|
+
// lib/SmdPinHeader.tsx
|
|
5046
|
+
var SmdPinHeader = ({
|
|
5047
|
+
numberOfPins,
|
|
5048
|
+
pitch = 2.54,
|
|
5049
|
+
pinThickness = 0.64,
|
|
5050
|
+
bodyWidth = 2.5,
|
|
5051
|
+
bodyHeight = 2.54,
|
|
5052
|
+
standoffHeight = 1.27,
|
|
5053
|
+
matingPinLength = 5.8,
|
|
5054
|
+
tailSpan = 5.08
|
|
5055
|
+
}) => {
|
|
5056
|
+
const xStart = -((numberOfPins - 1) * pitch) / 2;
|
|
5057
|
+
const bodyTop = standoffHeight + bodyHeight;
|
|
5058
|
+
const tailLength = tailSpan / 2;
|
|
5059
|
+
const tipChamferHeight = pinThickness * 0.35;
|
|
5060
|
+
return /* @__PURE__ */ jsx(Fragment2, { children: Array.from({ length: numberOfPins }, (_, index) => {
|
|
5061
|
+
const x = xStart + index * pitch;
|
|
5062
|
+
const tailDirection = index % 2 === 0 ? 1 : -1;
|
|
5063
|
+
const postBodyLength = matingPinLength - tipChamferHeight;
|
|
5064
|
+
const verticalTailLength = standoffHeight - pinThickness / 2;
|
|
5065
|
+
return /* @__PURE__ */ jsxs(Translate, { x, children: [
|
|
5066
|
+
/* @__PURE__ */ jsx(
|
|
5067
|
+
Cuboid,
|
|
5068
|
+
{
|
|
5069
|
+
color: "#222",
|
|
5070
|
+
size: [pitch, bodyWidth, bodyHeight],
|
|
5071
|
+
center: [0, 0, standoffHeight + bodyHeight / 2]
|
|
5072
|
+
}
|
|
5073
|
+
),
|
|
5074
|
+
/* @__PURE__ */ jsxs(Colorize, { color: "#d4af37", children: [
|
|
5075
|
+
/* @__PURE__ */ jsx(
|
|
5076
|
+
Cuboid,
|
|
5077
|
+
{
|
|
5078
|
+
size: [pinThickness, tailLength, pinThickness],
|
|
5079
|
+
center: [0, tailDirection * (tailLength / 2), pinThickness / 2]
|
|
5080
|
+
}
|
|
5081
|
+
),
|
|
5082
|
+
/* @__PURE__ */ jsx(
|
|
5083
|
+
Cuboid,
|
|
5084
|
+
{
|
|
5085
|
+
size: [pinThickness, pinThickness, verticalTailLength],
|
|
5086
|
+
center: [0, 0, pinThickness / 2 + verticalTailLength / 2]
|
|
5087
|
+
}
|
|
5088
|
+
),
|
|
5089
|
+
/* @__PURE__ */ jsx(
|
|
5090
|
+
Cuboid,
|
|
5091
|
+
{
|
|
5092
|
+
size: [pinThickness, pinThickness, postBodyLength],
|
|
5093
|
+
center: [0, 0, bodyTop + postBodyLength / 2]
|
|
5094
|
+
}
|
|
5095
|
+
),
|
|
5096
|
+
/* @__PURE__ */ jsxs(Hull, { children: [
|
|
5097
|
+
/* @__PURE__ */ jsx(
|
|
5098
|
+
Cuboid,
|
|
5099
|
+
{
|
|
5100
|
+
size: [pinThickness, pinThickness, 0.01],
|
|
5101
|
+
center: [0, 0, bodyTop + postBodyLength]
|
|
5102
|
+
}
|
|
5103
|
+
),
|
|
5104
|
+
/* @__PURE__ */ jsx(
|
|
5105
|
+
Cuboid,
|
|
5106
|
+
{
|
|
5107
|
+
size: [pinThickness * 0.65, pinThickness * 0.65, 0.01],
|
|
5108
|
+
center: [0, 0, bodyTop + matingPinLength]
|
|
5109
|
+
}
|
|
5110
|
+
)
|
|
5111
|
+
] })
|
|
5112
|
+
] })
|
|
5113
|
+
] }, index);
|
|
5114
|
+
}) });
|
|
5115
|
+
};
|
|
5116
|
+
|
|
5045
5117
|
// lib/Footprinter3d.tsx
|
|
5046
5118
|
var Footprinter3d = ({ footprint }) => {
|
|
5047
5119
|
let normalizedFootprint = footprint;
|
|
@@ -5167,6 +5239,15 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5167
5239
|
}
|
|
5168
5240
|
);
|
|
5169
5241
|
}
|
|
5242
|
+
case "smdpinheader":
|
|
5243
|
+
return /* @__PURE__ */ jsx(
|
|
5244
|
+
SmdPinHeader,
|
|
5245
|
+
{
|
|
5246
|
+
numberOfPins: fpJson.num_pins,
|
|
5247
|
+
pitch: fpJson.p,
|
|
5248
|
+
bodyWidth: fpJson.bh
|
|
5249
|
+
}
|
|
5250
|
+
);
|
|
5170
5251
|
case "cap": {
|
|
5171
5252
|
switch (fpJson.imperial) {
|
|
5172
5253
|
case "0402":
|