-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcapsule.scad
36 lines (32 loc) · 858 Bytes
/
capsule.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
thick = 2;
clear = 0.2;
size = 27;
capsule_bottom();
module capsule_top(){
intersection(){
translate([0,0,size/2])cube([size,size,size], true);
difference(){
sphere(size/2);
sphere(size/2-thick);
cylinder(2,size/2-thick/2,size/2-thick/2);
#translate([0,0,2])
cylinder(3,size/2-thick/2,size/2-thick*2);
}
}
}
module capsule_bottom(){
intersection(){
translate([0,0,size/2])cube([size,size,size], true);
difference(){
sphere(size/2);
sphere(size/2-thick);
}
cylinder(size,size/2-thick/2,40);
}
difference(){
#translate([0,0,-2])
cylinder(3-clear,size/2-thick/2-clear,size/2-thick/2-clear);
translate([0,0,-2])
cylinder(3,size/2-thick,size/2-thick);
}
}