1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-03 04:12:35 +02:00

pulley_pr() now has an optional belt type for non-standard belt over smooth pulleys.

This commit is contained in:
Chris Palmer
2021-03-13 10:45:54 +00:00
parent e46e6b6e5b
commit 544e69c71b
3 changed files with 6 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ function pulley_screw(type) = type[13]; //! Grub screw type
function pulley_screws(type) = type[14]; //! Number of grub screws
function pulley_ir(type) = pulley_od(type) / 2 - (pulley_teeth(type) ? belt_tooth_height(pulley_belt(type)) : 0); //! Inside radius of the teeth
function pulley_pr(type) = let(belt = pulley_belt(type)) //! Pitch radius
function pulley_pr(type, belt = undef) = let(belt = is_undef(belt) ? pulley_belt(type) : belt) //! Pitch radius, `belt` only needed for non-standard belt over smooth pulleys
pulley_teeth(type) ? pulley_teeth(type) * belt_pitch(belt) / 2 / PI
: pulley_ir(type) + belt_thickness(belt) - belt_pitch_height(belt);