1. A method for programming an industrial robot to move relative to defined positions on an object, wherein the programming is based on a geometric model of the object, the method comprising: registering and storing a plurality of measuring points, each measuring point corresponding to a point on the surface of the real object expressed in any coordinate system associated with the robot, determining the orientation and position of the geometrical model of the object relative to said coordinate system associated with the robot by adapting the geometrical model of the object and the measuring points to each other, calculating the deviation between the measuring points and corresponding points on the geometrical model for at least some of the measuring points, and adjusting said defined positions based on said calculated deviations.