(DEFUN C:Q8O()
(SETQ NLY (GETVAR "CLAYER"))
(SETQ PB (GETVAR "PICKBOX"))
(setq STOP2SET (findfile "C:/ACAD/hon/set/STOP2.SET"))
(IF (= STOP2SET NIL)
    (PROGN
       (PROMPT "\nPLEASE SETTING LAYER STOP2 :" )
       (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "w"))
       (setq STOP2CNT (GETSTRING T"\nSETTING STOP2 LAYER OF CONTNIUE LINE/<0>:"))
       (IF (= STOP2CNT "")
              (WRITE-LINE "0" FC)
              (WRITE-LINE STOP2CNT FC)
       )
       (setq STOP2CEN (GETSTRING T"\nSETTING STOP2 LAYER OF CENTER LINE/<CEN>:"))
       (IF (= STOP2CEN "")
              (WRITE-LINE "CEN" FC)
              (WRITE-LINE STOP2CEN FC)
       )
       (setq STOP2HID (GETSTRING T"\nSETTING STOP2 LAYER OF HIDDEN LINE/<HID>:"))
       (IF (= STOP2HID "")
            (WRITE-LINE "HID" FC)
         (WRITE-LINE STOP2HID FC)
       )
       (setq STOP2DIM (GETSTRING T"\nSETTING STOP2 LAYER OF DIMESION /<DIM1>:"))
       (IF (= STOP2DIM "")
              (WRITE-LINE "DIM1" FC)
              (WRITE-LINE STOP2DIM FC)
       )
       (setq STOP2TXT (GETSTRING T"\nSETTING STOP2 LAYER OF TEXT /<TEXT>:"))
       (IF (= STOP2TXT "")
              (WRITE-LINE "TEXT" FC)
              (WRITE-LINE STOP2TXT FC)
       )
       (CLOSE FC)
    )
)

(IF (/= STOP2SET NIL)
    (PROGN
       (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "r"))
       (SETQ STOP2CNT (READ-LINE FC))
       (SETQ STOP2CEN (READ-LINE FC))
       (SETQ STOP2HID (READ-LINE FC))
       (SETQ STOP2DIM (READ-LINE FC))
       (SETQ STOP2TXT (READ-LINE FC))
       (IF (OR (= STOP2CNT "") (= STOP2CEN "") (= STOP2HID "") (= STOP2DIM "") (= STOP2TXT "")
               (= STOP2CNT NIL) (= STOP2CEN NIL) (= STOP2HID NIL) (= STOP2DIM NIL) (= STOP2TXT NIL))
           (CLOSE FC)
       )
(IF (OR (= STOP2CNT "") (= STOP2CEN "") (= STOP2HID "") (= STOP2DIM "") (= STOP2TXT "")
               (= STOP2CNT NIL) (= STOP2CEN NIL) (= STOP2HID NIL) (= STOP2DIM NIL) (= STOP2TXT NIL))
           (PROGN
              (PROMPT "\nPLEASE SETTING LAYER OF SCREW :" )
              (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "w"))
              (setq STOP2CNT (GETSTRING T"\nSETTING STOP2 LAYER OF CONTNIUE LINE/<0>:"))
              (IF (= STOP2CNT "")
                  (WRITE-LINE "0" FC)
                  (WRITE-LINE STOP2CNT FC)
              )
              (setq STOP2CEN (GETSTRING T"\nSETTING STOP2 LAYER OF CENTER LINE/<CEN>:"))
              (IF (= STOP2CEN "")
                  (WRITE-LINE "CEN" FC)
                  (WRITE-LINE STOP2CEN FC)
              )
              (setq STOP2HID (GETSTRING T"\nSETTING STOP2 LAYER OF HIDDEN LINE/<HID>:"))
              (IF (= STOP2HID "")
                  (WRITE-LINE "HID" FC)
                  (WRITE-LINE STOP2HID FC)
              )
              (setq STOP2DIM (GETSTRING T"\nSETTING STOP2 LAYER OF DIMESION/<DIM1>:"))
              (IF (= STOP2DIM "")
                  (WRITE-LINE "DIM1" FC)
                  (WRITE-LINE STOP2DIM FC)
              )
              (setq STOP2TXT (GETSTRING T"\nSETTING STOP2 LAYER OF TEXT /<TEXT>:"))
              (IF (= STOP2TXT "")
                  (WRITE-LINE "TEXT" FC)
                  (WRITE-LINE STOP2TXT FC)
              )
           (CLOSE FC)
           )
       )
       (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "r"))
       (SETQ STOP2CNT (READ-LINE FC))
       (SETQ STOP2CEN (READ-LINE FC))
       (SETQ STOP2HID (READ-LINE FC))
       (SETQ STOP2DIM (READ-LINE FC))
       (SETQ STOP2TXT (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nSCREW CONTINUE OF LAYER IS:" )(PROMPT STOP2CNT)(TERPRI)
       (PROMPT "\nSCREW CENTER OF LAYER IS:" ) (PROMPT STOP2CEN)(TERPRI)
       (PROMPT "\nSCREW HIDDEN OF LAYER IS:" ) (PROMPT STOP2HID)(TERPRI)
       (PROMPT "\nSCREW DIMENSION OF LAYER IS:" ) (PROMPT STOP2DIM)(TERPRI)
       (PROMPT "\nSCREW TEXT   OF LAYER IS:" ) (PROMPT STOP2TXT)(TERPRI)
    )
)


(SETQ ANS (strcase (GETSTRING "\nDO YOU WANT TO CHANGE LAST SETTING <Y/N> N:")))
(IF (= ANS "Y")
    (PROGN
       (PROMPT "\nPLEASE SETTING LAYER:" )
       (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "w"))
       (PROMPT "\nSCREW CONTINUE OF LAYER <" )(PROMPT STOP2CNT)(PROMPT">:")
       (setq STOP2CNT (GETSTRING T))
       (IF (= STOP2CNT "")
              (WRITE-LINE "0" FC)
              (WRITE-LINE STOP2CNT FC)
       )
       (PROMPT "\nSCREW CENTER OF LAYER <" )(PROMPT STOP2CEN)(PROMPT">:")
       (setq STOP2CEN (GETSTRING T))
       (IF (= STOP2CEN "")
              (WRITE-LINE "CEN" FC)
              (WRITE-LINE STOP2CEN FC)
       )
       (PROMPT "\nSCREW HIDDEN OF LAYER <" )(PROMPT STOP2HID)(PROMPT">:")
       (setq STOP2HID (GETSTRING T))
       (IF (= STOP2HID "")
              (WRITE-LINE "HID" FC)
              (WRITE-LINE STOP2HID FC)
       )
       (PROMPT "\nSCREW DIMESION OF LAYER <" )(PROMPT STOP2DIM)(PROMPT">:")
       (setq STOP2DIM (GETSTRING T))
       (IF (= STOP2DIM "")
              (WRITE-LINE "DIM1" FC)
              (WRITE-LINE STOP2DIM FC)
       )
       (PROMPT "\nSCREW TEXT OF LAYER <" )(PROMPT STOP2TXT)(PROMPT">:")
       (setq STOP2TXT (GETSTRING T))
       (IF (= STOP2TXT "")
              (WRITE-LINE "TEXT" FC)
              (WRITE-LINE STOP2TXT FC)
       )
       (CLOSE FC)
       (SETQ FC (OPEN "C:/ACAD/hon/set/STOP2.SET" "r"))
    (SETQ STOP2CNT (READ-LINE FC))
       (SETQ STOP2CEN (READ-LINE FC))
       (SETQ STOP2HID (READ-LINE FC))
       (SETQ STOP2DIM (READ-LINE FC))
       (SETQ STOP2TXT (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nSCREW CONTINUE OF LAYER NOW IS:" )(PROMPT STOP2hid)(TERPRI)
       (PROMPT "\nSCREW CENTER   OF LAYER NOW IS:" ) (PROMPT STOP2CEN)(TERPRI)
       (PROMPT "\nSCREW HIDDEN   OF LAYER NOW IS:" ) (PROMPT STOP2HID)(TERPRI)
       (PROMPT "\nSCREW DIM      OF LAYER NOW IS:" ) (PROMPT STOP2DIM)(TERPRI)
       (PROMPT "\nSCREW TEXT     OF LAYER NOW  IS:" ) (PROMPT STOP2TXT)(TERPRI)
  )
)
   (COMMAND "VSLIDE" "C:/ACAD/HON/B/Q8O")
  (SETQ PS (GETPOINT"\n PLEASE PULL ENTER  :"))
   (COMMAND "REDRAW")
  (SETQ P1 (GETPOINT"\n SLECT P1 BASE POINT:"))
  (SETQ P2 (GETPOINT P1"\n SELECT P2 BASE POINT:"))
  (SETQ P3 (GETPOINT P2"\n SELECT P3 BASE POINT:"))
  (SETQ P4 (GETPOINT P3"\n SELECT P4 BASE POINT:"))
  (SETQ P5 (GETPOINT P4"\n SELECT P5 BASE POINT:"))
  (SETQ P6 (GETPOINT P5"\n SELECT P6 BASE POINT:"))
  (SETQ P7 (GETPOINT P6"\n SELECT P7 BASE POINT:"))
  (SETQ P8 (GETPOINT P7"\n SELECT P8 BASE  POINT:"))
  (SETQ AG1 (ANGLE P1 P2 ) )
  (SETQ AG2 (* PI 0.5 ))
  (SETQ D  (GETREAL  "\n PLEASE ENTER THE D (WIDETH) VALUE:"))
  (SETQ DJ (GETREAL  "\n PLEASE ENTER THE d'(WIDETH) VALUE:"))
  (SETQ PL (DISTANCE P6 P7 ))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (IF (AND ( <= DJ 3.5 )  )
  (PROGN
        ( SETQ H1 4  )
        ))
  (IF (AND ( >= DJ 3.5 ) ( < DJ 7   ) )
  (PROGN
        ( SETQ H1 6  )
        ))
  (IF (AND ( >= DJ 7   ) )
  (PROGN
        ( SETQ H1 8  )
        ))

  (IF (AND ( <= DJ 4.5 ) ( > DJ 2.5 ) )
  (PROGN
        ( SETQ H 6   )
        ))
 (IF ( > DJ 4.5 )
    (PROGN
       ( SETQ H 8   )
       ))
(IF (AND ( <= DJ 3.5 ) ( > DJ 2.5 ) )
   (PROGN
      ( SETQ DP 10  )
      ))
 (IF (AND ( <= DJ 4.5 ) ( > DJ 3.5 ) )
   (PROGN
      ( SETQ DP 11  )
      ))
(IF (AND ( <= DJ 5.5 ) ( > DJ 4.5 ) )
   (PROGN
      ( SETQ DP 13  )
      ))
(IF (AND ( <= DJ 6.5 ) ( > DJ 5.5 ) )
   (PROGN
       ( SETQ DP 15  )
        ))
(IF (AND ( <= DJ 8.5 ) ( > DJ 6.5 ) )
   (PROGN
        ( SETQ DP 17  )
      ))
(IF (AND ( <= DJ 10.5 ) ( > DJ 8.5 ) )
   (PROGN
      ( SETQ DP 19  )
      ))
(IF (AND ( <= DJ 12.5 ) ( > DJ 10.5 ) )
   (PROGN
      ( SETQ DP 22  )
      ))
(IF (AND ( <= DJ 3.5  ) ( > DJ 2.5  ) )
   (PROGN
      ( SETQ S 10   )
       ))
(IF (AND ( <= DJ  8.5 ) ( > DJ  3.5 ) )
   (PROGN
      ( SETQ S  15  )
      ))
(IF (AND ( <= DJ 10.5 ) ( > DJ  8.5 ) )
   (PROGN
      ( SETQ S  20  )
      ))
(IF (AND ( <= DJ 12.5 ) ( > DJ 10.5 ) )
   (PROGN
      ( SETQ S  25  )
      ))
(IF (AND ( <= DJ 3    ) ( > DJ  2.5 ) )
   (PROGN
      ( SETQ DQ 8   )
      ))
(IF (AND ( <= DJ  4.5 ) ( > DJ  3.0 ) )
   (PROGN
      ( SETQ DQ 10  )
      ))
(IF (AND ( <= DJ  6.0 ) ( > DJ  4.5 ) )
   (PROGN
      ( SETQ DQ  12 )
      ))
(IF (AND ( <= DJ 7.0 ) ( > DJ  6.0 ) )
   (PROGN
      ( SETQ DQ  14 )
      ))
(IF (AND ( <= DJ  8.0 ) ( > DJ  7.0 ) )
   (PROGN
      ( SETQ DQ 16  )
      ))
(IF (AND ( <= DJ 10.0 ) ( > DJ  8   ) )
   (PROGN
      ( SETQ DQ 18  )
      ))
(IF (AND ( <= DJ 12   ) ( > DJ 10   ) )
   (PROGN
      ( SETQ DQ 20  )
                  ))
(IF      ( >= DJ 12   )
   (PROGN
      ( SETQ DQ 20  )
                  ))
  (SETQ DH (/ DP 2 ) )
  (SETQ DF (/ D 2.0 ) )
  (SETQ DL (/ DJ 2.0 ))
  (SETQ DR1 (POLAR P2 (- AG1 AG2 ) DL ))
  (SETQ DR2 (POLAR P3 (- AG1 AG2 ) DL ))
  (SETQ DR3 (POLAR P4 (- AG1 AG2 ) DL ))
  (SETQ DR4 (POLAR P5 (- AG1 AG2 ) DL ))
  (SETQ DR5 (POLAR DR4 AG1   H ) )
  (SETQ DR6 (POLAR P6 (- AG1 AG2 ) DL ) )
  (SETQ DR7 (POLAR P7 (- AG1 AG2 ) DL ) )
  (SETQ DR8 (POLAR P8 (- AG1 AG2 ) DL ) )
  (SETQ DR11 (POLAR P2 (+ AG1 AG2 ) DL ) )
  (SETQ DR22 (POLAR P3 (+ AG1 AG2 ) DL ))
  (SETQ DR33 (POLAR P4 (+ AG1 AG2 ) DL ))
  (SETQ DR44 (POLAR P5 (+ AG1 AG2 ) DL ))
  (SETQ DR55 (POLAR DR44 AG1   H ) )
  (SETQ DR66 (POLAR P6 (+ AG1 AG2 ) DL ) )
  (SETQ DR77 (POLAR P7 (+ AG1 AG2 ) DL ) )
  (SETQ DR88 (POLAR P8 (+ AG1 AG2 ) DL ) )
  (SETQ CR4 (POLAR P5 (- AG1 AG2 ) DH ))
  (SETQ PP5 (POLAR P5    AG1  H ))
  (SETQ CR5 (POLAR PP5 (- AG1 AG2 ) DH ))
  (SETQ CR6 (POLAR PP5 (- AG1 AG2 ) DF ))
  (SETQ CR7 (POLAR P8 (- AG1 AG2 ) DF ))
  (SETQ CR44 (POLAR P5 (+ AG1 AG2 ) DH ))
  (SETQ CR55 (POLAR PP5 (+ AG1 AG2 ) DH ))
  (SETQ CR66 (POLAR PP5 (+ AG1 AG2 ) DF ))
  (SETQ CR77 (POLAR P8  (+ AG1 AG2 ) DF ))
  (SETQ DP (DISTANCE  P1 P2  ))
  (SETQ DF1 (- DP H1 ))
  (SETQ J (POLAR P2  (+ AG1 PI  ) H1  ))
  (SETQ KJ1 (POLAR J (- AG1 AG2 ) DQ  ))
  (SETQ J1 (POLAR J (- AG1 AG2 ) (- DQ 1 )  ))
  (SETQ Q1 (POLAR KJ1 (+ AG1 PI  ) 1.0 ))
  (SETQ KJ2 (POLAR KJ1  (+ AG1 PI  ) DF1  ))
  (SETQ J2 (POLAR KJ2  (+ AG1 AG2 ) 1.0 ))
  (SETQ Q2 (POLAR KJ2     AG1      1.0  ))
  (SETQ KJ11 (POLAR J (+ AG1 AG2 )  DQ   ))
  (SETQ J11 (POLAR J (+ AG1 AG2 ) (- DQ 1 ) ))
  (SETQ Q11 (POLAR KJ11 (+ AG1 PI  ) 1.0 ))
  (SETQ KJ22 (POLAR KJ11 (+ AG1 PI  ) DF1  ))
  (SETQ J22 (POLAR KJ22 (- AG1 AG2 ) 1.0 ))
  (SETQ Q22 (POLAR KJ22    AG1       1.0 ))
  (SETQ OP1   (POLAR P2  (- AG1 AG2 ) DF  ))
  (SETQ OP2   (POLAR OP1 (+ AG1 PI  ) H1  ))
  (SETQ OP11  (POLAR P2  (+ AG1 AG2 ) DF  ))
  (SETQ OP22  (POLAR OP11 (+ AG1 PI  ) H1  ))
  (SETQ KR4   (POLAR CR4 (- AG1 AG2 ) 0.5 ))
  (SETQ KR5   (POLAR CR5 (- AG1 AG2 ) 0.5 ))
  (SETQ KR44  (POLAR CR44 (+ AG1 AG2 ) 0.5 ))
  (SETQ KR55  (POLAR CR55 (+ AG1 AG2 ) 0.5 ))
   (COMMAND "LAYER" "S" STOP2CNT"")
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;break
  (SETQ BK3  (POLAR P3 (+ AG1 AG2) DL))
  (SETQ BK3X (POLAR P3 (- AG1 AG2) DL))
  (SETQ BK4  (POLAR P4 (+ AG1 AG2) DL))
  (SETQ BK4X (POLAR P4 (- AG1 AG2) DL))
; (SETQ BK5  (POLAR P5 (+ AG1 AG2) (+ DH 0.5)))
; (SETQ BK5X (POLAR P5 (- AG1 AG2) (+ DH 0.5)))
  (SETQ BK6  (POLAR P6 (+ AG1 AG2) DF))
  (SETQ BK6X (POLAR P6 (- AG1 AG2) DF))
  (SETQ BK7  (POLAR P7 (+ AG1 AG2) DF))
  (SETQ BK7X (POLAR P7 (- AG1 AG2) DF))
  (COMMAND "SETVAR" "PICKBOX" 1)
  (COMMAND "BREAK"  J2 J22)
  (COMMAND "BREAK"  OP1 OP11)
  (COMMAND "BREAK"  BK3 BK3X)
  (COMMAND "BREAK"  BK4 BK4X)
  (COMMAND "BREAK"  KR4 KR44)
  (COMMAND "BREAK"  BK6 BK6X)
  (COMMAND "BREAK"  BK7 BK7X)
  (COMMAND "BREAK"  CR7 CR77)
  (COMMAND "SETVAR" "PICKBOX" PB)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (command "LINE" DR1 DR2 DR3 DR4 CR4  CR5 CR6 CR7 DR8 DR6 DR4 "")
 (command "LINE" DR11 DR22 DR33 DR44 CR44  CR55 CR66 CR77 DR88 DR66 DR44 "")
 (command "LINE" DR8 DR88 "")
   (SETQ KR3  (POLAR dr3 (- AG1 AG2 ) 0.5 ))
   (SETQ KR8  (POLAR dr8 (- AG1 AG2 ) 0.5 ))
   (SETQ KR7  (POLAR KR8 (+ AG1 PI  ) (+ PL 5 ) ))
  (SETQ KR33  (POLAR dr33 (+ AG1 AG2 ) 0.5 ))
  (SETQ KR88  (POLAR dr88 (+ AG1 AG2 ) 0.5 ))
  (SETQ END1  (POLAR dr8  (+ AG1 PI  ) (+ PL 5 ) ))
  (SETQ END2  (POLAR dr88 (+ AG1 PI  ) (+ PL 5 ) ))
  (SETQ KR77  (POLAR KR88 (+ AG1 PI  ) (+ PL 5 ) ))
  (command "LINE" DR3 KR3 KR7 END1 "")
  (command "LINE" DR33 KR33 KR77 END2  "")
; (command "break" KR3 KR33 )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   (command "LINE" CR4 KR4 KR5 CR5 "")
   (command "LINE" CR44 KR44 KR55 CR55 "")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (SETQ KR6   (POLAR CR6 (- AG1 AG2 ) 0.5 ))
  (SETQ KR66  (POLAR CR66 (+ AG1 AG2 ) 0.5 ))
  (SETQ KR9   (POLAR CR7 (+ AG1 PI  )  S  ))
  (SETQ KR99  (POLAR CR77 (+ AG1 PI  )  S  ))
  (SETQ KRk   (POLAR kr9  (- AG1 ag2 )  0.5 ))
  (SETQ KRkk  (POLAR KR99 (+ AG1 AG2 )  0.5 ))
  (command "LINE" KR6 KRK KR9 "")
  (command "LINE" KR66  KRKK KR99 "")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (command "LINE" P2 OP1 OP2"")
  (command "LINE" OP22 OP11 P2 "")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    (COMMAND "LAYER" "S" STOP2CEN"")
  (SETQ PP8   (POLAR P8     AG1       1   ))
  (SETQ PP1   (POLAR P1  (+ AG1 PI  ) 1   ))
  (command "LINE" PP8 PP1 "")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;  (SETQ PP1 (POLAR P6  (- AG1 AG2 ) (+ DF 0.5 ) ))
;  (SETQ PP2 (POLAR P6  (+ AG1 AG2 ) (+ DF 0.5 ) ))
;  (SETQ PP3 (POLAR P7  (- AG1 AG2 )  DF  ))
;  (SETQ PP4 (POLAR P7  (+ AG1 AG2 )  DF ))
; (command "break" DR2 DR22 )
; (command "break" CR4 CR44 )
; (command "break" PP1 PP2  )
; (command "break" PP3 PP4  )
    (COMMAND "LAYER" "S" STOP2CNT""     )
  (command "LINE" J1 Q1 Q2 J2 J22 Q22 Q11 J11 J1 "")
  (command "LINE" Q1 Q11  "")
  (command "LINE" Q2 Q22 "")
  (COMMAND "LAYER" "S" NLY "")
             )
