// ####################################################### // ################## Config Parameters ################## // ####################################################### slot = 30; // or 20 slot_off = 1; // distance between adjacent slots // print area / volume heatbed_width = 400; heatbed_length = 400; heatbed_height = 6; // distance between heatbed edge and inner t-slot frame edge frame_off_x = 30; frame_off_y = 30; outer_width = heatbed_width + (2 * (slot + frame_off_x)); outer_length = heatbed_length + (2 * (slot + frame_off_y)); // TODO depend on print area height outer_height = 500; rail_mount_dist = 12; y_carriage_pos = 175; x_carriage_pos = 180; // distance between heatbed and z-carriage frame bed_x_off = 10; bed_y_off = 10; bed_z_dist = 30; // display heatbed centered in print volume bed_draw_height = (outer_height - heatbed_height) / 2; // + 175; z_carriage_wall = 10; z_carriage_bearing_dia_add = 0.4; z_carriage_cutout_width = 2; z_carriage_cabletie_cut_off = 5; z_carriage_use_cable_tie_mount = true; z_rail_dia = 8; show_outer_frame = true; show_extruders = false; show_z_motion = true; show_heatbed_frame = true; show_heatbed = true; show_xy_motion = true; show_x_carriage = true; show_belts = false; echo(print_x=heatbed_width, print_y=heatbed_length); echo(frame_x=outer_width, frame_y=outer_length, frame_z=outer_height); // ####################################################### // ###################### Libraries ###################### // ####################################################### include include include include include include include include module gt2_belt(length) { if (show_belts) { difference() { belting("straight", "GT2_2mm", belt_length = length); translate([-5, -5, 6]) cube([length + 10, 10, 10]); } } } // ####################################################### // ######################## Frame ######################## // ####################################################### module slot_angle_connector() { color("gray") translate([slot, 0, 0]) rotate([0, -90, 0]) difference() { cube([slot, slot, slot]); translate([0, -5, 0]) rotate([0, 45, 0]) cube([2 * slot, 2 * slot, 2 * slot]); } } module foot() { color("yellow") translate([0, 0, 10]) cylinder(d = 6, h = 20); color("yellow") difference() { sphere(d = 20); translate([-15, -15, -30]) cube([30, 30, 30]); } } module lower_frame(double) { if (double) { translate([slot + slot_off, 0, slot]) rotate([-90, 0, 0]) tslot_2_x(slot, outer_width - (2 * (slot + slot_off))); translate([slot + slot_off, outer_length - slot, slot]) rotate([-90, 0, 0]) tslot_2_x(slot, outer_width - (2 * (slot + slot_off))); translate([0, slot + slot_off, 0]) tslot_2_y(slot, outer_length - (2 * (slot + slot_off))); translate([outer_width - slot, slot + slot_off, 0]) tslot_2_y(slot, outer_length - (2 * (slot + slot_off))); } else { translate([slot + slot_off, 0, 0]) tslot_x(slot, outer_width - (2 * (slot + slot_off))); translate([slot + slot_off, outer_length - slot, 0]) tslot_x(slot, outer_width - (2 * (slot + slot_off))); translate([0, slot + slot_off, 0]) tslot_y(slot, outer_length - (2 * (slot + slot_off))); translate([outer_width - slot, slot + slot_off, 0]) tslot_y(slot, outer_length - (2 * (slot + slot_off))); } } module frame() { // outer corner pillars tslot_z(slot, outer_height); translate([outer_width - slot, 0, 0]) tslot_z(slot, outer_height); translate([0, outer_length - slot, 0]) tslot_z(slot, outer_height); translate([outer_width - slot, outer_length - slot, 0]) tslot_z(slot, outer_height); lower_frame(false); // top frame translate([0, 0, outer_height - slot]) lower_frame(true); // end caps color("black") translate([0, 0, outer_height]) { cube([slot, slot, 2]); translate([outer_width - slot, 0, 0]) cube([slot, slot, 2]); translate([0, outer_length - slot, 0]) cube([slot, slot, 2]); translate([outer_width - slot, outer_length - slot, 0]) cube([slot, slot, 2]); } // feet translate([slot / 2, slot / 2, -30]) foot(); translate([outer_width - slot / 2, slot / 2, -30]) foot(); translate([slot / 2, outer_length - slot / 2, -30]) foot(); translate([outer_width - slot / 2, outer_length - slot / 2, -30]) foot(); // connecting elements translate([slot + slot_off, 0, slot + slot_off]) slot_angle_connector(); translate([slot + slot_off, outer_length - slot, slot + slot_off]) slot_angle_connector(); translate([slot + slot_off, 0, outer_height - slot - slot_off - slot]) rotate([0, 90, 0]) slot_angle_connector(); translate([slot + slot_off, outer_length - slot, outer_height - slot - slot_off - slot]) rotate([0, 90, 0]) slot_angle_connector(); translate([outer_width - slot - slot_off, 0, slot + slot_off]) rotate([0, -90, 0]) slot_angle_connector(); translate([outer_width - slot - slot_off, outer_length - slot, slot + slot_off]) rotate([0, -90, 0]) slot_angle_connector(); translate([outer_width - slot - slot_off, 0, outer_height - slot - slot_off - slot]) rotate([0, 180, 0]) slot_angle_connector(); translate([outer_width - slot - slot_off, outer_length - slot, outer_height - slot - slot_off - slot]) rotate([0, 180, 0]) slot_angle_connector(); translate([slot, slot + slot_off, slot + slot_off]) rotate([0, 0, 90]) slot_angle_connector(); translate([slot, slot + slot_off, outer_height - slot - slot_off - slot]) rotate([0, 90, 90]) slot_angle_connector(); translate([0, outer_length - slot - slot_off, slot + slot_off]) rotate([0, 0, -90]) slot_angle_connector(); translate([0, outer_length - slot - slot_off, outer_height - slot - slot_off - slot]) rotate([0, 90, -90]) slot_angle_connector(); translate([outer_width, slot + slot_off, slot + slot_off]) rotate([0, 0, 90]) slot_angle_connector(); translate([outer_width, slot + slot_off, outer_height - slot - slot_off - slot]) rotate([0, 90, 90]) slot_angle_connector(); translate([outer_width - slot, outer_length - slot - slot_off, slot + slot_off]) rotate([0, 0, -90]) slot_angle_connector(); translate([outer_width - slot, outer_length - slot - slot_off, outer_height - slot - slot_off - slot]) rotate([0, 90, -90]) slot_angle_connector(); translate([slot + slot_off, slot + slot_off, slot]) rotate([-90, 0, 0]) slot_angle_connector(); translate([outer_width - slot - slot_off, slot + slot_off, slot]) rotate([-90, 0, 90]) slot_angle_connector(); translate([slot + slot_off, outer_length - slot - slot_off, 0]) rotate([90, 0, 0]) slot_angle_connector(); translate([outer_width - slot - slot_off, outer_length - slot - slot_off, 0]) rotate([90, 0, -90]) slot_angle_connector(); /* translate([slot + slot_off, slot + slot_off, outer_height]) rotate([-90, 0, 0]) slot_angle_connector(); translate([outer_width - slot - slot_off, slot + slot_off, outer_height]) rotate([-90, 0, 90]) slot_angle_connector(); translate([slot + slot_off, outer_length - slot - slot_off, outer_height - slot]) rotate([90, 0, 0]) slot_angle_connector(); translate([outer_width - slot - slot_off, outer_length - slot - slot_off, outer_height - slot]) rotate([90, 0, -90]) slot_angle_connector(); */ } // ####################################################### // ###################### Mechanics ###################### // ####################################################### module rail(length, dia) { cylinder(d = dia, h = length); echo(rail_dia=dia, rail_len=length); } module y_rails() { // y smooth rail on blue side color("cyan") translate([y_rail_dia / 2 + rail_y_off_1, 18, -30]) rotate([-90, 0, 0]) rail(outer_length - slot - nema17_size - (2 * rail_mount_dist), y_rail_dia); // y carriage on blue side translate([rail_y_off_1 - (lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, y_carriage_pos, -slot]) y_carriage(x_rail_dia, y_rail_dia, idler_a_blue, idler_b_blue); // rail mounts for blue side color("green") translate([0, 2 * rail_mount_dist, -2 * slot]) rail_mount(slot, y_rail_dia); color("green") translate([0, outer_length - (2 * slot) - nema17_size - rail_mount_dist + 5, -2 * slot]) rail_mount(slot, y_rail_dia); // y smooth rail on red side color("cyan") translate([outer_width - (2 * slot) - y_rail_dia / 2 - rail_y_off_1, 18, -30]) rotate([-90, 0, 0]) rail(outer_length - slot - nema17_size - (2 * rail_mount_dist), y_rail_dia); // y carriage on red side translate([outer_width - slot - y_carriage_width - y_carriage_block_width, y_carriage_pos + y_carriage_length, -slot]) rotate([0, 0, 180]) y_carriage(x_rail_dia, y_rail_dia, idler_a_red, idler_b_red); // rail mounts for red side color("green") translate([outer_width - (2 * slot), 2 * rail_mount_dist + rail_mount_len, -2 * slot]) rotate([0, 0, 180]) rail_mount(slot, y_rail_dia); color("green") translate([outer_width - (2 * slot), outer_length - (2 * slot) - nema17_size - rail_mount_dist + 5 + rail_mount_len, -2 * slot]) rotate([0, 0, 180]) rail_mount(slot, y_rail_dia); } module x_rails() { // TODO length calculate properly! color("cyan") translate([30, y_carriage_pos, 15]) rotate([0, 90, 0]) rail(outer_width - (4 * slot), x_rail_dia); color("cyan") translate([30, y_carriage_pos + x_rail_dist, 15]) rotate([0, 90, 0]) rail(outer_width - (4 * slot), x_rail_dia); if (show_x_carriage) { translate([x_carriage_pos, y_carriage_pos - x_carriage_len_add, slot / 2]) x_carriage(x_rail_dia); } } module motion_xy() { translate([slot, slot, outer_height]) y_rails(); translate([slot, slot + y_carriage_len_add, outer_height - (1.5 * slot)]) x_rails(); // left ("blue") motor translate([slot, outer_length - slot - nema17_size - nema17_mount_wall, outer_height + nema17_mount_wall]) rotate([180, 0, 90]) { color("blue") translate([0, 0, -65]) nema17(65); color("green") nema17_mount(slot); // blue motor pulley color("magenta") translate([nema17_size / 2, nema17_size / 2, 22.4]) rotate([180, 0, 0]) gt2_pulley(); // blue gt2 belt at motor color("blue") translate([nema17_size / 2, nema17_size / 2 + 6.5, nema17_mount_wall + 1]) rotate([0, 0, 180]) gt2_belt(outer_length - (2 * slot) - nema17_size / 2 - x_rail_dist - y_carriage_pos - 15); color("blue") translate([-outer_length + (3 * slot) + 10 + nema17_size / 2, nema17_size / 2 - 6.5, nema17_mount_wall + 1]) gt2_belt(outer_length - (3 * slot) - 10); } // right ("red") motor translate([outer_width - slot - nema17_size, outer_length - slot - nema17_size - nema17_mount_wall, outer_height + nema17_mount_wall]) rotate([180, 0, 90]) { color("red") translate([0, 0, -65]) nema17(65); color("green") nema17_mount(slot); // red motor pulley color("cyan") translate([nema17_size / 2, nema17_size / 2, 8.2]) gt2_pulley(); // red gt2 belt at motor color("red") translate([nema17_size / 2, nema17_size / 2 + 6.5, nema17_mount_wall + 8]) rotate([0, 0, 180]) gt2_belt(outer_length - (3 * slot) - 10); color("red") translate([nema17_size / 2 - (outer_length - (2 * slot) - nema17_size / 2 - x_rail_dist - y_carriage_pos - 15), nema17_size / 2 - 6.5, nema17_mount_wall + 8]) gt2_belt(outer_length - (2 * slot) - nema17_size / 2 - x_rail_dist - y_carriage_pos - 15); } // x carriage belts on blue side color("blue") translate([slot + 29, slot + x_rail_dist + 7 + y_carriage_pos, outer_height - 1]) rotate([180, 0, 0]) gt2_belt(x_carriage_pos - 20); color("red") translate([slot + 15, slot + 23 + y_carriage_pos, outer_height - 8]) rotate([180, 0, 0]) gt2_belt(x_carriage_pos - 6); // x carriage belts on red side color("red") translate([slot + x_carriage_width + x_carriage_pos - 7, slot + x_rail_dist + 7 + y_carriage_pos, outer_height - 8]) rotate([180, 0, 0]) gt2_belt(outer_width - x_carriage_pos - (2 * slot) - x_carriage_width - 20); color("blue") translate([slot + x_carriage_width + x_carriage_pos - 7, slot + 23 + y_carriage_pos, outer_height - 1]) rotate([180, 0, 0]) gt2_belt(outer_width - x_carriage_pos - (2 * slot) - x_carriage_width - 10); // long back belts color("blue") translate([slot + 15, slot + 10, outer_height - 7]) gt2_belt(outer_width - nema17_size - (2 * slot) + 13); color("red") translate([slot + 15, slot + 10, outer_height - 14]) gt2_belt(outer_width - nema17_size - (2 * slot) + 13); // blue belt on red side color("blue") translate([outer_width - slot - 15, slot + 10, outer_height - 7]) rotate([0, 0, 90]) gt2_belt(y_carriage_pos + 10); // red belt on blue side color("red") translate([slot + 15, slot + 19 + y_carriage_pos, outer_height - 14]) rotate([0, 0, -90]) gt2_belt(y_carriage_pos + 10); // idler on blue side translate([slot + bearing_mount_width + 15, 0, outer_height - slot]) rotate([0, 0, 90]) slot_mount_bracket(slot, true); // idler on red side translate([outer_width - slot - 15, 0, outer_height - slot]) rotate([0, 0, 90]) slot_mount_bracket(slot, true); } // ####################################################### // ####################### Heatbed ####################### // ####################################################### module heatbed_plate() { difference() { color("yellow") cube([heatbed_width, heatbed_length, heatbed_height]); #translate([bed_x_off + (slot / 2), bed_y_off + (slot / 2), -bed_z_dist - slot - 1]) cylinder(d = 4.2, h = bed_z_dist + slot + heatbed_height + 2); #translate([heatbed_width - bed_x_off - (slot / 2), bed_y_off + (slot / 2), -bed_z_dist - slot - 1]) cylinder(d = 4.2, h = bed_z_dist + slot + heatbed_height + 2); #translate([bed_x_off + (slot / 2), heatbed_length - bed_y_off - (slot / 2), -bed_z_dist - slot - 1]) cylinder(d = 4.2, h = bed_z_dist + slot + heatbed_height + 2); #translate([heatbed_width - bed_x_off - (slot / 2), heatbed_length - bed_y_off - (slot / 2), -bed_z_dist - slot - 1]) cylinder(d = 4.2, h = bed_z_dist + slot + heatbed_height + 2); } echo(max_bed_heater_width=heatbed_width - (2 * bed_x_off) - slot - 5); echo(max_bed_heater_length=heatbed_length - (2 * bed_y_off) - slot - 5); } module heatbed() { translate([slot + frame_off_x, slot + frame_off_y, bed_draw_height]) { if (show_heatbed) { %heatbed_plate(); } // t-slots as heatbed frame translate([bed_x_off, bed_y_off, -slot - bed_z_dist]) tslot_y(slot, heatbed_length - (2 * bed_y_off)); translate([heatbed_width - slot - bed_x_off, bed_y_off, -slot - bed_z_dist]) tslot_y(slot, heatbed_length - (2 * bed_y_off)); translate([slot + bed_x_off + slot_off, bed_y_off, -slot - bed_z_dist]) tslot_x(slot, heatbed_width - 2 * (bed_x_off + slot + slot_off)); translate([slot + bed_x_off + slot_off, heatbed_length - slot - bed_y_off, -slot - bed_z_dist]) tslot_x(slot, heatbed_width - 2 * (bed_x_off + slot + slot_off)); translate([bed_x_off + slot, bed_y_off + slot, -slot - bed_z_dist]) rotate([90, 0, 90]) slot_angle_connector(); translate([bed_x_off + slot, heatbed_length - slot - bed_y_off, -slot - bed_z_dist]) rotate([90, 0, 0]) slot_angle_connector(); translate([heatbed_width - slot - bed_x_off, heatbed_length - slot - bed_y_off, -slot - bed_z_dist]) rotate([90, 0, -90]) slot_angle_connector(); translate([heatbed_width - slot - bed_x_off, bed_y_off + slot, -slot - bed_z_dist]) rotate([90, 0, 180]) slot_angle_connector(); } } z_rail_x_off = 60; z_rail_mount_len = 20; module motion_z_rail() { // bottom clamp color("green") translate([slot, 0, slot / 2 + 5 + (z_rail_mount_len - rail_mount_len) / 2]) rotate([-90, 0, 90]) rail_mount(slot, z_rail_dia, z_rail_mount_len); // top clamp color("green") translate([slot, 0, outer_height - slot / 2 + 5 + (z_rail_mount_len - rail_mount_len) / 2 - slot]) rotate([-90, 0, 90]) rail_mount(slot, z_rail_dia, z_rail_mount_len); // rail color("cyan") translate([0, rail_y_off_1 + z_rail_dia / 2, 4]) rail(outer_height - slot - 8, z_rail_dia); } module z_carriage() { echo(bed_screw_len=slot + z_carriage_wall + bed_z_dist + 10); // bracket on t-slot bed frame color("green") translate([frame_off_x + bed_x_off - z_rail_x_off, frame_off_y + bed_y_off - rail_y_off_1 - z_rail_dia / 2, 0]) { // short side bracket on long rail difference() { translate([-z_carriage_wall, -z_carriage_wall, 0]) cube([z_carriage_wall, z_carriage_wall + (2 * slot), slot]); translate([-z_carriage_wall - 1, slot * 3 / 2, slot / 2]) rotate([0, 90, 0]) cylinder(d = 4.4, h = z_carriage_wall + 2); } // short bottom bracket on long rail difference() { translate([-z_carriage_wall, -z_carriage_wall, -z_carriage_wall]) cube([slot + z_carriage_wall, 2 * slot + z_carriage_wall, z_carriage_wall]); translate([slot / 2, slot * 3 / 2, -z_carriage_wall - 1]) cylinder(d = 4.4, h = z_carriage_wall + 2); translate([slot / 2, slot / 2, -z_carriage_wall - 1]) cylinder(d = 4.4, h = z_carriage_wall + 2); } // long side bracket on short rail difference() { translate([0, -z_carriage_wall, 0]) cube([3 * slot, z_carriage_wall, slot]); translate([slot * 5 / 2, -z_carriage_wall - 1, slot / 2]) rotate([-90, 0, 0]) cylinder(d = 4.4, h = z_carriage_wall + 2); } // long bottom bracket on short rail difference() { translate([slot, -z_carriage_wall, -z_carriage_wall]) cube([2 * slot, slot + z_carriage_wall, z_carriage_wall]); translate([slot * 5 / 2, slot / 2, -z_carriage_wall - 1]) cylinder(d = 4.4, h = z_carriage_wall + 2); } } // part around bearing color("green") translate([0, 0, -z_carriage_wall]) difference() { hull() { cylinder(d = lm8uu_outer + 10, h = slot + z_carriage_wall); translate([frame_off_x + bed_x_off - z_rail_x_off - z_carriage_wall, frame_off_y + bed_y_off - rail_y_off_1 - z_rail_dia / 2 - z_carriage_wall, 0]) cube([slot + (2 * z_carriage_wall) + 20, 1, slot + z_carriage_wall]); } // bearing cut out translate([0, 0, -1]) cylinder(d = lm8uu_outer + z_carriage_bearing_dia_add, h = slot + z_carriage_wall + 2); if (z_carriage_use_cable_tie_mount) { // cable-tie bearing mounts for (i = [1 : 3]) translate([0, 0, ((z_carriage_wall + slot) * i / 4) - (cable_tie_width / 2)]) rotate([0, 0, 180]) lm8uu_cable_tie(); // place for cable-tie to hold on to bearing translate([-20, -40 - z_carriage_cabletie_cut_off, -1]) cube([40, 40, z_carriage_wall + slot + 2]); } else { // cut out to slide bearing in translate([-z_carriage_cutout_width / 2, -20, -1]) cube([z_carriage_cutout_width, 20, slot + z_carriage_wall + 2]); } } // linear bearing (long) color("magenta") translate([0, 0, (slot - z_carriage_wall - lm8luu_height) / 2]) %lm8luu(); } module motion_z() { // front left translate([slot + z_rail_x_off, slot, 0]) motion_z_rail(); // front right translate([outer_width - z_rail_x_off - slot, slot, 0]) motion_z_rail(); // back left translate([slot + z_rail_x_off, outer_length - slot, 0]) rotate([0, 0, 180]) motion_z_rail(); // back right translate([outer_width - z_rail_x_off - slot, outer_length - slot, 0]) rotate([0, 0, 180]) motion_z_rail(); // front left translate([slot + z_rail_x_off, slot + rail_y_off_1 + z_rail_dia / 2, bed_draw_height - bed_z_dist - slot]) z_carriage(); // front right translate([outer_width - slot - z_rail_x_off, slot + rail_y_off_1 + z_rail_dia / 2, bed_draw_height - bed_z_dist - slot]) scale([-1, 1, 1]) z_carriage(); // back left translate([slot + z_rail_x_off, outer_length - slot - rail_y_off_1 - z_rail_dia / 2, bed_draw_height - bed_z_dist - slot]) scale([1, -1, 1]) z_carriage(); // back right translate([outer_width - slot - z_rail_x_off, outer_length - slot - rail_y_off_1 - z_rail_dia / 2, bed_draw_height - bed_z_dist - slot]) scale([-1, -1, 1]) z_carriage(); // yellow z-motor on top translate([(outer_width - nema17_size) / 2 - 80, outer_length - slot - nema17_size - nema17_mount_wall, outer_height + nema17_mount_wall]) rotate([180, 0, 90]) { color("yellow") translate([0, 0, -65]) nema17(65); color("green") nema17_mount(slot); // motor pulley color("orange") translate([nema17_size / 2, nema17_size / 2, 10]) gt2_pulley(); } // front left translate([front_z_rail_off, slot, 0]) z_motion_rail_bearing_mount(); // front right translate([outer_width - (rail_bearing_mount_width + (2 * rail_bearing_mount_screw)) - front_z_rail_off, slot, 0]) z_motion_rail_bearing_mount(); // back center translate([(outer_width + (rail_bearing_mount_width + (2 * rail_bearing_mount_screw))) / 2, outer_length - slot, 0]) rotate([0, 0, 180]) z_motion_rail_bearing_mount(slot); // top pulley on back rail color("orange") translate([(outer_width + (rail_bearing_mount_width + (2 * rail_bearing_mount_screw))) / 2 - rail_bearing_mount_off_x, outer_length - slot - rail_bearing_mount_off_y, outer_height - 25]) gt2_pulley(); // belts TODO // front left translate([front_z_rail_off + rail_bearing_mount_off_x, slot + frame_off_y + bed_y_off, bed_draw_height - bed_z_dist - slot]) z_motion_carriage(); // front right translate([outer_width - (rail_bearing_mount_width + (2 * rail_bearing_mount_screw)) - front_z_rail_off + rail_bearing_mount_off_x, slot + frame_off_y + bed_y_off, bed_draw_height - bed_z_dist - slot]) z_motion_carriage(); // back center translate([(outer_width + (rail_bearing_mount_width + (2 * rail_bearing_mount_screw))) / 2 - rail_bearing_mount_off_x, outer_length - slot - frame_off_y - bed_y_off, bed_draw_height - bed_z_dist - slot]) rotate([0, 0, 180]) z_motion_carriage(); } front_z_rail_off = 160; // 608 bearing rail_bearing_dia = 22; rail_bearing_height = 7 * 2; rail_bearing_mount_screw = 10; rail_bearing_mount_height = 20; rail_bearing_mount_dia = rail_bearing_dia + 0.2; rail_bearing_mount_dia_add = 5; rail_bearing_mount_base = 5; rail_bearing_mount_lip_height = 1; rail_bearing_mount_lip_remove = 4; rail_bearing_mount_width_add = 10; rail_bearing_mount_width = rail_bearing_mount_dia + (2 * rail_bearing_mount_width_add); rail_bearing_mount_off_x = rail_bearing_mount_screw + (rail_bearing_mount_width / 2); rail_bearing_mount_off_y = rail_bearing_mount_base + (rail_bearing_mount_dia / 2); z_motion_carriage_width = 45; z_motion_carriage_length = 10; z_motion_carriage_hole_off = 7; z_motion_carriage_block_width = 18; z_motion_carriage_block_length = frame_off_y + bed_y_off - rail_bearing_mount_off_y; module z_motion_carriage() { color("green") translate([-z_motion_carriage_width / 2, -z_motion_carriage_length, 0]) difference() { cube([z_motion_carriage_width, z_motion_carriage_length, slot]); translate([z_motion_carriage_hole_off, -1, slot / 2]) rotate([-90, 0, 0]) cylinder(d = 4.2, h = z_motion_carriage_length + 2); translate([z_motion_carriage_width - z_motion_carriage_hole_off, -1, slot / 2]) rotate([-90, 0, 0]) cylinder(d = 4.2, h = z_motion_carriage_length + 2); } color("red") // TODO! translate([-z_motion_carriage_block_width / 2, -z_motion_carriage_length - z_motion_carriage_block_length, 0]) difference() { cube([z_motion_carriage_block_width, z_motion_carriage_block_length, slot]); // TODO proper m8 / t8 "nut" } } z_motion_rail_off = -5; module z_motion_rail_bearing_mount(off = 0) { // z motion rail color("magenta") translate([rail_bearing_mount_off_x, rail_bearing_mount_off_y, -z_motion_rail_off / 2]) rail(outer_height + z_motion_rail_off, z_rail_dia); // bottom z bearing translate([0, 0, (slot - rail_bearing_mount_height) / 2]) rail_bearing_mount(); // top z bearing translate([0, 0, outer_height - ((slot / 2) + rail_bearing_mount_height / 2 + off)]) rail_bearing_mount(); } module rail_bearing_mount() { $fn = 20; color("green") for(i = [0 : 1]) translate([-rail_bearing_mount_screw + i * (rail_bearing_mount_width + rail_bearing_mount_screw) + rail_bearing_mount_screw, 0, 0]) difference() { cube([rail_bearing_mount_screw, rail_bearing_mount_base, rail_bearing_mount_height]); translate([rail_bearing_mount_screw / 2, -1, rail_bearing_mount_height / 2]) rotate([-90, 0, 0]) cylinder(d = 4.2, h = rail_bearing_mount_base + 2); } color("green") translate([rail_bearing_mount_screw, 0, (rail_bearing_mount_height - rail_bearing_height) / 2]) difference() { hull() { cube([rail_bearing_mount_width, rail_bearing_mount_base, rail_bearing_height]); translate([rail_bearing_mount_width / 2, rail_bearing_mount_base + ((rail_bearing_mount_dia + rail_bearing_mount_dia_add) / 2), 0]) cylinder(d = rail_bearing_mount_dia, h = rail_bearing_height); } translate([rail_bearing_mount_width / 2, rail_bearing_mount_base + rail_bearing_mount_dia / 2, -1]) cylinder(d = rail_bearing_mount_dia, h = rail_bearing_height + 2); } // bottom lip color("blue") translate([rail_bearing_mount_screw, 0, (rail_bearing_mount_height - rail_bearing_height) / 2 - rail_bearing_mount_lip_height]) difference() { hull() { cube([rail_bearing_mount_width, rail_bearing_mount_base, rail_bearing_mount_lip_height]); translate([rail_bearing_mount_width / 2, rail_bearing_mount_base + ((rail_bearing_mount_dia + rail_bearing_mount_dia_add) / 2), 0]) cylinder(d = rail_bearing_mount_dia, h = rail_bearing_mount_lip_height); } translate([rail_bearing_mount_width / 2, rail_bearing_mount_base + rail_bearing_mount_dia / 2, -1]) cylinder(d = rail_bearing_mount_dia - rail_bearing_mount_lip_remove, h = rail_bearing_height + 2); } %translate([rail_bearing_mount_width / 2 + rail_bearing_mount_screw, rail_bearing_mount_base + rail_bearing_mount_dia / 2, (rail_bearing_mount_height - rail_bearing_height) / 2]) difference() { cylinder(d = rail_bearing_dia, h = rail_bearing_height); translate([0, 0, -1]) cylinder(d = z_rail_dia, h = rail_bearing_height + 2); } } // ####################################################### // ###################### Extruders ###################### // ####################################################### module extruders() { w = nema17_size + 25; translate([0, -bracket_height, outer_height - slot]) rotate([0, 0, 90]) { translate([0, -(outer_width + w) / 4, 0]) extruder(slot, "1"); translate([0, -(outer_width + w) / 2, 0]) extruder(slot, "2"); translate([0, -(outer_width + w) * 3 / 4, 0]) extruder(slot, "3"); } } // ######################################################## // ####################### Assembly ####################### // ######################################################## module assembly() { if (show_outer_frame) { frame(); } if (show_xy_motion) { motion_xy(); } if (show_extruders) { extruders(); } if (show_z_motion) { motion_z(); } if (show_heatbed_frame) { heatbed(); } } assembly();