- (defun c:tt ()
- (setvar "CMDECHO" 0)
- (defun tt-df (p1 p2 nn / dd rr ptn)
- (setq dd (/ (distance p1 p2) nn 1.0)
- rr (angle p1 p2)
- )
- (repeat (1- nn)
- (setq p1 (polar p1 rr dd)
- ptn (cons p1 ptn)
- )
- )
- (reverse ptn)
- )
- (setq p1 (getpoint "\n第一点: ")
- p2 (getpoint p1 "\n第二点: ")
- nn (Uint 7 "" "等分数量" nn)
- rr (angle p1 p2)
- )
- (foreach x (tt-df p1 p2 nn)(vl-cmdf "xline" x (polar x (+ rr (* pi 0.5)) 1.0) ""))
- (princ)
- )
|