Error-controllable mixed connection curved surface generation method

By using a hybrid surface generation method with controllable errors in computer-aided design, and adjusting the sampling points and surface control point networks, the problem of difficult errors in the hybrid surface generation process is solved, and high-quality surface generation and design quality improvement is achieved.

CN119722990APending Publication Date: 2025-03-28HEFEI JIUSHAO INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411775547.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the field of computer-aided design, it is difficult to completely avoid errors during the generation of mixed surfaces, resulting in low design quality. Especially in the aerospace industry, subtle surface transition defects may affect aerodynamic performance and structural safety.

Method used

A hybrid surface generation method with controllable error is adopted. By gradually adjusting the sampling point and surface control point network in continuous G0, G1 and G2, it ensures that the hybrid surface generates high-quality surfaces within the preset splicing error threshold.

Benefits of technology

It realizes the generation of high-quality mixed surfaces with fewer control points within the preset error threshold, improves design quality, and reduces the difficulty of subsequent adjustments and modifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722990A_ABST
    Figure CN119722990A_ABST
Patent Text Reader

Abstract

The invention discloses an error-controllable mixed curved surface generation method, which relates to the technical field of three-dimensional modeling, and comprises the following steps of: firstly, generating a mixed curved surface under an initial sampling point, then judging whether a geometric continuity error of a joint of the mixed curved surface and a reference curved surface is within a given threshold range or not, and if not, judging whether the geometric continuity error is within the given threshold range; if yes, the accuracy of boundary fitting of the reference curved surface is increased by increasing sampling points, then a mixed-connection curved surface is generated under new sampling points, whether the geometric continuity error of the joint of the mixed-connection curved surface and the reference curved surface is within a given threshold range or not is judged again, and the process is repeated until the geometric continuity error is within a given error range. The invention provides the novel error-controllable mixed connection curved surface generation method, the algorithm is expanded to the generation of the mixed connection curved surface based on the Trimmed curved surface, and the method can generate the high-quality mixed connection curved surface with fewer control points within the preset splicing error threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of three-dimensional modeling, and in particular to a hybrid surface generation method with controllable errors. Background Art

[0002] In the field of computer-aided design, hybrid surface generation is one of the key technologies for building complex three-dimensional geometric models. This technology is widely used in many fields such as industrial design and manufacturing, product design, animation and game scene design, medical image processing, and architectural design. In the field of modern precision engineering design, especially in the aerospace industry, the design requirements of hybrid surfaces are extremely strict. The construction of complex free-form surfaces not only requires beautiful appearance, but is also closely related to aerodynamic performance and structural safety. Even slight surface transition defects may lead to a decline in aerodynamic performance or increase the potential risk of the structure. Therefore, it is crucial to use computer-aided design tools to accurately model hybrid surfaces. However, due to the complexity of design parameters and the limitations of geometric models, it is difficult to completely avoid errors in the process of surface hybridization. How to effectively control and reduce these hybrid errors through optimization algorithms and advanced surface generation technology has become a core challenge to improve design quality. Summary of the invention

[0003] In order to overcome the defects in the prior art mentioned above, the present invention provides a hybrid surface generation method with controllable error, which can generate a high-quality hybrid surface with fewer control points within a preset stitching error threshold.

[0004] To achieve the above object, the present invention adopts the following technical solutions, including:

[0005] A hybrid surface generation method with controllable error, G 0 The generation of hybrid surfaces with controllable errors in the continuous case specifically includes the following steps:

[0006] S11, at the initial sampling point with G 0 The continuous case generates a hybrid surface, and the parameter values ​​corresponding to the initial sampling points constitute the parameter value vector U p , refine the parameter value vector, in u j with u j+1 That is, n-1 parameter values ​​are added between each two adjacent parameter values, namely u j +k,u j +2k,…,u j +(n-1)k, where k = (u j+1 -u j ) / n, thus forming a new parameter value vector;

[0007] S12, for the new parameter value vector, first calculate the position information P1 of one of the reference surfaces at each parameter value, and then calculate the position information P1 of the boundary connecting the hybrid surface and the reference surface at each parameter value. 1 , according to the point coordinates P1 and P 1 , the distance difference corresponding to each parameter value can be obtained as d1=||P1-P 1 ||2;

[0008] S13, judging whether the distance difference at each parameter value is not greater than the set threshold value, if so, it means that the hybrid surface satisfies the G between the reference surface and the set error range. 0 Continuous; if not, it means that G is not satisfied 0 Continuously, find the parameter value corresponding to the distance difference greater than the set threshold, and j with u j+1 The parameter value u′ is obtained by averaging the parameter values ​​between and added to the sampling process, that is, added to the parameter value vector U p In step S11, the point corresponding to u′ is added as a sampling point, and the same number of parameter values ​​are randomly generated and added to the parameter value vector corresponding to the connection between the hybrid surface and another reference surface to ensure that the number of sampling points on both sides is the same. Then, according to the method of step S11, the newly added sampling points are used to generate the parameter vector corresponding to the connection between the hybrid surface and the other reference surface. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S12-S13 until the hybrid surface meets G at the connection with the reference surface. 0 Continuous till;

[0009] S14, then determine whether the hybrid surface and another reference surface meet G at the connection point 0 Continuously, based on the new parameter value vector, the parameter value vector is first refined according to the method of step S11, and then calculated, judged and processed according to the method of steps S12-S13 until the hybrid surface and the other reference surface meet G at the connection point 0 Continuous.

[0010] Preferably, when G 1 When the error-controllable hybrid surface is generated in the continuous case, in step S11, at the initial sampling point, G 1 Generate a mixed surface in the continuous case, and then follow the steps S11-S14 to first satisfy G 0 After the connection is completed, proceed with the following steps:

[0011] S15, when the blended surface and the two reference surfaces both satisfy G 0 After the continuity, it is necessary to judge G 1Whether the continuous error is within the given error range, first check whether the continuous error is within the given error range. 0 The parameter value vector after the continuation is refined according to step S11, and then the normal vector of one of the reference surfaces at each parameter value is calculated respectively. And calculate the normal vector of the blended surface at each parameter value According to the normal vector and The angle between the normal vectors corresponding to each parameter value can be obtained as θ;

[0012] S16, judging whether the angle θ between the normal vectors at each parameter value is not greater than the set threshold value, if so, it means that the hybrid surface satisfies G with the reference surface within the set error range. 1 Continuous; if not, it means that G is not satisfied 1 Continuously, add parameter values ​​to the parameter value vector in the same way as step S13, that is, add sampling point information, and also randomly generate the same number of parameter values ​​to add to the parameter value vector corresponding to the connection between the hybrid surface and another reference surface to ensure that the number of sampling points on both sides is the same, and then use G according to the newly added sampling points in the same way as step S11. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S15-S16 until the hybrid surface meets G at the connection with the reference surface. 1 Continuous till;

[0013] S17, then determine whether the hybrid surface and another reference surface meet G at the connection point 1 Continuously, based on the new parameter value vector, the parameter value vector is first refined in the manner of step S11, and then calculated, judged and processed in the manner of steps S15-S16 until the hybrid surface and the other reference surface meet G at the connection. 1 Continuous.

[0014] Preferably, when G 2 When the error-controllable hybrid surface is generated in the continuous case, in step S11, at the initial sampling point, G 2 Generate a mixed surface in the continuous case, and then follow the steps S11-S17 to first satisfy G 0 , G 1 After the connection is completed, proceed with the following steps:

[0015] S18, when the blended surface and the two reference surfaces both satisfy G 1 After the continuity, it is necessary to judge G 2 Whether the continuous error is within the given error range, first check whether the continuous error is within the given error range. 1The parameter value vector after the continuity is refined according to step S11, and then the curvature κ1 of one of the reference surfaces at each parameter value is calculated, and the curvature κ2 of the hybrid surface at each parameter value is calculated. According to the curvatures κ1 and κ2, the curvature difference corresponding to each parameter value can be obtained as Δκ;

[0016] S19, determining whether the curvature difference Δκ at each parameter value is not greater than the set threshold value. If so, it means that the hybrid surface satisfies G with the reference surface within the set error range. 2 Continuous; if not, it means that G is not satisfied 2 If the number of sampling points on both sides is the same, then the parameter value is added to the parameter value vector in the same way as step S13, that is, the sampling point information is added. At the same time, the same number of parameter values ​​​​need to be randomly generated and added to the parameter value vector corresponding to the connection between the hybrid surface and another reference surface to ensure that the number of sampling points on both sides is the same. Then, according to the method of step S11, the newly added sampling points are used to generate the parameter value vector. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S8-S9 until the hybrid surface meets G at the connection with the reference surface. 2 Continuous till;

[0017] S110, then determine whether the hybrid surface and another reference surface meet G at the connection point 2 Continuously, based on the new parameter value vector, the parameter value vector is first refined in the manner of step S11, and then calculated, judged and processed in the manner of steps S18-S19 until the hybrid surface and the other reference surface meet G at the connection. 2 Until it is continuous, that is, the connection G between the two reference surfaces is obtained. 2 Continuous blended surfaces with errors within a given threshold.

[0018] The advantages of the present invention are:

[0019] (1) The present invention proposes a novel error-controllable hybrid surface generation method, and at the same time extends the method to the generation of hybrid surfaces based on trimmed surfaces. The method can generate high-quality hybrid surfaces with fewer control points within a preset stitching error threshold. Through comparative analysis with the industry standard CATIA software, the method of the present invention maintains the same surface quality as CATIA software while requiring fewer control points. This means that under the premise of achieving the same design accuracy, the hybrid surfaces generated using the method of the present invention are easier to adjust and modify later.

[0020] (2) The method of the present invention can generate a hybrid surface within a preset stitching error threshold, ensuring that the generated surface has high smoothness and quality.

[0021] (3) Compared with the industry standard software (CATIA software), the surface generated by the method of the present invention requires fewer control points while maintaining the same quality, and the generated hybrid surface is more concise, and subsequent adjustment and modification are easier. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 Generates a schematic diagram for the blended surface.

[0023] Figure 2 Schematic diagram of two given B-spline surfaces.

[0024] Figure 3 For G 0 Schematic diagram of the hybrid surface and control point network obtained by the hybrid surface generation method with controllable error in the continuous case.

[0025] Figure 4 For G 0 In the continuous case, the schematic diagram of the hybrid surface and control point network obtained by CATIA software.

[0026] Figure 5 For G 1 Schematic diagram of the hybrid surface and control point network obtained by the hybrid surface generation method with controllable error in the continuous case.

[0027] Figure 6 For G 1 In the continuous case, the schematic diagram of the hybrid surface and control point network obtained by CATIA software.

[0028] Figure 7 For G 2 Schematic diagram of the hybrid surface and control point network obtained by the hybrid surface generation method with controllable error in the continuous case.

[0029] Figure 8 For G 2 In the continuous case, the schematic diagram of the hybrid surface and control point network obtained by CATIA software.

[0030] Fig. 9 For G 2 Curvature map of the blended surface obtained by the blended surface generation method with controllable error in the continuous case.

[0031] Fig.10 For G 2 In the continuous case, the curvature diagram of the blended surface obtained by CATIA software.

[0032] Fig.11 Schematic diagram of two B-spline surface patches after trimming.

[0033] Fig.12 For G 0 Schematic diagram of the hybrid surface and control point network obtained by the hybrid surface generation method with controllable error of the trimmed surface in the continuous case.

[0034] Fig.13 For G 0 In the continuous case, the schematic diagram of the hybrid surface and control point network of the Trimmed surface obtained by CATIA software.

[0035] Fig.14 For G 1 Schematic diagram of the hybrid surface and control point network obtained by the hybrid surface generation method with controllable error of the trimmed surface in the continuous case.

[0036] Fig.15 For G 1 In the continuous case, CATIA software obtains the hybrid surface and control point network diagram of the Trimmed surface.

[0037] Fig.16 For G 2 Schematic diagram of the hybrid surface and control point network obtained by the hybrid surface generation method with controllable error of the trimmed surface in the continuous case.

[0038] Fig.17 For G 1 In the continuous case, the schematic diagram of the hybrid surface and control point network of the Trimmed surface obtained by CATIA software. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] Embodiment 1: Error-controllable hybrid surface generation method

[0041] A blended surface is a geometric structure that connects multiple surfaces with smooth transitions, aiming to achieve high-quality appearance and good performance. In the process of generating a blended surface, you first need to define the base surfaces to be connected. These surfaces can be of any shape, such as planes, curved surfaces, or complex free-form surfaces. Then you need to specify the boundary area and geometric continuity of the base surfaces to be connected, so as to generate a blended surface that meets your needs, such as Figure 1 As shown, by blending the area between the two surfaces, a blended surface that meets the design requirements can be obtained. 1 ,v 1 ) and S2(u 2 ,v 2 ) as the reference surface, that is:

[0042]

[0043] Among them, k = 1, 2, used to distinguish different B-spline surfaces; Indicates control point; Respectively represent the node vector U k 、V k Basis functions on; for the node vector U k With V k The present invention takes

[0044] Select the surface S1(u 1 ,v 1 ) of the boundary C1(u 1 )=S1(u 1 ,1) and surface S2(u 2 ,v 2 ) of the boundary C2(u 2 )=S2(u 2 ,0) as the boundary range of the generated blended surface, that is:

[0045]

[0046] On the boundary curve C1(u 1 ) and C2(u 2 ), respectively specify the parameter value range as [a0, a1] and [b0, b1] area for blending operation, and generate a blended surface that satisfies the specified geometric continuity with the reference surface, where V 00 =C1(a0),V 01 =C1(a1),V 10 =C2(b0),V 11 =C2(b1), corresponding to the four vertices of the blended surface.

[0047] The following will introduce the error-controllable hybrid surface generation process under different geometric continuity conditions.

[0048] (1)G 0 Continuous situation

[0049] First, at point V 00 With V 10 , point V 01 With V 11 Interpolate a first-degree B-spline curve C1(v) and C2(v) as the ridge line, that is:

[0050]

[0051] V=[0,0,1,1]

[0052] in, V is the node vector corresponding to the B-spline curve.

[0053] Then connect the endpoint V 00 With V 01 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as a contour line, denoted as

[0054] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0055]

[0056] Among them, the interpolation algorithm is a prior art. For details, please refer to the technology provided in the "Recovery Method of Key Curves in Reverse Engineering" with patent number 20240548880X, or refer to the paper "Error Controllable Cubic Spline V in CNC Technology" 10 Interpolation".

[0057] Similarly, the terminal V 10 With V 11 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as another contour line, denoted as

[0058] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0059]

[0060] Then, a double-track sweep operation is performed based on the two contour lines C1(u′), C2(u′) and the two ridge lines C1(v), C2(v) to obtain a B-spline surface. This surface is the desired blended surface.

[0061] (2) G 1 Continuous situation

[0062] First, at point V 00 With V 10 , point V 01 With V 11 Interpolate a cubic B-spline curve C1(v) and C2(v) as the ridge line, that is:

[0063]

[0064] V=[0,0,0,0,1,1,1,1]

[0065] in, V is the node vector corresponding to the B-spline curve.

[0066] Then connect the endpoint V 00 With V 01 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as a contour line, denoted as

[0067] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0068]

[0069] Among them, the interpolation algorithm is a prior art. For details, please refer to the technology provided in the "Recovery Method of Key Curves in Reverse Engineering" with patent number 20240548880X, or refer to the paper "Error Controllable Cubic Spline C in CNC Technology" 2 Interpolation".

[0070] Similarly, the terminal V 10 With V 11 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as another contour line, denoted as

[0071] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0072]

[0073] Then, a double-track sweep operation is performed based on the two contour lines C1(u′), C2(u′) and the two ridge lines C1(v), C2(v) to obtain an initial B-spline surface S 0 (u',v), that is:

[0074]

[0075] To realize the hybrid surface and the reference surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) At the connection G 1 Continuous, you need to adjust the initial surface control point network The local control points in are adjusted by the condition of first-order partial derivative continuity.

[0076] First, the first-order partial derivatives of the reference surface in the v direction at the connection are calculated as follows:

[0077]

[0078] Then, based on the first-order partial derivative, the first-order partial derivative and the second-order partial derivative in the u direction are calculated respectively:

[0079]

[0080] Again, the interpolation algorithm is used to convert the first-order partial derivative and As sampling points, the spline curve is interpolated, that is, the position information is used Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as Similarly, using location information Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as

[0081] The adjusted surface control point network is recorded as According to G 1 The continuity condition and the interpolation curve information obtained above can be used to deduce the replaced control network:

[0082]

[0083] Therefore, the final result is G at the connection with the reference surface. 1 The continuous blended surface is:

[0084]

[0085] (3)G 2 Continuous situation

[0086] First, at point V 00 With V 10 , point V 01 With V 11 Interpolate a 5th-order B-spline curve C1(v) and C2(v) as the ridge line, that is:

[0087]

[0088] V=[0,0,0,0,0,0,1,1,1,1,1,1]

[0089] in, V is the node vector corresponding to the B-spline curve.

[0090] Then connect the endpoint V 00 With V 01 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as a contour line, denoted as

[0091] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0092]

[0093] Among them, the interpolation algorithm is a prior art. For details, please refer to the technology provided in the "Recovery Method of Key Curves in Reverse Engineering" with patent number 20240548880X, or refer to the paper "Error Controllable Cubic Spline C in CNC Technology" 2 Interpolation".

[0094] Similarly, the terminal V 10 With V 11 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as another contour line, denoted as

[0095] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0096]

[0097] Then, a double-track sweep operation is performed based on the two contour lines C1(u′), C2(u′) and the two ridge lines C1(v), C2(v) to obtain an initial B-spline surface S 0 (u',v), that is:

[0098]

[0099] To realize the hybrid surface and the reference surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) At the connection G 2 Continuous, you need to adjust the initial surface control point network The local control points in are adjusted by the first-order partial derivative continuity and second-order partial derivative continuity conditions.

[0100] First, the first-order partial derivative and the second-order partial derivative of the reference surface in the v direction at the connection are calculated as follows:

[0101]

[0102] Then, based on the first-order partial derivative and the second-order partial derivative, the first-order partial derivative and the second-order partial derivative in the u direction are calculated respectively:

[0103]

[0104]

[0105] Again, the interpolation algorithm is used to convert the first-order partial derivative and As sampling points, the spline curve is interpolated, that is, the position information is used Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as Similarly, using location information Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as

[0106] Similar to the first-order partial derivative, the second-order partial derivative and As sampling points, the spline curve is interpolated, that is, the position information is used Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as Similarly, using location information Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as

[0107] The adjusted surface control point network is recorded as According to G 1 Continuous and G 2 The continuity condition and the interpolation curve information obtained above can be used to deduce the replaced control network:

[0108]

[0109] Therefore, the final result is G at the connection with the reference surface. 2 The continuous blended surface is:

[0110]

[0111] In practical problems, when sampling the surface boundary, it is hoped that a curve within the error tolerance range can be interpolated with fewer control points. 2 The continuous situation is explained, because G 2 The continuous case covers G 0 , G 1 Continuous situation.

[0112] In order to obtain a hybrid surface with controllable error, the sampling points are essentially adjusted. First, the hybrid surface is generated under the initial sampling points, and then the geometric continuity error between the hybrid surface and the reference surface at the connection is determined to be within a given threshold range. 2 In the case of continuous, we first need to judge G 0 , G 1 Whether the continuous error is within the given threshold range, if so, then judge G 2 Whether the continuity error is within a given threshold range; if not, the accuracy of fitting the reference surface boundary is increased by adding sampling points, and then a hybrid surface is generated under the new sampling points, and the G at the connection is judged again. 2 Whether the continuous error is within a given threshold range, repeat this step until it is within the given error range.

[0113] A method for generating a hybrid surface with controllable error in this embodiment specifically includes the following steps:

[0114] S11, at the initial sampling point with G 2The algorithm for the continuous case generates a hybrid surface, and the parameter values ​​corresponding to the initial sampling points constitute the parameter value vector U p , refine the parameter value vector, in u j with u j+1 That is, n-1 parameter values ​​are added between each two adjacent parameter values, namely u j +k,u j +2k,…,u j +(n-1)k, where k = (u j+1 -u j ) / n, thus forming a new parameter value vector.

[0115] S12, for the new parameter value vector, first calculate the position information P1 of one of the reference surfaces at each parameter value, and then calculate the position information P1 of the boundary connecting the hybrid surface and the reference surface at each parameter value. 1 , according to the point coordinates P1 and P 1 , the distance difference corresponding to each parameter value can be obtained as d1=||P1-P 1 ||2.

[0116] S13, judging whether the distance difference at each parameter value is not greater than the set threshold value, if so, it means that the hybrid surface satisfies the G between the reference surface and the set error range. 0 Continuous; if not, it means that G is not satisfied 0 Continuously, find the parameter value corresponding to the distance difference greater than the set threshold, and j with u j+1 The parameter value u′ is obtained by averaging the parameter values ​​between and added to the sampling process, that is, added to the parameter value vector U p In step S11, the point corresponding to u′ is added as a sampling point, and the same number of parameter values ​​are randomly generated and added to the parameter value vector corresponding to the connection between the hybrid surface and another reference surface to ensure that the number of sampling points on both sides is the same. Then, according to the method of step S11, the newly added sampling points are used to generate the parameter vector corresponding to the connection between the hybrid surface and the other reference surface. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S12-S13 until the hybrid surface meets G at the connection with the reference surface. 0 Continuous.

[0117] S14, then determine whether the hybrid surface and another reference surface meet G at the connection point 0 Continuously, based on the new parameter value vector, the parameter value vector is first refined according to the method of step S11, and then calculated, judged and processed according to the method of steps S12-S13 until the hybrid surface and the other reference surface meet G at the connection point 0Continuous.

[0118] S15, when the blended surface and the two reference surfaces both satisfy G 0 After the continuity, it is necessary to judge G 1 Whether the continuous error is within the given error range, first check whether the continuous error is within the given error range. 0 The parameter value vector after the continuation is refined according to step S11, and then the normal vector of one of the reference surfaces at each parameter value is calculated respectively. And calculate the normal vector of the blended surface at each parameter value According to the normal vector and The angle between the normal vectors corresponding to each parameter value can be obtained as θ.

[0119] S16, judging whether the angle θ between the normal vectors at each parameter value is not greater than the set threshold value, if so, it means that the hybrid surface satisfies G with the reference surface within the set error range. 1 Continuous; if not, it means that G is not satisfied 1 Continuously, add parameter values ​​to the parameter value vector in the same way as step S13, that is, add sampling point information, and also randomly generate the same number of parameter values ​​to add to the parameter value vector corresponding to the connection between the hybrid surface and another reference surface to ensure that the number of sampling points on both sides is the same, and then use G according to the newly added sampling points in the same way as step S11. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S15-S16 until the hybrid surface meets G at the connection with the reference surface. 1 Continuous.

[0120] S17, then determine whether the hybrid surface and another reference surface meet G at the connection point 1 Continuously, based on the new parameter value vector, the parameter value vector is first refined in the manner of step S11, and then calculated, judged and processed in the manner of steps S15-S16 until the hybrid surface and the other reference surface meet G at the connection. 1 Continuous.

[0121] S18, when the blended surface and the two reference surfaces both satisfy G 1 After the continuity, it is necessary to judge G 2 Whether the continuous error is within the given error range, first check whether the continuous error is within the given error range. 1The parameter value vector after the continuity is refined according to step S11, and then the curvature κ1 of one of the reference surfaces at each parameter value is calculated respectively, and the curvature κ2 of the hybrid surface at each parameter value is calculated. According to the curvatures κ1 and κ2, the curvature difference corresponding to each parameter value can be obtained as Δκ.

[0122] S19, determining whether the curvature difference Δκ at each parameter value is not greater than the set threshold value. If so, it means that the hybrid surface satisfies G with the reference surface within the set error range. 2 Continuous; if not, it means that G is not satisfied 2 If the number of sampling points on both sides is the same, then the parameter value is added to the parameter value vector in the same way as step S13, that is, the sampling point information is added. At the same time, the same number of parameter values ​​​​need to be randomly generated and added to the parameter value vector corresponding to the connection between the hybrid surface and another reference surface to ensure that the number of sampling points on both sides is the same. Then, according to the method of step S11, the newly added sampling points are used to generate the parameter value vector. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S8-S9 until the hybrid surface meets G at the connection with the reference surface. 2 Continuous.

[0123] S110, then determine whether the hybrid surface and another reference surface meet G at the connection point 2 Continuously, based on the new parameter value vector, the parameter value vector is first refined in the manner of step S11, and then calculated, judged and processed in the manner of steps S18-S19 until the hybrid surface and the other reference surface meet G at the connection. 2 Until it is continuous, that is, the connection G between the two reference surfaces is obtained. 2 Continuous blended surfaces with errors within a given threshold.

[0124] Embodiment 2: Error-controllable hybrid surface generation method for trimmed surfaces

[0125] In practical problems, designers may need to trim the reference surface before blending. The reference surface is trimmed by a given trimming curve, and a part of the reference surface is trimmed to obtain two surface patches. The remaining part (surface patch) is then blended.

[0126] The reference surface is denoted as S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ),Right now:

[0127]

[0128] k=1,2

[0129] In order to obtain the trimming curve on the reference surface, a parameter curve on a given parameter domain is required, that is, the parameter curve on the parameter domain corresponds to the trimming curve on the surface. 1 ,v 1 ) and S2(u 2 ,v 2 The corresponding parameter curves of the clipping curves on the parameter domain are and Correspondingly, the clipping curves are and

[0130] Similar to the direct blending operation of untrimmed surfaces, the blending without trimming is performed on the surface boundary, and the resulting blended surface has a certain geometric continuity with the given reference surface, while the blending of trimmed surfaces is performed on the trimming curve, and the resulting blended surface maintains a certain geometric continuity with the remaining surface after trimming.

[0131] In the cutting curve and The parameter value ranges are specified as [a0, a1] and [b0, b1] respectively to perform blending operations, and a blended surface is generated that satisfies the specified geometric continuity with the surface patch retained after clipping. Corresponding to the 4 vertices of the blended surface.

[0132] The following will introduce the error-controllable hybrid surface generation process of trimmed surfaces under different geometric continuity conditions.

[0133] (1) G 0 Continuous situation

[0134] First, at point V 00 With V 10 , point V 01 With V 11 Interpolate a first-degree B-spline curve C1(v) and C2(v) as the ridge line, that is:

[0135]

[0136] V=[0,0,1,1]

[0137] in, V is the node vector corresponding to the B-spline curve.

[0138] Then connect the endpoint V 00 With V 01As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the clipping curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as a contour line, denoted as

[0139] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0140]

[0141] Similarly, the terminal V 10 With V 11 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the clipping curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as another contour line, denoted as

[0142] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0143]

[0144] Then, a double-track sweep operation is performed based on the two contour lines C1(u′), C2(u′) and the two ridge lines C1(v), C2(v) to obtain a B-spline surface. This surface is the desired blended surface.

[0145] (2) G 1 Continuous situation

[0146] First, at point V 00 With V 10 , point V 01 With V 11Interpolate a cubic B-spline curve C1(v) and C2(v) as the ridge line, that is:

[0147]

[0148] V=[0,0,0,0,1,1,1,1]

[0149] in, V is the node vector corresponding to the B-spline curve.

[0150] Then connect the endpoint V 00 With V 01 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as a contour line, denoted as

[0151] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0152]

[0153] Among them, the interpolation algorithm is a prior art. For details, please refer to the technology provided in the "Recovery Method of Key Curves in Reverse Engineering" with patent number 20240548880X, or refer to the paper "Error Controllable Cubic Spline C in CNC Technology" 2 Interpolation".

[0154] Similarly, the terminal V 10 With V 11 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as another contour line, denoted as

[0155] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0156]

[0157] Then, a double-track sweep operation is performed based on the two contour lines C1(u′), C2(u′) and the two ridge lines C1(v), C2(v) to obtain an initial B-spline surface S 0 (u',v), that is:

[0158]

[0159] To realize the hybrid surface and the reference surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) At the connection G 1 Continuous, you need to adjust the initial surface control point network The local control points in are adjusted by the condition of first-order partial derivative continuity.

[0160] First, the first-order partial derivatives of the reference surface in the v direction at the connection are calculated as follows:

[0161]

[0162] Then, based on the first-order partial derivative, the first-order partial derivative and the second-order partial derivative in the u direction are calculated respectively:

[0163]

[0164] Again, the interpolation algorithm is used to convert the first-order partial derivative and As sampling points, the spline curve is interpolated, that is, the position information is used Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as Similarly, using location information Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as

[0165] The adjusted surface control point network is recorded as According to G 1The continuity condition and the interpolation curve information obtained above can be used to deduce the replaced control network:

[0166]

[0167] Therefore, the final result is G at the connection with the reference surface. 1 The continuous blended surface is:

[0168]

[0169] (3)G 2 Continuous situation

[0170] First, at point V 00 With V 10 , point V 01 With V 11 Interpolate a 5th-order B-spline curve C1(v) and C2(v) as the ridge line, that is:

[0171]

[0172] V=[0,0,0,0,0,0,1,1,1,1,1,1]

[0173] in, V is the node vector corresponding to the B-spline curve.

[0174] Then connect the endpoint V 00 With V 01 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as a contour line, denoted as

[0175] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0176]

[0177] Among them, the interpolation algorithm is a prior art. For details, please refer to the technology provided in the "Recovery Method of Key Curves in Reverse Engineering" with patent number 20240548880X, or refer to the paper "Error Controllable Cubic Spline C in CNC Technology"2 Interpolation".

[0178] Similarly, the terminal V 10 With V 11 As the initial sampling point, denoted as Right now The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as another contour line, denoted as

[0179] Among them, the first-order partial derivative With the second-order partial derivative They are:

[0180]

[0181] Then, a double-track sweep operation is performed based on the two contour lines C1(u′), C2(u′) and the two ridge lines C1(v), C2(v) to obtain an initial B-spline surface S 0 (u',v), that is:

[0182]

[0183] To realize the hybrid surface and the reference surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) At the connection G 2 Continuous, you need to adjust the initial surface control point network The local control points in are adjusted by the first-order partial derivative continuity and second-order partial derivative continuity conditions.

[0184] First, the first-order partial derivative and the second-order partial derivative of the reference surface in the v direction at the connection are calculated as follows:

[0185]

[0186]

[0187] Then, based on the first-order partial derivative and the second-order partial derivative, the first-order partial derivative and the second-order partial derivative in the u direction are calculated respectively:

[0188]

[0189]

[0190] Again, the interpolation algorithm is used to convert the first-order partial derivative and As sampling points, the spline curve is interpolated, that is, the position information is used Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as Similarly, using location information Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as

[0191] Similar to the first-order partial derivative, the second-order partial derivative and As sampling points, the spline curve is interpolated, that is, the position information is used Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as Similarly, using location information Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as

[0192] The adjusted surface control point network is recorded as According to G 1 Continuous and G 2 The continuity condition and the interpolation curve information obtained above can be used to deduce the replaced control network:

[0193]

[0194] Therefore, the final result is G at the connection with the reference surface. 2 The continuous blended surface is:

[0195]

[0196] In practical problems, when sampling the surface boundary, it is hoped that a curve within the error tolerance range can be interpolated with fewer control points. 2 The continuous situation is explained, because G 2 The continuous case covers G0 , G 1 Continuous situation.

[0197] In order to obtain a hybrid surface with controllable error, the sampling points are essentially adjusted. First, the hybrid surface is generated under the initial sampling points, and then the geometric continuity error between the hybrid surface and the cropped surface patch at the connection is determined to be within a given threshold range. 2 In the case of continuous, we first need to judge G 0 , G 1 Whether the continuous error is within the given threshold range, if so, then judge G 2 Whether the continuity error is within the given threshold range; if not, the accuracy of the clipping boundary fitting is increased by adding sampling points, and then the hybrid surface is generated under the new sampling points to determine whether the continuity error at the connection is within the given threshold range again, and this step is repeated until it is within the given error range.

[0198] A method for generating a hybrid surface with controllable error of a trimmed surface (trimmed surface) in this embodiment specifically includes the following steps:

[0199] S21, at the initial sampling point with G 2 The algorithm for the continuous case generates a hybrid surface, and the parameter values ​​corresponding to the initial sampling points constitute the parameter value vector U p , refine the parameter value vector, in u j with u j+1 That is, n-1 parameter values ​​are added between each two adjacent parameter values, namely u j +k,u j +2k,…,u j +(n-1)k, where k = (u j+1 -u j ) / n, thus forming a new parameter value vector.

[0200] S22, for the new parameter value vector, first calculate the position information P1 of the surface patch after the clipping of one of the reference surfaces at each parameter value, and then calculate the position information P1 of the boundary connecting the hybrid surface and the surface patch at each parameter value. 1 , according to the point coordinates P1 and P 1 , the distance difference corresponding to each parameter value can be obtained as d1=||P1-P 1 ||2.

[0201] S23, judging whether the distance difference at each parameter value is not greater than the set threshold value, if so, it means that the hybrid surface satisfies G with the surface patch within the set error range. 0 Continuous; if not, it means that G is not satisfied 0Continuously, find the parameter value corresponding to the distance difference greater than the set threshold, and j with u j+1 The parameter value u′ is obtained by averaging the parameter values ​​between and added to the sampling process, that is, added to the parameter value vector U p In step S21, the point corresponding to u′ is added as a sampling point, and the same number of parameter values ​​are randomly generated and added to the parameter value vector corresponding to the connection between the hybrid surface and the surface patch cut from another reference surface to ensure that the number of sampling points on both sides is the same. Then, according to the method of step S21, the newly added sampling points are used to generate the parameter vector corresponding to the connection between the hybrid surface and the surface patch cut from another reference surface. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S22-S23 until the hybrid surface meets G at the connection with the surface patch. 0 Continuous.

[0202] S24, then determine whether the hybrid surface and another surface patch cut from another reference surface meet G at the connection point 0 Continuously, based on the new parameter value vector, the parameter value vector is first refined in the manner of step S21, and then calculated, judged and processed in the manner of steps S22-S23 until the hybrid surface and the other surface patch meet G at the connection. 0 Continuous.

[0203] S25, when the blended surface and the two surface patches satisfy G 0 After the continuity, it is necessary to judge G 1 Whether the continuous error is within the given error range, first check whether the continuous error is within the given error range. 0 The parameter value vector after the continuity is refined according to step S21, and then the normal vector of one of the surface patches at each parameter value is calculated respectively. And calculate the normal vector of the blended surface at each parameter value According to the normal vector and The angle between the normal vectors corresponding to each parameter value can be obtained as θ.

[0204] S26, determine whether the angle θ between the normal vectors at each parameter value is not greater than the set threshold. If so, it means that the hybrid surface satisfies G with the surface patch within the set error range. 1 Continuous; if not, it means that G is not satisfied 1Continuously, add parameter values ​​to the parameter value vector in the same way as step S23, that is, add sampling point information, and also randomly generate the same number of parameter values ​​to add to the parameter value vector corresponding to the connection between the blended surface and another surface patch to ensure that the number of sampling points on both sides is the same, and then use G according to the newly added sampling points in the same way as step S21. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S25-S26 until the hybrid surface meets G at the connection with the surface patch. 1 Continuous.

[0205] S27, then determine whether the hybrid surface and another surface patch meet G at the connection 1 Continuously, based on the new parameter value vector, the parameter value vector is first refined in the manner of step S21, and then calculated, judged and processed in the manner of steps S25-S26 until the hybrid surface and the other surface patch meet G at the connection. 1 Continuous.

[0206] S28, when the blended surface and the two surface patches satisfy G 1 After the continuity, it is necessary to judge G 2 Whether the continuous error is within the given error range, first check whether the continuous error is within the given error range. 1 The parameter value vector after continuity is refined according to step S21, and then the curvature κ1 of one of the surface patches at each parameter value is calculated respectively, and the curvature κ2 of the hybrid surface at each parameter value is calculated. According to the curvatures κ1 and κ2, the curvature difference corresponding to each parameter value can be obtained as Δκ.

[0207] S29, determine whether the curvature difference Δκ at each parameter value is not greater than the set threshold. If so, it means that the hybrid surface satisfies G with the surface patch within the set error range. 2 Continuous; if not, it means that G is not satisfied 2 Continuously, add parameter values ​​to the parameter value vector in the same way as step S23, that is, add sampling point information, and also randomly generate the same number of parameter values ​​to add to the parameter value vector corresponding to the connection between the blended surface and another surface patch to ensure that the number of sampling points on both sides is the same, and then use G according to the newly added sampling points in the same way as step S21. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S28-S29 until the hybrid surface satisfies G at the connection with the surface patch. 2 Continuous.

[0208] S210, then determine whether the hybrid surface and another surface patch meet G at the connection point 2 Continuously, based on the new parameter value vector, the parameter value vector is first refined in the manner of step S21, and then calculated, judged and processed in the manner of steps S28-S29 until the hybrid surface and the other surface patch meet G at the connection. 2 Until it is continuous, that is, we get the connection G between the two surface patches. 2 Continuous blended surfaces with errors within a given threshold.

[0209] Example 3

[0210] The current research mainly focuses on the field of commercial CAD software industry. The method of the present invention is compared with commercial software. The leading CAD software on the market currently provides a variety of tools and algorithms for generating hybrid surfaces and controlling the splicing error to a certain extent. CATIA is a world-leading 3D computer-aided design (CAD) and computer-aided manufacturing (CAM) software developed by Dassault Systèmes of France. It is known for its excellent surface processing capabilities. It can generate high-quality hybrid surfaces with high geometric continuity and low errors, and provides a variety of optional types for generating hybrid surfaces. For example, the bridge surface generation provided in the FreeStyle module has three types of analysis, approximation and automatic options.

[0211] In this embodiment, the results obtained by the error-controllable hybrid surface generation method (Example 1) are compared and analyzed with CATIA software. Similarly, the results obtained by the error-controllable hybrid surface generation method for Trimmed surfaces (Example 2) are compared and analyzed with CATIA software.

[0212] Example 1: Error-controllable hybrid surface generation method (error-controllable algorithm) example

[0213] Given two B-spline surfaces such as Figure 2 As shown, a blending operation is performed on the two surfaces to generate a blended surface in the area between the surfaces.

[0214] In G 0 In the case of continuity, the surface results and control point network obtained by the error controllable algorithm are as follows Figure 3 As shown, the results obtained by CATIA software and its control point network are as follows Figure 4 shown.

[0215] In G 1 In the case of continuity, the surface results and control point network obtained by the error controllable algorithm are as follows Figure 5 As shown, the results obtained by CATIA software and its control point network are as follows Figure 6 shown.

[0216] In G 2 In the case of continuity, the surface results and control point network obtained by the error controllable algorithm are as follows Figure 7 As shown, the results obtained by CATIA software and its control point network are as follows Figure 8 shown.

[0217] From G 0 , G 1 and G 2 From the comparison of surface results, we can see that the surface obtained by the algorithm is very close to that obtained by CATIA software in terms of visual difference, but from the control points, we can see that the number of control points of the hybrid surface generated by CATIA software is more than that generated by the algorithm, and the order of u of the surface generated by CATIA software is 5, while the order of u of the surface generated by the algorithm is 3, which is lower than the order of the surface obtained by CATIA software. Since the surface obtained by the error controllable algorithm is generated within a given error range, the result obtained within the error range meets the actual needs, while the result obtained by CATIA software is obtained under low error, and the cost is that more control points and higher order are required.

[0218] In G 2 In the case of continuous, this example uses Gaussian curvature analysis to compare the results generated by the error controllable algorithm with those generated by CATIA software. The curvature diagram of the result obtained by the algorithm is shown in Fig. 9 As shown, the curvature diagram obtained by CATIA software is as follows Fig.10 As shown in the surface curvature diagram, it can be seen that the smoothness of the surface generated by the error controllable algorithm with lower order and fewer control points is similar to that generated by CATIA software at the connection.

[0219] Example 2: Trimmed surface error controllable hybrid surface generation method (Trimmed surface error controllable algorithm) example

[0220] exist Figure 2 On the basis of , parameter curves are given on the parameter domains of the two surfaces, that is, the clipping curves on the corresponding surfaces, and the surfaces are clipped based on the clipping curves. The clipped B-spline surface patches are as follows: Fig.11 As shown, the two surface patches are then blended to generate a blended surface with the specified continuity with the surface patch in the area between the trimming curves. In CATIA software, one can only draw a parameter curve on the surface manually, and then trim the surface according to this parameter curve, trimming a part and keeping a part, and then blending the retained surface patch again. The algorithm can pre-select a given parameter curve to trim the surface according to the needs, which is more objective and accurate.

[0221] In G 0 In the case of continuous, the surface results and control point network obtained by the Trimmed surface error controllable algorithm are as follows Fig.12 As shown, the results obtained by CATIA software and its control point network are as follows Fig.13 shown.

[0222] In G 1 In the case of continuous, the surface results and control point network obtained by the Trimmed surface error controllable algorithm are as follows Fig.14 As shown, the results obtained by CATIA software and its control point network are as follows Fig.15 shown.

[0223] In G 2 In the case of continuous, the surface results and control point network obtained by the Trimmed surface error controllable algorithm are as follows Fig.16 As shown, the results obtained by CATIA software and its control point network are as follows Fig.17 shown.

[0224] From G 0 , G 1 and G 2 From the comparison of the surface results, we can see that the surfaces obtained by the algorithm and the surfaces obtained by CATIA software are both very smooth in quality, but from the control points, we can see that the number of control points of the hybrid surfaces generated by CATIA software is more than that generated by the algorithm, and the order of u of the surfaces generated by CATIA software is 5, while the order of u of the surfaces generated by the algorithm is 3, which is lower than the order of the surfaces obtained by CATIA software. Since the surfaces obtained by the error controllable algorithm are generated within a given error range, the results obtained within the error range meet the actual needs, while the results obtained by CATIA software are obtained under low errors, and the cost is that more control points and higher orders are required.

Claims

1. A hybrid surface generation method with controllable error, characterized in that: G 0 The generation of hybrid surfaces with controllable errors in the continuous case specifically includes the following steps: S11, at the initial sampling point with G 0 The continuous case generates a hybrid surface, and the parameter values ​​corresponding to the initial sampling points constitute the parameter value vector U p , refine the parameter value vector, in u j with u j+1 That is, n-1 parameter values ​​are added between each two adjacent parameter values, namely u j +k,u j +2k,…,u j +(n-1)k, where k = (u j+1 -u j ) / n, thus forming a new parameter value vector; S12, for the new parameter value vector, first calculate the position information P1 of one of the reference surfaces at each parameter value, and then calculate the position information P1 of the boundary connecting the hybrid surface and the reference surface at each parameter value. 1 , according to the point coordinates P1 and P 1 , the distance difference corresponding to each parameter value can be obtained as d1=||P1-P 1 ||2; S13, judging whether the distance difference at each parameter value is not greater than the set threshold value, if so, it means that the hybrid surface satisfies the G between the reference surface and the set error range. 0 Continuous; if not, it means that G is not satisfied 0 Continuously, find the parameter value corresponding to the distance difference greater than the set threshold, and j with u j+1 The parameter value u′ is obtained by averaging the parameter values ​​between and added to the sampling process, that is, added to the parameter value vector U p In step S11, the point corresponding to u′ is added as a sampling point, and the same number of parameter values ​​are randomly generated and added to the parameter value vector corresponding to the connection between the hybrid surface and another reference surface to ensure that the number of sampling points on both sides is the same. Then, according to the method of step S11, the newly added sampling points are used to generate the parameter vector corresponding to the connection between the hybrid surface and the other reference surface. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S12-S13 until the hybrid surface meets G at the connection with the reference surface. 0 Continuous till; S14, then determine whether the hybrid surface and another reference surface meet G at the connection point 0 Continuously, based on the new parameter value vector, the parameter value vector is first refined according to the method of step S11, and then calculated, judged and processed according to the method of steps S12-S13 until the hybrid surface and the other reference surface meet G at the connection point 0 Continuous.

2. The method for generating a hybrid surface with controllable error according to claim 1, characterized in that: When G 1 When the error-controllable hybrid surface is generated in the continuous case, in step S11, at the initial sampling point, G 1 Generate a mixed surface in the continuous case, and then follow the steps S11-S14 to first satisfy G 0 After the connection is completed, proceed with the following steps: S15, when the blended surface and the two reference surfaces both satisfy G 0 After the continuity, it is necessary to judge G 1 Whether the continuous error is within the given error range, first check whether the continuous error is within the given error range. 0 The parameter value vector after the continuation is refined according to step S11, and then the normal vector of one of the reference surfaces at each parameter value is calculated respectively. And calculate the normal vector of the blended surface at each parameter value According to the normal vector and The angle between the normal vectors corresponding to each parameter value can be obtained as θ; S16, judging whether the angle θ between the normal vectors at each parameter value is not greater than the set threshold value, if so, it means that the hybrid surface satisfies G with the reference surface within the set error range. 1 Continuous; if not, it means that G is not satisfied 1 Continuously, add parameter values ​​to the parameter value vector in the same way as step S13, that is, add sampling point information, and also randomly generate the same number of parameter values ​​to add to the parameter value vector corresponding to the connection between the hybrid surface and another reference surface to ensure that the number of sampling points on both sides is the same, and then use G according to the newly added sampling points in the same way as step S11. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S15-S16 until the hybrid surface meets G at the connection with the reference surface. 1 Continuous till; S17, then determine whether the hybrid surface and another reference surface meet G at the connection point 1 Continuously, based on the new parameter value vector, the parameter value vector is first refined in the manner of step S11, and then calculated, judged and processed in the manner of steps S15-S16 until the hybrid surface and the other reference surface meet G at the connection. 1 Continuous.

3. The error-controllable hybrid surface generation method according to claim 2, characterized in that: When G 2 When the error-controllable hybrid surface is generated in the continuous case, in step S11, at the initial sampling point, G 2 Generate a mixed surface in the continuous case, and then follow the steps S11-S17 to first satisfy G 0 , G 1 After the connection is completed, proceed with the following steps: S18, when the blended surface and the two reference surfaces both satisfy G 1 After the continuity, it is necessary to judge G 2 Whether the continuous error is within the given error range, first check whether the continuous error is within the given error range. 1 The parameter value vector after the continuity is refined according to step S11, and then the curvature κ1 of one of the reference surfaces at each parameter value is calculated, and the curvature κ2 of the hybrid surface at each parameter value is calculated. According to the curvatures κ1 and κ2, the curvature difference corresponding to each parameter value can be obtained as Δκ; S19, determining whether the curvature difference Δκ at each parameter value is not greater than the set threshold value. If so, it means that the hybrid surface satisfies G with the reference surface within the set error range. 2 Continuous; if not, it means that G is not satisfied 2 If the number of sampling points on both sides is the same, then the parameter value is added to the parameter value vector in the same way as step S13, that is, the sampling point information is added. At the same time, the same number of parameter values ​​​​need to be randomly generated and added to the parameter value vector corresponding to the connection between the hybrid surface and another reference surface to ensure that the number of sampling points on both sides is the same. Then, according to the method of step S11, the newly added sampling points are used to generate the parameter value vector. 2 The algorithm for the continuous case generates a hybrid surface, and then the parameter value vector is refined in the same way, and then the calculation and judgment are performed according to the method of steps S8-S9 until the hybrid surface meets G at the connection with the reference surface. 2 Continuous till; S110, then determine whether the hybrid surface and another reference surface meet G at the connection point 2 Continuously, based on the new parameter value vector, the parameter value vector is first refined in the manner of step S11, and then calculated, judged and processed in the manner of steps S18-S19 until the hybrid surface and the other reference surface meet G at the connection. 2 Until it is continuous, that is, the connection G between the two reference surfaces is obtained. 2 Continuous blended surfaces with errors within a given threshold.

4. The error-controllable hybrid surface generation method according to claim 3, characterized in that: Using the B-spline surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) as the reference surface, that is: Among them, k = 1, 2, used to distinguish different B-spline surfaces; Indicates control point; Respectively represent the node vector U k 、V k Basis functions on ; Select the surface S1(u 1 ,v 1 ) of the boundary C1(u 1 )=S1(u 1 ,1) and surface S2(u 2 ,v 2 ) of the boundary C2(u 2 )=S2(u 2 ,0) as the boundary range of the generated blended surface, that is: On the boundary curve C1(u 1 ) and C2(u 2 ), respectively specify the parameter value range as [a0, a1] and [b0, b1] area for blending operation, and generate a blended surface that satisfies the specified geometric continuity with the reference surface, where V 00 =C1(a0),V 01 =C1(a1),V 10 =C2(b0),V 11 =C2(b1), corresponding to the four vertices of the blended surface.

5. The error-controllable hybrid surface generation method according to claim 4, characterized in that: G 0 In the continuous case, the hybrid surface is generated as follows: First, at point V 00 With V 10 , point V 01 With V 11 Interpolate a first-degree B-spline curve C1(v) and C2(v) as the ridge line, that is: V=[0,0,1,1] in, V is the node vector corresponding to the B-spline curve; Then connect the endpoint V 00 With V 01 As the initial sampling point, denoted as That is P1 001 =V 00 , The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as a contour line, denoted as Among them, the first-order partial derivative With the second-order partial derivative They are: Similarly, the terminal V 10 With V 11 As the initial sampling point, denoted as That is P1 002 =V 10 , The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as another contour line, denoted as Among them, the first-order partial derivative With the second-order partial derivative They are: Then, a double-track sweep operation is performed based on the two contour lines C1(u′), C2(u′) and the two ridge lines C1(v), C2(v) to obtain a B-spline surface. This surface is the desired blended surface.

6. The error-controllable hybrid surface generation method according to claim 4, characterized in that: G 1 In the continuous case, the hybrid surface is generated as follows: First, at point V 00 With V 10 , point V 01 With V 11 Interpolate a cubic B-spline curve C1(v) and C2(v) as the ridge line, that is: in, V is the node vector corresponding to the B-spline curve; Then connect the endpoint V 00 With V 01 As the initial sampling point, denoted as That is P1 001 =V 00 , The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as a contour line, denoted as Among them, the first-order partial derivative With the second-order partial derivative They are: Similarly, the terminal V 10 With V 11 As the initial sampling point, denoted as That is P1 002 =V 10 , The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as another contour line, denoted as Among them, the first-order partial derivative With the second-order partial derivative They are: Then, a double-track sweep operation is performed based on the two contour lines C1(u′), C2(u′) and the two ridge lines C1(v), C2(v) to obtain an initial B-spline surface S 0 (u',v), that is: To realize the hybrid surface and the reference surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) At the connection G 1 Continuous, you need to adjust the initial surface control point network The local control points in the control point are adjusted by the condition of first-order partial derivative continuity; First, the first-order partial derivatives of the reference surface in the v direction at the connection are calculated as follows: Then, based on the first-order partial derivative, the first-order partial derivative and the second-order partial derivative in the u direction are calculated respectively: Again, the interpolation algorithm is used to convert the first-order partial derivative and As sampling points, the spline curve is interpolated, that is, the position information is used Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as Similarly, using location information Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as The adjusted surface control point network is recorded as According to G 1 The continuity condition and the interpolation curve information obtained above can be used to deduce the replaced control network: Therefore, the final result is G at the connection with the reference surface. 1 The continuous blended surface is:

7. The error-controllable hybrid surface generation method according to claim 4, characterized in that: G 2 In the continuous case, the hybrid surface is generated as follows: First, at point V 00 With V 10 , point V 01 With V 11 Interpolate a 5th-order B-spline curve C1(v) and C2(v) as the ridge line, that is: in, V is the node vector corresponding to the B-spline curve; Then connect the terminal V 00 With V 01 As the initial sampling point, denoted as That is P1 001 =V 00 , The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as a contour line, denoted as Among them, the first-order partial derivative With the second-order partial derivative They are: Similarly, the terminal V 10 With V 11 As the initial sampling point, denoted as That is P1 002 =V 10 , The parameter value information corresponding to the sampling point is recorded as Right now According to the location information of the sampling point Parameter value information corresponding to the sampling point First-order partial derivative information of the sampling point on the boundary curve and second-order partial derivative information Interpolation gets a C 2 The continuous cubic B-spline curve is used as another contour line, denoted as Among them, the first-order partial derivative With the second-order partial derivative They are: Then, a double-track sweep operation is performed based on the two contour lines C1(u′), C2(u′) and the two ridge lines C1(v), C2(v) to obtain an initial B-spline surface S 0 (u',v), that is: To realize the hybrid surface and the reference surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) At the connection G 2 Continuous, you need to adjust the initial surface control point network The local control points in the control point are adjusted by the first-order partial derivative continuity and second-order partial derivative continuity conditions; First, the first-order partial derivative and the second-order partial derivative of the reference surface in the v direction at the connection are calculated as follows: Then, based on the first-order partial derivative and the second-order partial derivative, the first-order partial derivative and the second-order partial derivative in the u direction are calculated respectively: Again, the interpolation algorithm is used to convert the first-order partial derivative and As sampling points, the spline curve is interpolated, that is, the position information is used Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as Similarly, using location information Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as Similar to the first-order partial derivative, the second-order partial derivative and As sampling points, the spline curve is interpolated, that is, the position information is used Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as Similarly, using location information Parameter information First-order partial derivative information With the second-order partial derivative Interpolating a spline curve is denoted as The adjusted surface control point network is recorded as According to G 1 Continuous and G 2 The continuity condition and the interpolation curve information obtained above can be used to deduce the replaced control network: Therefore, the final result is G at the connection with the reference surface. 2 The continuous blended surface is:

8. A method for generating a hybrid surface with controllable error according to any one of claims 1 to 7, characterized in that: Before performing the blending operation, the reference surface is clipped, and the reference surface is clipped by a given clipping curve to obtain a surface patch, and the blending operation is performed on the obtained surface patch.

9. The error-controllable hybrid surface generation method according to claim 8, characterized in that: The reference surface is denoted as S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ),Right now: In order to obtain the trimming curve on the reference surface, a parameter curve on a given parameter domain is required, that is, the parameter curve on the parameter domain corresponds to the trimming curve on the surface. 1 ,v 1 ) and S2(u 2 ,v 2 The corresponding parameter curves of the clipping curves on the parameter domain are and Correspondingly, the clipping curves are and In the cutting curve and The parameter value ranges are specified as [a0, a1] and [b0, b1] respectively to perform blending operations, and a blended surface is generated that satisfies the specified geometric continuity with the surface patch retained after clipping. Corresponding to the 4 vertices of the blended surface.

10. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements an error-controllable hybrid surface generation method as described in any one of claims 1-9.