A three-dimensional numerically controlled electric discharge machining (EDM) system has recently been developed in order to solve the serious problem of tool electrode wear in contouring EDM. High accuracy in machining can be obtained with this system since it allows both accurate monitoring of the process of deformation of the electrode by wear and automatic compensation of the tool path. Shapes of the tool electrodes are standardized into a cylindrical form, and constant rotation is given to the electrode so that the electrode wear is axisymmetric, to facilitate measurement. The shape of the worn electrode is measured periodically during the machining process by an automatic touch-sensing mechanism, and appropriate compensation is given to the tool path each time.