openscad/openscad — pull request #311 by donbright (2013-03-16 18:52:11+00:00)
Title: Resize5

this is an experimental implementation of the resize() command.

it was discussed over a year ago on the mailing list and has been requested several times. Giles Bathgate implemented it in RapCAD and this is roughly based on his version, although different in implementation.

the basic syntax is this:

resize([newx,newy,newz],auto=[ax,ay,az]) cube();

if newx, newy, or newz is '0' then the object's x, y, or z dimension will remain "as is".

if ax, ay, or az is true, then the objects dimensions will auto-scale with the 'largest' dimension. for example

resize([0,0,10],auto=true) cube(1)

will generate a cube of 10,10,10

the auto-size can be limited, for example:

resize([10,0,0],auto=[true,true,false]) cube(1)

will generate a cube of 10,10,1

2d resize cannot resize in the 'z' direction. that could be implemented in the future if desired but cirrently it shows a warning message.

thanks!