(defun c:wtr(/)
(setvar “cmdecho” 0)
(defun *error* (msg)
(setvar “osmode” oldOsmode)
)
(setq oldOsmode (getvar “osmode”))
(setvar “OSMODE” 0)
(setq pt (getpoint “nget the center point.”))
(command “_.circle” pt)
(princ (strcat “ninput the radius of circle”))
(command pause “”)
(setq cir (entlast))
(setq r (cdr (assoc 40 (entget cir))))
(command “_.circle” pt 2*r “”)
(setq enlargeCircle (entlast))
(command “_.move” enlargeCircle “” pt (setq ptt (getpoint pt)))
(command “copy” “cp”)
(setq n 0)
(repeat 180
(command (polar pt (/ (* 2 n pi) 180) r))
(setq n (+ n 1))
)
(command “” “” pt ptt)
(setvar “pickbox” 5)
(command “_.trim” cir “” “f”)
(setq n 0)
(repeat 180
(command (polar ptt (* (/ (* 2 n) 180.0) pi) (* r 1.01)))
(setq n (1+ n))
)
(command “” “”)
;(command “_.scale” “cp”)
(setq n 0)
(repeat 180
(command (polar ptt (/ (* 2 n pi) 180) r))
(setq n (1+ n))
)
;(command “” “” ptt 2 “”)
(command “redraw”)
(princ)
;(command “” “” pt (setq ptt (getpoint pt)));ok ,finish the choose and copy
;now how to get copied objects. and trim the things outside the circle.
;here I just want to trim the copied objects.
)