From 147ff9b24f93ffaf9112df5e2829d30d3366e157 Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Tue, 7 Apr 2020 17:02:10 +0100 Subject: [PATCH] Added alpha parameter to stl_colour() --- readme.md | 6 +++--- utils/core/bom.scad | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index 6eb6774..f03534b 100644 --- a/readme.md +++ b/readme.md @@ -5171,8 +5171,8 @@ Simple tube or ring --- ## BOM -Bill Of Materials generation via echo and the ```bom.py``` script. Also handles exploded assembly views and posing. Assembly instructions can precede the module -definition that makes the assembly. +Bill Of Materials generation via echo and the ```bom.py``` script. Also handles exploded assembly views and posing. +Assembly instructions can precede the module definition that makes the assembly. Assembly views shown in the instructions can be large or small and this is deduced by looking at the size of the printed parts involved and if any routed parts are used. @@ -5209,7 +5209,7 @@ The resulting flat BOM is shown but heirachical BOMs are also generated for real | ```pose_hflip(exploded = undef)``` | Pose an STL or assembly for rendering to png by flipping around the Y axis, ```exploded = true for``` just the exploded view or ```false``` for unexploded only. | | ```pose_vflip(exploded = undef)``` | Pose an STL or assembly for rendering to png by flipping around the X axis, ```exploded = true for``` just the exploded view or ```false``` for unexploded only. | | ```stl(name)``` | Name an stl that will appear on the BOM, there needs to a module named ```_stl``` to make it | -| ```stl_colour(colour)``` | Colour an stl where it is placed in an assembly | +| ```stl_colour(colour = pp1_colour, alpha = 1)``` | Colour an stl where it is placed in an assembly. ```alpha``` can be used to make it appear transparent. | | ```vitamin(description)``` | Describe a vitamin for the BOM entry and precede it with a module call that creates it, eg. "wigit(42): Type 42 widget" | ![bom](tests/png/bom.png) diff --git a/utils/core/bom.scad b/utils/core/bom.scad index 1886a74..d19f142 100644 --- a/utils/core/bom.scad +++ b/utils/core/bom.scad @@ -18,8 +18,8 @@ // // -//! Bill Of Materials generation via echo and the ```bom.py``` script. Also handles exploded assembly views and posing. Assembly instructions can precede the module -//! definition that makes the assembly. +//! Bill Of Materials generation via echo and the ```bom.py``` script. Also handles exploded assembly views and posing. +//! Assembly instructions can precede the module definition that makes the assembly. //! //! Assembly views shown in the instructions can be large or small and this is deduced by looking at the size of the printed parts involved and if any routed //! parts are used. @@ -101,9 +101,9 @@ module assembly(name, big = undef) { //! Name an assembly that will appear on echo(str("~}", name, "_assembly")); } -module stl_colour(colour) { //! Colour an stl where it is placed in an assembly +module stl_colour(colour = pp1_colour, alpha = 1) { //! Colour an stl where it is placed in an assembly. ```alpha``` can be used to make it appear transparent. $stl_colour = colour; - color(colour) + color(colour, alpha) children(); }