forked from Cheekio/stewart_platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtop_platform.scad
62 lines (53 loc) · 1.08 KB
/
top_platform.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
include <servo_holder.scad>;
a_width = 53.4;
a_length = 68.6;
s_depth = 15.8;
slop = 5;
offset = 0.1;
thickness = 3;
s_l = 24.5;
s_w = 12.4;
wall = 4;
depth = 6;
sc_l = s_l + 2*wall;
sc_w = s_w + 2*wall;
off = 0.1;
male_height = thickness + 2*offset;
male_radius = 2.8;
servo_distance = 0.5*a_length + slop + s_depth;
p_radius = servo_distance + slop + wall;
h_radius = 0.5*a_width;
male_distance = p_radius - 0.5*(p_radius - h_radius);
module male() {
translate([male_distance, 0,-offset]){
cylinder(r=male_radius, h=male_height, $fs=0.3);
}
}
module two_servos() {
translate([servo_distance,0,0]){
mirror([0,1,0]){
rotate(-90, [0,1,0]){
servo_holder();
}
}
rotate(-90, [0,1,0]){
servo_holder();
}
}
}
rotate(180, [1,0,0]){
difference(){
cylinder(r=p_radius, h=thickness, $fs=0.5);
translate([0,0,-offset]){
cylinder(r=h_radius, h=thickness + 2*offset, $fs=0.5);
}
male();
rotate(120, [0,0,1]){male();}
rotate(240, [0,0,1]){male();}
}
}
rotate(60, [0,0,1]){
two_servos();
rotate(120, [0,0,1]){two_servos();}
rotate(240, [0,0,1]){two_servos();}
}