-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcup_hanger.scad
89 lines (84 loc) · 2.56 KB
/
cup_hanger.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// a ring and handle to go around a travel mug or cup
diameter = 82.5; // diameter of cup where the ring should catch
height = 60; // mm, height of handle
ring = true; // render ring?
handle = true; // render handle?
offset_for_lid = true;
$fn=60;
if (ring) {
difference() {
union() {
cylinder(5, (diameter+10)/2, (diameter+10)/2);
rotate([90,0,0]) {
translate([0, 7.5, -(diameter + 20) / 2]) {
cylinder(diameter + 20, 7.5, 7.5);
}
translate([-7.5, 0, -(diameter + 20) / 2]) {
cube([15, 7.5, diameter + 20]);
}
}
}
translate([0, 0, -1]) {
cylinder(12, diameter / 2, diameter / 2);
}
rotate([90,0,0]) {
translate([0, 7.5, -(diameter + 21) / 2]) {
cylinder((diameter + 22), 2.5, 2.5);
}
}
translate([0, 0, 5]) {
cylinder(11, (diameter+10)/2, (diameter+10)/2);
}
}
}
if (handle) {
translate([(diameter + 30) / PI, 0, 2.4]) {
difference() {
union() {
rotate([90,0,0]) {
translate([0, 0, -(diameter + 22) / 2]) {
cylinder((diameter + 22), 2.4, 2.4);
}
}
translate([
0,
-diameter / 2 - 4.8 ,
-2.4
]) {
cube([15, 4.8, 4.8]);
}
translate([
9,
-diameter / 2 - 4.8 - (offset_for_lid ? 4.8 : 0),
-2.4
]) {
cube([height, 4.8, 4.8]);
}
translate([0, diameter / 2, -2.4]) {
cube([15, 4.8, 4.8]);
}
translate([
9,
diameter / 2 + (offset_for_lid ? 4.8 : 0),
-2.4
]) {
cube([height, 4.8, 4.8]);
}
translate([
height + 4,
-(diameter + 10 + (offset_for_lid ? 5 : 0)) / 2,
-2.4
]) {
cube([
5,
(diameter) + 10 + (offset_for_lid ? 5 : 0) ,
4.8
]);
}
}
translate([-3, -(diameter) / 2, -2.5]) {
cube([6, (diameter), 5]);
}
}
}
}