NURBS approximation method and system for curved surface of pipeline part
By calculating the geometric features and distribution functions of pipeline parts, selecting feature points for NURBS approximate surface calculation, and adjusting weights through errors, the problem of low accuracy in pipeline part surface approximation in the existing technology is solved, and high-precision and efficient NURBS approximation is achieved.
Patent Information
- Application Number
- CN202510731031.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-19
AI Technical Summary
The existing NURBS approximation method for swept surfaces has problems such as low approximation accuracy and a large number of control points on the surfaces of pipe parts, which makes it difficult to meet the needs of precision design.
By obtaining the parameter information of pipeline parts, calculating the geometric feature information, establishing the distribution function, selecting feature points to calculate the NURBS approximate surface, and adjusting the weight through error, the approximate surface is iteratively optimized to improve the accuracy.
The high reliability and high precision NURBS approximation of the pipeline part surface is achieved, the number of control points is reduced, and the approximation effect and calculation efficiency are improved.
Smart Images

Figure CN120671289A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of electrical digital signal processing, and in particular relates to a NURBS approximation method and system for a pipeline part surface. Background Art
[0002] Sweeping is the process of moving a cross-sectional curve along a path. During the sweeping process, the surface formed by the collection of cross-sectional curves at each position is called a swept surface. Due to its simplicity and intuitive nature, it allows designers to easily transform 3D surface design problems into curve design problems. Sweeping technology has become one of the most commonly used solid modeling methods, widely used in fields such as shipbuilding, automotive design, and CNC machining of precision parts.
[0003] Currently, non-uniform rational B-splines (NURBS) are widely used in computer-aided design. While cross-sectional curves and paths are represented using NURBS, swept surfaces are often not accurately represented using NURBS. Therefore, obtaining efficient NURBS approximations of swept surfaces has become a research priority.
[0004] At present, the NURBS approximation method for swept surfaces often uses the number of control points and the approximation error as evaluation criteria. The earliest NURBS approximation method for swept surfaces was implemented by offsetting the path based on the information of the cross-sectional curve. Later, approximation schemes such as methods based on skinning operations and methods that use special curves to approximate the path appeared one after another. However, this type of method is relatively simple in selecting path feature points. Generally, the midpoint of the longest interval of the path node vector is used as the new feature point, ignoring the consideration of the swept surface characteristics. In recent years, methods based on surface area and curvature sampling have emerged, but this method pays less attention to surface information. In some complex paths, inaccurate sampling may occur, resulting in low approximate surface accuracy.
[0005] Pipeline component surfaces are typical swept surfaces, and precision design often requires high-precision NURBS approximation. However, existing NURBS approximation methods for swept surfaces suffer from low approximation accuracy and a large number of control points. This also applies to NURBS approximation of pipe component surfaces. Summary of the Invention
[0006] One of the purposes of the present invention is to provide a NURBS approximation method for pipeline part surfaces with high reliability and good accuracy.
[0007] A second object of the present invention is to provide a system for implementing the NURBS approximation method of the pipeline part surface.
[0008] The NURBS approximation method for the pipe part surface provided by the present invention comprises the following steps:
[0009] S1. Obtain parameter information of the target pipeline part;
[0010] S2. Calculate the geometric feature information of the target pipeline part according to the parameter information obtained in step S1;
[0011] S3. Based on the geometric feature information calculated in step S2, a distribution function is calculated to measure the degree of irregularity of the pipe part surface;
[0012] S4. According to the distribution function obtained in step S3, feature points are selected from the path sampling points, and the cross-sectional curve is placed based on the feature points, and the NURBS approximate surface is calculated;
[0013] S5. According to the NURBS approximation surface obtained in step S4, the error of each NURBS approximation surface at each sampling point is calculated and the calculation parameters are adjusted;
[0014] S6. Estimating the accuracy of the approximate surface and making calculation adjustments based on the accuracy estimation results to complete the NURBS approximation of the final target pipeline part surface.
[0015] The step S1 of obtaining parameter information of the target pipeline component specifically includes the following steps:
[0016] Obtain parameter information of target pipeline parts;
[0017] The parameter information includes the cross-sectional curve of the target pipeline part and the sampling points of the path curve.
[0018] Step S2, in which the geometric feature information of the target pipeline part is calculated based on the parameter information obtained in step S1, specifically includes the following steps:
[0019] The cross-section curve obtained in step S1 is a non-uniform rational B-spline curve on the XY plane, and the path curve is a non-uniform B-spline curve in the OXYZ space;
[0020] Based on the parameter values of the cross-section curve C(u) and the path curve T(v), equal parameter sampling is performed to obtain several cross-section curve sampling points. and path curve sampling points
[0021] Using the double reflection method, calculate the minimum rotation frame at each path sampling point Based on the minimum rotation frame, calculate the sampling points p on the pipe part surface formed by sweeping the section curve along the path curve ij for
[0022] Use the triangle patch approximation scheme to estimate the four adjacent sampling points p ij 、p (i+1)j 、p i(j+1) and p (i+1)(j+1) The surface area a between ij for in is the sampling point p ij 、p i(j+1) 、p (i+1)j The area of the triangle formed, is the sampling point p (i+1)(j+1) 、p i(j+1) 、p (i+1)j The area of the triangle formed;
[0023] The v-direction discrete curvature is calculated using the forward difference approximate derivative method for in is the sampling point p ij The forward first-order difference in the v direction is: is the sampling point p ij The forward second-order difference in the v direction, |||| is the calculation symbol of the vector modulus; the discrete curvature in the u direction is the curvature value of the cross-section curve at the corresponding parameter value; calculate the discrete curvature κ of the surface ij for
[0024] Using the chord length, calculate the first-order derivative r in the v direction j for in is the number of sampling points in u direction;
[0025] The first-order derivative rotation angle b in the v direction is calculated by using the first-order derivative rotation angle of the two points before and after. j for Where angle(a,b) is the angle between vector a and vector b.
[0026] Step S3, based on the geometric feature information calculated in step S2, calculates a distribution function for measuring the irregularity of the pipe part surface, specifically comprising the following steps:
[0027] Calculate the v-direction cumulative surface area A j for where a i is the area of the v-direction surface, and a i =∑ j a ji ;
[0028] Calculate the v-direction cumulative discrete curvature Kj for where κ i is the average discrete curvature in the v direction, and
[0029] Calculate the v-direction cumulative first-order derivative R j for where r i is the first-order derivative in v direction;
[0030] Calculate the cumulative first-order derivative change angle B in the v direction j for where b i is the first-order derivative rotation angle in v direction;
[0031] Calculate the distribution function based on the geometric characteristics of the target pipe part surface for in, is the number of sampling points in the v direction, ω a is the cumulative surface area weight in the v direction, ω k is the cumulative discrete curvature weight in v direction, ω r is the cumulative first-order derivative weight in v direction, ω b is the cumulative first-order derivative change angle weight in the v direction, and ω a +ω k +ω r +ω b =1.
[0032] Step S4, based on the distribution function obtained in step S3, selects feature points from the path sampling points, places the cross-section curve based on the feature points, and calculates the NURBS approximate surface, which specifically includes the following steps:
[0033] Set the number of feature points n;
[0034] Sampling points from a path curve Select feature point sequence ensure satisfy Where ε is the set fluctuation threshold;
[0035] The v-direction node vector {v j}:
[0036]
[0037] Among them, d v is the number of paths;
[0038] Calculate the control point position of the cross-section curve to each feature point for Among them, P iu is the i-th control point of the cross-section curve;
[0039] Calculate the weight ω of the NURBS approximate surface ij ω ij =ω i ,ω i is the weight of the control point corresponding to the cross-section curve; u takes the node vector of the cross-section curve {v i} i=0,…,m-1 ;
[0040] According to the calculation formula of the swept surface S(u,v)=T(v)+M(v)C(u) and the position of the control point Establishing a system of linear equations in The node vector is {v j}kth d v The B-spline basis function is at the parameter value The value of It is the control point group of NURBS approximate surface;
[0041] By inverting the linear equations, we can get for
[0042]
[0043] Finally, the NURBS approximate surface of the target pipeline part is obtained
[0044] Step S5, based on the NURBS approximate surface obtained in step S4, calculates the error of each NURBS approximate surface at each sampling point and adjusts the calculation parameters, specifically including the following steps:
[0045] Calculate the NURBS approximate surface of the target pipeline part obtained in step S4 The error e at each sampling point ij for in is the parameter value corresponding to the path sampling point, || || is the calculation symbol of the vector modulus;
[0046] According to the error e ij , use the following formula to adjust the weight of the distribution function:
[0047]
[0048] Where ω' a is the adjusted v-direction cumulative surface area weight; ω' k is the adjusted v-direction cumulative discrete curvature weight; ω' ris the adjusted v-direction cumulative first-order derivative weight; ω' b is the adjusted v-direction cumulative first-order derivative change angle weight, m is the number of control points of the cross-section curve, is the number of sampling points in the v direction;
[0049] Adjusted ω' a 、ω' k 、ω' r and ω' b After sum normalization, it is used to recalculate the distribution function And calculate the NURBS approximate surface of the target pipeline part again;
[0050] Each time the number of feature points n changes, step S5 is executed once and only once.
[0051] The accuracy estimation of the approximate surface described in step S6 and the calculation and adjustment based on the accuracy estimation result to complete the NURBS approximation of the final target pipeline part surface specifically include the following steps:
[0052] By sampling the same parameters, the approximate error of the NURBS approximate surface of the target pipeline part is calculated. for
[0053]
[0054] like Then, return to step S4, increase the number of feature points, and calculate the NURBS approximate surface of the target pipeline part again;
[0055] like The iteration ends, and the final NURBS approximate surface of the target pipeline part is obtained, completing the NURBS approximation of the target pipeline part surface.
[0056] The present invention also provides a system for implementing the NURBS approximation method of the pipeline part surface, comprising a parameter acquisition module, a geometry calculation module, a function calculation module, an approximate surface calculation module, a parameter adjustment module and a surface approximation module; the parameter acquisition module, the geometry calculation module, the function calculation module, the approximate surface calculation module, the parameter adjustment module and the surface approximation module are connected in series in sequence; the parameter acquisition module is used to acquire parameter information of the target pipeline part and upload the data information to the geometry calculation module; the geometry calculation module is used to calculate the geometric feature information of the target pipeline part according to the received data information and the acquired parameter information, and upload the data information to the function calculation module; the function calculation module is used to calculate the geometric feature information for measuring the received data information according to the calculated geometric feature information The distribution function of the irregularity of the pipeline part surface is used to calculate the distribution function, and upload the data information to the approximate surface calculation module; the approximate surface calculation module is used to select feature points from the path sampling points according to the received data information and the obtained distribution function, and place the cross-section curve based on the feature points, and calculate the NURBS approximate surface, and upload the data information to the parameter adjustment module; the parameter adjustment module is used to calculate the error of each NURBS approximate surface at each sampling point according to the received data information and the obtained NURBS approximate surface, and adjust the calculation parameters, and upload the data information to the surface approximation module; the surface approximation module is used to estimate the accuracy of the approximate surface according to the received data information, and perform calculation adjustments based on the accuracy estimation results to complete the NURBS approximation of the final target pipeline part surface.
[0057] The NURBS approximation method and system for the pipe part surface provided by the present invention not only achieves NURBS approximation of the pipe part surface by calculating the geometric feature information and distribution function of the target pipe part, and iteratively calculates the NURBS approximation surface based on error and accuracy, but also has higher reliability and better accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 Schematic diagram of the process of the present invention.
[0059] Figure 2 A schematic diagram illustrating an embodiment of the method of the present invention.
[0060] Figure 3 Schematic diagram comparing error changes of an embodiment of the method of the present invention at different sampling multiples.
[0061] Figure 4 The figure is a visual comparison diagram of the method of the present invention and the existing solution when the sampling multiple is 10 on a simple cross-section curve along a complex path.
[0062] Figure 5Schematic diagram of the functional modules of the system of the present invention. DETAILED DESCRIPTION
[0063] like Figure 1 The figure shows a schematic flow chart of the method of the present invention: the NURBS approximation method for the pipe part surface provided by the present invention comprises the following steps:
[0064] S1. Obtain parameter information of the target pipeline component; specifically, the steps include:
[0065] Obtain parameter information of target pipeline parts;
[0066] The parameter information includes the cross-sectional curve and the sampling points of the path curve of the target pipeline part;
[0067] S2. Calculate the geometric feature information of the target pipeline part based on the parameter information obtained in step S1; specifically, the steps include:
[0068] The cross-section curve obtained in step S1 is a non-uniform rational B-spline curve on the XY plane, and the path curve is a non-uniform B-spline curve in the OXYZ space;
[0069] Based on the parameter values of the cross-section curve C(u) and the path curve T(v), equal parameter sampling is performed to obtain several cross-section curve sampling points. and path curve sampling points
[0070] Using the double reflection method, calculate the minimum rotation frame at each path sampling point Based on the minimum rotation frame, calculate the sampling points p on the pipe part surface formed by sweeping the section curve along the path curve ij for
[0071] Use the triangle patch approximation scheme to estimate the four adjacent sampling points p ij 、p (i+1)j 、p i(j+1) and p (i+1)(j+1) The surface area a between ij for in is the sampling point p ij 、p (i+1)j 、p i(j+1) The area of the triangle formed, is the sampling point p (i+1)(j+1) 、p (i+1)j 、p i(j+1) The area of the triangle formed;
[0072] The v-direction discrete curvature is calculated using the forward difference approximate derivative method for in is the sampling point p ij The forward first-order difference in the v direction is: is the sampling point p ij The forward second-order difference in the v direction, |||| is the calculation symbol of the vector modulus; the discrete curvature in the u direction is the curvature value of the cross-section curve at the corresponding parameter value; calculate the discrete curvature κ of the surface ij for
[0073] Using the chord length, calculate the first-order derivative r in the v direction j for in is the number of sampling points in u direction;
[0074] The first-order derivative rotation angle b in the v direction is calculated by using the first-order derivative rotation angle of the two points before and after. j for angle(a,b) is the angle between vector a and vector b;
[0075] S3. Based on the geometric feature information calculated in step S2, a distribution function is calculated to measure the irregularity of the pipe part surface; specifically, the steps include:
[0076] Calculate the v-direction cumulative surface area A j for where a i is the area of the v-direction surface, and a i =∑ j a ji ;
[0077] Calculate the v-direction cumulative discrete curvature K j for where κ i is the average discrete curvature in the v direction, and
[0078] Calculate the v-direction cumulative first-order derivative R j for where r i is the first-order derivative in v direction;
[0079] Calculate the cumulative first-order derivative change angle B in the v direction j for where b i is the first-order derivative rotation angle in v direction;
[0080] Calculate the distribution function based on the geometric characteristics of the target pipe part surface for in, is the number of sampling points in the v direction, ωa is the cumulative surface area weight in the v direction, ω k is the cumulative discrete curvature weight in v direction, ω r is the cumulative first-order derivative weight in v direction, ω b is the cumulative first-order derivative change angle weight in the v direction, and ω a +ω k +ω r +ω b =1; during initialization, as a preferred solution, ω a 、ω k 、ω r and ω b The initial values of are all set to 0.25;
[0081] S4. According to the distribution function obtained in step S3, feature points are selected from the path sampling points, and cross-sectional curves are placed based on the feature points, and a NURBS approximate surface is calculated; specifically, the following steps are included:
[0082] Set the number of feature points n;
[0083] Sampling points from a path curve Select feature point sequence from ensure satisfy Where ε is the set fluctuation threshold (a small real number to ensure are roughly equal).
[0084] The v-direction node vector {v j}:
[0085]
[0086] Among them, d v is the number of paths;
[0087] Calculate the control point position of the cross-section curve to each feature point for Among them, P i u is the i-th control point of the cross-section curve;
[0088] Calculate the weight ω of the NURBS approximate surface ij ω ij =ω i ,ω i is the weight of the control point corresponding to the cross-section curve; u takes the node vector of the cross-section curve {v i} i=0,…,m-1 ;
[0089] According to the calculation formula of the swept surface S(u,v)=T(v)+M(v)C(u) and the position of the control point Establishing a system of linear equations in The node vector is {v j}kth d v The B-spline basis function is at the parameter value The value of It is the control point group of NURBS approximate surface;
[0090] By inverting the linear equations, we can get for
[0091] Finally, the NURBS approximate surface of the target pipeline part is obtained
[0092] S5. Based on the NURBS approximate surface obtained in step S4, calculate the error of each NURBS approximate surface at each sampling point and adjust the calculation parameters; specifically, the steps include:
[0093] Calculate the NURBS approximate surface of the target pipeline part obtained in step S4 The error e at each sampling point ij for in is the parameter value of the path sampling point, || || is the calculation symbol of the vector modulus;
[0094] According to the error e ij , use the following formula to adjust the weight of the distribution function:
[0095]
[0096] Where ω' a is the adjusted v-direction cumulative surface area weight; ω' k is the adjusted v-direction cumulative discrete curvature weight; ω' r is the adjusted v-direction cumulative first-order derivative weight; ω' b is the adjusted v-direction cumulative first-order derivative change angle weight, m is the number of control points of the cross-section curve, is the number of sampling points in the v direction;
[0097] Adjusted ω' a 、ω' k 、ω' r and ω' b After sum normalization, it is used to recalculate the distribution function And calculate the NURBS approximate surface of the target pipeline part again;
[0098] Each time the number of feature points n changes, step S5 is executed once and only once; for example, when the number of feature points n changes, step S4 is executed and the NURBS approximate surface of the target pipe part is calculated, and then step S5 is executed to calculate the adjusted ω' a 、ω' k 、ω' r and ω' b , recalculate the distribution function after sum normalization Then, the process returns to step S4 to calculate the NURBS approximate surface of the target pipe part again. At this time, the technical content of step S5 is no longer executed, and the process directly jumps to step S6.
[0099] S6. Estimating the accuracy of the approximate surface and making calculation adjustments based on the accuracy estimation results to complete the NURBS approximation of the target pipe part surface. Specifically, the steps include:
[0100] By sampling the same parameters, the approximate error of the NURBS approximate surface of the target pipeline part is calculated. for
[0101] like Then, the process returns to step S4, increases the number of feature points, and recalculates the NURBS approximate surface of the target pipe part; as a preferred solution, the number of feature points increased is the number of control points of the path;
[0102] like The iteration ends, and the final NURBS approximate surface of the target pipeline part is obtained, completing the NURBS approximation of the target pipeline part surface.
[0103] The method of the present invention is further described below with reference to the following embodiments:
[0104] Figure 2 The four models used in this application are obtained by combining two types of cross-section curves and two types of path curves, wherein Figure 2 (a) is a simple cross-section curve along a simple path, Figure 2 (b) is a simple cross-section curve along a complex path, Figure 2 (c) is a complex cross-section curve along a simple path, Figure 2 (d) is a complex cross-sectional curve along a complex path. The closed curve at the bottom of the figure is the cross-sectional curve, and the vertical curve in the figure is the path curve.
[0105] Inspection indicators:
[0106] Surface error: Similar to the error calculation index, the path is uniformly sampled at several (preferably 10,000) sampling points along the parameter direction, and the bias error of the path is calculated to estimate the error between the NURBS approximate surface and the ideal swept surface;
[0107] Since the number of V-direction control points calculated by inversely calculating the linear equations is consistent with the number of selected feature points, the results on four models when the number of approximate surface control points and the accuracy of the approximate surface are specified are taken as an example. Compared with previous related work, the error results are as follows:
[0108] Comparison methods include:
[0109] The Piegl et al. method, described in the book "The NURBS Book," adds control points by continuously subdividing the node vectors of the path, thereby achieving a high-precision NURBS approximation of the swept surface.
[0110] The Pagani et al. method, proposed in their 2018 paper "Curvature-based sampling of curves and surfaces," published in the journal Computer Aided Geometric Design. This method calculates a distribution function based on surface area and curvature, thereby performing sampling.
[0111] Approximation error for a specified number of control points: Figure 3 The error change diagram of the four models when the feature point sampling multiple is 1-10, where Figure 3 (a) is a schematic diagram showing the error variation of a simple cross-section curve along a simple path. Figure 3 (b) is a schematic diagram showing the error variation of a simple cross-section curve along a complex path. Figure 3 (c) is a schematic diagram comparing the error changes of complex cross-section curves along simple paths. Figure 3 (d) is a schematic diagram showing the comparison of error changes of complex cross-section curves along complex paths; Figure 3 Here, the sampling factor refers to the sampling factor of the number of path control points. It can be seen that the Piegl et al. method performs well when the number of feature points is small, but as the number of feature points increases, the error rate decreases and convergence tends to stagnate. This is because the Piegl et al. method does not utilize information from the swept surface, making it difficult to capture feature points that affect surface accuracy during the addition of feature points. As the sampling factor increases, the method of the present invention demonstrates the advantages of fast convergence and small surface error.
[0112] Figure 4The visualization results of the three methods when the sampling multiple is 10 on a simple cross-section curve along a complex path model are shown below. Figure 4 (a) is a schematic diagram of the approximate effect of the Piegl et al method. Figure 4 (b) is a schematic diagram of the approximate effect of the Pagani et al method. Figure 4 (c) is a schematic diagram of the approximate effect of the method of the present invention; Figure 4 As can be seen, both the Piegl et al. method and the Pagani et al. method exhibit significant errors in areas with large surface variations. While using the same number of control points, the proposed method is more effective in capturing surface irregularities and, by selecting feature points at appropriate locations, produces a more accurate NURBS approximation surface.
[0113] NURBS approximation error at specified precision: As shown in Table 1, the error of each method on four models and the corresponding number of v-direction control points when the specified precision is 0.001 are shown:
[0114] Table 1 Error analysis data when the specified accuracy is 0.001
[0115]
[0116] It can be seen from Table 1 that the method of the present invention uses fewer control points when achieving NURBS approximation of a specified accuracy, and the error is smaller when the same number of control points is used.
[0117] The present invention uses the surface area, discrete curvature, first-order derivative and rotation angle of the first-order derivative of the pipeline part surface to represent the geometric characteristics of the pipeline part surface, and establishes a distribution function to measure the irregularity of the surface, while adjusting the weights for different samples. Then, the path feature points are selected according to the distribution function, and the control point group of the approximate surface is obtained by the inverse calculation method. Finally, the feature points are added by estimating the error of the approximate surface. Thereby, a NURBS approximate surface that meets the specified accuracy or the specified number of control points is generated. Experimental results show that the scheme of the present invention can effectively improve the approximation effect of the pipeline part surface. Compared with similar methods, the method of the present invention has a smaller approximation error when the number of specified feature points is large, and can use fewer feature points to generate an approximate surface of considerable accuracy, and has better stability.
[0118] In addition, the method of the present invention is also applicable to the approximation of other swept surface parts, such as the calculation of the surface of ship parts, the calculation of the motion trajectory of simple objects, and spring parts. By calculating the geometric characteristics of the surface to establish a distribution function, the path feature points are selected based on the distribution function and the requirements, and the linear equation system is inversely calculated to obtain the approximate surface information, thereby achieving efficient NURBS approximation of the swept surface.
[0119] The method of this invention has practical significance. In the machining of some precision parts, high approximation accuracy of part surfaces is required. By utilizing the geometric characteristics of the swept surface for path sampling, the irregularities of the swept surface can be better captured, and an approximate surface of the required accuracy can be constructed with fewer control points. This makes it easier for researchers to make adjustments based on the original surface and reduces subsequent computational overhead.
[0120] like Figure 5 The figure shows a schematic diagram of the functional modules of the system of the present invention: the system disclosed in the present invention for realizing the NURBS approximation method of the pipeline part surface comprises a parameter acquisition module, a geometry calculation module, a function calculation module, an approximate surface calculation module, a parameter adjustment module and a surface approximation module; the parameter acquisition module, the geometry calculation module, the function calculation module, the approximate surface calculation module, the parameter adjustment module and the surface approximation module are connected in series in sequence; the parameter acquisition module is used to acquire the parameter information of the target pipeline part and upload the data information to the geometry calculation module; the geometry calculation module is used to calculate the geometric feature information of the target pipeline part according to the received data information and the acquired parameter information, and upload the data information to the function calculation module; the function calculation module is used to calculate the geometric feature information obtained according to the received data information, A distribution function is calculated to measure the degree of irregularity of the pipeline part surface, and the data information is uploaded to the approximate surface calculation module; the approximate surface calculation module is used to select feature points from the path sampling points according to the received data information and the obtained distribution function, and place the cross-section curve based on the feature points, and calculate the NURBS approximate surface, and upload the data information to the parameter adjustment module; the parameter adjustment module is used to calculate the error of each NURBS approximate surface at each sampling point according to the received data information and the obtained NURBS approximate surface, and adjust the calculation parameters, and upload the data information to the surface approximation module; the surface approximation module is used to estimate the accuracy of the approximate surface according to the received data information, and perform calculation adjustments based on the accuracy estimation results to complete the NURBS approximation of the final target pipeline part surface.
Claims
1. A NURBS approximation method for a pipe part surface, comprising the following steps: S1. Obtain parameter information of the target pipeline part; S2. Calculate the geometric feature information of the target pipeline part according to the parameter information obtained in step S1; S3. Based on the geometric feature information calculated in step S2, a distribution function is calculated to measure the degree of irregularity of the pipe part surface; S4. According to the distribution function obtained in step S3, feature points are selected from the path sampling points, and the cross-sectional curve is placed based on the feature points, and the NURBS approximate surface is calculated; S5. According to the NURBS approximation surface obtained in step S4, the error of each NURBS approximation surface at each sampling point is calculated and the calculation parameters are adjusted; S6. Estimating the accuracy of the approximate surface and making calculation adjustments based on the accuracy estimation results to complete the NURBS approximation of the final target pipeline part surface.
2. The NURBS approximation method for pipeline part surfaces according to claim 1 is characterized in that The step S1 of obtaining parameter information of the target pipeline component specifically includes the following steps: Obtain parameter information of target pipeline parts; The parameter information includes the cross-sectional curve of the target pipeline part and the sampling points of the path curve.
3. The NURBS approximation method for the pipe part surface according to claim 2 is characterized in that Step S2, in which the geometric feature information of the target pipeline part is calculated based on the parameter information obtained in step S1, specifically includes the following steps: The cross-section curve obtained in step S1 is a non-uniform rational B-spline curve on the XY plane, and the path curve is a non-uniform B-spline curve in the OXYZ space; Based on the parameter values of the cross-section curve C(u) and the path curve T(v), equal parameter sampling is performed to obtain several cross-section curve sampling points. and path curve sampling points Using the double reflection method, calculate the minimum rotation frame at each path sampling point Based on the minimum rotation frame, calculate the sampling points p on the pipe part surface formed by sweeping the section curve along the path curve ij for Use the triangle patch approximation scheme to estimate the four adjacent sampling points p ij 、p (i+1)j 、p i(j+1) and p (i+1)(j+1) The surface area a between ij for in is the sampling point p ij 、p (i+1)j 、p i(j+1) The area of the triangle formed, is the sampling point p (i+1)(j+1) 、p (i+1)j 、p i(j+1) The area of the triangle formed; The v-direction discrete curvature is calculated using the forward difference approximate derivative method for in is the sampling point p ij The forward first-order difference in the v direction is: is the sampling point p ij The forward second-order difference in the v direction, || || is the calculation symbol of the vector modulus; the discrete curvature in the u direction is the curvature value of the cross-section curve at the corresponding parameter value; calculate the discrete curvature κ of the surface ij for Using the chord length, calculate the first-order derivative r in the v direction j for in is the number of sampling points in u direction; The first-order derivative rotation angle b in the v direction is calculated by using the first-order derivative rotation angles of the two points before and after. j for angle(a,b) calculates the angle between vector a and vector b.
4. The NURBS approximation method for the pipe part surface according to claim 3 is characterized in that Step S3, based on the geometric feature information calculated in step S2, calculates a distribution function for measuring the irregularity of the pipe part surface, specifically comprising the following steps: Calculate the v-direction cumulative surface area A j for where a i is the area of the v-direction surface, and a i =∑ j a ji ; Calculate the v-direction cumulative discrete curvature K j for where κ i is the average discrete curvature in the v direction, and Calculate the v-direction cumulative first-order derivative R j for where r i is the first-order derivative in v direction; Calculate the cumulative first-order derivative change angle B in the v direction j for where b i is the first-order derivative rotation angle in v direction; Calculate the distribution function based on the geometric characteristics of the target pipe part surface for in, is the number of sampling points in the v direction, ω a is the cumulative surface area weight in the v direction, ω k is the cumulative discrete curvature weight in v direction, ω r is the cumulative first-order derivative weight in v direction, ω b is the cumulative first-order derivative change angle weight in the v direction, and ω a +ω k +ω r +ω b =1.
5. The NURBS approximation method for the pipe part surface according to claim 4 is characterized in that Step S4, based on the distribution function obtained in step S3, selects feature points from the path sampling points, places the cross-section curve based on the feature points, and calculates the NURBS approximate surface, which specifically includes the following steps: Set the number of feature points n; Sampling points from a path curve Select feature point sequence ensure satisfy Where ε is the set fluctuation threshold; The v-direction node vector {v j }: Among them, d v is the number of paths; Calculate the control point position of the cross-section curve to each feature point for Among them, P i u is the i-th control point of the cross-section curve; Calculate the weight ω of the NURBS approximate surface ij ω ij =ω i ,ω i is the weight of the control point corresponding to the cross-section curve; u takes the node vector of the cross-section curve {v i } i=0,...,m-1 ; According to the calculation formula of the swept surface S(u,v)=T(v)+M(v)C(u) and the position of the control point Establishing a system of linear equations in The node vector is {v j }kth d v The B-spline basis function is at the parameter value The value of It is the control point group of NURBS approximate surface; By inverting the linear equations, we can get for Finally, the NURBS approximate surface of the target pipeline part is obtained 6. The NURBS approximation method for pipeline part surfaces according to claim 5, characterized in that Step S5, based on the NURBS approximate surface obtained in step S4, calculates the error of each NURBS approximate surface at each sampling point and adjusts the calculation parameters, specifically including the following steps: Calculate the NURBS approximate surface of the target pipeline part obtained in step S4 The error e at each sampling point ij for in is the parameter value of the path sampling point, || || is the calculation symbol of the vector modulus; According to the error e ij , use the following formula to adjust the weight of the distribution function: Where ω' a is the adjusted v-direction cumulative surface area weight; ω' k is the adjusted v-direction cumulative discrete curvature weight; ω r ' is the adjusted v-direction cumulative first-order derivative weight; ω' b is the adjusted v-direction cumulative first-order derivative change angle weight, m is the number of control points of the cross-section curve, is the number of sampling points in the v direction; Adjusted ω' a 、ω' k 、ω r 'and ω' b After sum normalization, it is used to recalculate the distribution function And calculate the NURBS approximate surface of the target pipeline part again; Each time the number of feature points n changes, step S5 is executed once and only once.
7. The NURBS approximation method for the pipe part surface according to claim 6 is characterized in that The accuracy estimation of the approximate surface described in step S6 and the calculation and adjustment based on the accuracy estimation result to complete the NURBS approximation of the final target pipeline part surface specifically include the following steps: By sampling the same parameters, the approximate error of the NURBS approximate surface of the target pipeline part is calculated. for like Then, return to step S4, increase the number of feature points, and calculate the NURBS approximate surface of the target pipeline part again; like The iteration ends, and the final NURBS approximate surface of the target pipeline part is obtained, completing the NURBS approximation of the target pipeline part surface.
8. A system for implementing the NURBS approximation method for the pipe part surface according to any one of claims 1 to 7, characterized in that It includes a parameter acquisition module, a geometric calculation module, a function calculation module, an approximate surface calculation module, a parameter adjustment module and a surface approximation module; the parameter acquisition module, the geometric calculation module, the function calculation module, the approximate surface calculation module, the parameter adjustment module and the surface approximation module are connected in series in sequence; the parameter acquisition module is used to obtain parameter information of the target pipeline part and upload the data information to the geometric calculation module; the geometric calculation module is used to calculate the geometric feature information of the target pipeline part according to the received data information and the obtained parameter information, and upload the data information to the function calculation module; The function calculation module is used to calculate the distribution function used to measure the irregularity of the pipe part surface based on the received data information and the calculated geometric feature information, and upload the data information to the approximate surface calculation module; the approximate surface calculation module is used to select feature points from the path sampling points based on the received data information and the obtained distribution function, place the cross-section curve based on the feature points, calculate the NURBS approximate surface, and upload the data information to the parameter adjustment module; The parameter adjustment module is used to calculate the error of each NURBS approximate surface at each sampling point based on the received data information and the obtained NURBS approximate surface, adjust the calculation parameters, and upload the data information to the surface approximation module; the surface approximation module is used to estimate the accuracy of the approximate surface based on the received data information, and perform calculation adjustments based on the accuracy estimation results to complete the NURBS approximation of the final target pipeline part surface.