mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2025-01-11 10:12:43 -05:00
Added alpha parameter to stl_colour()
This commit is contained in:
parent
b4379907a2
commit
147ff9b24f
@ -5171,8 +5171,8 @@ Simple tube or ring
|
|||||||
---
|
---
|
||||||
<a name="BOM"></a>
|
<a name="BOM"></a>
|
||||||
## BOM
|
## 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
|
Bill Of Materials generation via echo and the ```bom.py``` script. Also handles exploded assembly views and posing.
|
||||||
definition that makes the assembly.
|
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
|
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.
|
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_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. |
|
| ```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 ```<name>_stl``` to make it |
|
| ```stl(name)``` | Name an stl that will appear on the BOM, there needs to a module named ```<name>_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" |
|
| ```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)
|
![bom](tests/png/bom.png)
|
||||||
|
@ -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
|
//! Bill Of Materials generation via echo and the ```bom.py``` script. Also handles exploded assembly views and posing.
|
||||||
//! definition that makes the assembly.
|
//! 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
|
//! 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.
|
//! parts are used.
|
||||||
@ -101,9 +101,9 @@ module assembly(name, big = undef) { //! Name an assembly that will appear on
|
|||||||
echo(str("~}", name, "_assembly"));
|
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;
|
$stl_colour = colour;
|
||||||
color(colour)
|
color(colour, alpha)
|
||||||
children();
|
children();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user