A three-dimensional measurement device for measuring the shape of the surface of a target processed by a machine tool , the three-dimensional measurement device comprising the machine tool ; wherein, the machine tool is provided with a housing unit , being a tool magazine, for housing tools, a rotating shaft , being a tool spindle, for rotating the tools, and an automatic tool changing device , being a tool changer, configured to pick up a tool from the tool magazine and to replace the tool currently clamped in the tool spindle with the tool picked up from the tool magazine, a measurement unit is configured to output measurement data corresponding to the distance from the surface of the processed target, and a shape data generation unit is configured to generate shape data corresponding to the shape of the target based on the measurement data; and wherein, the measurement unit is provided with a wireless communication means that transmits the measurement data to the shape data generation unit and the measurement unit is adapted to be housed in the housing unit; and, the automatic tool changing device is configured to be able to attach the measurement unit housed in the housing unit to the rotating shaft ; characterised in that the measurement unit has a non-contact sensor and is configured to output the measurement data based on the detection results of the non-contact sensor ; and wherein the measurement unit has a contact sensor and is configured to output either of first measurement data based on detection results of the contact sensor or second measurement data based on detection results of the non-contact sensor . the machine tool is provided with a housing unit , being a tool magazine, for housing tools, a rotating shaft , being a tool spindle, for rotating the tools, and an automatic tool changing device , being a tool changer, configured to pick up a tool from the tool magazine and to replace the tool currently clamped in the tool spindle with the tool picked up from the tool magazine, a measurement unit is configured to output measurement data corresponding to the distance from the surface of the processed target, and a shape data generation unit is configured to generate shape data corresponding to the shape of the target based on the measurement data; and wherein, the measurement unit is provided with a wireless communication means that transmits the measurement data to the shape data generation unit and the measurement unit is adapted to be housed in the housing unit; and, the automatic tool changing device is configured to be able to attach the measurement unit housed in the housing unit to the rotating shaft ; characterised in that the measurement unit has a non-contact sensor and is configured to output the measurement data based on the detection results of the non-contact sensor ; and wherein the measurement unit has a contact sensor and is configured to output either of first measurement data based on detection results of the contact sensor or second measurement data based on detection results of the non-contact sensor . the measurement unit has a non-contact sensor and is configured to output the measurement data based on the detection results of the non-contact sensor ; and wherein the measurement unit has a contact sensor and is configured to output either of first measurement data based on detection results of the contact sensor or second measurement data based on detection results of the non-contact sensor . <EOS>