include <./rosetta.scad> base = 160; // mm top = 90; //mm height = 40; thickness = 9; // mm thick_height=7; // mm delta = 0.01; // M4 screw_width = 5; //mm piulitza = 7; // mm piulitza_h = 4; // mm // dent depth dent_depth = 3.5; base_2 = base/2; top_2 = top/2 - 1; top_3 = top_2 - 5; top_4 = top_2/2; screw_distance = 33; inital_screw_angle = -30; thin_base = (base-thickness); thin_base_2 = thin_base/2; //slit slit_b1 = (thickness*2/3)/2; slit_b2 = slit_b1/2; slit_h = slit_b2; module ovaloid(radius, width, height) { union(){ translate([-width/2+radius,0,0]) cylinder(r=radius, h=height); translate([width/2 - radius, 0,0]) cylinder(r=radius, h=height); translate([0,0,height/2]) cube([width-radius*2, radius*2, height],center=true); } } module hole(radius, width, height, thickness) { difference() { ovaloid(radius,width,height); translate([0,0,-delta]) ovaloid(radius-thickness,width-thickness*3.14/2,height+2*delta); } } union() { translate([0,0,-2]) hole(screw_width+3,screw_width*5+6,1.5,1.5); translate([0,-base/3,-2]) rotate([0,0,90]) hole(screw_width+3,screw_width*5+6,1.5,1.5); difference() { cube([base,base,thickness], center= true); translate([0,0,dent_depth-1]) cube([thin_base,thin_base,thickness], center= true); // screws translate([0,0,-thickness-delta]) ovaloid(screw_width,screw_width*5,10); translate([0,-base/3,0]) rotate([0,0,90]) translate([0,0,-thickness-delta]) ovaloid(screw_width,screw_width*5,10); } // The two slits to slide the base into // translate([-base_2 + slit_b2*3/2,base_2-slit_h,thickness-4-delta]) rotate([90, 180, 0]) trapeze(slit_b1,slit_b2,slit_h,base-slit_h); translate([base_2 - slit_b2*3/2,base_2-slit_h,thickness-4-delta]) rotate([90, 180, 0]) trapeze(slit_b1,slit_b2,slit_h,base-slit_h); }