(defun c:parl (/ C1 pnt4 C2 c d e pnt1 pnt3 pnt2 a)
;   (IF (= (TYPE F1) 'FILE ) "YES"  (STOP))
;   (IF (= (TYPE F2) 'FILE ) "YES" (STOP))
   (graphscr)
   (setvar "osmode" 0)
   (command "fillet" "r" 0)
   (setq C1 nil)
   (setq pnt4 nil)
   (setq C2 nil)
   (setq c  0)
;  (setq d (getdist "\nEnter offset:")) (terpri)
   (setq d1 (getvar "userr1"))
   (prompt"Enter offset<")(prin1 d1)(prompt">:")
   (setq d (getreal)) (terpri)
   (if (= d nil)
       (setq d d1)
   )
   (command "setvar" "userr1" d )
   (setq e 3)
   (setq pnt1 (getpoint "\nEnter first point:"))
   (while e
      (if (/= pnt3 nil) (setq C1 pnt3))
      (if (> c 1) (setq C1 (polar pnt3 a d)))
      (setq pnt2 (getpoint "\nEnter second point:" pnt1))
      (setq c (+ c 1))
      (setq a (angle pnt1 pnt2))
      (setq pnt3 (polar pnt1 (- a (dtr 90)) d))
      (setq pnt4 (polar pnt2 (- a (dtr 90)) d))
      (command "line" pnt1 pnt2 "")
      (command "line" pnt3 pnt4 "")
      (setq C2 (polar pnt2 (- a (dtr 90)) d))
      (setq pnt1 pnt2)
      (if (/= C1 nil) (command "fillet" C1 C2))
    )
)
