AutoCAD LISP花型图案一
2011-03-27 23:35 精诚所至 金石为开 阅读(393) 评论(0) 编辑 收藏 举报AutoCAD LISP花型图案一,代码如下。
(defun c:test()
(setq cen1 (getpoint "\n中心点:"))
(setq rr (getdist cen1 "\n半径:"))
(setq nn (getint "\n等分数:"))
(if (null nn) (setq nn 10))
(setq ang (/ pi nn 0.5))
(setq pt1 (polar cen1 0 rr))
(setq pt2 (polar cen1 ang rr))
(command "pline" cen1 pt1 "a" "a" 180 pt2 "")
(command "array" (entlast) cen1 "" "p" cen1 nn "" "")
)
代码完。