From 2ddc90dd4d32ee42c8cf2987be8306e69c2e1466 Mon Sep 17 00:00:00 2001 From: zhao Date: Thu, 9 Mar 2023 21:34:12 -0500 Subject: [PATCH] improvements to side wall hinge --- rack/side/hingeModule.scad | 15 ++++++++++----- rack/side/magnetModule.scad | 12 +++++++++--- rack/side/sideWallBase.scad | 25 +++++++++++++++---------- rack/side/sideWallVariables.scad | 7 ++----- 4 files changed, 36 insertions(+), 23 deletions(-) diff --git a/rack/side/hingeModule.scad b/rack/side/hingeModule.scad index 3bc7277..17f2503 100644 --- a/rack/side/hingeModule.scad +++ b/rack/side/hingeModule.scad @@ -13,29 +13,34 @@ module hingeModule() { applyYBarScrewMount() base(); + connSlack = 0.1; + connW = sideWallConnW - connSlack; + connD = sideWallConnD - connSlack; + module base() { + translate(v=[connSlack, connSlack,0]) intersection() { union() { - cube(size = [sideWallConnW, sideWallConnD, sideWallConnLugDepression]); + cube(size = [connW, connD, sideWallConnLugDepression]); // Riser to enforce side wall hinge clearance translate(v = [0, 0, sideWallConnLugDepression]) - cube(size = [sideWallConnW, sideWallConnD - 12, sideWallZGapClearance]); + cube(size = [connW, connD - 12, sideWallZGapClearance]); } // TODO: pattern for this? beef up mirror4XY? cVal = 0.5; halfspace(p=[0,cVal,0], vpos=[0,1,1]); halfspace(p=[cVal,0,0], vpos=[1,0,1]); - halfspace(p=[sideWallConnW-cVal,0,0], vpos=[-1,0,1]); - halfspace(p=[0,sideWallConnD-cVal,0], vpos=[0,-1,1]); + halfspace(p=[connW-cVal,0,0], vpos=[-1,0,1]); + halfspace(p=[0,connD-cVal,0], vpos=[0,-1,1]); } } module applyHingePole() { apply_p() { - translate(v = [sideWallConnW-hingePoleR, hingePoleR, sideWallConnH]) + translate(v = [sideWallConnW/2.0, hingePoleR, sideWallConnH]) cylinder(r = hingePoleR, h = hingePoleH); children(0); diff --git a/rack/side/magnetModule.scad b/rack/side/magnetModule.scad index 5a2ce92..fad0cc6 100644 --- a/rack/side/magnetModule.scad +++ b/rack/side/magnetModule.scad @@ -15,16 +15,22 @@ module magnetModule() { applyMagnetMount() base(); + connSlack = 0.1; + connW = sideWallConnW - connSlack; + connD = sideWallConnD - connSlack; + module base() { + + translate(v=[connSlack, connSlack,0]) intersection() { - cube(size = [sideWallConnW, sideWallConnD, sideWallConnLugDepression]); + cube(size = [connW, connD, sideWallConnLugDepression]); // TODO: pattern for this? beef up mirror4XY? cVal = 0.5; halfspace(p=[0,cVal,0], vpos=[0,1,1]); halfspace(p=[cVal,0,0], vpos=[1,0,1]); - halfspace(p=[sideWallConnW-cVal,0,0], vpos=[-1,0,1]); - halfspace(p=[0,sideWallConnD-cVal,0], vpos=[0,-1,1]); + halfspace(p=[connW-cVal,0,0], vpos=[-1,0,1]); + halfspace(p=[0,connD-cVal,0], vpos=[0,-1,1]); } } diff --git a/rack/side/sideWallBase.scad b/rack/side/sideWallBase.scad index 4851867..91edc9b 100644 --- a/rack/side/sideWallBase.scad +++ b/rack/side/sideWallBase.scad @@ -13,6 +13,9 @@ include <./hingeModule.scad> echo("Side Wall Height", sideWallZ); echo("Side Wall Depth", sideWallY); +translate(v = [hingePoleDx ,hingePoleDy, 10]) +rotate(a=[0,0,-120]) +translate(v = [-hingePoleDx ,-hingePoleDy, 0]) *sideWallBase(); module sideWallBase() { @@ -24,7 +27,7 @@ module sideWallBase() { module sideWallBase() { - module roundThingHelper(x,y,z,r) { + module sideWallShellHelper(x,y,z,r) { translate(v=[r, r, 0]) minkowski() { cube(size = [x-r, y - 2*r, z]); @@ -34,10 +37,10 @@ module sideWallBase() { intersection() { difference() { - roundThingHelper(sideWallX,sideWallY,sideWallZ, baseRoundness); + sideWallShellHelper(sideWallX,sideWallY,sideWallZ, baseRoundness); translate(v=[sideWallThickness, sideWallThickness,0]) - roundThingHelper(sideWallX,sideWallY - 2*sideWallThickness, sideWallZ, baseRoundness); + sideWallShellHelper(sideWallX,sideWallY - 2*sideWallThickness, sideWallZ, baseRoundness - sideWallThickness); } halfspace(vpos=[-1,0,0], p=[sideWallX,0,0]); @@ -53,32 +56,34 @@ module sideWallBase() { apply_pn() { hull() { hingeShell(); - hingeBacksideProjectionPlane(); + hingeSideProjectionPlane(); } union() { hingeHole(); + // Trim parts of the wall for rotational clearance - halfspace(p=[sideWallX-5, sideWallY, 0], vpos=[1,1.5,0]); + halfspace(p=[0, sideWallY-2.5, 0], vpos=[-0.5,1,0]); // flat area to limit rotation against the main rail + halfspace(p=[sideWallX-10, sideWallY, 0], vpos=[1,2.5,0]); } children(0); } module hingeShell() { - translate(v = [sideWallX-hingePoleDx, sideWallY-(sideWallThickness+hingePoleDy), 0]) + translate(v = [hingePoleDx, hingePoleDy, 0]) cylinder(r = hingeHoleShellR, h = sideWallZ); } // XZ plane in line with the back of the case. Project the hinge pole shell onto this to fill any weird // geometries from the curves of the side wall - module hingeBacksideProjectionPlane() { - translate(v=[sideWallX-hingePoleDx - hingeHoleShellR,sideWallY,0]) - cube(size=[2*hingeHoleShellR, eps, sideWallZ]); + module hingeSideProjectionPlane() { + translate(v=[sideWallThickness, hingePoleDy - hingeHoleShellR, 0]) + cube(size=[eps, 2*hingeHoleShellR, sideWallZ]); } module hingeHole() { - translate(v = [sideWallX-hingePoleDx, sideWallY-(sideWallThickness+hingePoleDy), 0]) + translate(v = [hingePoleDx , hingePoleDy, 0]) cylinder(r = hingeHoleR, h = sideWallZ); } } diff --git a/rack/side/sideWallVariables.scad b/rack/side/sideWallVariables.scad index 9dbc9cd..9044e22 100644 --- a/rack/side/sideWallVariables.scad +++ b/rack/side/sideWallVariables.scad @@ -20,9 +20,6 @@ hingePoleR = 2; hingePoleH = 5; hingeHoleR = hingePoleR + 0.2; -hingePoleToConnectorOuterYZFace = hingePoleR/2; -hingePoleToConnectorOuterXZFace = hingePoleR/2; - sideWallZHingeSlack = 0.3; sideWallZGapClearance = 1.0; @@ -36,5 +33,5 @@ magnetMountToYBarFront = magnetMountShellRadius + sideWallSlotToXZ + 2; sideWallXGapClearance = 0.2; sideWallX = (yBarWidth-(railTotalWidth+railSlotToInnerYEdge)) - sideWallXGapClearance; -hingePoleDx = hingePoleToConnectorOuterYZFace + sideWallSlotToOuterYEdge; -hingePoleDy = hingePoleToConnectorOuterXZFace + sideWallSlotToOuterXEdge; +hingePoleDx = sideWallSlotToOuterYEdge + sideWallConnW/2.0; +hingePoleDy = sideWallY - (sideWallSlotToOuterXEdge + hingeHoleR);