autolisp程序显示 错误: 输入的列表有缺陷 求大神帮看下 30
(defunC:WC()(setqp1(getpoint"\n基准点:"))(setqn(getint"\n边数:"))(setql(getdist"\n边长:"))(s...
(defun C:WC ()
(setq p1 (getpoint "\n基准点:"))
(setq n (getint "\n边数:"))
(setq l (getdist "\n边长:"))
(setq a (getangle "\n起始角度:"))
(setq r1 (getreal "\n圆的半径:"))
(setq i 1
b (/ (* 2 pi) n)
)
(command "pline" p "w" 0.5 0.5)
(while (<= i n)
(setq pp (polar p a s))
(command pp)
(setq i (+ i 1)
p pp
a (+ a b)
)
)
(setq r2 (* l (/ (sqrt 3) 2)))
(setq p2 (list (+ (car p1)(/ l 2)) (+ (cadr p1) r2)))
(command "circle" p2 r2)
(command "circle" p2 r1)
这是一个画六角螺母的程序 展开
(setq p1 (getpoint "\n基准点:"))
(setq n (getint "\n边数:"))
(setq l (getdist "\n边长:"))
(setq a (getangle "\n起始角度:"))
(setq r1 (getreal "\n圆的半径:"))
(setq i 1
b (/ (* 2 pi) n)
)
(command "pline" p "w" 0.5 0.5)
(while (<= i n)
(setq pp (polar p a s))
(command pp)
(setq i (+ i 1)
p pp
a (+ a b)
)
)
(setq r2 (* l (/ (sqrt 3) 2)))
(setq p2 (list (+ (car p1)(/ l 2)) (+ (cadr p1) r2)))
(command "circle" p2 r2)
(command "circle" p2 r1)
这是一个画六角螺母的程序 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询