-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflow.scad
67 lines (61 loc) · 2.1 KB
/
flow.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
/*
* "Planter" is a device that control a houseplant's water and light schedules.
* Copyright (C) 2018 Jon Sangster
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include <flow_vars.scad>;
module flow(part = "positive")
{
if (part == "negative") {
} else {
_flow();
}
}
module _flow()
{
// Base
cube([ws_x, ws_y, ws_z]);
color("Aqua") {
// Top Tube
translate([ws_tube_sm_d/2 + ws_wall_off,
ws_tube_off_y - ws_tube_sm_d/2, ws_z]) {
cylinder(d = ws_tube_sm_d, h = ws_tube_h, $fn=32);
}
// Bottom Tube
translate([ws_tube_sm_d/2 + ws_wall_off,
ws_tube_off_y - ws_tube_sm_d/2, -ws_tube_h]) {
cylinder(d = ws_tube_sm_d, h = ws_tube_h, $fn=32);
hull() {
translate([0, 0, -ws_tube_bot_sm_len * 3/4]) {
cylinder(d = ws_tube_sm_d, h = ws_tube_h, $fn=32);
}
translate([0, 0, -ws_tube_bot_sm_len]) {
cylinder(d = ws_tube_bg_d, h = ws_tube_h, $fn=32);
}
}
}
}
// Wires
translate([ws_x - ws_wall_off, 0, (ws_z + ws_wire_d*3)/2]) {
rotate([90, 90]) flow_wires();
}
}
module flow_wires()
{
$fn = 32;
color("Yellow") cylinder(d = ws_wire_d, h = ws_wire_len);
color("Black") translate([ws_wire_d, 0]) cylinder(d = ws_wire_d, h = ws_wire_len);
color("Red") translate([ws_wire_d * 2, 0]) cylinder(d = ws_wire_d, h = ws_wire_len);
}