diff --git a/.openscad_docsgen_rc b/.openscad_docsgen_rc index d04dd95..f0d8724 100644 --- a/.openscad_docsgen_rc +++ b/.openscad_docsgen_rc @@ -5,10 +5,11 @@ GenerateDocs: Files, TOC, Index, Topics, CheatSheet, Sidebar UsePNGAnimations: Yes IgnoreFiles: affine.scad - foo.scad + metric_screws.scad std.scad bosl1compat.scad builtins.scad + foo.scad tmp_*.scad PrioritizeFiles: constants.scad diff --git a/linear_bearings.scad b/linear_bearings.scad index 1b063c4..8c1dd86 100644 --- a/linear_bearings.scad +++ b/linear_bearings.scad @@ -8,8 +8,7 @@ // FileSummary: Mounts for LMxUU style linear bearings. ////////////////////////////////////////////////////////////////////// - -include +include // Section: Generic Linear Bearings @@ -26,7 +25,7 @@ include // Arguments: // d = Diameter of linear bearing. (Default: 15) // l = Length of linear bearing. (Default: 24) -// tab = Clamp tab height. (Default: 7) +// tab = Clamp tab height. (Default: 8) // tabwall = Clamp Tab thickness. (Default: 5) // wall = Wall thickness of clamp housing. (Default: 3) // gap = Gap in clamp. (Default: 5) @@ -36,12 +35,12 @@ include // 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_housing(d=19, l=29, wall=2, tab=6, screwsize=2.5); -module linear_bearing_housing(d=15, l=24, tab=7, gap=5, wall=3, tabwall=5, screwsize=3, anchor=BOTTOM, spin=0, orient=UP) +// linear_bearing_housing(d=19, l=29, wall=2, tab=8, screwsize=2.5); +module linear_bearing_housing(d=15, l=24, tab=8, gap=5, wall=3, tabwall=5, screwsize=3, anchor=BOTTOM, spin=0, orient=UP) { od = d+2*wall; ogap = gap+2*tabwall; - tabh = tab/2+od/2*sqrt(2)-ogap/2; + tabh = tab/2+od/2*sqrt(2)-ogap/2-1; h = od+tab/2; anchors = [ named_anchor("axis", [0,0,-tab/2/2]), @@ -69,11 +68,15 @@ module linear_bearing_housing(d=15, l=24, tab=7, gap=5, wall=3, tabwall=5, screw cube([l+0.05,gap,od], anchor=BOTTOM); up(tabh) { + screwsize = is_string(screwsize)? screwsize : str("M",screwsize); + // Screwhole - fwd(ogap/2-2+0.01) generic_screw(screwsize=screwsize*1.06, screwlen=ogap, headsize=screwsize*2, headlen=10, orient=FWD); + fwd(ogap/2-2+0.01) + screw_hole(str(screwsize,",",ogap), head="socket", counterbore=3, anchor="head_bot", orient=FWD, $fn=12); // Nut holder - back(ogap/2-2+0.01) metric_nut(size=screwsize, hole=false, anchor=BOTTOM, orient=BACK); + back(ogap/2-2+0.01) + nut_trap_inline(tabwall, screwsize, orient=BACK); } } children(); diff --git a/metric_screws.scad b/metric_screws.scad index 142574f..556e5f0 100644 --- a/metric_screws.scad +++ b/metric_screws.scad @@ -12,6 +12,8 @@ include include +warn = echo("*** WARNING: metric_screws.scad is deprecated and may be removed in the future. Use screws.scad instead. ***"); + // Section: Functions