PURPOSE: To provide a method which retracts a main spindle mounted tool to a position where there is no interference in the shortest time when a work fitted onto the turntable of a machining center is swiveled.
CONSTITUTION: An intersection P' of the circle represented with the maximum swivel diameter D of the work W fitted onto the turntable which can rotate around a perpendicular axis of rotation passing a center O of rotation and the straight line β which has an angle (a) found from the ratio of an X-axial and a Z-axial fast feed speed and passes a corner part Po' at a distance of 1/2 of the tool diameter (d) from the current position Po of the tool T is found, and a 1st retraction position on a plane which contains the found intersection P' as a corner part of the tool T and crosses the axis of rotation at right angles and a 1st time required for the retraction are found. A 2nd retraction time when the tool T is moved from the current position to a 2nd retraction position above in the direction of the axis of rotation is found; and the 1st retraction time and 2nd retraction time are compared with each other and one retraction position to which the tool can be retracted in a short time is selected to retract the tool.