|
;;;旋转复制实体(以角度)
: j% ]& S% g) b, |% N( H0 G, ^5 Z+ H% K" E3 W
(defun c:copyrt(/ ss r p1 osm jd s)
, u) u1 ?( ]1 {(setvar "cmdecho" 0)
! U- P9 ~1 |- k7 Q) u" t6 y7 X(setq jd (getvar "auprec"))0 [; d8 S& r9 x. l5 `. Z+ ?2 }
(setvar "auprec" 5), Q) Q# a& N5 o$ i( q* I1 e
(setq osm (getvar "osmode"))
9 [( i. [% _! s- u( K0 `* W$ v* j0 z(princ "\n ***** 旋转复制实体程序 ***** ")
) ~4 X0 e1 a z* m# s(princ "\n 请选择旋转复制的实体:")8 o1 j3 @$ f( {! B0 e1 [
(setq ss (ssget))
8 q6 d D' R" [5 M4 `(if (= ss nil)(progn (princ "\n 请选择旋转复制的实体:")(setq ss (ssget))))+ r$ t" L% K) F
(if (= ss nil)(progn (alert "\n您未选择有效的复制实体!请选择!")(setq ss (ssget))))
7 p) H1 L1 K4 R(setq p1 (getpoint "\n 请选择圆心点:"))
0 p2 O: P6 [( f0 D2 c(if (= p1 nil)(setq p1 (getpoint "\n 请选择圆心点:")))
2 R; [& l8 K$ G, D, Y% T(command ".copy" ss "" p1 p1). A8 }- I9 ?3 D( b) O
(command ".rotate" ss "" p1 "r" "0" pause)7 d+ e- N- {3 g" [. D3 \! @/ {5 I, C& R
(princ "\n 旋转复制完成!")
+ ^4 a9 [0 w! ~$ I1 ^) R$ C(command ".redraw")
5 x, d; f4 g) m+ p$ N6 q- ^" _. T(setvar "osmode" osm)8 X! o. w1 [# m6 m c! X/ i- D
(setvar "auprec" jd)
1 S ~! E! Z* }3 V$ S7 f% s(princ)
0 P! v+ a! D. s) |
|