$fn=64; baseplate_hole_distance = 56; battery_x = 105; battery_y = 35; battery_z = 25; frame_x = 10; frame_y = 62; frame_z = 3; bec_x = 35; bec_y = 40; bec_z = 4; cage_x = bec_x; cage_y = bec_y; cage_z = battery_z + bec_z + 3; module cube_centered(x,y,z) { translate([-x/2, -y/2, 0]) cube([x, y, z]); } module cube_round_corners(x,y,z) { hull() { translate([-x/2, -y/2, 0]) cylinder(d=3, h=z); translate([ x/2, -y/2, 0]) cylinder(d=3, h=z); translate([-x/2, y/2, 0]) cylinder(d=3, h=z); translate([ x/2, y/2, 0]) cylinder(d=3, h=z); } } difference() { union() { cube_round_corners(frame_x, frame_y, frame_z); cube_round_corners(cage_x, cage_y, cage_z); translate([0, 0, cage_z]) cube_round_corners(bec_x, bec_y, bec_z); } cube_centered(battery_x, battery_y, battery_z); translate([0, -baseplate_hole_distance/2, 0]) cylinder(d=3, h=3); translate([0, baseplate_hole_distance/2, 0]) cylinder(d=3, h=3); translate([0, 0, battery_z+3]) cube_centered(bec_x, bec_y, 100); translate([0, 0, battery_z]) cube_centered(bec_x-9, bec_y-12, 100); }