- (defun c:tt (/ ang gr p1 p2 prpt)
- (if (setq p1 (getpoint "\basepoint: "))
- (while (and (setq gr (grread t 15 0)) (/= (car gr) 3))
- (redraw)
- (cond
- ((= (car gr) 5)
- (setq prpt (cadr gr))
- (setq ang (angle p1 prpt))
- (if (= (getvar 'ORTHOMODE) 1)
- (cond
- ((or (and (> ang (* pi 0.25)) (< ang (* pi 0.75)))
- (and (> ang (* pi 1.25)) (< ang (* pi 1.75)))
- )
- (setq p2 (list (car p1) (cadr prpt)))
- )
- (t
- (setq p2 (list (car prpt) (cadr p1)))
- )
- )
- (setq p2 prpt)
- )
- (grdraw p1 p2 3)
- )
- ((equal gr '(2 15))
- (if (= (getvar 'ORTHOMODE) 1)
- (setvar 'ORTHOMODE 0)
- (setvar 'ORTHOMODE 1)
- )
- )
- )
- )
- )
- )
|