Build-Up an Economical Tool for Machining Operations Cost Estimation

: Currently, there is a lack of affordable and simple tools for the estimation of these costs, especially for machining operations. This is particularly true for manufacturing SMEs, in which the cost estimation of machined parts is usually performed based only on required material for part production, or involves a time-consuming, non-standardized technical analysis. Therefore, a cost estimation tool was developed, based on the calculated machining times and amount of required material, based on the ﬁnal drawing of the requested workpiece. The tool was developed primarily for milling machines, considering milling, drilling, and boring/threading operations. Regarding the considered materials, these were primarily aluminum alloys. However, some polymer materials were also considered. The tool ﬁrst estimates the required time for total part production and then calculates the total cost. The total production time is estimated based on the required machining operations, as well as drawing, programming, and machine setup time. A part complexity level was also introduced, based on the number of details and operations required for each workpiece, which will inﬂate the estimated times. The estimation tool was tested in a company setting, comparing the estimated operation time values with the real ones, for a wide variety of parts of differing complexity. An average error of 14% for machining operation times was registered, which is quite satisfactory, as this time is the most impactful in terms of machining cost. However, there are still some problems regarding the accuracy in estimating ﬁnishing operation times.


Introduction
Having good budgeting tools and methods is crucial for the future success of a company [1,2], and is also useful for smaller-to-medium enterprises (SME). Moreover, correct budgeting can solve common problems, such as poor material/resource management, especially in manufacturing companies, as analyzed by Siyanbola et al. [3] in their study of the impact of budgeting operations on the performance of a manufacturing company. Usually, in these companies, particularly SMEs, the provided budget is based on the required workpiece material coupled with the empirical knowledge acquired by each company, not following a standardized procedure. Indeed, this was also registered by the previously mentioned authors, who state that it is common for the production team (machine operators) to know and have an influence on the budgetary process. Furthermore, as stated by Nikitina et al. [1], there is a need for communication within the company, especially between the production department and the financial one, to perform budgets and cost estimations. As these budgets are made with the knowledge of the production team (operators/workers), this makes the budgeting process a random one, prone to mistakes and cost miscalculations. Moreover, as the budgeting process largely depends on the empirical knowledge acquired over time, if there is a staff change in the company, this can cause adaptation problems for the new budgeter, resulting in budget errors. These problems can cause order cancelations, especially due to the delay in budget delivery, injuring the companies' competitiveness, as miscalculations in cost can drive clients away to the competition (if the budget value is too high) or result in revenue losses (if the budget value is too low). There is a lack of estimation tools for machining times and cost, especially for cases where the parts are usually produced in small series, with varying geometries and machining operations involved, as seen in SME manufacturing companies. Silva et al. [4] reported that there is a growing interest in outsourcing machining operations to these SMEs; however, this results in requests that have high part variability (in terms of dimensions, detail, and geometry), as well as being requested in small series/quantities. Therefore, the budgeting process for these companies is quite hard, requiring careful analysis of each part, even resulting in a need to perform multiple budgets. This high part variability and order amount hinders the accuracy of budgets and makes the cost estimation process quite a time-consuming one. This, coupled with the intricacies of the machining process, such as the influence of tools, material, and process parameters on the overall performance of the machining process, induces even more budgeting errors.
Machining processes are still the most used to produce high-precision parts for the manufacturing industries, and due to the popularity of these processes, there is a large amount of research performed about them, focused on studying the influence of process parameters and developing ways to optimize them [5,6]. There is, also, a lot of research conducted about the use of coated tools, that improve the overall tool's life by reducing the amount of sustained wear, usually by employing coatings with high wear resistance, as reported by Martinho et al. [7], these coating extend tool-life. Studies around this subject are usually focused on hard to machine materials, evaluating the tested tools' wear behavior, as seen in this study by Gouveia et al. [8] where a comparative study of various machining tools is made, when machining a duplex stainless-steel alloy. Studies such as these offer a valuable insight on the influence of cutting geometry, tool coating, and machining parameters on tool wear [9]. Parent et al. [10] mention that the machining parameters also have quite a relevant impact on the performance of a certain machining operation, being tightly related with process optimization, especially regarding machining cost optimization. These studies are important when trying to optimize the machining process, also having the possibility of registering the cutting forces developed during these processes, allowing for further optimization, as these are strongly related to the overall process' stability, efficiency, and even energy consumption [11]. The study of the machining processes and their optimization may prove quite useful for cost estimation, as it provides ways to best manage material/resources [12] and machining operations times. Choosing tools, coatings, and even more efficient machining strategies, induces an increase in productivity reducing the overall part production cost by, primarily, reducing the machining time. This was reported by Huang et al. [13], where the authors devise a new machining strategy, where the cutting length and machining time are promoted for pocket milling operations. A model was successfully developed, able to generate a spiral toolpath that can be applied for a multitude of pocket milling operations, in which the material removal rate, cycle time, and tool-path length were optimized. The employment of lubricants can also be beneficial. These are known to improve machining times, as they allow for higher feeds and cutting speeds, as reported by Agarwal et al. [14], where the authors employ a solid lubricant in the machining of AISI 304 stainless-steel alloy and then compare the results to dry and wet machining. The authors report that even when compared to wet machining (commonly used for part production when valuing machine surface quality), the use of solid lubricant improves the produced surface quality, reduces the cutting forces, and improves the material removal rate. The use of these solid lubricants not only shows advantages in terms of machining performance (for some alloys), but also shows promissory results in terms of sustainability [15]. Cryogenic machining is also a popular and promising lubrication/refrigeration method, as reported by Agrawal et al. [16]. The authors analyze the tool-wear, tool-life, machined surface roughness and overall process cost of machining operations of Ti6Al4V titanium alloy, using cryogenic machining, and then comparing the results with wet-machining operations. The authors have reported that for lower speeds, the cryogenic turning of this alloy does not present considerable advantages over wet turning.
From a cost estimation standpoint, the selection of an adequate machining strategy for part production is crucial, requiring knowledge about the machining parameters and their influence [1,4]. A careful planning of the machining operations required for a determined part is very beneficial, for example, optimizing the material consumption for a set of operations, by grouping up similar shapes that require the same machining operation [17]. Correct operation sequence planning is also beneficial, especially when producing a series of parts. This is true for a wide variety of processes, such as additive manufacturing [18] or even machine assembly processes [19]. Plaza et al. [20], propose a decision system for optimizing machining operations by selecting an appropriate strategy based on the part request. The authors relate the correct strategy selection to a reduction in tool wear, machining forces, and overall machining cost. Machining parameters have a great influence on the process [21], affecting factors such as tool wear [22], surface quality [23], and material removal rate [24], which affect the total operation time and, thus, the cost of the machining operations. Zhang et al. [25], study the reduction of energy consumption for micro-milling processes, by proposing an energy model. The authors successfully developed a mechanistic model for the prediction of energy consumption. The optimization method was put into practice, and, with the proposed methodology, the authors were able to reduce energy consumption by almost 8%. Still, regarding the machining process optimization, this time regarding the production of better surface quality, Mersni et al. [26], have studied the optimization of machined surface quality, for ball-end milling operations of Ti6Al4V titanium alloy. The authors have employed the Taguchi method and analysis of variance, to determine the best set of machining parameters to obtain the best possible surface roughness quality. In another interesting study, by Narita [27], a method to minimize machining costs is proposed. The method consists of analyzing the most influential parameters on the overall machining cost and then determining the best set of parameters to minimize this. Cost optimization is a common research topic, either by the implementation of optimal parameters or by monitoring tool behavior, such as a monitoring system [28], which can also be used to determine the economic impact of the process itself [29]. To optimize the cost of the machining processes, there have been some applications developed for this purpose, with cost estimations based on machining times, as proposed by Ben-Arieh and Li [30], where a web-based application, based on the Java 2 Enterprise Edition was developed. The prototype was successfully developed and able to predict the machining time of rotational parts, based on the machining parameters that were used. The work proposes the linking of multiple design stations inside a manufacturing shop, to provide these cost estimations in a faster manner; however, there was no practical validation presented for this work. Machining times are usually acquired from empirical knowledge, obtained from years of working at a certain company, making it hard to use the application for different machining processes. Energy consumption also impacts machining costs. In fact, the optimization of energy consumption is quite a popular research topic. The most influential parameters on machining cost are the toolpath, cutting tool selection, and tool sequence [31][32][33]. Machining parameters also influence the machine's energy consumption during milling. In fact, tests were conducted on milling titanium alloy by Tlhabadira et al. [34], concluding that increases in cutting speed and depth of cut produce an increase in energy consumption. Still, regarding energy consumption, in companies with multiple machines that produce a high number of parts, there is a need to properly schedule the production orders, with a correct machine selection being important [35,36].
Cycle times significantly influence the overall efficiency and cost of a process, being tied closely to productivity [37]. Estimation of these times is important when wanting to reduce/predict the cost of a determined operation. This is especially true for machining operations, where the total part production cost is largely dependent on this factor. In terms of cost estimation for machining processes, it is very important to have accurate methods to predict these times, either by acquired empirical knowledge or by the development and implementation of methods that seek to estimate and optimize these times. Regarding optimization based on empirical knowledge, Pal and Saini [38], propose the optimization of cycle time when machining a forged crankshaft. A study of the process was performed, identifying possible improvements in terms of actions performed during machining and setup operations. The authors were able to improve the cycle time by 4.42%, resulting in a reduction in overall machining cost of about 7%. However, these empirical studies are quite time-consuming and expensive, as they require the use of consumables to perform the required tests. In terms of machining simpler parts, the machining time prediction is much more straightforward, when compared to parts with more organic shapes. However, there are some methods that can be used for these complex shapes, as proposed by Timar et al. [39], by optimizing the tool path for the machining of curved surfaces, determining the best strategy, and set of machining parameters to perform the task in the least amount of time. Regarding cycle time optimization, the Taguchi method can be successfully employed to reduce machining times, while maintaining productivity requirements, as studied by Sakidaze et al. [40], where the authors use this method to reduce the cycle time in plateau honing of a diesel engine cylinder. Still, regarding machining parameter optimization for reducing the operation time, Cafieri et al. [41] propose an approach for the optimization of plunge milling time is presented, based on mixed-integer nonlinear programming. The authors optimized the machining parameters and validated the obtained results from tests performed on CNC machines, finding that they could reduce the operation times by 55%. This highlights the importance of machine selection in the machining process' performance [42,43]. Still, regarding the development of algorithms for cycle time optimization/prediction for milling operations, these are usually developed based on the parameters used during the process. However, there are some methods that can be coupled with this simple calculation, especially for complex parts. One of these methods is toolpath evaluation [44]. This data can be used to predict the machining times, with some authors creating methods that use this stored information and apply it to new processes, where information regarding outputs such as machining times and surface roughness can be obtained [45], even offering process cost estimations as proposed by Ning et al. [46]. In that study, the authors propose a process for machining cost estimation based on convolutional neural network part feature recognition. The model was successfully developed by the authors, offering a fast and accurate way of determining machining costs. However, this has a quite complex implementation, requiring constant learning of new parts for an accurate estimation.
Regarding the overall production time for a certain machined part, there is also the need to consider the preparation times of the machined parts on the budget, especially machine setup and part design times [47,48]. Some machined parts undergo multiple machining operations, needing to be extracted from the machine to be re-adjusted or placed in a different machine. These preparation times can cause problems from a cost estimation standpoint, as these setup times are not always well defined. The use of optimized jigs enables the fixturing of multiple parts, which undergo different machining operations, or by producing systems that are simpler to operate, resulting in faster setup times [49]. Kumar et al. [50], present a study on the development of a fixture that is meant to reduce operation time for a machined part that undergoes a variety of machining processes, including turning, milling, and drilling. The authors developed a fixture that was able to hold the part in place for different operations without requiring extracting, which resulted in a gain of 4 min per produced component. In a similar study, by Kumar et al. [51], a modular jig for machining parts was designed. This jig enabled the performance of machining operations on more parts simultaneously, registering a reduction of up to 32% in part production time [51]. These studies highlight the importance of machine setup, as well as its influence on the overall production time.
There are a lot of factors influencing the machining processes, from parameters, lubrication methods, and even the material's machinability. All these factors have an impact on the overall machining cost and machining times. Determination of the machining cost and cost estimation is critical for the success of a manufacturing company [48]. Some methods have been developed for the direct cost estimation to produce some parts [52,53], with some recent studies using deep learning methods to predict the manufacturing cost of a part by using 3D CAD models. This enables the optimization of the part's production in the design stage [54].
There is little recent research on the prediction of machining costs based on calculated machining times. These times have the greatest influence on the overall machining cost, due to the cost per hour of the machining operator, equipment amortization, and machine energy consumption. Other factors, such as machine consumables and material quantity also influence the production cost. The analyzed models and methods for cost estimation and optimization are quite complex, showing low adaptability for other applications, especially in the machining of parts. As such, in this paper, the development of an affordable and simple cost estimation tool for machined parts, based on the machining times and required material is presented. The tool was developed to be quite flexible, with easier adaptation for different machining processes. An MS Excel ® interface was designed, enabling the fast configuration as estimation of part production times, from preparation to finishing operations. These times are then used to calculate total production costs, which can be used to create and supply accurate budgets to clients, in a short amount of time. The developed method and tool would benefit the budgeting process of part manufacturing companies, mainly SMEs, that see many budgeting problems, mainly associated with high part variability. The budgeting process for these SMEs is usually performed based on the amount of required material for part production, or by involving a careful, non-standardized analysis from the operators that have acquired empirical knowledge over a period (working on the area). As such, the SME budgeting process is quite time-consuming and prone to mistakes, lacking standardization. Furthermore, SMEs lack a vast number of resources, not being able to implement complicated or costly solutions for these problems. Due to these aspects, the developed cost estimation tool has the potential to be used by these SMEs, although it can be employed by any enterprise/user that seeks to perform cost estimation of machined parts.
The present study is divided into five main sections (including the present section), in the following subsection, the background and contextualization for the developed cost estimation tool will be presented. In Section 2, Methodology, the considerations made for the development of the tool will be presented, namely the milling machining centers, types of material, and machining parameters. Furthermore, the working principle and operation time calculation method will be presented. Finally, the validation method that was adopted is presented at the end of Section 2. In Section 3, the results regarding the development of the cost estimation tool are going to be presented, namely the input and output sheets of the developed tool, as well as the implementation results for two case studies. Section 4 offers a discussion of the obtained results and, finally, in Section 5, the concluding remarks about the developed work are given.

Background-Development of an Affordable and Simple Cost Estimation Tool
The development of the cost estimation tool was made based on an SME manufacturing company that produces machined parts, primarily by the milling process. The analyzed company followed a conventional cost estimation process, shown in Figure 1. However, due to the high variability and small series of requested parts, the created budgets had some errors, usually resulting in over-estimated production costs and, in some cases, underestimated production costs, which resulted in company revenue loss. This was the case, especially for more complex parts. Thus, there is an opportunity to develop a tool that can be useful for this sector but also provide the necessary knowledge to be adapted and adopted by other kinds of industries. a tool that can be useful for this sector but also provide the necessary knowledge to be adapted and adopted by other kinds of industries. To speed up the budgeting process and reduce the errors associated with it, a cost estimation tool based on the analyzed company's resources and conditions, such as machines, workforce, and client requests, was developed. In the subsequent sections, the methodology used for the development and validation of this tool, and the results obtained from this validation, are going to be presented. Furthermore, a discussion of the obtained data is going to be made, analyzing the advantages/disadvantages of the developed tool.

Materials and Methodology
To develop the cost estimation tool, it was decided that an approach based on the calculation of machining times and founded on the final part's dimension would be the best choice. The calculations were developed for each of the milling machine types considered for validation of the model. The different milling machines that were considered can be observed in Table 1, where the different specifications of each machine are presented.  To speed up the budgeting process and reduce the errors associated with it, a cost estimation tool based on the analyzed company's resources and conditions, such as machines, workforce, and client requests, was developed. In the subsequent sections, the methodology used for the development and validation of this tool, and the results obtained from this validation, are going to be presented. Furthermore, a discussion of the obtained data is going to be made, analyzing the advantages/disadvantages of the developed tool.

Materials and Methodology
To develop the cost estimation tool, it was decided that an approach based on the calculation of machining times and founded on the final part's dimension would be the best choice. The calculations were developed for each of the milling machine types considered for validation of the model. The different milling machines that were considered can be observed in Table 1, where the different specifications of each machine are presented. As observed in Table 1, the main difference between machines is the workspace volume, the amount of axis, and the workpiece fixation method. These machines were considered as they are selected based on the requested final workpiece (size, tolerances, number of needed axes, etc. . . . ). The machines with vacuum tables are mainly used for the machining of parts with small heights or thickness. In Figure 2, some parts being produced on the mentioned machined can be observed. Table 1, the main difference between machines is the workspace volume, the amount of axis, and the workpiece fixation method. These machines were considered as they are selected based on the requested final workpiece (size, tolerances, number of needed axes, etc.…). The machines with vacuum tables are mainly used for the machining of parts with small heights or thickness. In Figure 2, some parts being produced on the mentioned machined can be observed. The developed tool's working principle is shown in Figure 3. The inputs for the tool, as observed in Figure 2, are the part's material, the initial required material amount (based on the part's dimensions), machining strategy (parameters and operations), and required machines to obtain the workpiece, and part complexity The developed tool's working principle is shown in Figure 3. The developed tool's working principle is shown in Figure 3. The inputs for the tool, as observed in Figure 2, are the part's mat required material amount (based on the part's dimensions), machining st ters and operations), and required machines to obtain the workpiece, and The inputs for the tool, as observed in Figure 2, are the part's material, the initial required material amount (based on the part's dimensions), machining strategy (parameters and operations), and required machines to obtain the workpiece, and part complexity level definition. Based on all this information, the tool performs the calculation of machining time, which can be used to estimate the overall production cost for the machined parts.

As observed in
Total production time and, consequently, the total production cost are obtained by determining the operation time for the five production steps that each part undergoes, as follows: (1) CAD (2D/3D): The 2D technical drawings are needed for part production; additionally, the 3D drawings can be used to perform the CAM software. If these are not provided, they need to be made.
(2) CAM: The execution and introduction of the CAM software that is required for part production. (3) Machine setup: This step encompasses all the required machine preparation steps for machining, including machine cleaning, tool preparation, tool and holders exchange, and jig placement. (4) Machining operations: The different machining operations that the parts are subject to. (5) Finishing operations: The operations required to finish the part according to specifications, including machining and manual finishing operations, such as surface roughness improvement (finishing passes) or manual deburring.
These five steps are applied for every part that is produced in the milling machines; however, due to the existing variability from part to part in terms of geometry complexity and required details, the determination of the operation times is insufficient to provide an accurate prediction. Thus, a part complexity level was created to be applied to each of the parts that are being analyzed in terms of cost, which influences the estimated times for each of the production steps.
In the following subsections, the operation time calculation method for each of the five production steps is going to be presented. Furthermore, the working principle of the model will be described in more detail, including the determination of the part complexity level and its influence on the estimated times are going to be explained. Furthermore, the methodology adopted for the validation tests is going to be presented.

Considered Workpiece Materials
The considered workpiece materials were selected based on the requests that are usually performed to the company where the tool was validated. These are mainly aluminum alloys, although some requests are for parts made in a polymeric material. Regarding the considered aluminum alloys, these can be classified as "hard" aluminum alloys and "soft" aluminum alloys, indicating their hardness relative to one another. As for the "hard" aluminum alloys, AW7050, AW7075, AW2017, and AW2030 alloys were considered. Regarding the "soft" ones, the AW6082, AW6063, AW5083, and AW5724 were considered. The most relevant mechanical properties of these alloys can be observed in Table 2, these properties were taken from the material data sheet, provided by the material supplier. In addition to the mentioned alloys, some polymers were also considered, as some parts made from these materials are requested by the company. These polymeric materials can also be divided into "hard", (e.g., PET and PVC) and "soft", (e.g., HD-PE and PTFE) plastics. Due to their properties, polymeric materials are usually easier to cut than metals; as such, the machining parameters selected for the machining of these parts are usually higher (namely feed rate and axial depth of cut). Taking these higher values as reference (100% of feed rate value is used for these materials), in Figure 4, the percentual values of feed rate and axial depth of cut can be seen for both "hard" and "soft" aluminum alloys and polymeric materials. can also be divided into "hard", (e.g., PET and PVC) and "soft", (e.g., HD-PE and PTFE) plastics. Due to their properties, polymeric materials are usually easier to cut than metals; as such, the machining parameters selected for the machining of these parts are usually higher (namely feed rate and axial depth of cut). Taking these higher values as reference (100% of feed rate value is used for these materials), in Figure 4, the percentual values of feed rate and axial depth of cut can be seen for both "hard" and "soft" aluminum alloys and polymeric materials. As can be observed in Figure 4, the machining parameter values are higher for softer materials, this will make the machining of these materials faster (given that the workpiece is the same). The variation in axial depth of cut is also dependent on the chosen value of radial depth of cut. This value is divided into three levels:

•
First level: the radial depth of cut is equal to 20% of the tool's diameter, mainly selected for contour operations. Enables the selection of higher values of axial depth of cut; • Second level: radial depth values go from 20% to 45% of the tool's diameter, used for some contour operations, as well as the machining of cavities or slots; • Third level: radial depth of cut from 45% to 100% of the tool's diameter, used mainly for roughing operations, in cavities or slots. Allows only for low values of axial depth of cut. As can be observed in Figure 4, the machining parameter values are higher for softer materials, this will make the machining of these materials faster (given that the workpiece is the same). The variation in axial depth of cut is also dependent on the chosen value of radial depth of cut. This value is divided into three levels:

•
First level: the radial depth of cut is equal to 20% of the tool's diameter, mainly selected for contour operations. Enables the selection of higher values of axial depth of cut; • Second level: radial depth values go from 20% to 45% of the tool's diameter, used for some contour operations, as well as the machining of cavities or slots; • Third level: radial depth of cut from 45% to 100% of the tool's diameter, used mainly for roughing operations, in cavities or slots. Allows only for low values of axial depth of cut.

Operation Time Estimation
In this subsection, the various methods for the calculation of the operation times for each of the five steps of production are going to be presented, with each of these being divided into one subsubsection. The total operation time estimation is obtained by adding the estimated values obtained for each of the production steps.

Operation Time Estimation: CAD 2D/3D
For the estimation of total part production time, the 2D and 3D drawings must be considered. These are a necessity for part production and are not always provided by the client, meaning that in some cases these must be produced. The configuration of the cost estimation tool was made considering the types of drawings for milled parts received. Base times were attributed for 2D and 3D drawings, and are presented in Table 3. Table 3. Base times for the steps regarding the CAD preparation of the parts.

CAD Step Time (Min.)
2D technical drawings 5 3D drawings 15 These base times will be influenced by the part's complexity, which will be explained in more detail in Section 2.2.2.

Operation Time Estimation: CAM
Regarding the CAM production step, the estimated based time was defined in a similar way to that determined in the last subsection. This time was determined to be 10 min; however, some parts need to be adjusted inside the machine to be produced, sometimes even requiring multiple clamping operations. These clamping operations would be added to the base time, as they need to be considered in the CAM software. It was determined that each of these clamping operations would add 10 min to the base time.

Operation Time Estimation: Machine Setup
The time estimation method for the machine setup production step is the same as the one presented for the CAM production step. The base time for the machine preparation was set to 10 min. Part clamping operation steps were also considered, each of these adding 10 min to the determined base time for this production step.

Operation Time Estimation: Machining Operations
For the development of the cost estimation tool, the required machining operations for part production were identified, as follows: side-milling; face-milling; end-milling; drilling, and boring or threading. The equations were obtained from already documented work (such as the Sandvik manual for machining operations), conjugating acquired empirical knowledge to adjust some of these equations, to yield more accurate results in terms of machining time.
Regarding these operations, it is important to note that both part complexity level and production quantity affect the machining times. The influence of the latter will be explained at the end of this subsection.

Calculation of Side-Milling Time
Firstly, the part's exterior perimeter (P ext ) is calculated, considering the part's length and width values. Secondly, the estimated number of roughing passes (No. R.P. ) is defined. This is calculated as shown in Equation (1), considering part thickness (t, in mm) and the depth of cut (a p , in mm).
The value obtained from the calculation of (1) should be rounded up, being equal to an integer. Moreover, the number of finishing passes (No. F.P. ) are also calculated, as shown by the Equation (2), considering part thickness and the tool diameter (Ø tool ). For this kind of operation, the chosen tool diameter usually depends on the thickness of the machined part, as presented in Table 4. Regarding feed rate value, it is chosen based on the machined material and on the current cutting length. For lower cutting lengths the value of feed rate will be lower and, consequently, for higher cutting lengths, the value of feed rate could reach up to 3000 mm/min, for high-performance tools.

Calculation of Face-Milling Time
For this kind of operation, face-mills with diameters between 44 and 64 mm are typically used, using a value of the width of cut (a e ) corresponding to 70% of the tool's diameter. The number of facing passes (No. FM.P. ) is calculated by dividing the material's width by the chosen a e value, and the result should be rounded up, as for Equations (1) and (2).
With the knowledge of the number of facing passes and knowing the length of the part (P length ) and the tool's diameter (Ø tool ), the facing length (L Facing , in mm) can be calculated, as shown in Equation (4).
The value chosen for a p is usually 1 mm, however, in some cases, face-milling must be performed on the opposite side of the part, requiring its clamping. For the second facing operation the value for a p is 5 mm. The machining time for the first (M.T. 1st Facing ) and second machining operation (M.T. 2nd Facing ) is determined by Equations (5) and (6).

Calculation of End-Milling Time
End-milling time estimation is performed based on the value of a e , dependent on the tool diameter (40% of this value). The value for end-milling distance per depth increment (l E.M. , in mm) needs to first be calculated, and this is dependent on the length and width of the machined cavity. This value is then multiplied by the number of increments (in depth) that will be performed to machine the cavity, obtained by dividing the depth of the cavity (D cavity ) by the depth of cut value (a p ). The obtained value is the total end-milling distance of the operations (L E.M. ).
The total machining time for the end-milling operations (M.T. E.M. , in minutes) can be calculated, by using Equation (7), essentially dividing the L E.M. by the feed rate value (V f ).
Regarding finishing operations, these are performed on the interior cavity walls and can be calculated in the same way as the side-milling operations.

Calculation of Drilling Time
Drilling time calculation depends on tool diameter (Ø tool ), chosen according to the desired hole diameter, the depth of the hole (D hole , in mm), the value for feed per rotation (f, in mm/rotation), and the rotational speed (N, in RPM) employed during drilling operations. During the drilling process, the machine performs plunges, quickly retracting and then resuming drilling for a few more millimeters, after retracting again, performing this cycle until the operation is concluded. This promotes a correct chip evacuation from the cutting zone. The number of plunges (No. plunges ) that need to be performed during the process is calculated by Equation (8).
The value for the number of plunges should always be rounded up; next, to this number, one more plunge should be added. After determining the value for No. plunges , the total drilling length (L drilling , in mm) is next. The calculation of this value is determined based on the No. plunges needed for the operation and the tool diameter. Equation (9) shows the calculation process for total drilling length.
The machining time for drilling operations (M.T. Drill , in minutes) is calculated according to Equation (10).

Calculation of Boring or Threading Times
The method for calculating the machining time of boring and threading (M.T. Thread , in minutes) operations is shown in Equation (11), where the depth of the hole (D hole ), the feed per rotation (f ), and rotational speed (N) values are considered.

Influence of Production Quantities on the Times
The quantity of requested parts is also considered in the estimation of machining times, as it was found that this factor had an influence on the total production times of machined parts. A larger quantity implies that the worker is more familiar with the production procedures of a certain part. This familiarity causes a slight increase in the production rate. As such, an inflation factor was created for certain quantity levels, which should be multiplied by the estimated machining times, as shown in Table 5.

Operation Time Estimation: Finishing Operations
Expected machining times for finishing operations (M.T. Finishing , in minutes) were determined, based on the part's dimensions (in mm), namely length (P length ), width (P width ), part thickness (t), and feed value (V f ). Equation (12) shows the way to determine the expected finishing time.

M.T. Finishing
The finishing times are also affected by part complexity level, which will increase with the part's level, as seen for the estimated machining operation times (addressed in detail in Section 2.2.2).
Estimated times obtained from this equation may present deviation, as finishing operations are quite difficult to estimate in this case. As these are dependent on the machining strategy and part geometry, additionally, some parts may require manual finishing, with some of them even needing supplementary clamping to undergo these operations.

Cost Estimation Tool Working Principle
The cost calculation method can be divided into two main steps, one regarding the definition of the initial inputs, such as part's dimensions, client requirements, and needed material volume. The other step encompasses the definition of the part's complexity level and the calculation of the total operation times, based on the conjugation of all the defined parameters and the influence of the complexity level. These steps will be presented in the following Sections 2.2.1 and 2.2.2.

Step 1 of Cost Calculation
A flowchart was created to depict the cost estimation model. In Figure 5, the flowchart for the first cost calculation step can be observed. The initial client's requirements are considered, as well as the part's dimensions. The latter is used to determine the amount (in kg) of raw material that will be used in the production process, with a higher volume of material being used for wider parts. With all this information defined, the machining strategy can also be determined, ending the first step of cost calculation. The initial client's requirements are considered, as well as the part's dimensions. The latter is used to determine the amount (in kg) of raw material that will be used in the production process, with a higher volume of material being used for wider parts. With all this information defined, the machining strategy can also be determined, ending the first step of cost calculation.

Phase 2 of Cost Calculation
After machining strategy definition, the part complexity level is attributed based on three main parameters of selection: • Level of detail: Refers to the amount of detail that each of the part's need, based on the number of operations applied for part production. The number of operations that correspond to each level is presented in Table 6. • Geometry: Regards the complexity of each part, divided into three categories, as seen in Figure 6. • Machine axis needed: Differentiates the parts that need three or five axes for the machining operations.   As previously mentioned, the part complexity level influences each of the production steps, from CAD to finishing operations. For the CAD, CAM, and machine setup production steps, the influence of the part complexity level in the estimated time is applied in the same manner. As with an increase in part complexity level, comes an increase in detail  As previously mentioned, the part complexity level influences each of the production steps, from CAD to finishing operations. For the CAD, CAM, and machine setup production steps, the influence of the part complexity level in the estimated time is applied in the same manner. As with an increase in part complexity level, comes an increase in detail and number of machining operations, more operations imply more drawing, programming, and setup steps. The determined times can be observed in Table 7. These should then be added to the base times to obtain the production times for each of mentioned steps and are presented as minutes per detail added to the drawing (min/detail). Regarding the influence of the part complexity level on the machining and finishing operations estimated time, this is applied in the same manner. An inflation factor was devised for each part complexity level, and this value should be multiplied by the estimated times for these operation steps. Table 8 presents the inflation factor for each of the parts' complexity levels. With all this defined, the tool can estimate the total production time of a certain part, and these times can then be used to calculate the total operation cost of the process. This value will also be added to the amount of raw material determined in step 1 of cost calculation, to determine the total cost of part production.

Validation of the Developed Tool
The cost estimation tool was subjected to a series of validation tests, being used for two case studies. For Case Study 1, the validation consisted of the analysis of a total of 24 parts, 3 for each different complexity level. The tool was used to estimate the total production time of these parts (for all the mentioned production steps), which were then produced, and their production times were clocked by the machine operators (after each production step the worker would register the time taken up to perform the said task, this would later be compared to the estimated machining times). These times were then compared to the estimated ones, and the percentual deviation from each of the produced parts' production time was registered. The percentual deviations are presented with either a positive or negative value, with it representing a time over-estimation and underestimation, respectively. This comparison of time estimation is key, as the tool performs the calculation of total operation cost based on these production times.
Regarding Case Study 2, the validation was performed in the same manner; however, the machine types for this case study were slightly different, being CNC milling centers with vacuum tables. These machines performed the same operations as those of Case Study 1; however, the part complexity of the workpieces produced on these machines is somewhat constant, with the parts having low amounts of detail with low complexity (in terms of geometry). Additionally, the finishing operations for these machines are usually performed by the machine itself (differing from the manual finishing operations conducted for parts produced in the machines considered for Case Study 1). For Case Study 2, a total of 10 parts were produced, registering the machining time that was estimated, then, producing the workpiece and timing this manually (as for Case Study 1). These deviations were then averaged and are subsequently presented in the Results section of this study.

Results
The cost estimation tool was successfully developed and tested, and in the present section the application is going to be presented in Section 3.1, showing the interface while explaining each of the different main interface elements. Furthermore, the accuracy of this tool was tested by estimating and producing various machined parts and then comparing the deviation of the predicted times from the real times. The data obtained from these tests will be presented in Section 3.2.

Developed Cost Estimation Tool
The developed cost estimation tool considers the inputs given in the manner described in the previous section to give a production time estimation for parts produced in CNC milling centers, having an interface in MS Excel ® , as seen in Figure 7. The interface is divided into six main sections:

•
General data: This is where the information regarding the client, part and project name, and part quantity is defined; • Material: In this section, the material information is filled, mentioning designation, material properties, raw material tolerances, and dimensions, as well as material price; • Dimensions: Regarding the part's dimensions; • Strategy: Here, the part complexity level is set, as well as the variables that directly influence the estimated times, such as low tolerance requirements, as well as cavity and 2D/3D drawing consideration; • Technical observations: This section should be filled if there is a need to request drawings or drawing corrections for part production.  To input data in the developed interface requires knowledge of machining processes currently being applied, for example, in the "Strategy" section of the interface, a choice for cavity consideration was added. This should be defined according to the total area of the cavities, in relation to the workpiece area. The chosen value will influence the machining time for end-milling operations; however, this input can be left blank.

022, 12, x FOR PEER REVIEW
After filling the input interface, the cost estimation tool will estimate the operation times for each of the mentioned production steps, exhibiting the results in an output sheet, observed in Figure 8.   The output sheet is divided into five main sections, displaying the filled data regarding the material and project information, the adopted strategy, observations, and the part's technical drawing. Estimated times are displayed in the "Operation times" section. Note that in this section there is an input table for the real machining times, which was added for the validation of the cost estimation tool. These real times were registered by the operator after machining.
As can be observed in Figure 6, there are some deviations that originate from the lack of need to perform the CAD drawings of the part. Furthermore, there are some deviations registered for the machine setup times and finishing operations. This can be attributed to the fact that these operations are performed manually, being harder to estimate correctly (highly dependent on the operator). It is also worthy of noting that, although the finishing times have quite a large deviation from the real times, this is since these operations usually have a short duration. This can also be observed in another part, as depicted in Figure 9. Observing the output sheet shown in Figure 9, it can be noted that the highest percentual deviation, in terms of real machining time, is registered for the calculation of finishing operations (−80%). Although this value is considerably high, the difference between estimated and real times is less than one minute. Again, this lack of accuracy in the estimation of these operations is since finishing operations are performed manually (for the parts produced in these machine types). However, analyzing the deviation from all the other production steps, the maximum deviation is +8%, which is incredibly satisfactory. This was registered for the parts of a similar complexity level, with lower deviations being registered. the operator after machining.
As can be observed in Figure 6, there are some deviations that originate from the lac of need to perform the CAD drawings of the part. Furthermore, there are some deviation registered for the machine setup times and finishing operations. This can be attributed t the fact that these operations are performed manually, being harder to estimate correctl (highly dependent on the operator). It is also worthy of noting that, although the finishin times have quite a large deviation from the real times, this is since these operations usuall have a short duration. This can also be observed in another part, as depicted in Figure 9 Observing the output sheet shown in Figure 9, it can be noted that the highest percentua deviation, in terms of real machining time, is registered for the calculation of finishin operations (−80%). Although this value is considerably high, the difference between esti mated and real times is less than one minute. Again, this lack of accuracy in the estimatio of these operations is since finishing operations are performed manually (for the parts pro duced in these machine types). However, analyzing the deviation from all the other produc tion steps, the maximum deviation is +8%, which is incredibly satisfactory. This was registere for the parts of a similar complexity level, with lower deviations being registered.

Cost Estimation Tool Validation
The developed cost estimation tool was validated according to the procedure in Section 2.3. The average percentual deviations were registered for each of the production steps and are presented in Figure 10. Additionally, an influence of part complexity level in these deviations was noticed. Furthermore, this influence behaved slightly differently depending on the analyzed production step. A graph that depicts the variation in absolute percentual deviation of each production step, over the different part complexity levels can be observed in Figure 11.
The developed cost estimation tool was validated according to the procedure in Section 2.3. The average percentual deviations were registered for each of the production steps and are presented in Figure 10. Additionally, an influence of part complexity level in these deviations was noticed. Furthermore, this influence behaved slightly differently depending on the analyzed production step. A graph that depicts the variation in absolute percentual deviation of each production step, over the different part complexity levels can be observed in Figure 11.  An additional case study was conducted, as the tool can be adapted to different machines. Tests were conducted for CNC milling machines with vacuum tables. These machines conduct mainly: side-milling; end-milling; drilling and face-milling operations, which meant that the equations are presented in Section 2.1 could be used to estimate machining operations. It was noted that the parts usually produced in these machines did Figure 10. Average percentual deviation for each part production step. tion 2.3. The average percentual deviations were registered for each of the production steps and are presented in Figure 10. Additionally, an influence of part complexity level in these deviations was noticed. Furthermore, this influence behaved slightly differently depending on the analyzed production step. A graph that depicts the variation in absolute percentual deviation of each production step, over the different part complexity levels can be observed in Figure 11.  An additional case study was conducted, as the tool can be adapted to different machines. Tests were conducted for CNC milling machines with vacuum tables. These machines conduct mainly: side-milling; end-milling; drilling and face-milling operations, which meant that the equations are presented in Section 2.1 could be used to estimate machining operations. It was noted that the parts usually produced in these machines did Figure 11. Absolute percentual deviation variation of each part production step, over different part complexity levels.

Cost Estimation Tool Validation: Case Study 2
An additional case study was conducted, as the tool can be adapted to different machines. Tests were conducted for CNC milling machines with vacuum tables. These machines conduct mainly: side-milling; end-milling; drilling and face-milling operations, which meant that the equations are presented in Section 2.1 could be used to estimate machining operations. It was noted that the parts usually produced in these machines did not exhibit much variability in terms of shape or complexity. This enabled a more accurate time prediction based on the equations, especially for the step regarding machining and finishing operations, without the need to define part complexity levels. One of the produced parts can be observed in Figure 12, as well as its technical drawing. not exhibit much variability in terms of shape or complexity. This enabled a more accurate time prediction based on the equations, especially for the step regarding machining and finishing operations, without the need to define part complexity levels. One of the produced parts can be observed in Figure 12, as well as its technical drawing. Regarding machining time operation for these parts, it was quite accurate for all the tested ones; however, regarding the performance of CAM software for the machining, it was the step that had the biggest deviation (this is depicted in Figure 13). This is due to the number of holes that these parts have, inducing delays from the developers of the CAM for these parts. Although some of these parts imply complex programming, it was noted that the average percentual deviation registered for this step (−19%) is not as accentuated as that registered for Case Study 1 (38%), this is because the complexity of some the part's machined in machines of this case study is considerably higher, especially in terms of geometry.
A total of 10 parts were estimated and produced using these machines, registering the average percentual deviation values from the real production times, as presented in Figure 13.  Regarding machining time operation for these parts, it was quite accurate for all the tested ones; however, regarding the performance of CAM software for the machining, it was the step that had the biggest deviation (this is depicted in Figure 13). This is due to the number of holes that these parts have, inducing delays from the developers of the CAM for these parts. Although some of these parts imply complex programming, it was noted that the average percentual deviation registered for this step (−19%) is not as accentuated as that registered for Case Study 1 (38%), this is because the complexity of some the part's machined in machines of this case study is considerably higher, especially in terms of geometry. not exhibit much variability in terms of shape or complexity. This enabled a more accurate time prediction based on the equations, especially for the step regarding machining and finishing operations, without the need to define part complexity levels. One of the produced parts can be observed in Figure 12, as well as its technical drawing. Regarding machining time operation for these parts, it was quite accurate for all the tested ones; however, regarding the performance of CAM software for the machining, it was the step that had the biggest deviation (this is depicted in Figure 13). This is due to the number of holes that these parts have, inducing delays from the developers of the CAM for these parts. Although some of these parts imply complex programming, it was noted that the average percentual deviation registered for this step (−19%) is not as accentuated as that registered for Case Study 1 (38%), this is because the complexity of some the part's machined in machines of this case study is considerably higher, especially in terms of geometry.
A total of 10 parts were estimated and produced using these machines, registering the average percentual deviation values from the real production times, as presented in Figure 13.  A total of 10 parts were estimated and produced using these machines, registering the average percentual deviation values from the real production times, as presented in Figure 13.

Discussion
In Figure 10, it can be observed that the percentual deviations are mostly positive. This is quite satisfactory, as a positive percentual deviation is preferred since there will be no direct revenue loss from the production of the parts (associated with negative percentual deviations). For this case, the higher percentual deviation is for the "Finishing operations" step, exhibiting a −71% percentual deviation. This value is quite high, due to the complexity of these types of operations, and the fact that these are usually carefully performed, and are dependent on human work. The second highest percentual deviation is for the "CAM" step, at about 38%. The most influential production step on the overall production cost is the "Machining operations", due to the influence of machining time [34]. This step registered an acceptable percentual deviation of about 14%. The part's complexity level was also found to influence the percentual deviation error, increasing this error for higher levels. This can be observed in Figure 11, where the highest values for all the considered production steps are registered for higher part complexity levels. Additionally, the error of "Finishing operations" tends to be higher when compared to the other production steps. Again, this is due to the difficulty in predicting these times, as there are many variables that cannot be controlled directly, such as finishing and inspection operations that are performed outside the machine [44]. This is corroborated by the data obtained from Case Study 2, presented in Figure 13. A side-by-side comparison of the average percentual deviation values for each of the production steps, for both case studies, can be observed in Table 9. In Case Study 2, the produced parts were of similarly low complexity, with finishing operations being conducted inside the machine. This is reflected in the obtained results, as the values for percentual deviation are quite consistent and low when compared to the values for Case Study 1. For the second case study, the highest percentual deviation was −19%, for the "CAM" step, with all the other values being positive deviations.

Conclusions
The present study presents the development of a cost estimation tool that calculates total operation cost based on the material requirements and machining times while applying a part complexity level as a way of standardization for the budgeting process to expedite it while considering multiple factors that affect the total operation time and thus, the total cost of part production. The cost estimation tool was successfully developed and validated for two machine types; these being milling machines capable of producing parts of different heights.

•
Machining time and material are the main factors that influence machining cost; • The developed tool offers a quite accurate way of predicting machining times and, thus, the operation cost of machined parts obtaining an average percentual deviation of 14% and 12% for Case Study 1 and 2, respectively; • The tool exhibits high accuracy in predicting CAD 2D/3D drawing times and machine setup times, registering 15% and −7% of percentual deviation, respectively, for Case Study 1, and 6% for both steps for Case Study 2;

•
The created part complexity level introduces a level of standardization in the budgeting process, ensuring accurate and fast budgets, especially for parts of lower complexity level; • The deviation from estimated to real machining times increases with part/complexity level, especially for finishing operations; this is shown by the high deviation registered for the prediction of finishing times, with Case Study 1 exhibiting 71% of average deviation from predicted to real-time values; • These high deviation values can be attributed to the performance of manual tasks, which are difficult to estimate correctly; • This is also shown by the CAM production step associated error, which is quite high for Case Study 1 (38%); this is due to the number of operations that need to be programmed by the operator. For simpler parts, such as those of Case Study 2, the deviation drops to 19%; • Case Study 2 yielded fewer spread results than Case Study 1; this is due to the simpler geometry of the parts considered for this case study and the fact that the number of manual operations is quite reduced (mainly for machine setup operations).
The model can be improved by conducting additional experiments and validation tests, as this tool is easily reprogrammable and adapted to different processes. Furthermore, since the estimation of manual operations can be quite difficult (resulting in deviations from the estimated to the real operation time), these operations should be minimized. Alternatively, the creation of normalized procedures for these operations can improve the accuracy of the time estimations. Despite this, the cost estimation tool can predict the manufacturing times accurately, resulting in the obtention of accurate and fast budgets. This is particularly useful for manufacturing SMEs, as this tool provides a faster and easier alternative to providing budgets for machined parts. The advantages and drawbacks of the developed tool can be observed in Table 10. Table 10. Main advantages and drawbacks of the developed cost estimation tool.

Advantages Drawbacks
Affordable cost estimation tool Estimation accuracy drops for more complex parts Easy implementation and configuration Requires some knowledge of the machining processes and operations High adaptability for different processes/machines Finishing operations are difficult to estimate correctly Fast estimation of operation costs Accuracy is hindered by the performance of manual operations Simple interface -Accounts for all steps of part production in its estimation -Regarding further improvements to the developed tool, some other prediction methods can also be employed in conjunction with this tool, to improve prediction accuracy. The average error detected in the model can be smoothly corrected by a determining factor, and the profit yield of the manufacturer can easily accommodate this error in the first stage, being successively corrected through experiments.
Funding: This research received no external funding. End-milling distance per depth increment (mm); L E.M.

Conflicts of
Total end-milling distance (mm) Number of face-milling passes; No. R.P.