Thanks but that doesn't solve the problem. I know all that maths in the link, that's how I drew the figure I posted in the first place. The problem is when it comes to creating the path at the corners. The tool (circle) has to be tangential to both the curve of the hole and the straight line. Yes the sharpness of the corners will depend on the tool size.