(DEFUN   C:da8    ()
;(IF (= (TYPE F1) 'FILE ) "YES"  (STOP))
;(IF (= (TYPE F2) 'FILE ) "YES" (STOP))
  (GRAPHSCR) (TERPRI)
  (COMMAND "ORTHO" "OFF" )
  (SETVAR "HIGHLIGHT" 1)
  (PROMPT"\nSelect Object:")
  (COMMAND "SELECT" "AU" "\\")
  (SETQ FIGD (SSGET "P"))
  (SETQ N (SSLENGTH FIGD))
  (SETQ IND 0)
  (SETQ DELTA 0)
  (SETQ PP NIL)
;
  (REPEAT N
   (SETQ FIGG (ENTGET (SSNAME FIGD IND)))
   (SETQ NAME  (CDR (ASSOC 0 FIGG)) )
   (IF (OR (= NAME "CIRCLE") (= NAME "ARC"))
    (PROGN
    (SETQ MAXPP (CDR (ASSOC 40 FIGG)) )
    (SETQ DELTA (+ DELTA 1))
   ))
   (SETQ IND (+ IND 1))
  )
;
  (SETQ MINPP MAXPP)
;
  (SETQ IND 0)
  (REPEAT  N
   (SETQ FIG  (ENTGET (SSNAME FIGD IND)))
   (SETQ NAME (CDR (ASSOC 0  FIG )) )
   (IF (OR (= NAME "CIRCLE") (= NAME "ARC"))
    (PROGN
    (SETQ RA   (CDR (ASSOC 40 FIG )) )
    (IF (> RA MAXPP)
     (SETQ MAXPP RA)
    )
    (IF (< RA MINPP)
     (SETQ MINPP RA)
    )
   ))
    (SETQ IND (+ IND 1))
  )
;
  (SETQ HO (GETVAR "TEXTSIZE" ))
  (PROMPT "\n TEXT HIGH /<")(PRIN1 HO)(PROMPT">: ")
  (SETQ H (GETREAL))
  (IF (= H NIL)
      (SETQ H HO)
  )
  (SETQ P1 (GETPOINT "\nDIM FROM : "))
  (SETQ P2 (GETPOINT P1 "\nDIM TO :"))
;
  (SETQ ANS (ANGLE P1 P2))
  (IF (OR  (< ANS (/ PI 2)) (> ANS (* PI 1.5)) )
    (SETQ CD 0)
    (SETQ CD PI)
  )
;
  (IF (AND (< ANS (/ PI 2)) (> ANS 0) )
   (SETQ AA 50  BB (* H 1.5) CC -50  DD (* H 1.5)  EE 3.5  FF (/ H -2 ) GG 0)
  )
  (IF (AND (< ANS PI) (> ANS (/ PI 2)))
   (SETQ AA 50  BB (* H 1.5) CC -50  DD (* H 1.5)  EE -3.5  FF (/ H -2 ) PP 1)
  )
  (IF (AND (< ANS (* PI 1.5)) (> ANS  PI) )
   (SETQ AA 50  BB (* H -1.5) CC -50  DD (* H -1.5)  EE -3.5  FF (/ H -2 ) PP 1)
  )
  (IF (AND (< ANS (* PI 2)) (> ANS (* PI 1.5)) )
   (SETQ AA 50  BB (* H -1.5) CC -50  DD (* H -1.5)  EE 3.5  FF (/ H -2 ) GG 0)
  )
;
  (SETQ LP (GETVAR "LUPREC"))
  (SETQ  IT (STRCAT "R" (RTOS MINPP 2 LP)))
  (IF (= PP 1)
   (PROGN
   (SETQ LEN (STRLEN IT))
   (SETQ GG  (* LEN H -1))
  ))


  (SETQ  PT (LIST (+ (CAR P2) EE GG) (+ (CADR P2) FF)  ))
  (COMMAND "DIM" "LEADER" "NEAR" P1 P2 ""  " " EXIT)
  (COMMAND "TEXT" "S" "" PT  H "0"  IT  )
  (SETQ PA P1)
  (SETQ PB P2)
;
  (REPEAT (-  DELTA 1)
   (SETQ IND 0)
   (SETQ MAXP MAXPP)
;
   (REPEAT N
    (SETQ FIG  (ENTGET (SSNAME FIGD IND)))
    (SETQ NAME (CDR (ASSOC 0 FIG )) )
    (IF (= NAME "CIRCLE")
     (PROGN
     (SETQ RA   (CDR (ASSOC 40 FIG )) )
     (IF (AND (> RA MINPP) (< RA MAXP ))
      (SETQ MAXP  RA)
     )
    ))
    (SETQ IND (+ IND 1))
   )
;
    (SETQ MINPP MAXP)
    (setq  it (STRCAT "R" (rtos MINPP 2 LP)))
  (IF (= PP 1)
   (PROGN
   (SETQ LEN (STRLEN IT))
   (SETQ GG  (* LEN  H -1))
  ))
    (setq  pRH (LIST (+ (CAR PB) AA) (+ (CADR PB) BB )))
    (setq  pLH (LIST (+ (CAR PB) CC) (+ (CADR PB) DD )))
    (SETQ  p3 (inters pA  pB  PRH PLH NIL))
    (setq  p4 (polar p3 CD 2 ))
    (setq  pT (LIST (+ (CAR P3) EE GG) (+ (CADR P3) FF) ))
    (COMMAND "LINE" PB P3 "")
    (COMMAND "LINE" P3 P4 "")
    (command "Text" "s" ""  PT  h "0"  IT  )
    (SETQ  PA PB)
    (SETQ  PB P3)
  )
)
