Remanufacturing System with Chatter Suppression for CNC Turning

The paper presents the concept of a support system for the manufacture of machine spare parts. The operation of the system is based on a reverse engineering module enabling feature recognition based on a 3D parts scan. Then, a CAD geometrical model is generated, on the basis of which a machining strategy using the CAM system is developed. In parallel, based on the geometric model, a finite element model is built, which facilitates defining technological parameters, allowing one to minimize the risk of vibrations during machining. These parameters constitute input information to the CAM module. The operation of the described system is presented on the example of machining parts of the shaft class. The result is a replacement part, the accuracy of which was compared by means of the iterative closest point algorithm obtaining the RMSE at the level of scanner accuracy.


Introduction
In the modern industry, in line with the latest trends and the idea of Industry 4.0, the objective is to increase automation and autonomy of production. The aim of these activities is to reduce the dependence of production plants on qualified machine operators and technologists, and to increase production efficiency. Therefore, the importance of intelligent production support systems and operators is growing. New machines are increasingly being equipped with support systems that significantly simplify operation and allow one to avoid costly errors, which are often due to a lack of operator experience. This approach reduces training costs, among other things, and makes the plant independent of qualified personnel. Owing to this approach, it is possible to assign employees to operate the machine, even if they do not have specialist knowledge of how to produce workpieces. It may turn out to be particularly important in the maintenance departments of industrial companies or in onboard ships applications, in the engine department. An integral part of the tasks performed by these units is the damaged parts replacement. If the spare part is available, the repair can be performed instantly. Otherwise, it is necessary to manufacture the parts by carrying out machining. It should be done as quickly as possible; therefore, any mistakes made or unforeseen difficulties such as vibrations during machining are unacceptable. In such situations, the assistance systems can be invaluably helpful.
Available tools' supporting production can be divided into two groups. The first group are tools used mainly by managers, executives, and technologists. The available production support tools include production management systems, production planning tools, parts design support systems, the system: scanning of parts, geometry reproduction, CAD model generation, simulation, selection of machining parameters (reduction of self-excited vibrations) and the generation of machining technology with the G-code. The main novelty presented in the article concerns the integration of known computational methods with the innovative feature recognition algorithm. The presented methodology may contribute to the development of manufacturing support systems. This can be particularly useful on ships, where access to qualified specialists and spare parts is significantly limited. Section 2 discusses and explains the various stages of system operation. Section 3 presents the results of the system operation and their discussion. Section 4 provides a summary and further plan for the development of the system.

CNC Machining Assistance System
The following subsections present the concept of a system in which a fully parametric CAD model is built with the use of reverse engineering, and then, on its basis, analyses supporting the technological process are conducted.

System Concept
The idea of operation of the developed system is based on the use of reverse engineering, in which a parametric CAD model is built on the basis of a 3D scan of the part. Then, the processing technology is developed on its basis, using the CAM module. One of the elements determining its effectiveness is the selection of appropriate technological parameters. In the presented system, this selection is supported by a module allowing one to minimize the risk of self-excited vibrations. This is possible on the basis of the analysis of dynamic properties of the workpiece. This analysis is carried out using the FEM model based on the CAD model. As a result of the proposed system, a part machining program is obtained with technological parameters that allow one to avoid vibrations during machining. The block diagram showing the system concept with the data flow is presented in Figure 1.
Sensors 2020, 20, x FOR PEER REVIEW 3 of 18 of machining parameters (reduction of self-excited vibrations) and the generation of machining technology with the G-code. The main novelty presented in the article concerns the integration of known computational methods with the innovative feature recognition algorithm. The presented methodology may contribute to the development of manufacturing support systems. This can be particularly useful on ships, where access to qualified specialists and spare parts is significantly limited. Section 2 discusses and explains the various stages of system operation. Section 3 presents the results of the system operation and their discussion. Section 4 provides a summary and further plan for the development of the system.

CNC Machining Assistance System
The following subsections present the concept of a system in which a fully parametric CAD model is built with the use of reverse engineering, and then, on its basis, analyses supporting the technological process are conducted.

System Concept
The idea of operation of the developed system is based on the use of reverse engineering, in which a parametric CAD model is built on the basis of a 3D scan of the part. Then, the processing technology is developed on its basis, using the CAM module. One of the elements determining its effectiveness is the selection of appropriate technological parameters. In the presented system, this selection is supported by a module allowing one to minimize the risk of self-excited vibrations. This is possible on the basis of the analysis of dynamic properties of the workpiece. This analysis is carried out using the FEM model based on the CAD model. As a result of the proposed system, a part machining program is obtained with technological parameters that allow one to avoid vibrations during machining. The block diagram showing the system concept with the data flow is presented in Figure 1.

3D Scanning
The part on the basis of which the operation of the system will be presented is a 183 mm long steel shaft with a maximum diameter of 37 mm made of steel, as shown in Figure 2. This is a part with a low degree of complexity, but due to the high average length/diameter ratio (L/D), there is a high risk of self-excited vibration during machining.

3D Scanning
The part on the basis of which the operation of the system will be presented is a 183 mm long steel shaft with a maximum diameter of 37 mm made of steel, as shown in Figure 2. This is a part with a low degree of complexity, but due to the high average length/diameter ratio (L/D), there is a high risk of self-excited vibration during machining. Scanning was performed in rotary mode on the PICZA-LPX1200 scanner manufactured by Roland (1-6-4 Shinmiyakoda, Kita-ku, Hamamatsu-shi, Shizuoka-ken, 431-2103 Japan). After being covered with an anti-reflective white film, the object is placed in the axis of the rotary table, as shown in Figure 3. The following parameters were used during the scanning process: angular pitch-0.90 deg, lace cut in the axis of the object every 0.1 mm. XYZ point clouds with native size of 11.244 KB and 11.126KB (0.1 mm axial lace cut) were obtained.

Geometry Recognition Algorithm
The next step was to convert the point cloud to parametric geometry. The implemented algorithms ( Figure 4) identify the geometry of the shaft class parts based on cross-sections. The geometry of the identified part is then imported into SOLIDWORKS for further processing. Scanning was performed in rotary mode on the PICZA-LPX1200 scanner manufactured by Roland (1-6-4 Shinmiyakoda, Kita-ku, Hamamatsu-shi, Shizuoka-ken, 431-2103 Japan). After being covered with an anti-reflective white film, the object is placed in the axis of the rotary table, as shown in Figure 3. The following parameters were used during the scanning process: angular pitch-0.90 deg, lace cut in the axis of the object every 0.1 mm. XYZ point clouds with native size of 11.244 KB and 11.126 KB (0.1 mm axial lace cut) were obtained. Scanning was performed in rotary mode on the PICZA-LPX1200 scanner manufactured by Roland (1-6-4 Shinmiyakoda, Kita-ku, Hamamatsu-shi, Shizuoka-ken, 431-2103 Japan). After being covered with an anti-reflective white film, the object is placed in the axis of the rotary table, as shown in Figure 3. The following parameters were used during the scanning process: angular pitch-0.90 deg, lace cut in the axis of the object every 0.1 mm. XYZ point clouds with native size of 11.244 KB and 11.126KB (0.1 mm axial lace cut) were obtained.

Geometry Recognition Algorithm
The next step was to convert the point cloud to parametric geometry. The implemented algorithms ( Figure 4) identify the geometry of the shaft class parts based on cross-sections. The geometry of the identified part is then imported into SOLIDWORKS for further processing. a b Figure 3. Experimental setup-shaft prepared for scanning; (a)-scanned object, (b)-scanning head.

Geometry Recognition Algorithm
The next step was to convert the point cloud to parametric geometry. The implemented algorithms ( Figure 4) identify the geometry of the shaft class parts based on cross-sections. The geometry of the identified part is then imported into SOLIDWORKS for further processing. The operation of the geometry identification algorithm began with the determination of the vector of the span of planes ( Figure 5), which was performed using the 'Sample Distribution' function. This function determines the vector based on the projection bandwidth and degree of coverage. The width of the projection band determines the symmetrical area around the section plane from which points from the cloud are projected. The degree of coverage is, on the other hand, a percentage parameter, which determines the total width of the projection bands. against the background of the Z-axis point cloud span (1). where: p-coverage parameter k-number of scanning planes s-width of a single projection band r-span of the point cloud in the Z axis Hence:  The operation of the geometry identification algorithm began with the determination of the vector of the span of planes ( Figure 5), which was performed using the 'Sample Distribution' function. This function determines the vector based on the projection bandwidth and degree of coverage. The width of the projection band determines the symmetrical area around the section plane from which points from the cloud are projected. The degree of coverage is, on the other hand, a percentage parameter, which determines the total width of the projection bands. against the background of the Z-axis point cloud span (1).
where: p-coverage parameter k-number of scanning planes s-width of a single projection band r-span of the point cloud in the Z axis = • • 100% (2) Then, on the basis of the designated span vector, using the 'Projection' function, points were projected on the cross-section planes. The circular cross-sections were adjusted using the 'Section Fit' function.
The 'Section Fit' function approximates a circular cross-section using the smallest squares method. To determine the coordinates of the center and the value of the section radius, a canonical equation of a circle (3) has been formulated, where , are the coordinates of the scanned -th point, , are the coordinates of the center of the circle and R is the radius of the circle ( Figure 6).
After the transformation of Equation (3), the general form of the circle equation is obtained: where: the constants A, B, C Equations (5)- (7) have been introduced to simplify the notation. Hence: k = p·r s·100% (2) Then, on the basis of the designated span vector, using the 'Projection' function, points were projected on the cross-section planes. The circular cross-sections were adjusted using the 'Section Fit' function.
The 'Section Fit' function approximates a circular cross-section using the smallest squares method. To determine the coordinates of the center and the value of the section radius, a canonical equation of a circle (3) has been formulated, where x i , y i are the coordinates of the scanned i-th point, x c , y c are the coordinates of the center of the circle and R is the radius of the circle ( Figure 6).
Sensors 2020, 20, x FOR PEER REVIEW 6 of 18 (2) Figure 5. Span vector of cross-section planes with marked projection bands.
Then, on the basis of the designated span vector, using the 'Projection' function, points were projected on the cross-section planes. The circular cross-sections were adjusted using the 'Section Fit' function.
The 'Section Fit' function approximates a circular cross-section using the smallest squares method. To determine the coordinates of the center and the value of the section radius, a canonical equation of a circle (3) has been formulated, where , are the coordinates of the scanned -th point, , are the coordinates of the center of the circle and R is the radius of the circle ( Figure 6).
After the transformation of Equation (3), the general form of the circle equation is obtained: where: the constants A, B, C Equations (5)- (7) have been introduced to simplify the notation. After the transformation of Equation (3), the general form of the circle equation is obtained: where: the constants A, B, C Equations (5)- (7) have been introduced to simplify the notation.
For each point ( Figure 6) projected on the cross-sectional plane, the equation was formulated in the determined general form Equations (8)- (12).
x 2 n + y n 2 = Ax n + By n + C Next, the system of Equations (8)- (12) was transformed into a matrix notation Equation (13).
After solving the linear system of Equation (13), the values of constants A, B and C Equations (5)-(7) were obtained. Next, from their values, the coordinates of the circle center x c , y c Equations (14) and (15) and the radius R of the circle Equation (16) were determined.
The circles were matched in the local coordinate system of the section plane. On the basis of the determined coordinates of centers using the 'Axis Recognition' function, the shaft axis in the global system was matched. Having regard to the defined directional coefficient tolerance, the matched axis has been corrected ( Figure 7). The identification of the shaft steps was made on the basis of the values of the cross-sectional radii. The radial tolerance parameter was the condition contained in the 'Step Recognition' module to recognize the belonging of successive cross sections to one shaft step. When -th cross-section radius did not deviate within the radial tolerance from the cross-section radius -1, both crosssections were considered to belong to one shaft step. The detected sequence of less than three crosssections is considered as an apparent degree, which is not taken into account in further proceedings ( Figure 8). The appearance of the apparent degree results from the distortion of the radius by projecting points from the surfaces closing the shaft steps.  The identification of the shaft steps was made on the basis of the values of the cross-sectional radii. The radial tolerance parameter was the condition contained in the 'Step Recognition' module to recognize the belonging of successive cross sections to one shaft step. When i-th cross-section radius did not deviate within the radial tolerance from the cross-section radius i1, both cross-sections were considered to belong to one shaft step. The detected sequence of less than three cross-sections is considered as an apparent degree, which is not taken into account in further proceedings ( Figure 8). The appearance of the apparent degree results from the distortion of the radius by projecting points from the surfaces closing the shaft steps. The identification of the shaft steps was made on the basis of the values of the cross-sectional radii. The radial tolerance parameter was the condition contained in the 'Step Recognition' module to recognize the belonging of successive cross sections to one shaft step. When -th cross-section radius did not deviate within the radial tolerance from the cross-section radius -1, both crosssections were considered to belong to one shaft step. The detected sequence of less than three crosssections is considered as an apparent degree, which is not taken into account in further proceedings ( Figure 8). The appearance of the apparent degree results from the distortion of the radius by projecting points from the surfaces closing the shaft steps.  Using the 'End Plate Recognition' module, fragmented axial cross-sections were created in the transition areas of the shaft steps. The closing surfaces were adjusted using the 'polyfit' function from the Matlab library.
In order to detect chamfering, fragmented axial cross-sections have been created in the end areas of the shaft steps. Using the 'Chamfer Recognition' module, a chamfer was determined by detecting the distance of projection points from the recognized basic geometry (Figure 9). The identified geometry with division into the base body and technological features has been recorded in the geometric properties matrix (Table 1).
Sensors 2020, 20, x FOR PEER REVIEW 9 of 18 Using the 'End Plate Recognition' module, fragmented axial cross-sections were created in the transition areas of the shaft steps. The closing surfaces were adjusted using the 'polyfit' function from the Matlab library.
In order to detect chamfering, fragmented axial cross-sections have been created in the end areas of the shaft steps. Using the 'Chamfer Recognition' module, a chamfer was determined by detecting the distance of projection points from the recognized basic geometry (Figure 9). The identified geometry with division into the base body and technological features has been recorded in the geometric properties matrix (Table 1). The geometric properties matrix has been taken over by the macro command in Dassault Systèmes SOLIDWORKS 2018. The pseudo-code of the algorithm for importing geometry into SOLIDWORKS is shown in Table 2. First, the basic geometry was created by adding/extracting by rotation. Then, technological operations were added to the model. This approach allowed to reproduce the operations tree. The reconstructed geometry is shown in Figure 10.    The geometric properties matrix has been taken over by the macro command in Dassault Systèmes SOLIDWORKS 2018. The pseudo-code of the algorithm for importing geometry into SOLIDWORKS is shown in Table 2. First, the basic geometry was created by adding/extracting by rotation. Then, technological operations were added to the model. This approach allowed to reproduce the operations tree. The reconstructed geometry is shown in Figure 10.

Finite Element Model
Then, on the basis of the geometric model, a finite element model of the workpiece was built, in order to determine its characteristic frequency transition functions. The described frequency transition functions were the information necessary to determine the area of stability of machining using the CNC assistance module. The finite element model is built using Midas NFX 2018 R1 software (Midas Information Technology Co. Ltd., Seongnam, Korea). In the first step, the geometric model was discretized using eight node, cubic, isoparametric finite elements (CHEXA) and six node, five-walled, isoparametric finite elements (CPENTA). The applied finite elements were characterized by linear shape functions and three translation degrees of freedom in each node. As a result of the discretization, a model consisting of 2.103 finite elements and 6.237 degrees of freedom was obtained. The discrete model is shown in Figure 11.

Finite Element Model
Then, on the basis of the geometric model, a finite element model of the workpiece was built, in order to determine its characteristic frequency transition functions. The described frequency transition functions were the information necessary to determine the area of stability of machining using the CNC assistance module. The finite element model is built using Midas NFX 2018 R1 software (Midas Information Technology Co. Ltd., Seongnam, Korea). In the first step, the geometric model was discretized using eight node, cubic, isoparametric finite elements (CHEXA) and six node, five-walled, isoparametric finite elements (CPENTA). The applied finite elements were characterized by linear shape functions and three translation degrees of freedom in each node. As a result of the discretization, a model consisting of 2.103 finite elements and 6.237 degrees of freedom was obtained. The discrete model is shown in Figure 11.

Finite Element Model
Then, on the basis of the geometric model, a finite element model of the workpiece was built, in order to determine its characteristic frequency transition functions. The described frequency transition functions were the information necessary to determine the area of stability of machining using the CNC assistance module. The finite element model is built using Midas NFX 2018 R1 software (Midas Information Technology Co. Ltd., Seongnam, Korea). In the first step, the geometric model was discretized using eight node, cubic, isoparametric finite elements (CHEXA) and six node, five-walled, isoparametric finite elements (CPENTA). The applied finite elements were characterized by linear shape functions and three translation degrees of freedom in each node. As a result of the discretization, a model consisting of 2.103 finite elements and 6.237 degrees of freedom was obtained. The discrete model is shown in Figure 11. Due to the receptance method used in the CNC assistance module, on the basis of which the stable machining area is determined, an underdetermined model was adopted for further calculations.
In the next step, using the Nastran Solver processor (SOL108), a set of receptance functions in Due to the receptance method used in the CNC assistance module, on the basis of which the stable machining area is determined, an underdetermined model was adopted for further calculations.
In the next step, using the Nastran Solver processor (SOL108), a set of receptance functions in the X and Z direction in the frequency ranging from 50 to 5000 Hz with a 1 Hz step was determined. Examples of calculation results as frequency response functions are presented in Figure 12.

Assistance of Machining Parameters Selection
In order to determine the process stability conditions for assessing the risk of self-excited vibrations, it is necessary to know the dynamic properties (as frequency response functions-FRFs) of the machine tool-workpiece system [20]. In the developed system, the system consists of a lathe spindle with a three-jaw chuck and a mounted workpiece. The dynamic properties of a given system can be determined with the application of modal synthesis, using the receptance coupling approach (RCA) [21,22]. This method allows the FRF function of a combined system to be determined ( Figure  13a), having the dynamic properties of the components of which the system is composed ( Figure  13b). The dynamic properties of the machine tool are reduced to the properties of the spindle with the three-jaw chuck, and the experimental extended inverse receptance coupling (EIRC) method, described in detail in [23]. This method allows one to take into account the rotational degrees of freedom (RDOF) of the system, necessary to properly model the way the workpiece is clamped in the three-jaw chuck. Moreover, while modelling the properties of the spindle, it is possible to add an extra length of the machined part resulting from the use of a longer workpiece. The dynamic properties of the spindle remain unchanged over time; thus, they can be determined once for a given machine tool, by performing a series of impulse tests. The variable element in the system is the workpiece. Most often, for RCA applications, the workpiece is modelled analytically as a Timoshenko beam, however, due to a more complex geometry, in the presented example, the workpiece is

Assistance of Machining Parameters Selection
In order to determine the process stability conditions for assessing the risk of self-excited vibrations, it is necessary to know the dynamic properties (as frequency response functions-FRFs) of the machine tool-workpiece system [20]. In the developed system, the system consists of a lathe spindle with a three-jaw chuck and a mounted workpiece. The dynamic properties of a given system can be determined with the application of modal synthesis, using the receptance coupling approach (RCA) [21,22]. This method allows the FRF function of a combined system to be determined (Figure 13a), having the dynamic properties of the components of which the system is composed (Figure 13b).

Assistance of Machining Parameters Selection
In order to determine the process stability conditions for assessing the risk of self-excited vibrations, it is necessary to know the dynamic properties (as frequency response functions-FRFs) of the machine tool-workpiece system [20]. In the developed system, the system consists of a lathe spindle with a three-jaw chuck and a mounted workpiece. The dynamic properties of a given system can be determined with the application of modal synthesis, using the receptance coupling approach (RCA) [21,22]. This method allows the FRF function of a combined system to be determined ( Figure  13a), having the dynamic properties of the components of which the system is composed ( Figure  13b). The dynamic properties of the machine tool are reduced to the properties of the spindle with the three-jaw chuck, and the experimental extended inverse receptance coupling (EIRC) method, described in detail in [23]. This method allows one to take into account the rotational degrees of freedom (RDOF) of the system, necessary to properly model the way the workpiece is clamped in the three-jaw chuck. Moreover, while modelling the properties of the spindle, it is possible to add an extra length of the machined part resulting from the use of a longer workpiece. The dynamic properties of the spindle remain unchanged over time; thus, they can be determined once for a given machine tool, by performing a series of impulse tests. The variable element in the system is the workpiece. Most often, for RCA applications, the workpiece is modelled analytically as a Timoshenko beam, however, due to a more complex geometry, in the presented example, the workpiece is modelled using the finite element method, as described in Section 2.4. For RCA modal synthesis, the The dynamic properties of the machine tool are reduced to the properties of the spindle with the three-jaw chuck, and the experimental extended inverse receptance coupling (EIRC) method, described in detail in [23]. This method allows one to take into account the rotational degrees of freedom (RDOF) of the system, necessary to properly model the way the workpiece is clamped in the three-jaw chuck. Moreover, while modelling the properties of the spindle, it is possible to add an extra length of the machined part resulting from the use of a longer workpiece. The dynamic properties of the spindle remain unchanged over time; thus, they can be determined once for a given machine tool, by performing a series of impulse tests. The variable element in the system is the workpiece. Most often, for RCA applications, the workpiece is modelled analytically as a Timoshenko beam, however, due to a more complex geometry, in the presented example, the workpiece is modelled using the finite element method, as described in Section 2.4. For RCA modal synthesis, the dynamic properties of the components (w index-workpiece, s index-spindle) are noted as matrix equations: where: The matrix equation describing the dynamic properties of the combined system shall be noted as: Having both a model of the dynamic properties of the machine tool and the workpiece, boundary conditions and force balance conditions between the components are noted as follows: By making appropriate transformations using Equations (17), (18), (20), it is possible to determine the dynamic properties matrix of the combined system: For the stability analysis, the translational function of the transition H 22 to the x (Figure 14a) direction is used, as it is the highest susceptibility at the end of the workpiece, which is equivalent to the highest risk of vibration occurrence during machining. The tool for predicting system stability is the stability lobe diagram (SLD). The formation of self-excited vibrations during machining is associated with exceeding the cutting depth limit a lim , which is presented as follows: where Re(H( jω)-the real part of the translational transfer function for a susceptible component of the system, K r -coefficient of the cutting forces. As it results from formula (14), positive values of the machining depth limit are obtained for negative values of the function Re(H( jω), which are used to build the SLD diagram. The reference of the machining depth limit to the spindle speed is realized by replicating the lobe with the following relationship: where f c -is the chatter frequency, k-consecutive integers denoting the lobe number. When analyzing the stability lobes, it should be noted that the selected rotational speeds are more resistant to the occurrence of vibrations during machining. The idea of the presented support for the selection of technological parameters assumes proposing the correction of arbitrarily adopted spindle speeds to the nearest values allowing one to obtain stable machining. The authors experience shows that indicating peaks of the stability lobes as the recommended speeds does not give the expected results due to the proximity of the stability limit. In the proposed approach, first, rotational speeds 1 and 2 are selected, which define the single lobe range, as shown in Figure 14b. Then, the recommended spindle speed correction for the lobe is determined as: where ℎ is a peak shift coefficient, in the presented system, with the value ℎ = 0.7. The precise determination of the cutting depth is possible with the value of the specific cutting force coefficient determined experimentally for a given material and tool configuration. In the presented system, it was decided to adopt an average value of this coefficient for steel, which significantly simplifies the procedure of supporting the selection of rotational speed, and at the same time does not affect the position of 'stable' rotational speeds.

Computer-Aided Manufacturing (CAM)
The technological parameters for which stable conditions and favorable machining performance have been achieved while maintaining the recommended blade life have been imported into the Solidworks CAM system lathe module. Solidworks CAM enables the development of 2.5 and 3 axis turning and milling processes. The software is based on the CAMWorks system. The CAM module implemented in Solidworks provides full support for configuration and parts, which enables the use of geometric features recognized on the basis of the model and the corresponding CAD operations.
Solidworks CAM uses rule-based machining principles, allowing to program the most important machining strategies in the system to be used as standard. These rules can be automatically applied depending on the material type and geometry of the operation.
The system is equipped with an operation recognition function, so it identifies standard geometric primitives such as ruled figures-holes, cylinders. This makes it possible to automate the process of tool path generation by identifying properties from the project tree (feature). For rotating parts, these features are even expected to be optimal. Most importantly, in the application to the research work described in this paper, Solidworks CAM is fully parametrically integrated into the Solidworks system's graphical kernel, so all modifications to parts are taken into account when rebuilding tool paths and post-processing. The stability lobes generated in the speed range from 1800 to 3000 rpm for the transfer function under consideration H 22 are shown in Figure 14a. The stability lobes delineate the areas of technological parameters for which vibrations do not occur ('Stable' area) and the area in which self-excited vibrations will develop ('Unstable' area).
When analyzing the stability lobes, it should be noted that the selected rotational speeds are more resistant to the occurrence of vibrations during machining. The idea of the presented support for the selection of technological parameters assumes proposing the correction of arbitrarily adopted spindle speeds to the nearest values allowing one to obtain stable machining. The authors experience shows that indicating peaks of the stability lobes as the recommended speeds does not give the expected results due to the proximity of the stability limit. In the proposed approach, first, rotational speeds N Lo1 and N Lo2 are selected, which define the single lobe range, as shown in Figure 14b. Then, the recommended spindle speed correction N cor for the lobe is determined as: where P sh is a peak shift coefficient, in the presented system, with the value P sh = 0.7. The precise determination of the cutting depth is possible with the value of the specific cutting force coefficient determined experimentally for a given material and tool configuration. In the presented system, it was decided to adopt an average value of this coefficient for steel, which significantly simplifies the procedure of supporting the selection of rotational speed, and at the same time does not affect the position of 'stable' rotational speeds.

Computer-Aided Manufacturing (CAM)
The technological parameters for which stable conditions and favorable machining performance have been achieved while maintaining the recommended blade life have been imported into the Solidworks CAM system lathe module. Solidworks CAM enables the development of 2.5 and 3 axis turning and milling processes. The software is based on the CAMWorks system. The CAM module implemented in Solidworks provides full support for configuration and parts, which enables the use of geometric features recognized on the basis of the model and the corresponding CAD operations.
Solidworks CAM uses rule-based machining principles, allowing to program the most important machining strategies in the system to be used as standard. These rules can be automatically applied depending on the material type and geometry of the operation.
The system is equipped with an operation recognition function, so it identifies standard geometric primitives such as ruled figures-holes, cylinders. This makes it possible to automate the process of tool path generation by identifying properties from the project tree (feature). For rotating parts, these features are even expected to be optimal. Most importantly, in the application to the research work described in this paper, Solidworks CAM is fully parametrically integrated into the Solidworks system's graphical kernel, so all modifications to parts are taken into account when rebuilding tool paths and post-processing.

Results
The first step in verifying the effectiveness of the proposed approach was to carry out the machining of the part without any additional support system for the selection of technological parameters. The machining program was generated in the CAM system, and the technological parameters were selected arbitrarily, taking into account the catalogue data provided by the tool manufacturer and the experience of the technologist.
The assumption was that the object was to be made on a CNC lathe in one clamping. The prefabricated product used for processing was a bar made of steel 1.0715 (11SMn30), with a circular cross-section of a diameter of D = 40 mm and overhang L = 200 mm. The Figure 15 shows the orientation of the part in relation to the prefabricated product.

Results
The first step in verifying the effectiveness of the proposed approach was to carry out the machining of the part without any additional support system for the selection of technological parameters. The machining program was generated in the CAM system, and the technological parameters were selected arbitrarily, taking into account the catalogue data provided by the tool manufacturer and the experience of the technologist.
The assumption was that the object was to be made on a CNC lathe in one clamping. The prefabricated product used for processing was a bar made of steel 1.0715 (11SMn30), with a circular cross-section of a diameter of = 40 mm and overhang = 200 mm. The Figure 15 shows the orientation of the part in relation to the prefabricated product. For shaping, we used SCLCL/R 2020K09P tools equipped with Sandvik CCMT 09T304 PF 4325 plates (Sandvik Coromant, Sandviken, Sweden). Machining was performed on an AFM TAE-35N CNC lathe Andrychowska Fabryka Maszyn DEFUM, Andrychów, Poland), equipped with a Fanuc control system (Fanuc Robotics Ltd., Oshino, Japan).
Due to the geometry of the machined part in Steps 1 and 2 ( Figure 15), the left-hand tool is used for machining. The highest susceptibility and therefore the highest risk of vibration occurs in Step 1, for which the diameter of the workpiece is to be 30 mm. The machining is carried out at a constant machining speed = 190 m/min, depth of cut = 1.0 mm and feed rate = 0.1 mm/ . The surface after machining for Steps 1 and 2 is shown in Figure 16.  Due to the geometry of the machined part in Steps 1 and 2 ( Figure 15), the left-hand tool is used for machining. The highest susceptibility and therefore the highest risk of vibration occurs in Step 1, for which the diameter of the workpiece is to be 30 mm. The machining is carried out at a constant machining speed v c = 190 m/min, depth of cut a p = 1.0 mm and feed rate f n = 0.1 mm/rev. The surface after machining for Steps 1 and 2 is shown in Figure 16.

Results
The first step in verifying the effectiveness of the proposed approach was to carry out the machining of the part without any additional support system for the selection of technological parameters. The machining program was generated in the CAM system, and the technological parameters were selected arbitrarily, taking into account the catalogue data provided by the tool manufacturer and the experience of the technologist.
The assumption was that the object was to be made on a CNC lathe in one clamping. The prefabricated product used for processing was a bar made of steel 1.0715 (11SMn30), with a circular cross-section of a diameter of = 40 mm and overhang = 200 mm. The Figure 15 shows the orientation of the part in relation to the prefabricated product. For shaping, we used SCLCL/R 2020K09P tools equipped with Sandvik CCMT 09T304 PF 4325 plates (Sandvik Coromant, Sandviken, Sweden). Machining was performed on an AFM TAE-35N CNC lathe Andrychowska Fabryka Maszyn DEFUM, Andrychów, Poland), equipped with a Fanuc control system (Fanuc Robotics Ltd., Oshino, Japan).
Due to the geometry of the machined part in Steps 1 and 2 ( Figure 15), the left-hand tool is used for machining. The highest susceptibility and therefore the highest risk of vibration occurs in Step 1, for which the diameter of the workpiece is to be 30 mm. The machining is carried out at a constant machining speed = 190 m/min, depth of cut = 1.0 mm and feed rate = 0.1 mm/ . The surface after machining for Steps 1 and 2 is shown in Figure 16.  The surface machined in Step 1 shows the characteristic trace of vibration occurrence during the machining. When machining the last layer, on the diameter of D = 30 mm for the selected machining speed, the spindle speed was N = 2016 rpm. When analyzing the course of the stability lobes shown in Figure 14b, it should be noted that there is an increased risk of vibrations during machining at a given rotational speed.
The next step was to make a part, taking into account the conducted process stability analysis. The application of the module supporting the selection of machining parameters allowed one to introduce a correction of the spindle speed to the nearest 'stable' speeds, in order to minimize the risk of vibration during machining. In the selected case, the corrected spindle speed was N cor = 2154 rpm. Figure 17 presents the finished part with the rotational speeds proposed by the developed support system. No vibrations were observed during the machining, which is confirmed by the obtained surface condition.
Sensors 2020, 20, x FOR PEER REVIEW 15 of 18 in Figure 14b, it should be noted that there is an increased risk of vibrations during machining at a given rotational speed. The next step was to make a part, taking into account the conducted process stability analysis. The application of the module supporting the selection of machining parameters allowed one to introduce a correction of the spindle speed to the nearest 'stable' speeds, in order to minimize the risk of vibration during machining. In the selected case, the corrected spindle speed was = 2154 rpm. Figure 17 presents the finished part with the rotational speeds proposed by the developed support system. No vibrations were observed during the machining, which is confirmed by the obtained surface condition.   The comparison shows a clear improvement in surface condition due to the rotational speed correction. No signs of vibration were observed on surface (b), while these are clearly visible on surface (a). It is particularly important to note that the observed improvement was achieved using a software solution only, by changing the set rotational speed.
The last step of the verification was a 3D scan of the machined spare part and a comparison with the geometry of the original part. Overlapping geometries are shown in Figure 19.  in Figure 14b, it should be noted that there is an increased risk of vibrations during machining at a given rotational speed. The next step was to make a part, taking into account the conducted process stability analysis. The application of the module supporting the selection of machining parameters allowed one to introduce a correction of the spindle speed to the nearest 'stable' speeds, in order to minimize the risk of vibration during machining. In the selected case, the corrected spindle speed was = 2154 rpm. Figure 17 presents the finished part with the rotational speeds proposed by the developed support system. No vibrations were observed during the machining, which is confirmed by the obtained surface condition.   The comparison shows a clear improvement in surface condition due to the rotational speed correction. No signs of vibration were observed on surface (b), while these are clearly visible on surface (a). It is particularly important to note that the observed improvement was achieved using a software solution only, by changing the set rotational speed.
The last step of the verification was a 3D scan of the machined spare part and a comparison with the geometry of the original part. Overlapping geometries are shown in Figure 19. The comparison shows a clear improvement in surface condition due to the rotational speed correction. No signs of vibration were observed on surface (b), while these are clearly visible on surface (a). It is particularly important to note that the observed improvement was achieved using a software solution only, by changing the set rotational speed.
The last step of the verification was a 3D scan of the machined spare part and a comparison with the geometry of the original part. Overlapping geometries are shown in Figure 19. In Figure 19, the blue color indicates the original part, while the red color indicates the scan of the spare part produced using the proposed system. The resulting discrepancies expressed in the form of RMSE are 0.15 mm, which corresponds to the accuracy of the scanner used.  In Figure 19, the blue color indicates the original part, while the red color indicates the scan of the spare part produced using the proposed system. The resulting discrepancies expressed in the form of RMSE are 0.15 mm, which corresponds to the accuracy of the scanner used.

Conclusions
The paper presents the concept of a system, allowing one to simplify the procedure of manufacturing spare parts. The presented concept allows one to manufacture a spare part on the basis of the original part scan. Such an approach is particularly useful when manufacturing spare parts for special machines, where access to technical documentation or finished parts is difficult or impossible.
The feature recognition module presented is characterized by the high accuracy of cylindrical elements and chamfers recognition. The result of this module is a parametric CAD model. On the basis of the obtained model, technological strategies and parameters of the processing are determined to minimize the risk of vibration occurrence during processing. Such an approach enables obtaining the required dimensional and shape accuracy and high quality of the machined surface.
The main limitation of the presented system is the heterogeneity of computing environments. Therefore, the direction of system development is its unification. Moreover, it is planned to extend the functionality of the system by recognizing further geometric features (e.g., roundness, conical surfaces, cavities) and to introduce the possibility of generating a CAD model based on damaged surfaces.
To sum up, the presented system allows for the highly automated production of copies of special machine parts, thus reducing the need to engage qualified staff and specialized measuring equipment, while providing technological processing parameters beneficial from the point of view of process stability.

Conflicts of Interest:
The authors declare no conflict of interest.