eps = 0.01; infty = 100; body_w = 34; body_h = 30; foam_w = 3; screw_d1 = 19; screw_d2 = 16; screw_hole = 3.5; base_wall = 1.5; center_hole_d = 9; insert_h = 10; motor_angle_right = 4; wall = 1; difference() { translate([-body_w/2, -body_h/2, 0]) cube([body_w, body_h, base_wall]); // center hole translate([0, 0, -eps]) cylinder(r = center_hole_d/2, h = base_wall + 2*eps); // screw_d2 screw holes for (y = [-1, 1]) scale([1, y, 1]) translate([0, screw_d2/2, -eps]) { cylinder(r = screw_hole/2, h = base_wall + 2*eps, $fn=6); translate([0, 0, base_wall/2]) cylinder(r1 = screw_hole/2, r2 = screw_hole/2 + base_wall/2, h = base_wall/2 + 2*eps, $fn = 6); } // screw_d1 screw holes for (x = [-1, 1]) scale([x, 1, 1]) translate([screw_d1/2, 0, -eps]) { cylinder(r = screw_hole/2, h = base_wall + 2*eps, $fn=6); translate([0, 0, base_wall/2]) cylinder(r1 = screw_hole/2, r2 = screw_hole/2 + base_wall/2, h = base_wall/2 + 2*eps, $fn = 6); } // cable hole translate([-body_w/2+foam_w+wall, -body_h/2+foam_w+wall, -eps]) cube([8, 6, base_wall + 2*eps]); } side_ext = 0.7; difference() { hull() { translate([-body_w/2+foam_w, -body_h/2+foam_w, base_wall-eps]) cube([body_w-2*foam_w, body_h-2*foam_w, eps]); translate([-body_w/2+foam_w-side_ext*insert_h/2, -body_h/2+foam_w-side_ext*insert_h/2, insert_h + base_wall - eps]) cube([body_w-2*foam_w+side_ext*insert_h, body_h-2*foam_w+side_ext*insert_h, eps]); } hull() { translate([-body_w/2+foam_w+wall, -body_h/2+foam_w+wall, base_wall-2*eps]) cube([body_w-2*foam_w-2*wall, body_h-2*foam_w-2*wall, eps]); translate([-body_w/2+foam_w+wall-side_ext*insert_h/2, -body_h/2+foam_w+wall-side_ext*insert_h/2, insert_h + base_wall]) cube([body_w-2*foam_w+side_ext*insert_h-2*wall, body_h-2*foam_w+side_ext*insert_h-2*wall, eps]); } }; /* %difference() { rotate([0, motor_angle_right, 0]) difference() { translate([-body_w/2+foam_w, -body_h/2+foam_w, -infty/2]) cube([body_w-2*foam_w, body_h-foam_w, insert_h+base_wall+infty/2]); translate([-body_w/2+foam_w+wall, -body_h/2+foam_w+wall, -infty/2]) cube([body_w-2*foam_w-2*wall, body_h-foam_w-2*wall, insert_h+base_wall+infty/2+2*eps]); } translate([-infty/2, -infty/2, -infty+eps]) cube(infty); } */