-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcube-hook.scad
66 lines (59 loc) · 1.55 KB
/
cube-hook.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// Matthew
// @mkmakare
// https://www.myminifactory.com/object/3d-print-cubicle-hook-107219
//
// Added variable comments and parameterized the back wall vertical.
//
t = 79; // thickness of cube wall
b = 30; // back side of cube wall vertical
f = 5; // hook body thickness, increase for strength
h = 12.7; // hook vertical height
w = 25.4; // hook diameter
length = 127; // vertical height of the entire hook
smidge = 0.001; // provide a tiny bit of overlap
union(){
//main body
translate([0,0,0])
cube([w,f,length]);
//thickness body
translate([0,0,length-f])
cube([w,t+f*2,f]);
//back support
//translate([0,(t+f*2)-f,length-2*w])
//cube([w,f,w*2]);
translate([0,(t+f*2)-f,length-b-f]) // added 'b' parameter
cube([w,f,b+f]);
//top hook
difference(){
rotate([0,90,0])
translate([-w*4,-w+f,0])
cylinder(w,w,w,$fn=150);
union(){
rotate([0,90,0])
translate([-w*4,-w+f,-smidge]) // the rotation makes z into x
cylinder(w+(2*smidge),w-f,w-f,$fn=150);
translate([-smidge,-2*w+f,w*4])
cube([w+2*smidge,w*2,w]);
}
}
//bottom hook
difference(){
rotate([0,90,0])
translate([-w*1,-w+f,0])
cylinder(w,w,w,$fn=150);
union(){
rotate([0,90,0])
translate([-w*1,-w+f,-smidge])
cylinder(w+(2*smidge),w-f,w-f,$fn=150);
translate([-smidge,-2*w+f,w*1])
cube([w+2*smidge,w*2,w]);
}
}
//top hook addition
translate([0,-w*2+f,w*4])
cube([w,f,h]);
//bottom hook addition
translate([0,-w*2+f,w*1])
cube([w,f,h]);
}