Keywords

5.1 Introduction

With the increasing globalization trend and strict production demands, modern manufacturing industries are experiencing much higher pressure on achieving high product quality at low production cost. To respond to such challenges, enabling technologies and soft computing have actively deployed to introduce novel approaches for collaborative engineering, systems automation and intelligent manufacturing. Collaborative engineering, systems automation and intelligent manufacturing are some of the modern philosophies implemented to recapture traditional product life cycle management processes to shorten lead time, enhance product quality and suggest more competitive cost. Towards this concept, a full-scale employment of the aforementioned trends to formulate a novel integrated manufacturing environment suggests two major aspects: (1). The development and deployment of robust automation modules able to handle new or already existing engineering software tools and (2). The formulation and usage of intelligent algorithms that will integrate engineering software and address decision-making through loops of evaluations until arriving to optimum solutions.

The aspects of systems automation and intelligence ought to support modern manufacturing engineering towards the design and production of aesthetic, functional parts. A well-known material removal manufacturing process for such parts is Sculptured Surface Machining (SSM) (Choi and Gerard [4]. Research works concerning tool path planning for complex surfaces deal with precision machining modelling via already existing cutting strategies [3]; the development of new tool paths considering technological aspects and mechanics of processes [2], tool path generation considering machinability parameters based on software [31] and the generation of tool paths by taking into account proper tool positioning given the geometry and features of 3D CAD models [9]. Artificial intelligence and its capabilities are now implemented to optimize tool path planning planning activity using objectives that either directly or indirectly reflect productivity and quality under balance [8, 21].

Tool paths employed to machine sculptured surfaces consist of a group of tool positions. The CNC system that controls the machine tool sequentially interpolates between these positions as the cutting tool moves from point to point. Tool paths are usually modelled to make several passes across a surface, whereas pass interval and feed direction affect the size of the scallops which are formulated during the machining process (Lin et al. [16]. In addition, the interpolation between individual tool positions on a single cutting pass may force the tool to deviate from the ideal surface. An optimum tool path would result to a machined surface having small-sized scallops, uniformly distributed across the surface. Thereby, interpolation strategies ought to be investigated during tool path generation so as to produce successful cutter contact trajectories given a sculptured surface. Such interpolation schemes already applied in industry are linear interpolation, circular interpolation and non-uniform rational B-spline (NURBS) interpolation. Tool path computation for sculptured surfaces in either 3- or 5-axis CNC machining technology involves also the specification of the feed direction and the two discretization steps; the longitudinal step that is actually the step along the cutter path and the transversal step also known as radial tool engagement or stepover. Given that most CNC programming units are yet to be integrated with advanced interpolation functions like NURBS except for some being considered as state of the art [11], generated tool paths should be linearized from CAM software through the determination of the two aforementioned surface discretization steps. Consecutively, specifying the space between successive tool positions along tool trajectories becomes of major importance. As the CNC control unit sequentially joins the tool positions trying this way to formulate the actual path, a chordal deviation is yielded with reference to the predetermined values for the steps. Hence, it is the job of the NC programmer to ensure that the designed tool path will hold the tolerance by choosing a relatively low value for the space among tool positions. On the other hand, should the value is low enough just to generate tightly spaced positions, too large NC files will have to be stored, whereas the time needed to compute and simulate the tool path might be excessive.

Several research efforts have studied the problem of computing optimum curve discretization steps for both 3- and 5-axis sculptured surface machining [15]. As a key objective to reflect geometrical error in machining , chordal deviation is adopted by many researchers for characterizing it as an optimization objective. Yang [29] presented a biarc curve-fitting approach to efficiently interpolate complex surfaces. The distances computed from the tessellation of the surface through biarcs are further investigated to obtain the maximum one which is finally set as the deviation to reflect the machining error. Lai et al. [14] proposed a methodology to investigate the geometrical error for large sculptured parts by employing 5-axis machining. In their work a mathematical expression is used as a function to be solved where the step formulated by two successive tool positions is controlled via the calculated chordal deviation. Towards the same philosophy, Yen and Hsu [30] developed an interpolation scheme based on adaptive feedrate to machine sculptured surfaces. Their work utilizes the chordal deviation when parametric curves are tessellated to small segments and employ it as the objective criterion. Towards the same concept, Del Prette et al. [5] established a framework of utilizing in advance measured surface points with a CMM in order to build an intelligent approach of minimizing chordal deviation. The discretization step length is defined by setting the limit on the maximum chord length which is used as the objective function in their algorithm. Drysdale et al. [6] computed the minimum number of circular arcs/biarcs needed to approximate curves by setting three discrete criteria that should be simultaneously satisfied. The first criterion is the positions (start and end) of the arcs; the second is the correct side that arc segments should be placed and the third is the non-intersection between the arcs and the tolerance boundary with the latter being described by chordal deviation. Vijayaraghavan et al. [25] advocate that NURBS interpolation scheme is highly limited owing to the computational complexity when applied to real-time motion control systems and presented a method of subdividing curves via the application of “Catmull-Clark” subdivision scheme [19] in two dimensions to represent machine tool trajectories. Their goal was to find a set of points separated by the required chord length which lies on the curve.

Geometrical error is also affected by scallop height and several contributions have targeted on proposing methods to control or optimize its magnitude when it comes to sculptured surface machining . Shukun et al. [24] presented a method to produce constant scallop height tool trajectories by taking advantage of the highest scallop pick so as to discretize the surface boundary regarding the maximum machining tolerance. They managed to control machining precision via the connection among adjacent surface patches using the diagonal to achieve continuous cutting trajectories. Zhang et al. [32] studied the influence of scallop heights distribution on four types of well-known tool path strategies, namely equal-interval; parallel; parallel-tangency and free-form. They verified through experiments that scallop height distribution can be employed to display surface texture and may constitute a trustworthy research objective. Duroobi et al. [7] estimated scallop height magnitude by taking into account the types of existing end mills, the types of surfaces (concave, convex and flat), and the modes available for precision surface machining (3- and 5-axis). An extensive mathematical development for modelling scallop height is presented by the authors and important research results have been obtained concerning the effect of cutting tools’ geometrical shape, cutting direction angle and tool inclination in the case of 5-axis surface machining . Ponomarev [22] forwarded an analysis experiment for the implementation of a particular machining strategy fully dedicated to finish-machine sculptured surfaces. Results from this work have shown that micro-irregularities concerning scallop heights impose substantial impact when using different machining strategies for complex parts and a method is presented capable of tracking the principal surface curvature for different sculptured parts under the scope of producing effective tool trajectories to sustain low geometrical error. Zou et al. [33] proposed a framework capable of globally optimizing tool path planning by considering multiple objectives through a combinatorial scalar function. Their approach implements a mechanism to select iso-level curves with respect to certain scallop height tolerance.

5.2 Problem Statement and Research Objectives

The field of SSM is such that CAD/CAM technology implementation is considered vital. In its narrow sense, the manufacturing modelling environment that commercial CAM systems provide has the major goal of generating efficient tool paths that will produce a part within specifications, given its geometry prepared in CAD. The task of producing parts comprising sculptured surfaces turns out to be more challenging should requirements for high quality and productivity are set. Despite the extensive research on developing strategies and methods to ease human efforts on machining modelling and NC programming, CAM systems are still user-intensive and engineers are responsible for harnessing the advantages offered by existing tools for tool path planning in CAM environment.

As far as CNC control systems are concerned, their ongoing evolution has led to the implementation of advanced interpolations to machine sculptured surfaces such as non-uniform rational B-splines (NURBS) as it has been mentioned. NURBS can be employed when retrieving the high-precision contour control mode. The NURBS interpolation function can be then programmed according to ISO 6983 NC code (G-code programming principles) and the specific NC control unit configurations. The function is actually a modal code of G-code group 01 and operates with the curve order (P), the control points (X, Y, Z), the weights (R), the knots (K) and the feedrate in mm/min. Despite the availability of such technology when it comes to NC sculptured surface machining , its implementation seems to lag behind and is still in its infancy [17]. Very few top CNC units apply NURBS interpolation and it is questionable whether NURBS interpolation indeed provides higher surface finish. Practically speaking, “segmented” interpolations (linear or circular) under a specified chord error may hold tolerances just precise as NURBS interpolations do with the difference that huge NC files need to be stored in NC control units against NURBS format which is by far more efficient. From a practical viewpoint, there is no accuracy level that NURBS interpolation can achieve whilst chordal interpolations cannot. On the other hand, numerous NC blocks might cause NC programme length as well as the file size to swell yet; this is not of major concern given the current state of advances in machine tools and CNC programming units. Fortunately, high-tech NC systems have become more adept while coping with large NC files under fast processing rates. Moreover, high-frequency servo loop functions integrated to CNC systems allow smoother machining operations whilst maintaining good transition from one move to the next, mainly in terms of feedrate. Thereby, it comes as a conclusion that simple interpolators can still be implemented for high-precision machining applications not only for industry but also to current academic research [28].

Should common interpolators are to be implemented one has to ensure that a tighter chordal tolerance in CAM environment is specified to capture more precise illustration of the ideally designed part geometry to be machined. Given the machining tolerance, that determines the cutting envelope zone in which a cutting pattern should be embedded and the rest of tool path planning parameters involved, several scenarios for tool path modelling may be formulated; some of them may be strict enough to lead to high quality but increased machining time, whereas some others might be productive but of low surface quality. Moreover, not all of the resulting tool paths will properly orient the cutting tool for a given surface. Particularly, values specified for discretization step and stepover may not allow end mills to be always in absolute contact with the ideal surface, yielding deviations between the ideal and the machined part. The magnitude of the resulting faceted surface regions can dramatically vary, forcing the tool to produce variable chords on sequential sidestep intervals; maximizing this way the geometrical error.

5.3 Sculptured Surface Machining –SSM

The term “Sculptured Surface Machining” (SSM) refers to the technology employing advanced computer numerical control machine tools and controllers coupled with cutting-edge manufacturing software to cover the need of high-precision machining. Such machining is performed to manufacture aerodynamic components, optics, structural parts and last but no way in the least, moulds and dies. The increased need for developing a variety of products that will meet both aesthetics and functionality as fast as possible has led to the research efforts of numerous academics and industrials worldwide.

Owing to its high complexity in terms of process planning, SSM is by default time-consuming and error-prone process. However, rapid advances in manufacturing technology and surface representation, SSM technology is nowadays deemed more robust, efficient and trustworthy enough to meet the requirements of productivity and surface quality. The application of high-order curves and surfaces in CAD environment constitutes a very important aspect to quickly produce accurate 3D models that will reflect actual products whilst sophisticated machining strategies and advanced surface tool paths integrate today’s CAM systems to model machining operations, simulate their process and finally come up with NC codes that will drive 3- or 5-axis CNC machine tools via their control units. The aforementioned applications formulate the modern framework of SSM technology currently implemented in industry to some extent.

5.3.1 Technologies Employed

Information processing, machine tool technology (3- and 5-axis or multi-axis surface machining), Tool path planning for CNC programming (CNC-CAM) and parametric computer-aided design (CAD), are the key features that give SSM its edge. Such features are fully dedicated to advanced manufacturing and it comes as an evident that their usage is capable of achieving low programming/machining (P/M) ratio, cutting efficiency and improved quality. The features are presented in the following sub-sections.

5.3.2 3-Axis Milling

Despite its low efficiency when compared to multi-axis SSM, 3-axis surface machining is still employed by many shop floors worldwide. Milling machines that follow 3-axis coordinate system are actually machining centres integrated with servo motors and hydraulic actuators. The Z-axis is vertical to both X and Y axes and rotates the cutting tool, whereas X and Y formulate the working plane on which the workpiece is properly attached. With the relatively low cost of a 3-axis machine tool investment being as an advantage, the rotating axis (Z-axis) is restricted to all freedom degrees, thus the tip of the cutter contacts the part’s surface and deteriorates it since cutting velocity (Vc—m/min) in the tool’s centre is zero.

5.3.3 5-Axis Milling

In five-axis milling, two additional orientation axes allow the machining of very complex parts that cannot be machined employing 3-axis machining technology. Several cases of components comprising polyhedral planes or ruled surfaces impose the application of 5-axis surface machining so as to take advantage of fixturing in a single set-up and achieve geometric tolerance demands in precision cutting. In addition, tool overhang may be reduced when employing 5-axis machining which in turn sustains tool stiffness; provides rigid cutting and avoids primary tool wear. While the implementation of 5-axis surface machining reduces cycle time and improves part quality, two major shortcomings occur: The first involves the complexity of programming using a CAM system to generate tool paths , whereas the second deals with imminent collisions between the cutting tool and the workpiece or fixtures, or even the machine tool peripherals.

5.3.3.1 Parametric Computer-Aided Design -CAD

Computer-aided design via parametric modelling is widely applied owing to its accurate representation mainly when it comes to complex surfaces. With new tools being already provided by CAD software vendors, surfaces can be modelled utilizing several patches which can be continuously controlled through their joints existed in each patch. Parametric technology on the other hand allows rapid adaptations of new products according to old reference models through dynamic dimensioning via relations that can change the whole model should new design concepts are to be tested until arriving to the most convenient solution. Furthermore, approaches for creating surfaces from physical products are already available via 3D scanning technology and surface reconstruction. Polyhedral models, tessellated surfaces, faceted or triangular surface patterns can be processed accordingly in order to come up with new complex products and machine them by taking advantage of their shape information. Representations like the aforementioned are usually created either by point clouds or parametric surfaces, especially when it comes to the manufacturing of surfaces that created from a prototype in an intermediate phase using soft materials like clay to be later converted into CAD data employing either contact or non-contact digitizers. Owing to its geometric computation and data exchange engines, computer-aided design constitutes an interface of paramount importance since 3D representations of this level are entirely used for process planning and precision machining .

5.3.3.2 Tool Path Planning for CNC Programming —CNC/CAM

Tool path planning is a critical task in SSMSSM. Operations need to be carried out in different machining modelling stages like roughing, semi-finishing, finishing, etc. In roughing, most of the material is removed from the stock to generate an approximate shape of the final part’s surface. In finishing stage, the roughed surface is formulated to the desired shape which has to meet its engineering drawing requirements in terms of geometrical and dimensional tolerancing—GD and T and surface quality usually expressed via roughness indicators. Technological constraints are determined in tool path planning planning for the different machining stages so as to achieve optimum productivity and quality.

Tool path planning currently involves two fundamental steps; specifying path topology and setting its process parameters. The former is defined by the trajectories that the cutting tool should follow to produce the surface, whereas the latter requires the definitions for feeds and speeds, axial and radial cutting depths, machining tolerance and discretization step; all found under a selected cutting strategy in a CAM environment. Several groups of tool paths together with their cutting styles are available and are applied according to the machining phase the planner wants to model, i.e. rough machining tool paths, semi-finishing; pencil cutting; engraving, etc. The main purpose of rough-machining is to efficiently remove large volumes of material and leave only a small proportion of raw stock to be removed by finishing operation. A number of semi-finish cuts may be applied to leave a more uniform surface for finishing. Tool paths dedicated for finishing are in general “surface-dependent”, that is they utilize surface shape in order to produce tool path trajectories by offsetting it, by copying it or by just following it, considering the known types of surface interpolation; iso-parametric; iso-planar and iso-scallop. Special algorithms recognize the surface’s unique entities like curvature, convex and concave regions and then collision-free trajectories are then ought to be produced for further processing by the post-processor engine embedded to commercial CAM software packages. Owing to the high level of sculptured surface complexity, tool paths for finishing may be applied to the entire part’s surface or by sequentially selecting limiting contours. Thus; an NC manufacturing programme for SSM can either involve a single machining operation for the whole surface by applying a specific tool path, or a list of machining operations constituted by several neighbouring trajectories grouped according the number of subdivided contours of the surface.

The philosophy of selecting tool paths is tough and tedious task especially when it comes to the selection of 5-axis machining operations for sculptured parts owing to perplex kinematical issues that 5-axis machining involves. Kinematics of 5-axis machine tools can be completely different should the type of 5-axis establishment of machine tools available in the market is taken into account. A 5-axis machine tool with its two rotary axes in the table differs from a “wrist-type” machine tool having its two rotary axes in the spindle. Information concerning the types of 5-axis machine tools can be found in Warkentin et al. [26, 27]. As an outcome, the selection of inclination angles for simultaneous 5-axis surface machining with respect to the surface and longitudinal–transversal steps according to the feed direction are parameters that should carefully be determined by the CAM programmer. Commercially available CAM packages prompt NC programmers to specify these parameters by offering cutting-edge properties and tools yet; no recommendation is forwarded concerning proper implementation tactics.

The product of machining modelling for SSM using CAM software is a list of motion commands and tool positioning coordinates with respect to the parametric space that the part’s surface determines. These coordinates are known as cutter contact (CC) data and vary according to the cutting tool geometry. Most often employed cutting tools for surface machining are flat-end mills, ball-end mills and torus (bull) end mills. The tool tip for each of these tools is located in different regions of their geometry, resulting in differences in computed CC data for surface tool paths . Post-processor engine is then executed to transform calculated CC data to an adapted file format for the CNC unit; the CNC file. The file includes the set of tool positions and tool axis orientations along with the corresponding feeds and speeds. Information concerning tool positions is produced here with reference to the machining axis system by solving Inverse Kinematical Transformation (IKT) algorithms that are capable of giving direct axis commands to the machine tool. The new data is called cutter location (CL) data referring to the position of the tool tip when a given cutter has a contact with the surface in the CC point. Mathematical relations about computing CL data with reference to CC data as a result of tool path computation and the given tool geometry can be found in Warkentin et al. [26, 27].

5.3.3.3 NC Verification

Having extracted the NC file from the above described operations, virtual simulations for material removal are performed to have an initial sense of cutting procedure and assess the tool path for its efficiency and quality. Dedicated software is currently available capable of verifying 3- and 5-axis NC programs for sculptured surface. Their functionality lies mainly on algorithms capable of comparing solid entities in terms of their predetermined nature distinguishing from tools, fixtures, stock, design part and machine tool. Their output is a list of interferences, collision detections, gouges and overcuts. With reference to the design requirements, the NC programme is sent to the CNC unit for production or new machining scenarios are developed after changing the process parameters leading thus to a new CNC programme free of errors. However, the result is far from optimum solutions, since NC verification packages can only enhance tool paths with respect to initial values set by the CAM programmer by locally controlling machining attributes. This leads to the conclusion that the process is enhanced without taking into account economical–technological criteria and constraints as well. Nevertheless, NC verification process is a trustworthy tool for ensuring error-free tool paths for complex machining, especially under the 5-axis SSM mode. Current trends suggest the integration of CAM systems with special NC verification modules for virtual simulation and process enhancement.

The above features can be graphically summarized by giving the workflow representing the current approach adopted for tool path planning for sculptured surface CNC machining in existing CAM systems. Figure 5.1 illustrates this workflow.

Fig. 5.1
figure 1figure 1

Workflow of current tool path planning operation

5.3.4 Sculptured Surface Machining Error Representation

SSM formulates complex engineering problems introducing a large number of process parameters that need to be controlled in order to reach the required result. Machining errors during machining operation involve process-related inconsistencies owing to the low stiffness of the cutting tool when compared to the rest of the components, i.e. machine tool, fixture and clamped workpiece. Errors fall in this category deal with variations of cutting forces exerted on the tool during machining as well as tool deflections mainly in the horizontal directions (X-Y plane). Such errors violate machining process and deteriorate final surface quality eliminating to a large extent any opportunity of reaching the design requirements in terms of tolerance, dimensioning and geometry.

Our research efforts refer to the geometrical surface error occurrence when the whole process is modelled and prepared using CAM systems and/or relative manufacturing engineering software. Besides, process parameters which finally integrate an NC programme as well as tool path style along with feeds/speeds are set offline within CAM software. Moreover, CAM systems constitute a safe and more or less an easy-to-use interface to model machining operations, whilst the cost of exploiting computer modules is by far reduced rather than utilizing actual resources and materials.

Based on such an assumption one starts to wonder whether such cutting-edge and flexible systems can be further integrated to be “intelligent” and fully automated not only on the basis of tool path computation, but also on their entire usage. Such an approach can be easily achieved if we take under consideration the openness of the architecture of most commercially available CAD/CAM systems and the current state of artificial intelligent systems that have already seen successful service in engineering problems with their benefits to be mentioned by numerous noticeable research contributions. As a matter of fact an SSM problem can be solved via automation and intelligence yet; the accurate process simulation and correct problem-solving will come by defining suitable quality criteria worthy of assessment and capable of representing physical objectives as good as possible under the basis of manufacturing software involvement.

5.3.4.1 Machining Error Modelling

It is easy to understand that since tool path points (CL and/or CC data) are responsible for locating the tool in discrete coordinates towards its interpolation of a given surface, it comes as an outcome that these instances are also responsible for the success of the machining operation in terms of quality and tolerance of the desired profile. CC and consecutively CL points topology determines the pattern of tool trajectory lines, whereas the parameters such as longitudinal and transversal step specify the distances between these points in a computed tool path. It is mentioned that CL points are generated via the translation of each CC point along the surface normal direction regarding the tool’s position on the surface.

In general, a minimum density is required in order to machine a sculptured surface under a predetermined cutting tolerance. The density of the CL/CC point pattern is dependent on the surface profile and the parameter values and especially on stepover and discretization step. Machining surface is then interpolated by adopting one of the widely known interpolation strategies, linear, circular or spline (NURBS) interpolation to remove the uncut material between points in the tool path trajectory. The error caused by the interpolation is actually the deviation existed between the theoretical and actual tool path; known in academic literature as chordal deviation. Chordal deviation represents the deviation existed between the design trajectory of a surface and the actual interpolation trajectory followed by the cutting tool and determines the spacing among tool positions in surface machining, either using 3- or multi-axis machining mode (Fig. 5.2).

Fig. 5.2
figure 2figure 2

Representation of chordal deviation between theoretical and actual tool path

With NURBS function (G06.2 command) yet to be embedded to most of hi-tech CNC controllers, still linear and circular interpolations are of great value in terms of their current usage. Besides, new processors integrating these units allow the fast processing of the numerous NC code strings which are inevitably produced when operating with linear (G01) and circular (G02) interpolators to illustrate tool positions with small spacing and thus low chord error average. Having industrials to currently produce complex parts by linearly or circularly approximating sculptured surfaces, leads us to consider the attribute of chordal deviation as an important quality objective to represent the machining error. Under this assumption, fine quality will be reached should very tight separations between tool positions are to be determined to maintain the required tolerance referring to the tool and the surface. On the contrary, requirements for high productivity restrict such decision-making introducing this way a trade-off between the maximum discretization step parameter that is responsible for the chordal deviation and machining time.

Scallop height is directly related to the tool geometry, size and stepover value selected for a given machining strategy. Larger tools in diameter will normally produce smaller scallops in magnitude, hence it is wise to apply large tools to machine sculptured surfaces unless gouges or interferences occur. Smaller tools produce larger scallops for the same stepover value since the latter is a function of the tool diameter’s radial movement yet; they manage to reach tight areas of freeform contours such as small fillets, small sculptured slots, etc. Yet again a trade-off is introduced between productivity and scallop height determination owing to the fact that reducing tool pass interval will result to reduce scallops yet at the expense of increased machining time. Nevertheless, research efforts have shown that only improved or optimized tool positioning approaches can balance the above trade-offs and maintain both quality and productivity.

It is within the objectives of the current study to properly model criteria to express the attributes of chordal deviation and scallop height in order to optimize the overall machining error through the novel intelligent algorithm which is about to be presented. The machining error (represented via discretization step and scallop) antagonizes productivity referring to machining time to a series of evaluations by the algorithm embedded to CAM software suggesting an integrated, easy-to-operate tool path optimization framework for SSM. Criteria modelling operation has been conducted for both 3- and 5-axis SSM modes.

5.3.4.2 Discretization Step Control via CL Point Projections

A novel approach based on projecting computed CL points onto sculptured surfaces is presented here for controlling maximum discretization step parameter. Through this technique, maximum discretization step control offers an “indirect”, yet effective way to generate optimized spacing among CL points since the magnitudes of their projection heights are demanded to be as equidistant as possible. We verify this by sequentially measuring their differences, whilst simultaneously taking into account machining time. The result is uniform patterns of CL points meaning effective tool trajectories, hence regular tool paths. The approach is applicable to both 3- and 5-axis SSM with slight modifications to the latter machining technology (5-axis) for even better control.

5.3.4.3 3-Axis SSM

In 3-axis surface machining the tool orientation (Z-axis) is always vertical to X-Y plane, regardless of the shape to be machined. For this reason, ball-end mills are employed to finish-machine free-form shapes owing to their spherical geometry that ensures tool contact in any curvature. Indeed, a sculptured surface can be generalized as having one or more of any three contours at any given point, convex, concave or flat surface contours. Owing to the restricted freedom degrees in 3-axis machining the ideal contour cannot be always reached leading thus a spherical cutter to produce large facets as CAM software generates non-uniform steps within the specified range.

The requirement of computing new CL points in each iteration based on the minimum difference of projected heights onto the surface, whilst simultaneously considering productivity through machining time criterion prompts our intelligent algorithm to repetitively evaluate these differences, yielding the deviations of all CL points produced by CAM under the applied machining strategy and stochastically arrive at a tool path whose CC points (and consecutively CL points) are uniformly distributed along the curvature with low machining error. Since discretization step is stochastically adjusted to produce small CL point projection height differences, its control minimizes faceting and produces more accurate tool paths under a specified machining tolerance zone. It is mentioned that the same concept may be adopted by investigating CL points coordinates instead of their projections yet; the machining error generated by their corresponding CC points may not be the true one since some of them may not lie on the ideal surface [27]. Projection process ensures that all CL instances will meet a sculptured region of any curvature and the value can be easily retrieved by the application program interface (API).

Let the proposed optimization criterion to be indicated as \( h_{{{\text{CL}}i\_Pj}}^{\text{Dif}} \), stemming from the requirement of minimum incremental differences for all CL points that constituting the computed tool path. Hence,

$$ h_{{{\text{CL}}i\_Pj}}^{\text{Dif}} = \left| {h_{{{\text{CL}}\_Pj}}^{{}} (i - 1) - h_{{{\text{CL}}\_Pj}}^{{}} (i)} \right| = \hbox{min} ,\forall {\text{CC}}_{i} \in {\text{SS}} $$
(5.1)

with

$$ \sum\limits_{{{\text{CC}}_{i = 1} }}^{k} {h_{{{\text{CL}}i\_Pj}} = \hbox{min} } $$
(5.2)

where

\( h_{{{\text{CL}}i\_Pj}}^{\text{Dif}} \): The mean average of the differences computed when projecting CL points onto a part’s sculptured surface to control discretization step and thus chordal deviation in (mm);

\( h_{{{\text{CL}}\_Pj}}^{{}} (i - 1) \): The projection height distance from the CL(i−1) point to surface;

\( h_{{{\text{CL}}\_Pj}}^{{}} (i) \): The projection height distance from the CL(i) point to surface.

Figure 5.3 depicts the proposed method of controlling the maximum discretization step parameter via the assessment of projection height magnitudes of CL data for sequential tool positions.

Fig. 5.3
figure 3figure 3

Optimum control of maximum discretization step parameter through CL data projections

5.3.4.4 5-Axis SSM

In 5-axis machining mode the tool axis orientation is controlled through lead and tilt inclination angles. Lead angle (\( a_{L} \)) controls the tool axis orientation which is normal to the part’s surface in the feed direction, whilst tilt angle (\( a_{\rm T} \)) inclines the tool axis in the perpendicular direction of feed (Fig. 5.4). A common problem in 5-axis surface machining is how to restrict variations in terms of tool inclination so that collisions are avoided [18]. As a result the philosophy of implementing the proposed machining error approach should definitely involve tool inclination and cope with the variable tool orientations to estimate accurate discretization step towards the feed direction given the tool type and the surface curvature as well. Kinematics of 5-axis surface machining suggest that each cutter location (CL) point is computed according to each of the corresponded cutter contact (CC) points, and a vector \( n \) that is always normal to surface curvature.

Fig. 5.4
figure 4figure 4

Representation of lead and tilt angles in 5-axis surface machining

Owing to the ability of the cutting tool to change its vertical axis orientation via inclination, projected CL points may produce low distances in advance, yet discretization step towards the path may not generate the required chord error, but a larger one. To cope with this problem in the 5-axis surface machining mode, the objective of attaining minimum incremental differences \( h_{{{\text{CL}}\_Pj}}^{\text{Dif}} \) for all CL points formulating the tool path is replaced here by a criterion aiming at controlling the ratio of normal vector magnitude when inclining the tool, to the projection distance of its given CL point on the surface. The proposed criterion is expressed as follows:

$$ \mathop R\nolimits_{{h_{{{\text{CL}}i\_Pj}} }}^{{n_{{{\text{CC}}i}} }} = \frac{{||\vec{n}||_{{{\text{CC}}i}} }}{{h_{{{\text{CL}}i}} Pj}}\forall {\text{CC}}i \in {\text{SS}},h_{{{\text{CL}}i}} Pj \ne 0,||\vec{n}|| > h_{{{\text{CL}}i}} Pj $$
(5.3)

where,

\( R_{{h_{{{\text{CL}}i\_Pj}} }}^{{n_{{{\text{CC}}i}} }} \): The ratio of normal vector magnitude to the distance of a projected CL point to control discretization step parameter and thus control chordal deviation (mm);

\( ||\vec{n}||_{{{\text{CC}}i}} \): The normal vector magnitude at the ith CC point;

\( h_{{{\text{CL}}i}} Pj \): The projection height distance from the ith CL point’s origin to sculptured surface.

This property controlled by our intelligent algorithm, forces CAM software to stochastically produce CC points for the tool path such that tool axis orientation variability range is restricted as the tool is guided by the surface curve. On the other hand the normal vector should always be vertical to surface curvature. These two instances constraint the solutions range for tool path generation and converge it to those that will satisfy the criterion being set. The constraint of \( h_{{{\text{CL}}i}} Pj \ne 0 \) in the above formula ensures that tool tip contact where cutting velocity is zero, is avoided, and normal vector is controlled to sustain low tool inclinations to avoid collisions between the tool and the workpiece or the tool and fixture. The concept is valid for both flat and corner radii (torus) end mills since mathematical principles in terms of the relation between normal vector and projection distance of a CL point are common. When machining using ball-end tools in 5-axis, the normal vector is always equal to tool radius owing to its spherical geometry. Hence, it is the CL point’s projection distance that forces tight curve discretization as it occurs in the case of 3-axis surface machining. To initialize the environment and give a good seeding for the algorithm, additional constraints are determined in terms of tool axis orientation when a specific 5-axis surface machining strategy is to be applied. The range of −25°, +25° for lead and tilt angle values has been set for the intelligent algorithm to select from, on its pursuit to generate successful CC points through the evaluations of the objective function that contains the criterion presented. Tilt angle \( a_{T} \) is finally controlled via both the constraints of taking values within the range of (−25°, +25°) and the respective adjustment according to the given CC point’s local coordinate system and the surface normal vector for the surface region on which the CC point lies.

5.3.4.5 Scallop Height Control via Effective Radii for Cutting Tools

Moving towards the proposal of a methodology to satisfy both academia and industry, scallop height modelling was conducted by utilizing both simplified mathematical relations and geometrical properties. Thereby, a formula common to most of industrial applications referring to scallop computing was used for 3-axis scallop height objective assessment, whilst a special attribute was adopted for representing scallop height objective evaluation for 5-axis surface machining since the latter is far more of added value to SSM than 3-axis machining technology.

5.3.4.6 3-Axis SSM

The formula employed to estimate the scallop in the case of 3-axis surface machining is given in Eq. 5.4 [23].

$$ h_{s}^{3x} = R(1 - (\sqrt {1 - (\frac{{a_{e} }}{D})^{2} } ) $$
(5.4)

where,

\( h_{s}^{3x} \): The scallop height by machining using 3-axis (mm);

\( R \): The radius of the ball-end tool (either in mm or in %D);

\( a_{e} \): The tool’s stepover in the transversal direction (mm);

D: The tool diameter (mm).

5.3.4.7 5-Axis SSM

By adopting the same mathematical relation to assess scallop height magnitude when using ball-end mills, focus is given when machining in 5-axis using flat-end and/or toroidal (bull) end mills being inclined relative to the surface normal vector as illustrated in Fig. 5.5.

Fig. 5.5
figure 5figure 5

a Inclined flat-end mill; b corresponding effective radius

It is clearly observed that the shape of a flat-end mill engaging the surface is an elliptical silhouette when projected onto a plane perpendicular to the feed direction involving the surface normal. At the corresponding CC point, the elliptical contour can be interpolated by a circle whose radius is known as the effective radius, \( R_{ef} \). The effective radius is a function of both the tool’s lead angle \( a_{L} \) and its radius R, related as follows:

$$ R_{\text{ef}} = \left\{ {\begin{array}{*{20}c} {\frac{{R_{\text{tool}} }}{{\sin (a_{L} )}}} \\ {\frac{{(R - r)\cos^{2} (a_{L} )}}{{\sin (a_{T} )[1 - \sin^{2} (a_{T} ) \times \sin^{2} (a_{T} )]}} + r} \\ \end{array} } \right\} $$
(5.5)

Obviously, by varying lead angle \( a_{L} \) and tilt angle \( a_{T} \) through a series of evaluations which our proposed algorithm initializes, a range of effective radii will be obtained and thus different scallops will be assessed. Note that depending on the stochastic tool selection between an end mill and a toroidal mill by our algorithm, the objective function for assessing the scallop will automatically alter its properties concerning the \( R_{ef} \) computation formula (either Eq. 5.5). Thus;

\( R_{ef} \): The effective radius of the inclined tool when machining in 5-axis (mm);

\( R_{\text{tool}} \): The radius of the tool (either in mm or in %D);

\( r \): The corner radius for a filleted-end (toroidal) mill (mm);

\( a_{L} \): The tool’s lead angle towards its path on the feed direction (°);

\( a_{T} \): The tool’s tilt angle (°).

5.4 Sculptured Surface Tool Path Optimization

An optimization problem related to machining modelling for sculptured surfaces should be designed considering a number of fundamental aspects involving the formulation of the objective function to be assessed, the representation of the solution region (either “Pareto” multi-objective depiction or “weighted” multi-objective transformation to a single-objective one), the removal of bias owing to the differences in measuring units of criteria and the introduction of constraints to better adopt to actual conditions, hence penalizing results considered nonapplicable or infeasible during the convergence procedure.

5.4.1 Objective Function Formulation

Objective functions represent key elements to assess quality objectives in optimization problems, especially when it comes to artificial intelligence and genetic algorithms . Several kinds of objective functions are formulated with the most often used type to be a simplified linear expression among the objectives involved and their weights. Simplifications are made to this stage so as to maintain low computational cost against complex mathematical relations. The weights are utilized to express the importance of influence on corresponding objectives, whilst their sum should be equal to 1 or 100 % depending on the scale to be adopted. We have formulated two objective functions for our algorithm to employ them as assessment features; one for 3-axis surface machining and one for 5-axis surface machining. The objectives that control chordal deviation and scallop height are the ones that are previously introduced for these two machining technologies. For 3-axis SSM, the objective function is formulated as follows:

$$ f(L_{\text{step}}^{3x} ,a_{e} ) = \hbox{min} (h_{{{\text{CL}}\_Pj}}^{\text{Dif}} ,h_{S}^{3x} ,t_{m}^{3x} ) = \hbox{min} \sum\limits_{w = 1}^{i} {w_{i} f(} L_{\text{step}}^{3x} ,a_{e} ) $$
(5.6)

where,

\( L_{\text{step}}^{3x} \): The discretization (longitudinal) step in the feed direction (mm);

\( a_{e} \): The tool’s stepover value in the transversal direction (mm);

\( h_{{{\text{CL}}\_Pj}}^{\text{Dif}} \): The mean average of the differences computed when projecting CL points onto a part’s sculptured surface to control chord tolerance in (mm); with \( h_{{{\text{CL}}\_Pj}}^{\text{Dif}} = \hbox{min} ,\forall {\text{CC}}_{i} \in {\text{SS thus}},\sum\limits_{{{\text{CC}}_{i = 1} }}^{n} {h_{{{\text{CL}}\_Pj}} = \hbox{min} } \)

\( h_{S}^{3x} \): The scallop height (mm) produced;

\( t_{m}^{3x} \): The machining time for 3-axis machining in (min);

\( w_{1} \), \( w_{2} \) and \( w_{3} \): The weights of \( h_{{{\text{CL}}\_Pj}}^{\text{Dif}} \),\( h_{S}^{3x} \) and \( t_{m}^{3x} \), respectively, to identify their influence to the total cost (\( w_{1} \), \( w_{2} \), \( w_{3} \) ≥ 0 with \( \sum {w_{i} } = 1 \)).

For 5-axis SSM, the objective function is formulated as follows:

$$ f(L_{\text{step}}^{5x} , { }a_{e} ) = \hbox{min} (R_{{h_{{{\text{CL}}i\_Pj}} }}^{{n_{{{\text{CC}}i}} }} , { }h_{S}^{5x} , { }t_{m}^{5x} ) = \hbox{min} \sum\limits_{w = 1}^{i} {w_{i} f(} L_{\text{step}}^{5x} , { }a_{e} ) $$
(5.7)

where,

\( L_{\text{step}}^{5x} \): The discretization (longitudinal) step in the feed direction (mm);

\( a_{e} \): The tool’s stepover value in the transversal direction (mm);

\( R_{{h_{CLi\_Pj} }}^{{n_{CCi} }} \): The ratio of normal vector magnitude to the distance of a projected CL point in (mm); with \( R_{{h_{CLi\_Pj} }}^{{n_{CCi} }} \)\( = \frac{{||\vec{n}||_{{{\text{CC}}i}} }}{{h_{{{\text{CL}}i}} Pj}}\forall {\text{CC}}i \in {\text{SS}},h_{{{\text{CL}}i}} Pj \ne 0,||\vec{n}|| > h_{{{\text{CL}}i}} Pj \);

\( h_{S}^{5x} \): The scallop height (mm);

\( t_{m}^{5x} \): The machining time for 5-axis surface machining in (min);

\( w_{1} \), \( w_{2} \) and \( w_{3} \): The weights of \( R_{{h_{{{\text{CL}}i\_Pj}} }}^{{n_{{{\text{CC}}i}} }} \), \( h_{S}^{5x} \) and \( t_{m}^{5x} \), respectively, to identify their influence to the total cost (\( w_{1} \), \( w_{2} \), \( w_{3} \) ≥ 0 with \( \sum {w_{i} } = 1 \)).

5.4.2 Normalization

The values of the two objective functions introduced above are meaningful if only their objectives’ magnitudes will be taken into account omitting thus their measuring units via proper transformations. Proceeding on a normalization process to conduct such a task, maximum values for the objectives are used and obtained either by the upper (maximum) working range value given in the initialization process, or by taking the constrained values for the objectives which by default reflect maximum ones. Thus, for 3-axis surface machining mode the following relations are finally utilized.

$$ h_{{{\text{CL}}\_Pj}}^{\text{Dif}} {\text{Norm}} = \frac{{h_{{{\text{CL}}\_Pj}}^{\text{Dif}} }}{{h_{{{\text{CL}}\_Pj}}^{\text{Dif}} \hbox{max} }} $$
(5.8)
$$ h_{S}^{3x} {\text{Norm}} = \frac{{h_{S}^{3x} }}{0.01} $$
(5.9)
$$ t_{m}^{3x} {\text{Norm}} = \frac{{t_{m}^{3x} }}{480} $$
(5.10)

where, \( h_{{{\text{CL}}\_Pj}}^{\text{Dif}} \hbox{max} \) is set to 0.02 as the maximum allowable value for the scallop height and the maximum allowable machining time is 8 h (typically one shift in industry) which corresponds to 480 min. Similar settings were also followed to normalize the objectives of 5-axis surface machining mode.

5.4.3 Constraints

Constraints applied to the current research study involve the constrained properties, their expression and the affected parameters. For a complex machining optimization problem such as this, properties may involve machining parameters from tool path strategies and their workable ranges so as to ensure that obtained optima may be employed to actual industrial operations. Table 5.1 summons the constraints implemented.

Table 5.1 Constraints determined for 3- and 5-axis sculptured surface machining

5.4.4 Biological Aspects of Virus-Evolution Theory

Genetic and evolutionary algorithms (GAs-EAs) are the most representative attributes of Artificial Intelligence yet; they are prone to premature convergence problem [20]. The cause of this problem is the fact that only a few outstanding solutions take over the population, affecting this way diversity and finally trapping to a local region suggested as the one having the optimum solution. To overcome premature convergence problem without modifying the algorithm is impossible since its intelligent architecture is the instance that forces the algorithm to finally converge towards some regions during the search. One possible solution to the problem is storing patterns as the algorithm changes candidate solution schemes during its search for global optimum. Thus; efficient patterns are not to be eliminated from the search region when the algorithm converges, hence diversity will be sustained.

The algorithm proposed to address the optimization problem formulated for SSM mimics infection procedures performed by existing viruses. In biology, the viruses’ process of infecting individuals existed to a population is based on two fundamental mechanisms. The mechanism of viruses to utilize their enzyme and reverse-transcribe (copy backwards) their RNA genomes into DNA, thus integrating it to that of the hosts, is called reverse transcription. Viruses found in nature are also capable of modifying their genetic material or even multiply it to produce new virus individuals. This process is known as transduction. The incorporation of a host’s DNA segments into effective viruses and subsequent transfer to other cells is widely known. Besides, entire virus genomes can be incorporated into germ cells and transmitted from generation to generation as vertical inheritance. [1]. The natural mechanism of “vertical inheritance” among genomes was successfully simulated by Kubota et al. [13] through reverse transcription operator. The proposed algorithm’s special features and operators involve functions presenting host and virus populations, reverse transcription and transduction operators. The rest of the functions for selection, crossover and mutation operators are as in conventional GAs–EAs. Evidences assembled by other researchers employing Virus-evolutionary genetic algorithm to solve problems out of the field of manufacturing engineering science [12] have encouraged the authors of the proposed work to support that key mechanisms of such an intelligent module can lead to trustworthy results when it comes to machining modelling for sculptured surface tool path planning. Besides, since GAs–EAs are capable of operating without needing derivative information and do not rely on problems’ characteristics but only an objective function [10], it is expected by the module to solely follow its optimization concept to this problem as well.

5.4.5 Virus-Evolutionary Genetic Algorithm Architecture

Virus-evolutionary genetic algorithm operates with two populations. The first population is that of hosts (candidate solutions) and plays just the same role as that of a typical host population found in a conventional GA structure, whereas the second population is that of virus individuals. The virus population is needed for storing effective candidate solution patterns during a search. When a new generation of the host population is created, these effective patterns offer information to make the new hosts even better than their parents.

A modified framework for the operational workflow of the virus-evolutionary genetic algorithm was established against the one already proposed by other researchers. On the way to develop a new algorithm of this kind completely by scratch, several improvements were made to the already existed virus-evolutionary genetic algorithm . The already existed one randomly creates the virus population as a substring of a host and as a consequence viruses produced cannot carry more efficient schemata than the ones already captured by the hosts. On the other hand should only the elite of hosts be kept to create the virus population a bias is yielded favouring only the fitted hosts withdrawing in this way the possibility of extracting good data from the rest of the population. To improve this shortcoming in the proposed virus algorithm, virus individuals are generated after determining their number as a fraction of the number of host individuals. The algorithm performs transduction operation to some of the best-fitted individuals after evaluating their fitness function, whereas the rest of the viruses are created by randomly selecting from the rest of the hosts. Thus, the seed for producing candidate solutions will hold no bias favouring only outstanding individuals who produce high-fitted offspring.

Initialization process involves the random generation of host population. As a parameter representation scheme, binary encoding is selected since it facilitates the pattern formulation process. Initialization is achieved by creating the individuals’ chromosomes according to the parameter value range and accuracy (number of binary digits to describe the phenotypic values for variables). Due to GAs stochastic nature, determining convergence criteria is usually an arbitrary process. A common ground in many studies is that the algorithm terminates after a predetermined number of generations or when no further improvement is indicated to the solutions for a given number of generations. Thereby, virus-evolutionary genetic algorithm is adjusted to terminate its evaluation process after specifying a constant number of generations.

5.4.6 Virus Operators

Once the two populations have been created by applying the transduction operator, the population of viruses infects host individuals by applying reverse transcription operator. Reverse transcription operator manages to overwrite a virus’ binary string to a host’s binary string. Programmatically, this is achieved by sequentially typing each binary digit or the virus’ string to the host’s string according to the determined locus for replacement. To do so, the indices of both the virus and the host together with their replacement loci for the strings are declared. As a result, a new host (infected host) is generated. Reverse transcription and transduction operators are dynamically collaborated under the major goal of increasing more effective individual representation schemata that will rapidly lead to the global optimum solution for a given problem. Figure 5.6 depicts the operational sequence for reverse transcription and transduction operators towards their virus infection result.

Fig. 5.6
figure 6figure 6

Function of reverse transcription and transduction operators

In addition to common parameter settings that conventional GAs–EAs suggest (crossover probability, mutation probability and rate, etc.), virus-evolutionary genetic algorithm involves parameters to determine virus fitness, infection rate, the “life” of viruses, etc. A virus individual (virus “i”) has a fitness value (fitvirus (i)) which is calculated to indicate its efficiency. The fitness of each virus is determined as the sum of the fitness of each infection caused by the current virus to the host population (Eq. 5.11). Moreover, the fitness of each infection is computed which is determined as the difference between the fitness value of the original host and the one calculated after its infection (Eq. 5.12).

$$ fitvirus(i) = \sum\limits_{j \in S} {fitvirus(i,j)} $$
(5.11)
$$ fitvirus(i,j) = fithost(j^{\prime}) - fithost(j) $$
(5.12)

Thereby, each virus has a measuring parameter for its infection strength; that is fitvirus (i). Fithost (j) and fithost (j′) are the fitness values of a host “j” before and after its infection, respectively. The indicator fitvirus (i,j) denotes the difference between the fitness values, fithost (j) and fithost (j′), which is equal to the improvement value obtained through the infection process. To the equations presented above, “i” denotes the virus number and “S” represents the sum of host individuals infected by the virus “i”. The number of infections caused by each virus is controlled through infection rate (infrate (i)). If a virus has a positive fitness, the infection rate is increased according to a constant parameter “α”. In contrast, if the virus has a negative value the infection rate is reduced. Kubota et al. [13] suggested that maximum infection rate to be 0.1 and initial infection rate to be 0.05. The infection rate of each virus should satisfy the criterion 0 ≤ infrate (i) ≤ 1.0 so as to perform a reverse transcription operation to a given host population. Equation 5.13 represents the formulation of these settings for the determination of infection rate by Kubota et al. and is depicted below:

$$ \inf rate_{i,t + 1} = \left\{ {\begin{array}{*{20}c} {(1 + \alpha ) \times \inf rate_{i,t} ,fitvirus(i) \ge 0} \\ {(1 - \alpha ) \times \inf rate_{i,t} ,fitvirus(i) \le 0} \\ \end{array} } \right\} $$
(5.13)

Consecutively, the higher the infection rate of a virus “i” is, the higher its infection capability becomes and the virus infection rate is equal to the frequency increasing a schema in a population. The operational duration for virus individuals is controlled by virus life. The virus life indicates the contribution and positive impact of virus infection to the evolution process. The virus life is programmatically computed as follows:

$$ life_{i,t + 1} = r \times life_{i,t} + fitvirus_{i} $$
(5.14)

where “r” is a life reduction rate and “t” represents the generation being evaluated. If life is negative then the virus individual transduces a new substring from a random host to change its scheme and become efficient. If life is positive the virus individual transduces a partially new substring from one of the infected host individuals to manipulate it for its benefit (further increase its efficiency). The positive calculus of a virus’ life implies that its fitness is quite high and the schema of the successfully infected host by this virus is strong. Hence partial transduction is applied to this host to generate another good sub-string pattern which is another virus and that virus proceeds to further infections. In general efficient schemata in virus-evolutionary genetic algorithm are increased exponentially through this mechanism and local regions of a given solution space are rapidly searched.

5.5 Manufacturing Software Integration

Customized engineering environments play key role in today’s pressing needs for high quality and low costs. One way for industries to ensure and improve their competitiveness is to examine which of the tasks warrant automation towards the adaptation of an integrated product manufacturing framework. Should a number of preparation phases involve routine and repetitive activities, one may apply automation techniques to shorten lead time of product machining modelling, NC part programming and process optimization .

To keep up with the above philosophy on rapidly delivering results referring to the stage of CNC tool path generation with the aid of CAM systems, the API of a cutting-edge CAD/CAM/CAE package was utilized to develop automated functions capable of handling the system’s tools and execute sequential operations according to the evaluation phase processed by the virus-evolutionary genetic algorithm .

5.5.1 Automated Framework

The values for computing the objective function are provided by an external infrastructure which automates CAM software utilities, hence coupling the virus-evolutionary GA to CAM interface. Cooperation between the algorithm and the CAM system was achieved by additional code developed to customize the collaborative environment. The code embedded to the environment as stand-alone automation routines and was written in Visual Basic for Applications (VBA) utilizing the hosted programming development platform (API) of Dassault systèmes® CATIA® V5-R18. The code developed undertakes to automatically:

  • Scan the machining modelling history tree, retrieve the machining operations with their related process parameters and pass the values proposed by the genetic algorithm as candidate solutions;

  • Compute the tool path according to the specified settings and run the machining simulation;

  • Extract information and statistics corresponding to quality objectives.

By utilizing the structure of automation objects existed in a SSM set-up document, the parametric tree structure is accessed so as to retrieve the machining operations containing the strategies and their related parameters for automation. Common functions of visual basic are then applied to declare the parameters according to their role (integer, double, string, Boolean, etc.) whereas special programming is needed for proper argument passing and data exchange. In general, input–output files employed for such applications are represented either in *.txt or *.dat format containing the data. By sequentially accessing the files, associated objects to the commands retrieve the corresponded values of inputs–outputs and current properties are updated towards new simulations.

When the framework is activated by the user, a selection in terms of the manufacturing programme type according to the machining set-up document (3- or 5-axis) is done. Through this selection the programming functions corresponded to each of the two machining modes are retrieved. Further on, the user is prompted to specify the importance of quality objectives through the determination of weights. The values for the weights are based on industrial demands and special needs, thus they ought to vary depending on the case. Optimization settings involve the specification for process parameter values which are loaded as initial inputs to the system (initial seeding for the genetic algorithm ). The document’s parametric tree is scanned to summon data as explained above. The procedure is initially executed for roughing operation (which is not a concern on this part of our research), whilst one of the finishing operations follows next in the sequence. If a previous run with the same variable values is detected, the automation infrastructure developed will directly expose results for that run to avoid unnecessary computations. To do so, Visual Basic’s flag states were programmed in the code reducing this way overall performance time of the algorithm. The phenotype values for process parameters are loaded as soon as the machining operation is retrieved and a check whether they satisfy technological constraints is performed. Should the values violate the constraints , the system returns a penalized value for the corresponding objective function.

5.6 High-Precision Cutting Experiments on Sculptured Surfaces

To test our proposed optimization methodology, two SSM experiments were modelled and conducted; one adopting 3-axis CNC surface machining and one adopting 5-axis CNC surface machining. Two test parts were modelled to plan their machining operations utilizing three approaches.

Validation of the simulated entities via our approach was achieved by comparing the results with two different approaches. The first approach was that of a manual tool path “optimization” by considering current industrial practices to enhance CNC programming through trial-and-error, whilst the second was a tool path optimization via our intelligent algorithm without activating the Virus operators , hence using a conventional genetic algorithm . In the third approach the virus operators were activated in the genetic algorithm and the operation was optimized with our proposals in this study. The two test parts are depicted in Fig. 5.7a (3-axis) and Fig. 5.7b (5-axis), whereas the tool paths applied to machine their free-form contours are depicted in Fig. 5.7c, d for 3-axis and 5-axis, respectively.

Fig. 5.7
figure 7figure 7

a Test part for 3-axis SSM; b test part for 5-axis SSM; c 3-axis surface machining tool path; d 5-axis surface machining tool path

In all three alternatives, the quality objectives introduced in Sect. 4.1 were utilized. For the manual NC tool path planning only the part of the automation module that projects the CL data was used so as to measure the distances from their origins to the surface and consecutively to compute their incremental differences to assess chordal deviation. Scallop height formulas were in this module as well. The rest of the alternatives that involve the genetic algorithms, were run in full automation performing the iterative evaluations.

5.7 3-Axis SSM Case

The results obtained in terms of the tool path CL data patterns for the 3-axis part, and for the three alternatives, are depicted in Fig. 5.8a, b, c for the manual, the conventional GA and the Virus-evolutionary GA, respectively. It is observed that the last approach produced the most uniform CL point pattern meaning both regular surface approximation and a uniformly distributed error that is actually low, considering the simulated solid shown in the right-hand side of Fig. 5.8c.

Fig. 5.8
figure 8figure 8

Projected CL point grids to assess 3-axis sculptured surface machining error: a manual CNC programming; b CNC programming using conventional GA; c CNC programming using virus-evolutionary genetic algorithm

For this machining mode, the outputs from the two “intelligent” approaches (machining via GA and machining via Virus-evolutionary GA) were also used to conduct an actual machining operation for the 3-axis SSM part in a 3-axis CNC vertical machining centre BRIDGEPORT® VMC 46012 equipped with a Heidenhain TNC-320 CNC control system. As the 3-axis test part is a mirrored mould, one-half machined via GA optimization and the other half via the virus algorithm. Despite the fact that process parameters, i.e. feed and speed are also involved for optimization process, they kept constant to limit the interest only to the attributes that formulate the geometric machining error, stepover and maximum discretization step. The material was a 20 × 170 × 200 mm Al-1050 plate. To select feeds and speeds according the tools used, a tool catalogue was built considering the data taken by www.Garant-tools.com. Figure 5.9a shows the machining set-up, Fig. 5.9b the finished part, Fig. 5.9c a limited region in detail achieved via the application of virus-evolutionary genetic algorithm and Fig. 5.9d a limited region in detail achieved via the application of the genetic algorithm without activating the virus operators.

Fig. 5.9
figure 9figure 9

Actual machining of the 3-axis test part: a machining set-up; b finished part; c detailed surface result obtained via virus-evolutionary algorithm;; d detailed surface result obtained via conventional GA

Feeds and speeds for the tools as well as the results for quality objectives for the 3-axis SSM optimization are given in Table 5.2.

Table 5.2 Results for machining parameters and target objectives for 3-axis SSM

5.8 5-Axis SSM Case

Virtual machining experiments were conducted to validate the proposed modelling and optimization approach in the case of 5-axis sculptured surface tool path generation. Sweeping strategy was determined to variable lead/tilt angles for the tool orientation in the case of 5-axis machining part which was simulated and verified using CG-Tech® Vericut 7.3 NC tool path verification system. The range for the 5-axis tool orientations was −25°/+25° for both inclination angles to avoid imminent interferences among the tool and the workpiece or the fixture. Resulting outputs are of similar interpretation concerning the CL point patterns produced. Figure 5.10a illustrates the CL data pattern and the corresponded simulated part by adopting a manual tool path generation. Figure 5.10b, c shows the same results by applying the conventional GA and the Virus-evolutionary Genetic Algorithm , respectively. Yet again a more uniform CL data pattern is obtained with the proposed optimization algorithm and machining time results lower that the conventional GA’s employment to the problem’s multi-objective response. The surface obtained is very close to manual mode where maximum discretization step value was set to 0.001 to ensure low error surcharging machining time on the other hand.

Fig. 5.10
figure 10figure 10

Projected CL point grids to assess 5-axis sculptured surface machining error: a manual CNC programming; b CNC programming using conventional GA; c CNC programming using virus-evolutionary genetic algorithm

For this machining mode, the outputs from all three approaches were used to conduct virtual machining experiments for the 5-axis SSM part in CG-Tech® Vericut 7.3 NC tool path verification system. Yet, again we limited the interest only to the attributes responsible for yielding the geometric machining error, stepover and maximum discretization step. The material was considered the same to that being used in 3-axis SSM, whilst the same tool catalogue adopted also for this case. Figure 5.11a shows the virtual machining setup, Fig. 5.11b the virtual machine employed, Fig. 5.11c the part surface obtained in terms of the machining error by adopting manual programming, Fig. 5.11d the part surface obtained in terms of the machining error by implementing the conventional genetic algorithm and Fig. 5.11e the resulting surface obtained by applying the virus-evolutionary genetic algorithm. Feeds and speeds for the tools as well as the results for quality objectives for the 3-axis SSM optimization are given in Table 5.3.

Fig. 5.11
figure 11figure 11

Virtual machining of the 5-axis test part: a machining set-up; b virtual CNC machine tool used; c resulting part surface error via manual CNC programming ; d resulting part surface error via the application of conventional GA; e resulting parts surface error via the application of virus-evolutionary genetic algorithm

Table 5.3 Results for machining parameters and target objectives for 5-axis SSM

5.9 Discussion of Results

The current study proposes an intelligent methodology for sculptured surface tool path optimization. Intelligence is introduced by developing a non-standard genetic algorithm based on the virus theory of evolution, whilst it is embedded to a cutting-edge CAD/CAM system as the main environment to plan tool paths for complex surfaces. By suggesting a user-friendly interface NC programmers may give the inputs for machining parameters responsible to formulate the cutting path style and influence the geometrical machining error at the same time. Since trial-and-error approaches and tool catalogue-based selections for machining parameter values might introduce inconsistencies, global outputs become far from optimum.

The methodology suggests to take advantage of the CL data computed during the post-processing phase of tool path planning, since they represent the only instances which CNC programming units take into account in actual machining operations and thus are responsible for the final outcome in terms of part quality and machining time. The study uses CL data to project their origins to the sculptured surface in order to sequentially measure their distances and hence compute the incremental step which in turn controls chordal deviation. Moreover, the scallop is introduced as the second objective to be optimized since it strongly affects machining error as well. Results summoned via experiments for 3- and 5-axis SSM reveal that proposed objective modelling is deemed rather efficient considering the resulting tool path patterns. The tool paths computed minimize machining time to the best possible extent, whilst they are adopted to the minimum geometric machining error in terms of maximum discretization step parameter and scallop height.

Time-intensive operations were successfully automated towards the conjugation of the virus-evolutionary genetic algorithm and the rest of the environment. The special mechanism of virus operators reveals that this kind of algorithm is capable of representing more effective schemata during the evaluations performed in a loop of generation. A proof of our assumptions is the uniformity of the projected CL point grids meaning that viruses suggest efficient information carriers covering broader solution regions belong to the overall study space. This did not occur when the same algorithm run without the activation of its virus operators representing this way a conventional genetic algorithm coming up with its known drawbacks referred in the literature.