[OpenSCAD] feature request: centering axes independently

Giles Bathgate giles.bathgate at gmail.com
Sun Mar 25 15:32:44 CEST 2012


You can just do

translate([0.5,0.5,0.5])cube([10,10,10],center=true);

is the feature really worthwhile? It is less to type and should be a bit
faster to evaluate.

Regards

Giles

On Mar 25, 2012 2:25 PM, "nop head" <nop.head at gmail.com> wrote:
>
> 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.
>
> On 25 March 2012 14:05, Whosawhatsis <whosawhatsis at gmail.com> wrote:
>>
>> It would be nice if OpenSCAD allowed you to select whether or not to
center squares and cubes on each axis independently. Here's the syntax I
suggest:
>>
>> cube(10, center = [true, true, false]);
>>
>>
>> This should create a 10mm cube sitting on the center of the X/Y plane. I
know there are ways to do this using translate, but it would make the code
more elegant and easier to edit.
>>
>>
>>
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rocklinux.net/pipermail/openscad/attachments/20120325/a707fd27/attachment.html


More information about the OpenSCAD mailing list