// Rounded Simpler Fan Mount for NEMA 17 Motor // I tried to make it parametric so that the same idea could be used for other motors // Print out two for each fan. // I used roundedBox based on Catarina Mota's program in order to make the outer parts prettier. // I think it worked. // include // Start with some other parameters for the cubes // nemsz = size of nema 17 motor in mm nemsz = 43; // size of cutouts parametrized hcube = 6; // Height to cut out of horizontal box, must be taller than box wcube = nemsz + 10; // Need it square for motor harns = 8; // length of wire harness on motor // Moving the screw mount boxes around to line them up with the clip cubeox = -13.1; // cubeoy = 25.5; cubeoz = 5; cubemx = -19.2; cubemy = cubeoy; // Dimensions of rounded box clip attachments for bolts rbox = 9; rboy = 13; rboz = cubeoz; rboy2 = rboz; rboz2 = rboy; // size of cutout for the open end of clip clipcut = nemsz * 0.52; // diameter of bolt used to attach to fans. I use M4s, rather than M3s holeid = 4.7; // How round do you want to be? smoother = 24; // Radius of corner rounds for cuteness cornr = 3; // Actually making the fan clip, I could unrotate all of it, but more work. rotate([0,0,45])fan_clip(); // Uncomment to make two clips. Below as well to make four. /* //making the second clip translate([6,65,0]) mirror([1,0,0]) rotate([0,0,45])fan_clip(); */ /* //making the third clip translate([65,0,0]) mirror([1,0,0]) rotate([0,0,45])fan_clip(); //making the fourth clip translate([65,65,0]) mirror([1,0,0]) rotate([0,0,45])fan_clip(); */ module fan_clip() { // First screw mount on fan // Again, I could unrotate all of it, but more work. rotate([0,0,-45]) difference() { union() { // Putting the attachment together translate([cubeox,cubeoy,0]) roundedBox([rbox,rboy,rboz], 2, false); translate([cubeox,4+cubeoy,cubeoz]) roundedBox([rbox,rboy2,rboz2], 2, false); } // Subtracting the bolt hole translate([cubeox,7+cubeoy,cubeoz+1.5]) rotate([90,0,0]) cylinder(r=holeid/2, h=hcube, $fn=smoother); } // Second screw mount on fan, mirrored after rotation rotate([0,0,-45]) mirror([1,0,0]) difference() { union() { translate([cubemx,cubemy,0]) roundedBox([rbox,rboy,rboz], 2, false); translate([cubemx,4+cubemy,cubeoz]) roundedBox([rbox,rboy2,rboz2], 2, false); } translate([cubemx,7+cubemy,cubeoz+1.5]) rotate([90,0,0]) cylinder(r=holeid/2, h=hcube, $fn=smoother); } // The position of the clip seemed arbitrary. // Clip on for fan difference(){ // This is the outer cube rotate([90,0,45]) translate([-3,0,3]) roundedBox([wcube,hcube-1,wcube], 2, false); // This is the center cube subtracted out rotate([0,0,-45]) translate([-18,-24.3,-3]) cube([nemsz-0.25,nemsz-0.25,hcube]); // This is for the open end of the clip rotate([180,0,0]) translate([-clipcut-1,clipcut/5,-3]) cube([clipcut,clipcut,hcube]); // With cutouts for wiring harness on motors /**/ rotate([0,90,45]) translate([0,-25,-3]) roundedBox([hcube,harns/2,harns], 2, true); rotate([0,90,45]) translate([0,18.85,-3]) roundedBox([hcube,harns/2,harns], 2, true); rotate([0,90,-45]) translate([0,18.85,3]) roundedBox([hcube,harns/2,harns], 2, true); /**/ } cornx = 29.25; corny = -4.25; cornz = -2.5; // Now to add in the corner rounds translate([0,cornx+corny,cornz]) cylinder(r=cornr, h=hcube-1, $fn=smoother); translate([cornx,corny,cornz]) cylinder(r=cornr, h=hcube-1, $fn=smoother); translate([0,-cornx-4.75,cornz]) cylinder(r=cornr, h=hcube-1, $fn=smoother); translate([-cornx,corny,cornz]) cylinder(r=cornr, h=hcube-1, $fn=smoother); // These are commented out, but I used them to find the right locatioin /* rotate([0,0,-45]) translate([-18,-24.3,-3.0]) cube([nemsz-0.25,nemsz-0.25,hcube]); rotate([180,0,0]) translate([-clipcut-1,clipcut/5,-5]) cube([clipcut,clipcut,6]); rotate([0,90,45]) translate([0,-25,-3]) roundedBox([hcube,harns/2,harns], 2, true); rotate([0,90,45]) translate([0,18.85,-3]) roundedBox([hcube,harns/2,harns], 2, true); rotate([0,90,-45]) translate([0,18.85,3]) roundedBox([hcube,harns/2,harns], 2, true); */ } // roundedBox module // size is a vector [w, h, d] module roundedBox(size, radius, sidesonly) { rot = [ [0,0,0], [90,0,90], [90,90,0] ]; if (sidesonly) { cube(size - [2*radius,0,0], true); cube(size - [0,2*radius,0], true); for (x = [radius-size[0]/2, -radius+size[0]/2], y = [radius-size[1]/2, -radius+size[1]/2]) { translate([x,y,0]) cylinder(r=radius, h=size[2], $fn=smoother/2, center=true); } } else { cube([size[0], size[1]-radius*2, size[2]-radius*2], center=true); cube([size[0]-radius*2, size[1], size[2]-radius*2], center=true); cube([size[0]-radius*2, size[1]-radius*2, size[2]], center=true); for (axis = [0:2]) { for (x = [radius-size[axis]/2, -radius+size[axis]/2], y = [radius-size[(axis+1)%3]/2, -radius+size[(axis+1)%3]/2]) { rotate(rot[axis]) translate([x,y,0]) cylinder(h=size[(axis+2)%3]-2*radius, r=radius, $fn=smoother/2, center=true); } } for (x = [radius-size[0]/2, -radius+size[0]/2], y = [radius-size[1]/2, -radius+size[1]/2], z = [radius-size[2]/2, -radius+size[2]/2]) { translate([x,y,z]) sphere(radius, $fn=smoother/2); } } } //translate([-15,0,0])roundedBox([10,30,40], 5, true); //translate([15,0,0]) roundedBox([20,30,40], 5, false);