home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p067 / 2.img / HD / HDD77.LSP < prev    next >
Encoding:
Text File  |  1994-01-31  |  5.7 KB  |  202 lines

  1. (defun hdd77 ()
  2. (setvar "CMDECHO" 0)
  3. (command "vslide" "\\house1\\sld\\s77")
  4.    (setq n 0)  
  5.    (setq y "c")
  6.    (setq Lpjs '()) (setq z '())
  7.    (setq LQjs '())
  8.    (setq LSjs '())
  9.    (setq LIjs '())
  10.    (while (and (/= y "e") (/= y "E"))
  11.     (FPs)
  12.     (setq c3 (getint "\n╤í╘± 1╗≥2: "))
  13.     (cond ((= c3 1) (coeffi))
  14.            ((= c3 2) (bina))
  15.       )
  16.     (setq n (1+ n))
  17.     (setq y (getstring "\n╝╠╨°╝╞╦π<C>╗≥╜ß╩°<E>: "))
  18.    )
  19. (command "redraw")
  20. (print "end")
  21. )
  22. (defun FPs ()
  23.      (while (and (/= r "s1") (/= r "S1"))
  24.     (setq c (getstring "\n╤í╘±╧ε <1-6,7A,7B>: "))
  25.     (if (= c "1") (cps1))
  26.     (if (= c "2") (cps2))
  27.     (if (= c "3") (cps3))
  28.     (if (= c "4") (cps4))
  29.     (if (= c "5") (cps5))
  30.     (if (= c "6") (cps6))
  31.     (if (or (= c "7A") (= c "7a")) (cps7a))
  32.     (if (or (= c "7B") (= c "7b")) (cps7b))
  33.        (setq r (getstring "\n╝╠╨°╝╞╦π <c> ╗≥═╦│÷<S1>: "))
  34.        (setq z1 (nth 0 z))
  35.        (setq q "ps=")
  36.        (setq z2 (strcat q (rtos z1 2 4)))
  37.        (print z2)
  38.    )
  39.     (setq z (reverse z))
  40.     (print z)
  41. )
  42. (defun coeffi()
  43. (setq c1 0)
  44.    (setq c1 (getint "╤í╘±╧ε <1-2>: "))
  45.    (if (= c1 1) (cpjs1))
  46.    (if (= c1 2) (cpjs2))
  47. )
  48. (defun cps1()
  49.    (setq Ps (getreal "\n╩Σ╚δ╢ε╢¿╣Ñ┬╩Pe(kw)= "))
  50.    (setq z (cons ps z))
  51. )
  52. (defun cps2()
  53.    (setq Pe (getreal "\n╩Σ╚δ╢ε╢¿╣Ñ┬╩Pe(Kw)="))
  54.    (setq APe (getreal "\n╩Σ╚δ╢ε╢¿╕║╘╪│╓╨°┬╩APe= "))
  55.    (setq Ps (* 2 (* Pe (sqrt ape))))
  56.    (setq z (cons ps z))
  57. )
  58. (defun cps3()
  59.    (setq Se (getreal "\n╩Σ╚δ╢ε╢¿╚▌┴┐Se="))
  60.    (setq Ape (getreal "\n╩Σ╚δ╢ε╢¿╕║╘╪│╓╨°┬╩Ape="))
  61.    (setq fi (getreal "\n╩Σ╚δfi╜╟="))
  62.    (setq fi (* (/ fi 180) 3.14))
  63.    (setq Ps (* Se (* (cos fi) (sqrt Ape))))
  64.    (setq z (cons ps z))
  65. )
  66. (defun cps5()
  67.    (setq Ps (getreal "\n╩Σ╚δ╢ε╢¿╣Ñ┬╩Pe="))
  68.    (setq z (cons ps z))
  69. )
  70. (defun cps6()
  71.    (setq y2 "c")
  72.    (setq Ps 0)
  73.    (while (and (/= y2 "s5") (/= y2 "S5"))
  74.         (setq Psn (getreal "\n╩Σ╚δ╔Φ▒╕╣Ñ┬╩Psn="))
  75.        (setq Ps (+ Ps Psn))
  76.    (setq z (cons ps z))
  77.        (setq y2 (getstring "\n╝╠╨°╝╞╦π<C>╗≥═╦│÷<S5>: "))
  78.    )
  79. )
  80. (defun cps7a()
  81.    (setq Ps (getreal "\n╒╒├≈╣ª┬╩(kw): "))
  82.    (setq z (cons ps z))
  83. )
  84. (defun cps7b()
  85.    (setq Pe (getreal "\n╩Σ╚δ╢ε╢¿╣Ñ┬╩Pe="))
  86.    (setq x% (getreal "\n╩Σ╚δx%= "))
  87.    (setq Ps (* Pe (1+ x%)))
  88.    (setq z (cons ps z))
  89. )
  90. (defun cps4()
  91.    (setq Se (getreal "\n╩Σ╚δ╢ε╢¿╚▌┴┐Se= "))
  92.    (setq fi (getreal "\n╩Σ╚δfi= "))
  93.    (setq fi (* (/ fi 180) 3.14))
  94.    (setq Ps (* Se (cos fi)))
  95.    (setq z (cons ps z))
  96. )
  97. (defun cpjs1()
  98.    (setq Kx (getreal "\n╩Σ╚δ╨Φ╥¬╧╡╩²Kx= "))
  99.    (setq fi (getreal "\n╩Σ╚δfi= "))
  100.    (setq fi (* (/ fi 180) 3.14))
  101.    (setq Pjs (* Kx Ps))
  102.    (setq Qjs (* Ps (tan fi)))
  103.    (setq Sjs (sqrt (+ (* Pjs Pjs) (* Qjs Qjs))))
  104.    (setq z (cons ps z))
  105. )
  106. (defun tan(fi)    
  107.    (setq sfi (sin fi))
  108.    (setq d (/ sfi (sqrt (- 1 (* sfi sfi)))))
  109. )
  110. (defun cpjs2()
  111.    (setq pjs 0 qjs 0 sjs 0 y3 0)
  112.    (while (and (/= y3 "s3") (/= y3 "S3"))
  113.     (if (or (/= y3 "s3") (/= y3 "S3"))
  114.          (progn (setq Kx (getreal "\n╩Σ╚δ╨Φ╥¬╧╡╩²Kx= "))
  115.         (setq Pjs (+ Pjs (* Kx Ps)))
  116.         (Fps)    
  117.         (setq y3 (getstring "\n╝╠╨°╝╞╦π<C>╗≥═╦│÷<S3>: "))
  118.         (if (or (= y3 "s3") (= y3 "S3")) (progn (setq Kcp (getreal "\nKcp= "))
  119.                 (setq Pjs (* Kcp Pjs))
  120.         ))
  121.      )
  122.    )
  123.   (setq p 0)
  124.     )
  125.        (setq q "ps=")
  126.        (setq z2 (strcat q (rtos z1 2 4)))
  127.        (print z2)
  128. )
  129. (defun bina()
  130. (setq r1 0)
  131. (while (and (/= r1 "s") (/= r1 "S"))
  132.    (setq c4 (getint "╩Σ╚δ╤í╘±╧ε<1-3>: "))
  133.    (if (= c4 1) (bps1))
  134.    (if (= c4 2) (bps2))
  135.    (if (= c4 3) (bps3))
  136.     (setq r1 (getstring "\n╝╠╨°╝╞╦π<C>╗≥═╦│÷(S>: "))
  137.   )
  138. )
  139. (defun bps1()
  140.        (setq c (getreal "\n╩Σ╚δ╢■╧ε╩╜╧╡╩²c= "))
  141.        (setq b (getreal "\n╩Σ╚δ╢■╧ε╩╜╧╡╩²b= "))
  142.        (setq Pn (getreal "\n╩Σ╚δ╔Φ▒╕╣Ñ┬╩Pn= "))
  143.        (setq fal (getreal "\n╩Σ╚δFai╜╟= "))
  144.        (setq fal (* (/ fal 180) 3.14))
  145.        (setq Pjs (+ (* c Pn) (* b Ps)))
  146.        (setq Qjs (* Pjs (tan fal)))
  147.        (setq Sjs (sqrt (+ (* Pjs Pjs) (* Qjs Qjs))))
  148.        (setq Ue (getreal "\n╩Σ╚δ╢ε╢¿╡τ╤╣Ue= "))
  149.        (setq Ijs (/ Sjs (* Ue (sqrt 3))))
  150.        (pr)
  151. )
  152. (defun bps3()
  153.        (setq Kj (getreal "\n╩Σ╚δ╝╞╦π╧╡╩²Kj= "))
  154.        (setq Pjs (* Kj Ps))
  155.        (setq fal (getreal "\n╩Σ╚δFai ╜╟="))
  156.        (setq Qjs (* Pjs (tan fal)))
  157.        (setq Sjs (sqrt (+ (* Pjs Pjs) (* Qjs Qjs))))
  158.        (setq Ue (getreal "\n╩Σ╚δ╢ε╢¿╡τ╤╣Ue= "))
  159.        (setq Ijs (/ Sjs (* Ue (sqrt 3))))
  160.        (pr)
  161. )
  162. (defun bps2()
  163.        (setq pjs 0)
  164.        (setq qjs 0)
  165.        (setq sjs 0)
  166.        (setq Ijs 0)
  167.        (setq y4 "c")
  168.        (while (and (/= y4 "s2") (/= y4 "S2"))
  169.               (setq y6 y4)
  170.                      (setq b (getreal "\n╩Σ╚δ╧╡╩² b="))
  171.               (setq farl (getreal "\n╩Σ╚δFai ╜╟1= "))
  172.        (setq fal (getreal "\n╩Σ╚δ Fai ╜╟2= "))
  173.               (setq Qjs (+ Qjs (* Ps (tan farl))))
  174.               (setq Pjs (+ Pjs (* b Ps)))
  175.               (setq y4 (getstring "\n╝╠╨°╝╞╦π<C>╗≥═╦│÷<s2>: "))
  176.               (setq y5 y4)
  177.        )
  178.               (if (or (= y5 "s2") (= y5 "S2"))
  179.                   (progn (setq Pjs (* c (* pn pjs)))
  180.                          (setq farlm (getreal "\n╩Σ╚δFarlm= "))
  181.        (setq fal (getreal "\n╩Σ╚δFai╜╟= "))
  182.                          (setq Qjs (+ Qjs (* c (* pn (tan Farlm)))))
  183.                          (setq Sjs (sqrt (+ (* Pjs Pjs) (* Qjs Qjs))))
  184.                          (setq Ue (getreal "\n╩Σ╚δ╢ε╢¿╡τ╤╣Ue= "))
  185.                          (setq Ijs (/ Sjs (* Ue (sqrt 3))))
  186.                   )
  187.                   )
  188.      (pr)
  189. )
  190. (defun pr ()
  191.        (setq q "pjs=")
  192.        (setq q1 "qjs=")
  193.        (setq q2 "sjs=")
  194.        (setq q3 "Ijs=")
  195.        (setq j (strcat q (rtos pjs 2 2)))
  196.        (setq j1 (strcat q1 (rtos qjs 2 2)))
  197.        (setq j2 (strcat q2 (rtos sjs 2 2)))
  198.        (setq j3 (strcat q3 (rtos ijs 2 2)))
  199.        (print j) (print j1) (print j2) (print j3)
  200. )
  201. (hdd77)
  202.