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 "")(= 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 fuction for drwing thread. *
- ;*************************************
- (defun screw (sl m)
- ;(SETVAR "CMDECHO" 0)
- (setq dgch " ")
- (MENUCMD "S=IN2")
- (INITGET 1 "l L r R")
- (setq ed (getkword "\n╤╙╔∞╖╜╧≥ : ╫≤ (L) / ╙╥ (R) "))
- (strcase ed)
- (MENUCMD "S=TH1")
- (setq sc (getstring "\n╤í ╘± ┬▌ ╬╞ └α ╨═(M ; T ; P): "))
- (if (null sc )(setq sc "M"))
- (if (= sc "m")(setq sc "M"))
- (if (= sc "t")(setq sc "T"))
- (if (or (= sc "p")(= sc "P"))(setq sc "PI"))
- (if (= sc "M")(setq m1 (getreal "\n╩Σ ╚δ ╓▒ ╛╢=: ")))
- (if (= sc "T")
- (PROGN
- (setq m1 (getreal "\n╩Σ ╚δ ╓▒ ╛╢=: "))
- ; (SETQ TT (GETREAL "\n╩Σ╚δ┬▌╛α: "))
- ))
- (if (= sc "PI")(progn
- (setq dgch (getstring "\n╩Σ ╚δ ╓▒ ╛╢=: "))
- (if (= (strlen dgch) 4)(setq mm (substr dgch 1 1) mm1 (substr dgch 2)))
- (if (= (strlen dgch) 4)(setq dgch (strcat mm " " mm1)))
- (setq mm (substr dgch 1 1) mm1 (substr dgch 5))
- (if (and (< (atof mm1) 1) (< (atof mm) 1))(setq m1 25))
- (if (and (< (atof mm1) 1) (= (atof mm) 1))(setq m1 33))
- (if (and (> (atof mm1) 1) (= (atof mm) 1))(setq m1 42))
- (if (and (< (atof mm1) 1) (= (atof mm) 2))(setq m1 60))
- (if (and (> (atof mm1) 1) (= (atof mm) 2))(setq m1 75))
- (if (and (< (atof mm1) 1) (= (atof mm) 3))(setq m1 87))
- (if (and (> (atof mm1) 1) (= (atof mm) 3))(setq m1 100))
- (if (and (< (atof mm1) 1) (= (atof mm) 4))(setq m1 113))
- (if (and (< (atof mm1) 1) (= (atof mm) 5))(setq m1 138))
- ))
- (input 1 m)
- (setq dr1 m1 dl1 m1)
- (setq l1 l dgl1 dgl dgr1 dgr)
- (if (< dgl 0)(setq dgl 0))
- (if (< dgr 0)(setq dgr 0))
- (setq l (* l s) dgl (* dgl s) dgr (* dgr s))
- (setq dr (/ (* m1 s) 2) dl dr)
- (setq kd (/ (* (- m1 4) s) 2))
- (dbsa1 xb sl)
- (if (or (= ed "L")(= ed "l"))
- (progn
- (setq tof (list (- (+ xb dgl) l) (+ yb kd)))
- (setq toe (list (- xb dgr) (+ yb kd)))
- (setq bof (list (- (+ xb dgl) l) (- yb kd)))
- (setq boe (list (- xb dgr) (- yb kd)))
- )
- )
- (if (or (= ed "r")(= ed "R"))
- (progn
- (setq tof (list (+ xb dgl) (+ yb kd)))
- (setq toe (list (- (+ xb l) dgr) (+ yb kd)))
- (setq bof (list (+ xb dgl) (- yb kd)))
- (setq boe (list (- (+ xb l) dgr) (- yb kd)))
- )
- )
- (command "line" tof toe "")
- (command "line" bof boe "")
- (if (or (= ed "l")(= ed "L"))
- (setq fpt (list (- xb l) yb))
- (setq fpt (list xb yb))
- )
- (attdef2)
- (attdef1 "gpsz1" sc fpt)
- (attdef1 "dgch1" dgch fpt)
- )
- ;*******************************************
- ;* The function for drawing hotal thread.*
- ;********************************************
- (DEFUN HTHREAD ()
- (SETVAR "CMDECHO" 0)
- (SETVAR "BLIPMODE" 0)
- (screw 1 m)
- (command "layer" "s" "" "l" "hidden" "" "")
- (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 1) (- 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)
- (MENUCMD "S=IN2")
- (SETQ YN (GETSTRING "\n╩╟╖±╝╠╨°╗¡─┌▒φ├µ: "))
- (IF (OR (= YN "Y") (= YN "y") (= YN ""))
- (PROGN(MENUCMD "I=nn")
- (MENUCMD "I=*")
- )
- (MENUCMD "S=SCREEN")
- )
- )
- (HTHREAD)