|
;;;旋转复制实体(以角度)2 A( Q# |/ l0 N" p/ q! a
# `4 d% E$ a& s7 c% s5 V$ s(defun c:copyrt(/ ss r p1 osm jd s)# B" F! o* ~/ e
(setvar "cmdecho" 0)/ O2 F3 G( J; {& j! b
(setq jd (getvar "auprec"))) X; `- m: Z8 Q# C
(setvar "auprec" 5)
8 P7 `' ]$ h, o' ~(setq osm (getvar "osmode"))/ w7 r( n& i3 q: ?% i- \9 y
(princ "\n ***** 旋转复制实体程序 ***** ")
& }7 ^+ h1 ~3 E% k/ @& E0 b2 I [) M(princ "\n 请选择旋转复制的实体:")
- [/ }# {+ s) v3 W/ \3 \2 z2 K(setq ss (ssget))0 `7 Y- H, }% T( m
(if (= ss nil)(progn (princ "\n 请选择旋转复制的实体:")(setq ss (ssget))))! [3 L% B x1 B* J" t0 g+ a1 E" t1 ?
(if (= ss nil)(progn (alert "\n您未选择有效的复制实体!请选择!")(setq ss (ssget))))0 f& ~1 S8 \2 k/ g3 h
(setq p1 (getpoint "\n 请选择圆心点:"))* M; w) i g, g2 y/ q+ y
(if (= p1 nil)(setq p1 (getpoint "\n 请选择圆心点:")))2 N$ a( P* O# y# t) Q3 l( }
(command ".copy" ss "" p1 p1)
. d+ j5 w6 f* N* I4 r(command ".rotate" ss "" p1 "r" "0" pause)) g% n2 ?2 @+ y* C# I. W
(princ "\n 旋转复制完成!")7 |# s. f& w5 z" t# e
(command ".redraw"), |( k! c/ |6 Q8 o/ x, R9 z
(setvar "osmode" osm)) T$ c F. H/ G9 x) ]
(setvar "auprec" jd)6 k W8 B4 @7 b+ O
(princ)0 }- V+ Z, h8 Z2 J! M3 K
) |
|