Reconstruction and generation method of second type coons surface based on arc length parameterization
By using a second-class Coons surface reconstruction and generation method based on arc length parameterization, the problems of internal surface wrinkles and ambiguity of tangent direction are solved, achieving high-quality and automated surface generation, which is suitable for repairing complex holes in high-end manufacturing scenarios such as automobile bodies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-09
AI Technical Summary
Existing Coons surface generation technology is prone to internal wrinkles and distortions when dealing with parametrically unevenly distributed boundaries. In the process of automated repair, problems such as surface normal flipping and self-intersection caused by ambiguity in the boundary tangent direction also exist. Furthermore, existing tools lack intelligent perception and correction capabilities, requiring designers to make manual adjustments.
The second type of Coons surface reconstruction and generation method based on arc length parameterization is adopted. By reading the STEP format CAD model, an arc length parameterized mapping model is constructed, the position vector of the supporting surface and the cross-boundary partial derivative are extracted, and the tangent direction is adaptively corrected to generate a surface that meets the high continuity requirements.
The generated surface exhibits good orthogonality of internal isoparametric lines, resulting in a smooth and glossy visual effect. The algorithm is robust, fully automated, and requires no manual adjustment by the designer. The surface quality is excellent, with a uniform mesh distribution, making it suitable for repairing Class A surfaces.
Smart Images

Figure CN122176249A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer graphics technology, specifically to a second-class Coons surface reconstruction and generation method based on arc length parameterization. Background Technology
[0002] In the field of digital design for modern industrial products, especially in high-end manufacturing scenarios such as automotive body panels, aerospace structural components, and ship skins, the surface quality of the 3D model directly determines the product's aerodynamic performance, aesthetic appearance, and the feasibility of subsequent mold processing. During the construction of these complex surfaces, the continuity between surface patches is a core indicator for measuring modeling quality.
[0003] In engineering, continuity is typically categorized into parametric continuity (C-continuity) and geometric continuity (G-continuity). G0 continuity only requires coincident boundary positions; G1 continuity (tangential continuity) requires that the tangent vectors of adjacent surfaces at the boundary be collinear, achieving a visually smooth transition; while C1 continuity (first derivative continuity) builds upon G1, further requiring that the magnitudes of the tangent vectors at the boundary also be equal. However, in practical engineering design, the constraints of C1 continuity are often too stringent. Forcing equal magnitudes can lead to excessive restrictions on the surface shape by parametric flow rates, resulting in unnecessary distortion or stretching. Therefore, in high-end industrial design, G1 continuity, which allows for flexible scaling of the tangent vector magnitudes while maintaining normal consistency, is the optimal solution that balances shape freedom and smoothness of joints.
[0004] Current commercial CAD modeling software (such as Autodesk Alias, ICEM Surf, CATIA, etc.) and traditional Coons surface algorithms provide basic surface patching and continuity matching functions. However, significant technical limitations remain when dealing with automated repair of quadrilateral topological regions and collaborative connection of multiple surfaces. Specifically, existing technologies generally adopt "order increase" or "refinement" strategies when facing high-level continuity constraints. To meet the continuity requirements at the boundaries, software algorithms often increase the mathematical order of the working surface from the standard bicubic (3×3) to the 5th or even 7th order, or insert a large number of dense node intervals near the boundaries. While this approach satisfies the continuity condition mathematically, it introduces serious data redundancy and quality risks: First, the excessively high order and dense nodes not only cause a surge in model data volume, reducing the efficiency of subsequent data exchange and processing; second, the excessively high degree of freedom can easily trigger unexpected polynomial oscillations, resulting in subtle light and shadow fluctuations within the surface that are difficult to detect with the naked eye, severely damaging the highlight quality of Class A surfaces; third, the generated surface control point network is too dense, making it difficult for designers to perform subsequent manual fine-tuning and optimization.
[0005] Furthermore, traditional Coons surface generation algorithms heavily rely on the original parameter distribution of the boundary curves. During data interaction between different software programs, the input boundary curves often exhibit non-uniform parameterization or random tangent directions. Directly performing interpolation calculations based on the original parameter domain not only fails to achieve ideal continuity but also leads to problems such as isoparametric distortion and wrinkles within the generated surface. Existing automated tools lack the intelligent perception and correction capabilities for these issues, often requiring designers to expend considerable effort on manual parameter adjustments.
[0006] Therefore, how to automatically generate high-quality surfaces that meet high continuity requirements and possess uniform internal meshes and simplified structures without increasing the surface order or adding extra node intervals, by establishing a uniform arc-length parameter mapping space and combining adaptive optimization of cross-boundary vectors, has become a key technical challenge to be solved in the field of parametric modeling and complex hole repair. To address this, we propose a second-class Coons surface reconstruction and generation method based on arc-length parameterization. Summary of the Invention
[0007] To address the aforementioned technical issues, a second-class Coons surface reconstruction and generation method based on arc length parameterization is provided. This technical solution solves the problems of existing Coons surface generation techniques, such as internal wrinkles and distortions when dealing with unevenly distributed parameterized boundaries, and surface normal flipping and self-intersection caused by ambiguity in the boundary tangent direction during automated repair.
[0008] To achieve the above objectives, the technical solution adopted in this invention is: a second-type Coons surface reconstruction and generation method based on arc length parameterization, the steps of which include:
[0009] S1. Read the STEP format CAD model: Read the STEP format CAD model file to be repaired, analyze the geometric topology, lock the quadrilateral hole to be repaired and the four supporting surfaces surrounding it, and define the initial boundary constraint set of the repair area.
[0010] S2. Boundary Topology Sorting and Closed-Loop Reorganization: Perform spatial geometric analysis on discrete boundary constraints, reorganize them into closed topological loops with the beginning and end connected, predict the consistency of geometric directions of each boundary, mark boundaries with mismatched directions, and complete the construction of closed-loop topology.
[0011] S3. Construct a parameterized mapping model based on arc length: For each sorted boundary curve, establish a normalized nonlinear mapping relationship with physical parameters, and construct a parameter remapping model based on the arc length distribution characteristics.
[0012] S4. Extraction of cross-boundary geometric information: Based on uniform sampling of the mapping model, the position vector of the supporting surface and the cross-boundary partial derivative are extracted. By calculating the cross-boundary parameter domain span scaling partial derivative, the standardized cross-boundary tangent vector is obtained.
[0013] S5. Adaptive correction of tangent direction: To ensure direction uniformity, the reference vectors of the boundary and the midpoint of the opposite side are used as the basis. The consistency of the cross-boundary tangent direction is determined by the dot product. Tangents with negative dot products are reversed and corrected.
[0014] S6. Calculate the hybrid Coons surface: Based on the Hermite interpolation principle, fuse the corrected position vector, cross-boundary tangent vector and corner torsion vector to construct the second type of Coons surface, superimpose the bidirectional ruled surface and correct the corner points to generate a grid lattice that satisfies position closure and tangential continuity.
[0015] S7. Surface Fitting and Result Output: Fit the point matrix data into a NURBS or B-spline surface entity, perform continuity verification while preserving the original topology, and finally achieve hole repair.
[0016] Preferably, in step S1, the supporting surface is mathematically expressed in the form of non-uniform rational B-splines, and the boundary constraint extraction is equivalent to extracting the isoparametric lines of the surface. The four extracted original geometric curves and their parent surface objects are encapsulated into an initial set of boundary constraints, while retaining the original node vectors and control point information.
[0017] Preferably, in step S2, a greedy sorting algorithm based on Euclidean distance is used to sort the boundary topology, and adjacent edges are determined by the connectivity discrimination formula. For boundaries with inconsistent parameter directions, a linear parameter remapping function is constructed to perform logical inversion processing to ensure that the tangent fields of all four boundaries in the parameter domain are connected end to end.
[0018] Preferably, in step S3, when constructing the arc length parameterized mapping model, the cumulative arc length function of the curve is calculated, a normalized arc length parameter is introduced, an equal arc length sampling algorithm is used to divide the normalized target domain into equally spaced intervals, target arc length nodes are generated, the corresponding original parameter nodes are obtained by iteratively solving the integral equation, a discrete lookup table is established, and the original parameters corresponding to any normalized parameter are subsequently calculated using a linear interpolation formula.
[0019] Preferably, in step S4, the extraction of the boundary geometric information, including the extraction of the boundary tangential derivative and the cross-boundary derivative, is based on the chain rule for scaling transformation. The derivatives of the original curve or surface at the sampling point are calculated respectively. Combined with the mapping relationship between the normalized parameters and the original parameters and the parameter span, the standardized boundary tangential vector and cross-boundary tangential vector are obtained.
[0020] Preferably, in step S5, the geometric midpoints of the current boundary and its opposite edge are extracted in the normalized parameter domain, a topological reference vector connecting the two midpoints is constructed, the dot product of the cross-boundary tangent vector at the midpoint of the current boundary and the reference vector is calculated, a direction determination factor is defined, and the tangent vector field on the entire boundary is uniformly flipped through the direction correction operator.
[0021] Preferably, in step S6, the mathematical expression of the second type of Coons surface is:
[0022]
[0023] in For along Ruled interpolation surface in the direction, For along Ruled interpolation surface in the direction, The surface is a bilinear tensor product correction surface; to achieve continuity, a cubic Hermite polynomial is used as the mixing function, and the mixed partial derivatives at the corners are determined by an arithmetic averaging strategy.
[0024] Preferably, in step S7, the mesh lattice obtained in step S6 is fitted into a bicubic B-spline surface, and the newly generated supplementary surface is combined with the original input model through a topological combination operation. After merging into a complete model, it is serialized and exported as an industrially common AP214 format file.
[0025] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0026] Excellent surface quality and uniform mesh distribution: The use of arc length reparameterization technology effectively solves the problem of internal stretching and wrinkling of the surface caused by the "uneven length" or "parameter jump" of the boundary curves in traditional algorithms. The generated surface has good isoparametric lines with good orthogonality and a smooth visual effect, which is suitable for repairing Class A surfaces.
[0027] The algorithm is robust and fully automated: through internal tangent direction detection and flipping logic, it can intelligently cope with input boundaries with various chaotic directions, eliminating the need for designers to manually adjust curve directions, thus improving the efficiency and success rate of model surface patching generation.
[0028] The surface parameterization is simple and easy to adjust manually: Compared with the existing commercial software that achieves continuity through "increasing order" or "refining", the surface generated by this invention always maintains a standard bicubic structure with fewer control points and fewer node intervals. This satisfies the requirements for high continuity and makes it easy for designers to manually fine-tune the position of control points to meet the design needs of the model.
[0029] High splicing accuracy and natural transition: By introducing the parameter domain span of the cross-boundary direction as the adaptive scaling reference of the tangent modulus, and combining it with the smoothing of the corner torsion vector, it is ensured that the newly generated surface and the original surface are not only closed at the boundary, but also that the tangent plane transitions naturally, effectively avoiding the "wavy" defect at the joint caused by the imbalance of the tangent modulus ratio in the traditional method. Attached Figure Description
[0030] Figure 1 This is a flowchart of the second type of Coons surface reconstruction and generation method of the present invention;
[0031] Figure 2 The patch diagrams generated for the well-parameterized model; where (a) is the direct display diagram of the algorithm; and (b) is the control point arrangement and zebra crossing display diagram imported into Alias.
[0032] Figure 3 The following are comparison images of an example of a car body surface model before and after surface patching using this method: (a) is the model before surface patching; (b) is the continuity error diagram of each connection boundary of the model after surface patching; (c) is the zebra stripe display diagram of the model after surface patching; and (d) is the detailed parametric information diagram of the surface patching.
[0033] Figure 4 The image shows a comparison of the model before and after surface patching using the method for a car body surface model. (a) shows the model before surface patching; (b) shows the continuity error of each boundary of the model after surface patching; (c) shows the zebra stripe display of the model after surface patching; and (d) shows the detailed parametric information of the surface patching.
[0034] Figure 5 The following are comparison images of two examples of car body surface models after Alias surface patching: (a) shows the model after Square command surface patching and the corresponding boundary continuity error diagram; (b) shows the model after Square command surface patching after boundary reconstruction and the corresponding boundary continuity error diagram; (c) shows the zebra stripe display diagram for the model in (b); and (d) shows the detailed parametric information diagram for the model in (b).
[0035] Figure 6 Comparison images of three methods for repairing the surface of a car body before and after surface repair are shown; (a) is the model before surface repair; (b) is the continuity error diagram of each connection boundary of the model after surface repair; (c) is the zebra stripe display diagram of the model after surface repair; (d) is the detailed parametric information diagram of surface repair.
[0036] Figure 7The following are comparison images of three examples of car body surface models after Alias surface patching: (a) is the model after Square command surface patching and the corresponding boundary continuity error diagram; (b) is the model after Square command surface patching after boundary reconstruction and the corresponding boundary continuity error diagram; (c) is the zebra stripe display diagram for the model in (b); and (d) is the surface patching parameterized detailed information diagram for the model in (b).
[0037] Figure 8 This is a flowchart outlining the steps of the present invention. Detailed Implementation
[0038] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0039] Reference Figures 1 to 8 As shown, this invention adopts a modular architecture design that combines "data encapsulation" and "logic flow driving". The overall logic does not adopt a single giant structure, but rather constructs several dedicated data adaptation units and core algorithm modules according to the hierarchy of geometric processing.
[0040] The basic architecture of the method includes a boundary configuration unit and a geometric preprocessing unit, used to map and resolve the user input configuration to the underlying topological shape; and a core parametric mapping and vector correction unit, which encapsulates the arc-length-based reparametric mapping algorithm, the cross-boundary tangent extraction logic, and the direction adaptive correction mechanism, and is a key step in achieving "geometric uniformity". The main program calls the Coons surface construction module, using the encapsulated boundary objects as input parameters, to achieve a complete logical closed loop from boundary analysis to surface generation.
[0041] Data interaction between functional modules is achieved through high-speed flow using generic geometric objects and custom data structure instances. The overall architecture and data flow details are as follows:
[0042] First, the model reading and topology parsing module reads the external STEP format file through the standard data interface, parses it into topological shape data in memory, and instantiates a geometric preprocessing object according to the boundary constraints specified by the user to complete the extraction of the original geometric information.
[0043] Secondly, these objects are passed to the parametric mapping and geometry adaptation module. This module integrates an equal arc length sampling algorithm, which eliminates the non-uniformity of the original parameter distribution by establishing a non-linear mapping table from normalized parameters to physical parameters, and outputs standardized sampling point data that has undergone orientation consistency correction and scale adaptive scaling.
[0044] Then, the hybrid Coons surface construction and fitting module receives the standardized sampling data mentioned above, calculates a high-density point cloud mesh using the bicubic Hermite interpolation principle, and calls the inverse fitting algorithm to reconstruct the point cloud into a mathematically accurate solid B-spline surface.
[0045] Finally, the results output and visualization module encapsulates the newly generated surface into a solid topological surface, performs Boolean operations or combinations with the original model data, exports it as a new STEP file through the data writing interface, and calls the visualization engine to render an analysis view with normal indicators, thus forming a complete data processing closed loop.
[0046] This section will provide a detailed explanation of the methodological logic flow of each core functional module in the above architecture, along with specific implementation steps. In this process, the underlying operating mechanism of the key algorithms will be analyzed in detail, supplemented by corresponding mathematical principles, to fully demonstrate the scientific validity and engineering feasibility of the solution adopted in this invention.
[0047] S1. Model Reading and Boundary Constraint Definition
[0048] For the area of the hole to be repaired, the algorithm uses a topological traversal algorithm to obtain the four supporting surfaces that enclose the hole, and then obtains the specific parametric boundaries of each supporting surface that contribute to the formation of the hole. For any parametric surface... Its topological boundary is usually defined by the extrema of the parameter domain, i.e. , , , Support surfaces are typically mathematically represented using non-uniform rational B-splines (NURBS). For any support surface... Its mathematical definition is as follows:
[0049]
[0050] in: Represents the control point grid of the surface; These are the corresponding weighting factors; and They are respectively Direction Subsequent Direction The second-order B-spline basis function is derived from the nodal vectors. and Recursive definition.
[0051] Based on this, the so-called "boundary constraint extraction" is mathematically equivalent to extracting the isoparametric lines of a surface. For example, when selecting... When the side is used as the boundary of the hole, the extracted boundary curve is... It can be expressed as "will" Dimensionality reduction mapping with constants:
[0052]
[0053] The four extracted original geometric curves and their parent surface objects are then encapsulated into an initial "boundary constraint set," while retaining the original node vectors and control point information as the geometric reference for subsequent high-precision calculations.
[0054] S2, Boundary Topological Sorting and Loop Reorganization
[0055] To reorganize the disordered discrete boundaries into mathematically computable closed loops, the code executes a greedy sorting algorithm based on Euclidean distance:
[0056] First, a topology reconstruction algorithm based on the Euclidean distance minimization principle is executed on the unordered boundary constraint set obtained in step S1. Since the four boundary curves may be discrete and unordered in the data storage structure, it is necessary to establish a mathematically continuous directed topological ring.
[0057] Let the discrete boundary set of the input be... The curve with index 0 in the set is selected as the baseline starting edge, denoted as... Then, traverse the remaining boundary set and calculate... physical endpoint coordinates With each of the remaining curves The starting point or endpoint Euclidean distance between Then, based on the connectivity criterion formula... (in The preset geometric tolerance is usually taken as... The next adjacent edge is determined. If the selected adjacent edge connects to the current edge through its "endpoint", it is temporarily marked as a geometric "reverse connection". Through this recursive greedy search strategy, the spatial connection order of the four boundaries is identified in turn, they are reorganized into geometric loops with precise closures, and connected in order. The sorted four boundaries are then mapped to the Coons surface parameter domain. The four edges are assigned "" in sequence , , , The topological role of "".
[0058] In order to ensure the continuity of the generated surface parameter flow throughout the entire domain, parameter direction consistency verification and transformation must also be performed.
[0059] In geometric space, each boundary curve Each of them has its inherent direction of parameter growth, which is determined by its tangent vector. Decision. However, in a topological loop, in order to form a closed loop, the loop traversal vectors... The direction is specific. Here, this is achieved by calculating the dot product of the boundary intrinsic tangent vector and the loop traversal vector. To determine the direction:
[0060] when This indicates that the original parameterization direction of the boundary curve is opposite to the desired topological loop direction. The code here does not physically reverse the geometric data; instead, it constructs a linear parameter remapping function. Perform a logical reversal on this boundary:
[0061]
[0062] By introducing this mapping, the original parameters will be automatically applied in subsequent sampling and calculations. Convert to correction parameters This ensures that the tangent vector fields of all four boundaries in the parameter domain are sequentially connected, satisfying... The requirement for continuity of loop integrals provides distortion-free boundary conditions for the subsequently generated internal mesh.
[0063] S3. Construct a parameterized mapping model based on arc length.
[0064] For the original boundary curve extracted from the supporting surface, due to the characteristics of NURBS mathematical representation, its parameter distribution is usually non-uniform. Specifically, this manifests as the magnitude of the curve's tangent vector, i.e., the parameter velocity. It is not a constant number, resulting in the same parameter increment. Corresponding physical arc length increment The differences are significant at different locations on the curve. If Coons interpolation is performed directly based on the original parameter domain, this non-uniformity will be directly transmitted to the interior of the generated surface, resulting in mesh distortion.
[0065] Therefore, this method implements arc length parameterization to construct a nonlinear mapping mechanism from the normalized uniform parameter space to the original physical parameter space.
[0066] From a mathematical perspective, this can be explained as follows: for any given original boundary curve... Its domain is The primary objective is to calculate the cumulative arc length function of the curve. The function is defined as the definite integral of the tangent vector modulus over the parameter domain:
[0067]
[0068] Based on this formula, the total physical arc length of the curve can be calculated. And introduce a normalized arc length parameter. Theoretically, an ideal mapping relationship should satisfy... However, the core difficulty of this step lies in the fact that practical application requires the inverse mapping of the function, that is, solving the function. So that it can be used through the input uniform parameters Inversely calculate the corresponding original parameters Since the inverse function of this integral does not have an analytical solution for general high-order NURBS curves, this algorithm uses a numerical discretization method to construct a high-precision approximate mapping model.
[0069] In practice, the equal arc length sampling algorithm is adopted, and the normalized target domain is first... Divided into This generates a series of target arc length nodes by dividing the intervals into equally spaced intervals. ,in For each target node Solving the integral equation iteratively Numerical approximation yields the corresponding original parameter nodes. This establishes a containing Group parameter mapping node pairs , , , Discrete lookup table. In the subsequent surface evaluation process, for any given normalization parameter... First, locate the interval to which it belongs in the lookup table. Then, the precise original parameters are calculated using linear interpolation formulas. :
[0070]
[0071] Through the above mathematical transformations, the code achieves an equidistant distribution of sampling points in three-dimensional Euclidean space, i.e., satisfies... This fundamentally eliminates the negative impact on the smoothness of the patch surface caused by the poor parameterization quality of the original support surface.
[0072] S4. Extraction of cross-boundary geometric information
[0073] To ensure tangential continuity between the newly generated Coons surface and the original support surface at their common boundary, it is necessary to extract the cross-boundary geometric derivative information at the boundary. However, directly extracting the partial derivatives of the support surface as boundary conditions for the new surface carries the risk of scale incompatibility. This is because the generated second-class Coons surface is strictly defined within the normalized unit parameter domain. In this context, the original supporting surface is typically defined within a range of physical parameters of arbitrary scale. If the differences in parameter domain definitions are ignored and derivative values are directly passed, the generated surface will produce unexpected "bulges" or "collapses" at the boundaries. To address this, this algorithm constructs a derivative scaling mechanism based on the chain rule.
[0074] Extraction and transformation of tangential derivatives along the boundary: Assuming that the current parameter being processed is the corresponding normalized parameter The boundary, whose geometric orientation corresponds to the original surface. Parameter direction. In order to correctly represent the "parametric velocity" of the boundary curve in Coons interpolation, the tangent vector along the boundary direction must be extracted;
[0075] First, calculate the original curve. The first derivative at the sampling point:
[0076]
[0077] Due to the parameters of the Coons surface It is normalized, and the linear mapping is: According to the chain rule, the tangent derivative in the normalized parameter domain... The following conditions are satisfied with the original tangent derivative:
[0078]
[0079] Calculate the parametric span of the current boundary along the boundary direction. And use it as the vertical scaling factor to calculate the standardized boundary tangent vector. :
[0080]
[0081] This step ensures the parametric rate and normalization domain of the new surface along its boundary orientation. Matching.
[0082] Extraction and transformation of cross-boundary derivatives: To ensure the continuity of G1, it is necessary to extract the cross-boundary partial derivatives perpendicular to the boundary direction. Assume the cross-boundary direction corresponds to the original surface... The parameter direction is first calculated from the original support surface. The original cross-boundary first-order partial derivative at the sampling point:
[0083]
[0084] Similarly, establish the normalized parameters To the original parameters linear mapping function According to the chain rule, the formula for derivative transformation is:
[0085]
[0086] The absolute value of the parametric span of the supporting surface in the cross-boundary direction is calculated as follows: Using this as a horizontal scaling factor, the standardized cross-boundary tangent vector is calculated. :
[0087]
[0088] Through the above scaling process, a set of standardized vectors that perfectly matches the unit parameter domain in mathematical terms was obtained. .
[0089] S5, Adaptive correction of tangent direction
[0090] Although step S4 successfully normalized the scale of the cross-boundary tangent vector, the extracted standard tangent vector suffers from randomness in the parameterization direction of the original supporting surface. There are cases where the direction points "outside the hole". Without orientation correction, the generated Coons surface will exhibit self-intersection or normal flipping problems. To address this, this paper proposes a global orientation determination method based on spatial relative positional relationships.
[0091] The core idea of this method is to accurately identify the geometric orientation pointing towards the interior of the area to be repaired by utilizing the geometric distribution characteristics of the hole boundaries. First, the current processing boundary is extracted in the normalized parameter domain. and its topological opposite edges The geometric midpoint. Let the normalization parameter be... The midpoint position vector of the two and They are defined as follows:
[0092]
[0093] Based on the ruled surface construction logic of the second type of Coons surface, the vector pointing from the current edge to the opposite edge geometrically approximates the "inward extension" tendency of the surface. Therefore, it is necessary to construct a topological reference vector connecting the two midpoints. As a geometric benchmark for determining the correctness of the tangent direction:
[0094]
[0095] Next, extract the cross-boundary tangent vector at the midpoint of the current boundary. The direction determination factor is defined, and its dot product with the reference vector is calculated to determine the consistency of their directions. as follows:
[0096]
[0097] According to the principles of vector algebra, when When, it indicates the angle between the tangent vector and the reference vector. Exceed That is, the principal component of the tangent vector points outward from the surface. To ensure the consistency of the derivative field across the entire boundary, a direction correction operator is introduced. This operator is based on The sign is uniformly flipped across the entire boundary tangent field:
[0098]
[0099] Finally, the correction operator is applied to the tangent vectors of all sampling points output in step S4 to obtain the final tangent vectors participating in the Coons mixing operation. :
[0100]
[0101] Through the above steps, without changing the tangent modulus, the geometric orientation of all boundary derivatives is constrained, ensuring that the constructed vector field points to the interior of the region to be repaired, thus laying the correct topological foundation for the subsequent generation of a transition surface with no self-intersection and excellent smoothness.
[0102] S6, Calculate the hybrid Coons surface
[0103] The second type of Coons surface construction module receives four sets of standardized boundary data processed in steps S4 and S5, and generates an internal mesh using the second type of Coons surface construction method. In order to simultaneously satisfy the positional constraints and tangential continuity constraints of the four boundaries, the code uses Boolean operators to superimpose the interpolated surfaces in two orthogonal directions and subtract the interpolated parts of their overlapping corner points.
[0104] For the normalized parameter domain At any point in the target surface The mathematical expression is defined as:
[0105]
[0106] in, For along Ruled interpolation surface in the direction, For along Ruled interpolation surface in the direction, This is the bilinear tensor product correction surface. The construction logic of each component is described in detail below:
[0107] In order to achieve Continuity is achieved by treating a cubic Hermite polynomial as a mixture function. Definition Used to control endpoint position weights Used to control the endpoint tangent weights:
[0108]
[0109] Next, construct the U-shaped ruled surface. The surface passes through along The direction is correct Boundary and The geometric information of the boundaries is interpolated to generate the surface. This ensures that the surface conforms to the input data on these two boundaries.
[0110] set up The curve is Its cross-boundary tangent is ; The curve is Its cross-boundary tangent is The interpolation formula is calculated as follows:
[0111]
[0112] Similarly, construct a W-direction ruled surface The surface passes through along The direction is correct Boundary and Interpolate the boundary data.
[0113] set up The curve is Its cross-boundary tangent is The curve on the right is Its cross-boundary tangent is The corresponding interpolation formula is calculated as follows:
[0114]
[0115] Because directly and Adding the data will result in the data in the corner region being calculated repeatedly, so it is necessary to construct a corner tensor product correction surface. This term is then subtracted from the Boolean sum formula to eliminate redundancy caused by double interpolation. The surface is entirely composed of four corner points. The position vector, first-order tangent vector, and second-order mixed partial derivative (i.e., torsion vector) at the location are determined.
[0116] The second-order mixed partial derivative at the corner points, also known as the torsion vector, reflects the degree of "twisting" of the surface at those corners. Mathematically, for smooth surfaces, according to Schwarz's Theorem, the mixed partial derivative should be independent of the order of differentiation, i.e. However, in practical engineering, the four boundary curves are usually extracted from different independent surfaces, resulting in inconsistent mixed derivatives derived along different paths at the corner points, i.e., torsion incompatibility, for example... :
[0117] Calculation Method 1 (Derivation of the W-direction tangent along the U-direction boundary):
[0118]
[0119] Calculation Method 2 (Derivation of the change in the U-direction tangent along the W-direction boundary):
[0120]
[0121] In actual CAD data, there are usually If any one of these values is used directly, the generated Coons surface will produce asymmetrical distortion or normal tearing at the corners.
[0122] To eliminate the aforementioned incompatibilities and obtain a geometrically "neutral" and smooth transition torsion vector, this technical solution employs an arithmetic averaging strategy. From a variational perspective, this is equivalent to finding an optimal torsion vector. This makes it compatible with two conflicting derivatives. The sum of squared Euclidean distances is minimized, i.e.:
[0123]
[0124] Solving for this optimization objective yields the following final formula for calculating the torsion vector:
[0125]
[0126] Finally, based on the positions of the four corner points U-direction tangent , W-direction tangent and the calculated torsion Correction surface This can be expressed as a matrix product:
[0127]
[0128] Among them, the hybrid vector , It is The block matrix contains all the geometric constraints of the four corner points of the hole:
[0129]
[0130] After constructing the above theoretical formulas, in order to obtain a high-precision patched mesh, the code uses a double loop iteration method to calculate the physical space coordinates based on the preset sampling precision:
[0131] Discrete in the parameter domain: The system in the normalized parameter domain Generate equally spaced grid node pairs. ,in , here .
[0132] Component calculation and substitution: For each discrete node The system performs the following operations in sequence:
[0133] Calculate the current Hermite basis function values. and .
[0134] Based on the lookup table in step S3, obtain Calculate the ruled surface components using the corresponding original curve points and tangent vectors. and .
[0135] Geometric coefficient matrix Substitute into the matrix formula and solve for the corrected components. .
[0136] Boolean sum superposition: Substituting the above three components into the master equation, we obtain the final physical space coordinates:
[0137]
[0138] Through the numerical calculations described above, a set of high-density discrete mesh vertices was generated.
[0139] S7. Surface Fitting and Result Output
[0140] The high-density grid output from S6 is used to calculate and generate a bicubic B-spline surface passing through all sampling points, given the required geometric accuracy.
[0141] To maintain the integrity of the repair results, the system performs a topology combination operation, merging the newly generated B-spline patch with the original input model to be repaired. At this point, the patch and the original model form a complete repaired model. Finally, the composite model is serialized and exported as an industrially common AP214 format file, facilitating the export of the repaired model to other CAD software for continuity analysis and subsequent model adjustments.
[0142] To further demonstrate the superiority of this invention in handling complex hole-filling tasks, this technology selects a representative high-order surface model as the test object and compares it with the Square function of Autodesk Alias, a software widely recognized as an industry benchmark in the current automotive design field, to highlight the technical advantages of this invention. By using the "standard surface filling result" generated by Alias software as a reference group and comparing it with the "experimental group result" generated by the second type of Coons surface reconstruction and generation technology based on arc length parameterization in this invention, a dual comparison is made at both the visual and data levels. This aims to highlight the excellent actual performance of this technical solution in handling irregular topological boundaries, corner transitions, and surface filling parameterization.
[0143] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A second-class Coons surface reconstruction and generation method based on arc length parameterization, characterized by the following steps: include: S1. Read the STEP format CAD model: Read the STEP format CAD model file to be repaired, analyze the geometric topology, lock the quadrilateral hole to be repaired and the four supporting surfaces surrounding it, and define the initial boundary constraint set of the repair area. S2. Boundary Topology Sorting and Closed-Loop Reorganization: Perform spatial geometric analysis on discrete boundary constraints, reorganize them into closed topological loops with the beginning and end connected, predict the consistency of geometric directions of each boundary, mark boundaries with mismatched directions, and complete the construction of closed-loop topology. S3. Construct a parameterized mapping model based on arc length: For each sorted boundary curve, establish a normalized nonlinear mapping relationship with physical parameters, and construct a parameter remapping model based on the arc length distribution characteristics. S4. Extraction of cross-boundary geometric information: Based on uniform sampling of the mapping model, the position vector of the supporting surface and the cross-boundary partial derivative are extracted. By calculating the cross-boundary parameter domain span scaling partial derivative, the standardized cross-boundary tangent vector is obtained. S5. Adaptive correction of tangent direction: To ensure direction uniformity, the reference vectors of the boundary and the midpoint of the opposite side are used as the basis. The consistency of the cross-boundary tangent direction is determined by the dot product. Tangents with negative dot products are reversed and corrected. S6. Calculate the hybrid Coons surface: Based on the Hermite interpolation principle, fuse the corrected position vector, cross-boundary tangent vector and corner torsion vector to construct the second type of Coons surface, superimpose the bidirectional ruled surface and correct the corner points to generate a grid lattice that satisfies position closure and tangential continuity. S7. Surface Fitting and Result Output: Fit the point matrix data into a NURBS or B-spline surface entity, perform continuity verification while preserving the original topology, and finally achieve hole repair.
2. The method for reconstructing and generating a second type of Coons surface based on arc length parameterization according to claim 1, characterized in that, In step S1, the support surface is mathematically expressed in the form of non-uniform rational B-splines. Boundary constraint extraction is equivalent to extracting the isoparametric lines of the surface. The four extracted original geometric curves and their parent surface objects are encapsulated into an initial set of boundary constraints, while retaining the original node vectors and control point information.
3. The method for reconstructing and generating a second type of Coons surface based on arc length parameterization according to claim 1, characterized in that, In step S2, a greedy sorting algorithm based on Euclidean distance is used to sort the boundary topology. Adjacent edges are determined by the connectivity discrimination formula. For boundaries with inconsistent parameter directions, a linear parameter remapping function is constructed to perform logical inversion processing to ensure that the tangent vector fields of all four boundaries in the parameter domain are connected end to end.
4. The second type of Coons surface reconstruction and generation method based on arc length parameterization according to claim 1, characterized in that, In step S3, when constructing the arc length parameterized mapping model, the cumulative arc length function of the curve is calculated, a normalized arc length parameter is introduced, and an equal arc length sampling algorithm is used to divide the normalized target domain into several equally spaced intervals to generate target arc length nodes. The corresponding original parameter nodes are obtained by iteratively solving the integral equation, and a discrete lookup table is established. Subsequently, the original parameters corresponding to any normalized parameter are calculated using a linear interpolation formula.
5. The method for reconstructing and generating a second type of Coons surface based on arc length parameterization according to claim 1, characterized in that, In step S4, the extraction of cross-boundary geometric information, including the extraction of the boundary tangential derivative and the cross-boundary derivative, is based on the chain rule for scaling transformation. The derivatives of the original curve or surface at the sampling points are calculated respectively. Combined with the mapping relationship between the normalized parameters and the original parameters and the parameter span, the standardized boundary tangential vector and cross-boundary tangential vector are obtained.
6. The method for reconstructing and generating a second type of Coons surface based on arc length parameterization according to claim 1, characterized in that, In step S5, the geometric midpoints of the current boundary and its opposite edge are extracted in the normalized parameter domain, a topological reference vector connecting the two midpoints is constructed, the dot product of the cross-boundary tangent vector at the midpoint of the current boundary and the reference vector is calculated, a direction determination factor is defined, and the tangent vector field on the entire boundary is uniformly flipped through the direction correction operator.
7. The method for reconstructing and generating a second type of Coons surface based on arc length parameterization according to claim 1, characterized in that, In step S6, the mathematical expression for the second type of Coons surface is: in For along Ruled interpolation surface in the direction, For along Ruled interpolation surface in the direction, The surface is a bilinear tensor product correction surface; to achieve continuity, a cubic Hermite polynomial is used as the mixing function, and the mixed partial derivatives at the corners are determined by an arithmetic averaging strategy.
8. The second type of Coons surface reconstruction and generation method based on arc length parameterization according to claim 1, characterized in that, In step S7, the mesh lattice obtained in step S6 is fitted into a bicubic B-spline surface. The newly generated supplementary surface is then combined with the original input model using a topological combination operation. After merging into a complete model, it is serialized and exported as an industrially common AP214 format file.