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 (= l " ")(setq l "T"))
- (if (= l "t")(setq l "T"))
- (if (and (= sl 1) (/= l "T"))(setq l (atof l)))
- (if (= l "T")(setq l (- m xb) l (/ l s)))
- (if (= 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 hotal spline. *
- ;************************************************
- (DEFUN HSPLINE ()
- (SETVAR "CMDECHO" 0)
- (MENUCMD "P1=SP10")
- (MENUCMD "P1=*")
- (setq dr (getSTRING "\n╟δ╩Σ╚δ╗¿╝ⁿ╡─╣½│╞│▀┤τ: "))
- (SETQ NZL1 (SUBSTR DR 1 1))
- (SETQ NZL1 (ATOI NZL1))
- (SETQ DR (SUBSTR DR 3))
- (SETQ DR (ATOF DR))
- (MENUCMD "S=IN1")
- (setq l (getstring "\n╩Σ ╚δ │ñ ╢╚=: "))
- (if (= l "t")(setq l "T"))
- (if (/= l "T")(setq l (atof l)))
- (if (= l "T")(setq l (- m xb) l (/ l s)))
- (if (= 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 (null 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 angl (getreal "\n╫≤ ╡╣ ╜╟=:(15) "))
- (if (null angl)(setq angl 15))
- (if (and (/= angl 0) (/= angl 15))(progn
- (setq dgl (getreal "\n╫≤ ╡╣ ╜╟ │ñ ╢╚=:(0) "))
- (if (null dgl)(setq dgl 0))
- ))
- (if (= angl 0)(progn
- (setq dgl (getreal "\n╫≤ ╡╣ ╘▓ ┴┐=:(0) "))
- (if (null dgl)(setq dgl 0))
- (if (/= dgl 0)(setq dgl (- 0 dgl)))
- ))
- (setq angr (getreal "\n╙╥ ╡╣ ╜╟=:(15) "))
- (if (null angr)(setq angr 15))
- (if (and (/= angr 0) (/= angr 15))(progn
- (setq dgr (getreal "\n╙╥ ╡╣ ╜╟ │ñ ╢╚=:(0) "))
- (if (null dgr)(setq dgr 0))
- ))
- (if (= angr 0)(progn
- (setq dgr (getreal "\n╙╥ ╡╣ ╘▓ ┴┐=:(0) "))
- (if (null dgr)(setq dgr 0))
- (if (/= dgr 0)(setq dgr (- 0 dgr)))
- ))
- (MENUCMD "S=SP2")
- (setq yn (getint "\n╤í ╘± ┼Σ ║╧ ╛½ ╢╚(1:╛½├▄╝╢ 2:╥╗░π╝╢ 3:╜╧┤╓╝╢): "))
- (MENUCMD "S=SP3")
- (setq sc (getint "\n╤í ╘± ┼Σ ║╧ └α ╨═(1:╣╠╢¿┼Σ║╧ 2:╗¼╢»┼Σ║╧ 3:╜╧╦╔┼Σ║╧): "))
- (if (= yn 1)(setq chx (nth sc '(nil "JG" "JH1" "JH2"))))
- (if (= yn 2)(setq chx (nth sc '(nil "G" "H1" "H2"))))
- (if (= yn 3)(setq chx (nth sc '(nil "ZG" "ZH1" "ZH2"))))
- (MENUCMD "S=SP4")
- (setq m1 (getstring "\n═Γ ╛╢ ╢¿ ╨─(O) ╗≥ ─┌ ╛╢ ╢¿ ╨─(I): "))
- (if (= m1 "o")(setq m1 "O"))
- (if (= m1 "i")(setq m1 "I"))
- (setq dl1 dr dr1 dr l1 l dgl1 dgl dgr1 dgr)
- (setq dr (* (/ dr 2) s) dl dr dgl 0 dgr 0 l (* l s))
- (dbsa1 xb 1)
- (if (<= dr1 50)(setq kd (- dr1 4)))
- (if (and (<= dr1 108) (> dr1 50))(setq kd (- dr1 6)))
- (if (> dr1 108)(setq kd(- dr1 15)))
- (setq kd (* (/ kd 2) s))
- (setq tof (list xb (+ yb kd)) bof (list xb (- yb kd)) toe (list (+ xb l) (+ yb kd)) boe (list (+ xb l) (- yb kd)))
- (command "line" tof toe "")
- (command "line" bof boe "")
- (command "layer" "s" "" "L" "hidden" "" "")
- ;(setq fpt (list xb yb) no (+ no 1) nk (+ nk 1))
- (FN)
- (NK1)
- (attdef2)
- (attdef1 "nk1" nk fpt)
- (attdef1 "nzl1" nzl1 fpt)
- (attdef1 "gpsz1" "S" fpt)
- (attdef1 "ktype1" "S" fpt)
- (attdef1 "chx1" chx fpt)
- (attdef1 "bgch1" m1 fpt)
- (attdef1 "dir1" "H" fpt)
- (command "block" no fpt "w" (list xb (- yb dr)) (list (+ xb l) (+ yb dr)) "")
- (command "insert" no fpt "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "")
- ;(setq xb (+ xb l))
- (XB1)
- (MENUCMD "S=SCREEN")
- (redraw)
- (MENUCMD "S=IN2")
- (SETQ YN (GETSTRING "\n╩╟╖±╝╠╨°╗¡─┌▒φ├µ: "))
- (IF (OR (= YN "Y") (= YN "y"))
- (PROGN(MENUCMD "I=nn")
- (MENUCMD "I=*")
- )
- (MENUCMD "S=SCREEN")
- )
- )
- (HSPLINE)