infty = 100; eps = 0.01; motor_d = 28; // unused here, just for reference motor_screw_dist1 = 19; motor_screw_dist2 = 16; motor_screw_d = 3 + 0.5; motor_screw_head = 5 + 0.5; motor_center_hole = 8 + 2; outer_wall = 2; body_w = 60 - 2*outer_wall - 0.5; body_h = 32 - outer_wall - 0.5; body_depth = 25; strut_h = 9; corner_l = 8; motor_plate_h = 2.5; // base thickness of the motor mount motor_plate_add = 2; // horizontal size added to the holes wall = 1.5; // base thickness of other parts side_overhang = 1.5; // base plate overhang difference() { translate([-body_w/2-side_overhang, -body_h/2-side_overhang, 0]) cube([body_w + 2*side_overhang, body_h + 2*side_overhang, wall]); translate([-body_w/2+wall, -body_h/2+wall, -eps]) cube([body_w - 2*wall, body_h - 2*wall, wall+2*eps]); } // bottom plate with motor mount module motor_plate_body() { hull() { // shorter screws cylinder(r = motor_center_hole/2 + motor_plate_add, h = motor_plate_h); for (angle = [-90,90]) { rotate([0, 0, angle]) translate([motor_screw_dist1/2, 0, 0]) cylinder(r = motor_screw_head/2 + motor_plate_add, h = motor_plate_h); } } hull() { // longer screws cylinder(r = motor_center_hole/2 + motor_plate_add, h = motor_plate_h); for (angle = [0,180]) { rotate([0, 0, angle]) translate([motor_screw_dist2/2, 0, 0]) cylinder(r = motor_screw_head/2 + motor_plate_add, h = motor_plate_h); } } } difference() { motor_plate_body(); // center hole translate([0, 0, -eps]) cylinder(r = motor_center_hole/2, h = motor_plate_h + 2*eps); for (angle = [-90,90]) rotate([0, 0, angle]) { translate([motor_screw_dist1/2, 0, -eps]) cylinder(r = motor_screw_d/2, h = motor_plate_h + 2*eps, $fn = 6); translate([motor_screw_dist1/2, 0, motor_plate_h - (motor_screw_head-motor_screw_d)/2]) cylinder(r1 = motor_screw_d/2, r2 = motor_screw_head/2, h = (motor_screw_head-motor_screw_d)/2+eps, $fn = 6); } for (angle = [0,180]) rotate([0, 0, angle]) { translate([motor_screw_dist2/2, 0, -eps]) cylinder(r = motor_screw_d/2, h = motor_plate_h + 2*eps, $fn = 6); translate([motor_screw_dist2/2, 0, motor_plate_h - (motor_screw_head-motor_screw_d)/2]) cylinder(r1 = motor_screw_d/2, r2 = motor_screw_head/2, h = (motor_screw_head-motor_screw_d)/2+eps, $fn = 6); } } // struts for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1]) hull() { translate([body_w/2-corner_l, body_h/2-wall/2, 0]) cylinder(r = wall/2, h = strut_h); translate([motor_screw_dist2/2 + motor_screw_head/2 + motor_plate_add - wall/2, 0, 0]) cylinder(r = wall/2, h = motor_plate_h); } for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1]) hull() { translate([body_w/2-corner_l, body_h/2-wall/2, 0]) cylinder(r = wall/2, h = strut_h); translate([motor_screw_head/2 + motor_plate_add - wall/2, motor_screw_dist1/2, 0]) cylinder(r = wall/2, h = motor_plate_h); } // corners for (x = [-1, 1]) scale([x, 1, 1]) { translate([body_w/2-wall, -body_h/2, 0]) cube([wall, body_h, strut_h]); for (y = [-1, 1]) scale ([1, y, 1]) { translate([body_w/2-corner_l, body_h/2 - wall, 0]) cube([corner_l, wall, strut_h]); } } // sides for (y = [-1, 1]) scale([1, y, 1]) translate([-body_w/2, body_h/2-wall, 0]) cube([body_w, wall, strut_h/2]);