(defun pline_int(point1 point2 pline_ent  mtrptlst / intpt i pt_list)
  (setq pt_list (ep_list (entget pline_ent)))

  (cond 
    ((= "L" (car pt_list))
      (if (not mtrptlst)
	(progn
        (setq intpt (line_int (wtou (nth 1 pt_list)) (wtou (nth 2 pt_list)) point1 point2))
	(setq intpt (line_int (nth 1 pt_list) (nth 2 pt_list) point1 point2))
        (setq intpt (line_int (mtou (nth 1 pt_list) mtrptlst)
			      (mtou (nth 2 pt_list) mtrptlst)
			      point1 point2)
        )
	)
      )
    )
    ((= "C" (car pt_list))
      (if mtrptlst
        (setq intpt (circ_int point1 point2 
			      (mtou (nth 1 pt_list) mtrptlst)
			      (* (nth 2 pt_list) (caddr (last mtrptlst))))
        )
        (setq intpt (circ_int point1 point2 (wtou (nth 1 pt_list)) (nth 2 pt_list)))
      )
    )
    ((= "A" (car pt_list))
      (if mtrptlst
        (setq intpt (arc_int (mtou (nth 1 pt_list) mtrptlst) 
	                     (mtou (nth 2 pt_list) mtrptlst) 
			     (mtou (nth 3 pt_list) mtrptlst)
		             point1 point2)
        )
        (setq intpt (arc_int (wtou (nth 1 pt_list)) (wtou (nth 2 pt_list)) (wtou (nth 3 pt_list)) point1 point2))
      )
    )
    ((= "PL" (car pt_list))
      (setq pt_count (- (length pt_list) 1))
      (setq i 1)
      (while (and (not intpt) (<= i pt_count))
        (setq intpt (nth i pt_list))
        (if mtrptlst
	  (cond
	    ((= "A" (car intpt))
              (setq intpt (arc_int (mtou (nth 1 intpt) mtrptlst) 
				   (mtou (nth 2 intpt) mtrptlst) 
				   (mtou (nth 3 intpt) mtrptlst) 
			           point1 point2)
              )
              (if intpt
	        (setq intpt (car intpt))
              )
            )
            ((= "L" (car intpt))
              (setq intpt (line_int (mtou (nth 1 intpt) mtrptlst) 
              			    (mtou (nth 2 intpt) mtrptlst) 
			            point1 point2)
              )
            )
            ((= intpt (nth i pt_list))
              (setq intpt nil)
            )
          )
	  (cond
	    ((= "A" (car intpt))
              (setq intpt (arc_int (wtou (nth 1 intpt)) (wtou (nth 2 intpt)) (wtou (nth 3 intpt)) point1 point2))
              (if intpt
	        (setq intpt (car intpt))
              )
            )
            ((= "L" (car intpt))
              (setq intpt (line_int (wtou (nth 1 intpt)) (wtou (nth 2 intpt)) point1 point2))
            )
            ((= intpt (nth i pt_list))
              (setq intpt nil)
            )
          )
        )
        (setq i (+ i 1))
      )
    )
  )
  intpt
)