(DEFUN C:Q3O()
(SETQ NLY (GETVAR "CLAYER"))
(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 STOP2CNT)(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)
  )
)
(MENUCMD "S=X")
(MENUCMD "S=d11")
   (COMMAND "VSLIDE" "C:/ACAD/HON/B/Q3O")
 (SETQ dim (GETREAL"\nPLEASE SLECT THE dim OF THE ENTITY:(dim1)" ))
 (IF (OR ( = dim "" ) (= dim NIL ) )
     (PROGN
     (SETQ dim 1 )
 ))
 (IF (= dim 1 )
    (PROGN
       ( SETQ A 3.12 )
       ( SETQ B 6.88 )
       ( SETQ C 5.55 )
       ( SETQ D  5.45 )
       ( SETQ E  7    )
       ( SETQ F 8    )
       ( SETQ G 3    )
       ( SETQ I  1.5  )
       ( SETQ J  9.5  )
       ( SETQ K 1     )
       ( SETQ L  10.2 )
       ( SETQ M 4    )
       ( SETQ N 9.5 )
       ( SETQ O 3    )
       ( SETQ P 3.3 )
       ( SETQ X 1 )
        ))
 (IF (= dim 2 )
    (PROGN
       ( SETQ A 3.28 )
       ( SETQ B 7.72 )
       ( SETQ C 5.81 )
       ( SETQ D  6.19 )
       ( SETQ E  9    )
       ( SETQ F 10   )
       ( SETQ G 3    )
       ( SETQ I  1.5  )
       ( SETQ J 12.5  )
       ( SETQ K 1     )
       ( SETQ L  14.7 )
       ( SETQ M 5    )
       ( SETQ N 12.5 )
       ( SETQ O 4    )
       ( SETQ P 4.3 )
       ( SETQ X 1    )
        ))
 (IF (= dim 3 )
    (PROGN
       ( SETQ A 6.78 )
       ( SETQ B 5.72 )
       ( SETQ C 8.49 )
       ( SETQ D  5.01 )
       ( SETQ E 9     )
       ( SETQ F 10   )
       ( SETQ G 3.5  )
       ( SETQ I  1.5  )
       ( SETQ J 15.5  )
       ( SETQ K 1     )
       ( SETQ L  16.2 )
       ( SETQ M 6    )
       ( SETQ N 15.5 )
       ( SETQ O 5    )
       ( SETQ P 5.3 )
       ( SETQ X 1.0  )
        ))
 (IF (= dim 4 )
    (PROGN
       ( SETQ A 7.62 )
       ( SETQ B 7.88 )
       ( SETQ C 9.49 )
       ( SETQ D  7.01 )
       ( SETQ E  11   )
       ( SETQ F 12.  )
       ( SETQ G 4    )
       ( SETQ I  1.5  )
       ( SETQ J  17.5  )
       ( SETQ K 1     )
       ( SETQ L  18.2 )
       ( SETQ M 7    )
       ( SETQ N 17.5 )
       ( SETQ O 6    )
       ( SETQ P 6.3 )
       ( SETQ X 1.0  )
        ))
 (IF (= dim 5 )
    (PROGN
       ( SETQ A 7.19 )
       ( SETQ B 10.81 )
       ( SETQ C 9.42 )
       ( SETQ D  9.58 )
       ( SETQ E  11   )
       ( SETQ F 12.  )
       ( SETQ G 4    )
       ( SETQ I  1.5  )
       ( SETQ J 22.5  )
       ( SETQ K 1     )
       ( SETQ L  23.2 )
       ( SETQ M 8    )
       ( SETQ N 22.5 )
       ( SETQ O 7    )
       ( SETQ P 7.3 )
       ( SETQ X 1.0  )
        ))
 (IF (= dim 6 )
    (PROGN
       ( SETQ A 9.69 )
       ( SETQ B 10.81 )
       ( SETQ C 11.92 )
       ( SETQ D  9.58 )
       ( SETQ E  14   )
       ( SETQ F 15   )
       ( SETQ G 4    )
       ( SETQ I   3   )
       ( SETQ J  26   )
       ( SETQ K 1     )
       ( SETQ L  26.7 )
       ( SETQ M 10   )
       ( SETQ N 26  )
       ( SETQ O 9    )
       ( SETQ P 9.3 )
       ( SETQ X 1 )
        ))
   (COMMAND "REDRAW")
  (SETQ P1 (GETPOINT"\n SLECT P1 BASE POINT:"))
  (SETQ P2 (GETPOINT P1"\n SELECT P2 BASE POINT:"))
  (SETQ AG1 (ANGLE P1 P2 ) )
  (SETQ AG2 (* PI 0.5 ))
  (SETQ U (DISTANCE P1 P2 ))
  (SETQ H  (- U F ) )
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (SETQ DR1   (POLAR P1 (- AG1 AG2 )   A           ))
  (SETQ DR2   (POLAR DR1 (- AG1 AG2 )  B            ))
  (SETQ DR8   (POLAR P1     AG1        X            )      )
  (SETQ DR7   (POLAR DR8 (- AG1 AG2 )   C           ))
  (SETQ DR3   (POLAR DR7 (- AG1 AG2 )  D              ))
  (SETQ DR4   (POLAR DR3    AG1        E            )      )
  (SETQ DR5   (POLAR DR4 (+ AG1 AG2 )   D           ))
  (SETQ CR1   (POLAR DR4 (+ AG1 AG2 )  G            ))
  (SETQ CR2   (POLAR CR1    AG1        H            )      )
 (SETQ DR11  (POLAR P1 (+ AG1 AG2 )   A           ))
 (SETQ DR22  (POLAR DR11 (+ AG1 AG2 )   B           ))
 (SETQ DR8   (POLAR P1     AG1        X            )      )
 (SETQ DR77  (POLAR DR8 (+ AG1 AG2 )   C           ))
 (SETQ DR33  (POLAR DR77 (+ AG1 AG2 )   D             ))
 (SETQ DR44  (POLAR DR33   AG1       E             )      )
 (SETQ DR55  (POLAR DR44 (- AG1 AG2 )   D           ))
 (SETQ CR11   (POLAR DR44 (- AG1 AG2 )  G            ))
 (SETQ CR22   (POLAR CR11    AG1       H             )      )
   (COMMAND "LAYER" "S" STOP2CNT"")
 (COMMAND "LINE" DR2 DR3 DR4 DR5 DR55 DR44 DR33 DR22  "")
 (COMMAND "LINE" DR1  DR7 DR5   "")
 (COMMAND "LINE" DR11  DR77 DR55 "")
 (COMMAND "LINE" DR3  DR7   "")
(COMMAND "LINE" DR33 DR77  "")


(COMMAND "LINE" CR1 CR2  "")
(COMMAND "LINE" CR22 CR11 "")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   (COMMAND "LAYER" "S" STOP2CNT"")
(SETQ P3    (POLAR P1    AG1  (+ F H   )         ))
(SETQ P4    (POLAR P3      AG1       I   ))
(SETQ P5    (POLAR P4     AG1         J   )      )
(SETQ P6    (POLAR P5     AG1    K   ))
(SETQ GR1   (POLAR P3   (- AG1 AG2 )   P             ))
(SETQ GR2   (POLAR GR1    AG1     I   )      )
(SETQ GR3   (POLAR GR2     AG1  J     ))
(SETQ GR4    (POLAR P4   (- AG1 AG2 )  M            ))
(SETQ GR5    (POLAR GR4     AG1        J            )      )
(SETQ GR6    (POLAR P6    (- AG1 AG2 ) O   ))
(SETQ GR11  (POLAR P3   (+ AG1 AG2 )   P             ))
(SETQ GR22  (POLAR GR11   AG1     I  )   )
(SETQ GR33  (POLAR GR22    AG1    J   ))
(SETQ GR44   (POLAR P4   (+ AG1 AG2 )  M            ))
(SETQ GR55   (POLAR GR44    AG1        J            )      )
(SETQ GR66   (POLAR P6    (+ AG1 AG2 ) O   ))
(SETQ GR7    (POLAR GR2     AG1        L     ))
(SETQ GR77   (POLAR GR22     AG1    L      ))
 (COMMAND "LINE" GR1 GR2 GR4 GR5 GR6 GR66 GR55 GR44 GR22 GR11 "")
 (COMMAND "LINE" GR5 GR55  "")
 (COMMAND "LINE" GR4 GR44   "")
 (COMMAND "LINE" GR2  GR7   "")
(COMMAND "LINE" GR22 GR77  "")
(COMMAND "LINE" DR55 DR7  "")
(COMMAND "LINE" DR77  DR5  "")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(SETQ P7     (POLAR P6      AG1        1 ))
(SETQ P11    (POLAR P1    (+ AG1 PI  )   1 ))
 (COMMAND "LAYER" "S" STOP2CEN"")
(COMMAND "LINE" P7 P11 "")
(COMMAND "LAYER" "S" NLY "")
)
