mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-01-17 21:48:43 +01:00
Merge branch 'SC_flex' of https://github.com/jeroenrnl/NopSCADlib into jeroenrnl-SC_flex
This commit is contained in:
commit
264e4366f6
@ -26,6 +26,7 @@ function sc_length(type) = type[1]; //! Coupling length
|
||||
function sc_diameter(type) = type[2]; //! Coupling outer diameter
|
||||
function sc_diameter1(type) = type[3]; //! Diameter of smaller shaft
|
||||
function sc_diameter2(type) = type[4]; //! Diameter of larger shaft
|
||||
function sc_flexible(type) = type[5]; //! Flexible coupling
|
||||
|
||||
module shaft_coupling(type, colour = "silver") { //! Draw the shaft coupling
|
||||
vitamin(str("shaft_coupling(", type[0], "): Shaft coupling ", type[0]));
|
||||
@ -34,6 +35,7 @@ module shaft_coupling(type, colour = "silver") { //! Draw the shaft coupling
|
||||
radius = sc_diameter(type) / 2;
|
||||
r1 = sc_diameter1(type) / 2;
|
||||
r2 = sc_diameter2(type) / 2;
|
||||
flexible = is_undef(sc_flexible(type)) ? false : sc_flexible(type);
|
||||
|
||||
grub_length = 3;
|
||||
module grub_screw_positions() {
|
||||
@ -54,6 +56,11 @@ module shaft_coupling(type, colour = "silver") { //! Draw the shaft coupling
|
||||
|
||||
tube(radius, r2, length / 2, false);
|
||||
}
|
||||
if (flexible) {
|
||||
linear_extrude(length/3, center=true, convexity = 20, twist = -5 * 360)
|
||||
translate([r1,0,0])
|
||||
square(radius-r1,1);
|
||||
}
|
||||
grub_screw_positions()
|
||||
rotate([180, 0, 0])
|
||||
cylinder(r = screw_radius(M3_grub_screw), h = 5);
|
||||
|
@ -21,9 +21,9 @@
|
||||
//! Shaft couplings
|
||||
//
|
||||
|
||||
// L D d1 d2
|
||||
SC_5x8_rigid = [ "SC_5x8_rigid", 25, 12.5, 5, 8 ];
|
||||
|
||||
shaft_couplings = [SC_5x8_rigid];
|
||||
// L D d1 d2 flex?
|
||||
SC_5x8_rigid = [ "SC_5x8_rigid", 25, 12.5, 5, 8, false ];
|
||||
SC_6x8_flex = [ "SC_6x8_flex", 25, 19, 6, 8, true ];
|
||||
shaft_couplings = [SC_5x8_rigid, SC_6x8_flex];
|
||||
|
||||
use <shaft_coupling.scad>
|
||||
|
Loading…
x
Reference in New Issue
Block a user