Merge pull request #12 from martinbudden/linear_bearings
Added LM16UU and long form (LMxLUU) of linear bearings plus external grooves.
This commit is contained in:
commit
2c77f184a2
|
@ -25,20 +25,41 @@ include <../core.scad>
|
|||
use <../utils/tube.scad>
|
||||
|
||||
bearing_colour = grey70;
|
||||
groove_colour = grey60;
|
||||
seal_colour = grey20;
|
||||
|
||||
|
||||
function bearing_length(type) = type[1]; //! Total length
|
||||
function bearing_dia(type) = type[2]; //! Outside diameter
|
||||
function bearing_rod_dia(type) = type[3]; //! Internal diameter
|
||||
function bearing_groove_length(type) = type[4]; //! Groove length
|
||||
function bearing_groove_dia(type) = type[5]; //! Groove diameter
|
||||
function bearing_groove_spacing(type) = type[6]; //! Spacing between grooves, outer to outer, ie includes the grooves themselves
|
||||
|
||||
function bearing_radius(type) = bearing_dia(type) / 2; //! Outside radius
|
||||
|
||||
module linear_bearing(type) { //! Draw specified linear bearing
|
||||
vitamin(str("linear_bearing(", type[0], "): Linear bearing LM", bearing_rod_dia(type),"UU"));
|
||||
vitamin(str("linear_bearing(", type[0], "): Linear bearing ", type[0]));
|
||||
|
||||
casing_t = bearing_radius(type) / 10;
|
||||
casing_ir = bearing_radius(type) - casing_t;
|
||||
length = bearing_length(type);
|
||||
or = bearing_radius(type);
|
||||
gl = bearing_groove_length(type);
|
||||
gr = bearing_groove_dia(type) / 2;
|
||||
gs = bearing_groove_spacing(type);
|
||||
offset = (length-gs)/2;
|
||||
|
||||
color(bearing_colour) tube(or = bearing_radius(type), ir = casing_ir, h = bearing_length(type));
|
||||
color(seal_colour) tube(or = casing_ir, ir = bearing_rod_dia(type) / 2, h = bearing_length(type) - 0.5);
|
||||
if(gs==0) {
|
||||
color(bearing_colour) tube(or = or, ir = casing_ir, h = length);
|
||||
} else {
|
||||
translate_z(-length/2) {
|
||||
color(bearing_colour) tube(or = or, ir = casing_ir, h = offset, center = false);
|
||||
color(groove_colour) translate_z(offset) tube(or = gr, ir = casing_ir, h = gl,center = false);
|
||||
color(bearing_colour) translate_z(offset+gl) tube(or = or, ir = casing_ir, h = gs-2*gl, center = false);
|
||||
color(groove_colour) translate_z(offset+gs-gl) tube(or = gr, ir = casing_ir, h = gl, center = false);
|
||||
color(bearing_colour) translate_z(offset+gs) tube(or = or, ir = casing_ir, h = offset, center = false);
|
||||
}
|
||||
}
|
||||
color(seal_colour) tube(or = casing_ir, ir = bearing_rod_dia(type) / 2, h = length - 0.5);
|
||||
}
|
||||
|
|
|
@ -20,14 +20,24 @@
|
|||
//
|
||||
// Linear bearings
|
||||
//
|
||||
LM12UU = ["LM12UU", 30, 21, 12];
|
||||
LM10UU = ["LM10UU", 29, 19, 10];
|
||||
LM8UU = ["LM8UU", 24, 15, 8];
|
||||
LM6UU = ["LM6UU", 19, 12, 6];
|
||||
LM5UU = ["LM5UU", 15, 10, 5];
|
||||
LM4UU = ["LM4UU", 12, 8, 4];
|
||||
LM3UU = ["LM3UU", 10, 7, 3];
|
||||
// L od id gl gd gs
|
||||
LM16UU = ["LM16UU", 37, 28, 16, 1.6, 27.0, 26.5];
|
||||
LM16LUU = ["LM16LUU", 70, 28, 16, 1.6, 27.0, 53.0];
|
||||
LM12UU = ["LM12UU", 30, 21, 12, 1.3, 20.0, 23.0];
|
||||
LM12LUU = ["LM12LUU", 57, 21, 12, 1.3, 20.0, 46.0];
|
||||
LM10UU = ["LM10UU", 29, 19, 10, 1.3, 18.0, 22.0];
|
||||
LM10LUU = ["LM10LUU", 55, 19, 10, 1.3, 18.0, 44.0];
|
||||
LM8UU = ["LM8UU", 24, 15, 8, 1.1, 14.3, 17.5];
|
||||
LM8LUU = ["LM8LUU", 45, 15, 8, 1.1, 14.3, 35.0];
|
||||
LM6UU = ["LM6UU", 19, 12, 6, 1.1, 11.5, 13.5];
|
||||
LM6LUU = ["LM6LUU", 35, 12, 6, 1.1, 11.5, 27.0];
|
||||
LM5UU = ["LM5UU", 15, 10, 5, 1.1, 9.5, 10.2];
|
||||
LM5LUU = ["LM5LUU", 28, 10, 5, 1.1, 9.5, 20.4];
|
||||
LM4UU = ["LM4UU", 12, 8, 4, 0, 0, 0];
|
||||
LM4LUU = ["LM4LUU", 23, 8, 4, 0, 0, 0];
|
||||
LM3UU = ["LM3UU", 10, 7, 3, 0, 0, 0];
|
||||
LM3LUU = ["LM3LUU", 19, 7, 3, 0, 0, 0];
|
||||
|
||||
linear_bearings = [LM3UU, LM4UU, LM5UU, LM6UU, LM8UU, LM10UU, LM12UU];
|
||||
linear_bearings = [LM3UU, LM4UU, LM5UU, LM6UU, LM8UU, LM10UU, LM12UU, LM16UU, LM3LUU, LM4LUU, LM5LUU, LM6LUU, LM8LUU, LM10LUU, LM12LUU, LM16LUU];
|
||||
|
||||
use <linear_bearing.scad>
|
||||
|
|
Loading…
Reference in New Issue