A wire electric discharge machine comprising a rotating shaft and configured such that a cutting tool that is removably mounted to the rotating shaft can move relatively, in two mutually orthogonal axis directions, with respect to a wire electrode that is stretched by an upper wire guide and a lower wire guide, a touch sensor is mounted to the upper wire guide, and an ultra-hard material that is fixed to the cutting tool is formed into a cutting blade by performing electric discharge machining on the ultra-hard material according to a machining program, the wire electric discharge machine having a taper machining function and further comprising:
- a measurement program generation unit that generates a measurement program for setting, along a machining path instructed by the machining program, an origin or endpoint of a block of the machining path, or a midpoint between the origin and the endpoint of the machining path, or each point of a plurality of divisional positions between the origin and the endpoint of the machining path, as a measurement point at which contact between the ultra-hard material and a probe end section of the touch sensor is detected at a rotation center height of the rotating shaft;
- a positioning unit that positions the probe end section of the touch sensor at the measurement point on the basis of the generated measurement program;
- a rotation unit that causes the rotating shaft, to which the cutting tool is mounted, to rotate in a direction in which a face of the ultra-hard material being fixed to the cutting tool, that forms a tool rake face comes into contact with the probe end section of the touch sensor;
- a reading unit that reads rotating shaft coordinate information for which the face of the ultra-hard material that forms the tool rake face at the measurement point is at the rotation center height of the rotating shaft, on the basis of a detection signal from the touch sensor obtained when the face that forms the tool rake face comes into contact with the probe end section of the touch sensor;
- a storage unit that stores path coordinate position information, being coordinate data in the two orthogonal axes at the measurement point, as well as the rotating shaft coordinate information read by the reading unit;
- and
- a machining program regeneration unit that regenerates a machining program from the path coordinate position information and the rotating shaft coordinate information that are stored in the storage unit;
- wherein a cutting blade is formed through wire electric discharge machining of the ultra-hard material by the wire electrode that is stretched by the upper and lower wire guides, according to the machining program regenerated by the machining program regeneration unit.