use <./common/common.scad>; module hot_shoe_mount() { difference() { cube([20,14.8,17.5], center=true); translate([0,-7.6,0]) { cube([9.4,2.5,17.6], center=true); } translate([-8.125,-0.60,0]) { cube([3.99,10,17.6], center=true); } translate([-9.65,-6.5,0]) { cube([1,2,17.9], center=true); } translate([8.125,-0.60,0]) { cube([3.99,10,17.6], center=true); } translate([9.65,-6.5,0]) { cube([1,2,17.9], center=true); } translate([0, -4, 6]) cube([6, 6, 6], center=true); } } module bolex_matte_box_hot_shoe () { RAIL = 10; difference () { union() { rotate([90, 0, 90]) hot_shoe_mount(); translate([0, -3, 7]) rotate([0, 90, 0]) rounded_cube([RAIL + 5, 28, 17.5], d = 3, center = true, $fn = 12); } translate([-75, -8, 7]) { rotate([0, 90, 0]) { rounded_cube([RAIL, RAIL / 2, 160], d = .5, center = true, $fn = 12); } } } } module bolex_matte_box () { X = 35; Y = 35; FRAME = 10; TAB_X = 10; TAB_Z = 6; TAB_Y = 49; RAIL = 10; difference () { translate([0, 0, 5/2]) { rounded_cube([X + FRAME, Y + FRAME, 8], d = 6, center = true, $fn = 64); } rounded_cube([X, Y, 40], d = 2, center = true, $fn = 20); //center translate([0, FRAME/2, 5/2]) { cube([X, Y + FRAME + 1, 3], center = true); } translate([0, FRAME/2, 1]) { cube([X + 2, Y + FRAME + 1, 2], center = true); } } translate([(-Y / 2) - TAB_Y - 7, 0, 3.5]) { difference () { rounded_cube([RAIL + 7, RAIL + 7, 10], d = 1.5, center = true, $fn = 24); rounded_cube([RAIL, RAIL/2, 15], d = .5, center = true, $fn = 12); rotate([0, 90, 0]) translate([0, 0, -7]) cylinder(r = R(2), h = 10, center = true, $fn = 12); } } rotate ([0, 0, 90]) { translate([0, (TAB_Y / 2) + (X / 2) + 1, 1.5]) cube([TAB_X, TAB_Y, TAB_Z], center = true); } } module bolex_matte_box_front () { RAIL = 10; RAIL_W = 10; FRAME = 15; TAB_X = 10; TAB_Y = 39; TAB_Z = 4; O_Y = 40; X = 55; Y = 60; translate([0, 0, 1.5]) { difference () { rounded_cube([X + FRAME, Y + FRAME, TAB_Z], d = 6, center = true, $fn = 24); rounded_cube([X, Y, TAB_Z], d = 2, center = true, $fn = 12); } } } module bolex_matte_box_front_top () { RAIL = 10.6; RAIL_W = 10; FRAME = 15; TAB_X = 10; TAB_Y = 30; TAB_Z = 4; O_Y = 40; X = 55; Y = 60; translate([-73.5, 0, 4.5]) { difference () { rounded_cube([RAIL+7, RAIL+7, RAIL_W], d = 1.5, center = true, $fn = 24); rounded_cube([RAIL, RAIL/2, RAIL_W], d = .5, center = true, $fn = 12); rotate([0, 90, 0]) translate([0, 0, -7]) cylinder(r = 1, h = 10, center = true, $fn = 12); } } rotate ([0, 0, 90]) { translate([0, (TAB_Y / 2) + (X / 2) + 7.5, 1.5]) cube([TAB_X, TAB_Y, TAB_Z], center = true); } rotate ([0, 0, 90]) { difference () { translate([0, (TAB_Y / 2) + (X / 2) - 2.5, 2.5]) cube([TAB_X * 3, 10, TAB_Z+2], center = true); translate([-10, 48, 2.5]) rotate([0, 0, 30]) cube([TAB_X * 3, 10, TAB_Z+2], center = true); translate([10, 48, 2.5]) rotate([0, 0, -30]) cube([TAB_X * 3, 10, TAB_Z+2], center = true); } translate([0, (TAB_Y / 2) + (X / 2) - 7.5, 4.5]) cube([TAB_X * 3, 5, 2], center = true); } } module bolex_matte_box_full () { bolex_matte_box(); difference () { translate([0, 0, 6]) rotate([0, 0, 45]) cylinder(r1 = R(60), r2 = 40, h = 20, $fn = 4); translate([0, 0, 5.9]) rotate([0, 0, 45]) cylinder(r1 = R(50), r2 = 35, h = 20.2, $fn = 4); //smooth edges translate([0, 30, 30]) rotate([45, 0, 0]) cube([70, 10, 10], center = true); translate([0, -30, 30]) rotate([45, 0, 0]) cube([70, 10, 10], center = true); translate([30, 0, 30]) rotate([0, 45, 0]) cube([10, 70, 10], center = true); translate([-30, 0, 30]) rotate([0, 45, 0]) cube([10, 70, 10], center = true); } } module bolex_matte_box_insert () { X = 35; Y = 35; FRAME = 10; difference () { union() { translate([0, FRAME/4- 2, 5/2]) { cube([X - .2, Y + FRAME-2, 2.9], center = true); } translate([0, FRAME/4- 2, 1]) { cube([X + 2 - .2, Y + FRAME -2, 1.9], center = true); } } rounded_cube([X - 4, Y + 1, 16], d = 3, center = true, $fn = 20); //translate([0, 0, 3.5]) rcube([X - 1, Y + 4, 3], d = 2, center = true, $fn = 20); } translate([0, 23, 2]) rounded_cube([4, 9, 3.9], d = 2, center= true, $fn=24); } module bolex_matte_box_rail () { X = (3/16)*25.4; Y = (3/8)*25.4; Z = 100; rounded_cube([X, Y, Z], d = 1, center = true, $fn = 10); } PART = "rail"; if (PART == "default") { bolex_matte_box_full(); } else if (PART == "hot_shoe_mount") { rotate([0, 90, 0]) bolex_matte_box_hot_shoe(); } else if (PART == "insert") { bolex_matte_box_insert(); } else if (PART == "rail") { bolex_matte_box_rail(); }