Keywords

1 Introduction

High-variety and low-volume are typical characteristics of industrial production today, driven by the proliferation of models or variants for the products. In this context, companies have to cope with these environmental constraints through systems able to cope with a high variety of parts and frequent set-ups, with the aim at guaranteeing a reasonable utilization for the equipment. This approach is the only viable one, in comparison to the implementation of production systems dedicated for each specific product, whose feasibility is endangered by the very high variety of parts. Besides being a typical environmental condition for the production of new products, the described situation also affects production activities devoted to different phases of the life-cycle of a product. An example comes from the automotive industry where, as a model of a car exits from the series production phase, dedicated production systems or cells for its components are not likely to be feasible to maintain. At the same time, OEMs have to guarantee the supplying of spare parts for a considerable time (e.g., 10 years), thus, they typically outsource the production of spare parts to companies facing environmental conditions very similar to the ones described above. Another example comes from the application to the remanufacturing, where companies providing refurbished products have to be able to work/rework parts using equipment and processes that could be different from the original ones. Also in this case, although the volumes are not necessarily low, the variety of the product mix is very high since rework activities could request shorter processing times. As a consequence, production systems able to cope with a wide range of parts are a clear requirement.

Flexible and/or reconfigurable production systems are the main paradigms to cope with these requests and guarantee a reasonable utilization factor for a multipurpose system [15, 19] according to the co-evolution principle [16], i.e., the need of modifying the configuration of a production system or its components together with the changes affecting the products or the processes. Reconfigurability and flexibility have been mostly addressed in the design of manufacturing systems in general, with a special focus on machine tools. Nevertheless, these two paradigms are also meaningful and relevant with respect to fixtures (e.g., referring to machining and/or assembling of parts) representing one of the most relevant enablers to manage high-variety of products. A possible solution to this requirement is provided by zero-point clamping system [17], where specifically designed devices allow the fast and reliable reconfiguration of fixtures. Preconfigured baseplates hosting different sets of fixtures can be rapidly mounted and unmounted onto a standard pallet tombstone, guaranteeing the referencing of the parts without the need to align and check the modular fixtures again. Thus, enabling a fast and reliable pallet reconfiguration.

As the pallet configuration changes, a new part program has to be devised or, at least, the reuse of the previous part programs has to be verified to check the machinability of the new pallet configuration and avoid collisions between the tool and the fixtures. This verification could be extremely time-consuming and constitutes one of the main limitations to the adoption of fast pallet reconfiguration technologies in the industry.

In this paper, we propose an approach pointing in this direction. The approach is able to perform an approximate verification of the machinability of a part considering the environmental conditions and constraints, i.e., the fixtures hosting the part, the presence of other pieces of fixture in the working environment, the characteristics of the machining tool. The approach grounds on a collision detection method approximating the volume the tool will sweep while executing the part program and checks possible collisions with other elements in the working environments (i.e., fixtures, other parts, elements of the machine).

The advantage of the proposed approach is to accept approximation in change of speed, thus constituting a preliminary analysis step being able to check a high variety of alternative fixture configuration, while relying on traditional approaches based on the simulation of the machining process for the final validation of the part program. In this paper we provide a feasibility analysis of the proposed approach in a realistic case and a comparison with more traditional solution approaches.

Outline The paper is organized as follows: Sect. 2 provides an analysis of the literature, also highlighting the main advancements, while the complete problem statement is presented in Sect. 3, where the process plan verification problem is formalized. In Sect. 4, the solution approach is described through its three steps. The viability of the approach is demonstrated through the application to an industrial problem in Sect. 5. Conclusions and future development directions are provided in Sect. 6.

2 State of Art

In the last years, great importance has been given to the development of technological solution aiming at facing environmental constraints as the high-variety and low-volume situation [3, 14]. These solutions always ground on reconfigurability and flexibility concepts, as the zero-point clamping system one. The main limitation in the adoption of this technology in pallet configurations lies on the verification of the machinability of the new pallet using the part program used for the previous pallet.

The machinability can be verified using simulation tools, e.g., Vericut (https://www.cgtech.it/products/about-vericut/) or Moduleworks (https://www.moduleworks.com/) able to virtually reproduce the material removal process but also to check the presence of collisions between cutting tool and other elements in the working environment (e.g., pallet structure and fixtures mounted on it). In doing this, they consider the volumes occupied by the different elements in the working environment and divide them into sub-elements, then, they check whether these sub-elements collide or not. Another possibility is to verify the machinability with a collision detection approach [12] able to analyze in detail the movement of the cutting tool with respect of the working environment. Different approaches have been presented: the ones that study the surface’s property of the objects involved [2], the ones based on the relative distance between objects [20], and the ones that simplify the shape of the objects involved [4, 8, 13, 18].

All these methods are complex and time consuming due to the need to represent and handle the entire volume of the elements, and the level of detail provided. A rapid and efficient pallet inspection could increase the system adaptability to market requests by boosting the adoption of reconfigurable pallet configurations. For this reason, the aim of this paper is to propose an approximate approach to be used in a preliminary analysis.

In this sense, a valuable approach is to verify the machinability by checking the accessibility of the cutting tool to the part mounted on the pallet [19, 10]. In this case, the main drawback is that the verification of accessibility is not focused on the volume occupied by the elements in the working environment and, thus, it does not guarantee the absence of collisions during the process.

In this paper, we present a fast approach able to evaluate the machinability of a new pallet using a given part program by approximating the elements inside the working environment with their convex hull and then evaluating their overlapping. In this way, the approach considers the volume of every element by evaluating the surface surrounding it without the complexity and the computational effort required by the previous approaches.

3 Problem Statement

Designing a pallet configuration usually follows the steps shown in Fig. 1. Firstly, a set of configurations are defined in terms of the set-ups of the parts, their position in the working environment, the position of the associated fixtures as well as additional pieces of fixture (e.g., plates or columns) to be assembled onto the pallet. For each of these configurations, a part program has to be defined and checked. For this check, a simulation tool is typically used (https://www.cgtech.it/products/about-vericut/) (https://www.moduleworks.com/), providing an environment where, after the definition of the configuration, the part program and the characteristics of the machines and the CNC, the trajectory of the tool is simulated and a check for collision is operated. Although effective, this simulation step is usually time consuming and it often requires a wide range of detailed information that, in many of the conditions previously described, could not be available (e.g., the specific machine tool to be used could be unknown). To overcome this limitation, the proposed approach is aimed at being an alternative for this simulation step, providing an approximate verification for the machinability through a collision detection approach.

Fig. 1
figure 1

Workflow of the approach

Traditional process simulation and verification approaches follow a simulation strategy, calculating the relative positions of the tools and the parts to machine in the machine environment. For each point in this discretization, a collision check is operated between the 3D model of the tool and the 3D model of the working environment (i.e., parts, fixtures, elements constituting the machine, etc.).

In this scheme, a very high number of collision checks have to be done and this obviously has a significant impact on the computation time. To mitigate this impact, we introduce a preliminary evaluation step (see Fig. 1) where a limited number of sampled points is considered. Starting from these, the 3D representation of the tool (and the attached mandrel) and its sequential positions in the machine space are considered to calculate the convex hull of these volumes. This convex hull is an approximation of the space swept by the tool while executing the part program. As the number of positions considered increases, the convex hull tends to match exactly the real volume swept by the tool.

More formally, the volume \(V_{Btot}\) represents the space occupied by the elements inside the working cube (e.g., fixtures, structural components of the machine tool, parts not to be machined) calculated as the union of the volume occupied by each of these elements, \(V_{Btot} = \cup_{{b \in \left\{ {1, \ldots ,B} \right\}}} V_{b}\). \(V_{P}\) is the volume occupied by the parts to be machined; it is considered separately from \(V_{Btot}\) since a collision with it is expected. In addition, the volume \(V_{C}\) identifies the convex hull of the volumes occupied by the cutting tool and the mandrel in a set of points during the machining process. Grounding on this, it is possible to approximately verify the existence of collisions between the tool and the fixtures by checking for collisions between \(V_{Btot}\) and \(V_{C}\). Nevertheless, as stated before, \(V_{C}\) provides an approximation of the real swept volume and, thus, the absence of intersections does not guarantee for the absence of collisions.

4 Solution Approach

The approximate approach follows a three-phase implementation. In the first phase, the volumes occupied by the part types to be worked, the pallet, the fixtures blocking the parts and the cutting tool are derived (Sect. 4.1). Then, the proposed approach for the definition of the volume swept by the tool during the process is presented (Sect. 4.2). Finally, (Sect. 4.3) the collision detection approach is described to verify the machinability by evaluating the overlapping between the considered 3D objects.

4.1 3D Space Reconstruction

The volumes \(V_{b} , \,\,\forall b \in \left\{ {1, \ldots ,B} \right\}\) occupied by the elements blocked inside the machine (e.g., parts not to be machined, the pallet and the associated fixtures blocking the parts) are derived directly from their 3D representations and positioned in the working environment.

Given the 3D representation of an object, its position inside the working cube of the CNC machine is defined through a tree of origins, i.e., a sequence of coordinate system origins and their relative positions.

The first origin considered is the origin of the machine coordinate system, located at point (0, 0, 0) in the working cube. The pallet origin represents the position of the pallet inside the working cube as a reference to the origin of the machine coordinate system. Then, a set of fixtures are mounted on the pallet blocking the parts to be worked. The positions of fixtures and parts are defined with their fixture origins and part origins with reference to the pallet origin and the distance from it.

The distances and the translations between these origins are defined through a set of Homogeneous Transformation Matrices (HTMs). An HTM is a matrix \(R_{4 \times 4}\) given by the product of three rotational matrices (one for each principal axes) and the translation matrix. In general, it is represented as

$$R_{4 \times 4} = \left[ {\begin{array}{*{20}c} {D_{3 \times 3} } & {T_{3 \times 1} } \\ {P_{1 \times 3} } & s \\ \end{array} } \right]$$
(1)

where \(D\) is the rotation matrix, \(T\) is the translation matrix, \(P\) is the perspective matrix and \(s\) is a scale factor. The position of each component inside the working cube of the CNC machine is obtained as a sequence of HTMs applied to the origin of the machine coordinate system. More formally, the space occupied by element \(b \in B\), e.g., the parts, the pallet and the fixture, is a function of its position \(p_{b}\) and its 3D representations, thus, \(V_{b} = V_{b} \left( {p_{b} , 3D_{b} } \right)\), where the position \(p_{b}\) is identified through a sequence of HTMs. The union of these volumes represents the volume of the entire set elements, \(V_{Btot} = \cup_{{b \in \left\{ {1, \ldots ,B} \right\}}} V_{b}\).

As a consequence, for the identification of the volume \(V_{Btot}\) occupied by the elements inside the working cube, the information about the characteristics of the machine, e.g., the size of the working cube, are not needed. The only information needed is the relative position of the elements and their 3D models. This makes the approach independent from the complete definition of the machine environment and suitable for an evaluation grounding on the pallet configuration and the part program only.

4.2 Modelling the Volume Swept by the Tool

During the execution of the process, the tools moves with respect to the pallet thus, in order to check for possible collisions between the tool and the fixtures, the volume swept by the cutting tool has to be computed.

The first step of the approach derives the sequential positions of the tool in the working cube grounding on the instructions in the part program. This phase is usually called post processing and needs a dedicated interpreter able to translate the part program into the movements of the elements of the machine, according to the specific CNC and machine architecture. Post processing tools have to cope with different G-Code languages and dialects with respect to the specific manufacturer (e.g., Fanuc, Siemens, etc.). When addressing the verification of the part program through simulation, software packages like Vericut (https://www.cgtech.it/products/about-vericut/) or Moduleworks (https://www.moduleworks.com/) provide their own post processor. Since many interpreters are available for post processing a part program and this is not the core part of this work, we assume to start from the output of a post processing phase, thus, from the sequence of the positions of the tool.

Starting from this information, a subset of positions is selected to reconstruct the volume swept by the tool. For each of these positions, the 3D model of the tool, together with the moving parts of the machine (e.g., the mandrel), is considered. The convex hull of these 3D models is used as a proxy of the volume swept by the tool. More formally, the volume associated to the tool is a function of its stereolithography (STL) representation and the set of positions selected from the trajectory, \(V_{C} = V_{C} \left( {PP, STL_{C} } \right)\).

The number of positions sampled has a clear impact on the degree of approximation of the obtained convex hull. A first option consists in just considering the initial and final positions for each segment of the tool’s trajectory, usually derived from a single instruction in the part program. This choice perfectly suits the approximation of linear movement of a CNC machine’s axes, where the convex hull of the initial and final location of the tools just depends on these two positions. On the contrary, where non-linear trajectories and/or rotational axes movements are evaluated, simply considering the initial and final positions entails a very poor approximation. To overcome this issue, additional positions can be sampled between the initial and final ones.

Limiting the analysis to a traditional architecture of 4-axes CNC machine with horizontal mandrel, we can have two different cases: linear trajectories of the tool only relying on the linear axes; non-linear trajectories or movements involving the 4th rotational axes. Starting from the first one, the example in Fig. 2a represents the trajectory of a tool in the XY plane. It contains two segments, a linear one (AB) and a non-linear one (BC). The application of the two-points sampling is shown in Fig. 2b, where the convex hull is represented by the light green region. Clearly, the approximation of the non-linear segment of the trajectory is very poor, while it is acceptable for the linear one. By sampling 4 points from the segment AB and other 4 points from arc BC, it is possible to obtain a better approximation (Fig. 2c).

Fig. 2
figure 2

a First row on the left, example of trajectory with different positions of the tool; b first row on the right, first sampling option; c second row, second sampling option

On the contrary, in the case when the fourth axis rotates, e.g., due to a variation of the tilt or the lead angle, we can consider this movement as a non-linear segment of the trajectory and apply a more frequent sampling as described.

Therefore, the number of sequential positions considered to compute the volume \(V_{C}\) increases, a better approximation of the real trajectory is obtained. On the other side, sampling many positions will require many STL elements to be considered in the calculation of the convex hull and, thus, a bigger computational effort.

The quality of the approximation is also affected by the sampling strategy. In the case of non-linear segments, the minimization of the chordal error, defined as the difference between the ideal arc section and the approximation using segments, is considered. In particular, given the number of positions to be sampled on a circular segment, their coordinates are chosen by following the Tustin interpolation method [11].

In the approach presented in this paper, two different sampling strategies for linear and non-linear segments of the tool’s trajectory are considered. A first strategy only considers the initial and final position of the curved path, while the second one partitions the path into a given number of segments. For example, Fig. 2c, 4 positions have been chosen and 3 segments identified. Hence, the STL representations of the tool and the other moving parts of the machine are considered. For each segment, the associated convex hull is identified using the STL representations on its boundary points. Then, the volume swept by the tool during the process is approximated through the union of these convex hulls.

Sampling more than 2 positions from the non-linear segments of the trajectory helps to obtain a better approximation of the swept volume. An investigation of the impact on the performance of the approach varying the number of points sampled in the curved segments of the trajectory will be carried out in Sect. 5.

We implemented this first part of the approach using C++ code together with Matlab. In particular, a script in C++ has been developed to read the trajectory of the tool and identify the set of positions to be considered. The current version of the approach is limited to linear and circular/elliptical segments. Then, we use Matlab for managing the STL representations of both the elements in the working cube and the cutting tool. The convex hulls and their union have been implemented with MATLAB’s function boundary, giving in output a convex hull as an STL representation.

4.3 Collision Detection

Once \(V_{Btot}\) and \(V_{C}\) have been defined, their possible intersections have to be checked. To this aim, we operate on surfaces rather than volumes considering \(S_{Btot}\) and \(S_{C}\), the boundary surfaces for \(V_{Btot}\) and \(V_{C}\) respectively. This provides a more agile representation of the 3D objects and a faster calculation of their collision. Notice that, when referring to simulation approaches for machining operations (https://www.cgtech.it/products/about-vericut/) (https://www.moduleworks.com/), they usually adopt an approach explicitly considering the 3D volumes of the tool and parts. This is driven by the need of simulating the process and, consequently computing the portion of the part to be machined. In our case, since we do not need to simulate the process but simply check for collisions, considering just the boundary surfaces instead of the whole volumes is a viable approach.

Once the two boundary surfaces \(S_{Btot}\) and \(S_{C}\) have been identified, a collision check is operated by verifying whether they overlap or not. Through the described approach, the possible collisions between \(S_{Btot}\) and \(S_{C}\) are evaluated. If a collision is detected, then the selected pallet (fixture) configuration is not suitable for the execution of the machining process. On the contrary, if no collision is detected, since the approach is approximated, the machinability cannot be guaranteed and, hence, further analysis must be carried out, e.g., through a detailed simulation of the machining process.

We implemented the second part of the approach using the C++ language. In doing this, we take advantage of the library V-Collide (https://gamma.cs.unc.edu/V-COLLIDE/), exploiting a collision detection method for arbitrary polygonal objects. This library provides a function that takes as input the STL representation of a series of objects, their positions in the space and evaluates the possible collisions among them. In particular, we give in input to the library the list of STL representations and the convex hull identified.

5 Application Case

The approach presented in Sect. 4 has been tested on the production process of an automotive component (Fig. 3a) that has to undergo a machining process. We focus the analysis on one of the set-ups to machine the part and consider a possible pallet configuration, different from the one originally used, with nine parts hosted on a column with three surfaces equipped with fixtures, as shown in Fig. 3c. The details of the fixturing solution are depicted in Fig. 3b. The machining process requires different machining operations, i.e., milling, drilling and boring. Some of the surfaces and holes, as shown in Fig. 3a, are not perpendicular to the fixturing surface, thus, the drilling tool has to approach the pallet taking advantage of the 4th axis of the CNC machine.

Fig. 3
figure 3

a First row on the left, the automotive component; b first row on the right, details of the fixtures; c second row, the pallet configuration

Grounding on this, the described collision detection approach is used to check the machinability of the described pallet configuration with the available part program. To this aim, we firstly define volume \(V_{Btot}\) as the union of the volumes occupied by the pallet and the set of fixtures blocking the parts (Fig. 4a). In Fig. 4, the pallet, the set of fixtures (both in dark blue) and the set of parts (in light blue) are depicted using their STL representations.

Fig. 4
figure 4

a On the left, STL representation of parts and fixtures; b on the right, STL representation of the tool

Hence, the volume \(V_{C}\) swept by the tool is derived starting from the trajectory and the orientation obtained from the part program. For each of the considered operations, the specific STL representation of the tool used is considered (Fig. 4b). After the selection of the positions from the trajectory, the volume \(V_{C}\) is identified as the union of the convex hull of the positions of the tool in those points.

We consider two different sequences of operations, namely OP1 and OP2. In the first sequence, 4 end milling operations for each part in two faces of the pallet are executed, together with the rapid movement from a feature to another on the same part (3 for each part) and from a part to another (2 movements for each face). In the second sequence, we consider the execution of 4 end milling operations involving the translation of the tool according to the Y-axis of the machine tool and a rotation of the B-axis to move from a face of the pallet to another. For both the sequences we consider the application of the presented approach with two different sampling strategies, both minimizing the chordal error. The first strategy only considers the initial and final positions for both linear and curved segments of the trajectory, while the second strategy samples 4 positions in the curved segments only.

The proposed approach has been compared with a traditional sampling approach where a very small sampling interval is used, thus, obtaining a high number of points and, consequently, a very detailed description of the original trajectory. For each of these positions, the collision between the cutting tool and the other elements (pallet and fixtures) is operated, using the same approach and tools described above. This is the usual approach used for the simulation of a machining process.

The collision analysis for OP1 is given in Fig. 5a, where the volume associated to the tool executing the milling operation on two different surfaces of the pallet is represented in green. In this case, no collision is detected between \(V_{Btot}\) and \(V_{C}\), thus, the verification of the machinability of the pallet configuration has a positive outcome.

Fig. 5
figure 5

a First row, sequence OP1; b second row, sequence OP2 from above

The collision analysis of OP2 is given in Fig. 5b (view from above) and Fig. 6a (lateral view). In this case, an overlap between the blue and red volumes is detected. A detail of the intersection between the two volumes is shown in Fig. 6b, with the overlapping highlighted in purple.

Fig. 6
figure 6

a On the top, OP2, lateral view; b on the low, OP2, a detail of lateral view

The results of the analysis are summarized in Tables 1 and 2. In particular, for the sequence OP1 (see Table 1), we sampled 200 and 400 positions with the first and the second strategy, respectively. Instead, for the sequence OP2 (see Table 2), we sampled 13 and 26 positions on the tool’s trajectory. The \(V_{C}\) associated to OP1 counts 11,632 facets with the first strategy, and 15,632 facets with the second one. The OP2 is represented through 2124 and 2740 facets with the first and second strategy, respectively. The \(V_{Btot}\) is the same for both strategies and both sequences, represented through 268,543 facets. The number of facets to be analyzed impacts on the execution time for the evaluation varying from 3.36 s (1.95 s for the convex hull identification plus 1.41 s for the collision checking) to 66.18 s (57.2 s for the convex hull identification plus 8.98 s for the collision checking) on a computer with 2.4 GHz processor and 8 GB memory.

Table 1 Results of the application case OP1
Table 2 Results of the application case OP2

The number of sampled positions impacts on the quality of the approximation, that can be represented with the number of vertices in collision. In particular, with the first strategy, a collision between the tool and the fixture has been detected in 258 vertices; instead, with the second strategy two collisions have been detected, the first one between the cutting tool and the fixture in 275 vertices, and the second one between the tool and the pallet in 110 vertices. It means that the collision detection approach takes advantage of the additional positions sampled according to the second strategy for the most critical region of the trajectory, the one in which the tool rotates.

The results of the traditional continuous sampling of the trajectory validates the ones of the approximated approach with the identification of the same collisions between the tool and the pallet, and between the tool and the fixture (see Tables 1 and 2). As expected, the associated computation times are different. In particular, considering only sequence OP2, the traditional approach spent 11.94 s for the collision evaluation, more than the time effort requested by the approximate approach for both strategies. Instead, considering only the sequence OP1, the time effort requested by the continuous sampling approach (28.06 s) is comparable with time spent by the approximated approach using the first strategy (35.02 s) and shorter than the second strategy one.

6 Conclusion

In this paper, we presented an approximate approach aiming at evaluating the machinability of a pallet configuration with a given part program. This approach is able to approximately check for possible collisions in the working environment, by reconstructing the volume swept by the cutting tool during different operations and evaluating its overlapping with the other elements in the machining environment.

The approach has been compared with a traditional simulation/verification approach for validation and to assess the benefits in of computational and time efforts. The results in this sense are optimistic when the number of positions sampled from the tool’s trajectory are not many, thus, when the volume \(V_{C}\) is not too complex. Indeed, if we sample a high number of positions, the time effort requested for the identification of the convex hull is higher than the traditional approach one. Grounding on this, an investigation on the sampling strategies is needed to understand how the number of sampled positions impacts on the performance of the tool and what is the trade-off between the complexity of the convex hull and the approximation level of the collision evaluation.