发布于:2010-04-26 11:31:26
来自:建筑设计/CAD下载及教程
[复制转发]
想请教大牛们一个问题,
如下程序段两个红色的句子是分别引用autocad command 的命令,两个都可以运行.但是两个放在一起就只能运行前面一个主要是第二个会出先无效点的错误,想请问下原因和解决办法.
非常感谢
(defun c:zkx( )
(setq pa(getpoint "\n 输入第一点:"))
(setq pb(getpoint "\n 输入第二点:"))
(setq size(getreal"\n 输入箭头尺寸"))
(setq dx(- (car pb) (car pa)))...
(setq dy(- (cadr pb)(cadr pa)))
....
(setq anga (atan(/ dy dx)))
;(setq ang_l(* ang_l (/180 pi) ))
(setq anga1(+ anga 0.15))
(setq anga2(- anga 0.15))
(princ "\n the anga1 ") (princ anga1)
(princ "\n the anga2 ") (princ anga2)
(setq pa1(polar pa anga1 size))
(setq pa2(polar pa anga2 size))
(command "line" pa pa1 pa2 "c")
(setq midx(+ (car pa1) (car pa2)))
(setq midy(+ (cadr pa1) (cadr pa2)))
(command "donut" "0" "100" (list (* 0.5 midx) (* 0.5 midy)) "C" )
(command "line" pb (list (* 0.5 midx) (* 0.5 midy)) "c")
(princ)
)
全部回复(2 )
只看楼主 我来说两句抢地板回复 举报
如果要取消是用 ^C
回复 举报