1. A method for optimizing a programmed movement path for an industrial robot holding a tool to carry out work along the path during a work cycle, the robot is movable about a plurality of axes, wherein the programmed movement path comprises information on positions and orientations for the tool at a plurality of target points on the programmed movement path, and the method comprising for at least one of the target points: receiving a tolerance interval for the orientation of the tool in the target point with a computing unit, determining movements with the computing unit, of the axes of the robot for moving the tool between the target point and one or more of the other target points on the path for a plurality of different tool orientations within the tolerance interval, wherein the determining movements of the axes of the robot includes converting the position and orientation of the tool at the target point into positions of the axes of the robot, selecting with the computing unit, one of the different tool orientations as the tool orientation for the target point based on the determined movements of the axes of the robot and with regard to minimizing work cycle time, and generating a robot program based on the selected orientation of the tool at the target point.