improve rack ears

This commit is contained in:
zhao
2023-08-13 00:55:47 -04:00
parent eef5329448
commit 07dee71795
8 changed files with 49 additions and 34 deletions

View File

@ -2,8 +2,9 @@ use <../tray.scad>
// Config variables
trayWidth = 140;
trayDepth = 85;
trayDepth = 88;
trayThickness = 3;
trayLipThickness = 3;
pointHoleRadius = screwRadiusSlacked("m3");
pointHoleThickness = 2;
@ -16,4 +17,4 @@ mountPoints = [ // [x,y,elevation,holeRadius,holeThickness]
mountScrewType = "m3";
// Rack mount tray that supports screws on the bottom of the rack-mount item
bottomScrewTray(u=1, trayWidth=trayWidth, trayDepth=trayDepth, trayThickness=trayThickness, mountPoints=mountPoints, mountScrewType=mountScrewType);
bottomScrewTray(u=1, trayWidth=trayWidth, trayDepth=trayDepth, trayThickness=trayThickness, mountPoints=mountPoints, mountScrewType=mountScrewType, lipThickness=trayLipThickness);

View File

@ -1,35 +1,47 @@
include <./common.scad>
// Rack ear modules.
// To be used either by itself if the mount-item supports it, or within another module
// To be used either by itself if the item supports it, or within another module
module rackEarStandAlone(frontThickness, sideThickness, frontWidth, sideDepth, sideHoles) {
// TODO
}
rackEarModule(frontThickness=3,sideThickness=3,frontWidth=30, sideDepth=50, u=4, support=true);
module rackEarModule(frontThickness, sideThickness, frontWidth, sideDepth, u, triangular=true) {
module rackEarModule(frontThickness, sideThickness, frontWidth, sideDepth, u, backPlaneHeight=3, support=true) {
earHeight = u*uDiff + 2*rackMountScrewZDist;
difference() {
translate(v = [-rackMountScrewXDist, 0, -rackMountScrewZDist]) {
// front
cube(size = [frontWidth, frontThickness, earHeight]);
if (triangular) {
// side
hull() {
translate(v = [frontWidth-sideThickness, 0, 0])
cube(size = [sideThickness, frontThickness, earHeight]);
translate(v = [frontWidth-sideThickness, sideDepth, 0])
cube(size = [sideThickness, frontThickness, 1]);
backSegmentPlane();
}
if (support) {
hull() {
extraSpacing = 1;
translate(v= [rackMountScrewXDist+railScrewHoleToOuterEdge+extraSpacing,frontThickness,0])
cube(size = [sideThickness, eps, earHeight]);
backSegmentPlane();
}
} else {
translate(v = [frontWidth-sideThickness, 0, 0])
cube(size = [sideThickness, sideDepth, earHeight]);
}
}
union() {
rackMountHoles();
}
module backSegmentPlane() {
translate(v = [frontWidth-sideThickness, sideDepth, 0])
cube(size = [sideThickness, eps, backPlaneHeight]);
}
module rackMountHoles() {
rotate(a=[90,0,0])
cylinder(r=screwRadiusSlacked(mainRailScrewType), h=frontThickness*2, center=true);
@ -38,6 +50,3 @@ module rackEarModule(frontThickness, sideThickness, frontWidth, sideDepth, u, tr
cylinder(r=screwRadiusSlacked(mainRailScrewType), h=frontThickness*2, center=true);
}
}
}
rackEarModule(frontThickness=3,sideThickness=3,frontWidth=30, sideDepth=50, u=4);

View File

@ -10,6 +10,7 @@ sideRailScrewMountDist = yBarDepth - 2*(frontScrewSpacing + railFrontThickness +
module sideSupportRailBase(u=2, double=true, top=true, baseThickness=2, sideThickness=2, backThickness=2, supportedZ=27.5, supportedY=101.5, supportedX=159) {
// TODO simplify this
mountBlockHeight = 10;
mountBlockDepth = 10;
screwMountGlobalDz = screwDiff / 2.0; // vertical distance between local origin and main rail screw mount
@ -106,7 +107,7 @@ module sideSupportRailBase(u=2, double=true, top=true, baseThickness=2, sideThic
}
translate(v=[0,supportedY+distanceFromSeparator+r+backThickness,boxDz])
minkowski() {
cube(size = [sideThickness, 25, railSideHeight-2*boxDz]); // TODO calculate 22.5
cube(size = [sideThickness, 25, railSideHeight-2*boxDz]);
sphere(r=r);
}

View File

@ -2,11 +2,10 @@ include <./common.scad>
use <./rackEars.scad>
module bottomScrewTray(u, trayWidth, trayDepth, trayThickness, mountPoints, mountScrewType) {
module bottomScrewTray(u, trayWidth, trayDepth, trayThickness, mountPoints, mountScrewType, lipThickness=3) {
frontLipHeight = 2;
backLipHeight = 1; // also applies to sides
lipThickness = 3;
rackEarSideThickness = 3;
rackEarFrontThickness = 3;
@ -62,12 +61,12 @@ module bottomScrewTray(u, trayWidth, trayDepth, trayThickness, mountPoints, moun
translate(v = [leftScrewGlobalX, 0, rackMountScrewZDist])
rackEarModule(frontThickness = rackEarFrontThickness, sideThickness = rackEarSideThickness, frontWidth =
leftScrewDistToTray+rackMountScrewXDist+rackEarSideThickness, sideDepth = trayDepth-lipThickness, u = u);
leftScrewDistToTray+rackMountScrewXDist+rackEarSideThickness, sideDepth = trayDepth-lipThickness, u = u, backPlaneHeight=trayThickness+backLipHeight);
translate(v = [rightScrewGlobalX, 0, rackMountScrewZDist])
mirror(v = [1, 0, 0])
rackEarModule(frontThickness = rackEarFrontThickness, sideThickness = rackEarSideThickness, frontWidth =
rightScrewGlobalX-trayWidth+rackMountScrewXDist+rackEarSideThickness, sideDepth = trayDepth-lipThickness, u = u);
rightScrewGlobalX-trayWidth+rackMountScrewXDist+rackEarSideThickness, sideDepth = trayDepth-lipThickness, u = u, backPlaneHeight=trayThickness+backLipHeight);
}

View File

@ -39,11 +39,12 @@ module onYBarBasePlateConnectorNegative() {
hexNutPocket_N("m3", openSide=false, backSpace=5, bridgeBack=true);
hull() {
// This has always been a pretty annoying to fit part. Increasing slack to 2*radiusXYSlack to compensate. TODO fix
translate(v = [_heatSetX, _heatSetY, _baseConnRecession+overhangSlack])
roundCutSlice(radius = heatSetInsertSlotRadiusSlacked(rackFrameScrewType)+radiusXYSlack);
roundCutSlice(radius = heatSetInsertSlotRadiusSlacked(rackFrameScrewType)+2*radiusXYSlack);
translate(v = [_heatSetX, _heatSetY, 0])
roundCutSlice(radius = _baseConnY/2 + radiusXYSlack);
roundCutSlice(radius = _baseConnY/2 + 2*radiusXYSlack);
}
}

View File

@ -65,3 +65,6 @@ xBarRoundness = baseRoundness;
rackTotalWidth = 2*yBarWidth + xBarX;
rackTotalDepth = yBarDepth;
plateGap = 1; // distance between edge of xy plate and other parts
assert(plateGap >= xySlack);

View File

@ -20,11 +20,11 @@ module xyPlate() {
connPosY = basePlateScrewMountToYBarXZFace - connYBarCornerDy;
module plateBody() {
plateBodyX = xBarX - xySlack;
plateBodyY = (yBarDepth - 2*xBarY) - xySlack;
plateBodyX = xBarX - 2*plateGap;
plateBodyY = (yBarDepth - 2*xBarY) - 2*plateGap;
plateBodyH = xBarWallThickness;
translate(v=[xySlack/2, xySlack/2, 0]) {
translate(v=[plateGap, plateGap, 0]) {
cube(size = [plateBodyX, plateBodyY, plateBodyH]);
// bracing
@ -86,12 +86,13 @@ module xyPlate() {
module yBarConnector() {
difference() {
hull() {
// TODO: we don't need to heatset insert values anymore
translate(v=[0,0,_baseConnRecession])
roundCutSlice(radius = heatSetInsertSlotRadiusSlacked(rackFrameScrewType), length=5);
roundCutSlice(radius = _baseConnY/2, length=15);
}
cylinder(r=screwRadiusSlacked(rackFrameScrewType), h=inf, center=true);
mirror(v=[0,0,1])
counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10);
}
}