update readme and dovetail slacks
This commit is contained in:
42
rack-mount/bottomScrewTray.scad
Normal file
42
rack-mount/bottomScrewTray.scad
Normal file
@ -0,0 +1,42 @@
|
||||
include <./common.scad>
|
||||
use <./rackEars.scad>
|
||||
|
||||
// Rack mount tray that supports screws on the bottom of the rack-mount item
|
||||
|
||||
// Config variables
|
||||
//trayAlignment = "middle"; // middle, right, left
|
||||
trayWidth = 150;
|
||||
trayDepth = 100;
|
||||
trayThickness = 3;
|
||||
|
||||
mountPoints = [];
|
||||
mountScrewType = "m3";
|
||||
|
||||
|
||||
bottomScrewTray(u=5);
|
||||
|
||||
module bottomScrewTray(u) {
|
||||
|
||||
screwDx = rackMountScrewWidth;
|
||||
echo(screwDx);
|
||||
screwDz = uDiff * u;
|
||||
|
||||
plateLength = screwDx + 2*rackMountScrewXDist;
|
||||
plateHeight = screwDz + 2*rackMountScrewZDist;
|
||||
|
||||
leftScrewDistToTray = 10+4+3;
|
||||
assert(leftScrewDistToTray >= 5);
|
||||
|
||||
leftScrewGlobalX = -leftScrewDistToTray;
|
||||
rightScrewGlobalX = screwDx + leftScrewGlobalX;
|
||||
|
||||
cube(size=[trayWidth, trayDepth, trayThickness]);
|
||||
|
||||
translate(v=[rackMountScrewXDist+leftScrewGlobalX+3,0,rackMountScrewZDist])
|
||||
rackEarModule(frontThickness=3,sideThickness=3,frontWidth=leftScrewDistToTray, sideDepth=trayDepth-3, u=5);
|
||||
|
||||
translate(v=[rightScrewGlobalX,0,rackMountScrewZDist])
|
||||
mirror(v=[1,0,0])
|
||||
rackEarModule(frontThickness=3,sideThickness=3,frontWidth=30, sideDepth=trayDepth-3, u=5);
|
||||
|
||||
}
|
||||
@ -1,8 +1,7 @@
|
||||
|
||||
include <../rack/config.scad>
|
||||
include <../rack/sharedVariables.scad>
|
||||
include <../helper/math.scad>
|
||||
include <../helper/screws.scad>
|
||||
include <../helper/common.scad>
|
||||
include <../config/common.scad>
|
||||
|
||||
/*
|
||||
QoL redefinitions/variables/reimports for rack mount items
|
||||
@ -10,7 +9,8 @@ include <../helper/screws.scad>
|
||||
|
||||
uDiff = screwDiff;
|
||||
|
||||
// ...
|
||||
rackMountScrewXDist = 4;
|
||||
rackMountScrewZDist = 4;
|
||||
|
||||
|
||||
|
||||
|
||||
43
rack-mount/rackEars.scad
Normal file
43
rack-mount/rackEars.scad
Normal file
@ -0,0 +1,43 @@
|
||||
include <./common.scad>
|
||||
|
||||
// Rack ear modules.
|
||||
// To be used either by itself if the mount-item supports it, or within another module
|
||||
|
||||
module rackEarStandAlone(frontThickness, sideThickness, frontWidth, sideDepth, sideHoles) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
module rackEarModule(frontThickness, sideThickness, frontWidth, sideDepth, u, triangular=true) {
|
||||
|
||||
earHeight = u*uDiff + 2*rackMountScrewZDist;
|
||||
|
||||
difference() {
|
||||
translate(v = [-rackMountScrewXDist, 0, -rackMountScrewZDist]) {
|
||||
cube(size = [frontWidth, frontThickness, earHeight]);
|
||||
|
||||
if (triangular) {
|
||||
hull() {
|
||||
translate(v = [frontWidth-sideThickness, 0, 0])
|
||||
cube(size = [sideThickness, frontThickness, earHeight]);
|
||||
|
||||
translate(v = [frontWidth-sideThickness, sideDepth, 0])
|
||||
cube(size = [sideThickness, frontThickness, 1]);
|
||||
}
|
||||
} else {
|
||||
translate(v = [frontWidth-sideThickness, 0, 0])
|
||||
cube(size = [sideThickness, sideDepth, earHeight]);
|
||||
}
|
||||
}
|
||||
|
||||
union() {
|
||||
rotate(a=[90,0,0])
|
||||
cylinder(r=screwRadiusSlacked(mainRailScrewType), h=frontThickness*2, center=true);
|
||||
|
||||
translate(v=[0,0,u*uDiff])
|
||||
rotate(a=[90,0,0])
|
||||
cylinder(r=screwRadiusSlacked(mainRailScrewType), h=frontThickness*2, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rackEarModule(frontThickness=3,sideThickness=3,frontWidth=30, sideDepth=50, u=4);
|
||||
Reference in New Issue
Block a user