CAD AutoLisp 圆转多边形程序
lisp
(defun c:TT()
(setq ss (ssget '((0 . "CIRCLE"))));选择对象
(setq i 0);初始化
(repeat (sslength ss);开始循环
(setq ent (entget (ssname ss i)));获取选择集当中的图元名
(command "POLYGON" 5 (cdr (assoc 10 ent)) "I" (cdr (assoc 40 ent)));绘制多边形
(command "ERASE" (ssname ss i) "");删除圆
(setq i (1+ i));相加
)
(Princ)
)