镜像处理只部份理解 ...
- (defun jk1 (msg blk)
- (princ msg)
- (setq ss (ssget)
- pt (getpoint "\nBase point: ")
- )
- (command "_block" blk "non" pt ss "")
- (command "_insert" blk "non" pt "" "" "")
- )
- (defun jk2(msg blk)
- (princ msg)
- (setq ss (ssget)
- pt (getpoint "\nBase point: ")
- )
- (command "_block" blk "y" "non" pt ss "")
- (command "_insert" blk "non" pt "" "" "")
- )
- (defun c:c1 ();/ pt ss)
- (if (tblsearch "block" "C1")
- (progn
- (initget 1 "C")
- ;; 提示((C)重新建C1块)的可选项
- (setq pt (getpoint "\nInsert point or (C)重新建C1块: "))
- (cond
- ((= pt "C") (jk2 "重新建C1块: " "C1"))
- (T
- ;; 添加一个将 (“C1块”镜像后插入)的可选项
- (initget "No Yes")
- (setq ans (GetKword "\n “C1块”要镜像吗?: <No> / Yes: "))
- (command "_insert" "C1" "non" pt "" "" "")
- ;; Mirror
- (cond
- ((= ans "Yes")
- ;; 此处仍得探讨
- (command "Mirror" (entlast) "" "non" pt)
- (while (= (logand (getvar "CmdActive") 1) 1) (command pause))
- )))))
- (jk1 "\n请选择创建块C1的图元: " "C1")
- )
- (princ)
- )
|