-
Notifications
You must be signed in to change notification settings - Fork 0
/
ParametricModel_digester_Installation.scad
70 lines (59 loc) · 1.77 KB
/
ParametricModel_digester_Installation.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
/*A rectangular brick pool that is normally used when bulding small farm biodigesters.*/
// Make an estimate of the size of the digester pool
el=200;//estimated length
ew=100;//estimated width
eh=50;//estimated height
//Adjust brick dimensions
l=21.5;//brick length
w=10.5;//brick width
h=10.5;//brick height
// This section normalizes the dimension between estimate and real brick dimensions
dl=round(el/l)*l;//real length
dw=round(ew/l)*l;// real width
dh=round(eh/h)*h;// real height
// Create wall with proper positioning of bricks
module l_wall(inv,dist,lg,zlg){
module l_line(dist,lg){
for (i=[0:lg-1])
if(i*dist<=dl){
if(i%2==0){
translate([0,i*(dist),0])
cube(size=[w,l,h], center=false);
}
else{
translate([0,i*(dist),0])
color("red")
cube(size=[w,l,h], center=false);
}
}
else{
}
}
if (inv==true)
for (z=[0:zlg]){
if(z%2==0){
translate([0,l/2,z*h])
l_line(dist,lg);
}
else{
translate([0,0,z*h])
l_line(dist,lg);
}
}
else
for (z=[0:zlg]){
if(z%2!=0){
translate([0,l/2,z*h])
l_line(dist,lg);
}
else{
translate([0,0,z*h])
l_line(dist,lg);
}
}
}
translate([0,0,0])l_wall(false,l,dl/l,dh/h);
translate([dw,0,0])l_wall(true,l,dl/l,dh/h);
translate([0,dl+w,0])rotate([0,0,-90])l_wall(false,l,dw/l,dh/h);
translate([0,w,0])rotate([0,0,-90])l_wall(true,l,dw/l,dh/h);
echo("you need in total: ",round(el/l*2)*round(eh/h)+ round(ew/l*2)*round(eh/h)," bricks to build this pool");