The machine tool moves the tool to be machined (shape electrode or wire electrode in EDM) against the workpiece while cutting it into the shape to be machined. The NC device (numerical control device) is a device that controls the motor using a computer to quantify the distance and points where the tool needs to be moved to achieve the desired shape, and moves the machine accordingly. The speed at which the tool is moved can also be controlled by the NC device.