[OpenSCAD] boolean logic in openscad

Don Bright hugh.m.bright at gmail.com
Fri Oct 28 01:48:10 CEST 2011

didn't mean to trash the idea i just
am not sure if it will get integrated into mainstream release anytime soon

here is my hacked up version, it has 5 bitwise operators. & | ^ << >> ,


it will not overrwrite your openscad, its called 'notopenscad'. i dont know if
it will work with your procedural texture mapping (which i have confused
in my brain with procedural coloring or something.. oops)

i presume you have windows???? if not here is the git branch:
you can clone as normal, just do 'git checkout crazybits' after clone

anways basically it works by taking the double,
making it an unsigned int, doing the C++ thing ( & | ^ << >> ) and
recasting to double.

any more  than that and i run up against the limitation of C++ that its
not 'super easy' to overload operators that are not already
operators,,, see expr.cc

however im guessing there would be some way around that too (just im
kinda sleep derprived..)


On Thu, Oct 27, 2011 at 7:27 AM, William Adams <william_a_adams at msn.com> wrote:
> Agree 100% on the priorities.
> It's unfortunate that my original question has taken the turn of being
> measured against other priorities.  Really I just wanted to know if I had
> missed something.  I'm perfectly happy just trundling along with my hacks
> and extensions.  For those who are actually focused on writing the code,
> stability and speed are certainly higher priorities than this stuff.
> -- William
> ===============================
> - Shaping clay is easier than digging it out of the ground.
> http://blog.nanotechstyles.com
> http://www.thingiverse.com/WilliamAAdams
> https://github.com/Wiladams
> ________________________________
> Date: Thu, 27 Oct 2011 01:37:25 -0400
> From: tbuser at gmail.com
> To: openscad at rocklinux.org
> Subject: Re: [OpenSCAD] boolean logic in openscad
> It's not that far ahead of it's time... texture mapping and image to
> heightmap can be used to interesting effect for things such as
> http://www.thingiverse.com/thing:12908 and
> http://www.thingiverse.com/thing:12405  :)
> Although I do agree, I'd rather see more priority in making OpenSCAD faster
> and less crashy.
> On Wed, Oct 26, 2011 at 6:57 PM, Don Bright <hugh.m.bright at gmail.com> wrote:
> considering STL only outputs one color, this 3d procedural texture stuff
> might
> be a little ahead of its time... (i.e. might be higher priority to stop
> openscad
> from constantly crashing machines)
> but i can see it 10 years from now:
> color("wood_grain1") sphere(5);
> And the color 3d printer spits out a wood-grained sphere. hopefully
> not with your name on it (sorry, cant resist PKD reference)
> _______________________________________________ OpenSCAD mailing list
> OpenSCAD at rocklinux.org http://rocklinux.net/mailman/listinfo/openscad
> _______________________________________________
> OpenSCAD mailing list
> OpenSCAD at rocklinux.org
> http://rocklinux.net/mailman/listinfo/openscad

More information about the OpenSCAD mailing list