handles.scad 1.38 KB
include<vars.scad>
include<modules.scad>


/* handleShape(10,10,10); */
module handle(x,y,z,exploded) {
  overlap=0.05;
  over=0.2;
  translate([offset, offset, roundborderInner+strength]) {
    difference() {
      intersection() {
        /* #handleShape(x,y,z,strength,bool=true); */
        /* difference() { */
        /* handleShape(x,y,z,0,bool=false); */
        translate([x/2-8.5-overlap,-2.2-overlap-over,z-6.31-overlap])
          /* difference() { */
          cube([12.635+(overlap*2),1.7+(overlap*2)+(over*2),3+(overlap*2)]);
        /* #translate([-1,1.2,0]) cube([2,0.7,2]); */
        /* } */
        handleShape(x,y,z,0,bool=true, borders=true);
        translate([x/2-8.5-overlap,-2.2-overlap-over,z-6.31-overlap]) {
          union() {
            translate([-1,1.25+over,0]) cube([15,0.7,4]);
            translate([4,-1,3-over*2]) cube([4.3,3,4]);
            translate([4,0.8,-3.5]) cube([4.3,1,4]);
          }
        }
        /* } */
        /* translate([0,y-4,0])mirror([0,1,0]){ */
        /*   handleShape(x,y,z,strength,bool=false); */
        /* } */
      }

      translate([x/2-8.5-overlap,-2.2-overlap-over,z-6.31-overlap]) 
        translate([1,1,1])
        cube([10.8,2,1]);
    }
  }
}

module handles(x,y,z,exploded) {
  translate(exploded) {
    handle(x,y,z,exploded);
  }
  mirror([0,1,0]) translate(exploded) translate([0,-y,0]) {
    handle(x,y,z,exploded);
  }
}