mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-27 17:20:04 -05:00
Merge branch 'martinbudden-sk_brackets'
This commit is contained in:
commit
8435a350d0
1
lib.scad
1
lib.scad
@ -63,6 +63,7 @@ include <vitamins/mains_sockets.scad>
|
||||
include <vitamins/ldrs.scad>
|
||||
include <vitamins/geared_steppers.scad>
|
||||
include <vitamins/extrusions.scad>
|
||||
include <vitamins/sk_brackets.scad>
|
||||
|
||||
use <vitamins/jack.scad>
|
||||
use <vitamins/meter.scad>
|
||||
|
76
readme.md
76
readme.md
@ -33,20 +33,20 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Pcb_mount">Pcb_mount</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Psu_shroud">Psu_shroud</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Iecs">Iecs</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Ssr_shroud">Ssr_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Ssrs">Ssrs</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Ldrs">Ldrs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Leds">Leds</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Washers">Washers</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Meter">Meter</a> </td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microview">Microview</a> </td><td></td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Sk_brackets">Sk_brackets</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Iecs">Iecs</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Ssr_shroud">Ssr_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Ssrs">Ssrs</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Ldrs">Ldrs</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Leds">Leds</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Meter">Meter</a> </td><td> <a href = "#Washers">Washers</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Modules">Modules</a> </td><td></td><td></td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
@ -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 |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Sk_brackets"></a>
|
||||
## 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 |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
|
BIN
tests/png/sk_brackets.png
Normal file
BIN
tests/png/sk_brackets.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
32
tests/sk_brackets.scad
Normal file
32
tests/sk_brackets.scad
Normal file
@ -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 <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
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();
|
||||
|
116
vitamins/sk_bracket.scad
Normal file
116
vitamins/sk_bracket.scad
Normal file
@ -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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
//
|
||||
//! SK shaft support brackets
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/fillet.scad>
|
||||
|
||||
include <screws.scad>
|
||||
use <washer.scad>
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
35
vitamins/sk_brackets.scad
Normal file
35
vitamins/sk_brackets.scad
Normal file
@ -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 <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
//
|
||||
// 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 <sk_bracket.scad>
|
||||
|
Loading…
Reference in New Issue
Block a user