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
|
use <mixing.scad>;
/**
* view(...) {
* outer_mold(); // children(0);
* inner_shape(); // children(1);
* silicone(); // children(2);
* }
*/
module view(view,volume) {
module cou() { color("palegreen",0.7) children(); }
module cin() { color("silver",0.8) children(); }
module csi() { color("salmon",0.5) children(); }
module cmx() { color("gray",0.7) children(); }
if(view=="outer") cou() children(0);
else if(view=="inner") cin() children(1);
else if(view=="mixplate") cmx() {
mixing(volume=volume,what="vessel");
translate([0,mixing_size(volume=volume)[1]/2+5,0])
rotate([0,0,90]) mixing(volume=volume,what="splitter");
}else if(view=="outcome") csi() {
difference() {
children(2);
children([0:1]);
}
}else{
cou() children(0); cin() children(1);
csi() children(2);
translate([-mixing_size(volume=volume)[1],0]) rotate([0,0,90])
cmx() mixing(volume=volume,what="altogethernow");
}
}
/* vim:set ai sw=1: */
|