summaryrefslogtreecommitdiff
path: root/view.scad
Side-by-side diff
Diffstat (limited to 'view.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--view.scad33
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 @@
+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: */