diff --git a/readme.md b/readme.md index 96dbd5d..9e9a1ef 100644 --- a/readme.md +++ b/readme.md @@ -2699,7 +2699,7 @@ Timing belt pulleys, both toothed and plain with internal bearings for idlers. ### Modules | Module | Description | |:--- |:--- | -| `pulley(type, colour = silver)` | Draw a pulley | +| `pulley(type, colour = silver)` | Draw a pulley, any children are placed above. | | `pulley_assembly(type, colour = silver)` | Draw a pulley with its grub screws in place | ![pulleys](tests/png/pulleys.png) diff --git a/vitamins/pulley.scad b/vitamins/pulley.scad index 74acf69..b070318 100644 --- a/vitamins/pulley.scad +++ b/vitamins/pulley.scad @@ -53,7 +53,7 @@ function pulley_extent(type) = max(pulley_flange_dia(type), pulley_hub_dia(type) T_angle = 40; GT_r = 0.555; -module pulley(type, colour = silver) { //! Draw a pulley +module pulley(type, colour = silver) { //! Draw a pulley, any children are placed above. teeth = pulley_teeth(type); od = pulley_od(type); @@ -138,6 +138,10 @@ module pulley(type, colour = silver) { //! Draw a pulley else core(); } + + if($children) + translate_z(pulley_height(type)) + children(); } module pulley_assembly(type, colour = silver) { //! Draw a pulley with its grub screws in place