// ####################################################### // ######################## Idler ######################## // ####################################################### // 624 bearing: 13x4x5 bearing_outer = 13; bearing_inner = 4; bearing_height = 5; idler_outer_height = 7; idler_dia = 15; idler_ramp_dia = 16; belt_height = 6; dia_off = 0.1; ramp_step_size = 0.05; idler_dist = 0.1; spacer_size_add = 2; bearing_height_diff = belt_height - bearing_height; idler_ramp_add = (idler_outer_height - belt_height) / 2; spacer_height = idler_outer_height - bearing_height + idler_dist; bearing_spacer_height = (spacer_height - (idler_outer_height - bearing_height) / 2) * 2 + (idler_outer_height) * 2 + idler_dist; module bearing_624() { $fn = 15; difference() { cylinder(d = bearing_outer, h = bearing_height); translate([0, 0, -1]) cylinder(d = 4, h = bearing_height + 2); translate([0, 0, bearing_height - 0.5]) difference() { cylinder(d = bearing_outer - 2, h = 2); cylinder(d = bearing_inner + 2, h = 2); } translate([0, 0, -1.5]) difference() { cylinder(d = bearing_outer - 2, h = 2); cylinder(d = bearing_inner + 2, h = 2); } } } module bearing_idler() { $fn = 30; translate([0, 0, idler_ramp_add]) { %translate([0, 0, bearing_height_diff / 2]) bearing_624(); color("yellow") difference() { cylinder(d = idler_dia, h = belt_height); translate([0, 0, -1]) cylinder(d = bearing_outer + dia_off, h = belt_height + 2); } color("yellow") for (i = [ramp_step_size : ramp_step_size : idler_ramp_add]) { difference() { union() { translate([0, 0, belt_height + i - ramp_step_size]) cylinder(d = idler_dia + (i * 4 * (idler_ramp_dia - idler_dia)), h = ramp_step_size); translate([0, 0, ramp_step_size - i]) cylinder(d = idler_dia + (i * 4 * (idler_ramp_dia - idler_dia)), h = ramp_step_size); } translate([0, 0, -1]) cylinder(d = bearing_outer + dia_off, h = belt_height + 2); } } } } module bearing_spacer(h = spacer_height, add_dia = 0, remove_dia = 0, enclose = false, enclose_size_add = 0) { $fn = 30; siz = bearing_inner + spacer_size_add + add_dia; difference() { hull() { if (enclose) { translate([-siz / 2, -(siz + enclose_size_add) / 2, 0]) cube([siz, siz + enclose_size_add, 1]); } cylinder(d = siz, h = h); } translate([0, 0, -1]) cylinder(d = bearing_inner + dia_off - remove_dia, h = h + 2); } } module bearing_spacer_assembly(only_outer, top) { translate([0, 0, spacer_height - (idler_outer_height - bearing_height) / 2]) { if ((!only_outer) || top) { color("magenta") translate([0, 0, -spacer_height + (idler_outer_height - bearing_height) / 2]) bearing_spacer(); } if (!only_outer) { bearing_idler(); color("magenta") translate([0, 0, idler_outer_height - (idler_outer_height - bearing_height) / 2]) bearing_spacer(); translate([0, 0, (2 * idler_outer_height) + idler_dist]) rotate([0, 180, 0]) bearing_idler(); } if ((!only_outer) || (!top)) { color("magenta") translate([0, 0, (2 * idler_outer_height) + idler_dist - (idler_outer_height - bearing_height) / 2]) bearing_spacer(); } } //echo(bearings_spacers_height=bearing_spacer_height); } bearing_mount_wall = 8; bearing_mount_width = 15; idler_distance = 3; idler_off_z = 0.5; module slot_mount_bracket(slot, preview) { $fn = 15; color("green") translate([0, 0, slot]) difference() { cube([slot, bearing_mount_width, bearing_mount_wall]); translate([slot / 2, bearing_mount_width / 2, -1]) cylinder(d = 4.2, h = bearing_mount_wall + 2); } color("green") translate([slot, 0, 0]) difference() { cube([bearing_mount_wall, bearing_mount_width, slot + bearing_mount_wall]); translate([-1, bearing_mount_width / 2, slot / 2]) rotate([0, 90, 0]) cylinder(d = 4.2, h = bearing_mount_wall + 2); } difference() { bearing_appendage(slot, preview); translate([slot + bearing_mount_wall + idler_ramp_dia / 2 + idler_distance, bearing_mount_width / 2, -5]) cylinder(d = 4.2, h = slot + (2 * bearing_mount_wall) + 2); } } module bearing_appendage(slot, preview) { color("green") translate([slot + bearing_mount_wall, 0, slot]) hull() { cube([1, bearing_mount_width, bearing_mount_wall]); translate([idler_ramp_dia / 2 + idler_distance, bearing_mount_width / 2, 0]) cylinder(d = bearing_inner + spacer_size_add, h = bearing_mount_wall); } translate([slot + bearing_mount_wall + idler_ramp_dia / 2 + idler_distance, bearing_mount_width / 2, slot - bearing_spacer_height + idler_off_z]) { bearing_spacer_assembly(true, false); bearing_spacer_assembly(true, true); if (preview) { bearing_spacer_assembly(false); } } color("green") translate([slot + bearing_mount_wall, 0, 0]) { hull() { cube([1, bearing_mount_width, bearing_mount_wall]); translate([idler_ramp_dia / 2 + idler_distance, bearing_mount_width / 2, 0]) cylinder(d = bearing_inner + spacer_size_add, h = bearing_mount_wall); } translate([idler_ramp_dia / 2 + idler_distance, bearing_mount_width / 2, bearing_mount_wall]) cylinder(d = bearing_inner + spacer_size_add, h = 7); } } //bearing_idler(); //slot_mount_bracket(30, true);