diff --git a/lib.scad b/lib.scad index 9bc10f7..6be53f9 100644 --- a/lib.scad +++ b/lib.scad @@ -63,6 +63,7 @@ include include include include +include use use diff --git a/readme.md b/readme.md index dcf782d..1dcf0fa 100644 --- a/readme.md +++ b/readme.md @@ -33,20 +33,20 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa Fuseholder Screws Pcb_mount Sector Geared_steppers Sealing_strip Psu_shroud Sweep Green_terminals Sheets Ribbon_clamp Thread - Hot_ends Spades Screw_knob Tube - Hygrometer Spools Socket_box - Iecs Springs Ssr_shroud - Inserts Ssrs Strap_handle - Jack Stepper_motors - Ldrs Toggles - Leadnuts Transformers - Leds Tubings - Light_strips Variacs - Linear_bearings Veroboard - Mains_sockets Washers - Meter Wire - Microswitches Zipties - Microview + Hot_ends Sk_brackets Screw_knob Tube + Hygrometer Spades Socket_box + Iecs Spools Ssr_shroud + Inserts Springs Strap_handle + Jack Ssrs + Ldrs Stepper_motors + Leadnuts Toggles + Leds Transformers + Light_strips Tubings + Linear_bearings Variacs + Mains_sockets Veroboard + Meter Washers + Microswitches Wire + Microview Zipties Modules @@ -2497,6 +2497,54 @@ Note that modules that drill holes will return a 2D object if ```h``` is set to | 1 | ```sheet(Steel06, 30, 30, 2)``` | Sheet mild steel 30mm x 30mm x 0.6mm | +Top + +--- + +## Sk_brackets +SK shaft support brackets + + +[vitamins/sk_brackets.scad](vitamins/sk_brackets.scad) Object definitions. + +[vitamins/sk_bracket.scad](vitamins/sk_bracket.scad) Implementation. + +[tests/sk_brackets.scad](tests/sk_brackets.scad) Code for this example. + +### Properties +| Function | Description | +|:--- |:--- | +| ```sk_base_height(type)``` | Height of base containing the screws | +| ```sk_diameter(type)``` | Rod hole diameter | +| ```sk_hole_offset(type)``` | Rod hole offset | +| ```sk_screw_separation(type)``` | Separation of screws in the base | + +### Functions +| Function | Description | +|:--- |:--- | +| ```sk_size(type)``` | Size of bracket | + +### Modules +| Module | Description | +|:--- |:--- | +| ```sk_bracket(type)``` | SK shaft support bracket | +| ```sk_bracket_assembly(type, screw_length = 16, screw_type = M5_cap_screw, nut_type = undef)``` | Assembly with fasteners in place | + +![sk_brackets](tests/png/sk_brackets.png) + +### Vitamins +| Qty | Module call | BOM entry | +| ---:|:--- |:---| +| 4 | ```sliding_t_nut(M5_sliding_t_nut)``` | Nut M5 sliding T | +| 4 | ```nut(M5_nut)``` | Nut M5 x 4mm | +| 1 | ```sk_bracket(SK10)``` | SK10 shaft support bracket | +| 1 | ```sk_bracket(SK12)``` | SK12 shaft support bracket | +| 1 | ```sk_bracket(SK16)``` | SK16 shaft support bracket | +| 1 | ```sk_bracket(SK8)``` | SK8 shaft support bracket | +| 8 | ```screw(M5_cap_screw, 16)``` | Screw M5 cap x 16mm | +| 12 | ```washer(M5_washer)``` | Washer M5 x 10mm x 1mm | + + Top --- diff --git a/tests/png/sk_brackets.png b/tests/png/sk_brackets.png new file mode 100644 index 0000000..f0386df Binary files /dev/null and b/tests/png/sk_brackets.png differ diff --git a/tests/sk_brackets.scad b/tests/sk_brackets.scad new file mode 100644 index 0000000..5b70db5 --- /dev/null +++ b/tests/sk_brackets.scad @@ -0,0 +1,32 @@ +// +// NopSCADlib Copyright Chris Palmer 2018 +// nop.head@gmail.com +// hydraraptor.blogspot.com +// +// This file is part of NopSCADlib. +// +// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the +// GNU General Public License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with NopSCADlib. +// If not, see . +// +include <../core.scad> +use <../utils/layout.scad> + +include <../vitamins/sk_brackets.scad> + +module sk_brackets() { + nuts = [undef, M5_nut, M5_sliding_t_nut, M5_sliding_t_nut]; + layout([for(s = sk_brackets) 1.5 * sk_size(s)[1]]) + sk_bracket_assembly(sk_brackets[$i], nut_type = nuts[$i]); +} + +if($preview) + sk_brackets(); + diff --git a/vitamins/sk_bracket.scad b/vitamins/sk_bracket.scad new file mode 100644 index 0000000..f0d0ee0 --- /dev/null +++ b/vitamins/sk_bracket.scad @@ -0,0 +1,116 @@ +// +// NopSCADlib Copyright Chris Palmer 2018 +// nop.head@gmail.com +// hydraraptor.blogspot.com +// +// This file is part of NopSCADlib. +// +// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the +// GNU General Public License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with NopSCADlib. +// If not, see . + +// +//! SK shaft support brackets +// +include <../core.scad> +include <../utils/fillet.scad> + +include +use + +sk_bracket_color = grey70; + +function sk_diameter(type) = type[1]; //! Rod hole diameter +function sk_hole_offset(type) = type[2]; //! Rod hole offset +function sk_size(type) = [type[4],type[6],type[5]]; //! Size of bracket +function sk_base_height(type) = type[7]; //! Height of base containing the screws +function sk_screw_separation(type) = type[9]; //! Separation of screws in the base + +module sk_bracket(type) { //! SK shaft support bracket + vitamin(str("sk_bracket(", type[0], "): SK", sk_diameter(type), " shaft support bracket")); + + d = type[1]; + h = type[2]; + E = type[3]; + W = type[4]; + L = type[5]; + F = type[6]; + G = type[7]; + P = type[8]; + B = type[9]; + S = type[10]; + bolthole_radius = type[11]; + + color(sk_bracket_color) { + translate([0 , -h, 0]) { + fillet = 0.5; + rotate([-90, 0, 0]) + linear_extrude(G) + difference() { + translate([-(W - 2*fillet) / 2, -L / 2, 0]) + square([W - 2 * fillet, L]); + translate([-B / 2, 0]) + circle(r = bolthole_radius); + translate([B / 2, 0]) + circle(r = bolthole_radius); + } + for(x = [W / 2 - 2 * fillet, -W / 2 + 2 * fillet]) + translate([x, G / 2, 0]) + rounded_rectangle([4 * fillet, G, L], fillet); + } + + translate([0, -h, -L /2]) + linear_extrude(L) { + fillet = 0.75; + difference() { + translate([-P / 2, 0]) + rounded_square([P, F], fillet, center = false); + cut_width = 1; + translate([-cut_width / 2, h + cut_width]) + square([cut_width, F - h]); + translate([0, h]) + circle(d = d); + } + translate([P/2,G]) + fillet(fillet, 0); + translate([-P/2,G]) + rotate(90) + fillet(fillet, 0); + } + } + // Add the retaining bolt. No hole was cut, since it is only for display. + color(grey20) + translate([P / 2 - screw_head_height(M3_cap_screw) / 2, (F - h + d / 2) / 2, 0]) + rotate([0,90,0]) + not_on_bom() no_explode() + screw(M3_cap_screw, P - screw_head_height(M3_cap_screw) / 2 + eps); +} + + +module sk_bracket_assembly(type, screw_length = 16, screw_type = M5_cap_screw, nut_type = undef) { //! Assembly with fasteners in place + sk_bracket(type); + + nut_type = is_undef(nut_type) ? screw_nut(screw_type) : nut_type; + + for (x = [-sk_screw_separation(type), sk_screw_separation(type)]) + translate([x / 2, sk_base_height(type) - sk_hole_offset(type), 0]) + rotate([-90, 0, 0]) { + screw_and_washer(screw_type, screw_length); + translate_z(-screw_length + 2 * washer_thickness(screw_washer(screw_type))) + if(nut_type == M5_sliding_t_nut) + translate_z(nut_thickness(nut_type)) + vflip() + sliding_t_nut(nut_type); + else + nut(nut_type) + washer(nut_washer(nut_type)); + } +} + diff --git a/vitamins/sk_brackets.scad b/vitamins/sk_brackets.scad new file mode 100644 index 0000000..e8ece9e --- /dev/null +++ b/vitamins/sk_brackets.scad @@ -0,0 +1,35 @@ +// +// NopSCADlib Copyright Chris Palmer 2018 +// nop.head@gmail.com +// hydraraptor.blogspot.com +// +// This file is part of NopSCADlib. +// +// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the +// GNU General Public License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with NopSCADlib. +// If not, see . +// + +// +// SK shaft support brackets +// + +include <../core.scad> +include <../vitamins/screws.scad> + +// d h E W L F G P B S bolthole +SK8 = ["SK8", 8, 20, 21, 42, 14, 32.8, 6, 18, 32, 5.5, M5_clearance_radius]; +SK10 = ["SK10", 10, 20, 21, 42, 14, 32.8, 6, 18, 32, 5.5, M5_clearance_radius]; +SK12 = ["SK12", 12, 23, 21, 42, 14, 37.5, 6, 18, 32, 5.5, M5_clearance_radius]; +SK16 = ["SK16", 16, 27, 24, 48, 16, 44.0, 8, 25, 38, 5.5, M5_clearance_radius]; + +sk_brackets = [SK8, SK10, SK12, SK16]; +use +