- (defun c:tt ()
- (setvar "CMDECHO" 0)
- (if (and (setq pt1 (getpoint "\n方框一角: "))
- (setq pt2 (getcorner pt1 "\n方框另一角: "))
- (princ "\n选择物体: ")
- (setq ss (ssget))) (progn
- (setq pm (mapcar '(lambda (a b) (/ (+ a b) 2)) pt1 pt2)
- p1 (polar pm 0 10)
- p2 (polar pm (/ pi 2) 10))
- (setq s1 (entlast) ss1 (ssadd))
- (command "_.MIRROR" ss "" pm p1 "N")
- (while (setq s1 (entnext s1)) (ssadd s1 ss1))
- (command "_.MIRROR" ss ss1 "" pm p2 "N")
- ))
- (setvar "CMDECHO" 1)
- (princ)
- )
|