jscad-electronics 0.0.153 → 0.0.155
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 +2 -4
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/vanilla.js +10 -12
- package/dist/vanilla.js.map +1 -1
- package/package.json +1 -1
package/dist/vanilla.js
CHANGED
|
@@ -843,6 +843,7 @@ var getLeadWidth = (pinCount, width10) => {
|
|
|
843
843
|
};
|
|
844
844
|
|
|
845
845
|
// lib/PinHeader.tsx
|
|
846
|
+
var PIN_METAL_COLOR = "#c0c0c0";
|
|
846
847
|
var PinHeader = ({
|
|
847
848
|
x,
|
|
848
849
|
y,
|
|
@@ -853,7 +854,6 @@ var PinHeader = ({
|
|
|
853
854
|
bodyLength: bodyLength10 = 2.54,
|
|
854
855
|
bodyWidth = 2.54,
|
|
855
856
|
flipZ,
|
|
856
|
-
faceup,
|
|
857
857
|
smd,
|
|
858
858
|
rightangle
|
|
859
859
|
}) => {
|
|
@@ -866,7 +866,7 @@ var PinHeader = ({
|
|
|
866
866
|
center: [x, y, flipZ(bodyHeight / 2)]
|
|
867
867
|
}
|
|
868
868
|
) }),
|
|
869
|
-
|
|
869
|
+
/* @__PURE__ */ jsx(Colorize, { color: PIN_METAL_COLOR, children: smd ? /* @__PURE__ */ jsx(
|
|
870
870
|
SmdChipLead,
|
|
871
871
|
{
|
|
872
872
|
rotation: -Math.PI / 2,
|
|
@@ -885,7 +885,7 @@ var PinHeader = ({
|
|
|
885
885
|
/* @__PURE__ */ jsx(
|
|
886
886
|
Cuboid,
|
|
887
887
|
{
|
|
888
|
-
color:
|
|
888
|
+
color: PIN_METAL_COLOR,
|
|
889
889
|
size: [pinThickness, pinThickness, shortSidePinLength * 0.9],
|
|
890
890
|
center: [x, y, flipZ(bodyHeight * 0.9 + bodyHeight / 2)]
|
|
891
891
|
}
|
|
@@ -893,7 +893,7 @@ var PinHeader = ({
|
|
|
893
893
|
/* @__PURE__ */ jsx(
|
|
894
894
|
Cuboid,
|
|
895
895
|
{
|
|
896
|
-
color:
|
|
896
|
+
color: PIN_METAL_COLOR,
|
|
897
897
|
size: [
|
|
898
898
|
pinThickness / 1.8,
|
|
899
899
|
pinThickness / 1.8,
|
|
@@ -903,11 +903,11 @@ var PinHeader = ({
|
|
|
903
903
|
}
|
|
904
904
|
)
|
|
905
905
|
] }) }),
|
|
906
|
-
/* @__PURE__ */ jsx(Colorize, { color:
|
|
906
|
+
/* @__PURE__ */ jsx(Colorize, { color: PIN_METAL_COLOR, children: /* @__PURE__ */ jsx(Translate, { y: rightangle ? -3.9 : 0, z: rightangle ? 1 : 0, children: /* @__PURE__ */ jsx(Rotate, { rotation: rightangle ? [-Math.PI / 2, 0, 0] : [0, 0, 0], children: /* @__PURE__ */ jsxs(Hull, { children: [
|
|
907
907
|
/* @__PURE__ */ jsx(
|
|
908
908
|
Cuboid,
|
|
909
909
|
{
|
|
910
|
-
color:
|
|
910
|
+
color: PIN_METAL_COLOR,
|
|
911
911
|
size: [pinThickness, pinThickness, longSidePinLength * 0.9],
|
|
912
912
|
center: [x, y, flipZ(-longSidePinLength / 2 * 0.9)]
|
|
913
913
|
}
|
|
@@ -915,7 +915,7 @@ var PinHeader = ({
|
|
|
915
915
|
/* @__PURE__ */ jsx(
|
|
916
916
|
Cuboid,
|
|
917
917
|
{
|
|
918
|
-
color:
|
|
918
|
+
color: PIN_METAL_COLOR,
|
|
919
919
|
size: [
|
|
920
920
|
pinThickness / 1.8,
|
|
921
921
|
pinThickness / 1.8,
|
|
@@ -934,7 +934,6 @@ var PinRow = ({
|
|
|
934
934
|
pitch = 2.54,
|
|
935
935
|
longSidePinLength = 6,
|
|
936
936
|
invert,
|
|
937
|
-
faceup,
|
|
938
937
|
rows = 1,
|
|
939
938
|
smd,
|
|
940
939
|
rightangle
|
|
@@ -945,8 +944,9 @@ var PinRow = ({
|
|
|
945
944
|
const rowSpacing = 2.54;
|
|
946
945
|
const shortSidePinLength = 3;
|
|
947
946
|
const xoff = -((pinsPerRow - 1) / 2) * pitch;
|
|
948
|
-
const
|
|
949
|
-
const
|
|
947
|
+
const throughHole = !smd && !rightangle;
|
|
948
|
+
const flipped = throughHole ? !invert : Boolean(invert);
|
|
949
|
+
const flipZ = (z) => flipped ? -z + bodyHeight : z;
|
|
950
950
|
return /* @__PURE__ */ jsx(Fragment2, { children: Array.from({ length: numberOfPins }, (_, i) => {
|
|
951
951
|
const row = Math.floor(i / pinsPerRow);
|
|
952
952
|
const col = i % pinsPerRow;
|
|
@@ -962,7 +962,6 @@ var PinRow = ({
|
|
|
962
962
|
longSidePinLength,
|
|
963
963
|
bodyHeight,
|
|
964
964
|
flipZ,
|
|
965
|
-
faceup,
|
|
966
965
|
smd,
|
|
967
966
|
rightangle
|
|
968
967
|
},
|
|
@@ -6588,7 +6587,6 @@ var Footprinter3d = ({ footprint }) => {
|
|
|
6588
6587
|
numberOfPins: fpJson.num_pins,
|
|
6589
6588
|
pitch: fpJson.p,
|
|
6590
6589
|
invert: fpJson.invert,
|
|
6591
|
-
faceup: fpJson.faceup,
|
|
6592
6590
|
rows,
|
|
6593
6591
|
smd: fpJson.smd || fpJson.surface_mount,
|
|
6594
6592
|
rightangle: fpJson.rightangle
|