- (defun c:drawflower()
- (setq pointcenter(getpoint))
- (setq n 1 oldp pointcenter ss (ssadd))
- (while(and(setq grcode(grread t 12))(= (car grcode) 5))
- (if (<= n 254)(setq n (+ n 1))(setq n 1))
- (if (and (/= oldp pointcenter)(/= oldp (cadr grcode)))
- (command "erase" ss "")
- )
- (entmake (list '(0 . "CIRCLE") (cons 10 pointcenter)
- (cons 40 (setq r(distance pointcenter (cadr grcode))))
- (cons 62 n)
- )
- )
- (setq e1 (entlast))
- (ssadd e1 ss)
- (if (> r 0)
- (progn
- (command "arc" (polar pointcenter (/ pi 6) r )pointcenter(polar pointcenter (* 5(/ pi 6)) r))
- (command "arc" (polar pointcenter (/ pi 6) r )pointcenter(polar pointcenter (* 9(/ pi 6)) r))
- (command "arc" (polar pointcenter (* 3(/ pi 6))r)pointcenter(polar pointcenter (* 7(/ pi 6)) r))
- (command "arc" (polar pointcenter (* 3(/ pi 6)) r )pointcenter(polar pointcenter (* 11(/ pi 6)) r))
- (command "arc" (polar pointcenter (* 5(/ pi 6)) r )pointcenter(polar pointcenter (* 9(/ pi 6)) r))
- (command "arc" (polar pointcenter (* 7(/ pi 6)) r )pointcenter(polar pointcenter (* 11(/ pi 6)) r))
- )
- )
- (while(setq e1 (entnext e1))
- (ssadd e1 ss)
- (vla-put-color (vlax-ename->vla-object e1)(if (<= n 205)(setq n (+ n 50))(setq n (- n 32))))
- )
- (setq oldp (cadr grcode))
- )
- (princ)
- )
|