Error-controllable curved surface matching generation method and lofting method thereof
By modifying the surface in surface splicing to achieve continuous G0, G1, and G2, the surface splicing error control problem is solved. The generated matching surface has high quality and smoothness, and can completely coincide with the reference surface.
Patent Information
- Application Number
- CN202411846413.1
- 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
During the surface splicing process, it is difficult to effectively control and reduce splicing errors, resulting in a decline in design quality.
By modifying the surface S1(u1,v1) and surface S2(u2,v2) to match, ensure that the matching surface and surface S1(u1,v1) are completely coincided with S2(u2,v2), and spliced together with S2(u2,v2), so that G0, G1, and G2 are continuous at the connection.
Within the preset splicing error threshold, high-quality matching surfaces are generated to ensure surface smoothness and quality. The generated matching surfaces can completely coincide with the reference surface, making subsequent adjustments and modifications easier.
Smart Images

Figure CN119691835A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of three-dimensional modeling, in particular to an error-controllable surface matching generation method and a lofting method thereof. 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 above-mentioned defects in the prior art, the present invention provides a surface matching generation method with controllable error, 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, 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 ) to match the matching surface with the surface S1(u 1 ,v 1 ) completely overlaps with S2(u 2 ,v 2 ) are spliced together to achieve G at the connection 0 , G 1 , G 2 continuous;
[0006] Implement G at the connection 0 Continuous, G 0 Continuity means ensuring that the surfaces are connected at the joints; this is done as follows:
[0007] First 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 10 :
[0008]
[0009] Where h is the step length of the extension; surface S1(u 1 ,v 1 )'s v-direction node vector V 1 remain unchanged;
[0010] 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 10,j ,j=0,1,...,m1 is:
[0011]
[0012] The u-direction curve at the current j-th v-direction node is expressed as:
[0013] Make the matching surface and surface S1(u 1 ,v 1 ) completely overlap, that is, the u-direction curves overlap in each v direction, and the coordinates of some control points of the matching surface are inversely calculated through the equation group, which is as follows:
[0014]
[0015] Surface S1(u 1 ,v 1 )'s control point vector
[0016] Partial control point vectors of the matching surface
[0017] The control point transformation matrix can be constructed through the above equations The equation is B·pnts2 j =pnts1j , we can get pnts2 j ;
[0018] Let the matching surface be S 10 (u 10 ,v 1 ), the expression is:
[0019]
[0020] Among them,
[0021] Due to G 0 The condition for continuity is that the surfaces are connected at the joints, so the surface S2(u 2 ,v 2 ) is used as the last column of control points of the matching surface, that is
[0022] At this point, we can get the connection G 0 Matching surface S when continuous 10 (u 10 ,v 1 ).
[0023] Implement G at the connection 1 Continuous; among them, G 1 Continuous means that in G 0 On a continuous basis, surfaces are guaranteed to have a common tangent plane at their joints.
[0024] 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.
[0025] The present invention also provides a lofting method using the above error-controllable surface matching generation 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.
[0026] Lofted surface S 00 (u,v) implements G at the connection 0 Continuous, the specific method is as follows:
[0027] For surface S 00 (u,v) and surface S2(u 2 ,v 2 ) 0 Continuously match the surfaces to obtain the matching surface S 10 (u 10 ,v 10);
[0028] 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 );
[0029] Then for the surface S 20 (u 20 ,v 20 ) and surface S1(u 1 ,v 1 ) 0 Continuously match the lower surface to obtain the matching surface S 30 (u 30 ,v 30 ), that is, to achieve G at the connection 0 Continuous lofted surface.
[0030] Lofted surface S 00 (u,v) implements G at the connection 1 Continuous, the specific method is as follows:
[0031] For surface S 00 (u,v) and surface S2(u 2 ,v 2 ) 1 Continuously match the surfaces to obtain the matching surface S 11 (u 11 ,v 11 );
[0032] 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 );
[0033] Then for the surface S 21 (u 21 ,v 21 ) and surface S1(u 1 ,v 1 ) 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.
[0034] Lofted surface S 00 (u,v) implements G at the connection 2 Continuous, the specific method is as follows:
[0035] For surface S 00 (u,v) and surface S2(u 2 ,v 2 ) 2 Continuously match the surfaces to obtain the matching surface S 12 (u 12 ,v 12 );
[0036] 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 );
[0037] Then for the surface S 22 (u 22 ,v 22 ) and surface S1(u 1 ,v 1 ) 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.
[0038] 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 is implemented.
[0039] 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.
[0040] The advantages of the present invention are:
[0041] (1) The present invention proposes a novel error-controllable matching surface generation method, which can generate high-quality matching surfaces within a preset stitching error threshold.
[0042] (2) The method of the present invention generates a matching surface within a preset stitching error threshold, ensuring that the generated matching surface has high smoothness and quality.
[0043] (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.
[0044] (4) The error-controllable matching surface generation method 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
[0045] Figure 1 Schematic diagram of the matching surface.
[0046] Figure 2 This is a schematic diagram of the layout.
[0047] Figure 3 Schematic diagram of the two B-spline surfaces given in Example 1.
[0048] Figure 4 For G 0 Schematic diagram of the matching surface results and control point grid obtained by the matching surface generation method with controllable error in the continuous case.
[0049] Figure 5 For G 0 Schematic diagram of the matching surface results and control point mesh obtained by CATIA software in the continuous case.
[0050] Figure 6 For G 1 Schematic diagram of the matching surface results and control point grid obtained by the matching surface generation method with controllable error in the continuous case.
[0051] Figure 7 For G 1 Schematic diagram of the matching surface results and control point mesh obtained by CATIA software in the continuous case.
[0052] Figure 8 For G 2 Schematic diagram of the matching surface results and control point grid obtained by the matching surface generation method with controllable error in the continuous case.
[0053] Fig. 9 For G 2 Schematic diagram of the matching surface results and control point mesh obtained by CATIA software in the continuous case.
[0054] Fig.10 This is a curvature map of the matching surface result with controllable error obtained by the method of the present invention.
[0055] Fig.11This is the curvature diagram of the matching surface obtained by CATIA software.
[0056] Fig.12 Schematic diagram of the B-spline curve given in Example 2.
[0057] Fig.13 This is a schematic diagram of the results obtained by lofting.
[0058] Fig.14 This is a schematic diagram of the results obtained through multi-section surfaces in CATIA software.
[0059] 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 error-controllable surface matching.
[0060] Fig.16 For G 0 Schematic diagram of the lofted surface results and control point grid obtained by CATIA software in the continuous case.
[0061] Fig.17 For G 1 In the continuous case, the lofting surface results and control point grid schematic diagram obtained by the lofting method based on error-controllable surface matching.
[0062] Fig.18 For G 1 Schematic diagram of the lofted surface results and control point grid obtained by CATIA software in the continuous case.
[0063] 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 error-controllable surface matching.
[0064] Fig. 20 For G 2 Schematic diagram of the matching surface results and control point mesh obtained by CATIA software in the continuous case.
[0065] Fig.21 This is the curvature diagram of the lofted surface result obtained by the lofting method of the present invention.
[0066] Fig. 22 This is the curvature diagram of the lofted surface obtained by CATIA software. DETAILED DESCRIPTION
[0067] 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.
[0068] Matching surfaces are precisely aligned with another surface in the same coordinate system by modifying one surface. In the process of generating matching surfaces, you first need to define the base surfaces to be connected. These surfaces can be of any shape, such as planes, curved surfaces, or complex free-form surfaces. Then you need to specify the boundary area and geometric continuity of the base surfaces to connect, so as to generate matching surfaces that meet the requirements. The schematic diagram of the matching surface is shown below. Figure 1 shown.
[0069] Embodiment 1: Error-controllable surface matching generation method
[0070] In this embodiment, the B-spline surface S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ) as the reference surface, the expressions are recorded as:
[0071]
[0072] 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 ;
[0073] In this embodiment, for the node vector U 1 、V 1 with U 2 、V 2 , the value is:
[0074]
[0075] Given two B-spline 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 ) to match the surface S with the surface S1(u 1 ,v 1) completely overlaps with S2(u 2 ,v 2 ) are spliced together, and G can be achieved at the connection 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.
[0076] In this embodiment, the implementation of G at the connection is respectively given. 0 , G 1 and G 2 Continuous method.
[0077] (1) G 0 Continuous situation
[0078] First 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 10 :
[0079]
[0080] Wherein, h is the step length of extension, and in this embodiment, h=0.2; and v is the node vector V 1 Remain unchanged.
[0081] In order to match the surface with the surface S1(u 1 ,v 1 ) completely overlap, the 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 10,j ,j=0,1,...,m1 is:
[0082]
[0083] The u-direction curve at the current j-th v-direction node is expressed as:
[0084] 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 the control points of the matching surface can be inversely calculated through the equation group, which is as follows:
[0085]
[0086] Surface S1(u 1 ,v 1 )'s control point vector
[0087] Partial control point vectors of the matching surface
[0088] The control point transformation matrix can be constructed through the above equations The equation is B·pnts2 j =pnts1 j , we can get pnts2 j .
[0089] Let the matching surface be S 10 (u 10 ,v 1 ), the expression is:
[0090]
[0091] Among them,
[0092] By G 0 The condition for continuity is that the surfaces are connected at the joints, so the surface S2(u 2 ,v 2 ) is used as the last column of control points of the matching surface, that is
[0093] At this point, we can get the connection G 0 Matching surface S when continuous 10 (u 10 ,v 1 ).
[0094] (2) G 1 Continuous situation
[0095] First modify the surface S1(u 1 ,v 1 )’s u-direction node vector U 1 , get the new u to G 1Splicing node vector U 11 :
[0096]
[0097] Wherein, h is the step length of extension, and in this embodiment, h=0.2; and v is the node vector V 1 Remain unchanged.
[0098] In order to match the surface with the surface S1(u 1 ,v 1 ) completely overlap, the node vector U 11 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 11 Insert p1 U between the (n1+1)th and (n1+2)th 11 The (n1+1)th node The u-direction node vector U on the current j-th v-direction node 11,j ,j=0,1,...,m1 is:
[0099]
[0100] The u-direction curve at the current j-th v-direction node is expressed as:
[0101] 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:
[0102]
[0103] Surface S1(u 1 ,v 1 )'s control point vector
[0104] Partial control point vectors of the matching surface
[0105] The control point transformation matrix can be constructed through the above equations The equation is B·pnts2 j =pnts1 j , we can get pnts2 j .
[0106] Let the matching surface be S11 (u 11 ,v 1 ) is, the expression is:
[0107]
[0108] Among them,
[0109] Due to G 0 The condition for continuity is that the surfaces are connected at the joints, so the surface S2(u 2 ,v 2 ) is used as the last column of control points of the matching surface, that is
[0110] Due to G 1 The condition for continuity is that the first-order partial derivatives corresponding to the connection are equal, that is,
[0111]
[0112] The equation satisfied is:
[0113]
[0114] in, Known, we can find
[0115]
[0116] At this point, we can get the connection G 1 Matching surface S when continuous 11 (u 11 ,v 1 ).
[0117] (3)G 2 Continuous situation
[0118] First modify the surface S1(u 1 ,v 1 )’s u-direction node vector U 1 , get the new u to G 2 Splicing node vector U 12 :
[0119]
[0120] Wherein, h is the step length of extension, and in this embodiment, h=0.2; and v is the node vector V 1 Remain unchanged.
[0121] In order to match the surface with the surface S1(u 1 ,v 1) completely overlap, the node vector U 12 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 12 Insert p1 U between the (n1+1)th and (n1+2)th 12 The (n1+1)th node The u-direction node vector U on the current j-th v-direction node 12,j ,j=0,1,...,m1 is:
[0122] The u-direction node vector on the current j-th v-direction node is expressed as:
[0123]
[0124] The u-direction curve at the current j-th v-direction node is expressed as:
[0125] 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:
[0126]
[0127] Surface S1(u 1 ,v 1 )'s control point vector
[0128] Partial control point vectors of the matching surface
[0129] The control point transformation matrix can be constructed through the above equations The equation is B·pnts2 j =pnts1 j , we can get pnts2 j .
[0130] Let the matching surface be S 12 (u 12 ,v 1 ), the expression is:
[0131]
[0132] Among them,
[0133] Due to G0 The condition for continuity is that the surfaces are connected at the joints, so the surface S2(u 2 ,v 2 ) is used as the last column of control points of the matching surface, that is
[0134] Due to G 1 The continuity condition is that the first-order partial derivatives of the surfaces at the connection are equal, that is,
[0135]
[0136] The equation satisfied is:
[0137]
[0138] in is known, so we can find
[0139]
[0140] Due to G 2 The continuity condition is that the second-order partial derivatives of the surfaces at the connection are equal, that is,
[0141]
[0142] The equation satisfied is:
[0143]
[0144] in and Known, we can find
[0145]
[0146] At this point, we can get the connection G 2 Matching surface S when continuous 12 (u 12 ,v 1 ).
[0147] Example 2: Application of the surface matching method based on error control in lofting
[0148] 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 shown.
[0149] 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 surface at the beginning and end. First, it is necessary to calculate two lofted surfaces as reference surfaces, denoted as S1(u 1 ,v 1 ) and S2(u 2 ,v 2 ), the expressions are recorded as:
[0150]
[0151] 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:
[0152]
[0153] Next, find the lofted surface S1(u 1 ,v 1 ) and the lofted surface S2(u 2 ,v 2 ).
[0154] Let the u-node vector be as follows:
[0155]
[0156] The u direction parameters are:
[0157]
[0158] 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,
[0159]
[0160] So far, we have obtained the surface S1(u 1 ,v 1 ) and surface S2(u 2 ,v 2 ) expression.
[0161] Assume that the lofted surface needs to pass through number B-spline curves, and the curve expressions are recorded as:
[0162]
[0163] By using the above method to calculate the lofted surface, we get a surface S in the middle. 00 (u,v), where
[0164]
[0165] In this embodiment, the implementation of G at the connection is respectively given. 0 , G 1 and G 2 Continuous method.
[0166] (1) G 0 Continuous situation
[0167] For surface S 00 (u,v) and surface S2(u 2 ,v 2 ) 0 Continuously match the lower surface to get the matching surface S 10 (u 10 ,v 10 ).
[0168] 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 be consistent with the surface S1(u 1 ,v 1 ) to match the status.
[0169] Then for the surface S 20 (u 20 ,v 20 ) and surface S1(u 1 ,v 1 ) 0 Continuously match the lower surface to get the matching surface S 30 (u 30 ,v 30 ), that is, to achieve G at the connection 0 Continuous lofted surface.
[0170] (2) G 1 Continuous situation
[0171] For surface S 00 (u,v) and surface S2(u 2 ,v 2 ) 1Continuously match the lower surface to get the matching surface S 11 (u 11 ,v 11 ).
[0172] 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 be consistent with the surface S1(u 1 ,v 1 ) to match the status.
[0173] Then for the surface S 21 (u 21 ,v 21 ) and surface S1(u 1 ,v 1 ) 1 Continuously match the lower surface to get the matching surface S 31 (u 31 ,v 31 ), that is, to achieve G at the connection 1 Continuous lofted surface.
[0174] (3)G 2 Continuous situation
[0175] For surface S 00 (u,v) and surface S2(u 2 ,v 2 ) 2 Continuously match the lower surface to get the matching surface S 12 (u 12 ,v 12 ).
[0176] 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 be consistent with the surface S1(u 1 ,v 1 ) to match the status.
[0177] Then for the surface S 22 (u 22 ,v 22 ) and surface S1(u 1 ,v 1) 2 Continuously match the lower surface to get the matching surface S 32 (u 32 ,v 32 ), that is, to achieve G at the connection 2 Continuous lofted surface.
[0178] Example 3
[0179] 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.
[0180] 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.
[0181] Example 1. Example of error-controllable matching surface generation method (Example 1)
[0182] Given two B-spline surfaces such as Figure 3 As shown, a matching operation is performed on the two surfaces to generate a matching surface.
[0183] In G 0 In the case of continuous matching, the matching surface generation method with controllable error obtains the matching surface results and control point mesh as follows Figure 4 As shown in the figure, the matching surface results and control point mesh obtained by CATIA software are shown in Figure 5 shown.
[0184] In G 1 In the case of continuous matching, the matching surface generation method with controllable error obtains the matching surface results and control point mesh as follows Figure 6 As shown in the figure, the matching surface results and control point mesh obtained by CATIA software are shown in Figure 7 shown.
[0185] In G 2 In the case of continuous matching, the matching surface generation method with controllable error obtains the matching surface results and control point mesh as follows Figure 8 As shown in the figure, the matching surface results and control point mesh obtained by CATIA software are shown in Fig. 9 shown.
[0186] From G 0 , G 1 and G 2 It can be seen from the surface result comparison diagram that the matching surface obtained by the method of the present invention and the matching surface obtained by the CATIA software are visually very close, but it can be seen from the control points that the number of control points of the matching surface generated by the CATIA software is less than that generated by the method of the present invention. It can be seen from the observation that the number of control points of the matching surface generated by the CATIA software is consistent with the reference surface, that is, the CATIA software achieves surface matching through the control point positions of the reference surface, and the generated matching surface cannot completely overlap with the reference surface.
[0187] 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.10 As shown, the curvature diagram obtained by CATIA software is as follows Fig.11 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.
[0188] Example 2: Example of a lofting method based on error-controllable surface matching (Example 2)
[0189] A given B-spline curve is Fig.12 As shown, the result of a simple lofted surface (inputting several curves and generating a surface passing through them) is as follows Fig.13 As shown, the results obtained by multi-section surface in CATIA software are as follows Fig.14 shown.
[0190] In G 0 In the case of continuous, the lofting surface results and control point grids obtained by the lofting method based on error-controllable surface matching are as follows: Fig.15 As shown in the figure, the lofted surface results and control point grid obtained by CATIA software are as follows Fig.16 shown.
[0191] In G 1 In the case of continuous, the lofting surface results and control point grids obtained by the lofting method based on error-controllable surface matching are as follows: Fig.17 As shown in the figure, the lofted surface results and control point grid obtained by CATIA software are as follows Fig.18shown.
[0192] In G 2 In the case of continuous, the lofting surface results and control point grids obtained by the lofting method based on error-controllable surface matching are as follows: Fig.19 As shown in the figure, the lofted surface results and control point grid obtained by CATIA software are as follows Fig. 20 shown.
[0193] From G 0 , G 1 and G 2 It can be seen from the comparison diagram of the surface results that the lofted surface obtained by the lofting method of the present invention and the lofted surface obtained by CATIA software are intuitively very close, but it can be seen from the control points that the number of control points of the lofted surface generated by CATIA software is far more than that generated by the algorithm.
[0194] In G 2 In the case of continuous, this example uses Gaussian curvature analysis to compare the results of the lofting method based on error-controlled surface matching with the results generated by CATIA software. The curvature diagram of the lofted surface obtained by the lofting method of the present invention is shown in Fig.21 As shown in the figure, the curvature diagram of the lofted surface obtained by CATIA software is as follows Fig. 22 shown.
[0195] 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 surface matching generation method with controllable error, 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 ) to match the matching surface with the surface S1(u 1 ,v 1 ) completely overlaps with S2(u 2 ,v 2 ) are spliced together to achieve G at the connection 0 continuous; Among them, the 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 ; Implement G at the connection 0 Continuous, G 0 Continuity means ensuring that the surfaces are connected at the joints; this is done as follows: First 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 10 : Where h is the step length of the extension; surface S1(u 1 ,v 1 )'s v-direction node vector V 1 remain unchanged; 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 10,j ,j=0,1,...,m1 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, and the coordinates of some control points of the matching surface are inversely calculated through the equation group, which is as follows: Surface S1(u 1 ,v 1 )'s 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 j =pnts1 j , we can get pnts2 j ; Let the matching surface be S 10 (u 10 ,v 1 ), the expression is: Among them, Due to G 0 The condition for continuity is that the surfaces are connected at the joints, so the surface S2(u 2 ,v 2 ) is used 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 10 (u 10 ,v 1 ).
2. The error-controllable surface matching generation method according to claim 1, 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: First modify the surface S1(u 1 ,v 1 )’s u-direction node vector U 1 , get the new u to G 1 Splicing node vector U 11 : Where h is the step length of the extension, and the surface S1(u 1 ,v 1 )'s v-direction node vector V 1 remain unchanged; Node vector U 11 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 11 Insert p1 U between the (n1+1)th and (n1+2)th 11 The (n1+1)th node The u-direction node vector U on the current j-th v-direction node 11,j ,j=0,1,...,m1 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, and the coordinates of some control points of the matching surface are inversely calculated through the equation group, which is as follows: Surface S1(u 1 ,v 1 )'s 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 j =pnts1 j , we can get pnts2 j ; Let the matching surface be S 11 (u 11 ,v 1 ), the expression is: Among them, Due to G 0 The condition for continuity is that the surfaces are connected at the joints, so the surface S2(u 2 ,v 2 ) is used 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, Known, we can find At this point, we can get the connection G 1 Matching surface S when continuous 11 (u 11 ,v 1 ).
3. The error-controllable surface matching generation method according to claim 2, 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: First modify the surface S1(u 1 ,v 1 )’s u-direction node vector U 1 , get the new u to G 2 Splicing node vector U 12 : Where h is the step length of the extension, and the surface S1(u 1 ,v 1 )'s v-direction node vector V 1 remain unchanged; Node vector U 12 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 12 Insert p1 U between the (n1+1)th and (n1+2)th 12 The (n1+1)th node The u-direction node vector U on the current j-th v-direction node 12,j ,j=0,1,...,m1 is: The u-direction node vector on the current j-th v-direction node is expressed as: 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, and the coordinates of some control points of the matching surface are inversely calculated through the equation group, which is as follows: Surface S1(u 1 ,v 1 )'s 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 j =pnts1 j , we can get pnts2 j ; Let the matching surface be S 12 (u 12 ,v 1 ) is, the expression is: Among them, Due to G 0 The condition for continuity is that the surfaces are connected at the joints, so the surface S2(u 2 ,v 2 ) is used as the last column of control points of the matching surface, that is Due to G 1 The continuity condition is that the first-order partial derivatives of the surfaces at the connection are equal, that is: The equation satisfied is: in is known, so we can find Due to G 2 The continuity condition is that the second-order partial derivatives of the surfaces at the connection are equal, that is, The equation satisfied is: in and Known, we can find At this point, we can get the connection G 2 Matching surface S when continuous 12 (u 12 ,v 1 ).
4. A lofting method using the error-controllable surface matching generation 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: n1=number1-1 n2=number2-1 The u direction parameters are: List the equations that need to be satisfied for interpolation and solve them to obtain the surface S1(u 1 ,v 1 ) and surface S2(u 2 ,v 2 )’s control point coordinates: k1=1,2,...,number1 k2=1,2,...,number2 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: v∈V=[v0,v1,v2,...,v m+q ,v m+q+1 ] By using the above method to calculate the lofted surface, we can get the lofted surface S 00 (u,v), where u∈U=[u0,u1,u2,...,u n+p ,u n+p+1 ] n=number-1 u0=u1=...=u p1-1 =0 in n+2 =...=in n+p =in n+p+1 =1. v∈V=[v0,v1,v2,...,v m+q ,v m+q+1 ]。 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: For surface S 00 (u,v) and the surface S2(u 2 ,v 2 ) 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 for the surface S 20 (u 20 ,v 20 ) and surface S1(u 1 ,v 1 ) 0 Continuously match the lower surface 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: For surface S 00 (u,v) and the surface S2(u 2 ,v 2 ) 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 for the surface S 21 (u 21 ,v 21 ) and surface S1(u 1 ,v 1 ) 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: For surface S 00 (u,v) and the surface S2(u 2 ,v 2 ) 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 for the surface S 22 (u 22 ,v 22 ) and surface S1(u 1 ,v 1 ) 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 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.