123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
-
- // #######################################################
- // ################### Linear Bearings ###################
- // #######################################################
-
- lm8uu_outer = 15;
- lm8uu_inner = 8;
- lm8uu_height = 24;
- lm8luu_height = 45;
-
- // TODO
- lm10uu_outer = 19;
- lm10uu_inner = 10;
- lm10uu_height = 29;
- lm10luu_height = 55;
-
- // TODO
- lm12uu_outer = 21;
- lm12uu_inner = 12;
- lm12uu_height = 30;
- lm12luu_height = 57;
-
- cable_tie_width = 3.5;
- cable_tie_height = 2.0;
- cable_tie_dia_add = 1.0;
-
- rail_mount_wall = 5;
- rail_mount_len = 10;
- rail_mount_block = 22;
- rail_y_off_1 = 10;
- cutout_width = 0.5;
-
- draw_rail_mount = false;
- draw_bearings = false;
-
- // #######################################################
-
- if (draw_rail_mount) {
- rail_mount(30, 8, 10);
-
- translate([20, 20, 0])
- rail_mount(30, 10, 20);
-
- translate([40, 0, 0])
- rail_mount(30, 12, 10);
- }
-
- if (draw_bearings) {
- lm8uu();
- translate([0, 20, 0])
- lm8luu();
- translate([0, 20, 30])
- lm8uu_cable_tie();
-
- translate([25, 0, 0])
- lm10uu();
- translate([25, 25, 0])
- lm10luu();
- translate([25, 25, 30])
- lm10uu_cable_tie();
-
- translate([55, 0, 0])
- lm12uu();
- translate([55, 30, 0])
- lm12luu();
- translate([55, 30, 30])
- lm12uu_cable_tie();
- }
-
- // #######################################################
-
- function lmXuu_outer(dia) =
- (dia == 8) ? lm8uu_outer :
- ((dia == 10) ? lm10uu_outer :
- ((dia == 12) ? lm12uu_outer : 0));
-
- function lmXuu_height(dia) =
- (dia == 8) ? lm8uu_height :
- ((dia == 10) ? lm10uu_height :
- ((dia == 12) ? lm12uu_height : 0));
-
- module lmXuu(dia) {
- if (dia == 8) {
- lm8uu();
- } else if (dia == 10) {
- lm10uu();
- } else if (dia == 12) {
- lm12uu();
- }
- }
-
- module lmXluu(dia) {
- if (dia == 8) {
- lm8luu();
- } else if (dia == 10) {
- lm10luu();
- } else if (dia == 12) {
- lm12luu();
- }
- }
-
- module lmXuu_cable_tie(dia) {
- if (dia == 8) {
- lm8uu_cable_tie();
- } else if (dia == 10) {
- lm10uu_cable_tie();
- } else if (dia == 12) {
- lm12uu_cable_tie();
- }
- }
-
- module lm8uu() {
- $fn = 15;
- difference() {
- cylinder(d = lm8uu_outer, h = lm8uu_height);
- translate([0, 0, -1])
- cylinder(d = lm8uu_inner, h = lm8uu_height + 2);
- }
- }
-
- module lm8luu() {
- $fn = 15;
- difference() {
- cylinder(d = lm8uu_outer, h = lm8luu_height);
- translate([0, 0, -1])
- cylinder(d = lm8uu_inner, h = lm8luu_height + 2);
- }
- }
-
- module lm8uu_cable_tie() {
- difference() {
- union() {
- cylinder(d = lm8uu_outer + (2 * (cable_tie_height + cable_tie_dia_add)), h = cable_tie_width);
-
- translate([-8.5, 6, 0])
- cube([17, 10, cable_tie_width]);
- }
- translate([0, 0, -1])
- cylinder(d = lm8uu_outer + (2 * cable_tie_dia_add), h = cable_tie_width + 2);
- }
- }
-
-
- module lm10uu() {
- $fn = 15;
- difference() {
- cylinder(d = lm10uu_outer, h = lm10uu_height);
- translate([0, 0, -1])
- cylinder(d = lm10uu_inner, h = lm10uu_height + 2);
- }
- }
-
- module lm10luu() {
- $fn = 15;
- difference() {
- cylinder(d = lm10uu_outer, h = lm10luu_height);
- translate([0, 0, -1])
- cylinder(d = lm10uu_inner, h = lm10luu_height + 2);
- }
- }
-
- module lm10uu_cable_tie() {
- difference() {
- union() {
- cylinder(d = lm10uu_outer + (2 * (cable_tie_height + cable_tie_dia_add)), h = cable_tie_width);
-
- translate([-8.5, 6, 0])
- cube([17, 10, cable_tie_width]);
- }
- translate([0, 0, -1])
- cylinder(d = lm10uu_outer + (2 * cable_tie_dia_add), h = cable_tie_width + 2);
- }
- }
-
- module lm12uu() {
- $fn = 15;
- difference() {
- cylinder(d = lm12uu_outer, h = lm12uu_height);
- translate([0, 0, -1])
- cylinder(d = lm12uu_inner, h = lm12uu_height + 2);
- }
- }
-
- module lm12luu() {
- $fn = 15;
- difference() {
- cylinder(d = lm12uu_outer, h = lm12luu_height);
- translate([0, 0, -1])
- cylinder(d = lm12uu_inner, h = lm12luu_height + 2);
- }
- }
-
- module lm12uu_cable_tie() {
- difference() {
- union() {
- cylinder(d = lm12uu_outer + (2 * (cable_tie_height + cable_tie_dia_add)), h = cable_tie_width);
-
- translate([-8.5, 6, 0])
- cube([17, 10, cable_tie_width]);
- }
- translate([0, 0, -1])
- cylinder(d = lm12uu_outer + (2 * cable_tie_dia_add), h = cable_tie_width + 2);
- }
- }
-
- // #######################################################
-
- module rail_mount(slot, dia, rail_mount_len = rail_mount_len) {
- $fn = 20;
-
- rail_mount_height = rail_y_off_1 + dia;
-
- echo(rail_mount_len=rail_mount_len, rail_dia=dia);
-
- difference() {
- union() {
- // main body
- cube([rail_mount_wall, rail_mount_len, 2 * slot]);
-
- // rail clamp
- translate([rail_mount_wall, 0, ((2 * slot) - rail_mount_block ) / 2])
- cube([rail_mount_height, rail_mount_len, rail_mount_block]);
- }
-
- // M4 slot mounting holes
- translate([-1, rail_mount_len / 2, slot / 2])
- rotate([0, 90, 0])
- cylinder(d = 4.2, h = rail_mount_wall + 2);
- translate([-1, rail_mount_len / 2, slot * 3 / 2])
- rotate([0, 90, 0])
- cylinder(d = 4.2, h = rail_mount_wall + 2);
-
- translate([dia / 2 + rail_y_off_1, -1, slot])
- rotate([-90, 0, 0])
- cylinder(d = dia + 0.1, h = rail_mount_len + 2);
-
- // clamping cutout
- translate([rail_y_off_1 + (dia - cutout_width) / 2, -1, ((2 * slot) - (rail_mount_block + 2)) / 2])
- cube([cutout_width, rail_mount_len + 2, rail_mount_block + 2]);
-
- translate([-1, rail_mount_len / 2, slot + rail_mount_block / 3])
- rotate([0, 90, 0]) {
- cylinder(d = 3.2, h = rail_mount_height + rail_mount_wall + 2);
-
- cylinder(d = 6.1, h = 3.8, $fn = 6);
-
- translate([0, 0, rail_mount_height + rail_mount_wall -2.5])
- cylinder(d = 6.1, h = 3.8);
- }
-
- translate([-1, rail_mount_len / 2, slot - rail_mount_block / 3])
- rotate([0, 90, 0]) {
- cylinder(d = 3.2, h = rail_mount_height + rail_mount_wall + 2);
-
- cylinder(d = 6.1, h = 3.8, $fn = 6);
-
- translate([0, 0, rail_mount_height + rail_mount_wall -2.5])
- cylinder(d = 6.1, h = 3.8);
- }
-
- translate([-10, -10, -22])
- cube([30, rail_mount_len + 20, 30]);
-
- translate([-10, -10, 2 * slot - 8])
- cube([30, rail_mount_len + 20, 30]);
- }
- }
|