Measurement point layout strategy of free-form surface based on gridding using coordinate measuring machine

. The layout of measurement points is the key to the ef ﬁ cient inspection of free-form surfaces. Two algorithms are proposed for the layout of free-form surface measurement points: the free-form surface Gaussian curvature variation grid method and the isoparametric line curvature variation grid method. The former ﬁ rst divides the free-form surface into a uniform grid, determines the number of measurement points for each grid based on the change in the Gaussian curvature of each grid, and selects points within each grid based on a uniform distribution of the Gaussian curvature. The latter is achieved by ﬁ rst taking points from the curvature change on the initial U-and V -direction isoparametric lines, generating isoparametric lines from the points to divide the free-form surface into a grid, and selecting the grid intersections as measurement points. The effectiveness of the algorithm was veri ﬁ ed by designing free-form surfaces, performing coordinate measuring machine (CMM) measurement experiments, and comparing the results with those of existing algorithms.


Introduction
Free-form surface parts are widely used in modern industry. The key to the efficient inspection of free-form surfaces is the layout of the measurement points, which can reflect the quality of free-form surface machining. The inspection efficiency can be improved by reducing the number of measurement points and by rationally selecting their locations. Obeidat [1] proposed surface binning by using parametric vector nodes for nonuniform rational B-spline (NURBS) surfaces and sampling the measurement points based on the areas of the surface slices. However, this method only provides rules for the distribution of some of the measurement points. Li [2] optimized the measurement point layout by building a local uncertainty model to predict the number and locations of sampling points and applying algebraic theory. Zhang [3] investigated the sampling parameters and concluded that the smaller the probe diameter of the coordinate measuring machine (CMM) is, the more the measurement results reflect the true machining quality of the free-form surface. Wong [4] applied the Halton sequence to the free-form surface measurement point layout, but the method could not achieve adaptive point placement. Zhang [5] applied the object center-of-mass principle to free-surface adaptive pointing and derived a distribution function relating the measured points and curvature to realize free-surface adaptive pointing. Wen [6] used a random Hamersley sequence for the free-form surface measurement point layout, but the method could not achieve adaptive point placement. Guo [7] used three algorithms, a backpropagation (BP) neural network, a radial basis function (RBF) neural network, and a general regression (GR) neural network, to construct the measurement point density model for the free-form triangular grid model and uniformly laid the points based on the measurement point density. Yan [8] proposed to divide the free-form surface into triangular meshes and determine new measurement points based on the curvature of each triangular mesh vertex.
Various scholars have studied the layouts of measurement points for curves on free-form surfaces. He [9] converted free-form surface sampling into the sampling of multiple curves. Parametric expressions of the curves were obtained by the B-spline interpolation algorithm, and the sampling points were selected according to the curvature magnitude. However, the method was randomly selected for multiple initial curves, and the relationship between the curvature and the number of sampling points was not analyzed, which was not conducive to streamlining the number of sampling points. Ainsworth [10] proposed a subdivision sampling method based on the uniform sampling method to obtain the initial sampling points and determine whether the arc length line segment formed by two adjacent sampling points met the accuracy requirements. If they did not, then new sampling points were added in the middle of the two points until the accuracy requirements were met. This method was not efficient and did not determine the number of initial sampling points. Mansour [11] proposed to divide the curve into multiple segments with the help of the "surface-linepoint" idea. Each segment was fitted with a cubic polynomial curve, and the coefficients of the cubic polynomial curve were determined by the least squares method. Then, the minimum number of points required for each segment of the cubic polynomial curve was determined, and the number of points required for each segment was the number of measurement points of the curve. Zhang [12] made the two-dimensional curve placement method equally applicable to spatial curves by introducing the deflection rate and achieved adaptive placement of freeform surfaces.
Some scholars studied the error distribution between the original surface and the fitted surface to realize the freeform surface measurement point layout. Kamrani [13] researched the feature extraction of free-form surface computer-aided design (CAD) models by adding random errors to obtain the actual measurement points and determined the number of sampling points from the maximum error between the fitted surface obtained from the measurement points and the free-form surface CAD model. ElKott [14][15][16] proposed parametric line sampling at the location of maximum mean curvature change on the original surface and at the maximum normal error between the alternative surface and the original surface until the accuracy requirement was achieved, but free-form surface features were not considered. Zahmati [17] used a particle swarm algorithm to determine the measurement point layout of the surface, treating the initial measurement points as a particle swarm and the deviation between the reconstructed surface and the theoretical surface as the objective function to achieve the measurement point distribution by iteration. Yu [18] used surface boundary measurement points to fit the surface, compared the errors between the fitted surface and the original surface, and added measurement points at the location of maximum error until the sampling accuracy requirement was satisfied. However, the relationship between the maximum error and the number of measurement points was not given, and more iterations were needed to satisfy the sampling accuracy requirement.
In this work, the layout of measurement points for freeform surfaces was determined based on the idea of surface partitioning combined with information about the freeform surface features to ensure that the measurement points were mostly distributed in the area where the error of the free-form surface may be large. The sparsity of the measurement points could reflect the shape information of the surface. Two algorithms are proposed: the free-form surface Gaussian curvature variation grid method and the isoparametric line curvature variation grid method. There are three basic elements of free-form curvature: principal curvature, mean curvature, and Gaussian curvature. The principal curvature consists of the maximum normal curvature and the minimum normal curvature, and it satisfies the following equation [19]: where k n denotes the normal curvature, S 0 u and S 0 v denote the first-order partial derivatives of the surface in the uand v-directions, S 00 u and S 00 v denote the second-order partial derivatives of the surface in the uand v-directions, and S 00 uv denotes the second-order mixed partial derivatives of the surface in the uand v-directions. k max and k min are the two roots of equation (1). n is the unit normal vector, and the calculation satisfies the following equation: The Gaussian curvature K is the product of the maximum normal curvature and the minimum normal curvature: where E, F, and G are the first fundamental invariants of the surface, and L, N, and M are the second fundamental invariants of the surface, defined as follows: The Gaussian curvature, also known as the total curvature, reflects the total degree of curvature at a point on a surface. In an actual machining process, the greater the variation in the free-form curvature is, the greater the machining error is. Therefore, the number of measurement points is allocated based on the variation of the Gaussian curvature in each region of the free-form surface, so that most points are located in the region where the variation in the free-form curvature is large. The flow of the free-form Gaussian curvature variation grid method is shown in Figure 1, with the following steps.
-Divide the free-form surface into a uniform grid based on the parameters u and v. Number the grid and set the total number of experimental measurement points N.
-Select an appropriate number of uniformly distributed points in each grid, with the same number in each.
Calculate the Gaussian curvature of each point. Maximum Gaussian curvature point minus minimum Gaussian curvature point to obtain the Gaussian curvature variation value DG i of grid i. -From the magnitude of the Gaussian curvature change of each grid, assign an integer number of measurement points. The calculation of the number of measurement points for each grid satisfies the following equation: where n is the number of divided grids, and A i is the number of measurement points of grid i. A is rounded to an integer, so that the total X n i¼1 DG i of the measuring points allocated by each grid at the end is consistent with N.
-Determine the location of each grid measurement point by a uniform distribution of the Gaussian curvature. The steps are as follows: (a) Rank the points in step 2 from largest to smallest in terms of the absolute value of the Gaussian curvature.
(b) Calculate the difference D d i as follows: (c) Select the point with the largest absolute value of the Gaussian curvature as the initial point, and ensure that the difference of the Gaussian curvatures between two adjacent points is b or close to b. Continue the cycle until the number of points to be taken reaches the number of grid measurement points.
-Output the measurement point set.

Example of free-form measurement point layout
Two free-form surfaces, A and B, were constructed, and the points were laid out according to the free-form surface Gaussian curvature variation grid method. First, the freeform surface was uniformly divided into 16 grids and numbered. Second, three groups of experiments were established, and the total numbers of experimental measurement points were 256, 512, and 1024. According to step 2 of the algorithm, the Gaussian curvature change of each grid of the free-form surface was obtained, as shown in Figure 2. The number of measuring points was selected as 256, and according to step 3 of the algorithm, the number of measuring points distributed on grid No. 2 of the free-form surface was determined, as shown in Table 1. Similarly, the number of measuring points of each grid on the free-form surface is shown in Figure 3. The number of measurement points for each grid was multiplied by the corresponding multiplier to obtain the distribution of the number of measurement points in groups of 512 and 1024. According to step 4, the number of measuring points is 512 as an example, the distributions of measurement points for each grid of the free-form surfaces A and B are shown in   The adaptive point layout of the free-form surface should be such that as many points as possible are distributed at locations where the curvature of the free-form surface is greater and fewer points are distributed at locations where the curvature changes more gently [11,14]. Therefore, the free-form surface is divided into several grid regions based on the curvature variations of the parametric lines in the Uand V-directions, and the spacing of each grid region is ensured to match the curvature variation of the free-form surface. On this basis, the intersection points of each grid are selected so that the measurement points can be effectively distributed more at locations where the curvature of the free-form surface varies greatly. The flowchart of the isoparametric line curvature variation-based grid method is shown in Figure 7. The specific steps are as follows: -Select a large number of points on the free-form surface, calculate the Gaussian curvature of each point, select the point with the largest absolute value of the Gaussian curvature as the initial point, and generate two initial isoparametric lines in the Uand V-directions of the freeform surface from this initial point. -Set the number of points to be taken for each isoparametric line, and obtain the curvature value distribution for each isoparametric line by UG software calculations.     -Based on the points on two isoparametric lines, perform the free-form surface gridding by forming isoparametric lines. -Select the grid intersection as the total measuring point of the free-form surface.

Example of free-form measurement point layout
The free-form surfaces A and B were examined again. Two initial isoparametric lines of U and V were first generated from the point with the largest absolute value of the Gaussian curvature of the free-form surface. The number of points taken from the isoparametric line of free-form surface A was 16, and the number of points taken from the isoparametric line of free-form surface B was 18 (taking into account the actual part size). Then the points taken from the isoparametric line of each free-form surface U and V were obtained by steps 2 and 3 of the algorithm, as shown in Figure 8.
Step 4 of the algorithm was used to determine the free-form surface grid area division. The final selection of each grid intersection point is shown in Figure 9.

Experimental validation
CMMs have an unmatched advantage for dimensional inspection [20]. To verify the effectiveness of the two algorithms, a CMM was used to test the free-form parts.
The inspection experiments were performed on a Hexagon Leitz Reference HP CMM (PC-DMIS software, maximum permissible error of indication of the CMM for size measurements (MPE E ) = 0.9 + L/400 mm) manufactured in Germany, with a selected ball diameter of 5 mm, positioning and retraction distance of 3 mm, moving speed of 20 mm/s, and touch and retraction speed of 2 mm/s. Free-form surface parts A and B were machined on a CNC machine. The CMM inspection process is shown in Figure 10.

Free-form surface Gaussian curvature variation grid method experiment
For free-form surface A and free-form surface B, 256, 512, and 1024 measurement points were arranged using the equal-step method and the Halton sequence method  Figures 11-16. With the increase in the number of measurement points, the normal error obtained from the inspection was larger and reflected the machining quality of the free-form surface more accurately. From Figure 11, it can be seen that when the number of measurement points of free-surface A was 256, the maximum normal error obtained by the free-form surface Gaussian curvature variation grid method was 0.00279 mm larger than that obtained by the Halton sequence method and 0.01098 mm larger than that obtained by the equalstep method. The average normal error obtained by the free-form Gaussian curvature variation grid method was 0.00129 mm larger than that obtained by the Halton sequence method and 0.0019 mm larger than that obtained by the equal-step method. From Figure 12, it can be seen that when the number of measurement points of free-surface A was 512, the maximum normal error obtained by the free-form surface Gaussian curvature variation grid method was 0.00273 mm larger than that obtained by the Halton sequence method and 0.00895 mm larger than that obtained by the equalstep method. The average normal error obtained by the free-form Gaussian curvature variation grid method was 0.00119 mm larger than that obtained by the Halton sequence method and 0.00156 mm larger than that obtained by the equal-step method. From Figure 13, it can be seen that when the number of measurement points of free-surface A was 1024, the maximum normal error obtained by the free-form surface Gaussian curvature variation grid method was 0.00187 mm larger than that obtained by the Halton sequence method and 0.00303 mm larger than that obtained by the equal-step method. The average normal error obtained by the free-form Gaussian curvature variation grid method was 0.00225 mm larger than that obtained by the Halton sequence method and 0.00236 mm larger than that obtained by the equal-step method.
From Figures 14-16, it can also be seen that free-form surface B can be inspected using the free-form Gaussian curvature variation grid method to obtain larger normal and average normal errors. The experimental results showed that the free-surface Gaussian curvature variation grid method could measure the locations where the freesurface machining errors were large, and more measurement points were added at locations where the surface machining errors were large.

Isoparametric line curvature variation grid method experiments
The equal-step method and the Halton sequence method were used to arrange 256 measurement points for free-form surface A, and 324 measurement points were used for freeform surface B, while the inspection was performed using a CMM as a comparison experiment. To better compare the maximum normal errors, the normal error values obtained using the three methods of detection were sorted, and the average normal error was calculated by taking the absolute value first and then the mean value. The results are shown in Figures 17 and 18. From Figure 17, it can be seen that when the number of measurement points of free-surface A was 256, the maximum normal error obtained by the isoparametric line curvature variation grid method was 0.00106 mm larger than that obtained by the Halton sequence method and 0.00925 mm larger than that obtained by the equal-step method. The average normal error obtained by the isoparametric line curvature variation grid method was 0.0002 mm larger than that obtained by the Halton sequence method and 0.00081 mm larger than that obtained by the equal-step method.
From Figure 18, it can be seen that when the number of measurement points of free-surface B was 324, the maximum normal error obtained by the isoparametric line curvature variation grid method was 0.00033 mm larger than that obtained by the Halton sequence method and 0.00723 mm larger than that obtained by the equal-step method. The average normal error obtained by the isoparametric line curvature variation grid method was 0.00012 mm larger than that obtained by the Halton sequence method and 0.00034 mm larger than that obtained by the equal-step method.

Comparison of two algorithms
Based on Figures 11 and 17, with the same number of measurement points and the same free-surface conditions, the free-surface Gaussian curvature variation grid method obtained a maximum normal error that was 0.00173 mm larger and an average normal error that was 0.00109 mm larger than that of the isoparametric line curvature variation grid method. From the comparison of the results, the maximum normal error and the average normal error obtained by the free-form Gaussian curvature variation grid method were larger than those obtained by the isoparametric line curvature variation grid method, which indicated that the distribution of measurement point locations obtained by the free-form Gaussian curvature variation grid method was more reasonable.

Conclusion
Aiming at the layout of measuring points on free-form surfaces, this paper proposes two algorithms: the Gaussian curvature variation grid method and the isoparametric line curvature variation grid method. These algorithms take into account the properties of Gaussian curvature on free-form surfaces and the curvature properties along isoperimetric lines, as well as the shape characteristics of the surfaces themselves. As a result, the measurement points are primarily distributed in areas where significant changes occur in the free-form surfaces. Through CMM measurement experiments, the two algorithms were found to obtain the maximum normal directions. The errors and the average normal errors were larger than those of the equal-step method and the Halton sequence method. This verification demonstrates the effectiveness of both algorithms in identifying the positions of significant machining errors in free-form surface parts. Consequently, employing these algorithms not only reduces the inspection time and production costs associated with free-form surface parts but also enhances the accuracy of their inspection, enabling more precise analysis of machining quality issues and offering valuable guidance for achieving higher quality in subsequent production processes.