home *** CD-ROM | disk | FTP | other *** search
- ;******FA\3DRXLT.LSP****** 10-17-89
- (defun C:3DARC ( )
- (parc0)
- (setq wcy 1)
- (while wcy
- (setq wxr (getstring "\n Rx/JM/JX/Sx/ZU/ZI/Lim
- <or RETURN for none>:"))
- (if (= wxr "") (setq wcy nil))
- (if (= (substr wxr 1 1) "R") (rx))
- (if (= (substr wxr 1 2) "JM") (jm))
- (if (= (substr wxr 1 2) "JX") (jx))
- (if (= (substr wxr 1 1) "S") (sx))
- (if (= (substr wxr 1 2) "ZU") (lzu))
- (if (= (substr wxr 1 2) "ZI") (lzui))
- (if (= (substr wxr 1 1) "L") (larc))
- (if (/= wxr "") (rparc0))
- )
- )
- (defun ests ( )
- (setvar "elevation" se)
- (setvar "thickness" st)
- )
- (defun e0t0 ( )
- (setq se (getvar "elevation"))
- (setq st (getvar "thickness"))
- (setvar "elevation" 0.0)
- (setvar "thickness" 0.0)
- )
- (defun parc0 ( )
- (setq c1 (getpoint "\n enter point c1:"))
- (setq xc (car c1) yc (cadr c1))
- (command "text" c1 (* 500 tb) 0.0 "C1")
- (setq hc (getdist "\n enter height hc <0>:" c1))
- (if (null hc) (setq hc 0.0))
- (setq rmin (getdist "\n enter Rmin:" c1))
- (setq rmax (getdist "\n enter Pmax:" c1))
- (setq aa (getreal "\n enter angle AA<360>:"))
- (if (null aa) (setq aa 360)) (setq aa (* pi (/ aa 180)))
- (setq n (getint "\n enter int n:"))
- (setq an (/ aa n)) (setq n (+ n 1))
- (setq a1 (getangle "\n enter angle A1<0>:" c1))
- (if (null a1) (setq a1 0))
- )
- (defun rparc0 ( )
- (setq nr (getdist "\n enter new r <old>:" c1))
- (if (null nr) (setq nr r) (setq r nr))
- (setq nhc (getdist "\n enter new hc <old>:" c1))
- (if (null nhc) (setq nhc hc) (setq hc nhc))
- )
- (defun sx (/ caf)
- (setq h12 (getdist "\n enter h12 <0>:" c1))
- (if (null h12) (setq h12 0.0))
- (setq dh (getreal "\n enter height of SX:"))
- (e0t0) (setvar "thickness" dh)
- (setq k 0)
- (while (> n k)
- (setq caf (+ a1 (* an k)))
- (setvar "elevation" (+ (* k h12) hc))
- (command "point" (polar c1 caf r))
- (setq k (1+ k))
- )
- (ests)
- )
- (defun rx01 (/ caf 3dpx 3dpy 3dph)
- (setq caf (+ (* k an) a1))
- (setq 3dp (polar c1 caf r))
- (setq 3dpx (car 3dp) 3dpy (cadr 3dp))
- (setq 3dph (+ hc (* k h12)))
- (setq 3dp (list 3dpx 3dpy 3dph))
- )
- (defun rx ( )
- (setq h12 (getdist "\n enter h12 <0>:" c1))
- (if (null h12) (setq h12 0.0))
- (setq k 0) (rx01) (setq 3dp1 3dp)
- (setq k 1)
- (while (> n k)
- (rx01) (setq 3dp2 3dp)
- (command "3dline" 3dp1 3dp2 "")
- (prompt "Working...")
- (setq 3dp1 3dp2)
- (setq k (1+ k))
- )
- )
- (defun larc01 (/ aa saa caa)
- (setq aa (+ (* k an) a1))
- (setq saa (sin aa))
- (setq caa (cos aa))
- (setq 3dp (polar c1 af (* r caa)))
- (setq 3dpx (car 3dp) 3dpy (cadr 3dp))
- (setq 3dph (+ hc (* r saa)))
- (setq 3dp (list 3dpx 3dpy 3dph))
- )
- (defun larc ( )
- (setq af (getangle "\n enter angle Af<0>:" c1))
- (if (null af) (setq af 0.0))
- (setq k 0) (larc01) (setq 3dp1 3dp)
- (setq k 1)
- (while (> n k)
- (larc01) (setq 3dp2 3dp)
- (command "3dline" 3dp1 3dp2 "")
- (prompt "Working...")
- (setq 3dp1 3dp2)
- (setq k (1+ k))
- )
- )
- (defun lzu (/ aa1)
- (setq h12 (getdist "\n enter h12 <0>:" c1))
- (if (null h12) (setq h12 0.0))
- (e0t0) (setvar "thickness" h12)
- (setvar "elevation" hc)
- (command "line" (polar c1 a1 r) (polar c1 (+ a1 an) r) "")
- (setq aa1 (* (/ aa pi) 180))
- (command "array" "l" "" "p" c1 n aa1 "")
- (ests)
- )
- (defun lzui (/ aa1 hc1)
- (setq h12 (getdist "\n enter h12 <0>:" c1))
- (if (null h12) (setq h12 0.0))
- (setq 3dp1 (list xc yc (+ hc h12)))
- (setq hc1 (list hc))
- (setq 3dp2 (polar c1 a1 r)) (setq 3dp2 (append 3dp2 hc1))
- (setq 3dp3 (polar c1 (+ a1 an) r)) (setq 3dp3 (append 3dp3 hc1))
- (command "3dline" 3dp1 3dp2 3dp3 "")
- (setq aa1 (* (/ aa pi) 180))
- (command "array" "l" 3dp1 "" "p" c1 n aa1 "")
- )
- (defun jm (/ caf)
- (setq h12 (getdist "\n enter h12 <0>:" c1))
- (if (null h12) (setq h12 0.0))
- (setq dr (getdist "\n enter real dr:" c1))
- (e0t0) (setvar "thickness" h12)
- (setq k 0)
- (while (> n k)
- (setq caf (+ a1 (* an k)))
- (setvar "elevation" (+ (* k h12) hc))
- (setq 3dp1 (polar c1 caf r))
- (command "line" 3dp1 (polar 3dp1 caf dr) "")
- (setq k (1+ k))
- )
- (ests)
- )
- (defun jx01 (/ caf 3dpx 3dpy)
- (setq caf (+ (* k an) a1))
- (setq 3dp (polar c1 caf r))
- (setq 3dpx (car 3dp) 3dpy (cadr 3dp))
- (setq 3dp (list 3dpx 3dpy 3dph))
- )
- (defun jx ( )
- (setq h12 (getdist "\n enter h12 <0>:" c1))
- (if (null h12) (setq h12 0.0))
- (setq k 0) (setq 3dph hc) (jx01) (setq 3dp1 3dp)
- (setq k 1)
- (while (> n k)
- (jx01) (setq 3dp2 3dp)
- (setq 3dph (+ hc (* k h12)))
- (jx01) (setq 3dp3 3dp)
- (command "3dline" 3dp1 3dp2 3dp3 "")
- (prompt "Working...")
- (setq 3dp1 3dp3)
- (setq k (1+ k))
- )
- )