// X cover $fa = 1; $fs = 0.4; itol = 0.3; // my SE printer makes internal spaces too small // Values copied from millXplate.scad wide = 220+itol; // overall deep = 70+itol; thick = 4; cutoutW = 127; // cutout (increased from 120) cutoutH = 25; screwX = 60; screwY = 36; screwD = 35; // end of copy chigh = 20; // internal 'headroom' wall = 3; // wall thickness iwall = 6; // inner wall thickness cutoutW2 = 27; // reduced cutout pulley = 55; // used to add a clearance ring difference(){ union(){ cube([wide+2*wall, deep+2*wall, wall]); // face cube([wall, deep+2*wall, chigh+wall+thick]); // rear end cube([iwall, iwall+5, chigh+wall]); translate([0,deep+wall-iwall-10]) cube([iwall, iwall+10, chigh+wall]); translate([0, deep+wall, 0]) // top cube([wide+2*wall, wall, chigh+wall+thick]); translate([0, deep+2*wall-iwall, 0]) cube([wide+2*wall, iwall, chigh+wall]); translate([wide+wall, cutoutH, 0]) // front cube([wall, deep-cutoutH+2*wall, chigh+wall+thick]); translate([wide+2*wall-iwall,cutoutH, 0]) cube([iwall, deep-cutoutH+2*wall, chigh+wall]); cube([wide-cutoutW2+wall, wall, chigh+wall+thick]); // bottom cube([wide-cutoutW2+wall, iwall, chigh+wall]); translate([wall+90, wall+30, 0]) // clamp bolt cylinder(h=chigh+wall, d=12); translate([wall+90, wall+24, 0]) // microswitch plate cube([20,10, chigh+wall]); translate([wide-cutoutW2, 0, 0]) cube([wall, cutoutH, chigh+wall+thick]); translate([wide-cutoutW2, cutoutH, 0]) cube([cutoutW2, wall, chigh+wall]); } union(){ translate([wide-cutoutW2+wall,-0.01,-0.01]) cube([cutoutW2+wall+0.01, cutoutH, thick+0.02]); translate([wide+wall-screwX, deep+wall-screwY, wall/2-0.01]) cylinder(h=wall+0.04, d1=screwD+2, d2=screwD, center=true); translate([wall+90, wall+30, -0.01]) cylinder(h=chigh+wall+0.02, d=6); translate([wide+2*wall-iwall-0.01, 36, chigh+wall-10.6-6]) // switch cutout (6mm clear of plate) cube([iwall+0.03, 30.0+itol, 10.6+itol]); translate([wide+2*wall-65,deep+2*wall-1,4]) // text cutout cube([55,2,17]); translate([wall+94.5,wall+23.99,12]) // microswitch screws rotate([270,0,0]) cylinder(d=1.6, h=12); translate([wall+94.5+9.5,wall+23.99,12]) // microswitch screws rotate([270,0,0]) cylinder(d=1.6, h=12); translate([wall+90,deep+2*wall-iwall-0.01,(chigh+wall+thick)/2]) // led rotate([270,0,0]) cylinder(d=8, h=iwall+0.02); translate([85,36,wall]) // clearance on bolt rotate([0,0,10]) cube([15,4,chigh+0.01]); translate([wall+94.5,-0.01,12]) // microswitch screwdriver holes rotate([270,0,0]) cylinder(d=3.5, h=2*wall+0.02); translate([wall+94.5+9.5,-0.01,12]) // microswitch screwdriver holes rotate([270,0,0]) cylinder(d=3.5, h=2*wall+0.02); } } translate([wide+2*wall-15,deep+2*wall-4,8]) rotate([90,0,180]) linear_extrude(4) text("NigSoft", 10, font = "Liberation Sans"); // draw the pulley to check for clearances //translate([wide+wall-screwX, deep+wall-screwY, 10]) // cylinder(d=pulley, h=10);