Automatic extend of an arc

Hi guys,

I would like to create a LISP, but even AI has no clue. I have 3 2D objects - 2 lines na an arc. When I select all the 3 objects, the code should test if the arc crosses or touches the lines. If it doesn´t , the arc should extend it´s end(s) to the line(s).

There are 3 cases on the picture:

Thank you.

Comments