[OpenSCAD] feature request: centering axes independently

Whosawhatsis whosawhatsis at gmail.com
Sun Mar 25 16:14:52 CEST 2012


I thought of that, but the most logical way to set center fractionally would make true = 0 and false = 1. That way you would center on the opposite corner using center = -1. Of course, if you made center = 2 center on the opposite corner instead, your suggestion would work, but the syntax would not be as logical.

On Sunday, March 25, 2012 at 7:10 AM, chrysn wrote:

> On Sun, Mar 25, 2012 at 02:25:26PM +0100, nop head wrote:
> > On 25 March 2012 14:05, Whosawhatsis <whosawhatsis at gmail.com (mailto:whosawhatsis at gmail.com)> wrote:
> > 
> > > cube(10, center = [true, true, false]);
> > 
> > That's good but it allows only 8 positions. If it was cube(10, center =
> > [0.5,0.5,0]); one could select any point within the cube to be the centre.
> > 
> 
> 
> i'd like to have center=[true, true, false] as it integrates better with
> the classical semantics of center, and having center=x equal center=[x,
> x, x] should cause no confusion.
> 
> if my understanding of booleans in openscad is correct, it *might* be
> possible to make center accept floats in addition to that, and treat
> true as 0.5, false as 0, and use them as fractional negative offsets.
> that interpretation is non-obvious, though, judging from the fact that
> i'd read your cube(10, center=[0.5, 0.5, 0.5]) as a cube at [-5, -5,
> -5], while giles read it as at [0.5, 0.5, 0.5].
> 
> regards
> chrysn
> 
> -- 
> To use raw power is to make yourself infinitely vulnerable to greater powers.
> -- Bene Gesserit axiom
> 
> _______________________________________________
> OpenSCAD mailing list
> OpenSCAD at rocklinux.org (mailto:OpenSCAD at rocklinux.org)
> http://rocklinux.net/mailman/listinfo/openscad
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rocklinux.net/pipermail/openscad/attachments/20120325/fcc6fa40/attachment-0001.html


More information about the OpenSCAD mailing list