wizman Posted June 6, 2009 Share Posted June 6, 2009 simple spinner from lispgen: http://www.beowolftech.com/lispgen/spinner.html Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 6, 2009 Author Share Posted June 6, 2009 I think this is better Wiz: (defun c:spinner (/ ss Objs Ang cnt) (vl-load-com) (if (setq ss (ssget)) (progn (setq Objs (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))) Ang (/ pi 1000) cnt 0) (while (< cnt 4000) (mapcar (function (lambda (Obj) (vla-rotate Obj (vlax-3D-point (getvar "VIEWCTR")) Ang) (vla-update Obj))) Objs) (setq cnt (1+ cnt))))) (princ)) Quote Link to comment Share on other sites More sharing options...
wizman Posted June 7, 2009 Share Posted June 7, 2009 I think this is better Wiz: .. i like yours also lee, i always like spinners, here's another one: (defun c:cx ( / counter old_csize old_snpang *error*) (defun *error* (errmsg) (setvar 'cursorsize old_csize) (setvar 'snapang old_snpang) ) (setq old_csize (getvar 'cursorsize) old_snpang (getvar 'snapang) ) (setvar 'snapang 0) (setvar 'cursorsize 5) (setq counter 0) (while (/= counter 360) (command "snapang" counter) (setvar 'cursorsize (+ 5 (getvar 'cursorsize))) (getint "\npress spacebar\n") (setq counter (+ 30 counter)) ) (*error* nil) (princ) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 7, 2009 Author Share Posted June 7, 2009 Nice one Wizman Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 7, 2009 Author Share Posted June 7, 2009 Another: (defun c:spin (/ i j lst dis gr cir cnt k) (setq i -5 lst '() cir '() k -1 cnt 100 dis (* (/ (getvar 'CURSORSIZE) 100.) (getvar 'VIEWSIZE))) (while (eq (car (setq gr (grread nil 5 0))) 5) (redraw) (setq j -1 lst nil i (+ 5 i) cir nil cnt (1+ cnt)) (repeat 400 (setq lst (append lst (list (polar (cadr gr) (* (+ (setq j (1+ j)) i) (/ pi 300.)) dis))))) (repeat 400 (setq cir (append cir (list (polar (car lst) (* (setq k (1+ k)) (/ pi 200.)) (/ dis 10.)))))) (grvecs (append (list (rem (/ cnt 100) 255)) lst cir))) (princ)) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.