Virtual boundary method to plan coarse and then fine machining