Method for spark-erosion machining for spark-erosion machining machine implementing: - a machining gap, situated between a tool electrode and a part, both conductors of electricity, a gap within which a multitude of erosive electrical discharges are generated, constituting a machining edge which is displaced according to the movements of the tool electrode, - a dielectric medium present within the machining gap, - said tool electrode being of cylindrical or tubular shape, moved along a number of axes of the machining machine relative to the machining edge, - a process regulator, - a numerical control system for controlling the displacements of the various axes of the machining machine, - a Nominal Trajectory of the tool electrode defined by means of a computer file supplied upstream of the numerical control system of the machining machine and consisting of a succession of linear segments (10, 12) defined relative to a part coordinate system, this Nominal Trajectory describing the movement of the tool electrode relative to the part as it ought to proceed if no disturbance were to occur during the machining, characterized in that information contained in the Nominal Trajectory is used to define at least two control vectors ( Vg, Vp) which orient, within the part coordinate system, at least two independent regulation movements, - the first of said control vectors, or Gap Vector ( Vg), defining the direction in which the numerical control system must perform a first regulation movement of the axes of the machining machine designed to maintain the removal of material, - the second of said control vectors, or Position Vector ( Vp), defining the direction in which the machining regulator must perform a second regulation movement of the axes of the machining machine to correct a tool electrode position error relative to the Nominal Trajectory, the respective amplitudes of the regulation movements being calculated in real time by the process regulator, - and that the Position Vector ( Vp) does not include any vector component parallel to the Gap Vector ( Vg) and vice versa. - a machining gap, situated between a tool electrode and a part, both conductors of electricity, a gap within which a multitude of erosive electrical discharges are generated, constituting a machining edge which is displaced according to the movements of the tool electrode, - a dielectric medium present within the machining gap, - said tool electrode being of cylindrical or tubular shape, moved along a number of axes of the machining machine relative to the machining edge, - a process regulator, - a numerical control system for controlling the displacements of the various axes of the machining machine, - a Nominal Trajectory of the tool electrode defined by means of a computer file supplied upstream of the numerical control system of the machining machine and consisting of a succession of linear segments (10, 12) defined relative to a part coordinate system, this Nominal Trajectory describing the movement of the tool electrode relative to the part as it ought to proceed if no disturbance were to occur during the machining, - the first of said control vectors, or Gap Vector ( Vg), defining the direction in which the numerical control system must perform a first regulation movement of the axes of the machining machine designed to maintain the removal of material, - the second of said control vectors, or Position Vector ( Vp), defining the direction in which the machining regulator must perform a second regulation movement of the axes of the machining machine to correct a tool electrode position error relative to the Nominal Trajectory, the respective amplitudes of the regulation movements being calculated in real time by the process regulator, - and that the Position Vector ( Vp) does not include any vector component parallel to the Gap Vector ( Vg) and vice versa.