Multilateral hole filling method based on generalized non-uniform rational B-spline

Through a multilateral hole filling method based on generalized non-uniform rational B splines, a three-time uniform rational B spline curve fits the boundary and constructs a quadrilateral control mesh, combined with energy optimization to generate a smooth fill surface, the calculation complexity and accuracy problems of multilateral hole filling in complex surface modeling are solved, and efficient and compatible geometric modeling is achieved.

CN120409327APending Publication Date: 2025-08-01UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510433209.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing multilateral hole filling method has problems such as high computational complexity, difficulty in guaranteeing accuracy, and incompatibility with industrial standards in complex surface modeling, which cannot meet the requirements of modern industry for high precision, high efficiency and high compatibility for geometric modeling.

Method used

A multilateral hole filling method based on generalized non-uniform rational B spline is adopted to fit the boundary curve through a tri-time uniform rational B spline curve, a quadrilateral control mesh is constructed, and control points are adjusted through energy optimization to generate a smooth fill surface that satisfies boundary continuity and curvature constraints.

Benefits of technology

It significantly reduces the number of control points, reduces the computational complexity, improves modeling efficiency, and the generated fill surfaces are compatible with industry standards, achieving seamless connection, and improving model quality and design efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409327A_ABST
    Figure CN120409327A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a multilateral hole filling method based on a generalized non-uniform rational B spline, and the scheme can comprise the following steps: for a multi-pipe mixed connection problem, firstly, fitting a boundary curve by using a uniform rational B spline curve, for example, in a three-pipe mixed connection problem, the boundary curve is a boundary curve of a pipe curved surface and a constructed connection curved surface, and the boundary curve is a boundary curve of a pipe curved surface and a constructed connection curved surface; then constructing a quadrilateral grid as a control grid according to the fitted curve, and generating an initial GNURBS curved surface; and finally, a control point of the GNURBS curved surface is adjusted through energy optimization, so that a smooth filling curved surface meeting normal constraint and curvature constraint is obtained, for example, in the multi-pipe mixed connection problem, the filling curved surface is a mixed connection curved surface for connecting the boundaries of a plurality of pipes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of computer-aided geometric design, and particularly relates to a method for filling multi-sided holes based on generalized non-uniform rational B-splines, which is applicable to the problem of multi-pipe mixed connection. Background Art

[0002] In the current field of computer-aided geometric design (CAGD), geometric modeling with the aid of CAD software has become a key means for product design and development in many industries, covering multiple important fields such as mechanical manufacturing, aerospace, automotive design, and architectural design. In the process of complex surface modeling, the problem of filling multi-sided holes frequently occurs, becoming a major problem restricting the improvement of design efficiency and model quality.

[0003] Taking the common CAD software Rhino as an example, in actual modeling scenarios, when multiple surfaces are spliced together, their boundaries often enclose multi-sided holes, and the boundaries of these holes are often not in the same plane. This situation can be encountered in the complex structure design of mechanical parts, the layout of the pipeline system of aero-engines, and the construction of special-shaped surface structures in architecture. For example, in the design of aero-engine pipelines, when multiple pipes with different diameters and different orientations intersect, multi-sided holes will be formed. If the method of manually filling the surface is used to handle these multi-sided holes, the operation process is extremely cumbersome. Not only does it require a large amount of time and effort from the modelers, but also the accuracy of filling the surface is difficult to guarantee. If there is a slight mistake, it may lead to problems in subsequent analysis and manufacturing of the model, such as poor fluid flow and stress concentration during fluid simulation, seriously affecting the performance and quality of the product.

[0004] Currently, for the problem of filling multi-sided holes, there are mainly the following three types of solutions:

[0005] Algorithms based on patch construction: This algorithm divides the multi-sided hole into multiple sub-regions, then constructs patch surfaces separately, and finally splices them to form a filling surface. However, this method faces many challenges in practical applications. Since it is necessary to simultaneously consider the boundary continuity constraint and the continuity constraint between patch surfaces, the existence of the equation is difficult to guarantee. In the case of complex multi-sided holes, it may not be possible to find a suitable solution to meet these constraint conditions. Moreover, due to the large difficulty in splicing and coordinating patch surfaces, the quality of the filling surface is often uneven, and problems such as non-smoothness and distortion are likely to occur, unable to meet the high-precision design requirements.

[0006] Algorithm based on trimmed surface: This algorithm utilizes trimmed NURBS (Non-Uniform Rational B-Spline) surfaces and combines energy optimization techniques to generate filled surfaces. However, it uses internal trimming lines as boundaries, and in this way, it is unable to effectively control the interpolation accuracy at the boundaries. To meet certain accuracy requirements, a large number of surface control points often need to be added. Excessive control points will not only increase the computational complexity, prolong the calculation time, but also cause a significant increase in the data volume of the model, bringing many inconveniences in the storage, transmission, and subsequent processing of the model, and reducing the modeling efficiency.

[0007] Algorithm based on subdivision surface: This algorithm continuously subdivides the initial mesh and gradually approximates a smooth filled surface that meets the constraint conditions. Although surface smoothing can be theoretically achieved, there are obvious defects in practical applications. On the one hand, the subdivision process consumes a large amount of memory and calculation time. As the number of subdivisions increases, the data volume grows exponentially, requiring extremely high hardware performance of the computer, which severely restricts its application in large-scale and complex models. On the other hand, subdivision surfaces are not compatible with industrial standard NURBS, which makes it necessary to perform complex data conversions when applying the model to actual production, increasing the risk of errors and also unable to directly connect with existing industrial design and manufacturing processes.

[0008] In summary, the existing methods for filling multi-sided holes all have their respective limitations and cannot well meet the requirements of modern industry for high precision, high efficiency, and high compatibility in geometric modeling. Therefore, there is an urgent need for a new method for filling multi-sided holes to solve these problems and improve the quality and efficiency of geometric modeling. Summary of the Invention

[0009] The embodiments of this specification provide a method for filling multi-sided holes based on generalized non-uniform rational B-spline to solve at least one of the technical problems mentioned above.

[0010] To solve the above technical problems, the embodiments of this specification are implemented as follows:

[0011] The embodiments of the present invention provide a method for filling multi-sided holes based on generalized non-uniform rational B-spline, which is applicable to the problem of multi-pipe mixed connection and includes:

[0012] S1. Obtain the boundary curves of the multi-sided holes formed by the boundaries of multiple pipe surfaces in the multi-pipe mixed connection scenario, and iteratively fit each boundary curve using a cubic uniform rational B-spline curve, specifically including:

[0013] S11. Set the initial number of control points m to 10, and according to the target curve c targe t(t) and the C 0 error fitting energy of the fitting curve c(t), the expression of which is:

[0014]

[0015] Meanwhile, for the C continuity requirements of the constraint surface at the boundary, the required number of control points m1 and m2 are recorded respectively. If the number of control points m of the current fitted curve is less than max{m1, m2}, then let m = max{m1, m2} and refit to ensure that there are enough control points in the subsequent energy optimization to achieve high-order continuity at the boundary; 1 and C 2 Continuity requirements, respectively record the required number of control points m1 and m2. If the number of control points m of the current fitted curve is less than max{m1, m2}, then let m = max{m1, m2} and refit to ensure that there are enough control points in the subsequent energy optimization to achieve high-order continuity at the boundary;

[0016] Among them, the symbol is a cubic uniform rational B-spline curve, and the symbol N 3,i (t) is a cubic B-spline basis function, and p i is the control point of the curve, which is used to approximate the boundary set shape of the multi-pipe mixed connection hole;

[0017] S12. When the C 0 error exceeds the preset error limit ε, increase the number of control points m, refit until the error meets ε, and ensure that the number of control points meets the topological conditions for the generation of the quadrilateral mesh of the multi-pipe mixed connection hole:

[0018]

[0019] Among them, the symbol m i represents the number of control points of the i-th boundary, which is used to ensure the generability of the quadrilateral mesh of the multi-pipe mixed connection hole;

[0020] S2. Based on the control points of the fitted boundary curve, construct a quadrilateral control mesh that satisfies Equation (2), including the following sub-steps:

[0021] S21. For a multi-pipe mixed connection hole with the number of sides n > 6, construct a dividing line to recursively divide it into sub-regions with the number of sides less than or equal to 6. The number of broken line segments of the dividing line is taken as the average of the number of broken line segments of the boundary, and the endpoints of the dividing line need to satisfy that the total number of broken line segments of the two parts after division is even;

[0022] S22. Use a pattern-based quadrilateral meshing method to generate a control mesh that only contains 3-degree or 5-degree singular points, and minimize the number of singular points through integer linear programming to ensure the smoothness of the filled surface of the multi-pipe mixed connection hole;

[0023] S3. Generate an initial GNURBS surface based on the control mesh, and adjust the control points by optimizing the energy function. The energy function is

[0024] E v = αE surf + βE cons (3)

[0025] Among them, the symbol E surf represents the surface shape energy, and the symbol E cons represents the surface constraint energy. The symbols α and β are weight coefficients;

[0026] Among them, the surface shape energy E surf is expressed as

[0027] E surf = aE streching + bE bending + cE rocinbending

[0028] Among them,

[0029]

[0030] The surface constraint energy E cons is expressed as

[0031] E cons = k1E normal + k2E curvature (4)

[0032] Among them, the symbol E normal represents the normal constraint energy, which is used to achieve the G 1 continuity at the multi-pipe hybrid connection boundary. The symbol E curvature represents the normal curvature constraint energy, which is used to achieve the G 2 continuity of the boundary. k1 and k2 are weight coefficients;

[0033] The normal phase constraint energy E normal is expressed as:

[0034]

[0035] Among them, represents the vector of the derivative of the surface perpendicular to the boundary curve at the boundary. The symbol N r represents the r-th normal vector of the constraint surface at the boundary, which is obtained by performing Gaussian point sampling at the boundary of the constraint surface; (u r , v r ) is the corresponding parameter point, which is obtained by projecting the sampled Gaussian points onto the boundary curve of the existing filled surface;

[0036] For the normal curvature constraint energy E curvature , assuming

[0037] Then, according to the definition of normal curvature, the normal curvature of the filled surface at a certain point on the boundary along the ν n [[ID=8G]]direction is

[0038] where \(I = Edu\) 2 + 2Fdudv + Gdv 2 is the first fundamental form of the surface, \(\Pi = Ldu\) 2 + 2Mdudv + Ndv 2 is the second fundamental form of the surface, and the specific expression is

[0039]

[0040] In actual calculation, since the direction of \(v\) n is perpendicular to the boundary curve, one of \(\lambda\) and \(\mu\) must be 0, so

[0041]

[0042] Then the normal curvature constraint energy \(E\) curvature is defined as

[0043]

[0044] where \(\kappa\) n is the normal curvature of the filling surface defined above, \((u\) r , \(v\) r ) is the corresponding parameter coordinate, \(K\) n,r represents the \(r\)-th normal curvature of the constraint surface at the boundary, obtained by Gaussian point sampling at the boundary of the constraint surface, and this energy is expressed as a quadratic function of each coordinate component of the control points after processing;

[0045] S4. Since the boundary control points of the filling surface have been determined, only the internal control points need to be calculated. Assume that the set of internal control points is \(\Omega=\{p\) i | \(i = 1,\cdots,N\}\), and the set of boundary control points is Solve the following constraint problem

[0046]

[0047] According to the optimization theory, it is equivalent to

[0048]

[0049] Solve this linear equation system to obtain the optimized surface control points.

[0050] One embodiment of this specification can at least achieve the following beneficial effects:

[0051] 1. In the scenario of multi-pipe mixed connection, compared with the filling algorithms of commercial software such as XNURBS, the average number of control points of the filling surface generated by the technical solution of this application is reduced by 70%. The fewer control points significantly reduce the computational complexity of geometric modeling. When subsequent parameter adjustments are made to the mixed connection model (such as modifying the pipe diameter and adjusting the pipe angle), it can be operated more conveniently, significantly improving the modeling efficiency and reducing the design iteration time.

[0052] 2. The filling surface generated by the technical solution of this application is fully compatible with the industrial standard GNURBS. In industrial designs related to multi-pipe mixed connection (such as mechanical manufacturing and architectural surface structure design), it can be directly docked with mainstream industrial design software without data format conversion or additional surface adaptation processing, realizing seamless connection from modeling to production and manufacturing processes, reducing industrial application costs, and improving the efficiency of transforming design results into actual products.

[0053] 3. For the problem of multi-pipe mixed connection, both the tangential error and curvature error of the filling surface generated by the technical solution of this application at the boundary are significantly reduced. By precisely controlling the boundary continuity (achieving G 2 continuity), it is ensured that the transition between the filling surface and the pipe surface is natural. In the scenario of fluid transportation pipe mixed connection, it can reduce the sudden change of fluid resistance and improve the transportation efficiency; in mechanical structure mixed connection, it can optimize the stress distribution and avoid stress concentration caused by discontinuous surfaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0055] Figure 1 : Schematic diagram of the three-pipe mixed connection problem, showing the polygonal hole formed by the three-pipe mixed connection, which is one of the application scenario examples of the method of the present invention;

[0056] Figure 2 Example of quadrilateral mesh generation;

[0057] Figure 3 Used to illustrate the meshing steps for holes with n>6;

[0058] Figure 4 : Example of three-side mixed connection. (a) shows the hole to be filled in the three-pipe mixed connection problem, (b) shows the rendered filling surface, and (c) shows the zebra stripes of the overall surface, intuitively demonstrating the application effect of the method of the present invention in the three-pipe mixed connection problem;

[0059] Figure 5 : Example of four - pipe mixed connection. (a) shows the holes to be filled in the four - pipe mixed connection problem. (b) shows the rendered filling surface. (c) shows the zebra stripes of the overall surface, demonstrating the application effect of the method of the present invention in the four - pipe mixed connection problem. Detailed implementation manners

[0060] To make the objectives, technical solutions, and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope protected by one or more embodiments of this specification.

[0061] It should be understood that although terms such as first, second, and third may be used in this application document to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.

[0062] Those of ordinary skill in the art can understand that the drawings are only schematic diagrams of one embodiment, and the modules or processes in the drawings are not necessarily essential for implementing the present invention.

[0063] The overall process of the technical solution of this application is as follows: For the multi - pipe mixed connection problem, first, use non - uniform rational B - spline (NURBS) curves to fit the boundary curves. For example, in the three - pipe mixed connection problem, the boundary curves are the boundary curves of the pipe surface and the constructed connection surface. Then, construct a quadrilateral mesh as the control mesh according to the fitted curves and generate an initial NURBS surface. Finally, adjust the control points of the NURBS surface through energy optimization to obtain a smooth filling surface that meets the normal constraint and curvature constraint. For example, in the multi - pipe mixed connection problem, this filling surface is the mixed connection surface connecting the boundaries of multiple pipes.

[0064] When there is a multi - pipe mixed connection, the boundary curves of different pipes (such as the intersection lines of the pipe surface and the connection surface) are complex in shape, may be spatially distorted curves, and the boundary curves of each pipe are not in the same plane. To generate a filling surface that can accurately connect the pipes, it is necessary to first fit these boundary curves. Through fitting with non - uniform rational B - spline (NURBS) curves, the irregular actual boundary curves can be transformed into mathematical curves that can be precisely processed by a computer, serving as the boundary constraints for the subsequent filling surface, ensuring that the final surface perfectly fits the pipe boundaries and meets the requirements of engineering design for geometric accuracy.

[0065] The technical solution of this application will be introduced below based on the drawings. This solution includes the following steps:

[0066] S1. Fit the boundary curve

[0067] In this step, obtain the boundary curve of the polygonal hole formed by the boundaries of multiple pipe surfaces in the multi-pipe connection scenario, and use a cubic uniform rational B-spline curve to iteratively fit each boundary curve to obtain a fitting curve that meets the given error limit, which is used as the boundary curve of the final filled surface.

[0068] Consider any boundary curve c target (t) of the polygonal region. The technical solution of this application uses a cubic uniform rational B-spline curve for fitting, and the expression of the curve is

[0069]

[0070] where m is the number of control points of the curve. In the multi-pipe connection scenario, m needs to be adjusted according to the complexity of the pipe boundary to balance the fitting accuracy and calculation efficiency. For example, when the pipe boundary has a high degree of distortion, the number of control points m needs to be increased, N3, i is the cubic uniform B-spline basis function, which determines the local shape and smoothness of the curve, ensuring that the fitting curve has a natural transition at the multi-pipe intersection, p i are the control points of the curve. By adjusting the positions of these control points, the fitting curve can approximate the actual pipe boundary curve.

[0071] In multi-pipe connection, the fitting accuracy of the pipe boundary directly affects the quality of the connected surface. Therefore, in the technical solution of this application, a given error limit ∈ is set to ensure that the deviation between the combined curve and the actual pipe boundary is within an acceptable range. If the error is too large, it will cause gaps or mutations at the connection between the filled surface and the pipe, affecting the structural strength (such as mechanical components) or fluid performance (such as oil pipelines). Consider L 2 the approximation energy, and its expression is

[0072]

[0073] This energy is a quadratic function of the control points of the fitting curve and is used to measure the closeness between the fitting curve and the actual boundary of the pipe. In order to obtain the optimal positions of the control points, the partial derivatives of each control point are calculated and set to zero, and the resulting linear equations about the control points are solved. This process is equivalent to mathematically finding a set of optimal control point positions to make the fitting curve closest to the actual boundary of the pipe as a whole, laying a foundation for generating a high-precision connected surface later.

[0074] In order to obtain a fitting curve that meets the error limit ò, the technical solution of this application adopts an iterative solution method. The number of control points of the initial fitting curve is taken as m = 10, and each time the C 0 error between the fitting curve and the target curve is calculated by sampling. If it is less than ∈, stop; otherwise, increase the number of control points m and calculate a new fitting curve until the error is less than ∈.

[0075] Similarly, the technical solution of this application uses rational B-spline curves to fit the C 1 and C 2 curves at the boundaries of the constrained surface, records the required number of control points m1 and m2. If m > max{m1, m2}, no change is made. Otherwise, let m = max{m1, m2}, and refit the boundary curve using Equation (1). This ensures that there are enough control points when fitting the boundary continuity through energy optimization later. Additionally, to successfully generate a quadrilateral control mesh later, it is necessary to ensure

[0076]

[0077] where m i is the number of control points of the i-th boundary fitting curve.

[0078] S2. Generation of quadrilateral control mesh

[0079] Extract the control points of the boundary fitting curves and connect them to obtain a polygonal hole composed of broken lines. Then, construct a quadrilateral mesh to fill the polygonal hole and generate an initial GNURBS surface.

[0080] Since the number of control points of each fitting curve is different, the number of broken line segments of each side of the obtained broken line polygonal hole is different. This will cause the generated quadrilateral mesh to usually contain one or more singular points. As Figure 4 shown in a two-dimensional schematic diagram, the numbers in the figure represent the number of broken line segments of each side, and the generated quadrilateral mesh contains a singular point. Among them, a singular point is a special point in the mesh that does not conform to the conventional quadrilateral mesh topology. In the quadrilateral mesh generated by multi-pipe mixed connection, the existence of singular points may affect the local quality of the filled surface. For example, the surface near the singular point may be distorted or not smooth. Therefore, it is necessary to control the singular points through a specific algorithm (such as the pattern-based quadrilateralization method), and limit its degree (the number of connecting edges) to 3 or 5 degrees to reduce the negative impact on the surface quality. The reasons for the generation of singular points are elaborated below. In the multi-pipe mixed connection scenario, the number of control points of the boundary fitting curve of each pipe is often different. For example, for the boundary fitting curves of three pipes, due to the difference in the complexity of the pipe shapes, the number of control points may be 10, 12, and 11 respectively. The number of broken line segments of each side of the polygonal hole formed by connecting these control points will also be different. This difference makes it difficult to completely maintain a regular mesh structure when generating a quadrilateral mesh, thus generating "singular points".

[0081] Taking the four-pipe hybrid connection as an example, the control points of the boundary fitting curves of the four pipes are connected to form a four-sided hole. Since the complexity of the boundaries of each pipe is different, the number of broken line segments on the four sides may be 8, 9, 7, and 10 respectively. When constructing a quadrilateral mesh to fill this hole, due to the difference in the number of broken line segments, singular points will appear in the mesh. Through the visualization schematic diagram (such as Figure 5 ), it can be intuitively seen that the existence of singular points in the mesh changes the local mesh topology, and the method of the present invention can effectively control the influence of singular points on the filled surface through subsequent energy optimization and other operations, and finally generate a hybrid surface that meets the requirements of boundary continuity and surface quality.

[0082] This algorithm adopts a pattern-based quadrilateralization method. By simplifying the input, all n-sided holes with 3 ≤ n ≤ 6 can be classified into a limited number of topological patterns, and then quadrilateral meshing is realized. This method only introduces 3-degree and 5-degree singular points, and through integer linear programming (ILP), the number of singular points is minimized as much as possible.

[0083] In the multi-pipe hybrid connection scenario, as the number of pipes participating in the hybrid connection increases (such as five-pipe and six-pipe hybrid connections), complex multi-sided holes with n > 6 sides are often formed. If traditional methods are used for such holes, quadrilateralization cannot be directly achieved, and the generation of high-quality hybrid surfaces depends on the effectiveness of the mesh. Therefore, a targeted improvement plan is needed. The technical solution of this application considers using a dividing line to divide the n-sided hole into two parts. The number of broken line segments of the dividing line is taken as the average value of the number of broken line segments of the boundary. Taking the heptagon hole formed by five-pipe hybrid connection as an example, if the number of broken line segments of each boundary of the heptagon hole is a1, a2, a3, a4, a5, a6, a7, calculate its average value to determine the number of broken line segments of the dividing line to ensure that the dividing line geometrically balances the hole structure.

[0084] At the same time, in order to ensure that the two parts after division can be quadrilateralized respectively, the selection of the two endpoints of the dividing line needs to meet the condition that the total number of broken line segments of the two parts is even, so as to create conditions for subsequent quadrilateralization and avoid grid failure caused by the parity of the number of sides. The division operation is recursive, which means that if the number of sides of a certain part after division is greater than 6 (such as an eight-sided sub-region is divided), then continue to divide until the number of sides of each part is less than or equal to 6. Through repeated division, the complex multi-sided hole is disassembled into simple units that can be processed. Finally, each part is meshed according to the pattern-based quadrilateral meshing method.

[0085] The quadrilateral meshing method for multi-sided holes obtained in this way can ensure that: 1) Any multi-sided hole that satisfies formula (2) can be quadrilateralized, and 2) The generated quadrilateral mesh only contains 3-degree and 5-degree control points.

[0086] S3. Energy optimization

[0087] In the problem of multi - pipe mixed connection, energy optimization is the core link in generating high - quality filling surfaces. By coordinating the surface shape and boundary continuity, it solves the problems of surface smoothness and connection accuracy in the mixed connection area.

[0088] In the scenario of multi - pipe mixed connection, the filling surface needs to consider both internal smoothness and boundary continuity. For example, when three or four pipes are mixed - connected, if the internal surface is uneven, it will affect the fluid flow performance, and discontinuous boundaries will cause structural stress concentration. The energy defined in the technical solution of this application is divided into two parts: surface shape energy and surface constraint energy. The surface shape energy is used to optimize the shape of the surface to generate a smoother and higher - quality filling surface, mainly acting on the internal control points of the surface; the surface constraint energy is used to optimize the boundary continuity of the filling surface, mainly acting on the boundary control points of the surface. The expression of the energy is as follows:

[0089] E v =αE surf +βE cons (3)

[0090] Among them, E surf is the surface shape energy, E cons is the surface constraint energy, and α and β are weight coefficients used to coordinate the priorities of surface shape optimization and boundary constraint, and adapt to different mixed - connection requirements.

[0091] The surface shape energy E surf is expressed as

[0092] E surf =aE streching +bE bending +cE rocinbending

[0093] Among them

[0094]

[0095] These three kinds of energies optimize the surface morphology from the dimensions of torsion, bending, and stretching, and these three kinds of energies are all quadratic functions of each coordinate component of the surface control points, so they are easy to optimize and solve. Among them, the torsion energy E rocinbending optimizes the surface torsion characteristics for the integral of the sum of squares of the third - order derivatives. In the complex multi - pipe mixed connection in space, the torsion energy ensures smooth surface torsion, avoids rupture or discontinuity, and maintains the overall surface quality in three - dimensional space. The bending energy E bending controls the bending degree of the surface based on the integral of the sum of squares of the second - order derivatives. The pipe orientations at the multi - pipe intersection are diverse, and the bending energy enables the filling surface to connect the pipes with natural curvature. For example, when three pipes are mixed - connected, it ensures the bending coordination of the surface at each connection point and reduces stress concentration. The stretching energy E strechingBy calculating the integral of the sum of the squares of the first-order derivatives in the u and v directions of the surface, overstretching or shrinking of the surface in the multi-pipe connection area is avoided. For example, when four pipes are connected, ensure that the filled surface evenly covers the complex area to provide a stable channel for fluid transmission.

[0096] The surface constraint energy E cons is expressed as

[0097] E cons = k1E normal + k2E curvature (4)

[0098] where E normal is the normal constraint energy used to achieve the continuity of the boundary G 1 and E curvature is the normal curvature constraint energy used to achieve the G 2 continuity of the boundary. k1 and k2 are weight coefficients. The surface constraint energy E cons ensures the continuity of the multi-pipe connection boundary. Taking pipeline fluid transmission as an example, a discontinuous boundary will increase resistance. Through the normal constraint energy E normal (sampling the normal vector of the pipeline boundary at Gaussian points to achieve G 1 continuity) and the normal curvature constraint energy E curvature (matching the boundary curvature to achieve G 2 continuity), the filled surface and the pipeline boundary make a natural transition, meeting the stringent requirements of the project for continuity and ensuring the reliability of the multi-pipe connection structure in scenarios such as fluid mechanics and structural mechanics.

[0099] The normal phase constraint energy E normal is expressed as

[0100]

[0101] where represents the derivative vector of the surface perpendicular to the boundary curve at the boundary, reflecting the change trend of the filled surface at the pipeline boundary. Taking the connection of three pipes as an example, this vector is perpendicular to the pipeline boundary curve, reflecting the change rate of the surface in the normal direction of the boundary and is the core index to measure the fitting degree of the filled surface and the pipeline surface. Optimizing this derivative vector can ensure that the direction of the filled surface at the multi-pipe intersection is coordinated with the pipeline, avoiding turning and dislocation. N r represents the r-th normal vector of the constraint surface at the boundary, obtained by Gaussian point sampling at the boundary of the constraint surface. For example, when four pipes are connected, sample the boundaries of the four pipes respectively to obtain the normal vectors of each boundary. These normal vectors represent the orientation of the pipeline surface boundary and are the basis for constraining the boundary direction of the filled surface. Matching and optimizing the derivative vector of the filled surface and the normal vector can ensure the consistency of the boundary normal direction, achieve G 1 continuity, and reduce problems such as stress concentration or fluid resistance caused by normal mutation. (ur , v r ) are the corresponding parameter points, obtained by projecting the sampled Gaussian points onto the boundary curve of the existing filled surface. In multi-pipe mixed connection, first sample the boundary of the pipe surface and then project it onto the boundary curve of the filled surface. Since the boundary curve of the filled surface is fitted based on the pipe boundary, the projection ensures the correspondence between the parameter points and the boundary curve. Mathematically, u r and v r are at least one of 0, reflecting the characteristic that the parameter points are located on the boundary of the filled surface, providing accurate position information for the calculation of the normal constraint energy, enabling the energy optimization to act precisely on the boundary control points, improving the surface connection quality at the mixed connection, and this energy is still a quadratic function of each coordinate component of the control points, so it is easy to optimize and solve.

[0102] The normal constraint energy is a quadratic function of the coordinate components of the control points. Even in the face of a large number of boundary control points and complex constraints in multi-pipe mixed connection, the optimal control point positions can be quickly determined by solving a system of linear equations. This characteristic can efficiently adjust the boundary control points of the filled surface, enabling the surface to maintain smooth continuity while satisfying the normal constraints of each pipe boundary, and greatly improving the surface generation efficiency and quality in the multi-pipe mixed connection scenario.

[0103] For the normal curvature constraint energy, the technical solution of this application assumes

[0104]

[0105] where, is the vector of the derivative perpendicular to the pipe boundary curve at the boundary of the filled surface. Taking the three-pipe mixed connection as an example, the boundary directions of the three pipes are different. This assumption describes the variation relationship of the surface along the u and v directions at the boundary through the parameters λ and μ, providing a basis for calculating the normal curvature and ensuring the geometric coordination between the filled surface and the pipe surface.

[0106] Then, according to the definition of the normal curvature, the normal curvature of the filled surface at a certain point on the boundary along the v n direction is

[0107]

[0108] where I = Edu 2 + 2Fdudv + Gdv 2 is the first fundamental form of the surface, describing the metric properties of the surface, and Π = Ldu 2 + 2Mdudv + Ndv 2 is the second fundamental form of the surface, reflecting the degree of surface curvature. The specific expressions are

[0109]

[0110]

[0111] In actual calculations, since the direction of v n is perpendicular to the boundary curve, one of λ and μ must be 0, and thus

[0112]

[0113] In this simplified scenario of the specific direction of the pipeline boundary, the normal curvature can be quickly calculated, reducing complexity and ensuring accuracy.

[0114] Then the normal curvature constraint energy is defined as

[0115]

[0116] where κ n is the normal curvature of the filling surface defined above, (u r , v r ) are the corresponding parameter coordinates, and K n,r represents the r-th normal curvature of the constraint surface at the boundary, obtained by sampling Gaussian points at the boundary of the constraint surface. After simplification, this energy can also be expressed as a quadratic function of each coordinate component of the control points.

[0117] According to the previous description, the expression of the total energy with respect to the control points

[0118]

[0119] When multiple pipes are connected in a mixed manner (such as three pipes or four pipes connected in a mixed manner), first, the boundary control points are determined by fitting the boundary curve. These points are the "anchor points" where the filling surface is connected to the pipeline boundary, ensuring that the surface fits the geometric contour of the pipeline. For example, in the case of three pipes connected in a mixed manner, the boundary control points enable the filling surface to accurately dock with the boundaries of the three pipes, completing the preliminary geometric positioning. Thereafter, focus on optimizing the internal control points because they determine the internal shape of the surface and directly affect the overall smoothness. Since the boundary control points of the filling surface have been determined in the previous part of the technical solution of this application, this application's technical solution only needs to calculate the internal control points. Assume that the set of internal control points is Ω = {p i | i = 1,..., N}, and the set of boundary control points is Then this application's technical solution needs to solve the following constrained problem

[0120]

[0121]

[0122] Minimize the total energy E within the set of internal control points Ω for the above constraints v, ensuring that the surface satisfies the comprehensive optimization of shape energy and constraint energy. Taking a four-pipe hybrid as an example, this constraint problem fixes the control points at the boundaries of the four pipes to prevent boundary deformation. It also optimizes the internal control points in the middle region, ensuring a smooth transition within the infill surface while connecting the pipes, meeting the project's requirements for surface continuity and smoothness.

[0123] According to optimization theory, this is equivalent to

[0124]

[0125] Solving this linear equation group can get the optimized surface control points. In the complex geometric scene of multi-pipe hybrid connection, this equation group integrates the boundary constraints of each pipe, the surface shape energy and the constraint energy, and adjusts the internal control points to ensure that the filling surface and the pipe boundary achieve G 2 Continuity, for example, allows for seamless curvature at pipe intersections, reducing fluid resistance or structural stress concentration. Optimized control points smooth the surface interior, avoiding twists and wrinkles. For example, in the hybrid connection of fluid transport pipes, this ensures smooth fluid flow paths and improves transmission efficiency. Ultimately, solving a system of linear equations to obtain optimized control points allows for highly precise boundary connections at multi-pipe hybrid filling surfaces while ensuring an internal form that meets engineering requirements, achieving both improved functionality and quality.

[0126] One embodiment of this specification can achieve at least the following beneficial effects:

[0127] 1. In the multi-pipe hybrid scenario, compared with the filling algorithms of commercial software such as XNURBS, the filling surface control points generated by the technical solution of this application are reduced by an average of 70%. Fewer control points greatly reduce the computational complexity of geometric modeling. When adjusting the parameters of the hybrid model (such as modifying the pipe diameter and adjusting the pipe angle) in the subsequent process, the operation can be more convenient, significantly improving modeling efficiency and reducing design iteration time.

[0128] 2. The filled surfaces generated by this technical solution are fully compatible with the industry-standard GNURBS. In industrial design applications involving multi-pipe hybrids (such as mechanical manufacturing and architectural surface structure design), they can be directly integrated with mainstream industrial design software without the need for data format conversion or additional surface adaptation. This enables seamless integration from modeling to production, reduces industrial application costs, and improves the efficiency of converting design results into actual products.

[0129] 3. For the problem of multi-tube mixing, the filling surface generated by the technical solution of this application has significantly reduced tangential error and curvature error at the boundary. By precisely controlling the boundary continuity (achieving G 2Continuously) to ensure a natural transition between the filled surface and the pipe surface. In the scenario of fluid transportation pipeline hybrid connection, it can reduce the sudden change of fluid resistance and improve the transportation efficiency; in mechanical structure hybrid connection, it can optimize the stress distribution and avoid stress concentration caused by discontinuous surfaces.

[0130] Taking the following two examples of three-pipe hybrid connection and four-pipe hybrid connection as an illustration, the technical solution of this application in the actual scenario will be briefly elaborated.

[0131] 1. Problem of three-pipe hybrid connection.

[0132] In the actual geometric modeling scenario, the three-pipe hybrid connection will result in a triangular hole. The boundary curves of each pipe form the boundary of this hole, and these boundaries are usually not in the same plane, which brings difficulties to the generation of the filled surface. In the design of some industrial pipeline systems, three pipes intersect at a certain angle, and a complex multi-sided hole is formed at the intersection. According to the technical solution of this application, first, the boundary curves are fitted using uniform rational B-spline curves. In the case of three-pipe hybrid connection, these boundary curves are the boundary curves of the pipe surface and the constructed connection surface. Through fitting, the fitting curves that meet the given error limit are obtained as the boundary curves of the final filled surface. Then, a quadrilateral mesh is constructed based on the fitting curves as the control mesh, and an initial GNURBS surface is generated. Since the number of control points of the fitting curves is different, the generated quadrilateral mesh may contain singular points, but this method adopts an improved pattern-based quadrilateral mesh generation method to control the degree of singular points at 3 degrees or 5 degrees, ensuring the quality of the filled surface. Finally, the control points of the GNURBS surface are adjusted through energy optimization. The energy is divided into surface shape energy and surface constraint energy. The former optimizes the surface shape, and the latter optimizes the boundary continuity of the filled surface. By solving the relevant linear equations, a smooth filled surface that meets the normal constraint and curvature constraint is obtained.

[0133] From Figure 3 The result can be seen intuitively. Figure 4 .a shows the hole to be filled in the three-pipe hybrid connection problem, and its complex shape is clearly visible. Figure 4 .b shows the rendered image of the filled surface, indicating that the filled surface is smooth and natural without obvious defects or distortions. Figure 4 .c shows the overall surface zebra stripes, which further verify the quality of the surface. The zebra stripes are evenly distributed on the surface without sudden changes or breaks, indicating that the surface has good continuity at the boundary and the overall surface quality is high. This means that in practical applications, such a filled surface can well meet the engineering requirements. For example, in a fluid transportation pipeline system, such a surface can ensure the smooth flow of fluid at the pipeline intersection, reducing resistance and energy loss.

[0134] 2. Problem of four-pipe hybrid connection

[0135] The four-sided holes formed by the four-pipe mixed connection also have the situation where the boundaries are not in the same plane. Moreover, due to the involvement of four pipes, the geometric relationship is more complex. In the design of the ventilation pipe system of a building, when four ventilation pipes intersect, it is necessary to handle the filling problem of such four-sided holes to ensure the normal operation and aesthetics of the ventilation system.

[0136] Similar to the three-pipe mixed connection, first fit the boundary curve, then construct a quadrilateral control grid, generate an initial GNURBS surface, and finally perform energy optimization. However, during the processing, due to the particularity of the four-sided holes, more difficulties may be encountered when generating the quadrilateral grid, such as the singularity problem caused by a large number of sides. This method can still effectively handle these problems through its improved algorithm, ensuring the quality of grid generation and the optimization of the subsequent surface. Figure 5 The processing results of the four-pipe mixed connection problem are presented. Among them, Figure 5 .a shows the holes that need to be filled, Figure 5 .b's rendering of the filled surface shows that the connection between the filled surface and the surrounding pipes is natural, and the overall surface effect is good. Figure 5 .c's zebra stripes show that the surface has good continuity at the boundary and no obvious curvature change, which once again proves the effectiveness of this method in dealing with the four-pipe mixed connection problem. In practical applications, such a filled surface can not only meet the structural requirements but also improve the aesthetics and stability of the entire system to a certain extent.

[0137] From these two examples, it can be seen that this multi-sided hole filling method based on generalized non-uniform rational B-spline has significant advantages. In terms of surface quality, the generated filled surface is smooth and flat, capable of meeting the strict requirements of various engineering scenarios for surface quality. In terms of boundary continuity, whether it is three-pipe mixed connection or four-pipe mixed connection, the tangential error and curvature error of the filled surface at the boundary are small, ensuring good connection between the surface and the surrounding structures. Moreover, the mixed connection surface generated by this method has a relatively small number of control points. When modifying, optimizing the model or integrating it with other models, a relatively small number of control points can reduce the computational complexity, improve the operation efficiency, and reduce the modeling time and cost.

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-sided hole filling method based on generalized non-uniform rational B-splines, applicable to the problem of multi-pipe mixed connection, characterized in that The method includes: S1. Obtain the boundary curve of the polygonal hole formed by the boundaries of multiple pipe surfaces in the multi-pipe mixed connection scenario, and iteratively fit each boundary curve with a cubic uniform rational B-spline curve, specifically including: S11. Set the initial number of control points m to 10. According to the target curve c target (t) and the C 0 error fitting energy, and its expression is: Meanwhile, for the C 1 and C 2 continuity requirements at the boundaries of the constrained surface, the required numbers of control points m1 and m2 are respectively recorded. If the number of control points m of the current fitted curve is less than max{m1, m2}, then let m = max{m1, m2} and refit to ensure that there are sufficient control points in subsequent energy optimization to achieve high-order continuity at the boundaries; Among them, the symbol is a cubic uniform rational B-spline curve, and the symbol N 3,i (t) is a cubic B-spline basis function, and p i is the curve control point, which is used to approximate the boundary set shape of the multi-pipe mixed connection hole; S12. When the 0 error exceeds the preset error limit ∈, increase the number of control points m, refit until the error meets ∈, and ensure that the number of control points meets the topological conditions for generating the quadrilateral mesh of the multi-pipe mixed connection holes: Among them, the symbol m i represents the number of control points of the i-th boundary, which is used to ensure the generability of the quadrilateral mesh of the multi-pipe mixed connection holes; S2. Based on the control points of the fitted boundary curve, construct a quadrilateral control grid that satisfies Equation (2), including the following sub-steps: S21. For a multi-pipe mixed connection hole with the number of sides n > 6, construct a dividing line to recursively divide it into sub-regions with the number of sides less than or equal to 6. The number of broken line segments of the dividing line is taken as the average of the number of broken line segments of the boundary, and the endpoints of the dividing line need to satisfy that the total number of broken line segments of the two parts after division is even; S22. Generate a control grid containing only 3-degree or 5-degree singular points using a pattern-based quadrilateral meshing method, and minimize the number of singular points through integer linear programming to ensure the smoothness of the filling surface of the multi-pipe mixed connection hole; S3. Generate an initial GNURBS surface based on the control grid and adjust the control points by optimizing the energy function, where the energy function is E v = αE surf + βE cons (3) Among them, the symbol E surf represents the surface shape energy, and the symbol E cons represents the surface constraint energy. The symbols α and β are weight coefficients; Among them, the surface shape energy E surf is expressed as E surf = aE streching + bE bending + cE rocinbending wherein, Curved surface constraint energy E cons is expressed as E cons = k1E normal + k2E curvature (4) Among them, the symbol E normal represents the normal constraint energy, which is used to achieve the G 1 continuity at the multi-pipe hybrid connection boundary. The symbol E curvature represents the normal curvature constraint energy, which is used to achieve the G 2 continuity of the boundary, and k1 and k2 are weight coefficients; The Dharma image constraint energy E normal is expressed as: Among them, represents the vector of the derivative of the surface perpendicular to the boundary curve at the boundary, and the symbol N r represents the r-th normal vector of the constraint surface at the boundary, which is obtained by sampling Gaussian points at the boundary of the constraint surface; (u r , v r ) is the corresponding parameter point, which is obtained by projecting the sampled Gaussian points onto the boundary curve of the existing filled surface. For the normal curvature constraint energy E curvature , assume Then, according to the definition of the normal curvature, the normal curvature of the filling surface at a certain point on the boundary along the v n direction is where \(I = Edu\) 2 + 2Fdudv + Gdv 2 is the first fundamental form of the surface, \(\prod = Ldu\) 2 + 2Mdudv + Ndv 2 is the second fundamental form of the surface, and the specific expression is In actual calculations, since the direction of v n is perpendicular to the boundary curve, one of λ and μ must be 0, so that Then the normal curvature constraint energy E curvature is defined as where κ n is the filling surface normal curvature defined above, (u r , v r ) is the corresponding parametric coordinate, K n,r represents the r-th normal curvature of the constraint surface at the boundary, obtained by Gaussian point sampling at the boundary of the constraint surface, and this energy is expressed as a quadratic function of each coordinate component of the control points after being processed; S4. Since the boundary control points of the filling surface have been determined, only the internal control points need to be calculated. Assume that the set of internal control points is Ω = {p i | i = 1, …, N}, and the set of boundary control points is Solve the following constrained problem s.t.p i =q i , i = N + 1, …, M According to the optimization theory, it is equivalent to s.t.p i = q i , i = N + 1, …, M Solve this linear equation system to obtain the optimized surface control points.