update stack connector
This commit is contained in:
@ -15,7 +15,7 @@ m3CounterSunkHeadLength = 1.7;
|
|||||||
|
|
||||||
m3HexNutWidthAcrossFlats = 5.41;
|
m3HexNutWidthAcrossFlats = 5.41;
|
||||||
m3HexNutWidthAcrossCorners = FtoG(m3HexNutWidthAcrossFlats);
|
m3HexNutWidthAcrossCorners = FtoG(m3HexNutWidthAcrossFlats);
|
||||||
m3HexNutThickness = 2.18;
|
m3HexNutThickness = 2.2;
|
||||||
|
|
||||||
m3HeatSetInsertSlotRadiusSlack = -0.1;
|
m3HeatSetInsertSlotRadiusSlack = -0.1;
|
||||||
m3HeatSetInsertSlotHeightSlack = 0.5;
|
m3HeatSetInsertSlotHeightSlack = 0.5;
|
||||||
@ -80,17 +80,17 @@ module counterSunkHead_N(screwType, screwExtension=0, headExtension=0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
module hexNutPocket_N(screwType) {
|
module hexNutPocket_N(screwType, openSide=true) {
|
||||||
if (screwType == "m3") {
|
if (screwType == "m3") {
|
||||||
hexNutPocketHelper_N(m3RadiusSlacked, m3HexNutWidthAcrossCorners / 2 + 0.1, m3HexNutThickness + 0.2);
|
hexNutPocketHelper_N(m3RadiusSlacked, m3HexNutWidthAcrossCorners / 2 + 0.1, m3HexNutThickness + 0.2, openSide=openSide);
|
||||||
} else if (screwType == "m4") {
|
} else if (screwType == "m4") {
|
||||||
hexNutPocketHelper_N(m4RadiusSlacked, m4HexNutWidthAcrossCorners / 2 + 0.1, m4HexNutThickness + 0.2);
|
hexNutPocketHelper_N(m4RadiusSlacked, m4HexNutWidthAcrossCorners / 2 + 0.1, m4HexNutThickness + 0.2, openSide=openSide);
|
||||||
} else {
|
} else {
|
||||||
error("Unsupported screw type");
|
error("Unsupported screw type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module hexNutPocketHelper_N(innerRadius, widthAcrossCorners, thickness) {
|
module hexNutPocketHelper_N(innerRadius, widthAcrossCorners, thickness, openSide=true) {
|
||||||
union() {
|
union() {
|
||||||
hull() {
|
hull() {
|
||||||
// hexagonal cylinder representing where the nut should fit
|
// hexagonal cylinder representing where the nut should fit
|
||||||
@ -105,6 +105,7 @@ module hexNutPocketHelper_N(innerRadius, widthAcrossCorners, thickness) {
|
|||||||
translate(v = [0, 0, - 10])
|
translate(v = [0, 0, - 10])
|
||||||
cylinder(r = innerRadius, h = inf50, $fn = 32);
|
cylinder(r = innerRadius, h = inf50, $fn = 32);
|
||||||
|
|
||||||
|
if (openSide) {
|
||||||
hull() {
|
hull() {
|
||||||
translate(v = [inf50, 0, 0])
|
translate(v = [inf50, 0, 0])
|
||||||
cylinder(r = innerRadius, h = inf50, $fn = 32);
|
cylinder(r = innerRadius, h = inf50, $fn = 32);
|
||||||
@ -112,6 +113,7 @@ module hexNutPocketHelper_N(innerRadius, widthAcrossCorners, thickness) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Convert a regular hexagon widthAcrossFlats to widthAcrossCorners
|
// Convert a regular hexagon widthAcrossFlats to widthAcrossCorners
|
||||||
function FtoG(widthAcrossFlats) = widthAcrossFlats * (2 / sqrt(3));
|
function FtoG(widthAcrossFlats) = widthAcrossFlats * (2 / sqrt(3));
|
||||||
|
|||||||
@ -4,13 +4,15 @@ include <../misc/magnet.scad>
|
|||||||
|
|
||||||
connectorRectWidth = 10;
|
connectorRectWidth = 10;
|
||||||
connectorRectDepth = 10;
|
connectorRectDepth = 10;
|
||||||
connectorTotalHeight = 5;
|
connectorTotalHeight = 10;
|
||||||
connectorSocketMagnetExtrudeHeight = 1;
|
connectorSocketMagnetExtrudeHeight = 1;
|
||||||
connectorTaperStartHeight = 2;
|
connectorTaperStartHeight = 3;
|
||||||
|
|
||||||
connectorRectPlugSlack = -0.1;
|
connectorRectPlugSlack = -0.1;
|
||||||
connectorRectSocketSlack = 0.1;
|
connectorRectSocketSlack = 0.1;
|
||||||
|
|
||||||
|
connectorBottomToScrew = 6;
|
||||||
|
|
||||||
module stackConnectorBase(rectSlack) {
|
module stackConnectorBase(rectSlack) {
|
||||||
|
|
||||||
wSlacked = connectorRectWidth + rectSlack;
|
wSlacked = connectorRectWidth + rectSlack;
|
||||||
@ -21,9 +23,9 @@ module stackConnectorBase(rectSlack) {
|
|||||||
square(size = [wSlacked, dSlacked]);
|
square(size = [wSlacked, dSlacked]);
|
||||||
}
|
}
|
||||||
|
|
||||||
module connMagnetMount() {
|
module connTop() {
|
||||||
linear_extrude(height=eps)
|
linear_extrude(height=eps)
|
||||||
circle(r=magnetRSlacked);
|
circle(r=3);
|
||||||
}
|
}
|
||||||
|
|
||||||
hull() {
|
hull() {
|
||||||
@ -38,45 +40,29 @@ module stackConnectorBase(rectSlack) {
|
|||||||
connRect();
|
connRect();
|
||||||
|
|
||||||
translate(v=[wSlacked/2, dSlacked/2, connectorTotalHeight])
|
translate(v=[wSlacked/2, dSlacked/2, connectorTotalHeight])
|
||||||
connMagnetMount();
|
connTop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module stackConnectorPlug() {
|
|
||||||
assert(magnetHSlacked > connectorSocketMagnetExtrudeHeight);
|
|
||||||
|
|
||||||
wSlacked = connectorRectWidth + connectorRectPlugSlack;
|
|
||||||
dSlacked = connectorRectDepth + connectorRectPlugSlack;
|
|
||||||
|
|
||||||
magnetLevelHeight = connectorTotalHeight - (magnetHSlacked - connectorSocketMagnetExtrudeHeight);
|
|
||||||
|
|
||||||
difference() {
|
|
||||||
|
|
||||||
intersection() {
|
|
||||||
stackConnectorBase(connectorRectPlugSlack);
|
|
||||||
cube(size=[dSlacked, wSlacked, magnetLevelHeight]);
|
|
||||||
}
|
|
||||||
|
|
||||||
translate(v = [wSlacked/2, dSlacked/2, magnetLevelHeight - magnetHSlacked])
|
|
||||||
cylinder(r = magnetRSlacked, h = magnetHSlacked);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module stackConnectorSocket_N() {
|
module stackConnectorSocket_N() {
|
||||||
|
|
||||||
wSlacked = connectorRectWidth + connectorRectSocketSlack;
|
wSlacked = connectorRectWidth + connectorRectSocketSlack;
|
||||||
dSlacked = connectorRectDepth + connectorRectSocketSlack;
|
dSlacked = connectorRectDepth + connectorRectSocketSlack;
|
||||||
|
|
||||||
bevelSlack = 0.5;
|
bevelSlack = 0.6;
|
||||||
bevelR = wSlacked + bevelSlack;
|
bevelR = wSlacked + bevelSlack;
|
||||||
bevelW = dSlacked + bevelSlack;
|
bevelW = dSlacked + bevelSlack;
|
||||||
bevelH = 0.5;
|
bevelH = 0.6;
|
||||||
|
|
||||||
|
screwExtension = 4;
|
||||||
|
|
||||||
|
union() {
|
||||||
stackConnectorBase(connectorRectSocketSlack);
|
stackConnectorBase(connectorRectSocketSlack);
|
||||||
|
|
||||||
translate(v=[wSlacked/2, wSlacked/2, connectorTotalHeight - connectorSocketMagnetExtrudeHeight])
|
translate(v = [-screwExtension, connectorRectDepth/2, connectorBottomToScrew])
|
||||||
cylinder(r=magnetRSlacked, h=magnetHSlacked);
|
rotate(a = [0, -90, 0])
|
||||||
|
counterSunkHead_N(rackFrameScrewType, screwExtension = 5, headExtension = 10);
|
||||||
|
|
||||||
// bevel at the lip of the socket to guide the plug, as well as mitigate elephant foot during 3d printing
|
// bevel at the lip of the socket to guide the plug, as well as mitigate elephant foot during 3d printing
|
||||||
hull() {
|
hull() {
|
||||||
@ -89,3 +75,16 @@ module stackConnectorSocket_N() {
|
|||||||
square(size = [bevelR, bevelW]);
|
square(size = [bevelR, bevelW]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module stackConnectorPlug() {
|
||||||
|
|
||||||
|
difference() {
|
||||||
|
stackConnectorBase(connectorRectPlugSlack);
|
||||||
|
|
||||||
|
translate(v=[connectorRectWidth/2,connectorRectDepth/2,connectorBottomToScrew])
|
||||||
|
rotate(a=[0,0,90])
|
||||||
|
rotate(a=[90,0,0])
|
||||||
|
hexNutPocket_N(rackFrameScrewType, openSide=false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -13,7 +13,12 @@ include <./yBarBasePlateConnector.scad>
|
|||||||
include <./side/yBarSideWallConnector.scad>
|
include <./side/yBarSideWallConnector.scad>
|
||||||
include <./sharedVariables.scad>
|
include <./sharedVariables.scad>
|
||||||
|
|
||||||
*yBar();
|
yBar();
|
||||||
|
|
||||||
|
translate(v=[20,0,0])
|
||||||
|
*stackConnectorPlug();
|
||||||
|
|
||||||
|
*stackConnectorSocket_N();
|
||||||
|
|
||||||
module yBar() {
|
module yBar() {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user