summaryrefslogtreecommitdiff
path: root/view.scad
authorMichael Krelin <hacker@klever.net>2016-06-24 11:26:00 (UTC)
committer Michael Krelin <hacker@klever.net>2016-06-25 19:52:17 (UTC)
commit0bd5c1fd7159694b36ef69694143eef00d442961 (patch) (side-by-side diff)
tree5acf562652b0949b89d3f8da01f941484666face /view.scad
parentb058fc56422523d643e0e30250102fdbae8ea69b (diff)
downloadhotendery-0bd5c1fd7159694b36ef69694143eef00d442961.zip
hotendery-0bd5c1fd7159694b36ef69694143eef00d442961.tar.gz
hotendery-0bd5c1fd7159694b36ef69694143eef00d442961.tar.bz2
Volcano
Diffstat (limited to 'view.scad') (more/less context) (show 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: */