-
Notifications
You must be signed in to change notification settings - Fork 2
/
hydroponics_example.scad
46 lines (39 loc) · 1.14 KB
/
hydroponics_example.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
include <MCAD/units.scad>
include <MCAD/materials.scad>
use <MCAD/shapes.scad>
use <plant_holder.scad>
use <tube_connectors.scad>
// Container dimensions:
diameter = 25*cm;
height = 26*cm;
wt = 2*mm; // Wall thickness of the container
nh = 6; // Number of plant holes
module container(){
difference(){
cylinder(r=diameter/2, h=height);
translate([0, 0, wt]) cylinder(r=diameter/2-wt, h=height);
}
}
module hole(){
linear_extrude(height=20*mm, center=true) plant_hole();
}
module lid(){
color(Pine) difference(){
cylinder(r=diameter/2+wt, h=15*mm);
translate([0, 0, -wt]) cylinder(r=diameter/2, h=15*mm);
for (i = [0:nh]){
rotate([0, 0, 360*i/nh]) translate([0, -diameter/4, 15*mm]) hole();
}
cylinder(r=10*mm, h=20*mm);
}
for (i = [0:nh]){
rotate([0, 0, 360*i/nh]) translate([0, -diameter/4, 15*mm]) plant_holder();
}
translate([0, 0, 50*mm]) rotate([180, 0, 360/nh/2])
star_connector(out_no=nh, in=tube, out=tube, demo=true);
}
tube = [10*mm, 12*mm, 20*mm];
union(){
color(Aluminum) container();
translate([0, 0, height]) lid();
}