创建零长度直线,代码怎么处理这样的错误
(defun c:tt ()(setq p1 (getpoint "第一点:"))
(setq p2(getpoint p1 "\n**第二点:"))
(command "xline" p1 p2 "")
(setq r (getdist "\n**+-距离:"))
(setq ang (angle p1 p2))
(setq p1up (trans (setq p(polar p1 (- ang (* 0.5 pi)) (* r))) 1 0))
(setq p2up (trans (setq p(polar p2 (- ang (* 0.5 pi)) (* r))) 1 0))
(command "line" p1 p1up "")
(command "line" p2 p2up "")
(command "xline" p1up p2up "")
)
创建零长度直线,代码怎么处理这样的错误
我也遇到这个问题了,发现是缩放得小的时候,使用command绘制直线会这样,如果放大了视图,就正常了。还没学会用生成的方式
页:
[1]