Method for fairing NURBS curve and surface in vehicle shell modeling

By using an iterative method of smoothing weights and difference vectors in the vehicle shell design, the problem of insufficient controllability and flexibility of the smoothing process in the prior art is solved, and efficient and flexible smoothing generation of NURBS curves and surfaces is achieved.

CN115358009BActive Publication Date: 2026-03-20ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-30
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In the current technology for vehicle shell design, the NURBS curve and surface smoothing method lacks sufficient parameter control, resulting in poor controllability and flexibility of the smoothing process, as well as time-consuming and inefficient computation.

Method used

By employing a smoothing weight corresponding to each control point, combined with an iterative method of difference vector and normalization coefficient, a smooth curve and surface that can be adjusted globally or locally is generated. By adjusting the smoothing weight, nodes, and data parameterization of the control points, a better smoothing effect can be achieved.

Benefits of technology

It improves the flexibility and controllability of smoothing operations, reduces computational memory consumption, achieves an efficient smoothing process, and generates NURBS curves and surfaces that meet the requirements of smoothing and fitting accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115358009B_ABST
    Figure CN115358009B_ABST
Patent Text Reader

Abstract

The application discloses a method for generating NURBS curve and surface fairing in vehicle shell modeling. A model equation of a fitting parameter model is known, data points are obtained through data collection of reverse engineering of vehicle shell modeling, a node vector of the model equation is obtained after parameterization, initial control points are selected, and the fitting parameter model is generated from the control points and the node vector of the model equation; the fitting parameter model and the control points are iteratively optimized according to actual requirements of the fairing effect of the vehicle shell modeling, and the optimal fitting parameter model is obtained. The application realizes accurate fairing of the curve and surface by adjusting the fairing weight corresponding to the control points, and improves the flexibility and interactivity of the fairing operation. Meanwhile, the geometric iterative process ensures that the user can globally or locally modify the weight of the control points, the node vector or the data parameterization, etc. after each iteration.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the data fitting and fairing method of three-dimensional model or two-dimensional model, and particularly relates to the progressive iterative approximation method of NURBS curve and surface fairing. BACKGROUND

[0002] Given a discrete set of data points, fitting a parametric curve or surface to the data points is a fundamental problem in many fields. In the field of geometric design, it is often required to generate smooth airfoils, ship hulls, and car hoods, etc. because their physical properties are greatly affected by their geometric characteristics. In recent years, many scholars have studied the application of fairing curves in robot path planning, which makes it a hot issue how to flexibly and efficiently perform curve and surface fairing.

[0003] Traditional fairing methods can be roughly divided into two categories: global fairing method (see H. Hagen, G.-P. Bonneau, Variational design of smooth rational bezier curves, Computer aided geometric design 8, 5 (1991), 393-399.) and local fairing method (see G. Farin, G. Rein, N. Sapidis, A. Worsey, Fairing cubic b-spline curves, Computer Aided Geometric Design 4, 1 (1987), 91-103.). The main feature of these two methods is to efficiently change the energy value of the model to obtain a smooth curve or surface. The global fairing method usually adjusts the energy value globally, while the local fairing method only adjusts the local region. However, these two methods usually lack sufficient parameters to fine-tune and improve the fairness of the curve and surface. This makes the controllability of the fairing process of the curve and surface poor and the flexibility low. Therefore, the ability to fine-tune the fairing effect is a key factor in fairing curves and surfaces.

[0004] The bad point removal method is an interactive fairing algorithm that improves the fairness of the curve by modifying the points that do not meet the fairing requirements (see J. A. P. Kjellander, Smoothing of cubic parametric splines, Computer aided design 15, 3 (1983), 175-179.). Subsequently, Farin et al. first proposed the method of deleting and re-inserting points to improve the efficiency of modifying points. However, when encountering a large number of points that do not meet the fairing requirements, this local fairing method can only process point by point, which makes the fairing process very inefficient.

[0005] The basic idea of energy minimization method is to find a parameter model that minimizes the energy of the curve surface energy model, so as to obtain the smoothest curve surface. Generally, the smaller the energy value corresponding to the curve surface is, the higher the fairness of the curve surface is, and the better the physical performance is. Commonly used energies include strain energy (see H. Hagen, G.-P. Bonneau, Variational design of smooth rational bezier curves, Computer aided geometric design 8, 5 (1991), 393-399.), tension energy (see H. Pottmann, Smooth curves under tension, Computer aided design 22, 4 (1990), 241-245.), and the change of curvature radius (see T. C. Rando, Automatic fairness in computer-aided geometric design, Ph. D. thesis, aAI9102032 (1990).) and the like. Although the energy method can perform global optimization on the parameter model, the scale of the data points collected in industrial design and manufacturing is usually large. The energy method is time-consuming to calculate and cannot well control the fitting effect.

[0006] Vassilev based on the above two methods, proposes an automatic fairing algorithm (see T. I. Vassilev, Fair interpolation and approximation of b-splines by energy minimization and points insertion, Computer aided design 28, 9 (1996), 753-760.). Different from the previous method, this method only inserts new points when necessary. Thus, the problem scale is greatly reduced, and the fairing efficiency is improved. Inspired by this work, many researchers try to propose a method for more efficiently identifying bad points and updating the control points derived by energy minimization. SUMMARY

[0007] The purpose of the present application is to overcome the shortcomings of the prior art, and provide a NURBS curve surface fairing generation method in vehicle shell modeling.

[0008] The method utilizes the fairing weight corresponding to each control point to generate a fairing curve (surface) which can be adjusted globally or locally, and invents the aggregation method of difference vector on the control point on the curve surface, i.e. the normalization coefficient, to ensure the convergence of the geometric iterative fairing algorithm, and utilizes the characteristic that the parameter is flexible to modify in the geometric iteration process, is suitable for node insertion, and realizes better fairing weight or data parameterization adjustment.

[0009] The technical scheme adopted by the present application is as follows:

[0010] 1) The model equation of the fitting parameter model is known, the data point set is obtained through data acquisition of the reverse engineering of the vehicle shell modeling, the data point set is usually the point cloud obtained by scanning through a scanner, the parameters of each data point are obtained through parameterization of the data point set, the node vector of the model equation is obtained according to the parameters of each data point, and the initial control point is selected, and the initial fitting parameter model is generated from the initial control point and the node vector of the model equation;

[0011] 2) The fitting parameter model and the control point are iteratively optimized according to the actual requirements of the fairing effect of the vehicle shell modeling, and the optimal fitting parameter model is obtained, and the fitting parameter model can be input into a computer for 3D printing or manufacturing.

[0012] The fitting parameter model is a NURBS curve or a NURBS surface.

[0013] The step 2) is specifically:

[0014] 2.1) calculating the difference vector d i between the fitting parameter model and each data point, i represents the serial number of the data point, and the difference vector d i corresponding to the parameter value of the data point in the support domain of a basis function is divided into a group, one control point is set for each group, then all the difference vectors d i in the group are weighted and summed to obtain the fitting vector δ j of the control point corresponding to the group, and one control point is set for each group of data points.

[0015] Each control point of the fitting parameter model corresponds to a basis function, and the non-zero domain of the basis function is used as the support domain.

[0016] 2.2) setting the fairing functional According to the fairing functional , the fairing vector η j of each control point is obtained.

[0017] 2.3) setting the fairing weight ω j of the control point according to the actual requirements of the fairing effect of the vehicle shell modeling, and calculating the difference vector B j of the control point:

[0018]

[0019] where B j is the difference vector of the jth control point, and k is the iteration number; is the fairing vector of the jth control point obtained in the kth iteration j , is the fitting vector of the jth control point obtained in the kth iteration j ;

[0020] 2.4) According to the results obtained in step 2.3), update the coordinates of the control points according to the following formula:

[0021]

[0022] where μ j is the normalized coefficient of the jth control point to ensure the convergence of the iteration; is the coordinate of the jth control point in the kth iteration;

[0023] 2.5) Substitute the updated coordinates of the control points into the model equation of the fitting parameter model to generate a new fitting parameter model, and calculate the relative iteration error of the current kth iteration

[0024]

[0025] A = (I - Ω)N T N + ΩD r

[0026]

[0027] where k is the iteration number, I is the unit matrix, Ω is a diagonal matrix with fairing weight ω j as the diagonal elements, N is the configuration matrix, Q is the matrix composed of data points, D r is the matrix composed of the fairing functional in step 3), r is the order of derivation of the basis function in the model equation of the fitting parameter model, P [k] is the control point set obtained after the kth iteration, j represents the jth row of the matrix; A represents the coefficient matrix, (j, :) represents taking all the elements of the jth row of the matrix, ||| 2 represents the square of the norm, and T represents the transpose of the matrix;

[0028] Compare the relative iteration error of the current kth iteration with the relative iteration error of the previous (k-1)th iteration to determine:

[0029] If the difference between them is less than the preset difference threshold ε iter , then the iteration is terminated, and the next step is performed.

[0030] If the difference between them is not less than the preset difference threshold ε iter , then return to step 2.1) with the new fitting parameter model for the next iteration.

[0031] 2.6) Calculate the relative fitting error

[0032]

[0033] Where Q i represents the i-th data point, i represents the serial number of the data point, m represents the total number of data points, t i represents the parameter of the i-th data point, P [k] (t i ) represents the value of the parameter corresponding to the i-th data point in the fitting parameter model after the k-th iteration.

[0034] Compare the relative fitting error with the preset target fitting accuracy ε fit to determine:

[0035] If the relative fitting error does not reach the target fitting accuracy ε fit , then adjust the node vector of the model equation of the fitting parameter model, adjust the fairing weight ω j corresponding to the control point, or adjust the parameterization of the data point set.

[0036] a) Adjust the node vector of the model equation of the fitting parameter model: for the area with larger fitting error, use the node insertion algorithm to insert nodes as needed to obtain new control points.

[0037] a)b) Adjust the fairing weight ω j corresponding to the control point: modify the fairing weight ω j corresponding to each control point. The larger the value of ω fit , the better the fairing effect; otherwise, the better the fitting effect.

[0038] b)c) Adjust the parameterization of the data point set: re-parameterize according to the geometric characteristics of the data points.

[0039] Return to step 2.1) for the next iteration.

[0040] If the relative fitting error reaches the target fitting accuracy ε fit , then the newly generated fitting parameter model is taken as the final result

[0041] Thus, the iteration is continuously carried out until the generated fitting parameter model meets the target fitting accuracy ε fit and fairing requirements.

[0042] The fitting parameter model is a NURBS curve, and the model equation of the NURBS curve in step 1) is:

[0043]

[0044] In the formula: is an initial jth control point randomly selected, t is a parameter of a NURBS (Non-Uniform Rational B-Spline) curve, N j (t) represents a jth basis function, and n represents the total number of control points; P [0] (t) represents an initial NURBS curve, wherein the superscript [0] represents an initial fitting curve, and t represents a curve parameter.

[0045] When t is not subscripted i, it represents a continuous curve parameter value; when subscripted i, it represents the ith data point on the curve corresponding to the ith data point t i . t and t i Both essentially represent parameters on the curve. One is a continuous value, and the other is a discrete value.

[0046] The fitting parameter model is a NURBS curve, and step 2.1) is specifically:

[0047] First, calculate the difference vector [k] between the NURBS curve P i (t) and each data point Q

[0048]

[0049] Wherein, P [k] (t i ) represents the value of the fitting parameter model corresponding to the parameter value of the ith data point after the kth iteration, represents the difference vector corresponding to the ith data point after the kth iteration;

[0050] Then, the difference vector of the data points corresponding to the parameter value in the support domain of a basis function is divided into a group, and the weighted sum of the difference vectors of all data points in the group is taken as the fitting vector δ j [k] of the control point corresponding to the data points in the group, wherein the weight of the weighting is the value of the jth basis function N i (t) at the parameter t of the NURBS curve;

[0051] 2.2) setting the fairing function According to the fairing function obtaining the fairing vector η of each control point j .

[0052] The fitting parameter model is a NURBS curve, and the fairing vector of the jth control point in step 2.2) is obtained according to the following formula:

[0053]

[0054]

[0055] In the formula: t is the parameter of the NURBS curve, the range is [t1, t m ], t m represents the mth parameter value, represents the fairing function of the rth derivative of the lth basis function constructed by the rth derivative of the jth basis function N r,j (t) represents the result of taking the rth derivative of the jth basis function of the NURBS curve, P l [k] represents the lth control point under the kth iteration, N r,l (t) represents the result of taking the rth derivative of the lth basis function of the NURBS curve, n represents the number of basis functions, represents the fairing vector of the jth control point after the kth iteration.

[0056] The fitting parameter model is a NURBS surface, and in step 1), the data point set related to the surface and the corresponding parameter values are arranged in the order of two dimensional directions on the surface, and the basis functions and control points are also arranged in dictionary order, represented as:

[0057]

[0058]

[0059] In the formula: u, v are the two dimensional direction parameters on the NURBS surface, n1, n2 are the number of control points in the u, v direction on the NURBS surface respectively; respectively represent the nth1 basis function in the u direction and the nth2 basis function in the v direction, represents the control point coordinates corresponding to the nth1 row and nth2 column on the control grid, represents the nth1*nth2 control point after sorting all control points according to the above rules, represents the nth1*nth2 basis function after sorting all basis functions according to the above rules;

[0060] The model equations for the NURBS surface are:

[0061]

[0062] In the formula: For the randomly selected initial j-th control point, N j (u,v) represents the j-th basis function N(u,v), where (u,v) are the parameter values ​​of the basis function N(u,v); P [0] (u,v) represents the initial NURBS surface.

[0063] NURBS surfaces are generated according to the above model equations.

[0064] The fitting parameter model is a NURBS surface, and step 2.1) specifically involves:

[0065] First, calculate the NURBS surface P using the following formula. [k] (u,v) and each data point Q i The difference vector between

[0066]

[0067] in, Let P represent the difference vector corresponding to the i-th data point after the k-th iteration. [k] (u i ,v i () represents the value of the fitted parameter model corresponding to the parameter value of the i-th data point after the k-th iteration;

[0068] Then, the difference vector corresponding to the data points in the support domain of a basis function is used to determine the parameter values. Divide the data points into groups, and take the weighted sum of the differences between all the data points in the group. This sum is used as the fitting vector δ for the control points corresponding to that group of data points. j [k] The weighted average is calculated using the j-th basis function N. i The value of (u,v) at the parameter (u,v) of the NURBS surface.

[0069] The fitting parameter model is a NURBS surface. In step 2.2), one of the following is selected to obtain the smoothing vector of the control point: a smoothing vector based on the first-order partial derivative, a smoothing vector based on the second-order partial derivative, or a smoothing vector based on the third-order partial derivative. These are as follows:

[0070] A) The smoothing vector based on the first-order partial derivative of the j-th control point is calculated as follows:

[0071]

[0072] In the formula: u,v are NURBS surfaces P[k] (u,v) are two dimension direction parameters on (u,v), n1,n2 are the number of control points of NURBS surface along two directions u,v respectively; P l [k] denotes the lth control point at the kth iteration, l represents the ordinal number of the control point, denotes the fairing vector corresponding to the jth control point after the kth iteration; N u,l (u,v), N v,l (u,v) respectively denote the jth basis function N j (u,v) are the results of first-order partial derivative of (u,v) in two directions u,v, denotes the jth first-order partial derivative fairing functional in the u direction, denotes the jth first-order partial derivative fairing functional in the v direction;

[0073] The above two fairing functionals are calculated as:

[0074]

[0075]

[0076] wherein, u m denotes the mth parameter value in the u direction, v m denotes the mth parameter value in the v direction, m represents the ordinal number of the data point;

[0077] B) The fairing vector of the jth control point based on the second-order partial derivative is calculated as:

[0078]

[0079] In the formula: N uu,j (u,v), N uv,j (u,v) and N vv,j (u,v) respectively denote the results of second-order partial derivative of the jth NURBS basis function N j (u,v), denotes the jth first-type second-order partial derivative fairing functional, denotes the jth second-type second-order partial derivative fairing functional, denotes the jth third-type second-order partial derivative fairing functional;

[0080] The above three fairing functionals are calculated as:

[0081]

[0082]

[0083]

[0084] C) The third-order derivative based fairing vector of the jth control point is calculated as:

[0085]

[0086] where N uuu,j (u,v), N uuv,j (u,v), N uvv,j (u,v) and N vvv,j (u,v) respectively represent the third-order derivative of the jth NURBS basis function N j (u,v), denotes the jth first-type third-order derivative fairing functional, denotes the jth second-type third-order derivative fairing functional, denotes the jth third-type third-order derivative fairing functional, denotes the jth fourth-type third-order derivative fairing functional.

[0087] The above four fairing functionals are calculated as:

[0088]

[0089]

[0090]

[0091]

[0092] In the specific implementation, the fairing weight ω j of the control point in step 3.3) can be different for each control point. In particular, when the fairing weight ω j is equal to a constant value, it is an energy-minimization fairing method.

[0093] After the iteration in step 6) is terminated, it is determined whether the current fairing effect and the fitting error meet the threshold value. If not, new nodes are inserted globally or locally, the fairing weight or the data parameterization is adjusted. Then the curve (surface) result of the previous iteration is used as the initial curve (surface) of the next iteration, and the iteration is continued until the requirements are met. In this way, a NURBS curve (surface) with high fairness and meeting the threshold value of the fitting error can be obtained.

[0094] The vehicle shell shape is a smooth shell part such as an airfoil wing shape, a ship body shape and a car engine cover, but is not limited thereto.

[0095] The present application realizes accurate fairing of a curve surface by adjusting fairing weights corresponding to control points, and improves flexibility and interactivity of fairing operation.

[0096] Compared with the background art, the present application has the following advantages:

[0097] 1. The present application uses rich parameters, i.e. a fairing weight corresponding to each control point, to finely adjust and improve fairing of a curve surface. The fairing weight can be adjusted to globally or locally control the fairing effect, thereby improving controllability of the model fairing process.

[0098] 2. The present application is an efficient and convergent iterative algorithm, which greatly reduces memory consumption of calculation. When all the fairing weights are equal, the present application is equivalent to an energy minimization fairing method.

[0099] 3. The present application is a flexible and interactive fairing algorithm, in which a user can change the weight of a control point, a node vector or data parameterization after each iteration, thereby greatly improving flexibility of the fairing process. BRIEF DESCRIPTION OF DRAWINGS

[0100] Figure 1 is a flowchart of the method of the present application.

[0101] Figure 2 is a set of data points of a wing section in Example 1, an initial set of control points and an initial fitting curve.

[0102] Figure 3 is a fitting curve and a curvature bar chart of the fitting curve in Example 1.

[0103] Figure 4 is a fairing curve and a curvature bar chart of the fairing curve in Example 1.

[0104] Figure 5 is a set of three-dimensional tooth data points in Example 2.

[0105] Figure 6 is a fitting surface and a zebra chart of the fitting surface in Example 2.

[0106] Figure 7 is a fairing surface and a zebra chart of the fairing surface in Example 2. DETAILED DESCRIPTION

[0107] The present application will be further described below in combination with the drawings and specific embodiments.

[0108] As shown in Figure 1 , an embodiment of the present application and an implementation process thereof are as follows:

[0109] Example 1:

[0110] This embodiment focuses on aircraft wings, obtaining a set of cross-sectional data points of the aircraft wing through 3D scanning, such as... Figure 2 As shown.

[0111] 1) Importing and parameterizing data points

[0112] Input the collected data point set Q i For data points i = 1, 2, ..., m, using the chord length parameterization method, assign corresponding parameter values ​​t1 ≤ t2 ≤ ... ≤ t m .

[0113] 2) Construction of the initial spline curve

[0114] Randomly select an initial control point P from the data points. j [0] For each j = 1, 2, ..., n, the initially fitted NURBS curve is obtained.

[0115]

[0116] Where, N j (t) is the j-th basis function. For example... Figure 2 As shown.

[0117] 3) Calculation of the fitted vector, smoothed vector, and difference vector.

[0118] First, calculate the NURBS curve P. [k] (t) and Q for each data point i The difference vector between

[0119]

[0120] Secondly, the difference vector corresponding to the data points in the support domain of a basis function is used to calculate the parameter values. Divide the data points into groups, and take the weighted sum of the differences between all the data points in the group. This sum is used as the fitting vector δ for the control points corresponding to this group of data points. j [k] The weights for the weighting are the j-th basis functions N. j (t) is the value of parameter t on the NURBS curve.

[0121] Then, set the light-compliant functional. Here, we choose r = 2. Based on the smooth functional... Obtain the smoothing vector η corresponding to each control point j [k] :

[0122]

[0123]

[0124] where t is the parameter of NURBS curve, ranging from [t1, t m ] and t m is the mth parameter value. is a smoothing functional, N 2,j (t) is the 2nd derivative of the jth basis function of NURBS curve, P l [k] is the lth control point in the kth iteration, N 1,l (t) is the 2nd derivative of the lth basis function of NURBS curve, n is the number of basis functions, is the smoothing vector of the jth control point after the kth iteration.

[0125] 4) Set the smoothing weight ω j of control points and calculate the difference vector B j of control points:

[0126]

[0127] 5) Update of control points

[0128] Adjust the control points according to the difference vector B j :

[0129]

[0130] where μ j is the normalization coefficient to ensure the convergence of iteration. and are the coordinates of the jth control point generated after the kth and k+1th iteration, respectively.

[0131] 6) Adjustment of nodes, smoothing weights or data parameters

[0132] After the whole iteration process reaches the stable stop, if the current smoothing curve does not meet the user's smoothing requirements and fitting accuracy ε fit , we can globally or locally insert some nodes, adjust the smoothing weight ω j or data parameters to further improve the degree of freedom of the whole mesh, reduce the fitting error or improve the smoothing effect.

[0133] A) For the area with larger fitting error, use the node insertion algorithm to insert nodes as needed to generate new control points.

[0134] B) Modify the smoothing weight ω j corresponding to each control point. ω jThe greater the value of ω, the better the smoothing effect. j The smaller the value of ω, the better the fitting effect.

[0135] C) Re-parameterization according to the geometric characteristics of the data points.

[0136] After the above modifications are completed, the results of the previous iteration are taken as the initial fitting curve, and the iteration is continued until the user's requirements are met, and the smoothing curve is output. As shown in Figure 4 .

[0137] The corresponding smoothing weights in the three blocks in Figure 3 are adjusted in turn to obtain the smoothing curve as shown in Figure 4 . The length of the curvature bar in the curvature bar diagram reflects the size of the curvature value of each point on the curve; the degree of change of the curvature bar reflects the degree of change of the curvature of the curve. As shown in Figure 4 , the curvature value of the smoothing curve is smaller, and the curvature changes more smoothly, i.e. the smoothing is better.

[0138] Example 2:

[0139] This embodiment is aimed at dental products, and the data point set of the teeth is obtained by three-dimensional scanning collection, as shown in Figure 5 .

[0140] 1) Import and parameterization of data points

[0141] The data point set Q ij obtained by inputting the collected data points is arranged in the order of two-dimensional direction on the surface, and the corresponding parameter values are {u i ,v j}, i = 1, 2,..., m1, j = 1, 2,..., m2, satisfying and The data points Q i , i = 1, 2,..., m are arranged in the order of two-dimensional direction on the surface, and the corresponding parameter values are (u i ,v i ), i = 1, 2,..., m.

[0142] 2) Construction of initial spline surface

[0143] Randomly select initial control points from the data points and arrange the control points in lexicographic order, denoted as:

[0144]

[0145]

[0146] The model equation of the NURBS surface is:

[0147]

[0148] 3) Calculation of fitting vector, smoothing vector and difference vector

[0149] First, calculate the difference vector between NURBS surface P [k] (u,v) and each data point Q i

[0150]

[0151] Second, divide the parameter values of the data points corresponding to the difference vector of each basis function in the support domain of the basis function into a group, and take the weighted sum of the difference vectors of all data points in the group as the fitting vector δ of the control point corresponding to the data points in the group. j [k] where the weight of the weight is the value of the jth basis function N j (u,v) at the parameter (u,v) of the NURBS surface.

[0152] Then, set the smoothing functional According to the smoothing functional obtain the smoothing vector η corresponding to each control point j [k] Here, the second-order partial derivative is used to calculate the smoothing vector.

[0153] The smoothing vector based on the second-order partial derivative of the jth control point is:

[0154]

[0155] In the formula: N uu,j (u,v), N uv,j (u,v) and N vv,j (u,v) represent the results of the second-order partial derivative of the jth NURBS basis function N j (u,v), denotes the jth first-order second-order partial derivative smoothing functional, denotes the jth second-order second-order partial derivative smoothing functional, denotes the jth third-order second-order partial derivative smoothing functional;

[0156] The above three smoothing functionals are calculated as:

[0157]

[0158]

[0159] ​​

[0160] 4) Set the fairing weight ω of control points j And calculate the difference vector B of control points j :

[0161]

[0162] 5) Update of control points

[0163] According to the difference vector B j Adjust the control points:

[0164]

[0165] Where μ j is the normalization coefficient, which ensures the convergence of iteration. And represent the coordinates of the jth control point generated after the kth and k+1th iterations, respectively.

[0166] 6) Adjustment of nodes, fairing weights or data parameterization

[0167] After the entire iteration process reaches a stable stop, if the current fairing surface does not meet the user's fairing requirements and fitting accuracy ε fit , we can globally or locally insert some nodes, adjust the fairing weight ω j or data parameterization, to further improve the degree of freedom of the entire mesh, reduce the fitting error or improve the fairing effect.

[0168] A) For areas with larger fitting errors, use the node insertion algorithm to insert nodes as needed to generate new control points.

[0169] B) Modify the fairing weight ω j corresponding to each control point. The larger the value of ω j , the better the fairing effect; the smaller the value of ω j , the better the fitting effect.

[0170] C) Re-parameterize according to the geometric characteristics of the data points.

[0171] After completing the above modifications, take the results of the previous iteration as the initial fitting surface and continue iteration until the user's requirements are met, and output the fairing surface.

[0172] The fairing surface and the zebra pattern of the fairing surface are shown in Figure 7 . Figure 6 is the fitting surface of the tooth model and the zebra pattern of the fitting surface. The density and curvature of the zebra pattern can reflect the degree of fairing of the surface, i.e. the wider, fewer turns and flatter the zebra pattern, the better the fairing of the surface. Compare Figure 6 and Figure 7The curved surface generated by the method has better smoothness.

Claims

1. A method for generating smooth NURBS curves and surfaces in the design of vehicle shells, characterized in that: The method includes the following steps: 1) Given the model equation of the fitted parameter model, the data point set is obtained by reverse engineering the shape of the vehicle shell. The data point set is parameterized to obtain the parameters of each data point. The node vector of the model equation is obtained by processing the parameters of each data point. Initial control points are selected, and the initial fitted parameter model is generated from the initial control points and the node vector of the model equation. 2) Based on the actual requirements of the smoothness of the vehicle's shell shape, the fitting parameter model and control points are iteratively optimized to obtain the optimal fitting parameter model; Step 2) specifically refers to: 2.1) Calculate the difference vector d between the fitted parameter model and each data point. i Let i represent the ordinal number of the data point, and let d be the difference vector d corresponding to the data points whose parameter values ​​are in the support domain of a basis function. i Divide into groups, with one control point for each group; then, for all the difference vectors in a group... By performing a weighted summation, the fitted vector of the corresponding control points is obtained. ; 2.2) Setting the smooth functional According to the light-compliant functional Obtain the smooth vector of each control point ; 2.3) Set the smoothness weight of the control points according to the actual requirements of the smoothness effect of the vehicle's exterior shape. And calculate the difference vector B of the control points. j : B j = Among them, B j Represents the difference vector of the j-th control point , superscript This represents the number of iterations. This represents the smoothing vector of the j-th control point obtained in the k-th iteration. , This represents the fitted vector of the j-th control point obtained in the k-th iteration. ; 2.4) Based on the results obtained in step 2.3), update the coordinates of the control points according to the following formula: ; In the formula: Here is the normalization coefficient for the j-th control point; Indicates the first The coordinates of the j-th control point in the next iteration; 2.5) Substitute the updated control point coordinates into the model equations of the fitting parameter model to generate a new fitting parameter model, and then calculate the relative iteration error of the current k-th iteration. : ; ; ; In the formula: For the number of iterations, It is the identity matrix. Indicates a smooth weight Let N be a diagonal matrix with diagonal elements, and N represent the configuration matrix. It is a matrix composed of data points. It is a matrix composed of the smoothed functionals from step 3). It is the order of the derivative of the basis functions in the model equations of the fitted parametric model. For the first The set of control points obtained after the next iteration Represents the first of the matrix Row; A represents the coefficient matrix, Indicates taking the first matrix. Elements in all columns of a row The norm squared is given by T, and the matrix transpose is given by T. The relative iteration error of the current k-th iteration. Relative iteration error compared to the previous (k-1)th iteration Comparison and judgment: If the difference between them is less than the preset difference threshold When the iteration terminates, the next step is performed. If the difference between them is not less than the preset difference threshold If the new fitting parameter model is reached, then return to step 2.1) for the next iteration; 2.6) Based on the fitting parameter model obtained from the iteration termination in the previous step, calculate the relative fitting error. : in, This represents the i-th data point, where i represents the index of the data point, and m represents the total number of data points. This represents the parameter of the i-th data point. This represents the value of the parameter corresponding to the i-th data point after the k-th iteration in the fitted parameter model; relative fitting error Fitting accuracy with the preset target Comparison and judgment: If relative fitting error The target fitting accuracy was not achieved. If necessary, adjust the node vectors of the model equations of the fitted parameter model and adjust the smoothing weights corresponding to the control points. Or adjust the parameterization of the data point set; Return to step 2.1) for the next iteration; If relative fitting error Achieve target fitting accuracy When the latest generated fitted parameter model is used as the final result, then...

2. The method for generating smooth NURBS curves and surfaces in the outer shell design of a vehicle according to claim 1, characterized in that: The fitting parameter model is a NURBS curve or a NURBS surface.

3. The method for generating smooth NURBS curves and surfaces in the outer shell design of a vehicle as described in claim 1, characterized in that: The fitting parameter model is a NURBS curve, and the model equation for the NURBS curve in step 1) is: In the formula: Let j be the initial control point. For the parameters of the NURBS curve, Indicates the first There are basis functions, where n represents the total number of control points; This represents the initial NURBS curve, where the superscript [0] indicates the initial fitted curve, and t represents the curve parameters.

4. The method for generating smooth NURBS curves and surfaces in the shape of a vehicle shell as described in claim 1, characterized in that: The fitting parameter model is a NURBS curve, and step 2.1) specifically involves: First, calculate the NURBS curve using the following formula. With each data point The difference vector between : in, This represents the value of the fitted parameter model corresponding to the parameter value of the i-th data point after the k-th iteration. This represents the difference vector corresponding to the i-th data point after the k-th iteration; Then, the difference vector corresponding to the data points in the support domain of a basis function is used to determine the parameter values. Divide the data points into groups, and take the weighted sum of the differences between all the data points in the group. This sum is used as the fitting vector for the control points corresponding to this group of data points. The weighted average value is the first... basis functions Parameters of NURBS curves The value at; 2.2) Setting the smooth functional According to the light-compliant functional Obtain the smooth vector of each control point .

5. The method for generating smooth NURBS curves and surfaces in the outer shell design of a vehicle as described in claim 1, characterized in that: The fitting parameter model is a NURBS curve. In step 2.2), the following formula is used to obtain the first... Smoothing vectors of control points: In the formula: The parameters for the NURBS curve are in the range of , This represents the value of the m-th parameter. This represents the smooth functional constructed using the r-th derivative of the j-th basis function with respect to the r-th derivative of the l-th basis function. , This indicates the NURBS curve's first... Find the basis functions The result of the first derivative, Let l be the l-th control point in the k-th iteration. This indicates the NURBS curve's first... Find the basis functions The result of the first derivative, where n represents the number of basis functions. This indicates the result after the k-th iteration. Smooth vectors of control points.

6. The method for generating smooth NURBS curves and surfaces in the outer shell design of a vehicle as described in claim 1, characterized in that: The fitting parameter model is a NURBS surface. In step 1), the data point set and corresponding parameter values ​​related to the surface are arranged in order along two dimensions of the surface. The basis functions and control points are also arranged in lexicographical order, as follows: In the formula: These are two directional parameters on the NURBS surface. On NURBS surfaces Number of control points for direction; They represent the first in the u direction respectively. The basis function, the one in the v direction basis functions Indicates the first on the control grid Line number The coordinates of the control points corresponding to the column. This indicates the order of all control points according to the above rules. One control point, This represents the order of all basis functions according to the above rules. One basis function; The model equations for the NURBS surface are: In the formula: Let j be the initial control point. Indicates the first basis functions , basis functions Parameter values; This represents the initial NURBS surface.

7. The method for generating smooth NURBS curves and surfaces in the outer shell design of a vehicle as described in claim 1, characterized in that: The fitting parameter model is a NURBS surface, and step 2.1) specifically involves: First, calculate the NURBS surface using the following formula. With each data point The difference vector between : in, This represents the difference vector corresponding to the i-th data point after the k-th iteration. This represents the value of the fitted parameter model corresponding to the parameter value of the i-th data point after the k-th iteration; Then, the difference vector corresponding to the data points in the support domain of a basis function is used to determine the parameter values. Divide the data points into groups, and take the weighted sum of the differences between all the data points in the group to obtain the fitting vector for the control points corresponding to that group. The weighted average value is the first... basis functions Parameters of NURBS surfaces The value at that location.

8. The method for generating smooth NURBS curves and surfaces in the outer shell design of a vehicle as described in claim 1, characterized in that: The fitting parameter model is a NURBS surface. In step 2.2), one of the following is selected to obtain the smoothing vector of the control point: a smoothing vector based on the first-order partial derivative, a smoothing vector based on the second-order partial derivative, or a smoothing vector based on the third-order partial derivative. These are: A) No. The smoothing vector based on the first-order partial derivative of each control point is calculated as follows: In the formula: For NURBS surfaces The two dimensional direction parameters on, The NURBS surface is located along two directions. The number of control points on the surface; Let l represent the l-th control point in the k-th iteration, where l represents the ordinal number of the control point. Represents the k-th iteration after the k-th iteration. Smoothing vectors corresponding to each control point; , These represent the NURBS surfaces at the 1st, 2nd, and 3rd positions, respectively. basis functions In two directions The result of taking the first-order partial derivative on, express Direction A first-order polarimetric optically compliant functional express Direction A first-order polarizing optical conventional functional; The two smooth functionals mentioned above are calculated as follows: ; in, express Direction Parameter values, express Direction Parameter values, Indicates the ordinal number of the data point; B) The smoothing vector based on the second-order partial derivative of each control point is calculated as follows: In the formula: and They represent the first, second, and third parts respectively. NURBS basis functions Find the result of the second-order partial derivative. Indicates the first A first-order second-order partial-derived optically compliant functional. Indicates the first A second-order second-order partial-derived optically compliant functional of the second kind. Indicates the first A third-order second-order polarized optical conventional functional; The above three compliant functionals are calculated as follows: ; C) The smoothing vector based on the third-order partial derivative of each control point is calculated as follows: ; In the formula: and They represent the first... NURBS basis functions Find the result of the third-order partial derivative. Let j represent the j-th third-order partial derivative optically compliant functional of the first kind. Let j represent the j-th third-order partial derivative optically compliant functional of the second kind. Let j represent the j-th third-order partial derivative optically compliant functional of the third kind. Denotes the j-th third-order partial-guided optical conventional functional of the fourth kind; The above four compliant functionals are calculated as follows: 。