;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; ;;;; ;;;; Copyright (c) Jun. 1996 by Takehiko Nagakura. ;;;; ;;;; All rights reserved. ;;;; ;;;; ;;;; ;;;; Do not copy, use, modify or distribute this software ;;;; ;;;; without written permission by Nagakura. Nagakura will ;;;; ;;;; not be responsible for any consequence of its use. ;;;; ;;;; ;;;; ;;;; Takehiko Nagakura (e-mail: takehiko@mit.edu) ;;;; ;;;; Massachusetts Institute of Technology ;;;; ;;;; 77 Massachusetts Ave. 10-472M, Cambridge, MA 02139 ;;;; ;;;; ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Last updated Jan 29, 1999 by TN ;;;; updated Dec 29, 1996 by TN ;;;; ;;;; Loading this batch script draws a bathroom stool. ; 0) set off osnap just in case (command "osnap" "off") ; 1) I set up 3 layers I need. (command "layer" "new" "axis" "color" "red" "axis" "") (command "layer" "new" "outline" "color" "white" "outline" "") (command "layer" "new" "lid" "color" "8" "lid" "") ; 2) Axis is drawn on layer "axis" (command "layer" "set" "axis" "") (command "line" (list -25 0) (list 25 0) "") (command "line" (list 0 -50) (list 0 35) "") ; 3) Outline of the stool is drawn on layer "outline" (command "layer" "set" "outline" "") (command "line" (list -18 -26) (list 18 -26) (list 18 -40) (list -18 -40) "c") (command "pline" (list -10 -26) (list -17 -2) "arc" (list 17 -2) "line" (list 10 -26) "" ) ; 4) The lid is drawn on layer "lid" (command "layer" "set" "lid" "") (command "ellipse" (list -16 0) (list 16 0) (list 0 20)) ; 6) adjust the view ; AutoCAD can only select objects in the visible area of the graphics ; window. Thus, I need to shrink the window first. (command "plan" "") (command "zoom" (list -160 -130) (list 180 120)) ; 7) copy, rotate, mirror and scale the graphics in a rectangle area ; specified by (-30, -55) and (30, 40) (command "copy" "win" (list -30 -55) (list 30 40) "" (list 0 0) (list 120 0)) (command "rotate" "win" (list 90 -55) (list 150 40) "" (list 120 0) 90) (command "mirror" "win" (list -30 -55) (list 30 40) "" (list -70 -40) (list 0 150) "no") (command "scale" "win" (list -30 -55) (list 30 40) "" (list 0 0) 2) ; 8) adjust the view (command "zoom" ".7x") (command "regen")