2017-08-30 00:00:16 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
2019-03-23 04:13:18 +00:00
|
|
|
// LibFile: linear_bearings.scad
|
2022-09-20 03:18:25 +00:00
|
|
|
// Mounts and models for LMxUU style linear bearings.
|
2021-01-05 09:20:01 +00:00
|
|
|
// Includes:
|
2019-04-19 07:25:10 +00:00
|
|
|
// include <BOSL2/std.scad>
|
|
|
|
// include <BOSL2/linear_bearings.scad>
|
2021-12-13 23:48:30 +00:00
|
|
|
// FileGroup: Parts
|
|
|
|
// FileSummary: Mounts for LMxUU style linear bearings.
|
2017-08-30 00:00:16 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
2022-09-20 03:18:25 +00:00
|
|
|
// Section: Generic Linear Bearings
|
2017-08-30 00:00:16 +00:00
|
|
|
|
2019-03-23 04:13:18 +00:00
|
|
|
// Module: linear_bearing_housing()
|
|
|
|
// Description:
|
|
|
|
// Creates a model of a clamp to hold a generic linear bearing cartridge.
|
|
|
|
// Arguments:
|
2017-08-30 00:00:16 +00:00
|
|
|
// d = Diameter of linear bearing. (Default: 15)
|
|
|
|
// l = Length of linear bearing. (Default: 24)
|
|
|
|
// tab = Clamp tab height. (Default: 7)
|
|
|
|
// tabwall = Clamp Tab thickness. (Default: 5)
|
|
|
|
// wall = Wall thickness of clamp housing. (Default: 3)
|
|
|
|
// gap = Gap in clamp. (Default: 5)
|
|
|
|
// screwsize = Size of screw to use to tighten clamp. (Default: 3)
|
2021-11-20 03:33:16 +00:00
|
|
|
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
|
|
|
|
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0`
|
|
|
|
// orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP`
|
2018-11-26 03:38:41 +00:00
|
|
|
// Example:
|
|
|
|
// linear_bearing_housing(d=19, l=29, wall=2, tab=6, screwsize=2.5);
|
2019-05-26 06:31:05 +00:00
|
|
|
module linear_bearing_housing(d=15, l=24, tab=7, gap=5, wall=3, tabwall=5, screwsize=3, anchor=BOTTOM, spin=0, orient=UP)
|
2017-08-30 00:00:16 +00:00
|
|
|
{
|
2020-05-30 02:04:34 +00:00
|
|
|
od = d+2*wall;
|
|
|
|
ogap = gap+2*tabwall;
|
|
|
|
tabh = tab/2+od/2*sqrt(2)-ogap/2;
|
|
|
|
h = od+tab/2;
|
|
|
|
anchors = [
|
2021-09-16 22:32:12 +00:00
|
|
|
named_anchor("axis", [0,0,-tab/2/2]),
|
|
|
|
named_anchor("screw", [0,2-ogap/2,tabh-tab/2/2],FWD),
|
|
|
|
named_anchor("nut", [0,ogap/2-2,tabh-tab/2/2],FWD)
|
2020-05-30 02:04:34 +00:00
|
|
|
];
|
|
|
|
attachable(anchor,spin,orient, size=[l, od, h], anchors=anchors) {
|
|
|
|
down(tab/2/2)
|
|
|
|
difference() {
|
|
|
|
union() {
|
|
|
|
// Housing
|
|
|
|
zrot(90) teardrop(r=od/2,h=l);
|
|
|
|
|
|
|
|
// Base
|
|
|
|
cube([l,od,od/2], anchor=TOP);
|
|
|
|
|
|
|
|
// Tabs
|
|
|
|
cube([l,ogap,od/2+tab/2], anchor=BOTTOM);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Clear bearing space
|
|
|
|
zrot(90) teardrop(r=d/2,h=l+0.05);
|
|
|
|
|
|
|
|
// Clear gap
|
|
|
|
cube([l+0.05,gap,od], anchor=BOTTOM);
|
|
|
|
|
|
|
|
up(tabh) {
|
|
|
|
// Screwhole
|
2021-03-16 21:46:11 +00:00
|
|
|
fwd(ogap/2-2+0.01) generic_screw(screwsize=screwsize*1.06, screwlen=ogap, headsize=screwsize*2, headlen=10, orient=FWD);
|
2020-05-30 02:04:34 +00:00
|
|
|
|
|
|
|
// Nut holder
|
|
|
|
back(ogap/2-2+0.01) metric_nut(size=screwsize, hole=false, anchor=BOTTOM, orient=BACK);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
children();
|
|
|
|
}
|
2017-08-30 00:00:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-09-20 03:18:25 +00:00
|
|
|
// Module: linear_bearing()
|
|
|
|
// Description:
|
|
|
|
// Creates a rough model of a generic linear ball bearing cartridge.
|
|
|
|
// Arguments:
|
|
|
|
// l/length = The length of the linear bearing cartridge.
|
|
|
|
// od = The outer diameter of the linear bearing cartridge.
|
|
|
|
// id = The inner diameter of the linear bearing cartridge.
|
|
|
|
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
|
|
|
|
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0`
|
|
|
|
// orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP`
|
|
|
|
// Example:
|
|
|
|
// linear_bearing(l=24, od=15, id=8);
|
|
|
|
module linear_bearing(l, od=15, id=8, length, anchor=CTR, spin=0, orient=UP) {
|
|
|
|
l = first_defined([l, length, 24]);
|
|
|
|
attachable(anchor,spin,orient, d=od, l=l) {
|
|
|
|
color("silver") {
|
|
|
|
tube(id=id, od=od, l=l-1);
|
|
|
|
tube(id=od-1, od=od, l=l);
|
|
|
|
tube(id=id, od=id+1, l=l);
|
|
|
|
tube(id=id+2, od=od-2, l=l);
|
|
|
|
}
|
|
|
|
children();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Section: lmXuu Linear Bearings
|
|
|
|
|
2019-03-23 04:13:18 +00:00
|
|
|
// Module: lmXuu_housing()
|
|
|
|
// Description:
|
|
|
|
// Creates a model of a clamp to hold a standard sized lmXuu linear bearing cartridge.
|
|
|
|
// Arguments:
|
|
|
|
// size = Standard lmXuu inner size.
|
|
|
|
// tab = Clamp tab height. Default: 7
|
|
|
|
// tabwall = Clamp Tab thickness. Default: 5
|
|
|
|
// wall = Wall thickness of clamp housing. Default: 3
|
|
|
|
// gap = Gap in clamp. Default: 5
|
|
|
|
// screwsize = Size of screw to use to tighten clamp. Default: 3
|
2021-11-20 03:33:16 +00:00
|
|
|
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
|
|
|
|
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0`
|
|
|
|
// orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP`
|
2019-03-23 04:13:18 +00:00
|
|
|
// Example:
|
|
|
|
// lmXuu_housing(size=10, wall=2, tab=6, screwsize=2.5);
|
2019-05-26 06:31:05 +00:00
|
|
|
module lmXuu_housing(size=8, tab=7, gap=5, wall=3, tabwall=5, screwsize=3, anchor=BOTTOM, spin=0, orient=UP)
|
2017-08-30 00:00:16 +00:00
|
|
|
{
|
2022-09-20 03:18:25 +00:00
|
|
|
info = lmXuu_info(size);
|
|
|
|
d = info[0];
|
|
|
|
l = info[1];
|
2020-05-30 02:04:34 +00:00
|
|
|
linear_bearing_housing(d=d, l=l, tab=tab, gap=gap, wall=wall, tabwall=tabwall, screwsize=screwsize, orient=orient, spin=spin, anchor=anchor) children();
|
2017-08-30 00:00:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-09-19 23:49:43 +00:00
|
|
|
// Module: lmXuu_bearing()
|
|
|
|
// Description:
|
|
|
|
// Creates a model of an lmXuu linear ball bearing cartridge.
|
|
|
|
// Arguments:
|
|
|
|
// size = Standard lmXuu inner size.
|
|
|
|
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
|
|
|
|
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0`
|
|
|
|
// orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP`
|
|
|
|
// Example:
|
|
|
|
// lmXuu_bearing(size=10);
|
|
|
|
module lmXuu_bearing(size=8, anchor=CTR, spin=0, orient=UP) {
|
2022-09-20 03:18:25 +00:00
|
|
|
info = lmXuu_info(size);
|
|
|
|
linear_bearing(l=info[1], id=size, od=info[0], anchor=anchor, spin=spin, orient=orient) children();
|
2022-09-19 23:49:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-09-20 03:18:25 +00:00
|
|
|
// Section: lmXuu Linear Bearing Info
|
|
|
|
|
|
|
|
|
|
|
|
// Function: lmXuu_info()
|
|
|
|
// Description:
|
|
|
|
// Get dimensional info for a standard metric lmXuu linear bearing cartridge.
|
|
|
|
// Returns `[DIAM, LENGTH]` for the cylindrical cartridge.
|
|
|
|
// Arguments:
|
|
|
|
// size = Inner diameter of lmXuu bearing, in mm.
|
|
|
|
function lmXuu_info(size) =
|
|
|
|
let(
|
|
|
|
data = [
|
|
|
|
// size, diam, length
|
|
|
|
[ 4.0, 8.0, 12.0],
|
|
|
|
[ 5.0, 10.0, 15.0],
|
|
|
|
[ 6.0, 12.0, 19.0],
|
|
|
|
[ 8.0, 15.0, 24.0],
|
|
|
|
[ 10.0, 19.0, 29.0],
|
|
|
|
[ 12.0, 21.0, 30.0],
|
|
|
|
[ 13.0, 23.0, 32.0],
|
|
|
|
[ 16.0, 28.0, 37.0],
|
|
|
|
[ 20.0, 32.0, 42.0],
|
|
|
|
[ 25.0, 40.0, 59.0],
|
|
|
|
[ 30.0, 45.0, 64.0],
|
|
|
|
[ 35.0, 52.0, 70.0],
|
|
|
|
[ 40.0, 60.0, 80.0],
|
|
|
|
[ 50.0, 80.0, 100.0],
|
|
|
|
[ 60.0, 90.0, 110.0],
|
|
|
|
[ 80.0, 120.0, 140.0],
|
|
|
|
[100.0, 150.0, 175.0],
|
|
|
|
],
|
|
|
|
found = search([size], data, 1)[0]
|
|
|
|
)
|
|
|
|
assert(found, str("Unsupported lmXuu linear bearing size: ", size))
|
|
|
|
select(data[found], 1, -1);
|
|
|
|
|
|
|
|
|
2022-09-19 23:49:43 +00:00
|
|
|
|
2020-05-30 02:04:34 +00:00
|
|
|
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
|