#### 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.

#### 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 G^{1} and G^{2} 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; fit every single-feature data into a seed curve; and 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 points , 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 as . Then, the discrete curvature on can be defined as curvature of arc that passes through three adjacent points , and . As shown in Figure 1 [21],where is a signed triangular area, when , and run counterclockwise.

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:

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.

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.

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 where refers to control points and is the degree p B-spline basis functions defined on the nonperiodic (and nonuniform) knot vector:

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. 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 . 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 Figure 2. The knot vector with a deviation affects the basis function .where is the accumulated length of chords of the data points and is the knot value of the i-th data point when feature data is segmented by practical segment points. is the accumulated length of chords of the data points and is the knot value of the i-th data point when feature data is segmented by theoretical segment points, . Because practice segment points deviate from theoretical segment points, the knot vector is affected, and the basis function is affected as well.

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) and 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 Section 3. 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 Figure 3, we assume that we find the ISP in an area between point* Q *and point and grid the area by space . Next, let all nodes be candidate segment points (CSPs), reconstruct a profile curve, and find out the best CSP (assumed node ). Then, reduce area, center on node , grid the area by space , 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 , , .

#### 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 Point

Following Pratt [22], we write the equation of a line as , where parameters satisfy normalization constraint . Thus, the algebraic distance equation from a point to a line is . The Euclidean distance equation is . Given data points , we use a linear least-squares technique to fit the line. And an endpoint of the line interpolates fixed point . Therefore, the equation is true. Establish a mathematical model as where

is the algebraic distance from a point to the line,

is the parameter vector of the line,

is the fixed point.

##### 4.2. Reconstruction Model of an Arc Feature through Fixed Point

We write the equation of a circular arc as , where parameters satisfy normalization constraint *. *If the point lies close to the circle arc, the Euclidean distance equation is approximately equal to . Given data points , establish the reconstruction model as where

is the algebraic distance from a point to the arc,

is the parameter vector of the circular arc,

is the fixed point.

##### 4.3. Reconstruction Model of a B-Spline Feature through Fixed Point Satisfying G^{1} 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 and knots. Similarly, Ma [24] proposed that the shape-preserving property of fitting a curve is affected by the knot vector U, parameters , 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 point satisfying G^{1} constraints with adjacent curves, which include lines and arcs.

When the adjacent curve is a line, the B-spline curve interpolates the fixed point and satisfies G^{1} continuity constraints with the line. Establish the mathematical model as where

is the fixed segment point located in the interval [a, b],

and are the first and second control points of the B-spline curve,

is a line connected to the B-spline curve.

When the adjacent curve is an arc, the B-spline curve interpolates the fixed point and satisfies G^{1} continuity constraints with the arc. Establish the mathematical model as where

is the fixed segment point located in the interval [a, b],

and are the first and second control points of the B-spline curve,

is the parameter vector of the tangent line () of the circular arc at the fixed point .

#### 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 data , 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: the number of control points for reconstructing a B-spline curve and 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.

**(a)**

**(b)**

If we only analyze Figure 4(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 , but the greatest . This is incorrect because the position of segment point is affected by the factors of the knot vectors U, parameters , error bound E, etc.

Using another analysis method, we consider Figures 4(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 Figure 5. 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.

#### 6. Evaluation Indicators

We compare the reconstruction results with other methods using the five evaluating indicators: , , , , .

is the distance between the practical extracted segment point and the theoretical segment point and defined by is the average distance error and defined bywhere is the spline feature which is reconstructed through the data points .

is the maximum distance error, as shown below: is the average distance error of a range of data points, and defined byBecause 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., .

is the variance of the distance error between the first 15 data points and the reconstructed spline feature, as shown below:

#### 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 Section 3. 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.

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.

In reference to the density of data points, determine a reasonable grid spacing to divide the target area.

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 (G^{1} 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.

Make a comprehensive analysis on the two groups of data, and then determine the current optimal segment points.

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 .

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 , , , , .

*Example 1. *Figure 6 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 , 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 of the curve B_{1} solved by SSRM is (1.013870, 4.055580), whose distance error with TSP is 0.057284*mm*; the segment point of the curve B_{2} solved by ORM is (1.015943, 4.056204), whose distance error with TSP is 0.058421*mm*; and the segment point of the curve B_{3} solved by RSRT is (0.998023, 3.992092), whose distance error with TSP is 0.008151*mm*.

**(a)**

**(b)**

**(c)**

In Table 1, comparison of the distance errors 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 ( and ), 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 with the discrete degree , 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.

*Example 2. *Figure 7 shows the reconstruction of simulation data with noise, which is Gaussian noise (0.01*mm*) 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 of the curve B_{1} solved by SSRM is (1.020960, 4.050820), and the corresponding distance error with TSP is 0.054973*mm*; the segment point of the curve B_{2} solved by ORM is (1.016743, 4.052017), whose distance error with TSP is 0.054645*mm*; and the segment point of the curve B_{3} solved by RSRT is (0.991956, 3.982966), and the corresponding distance error with TSP is 0.018839*mm.*

**(a)**

**(b)**

**(c)**

In Table 2, compared to the distance errors resulting from existing methods, the distance error resulting from RSRT is approximately 3 times smaller. With respect to an average distance error and maximum distance error , 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 and the discrete degree , 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.

*Example 3. *Figure 8 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 , and the TSP 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 of the curve B_{1} solved by SSRM is (1.5537, 5.0442), and the corresponding distance error with TSP is 0.0696*mm*; the segment point of the curve B_{2} solved by ORM is (1.5597, 5.0426), whose distance error with TSP is 0.0733*mm*; and the segment point of the curve B_{3} solved by RSRT is (1.4810, 4.9835), and the corresponding distance error with TSP is 0.0252*mm.*

**(a)**

**(b)**

**(c)**

In Table 3, compared to the distance errors 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 ( and ), the RSRT has higher precision than the other two methods. In Figure 8(c), in combination of the average distance error with the discrete degree , 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.

*Example 4. *Figure 9 shows the reconstruction of simulation data with noise, which is data in Figure 8 added with Gaussian noise (0.01*mm*). 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 of the curve B_{1} solved by SSRM is (1.5609, 5.0416), whose distance error with TSP is 0.0738*mm*; the segment point of the curve B_{2} solved by ORM is (1.5581, 5.0450), and the corresponding distance error with TSP is 0.0717*mm*; and the segment point of the curve B_{3} solved by RSRT is (1.5220, 5.0165), and the corresponding distance error with TSP is 0.0275*mm.*

**(a)**

**(b)**

**(c)**

In Table 4, compared to the distance errors resulting from existing methods, the distance error resulting from RSRT is about 3 times smaller. With respect to an average distance error and maximum distance error point of view, the RSRT has higher precision than the other two methods. In Figure 9(c), based on the average distance error and the discrete degree , 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.

*Example 5. *Figure 10 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 . Figure 10(b) gives the curvature information of discrete data, and Figure 10(c) is the magnified view of local area. With respect to (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 (1.530588, 0.907243). Figure 10(d) shows the high-precision result obtained from the RSRT. are the optimal segment points.

**(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.

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.

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.

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 (G^{2} continuous).

#### Data Availability

The [DATA TYPE] data used to support the findings of this study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

The work described in this paper was supported by the National Natural Science Foundation of China (Grant No. 51205246, 51775328).