# High-Precision Extraction of Segment Points of 2D Profiles Based on a Dynamic Grid Method

Authors: Xu Zhang; Haibo Zhang; Liqiang Zhang; Jie Shen
Journal: Mathematical Problems in Engineering
 (2019)

---

## Abstract

In order to improve the reconstruction precision and performance of 2D profiles, this paper presents a new high-precision extraction method of segment points of 2D profile features. Firstly, we extract the intervals which include initial segment points based on the curvature information of data points. Secondly, a grid is dynamically constructed in the interval and all the nodes of the grid are considered as candidate segment points for an optimization process. Thirdly, the optimization model of each feature curve is constructed on the basis of boundary constraints. Selection of the optimal segment point is related to two factors: the number of control points of B-spline and the total approximation error of all collected points to the fitted curves. Numerical experiments were conducted and the results demonstrate the efficacy of our method in capturing design intent and in industrial applications, compared to existing methods.


---

## Body

## 1. Introduction

Reverse reconstruction includes two levels: shape similarity in low level and initial design intent recovery in high level. Shape similarity is applied in some situations which do not need high precision, like toys and culture relic. Initial design intent recovery is applied in other situations where high precision is required, such as turbine blade, class A surface, and skinned surface. 2D profiles are used in many occasions, such as tool profiles [1] and the processing path [2], and reconstruction of 2D profiles is a basis of 3D reconstruction. A comprehensive study on the reconstruction of 2D profiles in high level is vital.In the process of a forward design, by following the requirements of mathematic functions and aesthetics, a sketch is designed by using features (e.g., line, arc, and spline) and satisfying constraints (such as G1 and G2 constraints) at the conjunction of the features. Likewise, in the process of a reverse design, we should try our best to recover the initial design intent: the 2D profile should be reconstructed not only with good precision, but also with the consideration of features and constraints.2D profile curve reconstruction has received extensive studies in literatures. Liu [3] and Park [4] used a set of line segments to reconstruct profile curve. In some other works [5–8], researchers used a single B-spline to reconstruct profile curves. Chen et al. [9] proposed an algorithm that constructed NURBS curves based on letting inflection points be control points. Huang [10] and Tai [11] segmented data points based on their curvature information and then took B-spline curves and boundary continuities into account to get a continuous profile curve. Hashemian et al. [12] presented a new approach for object reconstruction by means of smooth NURBS curves and surfaces. Since these methods did not consider different feature information implied in data points, we cannot capture the initial design intent.In order to enrich the feature information in profile curves, Benko et al. [13, 14] put line segments, circular arcs, and boundary constraints into consideration to reconstruct 2D profiles. Shan [15] also used lines and circular arcs as the features of profile curves, and constraints were satisfied between features. These methods are helpful in capturing the initial design intent, but hard to describe the complicated freeform surface.Ke et al. [16–18] put lines, circular arcs, B-spline curves, and boundary constraints into consideration to reconstruct profile curves. The constrained nonlinear problem was converted into an unconstrained one by using a penalty function method, and then the Levenberg-Marquardt method was employed to get an iterative solution. Zhang et al. [19] also put lines, circular arcs, B-spline curves, and boundary constraints into consideration to reconstruct profile curves. Imani et al. [20] reconstructed profile curves by using the nonuniform rational B-spline (NURBS) curve. This has the advantage that NURBS can express line segment, circular arc, and B-spline curve uniformly. We designate the method of Ke and Imani as the overall reconstruction method (ORM). The basic steps of ORM are (a) extract the initial segment points according to curvature information; (b) segment section data into multiple single-feature data using the initial segment points; (3) fit every single-feature data into a seed curve; and (4) reconstruct all the seed curves with constraints between them iteratively to solve all the parameters. But the extraction precision of the initial segment points affects the initial values of parameters. If the initial values are not good, the ORM is easy to converge to a local optimal solution.Currently, the actual process of reverse design is as follows: (a) extract the initial segment points according to curvature information; (b) segment the section data into multiple single-feature data using the initial segment points as scissors; (c) fit every single-feature data into a feature curve; (d) add a constraint into two adjacent features; and (e) adjust the control points of freeform to get a better solution. We designate this method as the step by step reconstruction method (SSRM, the most commonly used). In the SSRM, the extracted segment points are directly the final segment points, and the extraction precision of segment points directly affects the final reconstruction precision of 2D profiles.The high-precision extraction of segment points is vital to improve the reconstruction precision and quality of 2D profiles, but both the ORM and SSRM did not consider the effects of segment points. Zhang [19] proposed getting better reconstruction quality of 2D profiles through high-precision extraction of segment points. But, only a conjunction between a spline feature and a line feature was considered. In this study, we explore the cases where a spline feature is next to an arc feature. We analyze the effects of segment points on reconstruction precision and quality of 2D profiles below and then propose a solution of high-precision extraction of the segment points.


## 2. Extraction of Segment Points and Its Effects on 2D Profile Reconstruction

Segmentation of section data has received extensive studies in the past. Huang [10] and Tai [11] proposed a segmentation method of section data based on discrete curvature estimation. Imani [20] proposed a concept of relative angles to detect line and arc segments in section data. Extraction precision of the segment points is low in using both methods. We take the curvature estimation method as an example to analyze the extraction error of segment points.


### 2.1. Extracting Initial Segment Points

Given a set of ordered data pointsI=p0,p1,⋯,pm, we can extract initial segment points based on the curvature information of data points, and segment data points form regions each of which is a single feature. We define the discrete curvature of I as K=K0,K1,⋯,Km. Then, the discrete curvature Ki on pi can be defined as curvature of arc that passes through three adjacent points pi-1,pi, and pi+1. As shown in Figure 1 [21],(1)Ki=2Δpi-1pipi+1lili+1li′=sgnΔpi-1pipi+1sin⁡γili′where(2)i=1,2,⋯,m-1,li=pi-pi-1,li′=pi+1-pi-1.Δpi-1pipi+1 is a signed triangular area, when pi-1,pi, and pi+1 run counterclockwise.Figure 1
Estimation of discrete curvature.The segment points are extracted according to the curvature difference or curvature trend. But the extraction precision of segment points is affected by the following factors:( 1 ) Sample errors: since the data is discrete, generally a theoretical segment point cannot be accurately measured; usually the theoretical segment point is between two adjacent data points.( 2 ) System errors: due to measurement error, manufacture error, etc., even if the theoretical segment point is accurately measured, there may be a system error between the measured point and the theoretical segment point.( 3 ) Method errors: curvature estimation is an approximate estimation method of curvature of discrete data; the method itself has an approximation error.In summary, the practical segment point extracted according to curvature estimation likely deviates from the theoretical segment point, and the practical segment point is in a range close to the theoretical segment point.


### 2.2. The Effects of Segment Points on a Line Feature and an Arc Feature

When we segment the section data using a segment point, if the segment point is extracted in low precision, the data near the segment point will probably be segmented incorrectly. For example, the data on a line feature is possible to be wrongly apportioned to a freeform feature. When reconstructing a line feature and an arc feature, the low precision segment point will affect the length of the line feature, the angle of arc feature, and the approximation accuracy of the line and arc features.


### 2.3. The Effects of Segment Points on a Freeform Feature

When reconstructing a freeform feature, the segment point with low precision will affect the freeform feature.The definition of a B-spline curve of degree p is(3)Cu=∑i=0nNi,puPiwhere Pi(i=0,⋯,n) refers to control points and Ni,pu is the degree p B-spline basis functions defined on the nonperiodic (and nonuniform) knot vector: (4)U=0,⋯,0︸p+1,up+1,⋯,um-p-1,1,⋯,1︸p+1m+1knots,Ni,0u=1,ui≤u≤ui+10,otherNi,pu=u-uiui+p-uiNi,p-1u+ui+p+1-uui+p+1-ui+1Ni+1,p-1u.According to the definition of a B-spline curve, the shape of the B-spline curve is determined by control points and a knot vector.Firstly, when reconstructing the B-spline curve, the segment point with low precision will affect the control points of B-spline curve.Take a B-spline curve of degree 3 as an example.C0=N0,30P0=P0 means that the starting point of the B-spline curve is the first control point. And the B-spline curve at the starting point also interpolates at the segment point. Thus, the segment point is just P0. Consequently, the segment point affects the control points of the B-spline curve.Secondly, when reconstructing the B-spline curve, the segment point with low precision will affect the knot vector of the B-spline curve.There are multiple methods available for determining the knot vector, and here we take accumulated-chord method as an example. Take a look at the knot values below. Since the extracted segment point deviates from the theoretical segment point, there is a deviation between the practical knot vector and the theoretical knot vector, as shown in Figure2. The knot vector with a deviation affects the basis function Ni,pu.(5)u~i=∑j=1iLjLu~i′=∑j=1iLj′L′=∑j=1iLj+ΔLL+ΔLwhere L is the accumulated length of chords of the data points and u~i is the knot value of the i-th data point when feature data is segmented by practical segment points. L′ is the accumulated length of chords of the data points and u~i′ is the knot value of the i-th data point when feature data is segmented by theoretical segment points, ΔL=L′-L. Because practice segment points deviate from theoretical segment points, the knot vector is affected, and the basis function Ni,pu is affected as well.Figure 2
Knots comparison of the accumulated-chord method.Consequently, the segment point directly affects the B-spline curve.


### 2.4. The Effects of Segment Points on 3D Models

3D models or surfaces are often reconstructed through extrusion, revolution, and skin from 2D profile curves. Take the skinned surface for example: the skinned surface is skinned through multiple 2D profile curves, and the segment points from different 2D profile curves should be corresponding. If the segment points are extracted in low precision, the skinned surface will be tortuous on the boundary joints of different feature surfaces.


### 2.5. Problem Statement

In summary, the extraction precision of segment points will affect the property of each feature, the whole 2D profile, and further the 3D model. Thus, we focus on improving the extraction precision of segment points. In the reconstruction process of 2D profile curves, the feature classification (including lines, circular arcs, and B-spline curves) andG1 constraints between features are inherited from the literatures [16–18].The rest of this paper is organized as follows. A grid is constructed in the interval (which includes theoretical segment point) extracted according to curvature analysis in Section3. In Section 4, the optimization model of each feature curve is developed with consideration on boundary constraints. Selection of the optimal segment point is related with two factors: the number of control points of B-spline and the total approximation error of all data points to the fitted curve. Thus, we design a search principle of the optimal segment point according to the two factors in Section 5. Section 6 introduces the evaluation indicator of our method, and Section 7 provides a specific algorithm description, followed by some case studies in Section 8. Finally, Section 9 concludes this paper.


## 2.1. Extracting Initial Segment Points

Given a set of ordered data pointsI=p0,p1,⋯,pm, we can extract initial segment points based on the curvature information of data points, and segment data points form regions each of which is a single feature. We define the discrete curvature of I as K=K0,K1,⋯,Km. Then, the discrete curvature Ki on pi can be defined as curvature of arc that passes through three adjacent points pi-1,pi, and pi+1. As shown in Figure 1 [21],(1)Ki=2Δpi-1pipi+1lili+1li′=sgnΔpi-1pipi+1sin⁡γili′where(2)i=1,2,⋯,m-1,li=pi-pi-1,li′=pi+1-pi-1.Δpi-1pipi+1 is a signed triangular area, when pi-1,pi, and pi+1 run counterclockwise.Figure 1
Estimation of discrete curvature.The segment points are extracted according to the curvature difference or curvature trend. But the extraction precision of segment points is affected by the following factors:( 1 ) Sample errors: since the data is discrete, generally a theoretical segment point cannot be accurately measured; usually the theoretical segment point is between two adjacent data points.( 2 ) System errors: due to measurement error, manufacture error, etc., even if the theoretical segment point is accurately measured, there may be a system error between the measured point and the theoretical segment point.( 3 ) Method errors: curvature estimation is an approximate estimation method of curvature of discrete data; the method itself has an approximation error.In summary, the practical segment point extracted according to curvature estimation likely deviates from the theoretical segment point, and the practical segment point is in a range close to the theoretical segment point.


## 2.2. The Effects of Segment Points on a Line Feature and an Arc Feature

When we segment the section data using a segment point, if the segment point is extracted in low precision, the data near the segment point will probably be segmented incorrectly. For example, the data on a line feature is possible to be wrongly apportioned to a freeform feature. When reconstructing a line feature and an arc feature, the low precision segment point will affect the length of the line feature, the angle of arc feature, and the approximation accuracy of the line and arc features.


## 2.3. The Effects of Segment Points on a Freeform Feature

When reconstructing a freeform feature, the segment point with low precision will affect the freeform feature.The definition of a B-spline curve of degree p is(3)Cu=∑i=0nNi,puPiwhere Pi(i=0,⋯,n) refers to control points and Ni,pu is the degree p B-spline basis functions defined on the nonperiodic (and nonuniform) knot vector: (4)U=0,⋯,0︸p+1,up+1,⋯,um-p-1,1,⋯,1︸p+1m+1knots,Ni,0u=1,ui≤u≤ui+10,otherNi,pu=u-uiui+p-uiNi,p-1u+ui+p+1-uui+p+1-ui+1Ni+1,p-1u.According to the definition of a B-spline curve, the shape of the B-spline curve is determined by control points and a knot vector.Firstly, when reconstructing the B-spline curve, the segment point with low precision will affect the control points of B-spline curve.Take a B-spline curve of degree 3 as an example.C0=N0,30P0=P0 means that the starting point of the B-spline curve is the first control point. And the B-spline curve at the starting point also interpolates at the segment point. Thus, the segment point is just P0. Consequently, the segment point affects the control points of the B-spline curve.Secondly, when reconstructing the B-spline curve, the segment point with low precision will affect the knot vector of the B-spline curve.There are multiple methods available for determining the knot vector, and here we take accumulated-chord method as an example. Take a look at the knot values below. Since the extracted segment point deviates from the theoretical segment point, there is a deviation between the practical knot vector and the theoretical knot vector, as shown in Figure2. The knot vector with a deviation affects the basis function Ni,pu.(5)u~i=∑j=1iLjLu~i′=∑j=1iLj′L′=∑j=1iLj+ΔLL+ΔLwhere L is the accumulated length of chords of the data points and u~i is the knot value of the i-th data point when feature data is segmented by practical segment points. L′ is the accumulated length of chords of the data points and u~i′ is the knot value of the i-th data point when feature data is segmented by theoretical segment points, ΔL=L′-L. Because practice segment points deviate from theoretical segment points, the knot vector is affected, and the basis function Ni,pu is affected as well.Figure 2
Knots comparison of the accumulated-chord method.Consequently, the segment point directly affects the B-spline curve.


## 2.4. The Effects of Segment Points on 3D Models

3D models or surfaces are often reconstructed through extrusion, revolution, and skin from 2D profile curves. Take the skinned surface for example: the skinned surface is skinned through multiple 2D profile curves, and the segment points from different 2D profile curves should be corresponding. If the segment points are extracted in low precision, the skinned surface will be tortuous on the boundary joints of different feature surfaces.


## 2.5. Problem Statement

In summary, the extraction precision of segment points will affect the property of each feature, the whole 2D profile, and further the 3D model. Thus, we focus on improving the extraction precision of segment points. In the reconstruction process of 2D profile curves, the feature classification (including lines, circular arcs, and B-spline curves) andG1 constraints between features are inherited from the literatures [16–18].The rest of this paper is organized as follows. A grid is constructed in the interval (which includes theoretical segment point) extracted according to curvature analysis in Section3. In Section 4, the optimization model of each feature curve is developed with consideration on boundary constraints. Selection of the optimal segment point is related with two factors: the number of control points of B-spline and the total approximation error of all data points to the fitted curve. Thus, we design a search principle of the optimal segment point according to the two factors in Section 5. Section 6 introduces the evaluation indicator of our method, and Section 7 provides a specific algorithm description, followed by some case studies in Section 8. Finally, Section 9 concludes this paper.


## 3. Grid Construction

According to curvature analysis, segment points are manually extracted as initial segment points. Circle an interval that includes the initial segment point (ISP), and the data in the interval is uncertain. It is possible for the data to belong to the feature that is in one side of the initial segment point or belong to the feature that is in the other side of the initial segment point. Take the two end points of interval as the two end points of a diagonal line of a rectangular area. As shown in Figure3, we assume that we find the ISP in an area between pointQand point P′ and grid the area by space D1. Next, let all nodes be candidate segment points (CSPs), reconstruct a profile curve, and find out the best CSP (assumed node P1). Then, reduce area, center on node P1, grid the area by space D2, reconstruct a profile curve, and find out the best CSP. We repeat this process until meeting a precision requirement. Generally, we need to grid the area 3 times, where D1=0.005mm, D2=0.002mm, D3=0.001mm.Figure 3
Dynamic grid construction.


## 4. Optimization Model of 2D Profile Features with Boundary Constraints

In our framework for profile curve fitting, the line and arc are represented by its implicit algebraic equation, and the freedom curve is represented by a parametric cubic B-spline curve.


### 4.1. Reconstruction Model of a Line Feature through Fixed PointB(xb,yb)

Following Pratt [22], we write the equation of a line as l0x+l1y+l2=0, where parameters l0,l1,l2 satisfy normalization constraint l02+l12-1=0. Thus, the algebraic distance equation from a point to a line is d=l0x+l1y+l2. The Euclidean distance equation is d=l0x+l1y+l2. Given data points Qi=(xi,yi),i=0,1,⋯,m, we use a linear least-squares technique to fit the line. And an endpoint of the line interpolates fixed point B(xb,yb). Therefore, the equation l0xb+l1yb+l2=0 is true. Establish a mathematical model as (6)minfX=∑i=0ndi2=∑i=0nl0xi+l1yi+l22s.t.l02+l12-1=0l0xb+l1yb+l2=0whered is the algebraic distance from a point to the line,X = l 0 l 1 l 2 is the parameter vector of the line,B ( x b , y b ) is the fixed point.


### 4.2. Reconstruction Model of an Arc Feature through Fixed PointB(xb,yb)

We write the equation of a circular arc asc0x2+y2+c1x+c2y+c3=0, where parameters c0,c1,c2,c3 satisfy normalization constraint c12+c22-4c0c3=1.If the point lies close to the circle arc, the Euclidean distance equation is approximately equal to di=c0xi2+yi2+c1xi+c2yi+c3. Given data points Qi=(xi,yi),i=0,1,⋯,m, establish the reconstruction model as (7)minfX=∑i=0ndi2=∑i=0nc0xi2+yi2+c1xi+c2yi+c32s.t.c0xb2+yb2+c1xb+c2yb+c3=0c12+c22-4c0c3=1whered i is the algebraic distance from a point to the arc,X = c 0 c 1 c 2 c 3 is the parameter vector of the circular arc,B ( x b , y b ) is the fixed point.


### 4.3. Reconstruction Model of a B-Spline Feature through Fixed PointB(xb,yb) Satisfying G1 Constraints with Adjacent Curves

According to B-spline curve definition [23], in order to make the approximation error be within some user-specified error bound E, we must precompute the parameters u~i and knots. Similarly, Ma [24] proposed that the shape-preserving property of fitting a curve is affected by the knot vector U, parameters u~i, and error bound E. In order to get good fitting results, following Piegl [23], we start with many control points and a linear curve, and work up to degree 3. The fitting results can capture geometric characteristics inherent in the data, and tend to “settle” into a natural parameterization. With these approaches, we can eliminate and lower the negative influences brought by B-spline curves fitting to get good segment points.In this paper, we aim to construct the model of a cubic B-spline curve through fixed pointB(xb,yb) satisfying G1 constraints with adjacent curves, which include lines and arcs.When the adjacent curve is a line, the B-spline curve interpolates the fixed pointB(xb,yb) and satisfies G1 continuity constraints with the line. Establish the mathematical model as (8)minf=∑i=0mQi-Cu~i2=∑i=0mQi-∑j=0nNj,3u~iPi2s.t.dP1-L=0B-Cu~0=B-P0=0whereB is the fixed segment point located in the interval [a, b],P 0 and P1 are the first and second control points of the B-spline curve,L is a line connected to the B-spline curve.When the adjacent curve is an arc, the B-spline curve interpolates the fixed point andB(xb,yb) satisfies G1 continuity constraints with the arc. Establish the mathematical model as (9)minf=∑i=0mQi-Cu~i2=∑i=0mQi-∑j=0nNj,3u~i2s.t.B-C0=B-P0=0k0P1x+k1P1y+k2=0whereB is the fixed segment point located in the interval [a, b],P 0 ( P 0 x , P 0 y ) and P1(P1x,P1y) are the first and second control points of the B-spline curve,[ k 0 , k 1 , k 2 ] is the parameter vector of the tangent line (L:k0x+k1y+k2=0) of the circular arc at the fixed point B.


## 4.1. Reconstruction Model of a Line Feature through Fixed PointB(xb,yb)

Following Pratt [22], we write the equation of a line as l0x+l1y+l2=0, where parameters l0,l1,l2 satisfy normalization constraint l02+l12-1=0. Thus, the algebraic distance equation from a point to a line is d=l0x+l1y+l2. The Euclidean distance equation is d=l0x+l1y+l2. Given data points Qi=(xi,yi),i=0,1,⋯,m, we use a linear least-squares technique to fit the line. And an endpoint of the line interpolates fixed point B(xb,yb). Therefore, the equation l0xb+l1yb+l2=0 is true. Establish a mathematical model as (6)minfX=∑i=0ndi2=∑i=0nl0xi+l1yi+l22s.t.l02+l12-1=0l0xb+l1yb+l2=0whered is the algebraic distance from a point to the line,X = l 0 l 1 l 2 is the parameter vector of the line,B ( x b , y b ) is the fixed point.


## 4.2. Reconstruction Model of an Arc Feature through Fixed PointB(xb,yb)

We write the equation of a circular arc asc0x2+y2+c1x+c2y+c3=0, where parameters c0,c1,c2,c3 satisfy normalization constraint c12+c22-4c0c3=1.If the point lies close to the circle arc, the Euclidean distance equation is approximately equal to di=c0xi2+yi2+c1xi+c2yi+c3. Given data points Qi=(xi,yi),i=0,1,⋯,m, establish the reconstruction model as (7)minfX=∑i=0ndi2=∑i=0nc0xi2+yi2+c1xi+c2yi+c32s.t.c0xb2+yb2+c1xb+c2yb+c3=0c12+c22-4c0c3=1whered i is the algebraic distance from a point to the arc,X = c 0 c 1 c 2 c 3 is the parameter vector of the circular arc,B ( x b , y b ) is the fixed point.


## 4.3. Reconstruction Model of a B-Spline Feature through Fixed PointB(xb,yb) Satisfying G1 Constraints with Adjacent Curves

According to B-spline curve definition [23], in order to make the approximation error be within some user-specified error bound E, we must precompute the parameters u~i and knots. Similarly, Ma [24] proposed that the shape-preserving property of fitting a curve is affected by the knot vector U, parameters u~i, and error bound E. In order to get good fitting results, following Piegl [23], we start with many control points and a linear curve, and work up to degree 3. The fitting results can capture geometric characteristics inherent in the data, and tend to “settle” into a natural parameterization. With these approaches, we can eliminate and lower the negative influences brought by B-spline curves fitting to get good segment points.In this paper, we aim to construct the model of a cubic B-spline curve through fixed pointB(xb,yb) satisfying G1 constraints with adjacent curves, which include lines and arcs.When the adjacent curve is a line, the B-spline curve interpolates the fixed pointB(xb,yb) and satisfies G1 continuity constraints with the line. Establish the mathematical model as (8)minf=∑i=0mQi-Cu~i2=∑i=0mQi-∑j=0nNj,3u~iPi2s.t.dP1-L=0B-Cu~0=B-P0=0whereB is the fixed segment point located in the interval [a, b],P 0 and P1 are the first and second control points of the B-spline curve,L is a line connected to the B-spline curve.When the adjacent curve is an arc, the B-spline curve interpolates the fixed point andB(xb,yb) satisfies G1 continuity constraints with the arc. Establish the mathematical model as (9)minf=∑i=0mQi-Cu~i2=∑i=0mQi-∑j=0nNj,3u~i2s.t.B-C0=B-P0=0k0P1x+k1P1y+k2=0whereB is the fixed segment point located in the interval [a, b],P 0 ( P 0 x , P 0 y ) and P1(P1x,P1y) are the first and second control points of the B-spline curve,[ k 0 , k 1 , k 2 ] is the parameter vector of the tangent line (L:k0x+k1y+k2=0) of the circular arc at the fixed point B.


## 5. Search Principle of Optimal Segment Points

Before selecting an optimal segment point, we want to emphasize the following two points.First, when approximating the same dataQ=Qixi,yii=0m, we will get different B-spline curves within different error bounds E. It embodies in the difference of control points and knots vector. If the E is a large number, we can remove more knots, and the final control points will be less. Otherwise, the final control points will be more.Secondly, when we reconstruct the B-spline curve based on all CSPs within the same error bound E, the number of control points of B-spline curves based on the optimal segment point (OSP, if we can extract) or the CSP near the OSP is not necessarily least. But this is only a special case. In general, it is still the least. This is probably a consequence of lack of the boundary information of collected data because the collected data points are usually contaminated with errors and noise.Corresponding to every CSP, we need two pieces of information:(1) the number of control points for reconstructing a B-spline curve and (2) the total approximation error of all collected points to the fitted curve. Next, we can use MATLAB to construct a 3D surface by selecting the optimal segment point, as shown in Figure 4. Corresponding to each CSP of simulation data, Figure 4(a) is the statistical graph of the number of control points of reconstructing B-spline curves, and Figure 4(b) is the statistical graph of the total approximation error.Figure 4
Two factors of reconstruction of B-spline: (a) statistical graph of the number of control points; (b) statistical graph of the total approximation error.
(a) (b)If we only analyze Figure4(b), the optimal segment point is (1.5217, 2.0226). However, the theoretical segment point of the designed simulation data is (1.5000, 1.5000). The distance error between them is large. And if we find out the number of the corresponding control points of the optimal segment points in Figure 4(a), we see that the number is not the least (10), but the greatest (14). This is incorrect because the position of segment point is affected by the factors of the knot vectors U, parameters u~i, error bound E, etc.Using another analysis method, we consider Figures4(a) and 4(b) together. This specific method is to look for the minimum number of control points and subminimum number of control points and analyze the distribution of the two smallest control points in Figure 4(a). If the area of subminimum number of control points is much larger than the area of minimum number of control points, we only analyze the total approximation errors corresponded to the area of the subminimum number of control points. Otherwise, only analyze the minimum number of control points.Outside the area of the control points we are looking for, we assign a large value to the corresponding total approximation error and then get a new approximation error statistical graph as shown in Figure5. Now we can directly determine the position of the minimal approximation error and find out the optimal segment point. The optimal segment point obtained by this new method is (1.5047, 2.0076). The distance error between the theoretical segment point and practical segment point is smaller than before.Figure 5
Statistical graph of the total approximation error.


## 6. Evaluation Indicators

We compare the reconstruction results with other methods using the five evaluating indicators:εd, εw, εm, εl, σl.ε d is the distance between the practical extracted segment point Pp and the theoretical segment point Pt and defined by (10)εd=Pp-Pt.εw is the average distance error and defined by(11)εw=∑i=0mdim+1=∑i=0mQi-Cu~im+1where C(u~i) is the spline feature which is reconstructed through the data points Qii=0m.ε m is the maximum distance error, as shown below:(12)εm=max⁡dii=0m=max⁡Qi-Cu~ii=0m.εl is the average distance error of a range of data points, and defined by(13)εl=∑i=0m′di′m′+1=∑i=0m′Q~i-Cu~im′+1.Because of the locality of the B-spline curve, we calculate the statistics of the first 15 points near the segment point of the freedom feature, i.e., m′=14.σ l 2 is the variance of the distance error between the first 15 data points and the reconstructed spline feature, as shown below:(14)σl2=∑i=0m′di′-εl2m′+1.


## 7. Algorithm Description

In order to improve the search efficiency, the determination of OSP needs to use a dynamic grid of target area as shown in Section3. We divide the target area to get a sparse grid to search for currently best point and then divide the area around the best point to get a dense grid to search for the currently best point again. We repeat these steps until the density of grid nodes reaches the desired accuracy requirements. Finally, let the searched point be the OSP. The method proposed here is called as regional search and reconstruction technology. The fitting algorithm of sectional data is as follows.( 1 ) According to the curvature information of the discrete data, extract the initial segment points (ISPs), segment the data points using the ISPs into multiple data segments, and determine the corresponding features of each data segment and the area of optimal segment point based on practical experience.( 2 ) In reference to the density of data points, determine a reasonable grid spacing to divide the target area.( 3 ) For each current grid node, fit a simple feature (including line feature and arc feature) through the grid node first, and then fit a B-spline feature based on boundary condition (G1 continuous); meanwhile count the total approximation error of all data points to the fitted curve, and the number of control points of the B-spline curve.( 4 ) Make a comprehensive analysis on the two groups of data, and then determine the current optimal segment points.( 5 ) If the current density of grid nodes meets the precision requirement, output the optimal segment point. Otherwise, let the current optimal segment point as the center, reduce the target area, reduce the grid spacing, divide grid, and return to step (3).( 6 ) Reconstruct a profile curve based on the optimal segment point.


## 8. Numerical Examples and Comparisons

We give the following examples and comparisons to verify the proposed method. Here, three methods were analyzed and compared: the step by step reconstruction method (SSRM, the most commonly used), the overall reconstruction method (ORM, proposed by Ke [17, 18]), and the regional search and reconstruction technology (RSRT, proposed in this paper).With synthetic objects, we get sectional discrete data from theoretical CAD models and then reconstruct profile curves based on these discrete data and analyze approximation error between the reconstruction results and the theoretical CAD models. The analysis data of synthetic objects include two types: simulation data (discrete data of the known theoretical models) and simulation data with noise (Gaussian noise is added to the discrete data of the theoretical models). Finally, we test our method with a set of data points from the point cloud of a real industrial part.The evaluation indicators includeεd, εw, εm, εl, σl.Example 1.
Figure6 shows the reconstruction of simulation data whose adjacent features are a line feature and a spline feature. Figure 6(a) shows the initial sectional discrete data of simulate data, including 69 points. The size is about 6×2mm2, and the theoretical segment point (TSP) is (1.000000, 4.000000). The results of three methods are shown in Figure 6(b). Figure 6(c) shows the magnified view of a local area. The segment point Pp1 of the curve B1 solved by SSRM is (1.013870, 4.055580), whose distance error with TSP is 0.057284mm; the segment point Pp2 of the curve B2 solved by ORM is (1.015943, 4.056204), whose distance error with TSP is 0.058421mm; and the segment point Pp3 of the curve B3 solved by RSRT is (0.998023, 3.992092), whose distance error with TSP is 0.008151mm.Figure 6
Reconstruction of simulation data: (a) initial sectional discrete data, (b) results of three methods, and (c) magnified view of local area.
(a) (b) (c)In Table1, comparison of the distance errors εd resulting from these methods indicates that the distance error resulting from RSRT is about 7 times smaller than that of ORM and SSRM. From an evaluation of the approximation precision of the freedom feature (εw and εm), the ORM has higher precision than the other two methods; this happens because the number of control points resulting from the ORM is more than RSRT. In Figure 6(c), combining the average distance error εl with the discrete degree σl, the distribution of data points near segment point of the freedom feature resulting from RSRT is more uniform than other two methods. We can see that the RSRT we proposed in this paper can find high-precision segment point. Thereby, we can greatly improve the overall quality of the reconstruction curve.Table 1
Analysis of the reconstruction of simulation data (unit:mm).
P p P t ε d ε w ε m ε l σ l SSRM (1.013870,4.055580) (1.000000,4.000000) 0.057284 0.004191 0.010459 0.003694 9.28E-06  ORM (1.015943,4.056204) (1.000000,4.000000) 0.058421 0.001162 0.005010 0.001117 1.78E-06  RSRT (0.998023,3.992092) (1.000000,4.000000) 0.008151 0.003614 0.008219 0.000786 4.20E-07Example 2.
Figure7 shows the reconstruction of simulation data with noise, which is Gaussian noise (0.01mm) added into the data in Figure 6(a). Figure 7(a) is the initial sectional discrete data of simulated data with noise. The results of three methods are shown in Figure 7(b). Figure 7(c) gives a magnified view of local area. The segment point Pp1 of the curve B1 solved by SSRM is (1.020960, 4.050820), and the corresponding distance error with TSP is 0.054973mm; the segment point Pp2 of the curve B2 solved by ORM is (1.016743, 4.052017), whose distance error with TSP is 0.054645mm; and the segment point Pp3 of the curve B3 solved by RSRT is (0.991956, 3.982966), and the corresponding distance error with TSP is 0.018839mm.Figure 7
Reconstruction of simulation data with noise: (a) initial sectional discrete data, (b) results of three methods, and (c) magnified view of local area.
(a) (b) (c)In Table2, compared to the distance errors εd resulting from existing methods, the distance error resulting from RSRT is approximately 3 times smaller. With respect to an average distance error εw and maximum distance error εm, the ORM has higher precision than the other two methods. This is because of more control points generated in the ORM. In Figure 7(c), based on the average distance error εl and the discrete degree σl, the distribution of data points near segment point of the freedom feature resulting from RSRT is more uniform than the other two methods. We can see that our RSRT is also superior to the other two methods even in the case with noise.Table 2
Analysis of the reconstruction of simulation data with noise (unit:mm).
P p P t ε d ε w ε m ε l σ l SSRM (1.020960,4.050820) (1.000000,4.000000) 0.054973 0.007562 0.024227 0.005280 1.34E-05  ORM (1.016743,4.052017) (1.000000,4.000000) 0.054645 0.005712 0.012665 0.004829 9.84E-06  RSRT (0.991956,3.982966) (1.000000,4.000000) 0.018839 0.006336 0.017187 0.004374 4.93E-06Example 3.
Figure8 shows the reconstruction of simulation data whose adjacent features are an arc feature and a spline feature. Figure 8(a) is the initial sectional discrete data of simulate data, including 150 points. The size is about 11.5×4.5mm2, and the TSP Pt is (1.5000, 5.0000). The results of three methods are shown in Figure 8(b). Figure 8(c) is the magnified view of local area. The segment point Pp1 of the curve B1 solved by SSRM is (1.5537, 5.0442), and the corresponding distance error with TSP is 0.0696mm; the segment point Pp2 of the curve B2 solved by ORM is (1.5597, 5.0426), whose distance error with TSP is 0.0733mm; and the segment point Pp3 of the curve B3 solved by RSRT is (1.4810, 4.9835), and the corresponding distance error with TSP is 0.0252mm.Figure 8
Reconstruction of simulation data: (a) initial sectional discrete data, (b) results of three methods, and (c) magnified view of local area.
(a) (b) (c)In Table3, compared to the distance errors εd resulting from existing methods, the distance error resulting from RSRT is about 3 times smaller. With respect to the approximation precision of the freedom feature (εw and εm), the RSRT has higher precision than the other two methods. In Figure 8(c), in combination of the average distance error εl with the discrete degree σl, the distribution of data points near segment point of the freedom feature resulting from RSRT is more uniform than the other two methods. It can be seen that our RSRT can find the high-precision segment point. Thereby, RSRT can greatly improve the overall quality of the reconstruction curve.Table 3
Analysis of the reconstruction of simulation data (unit: mm).
P p P t ε d ε w ε m ε l σ l SSRM (1.5537,5.0442) (1.5000, 5.0000) 0.0696 0.0014 0.0055 0.0020 1.60E-06  ORM (1.5597, 5.0426) (1.5000, 5.0000) 0.0733 0.0011 0.0084 0.0033 5.73E-06  RSRT (1.4810, 4.9835) (1.5000, 5.0000) 0.0252 0.0007 0.0045 0.0011 9.79E-07Example 4.
Figure9 shows the reconstruction of simulation data with noise, which is data in Figure 8 added with Gaussian noise (0.01mm). Figure 9(a) is the initial sectional discrete data of simulated data with noise. The results of three methods are shown in Figure 9(b). Figure 9(c) is a magnified view of local area. The segment point Pp1 of the curve B1 solved by SSRM is (1.5609, 5.0416), whose distance error with TSP is 0.0738mm; the segment point Pp2 of the curve B2 solved by ORM is (1.5581, 5.0450), and the corresponding distance error with TSP is 0.0717mm; and the segment point Pp3 of the curve B3 solved by RSRT is (1.5220, 5.0165), and the corresponding distance error with TSP is 0.0275mm.Figure 9
Reconstruction of simulation data with noises: (a) initial sectional discrete data, (b) results of three methods, and (c) magnified view of local area.
(a) (b) (c)In Table4, compared to the distance errors εd resulting from existing methods, the distance error resulting from RSRT is about 3 times smaller. With respect to an average distance error εw and maximum distance error εm point of view, the RSRT has higher precision than the other two methods. In Figure 9(c), based on the average distance error εl and the discrete degree σl, the distribution of data points near segment point of the freedom feature resulting from RSRT is more uniform than other two methods. Thus, our RSRT is superior to the other two methods even in the case with noise.Table 4
Analysis of the reconstruction of simulation data with noises (unit: mm).
P p P t ε d ε w ε m ε l σ l SSRM (1.5609, 5.0416) (1.5000, 5.0000) 0.0738 0.0041 0.01488 0.0041 8.25E-06  ORM (1.5581, 5.0450) (1.5000, 5.0000) 0.0717 0.0040 0.01583 0.0039 9.76E-06  RSRT (1.5220, 5.0165) (1.5000, 5.0000) 0.0275 0.0037 0.01227 0.0036 5.42E-06Example 5.
Figure10 shows the high-precision reconstruction of a partial sectional data of a turbine blade. Figure 10(a) is the sectional data of turbine blade tenon, and the data acquisition density is D≤0.03mm. Figure 10(b) gives the curvature information of discrete data, and Figure 10(c) is the magnified view of local area. With respect to Pp1 (shown in Figure 10(d)), according to the curvature information, it is difficult to determine the most appropriate point as segment point from these points: A (1.518512, 0.910234), B (1.538464, 0.907334), C (1.558423, 0.904822), and D (1.578395, 0.902990). However, if our method is used, we do not need to predetermine segment points. We just need to make sure that the segment point is in a rectangular area that takes AD as its diagonal line. Then we use a dynamic grid method to search for the optimal segment point Pp1(1.530588, 0.907243). Figure 10(d) shows the high-precision result obtained from the RSRT. Pp1,Pp2,Pp3,Pp4,Pp5 are the optimal segment points.Figure 10
High-precision reconstruction of a partial sectional data of turbine blade. (a) Sectional data of turbine blade tenon, (b) curvature information of discrete data, (c) magnified view of local area, and (d) high-precision result getting from the RSRT.
(a) (b) (c) (d)


## 9. Conclusions and Future Work

We have presented a new solution for high-precision extraction of the segment points of 2D profiles based on a dynamic grid method in this paper. We name this method as regional search and reconstruction technology (RSRT), which has the following key advantages over other existing methods.( 1 ) Low dependence: the segment point is optimized from an area space, rather than appointed from the measured data points by rule-of-thumb methods. It increases the possibility of searching the optimal solution.( 2 ) Universality: the number of control points of a B-spline curve and the total approximation error are considered together to select the optimal segment point (OSP). This can avoid misjudging the OSP, if the boundary information is incomplete. At the same time, this can improve the reconstruction accuracy of a B-spline curve without reducing the smoothness of the curve.( 3 ) High precision: the spline features are constantly reconstructed while the RSRT searches for the OSP. The reconstruction quality of spline features can be significantly improved with the OSP.An important area for future research is a practical method for fitting high-quality profile curves based on boundary condition (G2 continuous).



---

*Source: 2052319-2019-05-15.xml*