|
|
|
|
@ -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,23 +65,51 @@ module sideSupportRailBase(type) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module sideSupportRailBaseLBracket(backSupport=true, backThickness=3) {
|
|
|
|
|
module sideSupportRailBase() {
|
|
|
|
|
backThickness = 3;
|
|
|
|
|
|
|
|
|
|
translate(v=[0, 0, sideDy])
|
|
|
|
|
difference () {
|
|
|
|
|
union() {
|
|
|
|
|
cube(size = [railBaseWidth, railLength, railBaseThickness]);
|
|
|
|
|
|
|
|
|
|
cube(size = [railSideThickness, railLength, railSideHeight]);
|
|
|
|
|
|
|
|
|
|
if (backSupport) {
|
|
|
|
|
translate(v=[0, railLength-backThickness, 0])
|
|
|
|
|
// 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]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module sideSupportRailBaseDovetail() {}
|
|
|
|
|
}
|
|
|
|
|
union() {
|
|
|
|
|
distanceFromSeparator = 3;
|
|
|
|
|
r = 5;
|
|
|
|
|
|
|
|
|
|
module sideSupportRailBaseBoxed() {}
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|