AutoLISP中调用offset命令出现的问题,我想用下面的程序画三条平行多段线,可是运行时大部分不成功,结果只有两条多段线,为什么?怎么解决????急急急急急急请高手帮忙!!!!(defun c:sanxian() (setq os (getvar "osmode")) (setq p1 (getpoint "输入第一点:")) (setq p3(getpoint "输入下一点:"))
(defun c:sanxian()
(setq os (getvar "osmode"))
(setq p1 (getpoint "输入第一点:"))
(setq p3(getpoint "输入下一点:"))
(setq p2 p3)
(command "pline" p1 p2)
(while (/= p2 nil)
(setq p2 (getpoint "输入下一点:"))
(command p2)
)
(setq a (angle p1 p3))
(setq pt1 (polar p1 (+(/ pi 2) a) 0.4))
(setq pt2 (polar p1 (+(/ pi 2) a) -0.4))
(setvar "osmode" 0)
(command "offset" 0.4 p1 pt1 "")
(command "offset" 0.4 p1 pt2 "")
)