Sweeping curved surface generation algorithm with controllable splicing error
By using boundary sampling and B-spline interpolation technology in the swept surface generation algorithm in the CAD field, G1 and G2 continuity within the preset error range is achieved, and high-quality swept surfaces are generated, which solves the problem of existing technologies. It solves the problem of difficult-to-control splicing errors and improves surface continuity and design accuracy.
Patent Information
- Application Number
- CN202410720350.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-08-30
AI Technical Summary
In the field of computer-aided design (CAD), it is difficult to effectively control splicing errors during the generation of swept surfaces, resulting in discontinuous or low-quality surfaces, which affects the accuracy and safety of the design.
A swept surface generation algorithm with controllable splicing error is proposed. The parameter values and partial derivative information are obtained through the boundary sampling points of the given surface and curve, and the C2 continuous cubic B-spline curve is interpolated as the contour line, and combined with the ridge Sweep the line and adjust local control points to achieve G1 and G2 continuity to ensure that the surface is continuous within the preset error range.
Generate high-quality swept surfaces with fewer control points within the preset splicing error threshold, ensuring smoothness and quality, which is better than industry standard software Rhino and Catia, and is easier to adjust and modify later.
Smart Images

Figure CN118568807A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of three-dimensional models, and in particular to a swept surface generation algorithm with controllable splicing errors. Background Art
[0002] In the field of Computer-Aided Design (CAD), swept 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 engineering design, animation production, and medical image processing. In today's precision engineering design field, especially in the aerospace industry, the accuracy and quality of surface design are extremely high. The construction of complex free-form surfaces requires not only aesthetics, but also performance and safety. Minor design flaws may also cause a decrease in aerodynamic performance or increase structural risks. Therefore, it is crucial to use computer-aided design (CAD) software for accurate modeling. However, due to the complexity of design parameters and the limitations of calculation models, it is often difficult to avoid errors in the process of surface splicing in actual operation. How to effectively control or even reduce these splicing errors has become a key issue in improving design quality.
[0003] The academic community has conducted a lot of exploration on the swept surface generation algorithm and proposed a variety of methods. Choi and Lee (BK Choi, CS Lee. Sweep surfaces modelling via coordinate transformation and blending [J]. Computer Aided Design, 1990, 22 (2): 87–96.) proposed a method to model swept surfaces through coordinate transformation and blending techniques, providing a powerful tool to describe the swept surface generation process, and introduced blending techniques to smoothly connect multiple swept surfaces, thereby ensuring the continuity and smoothness of the resulting surface; Bloomenthal and Riesenfeld (Bloomenthal M, Riesenfeld R F. Approximation of swept surfaces by tensor product NURBS [C]. In Curves and surfaces in Computer Vision and Graphics II, volume 1610, pages 132–144. SPIE, 1992.) proposed a method to approximate swept surfaces using tensor product non-uniform rational B-splines, generating high-quality, continuous surfaces by approximating swept surfaces in parameter space; Johnstone and Williams (Johnstone JK, Williams J P. A rational model of the surface swept by a curve [J]. Computer Graphics Forum, 1995, 14: 77–88.) proposed the use of rational functions to model the surface swept by a curve. They introduced a rational model that can accurately represent the complex surface swept by a curve along a path; Szilvási Nagy and Vendel (Márta Szilvási-Nagy, Teréz P. Vendel. Generating curves and swept surfaces by blended circles [J]. Computer Aided Geometric Design, 2000, 17 (2): 197–206.) proposed a method to generate curves and swept surfaces by blending circles, providing an intuitive and flexible way to create complex curves and allowing users to approximate and modify swept surfaces to meet design requirements. The blending technique ensures that the generated shape is continuous and smooth, making it a powerful tool in computer graphics and computer-aided design; Wang and Sun (ping Wang G, guang Sun J. Shape control of swept surface with profiles [J]. Computer Aided Design, 2001, 33 (12): 893–902.) proposed a method for shape control of swept surfaces, introducing control parameters based on cross-sectional shapes, allowing users to accurately adjust and modify the shape of swept surfaces to meet functional and aesthetic requirements; Xia and Ge (Xia J, Ge Q J. On the Exact Computation of the Swept Surface of a Cylindrical Surface Undergoing Two-Parameter Rational Bézier Motions [C]. In Volume 3: 5th Design for Manufacturing Conference, pages 375–381. American Society of Mechanical Engineers, September 2000.) introduced a method for using symbolic calculation to accurately calculate the swept surface generated by the two-parameter rational Bezier motion of the cylinder, which provides a practical tool for users who need to accurately model and analyze the swept surface of the cylinder; Schmidt and Wyvill (Schmidt R, Wyvill B. Generalized sweep templates for implicit modeling [C]. In Proceedings of the 3rd International Conference on Computer Graphics and Interactive Techniques in Australasia and South East Asia, GRAPHITE'05, page 187–196, New York, NY, USA, 2005. Association for Computing Machinery.) proposed a general sweep template for implicit modeling from the perspective of implicit equations, which expanded the traditional swept surface technology and allowed users to create and manipulate complex organic shapes; Farouki and Nittler (Farouki RT, Nittler K M. Rational swept surface constructions based on differential and integral sweep curve properties [J]. Computer Aided Geometric Design, 2015, 33: 1–16.) used the Pythagorean-hodograph sweep curve method and used the differential and integral properties of the sweep curve to generate a wider range of reasonable swept surface types. .
[0004] In recent years, the research on swept surfaces has been mainly driven by specific applications, so the research is concentrated in the internal R&D teams of commercial CAD software companies. The leading CAD software on the market currently provides many tools and algorithms to generate swept surfaces and control the splicing errors to a certain extent. Catia is a CAD / CAM / CAE three-in-one product development solution developed by Dassault Systemes, which is mainly used in aerospace, automobile, industrial machinery and other fields. Catia is known for its excellent surface processing capabilities and can create high-quality swept surfaces with extremely low errors. Rhino is a professional 3D modeling tool known for its fast and flexible surface modeling functions, which is mainly used in industrial design, jewelry design, architectural design and other fields. In terms of swept surface generation, Catia provides a variety of optional modes for generating swept surfaces. For example, the sweep styles provided in the FreeStyle module include simple sweep, i.e. single-track sweep, and sweep and fit, i.e. adding guide line options on the basis of simple sweep, etc., while Rhino software mainly consists of two functions in generating swept surfaces: single-track sweep and double-track sweep. Summary of the invention
[0005] In order to overcome the defects in the above-mentioned prior art, the present invention provides a swept surface generation algorithm with controllable stitching error, which can generate a high-quality swept surface with fewer control points within a preset stitching error threshold.
[0006] To achieve the above object, the present invention adopts the following technical solutions, including:
[0007] A swept surface generation algorithm with controllable splicing error includes the following steps:
[0008] S1, given a surface and a curve to sweep; where the given surface expression is recorded as The given curve expression is recorded as
[0009] Take the given curve C(v′) as the ridge line;
[0010] Get the boundary curve of a given surface at v = 1. First, take the two endpoints of the boundary curve as sampling points to obtain the parameter value vector U corresponding to a sampling point. p =[u1,u2]=[0,1], and the partial derivative information corresponding to the sampling point, according to the position information of the sampling point Parameter information u corresponding to the sampling point k , the first-order partial derivative information S of the sampling point on the boundary curve u (u k ,1) and the second-order partial derivative information S uu (u k ,1), interpolation obtains the only C 2 A continuous cubic B-spline curve is used as the contour line; the contour line expression is recorded as
[0011]
[0012] Among them, N j,q (v′) is the basis function defined on the node vector V′, N i,3 (u′) is the basis function defined on the node vector U′, q represents the degree, Q j , P i 1 represents the control point on the curve; U′=[u0′,…,u3′,u4′,…,u′ n′ ,u′ n′+1 ,…,u′ n′+4 ],V′=[v0′,…,v′ q ,v′ q+1 ,…,v′ m ,v′ m+1 ,…,v′ m+q+1 ];
[0013] S2, sweep according to the contour line and ridge line to obtain the initial swept surface:
[0014]
[0015] in, Represents control points on a surface; j=0,1,2,…,m;and when u′=u k When v′=0
[0016] S3, by adjusting the local control points of the initial swept surface to achieve the connection with the given surface G 1Continuous, get the given surface G 1 Continuous swept surfaces;
[0017] S4, the parameter value vector U corresponding to the sampling point p To refine, in u j with u j+1 That is, n-1 nodes 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, forming a new parameter value vector;
[0018] S5, for the new parameter value vector, calculate the normal vector of the given surface at each parameter value And calculate the normal vector of the swept surface at each parameter value According to the normal vector and The angle between the normal vectors corresponding to each parameter value is obtained as θ;
[0019] S6, 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 swept surface satisfies G within the set error range with the given surface. 1 If not, it means that the swept surface does not meet the G between the given surface and the set error range. 1 Continuous, find the parameter value where the angle θ between the normal vectors is greater than the set threshold, and j with u j+1 The parameter value u′ is obtained by averaging the parameter values between
[0020] Add u′ to the sampling process, that is, add it to the parameter value vector U p In the above example, the point corresponding to u′ is added as a sampling point, and according to the method of step S1, a unique C is interpolated based on the parameter information corresponding to the newly added sampling point, the first-order derivative information and the second-order derivative information on the boundary curve. 2 The continuous curve is taken as the contour line; and then the processing and judgment are performed according to the method of steps S2-S6 until the swept surface satisfies G with the given surface within the set error range. 1 Continuity, that is, to obtain the given surface at the connection G 1 The continuous error of the swept surface is within the set threshold.
[0021] Preferably, the method further comprises the following steps:
[0022] S7, in G 1On a continuous basis, the local control points of the initial swept surface are adjusted to achieve the connection with the given surface G 2 Continuous, get the given surface G 2 Continuous swept surfaces;
[0023] S8, according to the method of steps S4-S6, the surface G obtained in step S3 is 1 The continuous swept surface is replaced by the given surface G obtained in step S7 2 Continuous swept surface, first realize that the swept surface satisfies G with the given surface within the set error range 1 continuous;
[0024] S9, further refining the parameter value vector in the manner of step S4, and then obtaining a new parameter value vector; for the new parameter value vector, calculating the curvature value κ1 of the given surface at each parameter value, and calculating the curvature value κ2 of the swept surface at each parameter value, and obtaining the curvature difference Δκ corresponding to each parameter value according to the curvatures κ1 and κ2;
[0025] S10, judging whether the curvature difference Δκ at each parameter value is not greater than the set threshold value. If so, it means that the swept surface satisfies G within the set error range and the given surface. 2 If not, it means that the swept surface does not meet the G between the given surface and the set error range. 2 Continuous, find the parameter value whose curvature difference Δκ is greater than the set threshold, and j with u j+1 The parameter value u′ is obtained by averaging the parameter values between
[0026] Add u′ to the sampling process, that is, add it to the parameter value vector U p In the above example, the point corresponding to u′ is added as a sampling point, and according to the method of step S1, a unique C is interpolated based on the parameter information corresponding to the newly added sampling point, the first-order derivative information and the second-order derivative information on the boundary curve. 2 The continuous curve is taken as the contour line; and then the processing and judgment are performed in sequence according to steps S2, S7, S9 and S10, until the swept surface satisfies G within the set error range and the given surface. 2 Continuity, that is, to obtain the given surface at the connection G 2 The continuous error of the swept surface is within the set threshold.
[0027] Preferably, in step S3, the local control points of the initial swept surface are adjusted to achieve the connection with the given surface G 1 Continuously, calculate the initial swept surface S 0 The first-order partial derivative of (u′,v′) in the direction of v at the connection is:
[0028]
[0029] In order to make the first-order partial derivatives of the initial swept surface at the connection equal, the first row of adjacent control points of the initial swept surface at the connection is adjusted to satisfy the equation:
[0030]
[0031] Among them, the control point T that needs to be adjusted k Recorded as Since the first-order partial derivative information S of the sampling point on the boundary curve v (u k ,1) and Obtained during the sampling process, all are known, so we can obtain:
[0032]
[0033] Then according to the position information of this control point Parameter information k , first-order partial derivative information S u (u k ,1) and the second-order partial derivative information S uu (u k ,1), interpolate to get another B-spline curve with the same node vector:
[0034]
[0035] Finally, we get the given surface G 1 The continuous swept surface is:
[0036]
[0037] Its control points are:
[0038]
[0039] Preferably, in step S7, in G 1 On a continuous basis, that is, on the basis of step S3, the local control points of the initial swept surface are adjusted to achieve the connection with the given surface G 2 Continuously, calculate the initial swept surface S 0 The second-order partial derivative of (u′,v′) in the v direction at the connection is:
[0040]
[0041] In order to make the second-order partial derivatives of the initial swept surface at the connection equal, the two adjacent rows of control points of the initial swept surface at the connection are adjusted to satisfy the equation:
[0042]
[0043] Among them, the control point T that needs to be adjusted k and Q k Recorded as and Since the second-order partial derivative information S of the sampling point on the boundary curve vv (u k ,1) and It is obtained during the sampling process, so it is known that, and In G 1 When it is continuous, it can be obtained, so we can obtain:
[0044]
[0045] Then, according to the obtained control point position information Parameter information k , first-order partial derivative information S u (u k ,1) and the second-order partial derivative information S uu (u k ,1), interpolate to get another B-spline curve with the same node vector:
[0046]
[0047] Finally, we get the given surface G 2 The continuous swept surface is:
[0048]
[0049] Its control points are:
[0050]
[0051] Preferably, the first-order partial derivative information S of the sampling point on the boundary curve u (u k ,1) S v (u k ,1) and the second-order partial derivative information S uu (u k ,1) S vv (u k ,1) is:
[0052]
[0053] A readable storage medium stores a computer program, which, when executed, implements the above-mentioned swept surface generation algorithm with controllable splicing errors.
[0054] An electronic device comprises a processor, a memory and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned swept surface generation algorithm with controllable splicing error is implemented.
[0055] The advantages of the present invention are:
[0056] (1) The present invention proposes a novel swept surface generation algorithm with controllable stitching error, which can generate a high-quality swept surface with fewer control points within a preset stitching error threshold.
[0057] (2) The algorithm of the present invention can generate a swept surface within a preset stitching error threshold, ensuring that the generated surface has high smoothness and quality.
[0058] (3) Compared with the industry standard software Rhino, the surfaces generated by the algorithm of the present invention are better in terms of splicing continuity. Compared with the Catia software, the surfaces generated by the algorithm of the present invention require fewer control points while maintaining the same quality. The generated swept surfaces are more concise and subsequent adjustments and modifications are easier.
[0059] (4) Through comparative analysis with industry standard Catia and Rhino software, the algorithm of the present invention is superior to Rhino in generating smooth surfaces, and while maintaining the same surface quality as Catia, the number of control points required is smaller, which means that under the premise of achieving the same design accuracy, the swept surface generated by the algorithm of the present invention is easier to adjust and modify later.
[0060] (5) Based on specific examples, the present invention compares and analyzes the surfaces obtained by the single-track sweeping algorithm, the error-controlled swept surface generation algorithm and the double-track sweeping algorithm with the results obtained by the corresponding functions of the commercial software Catia and Rhino. It is found that the surface obtained by the algorithm of the present invention is of better quality than that of the Rhino software, and is able to obtain a surface of equivalent quality with fewer control points compared to the Catia software, and is more stable and easier to operate subsequently. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 This is a schematic diagram of a single track sweep.
[0062] Figure 2 Schematic diagram of double-track sweeping.
[0063] Figure 3Schematic diagram of a swept surface generation with controllable stitching error.
[0064] Figure 4 Schematic diagram of the two B-spline surfaces and their control point networks given in Example 1.
[0065] Figure 5 In Example 1, G 1 Schematic diagram of the results obtained by the continuous single-track sweep algorithm and the corresponding control point network.
[0066] Figure 6 In Example 1, G 1 The results obtained by continuously downloading Catia software and the corresponding control point network diagram.
[0067] Figure 7 In Example 1, G 2 Schematic diagram of the results obtained by the continuous single-track sweep algorithm and the corresponding control point network.
[0068] Figure 8 In Example 1, G 2 The results obtained by continuously downloading Catia software and the corresponding control point network diagram.
[0069] Fig. 9 Schematic diagram of Gaussian curvature analysis of the surface generated by the single-track sweep algorithm in Example 1.
[0070] Fig.10 This is a schematic diagram of the Gaussian curvature analysis of the surface generated by the Catia software in Example 1.
[0071] Fig.11 Schematic diagram of a B-spline curve and two B-spline surfaces and their control point network given in Example 2.
[0072] Fig.12 In Example 2, G 1 Schematic diagram of the results obtained by the continuous double-track sweeping algorithm and the corresponding control point network.
[0073] Fig.13 In Example 2, G 1 The results obtained by continuously downloading Rhino software and the corresponding control point network diagram.
[0074] Fig.14 In Example 2, G 2 Schematic diagram of the results obtained by the continuous double-track sweeping algorithm and the corresponding control point network.
[0075] Fig.15 In Example 2, G 2 The results obtained by continuously downloading Rhino software and the corresponding control point network diagram.
[0076] Fig.16 This is the surface curvature map generated by the dual-track sweeping algorithm in Example 2.
[0077] Fig.17 This is the surface curvature diagram generated by the Rhino software in Example 2.
[0078] Fig.18 Schematic diagram of the B-spline surface and B-spline curve and their control point network given in Example 3.
[0079] Fig.19 In Example 3, G 1 Schematic diagram of the results obtained by the continuous error controllable algorithm and the corresponding control point network.
[0080] Fig. 20 In Example 3, G 1 The results obtained by continuously downloading Catia software and the corresponding control point network diagram.
[0081] Fig.21 In Example 3, G 2 Schematic diagram of the results obtained by the continuous error controllable algorithm and the corresponding control point network.
[0082] Fig. 22 In Example 3, G 2 The results obtained by continuously downloading Catia software and the corresponding control point network diagram.
[0083] Fig.23 This is the surface curvature diagram generated by the error controllable algorithm in Example 3.
[0084] Fig.24 This is the surface curvature diagram generated by Catia software in Example 3. DETAILED DESCRIPTION
[0085] 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.
[0086] 1. Basic Algorithm
[0087] Before introducing the algorithm of the present invention, the basic algorithm and related definitions are explained as follows.
[0088] The given B-spline surface is denoted as S k (u k ,vk ), the corresponding expression is:
[0089]
[0090] Among them, k = 1, 2, ..., is used to distinguish different B-spline surfaces; They are defined at the node vector U k 、V k The basis functions on Represents a control point.
[0091] For the node vector U k With V k The present invention takes
[0092] 1.1. Definition of swept surface
[0093] As an efficient tool for creating complex three-dimensional models, sweeping occupies an important position in computer-aided design. Sweeping mainly consists of two parts, one is the contour line that describes the initial shape, and the other is the ridge line of the path where the contour line moves; the swept surface is a surface generated by sliding a curve (contour line) along another curve (ridge line); the classic swept surface definition (Piegl L, Tiller W. The NURBS book [M]. Springer Science & Business Media, 2012.) will generate surfaces with self-intersection, degeneration and discontinuity, so an approximate method is used when actually generating the swept surface. The present invention uses B-spline curves as contour lines and ridge lines, and assumes C1 (u) as the contour line and C2 (v) as the ridge line. The expressions are recorded as:
[0094]
[0095] Among them, N i,p (u), N j,q (v) are the basis functions defined on the node vectors U and V, respectively, T i , Q j They represent control points respectively.
[0096] Since the swept surface is composed of a series of contour-like curves, let the swept surface be S(u,v) and satisfy
[0097]
[0098] If the swept surface S(u,v) is a B-spline surface, that is:
[0099]
[0100] Among them, P i,j They represent control points respectively.
[0101] Depend on P 0,j =Q j ;
[0102] Depend on P i,0 =T i ;
[0103] Depend on And the derivative formula of B-spline curve surface, we can get:
[0104]
[0105] Right now:
[0106]
[0107] Find P i,j+1 -P i,j =Q j+1 -Q j ;
[0108] Therefore, the control point network of the B-spline surface can be obtained as:
[0109] P i,j =T i +(Q j -Q0),
[0110] i=0,1,2,…,n; j=0,1,2,…,m.
[0111] 1.2. Single track sweeping algorithm and geometric stitching
[0112] Single-track sweeping refers to the process of generating a surface by sliding the contour line along a path, i.e., the ridge line direction. Figure 1 As shown in the figure, when the profile and spine are the surface boundaries, you can customize the swept surface to keep G with the surface where the profile and spine are located. 1 or G 2 Continuity, which can be achieved through corresponding functions in CAD software such as Catia and Rhino.
[0113] Given two B-spline surfaces S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ), select one boundary of the surface to sweep, and the surface patch S formed by sweeping is consistent with the two given surface patches S1(u 1 ,v 1 ) and S2(u2 ,v 2 ) are connected together, and G can be realized at the connection point 1 and G 2 Continuous, G 1 Continuity means that the surface patches have a common tangent plane at the connection point, G 2 Continuous in G 1 On a continuous basis, the curvature of the surface patches at their joints is also continuous.
[0114] The present invention provides the G between the curved patches 1 Continuous and G 2 Continuous algorithm:
[0115] S11, select surface S1(u 1 ,v 1 ) As the contour line, select the surface S2(u 2 ,v 2 ) As a ridge,
[0116] Based on the above definition of the swept surface, the initial swept surface is generated, namely:
[0117]
[0118] Among them, the control point network
[0119] S12, G 1 Continuity: To satisfy the G between the generated swept surface and the two given surfaces 1 Continuous, requires an initial control point network Make local adjustments and adjust the corresponding control point information through the condition of first-order continuity at the connection.
[0120] First, calculate the given B-spline surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) The first-order partial derivatives of the v and u directions at the boundary are:
[0121]
[0122] Then calculate the initial swept surface S 0 (u 1 ,v 2 ) The first-order partial derivatives of the connection in the v direction and the u direction are:
[0123]
[0124] In order to make the first-order partial derivatives of the surface at the connection equal, it is necessary to adjust the control points of the first row and the first column of the swept surface at the connection, and the equations satisfied are:
[0125]
[0126] Among them, the adjusted control point is marked as 1. because are all known, so the control points can be obtained and They are:
[0127]
[0128] For the initial control point network The middle point and Use points and Replacement is performed, and other position control points remain the same as the initial control points;
[0129] The final result is consistent with the given surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) At the connection G 1 The continuous swept surface S(u 1 ,v 2 )for:
[0130]
[0131] S13, proceed to G 2 Continuous: In G 1 On a continuous basis, the second-order partial derivatives of the initial swept surface and the given surface at the connection are calculated respectively, and the second-order partial derivatives are made equal by adjusting the control points of the swept surface. The swept surface generated based on the adjusted control point network can satisfy the G at the connection with the given surface. 2 continuous.
[0132] First, calculate the given B-spline surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) The corresponding second-order partial derivatives in the v and u directions at the boundary are:
[0133]
[0134] Then calculate the initial swept surface S 0 (u1 ,v 2 ) The second-order partial derivatives of the connection in the v direction and the u direction are:
[0135]
[0136] In order to make the second-order partial derivatives of the surface at the connection equal, it is necessary to adjust the two adjacent rows and columns of control points of the swept surface at the connection, and the equations satisfied are:
[0137]
[0138] Among them, the adjusted control point is marked as 1. In G 1 On a continuous basis, control points and is known, and because and Known, the control point can be obtained through the equation and They are:
[0139]
[0140] For the initial control point network In addition to the point and Use points and To replace, you also need to change the point and Use points and Replacement is performed, and other position control points remain the same as the initial control points;
[0141] The final result is consistent with the given surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) At the connection G 2 The continuous swept surface is:
[0142]
[0143] 1.3. Dual-track sweeping algorithm and geometric stitching
[0144] Compared with single-track sweeping, dual-track sweeping has an additional sliding path, which refers to the process of sliding the profile along two tracks, i.e., the ridge line, to generate a surface. Figure 2 As shown in the figure, when two ridges (spine1 and spine2) are surface boundaries, you can customize the swept surface to maintain G between the surface where the ridges are located.1 or G 2 Continuity is possible in the two-track sweep function of Rhino, but in Catia, it can only be achieved when the two ridges are of the same length.
[0145] Given a B-spline curve and two B-spline surfaces S2(u 2 ,v 2 ) and S3(u 3 ,v 3 ), select curve C1(u 1 ) as the contour line, and select the surface S2(u 2 ,v 2 ) and S3(u 3 ,v 3 ) and As the ridge line, by sliding the contour line along the direction of these two ridge lines, a surface S2(u 2 ,v 2 ) and S3(u 3 ,v 3 ) At the connection G 1 With G 2 Continuous swept surface.
[0146] Based on the definition of the swept surface above, first use the contour line C1(u 1 ) and the ridge line C2(v 2 ) is swept to obtain the swept surface S 1 (u 1 ,v 2 ),Right now:
[0147]
[0148] Then use the contour line C1(u 1 ) and the ridge line C3(v 3 ) is swept to obtain the swept surface S 2 (u 1 ,v 3 ),Right now:
[0149]
[0150] Among them, the control point network m2=m3,V 2 =V 3 .
[0151] Then these two control point networks and Weighted fusion into a control point network {R ij}, first calculate the Euclidean distance l between every two adjacent control points on the contour line i ,Right now:
[0152]
[0153] Then the distance l i Summing to get That is, the total length of the contour line controls the polygon, and the proportion of the partial length to the total length is used as the weight to merge the two control point networks to obtain the final control point network {R ij},Right now
[0154]
[0155] i=0,1,2,…,n1,j=0,1,2,…,m,m=m3=m3;
[0156] The final swept surface is S(u 1 ,v), that is:
[0157]
[0158] Wherein m=m2=m3, q=q2=q3.
[0159] If G is realized 1 With G 2 Continuity is similar to the above single track sweeping algorithm. On the basis of sweeping the surface, the two adjacent columns of control points of the control point network at the surface connection are adjusted to satisfy the continuity of the first-order derivative and the second-order derivative respectively. The adjusted control points are replaced by {R ij}, and the others remain unchanged. The final swept surface satisfies the connection G of the two given surfaces. 1 With G 2 continuous.
[0160] 2. Algorithm of the present invention
[0161] The present invention provides a swept surface generation algorithm with controllable splicing error, and the generation schematic diagram is as follows: Figure 3 As shown, for a swept surface with controllable error, given a surface and a curve, such as Figure 3 As shown, the surface boundary is selected as the profile, the curve is selected as the spine, and a swept surface whose continuity error with a given surface is within a given range is generated by sweeping.
[0162] For the generation of a swept surface with controllable error, this embodiment takes a given B-spline surface and a B-spline curve as an example. First, a boundary of the surface is selected for sampling, and the position information, parameter information, first-order partial derivatives and second-order partial derivatives of the sampling point are obtained. Based on this information, a unique C 2 The continuous cubic B-spline curve uses the interpolated B-spline surface as the contour line and the given B-spline curve as the ridge line for sweeping. The swept surface can be consistent with the given B-spline surface G within a given error range. 1 With G 2 continuous.
[0163] S1, first assume that the given B-spline surface is A given B-spline curve is
[0164] To sample the boundary curve of a given surface at v = 1, first use the two endpoints of the boundary curve as sampling points to obtain a parameter value vector U corresponding to a sampling point. p =[u1,u2]=[0,1], and the partial derivative information corresponding to the sampling points.
[0165] Among them, the first-order partial derivative and the second-order partial derivative of the sampling point along the v direction and the u direction on the boundary curve are:
[0166]
[0167] According to the location information of the sampling point Parameter information u corresponding to the sampling point k , the first-order partial derivative information S of the sampling point on the boundary curve u (u k ,1) and the second-order partial derivative information S uu (u k ,1), interpolation obtains the only C 2 Continuous cubic B-spline curves are used as contour lines.
[0168] The expression of the contour line is recorded as
[0169] Among them, the interpolation algorithm is a prior art. For details, please refer to the technology provided in the patent number 20240548880X "Recovery method of key curves in reverse engineering", or refer to the paper "Error controllable cubic spline C in numerical control technology" 2 Interpolation".
[0170] S2, based on the above definition of the swept surface, the interpolated curve is used as the contour line C1(u′), and the given curve is used as the ridge line C(v′) to generate the initial swept surface, that is:
[0171]
[0172] Among them, the control point network And when u′=u k When v′=0
[0173] S3, if G is realized 1 If the surface is continuous, the local control points of the initial swept surface are adjusted to achieve the connection with the given surface G 1 Continuous, adjust the corresponding control point information through the condition that the first-order derivative is continuous at the connection.
[0174] Calculate the initial swept surface S 0 The first-order partial derivative of (u′,v′) in the direction of v at the connection is:
[0175]
[0176] In order to make the first-order partial derivatives of the surface at the connection equal, it is necessary to first adjust the first row of control points adjacent to the connection of the initial swept surface, and the equation satisfied is:
[0177]
[0178] Among them, the control point T that needs to be adjusted k Recorded as Due to S v (u k ,1) and In the sampling process, all are known, so we can get
[0179]
[0180] Then based on this control point position information Parameter information k , first-order partial derivative information S u (u k ,1) and the second-order partial derivative information S uu (u k ,1), another B-spline curve with the same node vector can be obtained by using the interpolation function
[0181] Finally, the obtained 1 The continuous B-spline surface is:
[0182]
[0183] Its control points are:
[0184]
[0185] The node vector corresponding to the parameter value u′ is given by the interpolation function, and the node vector corresponding to the parameter value v is given by the curve Be consistent.
[0186] In practical problems, when sampling the surface boundary, we hope to interpolate a curve within the error tolerance range with fewer control points. 1 In the case of continuity, the present invention takes the case where the angle between the normal vectors of the surfaces is less than a set threshold as an example to interpolate a B-spline curve with an allowable error using the least control points.
[0187] S4, the parameter value vector U corresponding to the sampling point p To refine, in u j with u j+1 That is, n-1 nodes 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, forming a new parameter value vector;
[0188] S5, for the new parameter value vector, calculate the normal vector of the given surface at each parameter value And calculate the normal vector of the swept surface at each parameter value According to the normal vector and The angle between the normal vectors corresponding to each parameter value is obtained as θ.
[0189] S6, 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 swept surface satisfies G within the set error range with the given surface. 1 If not, it means that the swept surface does not meet the G between the given surface and the set error range. 1 Continuous, find the parameter value where the angle θ between the normal vectors is greater than the set threshold, and j with u j+1 The parameter value u′ is obtained by averaging the parameter values between .
[0190] Add u′ to the sampling process, that is, add it to the parameter value vector U p In the above example, the point corresponding to u′ is added as a sampling point, and according to the method of step S1, a unique C is interpolated based on the parameter information corresponding to the newly added sampling point, the first-order derivative information and the second-order derivative information on the boundary curve. 2The continuous curve is taken as the contour line; and then the processing and judgment are performed according to the method of steps S2-S6 until the swept surface satisfies G with the given surface within the set error range. 1 Continuity, that is, to obtain the given surface at the connection G 1 The continuous error of the swept surface is within the set threshold.
[0191] S7, if G is realized 2 Continuous, then in G 1 On a continuous basis, the local control points of the initial swept surface are adjusted to achieve the connection with the given surface G 2 Continuous, get the given surface G 2 Continuous swept surface.
[0192] Calculate the initial swept surface S 0 The second-order partial derivative of (u′,v′) in the v direction at the connection is:
[0193]
[0194] In order to make the second-order partial derivatives of the surface at the connection equal, it is necessary to first adjust the two adjacent rows of control points of the initial swept surface at the connection, and the equation satisfied is:
[0195]
[0196] Among them, the control point T that needs to be adjusted k and Q k Recorded as and Due to S vv (u k ,1) and It is obtained during the sampling process, so it is known that, and In G 1 When it is continuous, it can be obtained, so we can obtain:
[0197]
[0198] Then, according to the obtained sampling point location information Parameter information k , first-order partial derivative information S u (u k ,1) and the second-order partial derivative information S uu (u k ,1), using the interpolation function, we can also obtain a B-spline curve with the same node vector
[0199] The final obtained surface is consistent with the given surface The continuous B-spline surface is:
[0200]
[0201] Its control points are:
[0202]
[0203] S8, according to the method of steps S4-S6, the surface G obtained in step S3 is 1 The continuous swept surface is replaced by the given surface G obtained in step S7 2 Continuous swept surface, first realize that the swept surface satisfies G with the given surface within the set error range 1 continuous.
[0204] G 2 Continuous case and G 1 Continuous is similar, except that G 1 After the continuity, by refining the parameter value vector, the curvature difference corresponding to the parameter value at the connection is calculated to see if it is within the given error value range. If so, then at this time, G is satisfied. 2 When continuous, the number of sampling points is the least, if not, then it is the same as G 1 The continuous situation is the same, by increasing the sampling points until the curvature difference is within the given error value range.
[0205] S9, in accordance with the method of step S4, the parameter value vector is further refined to obtain a new parameter value vector; for the new parameter value vector, the curvature value κ1 of the given surface at each parameter value is calculated, and the curvature value κ2 of the swept surface at each parameter value is calculated, and based on the curvatures κ1 and κ2, the curvature difference corresponding to each parameter value is obtained as Δκ.
[0206] S10, judging whether the curvature difference Δκ at each parameter value is not greater than the set threshold value. If so, it means that the swept surface satisfies G within the set error range and the given surface. 2 If not, it means that the swept surface does not meet the G between the given surface and the set error range. 2 Continuous, find the parameter value whose curvature difference Δκ is greater than the set threshold, and j with u j+1 The parameter value u′ is obtained by averaging the parameter values between .
[0207] Add u′ to the sampling process, that is, add it to the parameter value vector U p In the above example, the point corresponding to u′ is added as a sampling point, and according to the method of step S1, a unique C is interpolated based on the parameter information corresponding to the newly added sampling point, the first-order derivative information and the second-order derivative information on the boundary curve. 2The continuous curve is taken as the contour line; and then the processing and judgment are performed in sequence according to steps S2, S7, S9 and S10, until the swept surface satisfies G within the set error range and the given surface. 2 Continuity, that is, to obtain the given surface at the connection G 2 The continuous error of the swept surface is within the set threshold.
[0208] In this embodiment, the results obtained by the single-track sweeping algorithm and the swept surface generation algorithm with controllable splicing errors are compared and analyzed with the results generated by the corresponding function of the Catia software, and the results obtained by the dual-track sweeping algorithm are compared and analyzed with the results obtained by the dual-track sweeping function of the Rhino software.
[0209] Example 1: Comparison of results of single-track sweeping algorithm
[0210] For the single-track sweep algorithm, two B-spline surfaces are first given. The two B-spline surfaces and their control point networks are as follows: Figure 4 As shown, in this embodiment, the upper boundary of the lower left surface is selected as the contour line, and the left boundary of the upper right surface is selected as the ridge line for sweeping to generate a result with specific continuity with the given surface.
[0211] In G 1 The results obtained by the continuous single-track sweep algorithm and the corresponding control point network are as follows Figure 5 As shown in the figure, the results obtained by Catia software and the corresponding control point network are as follows Figure 6 As shown. 2 The results obtained by the continuous single-track sweep algorithm and the corresponding control point network are as follows Figure 7 As shown in the figure, the results obtained by Catia software and the corresponding control point network are as follows Figure 8 shown.
[0212] The order of the surface obtained by the single-track sweep algorithm remains consistent with the order of the selected boundary curve, and the number of control points is the same. The surface generated by Catia is upgraded, that is, the sweep is performed after fitting the surface boundary, and the corresponding number of control points is also increased accordingly. Compared with the single-track sweep algorithm, the surface generation process is more cumbersome.
[0213] This embodiment uses the connection checker analysis function in Catia to compare the results generated by the single-track sweep algorithm with the results generated by Catia to analyze the geometric continuity of the surface splicing. The results are shown in Table 1. From the results, it can be seen that whether it is G 1 Continuous or G 2Continuity: The maximum continuity error between the surface generated by the single-track sweep algorithm and the given surface is smaller than that generated by Catia. However, when Catia generates a swept surface with specified curvature continuity, there will still be large errors.
[0214] Table 1 Surface geometric continuity error results
[0215]
[0216]
[0217] For G 2 In the case of continuous surface, this embodiment uses the Gaussian curvature analysis function in Catia to compare the surface generated by the single-track sweep algorithm with Catia. The result generated by the single-track sweep algorithm is as follows: Fig. 9 As shown, the results generated by Catia are as follows Fig.10 As shown. Fig. 9 and Fig.10 From the curvature diagram of the surface connection in the figure, it can be seen that the surface generated by the single-track sweep algorithm is smoother at the connection than the surface result generated by Catia.
[0218] Example 2: Comparison of results of dual-track sweeping algorithm
[0219] This embodiment compares and analyzes the surface results generated by the dual-track sweep algorithm with those generated by the Rhino software.
[0220] First, a B-spline curve and two B-spline surfaces are given, and a B-spline curve and two B-spline surfaces and their control point networks are given as follows: Fig.11 As shown, a given B-spline curve is selected as the contour line, and two boundaries of the two surfaces in the middle area are selected as two ridges for double-track sweeping.
[0221] In G 1 In the case of continuous sweep, the results of the dual-track sweep algorithm and its control point network are as follows: Fig.12 As shown, the results obtained by Rhino and its control point network are as follows Fig.13 As shown. 2 In the case of continuous sweep, the results of the dual-track sweep algorithm and its control point network are as follows: Fig.14 The results obtained by Rhino and its control point network are shown in Fig.15 shown.
[0222] From G 1 Continuous and G 2 From the continuous generation results, it can be seen that the result generated by the dual-track sweep algorithm is a patch, while the one generated by Rhino is a large patch composed of multiple small patches. Compared with the dual-track sweep algorithm, the surface generation process is more complicated.
[0223] In G 2 In the case of continuous curvature, this embodiment visualizes the curvature graphs of the surface results generated by the double-track sweep algorithm and the surface generated by Rhino to analyze the smoothness of the surface at the connection. The curvature graph generated by the double-track sweep algorithm is shown in Fig.16 The resulting curvature map generated by Rhino is shown in Fig.17 As shown in the figure, the change of curvature graph at the connection point shows that the surface generated by the double-track sweep algorithm is significantly smoother at the connection point than that obtained by Rhino software.
[0224] Example 3: Comparison of results of swept surface generation algorithms with controllable stitching errors
[0225] In this embodiment, the results obtained by the swept surface generation algorithm with controllable splicing error (i.e., error controllable algorithm) are compared and analyzed with the Catia software. Given a B-spline surface and a B-spline curve, a given B-spline surface and a B-spline curve and their control points are as follows: Fig.18 shown.
[0226] In G 1 In the case of continuous error control, the results and control point network of the error control algorithm are as follows: Fig.19 As shown, the results obtained by Catia and its control point network are as follows Fig. 20 As shown. 2 In the case of continuous error control, the results and control point network of the error control algorithm are as follows: Fig.21 As shown, the results obtained by Catia and its control point network are as follows Fig. 22 shown.
[0227] For this embodiment, the surface is a B-spline surface of degree 5 in both u and v directions, and the curve is also of degree 5. For the result generated by the error controllable algorithm, the surface is a B-spline surface of degree 3 in the u direction and degree 5 in the v direction, while the surface generated by Catia is a B-spline surface of degree 11 in both u and v directions. It can be seen from the figure that the surface control points generated by Catia are much more than those generated by the error controllable algorithm.
[0228] In this embodiment, the error at the surface connection is also analyzed using the Catia connection checker analysis function, and the obtained results are shown in Table 2.
[0229] Table 2 Surface geometric continuity error results
[0230] Error controllable algorithm results Catia Results <![CDATA[G 1 Continuous maximum error value]]> 0.17 0.013 <![CDATA[G 2 Continuous maximum error value]]> 1.62 2.49
[0231] Since the error controllable algorithm generates results within a given error range, the maximum error generated in the result is within the allowable range. From the results, it can be seen that the error of Catia in generating swept surfaces is very small when the tangent continuity is specified, and the error of the result obtained when the curvature continuity is specified is greater than that obtained by the error controllable algorithm. The curvature difference of the error controllable algorithm can be controlled manually, which is more advantageous than Catia. Catia has a higher error rate in G 1 The low error result in the continuous state comes at the expense of approximating with a higher order and more control points. In practical problems, within the allowable error range, the error-controllable algorithm can obtain the desired result with a lower order and fewer control points.
[0232] In G 2 In the case of continuous, this embodiment also uses Gaussian curvature analysis to compare the results generated by the error controllable algorithm with the results generated by Catia, where the curvature diagram of the result obtained by the error controllable algorithm is as follows: Fig.23 As shown, the resulting curvature diagram obtained by Catia is as follows Fig.24 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 at the connection. When the Catia software generates a swept surface with a specified curvature continuity, sometimes there will be a large difference in curvature at the connection, which is reflected in the single-track sweep algorithm embodiment.
[0233] According to specific examples, the present invention compares and analyzes the surfaces obtained by a single-track sweeping algorithm, a swept surface generation algorithm with controllable splicing errors, and a double-track sweeping algorithm with the results obtained by corresponding functions of commercial software Catia and Rhino. It is found that the surface obtained by the algorithm of the present invention is of better quality than that of the Rhino software, and compared with the Catia software, it can obtain a surface of equivalent quality with fewer control points, and is more stable and easier to operate subsequently.
[0234] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A swept surface generation algorithm with controllable splicing error, characterized in that: The following steps are involved: S1, given a surface and a curve to sweep; where the given surface expression is recorded as The given curve expression is recorded as Take the given curve C(v′) as the ridge line; Get the boundary curve of a given surface at v = 1. First, take the two endpoints of the boundary curve as sampling points to obtain the parameter value vector U corresponding to a sampling point. p =[u1,u2]=[0,1], and the partial derivative information corresponding to the sampling point, according to the position information of the sampling point Parameter information u corresponding to the sampling point k , the first-order partial derivative information S of the sampling point on the boundary curve u (u k ,1) and the second-order partial derivative information S uu (u k ,1), interpolation obtains the only C 2 A continuous cubic B-spline curve is used as the contour line; the contour line expression is recorded as Among them, N j,q (v′) is the basis function defined on the node vector V′, N i,3 (u′) is the basis function defined on the node vector U′, q represents the degree, Q j , P i 1 represents the control point on the curve; U′=[u0′,…,u3′,u4′,…,u′ n′ ,u′ n′+1 ,…,u′ n′+4 ],V′=[v0′,…,v′ q ,v′ q+1 ,…,v′ m ,v′ m+1 ,…,v′ m+q+1 ]; S2, sweep according to the contour line and ridge line to obtain the initial swept surface: in, Represents control points on a surface; i=0,1,2,…,n′, j=0,1,2,…,m; and when u′=u k When v′=0 S3, by adjusting the local control points of the initial swept surface to achieve the connection with the given surface G 1 Continuous, get the given surface G 1 Continuous swept surfaces; S4, the parameter value vector U corresponding to the sampling point p To refine, in u j with u j+1 That is, n-1 nodes 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, forming a new parameter value vector; S5, for the new parameter value vector, calculate the normal vector of the given surface at each parameter value And calculate the normal vector of the swept surface at each parameter value According to the normal vector and The angle between the normal vectors corresponding to each parameter value is obtained as θ; S6, 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 swept surface satisfies G within the set error range with the given surface. 1 If not, it means that the swept surface does not meet the G between the given surface and the set error range. 1 Continuous, find the parameter value where the angle θ between the normal vectors is greater than the set threshold, and j with u j+1 The parameter value u′ is obtained by averaging the parameter values between Add u′ to the sampling process, that is, add it to the parameter value vector U p In the above example, the point corresponding to u′ is added as a sampling point, and according to the method of step S1, a unique C is interpolated based on the parameter information corresponding to the newly added sampling point, the first-order derivative information and the second-order derivative information on the boundary curve. 2 The continuous curve is taken as the contour line; and then the processing and judgment are performed according to the method of steps S2-S6 until the swept surface satisfies G with the given surface within the set error range. 1 Continuity, that is, to obtain the given surface at the connection G 1 The continuous error of the swept surface is within the set threshold.
2. The swept surface generation algorithm with controllable splicing error according to claim 1, characterized in that: The following steps are also included: S7, in G 1 On a continuous basis, the local control points of the initial swept surface are adjusted to achieve the connection with the given surface G 2 Continuous, get the given surface G 2 Continuous swept surfaces; S8, according to the method of steps S4-S6, the surface G obtained in step S3 is 1 The continuous swept surface is replaced by the given surface G obtained in step S7 2 Continuous swept surface, first realize that the swept surface satisfies G with the given surface within the set error range 1 continuous; S9, further refining the parameter value vector in the manner of step S4, and then obtaining a new parameter value vector; for the new parameter value vector, calculating the curvature value κ1 of the given surface at each parameter value, and calculating the curvature value κ2 of the swept surface at each parameter value, and obtaining the curvature difference Δκ corresponding to each parameter value according to the curvatures κ1 and κ2; S10, judging whether the curvature difference Δκ at each parameter value is not greater than the set threshold value. If so, it means that the swept surface satisfies G with the given surface within the set error range. 2 If not, it means that the swept surface does not meet the G between the given surface and the set error range. 2 Continuous, find the parameter value whose curvature difference Δκ is greater than the set threshold, and j with u j+1 The parameter value u′ is obtained by averaging the parameter values between Add u′ to the sampling process, that is, add it to the parameter value vector U p In the above example, the point corresponding to u′ is added as a sampling point, and according to the method of step S1, a unique C is interpolated based on the parameter information corresponding to the newly added sampling point, the first-order derivative information and the second-order derivative information on the boundary curve. 2 The continuous curve is taken as the contour line; and then the processing and judgment are performed in sequence according to steps S2, S7, S9 and S10, until the swept surface satisfies G within the set error range and the given surface. 2 Continuity, that is, to obtain the given surface at the connection G 2 The continuous error of the swept surface is within the set threshold.
3. The swept surface generation algorithm with controllable splicing error according to claim 2, characterized in that: In step S3, the local control points of the initial swept surface are adjusted to achieve the connection with the given surface G 1 Continuously, calculate the initial swept surface S 0 The first-order partial derivative of (u′,v′) in the direction of v at the connection is: In order to make the first-order partial derivatives of the initial swept surface at the connection equal, the first row of adjacent control points of the initial swept surface at the connection is adjusted to satisfy the equation: Among them, the control point T that needs to be adjusted k Recorded as Since the first-order partial derivative information S of the sampling point on the boundary curve v (u k ,1) and Obtained during the sampling process, all are known, so we can obtain: Then according to the position information of this control point Parameter information k , first-order partial derivative information S u (u k ,1) and the second-order partial derivative information S uu (u k ,1), interpolate to get another B-spline curve with the same node vector: Finally, we get the given surface G 1 The continuous swept surface is: Its control points are:
4. The swept surface generation algorithm with controllable splicing error according to claim 3, characterized in that: In step S7, in G 1 On a continuous basis, that is, on the basis of step S3, the local control points of the initial swept surface are adjusted to achieve the connection with the given surface G 2 Continuously, calculate the initial swept surface S 0 The second-order partial derivative of (u′,v′) in the v direction at the connection is: In order to make the second-order partial derivatives of the initial swept surface at the connection equal, the two adjacent rows of control points of the initial swept surface at the connection are adjusted to satisfy the equation: Among them, the control point T that needs to be adjusted k and Q k Recorded as and Since the second-order partial derivative information S of the sampling point on the boundary curve vv (u k ,1) and It is obtained during the sampling process, so it is known that, and In G 1 When it is continuous, it can be obtained, so we can obtain: Then, according to the obtained control point position information Parameter information k , first-order partial derivative information S u (u k ,1) and the second-order partial derivative information S uu (u k ,1), interpolate to get another B-spline curve with the same node vector: Finally, we get the given surface G 2 The continuous swept surface is: Its control points are:
5. The swept surface generation algorithm with controllable splicing error according to claim 1, characterized in that: The first-order partial derivative information S of the sampling point on the boundary curve u (u k ,1) S v (u k ,1) and the second-order partial derivative information S uu (u k ,1) S vv (u k ,1) is:
6. A readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, the algorithm for generating a swept surface with controllable splicing error as described in any one of claims 1 to 5 is implemented.
7. An electronic device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a swept surface generation algorithm with controllable splicing errors as described in any one of claims 1 to 5.
