diff --git a/helper/screws.scad b/helper/screws.scad index 5165374..5eb6bc9 100644 --- a/helper/screws.scad +++ b/helper/screws.scad @@ -15,7 +15,7 @@ m3CounterSunkHeadLength = 1.7; m3HexNutWidthAcrossFlats = 5.41; m3HexNutWidthAcrossCorners = FtoG(m3HexNutWidthAcrossFlats); -m3HexNutThickness = 2.18; +m3HexNutThickness = 2.2; m3HeatSetInsertSlotRadiusSlack = -0.1; 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") { - 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") { - hexNutPocketHelper_N(m4RadiusSlacked, m4HexNutWidthAcrossCorners / 2 + 0.1, m4HexNutThickness + 0.2); + hexNutPocketHelper_N(m4RadiusSlacked, m4HexNutWidthAcrossCorners / 2 + 0.1, m4HexNutThickness + 0.2, openSide=openSide); } else { error("Unsupported screw type"); } } -module hexNutPocketHelper_N(innerRadius, widthAcrossCorners, thickness) { +module hexNutPocketHelper_N(innerRadius, widthAcrossCorners, thickness, openSide=true) { union() { hull() { // hexagonal cylinder representing where the nut should fit @@ -105,10 +105,12 @@ module hexNutPocketHelper_N(innerRadius, widthAcrossCorners, thickness) { translate(v = [0, 0, - 10]) cylinder(r = innerRadius, h = inf50, $fn = 32); - hull() { - translate(v = [inf50, 0, 0]) - cylinder(r = innerRadius, h = inf50, $fn = 32); - cylinder(r = innerRadius, h = inf50, $fn = 32); + if (openSide) { + hull() { + translate(v = [inf50, 0, 0]) + cylinder(r = innerRadius, h = inf50, $fn = 32); + cylinder(r = innerRadius, h = inf50, $fn = 32); + } } } } diff --git a/rack/stackConnector.scad b/rack/stackConnector.scad index 9a5ee9f..2e30407 100644 --- a/rack/stackConnector.scad +++ b/rack/stackConnector.scad @@ -4,13 +4,15 @@ include <../misc/magnet.scad> connectorRectWidth = 10; connectorRectDepth = 10; -connectorTotalHeight = 5; +connectorTotalHeight = 10; connectorSocketMagnetExtrudeHeight = 1; -connectorTaperStartHeight = 2; +connectorTaperStartHeight = 3; connectorRectPlugSlack = -0.1; connectorRectSocketSlack = 0.1; +connectorBottomToScrew = 6; + module stackConnectorBase(rectSlack) { wSlacked = connectorRectWidth + rectSlack; @@ -21,9 +23,9 @@ module stackConnectorBase(rectSlack) { square(size = [wSlacked, dSlacked]); } - module connMagnetMount() { + module connTop() { linear_extrude(height=eps) - circle(r=magnetRSlacked); + circle(r=3); } hull() { @@ -38,54 +40,51 @@ module stackConnectorBase(rectSlack) { connRect(); 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() { wSlacked = connectorRectWidth + connectorRectSocketSlack; dSlacked = connectorRectDepth + connectorRectSocketSlack; - bevelSlack = 0.5; + bevelSlack = 0.6; bevelR = wSlacked + bevelSlack; bevelW = dSlacked + bevelSlack; - bevelH = 0.5; + bevelH = 0.6; - stackConnectorBase(connectorRectSocketSlack); + screwExtension = 4; - translate(v=[wSlacked/2, wSlacked/2, connectorTotalHeight - connectorSocketMagnetExtrudeHeight]) - cylinder(r=magnetRSlacked, h=magnetHSlacked); + union() { + stackConnectorBase(connectorRectSocketSlack); - // bevel at the lip of the socket to guide the plug, as well as mitigate elephant foot during 3d printing - hull() { - translate(v=[0,0,bevelH]) - linear_extrude(height=eps) - square(size = [wSlacked, dSlacked]); + translate(v = [-screwExtension, connectorRectDepth/2, connectorBottomToScrew]) + rotate(a = [0, -90, 0]) + counterSunkHead_N(rackFrameScrewType, screwExtension = 5, headExtension = 10); - translate(v=[-bevelSlack/2, -bevelSlack/2, 0]) - linear_extrude(height=eps) - square(size = [bevelR, bevelW]); + // bevel at the lip of the socket to guide the plug, as well as mitigate elephant foot during 3d printing + hull() { + translate(v = [0, 0, bevelH]) + linear_extrude(height = eps) + square(size = [wSlacked, dSlacked]); + + translate(v = [-bevelSlack/2, -bevelSlack/2, 0]) + linear_extrude(height = eps) + 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); } } diff --git a/rack/yBar.scad b/rack/yBar.scad index d7b0026..1b0bfce 100644 --- a/rack/yBar.scad +++ b/rack/yBar.scad @@ -13,7 +13,12 @@ include <./yBarBasePlateConnector.scad> include <./side/yBarSideWallConnector.scad> include <./sharedVariables.scad> -*yBar(); +yBar(); + +translate(v=[20,0,0]) +*stackConnectorPlug(); + +*stackConnectorSocket_N(); module yBar() {