home *** CD-ROM | disk | FTP | other *** search
- /* CMD: Halve
- * Scale Object to half (twice) its size around its center
- * By Arnie Cachelin © 1993 NewTek Inc.
- * Sun Aug 8 20:43:00 1993
- */
-
- arg size
- if size="" then size='HALF'
- else size='TWICE'
- mxx="LWModelerARexx.port"
- signal on error
- signal on syntax
- mxx_add = addlib(mxx,0)
-
- call main
-
- if (mxx_add) then call remlib(mxx)
- exit
-
- syntax:
- error:
- t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
- if (mxx_add) then call remlib(mxx)
- exit
-
- /* ~~*~~*~~*~~*~~*~~*~~*~~*~~ */
-
- main:
-
- box=boundingbox()
- parse var box n x1 x2 y1 y2 z1 z2
- cx=(x2+x1)/2
- cy=(y2+y1)/2
- cz=(z2+z1)/2
- if size='HALF' then call scale(0.5,cx cy cz)
- else call scale(2,cx cy cz)
- return