- ;; tt(连续COPY和ROTATE)
- (defun c:tt (/ ss1 p1 p2 ang s0 ss2)
- (defun rtd (ang) (* ang (/ 180 pi)))
- (if (and (setq ss1 (ssget))
- (setq p1 (getpoint "\n指定基准点: "))
- )
- (while (setq p2 (getpoint p1 "\n指定位移的第二点: "))
- (setq s0 (entlast))
- (command "_.copy" ss1 "" "non" p1 "non" p2)
- (setq ss2 (ssadd))
- (while (setq s0 (entnext s0))
- (ssadd s0 ss2)
- )
- (if (setq ang (getangle p2 "\n指定旋转角度: "))
- (setq ang (rtd ang))
- (setq ang 0.0)
- )
- (if (/= rpt 0)
- (command "_.rotate" ss2 "" "non" p2 ang)
- )
- )
- )
- (princ)
- )
|