1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-08 08:26:29 +02:00

cnc_bit_r is now set to zero in stl(), so holes are suitable for 3D printing rather than routing.

This commit is contained in:
Chris Palmer
2021-09-16 22:14:30 +01:00
parent dc93b8dcdf
commit 91c8c7bf4d

View File

@@ -43,7 +43,7 @@
//! * Two `pose()` modules can be chained to allow different poses for exploded and assembled views. //! * Two `pose()` modules can be chained to allow different poses for exploded and assembled views.
// //
function bom_mode(n = 1) = (is_undef($bom) ? 0 : $bom) >= n && (is_undef($on_bom) || $on_bom); //! Current BOM mode, 0 = none, 1 = printed and routed parts and assemblies, 2 includes vitamins as well function bom_mode(n = 1) = (is_undef($bom) ? 0 : $bom) >= n && (is_undef($on_bom) || $on_bom); //! Current BOM mode, 0 = none, 1 = printed and routed parts and assemblies, 2 includes vitamins as well
function exploded() = is_undef($exploded_parent) ? is_undef($explode) ? 0 : $explode : 0; //! Returns the value of `$exploded` if it is defined, else `0` function exploded() = is_undef($exploded_parent) ? is_undef($explode) ? 0 : $explode : 0; //! Returns the value of `$explode` if it is defined, else `0`
function show_supports() = !$preview || exploded(); //! True if printed support material should be shown function show_supports() = !$preview || exploded(); //! True if printed support material should be shown
module no_explode() let($exploded_parent = true) children(); //! Prevent children being exploded module no_explode() let($exploded_parent = true) children(); //! Prevent children being exploded
@@ -107,7 +107,6 @@ module pose_vflip(exploded = undef) //! Pose an STL or assembly for render
vflip() vflip()
children(); children();
module assembly(name, big = undef, ngb = false) { //! Name an assembly that will appear on the BOM, there needs to a module named `<name>_assembly` to make it. `big` can force big or small assembly diagrams. module assembly(name, big = undef, ngb = false) { //! Name an assembly that will appear on the BOM, there needs to a module named `<name>_assembly` to make it. `big` can force big or small assembly diagrams.
if(bom_mode()) { if(bom_mode()) {
zoom = is_undef($zoomed) ? 0 : $zoomed; zoom = is_undef($zoomed) ? 0 : $zoomed;
@@ -140,7 +139,7 @@ module stl(name) { //! Name an stl that will appear on the
} }
if($children) if($children)
if(is_undef($pose)) if(is_undef($pose))
let($in_stl = true) let($in_stl = true, $cnc_bit_r = 0)
children(); children();
else { else {
path = is_undef($target) ? "/stls/" : str("/", $target, "/stls/"); path = is_undef($target) ? "/stls/" : str("/", $target, "/stls/");