-
Notifications
You must be signed in to change notification settings - Fork 1
/
pvc_valve.scad
58 lines (50 loc) · 1.25 KB
/
pvc_valve.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
h = 25; //radius of pipe
t=3; //thickness of build plastic
mg = 9; // magnet gap
fg= 8; //floating gap
alt= 3; //aluminium thickness
alr= (h+2)/2; //Al outer radius
ali = 10/2 ; //Al inner radius
module temp(){
cylinder(r=h,h= 5);
cylinder(r=1,h=100);
translate([h+2,0,0])cylinder(r=h,10);
translate([-h-2,0,0])cylinder(r=h/2,10);
}
module magnet_holder(){
for(i= [0,120,240])
rotate([0,0,i])
union(){
translate([h/4,0,0,])cube([h/2,t,t], center = true);
translate([h/2-t/2,0,mg/2])cube([t,t,mg],center=true);
}
difference(){
cylinder(r=8/2+1,h=3+t/2);
translate([0,0,t/2])cylinder(r=8/2,h=3+t/2);
}
};
module ring() {
difference(){
union(){
cylinder(r=h/2,h=t+alt);
cylinder(r=h/2+0.5,h= 1);
}
cylinder(r=ali,h=20,center=true);
translate([0,0,h/2])cylinder(r=alr,h=20,center=true);
}
};
module float_limit(){
for(i= [0,120,240])
rotate([0,0,i])
union(){
translate([h/4,0,0,])cube([h/2,t,t], center = true);
translate([h/2-t/2,0,-fg/2])cube([t,t,fg],center=true);
};
difference(){
cylinder(r=h/3,h=t,center=true);
cylinder(r=h/3-t/2,h=20,center=true);
}
};
magnet_holder();
%translate([0,0,mg])ring();
translate([0,0,mg+fg+alt-1]) float_limit();