圆弧变圆
选择圆弧-运行程序命令回车-变成圆 用lisp怎样写这个程序圆弧变圆deby
(defun c:deby()
(princ "\n 右键确定")
(setq ss(ssget '((0 . "ARC" ))))
(setq len(sslength ss))
(setq i -1)
(repeat len
(setq i (1+ i))
(setq en1(ssname ss i))
(setq e1 (entget en1))
(setq o (cdr (assoc 10 e1))
r (cdr (assoc 40 e1))
p0 (cdr (assoc 50 e1))
pn (cdr (assoc 51 e1)))
(command "circle" o r ))
(command "erase" ss "")
(princ)
) 能删除重复圆吗? de158168 发表于 2021-3-4 14:02
圆弧变圆deby
(defun c:deby()
(princ "\n 右键确定")
能不能不要“右键确定”, 就是点圆弧就直接变成圆,不需要再按右键 (defun c:deby ()
;;;(princ "\n 右键确定")
(while
(setq ss (ssget '((0 . "ARC"))))
(setq len (sslength ss))
(setq i -1)
(repeat len
(setq i (1+ i))
(setq en1 (ssname ss i))
(setq E1 (entget en1))
;;; (setq o(cdr (assoc 10 e1))
;;; r(cdr (assoc 40 e1))
;;; p0 (cdr (assoc 50 e1))
;;; pn (cdr (assoc 51 e1))
;;; )
;;;(command "circle" o r )
(entmake (list (cons 0 "circle")
(assoc 8 e1)
(assoc 10 e1)
(assoc 40 e1)
)
)
(entdel en1)
)
)
;;;(command "erase" ss "")
(princ)
)
页:
[1]