 - (defun c:tt ()
- (setq p1 (getpoint "画图起始位置"))
- (setq w (getdist "\n距离:"))
- (setq jd (getdist "\n角度:1水平右 2水平左 3直角右 4直角左"))
- (if (=1 jd 1) (setq jd 0))
- (if (=2 jd 2) (setq jd 180))
- (if (=3 jd 3) (setq jd 90))
- (if (=4 jd 4) (setq jd -90))
- (setq ang (* (/ jd 180) 3.1415926))
- (setq p2 (polar p1 ang w))
- (command "line" p1 p2 "")
- (setq x 0)
- (while (and (setq px p2)
- (setq w (getdist "\n距离:"))
- (setq jd (getdist "\n角度:"))
- (setq jd (getdist "\n角度:1水平右 2水平左 3直角右 4直角左"))
- (if (=1 jd 1) (setq jd 0))
- (if (=2 jd 2) (setq jd 180))
- (if (=3 jd 3) (setq jd 90))
- (setq ang (* (/ jd 180) 3.1415926))
- (setq p2 (polar px ang w))
- (command "line" px p2 "")
- )
- )
- )
代码测试好像有点不行,没有找到问题 |