home *** CD-ROM | disk | FTP | other *** search
- (defun input (sl m)
- ;(SETVAR "CMDECHO" 0)
- (MENUCMD "S=IN1")
- (if (= sl 0)(setq l (getreal "\n╩Σ╚δ│ñ╢╚:(═¿┐╫) ")))
- (if (= sl 1)(setq l (getstring "\n╩Σ╚δ│ñ╢╚=:(═¿┐╫) ")))
- (if (or (= l "t")(= l ""))(setq l "T"))
- (if (and (= sl 1) (/= l "T"))(setq l (atof l)))
- (if (and (= ed "l")(= l "T"))
- (setq l (- (car fpt) xf) l (/ l s))
- )
- (if (and (/= ed "l")(= l "T"))
- (setq l (- m xb) l (/ l s))
- )
- (setq schl 0 xchl 0)
- (MENUCMD "S=IN2")
- (setq yn (getstring "\n╙╨ ╣½ ▓ε ╖±(N)? "))
- (MENUCMD "S=IN1")
- (if (= yn "")(setq yn "n" schl 0 xchl 0))
- (if (or (= yn "y") (= yn "Y"))(progn
- (setq schl (getreal "\n╔╧ ╞½ ▓ε=: "))
- (setq xchl (getreal "\n╧┬ ╞½ ▓ε=: "))
- )
- )
- (setq angl 0 angr 0)
- (setq dgl (getreal "\n╫≤ ╡╣ ╜╟ │ñ ╢╚=:(0) "))
- (if (null dgl)(setq dgl 0))
- (if (> dgl 0)(setq angl (getreal "\n╫≤ ╡╣ ╜╟=: ")))
- (if (= dgl 0)(progn
- (setq dgl (getreal "\n╫≤ ╡╣ ╘▓ ┴┐=:(0) "))
- (if (null dgl)(setq dgl 0))
- (if (/= dgl 0)(setq dgl (- 0 dgl)))
- ))
- (setq dgr (getreal "\n╙╥ ╡╣ ╜╟ │ñ ╢╚=:(0) "))
- (if (null dgr)(setq dgr 0))
- (if (> dgr 0)(setq angr (getreal "\n╙╥ ╡╣ ╜╟=: ")))
- (if (= dgr 0)(progn
- (setq dgr (getreal "\n╙╥ ╡╣ ╘▓ ┴┐=:(0) "))
- (if (null dgr)(setq dgr 0))
- (if (/= dgr 0)(setq dgr (- 0 dgr)))
- ))
- (setq yn "")
- (MENUCMD "S=SCREEN")
- )
- ;******************************************************
- ;* The function for drawing cylinder. *
- ;******************************************************
- (defun yzh (sl m)
- ;(SETVAR "CMDECHO" 0)
- (MENUCMD "S=IN2")
- (initget (+ 1 2 4) "l L r R")
- (setq ed (getkword "\n╤╙╔∞╖╜╧≥ : ╫≤(L) / ╙╥(R)"))
- (MENUCMD "S=IN1")
- (setq dr (getreal "\n╩Σ ╚δ ╓▒ ╛╢=: "))
- (setq dgch " ")
- (MENUCMD "S=IN2")
- (setq yn (getstring "\n╙╨ ┼Σ ║╧ ╛½ ╢╚ ╖±(N)? "))
- (if (null yn)(setq yn "n" dgch " "))
- (IF (= SL 0) (MENUCMD "S=CY1") (MENUCMD "S=CY2"))
- (if (or (= yn "y") (= yn "Y"))(setq dgch (getstring "\n╩Σ ╚δ ┼Σ ║╧ ╛½ ╢╚=: ")))
- (input 1 m)
- (setq dr1 dr dl1 dr)
- (setq l1 l)
- (setq dgl1 dgl)
- (setq dgr1 dgr)
- (if (< dgl 0)(setq dgl 0))
- (if (< dgr 0)(setq dgr 0))
- (setq dr (/ (* dr s) 2) dl dr)
- (setq l (* l s))
- (setq dgl (* dgl s))
- (setq dgr (* dgr s))
- (dbsa1 xb sl)
- (if (or (= ed "l") (= ed "L"))
- (setq fpt (list (- xb l) yb))
- (setq fpt (list xb yb))
- )
- (attdef2)
- (attdef1 "gpsz1" "G" fpt)
- (attdef1 "dgch1" dgch fpt)
- (MENUCMD "S=SCREEN")
- )
- ;*******************************************
- ;* The program for drawing inner cylinder.*
- ;*******************************************
- (DEFUN HCYLINDER ()
- (SETVAR "CMDECHO" 0)
- (SETVAR "BLIPMODE" 0)
- (yzh 1 m)
- (FN)
- (if (or (= ed "l")(= ed "L"))
- (attdef1 "dir1" "F" fpt)
- (attdef1 "dir1" "H" fpt)
- )
- (if (or (= ed "l")(= ed "L"))
- (setq w1 (list (- xb l) (- yb dr)) w2 (list xb (+ yb dr)))
- (setq w1 (list xb (- yb dr)) w2 (list (+ xb l) (+ yb dr)))
- )
- (if (= nol no)
- (command "block" no "Y" fpt "w" w1 w2 "")
- (command "block" no fpt "w" w1 w2 "")
- )
- (command "insert" no fpt "" "" "" "" "" "" "" "" "" "" "" "" "" "" "")
- (XB1)
- (command "layer" "s" "" "l" "hidden" "" "")
- (MENUCMD "S=IN2")
- (SETQ YN (GETSTRING "\n╩╟╖±╝╠╨°╗¡─┌▒φ├µ: "))
- (IF (OR (= YN "Y") (= YN "y") (= YN ""))
- (PROGN(MENUCMD "I=nn")
- (MENUCMD "I=*")
- )
- (MENUCMD "S=SCREEN")
- )
- )
- (HCYLINDER)