mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-01-17 13:38:16 +01:00
Added support for tNuts in sk_brackets.
This commit is contained in:
parent
a08216d0b8
commit
c5038db6d9
@ -21,9 +21,11 @@ use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/sk_brackets.scad>
|
||||
|
||||
module sk_brackets()
|
||||
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]);
|
||||
sk_bracket_assembly(sk_brackets[$i], nut_type = nuts[$i]);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
sk_brackets();
|
||||
|
@ -94,19 +94,23 @@ module sk_bracket(type) { //! SK shaft support bracket
|
||||
}
|
||||
|
||||
|
||||
module sk_bracket_assembly(type, screw_length = 16, screw_type = M5_cap_screw) { //! Assembly with fasteners in place
|
||||
module sk_bracket_assembly(type, screw_length = 16, screw_type = M5_cap_screw, nut_type = undef) { //! Assembly with fasteners in place
|
||||
sk_bracket(type);
|
||||
|
||||
washer_type = screw_washer(screw_type);
|
||||
washer_thickness = washer_thickness(washer_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)
|
||||
nut(screw_nut(screw_type))
|
||||
washer(washer_type);
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user