I dimly remember this being asked before but I've not been able to find the
answer.
Is there a clever/less cumbersome way to optionally apply the debug prefix
"#"? Similar to the following?
module myObject( debug=false ) {
xyz = [ 10, 20, 30 ];
if (debug) {
#cube( xyz );
}
else {
cube( xyz );
}
}
Thanks! Len
You could limit the cumbersome bit to a module such as:
module debug() {
if($debug)
#children();
else
children();
}
and then just use debug() instead of # when you want it easily
enabled/disabled by setting $debug.
On Fri, Jun 13, 2025 at 8:46 PM Leonard Martin Struttmann via Discuss <
discuss@lists.openscad.org> wrote:
I dimly remember this being asked before but I've not been able to find
the answer.
Is there a clever/less cumbersome way to optionally apply the debug prefix
"#"? Similar to the following?
module myObject( debug=false ) {
xyz = [ 10, 20, 30 ];
if (debug) {
#cube( xyz );
}
else {
cube( xyz );
}
}
Thanks! Len
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
In BOSL2 you can do
highlight(debug) children();
On Fri, Jun 13, 2025 at 11:46 PM Todd Allen via Discuss <
discuss@lists.openscad.org> wrote:
You could limit the cumbersome bit to a module such as:
module debug() {
if($debug)
#children();
else
children();
}
and then just use debug() instead of # when you want it easily
enabled/disabled by setting $debug.
On Fri, Jun 13, 2025 at 8:46 PM Leonard Martin Struttmann via Discuss <
discuss@lists.openscad.org> wrote:
I dimly remember this being asked before but I've not been able to find
the answer.
Is there a clever/less cumbersome way to optionally apply the debug
prefix "#"? Similar to the following?
module myObject( debug=false ) {
xyz = [ 10, 20, 30 ];
if (debug) {
#cube( xyz );
}
else {
cube( xyz );
}
}
Thanks! Len
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org