If the machining shape is the one shown in FIGS. 4A and 4B, a program is similarly prepared, including a feeding-travel command for making the wire electrode travel from the machining-start point Q to the approach point P, a machining travel command for designating respective paths from the approach point P along the predetermined machining shape, a command for temporarily stopping the wire electr