$fn = 32; screw_head_diameter = 11; screw_head_height = 2; screw_shaft_diameter = 4.5; screw_shaft_depth = 2.75; width = 30; length = 40; strap_width = 25; torch_length = 80; torch_width_back = 32.5; torch_height_back = 17.3; torch_front_scale_factor = 1.117; // The torch grows towards the end module torch_shape() { polygon([ [0, torch_height_back / 2], [(torch_width_back / 2) - 2.5, (torch_height_back / 2) - 2], [(torch_width_back / 2), 0], [(torch_width_back / 2) - 2.5, -(torch_height_back / 2) + 2], [0, -torch_height_back / 2], [(-torch_width_back / 2) + 2.5, (torch_height_back / 2) - 2], [(-torch_width_back / 2), 0], [(-torch_width_back / 2) + 2.5, -(torch_height_back / 2) + 2], ]); } module torch () { color("yellow") { // The main body difference() { hull() { translate([0, 0, -torch_length / 2]) linear_extrude(0.1) torch_shape(); translate([0, 0, torch_length / 2]) linear_extrude(0.1) scale([torch_front_scale_factor, torch_front_scale_factor]) torch_shape(); } // The cutout difference() { translate([0, torch_height_back / 2, -25]) cube([50, torch_height_back, 50], center=true); translate([0, torch_height_back / 2, 0]) cube([20, 50, 20], center=true); } } // A shrunken body inside the cutout scale([0.95, 0.9, 1]) hull() { translate([0, 0, -torch_length / 2]) linear_extrude(0.1) torch_shape(); translate([0, 0, torch_length / 2]) linear_extrude(0.1) scale([torch_front_scale_factor, torch_front_scale_factor]) torch_shape(); } // The mounting cylinders translate([0, torch_height_back / 2, 0]) rotate([90, 0, 0]) cylinder(d=16, h=1.75, center=true); translate([0, torch_height_back / 2, 0]) rotate([90, 0, 0]) cylinder(d=7.5, h=3, center=true); // The screw (with a huge head) translate([0, (torch_height_back / 2) + 2.25, 0]) rotate([90, 0, 0]) cylinder(d=screw_shaft_diameter, h=screw_shaft_depth, center=true); translate([0, (torch_height_back / 2) + screw_shaft_depth + 2.75, 0]) rotate([90, 0, 0]) cylinder(d=screw_head_diameter, h=screw_head_height * 2, center=true); } } // torch(); module mount() { // The base plate translate([0, 0, -0.5]) cube([width, length, 9], center=true); // cube([width, length, 10], center=true); } // mount(); module strap() { strap_angle = 20; translate([0, 20, -1.5]) rotate([strap_angle, 0, 0]) cube([strap_width, length, 2.5], center=true); translate([0, -20, -1.5]) rotate([-strap_angle, 0, 0]) cube([strap_width, length, 2.5], center=true); } // strap(); difference() { mount(); translate([0, 0, 10]) rotate([-88, 0, 0]) torch(); strap(); // Round off the corners translate([width / 2, length / 2, -6]) rotate([-45, 0, -45]) cube([5, 5, 5], center=true); translate([-width / 2, length / 2, -6]) rotate([-45, 0, 45]) cube([5, 5, 5], center=true); translate([width / 2, -length / 2, -6]) rotate([45, 0, 45]) cube([5, 5, 5], center=true); translate([-width / 2, -length / 2, -6]) rotate([-45, 0, -45]) cube([5, 5, 5], center=true); }