jscad-electronics 0.0.138 → 0.0.140
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 +19 -1
- package/dist/index.js +385 -89
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +285 -0
- package/dist/vanilla.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4963,8 +4963,283 @@ var JSTZH1_5mm = ({
|
|
|
4963
4963
|
] });
|
|
4964
4964
|
};
|
|
4965
4965
|
|
|
4966
|
+
// lib/FPC.tsx
|
|
4967
|
+
import {
|
|
4968
|
+
Colorize as Colorize37,
|
|
4969
|
+
Cuboid as Cuboid45,
|
|
4970
|
+
Cylinder as Cylinder12,
|
|
4971
|
+
Rotate as Rotate13,
|
|
4972
|
+
RoundedCuboid as RoundedCuboid3,
|
|
4973
|
+
Subtract as Subtract10,
|
|
4974
|
+
Translate as Translate31
|
|
4975
|
+
} from "jscad-fiber";
|
|
4976
|
+
import { Fragment as Fragment62, jsx as jsx68, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
4977
|
+
var HOUSING_COLOR = "#303339";
|
|
4978
|
+
var HOUSING_SHADOW = "#1f2227";
|
|
4979
|
+
var ACTUATOR_COLOR = "#eee8d8";
|
|
4980
|
+
var ACTUATOR_HIGHLIGHT = "#f8f3e7";
|
|
4981
|
+
var TIN_COLOR = "#b7bdc2";
|
|
4982
|
+
var TIN_HIGHLIGHT = "#d2d6d9";
|
|
4983
|
+
var HOLD_DOWN_COLOR = "#767d82";
|
|
4984
|
+
var HOLD_DOWN_HIGHLIGHT = "#9ba1a5";
|
|
4985
|
+
var FPC = ({
|
|
4986
|
+
pinCount = 12,
|
|
4987
|
+
pitch = 0.5,
|
|
4988
|
+
padWidth = 0.3,
|
|
4989
|
+
padLength = 1.25,
|
|
4990
|
+
staggered = false,
|
|
4991
|
+
reverse = false,
|
|
4992
|
+
rowPitch = 2.4,
|
|
4993
|
+
topPadLength = padLength,
|
|
4994
|
+
bottomPadLength = padLength,
|
|
4995
|
+
mountPadPitchX,
|
|
4996
|
+
mountPadOffsetY = 2.575,
|
|
4997
|
+
mountTop = false,
|
|
4998
|
+
mountPadWidth = 2,
|
|
4999
|
+
mountPadLength = 2.5
|
|
5000
|
+
}) => {
|
|
5001
|
+
const contactSpan = Math.max((pinCount - 1) * pitch, pitch);
|
|
5002
|
+
const contactStartX = -contactSpan / 2;
|
|
5003
|
+
const resolvedMountPitch = mountPadPitchX ?? contactSpan + (staggered ? 3.5 : 3.38);
|
|
5004
|
+
const mountY = mountPadOffsetY === 0 ? 0 : (mountTop ? 1 : -1) * mountPadOffsetY;
|
|
5005
|
+
const contactRows = Array.from({ length: pinCount }, (_, index) => {
|
|
5006
|
+
const isUpperRow = staggered && index % 2 === 1 !== reverse;
|
|
5007
|
+
const y = staggered ? isUpperRow ? rowPitch / 2 : -rowPitch / 2 : 0;
|
|
5008
|
+
const length = isUpperRow ? topPadLength : bottomPadLength;
|
|
5009
|
+
return {
|
|
5010
|
+
index,
|
|
5011
|
+
x: contactStartX + index * pitch,
|
|
5012
|
+
y,
|
|
5013
|
+
length
|
|
5014
|
+
};
|
|
5015
|
+
});
|
|
5016
|
+
const contactMaxY = Math.max(
|
|
5017
|
+
...contactRows.map((contact) => contact.y + contact.length / 2)
|
|
5018
|
+
);
|
|
5019
|
+
const contactMinY = Math.min(
|
|
5020
|
+
...contactRows.map((contact) => contact.y - contact.length / 2)
|
|
5021
|
+
);
|
|
5022
|
+
const mountingMinY = mountY - mountPadLength / 2;
|
|
5023
|
+
const mountingMaxY = mountY + mountPadLength / 2;
|
|
5024
|
+
const signalSideY = mountTop ? contactMinY : contactMaxY;
|
|
5025
|
+
const cableSideY = mountTop ? Math.max(mountingMaxY, contactMaxY) + 0.67 : Math.min(mountingMinY, contactMinY) - 0.67;
|
|
5026
|
+
const directionToSignal = mountTop ? -1 : 1;
|
|
5027
|
+
const housingSignalY = signalSideY - directionToSignal * Math.max(padLength * 0.86, 1.05);
|
|
5028
|
+
const housingCableY = cableSideY + directionToSignal * 0.22;
|
|
5029
|
+
const housingDepth = Math.abs(housingSignalY - housingCableY);
|
|
5030
|
+
const housingCenterY = (housingSignalY + housingCableY) / 2;
|
|
5031
|
+
const cableEdgeY = housingCableY - directionToSignal * 0.01;
|
|
5032
|
+
const bodyWidth = Math.max(
|
|
5033
|
+
contactSpan + 4.9,
|
|
5034
|
+
resolvedMountPitch + mountPadWidth * 0.76
|
|
5035
|
+
);
|
|
5036
|
+
const openingWidth = Math.min(bodyWidth - 2.3, contactSpan + 1.1);
|
|
5037
|
+
const housingBaseHeight = 0.3;
|
|
5038
|
+
const housingHeight = 1.42;
|
|
5039
|
+
const overallHeight = 2;
|
|
5040
|
+
const throatDepth = Math.min(0.92, housingDepth * 0.28);
|
|
5041
|
+
const throatCenterY = cableEdgeY + directionToSignal * (throatDepth / 2 - 0.04);
|
|
5042
|
+
const throatHeight = 1.6;
|
|
5043
|
+
const throatCenterZ = 1.1;
|
|
5044
|
+
const actuatorDepth = Math.max(housingDepth - 0.78, 1.5);
|
|
5045
|
+
const actuatorCenterY = cableEdgeY + directionToSignal * (actuatorDepth / 2 + 0.68);
|
|
5046
|
+
const actuatorWidth = bodyWidth - 0.72;
|
|
5047
|
+
const actuatorHeight = 0.34;
|
|
5048
|
+
const actuatorCenterZ = overallHeight - actuatorHeight / 2;
|
|
5049
|
+
const hingeY = cableEdgeY + directionToSignal * Math.min(0.68, housingDepth * 0.22);
|
|
5050
|
+
const hingeZ = 1.48;
|
|
5051
|
+
const terminalWidth = Math.max(padWidth * 0.82, 0.15);
|
|
5052
|
+
const terminalOuterY = signalSideY;
|
|
5053
|
+
const terminalLength = Math.abs(terminalOuterY - housingSignalY);
|
|
5054
|
+
const terminalCenterY = (terminalOuterY + housingSignalY) / 2;
|
|
5055
|
+
const springLength = Math.max(throatDepth * 0.8, 0.5);
|
|
5056
|
+
const springCenterY = cableEdgeY + directionToSignal * (springLength / 2 + 0.08);
|
|
5057
|
+
const endClipX = resolvedMountPitch / 2;
|
|
5058
|
+
const clipHeight = 0.75;
|
|
5059
|
+
const clipWallX = bodyWidth / 2 - 0.04;
|
|
5060
|
+
const clipCapX = bodyWidth / 2 - 0.23;
|
|
5061
|
+
const sideBossX = bodyWidth / 2 - 0.32;
|
|
5062
|
+
const sideBossWidth = 0.68;
|
|
5063
|
+
return /* @__PURE__ */ jsxs64(Fragment62, { children: [
|
|
5064
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx68(
|
|
5065
|
+
Cuboid45,
|
|
5066
|
+
{
|
|
5067
|
+
color: TIN_COLOR,
|
|
5068
|
+
center: [direction * endClipX, mountY, 0.07],
|
|
5069
|
+
size: [mountPadWidth, mountPadLength, 0.14]
|
|
5070
|
+
},
|
|
5071
|
+
`mount-pad:${direction}`
|
|
5072
|
+
)),
|
|
5073
|
+
contactRows.map((contact) => /* @__PURE__ */ jsx68(
|
|
5074
|
+
Cuboid45,
|
|
5075
|
+
{
|
|
5076
|
+
color: TIN_COLOR,
|
|
5077
|
+
center: [contact.x, terminalCenterY, 0.065],
|
|
5078
|
+
size: [terminalWidth, terminalLength, 0.13]
|
|
5079
|
+
},
|
|
5080
|
+
`terminal:${contact.index}`
|
|
5081
|
+
)),
|
|
5082
|
+
/* @__PURE__ */ jsx68(
|
|
5083
|
+
RoundedCuboid3,
|
|
5084
|
+
{
|
|
5085
|
+
color: HOUSING_SHADOW,
|
|
5086
|
+
center: [0, housingCenterY, housingBaseHeight / 2],
|
|
5087
|
+
size: [bodyWidth, housingDepth, housingBaseHeight],
|
|
5088
|
+
roundRadius: 0.1
|
|
5089
|
+
}
|
|
5090
|
+
),
|
|
5091
|
+
/* @__PURE__ */ jsx68(Colorize37, { color: HOUSING_COLOR, children: /* @__PURE__ */ jsxs64(Subtract10, { children: [
|
|
5092
|
+
/* @__PURE__ */ jsx68(
|
|
5093
|
+
RoundedCuboid3,
|
|
5094
|
+
{
|
|
5095
|
+
center: [0, housingCenterY, housingBaseHeight + housingHeight / 2],
|
|
5096
|
+
size: [bodyWidth - 0.2, housingDepth - 0.12, housingHeight],
|
|
5097
|
+
roundRadius: 0.14
|
|
5098
|
+
}
|
|
5099
|
+
),
|
|
5100
|
+
/* @__PURE__ */ jsx68(
|
|
5101
|
+
Cuboid45,
|
|
5102
|
+
{
|
|
5103
|
+
center: [0, throatCenterY, throatCenterZ],
|
|
5104
|
+
size: [openingWidth, throatDepth, throatHeight]
|
|
5105
|
+
}
|
|
5106
|
+
),
|
|
5107
|
+
/* @__PURE__ */ jsx68(
|
|
5108
|
+
Cuboid45,
|
|
5109
|
+
{
|
|
5110
|
+
center: [0, actuatorCenterY, overallHeight - actuatorHeight * 0.72],
|
|
5111
|
+
size: [actuatorWidth - 0.32, actuatorDepth - 0.16, actuatorHeight]
|
|
5112
|
+
}
|
|
5113
|
+
)
|
|
5114
|
+
] }) }),
|
|
5115
|
+
contactRows.map((contact) => /* @__PURE__ */ jsx68(
|
|
5116
|
+
RoundedCuboid3,
|
|
5117
|
+
{
|
|
5118
|
+
color: TIN_HIGHLIGHT,
|
|
5119
|
+
center: [contact.x, springCenterY, housingBaseHeight + 0.82],
|
|
5120
|
+
size: [terminalWidth * 0.82, springLength, 0.14],
|
|
5121
|
+
roundRadius: 0.035
|
|
5122
|
+
},
|
|
5123
|
+
`spring:${contact.index}`
|
|
5124
|
+
)),
|
|
5125
|
+
contactRows.map((contact) => /* @__PURE__ */ jsx68(
|
|
5126
|
+
Cuboid45,
|
|
5127
|
+
{
|
|
5128
|
+
color: TIN_COLOR,
|
|
5129
|
+
center: [
|
|
5130
|
+
contact.x,
|
|
5131
|
+
housingSignalY - directionToSignal * 0.03,
|
|
5132
|
+
housingBaseHeight + 0.32
|
|
5133
|
+
],
|
|
5134
|
+
size: [terminalWidth, 0.13, 0.62]
|
|
5135
|
+
},
|
|
5136
|
+
`terminal-rise:${contact.index}`
|
|
5137
|
+
)),
|
|
5138
|
+
/* @__PURE__ */ jsx68(
|
|
5139
|
+
Cuboid45,
|
|
5140
|
+
{
|
|
5141
|
+
color: HOUSING_SHADOW,
|
|
5142
|
+
center: [
|
|
5143
|
+
0,
|
|
5144
|
+
cableEdgeY + directionToSignal * 0.1,
|
|
5145
|
+
housingBaseHeight + 0.71
|
|
5146
|
+
],
|
|
5147
|
+
size: [openingWidth + 0.18, 0.16, 0.8]
|
|
5148
|
+
}
|
|
5149
|
+
),
|
|
5150
|
+
/* @__PURE__ */ jsx68(
|
|
5151
|
+
RoundedCuboid3,
|
|
5152
|
+
{
|
|
5153
|
+
color: ACTUATOR_COLOR,
|
|
5154
|
+
center: [0, actuatorCenterY, actuatorCenterZ],
|
|
5155
|
+
size: [actuatorWidth, actuatorDepth, actuatorHeight],
|
|
5156
|
+
roundRadius: 0.11
|
|
5157
|
+
}
|
|
5158
|
+
),
|
|
5159
|
+
/* @__PURE__ */ jsx68(
|
|
5160
|
+
Cuboid45,
|
|
5161
|
+
{
|
|
5162
|
+
color: ACTUATOR_HIGHLIGHT,
|
|
5163
|
+
center: [
|
|
5164
|
+
0,
|
|
5165
|
+
actuatorCenterY - directionToSignal * (actuatorDepth / 2 - 0.12),
|
|
5166
|
+
overallHeight - 0.035
|
|
5167
|
+
],
|
|
5168
|
+
size: [actuatorWidth - 0.36, 0.24, 0.07]
|
|
5169
|
+
}
|
|
5170
|
+
),
|
|
5171
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx68(
|
|
5172
|
+
RoundedCuboid3,
|
|
5173
|
+
{
|
|
5174
|
+
color: ACTUATOR_COLOR,
|
|
5175
|
+
center: [direction * sideBossX, hingeY, hingeZ],
|
|
5176
|
+
size: [sideBossWidth, 0.92, 0.72],
|
|
5177
|
+
roundRadius: 0.1
|
|
5178
|
+
},
|
|
5179
|
+
`actuator-ear:${direction}`
|
|
5180
|
+
)),
|
|
5181
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx68(
|
|
5182
|
+
Translate31,
|
|
5183
|
+
{
|
|
5184
|
+
x: direction * sideBossX,
|
|
5185
|
+
y: hingeY,
|
|
5186
|
+
z: hingeZ,
|
|
5187
|
+
children: /* @__PURE__ */ jsx68(Rotate13, { rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ jsx68(
|
|
5188
|
+
Cylinder12,
|
|
5189
|
+
{
|
|
5190
|
+
color: ACTUATOR_HIGHLIGHT,
|
|
5191
|
+
height: sideBossWidth + 0.12,
|
|
5192
|
+
radius: 0.24
|
|
5193
|
+
}
|
|
5194
|
+
) })
|
|
5195
|
+
},
|
|
5196
|
+
`hinge:${direction}`
|
|
5197
|
+
)),
|
|
5198
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx68(
|
|
5199
|
+
RoundedCuboid3,
|
|
5200
|
+
{
|
|
5201
|
+
color: HOLD_DOWN_COLOR,
|
|
5202
|
+
center: [direction * clipWallX, mountY, clipHeight / 2],
|
|
5203
|
+
size: [0.17, Math.min(mountPadLength * 0.3, 0.7), clipHeight],
|
|
5204
|
+
roundRadius: 0.04
|
|
5205
|
+
},
|
|
5206
|
+
`hold-down-wall:${direction}`
|
|
5207
|
+
)),
|
|
5208
|
+
[-1, 1].map((direction) => /* @__PURE__ */ jsx68(
|
|
5209
|
+
RoundedCuboid3,
|
|
5210
|
+
{
|
|
5211
|
+
color: HOLD_DOWN_HIGHLIGHT,
|
|
5212
|
+
center: [direction * clipCapX, mountY, clipHeight - 0.05],
|
|
5213
|
+
size: [0.42, Math.min(mountPadLength * 0.3, 0.7), 0.1],
|
|
5214
|
+
roundRadius: 0.035
|
|
5215
|
+
},
|
|
5216
|
+
`hold-down-cap:${direction}`
|
|
5217
|
+
)),
|
|
5218
|
+
/* @__PURE__ */ jsx68(
|
|
5219
|
+
Cuboid45,
|
|
5220
|
+
{
|
|
5221
|
+
color: HOUSING_SHADOW,
|
|
5222
|
+
center: [0, housingCenterY, 0.025],
|
|
5223
|
+
size: [openingWidth + 0.7, housingDepth * 0.58, 0.05]
|
|
5224
|
+
}
|
|
5225
|
+
),
|
|
5226
|
+
/* @__PURE__ */ jsx68(
|
|
5227
|
+
Cuboid45,
|
|
5228
|
+
{
|
|
5229
|
+
color: HOUSING_SHADOW,
|
|
5230
|
+
center: [
|
|
5231
|
+
0,
|
|
5232
|
+
housingSignalY - directionToSignal * 0.06,
|
|
5233
|
+
housingBaseHeight + 0.82
|
|
5234
|
+
],
|
|
5235
|
+
size: [openingWidth + 0.4, 0.15, 0.92]
|
|
5236
|
+
}
|
|
5237
|
+
)
|
|
5238
|
+
] });
|
|
5239
|
+
};
|
|
5240
|
+
|
|
4966
5241
|
// lib/Footprinter3d.tsx
|
|
4967
|
-
import { jsx as
|
|
5242
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
4968
5243
|
var Footprinter3d = ({ footprint }) => {
|
|
4969
5244
|
let normalizedFootprint = footprint;
|
|
4970
5245
|
if (footprint.startsWith("jstzh1_5mm")) {
|
|
@@ -4975,11 +5250,11 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
4975
5250
|
const fpJson = fp3.string(normalizedFootprint).json();
|
|
4976
5251
|
switch (fpJson.fn) {
|
|
4977
5252
|
case "dip":
|
|
4978
|
-
return /* @__PURE__ */
|
|
5253
|
+
return /* @__PURE__ */ jsx69(Dip, { numPins: fpJson.num_pins, pitch: fpJson.p, bodyWidth: fpJson.w });
|
|
4979
5254
|
case "axial":
|
|
4980
|
-
return /* @__PURE__ */
|
|
5255
|
+
return /* @__PURE__ */ jsx69(AxialCapacitor, { pitch: fpJson.p });
|
|
4981
5256
|
case "tssop":
|
|
4982
|
-
return /* @__PURE__ */
|
|
5257
|
+
return /* @__PURE__ */ jsx69(
|
|
4983
5258
|
Tssop,
|
|
4984
5259
|
{
|
|
4985
5260
|
pinCount: fpJson.num_pins,
|
|
@@ -4990,7 +5265,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
4990
5265
|
}
|
|
4991
5266
|
);
|
|
4992
5267
|
case "msop":
|
|
4993
|
-
return /* @__PURE__ */
|
|
5268
|
+
return /* @__PURE__ */ jsx69(
|
|
4994
5269
|
MSOP,
|
|
4995
5270
|
{
|
|
4996
5271
|
pinCount: fpJson.num_pins,
|
|
@@ -5001,7 +5276,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5001
5276
|
}
|
|
5002
5277
|
);
|
|
5003
5278
|
case "vssop":
|
|
5004
|
-
return /* @__PURE__ */
|
|
5279
|
+
return /* @__PURE__ */ jsx69(
|
|
5005
5280
|
VSSOP,
|
|
5006
5281
|
{
|
|
5007
5282
|
pinCount: fpJson.num_pins,
|
|
@@ -5013,7 +5288,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5013
5288
|
}
|
|
5014
5289
|
);
|
|
5015
5290
|
case "qfp":
|
|
5016
|
-
return /* @__PURE__ */
|
|
5291
|
+
return /* @__PURE__ */ jsx69(
|
|
5017
5292
|
QFP,
|
|
5018
5293
|
{
|
|
5019
5294
|
pinCount: fpJson.num_pins,
|
|
@@ -5024,12 +5299,12 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5024
5299
|
}
|
|
5025
5300
|
);
|
|
5026
5301
|
case "tqfp":
|
|
5027
|
-
return /* @__PURE__ */
|
|
5302
|
+
return /* @__PURE__ */ jsx69(tqfp_default, {});
|
|
5028
5303
|
case "lqfp":
|
|
5029
|
-
return /* @__PURE__ */
|
|
5304
|
+
return /* @__PURE__ */ jsx69(LQFP, { pinCount: fpJson.num_pins });
|
|
5030
5305
|
case "qfn": {
|
|
5031
5306
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
5032
|
-
return /* @__PURE__ */
|
|
5307
|
+
return /* @__PURE__ */ jsx69(
|
|
5033
5308
|
qfn_default,
|
|
5034
5309
|
{
|
|
5035
5310
|
num_pins: fpJson.num_pins,
|
|
@@ -5047,7 +5322,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5047
5322
|
}
|
|
5048
5323
|
case "dfn": {
|
|
5049
5324
|
const hasThermalPad = typeof fpJson.thermalpad?.x === "number" && typeof fpJson.thermalpad?.y === "number";
|
|
5050
|
-
return /* @__PURE__ */
|
|
5325
|
+
return /* @__PURE__ */ jsx69(
|
|
5051
5326
|
DFN,
|
|
5052
5327
|
{
|
|
5053
5328
|
num_pins: fpJson.num_pins,
|
|
@@ -5067,7 +5342,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5067
5342
|
const rowsMatch = footprint.match(/_rows(\d+)/);
|
|
5068
5343
|
const rows = rowsMatch && rowsMatch[1] ? parseInt(rowsMatch[1], 10) : 1;
|
|
5069
5344
|
if (fpJson.male)
|
|
5070
|
-
return /* @__PURE__ */
|
|
5345
|
+
return /* @__PURE__ */ jsx69(
|
|
5071
5346
|
PinRow,
|
|
5072
5347
|
{
|
|
5073
5348
|
numberOfPins: fpJson.num_pins,
|
|
@@ -5080,7 +5355,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5080
5355
|
}
|
|
5081
5356
|
);
|
|
5082
5357
|
if (fpJson.female)
|
|
5083
|
-
return /* @__PURE__ */
|
|
5358
|
+
return /* @__PURE__ */ jsx69(
|
|
5084
5359
|
FemaleHeaderRow,
|
|
5085
5360
|
{
|
|
5086
5361
|
numberOfPins: fpJson.num_pins,
|
|
@@ -5092,47 +5367,47 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5092
5367
|
case "cap": {
|
|
5093
5368
|
switch (fpJson.imperial) {
|
|
5094
5369
|
case "0402":
|
|
5095
|
-
return /* @__PURE__ */
|
|
5370
|
+
return /* @__PURE__ */ jsx69(A0402, { color: "#856c4d" });
|
|
5096
5371
|
case "0603":
|
|
5097
|
-
return /* @__PURE__ */
|
|
5372
|
+
return /* @__PURE__ */ jsx69(A0603, { color: "#856c4d" });
|
|
5098
5373
|
case "0805":
|
|
5099
|
-
return /* @__PURE__ */
|
|
5374
|
+
return /* @__PURE__ */ jsx69(A0805, { color: "#856c4d" });
|
|
5100
5375
|
case "0201":
|
|
5101
|
-
return /* @__PURE__ */
|
|
5376
|
+
return /* @__PURE__ */ jsx69(A0201, { color: "#856c4d" });
|
|
5102
5377
|
case "01005":
|
|
5103
|
-
return /* @__PURE__ */
|
|
5378
|
+
return /* @__PURE__ */ jsx69(A01005, { color: "#856c4d" });
|
|
5104
5379
|
case "1206":
|
|
5105
|
-
return /* @__PURE__ */
|
|
5380
|
+
return /* @__PURE__ */ jsx69(A1206, { color: "#856c4d" });
|
|
5106
5381
|
case "1210":
|
|
5107
|
-
return /* @__PURE__ */
|
|
5382
|
+
return /* @__PURE__ */ jsx69(A1210, { color: "#856c4d" });
|
|
5108
5383
|
case "2010":
|
|
5109
|
-
return /* @__PURE__ */
|
|
5384
|
+
return /* @__PURE__ */ jsx69(A2010, { color: "#856c4d" });
|
|
5110
5385
|
case "2512":
|
|
5111
|
-
return /* @__PURE__ */
|
|
5386
|
+
return /* @__PURE__ */ jsx69(A2512, { color: "#856c4d" });
|
|
5112
5387
|
}
|
|
5113
5388
|
}
|
|
5114
5389
|
case "sot235":
|
|
5115
|
-
return /* @__PURE__ */
|
|
5390
|
+
return /* @__PURE__ */ jsx69(SOT_235_default, {});
|
|
5116
5391
|
case "sot457":
|
|
5117
|
-
return /* @__PURE__ */
|
|
5392
|
+
return /* @__PURE__ */ jsx69(SOT457, {});
|
|
5118
5393
|
case "sot223":
|
|
5119
|
-
return /* @__PURE__ */
|
|
5394
|
+
return /* @__PURE__ */ jsx69(SOT223, {});
|
|
5120
5395
|
case "sot23w":
|
|
5121
|
-
return /* @__PURE__ */
|
|
5396
|
+
return /* @__PURE__ */ jsx69(SOT23W, {});
|
|
5122
5397
|
case "sot323":
|
|
5123
|
-
return /* @__PURE__ */
|
|
5398
|
+
return /* @__PURE__ */ jsx69(SOT323, {});
|
|
5124
5399
|
case "sod323f":
|
|
5125
|
-
return /* @__PURE__ */
|
|
5400
|
+
return /* @__PURE__ */ jsx69(SOD323F, {});
|
|
5126
5401
|
case "sod323fl":
|
|
5127
|
-
return /* @__PURE__ */
|
|
5402
|
+
return /* @__PURE__ */ jsx69(SOD323FL, {});
|
|
5128
5403
|
case "sot363":
|
|
5129
|
-
return /* @__PURE__ */
|
|
5404
|
+
return /* @__PURE__ */ jsx69(SOT_363_default, {});
|
|
5130
5405
|
case "sot886":
|
|
5131
|
-
return /* @__PURE__ */
|
|
5406
|
+
return /* @__PURE__ */ jsx69(SOT886, {});
|
|
5132
5407
|
case "sot963":
|
|
5133
|
-
return /* @__PURE__ */
|
|
5408
|
+
return /* @__PURE__ */ jsx69(SOT963, {});
|
|
5134
5409
|
case "pushbutton":
|
|
5135
|
-
return /* @__PURE__ */
|
|
5410
|
+
return /* @__PURE__ */ jsx69(
|
|
5136
5411
|
PushButton,
|
|
5137
5412
|
{
|
|
5138
5413
|
width: fpJson.w,
|
|
@@ -5142,11 +5417,31 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5142
5417
|
);
|
|
5143
5418
|
case "jst":
|
|
5144
5419
|
if (fpJson.zh) {
|
|
5145
|
-
return /* @__PURE__ */
|
|
5420
|
+
return /* @__PURE__ */ jsx69(JSTZH1_5mm, { numPins: fpJson.num_pins });
|
|
5146
5421
|
}
|
|
5147
5422
|
break;
|
|
5423
|
+
case "fpc":
|
|
5424
|
+
return /* @__PURE__ */ jsx69(
|
|
5425
|
+
FPC,
|
|
5426
|
+
{
|
|
5427
|
+
pinCount: fpJson.num_pins,
|
|
5428
|
+
pitch: fpJson.p,
|
|
5429
|
+
padWidth: fpJson.pw,
|
|
5430
|
+
padLength: fpJson.pl,
|
|
5431
|
+
staggered: fpJson.staggered,
|
|
5432
|
+
reverse: fpJson.reverse,
|
|
5433
|
+
rowPitch: fpJson.py,
|
|
5434
|
+
topPadLength: fpJson.toppl,
|
|
5435
|
+
bottomPadLength: fpJson.bottompl,
|
|
5436
|
+
mountPadPitchX: fpJson.mpx,
|
|
5437
|
+
mountPadOffsetY: fpJson.mpy,
|
|
5438
|
+
mountTop: fpJson.mounttop,
|
|
5439
|
+
mountPadWidth: fpJson.mpw,
|
|
5440
|
+
mountPadLength: fpJson.mpl
|
|
5441
|
+
}
|
|
5442
|
+
);
|
|
5148
5443
|
case "soic":
|
|
5149
|
-
return /* @__PURE__ */
|
|
5444
|
+
return /* @__PURE__ */ jsx69(
|
|
5150
5445
|
SOIC,
|
|
5151
5446
|
{
|
|
5152
5447
|
pinCount: fpJson.num_pins,
|
|
@@ -5157,41 +5452,41 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5157
5452
|
}
|
|
5158
5453
|
);
|
|
5159
5454
|
case "sod523":
|
|
5160
|
-
return /* @__PURE__ */
|
|
5455
|
+
return /* @__PURE__ */ jsx69(SOD523, {});
|
|
5161
5456
|
case "sod723":
|
|
5162
|
-
return /* @__PURE__ */
|
|
5457
|
+
return /* @__PURE__ */ jsx69(SOD723_default, {});
|
|
5163
5458
|
case "sod882":
|
|
5164
|
-
return /* @__PURE__ */
|
|
5459
|
+
return /* @__PURE__ */ jsx69(SOD882, {});
|
|
5165
5460
|
case "sma":
|
|
5166
|
-
return /* @__PURE__ */
|
|
5461
|
+
return /* @__PURE__ */ jsx69(SMA, {});
|
|
5167
5462
|
case "smb":
|
|
5168
|
-
return /* @__PURE__ */
|
|
5463
|
+
return /* @__PURE__ */ jsx69(SMB, {});
|
|
5169
5464
|
case "smc":
|
|
5170
|
-
return /* @__PURE__ */
|
|
5465
|
+
return /* @__PURE__ */ jsx69(SMC, {});
|
|
5171
5466
|
case "smf":
|
|
5172
|
-
return /* @__PURE__ */
|
|
5467
|
+
return /* @__PURE__ */ jsx69(SMF, {});
|
|
5173
5468
|
case "sod123f":
|
|
5174
|
-
return /* @__PURE__ */
|
|
5469
|
+
return /* @__PURE__ */ jsx69(SOD123F, {});
|
|
5175
5470
|
case "sod123fl":
|
|
5176
|
-
return /* @__PURE__ */
|
|
5471
|
+
return /* @__PURE__ */ jsx69(SOD123FL, {});
|
|
5177
5472
|
case "sod123w":
|
|
5178
|
-
return /* @__PURE__ */
|
|
5473
|
+
return /* @__PURE__ */ jsx69(SOD123W, {});
|
|
5179
5474
|
case "sod128":
|
|
5180
|
-
return /* @__PURE__ */
|
|
5475
|
+
return /* @__PURE__ */ jsx69(SOD128, {});
|
|
5181
5476
|
case "sod323":
|
|
5182
|
-
return /* @__PURE__ */
|
|
5477
|
+
return /* @__PURE__ */ jsx69(SOD323, {});
|
|
5183
5478
|
case "sod923":
|
|
5184
|
-
return /* @__PURE__ */
|
|
5479
|
+
return /* @__PURE__ */ jsx69(SOD923, {});
|
|
5185
5480
|
case "hc49":
|
|
5186
|
-
return /* @__PURE__ */
|
|
5481
|
+
return /* @__PURE__ */ jsx69(HC49, {});
|
|
5187
5482
|
case "micromelf":
|
|
5188
|
-
return /* @__PURE__ */
|
|
5483
|
+
return /* @__PURE__ */ jsx69(MicroMELF, {});
|
|
5189
5484
|
case "minimelf":
|
|
5190
|
-
return /* @__PURE__ */
|
|
5485
|
+
return /* @__PURE__ */ jsx69(MINIMELF, {});
|
|
5191
5486
|
case "melf":
|
|
5192
|
-
return /* @__PURE__ */
|
|
5487
|
+
return /* @__PURE__ */ jsx69(MELF, {});
|
|
5193
5488
|
case "ms012":
|
|
5194
|
-
return /* @__PURE__ */
|
|
5489
|
+
return /* @__PURE__ */ jsx69(
|
|
5195
5490
|
MS012,
|
|
5196
5491
|
{
|
|
5197
5492
|
pinCount: fpJson.num_pins,
|
|
@@ -5201,7 +5496,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5201
5496
|
}
|
|
5202
5497
|
);
|
|
5203
5498
|
case "ms013":
|
|
5204
|
-
return /* @__PURE__ */
|
|
5499
|
+
return /* @__PURE__ */ jsx69(
|
|
5205
5500
|
MS013,
|
|
5206
5501
|
{
|
|
5207
5502
|
pinCount: fpJson.num_pins,
|
|
@@ -5211,14 +5506,14 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5211
5506
|
}
|
|
5212
5507
|
);
|
|
5213
5508
|
case "sot723":
|
|
5214
|
-
return /* @__PURE__ */
|
|
5509
|
+
return /* @__PURE__ */ jsx69(SOT723, {});
|
|
5215
5510
|
case "to220":
|
|
5216
|
-
return /* @__PURE__ */
|
|
5511
|
+
return /* @__PURE__ */ jsx69(TO220, {});
|
|
5217
5512
|
case "to92":
|
|
5218
|
-
return /* @__PURE__ */
|
|
5513
|
+
return /* @__PURE__ */ jsx69(TO92, {});
|
|
5219
5514
|
case "stampboard":
|
|
5220
5515
|
case "stampreceiver":
|
|
5221
|
-
return /* @__PURE__ */
|
|
5516
|
+
return /* @__PURE__ */ jsx69(
|
|
5222
5517
|
StampBoard,
|
|
5223
5518
|
{
|
|
5224
5519
|
bodyWidth: fpJson.w,
|
|
@@ -5242,7 +5537,7 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5242
5537
|
const pinRow = fpJson.pinrow;
|
|
5243
5538
|
const pinRowHoleEdgeToEdgeDist = fpJson.pinRowHoleEdgeToEdgeDist;
|
|
5244
5539
|
const holes = Array.isArray(fpJson.holes) ? fpJson.holes : [];
|
|
5245
|
-
return /* @__PURE__ */
|
|
5540
|
+
return /* @__PURE__ */ jsx69(
|
|
5246
5541
|
MountedPcbModule,
|
|
5247
5542
|
{
|
|
5248
5543
|
numPins: pinRow,
|
|
@@ -5271,29 +5566,29 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
5271
5566
|
const color = colorMatch ? colorMatch[1] : void 0;
|
|
5272
5567
|
switch (fpJson.imperial) {
|
|
5273
5568
|
case "0402":
|
|
5274
|
-
return /* @__PURE__ */
|
|
5569
|
+
return /* @__PURE__ */ jsx69(A0402, { color });
|
|
5275
5570
|
case "0603":
|
|
5276
|
-
return /* @__PURE__ */
|
|
5571
|
+
return /* @__PURE__ */ jsx69(A0603, { color });
|
|
5277
5572
|
case "0805":
|
|
5278
|
-
return /* @__PURE__ */
|
|
5573
|
+
return /* @__PURE__ */ jsx69(A0805, { color });
|
|
5279
5574
|
case "0201":
|
|
5280
|
-
return /* @__PURE__ */
|
|
5575
|
+
return /* @__PURE__ */ jsx69(A0201, { color });
|
|
5281
5576
|
case "01005":
|
|
5282
|
-
return /* @__PURE__ */
|
|
5577
|
+
return /* @__PURE__ */ jsx69(A01005, { color });
|
|
5283
5578
|
case "1206":
|
|
5284
|
-
return /* @__PURE__ */
|
|
5579
|
+
return /* @__PURE__ */ jsx69(A1206, { color });
|
|
5285
5580
|
case "1210":
|
|
5286
|
-
return /* @__PURE__ */
|
|
5581
|
+
return /* @__PURE__ */ jsx69(A1210, { color });
|
|
5287
5582
|
case "2010":
|
|
5288
|
-
return /* @__PURE__ */
|
|
5583
|
+
return /* @__PURE__ */ jsx69(A2010, { color });
|
|
5289
5584
|
case "2512":
|
|
5290
|
-
return /* @__PURE__ */
|
|
5585
|
+
return /* @__PURE__ */ jsx69(A2512, { color });
|
|
5291
5586
|
}
|
|
5292
5587
|
return null;
|
|
5293
5588
|
};
|
|
5294
5589
|
|
|
5295
5590
|
// lib/SOT-23-3P.tsx
|
|
5296
|
-
import { Fragment as
|
|
5591
|
+
import { Fragment as Fragment63, jsx as jsx70, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
5297
5592
|
var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
5298
5593
|
const bodyWidth = 1.3;
|
|
5299
5594
|
const bodyLength10 = 2.9;
|
|
@@ -5304,8 +5599,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
5304
5599
|
const padContactLength = 0.4;
|
|
5305
5600
|
const padThickness = leadThickness / 2;
|
|
5306
5601
|
const extendedBodyDistance = (fullWidth - bodyWidth) / 2 + 0.3;
|
|
5307
|
-
return /* @__PURE__ */
|
|
5308
|
-
/* @__PURE__ */
|
|
5602
|
+
return /* @__PURE__ */ jsxs65(Fragment63, { children: [
|
|
5603
|
+
/* @__PURE__ */ jsx70(
|
|
5309
5604
|
SmdChipLead,
|
|
5310
5605
|
{
|
|
5311
5606
|
rotation: Math.PI,
|
|
@@ -5322,7 +5617,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
5322
5617
|
},
|
|
5323
5618
|
1
|
|
5324
5619
|
),
|
|
5325
|
-
/* @__PURE__ */
|
|
5620
|
+
/* @__PURE__ */ jsx70(
|
|
5326
5621
|
SmdChipLead,
|
|
5327
5622
|
{
|
|
5328
5623
|
rotation: Math.PI,
|
|
@@ -5339,7 +5634,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
5339
5634
|
},
|
|
5340
5635
|
2
|
|
5341
5636
|
),
|
|
5342
|
-
/* @__PURE__ */
|
|
5637
|
+
/* @__PURE__ */ jsx70(
|
|
5343
5638
|
SmdChipLead,
|
|
5344
5639
|
{
|
|
5345
5640
|
position: {
|
|
@@ -5355,7 +5650,7 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
5355
5650
|
},
|
|
5356
5651
|
3
|
|
5357
5652
|
),
|
|
5358
|
-
/* @__PURE__ */
|
|
5653
|
+
/* @__PURE__ */ jsx70(
|
|
5359
5654
|
ChipBody,
|
|
5360
5655
|
{
|
|
5361
5656
|
center: { x: 0, y: 0, z: 0 },
|
|
@@ -5368,8 +5663,8 @@ var SOT233P = ({ fullWidth = 2.9, fullLength: fullLength10 = 2.8 }) => {
|
|
|
5368
5663
|
};
|
|
5369
5664
|
|
|
5370
5665
|
// lib/SOT-563.tsx
|
|
5371
|
-
import { Cuboid as
|
|
5372
|
-
import { Fragment as
|
|
5666
|
+
import { Cuboid as Cuboid46, Translate as Translate32, Rotate as Rotate14, Colorize as Colorize38 } from "jscad-fiber";
|
|
5667
|
+
import { Fragment as Fragment64, jsx as jsx71, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
5373
5668
|
var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
5374
5669
|
const bodyWidth = 1.2;
|
|
5375
5670
|
const bodyLength10 = 1.6;
|
|
@@ -5379,28 +5674,28 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
5379
5674
|
const leadHeight = 0.13;
|
|
5380
5675
|
const leadSpacing = 0.5;
|
|
5381
5676
|
const bodyZOffset = -0.4;
|
|
5382
|
-
return /* @__PURE__ */
|
|
5383
|
-
/* @__PURE__ */
|
|
5677
|
+
return /* @__PURE__ */ jsxs66(Fragment64, { children: [
|
|
5678
|
+
/* @__PURE__ */ jsx71(Rotate14, { rotation: [45 * Math.PI, 0, 0], children: /* @__PURE__ */ jsx71(Translate32, { center: [0, 0, bodyZOffset], children: /* @__PURE__ */ jsx71(Colorize38, { color: "grey", children: /* @__PURE__ */ jsx71(Cuboid46, { size: [bodyWidth, bodyLength10, bodyHeight] }) }) }) }),
|
|
5384
5679
|
[-1, 0, 1].flatMap((yOffset, index) => [
|
|
5385
5680
|
// Left lead
|
|
5386
|
-
/* @__PURE__ */
|
|
5387
|
-
|
|
5681
|
+
/* @__PURE__ */ jsx71(
|
|
5682
|
+
Translate32,
|
|
5388
5683
|
{
|
|
5389
5684
|
center: [
|
|
5390
5685
|
-bodyWidth / 2 - 0.03,
|
|
5391
5686
|
yOffset * leadSpacing,
|
|
5392
5687
|
leadHeight / 2
|
|
5393
5688
|
],
|
|
5394
|
-
children: /* @__PURE__ */
|
|
5689
|
+
children: /* @__PURE__ */ jsx71(Cuboid46, { size: [leadLength, leadWidth, leadHeight] })
|
|
5395
5690
|
},
|
|
5396
5691
|
`left-${index}`
|
|
5397
5692
|
),
|
|
5398
5693
|
// Right lead
|
|
5399
|
-
/* @__PURE__ */
|
|
5400
|
-
|
|
5694
|
+
/* @__PURE__ */ jsx71(
|
|
5695
|
+
Translate32,
|
|
5401
5696
|
{
|
|
5402
5697
|
center: [bodyWidth / 2 + 0.03, yOffset * leadSpacing, leadHeight / 2],
|
|
5403
|
-
children: /* @__PURE__ */
|
|
5698
|
+
children: /* @__PURE__ */ jsx71(Cuboid46, { size: [leadLength, leadWidth, leadHeight] })
|
|
5404
5699
|
},
|
|
5405
5700
|
`right-${index}`
|
|
5406
5701
|
)
|
|
@@ -5409,7 +5704,7 @@ var SOT563 = ({ fullWidth = 1.94, fullLength: fullLength10 = 1.6 }) => {
|
|
|
5409
5704
|
};
|
|
5410
5705
|
|
|
5411
5706
|
// lib/sod-123.tsx
|
|
5412
|
-
import { Fragment as
|
|
5707
|
+
import { Fragment as Fragment65, jsx as jsx72, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
5413
5708
|
var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
5414
5709
|
const bodyWidth = 2.9;
|
|
5415
5710
|
const bodyLength10 = 1.3;
|
|
@@ -5420,8 +5715,8 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
5420
5715
|
const padContactLength = 0.4;
|
|
5421
5716
|
const padThickness = leadThickness / 2;
|
|
5422
5717
|
const bodyDistance = (fullWidth - bodyWidth) / 2;
|
|
5423
|
-
return /* @__PURE__ */
|
|
5424
|
-
/* @__PURE__ */
|
|
5718
|
+
return /* @__PURE__ */ jsxs67(Fragment65, { children: [
|
|
5719
|
+
/* @__PURE__ */ jsx72(
|
|
5425
5720
|
SmdChipLead,
|
|
5426
5721
|
{
|
|
5427
5722
|
position: {
|
|
@@ -5437,7 +5732,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
5437
5732
|
},
|
|
5438
5733
|
1
|
|
5439
5734
|
),
|
|
5440
|
-
/* @__PURE__ */
|
|
5735
|
+
/* @__PURE__ */ jsx72(
|
|
5441
5736
|
SmdChipLead,
|
|
5442
5737
|
{
|
|
5443
5738
|
rotation: Math.PI,
|
|
@@ -5454,7 +5749,7 @@ var SOD123 = ({ fullWidth = 3.8, fullLength: fullLength10 = 1.6 }) => {
|
|
|
5454
5749
|
},
|
|
5455
5750
|
2
|
|
5456
5751
|
),
|
|
5457
|
-
/* @__PURE__ */
|
|
5752
|
+
/* @__PURE__ */ jsx72(
|
|
5458
5753
|
ChipBody,
|
|
5459
5754
|
{
|
|
5460
5755
|
center: { x: 0, y: 0, z: 0 },
|
|
@@ -5481,6 +5776,7 @@ export {
|
|
|
5481
5776
|
DFN,
|
|
5482
5777
|
Display,
|
|
5483
5778
|
ExtrudedPads,
|
|
5779
|
+
FPC,
|
|
5484
5780
|
FemaleHeader,
|
|
5485
5781
|
FemaleHeaderRow,
|
|
5486
5782
|
FootprintPad,
|