[OpenSCAD] allowing center= parameter to be a vector of booleans
Chow Loong Jin
hyperair at debian.org
Sun May 3 22:02:46 EDT 2015
On Sun, May 03, 2015 at 05:33:53PM -0700, Drew Rogge wrote:
> I often find that I want a cube to be centered about the z axis but sitting on
> the z = 0 xy plane. What do people think of allowing the center= parameter of 2D
> and 3D primitives to be a vector of booleans. That way one could center a
> primitive on whatever axes are desired instead of all or nothing. In my cube
> example I could use:
> cube([10, 20, 5], center=[true, true, false]);
> instead of translate([-5, -10, 0]) cube([10, 20, 5]); or translate([0, 0,
> 2.5]) cube([10, 20, 5]);
> Although not clean it would also be handy if booleans could also be
> represented by zero/non-zero numeric values instead of the verbose "true" and
> I'm open to other ways of doing the above if anyone has any suggestions.
This is something that has crossed my mind recently as well, and I quite like
the idea. But the zero/non-zero numeric values should probably not be used, as
that tends to imply a coordinate rather than a bitfield.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: Digital signature
More information about the Discuss