home *** CD-ROM | disk | FTP | other *** search
- (DEFUN CENLINE1 ()
- (COMMAND "OSNAP" "NEAREST")
- (setq str1 (getpoint "\n╙├ ╩« ╫╓ ╧▀ ╢¿ ╗∙ ├µ ╬╗ ╓├: "))
- ;(setq str1 (osnap str "nea"))
- (setq x1 (car str1) y1 (cadr str1) sc 0 bat 0)
- (if (= (fix y1) (fix yb))(setq bat 1)(setq bat 2))
- (MENUCMD "S=IN1")
- (setq l (getreal "\n╡╜ ╗∙ ├µ ╛α └δ=: "))
- (setq FPT (getpoint "\n╙├ ╩« ╫╓ ╧▀ ╢¿ ╞≡ ╩╝ ├µ:"))
- ;(setq fpt (osnap str "nea"))
- (setq xg (car fpt) yf (cadr fpt) l1 l l (* l s))
- (setq ept (getpoint "\n╙├ ╩« ╫╓ ╧▀ ╢¿ ╓╒ ╓╣ ├µ: "))
- (COMMAND "OSNAP" "NONE")
- (setq xe (car ept) ye (cadr ept) ll 1 lk 0)
- (if (= bat 2)(progn
- (if (> yf ye)(setq sc bat))
- (if (< yf ye)(setq sc (+ bat 3)))
- ))
- (if (= bat 1)(progn
- (if (> xe xg)(setq sc bat))
- (if (< xe xg)(setq sc (+ bat 3)))
- ))
- (if (or (= sc 1) (= sc 2))(setq tg 0.1)(setq tg (- 0 0.1)))
- (if (or (= sc 1) (= sc 4))(setq tof (list (- xg tg) (+ yb l)) toe (list (+ xe tg) (+ yb l))))
- (if (or (= sc 2) (= sc 5))(setq tof (list (+ x1 l) (+ yf tg)) toe (list (+ x1 l) (- ye tg))))
- (if (and (= yf ye) (= xg xe))(setq sc 3))
- (if (/= l 0)(setq ll (getreal "\n┐╫ ╡─ ╕÷ ╩²=: ")))
- (if (and (/= l 0) (/= sc 2))(setq lk (getreal "\n┐╫ ╙δ ╓╨ ╨─ ╝╨ ╜╟=: ")))
- )
- ;**************************************
- ;* The program for drawing centerline.*
- ;***************************************
- (DEFUN CENLINE ()
- (SETVAR "CMDECHO" 0)
- (command "layer" "n" "f6" "s" "f6" "l" "dashdot" "" "color" "1" "" "")
- (cenline1)
- (command "line" tof toe "")
- (command "layer" "n" "f8" "s" "f8" "l" "hidden" "" "color" "4" "" "")
- (redraw)
- (MENUCMD "I=DD")
- (MENUCMD "I=*")
- )
- (CENLINE)