-rw-r--r-- | view.scad | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/view.scad b/view.scad new file mode 100644 index 0000000..501a17f --- a/dev/null +++ b/view.scad | |||
@@ -0,0 +1,33 @@ | |||
1 | use <mixing.scad>; | ||
2 | |||
3 | /** | ||
4 | * view(...) { | ||
5 | * outer_mold();// children(0); | ||
6 | * inner_shape();// children(1); | ||
7 | * silicone(); // children(2); | ||
8 | * } | ||
9 | */ | ||
10 | module view(view,volume) { | ||
11 | module cou() { color("palegreen",0.7) children(); } | ||
12 | module cin() { color("silver",0.8) children(); } | ||
13 | module csi() { color("salmon",0.5) children(); } | ||
14 | module cmx() { color("gray",0.7) children(); } | ||
15 | if(view=="outer") cou() children(0); | ||
16 | else if(view=="inner") cin() children(1); | ||
17 | else if(view=="mixplate") cmx() { | ||
18 | mixing(volume=volume,what="vessel"); | ||
19 | translate([0,mixing_size(volume=volume)[1]/2+5,0]) | ||
20 | rotate([0,0,90]) mixing(volume=volume,what="splitter"); | ||
21 | }else if(view=="outcome") csi() { | ||
22 | difference() { | ||
23 | children(2); | ||
24 | children([0:1]); | ||
25 | } | ||
26 | }else{ | ||
27 | cou() children(0); cin() children(1); | ||
28 | csi() children(2); | ||
29 | translate([-mixing_size(volume=volume)[1],0]) rotate([0,0,90]) | ||
30 | cmx() mixing(volume=volume,what="altogethernow"); | ||
31 | } | ||
32 | } | ||
33 | /* vim:set ai sw=1: */ | ||