PURPOSE: To prevent the overrun in the inner direction of parts and allow the overrun only in the outer direction by computing the overrun direction at each corner.
CONSTITUTION: A crossing angle θ is an angle formed by line segments connected to the extended lines in the drawing directions of line segments. As to polarity, an angle generated clockwise to the extended line is denoted (+), and an angle generated counterclockwise is denoted (-). Crossing angles θat all the end points of closed graphic data are added, and the forming direction of this closed graphic form is determined to be (+) in the case of +360°, and (-) in the case of -360°. Whether to perform overrun cutting at the end points a, b,... of the respective line segments is determined whether the polarity of the crossing angle θ at the end point is the same as the polarity in the forming direction of the closed graphic form or whether to coincide with the condition of the preset overrun position or whether the closed graphic form is a slotted graphic form, and earth command is generated.