improve rack ears
This commit is contained in:
@ -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);
|
||||
@ -1,43 +1,52 @@
|
||||
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) {
|
||||
hull() {
|
||||
translate(v = [frontWidth-sideThickness, 0, 0])
|
||||
// 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() {
|
||||
rotate(a=[90,0,0])
|
||||
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);
|
||||
|
||||
translate(v=[0,0,u*uDiff])
|
||||
translate(v=[0,0,u*uDiff])
|
||||
rotate(a=[90,0,0])
|
||||
cylinder(r=screwRadiusSlacked(mainRailScrewType), h=frontThickness*2, center=true);
|
||||
}
|
||||
cylinder(r=screwRadiusSlacked(mainRailScrewType), h=frontThickness*2, center=true);
|
||||
}
|
||||
}
|
||||
|
||||
rackEarModule(frontThickness=3,sideThickness=3,frontWidth=30, sideDepth=50, u=4);
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user