[OpenSCAD] feature request: resize

Don Bright hugh.m.bright at gmail.com
Tue Aug 9 20:11:51 CEST 2011


Here is an example to illustrate my confusion. Say you have a bunny
rabbit, of unknown size.

In situation 1 you want to import the rabbit as a very tall stretched
rabbit, 100 units high, with the x and y left as they are.

For situation one, your syntax might be like this: resize=[0,0,100]

In situation 2 you want to import it as a rabbit that is exactly 5 in
x, but you want y and z to scale automatically to keep the bunny
rabbit proportions, not stretch him or shrink him.

For situation two, what is your syntax? "resize=[5,0,0]" is already
supposed to indicate 'leave y and z' alone. How do you indicate you
want it 5 wide, but auto scale y and z?

That is the purpose of an 'autosize' option in my patch.

DB





For situation two, what is your syntax? resize=

On Tue, Aug 9, 2011 at 12:24 PM, Tony Buser <tbuser at gmail.com> wrote:
> I'm guessing if all numbers are >0 it scales each independently, if 2 axis
> are 0 it autosizes, if only 1 is 0 it raises an error?
>
> On Tue, Aug 9, 2011 at 12:50 PM, Don Bright <hugh.m.bright at gmail.com> wrote:
>>
>> On Tue, Aug 9, 2011 at 10:55 AM, Giles Bathgate
>> <giles.bathgate at gmail.com> wrote:
>> > On 9 August 2011 16:46, Tony Buser <tbuser at gmail.com> wrote:
>> >> That's close, but still requires that you know what the dimensions of
>> >> the
>> >> stl are ahead of time in order to make the resize scale proportionally
>> >> when
>> >> I just want to scale one axis to a specific size.
>> >
>> > Yeah, so when you supply 0 for any of the vector values, it would
>> > leave those axis alone accordingly (since you can't have a primitive
>> > of 0 size)
>> >
>> > resize([10,0,0]) cube([5,2,1]);
>> >
>> > would do:
>> >
>> > scale([2,1,1]) cube([5,2,1]);
>> >
>> > ..and you would get a cube of 10x2x1
>> >
>> > (There was also the 'autosize=true' flag as suggested by don, but I
>> > don't think its necessary.)
>> >
>> > Regards
>> >
>> > Giles
>>
>>
>> If you dont have an 'autosize' option, then how do you switch between
>> 'autoscaling' mode and 'leave the other dimensions alone' mode?
>>
>> DB
>> _______________________________________________
>> 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