jscad-electronics 0.0.118 → 0.0.120
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 +4 -2
- package/dist/index.js +34 -21
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +34 -21
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -262,9 +262,10 @@ declare const PinHeader: ({ x, y, pinThickness, shortSidePinLength, longSidePinL
|
|
|
262
262
|
rightangle?: boolean;
|
|
263
263
|
}) => react_jsx_runtime.JSX.Element;
|
|
264
264
|
|
|
265
|
-
declare const FemaleHeader: ({ x, y, pitch, legsLength, innerDiameter, bodyHeight, bodyLength, bodyWidth, flipZ, }: {
|
|
265
|
+
declare const FemaleHeader: ({ x, y, z, pitch, legsLength, innerDiameter, bodyHeight, bodyLength, bodyWidth, flipZ, }: {
|
|
266
266
|
x: number;
|
|
267
267
|
y: number;
|
|
268
|
+
z?: number;
|
|
268
269
|
pitch?: number;
|
|
269
270
|
legsLength?: number;
|
|
270
271
|
innerDiameter?: number;
|
|
@@ -389,7 +390,7 @@ declare const TO220: () => react_jsx_runtime.JSX.Element;
|
|
|
389
390
|
|
|
390
391
|
declare const TO92: () => react_jsx_runtime.JSX.Element;
|
|
391
392
|
|
|
392
|
-
declare const MountedPcbModule: ({ numPins, rows, p, id, od, boardThickness, width, height, pinRowSide, holes, holeInset, pinRowHoleEdgeToEdgeDist, nopin, }: {
|
|
393
|
+
declare const MountedPcbModule: ({ numPins, rows, p, id, od, boardThickness, width, height, pinRowSide, holes, holeInset, pinRowHoleEdgeToEdgeDist, female, nopin, }: {
|
|
393
394
|
numPins?: number;
|
|
394
395
|
rows?: number;
|
|
395
396
|
p?: number;
|
|
@@ -402,6 +403,7 @@ declare const MountedPcbModule: ({ numPins, rows, p, id, od, boardThickness, wid
|
|
|
402
403
|
holes?: string[];
|
|
403
404
|
holeInset?: number;
|
|
404
405
|
pinRowHoleEdgeToEdgeDist?: number;
|
|
406
|
+
female?: boolean;
|
|
405
407
|
nopin?: boolean;
|
|
406
408
|
}) => react_jsx_runtime.JSX.Element;
|
|
407
409
|
|
package/dist/index.js
CHANGED
|
@@ -1496,6 +1496,7 @@ import { Fragment as Fragment21, jsx as jsx25, jsxs as jsxs22 } from "react/jsx-
|
|
|
1496
1496
|
var FemaleHeader = ({
|
|
1497
1497
|
x,
|
|
1498
1498
|
y,
|
|
1499
|
+
z = 0,
|
|
1499
1500
|
pitch = 2.54,
|
|
1500
1501
|
legsLength = 3,
|
|
1501
1502
|
innerDiameter = 0.945,
|
|
@@ -1513,7 +1514,7 @@ var FemaleHeader = ({
|
|
|
1513
1514
|
{
|
|
1514
1515
|
color: "#000",
|
|
1515
1516
|
size: [bodyLength10, bodyWidth, bodyHeight],
|
|
1516
|
-
center: [x, y, flipZ(bodyHeight / 2)]
|
|
1517
|
+
center: [x, y, flipZ(z + bodyHeight / 2)]
|
|
1517
1518
|
}
|
|
1518
1519
|
),
|
|
1519
1520
|
innerDiameter ? /* @__PURE__ */ jsx25(
|
|
@@ -1521,14 +1522,14 @@ var FemaleHeader = ({
|
|
|
1521
1522
|
{
|
|
1522
1523
|
height: bodyHeight + 0.1,
|
|
1523
1524
|
radius: innerDiameter / 2,
|
|
1524
|
-
center: [x, y, flipZ(bodyHeight / 2)],
|
|
1525
|
+
center: [x, y, flipZ(z + bodyHeight / 2)],
|
|
1525
1526
|
color: "#222"
|
|
1526
1527
|
}
|
|
1527
1528
|
) : /* @__PURE__ */ jsx25(
|
|
1528
1529
|
Cuboid16,
|
|
1529
1530
|
{
|
|
1530
1531
|
size: [gapWidth, gapWidth, bodyHeight],
|
|
1531
|
-
center: [x, y, flipZ(bodyHeight / 2)]
|
|
1532
|
+
center: [x, y, flipZ(z + bodyHeight / 2)]
|
|
1532
1533
|
}
|
|
1533
1534
|
)
|
|
1534
1535
|
] }) }),
|
|
@@ -1539,7 +1540,7 @@ var FemaleHeader = ({
|
|
|
1539
1540
|
{
|
|
1540
1541
|
color: "silver",
|
|
1541
1542
|
size: [pinThickness, pinThickness, legsLength * 0.9],
|
|
1542
|
-
center: [x, y, flipZ(-legsLength / 2 * 0.9)]
|
|
1543
|
+
center: [x, y, flipZ(z + -legsLength / 2 * 0.9)]
|
|
1543
1544
|
}
|
|
1544
1545
|
),
|
|
1545
1546
|
/* @__PURE__ */ jsx25(
|
|
@@ -1547,7 +1548,7 @@ var FemaleHeader = ({
|
|
|
1547
1548
|
{
|
|
1548
1549
|
color: "silver",
|
|
1549
1550
|
size: [pinThickness / 1.8, pinThickness / 1.8, legsLength],
|
|
1550
|
-
center: [x, y, flipZ(-legsLength / 2)]
|
|
1551
|
+
center: [x, y, flipZ(z + -legsLength / 2)]
|
|
1551
1552
|
}
|
|
1552
1553
|
)
|
|
1553
1554
|
] }),
|
|
@@ -1556,7 +1557,7 @@ var FemaleHeader = ({
|
|
|
1556
1557
|
{
|
|
1557
1558
|
color: "silver",
|
|
1558
1559
|
size: [gapWidth, gapWidth, gapWidth * 0.5],
|
|
1559
|
-
center: [x, y, flipZ(gapWidth / 2 * 0.5)]
|
|
1560
|
+
center: [x, y, flipZ(z + gapWidth / 2 * 0.5)]
|
|
1560
1561
|
}
|
|
1561
1562
|
)
|
|
1562
1563
|
] })
|
|
@@ -4254,7 +4255,7 @@ var StampBoard = ({
|
|
|
4254
4255
|
for (let i = 0; i < leadsRight; i++) {
|
|
4255
4256
|
const y = yOffset + i * leadsPitch;
|
|
4256
4257
|
pads.push({
|
|
4257
|
-
x:
|
|
4258
|
+
x: halfBoardWidth - leadLength / 2,
|
|
4258
4259
|
y: -y,
|
|
4259
4260
|
// Flip y
|
|
4260
4261
|
pl: leadLength,
|
|
@@ -4262,8 +4263,8 @@ var StampBoard = ({
|
|
|
4262
4263
|
});
|
|
4263
4264
|
if (innerHoles) {
|
|
4264
4265
|
holes.push(
|
|
4265
|
-
{ x:
|
|
4266
|
-
{ x:
|
|
4266
|
+
{ x: halfBoardWidth, y: -y },
|
|
4267
|
+
{ x: halfBoardWidth - innerHoleEdgeDistance, y: -y }
|
|
4267
4268
|
);
|
|
4268
4269
|
}
|
|
4269
4270
|
}
|
|
@@ -4273,7 +4274,7 @@ var StampBoard = ({
|
|
|
4273
4274
|
for (let i = 0; i < leadsLeft; i++) {
|
|
4274
4275
|
const y = yOffset + i * leadsPitch;
|
|
4275
4276
|
pads.push({
|
|
4276
|
-
x: halfBoardWidth
|
|
4277
|
+
x: -halfBoardWidth + leadLength / 2,
|
|
4277
4278
|
y: -y,
|
|
4278
4279
|
// Flip y
|
|
4279
4280
|
pl: leadLength,
|
|
@@ -4281,8 +4282,8 @@ var StampBoard = ({
|
|
|
4281
4282
|
});
|
|
4282
4283
|
if (innerHoles) {
|
|
4283
4284
|
holes.push(
|
|
4284
|
-
{ x: halfBoardWidth, y: -y },
|
|
4285
|
-
{ x: halfBoardWidth
|
|
4285
|
+
{ x: -halfBoardWidth, y: -y },
|
|
4286
|
+
{ x: -halfBoardWidth + innerHoleEdgeDistance, y: -y }
|
|
4286
4287
|
);
|
|
4287
4288
|
}
|
|
4288
4289
|
}
|
|
@@ -4294,14 +4295,14 @@ var StampBoard = ({
|
|
|
4294
4295
|
pads.push({
|
|
4295
4296
|
x: -x,
|
|
4296
4297
|
// Flip x
|
|
4297
|
-
y:
|
|
4298
|
+
y: bodyLength10 / 2 - leadLength / 2,
|
|
4298
4299
|
pl: leadWidth,
|
|
4299
4300
|
pw: leadLength
|
|
4300
4301
|
});
|
|
4301
4302
|
if (innerHoles) {
|
|
4302
4303
|
holes.push(
|
|
4303
|
-
{ x: -x, y:
|
|
4304
|
-
{ x: -x, y:
|
|
4304
|
+
{ x: -x, y: bodyLength10 / 2 },
|
|
4305
|
+
{ x: -x, y: bodyLength10 / 2 - innerHoleEdgeDistance }
|
|
4305
4306
|
);
|
|
4306
4307
|
}
|
|
4307
4308
|
}
|
|
@@ -4313,14 +4314,14 @@ var StampBoard = ({
|
|
|
4313
4314
|
pads.push({
|
|
4314
4315
|
x: -x,
|
|
4315
4316
|
// Flip x
|
|
4316
|
-
y: bodyLength10 / 2
|
|
4317
|
+
y: -bodyLength10 / 2 + leadLength / 2,
|
|
4317
4318
|
pl: leadWidth,
|
|
4318
4319
|
pw: leadLength
|
|
4319
4320
|
});
|
|
4320
4321
|
if (innerHoles) {
|
|
4321
4322
|
holes.push(
|
|
4322
|
-
{ x: -x, y: bodyLength10 / 2 },
|
|
4323
|
-
{ x: -x, y: bodyLength10 / 2
|
|
4323
|
+
{ x: -x, y: -bodyLength10 / 2 },
|
|
4324
|
+
{ x: -x, y: -bodyLength10 / 2 + innerHoleEdgeDistance }
|
|
4324
4325
|
);
|
|
4325
4326
|
}
|
|
4326
4327
|
}
|
|
@@ -4392,6 +4393,7 @@ var MountedPcbModule = ({
|
|
|
4392
4393
|
holes = [],
|
|
4393
4394
|
holeInset = 1,
|
|
4394
4395
|
pinRowHoleEdgeToEdgeDist = 2,
|
|
4396
|
+
female,
|
|
4395
4397
|
nopin
|
|
4396
4398
|
}) => {
|
|
4397
4399
|
const boardCenterZ = boardThickness / 2;
|
|
@@ -4470,7 +4472,7 @@ var MountedPcbModule = ({
|
|
|
4470
4472
|
const pinBodyHeight = 2;
|
|
4471
4473
|
const longSidePinLength = 6;
|
|
4472
4474
|
const shortSidePinLength = 3;
|
|
4473
|
-
const boardOffsetZ = nopin ? 0 : pinBodyHeight;
|
|
4475
|
+
const boardOffsetZ = nopin || female ? 0 : pinBodyHeight;
|
|
4474
4476
|
const boardBody = /* @__PURE__ */ jsx64(Colorize33, { color: "#008080", children: /* @__PURE__ */ jsxs60(Subtract7, { children: [
|
|
4475
4477
|
/* @__PURE__ */ jsx64(
|
|
4476
4478
|
Cuboid41,
|
|
@@ -4529,10 +4531,20 @@ var MountedPcbModule = ({
|
|
|
4529
4531
|
},
|
|
4530
4532
|
`pin-3d-${index}`
|
|
4531
4533
|
));
|
|
4534
|
+
const femaleHeaderRow = pins.map((pin, index) => /* @__PURE__ */ jsx64(
|
|
4535
|
+
FemaleHeader,
|
|
4536
|
+
{
|
|
4537
|
+
x: pin.x,
|
|
4538
|
+
y: pin.y,
|
|
4539
|
+
flipZ: (z) => -z
|
|
4540
|
+
},
|
|
4541
|
+
`female-pin-3d-${index}`
|
|
4542
|
+
));
|
|
4532
4543
|
return /* @__PURE__ */ jsxs60(Fragment59, { children: [
|
|
4533
4544
|
boardBody,
|
|
4534
4545
|
platedHoles,
|
|
4535
|
-
!nopin && headerPins
|
|
4546
|
+
!female && !nopin && headerPins,
|
|
4547
|
+
female && femaleHeaderRow
|
|
4536
4548
|
] });
|
|
4537
4549
|
};
|
|
4538
4550
|
|
|
@@ -4816,7 +4828,8 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
4816
4828
|
holes,
|
|
4817
4829
|
holeInset,
|
|
4818
4830
|
pinRowHoleEdgeToEdgeDist,
|
|
4819
|
-
nopin: fpJson.nopin
|
|
4831
|
+
nopin: fpJson.nopin,
|
|
4832
|
+
female: fpJson.female
|
|
4820
4833
|
}
|
|
4821
4834
|
);
|
|
4822
4835
|
}
|