求大佬用AUTO LISP语言编写一个图(ಥ_ಥ)
1个回答
展开全部
(defun c:abc()
(setq ptx (getpoint "\n输入圆心点:"))
(setq rr (getdist ptx "\n指定半径:"))
(setvar "cmdecho" 0)
(setq oldos (getvar "osmode"))
(setvar "osmode" 0)
(command "circle" ptx rr)
(setq ang1 (/ pi 2) ang2 (/ pi 3))
(setq nn 0)
(repeat 6
(setq pt1 (polar ptx (+ ang1 (* nn ang2)) rr))
(setq pt2 (polar ptx (+ ang1 (* (+ 2 nn) ang2)) rr))
(command "line" pt1 pt2 "")
(if (zerop (rem nn 2))
(command "arc" pt1 ptx pt2)
)
(setq nn (1+ nn))
)
(setvar "osmode" oldos)
(setvar "cmdecho" 1)
(princ)
)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询