Trimmed curve-based error-controllable curved surface matching generation method and lofting method thereof
By adopting an error controllable method based on Trimmed curves in surface matching technology, the problem of difficult surface splicing error control is solved, high-quality surface matching and smoothness are achieved, and design quality is improved.
Patent Information
- Application Number
- CN202411847297.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-25
AI Technical Summary
In the field of computer-aided design (CAD), it is difficult to effectively control and reduce errors in surface splicing process in surface matching technology, affecting design quality.
The error controllable surface matching generation method based on Trimmed curve is adopted. By modifying the crop curve on the surface, the matching surface is ensured to fully coincide with the reference surface, and the G0, G1, and G2 are continuous at the connection.
Generate high-quality matching surfaces within preset splicing error thresholds to ensure smoothness and quality, and the generated matching surfaces are easier to adjust and modify later than the industry standard software CATIA.
Smart Images

Figure CN119691836A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of three-dimensional modeling, in particular to a method for generating error-controllable surface matching based on a trimmed curve and a method for lofting the same. Background Art
[0002] In the field of Computer-Aided Design (CAD), surface matching technology is one of the important means to build and optimize complex three-dimensional geometric models. In practical applications, surface matching technology can help designers quickly and accurately build complex three-dimensional geometric models. For example, in the aerospace industry, designers may need to splice multiple surfaces together to form a complete aircraft fuselage. By using surface matching technology, designers can ensure seamless connection between various surfaces, thereby improving the aerodynamic performance of the aircraft. In addition, surface matching technology can also be applied to fields such as automobile manufacturing and architectural design to help designers achieve high-quality product design. 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 operations. How to effectively control or even reduce these splicing errors has become a key issue in improving design quality. Summary of the invention
[0003] In order to overcome the defects in the above-mentioned prior art, the present invention provides an error-controllable surface matching generation method based on Trimmed curves, which can generate a high-quality matching surface within a preset stitching error threshold.
[0004] To achieve the above object, the present invention adopts the following technical solutions, including:
[0005] Error controllable surface matching generation method based on Trimmed curves. Given two surfaces S 1 (u 1 ,v 1 ) and S 2 (u 2 ,v 2 ), by modifying the surface S 1 (u 1 ,v 1 ) and surface S 2 (u 2 ,v 2 ) is matched with the trimmed curve on the surface S 1 (u 1 ,v 1 ) completely coincides with the surface S 2 (u 2 ,v 2 ) are stitched together to achieve G at the joint0 , G 1 , G 2 continuous.
[0006] The present invention also provides a lofting method using the above-mentioned surface matching generation method based on the Trimmed curve error controllable method, using two reference surfaces and a series of B-spline curves as input to generate a lofting surface that passes through the B-spline curve in the middle and matches the two reference surfaces at the beginning and the end.
[0007] The present invention also provides a computer program product, which includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the above-mentioned error-controllable surface matching generation method based on Trimmed curve is implemented.
[0008] The present invention also provides a computer program product, which includes a computer program / instruction, and the computer program / instruction implements the above-mentioned lofting method when executed by a processor.
[0009] The advantages of the present invention are:
[0010] (1) The present invention proposes a novel error-controllable matching surface generation method based on Trimmed curves, which can generate high-quality matching surfaces within a preset stitching error threshold.
[0011] (2) The method of the present invention can generate a matching surface within a preset stitching error threshold, ensuring that the generated matching surface has high smoothness and quality.
[0012] (3) Compared with the industry standard software CATIA, the matching surface generated by the method of the present invention can completely overlap with the reference surface while maintaining the same quality, making subsequent adjustment and modification easier.
[0013] (4) The error-controllable matching surface generation method based on the trimmed curve of the present invention can also be applied in lofting to obtain an error-controllable lofting surface, and can generate a high-quality lofting surface within a preset splicing error threshold. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 Schematic diagram of the matching surface.
[0015] Figure 2 This is a schematic diagram of the layout.
[0016] Figure 3 Schematic diagram of the two B-spline surfaces given in Example 1.
[0017] Figure 4 It is the B-spline surface patch after trimming in Example 1.
[0018] Figure 5 For G 0 In the continuous case, the matching surface results and control point mesh schematic diagram obtained by the error-controllable matching surface generation method based on the Trimmed curve.
[0019] Figure 6 For G 0 Schematic diagram of the matching surface results and control point mesh obtained by CATIA software in the continuous case.
[0020] Figure 7 For G 1 In the continuous case, the matching surface results and control point mesh schematic diagram obtained by the error-controllable matching surface generation method based on the Trimmed curve.
[0021] Figure 8 For G 1 Schematic diagram of the matching surface results and control point mesh obtained by CATIA software in the continuous case.
[0022] Fig. 9 For G 2 In the continuous case, the matching surface results and control point mesh schematic diagram obtained by the error-controllable matching surface generation method based on the Trimmed curve.
[0023] Fig.10 For G 2 Schematic diagram of the matching surface results and control point mesh obtained by CATIA software in the continuous case.
[0024] Fig.11 It is a curvature map of the matching surface result obtained by the error controllable surface matching method based on the Trimmed curve of the present invention.
[0025] Fig.12 This is the curvature diagram of the matching surface obtained by CATIA software.
[0026] Fig.13 This is the B-spline surface patch trimmed based on the Trimmed curve in Example 2.
[0027] Fig.14 It is the B-spline surface patch cut by CATIA software based on the parametric curve in Example 2.
[0028] Fig.15 For G 0 In the continuous case, the lofting surface results and control point grid schematic diagram obtained by the lofting method based on the Trimmed curve.
[0029] Fig.16 For G 0Schematic diagram of the lofted surface results and control point grid obtained by CATIA software in the continuous case.
[0030] Fig.17 For G 1 In the continuous case, the lofted surface results and control point grid schematic diagram obtained by the lofting method based on the Trimmed curve.
[0031] Fig.18 For G 1 Schematic diagram of the lofted surface results and control point grid obtained by CATIA software in the continuous case.
[0032] Fig.19 For G 2 In the continuous case, the matching surface results and control point grid schematic diagram obtained by the lofting method based on the Trimmed curve.
[0033] Fig. 20 For G 2 Schematic diagram of the matching surface results and control point mesh obtained by CATIA software in the continuous case.
[0034] Fig.21 This is the curvature diagram of the lofted surface result obtained by the lofting method of the present invention.
[0035] Fig. 22 This is the curvature diagram of the lofted surface obtained by CATIA software. DETAILED DESCRIPTION
[0036] 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.
[0037] Matching surfaces are created by modifying one surface to precisely align it with another surface in the same coordinate system. In the process of generating matching surfaces, you first need to define the reference 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 reference surfaces to be connected, so as to generate matching surfaces that meet the requirements, such as Figure 1 As shown, the generated matching surface may include a reference surface.
[0038] Embodiment 1: Error-controllable surface matching generation method based on trimmed curve (trimmed curve)
[0039] In practical problems, designers may need to trim the surface before performing matching operations. The surface is trimmed by giving a trimming curve, cutting off part of the surface and matching the remaining part.
[0040] Take the B-spline surface S 1 (u 1 ,v 1 ) and S 2 (u 2 ,v 2 ) as the reference surface, the expressions are recorded as:
[0041]
[0042] 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 ;
[0043] Surface S 2 (u 2 ,v 2 ) Parametric curve C on the parameter domain 0 (t), the expression is:
[0044]
[0045] In this embodiment, for the node vector U 1 、V 1 with U 2 、V 2 , the value is:
[0046]
[0047] For the node vector T, this embodiment takes t 0 =t 1 =t 2 =0,t 3 =t 4 =t 5 =1;
[0048] For the control point R i In this embodiment,
[0049] In order to 2 (u 2 ,v 2 ) to obtain a clipping curve and take the initial parameters:
[0050]
[0051] In this embodiment, for T 0' With V 0' , the value is:
[0052]
[0053] Given two B-spline surfaces S 1 (u 1 ,v 1 ) and S 2 (u 2 ,v 2 ), by modifying the surface S 1 (u 1 ,v 1 ) with the surface S 2 (u 2 ,v 2 ) to match the trimming curve on the surface, and the matching surface is matched with the surface S 1 (u 1 ,v 1 ) completely coincides with the surface S 2 (u 2 ,v 2 ) are stitched together, and G can be achieved at the connection point. 0 , G 1 and G 2 Continuous. 0 Continuity means ensuring that the surfaces are connected at the joints; G 1 Continuous in G 0 On the basis of continuity, ensure that the surfaces have a common tangent plane at the connection; G 2 Continuous in G 1 On the basis of continuity, the curvature of the surface at the connection is also guaranteed to be continuous.
[0054] In this embodiment, the implementation of G at the connection is respectively given. 0 , G 1 and G 2 Continuous method.
[0055] (1) G 0 Continuous situation
[0056] Calculation curve C 0 (t) When the parameter is The corresponding Get the surface S 2 (u 2 ,v 2 )superior Point
[0057] The calculation parameters are The time value is The number of times is q 1 , the node vector is v 1 ∈V 1 The interpolation curve The expression is:
[0058]
[0059] pass Constructing the system of equations, we can get
[0060] Subdivide the parameter value area corresponding to the sampling point, and 0' ∈T 0' 、v 0' ∈V 0' On the basis of , each interval is divided into ten parts equally, and T is obtained. 00 and V 00 :
[0061]
[0062] in,
[0063]
[0064] Definition G 0 Error0 k ,k=0,1,...,m 1 ×9 is a curve The parameter is v 00 ∈V 00 The coordinates of the surface S 2 (u 2 ,v 2 ) on the parameter curve C 0 (t) parameter is t 00 ∈T 00 Corresponding The error between the coordinates at is expressed as:
[0065]
[0066] If there is an error Error0 k Greater than the specified initial error G 0 _error (the initial value in this embodiment is 0.01), then:
[0067]
[0068] Set all deg_v0 k Divided into m as shown below 1 share:
[0069]
[0070] For each copy, if there is a non-zero value in the above values, the average value of the non-zero values is taken as the insertion node. The array of the inserted node is recorded as Will Insert V from small to large 0' The corresponding position in the kth node vector v'∈V' is obtained. 0 If there is no non-zero value in the copy, the record is The following examples provide additional explanation:
[0071] If and only if k 1 =0 o'clock is a valid value, and there are 3 non-zero values that are the first three values, that is,
[0072] deg_v0 0×9 ≠0,deg_v0 0×9+1 ≠0,deg_v0 0×9+2 ≠0, then
[0073]
[0074] like All invalid values, i.e. deg_v0 k =0,,k=0,1,...,m 1 ×9, then
[0075]
[0076] Compare If you insert V 1 Sort the positions in ascending order and put the new The position of V 1 The average subdivision of the interval is obtained, 1' ∈V 1' The following examples provide additional explanation:
[0077] like because
[0078] The node vector after subdivision is:
[0079]
[0080] Will As the insertion node, insert it into T from small to large 0' The corresponding position in gets the new node t'∈T'.
[0081] Calculation curve C 0 (t) When the parameter is t' j The corresponding Get the surface S 2 (u 2 ,v 2 )superior Point The expression is:
[0082]
[0083] The calculated parameter is v' j The time value is The number of times is q 1 , the node vector is v 1' ∈V 1' The interpolation curve
[0084] Calculation curve The coordinates of the surface S with parameter v'∈V' 2 (u 2 ,v 2 ) on the parameter curve C 0 (t) parameter is t'∈T' corresponding to (u' t ,v' t ) between the coordinates Error0 k , and then judge the error Error0 k and the specified initial error G 0 _error size, until all Error0 k Smaller than the specified initial error G 0 _error.
[0085] Then recalculate the surface S 1 (u 1 ,v 1' ), the expression is:
[0086]
[0087] In this embodiment, all Error0 k Smaller than the specified initial error G 0 Take _error as an example, that is:
[0088]
[0089] Surface S 2 (u 2 ,v 2 ) on the cutting curve C(v 1' ) is the node vector v 1' ∈V 1' , the number of times is q 1 , when the parameter is v' The curve expression is:
[0090]
[0091] pass Constructing the system of equations, we can solve
[0092] So far we have obtained the surface S 2 (u 2 ,v 2 ) on a cutting curve C(v 1' ) as the connection point for surface matching.
[0093] Next, modify the surface S 1 (u 1 ,v 1' )’s u-direction node vector U 1 , get the new u-direction G0 splicing node vector U 10T :
[0094]
[0095] Where h is the step length of the extension, h = 0.2; and the v-direction node vector is v 1' ∈V 1' .
[0096] In order to match the surface with the surface S 1 (u 1 ,v 1' ) completely overlap, the node vector U 10 Insert the heavy node, that is, the surface S 1 (u 1 ,v 1' ) to expand and obtain the matching surface on the surface S 1 (u 1 ,v 1' ) on the coordinates of some control points. Node vector U 10 The first (n 1 +1) and (n 1 +2) Insert p between 1 U 10 The first (n 1 +1) nodes The u-direction node vector U on the current j-th v-direction node 10T,j ,j=0,1,...,m' 1 for:
[0097]
[0098] The u-direction curve at the current j-th v-direction node is expressed as:
[0099] Make the matching surface and surface S 1 (u 1 ,v 1' ) completely overlap, that is, the u-direction curves overlap in each v direction. The coordinates of some control points of the matching surface can be inversely calculated through the equation group, which is as follows:
[0100]
[0101] Surface S 1 (u 1 ,v 1' )'s control point vector
[0102] Partial control point vectors of the matching surface
[0103] The control point transformation matrix can be constructed through the above equations The equation is B·pnts2 Tj =pnts1 Tj , we can get pnts2 Tj .
[0104] Let the matching surface be S 10T (u 10T ,v 1' ), the expression is:
[0105]
[0106] Among them,
[0107] Due to G 0 The condition for continuity is that the surfaces are connected at the junctions, so the trimming curve C(v 1' ) as the last column of control points of the matching surface, that is
[0108] At this point, we can get the connection G 0 Matching surface S when continuous 10T (u 10T ,v 1' ).
[0109] (2) G 1 Continuous situation
[0110] According to G 0 The continuous situation can be obtained:
[0111]
[0112] Calculate the surface S 2 (u 2 ,v2 ) on the parameter curve C 0 (t) When the parameter is First-order partial derivative along the unit normal on the tangent plane The expression is:
[0113]
[0114]
[0115] The calculated parameter is v' j The time value is The number of times is q 1 , the node vector is v 1' ∈V 1' The interpolation curve The expression is:
[0116]
[0117] pass Constructing the system of equations, we can get
[0118] The calculated parameter is v' j The time value is The number of times is q 1 , the node vector is v 1' ∈V 1' The interpolation curve The expression is:
[0119]
[0120] pass Constructing the system of equations, we can obtain
[0121] Subdivide the parameter value area corresponding to the sampling point, and divide each interval into ten parts on the basis of t'∈T' and v'∈V', and get:
[0122]
[0123] in,
[0124]
[0125] Calculating parametric curves In the parameter Point The expression is
[0126]
[0127] Calculating parametric curves In the parameter The derivative at The expression is:
[0128]
[0129] Calculate the surface S 2 (u 2 ,v 2 ) on the parameter curve C 0 (t) When the parameter is The first-order partial derivative along the tangential direction and the first-order partial derivative along the unit normal on the tangent plane The expression is:
[0130]
[0131] Definition G 1 Error1 k ,k=0,1,...,m' 1 ×9, the expression is:
[0132]
[0133] If there is an error Error1 k Greater than the specified initial error G 1 _error (the initial value in this article is 0.01), then let:
[0134]
[0135] Set all deg_v1 k Divided into m' as shown below 1 share:
[0136]
[0137] For each copy, if there is a non-zero value in the above values, the average value of the non-zero values is taken as the insertion node. The array of the inserted node is recorded as Will Insert the new node v"∈V" into the corresponding position of V' from small to large. 0 If there is no non-zero value in the copy, the record is
[0138] Compare If you insert V 1' Sort the positions in ascending order and put the new The position of V 1' The average subdivision of the interval is obtained, 1” ∈V 1” .
[0139] Will As the insertion node, insert it into the corresponding position in T' from small to large to obtain a new node t"∈T".
[0140] Calculation curve C 0 (t) When the parameter is t" j The corresponding Get the surface S 2 (u 2 ,v 2 )superior Point The expression is:
[0141]
[0142] The calculation parameter is v" j The time value is The number of times is q 1 , the node vector is v 1” ∈V 1” The interpolation curve
[0143] The calculation parameter is v" j The time value is The number of times is q 1 , the node vector is v 1” ∈V 1” The interpolation curve
[0144] Calculate G 1 Error1 k , and then judge the error Error1 k and the specified initial error G 1 _error size, up to all Error1 k Smaller than the specified initial error G 1 _error.
[0145] Then recalculate the surface S 1 (u 1 ,v 1” ), the expression is:
[0146]
[0147] This embodiment uses the first error judgment error all Error1 k Smaller than the specified initial error G 1 Take _error as an example, that is:
[0148]
[0149] Calculate the surface S2 (u 2 ,v 2 ) on the parameter curve C 0 (t) When the parameter is t" j The first-order partial derivative along the unit normal on the tangent plane The expression is:
[0150]
[0151] The surface S 2 (u 2 ,v 2 ) on the cutting curve C P (v 1” ) is the node vector v 1” ∈V 1” , the number of times is q 1 , when the parameter is "v", The curve, that is
[0152] pass Constructing the system of equations, we can solve
[0153] So far we have obtained the surface S 2 (u 2 ,v 2 ) on a cutting curve C P (v 1” ) as the connection point for surface matching.
[0154] Calculate the surface S 2 (u 2 ,v 2 ) on the interpolation curve C N (v 1” ) is the node vector v 1” ∈V 1” , the number of times is q 1 , when the parameter is "v", The curve, that is
[0155] pass Constructing the system of equations, we can solve
[0156] Then splice the surface S 1 (u 1 ,v 1 ) in the u direction, and obtain the new u-direction G1 splicing node vector:
[0157]
[0158] Where h is the step length of the extension, h = 0.2 in this paper, and the v-node vector is v 1” ∈V 1” .
[0159] In order to match the surface with the surface S 1 (u 1 ,v 1” ) completely overlap, the node vector U 11T Insert the heavy node, that is, the surface S 1 (u 1 ,v 1” ) to expand and obtain the matching surface on the surface S 1 (u 1 ,v 1” ) on the coordinates of some control points. Node insertion is the node vector U 11T The first (n 1 +1) and (n 1 +2) Insert p between 1 U 11T The first (n 1 +1) nodes The u-direction node vector U on the current j-th v-direction node 11T,j ,j=0,1,...,m” 1 for:
[0160]
[0161] The u-direction curve at the current j-th v-direction node is expressed as:
[0162] Make the matching surface and surface S 1 (u 1 ,v 1” ) completely overlap, that is, the u-direction curves overlap in each v direction. The coordinates of some control points of the matching surface can be inversely calculated through the equation group, which is as follows:
[0163]
[0164] Surface S 1 (u 1 ,v 1” )'s control point vector
[0165] Partial control point vectors of the matching surface
[0166] The control point transformation matrix can be constructed through the above equations The equation is B·pnts2 Tj =pnts1 Tj , we can get pnts2Tj .
[0167] Let the matching surface be S 11T (u 11T ,v 1” ), the expression is:
[0168]
[0169] Among them,
[0170] Due to G 0 The condition for continuity is that the surfaces are connected at the junction, so the curve C will be trimmed P (v 1” ) as the last column of control points of the matching surface, that is Due to G 1 The condition for continuity is that the first-order partial derivatives corresponding to the connection are equal, that is,
[0171]
[0172] The equation satisfied is:
[0173]
[0174] in is known, so the control point can be obtained:
[0175]
[0176] At this point, we can get the connection G 1 Matching surface S when continuous 11T (u 11T ,v 1” ).
[0177] (3)G 2 Continuous situation
[0178] According to G 1 The continuous situation can be obtained:
[0179]
[0180] Calculate the surface S 2 (u 2 ,v 2 ) on the parameter curve C 0 (t) When the parameter is Second-order partial derivative along the unit normal on the tangent plane The expression is:
[0181]
[0182] The calculated parameter is v" j The time value is The number of times is q 1 , the node vector is v 1” ∈V 1” The interpolation curve The expression is:
[0183]
[0184] pass Constructing the system of equations, we can obtain
[0185] The calculated parameter is v" j The time value is The number of times is q 1 , the node vector is v 1” ∈V 1” The interpolation curve The expression is:
[0186]
[0187] pass Constructing the system of equations, we can obtain
[0188] The calculated parameter is v" j The time value is The number of times is q 1 , the node vector is v 1” ∈V 1” The interpolation curve The expression is:
[0189]
[0190] pass Constructing the system of equations, we can obtain
[0191] Subdivide the parameter value area corresponding to the sampling point, and divide each interval into ten parts on the basis of t"∈T" and v"∈V", and get:
[0192]
[0193] in,
[0194]
[0195] Calculating parametric curves In the parameter Point The expression is:
[0196]
[0197] Calculating parametric curves In the parameter The derivative at The expression is:
[0198]
[0199] Calculating parametric curves In the parameter The first derivative at and the second derivative The expression is:
[0200]
[0201] Calculate the surface S 2 (u 2 ,v 2 ) on the parameter curve C 0 (t) When the parameter is The first-order partial derivative along the tangential direction Second-order partial derivative and the first-order partial derivative along the unit normal on the tangent plane Second-order partial derivative and the second-order mixed partial derivatives along the tangential and normal directions The expression is:
[0202]
[0203]
[0204] Definition G 2 Error2 k ,k=0,1,...,m” 1 ×9, the expression is:
[0205]
[0206] If there is an error Error2 k Greater than the specified initial error G 2 _error (usually initialized to 0.01), then:
[0207]
[0208] Set all deg_v2 k Divided into the following m" 1 share:
[0209]
[0210] For each copy, if there is a non-zero value in the above values, the average value of the non-zero values is taken as the insertion node. The array of the inserted node is recorded as Will Insert the new node v'∈V' into the corresponding position in V' from small to large. 0 If there is no non-zero value in the copy, the record is
[0211] Compare If you insert V 1” Sort the positions in ascending order and put the new The position of V 1” The average subdivision of the interval is obtained, 1”' ∈V 1”' .
[0212] Will As the insertion node, insert it into the corresponding position in T" from small to large to obtain a new node t"'∈T"'.
[0213] Calculation curve C 0 (t) When the parameter is t'' j The corresponding Get the surface S 2 (u 2 ,v 2 )superior Point The expression is:
[0214]
[0215] The calculation parameter is v"' j The time value is The number of times is q 1 , the node vector is v 1”' ∈V 1”' The interpolation curve
[0216] The calculation parameter is v"' j The time value is The number of times is q 1 , the node vector is v 1”' ∈V 1”' The interpolation curve
[0217] The calculation parameter is v"' j The time value is The number of times is q 1 , the node vector is v 1”' ∈V 1”' The interpolation curve
[0218] Calculate G 2 Error2 k , and then judge the error Error2 k and the specified initial error G 2 _error size, up to all Error_deg2 k Smaller than the specified initial error G 2 _error.
[0219] Then recalculate the surface S 1 (u 1 ,v 1”' ), the expression is:
[0220]
[0221] This embodiment uses the first judgment error all Error2 k Smaller than the specified initial error G 2 Take _error as an example, that is:
[0222]
[0223] Calculate the surface S 2 (u 2 ,v 2 ) on the parameter curve C 0 (t) When the parameter is t'' j The first-order partial derivative along the unit normal on the tangent plane and the second-order partial derivative The expression is:
[0224]
[0225]
[0226] The surface S 2 (u 2 ,v 2 ) on the cutting curve C P (v 1”' ) is the node vector v 1”' ∈V 1”' , the number of times is q 1 , parameter is v'' j By The curve, that is
[0227] pass Constructing the system of equations, we can solve it
[0228] So far we have obtained the surface S 2 (u 2,v 2 ) on a cutting curve C P (v 1”' ) as the connection point for surface matching.
[0229] Calculate the surface S 2 (u 2 ,v 2 ) on the interpolation curve C N (v 1”' ) is the node vector v 1”' ∈V 1”' , the number of times is q 1 , parameter is v'' j By The curve, that is
[0230] pass Constructing the system of equations, we can solve it
[0231] Calculate the surface S 2 (u 2 ,v 2 ) on the interpolation curve C NN (v 1”' ) is the node vector v 1”' ∈V 1”' , the number of times is q 1 , parameter is v'' j By The curve, that is
[0232] pass Constructing the system of equations, we can solve it
[0233] Then splice the surface S 1 (u 1 ,v 1 ) in the u direction, and obtain the new u-direction G 2 Concatenate node vectors:
[0234]
[0235] Where h is the step length of the extension, h = 0.2; and the v-direction node vector is v 1”' ∈V 1”' .
[0236] In order to match the surface with the surface S 1 (u 1 ,v 1”' ) completely overlap, the node vector U 12T Insert the heavy node, that is, the surface S 1 (u1 ,v 1”' ) to expand and obtain the matching surface on the surface S 1 (u 1 ,v 1”' ) on the coordinates of some control points. Node vector U 12T The first (n 1 +1) and (n 1 +2) Insert p between 1 U 12T The first (n 1 +1) nodes The u-direction node vector U on the current j-th v-direction node 12T,j ,j=0,1,...,m”' 1 for:
[0237]
[0238] The u-direction curve at the current j-th v-direction node is expressed as:
[0239] Make the matching surface and surface S 1 (u 1 ,v 1”' ) completely overlap, that is, the u-direction curves overlap in each v direction. The coordinates of some control points of the matching surface can be inversely calculated through the equation group, which is as follows:
[0240]
[0241] Surface S 1 (u 1 ,v 1”' )'s control point vector
[0242] Partial control point vectors of the matching surface
[0243] The control point transformation matrix can be constructed through the above equations The equation is B·pnts2 Tj =pnts1 Tj , we can get pnts2 Tj .
[0244] Let the matching surface be S 12T (u 12T ,v 1”' ), the expression is:
[0245]
[0246] Among them,
[0247] Due to G 0 The condition for continuity is that the surfaces are connected at the junction, so the curve C will be trimmed P (v 1”' ) as the last column of control points of the matching surface, that is
[0248] Due to G 1 The condition for continuity is that the first-order partial derivatives corresponding to the connection are equal, that is,
[0249]
[0250] The equation satisfied is:
[0251]
[0252] in is known, so the control point can be obtained:
[0253]
[0254] Due to G 2 The condition for continuity is that the corresponding second-order partial derivatives at the connection are equal, that is,
[0255]
[0256] The equation satisfied is,
[0257]
[0258] in, is known, so the control point can be obtained:
[0259]
[0260] At this point, we can get the connection G 2 Matching surface S when continuous 12T (u 12T ,v 1”' ).
[0261] Example 2: Application of the error-controllable surface matching method based on Trimmed curve in lofting
[0262] Lofting is a geometric modeling technique commonly used in computer-aided design (CAD) and computer graphics. It is used to generate a smooth three-dimensional surface by interpolating a series of cross-sectional curves. Figure 2 This embodiment uses two reference surfaces and a series of B-spline curves as input, hoping to generate a lofted surface that passes through the B-spline curve in the middle and matches the reference surfaces at the beginning and the end.
[0263] The two lofted surfaces are used as reference surfaces and are denoted as S 1 (u 1 ,v 1 ) and S 2 (u 2 ,v 2 ), the expressions are recorded as:
[0264]
[0265] Let surface S 1 (u 1 ,v 1 ) and surface S 2 (u 2 ,v 2 ) passes through number1 and number2 B-spline curves respectively, and the curve expressions are recorded as:
[0266]
[0267] Next, find the interpolation surface S that passes through number1 B-spline curves 1 (u 1 ,v 1 ) and the interpolation surface S through number2 B-spline curves 2 (u 2 ,v 2 ).
[0268] Let the u-node vector be as follows:
[0269]
[0270] The u direction parameters are:
[0271]
[0272] List the equations that need to be satisfied for interpolation, and the surface S can be solved 1 (u 1 ,v 1 ) and surface S 2 (u 2 ,v 2 )’s control point coordinates,
[0273] So far, we have obtained the surface S 1 (u 1 ,v 1 ) and surface S 2 (u 2 ,v 2 ) expression.
[0274] Assume that the lofted surface needs to pass through number B-spline curves, and the curve expressions are recorded as:
[0275]
[0276] By using the above method to calculate the lofted surface, we can get the lofted surface S 00 (u,v), where
[0277]
[0278] Let surface S 1 (u 1 ,v 1 ) u-direction parameter curve C on the parameter domain 1 (t 1 ), the expression is:
[0279]
[0280] Let surface S 2 (u 2 ,v 2 ) u-direction parameter curve C on the parameter domain 2 (t 2 ), the expression is:
[0281]
[0282] (1) G 0 Continuous situation
[0283] Using the parameter curve C 2 (t 2 ) for the surface S 00 (u,v) and the surface S 2 (u 2 ,v 2 ) to perform G based on the Trimmed curve 0 Continuously match the surfaces to obtain the matching surface S 10 (u 10 ,v 10 ).
[0284] The surface S 10 (u 10 ,v 10 ) are sorted in reverse order in the u and v directions, and the u and v node vectors are reversed to obtain the surface S 20 (u 20 ,v 20 ) to adjust the surface to match the surface S 1 (u 1 ,v 1 ) to match the status.
[0285] Reusing parameter curve C 1 (t 1 ) for the surface S 20 (u 20 ,v 20 ) and surface S 1 (u 1 ,v 1 ) to perform G based on the Trimmed curve 0 Continuously match the surfaces to obtain the matching surface S 30 (u 30 ,v 30 ), that is, to achieve G at the connection 0 Continuous lofted surface.
[0286] (2) G 1 Continuous situation
[0287] Using the parameter curve C 2 (t 2 ) for the surface S 00 (u,v) and the surface S 2 (u 2 ,v 2 ) to perform G based on the Trimmed curve 1 Continuously match the surfaces to obtain the matching surface S 11 (u 11 ,v 11 ).
[0288] The surface S 11 (u 11 ,v 11 ) are sorted in reverse order in the u and v directions, and the u and v node vectors are reversed to obtain the surface S 21 (u 21 ,v 21 ) to adjust the surface to match the surface S 1 (u 1 ,v 1 ) to match the status.
[0289] Reusing parameter curve C 1 (t 1 ) for the surface S 21 (u 21 ,v 21 ) and surface S 1 (u 1 ,v 1 ) to perform G based on the Trimmed curve 1 Continuously match the surfaces to obtain the matching surface S 31 (u 31 ,v 31), that is, to achieve G at the connection 1 Continuous lofted surface.
[0290] (3)G 2 Continuous situation
[0291] Using the parameter curve C 2 (t 2 ) for the surface S 00 (u,v) and the surface S 2 (u 2 ,v 2 ) to perform G based on the Trimmed curve 2 Continuously match the surfaces to obtain the matching surface S 12 (u 12 ,v 12 ).
[0292] The surface S 12 (u 12 ,v 12 ) are sorted in reverse order in the u and v directions, and the u and v node vectors are reversed to obtain the surface S 22 (u 22 ,v 22 ) to adjust the surface to match the surface S 1 (u 1 ,v 1 ) to match the status.
[0293] Reusing parameter curve C 1 (t 1 ) for the surface S 22 (u 22 ,v 22 ) and surface S 1 (u 1 ,v 1 ) to perform G based on the Trimmed curve 2 Continuously match the surfaces to obtain the matching surface S 32 (u 32 ,v 32 ), that is, to achieve G at the connection 2 Continuous lofted surface.
[0294] Embodiment 3,
[0295] The current research is mainly focused on the field of commercial CAD software industry. The algorithm 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 matching surfaces and controlling splicing errors to a certain extent. CATIA software is a world-leading three-dimensional computer-aided design (CAD) and computer-aided manufacturing (CAM) software developed by Dassault Systèmes of France, and is known for its excellent surface processing capabilities. It can generate high-quality matching surfaces with high geometric continuity and low errors, and provides a variety of optional types for generating matching surfaces. For example, the matching surface generation provided in the FreeStyle module has three types of analysis, approximation and automatic options.
[0296] This embodiment compares and analyzes the error-controllable matching surface generation method with CATIA software, and compares and analyzes the error-controllable matching surface generation method based on Trimmed curve with CATIA software; and compares and analyzes the lofting method based on error-controllable surface matching and the lofting method based on error-controllable matching surface based on Trimmed curve with CATIA software respectively.
[0297] Example 1: Example of error-controllable matching surface generation method based on Trimmed curve (Example 1)
[0298] Given two B-spline surfaces such as Figure 3 As shown in the figure, parametric 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 shown in Figure 4 As shown, the two surface patches are then matched to generate a matching surface with the specified continuity of the surface patch. In CATIA software, one can only draw a parameter curve on the surface manually, and then cut the surface according to this parameter curve, cutting off part and retaining part, and then matching the retained surface patch again. The algorithm can pre-select a given parameter curve to cut the surface according to the needs, which is more objective and accurate.
[0299] In G 0 In the case of continuity, the surface results and control point mesh obtained by the error-controllable matching surface generation method based on the trimmed curve are as follows: Figure 5 As shown, the results obtained by CATIA software and its control point grid are as follows Figure 6 shown.
[0300] In G 1 In the case of continuity, the surface results and control point mesh obtained by the error-controllable matching surface generation method based on the trimmed curve are as follows: Figure 7 As shown, the results obtained by CATIA software and its control point grid are as follows Figure 8 shown.
[0301] In G 2 In the case of continuity, the surface results and control point mesh obtained by the error-controllable matching surface generation method based on the trimmed curve are as follows: Fig. 9 As shown, the results obtained by CATIA software and its control point grid are as follows Fig.10 shown.
[0302] In G 2 In the case of continuous, this example uses Gaussian curvature analysis to compare the results of the error-controlled matching surface generation method based on the Trimmed curve with the results generated by CATIA software. The curvature diagram of the result obtained by the method of the present invention is shown in Fig.11 As shown, the curvature diagram obtained by CATIA software is as follows Fig.12 As shown in the surface curvature diagram, it can be seen that the smoothness of the connection at the method of the present invention is similar to that generated by CATIA software.
[0303] Example 2: Example of Lofting Method (Example 2)
[0304] Given parameter curves on the parameter domains of the two reference surfaces, that is, the clipping curves on the corresponding surfaces, the surfaces are clipped based on the clipping curves, and the clipped B-spline surface patches are as follows: Fig.13 As shown, the two surface patches are then matched to generate a matching surface with the specified continuity of the surface patch. In CATIA software, one can only draw a parameter curve on the surface manually, and then cut the surface according to the parameter curve, cutting off part and keeping part, and then matching the remaining surface patch again, as shown in the following figure. Fig.14 As shown in the figure, the algorithm can pre-select a parameter curve to trim the surface according to the needs, which is more objective and accurate.
[0305] In G 0 In the case of continuity, the surface results and control point grids obtained by the lofting method of surface matching with controllable error based on the trimmed curve are as follows: Fig.15 As shown, the results obtained by CATIA software and its control point grid are as follows Fig.16 shown.
[0306] In G 1 In the case of continuity, the surface results and control point grids obtained by the lofting method of surface matching with controllable error based on the trimmed curve are as follows: Fig.17 As shown, the results obtained by CATIA software and its control point grid are as follows Fig.18 shown.
[0307] In G 2 In the case of continuity, the surface results and control point grids obtained by the lofting method of surface matching with controllable error based on the trimmed curve are as follows: Fig.19 As shown, the results obtained by CATIA software and its control point grid are as follows Fig. 20 shown.
[0308] In G 2 In the case of continuous, this example uses Gaussian curvature analysis to compare the results generated by the method of the present invention with those generated by CATIA software. The curvature diagram of the result obtained by the method of the present invention is shown in Fig.21 As shown, the curvature diagram obtained by CATIA software is as follows Fig. 22 As shown in the surface curvature diagram, it can be seen that the smoothness of the connection at the method of the present invention is similar to that generated by CATIA software.
[0309] 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. Error controllable surface matching generation method based on trimmed curve, characterized in that: Given two surfaces S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ), by modifying the surface S1(u 1 ,v 1 ) and the surface S2(u 2 ,v 2 ) is matched with the trimmed curve on the surface S1(u 1 ,v 1 ) completely overlaps with the surface S2(u 2 ,v 2 ) are stitched together to achieve G at the joint 0 Continuous; among them, G 0 Continuity means ensuring that the surfaces are connected at the joints; Surface S1(u 1 ,v 1 ) and the surface S2(u 2 ,v 2 ), the expressions are recorded as: Among them, k = 1, 2, used to distinguish different surfaces; Indicates control point; Respectively represent the node vector U k 、V k Basis functions on ; Surface S2(u 2 ,v 2 ) parameter domain, the parameter curve C0(t) is expressed as: In order to 2 ,v 2 ) to obtain a clipping curve and take the initial parameters: For T 0' With V 0' , the value is: The calculation curve C0(t) is The corresponding Get the surface S2(u 2 ,v 2 )superior Point The calculation parameters are The time value is The degree is q1, and the node vector is v 1 ∈V 1 The interpolation curve The expression is: pass Constructing the system of equations, we can get Subdivide the parameter value area corresponding to the sampling point, and 0' ∈T 0' 、v 0' ∈V 0' On the basis of , each interval is divided into ten parts equally, and T is obtained. 00 and V 00 : in, Definition G 0 Error0 k , k=0,1,...,m1×9 is the curve The parameter is v 00 ∈V 00 The coordinates of the surface S2(u 2 ,v 2 ) in the parameter curve C0(t) with parameter t 00 ∈T 00 Corresponding The error between the coordinates at is expressed as: If there is an error Error0 k If it is greater than the specified initial error G0_error, then: Set all deg_v0 k Divide into m1 parts as shown below: For each copy, if there is a non-zero value in the above values, the average value of the non-zero values is taken as the insertion node. The array of the insertion node is recorded as Will Insert V from small to large 0' The corresponding position in the new node vector v'∈V' is obtained; if there is no non-zero value in the k0th part, it is recorded as Compare If you insert V 1 Sort the positions in ascending order and put the new The position of V 1 The average subdivision of the interval is obtained, 1' ∈V 1' ; Will As the insertion node, insert it into T from small to large 0' The corresponding position in gets the new node t'∈T'; Calculate the curve C0(t) at parameter t' j The corresponding Get the surface S2(u 2 ,v 2 )superior Point The expression is: The calculated parameter is v' j The time value is The degree is q1, and the node vector is v 1' ∈V 1' The interpolation curve Calculation curve C1 0 (v 1' ) parameter is v'∈V' coordinates and surface S2(u 2 ,v 2 ) in the parameter curve C0(t) with parameter t'∈T' corresponding to (u' t ,v' t ) between the coordinates Error0 k , and then judge the error Error0 k and the size of the initial error G0_error, until all Error0 k Smaller than the specified initial error G0_error; Then recalculate the surface S 1 (u 1 ,v 1' ), the expression is: Surface S2(u 2 ,v 2 ) on the cutting curve C(v 1' ) is the node vector v 1' ∈V 1' , the number is q1, the parameter is v' The curve expression is: pass Constructing the system of equations, we can solve it So far, we have obtained the surface S2(u 2 ,v 2 ) on a cutting curve C(v 1' ) as the connection point for surface matching; Then modify the surface S1(u 1 ,v 1' )’s u-direction node vector U 1 , get the new u to G 0 Splicing node vector U 10T : Where h is the step length of the extension and the node vector v is 1' ∈V 1' ; Node vector U 10 Insert the heavy node, that is, the surface S1(u 1 ,v 1' ) is expanded to obtain the matching surface on the surface S1(u 1 ,v 1' ) on the coordinates of some control points; node vector U 10 Insert p1 U between the (n1+1)th and (n1+2)th 10 The (n1+1)th node The u-direction node vector U on the current j-th v-direction node 10T,j ,j=0,1,...,m'1 is: The u-direction curve at the current j-th v-direction node is expressed as: Make the matching surface and surface S1(u 1 ,v 1' ) completely overlap, that is, the u-direction curves overlap in each v direction. The coordinates of some control points of the matching surface can be inversely calculated through the equation group, which is as follows: Surface S1(u 1 ,v 1' )'s control point vector Control point vectors for matching parts of the surface The control point transformation matrix can be constructed through the above equations The equation is B·pnts2 Tj =pnts1 Tj , we can get pnts2 Tj ; Let the matching surface be S 10T (u 10T ,v 1' ), the expression is: Among them, Due to G 0 The condition for continuity is that the surfaces are connected at the junctions, so the trimming curve C(v 1' ) as the last column of control points of the matching surface, that is At this point, we can get the connection G 0 Matching surface S when continuous 10T (u 10T ,v 1' ).
2. The error controllable surface matching generation method based on Trimmed curve according to claim 1 is characterized in that: Implement G at the connection 1 Continuous; among them, G 1 Continuous means that in G 0 On a continuous basis, ensure that the surfaces have a common tangent plane at the connection; as shown below: According to G 0 The continuous situation can be obtained: Calculate the surface S2(u 2 ,v 2 ) on the parameter curve C0(t) with parameter First-order partial derivative along the unit normal on the tangent plane The expression is: The calculated parameter is v' j The time value is The degree is q1, and the node vector is v 1' ∈V 1' The interpolation curve The expression is: pass Constructing the system of equations, we can get The calculated parameter is v' j The time value is The degree is q1, the node vector is v 1' ∈V 1' The interpolation curve The expression is: pass Constructing the system of equations, we can obtain Subdivide the parameter value area corresponding to the sampling point, and divide each interval into ten parts on the basis of t'∈T' and v'∈V', and get: in, Calculating parametric curves In the parameter Point The expression is Calculating parametric curves In the parameter The derivative at The expression is: Calculate the surface S2(u 2 ,v 2 ) on the parameter curve C0(t) with parameter The first-order partial derivative along the tangential direction and the first-order partial derivative along the unit normal on the tangent plane The expression is: Definition G 1 Error1 k ,k=0,1,...,m'1×9, the expression is: If there is an error Error1 k If it is greater than the specified initial error G1_error, then: Set all deg_v1 k Divide into m'1 parts as shown below: For each copy, if there is a non-zero value in the above values, the average value of the non-zero values is taken as the insertion node. The array of the insertion node is recorded as Will Insert the new node v"∈V" into the corresponding position in V' from small to large; if there is no non-zero value in the k0th part, record it as Compare If you insert V 1' Sort the positions in ascending order and put the new The position of V 1' The average subdivision of the interval is obtained, 1 ”∈V 1 ”; Will Insert the node into the corresponding position of T' from small to large to get the new node t"∈T"; Calculate the curve C0(t) at parameter t" j The corresponding Get the surface S2(u 2 ,v 2 )superior Point The expression is: The calculation parameter is v" j The time value is The degree is q1, and the node vector is v 1” ∈V 1” The interpolation curve The calculation parameter is v" j The time value is The degree is q1, and the node vector is v 1” ∈V 1” The interpolation curve Calculate G 1 Error1 k , and then judge the error Error1 k and the size of the initial error G1_error is specified until all Error1 k Smaller than the specified initial error G1_error; Then recalculate the surface S 1 (u 1 ,v 1 ”), the expression is: Calculate the surface S2(u 2 ,v 2 ) on the parameter curve C0(t) at parameter t” j The first-order partial derivative along the unit normal on the tangent plane The expression is: Surface S2(u 2 ,v 2 ) on the cutting curve C P (v 1 ”) is the node vector v 1 ”∈V 1 ", the number is q1, the parameter is v" The curve, that is pass Constructing the system of equations, we can solve it So far, we have obtained the surface S2(u 2 ,v 2 ) on a cutting curve C P (v 1 ”) as the connection point for surface matching; Calculate the surface S2(u 2 ,v 2 ) on the interpolation curve C N (v 1 ”) is the node vector v 1 ”∈V 1 ", the number is q1, the parameter is v" The curve, that is pass Constructing the system of equations, we can solve it Then splice the surface S1(u 1 ,v 1 ) in the u direction, and obtain the new u-direction G 1 Concatenate node vectors: Where h is the step length of the extension and the node vector v is 1 ”∈V 1 ”; Node vector U 11T Insert the heavy node, that is, the surface S1(u 1 ,v 1 ”) to expand and obtain the matching surface on the surface S1(u 1 ,v 1” ) on the coordinates of some control points; node insertion is the node vector U 11T Insert p1 U between the (n1+1)th and (n1+2)th 11T The (n1+1)th node The u-direction node vector U on the current j-th v-direction node 11T,j ,j=0,1,...,m”1 is: The u-direction curve at the current j-th v-direction node is expressed as: Make the matching surface and surface S1(u 1 ,v 1 ”) completely overlap, that is, the u-direction curves overlap in each v direction. The coordinates of some control points of the matching surface can be inversely calculated through the equation group, which is as follows: Initial control point vector New control point vector The control point transformation matrix can be constructed through the above equations The equation is B·pnts2 Tj =pnts1 Tj , we can get pnts2 Tj ; Let the matching surface be S 11T (u 11T ,v 1 ”) is, the expression is: Among them, Due to G 0 The condition for continuity is that the surfaces are connected at the junction, so the curve C will be trimmed P (v 1 ”) as the last column of control points of the matching surface, that is Due to G 1 The condition for continuity is that the first-order partial derivatives corresponding to the connection are equal, that is, The equation satisfied is: in is known, so the control point can be obtained: At this point, we can get the connection G 1 Matching surface S when continuous 11T (u 11T ,v 1 ”).
3. The error controllable surface matching generation method based on Trimmed curve according to claim 2 is characterized in that: Implement G at the connection 2 Continuous; among them, G 2 Continuous means that in G 1 On the basis of continuity, the curvature of the surface at the connection is also guaranteed to be continuous; the details are as follows: According to G 1 The continuous situation can be obtained: Calculate the surface S2(u 2 ,v 2 ) on the parameter curve C0(t) with parameter Second-order partial derivative along the unit normal on the tangent plane The expression is: The calculated parameter is v" j The time value is The degree is q1, the node vector is v 1 ”∈V 1 "The interpolation curve The expression is: pass Constructing the system of equations, we can obtain The calculated parameter is v" j The time value is The degree is q1, and the node vector is v 1 ”∈V 1 "The interpolation curve The expression is: pass Constructing the system of equations, we can obtain The calculated parameter is v" j The time value is The degree is q1, and the node vector is v 1 ”∈V 1 "The interpolation curve The expression is: pass Constructing the system of equations, we can obtain Subdivide the parameter value area corresponding to the sampling point, and divide each interval into ten parts on the basis of t"∈T" and v"∈V", and get: in, Calculating parametric curves In the parameter Point The expression is: Calculating parametric curves In the parameter The derivative at The expression is: Calculating parametric curves In the parameter The first derivative at and the second derivative The expression is: Calculate the surface S2(u 2 ,v 2 ) on the parameter curve C0(t) with parameter The first-order partial derivative along the tangential direction Second-order partial derivative and the first-order partial derivative along the unit normal on the tangent plane Second-order partial derivative and the second-order mixed partial derivatives along the tangential and normal directions The expression is: Definition G 2 Error2 k ,k=0,1,...,m”1×9, the expression is: If there is an error Error2 k If it is greater than the specified initial error G2_error, then: Set all deg_v2 k Divide into m"1 portions as shown below: For each copy, if there is a non-zero value in the above values, the average value of the non-zero values is taken as the insertion node. The array of the insertion node is recorded as Will Insert the new node v'∈V' into the corresponding position in V' from small to large; if there is no non-zero value in the k0th part, record it as Compare If you insert V 1 "In order of the positions that should be in ascending order, put the new The position of V 1 "The average subdivision of the interval is obtained, v 1”' ∈V 1”' ; Will Insert the node into the corresponding position of T" from small to large to get the new node t"'∈T"'; Calculate the curve C0(t) at parameter t' j The corresponding Get the surface S2(u 2 ,v 2 )superior Point The expression is: The calculation parameter is v"' j The time value is The degree is q1, and the node vector is v 1”' ∈V 1”' The interpolation curve The calculation parameter is v"' j The time value is The degree is q1, and the node vector is v 1”' ∈V 1”' The interpolation curve The calculation parameter is v"' j The time value is The degree is q1, and the node vector is v 1”' ∈V 1”' The interpolation curve Calculate G 2 Error2 k , and then judge the error Error2 k and the size of the initial error G2_error until all Error_deg2 k Smaller than the specified initial error G2_error; Then recalculate the surface S 1 (u 1 ,v 1”' ), the expression is: Calculate the surface S2(u 2 ,v 2 ) parameter curve C0(t) at parameter t”' j The first-order partial derivative along the unit normal on the tangent plane and the second-order partial derivative The expression is: Surface S2(u 2 ,v 2 ) on the cutting curve C P (v 1”' ) is the node vector v 1”' ∈V 1”' , the number is q1, the parameter is v"' j By The curve, that is pass Constructing the system of equations, we can solve So far, we have obtained the surface S2(u 2 ,v 2 ) on a cutting curve C P (v 1”' ) as the connection point for surface matching; Calculate the surface S2(u 2 ,v 2 ) on the interpolation curve C N (v 1”' ) is the node vector v 1”' ∈V 1”' , the number is q1, the parameter is v"' j By The curve, that is pass Constructing the system of equations, we can solve Calculate the surface S2(u 2 ,v 2 ) on the interpolation curve C NN (v 1”' ) is the node vector v 1”' ∈V 1”' , the number is q1, the parameter is v"' j By The curve, that is pass Constructing the system of equations, we can solve it Then splice the surface S1(u 1 ,v 1 ) in the u direction, and obtain the new u-direction G 2 Concatenate node vectors: Where h is the step length of the extension and the node vector v is 1”' ∈V 1”' ; Node vector U 12T Insert the heavy node, that is, the surface S1(u 1 ,v 1”' ) is expanded to obtain the matching surface on the surface S1(u 1 ,v 1”' ) on the coordinates of some control points; node vector U 12T Insert p1 U between the (n1+1)th and (n1+2)th 12T The (n1+1)th node The u-direction node vector U on the current j-th v-direction node 12T,j ,j=0,1,...,m”'1 is: The u-direction curve at the current j-th v-direction node is expressed as: Make the matching surface and surface S1(u 1 ,v 1 ”) completely overlap, that is, the u-direction curves overlap in each v direction. The coordinates of some control points of the matching surface can be inversely calculated through the equation group, which is as follows: Initial control point vector Partial control point vectors of the matching surface The control point transformation matrix can be constructed through the above equations The equation is B·pnts2 Tj =pnts1 Tj , we can get pnts2 Tj ; Let the matching surface be S 12T (u 12T ,v 1”' ), the expression is: Among them, Due to G 0 The condition for continuity is that the surfaces are connected at the junction, so the curve C will be trimmed P (v 1”' ) as the last column of control points of the matching surface, that is Due to G 1 The condition for continuity is that the first-order partial derivatives corresponding to the connection are equal, that is, The equation satisfied is: in is known, so the control point can be obtained: Due to G 2 The condition for continuity is that the corresponding second-order partial derivatives at the connection are equal, that is, The equation satisfied is: in, is known, so the control point can be obtained: At this point, we can get the connection G 2 The new surface S that is finally matched when continuous 12T (u 12T ,v 1”' ).
4. A lofting method using the surface matching generation method based on the trimmed curve error controllable method according to claim 3, characterized in that: Using two reference surfaces and a series of B-spline curves as input, a lofted surface is generated that passes through the B-spline curve in the middle and matches the two reference surfaces at the beginning and end: The two reference surfaces are denoted as S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ), the expressions are recorded as: Suppose the surface S1(u 1 ,v 1 ) and surface S2(u 2 ,v 2 ) passes through number1 and number2 B-spline curves respectively, and the curve expressions are recorded as: Next, find the interpolation surface S1(u 1 ,v 1 ) and the interpolation surface S2(u 2 ,v 2 ); Let the u-node vector be as follows: The u direction parameters are: List the equations that need to be satisfied for interpolation, and the surface S1(u 1 ,v 1 ) and surface S2(u 2 ,v 2 )’s control point coordinates, So far, we have obtained the surface S1(u 1 ,v 1 ) and surface S2(u 2 ,v 2 ) Assume that the lofted surface needs to pass through number B-spline curves, and the curve expressions are recorded as: By using the above method to calculate the lofted surface, we can get the lofted surface S 00 (u,v), where Suppose the surface S1(u 1 ,v 1 ) parameter domain u-direction parameter curve C1(t 1 ), the expression is: Suppose the surface S2(u 2 ,v 2 ) parameter domain u-direction parameter curve C2(t 2 ), the expression is:
5. The lofting method according to claim 4, characterized in that: Lofted surfaces achieve G at the joints 0 Continuous, the specific method is as follows: Using the parameter curve C2(t 2 ) for the surface S 00 (u,v) and the surface S2(u 2 ,v 2 ) to perform G based on the Trimmed curve 0 Continuously match the surfaces to obtain the matching surface S 10 (u 10 ,v 10 ); The surface S 10 (u 10 ,v 10 ) are sorted in reverse order in the u and v directions, and the u and v node vectors are reversed to obtain the surface S 20 (u 20 ,v 20 ); Then use the parameter curve C1(t 1 ) for the surface S 20 (u 20 ,v 20 ) and surface S1(u 1 ,v 1 ) to perform G based on the Trimmed curve 0 Continuously match the surfaces to obtain the matching surface S 30 (u 30 ,v 30 ), that is, to achieve G at the connection 0 Continuous lofted surface.
6. The lofting method according to claim 4, characterized in that: Lofted surfaces achieve G at the joints 1 Continuous, the specific method is as follows: Using the parameter curve C2(t 2 ) for the surface S 00 (u,v) and the surface S2(u 2 ,v 2 ) to perform G based on the Trimmed curve 1 Continuously match the surfaces to obtain the matching surface S 11 (u 11 ,v 11 ); The surface S 11 (u 11 ,v 11 ) are sorted in reverse order in the u and v directions, and the u and v node vectors are reversed to obtain the surface S 21 (u 21 ,v 21 ); Then use the parameter curve C1(t 1 ) for the surface S 21 (u 21 ,v 21 ) and surface S1(u 1 ,v 1 ) to perform G based on the Trimmed curve 1 Continuously match the surfaces to obtain the matching surface S 31 (u 31 ,v 31 ), that is, to achieve G at the connection 1 Continuous lofted surface.
7. The lofting method according to claim 4, characterized in that: Lofted surfaces achieve G at the joints 2 Continuous, the specific method is as follows: Using the parameter curve C2(t 2 ) for the surface S 00 (u,v) and the surface S2(u 2 ,v 2 ) to perform G based on the Trimmed curve 2 Continuously match the surfaces to obtain the matching surface S 12 (u 12 ,v 12 ); The surface S 12 (u 12 ,v 12 ) are sorted in reverse order in the u and v directions, and the u and v node vectors are reversed to obtain the surface S 22 (u 22 ,v 22 ); Then use the parameter curve C1(t 1 ) for the surface S 22 (u 22 ,v 22 ) and surface S1(u 1 ,v 1 ) to perform G based on the Trimmed curve 2 Continuously match the surfaces to obtain the matching surface S 32 (u 32 ,v 32 ), that is, to achieve G at the connection 2 Continuous lofted surface.
8. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements the error-controllable surface matching generation method based on Trimmed curves as described in any one of claims 1-3.
9. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements the lofting method described in any one of claims 4 to 7.