Extract arc related code and related functions to getArcFromPath()