eps = 0.01; infty = 100; wall = 1.2; base_wall = 5; // before the cut to the angles real_base_wall = 1.5; // after the cut angle_horiz = 2; // y axis is horizontal, so this is rotate along x angle_vert = 1; // x axis is vertical, so this is rotate along y center_hole = 8 + 0.3; center_d = 24; foam_horiz = 6 + 0.3; side_w = 40; wing_clip_w1 = 9; wing_clip_w2 = 8; wing_clip_h = 20; wing_clip_top_off = 5; screw_dist = 31.5; screw_d = 2; fuse_w = 18; fuse_h = 52; fuse_add = 2; fuse_top = 2; module body_solid() { cylinder(r = center_d/2, h = base_wall); // wing front translate([-side_w/2, -foam_horiz/2-wall, 0]) cube([side_w, foam_horiz+2*wall, base_wall]); // wing clips on sides for (x = [-1, 1]) scale([x, 1, 1]) hull() { // bottom translate([side_w/2-wing_clip_w1, -foam_horiz/2-wall, 0]) cube([wing_clip_w1, foam_horiz+2*wall, eps]); // top translate([side_w/2-wing_clip_w1+wing_clip_top_off, -foam_horiz/2-wall, wing_clip_h]) cube([wing_clip_w1, foam_horiz+2*wall, eps]); } // fuse front hull() { for (x = [-1, 1]) scale([x, 1, 1]) translate([fuse_w/2, 0, 0]) cylinder(r = fuse_add, h = base_wall, $fn = 16); for (y = [-1, 1]) scale([1, y, 1]) translate([0, fuse_h/2, 0]) cylinder(r = fuse_add, h = base_wall, $fn = 16); } // fuse clips body hull() for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1]) { translate([fuse_w/2, 0, 0]) cylinder(r = eps, h = base_wall + fuse_top, $fn = 4); translate([0, fuse_h/2, 0]) cylinder(r = eps, h = base_wall + fuse_top, $fn = 4); } } module body_diff() { difference() { body_solid(); // center hole translate([0, 0, -eps]) cylinder(r = center_hole/2, h = base_wall + 2*eps); // horizontal foam difference() { translate([-infty/2, -foam_horiz/2, base_wall]) cube([infty, foam_horiz, infty]); // in the center there is only bottom half of the foam translate([-fuse_w/2, 0, base_wall-eps]) cube([fuse_w, foam_horiz/2, infty]); } // screw holes for (angle = [0:90:360]) rotate([0, 0, angle]) translate([screw_dist/2, 0, -eps]) cylinder(r = screw_d/2, h = base_wall + 2*eps); // fuse clips inside hull() for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1]) { translate([fuse_w/2 - wall/sin(atan(fuse_h/fuse_w)), 0, base_wall]) cylinder(r = eps, h = base_wall + fuse_top, $fn = 4); translate([0, fuse_h/2 - wall/sin(atan(fuse_w/fuse_h)), base_wall]) cylinder(r = eps, h = base_wall + fuse_top, $fn = 4); } } } // now rotate it and cut the bottom difference() { rotate([0, angle_horiz, 0]) rotate([angle_vert, 0, 0]) translate([0, 0, real_base_wall - base_wall]) body_diff(); translate([-infty/2, -infty/2, -infty]) cube(infty); }