Can now override the screw type for a fan assembly.
This commit is contained in:
parent
de8eb594a7
commit
7b2b239a8b
|
@ -620,7 +620,7 @@ Can draw three styles: solid, open frame and open frame with screw bosses.
|
|||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```fan(type)``` | Draw specified fan, origin in the centre |
|
||||
| ```fan_assembly(type, thickness, include_fan = true)``` | Fan with its fasteners |
|
||||
| ```fan_assembly(type, thickness, include_fan = true, screw = false)``` | Fan with its fasteners |
|
||||
| ```fan_hole_positions(type, z = undef)``` | Position children at the screw hole positions |
|
||||
| ```fan_holes(type, poly = false, screws = true, h = 100)``` | Make all the holes for the fan, or just the aperture if ```screws``` is false. Set ```poly``` true for poly_holes. |
|
||||
|
||||
|
|
|
@ -151,16 +151,16 @@ function nut_and_washer_thickness(screw, nyloc) = washer_thickness(screw_washer(
|
|||
function fan_screw_depth(type) = fan_boss_d(type) ? fan_depth(type) : fan_thickness(type);
|
||||
function fan_screw_length(type, thickness) = screw_longer_than(thickness + fan_screw_depth(type) + nut_and_washer_thickness(fan_screw(type), true)); //! Screw length required
|
||||
|
||||
module fan_assembly(type, thickness, include_fan = true) { //! Fan with its fasteners
|
||||
module fan_assembly(type, thickness, include_fan = true, screw = false) { //! Fan with its fasteners
|
||||
translate_z(-fan_depth(type) / 2) {
|
||||
if(include_fan)
|
||||
fan(type);
|
||||
|
||||
screw = fan_screw(type);
|
||||
nut = screw_nut(screw);
|
||||
Screw = screw ? screw : fan_screw(type);
|
||||
nut = screw_nut(Screw);
|
||||
fan_hole_positions(type) {
|
||||
translate_z(thickness)
|
||||
screw_and_washer(screw, fan_screw_length(type, thickness));
|
||||
screw_and_washer(Screw, fan_screw_length(type, thickness));
|
||||
|
||||
translate_z(include_fan ? -fan_screw_depth(type) : 0)
|
||||
vflip()
|
||||
|
|
Loading…
Reference in New Issue