1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-16 12:24:09 +02:00

Renders of STLs are now the correct colour. Fixes #71

This commit is contained in:
Chris Palmer
2020-04-05 16:18:24 +01:00
parent bc4e18d788
commit 7e0c5fdb6e
29 changed files with 175 additions and 76 deletions

View File

@@ -101,9 +101,17 @@ module assembly(name, big = undef) { //! Name an assembly that will appear on
echo(str("~}", name, "_assembly"));
}
module stl(name) { //! Name an stl that will appear on the BOM, there needs to a module named ```<name>_stl``` to make it
if(bom_mode())
echo(str("~", name, ".stl"));
module stl_colour(colour) { //! Colour an stl where it is placed in an assembly
$stl_colour = colour;
color(colour)
children();
}
module stl(name) { //! Name an stl that will appear on the BOM, there needs to a module named ```<name>_stl``` to make it
if(bom_mode()) {
colour = is_undef($stl_colour) ? pp1_colour : $stl_colour;
echo(str("~", name, ".stl(colour='", colour, "')"));
}
}
module dxf(name) { //! Name a dxf that will appear on the BOM, there needs to a module named ```<name>_dxf``` to make it