CAD参数绘图问题
分析以下三段AUTOLISP程序,写出每个语句起什么作用?最后该程序完成什么功能?①
(defunc:erasescr( / l u)
(graphscr)
(setql(getvar "limmin"))
(setqu(getvar "limmax"))
(command "erase""W"lu “”)
)
②
(defunp3 ( )
(setqr(getreal“\nnumber:”))
(setqmaxrrminrr)
(whiler
(if(>rmaxr)(setqmaxrr))
(if(<rminr)(setqminrr))
(setqr(getreal“\nnumber<returnwhendone>:” ))
))
③
(defun c:akey (/ d h w bp ag p1 p2)
(setq d(/ (getdist “\n d=?”) 2.0)
h(getdist “\n h=?”)
w(/ (getdist “\n w=?”) 2.0)
bp(getpoint “\n center=?”)
ag(atan (/ w ( sqrt (- (* d d) (* w w))))))
(command “pline”
(setqp1 (polarbp(- ag) d))
(setqp2 (list (+ (car bp) (- d h)) (cadr p1)))
(polarp2 (/ pi 2.0)(* w 2))
(polarbp ag d)
“a”“ce”bpp1“”)
(setqss(entlast))
(command“hatch”“u”4510“”ss“”)
) 有没有答案啊
页:
[1]