A Surface Division Method of Parts Mesh Model for On-Machine Inspection

As a general 3D model data format, triangular mesh model has been widely used in mechanical engineering to realize the function of transmitting data between different CAD software, but during the transmission, a large amount of geometric and topological data from mechanical parts has been lost. In order to solve this problem while using triangular mesh model in On-Machine Inspection (OMI), in this paper, a surface division method of parts mesh model for OMI is proposed, intending to solve the problem about mesh model that divided into triangular pieces cannot be operated during OMI. The proposed method contains two processes: boundary line extraction and mesh model division. During the process of extracting boundary line of model surface, a method of extracting coordinate points on the model boundary is proposed by analyzing the Gauss curvature between triangular surfaces, and then using the maximum entropy threshold theory to analyze the correlation between coordinate points to screen out the qualified model boundary line. In the process of mesh model division, based on the extracted model boundary, a mesh segmentation method based on region - growing algorithm is studied to obtain the triangular mesh within the boundary. At last, the validity of the descripted method is verified by some example.


I. INTRODUCTION
The rapid development of manufacturing industry makes the position of precision measurement technology in the field of mechanical manufacturing increasingly prominent, but also makes the machine inspection as a new high-efficiency detection method gradually widely used [1], On-Machine Inspection (OMI) system can carry out quality inspection with high-efficiency of mechanical parts without moving parts. However, with the increasing variety of parts in some mechanical fields, the geometric expression of parts is becoming more complicated, data transmission and sharing are becoming more difficult. To solve this problem digital geometry processing technology based on triangular mesh model has gradually become a research hotspot in the field of computer aided design and manufacturing in recent years [2], in which triangular mesh segmentation is the basis of mesh model processing in OMI process [3], [4].
The associate editor coordinating the review of this manuscript and approving it for publication was Zhixiong Peter Li . As an approximation to the real model, the triangular mesh model has characteristics of simple data structure, small file size and strong universal property. However, the original triangular mesh model does not have topological information, so the operator cannot perform any complex operation on the model surface during OMI. To achieve this purpose, it is necessary to accurately segment the triangular mesh model of parts. In most cases, the model mesh segmentation process some objects such as toys, tables, chairs, cup and bowl containers et.al have no strict boundary distinction. The actual partition process is to divide the model into multiple blocks that conform to people's cognition. The accuracy of block boundary has little effect on the model [5]- [7]. But most mechanical parts have clear boundary, which needs to be searched by combining the geometric properties of parts themselves in the process of model segmentation, and the accuracy of boundary segmentation results will directly affect the subsequent operation and analysis of mesh model. Therefore, study the surface division of part triangular mesh model will be beneficial to the analysis and processing of part model during OMI, these processing processes include the inspection part selection of mechanical part, the distribution of measuring points on model surface, and the path planning of measurement process. All of them are related to the part triangular mesh model and require the grid model data possess the corresponding geometry and topology information.
In view of the above analysis, in order to realize the processing of part mesh model during OMI, this paper presents a surface division method of parts mesh model for OMI. The purpose of this method is to solve the problem that the corresponding geometric features and topology information cannot be obtained when using the triangular mesh model during OMI. The main contributions of this paper are as follows: (1) We combined three methods to realize the fast automatic partition of geometric surface on the triangular mesh model of mechanical parts, they are the calculation method of Gaussian curvature, the model boundary line extraction method based on maximum between-cluster variance and the region growth algorithm for triangular plane in boundary. (2) We determined the threshold of Gaussian curvature on boundary line by the two-dimensional maximum entropy threshold method. Using the two-dimensional maximum entropy threshold to analyze the Gaussian curvature at each coordinate point of triangular mesh model, to find out the boundary between data sets, as the threshold to divide the curvature data, to realize the rapid extraction of boundary points on triangular mesh model. (3) We process the extracted boundary points and obtain the corresponding boundary line, calculate the angle of plane which formed the boundary line, then obtain the threshold value of boundary determination by the method of maximum between-cluster variance, so that we can extract boundary data on the model. (4) We combined the theory of ant colony algorithm and Monte Carlo tree search algorithm to do the close test for extracted boundary, and correct the incomplete boundary by extending the boundary at the breakpoint, it helps to improve the accuracy and credibility of results. (5) Based on the principle of the region growth algorithm and the boundary line extracted from the triangular mesh model, we extract and classify the triangular surface slices within the boundary line partition range, and reconstruct the geometric topology structure of triangular mesh model surface. This method accurately and completely divides the disordered triangular surface in the model, provides convenience for the subsequent analysis operation on the part model, realizes the operability of the part triangular mesh model and provides support for the OMI of mechanical products.

II. RELATED WORK
At present, the triangular mesh model segmentation has developed from the early artificial segmentation to automatic segmentation, researchers have proposed many effective methods. Quirita et al. [8] proposed a special region growth method called multiresolution-region-growing segmentation, which can avoid falling into the local minimum by specifying multiple seed elements of triangular mesh model, but is slow in obtaining the optimal solution. Zhang et al. [5] proposed a 3D shape hierarchical segmentation method, based on the splats similarity measure index, which automatically generates the hierarchical structure of the segmentation region through adaptive clusters. The result shows that segmentation effect of CAD model and the triangular mesh model reconstructed by point cloud is good. Yang et al. [9] proposed a fast mesh segmentation method based on modified region growth algorithm. By detecting the dihedral angle extraction feature lines of the non-boundary edge triangles and make it as boundary constraint for region growth process, the problem of over-segmentation was solved. Venu Bitla et al. [10] developed standard data access interface for high-level surface features such as B spline that preserved as general STEP model files (AP203) to interpret the product model data represented by the STEP AP203 format, and realize the recognition of B spline surface features. Hussein et al. [11] constructed the corresponding function module according to the STEP AP203 format of automobile exterior contour, and realized the recognition and extraction of 11 different kinds of features. Sunil and Pande [12] designed and implemented the feature recognition method for the part surfaces of STL format sheet metal. And a segmentation algorithm based on edge region mixing is proposed, the pretreated STL model is divided into meaningful regions for recognition and classification by the geometric properties on model. Kataraki and Abu Mansor [13] proposed a rule-based method for SAT format files to identify fillet features on parts that represented by B-Rep. Benhabiles et al. [14] proposed a fully automatic mesh segmentation algorithm, using Ada Boost algorithm to train the classifier and using active contour model to obtain smooth segmentation results. Theologou et al. [15] presented a fully automatic mesh segmentation scheme using heterogeneous graphs. They developed an unsupervised spectral framework in which local geometry affinities are coupled with surface patch affinities; the segmentation results were comparable to those of best supervised approaches. Muraleedharan et al. [16] presents a method to identify regions that make up features like holes, slots, pockets as well as interacting features in a three-dimensional mesh of a CAD model. Clustering-based decomposition or extraction of feature lines by solid or curvature values are used in most feature recognition methods. The proposed algorithm identifies the features using contours generated by random cutting planes, followed by graph traversals and without using threshold values. The algorithm can identify blind holes, through holes, slots and pockets. The geometry of most of the extracted features has also been identified using Gauss map. Tao Pin et al. [17] designed a method to decompose the model into several parts with the hints from bottom faces, concave vertexes and concave edges, etc. And also a coding algorithm based on the face relation matrix (FRM) was given to translate the topology data of a part into the vector, which can be proceeded by the neural networks. Katz et al. [18] proposes a novel hierarchical mesh segmentation algorithm, which is based on new methods for prominent feature point and core extraction. First, it is invariant both to the pose of the model and to different proportions between the model's components. Second, it produces correct hierarchical segmentations of meshes, both in the coarse levels of the hierarchy and in the fine levels, where tiny segments are extracted. Finally, the boundaries between the segments go along the natural seams of the models. Hoffman et al. [19] proposed a theory on human visual perception object recognition, in which a rule called minimum rule was introduced for dividing surfaces into parts. The minimum rule suggests dividing an object into parts of each negative minimum point of the principal curvature according to the transverse principle: forming a concave crease at the intersection of two three-dimensional shapes. Au et al. [20] proposed a framework extraction method based on mesh shrinkage to contract the mesh to skeleton shape by implicit Laplacian smoothing with global position constraints and provide a regional reference for mesh segmentation. Zhang et al. [21] used spectral clustering-based mesh segmentation as segmentation initialization method to construct a new Laplace matrix, which can reflect more semantic information than classical Laplace matrix and provide good initial segmentation results for subsequent accurate segmentation. Wu et al. [22] improved the traditional spectral clustering method to construct a similarity matrix of shape descriptors, use it to generate good segmentation results by performing spectral clustering in the fusion space of shape descriptors.
Overall, the research results mentioned above provide some effective methods for mesh model of non-mechanical parts. However, unlike the usual model mesh division, the actual mechanical parts have clear geometric boundaries. The mesh division process is actually to accurately search the existing boundaries, while the usual mesh model does not have clear boundaries to generate eligible boundary according to specific requirements. On the other hand, some existing algorithms are related to machine learning, and there is a defect that the training time is too long to adapt to the efficient mechanical production environment.

III. OVERVIEW
In this paper, a surface partition method of part grid model with Gaussian curvature, hierarchical clustering and region growth is proposed. First we calculated the Gaussian curvature of all coordinate points in the grid model. Second we use hierarchical clustering to calculate the curvature threshold of boundary points, then the boundary line is constructed for the extracted boundary points, and the angle between the three corners of the boundary line is calculated. After that we calculated the angle threshold of boundary by the maximum entropy threshold method, the extracted boundary is then closed tested. At last, the triangular slices in each boundary are classified by region growth algorithm, and the mesh model surface partition is completed. Overall process is shown in Fig 1. 1) Temporary boundary point extraction for part mesh model. The first step of this method is to extract all the coordinate points that can form the boundary on the mesh model of part, so we need to calculate the curvature value of each coordinate point. According to the Gauss-Bonnet method, the Gaussian curvature at any discrete coordinate points on the mesh model can be estimated [23]. By using the two-dimensional maximum entropy threshold method, these curvature can be aggregated into two data sets with obvious differences, in which the temporary boundary points within the set with larger curvature can be constructed as boundary lines. 2) Construction and extraction of boundary lines. According to the temporary boundary points, each temporary boundary line is the common edge of two triangular mesh. All these angle distribution relations can be obtained by calculating the angle between two triangular mesh. The maximum between-class variance method is used to divide the angle value into two categories, so the boundary line on the part mesh model can be extracted from the temporary boundary line. 3) Close test of the boundary line. Sometimes the extracted boundary line is unclosed, so the boundary line needs a close test. According to the characteristic of loop that often exists on the part boundary, and refer to the concept of ant colony algorithm, the search situation of each boundary is recorded by constructing a boundary loop matrix. For the boundary vector in the matrix, if the loop cannot be formed during searching, it is necessary to implement the broad priority traverse from breakpoint to find the corresponding breakpoint and complete the patch of unclosed boundary. 4) Acquisition of the triangle mesh within the boundary.
When the boundary search is completed, we begin to classify triangular mesh within each boundary. The triangular mesh is randomly selected from the part mesh model and continuously expanded according to the region growth algorithm. In this process, we judge whether the newly added triangular mesh reaches the boundary, and then traverse all the triangular mesh on the part to complete the classification of surface mesh.

IV. BOUNDARY LINE EXTRACTION OF PART MESH MODEL BASED ON HIERARCHICAL CLUSTERING A. ESTIMATION OF GAUSSIAN CURVATURE IN COORDINATE POINTS
The curvature is the key parameter to reflect the bending degree of geometric surface. According to the related concept of differential geometry, for a point P on surface S, we call the two eigenvalues k 1 and k 2 of Weingarten transform on P point as the main curvature of surface S at P point, then we have the curvature K = k 1 k 2 . According to the analysis of Princeton Segmentation Benchmark (PSB) mesh model, the curvature of the model boundary is often larger than the non-boundary region [24]. Therefore, it is important to consider the Gaussian curvature value of coordinate points in the process of extracting boundary points, which can be used as a reference for dividing boundary and non-boundary.
When a part mesh model is acquired, the boundary point curvature threshold is defined as K TH , if the coordinate point curvature is greater than the threshold, the point is extracted as a boundary candidate. The vertex Gaussian curvature estimation of the triangular mesh model includes the position relation of the triangular plane slice in its first order neighborhood, that is, the vertex and its one-dimensional neighborhood vertex coordinates. As shown in Fig.2, we define v i , v j and v j+1 as the vertex of triangle mesh T , and define the angle between edge v i v j and v j v j+1 as ϕ i , define the angle between edge v i v j+1 and v j v j+1 as i . By the Gauss-Bonnet formula we can infer that represents the region area that neighborhood triangle mesh of vertex v i corresponding to, θ k represents the angle between vertex v i and k-th triangle mesh of vertex v i neighborhood. A(v i ) can be represent as follow where S vi represents the Voronoi diagram area (which are marked in gray in Fig.2) vertex v i neighborhood, the value of S vi based on rule as follow [25] S As shown in Fig.2(c), we use vertex v as example, the Gaussian curvature of this vertex can be estimate as follow There are a large number of coordinate points on part mesh model, and only some of them are located on the boundary of part, so it is necessary to analyze the Gaussian curvature of each vertex and extract the coordinate points belonging to the boundary. It can be seen from the above that the Gaussian curvature of all coordinate points are one-dimensional data, then we use the two-dimensional maximum entropy threshold segmentation to divide the curvature data into two categories, which contains the coordinate points that can form the boundary and cannot form the boundary. During the segmentation of part mesh model, it needs a threshold to divide the curvature data. We defined m as the quantity of coordinate points on model, set G S = {K G (v 1 ), K G (v 2 ), . . ., K G (v m )} included the curvature value of all coordinate points, max(K G ) and min(K G ) represents the maximum curvature and minimum curvature. For making the subsequent calculation easier, we divided the G S into several interval, and set parameter int as the quantity of interval, parameter stp as the step, then we have so the curvature grade can be classified as F = [min(K G ), min(K G )+ stp, . . ., min(K G )+(int-1)stp, max(K G )]. Taking the neighborhood average curvature grade A G (v i ) as curvature K G (v i ), and we have where D represents the point set, elements within it are all adjoin the current coordinate point, d represents the quantity of coordinate points in D. We defined K F (v i ) as the corresponding curvature grade of and define the two-dimensional histogram p(i, j) = r(i, j) / m as shown in Fig.3 Assume the probability of non-boundary curvature and boundary curvature are ω 0 (t, s) and ω 1 (t, s), shown as follows mean value of curvature grade are µ 0i (t, s)/ω 0 (t, s), shown as follows variance σ 2 0i (t, s), σ 2 0j (t, s), σ 2 1i (t, s), σ 2 1j (t, s) are shown as follows then we have the selection criterion function of 2D vertical segmentation threshold based on intra-class variance and area deviation between boundary curvature and non-boundary curvature ω 0 (t, s) σ 2 0i (t, s) + σ 2 0j (t, s) To maximize the value of the criterion function, the curvature grade K F (v i ) corresponding to the parameter (t, s) is the obtained curvature partition threshold. The boundary point set C B and the non-boundary point set obtained according to the threshold C NB will be taken as the preliminary extraction result of the boundary from part model and further refined in the subsequent analysis.

C. MODEL BOUNDARY LINE EXTRACTION AND OPTIMIZATION
Some coordinate points that cannot construct the boundary line may exist in boundary point set C B , which needs to be extracted. For the triangular mesh model of any part, if there is a straight line connection between the two coordinate points, then the two coordinate points must be located on the same triangle. The data format of the mesh model contains three vertices of each triangular mesh, so it is easy to obtain all the coordinate points connected with a particular point on the model, and we constructed the adjacency matrix M AD of the boundary point set C B , as follows where n represents the element quantity in point set C B , a ij represents the adjacency relation between i-th coordinate point and j-th coordinate. Taking a ij = 1 represents there is adjacency relation between two coordinate points (which means the two coordinate points can be linked by a straight line), a ij = 0 represents there is no adjacency relation between two coordinate points, and we defined each coordinate point is not adjacent to itself, which is [a 11 , a 22 , . . ., a nn ]=0.

1) MODEL BOUNDARY LINE EXTRACTION BASED ON MAXIMUM BETWEEN-CLUSTER VARIANCE
According to the adjacency matrix M AD , all lines between points can be extracted from the point set C B . For any two coordinate points Q a and Q b in C B with adjacency relation, assume a set L S represents the straight line connecting them, then we have L S ={Q a , Q b }. Let L A be a set of all lines in C B , then there are L A ={L S1 , L S2 , . . ., L Sn }. According to the STL format data of mesh model, it can be quickly found out any two triangle a and b within L A that share a same line, meanwhile the vector v a and v b of the triangles can be obtained, so the angle θ ab between two triangles is as follow On the basis of adjacency matrix M AD , the angle matrix M θ of vector can be constructed, it is about the angle of the triangles that share a same edge (co-edge triangle). According to those elements in M AD with its value equals 1, it can be quickly calculated all angles of co-edge triangle. For those elements in M AD with value 0, the value of their angle θ is -1, as shown in formula 13 where n represents the quantity of elements in line set L A , θ ij represents the angle of the triangular mesh which simultaneously contains the i-th and j-th coordinates. When extracting the boundary line, it needs to be distinguished by the angle threshold, in this paper, the Maximum Betweencluster Variance [26] is used to analyze the angle threshold. We defined m as the quantity of elements that angle value between vectors is not equals -1, set θ S represents the non-negative angle value in the matrix M θ , max(θ S ) and min(θ S ) represent the maximum angle and the minimum angle in the θ S . To facilitate the subsequent calculation, we divided the angle in θ S into several intervals, and the step size of the angle division is stp, so we have the angle grade of M θ can be classified as [min(θ S ), min(θ S )+stp, . . ., min(θ S ) + (m-1)stp, max(θ S )]. We defined L θ as the threshold of angles, for extracting the boundary line on mesh model, we created set θ NB and set θ B to represent non-boundary angle set and boundary angle set. The probability for each set is as follows where p j represents the probability of j-th angle. The average angel of each interval is so the between-cluster variance, intra-class variance and total variance are shown as follows  Because the total variance is constant, choosing the appropriate L θ makes δ 2 B (L θ ) to the maximum, at this time, the threshold L θ of the maximum inter-class variance is the standard for extracting the boundary line, the boundary line is the common edge of the triangle surface.

2) BOUNDARY CLOSE TEST
The boundary extracted according to the above method may have the condition that boundary is not closed, so it is necessary to do the boundary close test. The eligible coordinate pairs in M θ are extracted according to the angle threshold L θ to form a set of boundary lines as The b i and b j represent the endpoint coordinates of a straight line, b represents the set of all coordinate points that meet the conditions. Some of these boundaries do not have branches on the endpoint for the set L b , and for this class of boundary elements it can be merged into a branchless element, as shown in Fig 4. All points in the figure are boundary points, and the inspection process is as follows Step 1 Select the starting boundary: As shown in Fig.4(a) 1 , b 2 , b 3 ), b 1 and b 3 are the index for subsequent test.
Step 2 Process the boundary branch: Generally, a small segment of boundary on the part surface is in a boundary loop, many of which together form the geometric boundary of part. In this process, the same segment boundary may be shared by multiple loops, so it cannot be used as a condition when judging the boundary closure, it needs to be analyzed for the minimized loop. As shown in Fig.4(c), a branch appears on boundary b 1 b 3 at point b 3 , line b 3 b 4 and b 3 b 6 are all boundaries. We defined the boundary matrix B M for part mesh model, as shown in Fig.5, the initial boundary vector B M 1 includes one boundary formed by three coordinate points, when a branch generated at b 3 , two new boundaries b 3 b 4 and b 3 b 6 that begin with b 3 become new boundary vectors (the empty parts fulfilled by 0), meanwhile B M 1 extends itself to b 4 and b 6 , the matrix updated to B M 2 , each row in B M 2 represents a boundary.
Step 3 Process of duplicate paths: After each boundary in the matrix B M 2 continues to extend, the matrix is updated to B M 3 , it can be seen that there are two pairs of identical boundary vectors in the updated matrix, as shown in Fig 5. The first value of 0 indicates that the vector is derived from branch point splitting, such as [0, 0, 0, b 6 , b 8 ] indicates the boundary that starting point is b 6 and is currently tested to b 8 . For all the boundary vectors with first element value is 0, when the first and second non-zero elements are equal, the boundary vectors have equal relations, that is, representing the same boundary, and the repeated vectors can be deleted at this time.
Step 4 Boundary loop close judgment: Following the steps above to traverse the boundary set L b and update the boundary matrix B M , as B M 3 and B M 4 in Fig 5. When the newly added boundary point of any current boundary vector is the same  as its initial boundary point, it indicates that the boundary has formed a closed loop. In the subsequent update of the boundary matrix, the boundary vector can only be supplemented with 0. Assume that the matrix dimension is m × n after updating, if the n-th column elements value are all 0, then all the boundaries are traversed and no new boundaries are added.
In the above test, there may have some boundary breakpoints, which means a boundary missing in the place where there should be a boundary, so it needs to be searched out from the breakpoint along the edge of the adjacent triangular plane until the connection with the known boundary is established. The search at the breakpoint is actually a screening of all possible boundaries, which is gradually extended by analyzing the similarity between the breakpoint and the angle of triangle mesh on each boundary connected with the breakpoint, until the connection with the known boundary is established. Specific steps are as follows Step 1 Correlation boundary selection: As shown in Fig.6(a), taking point c 2 as the breakpoint, the searching starts from boundary c 1 c 2 , the other breakpoint is c 5 . According to part mesh model data we can acquire the coordinate point set V c2 that all points adjacent to c 2 , and its corresponding edge (those yellow lines in Fig.5a) set is E c2 , each edge in E c2 is shared by two adjacent triangle mesh, then we can get a vector pair (v i , v j ) to represents the two adjacent triangle VOLUME 8, 2020 mesh and calculate its angle θ ij < v i , v j >. Assume that vector pair angle of boundary c 1 c 2 is θ 12 and create a vector pair angle set θ c2 for all vectors in E c2 , then the element that most similar to θ 12 in θ c2 is the next point which current breakpoint extend to, as the newly added edge c 2 c 3 shown in Fig.6(b). Meanwhile the breakpoint transfer to c 3 and next search start from new breakpoint c 3 .
Step 2 Boundary breakpoint update: Repeat the Step 1 to gradually search out the missing boundary, as shown in Fig. 6(c), while updating the boundary matrix and boundary vector where the breakpoint is located.
Step 3 Boundary search endpoint judgment: As shown in Fig 6(d), as the search process continues, the set V c4 that all coordinate point adjacent to the current breakpoint c 4 contains the known breakpoint c 5 , indicating that the current incomplete boundary has been completed and the new boundary vector added to boundary matrix B M is (c 2 , c 3 , c 4 , c 5 ).

V. CLASSIFICATION OF TRIANGLE MESH WITHIN BOUNDARY BASED ON REGION GROWTH ALGORITHM
The boundary of part mesh model can be obtained by the method mentioned above, then according to the boundary we classified the triangle mesh on the model surface into the region it belongs to complete the segmentation of mesh model surface. The triangle mesh on mesh model only contains adjacent relations, so during division process we refer to region growth algorithm, by selecting the initial triangle mesh as the seed to gradually pick out all the mesh within the current boundary. The steps are as follows: Step 1 Initial seed mesh selection: As shown in Fig.7(a), select a triangle mesh T 1 on part model randomly. Assume that the boundary of T 1 is (Q 1 , Q 2 , Q 3 , Q 4 ), set Q S includes all points on boundary, set T Qs includes all mesh within boundary and its initial status is empty, the vertex on k-th triangle mesh T k stored in set Q Tk . For triangle mesh T 1 , if the selected triangle mesh shares an edge with it, then this triangle mesh can be added to Q Tk , the rule is as follow Step 2 Position determination of triangle mesh: For a triangle mesh in the direction of growth, it is necessary to judge whether the triangle mesh is located within the boundary Q S .  Fig 7(c) shows that a vertex on mesh T 7 is coincide with boundary points, but it can still extend to mesh T 9 and T 10 . For mesh T 10 , it has two vertexes in set Q S , so it cannot extend in the direction formed by these two points. On the other hand, as shown in Fig 7(e), though T 14 has two vertexes coincide with boundary points, it can still extend to the mesh T 16 in the corner, at this time, all vertexes on T 16 are coincide with boundary. Assume that triangle mesh T c is the current mesh in Q S , for any adjacent triangle mesh T k , if it satisfied the following rules then T k should not add to Q Tk .
Step 2 Process for repeated triangle mesh: Repeat the above steps to finish triangle mesh classification, some of the mesh may be added repeatedly during the process, as T 12 in Fig.7(c), it can be retrieved by T 5 and T 8 . To prevent repeated additions, make the following judgment whenever a new triangle is added during growth if the coordinate point in Q Tk that doesn't belong to T Qs , it means Q Tk can be added into T Qs as a new triangle mesh, otherwise it means that Q Tk has been retrieved and will not be added into T Qs .

VI. EXPERIMENTAL TESTS AND RESULTS ANALYSIS
To verify the effectiveness of the method, the verification model selected in this paper comes from the actual production process in mechanical field, some of which contain obvious boundaries, others contain non-obvious boundaries such as rounded corners, transition edges, etc. As shown in Fig.8, the number of triangular slices contained in each instance varies from thousands to tens of thousands. In order to make the final partition more obvious, the area is marked with different colors.
Reference [27] also processed the model by extracting the boundary, so it is used to compare with the method in this paper, the segmentation results of the model are shown in Fig.9, in order to reflect the final partition results, the surface of mesh model in the figure is labeled with different colors in different regions. In contrast, the method in this paper has a better effect on the segmentation results. As shown in the figure, in some parts of the model where the boundaries are more compact, this method obtains more realistic segmentation results, similarly, in some transition regions, the boundary separated by this method is smoother. It can be seen from the figure, the results of Ref. 27      Most of the current mesh segmentation methods involve machine learning theory, which aims to obtain satisfactory segmentation results by using existing intelligent algorithms to train a large number of models, which contains two mainstream ways: supervised training and unsupervised training. Therefore, this paper combines four commonly used machine learning models for test comparison, including three supervised learning algorithms: ELM [28], JointBoost (JB) [29], Projective Convolutional Networks (PCN) [30] and an unsupervised learning algorithm Spectral Clustering (SC) [31]. The operation processing time of each algorithm is shown in Fig.10, it can be seen that our method has advantages in processing time, and the average processing time is low. The computation time of five algorithms in the process of processing part mesh model is shown in Table.2. The average time used in each method in model segmentation is: 12.73s (JointBoost), 17.92s (Project Convolutional Network), 14.82s (ELM), 9.24s (Spectral Clustering) and 8.51s (This Paper). Obviously, compared with other machine learning based algorithms, the method in this paper, although the processing efficiency is not optimal in individual cases, has some advantages in general. Of the four algorithms compared, the average time consumed by Projective Convolutional Network is 17.92s, 2.1 times the average processing time of our algorithm, Spectral Clustering is close to our method in processing speed and 1.08 times the average processing time of our algorithm.
On the other hand, in the quality of part model segmentation, we also made a comparison in this paper. For the examples used for analysis, we give the standard segmentation results by manual division, first we numbered each triangle mesh, then manually classify the triangle mesh in each boundary area. By dividing and classifying the numbered part model with the algorithm mentioned in this paper, comparing the achieved results with manual segmentation, calculating the number of triangular mesh on each model located in the correct region, and expressing the accuracy of each method segmentation result by the results similarity, then we obtained the results as shown in Fig.11. It can be seen from the diagram that the method in this paper has some advantages in the accuracy of part mesh model segmentation, and when the model is relatively simple, the results of each algorithm segmentation have little difference, and they all have high accuracy.

VII. CONCLUSION
In this paper, a surface segmentation method of part mesh model for On-Machine Inspection is proposed, which aims to solve the problem that the geometric and topological information cannot be obtained when using the mesh model in the network environment. Based on the discrete curvature of each coordinate point on the part mesh model, this paper researched the characteristics of curvature distribution on the mesh model to screen the boundary points on the model, explores the extraction method of the model boundary line based on the maximum between-cluster variance, established the boundary matrix to describe the properties of each boundary on the model, and proposed a test method for boundary closure. Finally, the classification algorithm of the mesh surface in the boundary line is studied with the theory of region growth.
In the future work, we will aimed at the shortcomings of our method and try to improve it, starting from the following aspects. First, try to improve the threshold segmentation to achieve better and faster deviation of coordinate curvature values and model boundary lines, it helps to improve the accuracy of the final results. Secondly, we will study better boundary inspection methods, expand the scope for the usage of this method and enhance the rationality of the test results to obtain more realistic boundaries. Finally, we will study the efficient and fast classification method for large-scale model and large-volume mesh model in order to improve the processing efficiency.