This commit is contained in:
jazhawang
2022-05-29 14:21:52 -04:00
parent fa2cac3025
commit f40b7993cf
10 changed files with 66110 additions and 0 deletions

86
cases/rack/base1.scad Normal file
View File

@ -0,0 +1,86 @@
$fn=64;
eps=0.1;
slack = 0.5;
m3Diameter = 3.0;
m3Radius = m3Diameter/2.0;
m3ptr = m3Radius + slack;
module baseFrame() {
difference() {
cube(size=[200,200,4], center=true);
cube(size=[180,180,4], center=true);
}
translate(v=[90,90,0])
cube(size=[20,20, 4],center=true);
translate(v=[-90,90,0])
cube(size=[20,20, 4],center=true);
translate(v=[90,-90,0])
cube(size=[20,20, 4],center=true);
translate(v=[-90,-90,0])
cube(size=[20,20, 4],center=true);
}
module lugBottom() {
difference() {
cube(size=[9.7,9.7,6], center=true);
translate(v=[1,1,0])
cube(size=[9.1,9.1,5+1], center=true);
}
}
module base() {
difference() {
union() {
translate(v=[0,0,4/2])
baseFrame();
translate(v=[-90,-90,-6/2])
lugBottom();
mirror(v=[1,0,0])
translate(v=[-90,-90,-6/2])
lugBottom();
mirror(v=[0,1,0])
translate(v=[-90,-90,-6/2])
lugBottom();
mirror(v=[1,1,0])
translate(v=[-90,-90,-6/2])
lugBottom();
}
union() {
translate(v=[90,90,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[-90,90,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[90,-90,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[-90,-90,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
}
}
}
base();
*lugBottom();

4818
cases/rack/base1.stl Normal file

File diff suppressed because it is too large Load Diff

37
cases/rack/l1.scad Normal file
View File

@ -0,0 +1,37 @@
slack = 0.5;
m3Diameter = 3.0;
m3Radius = m3Diameter/2.0;
m3ptr = m3Radius + slack;
legLength = 200;
module baseLeg(legLength) {
cube(size=[3, 15, legLength]);
}
module leg() {
difference() {
baseLeg(legLength);
union() {
for (i = [0:18]) {
translate(v=[0,10,(i+1)*10])
rotate(a=[0,90,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
}
translate(v=[0,10,(0+1)*10])
rotate(a=[0,90,0])
*cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[0,10,(18+1)*10])
rotate(a=[0,90,0])
*cylinder(h = 100, r = m3ptr, $fn=32, center=true);
}
}
}
leg();

17642
cases/rack/l1.stl Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
slack = 0.5;
m3Diameter = 3.0;
m3Radius = m3Diameter/2.0;
m3ptr = m3Radius + slack;
legLength = 60;
module baseLeg(legLength) {
difference() {
cube(size=[16,16, legLength]);
translate(v=[4,4,4])
cube(size=[16, 16, legLength-2*4]);
}
}
module leg(ui) {
assert(ui > 0);
legLength = 20 + (ui-1)*10;
difference() {
baseLeg(legLength);
union() {
for (i = [0:ui-1]) {
translate(v=[0,10,(i+1)*10])
rotate(a=[0,90,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[10,0,(i+1)*10])
rotate(a=[90,0,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
}
translate(v=[10,10,legLength/2])
cylinder(h = legLength*2, r = m3ptr, $fn=32, center=true);
}
}
}
leg(18);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,168 @@
/* Simple configurable rack mount component to hold a box-like shell */
include <../common.scad>
include <./screws.scad>
slack = 0.4;
boxWidth = 157.67;
boxHeight = 27.0;
boxLength = 101.5;
topThickness = 1.0;
bottomThickness = 1.0;
sideThickness = 2.0;
sideSupportWidth = 10;
railWidth = 16.0;
totalHeight = boxHeight+topThickness+bottomThickness;
totalLength = boxLength+2*sideThickness;
railMountWidthDiff = (200.0 - (boxWidth + 2*sideThickness)) / 2.0;
module sideHolder() {
module frontLowerCaseSegment() {
translate(v=[0,0,0])
cube(size=[sideSupportWidth, sideThickness, bottomThickness]);
}
module frontUpperCaseSegment() {
// no room for slack? :(
translate(v=[0,0,boxHeight+bottomThickness])
cube(size=[sideSupportWidth, sideThickness, topThickness]);
}
module backLowerCaseSegment() {
translate(v=[0,boxLength+slack+sideThickness,0])
frontLowerCaseSegment();
}
module backUpperCaseSegment() {
translate(v=[0,boxLength+slack+sideThickness,0])
frontUpperCaseSegment();
}
module backLowerRailSegment() {
translate(v=[0,200.0-sideThickness,0])
cube(size=[sideSupportWidth, sideThickness, bottomThickness]);
}
module backUpperRailSegment() {
translate(v=[0,200.0-sideThickness,boxHeight+bottomThickness])
cube(size=[sideSupportWidth, sideThickness, topThickness]);
}
module frontRailMountSegment() {
// +2 is slack
translate(v=[-railMountWidthDiff+2,0,0])
// should technically use different totalHeight, as current totalHeight is for case holder
cube(size=[railWidth,sideThickness,totalHeight]);
}
module backRailMountSegment() {
translate(v=[0,200.0-sideThickness,0])
// should technically use different totalHeight, as current totalHeight is for case holder
frontRailMountSegment();
}
module frontFace() {
difference() {
hull() {
frontLowerCaseSegment();
frontUpperCaseSegment();
frontRailMountSegment();
}
// screw holes
translate(v=[-railMountWidthDiff + 10,0,5])
rotate(a=[90,0,0])
cylinder(r=m3RadiusSlacked, h=10, center=true);
translate(v=[-railMountWidthDiff + 10,0,25])
rotate(a=[90,0,0])
cylinder(r=m3RadiusSlacked, h=10, center=true);
}
}
module backFace() {
translate(v=[0,200.0-sideThickness,0])
frontFace();
}
frontFace();
backFace();
hull() {
frontLowerCaseSegment();
backLowerCaseSegment();
}
hull() {
backLowerCaseSegment();
backUpperCaseSegment();
}
hull() {
frontUpperCaseSegment();
backUpperCaseSegment();
}
hull() {
backLowerRailSegment();
backLowerCaseSegment();
}
hull() {
backUpperRailSegment();
backUpperCaseSegment();
}
// side support/hold for case
difference() {
cube(size=[sideThickness, totalLength, totalHeight]);
translate(v=[-eps/2,5,5])
cube(size=[sideThickness+eps,totalLength-10+eps, totalHeight-10+eps]);
}
// side support/hold for case
difference() {
translate(v=[sideSupportWidth-sideThickness,totalLength,0])
cube(size=[sideThickness, 200.0-totalLength, totalHeight]);
translate(v=[sideSupportWidth-sideThickness-eps/2,(200-totalLength)+15,5])
cube(size=[sideThickness+eps,(200.0-totalLength)-10+eps, totalHeight-10+eps]);
}
}
module sideHolderAligned() {
translate(v=[19,0,0])
sideHolder();
}
module mSide() {
mirror(v=[1,0,0]) {
sideHolderAligned();
}
}
sideHolderAligned();
translate(v=[42 + boxWidth,0,0])
*mSide();

File diff suppressed because it is too large Load Diff

13
cases/rack/screws.scad Normal file
View File

@ -0,0 +1,13 @@
/* Some common screw dimensions */
holeRadiusSlack = 0.5;
m3Diameter = 3.0;
m3Radius = m3Diameter/2.0;
m3RadiusSlacked = m3Radius + holeRadiusSlack;
m3ptr = m3RadiusSlacked;