To perform machining of a shape different from a tip surface of a tool electrode in a short time and to obtain an excellent machining surface.
A material 7 to be machined is moved to arbitrary positions of an X-direction and a Y-direction orthogonally crossed with each other on the same plane by an X-direction moving stage part 21 and a Y-direction moving stage part 22. Between a tool electrode 4 moved in a machining direction orthogonally crossed with both of the X and Y directions and the material 7, electric discharge for machining is generated. By a calculation based on detection position data for the material 7 of the tool electrode 4 and machining data, each moving position in the X-direction and the Y-direction of the material 7 is calculated. The material 7 is continuously moved and controlled to the arbitrary position of the X-direction and the Y-direction based on a machining shape corresponding to the moving positions of the tool electrode 4.
MASAKI TAKESHI