A method of measuring a shape of a workpiece by using an on-board measuring machine mounted on a machine tool, the on-board measuring machine comprising a touch probe having a measuring head and supported on a fluid bearing and a probe position detecting device for detecting a displacement of the touch probe and outputting measuring position data, and probe position data output from the probe position detecting device being input to a numerical controller together with axis position data output from an axis position detecting device for detecting positions of respective axes of the machine tool,
- the method of measuring the shape of the workpiece comprising the steps of:
- presetting a reference point for temperature drift correction on the workpiece or a dummy workpiece separate from the workpiece;
- carrying out shape measurement on each of a plurality of straight or curved measuring paths by scanning along the measuring paths with the measuring head of the touch probe in contact with the workpiece;
- moving the measuring head of the probe to the reference point to bring the measuring head of the probe in contact with the reference point prior to shape measurement on the one measuring path during the shape measurement on each of the measuring paths;
- and
- correcting a temperature drift of the on-board measuring machine by setting a reference value of coordinates of the touch probe by setting the probe position data output from the probe position detecting device at a predetermined value by using a workpiece coordinate system setting function possessed by the numerical controller when the measuring head is brought in contact with the reference point.