mit 发表于 2022-7-5 18:44:33

Lisp在s上自动绘制圆

大家好,
我是autolisp新手。有人能用lisp在选定的对象上自动绘制圆吗。我希望你们能帮我解决这个问题(下图)

jonathann3891 发表于 2022-7-5 19:13:23

已删除邮件

jonathann3891 发表于 2022-7-5 19:28:08

http://www.cadtutor.net/forum/showthread.php?52530-绘制多段线所有顶点的圆
 
(defun C:PCIRC (/coords ent rad)
(setq rad (getreal"\nEnter radius: "))
         (while (setq ent (entsel "\nSelect polyline (or press Enter to Exit) >> "))
         (setq ent (car ent))
      (setq coords (vl-remove-if 'not
      (mapcar
      (function (lambda(p)
      (if (= 10 (car p))(cdr p))))
      (entget ent))))
      
      (foreach pt coords
(command "_circle" "_non" pt rad)   
   )
         )
         (princ)
)

mit 发表于 2022-7-5 19:52:25

啊哈
非常感谢。
页: [1]
查看完整版本: Lisp在s上自动绘制圆