discuss@lists.openscad.org

OpenSCAD general discussion

View all threads

# operator for showing negative spaces - programmaticallly turned on?

JW
Jim Witte
Tue, Jan 4, 2022 3:14 PM

Where can I find specific documentation about the "#" operator that will
show negative objects or object in a "difference()" operation as red
shaded?  Can this be programmatically turned on - i.e. something like:

#(booleanShowNegativeObject)renderAnObject()
or

(booleanShowNegativeObject)?"#":" ")renderAnObject()

I'm guessing I could do this easily done with PySCAD..  Which I have
started learning yet.

Thanks,
Jim

Where can I find specific documentation about the "#" operator that will show negative objects or object in a "difference()" operation as red shaded? Can this be programmatically turned on - i.e. something like: #(booleanShowNegativeObject)renderAnObject() or (booleanShowNegativeObject)?"#":" ")renderAnObject() I'm guessing I could do this easily done with PySCAD.. Which I have started learning yet. Thanks, Jim
J
jon
Tue, Jan 4, 2022 3:48 PM

Where can I find specific documentation about the "#" operator that
will show negative objects or object in a "difference()" operation as
red shaded?  Can this be programmatically turned on - i.e. something like:

#(booleanShowNegativeObject)renderAnObject()
or

(booleanShowNegativeObject)?"#":" ")renderAnObject()

I'm guessing I could do this easily done with PySCAD.. Which I have
started learning yet.

Thanks,
Jim


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Modifier_Characters#Debug_Modifier On 1/4/2022 10:14 AM, Jim Witte wrote: > Where can I find specific documentation about the "#" operator that > will show negative objects or object in a "difference()" operation as > red shaded?  Can this be programmatically turned on - i.e. something like: > > #(booleanShowNegativeObject)renderAnObject() > or > > (booleanShowNegativeObject)?"#":" ")renderAnObject() > > I'm guessing I could do this easily done with PySCAD.. Which I have > started learning yet. > > Thanks, > Jim > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
TP
Torsten Paul
Tue, Jan 4, 2022 3:59 PM

On 04.01.22 16:14, Jim Witte wrote:

(booleanShowNegativeObject)?"#":" ")renderAnObject()

Yes that's possible by defining a module that would flag the
object:

debug = true;

module debug() if (debug) #children(); else children();

module obj() {
difference() {
cube(10);
debug() sphere(5);
}
}

obj();

ciao,
Torsten.

On 04.01.22 16:14, Jim Witte wrote: > (booleanShowNegativeObject)?"#":" ")renderAnObject() Yes that's possible by defining a module that would flag the object: debug = true; module debug() if (debug) #children(); else children(); module obj() { difference() { cube(10); debug() sphere(5); } } obj(); ciao, Torsten.