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