-
Notifications
You must be signed in to change notification settings - Fork 0
/
arm.scad
75 lines (64 loc) · 2.31 KB
/
arm.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
module barSmooth2Point(L, r1, r2, b1, b2){
/* L = bar length, center-to-center
r1 = total bar radius at one end
r2 = total bar radius at other end
b1 = bolt diameter (not radius) at one end
b2 = bolt diameter (not radius) at other end */
difference()
{
union()
{
rotate([90,0,90]) cylinder(h = L, r1 = r1, r2 = r2, center = false, $fn = 6);
cylinder (h = 10, r=r1, center = true, $fn=100);
translate([L,0,0]) cylinder (h = 10, r=r2, center = true, $fn=100);
}
cylinder(h=12, r=b1/2, center=true, $fn=100);
translate([L,0,0]) cylinder(h=12, r=b2/2, center=true, $fn=100);
}
}
module barRadius2Point(L,w, r1, r2, b1, b2){
/* L = bar length, center-to-center
w = bar width
r1 = total bar radius at one end
r2 = total bar radius at other end
b1 = bolt diameter (not radius) at one end
b2 = bolt diameter (not radius) at other end */
difference()
{
union()
{
rotate([90,0,90]) cylinder(h = L, r1 = w/2, r2 = w/2, center = false, $fn = 6);
cylinder (h = 10, r=r1, center = true, $fn=100);
translate([L,0,0]) cylinder (h = 10, r=r2, center = true, $fn=100);
}
cylinder(h=12, r=b1/2, center=true, $fn=100);
translate([L,0,0]) cylinder(h=12, r=b2/2, center=true, $fn=100);
}
}
module barRadius3Point(L1,w1,L2,w2,r1, r2, r3, b1, b2, b3){
/* L1 = bar length, center-to-center of first section
w1 = bar width of first section
L1 = bar length, center-to-center of second section
w2 = bar width of second section
r1 = total bar radius at one end
r2 = total bar radius at other end
b1 = bolt diameter (not radius) at one end
b2 = bolt diameter (not radius) at other end */
difference()
{
union()
{
rotate([90,0,90]) cylinder(h = L1, r1 = w1/2, r2 = w1/2, center = false, $fn = 6);
translate([L1,0,0]) rotate([90,0,90]) cylinder(h = L2, r1 = w2/2, r2 = w2/2, center = false, $fn = 6);
cylinder (h = 10, r=r1, center = true, $fn=100);
translate([L1,0,0]) cylinder (h = 10, r=r2, center = true, $fn=100);
translate([L2+L1,0,0]) cylinder (h = 10, r=r3, center = true, $fn=100);
}
cylinder(h=12, r=b1/2, center=true, $fn=100);
translate([L1,0,0]) cylinder(h=12, r=b2/2, center=true, $fn=100);
translate([L2+L1,0,0]) cylinder(h=12, r=b3/2, center=true, $fn=100);
}
}
//projection(cut=false) barSmooth2Point(100,5,8,2,3);
//projection(cut=false) barRadius2Point(100,10,5,8,2,3);
projection(cut=false) barRadius3Point(100,10,50,16,5,8,10,2,3,4);