(defun C:chp()
(setq ps (cdr (assoc 10 (entget (entnext)))))
(setq pe (cdr (assoc 11 (entget (entnext)))))
(setq L (distance ps pe))
(setq ps1 (cdr (assoc 10 (entget (entlast)))))
(setq pe1 (cdr (assoc 11 (entget (entlast)))))
(setq L1 (distance ps1 pe1))
(setq n 1)(repeat 12
(repeat 500000 (princ))
(setq pxn (+ (car ps) (* L (cos (- (angle ps pe) (* (/ pi 6) n))))))
(setq pyn (+ (cadr ps) (* L (sin (- (angle ps pe) (* (/ pi 6) n))))))
(setq npt (list 11 pxn pyn 0)) (setq npt1 (list 10 pxn pyn 0))
(entmod (subst npt (assoc 11 (entget (entnext))) (entget (entnext))))
(entmod (subst npt1 (assoc 10 (entget (entlast))) (entget (entlast))))
(setq n (+ n 1))
)
)
沒有留言:
張貼留言