From 74b8dcb6d860ee0ee49da93e9c2565f7a7ccd8c7 Mon Sep 17 00:00:00 2001 From: Martin Budden Date: Tue, 26 Jan 2021 15:20:20 +0000 Subject: [PATCH 1/2] Added colour parameter to pulley. --- vitamins/pulley.scad | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vitamins/pulley.scad b/vitamins/pulley.scad index 42b88c9..fe1f293 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) { //! Draw a pulley +module pulley(type, colour = silver) { //! Draw a pulley teeth = pulley_teeth(type); od = pulley_od(type); @@ -117,7 +117,7 @@ module pulley(type) { //! Draw a pulley rotate([-90, 0, i * -90]) cylinder(r = screw_radius(pulley_screw(type)), h = 100); - color(silver) { + color(colour) { if(screw_z && screw_z < hl) render() difference() { @@ -140,9 +140,9 @@ module pulley(type) { //! Draw a pulley } } -module pulley_assembly(type) { //! Draw a pulley with its grub screws in place +module pulley_assembly(type, colour = silver) { //! Draw a pulley with its grub screws in place translate_z(pulley_offset(type)) { - pulley(type); + pulley(type, colour); if(pulley_screws(type)) translate_z(pulley_screw_z(type)) From 84fbd05f9bc15c0732abbb7f3ddebc8bca5649a9 Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Tue, 26 Jan 2021 17:34:43 +0000 Subject: [PATCH 2/2] Updated readme for pulley colour. --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index a28be89..f1e750f 100644 --- a/readme.md +++ b/readme.md @@ -2618,8 +2618,8 @@ Timing belt pulleys, both toothed and plain with internal bearings for idlers. ### Modules | Module | Description | |:--- |:--- | -| `pulley(type)` | Draw a pulley | -| `pulley_assembly(type)` | Draw a pulley with its grub screws in place | +| `pulley(type, colour = silver)` | Draw a pulley | +| `pulley_assembly(type, colour = silver)` | Draw a pulley with its grub screws in place | ![pulleys](tests/png/pulleys.png)