update side support
This commit is contained in:
@ -9,14 +9,8 @@ include <../config/common.scad>
|
||||
|
||||
uDiff = screwDiff;
|
||||
|
||||
rackMountScrewXDist = 4;
|
||||
rackMountScrewZDist = 4;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rackMountScrewXDist = 4.5;
|
||||
rackMountScrewZDist = 4.5;
|
||||
|
||||
mainRailSideSupportToInnerEdge = frontFaceWidth - railSideMountThickness;
|
||||
railSupportsDx = 2*mainRailSideSupportToInnerEdge + maxUnitWidth;
|
||||
@ -1,68 +1,63 @@
|
||||
include <../../helper/common.scad>
|
||||
include <../../helper/math.scad>
|
||||
include <../../helper/screws.scad>
|
||||
include <../../rack/config.scad>
|
||||
include <../../config/common.scad>
|
||||
include <../../rack/sharedVariables.scad>
|
||||
include <../common.scad>
|
||||
|
||||
*sideSupportRailBase("lBracket");
|
||||
// TODO: make this parametric
|
||||
sideSupportRailBase(u=2, double=true, top=true, baseThickness=1.5, sideThickness=4, backThickness=2, supportedZ=27.5, supportedY=101.5, supportedX=159);
|
||||
|
||||
// distance between front and back main rail screw mounts
|
||||
sideRailScrewMountDist = yBarDepth - 2*(frontScrewSpacing + railFrontThickness + railSlotToXZ); // TODO use transformation matrices
|
||||
sideRailScrewMountDist = yBarDepth - 2*(frontScrewSpacing + railFrontThickness + railSlotToXZ);
|
||||
|
||||
module sideSupportRailBase(type) {
|
||||
module sideSupportRailBase(u=2, double=true, top=true, baseThickness=2, sideThickness=2, backThickness=2, supportedZ=26.5, supportedY=101.5, supportedX=159) {
|
||||
|
||||
// vertical distance between local origin and main rail screw mount
|
||||
screwMountGlobalDz = screwDiff / 2.0;
|
||||
mountBlockHeight = 10;
|
||||
mountBlockDepth = 10;
|
||||
screwMountGlobalDz = screwDiff / 2.0; // vertical distance between local origin and main rail screw mount
|
||||
railLength = max(sideRailScrewMountDist + frontScrewSpacing + mountBlockDepth, supportedY+backThickness);
|
||||
railBaseThickness = baseThickness;
|
||||
railSideThickness = sideThickness;
|
||||
railBaseWidth = 15;
|
||||
railSideHeight = supportedZ + railBaseThickness*2;
|
||||
frontMountPad = frontScrewSpacing;
|
||||
|
||||
railLength = sideRailScrewMountDist + 30; // TODO calculate this
|
||||
railBaseThickness = 2;
|
||||
railBaseWidth = 18;
|
||||
railSideThickness = 2;
|
||||
railSideHeight = 15;
|
||||
sideDy = -2;
|
||||
frontMountPad = 10; // depends on y of box to be mounted TODO calculate this
|
||||
sideMountPad = 10; // depends on x of box TODO calculate this
|
||||
|
||||
translate(v=[sideMountPad,-(frontMountPad + 5),-5])
|
||||
applyMainRailMounts()
|
||||
sideSupportRailBaseHolder();
|
||||
|
||||
module sideSupportRailBaseHolder() {
|
||||
if (type == "lBracket") {
|
||||
sideSupportRailBaseLBracket();
|
||||
} else {
|
||||
error("Unsupported side support type");
|
||||
}
|
||||
}
|
||||
|
||||
sideSupportRailBase();
|
||||
|
||||
module applyMainRailMounts() {
|
||||
|
||||
mountBlockExtension = (railSupportsDx - supportedX)/2 - railSideThickness;
|
||||
assert(mountBlockExtension >= 10);
|
||||
|
||||
apply_p() {
|
||||
translate(v=[0,frontMountPad,0])
|
||||
union() {
|
||||
dualMount();
|
||||
|
||||
translate(v=[0,sideRailScrewMountDist,0])
|
||||
dualMount();
|
||||
translate(v = [0, frontMountPad, 0])
|
||||
mountBlockColumn(mountBlockExtension=mountBlockExtension, u=u);
|
||||
translate(v=[0,frontMountPad+sideRailScrewMountDist, 0])
|
||||
mountBlockColumn(mountBlockExtension=mountBlockExtension, u=u);
|
||||
}
|
||||
|
||||
children(0);
|
||||
}
|
||||
}
|
||||
|
||||
module dualMount() {
|
||||
|
||||
blockHeight = railSideHeight - sideDy;
|
||||
module mountBlockColumn(mountBlockExtension, u) {
|
||||
|
||||
difference() {
|
||||
// mount block
|
||||
translate(v = [-sideMountPad, 0, sideDy])
|
||||
cube(size = [sideMountPad, 10, blockHeight+sideDy]);
|
||||
translate(v = [-mountBlockExtension, 0, 0])
|
||||
cube(size = [mountBlockExtension, mountBlockDepth, railSideHeight]);
|
||||
|
||||
// screw mount
|
||||
translate(v=[-5,5,5]) // screwMountToGlobalZ
|
||||
union() {
|
||||
nutPocket();
|
||||
|
||||
if (double) {
|
||||
translate(v=[0,0,uDiff * u]) // screwMountToGlobalZ
|
||||
nutPocket();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
module nutPocket() {
|
||||
translate(v=[-mountBlockExtension/2,mountBlockDepth/2,mountBlockHeight/2]) // screwMountToGlobalZ
|
||||
rotate(a=[90,0,0])
|
||||
rotate(a=[0,90,0])
|
||||
hexNutPocket_N(rackFrameScrewType, openSide=false);
|
||||
@ -70,24 +65,52 @@ module sideSupportRailBase(type) {
|
||||
|
||||
}
|
||||
|
||||
module sideSupportRailBaseLBracket(backSupport=true, backThickness=3) {
|
||||
module sideSupportRailBase() {
|
||||
backThickness = 3;
|
||||
|
||||
translate(v=[0, 0, sideDy])
|
||||
union() {
|
||||
cube(size = [railBaseWidth, railLength, railBaseThickness]);
|
||||
cube(size = [railSideThickness, railLength, railSideHeight]);
|
||||
difference () {
|
||||
union() {
|
||||
cube(size = [railBaseWidth, railLength, railBaseThickness]);
|
||||
|
||||
if (backSupport) {
|
||||
translate(v=[0, railLength-backThickness, 0])
|
||||
cube(size=[railBaseWidth, backThickness, railSideHeight]);
|
||||
cube(size = [railSideThickness, railLength, railSideHeight]);
|
||||
|
||||
// back support
|
||||
translate(v = [0, max(railLength-backThickness, supportedY), 0])
|
||||
cube(size = [railBaseWidth, backThickness, railSideHeight]);
|
||||
|
||||
// back support for box
|
||||
translate(v = [0, supportedY, 0])
|
||||
cube(size = [railBaseWidth, backThickness, railSideHeight]);
|
||||
|
||||
// top support
|
||||
if (top) {
|
||||
translate(v = [0, 0, railSideHeight-baseThickness])
|
||||
cube(size = [railBaseWidth, railLength, railBaseThickness]);
|
||||
}
|
||||
|
||||
}
|
||||
union() {
|
||||
distanceFromSeparator = 3;
|
||||
r = 5;
|
||||
|
||||
boxDy = frontMountPad+r+mountBlockDepth+distanceFromSeparator;
|
||||
boxDz = baseThickness+distanceFromSeparator+r;
|
||||
translate(v=[0,boxDy,boxDz])
|
||||
minkowski() {
|
||||
cube(size = [sideThickness, supportedY-(boxDy+distanceFromSeparator+r), railSideHeight-2*boxDz]);
|
||||
sphere(r=r);
|
||||
}
|
||||
translate(v=[0,supportedY+distanceFromSeparator+r+backThickness,boxDz])
|
||||
minkowski() {
|
||||
cube(size = [sideThickness, 25, railSideHeight-2*boxDz]); // TODO calculate 22.5
|
||||
sphere(r=r);
|
||||
}
|
||||
|
||||
cylindricalFiletNegative(p0=[railBaseWidth,0,0],p1=[railBaseWidth,0,inf], n=[1,-1,0],r=4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module sideSupportRailBaseDovetail() {}
|
||||
|
||||
module sideSupportRailBaseBoxed() {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@ include <./common.scad>
|
||||
use <./rackEars.scad>
|
||||
|
||||
// Rack mount tray that supports screws on the bottom of the rack-mount item
|
||||
bottomScrewTray(u=1);
|
||||
|
||||
|
||||
// Config variables
|
||||
//trayAlignment = "middle"; // middle, right, left
|
||||
@ -13,9 +15,7 @@ mountPoints = [];
|
||||
mountScrewType = "m3";
|
||||
|
||||
|
||||
bottomScrewTray(u=1);
|
||||
|
||||
module bottomScrewTray(u) {
|
||||
module bottomScrewTray(u, trayWidth, trayDepth, trayThickness, mountPoints, mountScrewType) {
|
||||
|
||||
frontLipHeight = 2;
|
||||
backLipHeight = 1; // also applies to sides
|
||||
@ -65,7 +65,7 @@ module bottomScrewTray(u) {
|
||||
}
|
||||
}
|
||||
|
||||
module body() {
|
||||
module body() {
|
||||
|
||||
cube(size = [trayWidth, trayDepth, trayThickness]);
|
||||
|
||||
@ -118,6 +118,6 @@ module body() {
|
||||
children(0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user