This commit is contained in:
jazhawang
2022-09-18 11:13:08 -04:00
parent 070f97103b
commit 94c8c2116c
27 changed files with 261367 additions and 10156 deletions

1
cases/rack/.#rackCase.scad Symbolic link
View File

@ -0,0 +1 @@
zhao@zhao-desktop.12132:1663410391

View File

@ -1,29 +1,24 @@
include <../common.scad>
include <./screws.scad>
$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])
translate(v=[80,80,0])
cube(size=[20,20, 4],center=true);
translate(v=[-90,90,0])
translate(v=[-80,80,0])
cube(size=[20,20, 4],center=true);
translate(v=[90,-90,0])
translate(v=[80,-80,0])
cube(size=[20,20, 4],center=true);
translate(v=[-90,-90,0])
translate(v=[-80,-80,0])
cube(size=[20,20, 4],center=true);
}
@ -31,7 +26,7 @@ module lugBottom() {
difference() {
cube(size=[9.7,9.7,6], center=true);
translate(v=[1,1,0])
translate(v=[2,2,0])
cube(size=[9.1,9.1,5+1], center=true);
}
@ -63,16 +58,16 @@ module base() {
}
union() {
translate(v=[90,90,0])
translate(v=[80,80,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[-90,90,0])
translate(v=[-80,80,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[90,-90,0])
translate(v=[80,-80,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[-90,-90,0])
translate(v=[-80,-80,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
}
@ -81,6 +76,4 @@ module base() {
base();
*lugBottom();

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,71 @@
include <../common.scad>
include <./screws.scad>
include <../rpi/voronoi.scad>
vU = 2;
uHeight = 10;
plateScrewDiffV = uHeight*vU;
plateScrewDiffH = 180;
plateScrewToHEdge = 4.5;
plateScrewToVEdge = 5.5;
frontPlateThickness = 2.5;
frontPlateV = plateScrewDiffV + 2*plateScrewToHEdge;
frontPlateH = plateScrewDiffH + 2*plateScrewToVEdge;
plateScrewToBoxMin = 6;
module _frontPlateBody() {
translate(v=[-plateScrewToVEdge,0,-plateScrewToHEdge])
cube(size=[frontPlateH,frontPlateThickness,frontPlateV]);
}
module _plateHole() {
rotate(a=[90,0,0])
cylinder(r=m4RadiusSlacked, h=inf, center=true);
}
module frontPlate() {
difference() {
_frontPlateBody();
union() {
// TODO: introduce helper modules for this pattern
_plateHole();
translate(v=[plateScrewDiffH,0,0])
_plateHole();
translate(v=[0,0,plateScrewDiffV])
_plateHole();
translate(v=[plateScrewDiffH,0,plateScrewDiffV])
_plateHole();
}
}
}
difference() {
difference () {
rotate(a=[-90,0,0])
frontPlate();
translate(v=[0,0,-5])
voronoi3u_N(10);
}
// lug holes
union() {
translate(v=[160,-3,-frontPlateThickness])
cube(size=[5.2, 5.2, 3]);
translate(v=[160-88,-3,-frontPlateThickness])
cube(size=[5.2, 5.2, 3]);
}
}

20806
cases/rack/frontPlate.stl Normal file

File diff suppressed because it is too large Load Diff

16214
cases/rack/frontPlate2u.stl Normal file

File diff suppressed because it is too large Load Diff

158
cases/rack/m4Leg.scad Normal file
View File

@ -0,0 +1,158 @@
include <../common.scad>
include <./screws.scad>
//slack = 0.5;
//m3Diameter = 3.0;
//m3Radius = m3Diameter/2.0;
//m3ptr = m3Radius + slack;
legWidth = 16;
legLength = 16;
legHeight = 60;
legFrontThickness = 6;
legSupportThickness = 4;
legWingThickness = 4;
legWingLength = 9;
// 9.5 to account for space for inserting hex nuts at the top
legWingWidth = 9.5+legSupportThickness;
module legWing() {
difference() {
cube(size=[legWingLength, legWingThickness, legWingWidth]);
union() {
translate(v=[4,0,10])
rotate(a=[90,0,0])
cylinder(r=m3RadiusSlacked, h=20, center=true);
translate(v=[14,0,10])
rotate(a=[90,0,0])
cylinder(r=m3RadiusSlacked, h=20, center=true);
}
}
}
module base() {
difference() {
cube(size=[25,25,legWingThickness]);
union() {
translate(v=[20,20,0])
cylinder(r=m3RadiusSlacked, h=100, center=true);
translate(v=[10,10,0])
cylinder(r=m3RadiusSlacked, h=100, center=true);
translate(v=[20,10,0])
cylinder(r=m3RadiusSlacked, h=100, center=true);
translate(v=[10,20,0])
cylinder(r=m3RadiusSlacked, h=100, center=true);
}
}
}
module baseLeg(legHeight) {
union() {
difference() {
cube(size=[16,16, legHeight]);
union() {
translate(v=[4,6,0])
cube(size=[16, 16, legHeight]);
// compensate for differences between leg/wing thickness
translate(v=[legSupportThickness,legSupportThickness,0])
cube(size=[legWidth,legWidth,legSupportThickness+10]);
translate(v=[legSupportThickness,legSupportThickness,legHeight-legWingWidth])
cube(size=[legWidth,legWidth,legSupportThickness+10]);
}
}
translate(v=[16,0,0])
legWing();
translate(v=[16,0,legHeight])
mirror(v=[0,0,1]) {
legWing();
}
mirror(v=[1,-1,0]) {
translate(v=[16,0,0])
legWing();
translate(v=[16,0,legHeight])
mirror(v=[0,0,1]) {
legWing();
}
}
}
base();
translate(v=[0,0,legHeight-legWingThickness])
base();
}
*baseLeg(180);
module leg(ui) {
assert(ui > 0);
legLength = 20 + (ui-1)*10;
difference() {
baseLeg(legLength);
union() {
intersection() {
union() {
for (i = [1:ui-2]) {
translate(v=[0,10,(i+1)*10])
rotate(a=[0,90,0])
*cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[10,3,(i+1)*10])
rotate(a=[90,-10,0])
m4HexNutPocketNegative();
}
}
translate(v=[-1,-1,legWingWidth])
cube(size=[1000,1000,legLength-2*legWingWidth]);
}
translate(v=[0,10,10])
rotate(a=[0,90,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[0,10,ui*10])
rotate(a=[0,90,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[10,0,10])
rotate(a=[90,0,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[10,0,ui*10])
rotate(a=[90,0,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
}
}
}
//mirror(v=[1,0,0])
leg(20);

54952
cases/rack/m4Leg.stl Normal file

File diff suppressed because it is too large Load Diff

54952
cases/rack/m4LegM.stl Normal file

File diff suppressed because it is too large Load Diff

133
cases/rack/rackCase.scad Normal file
View File

@ -0,0 +1,133 @@
include <../common.scad>
include <./screws.scad>
include <../rockpro/rockpro.scad>
vU = 4;
uHeight = 10;
plateScrewDiffV = uHeight*vU;
plateScrewDiffH = 180;
plateScrewToHEdge = 4.5;
plateScrewToVEdge = 5.5;
frontPlateThickness = 2.5;
frontPlateV = plateScrewDiffV + 2*plateScrewToHEdge;
frontPlateH = plateScrewDiffH + 2*plateScrewToVEdge;
plateScrewToBoxMin = 6;
// BOX CONFIG
// box dimensions
boxDepth = 135;
boxWidth = 95;
boxBottomThickness = 1;
boxSideThickness = 2;
boxBackThickness = 2;
// boxFrontThickness is just frontPlateThickness
boxTopSpace = 1; // meant for lids?
boxBottomSpace = 1; // meant to be used for boxes that expect support rails
boxHeight = vU * uHeight + 2*plateScrewToHEdge - (boxBottomSpace+boxTopSpace);
// all of these are defined on the xy plane with centered zLen height
// 'rise' is meant model how raised a pcb is. More specifically, the distance between the top of
// the pcb and the bottom of the inside of the case
module frontFaceHoles(zLen, rise) {
//mirror(v=[0,1,0])
// translate(v=[5,-eps,rise])
//frontFaceIOCutouts_N();
}
module backFaceHoles(zLen, rise) {
}
module leftFaceHoles(zLen, rise) {
}
module rightFaceHoles(zLen, rise) {
}
module boxBody() {
// save this transformation...
// translate(v=[(plateScrewDiffH-boxWidth)/2.0,0,boxBottomSpace -plateScrewToHEdge])
// convert to inside box space
translate(v=[-boxSideThickness, -frontPlateThickness, -boxBottomThickness])
difference() {
cube(size=[boxWidth, boxDepth, boxHeight]);
translate(v=[boxSideThickness, frontPlateThickness, boxBottomThickness])
cube(size=[boxWidth-2*boxSideThickness, boxDepth-(boxBackThickness+frontPlateThickness), inf]);
}
}
*difference() {
boxBody();
translate(v=[7,2,5])
cutoutProfile_N();
}
translate(v=[7,2,5])
*cutoutProfile_N();
module _frontPlateBody() {
translate(v=[-plateScrewToVEdge,0,-plateScrewToHEdge])
cube(size=[frontPlateH,frontPlateThickness,frontPlateV]);
}
module _plateHole() {
rotate(a=[90,0,0])
cylinder(r=m4RadiusSlacked, h=inf, center=true);
}
module frontPlate() {
difference() {
_frontPlateBody();
union() {
// TODO: introduce helper modules for this pattern
_plateHole();
translate(v=[plateScrewDiffH,0,0])
_plateHole();
translate(v=[0,0,plateScrewDiffV])
_plateHole();
translate(v=[plateScrewDiffH,0,plateScrewDiffV])
_plateHole();
}
// TODO REMOVE. Used to save on filament and print time
scale(v=[0.8, 1+eps, 0.5])
translate(v=[0,-eps,0])
translate(v=[21,0,5])
_frontPlateBody();
}
}
frontPlate();

7506
cases/rack/rackCase180.stl Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,11 +8,12 @@ slack = 0.4;
boxWidth = 157.67;
boxHeight = 27.0;
boxLength = 101.5;
boxLength = 101.5+1;
topThickness = 1.0;
bottomThickness = 1.0;
faceThickness = 3.0;
sideThickness = 2.0;
sideSupportWidth = 10;
@ -23,19 +24,21 @@ totalLength = boxLength+2*sideThickness;
railMountWidthDiff = (200.0 - (boxWidth + 2*sideThickness)) / 2.0;
totalMountLength = 200.0 + 2*faceThickness + 1;
module sideHolder() {
module frontLowerCaseSegment() {
translate(v=[0,0,0])
cube(size=[sideSupportWidth, sideThickness, bottomThickness]);
cube(size=[sideSupportWidth, faceThickness, bottomThickness]);
}
module frontUpperCaseSegment() {
// no room for slack? :(
translate(v=[0,0,boxHeight+bottomThickness])
cube(size=[sideSupportWidth, sideThickness, topThickness]);
cube(size=[sideSupportWidth, faceThickness, topThickness]);
}
module backLowerCaseSegment() {
@ -49,25 +52,25 @@ module sideHolder() {
}
module backLowerRailSegment() {
translate(v=[0,198.0-sideThickness,0])
cube(size=[sideSupportWidth, sideThickness, bottomThickness]);
translate(v=[0,200.0+1,0])
cube(size=[sideSupportWidth, faceThickness, bottomThickness]);
}
module backUpperRailSegment() {
translate(v=[0,198.0-sideThickness,boxHeight+bottomThickness])
cube(size=[sideSupportWidth, sideThickness, topThickness]);
translate(v=[0,200.0+1,boxHeight+bottomThickness])
cube(size=[sideSupportWidth, faceThickness, topThickness]);
}
module frontRailMountSegment() {
// +2 is slack
translate(v=[-railMountWidthDiff+5,0,0])
// should technically use different totalHeight, as current totalHeight is for case holder
cube(size=[railWidth,sideThickness,totalHeight]);
cube(size=[railWidth,faceThickness,totalHeight]);
}
module backRailMountSegment() {
translate(v=[0,198.0-sideThickness,0])
translate(v=[0,200+1,0])
// should technically use different totalHeight, as current totalHeight is for case holder
frontRailMountSegment();
}
@ -82,19 +85,19 @@ module sideHolder() {
}
// screw holes
translate(v=[-railMountWidthDiff + 10,0,5])
translate(v=[-railMountWidthDiff + 11.5,0,5])
rotate(a=[90,0,0])
cylinder(r=m3RadiusSlacked, h=10, center=true);
cylinder(r=m4RadiusSlacked, h=10, center=true);
translate(v=[-railMountWidthDiff + 10,0,25])
translate(v=[-railMountWidthDiff + 11.5,0,25])
rotate(a=[90,0,0])
cylinder(r=m3RadiusSlacked, h=10, center=true);
cylinder(r=m4RadiusSlacked, h=10, center=true);
}
}
module backFace() {
translate(v=[0,198.0-sideThickness,0])
translate(v=[0,200.0+faceThickness+1,0])
frontFace();
}
@ -134,24 +137,24 @@ module sideHolder() {
difference() {
cube(size=[sideThickness, totalLength, totalHeight]);
translate(v=[-eps/2,5,5])
cube(size=[sideThickness+eps,totalLength-10+eps, totalHeight-10+eps]);
translate(v=[-eps/2,8,5])
cube(size=[sideThickness+eps,totalLength-17.5+eps, totalHeight-10+eps]);
}
// side support/hold for case
difference() {
translate(v=[sideSupportWidth-sideThickness,totalLength,0])
cube(size=[sideThickness, 198-totalLength, totalHeight]);
cube(size=[sideThickness, totalMountLength-totalLength, totalHeight]);
translate(v=[sideSupportWidth-sideThickness-eps/2,(198-totalLength)+15,5])
cube(size=[sideThickness+eps,(198-totalLength)-10+eps, totalHeight-10+eps]);
translate(v=[sideSupportWidth-sideThickness-eps/2,(200-totalLength)+20,5])
cube(size=[sideThickness+eps,(200-totalLength)-10+eps, totalHeight-10+eps]);
}
}
module sideHolderAligned() {
translate(v=[19,0,0])
//translate(v=[19,0,0])
sideHolder();
}
@ -163,6 +166,6 @@ module mSide() {
sideHolderAligned();
translate(v=[42 + boxWidth,0,0])
*mSide();
//translate(v=[42 + boxWidth,0,0])
//mSide();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

14422
cases/rack/screwmount-test.stl Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,62 @@
/* Contains screw mounts to be used to fix risers and whatnot into plastic */
include <../common.scad>
include <./screws.scad>
// Heat set inserts:
// Useful references:
// https://hackaday.com/2019/02/28/threading-3d-printed-parts-how-to-use-heat-set-inserts/
// My knurled brass nut dimensions
m4NutDiameter = 6;
m4NutLength1 = 6;
m3NutDiameter = 4.9;
m3NutLength1 = 6;
module nut_N(diameter,length,edm,elm) {
cylinder(h=(length + length*edm), d=(diameter + diameter*edm));
}
difference() {
union() {
cube(size=[30,30,2.5]);
translate(v=[8,8,0])
cylinder(h=8,d=8);
translate(v=[22,8,0])
cylinder(h=10,d=8);
translate(v=[8,22,0])
cylinder(h=8,d=10);
translate(v=[22,22,0])
cylinder(h=10,d=10);
}
union() {
translate(v=[8,8,2])
cylinder(h=6, d=6);
translate(v=[22,8,4])
cylinder(h=6,d=6);
translate(v=[8,22,2])
cylinder(h=6,d=6);
translate(v=[22,22,3])
cylinder(h=8,d=6);
}
}

View File

@ -63,7 +63,7 @@ module m4HexNutPocketNegative() {
// TODO: remove test
difference() {
*difference() {
translate(v=[0,1,0])
cube(size=[10,12,6], center=true);

79
cases/rack/top1.scad Normal file
View File

@ -0,0 +1,79 @@
include <../common.scad>
include <./screws.scad>
$fn=64;
module baseFrame() {
difference() {
cube(size=[200,200,4], center=true);
cube(size=[180,180,4], center=true);
}
translate(v=[80,80,0])
cube(size=[20,20, 4],center=true);
translate(v=[-80,80,0])
cube(size=[20,20, 4],center=true);
translate(v=[80,-80,0])
cube(size=[20,20, 4],center=true);
translate(v=[-80,-80,0])
cube(size=[20,20, 4],center=true);
}
module lugBottom() {
difference() {
cube(size=[9.7,9.7,6], center=true);
translate(v=[2,2,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=[80,80,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[-80,80,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[80,-80,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
translate(v=[-80,-80,0])
cylinder(h = 100, r = m3ptr, $fn=32, center=true);
}
}
}
base();