This commit is contained in:
zhao
2023-01-03 00:30:45 -05:00
parent a84916a965
commit 48774d5b1b
88 changed files with 0 additions and 0 deletions

79
rack/body/base1.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();

37
rack/body/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();

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);

158
rack/body/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);

88
rack/body/side/side.scad Normal file
View File

@ -0,0 +1,88 @@
include <../../../misc/magnet.scad>
include <../../../math.scad>
$fn=64;
_height = 210;
_depth = 200;
_thickness = 5;
holeOffset = 10;
module _base() {
difference() {
cube(size = [_height, _depth, _thickness], center=true);
union() {
translate(v = [0, 0, 20])
minkowski() {
sphere(r = 20);
cube(size = [_height - 34, _depth - 34, 1], center = true);
}
// handles
handleLength = 80;
translate(v=[0, _depth/2, _thickness+5.5])
minkowski() {
sphere(r=10);
cube(size=[handleLength, 10, 1], center=true);
}
translate(v=[0, -_depth/2, _thickness+5.5])
minkowski() {
sphere(r=10);
cube(size=[handleLength, 10, 1], center=true);
}
}
}
}
module magnetMount(h) {
slack = 0.2;
difference() {
cylinder(h = h, r=magnetR*2);
translate(v=[0,0,h-magnetH])
cylinder(h = magnetH, r = magnetR+slack);
}
}
module side() {
magnetMountOffsetX = 95;
magnetMountOffsetY = 90;
difference() {
union() {
// align _base to positive z plan
translate(v = [0, 0, _thickness / 2])
_base();
// magnet mounts (no holes)
for (i=mirror4XY(midpoint=[0,0,0], offsetX=magnetMountOffsetX, offsetY=magnetMountOffsetY)) {
translate(v=i)
cylinder(h=_thickness, r=2*magnetR);
}
}
// magnet mount holes
for (i=mirror4XY(midpoint=[0,0,_thickness-magnetH], offsetX=magnetMountOffsetX, offsetY=magnetMountOffsetY)) {
translate(v=i)
cylinder(h=magnetH, r=magnetR);
}
}
}
difference() {
side();
union() {
for (i=[0:7]) {
translate(v=[i*15 - 52.5,0,0])
minkowski() {
cube(size = [2, 100, 10], center = true);
sphere(r=2);
}
}
}
}

BIN
rack/body/side/side.stl Normal file

Binary file not shown.

97
rack/body/top1.scad Normal file
View File

@ -0,0 +1,97 @@
include <../../common.scad>
include <../../math.scad>
include <../screws.scad>
$fn=64;
_height = 8;
_width = 210;
_depth = 200;
module _bodySilBase(width, depth, height, roundedPartHeight) {
hull() {
cube(size = [width, depth, height - roundedPartHeight]);
minkowski() {
translate(v = [roundedPartHeight, 0, height - roundedPartHeight])
cube(size = [width-2*roundedPartHeight, depth, eps]);
rotate(a = [90, 0, 0])
cylinder(r = roundedPartHeight, h = eps);
}
}
}
module _bodySil(width, depth, height, roundedPartHeight, wallThickness, topThickness) {
cornerSquareDim = 30;
difference() {
_bodySilBase(width, depth, height, roundedPartHeight);
union() {
translate(v = [wallThickness, cornerSquareDim, - topThickness])
_bodySilBase(width - 2 * wallThickness, depth - 2 * cornerSquareDim, height, roundedPartHeight);
translate(v=[cornerSquareDim, wallThickness, -topThickness])
cube(size=[width-2*cornerSquareDim, depth-2*wallThickness, height]);
}
}
}
// Negative and centered on xy. Aligned with z=0 downwards
module _lugAndMagnet() {
slack = 0.3;
vSlack = 0.1;
// lug
translate(v=[0,0,-2.5])
cube(size=[10+slack, 10+slack, 5+vSlack], center=true);
// hole for magnet, no tolerance on
translate(v=[0,0,-(5+vSlack+1.7)])
cylinder(d=6+slack, h=1.7+vSlack);
}
module baseBody() {
difference() {
_bodySil(_width, _depth, _height, 4, 5, 2);
_mid = [_width / 2, _depth / 2, _height];
union() {
for (i = mirror4XY(midpoint = _mid, offsetX = (_width / 2) - 15, offsetY = (_depth / 2) - 10)) {
translate(v = i)
_lugAndMagnet();
}
screwHolePositions = concat(
mirror4XY(midpoint = _mid, offsetX = (_width / 2) - 25, offsetY = (_depth / 2) - 20),
mirror4XY(midpoint = _mid, offsetX = (_width / 2) - 15, offsetY = (_depth / 2) - 20),
mirror4XY(midpoint = _mid, offsetX = (_width / 2) - 25, offsetY = (_depth / 2) - 10)
);
for (i = screwHolePositions) {
translate(v = i) {
cylinder(r = m3RadiusSlacked, h = inf, center = true);
}
}
}
}
}
difference() {
baseBody();
union() {
minkowski() {
translate(v = [(_width - 130) / 2, (_depth - 150) / 2, - inf / 2])
cube(size = [130, 150, inf]);
cylinder(r = 5);
}
}
}

BIN
rack/body/top1.stl Normal file

Binary file not shown.