Новая версия сайта, доступна здесь.
3d Орбита
eea-time-3dorbit.gif (1,7 MБ)
eea-3dorbit.LSP
;; eea-3dorbit.lsp (defun eea-time-3dorbit (/ s) ;| ***************************************************************************************** by ElpanovEvgeniy Программная защита против остановки работы программы. Создана для запуска программы my-3dorbit на определенное время. Создана в помощь nivuahc на форуме theswamp.org первоисточник: http://www.theswamp.org/index.php?topic=12382.msg153796#msg153796 Дата создания 15.09.2006 последняя редакция 18.09.2006 ***************************************************************************************** Program protection against a stop of work of the program. It is created for program start my-3dorbit for certain time. It is created in the help nivuahc at a forum theswamp.org The primary source: Date of creation 15.09.2006 Last edition 18.09.2006 (eea-time-3dorbit) ***************************************************************************************** |; (princ "\n tiner set 60 sec ") (setq s ((lambda (sec) (+ (* 86400 (- sec (fix sec))) 60)) (getvar "DATE"))) (while (> s ((lambda (sec) (* 86400 (- sec (fix sec)))) (getvar "DATE"))) (VL-CATCH-ALL-APPLY (function eea-3dorbit) (list s)) ) ;_ while (princ) ) ;_ defun (defun eea-3dorbit (sec / PT1 PT2 R S V V1 VD W) ;| ***************************************************************************************** by ElpanovEvgeniy Программная реализация команды "3dorbit", написанная на лиспе. Аргумент - время окончания работы программы в секундах. Создана в помощь nivuahc на форуме theswamp.org первоисточник: http://www.theswamp.org/index.php?topic=12382.msg153796#msg153796 Дата создания 15.09.2006 последняя редакция 18.09.2006 ***************************************************************************************** Program realisation of a command "3dorbit", written on LISP. Argument - time of the termination of work of the program in seconds. It is created in the help nivuahc at a forum theswamp.org The primary source: Date of creation 15.09.2006 Last edition 18.09.2006 (eea-3dorbit ((lambda (sec) (+ (* 86400 (- sec (fix sec))) 60)) (getvar "DATE"))) ***************************************************************************************** |; (if (tblsearch "VIEW" "tmp1") (setq v1 (tblobjname "VIEW" "tmp1") pt2 (trans (cadr (grread nil 5)) 1 2) ) ;_ setq (setq v1 (entmakex (list '(0 . "VIEW") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbViewTableRecord") '(2 . "tmp1") '(70 . 0) (cons 40 (getvar "VIEWSIZE")) (cons 10 (getvar "VIEWCTR")) (cons 41 (* (getvar "VIEWSIZE") (apply (function /) (getvar "SCREENSIZE"))) ) ;_ cons (cons 11 (getvar "VIEWDIR")) '(12 0. 0. 0.) (cons 42 (getvar "LENSLENGTH")) (cons 43 (getvar "FRONTZ")) (cons 44 (getvar "BACKZ")) (cons 50 (getvar "VIEWTWIST")) (cons 71 (getvar "VIEWMODE")) '(281 . 6) '(72 . 0) ) ;_ list ) ;_ entmakex pt2 (trans (cadr (grread nil 5)) 1 2) ) ;_ setq ) ;_ if (while (and (= (car (setq pt1 (grread nil 5))) 5) (> sec ((lambda (sec) (* 86400 (- sec (fix sec)))) (getvar "DATE"))) ) ;_ and (setq r (/ (getvar "VIEWSIZE") 4.) w (trans (getvar "VIEWCTR") 1 2) pt1 (trans (cadr pt1) 1 2) v (trans ((lambda (x1 y1 x2 y2) (list (- x1 x2) (- y1 y2) (- (sqrt (abs (- (* R R) (* x1 x1) (* y1 y1)))) (sqrt (abs (- (* R R) (* x2 x2) (* y2 y2)))) ) ;_ - ) ;_ list ) ;_ lambda (- (car pt2) (car w)) (- (cadr pt2) (cadr w)) (- (car pt1) (car w)) (- (cadr pt1) (cadr w)) ) 2 1 ) ;_ trans pt2 pt1 s (/ r (distance '(0. 0. 0.) (getvar "VIEWDIR"))) vd (mapcar (function (lambda (x) (* x s))) (getvar "VIEWDIR")) v (mapcar (function +) vd v) s (/ r (distance '(0. 0. 0.) v)) v ((lambda (s) (list (* (car v) s) (* (cadr v) s) (* (caddr v) s))) (/ r (distance '(0. 0. 0.) v)) ) w (* (/ r (getvar "VIEWSIZE")) (* (getvar "VIEWSIZE") (apply (function /) (getvar "SCREENSIZE"))) 4. ) ;_ * ) ;_ setq (entmod (list (cons -1 v1) '(0 . "VIEW") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbViewTableRecord") '(2 . "tmp1") '(70 . 0) (cons 40 (getvar "VIEWSIZE")) (cons 10 (trans (getvar "VIEWCTR") 1 2)) (cons 41 (* (getvar "VIEWSIZE") (apply (function /) (getvar "SCREENSIZE")))) (cons 11 v) '(12 0. 0. 0.) (cons 42 (getvar "LENSLENGTH")) (cons 43 (getvar "FRONTZ")) (cons 44 (getvar "BACKZ")) (cons 50 (getvar "VIEWTWIST")) (cons 71 (getvar "VIEWMODE")) '(281 . 6) '(72 . 0) ) ;_ list ) ;_ entmod (entupd v1) (setview (tblsearch "VIEW" "tmp1")) ) ;_ while ) ;_ defun ;|«Visual LISP© Format Options» (80 1 2 2 T " " 80 60 0 0 0 nil nil nil T) ;*** DO NOT add text below the comment! ***|;