CCCPaste

playing with mirror - customizer selector

/*
 Playing with mirror methode
 */

/* [Hidden] */

vectorsize = "two"; // ["two","thr","for","fiv","six"]
allthree=[2,2,2]; // [-5,1,5]
/* [Hidden] */
$fs=0.5;$fa=1.0;

if( vectorsize == "two" ) {
    color("green") 
        %cube();
    color("red") mirror([2,2]) cube();
    }
else if( vectorsize == "thr" ) {
    color("green") cube();
    color("red") mirror(allthree) cube();
    }
else if( vectorsize == "for" ) {
color("green") translate([4,0]) cube();
color("red") mirror( v=[1,0]) translate([4,0]) cube();
    }
else if( vectorsize == "fiv" ) {
color("green") translate([4,0,-2]) cube();
color("red") mirror( v=allthree) translate([4,0,-2]) cube();
}
else {
    color("green") 
        union() {
            cube([2,4,1]);
            translate([1,1,0])cube([4,2,1]);
            }
    color("red")
        mirror(allthree)
        union() {
            cube([2,4,1]);
                translate([1,1,0])cube([4,2,1]);
            }
}


/*
 Written by Jeff Hayes 
 
 To the extent possible under law, the author(s) have dedicated all
 copyright and related and neighboring rights to this software to the
 public domain worldwide. This software is distributed without any
 warranty.

 You should have received a copy of the CC0 Public Domain
 Dedication along with this software.
 If not, see .
 */