Method for detecting and correcting a spatial position of a non-rotationally symmetrical workpiece held in a positioning device and for machining the workpiece with the steps of: A: positioning the workpiece in the positioning device , B: infeeding a machining head , having at least one sensor for distance measurement and position sensing means for sensing the current position of the machining head , to at least one measuring position , C: contactlessly sensing an actual position of in each case a measuring point of the positioned workpiece at at least two measuring positions by using the machining head , the at least two measuring points lying on a virtual measuring axis which runs on a surface of the workpiece , and determining from the sensed actual positions an angular position of the virtual measuring axis with respect to a virtual reference axis , D: comparing the sensed actual position with an expected desired position and ascertaining deviation values between the actual position and the desired position , E: comparing the ascertained deviation values with an admissible tolerance value, the ascertained deviations being the deviations of the distance values between the actual position and the desired position and the angular position, F: infeeding the machining head to a contour along which the workpiece is to be machined by the machining head whenever the ascertained deviation lies within the admissible tolerance value, the step of infeeding the machining head to a contour comprising a further step of guiding the machining head in a plane around the workpiece and cutting off the workpiece along a line that is passed over by the machining head, or G: aligning the machining head and the workpiece in relation to one another and in relation to the one contour in such a way that after the alignment a deviation of the actual position lies within the admissible tolerance values. A: positioning the workpiece in the positioning device , B: infeeding a machining head , having at least one sensor for distance measurement and position sensing means for sensing the current position of the machining head , to at least one measuring position , C: contactlessly sensing an actual position of in each case a measuring point of the positioned workpiece at at least two measuring positions by using the machining head , the at least two measuring points lying on a virtual measuring axis which runs on a surface of the workpiece , and determining from the sensed actual positions an angular position of the virtual measuring axis with respect to a virtual reference axis , D: comparing the sensed actual position with an expected desired position and ascertaining deviation values between the actual position and the desired position , E: comparing the ascertained deviation values with an admissible tolerance value, the ascertained deviations being the deviations of the distance values between the actual position and the desired position and the angular position, F: infeeding the machining head to a contour along which the workpiece is to be machined by the machining head whenever the ascertained deviation lies within the admissible tolerance value, the step of infeeding the machining head to a contour comprising a further step of guiding the machining head in a plane around the workpiece and cutting off the workpiece along a line that is passed over by the machining head, or G: aligning the machining head and the workpiece in relation to one another and in relation to the one contour in such a way that after the alignment a deviation of the actual position lies within the admissible tolerance values. <EOS>