include include // ####################################################### // ################### Linear Bearings ################### // ####################################################### lm8uu_outer = 15; lm8uu_inner = 8; lm8uu_height = 24; x_rail_dist = 70; lm8uu_dia_add = 0.5; lm8uu_len_add = 1.0; rail_dia_add = 3.0; y_carriage_wall = 10; // z-axis y_carriage_len_add = 15; // y-axis y_carriage_width = 25; // x-axis y_carriage_block_width = 10; // x-axis y_carriage_block_height = 10; // z-axis y_carriage_rail_support = 2; // dist between rail and edge y_carriage_length = x_rail_dist + (2 * y_carriage_len_add); rail_mount_dia_add = 0.4; x_rail_mount_width = 10; x_rail_cutout_z = 0.5; // in x-axis x_rail_cutout_x = 0.5; // in z-axis x_rail_cutout_y = x_rail_dist - (2 * y_carriage_len_add); x_rail_hole_off = 5; x_rail_block_len = (y_carriage_length - x_rail_cutout_y) / 2; x_carriage_width = 80; x_carriage_len_add = 10; x_carriage_wall = 10; x_carriage_bearing_off = 3; x_carriage_belt_off = 19; x_carriage_belt_block_width = 8; x_carriage_belt_block_length = 8; x_carriage_belt_block_height = 25; x_carriage_belt_block_height_b = x_carriage_belt_block_height - 7; x_carriage_block_hole_off = 6.0; x_carriage_block_length = 4; x_carriage_block_off = 2.5; x_carriage_block_add = 4.4; x_carriage_length = x_rail_dist + (2 * x_carriage_len_add); x_carriage_block_height = 2 * (x_carriage_block_hole_off + x_carriage_block_add); x_cutout_width = x_carriage_width - (2 * x_carriage_belt_block_width) - 5; x_cutout_length = x_rail_dist - 25; draw_x_carriage = false; draw_y_carriage = false; draw_y_carriage_idlers = true; draw_rail_len = 200; // y-carriage belt idlers idler_a_blue = [ 19, 15, 5.5]; idler_a_red = [ 19, x_rail_dist + 15, 12.5]; idler_b_blue = [30.3, x_rail_dist + 15, 12.5]; idler_b_red = [30.3, 15, 5.5]; module lm8uu() { $fn = 15; difference() { cylinder(d = lm8uu_outer, h = lm8uu_height); translate([0, 0, -1]) cylinder(d = lm8uu_inner, h = lm8uu_height + 2); } } // TODO add cable tie canal for lm8uu mounting // TODO get ready to actually print these module generate_spacer(pos) { color("green") translate([pos[0], pos[1], -0.5]) bearing_spacer(pos[2] + 0.5 + ((idler_outer_height - bearing_height) / 2), 2, 1, true, 3); } module y_carriage(idler_a = [0, 0, 0], idler_b = [0, 0, 0]) { $fn = 20; // attaching to x-rails color("green") translate([y_carriage_width, 0, -y_carriage_block_height]) difference() { cube([x_rail_mount_width, y_carriage_length, y_carriage_block_height + y_carriage_wall]); translate([0, -1, y_carriage_block_height]) cube([x_rail_cutout_z, y_carriage_length + 2, y_carriage_wall + 1]); translate([0, -1, y_carriage_block_height - (x_rail_cutout_x / 2)]) cube([y_carriage_block_width + 1, y_carriage_length + 2, x_rail_cutout_x]); translate([0, (y_carriage_length - x_rail_cutout_y) / 2, y_carriage_block_height]) cube([y_carriage_block_width + 1, x_rail_cutout_y, y_carriage_wall + 1]); for (i = [y_carriage_len_add : x_rail_dist : x_rail_dist + y_carriage_len_add]) { translate([0, i, y_carriage_block_height]) rotate([0, 90, 0]) cylinder(d = lm8uu_inner + rail_mount_dia_add, h = y_carriage_block_width + 1); } for (i = [0 : x_rail_block_len + x_rail_cutout_y : x_rail_block_len + x_rail_cutout_y]) { translate([y_carriage_block_width / 2, x_rail_hole_off + i, -1]) { cylinder(d = 3.2, h = y_carriage_wall + 2 + y_carriage_block_height); cylinder(d = 6.1, h = 3.8, $fn = 6); translate([0, 0, y_carriage_wall + y_carriage_block_height - 2.5]) cylinder(d = 6.1, h = 3.8); } translate([y_carriage_block_width / 2, x_rail_block_len - x_rail_hole_off + i, -1]) { cylinder(d = 3.2, h = y_carriage_wall + 2 + y_carriage_block_height); cylinder(d = 6.1, h = 3.8, $fn = 6); translate([0, 0, y_carriage_wall + y_carriage_block_height - 2.5]) cylinder(d = 6.1, h = 3.8); } } } // attaching to y-rail color("green") difference() { union() { cube([y_carriage_width, y_carriage_length, y_carriage_wall]); translate([y_carriage_width - y_carriage_block_width, 0, -y_carriage_block_height]) cube([y_carriage_block_width, y_carriage_length, y_carriage_block_height]); } translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0]) rotate([-90, 0, 0]) { translate([0, 0, -1]) cylinder(d = lm8uu_inner + rail_dia_add, h = y_carriage_length + 2); translate([0, 0, y_carriage_rail_support - lm8uu_len_add / 2]) cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add); translate([0, 0, y_carriage_length - lm8uu_height - y_carriage_rail_support - lm8uu_len_add / 2]) cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add); } } color("magenta") translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0]) rotate([-90, 0, 0]) { // y-bearings %translate([0, 0, y_carriage_rail_support]) lm8uu(); %translate([0, 0, y_carriage_length - lm8uu_height - y_carriage_rail_support]) lm8uu(); } // idlers for the corexy belts translate([0, 0, y_carriage_wall]) { if (draw_y_carriage_idlers) { translate(idler_a) bearing_idler(); translate(idler_b) bearing_idler(); } generate_spacer(idler_a); generate_spacer(idler_b); } } module belt_fix() { difference() { color("green") cube([x_carriage_belt_block_width, x_carriage_block_length, x_carriage_block_height]); translate([x_carriage_belt_block_width / 2, -1, x_carriage_block_hole_off - 0.2]) rotate([-90, 0, 0]) { cylinder(d = 3.2, h = x_carriage_belt_block_length + 2); cylinder(d = 6.1, h = 3.8, $fn = 6); } translate([x_carriage_belt_block_width / 2, -1, x_carriage_block_height - -x_carriage_block_hole_off - 9]) rotate([-90, 0, 0]) { cylinder(d = 3.2, h = x_carriage_belt_block_length + 2); cylinder(d = 6.1, h = 3.8, $fn = 6); } } } module belt_mount(top, up) { $fn = 15; difference() { color("green") if (top) { cube([x_carriage_belt_block_width, x_carriage_belt_block_length, x_carriage_belt_block_height]); } else { cube([x_carriage_belt_block_width, x_carriage_belt_block_length, x_carriage_belt_block_height_b]); } if (top) { translate([-1, x_carriage_belt_block_length / 2, 16]) rotate([0, 90, 0]) cylinder(d = 2.6, h = x_carriage_belt_block_width + 2); translate([x_carriage_belt_block_width / 2, -1, 16 + x_carriage_block_hole_off]) rotate([-90, 0, 0]) cylinder(d = 3.2, h = x_carriage_belt_block_length + 2); translate([x_carriage_belt_block_width / 2, -1, 16 - x_carriage_block_hole_off]) rotate([-90, 0, 0]) cylinder(d = 3.2, h = x_carriage_belt_block_length + 2); } else { translate([-1, x_carriage_belt_block_length / 2, 9]) rotate([0, 90, 0]) cylinder(d = 2.7, h = x_carriage_belt_block_width + 2); translate([x_carriage_belt_block_width / 2, -1, 9 + x_carriage_block_hole_off]) rotate([-90, 0, 0]) cylinder(d = 3.2, h = x_carriage_belt_block_length + 2); translate([x_carriage_belt_block_width / 2, -1, 9 - x_carriage_block_hole_off]) rotate([-90, 0, 0]) cylinder(d = 3.2, h = x_carriage_belt_block_length + 2); } } if (up) { if (top) { translate([0, x_carriage_belt_block_length + x_carriage_block_off, x_carriage_belt_block_height - x_carriage_block_height]) belt_fix(); } else { translate([0, x_carriage_belt_block_length + x_carriage_block_off, x_carriage_belt_block_height_b - x_carriage_block_height]) belt_fix(); } } else { if (top) { translate([0, -x_carriage_block_length - x_carriage_block_off, x_carriage_belt_block_height - x_carriage_block_height]) belt_fix(); } else { translate([0, -x_carriage_block_length - x_carriage_block_off, x_carriage_belt_block_height_b - x_carriage_block_height]) belt_fix(); } } } module belt_mounts() { translate([0, x_carriage_belt_off, 0]) belt_mount(false, true); translate([0, x_carriage_length - x_carriage_belt_off - x_carriage_belt_block_length, 0]) belt_mount(true, false); translate([x_carriage_width - x_carriage_belt_block_width, x_carriage_belt_off, 0]) belt_mount(true, true); translate([x_carriage_width - x_carriage_belt_block_width, x_carriage_length - x_carriage_belt_off - x_carriage_belt_block_length, 0]) belt_mount(false, false); } module x_carriage() { $fn = 20; //color("green") difference() { union() { color("green") cube([x_carriage_width, x_rail_dist + (2 * x_carriage_len_add), x_carriage_wall]); translate([0, 0, x_carriage_wall]) belt_mounts(); } // big center cutout translate([x_carriage_width / 2, x_carriage_length / 2, x_carriage_wall / 2]) cube([x_cutout_width, x_cutout_length, x_carriage_wall + 2], center=true); for (i = [0 : 1 : 1]) { translate([lm8uu_height + x_carriage_bearing_off + (i * (x_carriage_width - (2 * x_carriage_bearing_off) - lm8uu_height)), 0, ]) rotate([0, -90, 0]) { // x-bearings color("magenta") %translate([0, x_carriage_len_add, 0]) lm8uu(); color("magenta") %translate([0, x_rail_dist + x_carriage_len_add, 0]) lm8uu(); color("green") translate([0, x_carriage_len_add, 0]) cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add); color("green") translate([0, x_rail_dist + x_carriage_len_add, 0]) cylinder(d = lm8uu_outer + lm8uu_dia_add, h = lm8uu_height + lm8uu_len_add); color("green") translate([0, x_carriage_len_add, -x_carriage_width]) cylinder(d = lm8uu_inner + rail_dia_add, h = x_carriage_width * 2); color("green") translate([0, x_rail_dist + x_carriage_len_add, -x_carriage_width]) cylinder(d = lm8uu_inner + rail_dia_add, h = x_carriage_width * 2); } } // left mounting screw translate([5.5, x_carriage_length / 2, -1]) cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12); // right mounting screw translate([x_carriage_width - 5.5, x_carriage_length / 2, -1]) cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12); // bottom mounting screw translate([x_carriage_width / 2, 19, -1]) cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12); // top mounting screw translate([x_carriage_width / 2, x_carriage_length - 19, -1]) cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12); } e3d_v6_dist_x = 23 + 5; e3d_v6_dist_y = 18 + 1; e3d_v6_z_off = 13; translate([x_carriage_width / 2, x_carriage_length / 2, -e3d_v6_height + x_carriage_wall + e3d_v6_z_off]) { color("red") %translate([-e3d_v6_dist_x / 2, e3d_v6_dist_y / 2, 0]) e3d_v6(); color("yellow") %translate([e3d_v6_dist_x / 2, e3d_v6_dist_y / 2, 0]) e3d_v6(); color("blue") %translate([0, (e3d_v6_dist_y / 2) - e3d_v6_dist_y, 0]) rotate([0, 0, 180]) e3d_v6(); } e3d_clamp_width = x_cutout_width; e3d_clamp_width_add = 10; e3d_clamp_length = e3d_v6_dist_y; e3d_clamp_b_length = ((x_cutout_length - e3d_clamp_length) / 2) + 7; e3d_clamp_height = e3d_upper_small_height; e3d_clamp_dia_add = 0.2; e3d_clamp_cut = 0.2; // x2 e3d_clamp_hole_off = 4; e3d_hole_dia = 3.2; echo(m3_screw_len=e3d_clamp_length + (2 * e3d_clamp_b_length)); // hotend clamp center piece translate([(x_carriage_width - e3d_clamp_width) / 2, (x_carriage_length - e3d_clamp_length) / 2, x_carriage_wall]) difference() { union() { // center clamp part color("magenta") translate([-e3d_clamp_width_add, e3d_clamp_cut, 0]) cube([e3d_clamp_width + (2 * e3d_clamp_width_add), e3d_clamp_length - (2 * e3d_clamp_cut), e3d_clamp_height]); // blue clamp color("cyan") translate([0, -e3d_clamp_b_length, 0]) cube([e3d_clamp_width, e3d_clamp_b_length - e3d_clamp_cut, e3d_clamp_height]); // red & yellow clamp color("cyan") translate([0, e3d_clamp_length + e3d_clamp_cut, 0]) cube([e3d_clamp_width, e3d_clamp_b_length - e3d_clamp_cut, e3d_clamp_height]); } // left clamping screw translate([e3d_clamp_hole_off, -e3d_clamp_b_length - 1, e3d_clamp_height / 2]) rotate([-90, 0, 0]) cylinder(d = e3d_hole_dia, h = x_cutout_width + 2); // right clamping screw translate([x_cutout_width - e3d_clamp_hole_off, -e3d_clamp_b_length - 1, e3d_clamp_height / 2]) rotate([-90, 0, 0]) cylinder(d = e3d_hole_dia, h = x_cutout_width + 2); // left mounting screw translate([-5, e3d_clamp_length / 2, -1]) cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2); // right mounting screw translate([e3d_clamp_width + e3d_clamp_width_add - 5, e3d_clamp_length / 2, -1]) cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2); // bottom mounting screw translate([e3d_clamp_width / 2, -e3d_clamp_b_length + 3.5, -1]) cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2); // top mounting screw translate([e3d_clamp_width / 2, e3d_clamp_length + e3d_clamp_b_length - 3.5, -1]) cylinder(d = e3d_hole_dia, h = e3d_clamp_height + 2); // red e3d clamp cutout translate([(e3d_clamp_width - e3d_v6_dist_x) / 2, e3d_clamp_length, -1]) cylinder(d = e3d_upper_small_dia + e3d_clamp_dia_add, h = e3d_clamp_height + 2); // yellow e3d clamp cutout translate([(e3d_clamp_width + e3d_v6_dist_x) / 2, e3d_clamp_length, -1]) cylinder(d = e3d_upper_small_dia + e3d_clamp_dia_add, h = e3d_clamp_height + 2); // blue e3d clamp cutout translate([e3d_clamp_width / 2, 0, -1]) cylinder(d = e3d_upper_small_dia + e3d_clamp_dia_add, h = e3d_clamp_height + 2); } // hotend cooling fan color("grey") %translate([x_carriage_width + 5, (x_carriage_length - 40) / 2, -40]) difference() { cube([20, 40, 40]); translate([-1, 20, 20]) rotate([0, 90, 0]) cylinder(d = 35, h = 22); } } if (draw_y_carriage) { translate([(lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, 0, 0]) rotate([-90, 0, 0]) { // y-bearings %translate([0, 0, y_carriage_rail_support]) lm8uu(); %translate([0, 0, y_carriage_length - lm8uu_height - y_carriage_rail_support]) lm8uu(); } // x-rails for (i = [y_carriage_len_add : x_rail_dist : x_rail_dist + y_carriage_len_add]) { %translate([y_carriage_width + 1, i, 0]) rotate([0, 90, 0]) cylinder(d = lm8uu_inner, h = draw_rail_len); } y_carriage(idler_a_blue, idler_b_blue); translate([(2 * y_carriage_width + y_carriage_block_width) + draw_rail_len -5, y_carriage_length, 0]) rotate([0, 0, 180]) y_carriage(idler_a_red, idler_b_red); if (draw_x_carriage) { translate([y_carriage_width + y_carriage_block_width + ((draw_rail_len - x_carriage_width) / 2), y_carriage_len_add - x_carriage_len_add, 0]) x_carriage(); } } else if (draw_x_carriage) { x_carriage(); }