To easily prepare a calibration data of an original position of a noncontact type position sensor with respect to rolling and pitching rotation angles, in a three-dimensional shape measuring machine attached with the noncontact type position sensor instead of a contacting position sensor, to a rolling and pitching-rotatable rotary head provided in a moving mechanism movable along three orthogonal axial directions.
Reference coordinate values of the sensor original position Os are calculated by measuring a reference point of known coordinate values, with the noncontact type position sensor 20, under the condition where the rotary head center position Oo is fixed, as to reference rolling rotation angle and reference pitching rotation angle calibrated by a calibration data for the contact type, X-, Y- and Z-axis direction reference offset amounts H, L, W are calculated with respect to the rotary head center position Oo, and offset amounts with respect to the offset amounts H, L, W are calculated as to calibrated rolling and pitching rotation angles θr, θp to prepare the calibration data for the coordinate values Xso, Yso, Zso of the sensor original position Os.