123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886 |
-
- include <bearing_idler.scad>
- include <linear_rail.scad>
- include <e3d_v6_all_metall_hotend.scad>
-
- // #######################################################
- // #################### X-Y Carriages ####################
- // #######################################################
-
- x_rail_dia = 10;
- y_rail_dia = 12;
-
- x_rail_dist = 70;
-
- lmXuu_dia_add = 0.5;
- lmXuu_len_add = 1.0;
- rail_dia_add = 3.0;
-
- y_carriage_wall = 2 + y_rail_dia; // 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 = 12;
- 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;
-
- // y-carriage belt idlers
- idler_a_blue = [ 19, 15, 5.5 - (y_rail_dia - 8)];
- idler_a_red = [ 19, x_rail_dist + 15, 12.5 - (y_rail_dia - 8)];
- idler_b_blue = [30.3, x_rail_dist + 15, 12.5 - (y_rail_dia - 8)];
- idler_b_red = [30.3, 15, 5.5 - (y_rail_dia - 8)];
-
- e3d_v6_dist_x = 23 + 5;
- e3d_v6_dist_y = 18 + 1;
- e3d_v6_z_off = 13;
-
- 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;
-
- fan_mount_wall = 5;
- fan_mount_inset = 6;
- fan_mount_hole_inset = 8;
- fan_width = 40;
- fan_height = 20;
- fan_hole_off = 3.9;
-
- universal_mount_hole_off = 6;
-
- nut_cut_width = 5.7;
- nut_cut_depth = 2.6;
- nut_cut_off = 3.2;
- nut_cut_height = 20;
-
- sensor_mount_width_add = 8;
- sensor_mount_wall = 4;
- sensor_mount_y_offset = -1;
- sensor_mount_height = 8;
- sensor_dia = 19;
- sensor_dia_add = 6;
-
- sensor_mount_width = (2 * universal_mount_hole_off) + sensor_mount_width_add;
-
- draw_x_carriage = false;
- draw_e3d_fan_duct = false;
- draw_radial_fan = false;
- draw_bed_sensor = false;
- draw_e3d_hotends = false;
-
- draw_y_carriage = false;
- draw_y_carriage_idlers = true;
- draw_rail_len = 220;
-
- print_x_carriage = false;
- print_x_carriage_clamps = false;
- print_e3d_mount = false;
- print_e3d_fans = false;
- print_fan_mount = false;
- print_sensor_mount = false;
-
- print_y_carriage_a = false;
- print_y_carriage_b = false;
- print_y_carriage_a_clamps = false;
- print_y_carriage_b_clamps = false;
-
- module nut_cut() {
- translate([-nut_cut_width / 2, 2, nut_cut_off - nut_cut_height]) {
- cube([nut_cut_width, nut_cut_depth, nut_cut_height]);
- translate([nut_cut_width / 2, -5, nut_cut_height - nut_cut_off])
- rotate([-90, 0, 0])
- cylinder(d = 3.2, h = nut_cut_depth + 5);
- }
- }
-
- 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(x_rail_dia, y_rail_dia, idler_a = [0, 0, 0], idler_b = [0, 0, 0], block = true, clamp = true) {
- $fn = 20;
-
- // attaching to x-rails
- translate([y_carriage_width, 0, -y_carriage_block_height])
- difference() {
- union() {
- color("green")
- cube([x_rail_mount_width, y_carriage_length, y_carriage_block_height + y_carriage_wall]);
-
- // idlers for the corexy belts
- translate([-y_carriage_width, 0, y_carriage_wall + y_carriage_block_height]) {
- if (draw_y_carriage_idlers) {
- %translate(idler_a)
- bearing_idler();
-
- %translate(idler_b)
- bearing_idler();
- }
-
- generate_spacer(idler_a);
- generate_spacer(idler_b);
- }
- }
-
- if (!block) {
- translate([-y_carriage_width, 0, 0])
- cube([y_carriage_width, y_carriage_length, 100]);
-
- translate([0, 0, -10])
- cube([y_carriage_width, y_carriage_length, 20]);
- }
-
- translate([0, -1, y_carriage_block_height])
- cube([x_rail_cutout_z, y_carriage_length + 2, y_carriage_wall + 1]);
-
- if (clamp) {
- 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]);
- } else {
- translate([0, -1, y_carriage_block_height - (x_rail_cutout_x / 2)])
- cube([y_carriage_block_width + 1, y_carriage_length + 2, 100]);
- }
-
- 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 = x_rail_dia + 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
- if (block)
- 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([(lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
- rotate([-90, 0, 0]) {
- translate([0, 0, -1])
- cylinder(d = y_rail_dia + rail_dia_add, h = y_carriage_length + 2);
-
- translate([0, 0, y_carriage_rail_support - lmXuu_len_add / 2])
- cylinder(d = lmXuu_outer(y_rail_dia) + lmXuu_dia_add, h = lmXuu_height(y_rail_dia) + lmXuu_len_add);
-
- translate([0, 0, y_carriage_length - lmXuu_height(y_rail_dia) - y_carriage_rail_support - lmXuu_len_add / 2])
- cylinder(d = lmXuu_outer(y_rail_dia) + lmXuu_dia_add, h = lmXuu_height(y_rail_dia) + lmXuu_len_add);
- }
-
- translate([(lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
- rotate([90, 0, 0]) {
- translate([0, 0, -11])
- lmXuu_cable_tie(y_rail_dia);
-
- translate([0, 0, -20])
- lmXuu_cable_tie(y_rail_dia);
-
- translate([0, 0, -83])
- lmXuu_cable_tie(y_rail_dia);
-
- translate([0, 0, -92])
- lmXuu_cable_tie(y_rail_dia);
- }
- }
-
- if (block)
- color("magenta")
- translate([(lmXuu_outer(y_rail_dia) + lmXuu_dia_add) / 2 + y_carriage_rail_support, 0, 0])
- rotate([-90, 0, 0]) {
- // y-bearings
- %translate([0, 0, y_carriage_rail_support])
- lmXuu(y_rail_dia);
- %translate([0, 0, y_carriage_length - lmXuu_height(y_rail_dia) - y_carriage_rail_support])
- lmXuu(y_rail_dia);
- }
- }
-
- 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, block, clamp) {
- $fn = 15;
-
- if (block)
- 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 (clamp) {
- 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(block=true, clamp=true) {
- translate([0, x_carriage_belt_off, 0])
- belt_mount(false, true, block, clamp);
-
- translate([0, x_carriage_length - x_carriage_belt_off - x_carriage_belt_block_length, 0])
- belt_mount(true, false, block, clamp);
-
- translate([x_carriage_width - x_carriage_belt_block_width, x_carriage_belt_off, 0])
- belt_mount(true, true, block, clamp);
-
- 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, block, clamp);
- }
-
- module x_carriage(x_rail_dia, with_body=true, with_tool=true, with_clamps=true, with_fan=true, with_cool=true, with_sensor=true) {
- $fn = 20;
-
- if (!with_body) {
- if (with_clamps) {
- translate([0, 0, x_carriage_wall])
- belt_mounts(with_body, with_clamps);
- }
- }
-
- if (with_body)
- difference() {
- union() {
- if (with_body) {
- 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(with_body, with_clamps);
- }
-
- // 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([lmXuu_height(x_rail_dia) + x_carriage_bearing_off + (i * (x_carriage_width - (2 * x_carriage_bearing_off) - lmXuu_height(x_rail_dia))), 0, ])
- rotate([0, -90, 0]) {
- // x-bearings
- color("magenta")
- %translate([0, x_carriage_len_add, 0])
- lmXuu(x_rail_dia);
-
- color("magenta")
- %translate([0, x_rail_dist + x_carriage_len_add, 0])
- lmXuu(x_rail_dia);
-
- color("green")
- translate([0, x_carriage_len_add, 0])
- cylinder(d = lmXuu_outer(x_rail_dia) + lmXuu_dia_add, h = lmXuu_height(x_rail_dia) + lmXuu_len_add);
-
- color("green")
- translate([0, x_rail_dist + x_carriage_len_add, 0])
- cylinder(d = lmXuu_outer(x_rail_dia) + lmXuu_dia_add, h = lmXuu_height(x_rail_dia) + lmXuu_len_add);
-
- color("green")
- translate([0, x_carriage_len_add, -x_carriage_width])
- cylinder(d = x_rail_dia + rail_dia_add, h = x_carriage_width * 2);
-
- color("green")
- translate([0, x_rail_dist + x_carriage_len_add, -x_carriage_width])
- cylinder(d = x_rail_dia + rail_dia_add, h = x_carriage_width * 2);
- }
- }
-
- // bearing cable tie mount front
- translate([8, x_carriage_len_add, 0])
- rotate([90, 0, 90])
- lmXuu_cable_tie(x_rail_dia);
- translate([18, x_carriage_len_add, 0])
- rotate([90, 0, 90])
- lmXuu_cable_tie(x_rail_dia);
- translate([58, x_carriage_len_add, 0])
- rotate([90, 0, 90])
- lmXuu_cable_tie(x_rail_dia);
- translate([68, x_carriage_len_add, 0])
- rotate([90, 0, 90])
- lmXuu_cable_tie(x_rail_dia);
-
- // bearing cable tie mount back
- translate([8, x_carriage_len_add + x_rail_dist, 0])
- rotate([90, 0, 90])
- lmXuu_cable_tie(x_rail_dia);
- translate([18, x_carriage_len_add + x_rail_dist, 0])
- rotate([90, 0, 90])
- lmXuu_cable_tie(x_rail_dia);
- translate([58, x_carriage_len_add + x_rail_dist, 0])
- rotate([90, 0, 90])
- lmXuu_cable_tie(x_rail_dia);
- translate([68, x_carriage_len_add + x_rail_dist, 0])
- rotate([90, 0, 90])
- lmXuu_cable_tie(x_rail_dia);
-
- /* mounting for hotend / tool */
-
- // 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, x_carriage_len_add + 9, -1])
- cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12);
- // top mounting screw
- translate([x_carriage_width / 2, x_carriage_length - x_carriage_len_add - 9, -1])
- cylinder(d = e3d_hole_dia, h = x_carriage_wall + 12);
-
- // fan mount attachment holes on left side
- translate([-fan_mount_wall - 1, ((x_carriage_length - fan_width) / 2) + fan_mount_hole_inset, x_carriage_wall / 2])
- rotate([0, 90, 0])
- cylinder(d = 3.2, h = ((x_carriage_width - x_cutout_width) / 2) + fan_mount_wall + 2);
- translate([-fan_mount_wall - 1, ((x_carriage_length + fan_width) / 2) - fan_mount_hole_inset, x_carriage_wall / 2])
- rotate([0, 90, 0])
- cylinder(d = 3.2, h = ((x_carriage_width - x_cutout_width) / 2) + fan_mount_wall + 2);
-
- // fan mount attachment holes on right side
- translate([((x_carriage_width + x_cutout_width) / 2) - 1, ((x_carriage_length - fan_width) / 2) + fan_mount_hole_inset, x_carriage_wall / 2])
- rotate([0, 90, 0])
- cylinder(d = 3.2, h = ((x_carriage_width - x_cutout_width) / 2) + fan_mount_wall + 2);
- translate([((x_carriage_width + x_cutout_width) / 2) - 1, ((x_carriage_length + fan_width) / 2) - fan_mount_hole_inset, x_carriage_wall / 2])
- rotate([0, 90, 0])
- cylinder(d = 3.2, h = ((x_carriage_width - x_cutout_width) / 2) + fan_mount_wall + 2);
-
- // universal add-on mounting on front
- translate([(x_carriage_width / 2) + universal_mount_hole_off, 0, x_carriage_wall / 2])
- rotate([0, 180, 0])
- nut_cut();
- translate([(x_carriage_width / 2) - universal_mount_hole_off, 0, x_carriage_wall / 2])
- rotate([0, 180, 0])
- nut_cut();
-
- // universal add-on mounting on back
- translate([(x_carriage_width / 2) + universal_mount_hole_off, x_carriage_length, x_carriage_wall / 2])
- rotate([0, 180, 180])
- nut_cut();
- translate([(x_carriage_width / 2) - universal_mount_hole_off, x_carriage_length, x_carriage_wall / 2])
- rotate([0, 180, 180])
- nut_cut();
- }
-
- if (with_sensor) {
- translate([(x_carriage_width - sensor_mount_width) / 2, -sensor_mount_wall, 0])
- sensor_mount();
- }
-
- if (with_cool) {
- translate([(x_carriage_width - sensor_mount_width) / 2, x_carriage_length, 0]) {
- radial_fan_mount(true);
-
- translate([0, 15 + sensor_mount_wall, 0])
- radial_fan_mount(false);
- }
- }
-
- e3d_v6_triple_mount(with_tool, with_fan);
- }
-
- module radial_fan_mount(with_fan = true) {
- $fn = 15;
-
- color("yellow")
- universal_mount_plate();
-
- for (i = [0 : 52 + sensor_mount_width : 52 + sensor_mount_width])
- translate([i, 0, 0]) {
- color("yellow")
- translate([-52, 0, 0])
- cube([52, sensor_mount_wall, x_carriage_wall]);
-
- color("yellow")
- translate([-9, 0, x_carriage_wall])
-
- difference() {
- cube([9, sensor_mount_wall, 13]);
- translate([4.5, -1, 9])
- rotate([-90, 0, 0])
- cylinder(d = 4.2, h = sensor_mount_wall + 2);
- }
-
- color("yellow")
- translate([-52, 0, -23])
- difference() {
- cube([9, sensor_mount_wall, 23]);
- translate([4.5, -1, 4])
- rotate([-90, 0, 0])
- cylinder(d = 4.2, h = sensor_mount_wall + 2);
- }
-
- if (draw_radial_fan && with_fan) {
- // 5015 fan mockup
- %color("gray")
- translate([-(x_carriage_width - sensor_mount_width) / 2 + 4, sensor_mount_wall, 0])
- rotate([90, 0, 180])
- fan_5015();
- }
- }
- }
-
- module fan_5015() {
- // adapted from https://www.thingiverse.com/thing:1383913
- $fn=30;
- difference() {
- union() {
- hull() {
- translate([0.5, 0, 0]) cylinder(d=50, h=15);
- translate([-1, 0, 0]) cylinder(d=50, h=15);
- }
- hull() {
- translate([-43/2, 38/2, 0]) cylinder(d=7, h=15);
- translate([43/2, -38/2, 0]) cylinder(d=7, h=15);
- }
- translate([-26, -26, 0]) cube([20,26,15]);
- }
- difference() {
- union() {
- translate([-26+16+11,-2,1]) cylinder(d=32, h=15);
- translate([0,0,1]) hull(){
- translate([0.5, 0]) cylinder(d=48, h=13);
- translate([-1, 0]) cylinder(d=48, h=13);
- }
- translate([-25,-27,1]) cube([18,25,13]);
- }
- translate([-26+16+11,-2,1]) cylinder(d=24, h=15);
- }
- translate([-43/2, 38/2, -1]) cylinder(d=4.4, h=17);
- translate([43/2, -38/2, -1]) cylinder(d=4.4, h=17);
- }
- }
-
- module universal_mount_plate() {
- $fn = 20;
- difference() {
- cube([sensor_mount_width, sensor_mount_wall, x_carriage_wall]);
-
- translate([sensor_mount_width_add / 2, -1, x_carriage_wall / 2])
- rotate([-90, 0, 0])
- cylinder(d = 3.2, h = sensor_mount_wall + 2);
-
- translate([(universal_mount_hole_off * 2) + (sensor_mount_width_add / 2), -1, x_carriage_wall / 2])
- rotate([-90, 0, 0])
- cylinder(d = 3.2, h = sensor_mount_wall + 2);
- }
- }
-
- module sensor_mount() {
- $fn = 30;
-
- color("yellow")
- universal_mount_plate();
-
- color("yellow")
- translate([sensor_mount_width / 2, -(sensor_dia + sensor_dia_add) / 2, -sensor_mount_height])
- difference() {
- hull() {
- translate([-sensor_mount_width / 2, (sensor_dia + sensor_dia_add) / 2, 0])
- cube([sensor_mount_width, sensor_mount_wall, sensor_mount_height]);
-
- translate([0, sensor_mount_y_offset, 0])
- cylinder(d = sensor_dia + sensor_dia_add, h = sensor_mount_height);
- }
-
- translate([0, sensor_mount_y_offset, -1])
- cylinder(d = sensor_dia, h = sensor_mount_height + 2);
- }
-
- if (draw_bed_sensor) {
- // sensor mockup
- %translate([sensor_mount_width / 2, -(sensor_dia + sensor_dia_add) / 2 + sensor_mount_y_offset, -22]) {
- color("gray")
- cylinder(d = 18.2, h = 55);
-
- color("orange")
- translate([0, 0, -10])
- cylinder(d = 18.2, h = 10);
- }
- }
- }
-
- module e3d_v6_triple_mount(with_tool, with_fan) {
- if (draw_e3d_hotends && with_tool)
- 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();
- }
-
- echo(m3_screw_len=e3d_clamp_length + (2 * e3d_clamp_b_length));
-
- // hotend clamp center piece
- if (with_tool)
- 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]);
- }
-
- // cable holes
- translate([9.5, 6, -1])
- cylinder(d = 7, h = e3d_clamp_height + 2);
- translate([e3d_clamp_width - 9.5, 6, -1])
- cylinder(d = 7, h = e3d_clamp_height + 2);
-
- // 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);
- }
-
- if (with_fan) {
- e3d_v6_triple_fan();
- }
- }
-
- module simple_fan() {
- difference() {
- cube([fan_height, fan_width, fan_width]);
- translate([-1, fan_width / 2, fan_width / 2])
- rotate([0, 90, 0])
- cylinder(d = fan_width - 5, h = fan_height + 2);
- }
- }
-
- module fan_mount() {
- difference() {
- cube([fan_mount_wall, fan_width, fan_width + x_carriage_wall]);
-
- translate([-1, fan_mount_inset, fan_mount_inset])
- cube([fan_mount_wall + 2, fan_width - (fan_mount_inset * 2), fan_width - (fan_mount_inset * 2)]);
- }
- }
-
- module e3d_v6_triple_fan() {
- difference() {
- union() {
- translate([x_carriage_width, (x_carriage_length - fan_width) / 2, -fan_width]) {
- // hotend cooling fan on right side
- %translate([fan_mount_wall, 0, 0])
- simple_fan();
-
- // hotend cooling fan on left side
- %translate([-x_carriage_width - fan_height - fan_mount_wall, 0, 0])
- simple_fan();
-
- // fan mount on right side
- color("orange")
- fan_mount();
-
- // fan mount on left side
- color("orange")
- translate([-x_carriage_width - fan_mount_wall, 0, 0])
- fan_mount();
- }
-
- // fan duct
- if (draw_e3d_fan_duct) {
- color("orange")
- translate([x_carriage_width, (x_carriage_length - fan_width) / 2, 0])
- difference() {
- fan_duct(fan_width, 0);
- fan_duct(fan_width, 3);
- }
- }
- }
-
- // mounting holes on carriage
- translate([-fan_mount_wall - fan_height - 1, x_carriage_length / 2, x_carriage_wall / 2])
- for (i = [-1 : 2 : 1]) {
- translate([0, i * ((fan_width / 2) - fan_mount_hole_inset), 0])
- rotate([0, 90, 0])
- cylinder(d = 3.2, h = x_carriage_width + (2 * (fan_height + fan_mount_wall + 1)));
- }
-
- // fan holes (self-tapping)
- translate([-fan_mount_wall - fan_height - 1, x_carriage_length / 2, -fan_width / 2])
- for (i = [-1 : 2 : 1]) {
- for (j = [-1 : 2 : 1]) {
- translate([0, i * ((fan_width / 2) - fan_hole_off), j * ((fan_width / 2) - fan_hole_off)])
- rotate([0, 90, 0])
- cylinder(d = 2.7, h = fan_height + fan_mount_wall + 5);
- translate([fan_height + fan_mount_wall + x_carriage_width - 3, i * ((fan_width / 2) - fan_hole_off), j * ((fan_width / 2) - fan_hole_off)])
- rotate([0, 90, 0])
- cylinder(d = 2.7, h = fan_height + fan_mount_wall + 5);
- }
- }
- }
- }
-
- module fan_duct(fan_width, diff) {
- size = fan_width - diff;
- off = (fan_width - size) / 2;
- difference() {
- translate([0, off, -size - off]) {
- hull() {
- cube([1 + (diff / 10), size, size]);
- translate([-10, 0, 10])
- cube([1, size, size - 11]);
- }
- hull() {
- translate([-10, 0, 10])
- cube([1, size, size - 11]);
- translate([-15, -6, 17])
- cube([1, size + 12, size - 18]);
- }
- hull() {
- translate([-15, -6, 17])
- cube([1, size + 12, size - 18]);
- translate([-25, -6, 17])
- cube([1, size + 12, size - 20]);
- }
- hull() {
- translate([-25, -6, 17])
- cube([1, size + 12, size - 20]);
- translate([-55, -6, 17])
- cube([1, size + 12, size - 20]);
- }
- hull() {
- translate([-55, -6, 17])
- cube([1, size + 12, size - 20]);
- translate([-70, 15 - 10, 17])
- cube([1, size - 12 + 10, size - 20]);
- }
- hull() {
- translate([-70, 15 - 10, 17])
- cube([1, size - 12 + 10, size - 20]);
-
- translate([-80 - (off / 10), 0, 0])
- cube([1 + (off / 10), size, size]);
- }
- }
-
- translate([-26, 29.5, -size - 20])
- cylinder(d = e3d_max_dia + 3 - diff, h = 100);
- translate([-26 - e3d_v6_dist_x, 29.5, -size - 20])
- cylinder(d = e3d_max_dia + 3 - diff, h = 100);
- translate([-26 - e3d_v6_dist_x / 2, 29.5 - e3d_v6_dist_y, -size - 20])
- cylinder(d = e3d_max_dia + 3 - diff, h = 100);
- }
- }
-
- if (print_x_carriage) {
- x_carriage(x_rail_dia, true, false, false, false, false, false);
- }
-
- if (print_x_carriage_clamps) {
- x_carriage(x_rail_dia, false, false, true, false, false, false);
- }
-
- if (print_e3d_mount) {
- x_carriage(x_rail_dia, false, true, false, false, false, false);
- }
-
- if (print_e3d_fans) {
- x_carriage(x_rail_dia, false, false, false, true, false, false);
- }
-
- if (print_fan_mount) {
- x_carriage(x_rail_dia, false, false, false, false, true, false);
- }
-
- if (print_sensor_mount) {
- x_carriage(x_rail_dia, false, false, false, false, false, true);
- }
-
- if (print_y_carriage_a || print_y_carriage_a_clamps) {
- y_carriage(x_rail_dia, y_rail_dia, idler_a_blue, idler_b_blue, print_y_carriage_a, print_y_carriage_a_clamps);
- }
-
- if (print_y_carriage_b || print_y_carriage_b_clamps) {
- y_carriage(x_rail_dia, y_rail_dia, idler_a_red, idler_b_red, print_y_carriage_b, print_y_carriage_b_clamps);
- }
-
- if (draw_y_carriage) {
- // 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 = x_rail_dia, h = draw_rail_len);
- }
-
- y_carriage(x_rail_dia, y_rail_dia, 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(x_rail_dia, y_rail_dia, idler_a_red, idler_b_red);
-
- if (draw_x_carriage) {
- translate([y_carriage_width + y_carriage_block_width + ((draw_rail_len - x_carriage_width - fan_height) / 2), y_carriage_len_add - x_carriage_len_add, 0])
- x_carriage(x_rail_dia);
- }
- } else if (draw_x_carriage) {
- x_carriage(x_rail_dia);
- }
|