|PCNC research and development laboratory
Contour Analyzer is intended to evaluate and to transform afterwards the initial geometric part contour into another one, taking into consideration parameters of the cutting tool. The geometric part contour is submitted by the set of elementary sections, which are lines and curves.
Input and output parameters
The program is started from the command line, while it is initialized with the help of input parameters. These parameters are defined after the name of the executable module and the blank. All parameters in square brackets are not obligatory, because they have default values. The description of input parameters is presented in the Table 1, while values of the output parameter are shown in the Table 2.
ContourA.exe IN_file OUT_file [min_ANG] [max_ANG] [accuracy]
Table 1. The description of input parameters
Table 2. Values of the output parameter
The algorithm of computation
The global scheme of the computation algorithm is shown in the Pic. 1.
Pic. 1 The global scheme of computation
Definitions of axes, addresses and G-commands are necessary to identify components, which are responsible for recognition of the ISO-7bit language. After initialization of the recognition components, there will be opened both the initial file for reading and the output file for recording. At the next step, the code of the initial file of the flow program will be translated into internal structures of the Contour Analyzer. If the contour is ready for analysis, the tool will be initialized. The next step is the main one. It makes analysis and refilling of internal structures of the Contour Analyzer. When the analysis is finished, descriptions of the contour elements, which are structures of the analyzer, will be translated into codes of the flow program in the ISO-7bit language.
The contour is analyzed in the following way. The tool is removed into the initial point of the first contour element. Then the condition is checked, whether the element is referenced to the tool-cutting zone. If yes, the next element is taken from the set and the tool is positioned in the initial point of this element. If no, the type of the element is analyzed (the line or circle), and the contour is transformed, depending upon the type. It is necessary to point out, that transformation for lines and circles is substantially different. The difference is, that the check for the line is carried out for one parameter, the inclination angle; while for the circle it is made for two parameters, the tangent inclination angles in the start and end points of the element.
The transformation of contour elements
The general scheme of transformation is submitted in the Pic.2. If the element is not referenced to the tool cutting zone, there will be searched an element, with which the chosen side of the tool will intersect. As a result, the index of the element and intersection coordinates will become known. The program will be urgently stopped with an error message, if the intersection point and the element index are not found.
Pic. 2. Transformation of the contour
If the intersection point is found and the element index is defined, then, all elements between the current one and the found one will be deleted; and parameters of the current element will be corrected, taking coordinates of the intersection point into consideration.