update side support
This commit is contained in:
@ -13,7 +13,7 @@
|
|||||||
- These values depend on print orientation and it's assumed parts are printed in their recommended orientations.
|
- These values depend on print orientation and it's assumed parts are printed in their recommended orientations.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
xySlack = 0.4;
|
xySlack = 0.35;
|
||||||
|
|
||||||
radiusXYSlack = xySlack/2;
|
radiusXYSlack = xySlack/2;
|
||||||
|
|
||||||
|
|||||||
@ -9,14 +9,8 @@ include <../config/common.scad>
|
|||||||
|
|
||||||
uDiff = screwDiff;
|
uDiff = screwDiff;
|
||||||
|
|
||||||
rackMountScrewXDist = 4;
|
rackMountScrewXDist = 4.5;
|
||||||
rackMountScrewZDist = 4;
|
rackMountScrewZDist = 4.5;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
mainRailSideSupportToInnerEdge = frontFaceWidth - railSideMountThickness;
|
||||||
|
railSupportsDx = 2*mainRailSideSupportToInnerEdge + maxUnitWidth;
|
||||||
@ -1,68 +1,63 @@
|
|||||||
include <../../helper/common.scad>
|
include <../../helper/common.scad>
|
||||||
include <../../helper/math.scad>
|
include <../../config/common.scad>
|
||||||
include <../../helper/screws.scad>
|
|
||||||
include <../../rack/config.scad>
|
|
||||||
include <../../rack/sharedVariables.scad>
|
include <../../rack/sharedVariables.scad>
|
||||||
|
include <../common.scad>
|
||||||
|
|
||||||
*sideSupportRailBase("lBracket");
|
sideSupportRailBase(u=2, double=true, top=true, baseThickness=1.5, sideThickness=4, backThickness=2, supportedZ=27.5, supportedY=101.5, supportedX=159);
|
||||||
// TODO: make this parametric
|
|
||||||
|
|
||||||
// distance between front and back main rail screw mounts
|
// 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
|
mountBlockHeight = 10;
|
||||||
screwMountGlobalDz = screwDiff / 2.0;
|
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()
|
applyMainRailMounts()
|
||||||
sideSupportRailBaseHolder();
|
sideSupportRailBase();
|
||||||
|
|
||||||
module sideSupportRailBaseHolder() {
|
|
||||||
if (type == "lBracket") {
|
|
||||||
sideSupportRailBaseLBracket();
|
|
||||||
} else {
|
|
||||||
error("Unsupported side support type");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
module applyMainRailMounts() {
|
module applyMainRailMounts() {
|
||||||
|
|
||||||
|
mountBlockExtension = (railSupportsDx - supportedX)/2 - railSideThickness;
|
||||||
|
assert(mountBlockExtension >= 10);
|
||||||
|
|
||||||
apply_p() {
|
apply_p() {
|
||||||
translate(v=[0,frontMountPad,0])
|
|
||||||
union() {
|
union() {
|
||||||
dualMount();
|
translate(v = [0, frontMountPad, 0])
|
||||||
|
mountBlockColumn(mountBlockExtension=mountBlockExtension, u=u);
|
||||||
translate(v=[0,sideRailScrewMountDist,0])
|
translate(v=[0,frontMountPad+sideRailScrewMountDist, 0])
|
||||||
dualMount();
|
mountBlockColumn(mountBlockExtension=mountBlockExtension, u=u);
|
||||||
}
|
}
|
||||||
|
|
||||||
children(0);
|
children(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module dualMount() {
|
module mountBlockColumn(mountBlockExtension, u) {
|
||||||
|
|
||||||
blockHeight = railSideHeight - sideDy;
|
|
||||||
|
|
||||||
difference() {
|
difference() {
|
||||||
// mount block
|
translate(v = [-mountBlockExtension, 0, 0])
|
||||||
translate(v = [-sideMountPad, 0, sideDy])
|
cube(size = [mountBlockExtension, mountBlockDepth, railSideHeight]);
|
||||||
cube(size = [sideMountPad, 10, blockHeight+sideDy]);
|
|
||||||
|
|
||||||
// screw mount
|
union() {
|
||||||
translate(v=[-5,5,5]) // screwMountToGlobalZ
|
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=[90,0,0])
|
||||||
rotate(a=[0,90,0])
|
rotate(a=[0,90,0])
|
||||||
hexNutPocket_N(rackFrameScrewType, openSide=false);
|
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])
|
difference () {
|
||||||
union() {
|
union() {
|
||||||
cube(size = [railBaseWidth, railLength, railBaseThickness]);
|
cube(size = [railBaseWidth, railLength, railBaseThickness]);
|
||||||
cube(size = [railSideThickness, railLength, railSideHeight]);
|
|
||||||
|
|
||||||
if (backSupport) {
|
cube(size = [railSideThickness, railLength, railSideHeight]);
|
||||||
translate(v=[0, railLength-backThickness, 0])
|
|
||||||
cube(size=[railBaseWidth, backThickness, 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>
|
use <./rackEars.scad>
|
||||||
|
|
||||||
// Rack mount tray that supports screws on the bottom of the rack-mount item
|
// Rack mount tray that supports screws on the bottom of the rack-mount item
|
||||||
|
bottomScrewTray(u=1);
|
||||||
|
|
||||||
|
|
||||||
// Config variables
|
// Config variables
|
||||||
//trayAlignment = "middle"; // middle, right, left
|
//trayAlignment = "middle"; // middle, right, left
|
||||||
@ -13,9 +15,7 @@ mountPoints = [];
|
|||||||
mountScrewType = "m3";
|
mountScrewType = "m3";
|
||||||
|
|
||||||
|
|
||||||
bottomScrewTray(u=1);
|
module bottomScrewTray(u, trayWidth, trayDepth, trayThickness, mountPoints, mountScrewType) {
|
||||||
|
|
||||||
module bottomScrewTray(u) {
|
|
||||||
|
|
||||||
frontLipHeight = 2;
|
frontLipHeight = 2;
|
||||||
backLipHeight = 1; // also applies to sides
|
backLipHeight = 1; // also applies to sides
|
||||||
@ -65,7 +65,7 @@ module bottomScrewTray(u) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module body() {
|
module body() {
|
||||||
|
|
||||||
cube(size = [trayWidth, trayDepth, trayThickness]);
|
cube(size = [trayWidth, trayDepth, trayThickness]);
|
||||||
|
|
||||||
@ -118,6 +118,6 @@ module body() {
|
|||||||
children(0);
|
children(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user