home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p190 / 3.ddi / LSP / HM14.LSP < prev    next >
Encoding:
Text File  |  1991-04-09  |  3.4 KB  |  114 lines

  1. (defun input (sl m)
  2. ;(SETVAR "CMDECHO" 0)
  3.   (MENUCMD "S=IN1")
  4.   (if (= sl 0)(setq l (getreal "\n╩Σ╚δ│ñ╢╚:(═¿┐╫) ")))
  5.   (if (= sl 1)(setq l (getstring "\n╩Σ╚δ│ñ╢╚=:(═¿┐╫) ")))
  6.   (if (or (= l "t")(= l ""))(setq l "T"))
  7.   (if (and (= sl 1) (/= l "T"))(setq l (atof l)))
  8.  (if (and (= ed "l")(= l "T")) 
  9.      (setq l (- (car fpt) xf) l (/ l s))
  10.   )
  11.   (if (and (/= ed "l")(= l "T"))
  12.       (setq l (- m xb) l (/ l s))
  13.     )
  14.   (setq schl 0 xchl 0)
  15.   (MENUCMD "S=IN2")
  16.   (setq yn (getstring "\n╙╨ ╣½ ▓ε ╖±(N)? "))
  17.                                  (MENUCMD "S=IN1")
  18.   (if (= yn "")(setq yn "n" schl 0 xchl 0))
  19.   (if (or (= yn "y") (= yn "Y"))(progn
  20.                                  (setq schl (getreal "\n╔╧ ╞½ ▓ε=: "))
  21.                                  (setq xchl (getreal "\n╧┬ ╞½ ▓ε=: "))
  22.                                  )
  23.   )
  24.   (setq angl 0 angr 0)
  25.   (setq dgl (getreal "\n╫≤ ╡╣ ╜╟ │ñ ╢╚=:(0) "))
  26.   (if (null dgl)(setq dgl 0))
  27.   (if (> dgl 0)(setq angl (getreal "\n╫≤ ╡╣ ╜╟=: ")))
  28.   (if (= dgl 0)(progn
  29.   (setq dgl (getreal "\n╫≤ ╡╣ ╘▓ ┴┐=:(0) "))
  30.   (if (null dgl)(setq dgl 0))
  31.   (if (/= dgl 0)(setq dgl (- 0 dgl)))
  32. ))
  33.   (setq dgr (getreal "\n╙╥ ╡╣ ╜╟ │ñ ╢╚=:(0) "))
  34.   (if (null dgr)(setq dgr 0))
  35.   (if (> dgr 0)(setq angr (getreal "\n╙╥ ╡╣ ╜╟=: ")))
  36.   (if (= dgr 0)(progn
  37.   (setq dgr (getreal "\n╙╥ ╡╣ ╘▓ ┴┐=:(0) "))
  38.   (if (null dgr)(setq dgr 0))
  39.   (if (/= dgr 0)(setq dgr (- 0 dgr)))
  40. ))
  41. (setq yn "")
  42.     (MENUCMD "S=SCREEN")
  43. )
  44. ;******************************************************
  45. ;*  The function for drawing cylinder.                *
  46. ;******************************************************
  47. (defun yzh (sl m)
  48. ;(SETVAR "CMDECHO" 0)
  49.   (MENUCMD "S=IN2")
  50.   (initget (+ 1 2 4) "l L r R")
  51.   (setq ed (getkword "\n╤╙╔∞╖╜╧≥ : ╫≤(L) / ╙╥(R)"))
  52.    (MENUCMD "S=IN1")
  53.   (setq dr (getreal "\n╩Σ ╚δ ╓▒ ╛╢=: "))
  54.   (setq dgch " ")
  55.   (MENUCMD "S=IN2")
  56.   (setq yn (getstring "\n╙╨ ┼Σ ║╧ ╛½ ╢╚ ╖±(N)? "))
  57.   (if (null yn)(setq yn "n" dgch " "))
  58. (IF (= SL 0) (MENUCMD "S=CY1") (MENUCMD "S=CY2"))
  59.   (if (or (= yn "y") (= yn "Y"))(setq dgch (getstring "\n╩Σ ╚δ ┼Σ ║╧ ╛½ ╢╚=: ")))
  60.   (input 1 m)
  61.   (setq dr1 dr dl1 dr)
  62.   (setq l1 l)
  63.   (setq dgl1 dgl)
  64.   (setq dgr1 dgr)
  65.    (if (< dgl 0)(setq dgl 0))
  66.    (if (< dgr 0)(setq dgr 0))
  67.   (setq dr (/ (* dr s) 2) dl dr)
  68.   (setq l (* l s))
  69.   (setq dgl (* dgl s))
  70.   (setq dgr (* dgr s))
  71.   (dbsa1 xb sl)
  72.   (if (or (= ed "l") (= ed "L"))
  73.       (setq fpt (list (- xb l) yb))
  74.        (setq fpt (list xb yb))
  75.     )
  76.   (attdef2)
  77.   (attdef1 "gpsz1" "G" fpt)
  78.   (attdef1 "dgch1" dgch fpt)
  79.     (MENUCMD "S=SCREEN")
  80. )
  81. ;*******************************************
  82. ;*  The program for drawing inner cylinder.*
  83. ;*******************************************
  84. (DEFUN HCYLINDER ()
  85. (SETVAR "CMDECHO" 0)
  86. (SETVAR "BLIPMODE" 0)
  87.   (yzh 1 m)
  88. (FN)
  89.   (if (or (= ed "l")(= ed "L"))
  90.   (attdef1 "dir1" "F" fpt)
  91.   (attdef1 "dir1" "H" fpt)
  92.    )
  93.   (if (or (= ed "l")(= ed "L"))
  94.   (setq w1 (list (- xb l) (- yb dr)) w2 (list xb (+ yb dr)))
  95.   (setq w1 (list xb (- yb dr)) w2 (list (+ xb l) (+ yb dr)))
  96.     )
  97.  (if (= nol no)
  98.   (command "block" no "Y" fpt "w" w1 w2 "")
  99.   (command "block" no fpt "w" w1 w2 "")
  100.  )
  101.   (command "insert" no fpt "" "" "" "" "" "" "" "" "" "" "" "" "" "" "")
  102.   (XB1)
  103.   (command "layer" "s" "" "l" "hidden" "" "")
  104. (MENUCMD "S=IN2")
  105. (SETQ YN (GETSTRING "\n╩╟╖±╝╠╨°╗¡─┌▒φ├µ: "))
  106. (IF (OR (= YN "Y") (= YN "y") (= YN ""))
  107.  (PROGN(MENUCMD "I=nn")
  108.        (MENUCMD "I=*")
  109.  )
  110.  (MENUCMD "S=SCREEN")
  111. )
  112. )
  113. (HCYLINDER)
  114.