G2 continuous transition and hole repair method for CAD models
By combining B-spline surface and penalty function method with G0, G1, and G2 constraints, the G2 continuity problem of surface transition and hole filling in CAD system is solved, and efficient and low-complexity surface generation is achieved.
Patent Information
- Application Number
- CN202411278823.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-09-12
AI Technical Summary
Existing CAD systems find it difficult to simultaneously meet the G2 continuity requirements when constructing surface transitions and hole filling, and existing methods have the problems of high computational complexity and low solution efficiency.
B-spline surfaces are used as transition and filling surfaces. The penalty function method is combined with G0, G1, and G2 constraints to construct a constrained optimization problem. The linear equations are solved to generate a surface that satisfies G2 continuity.
It achieves the generation of high-quality surfaces at a lower surface degree, reduces computational complexity, improves solution efficiency, and meets G2 continuity requirements.
Smart Images

Figure CN119131318B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer-aided design (CAD), and in particular relates to a G2 continuous transition and hole repair method for a CAD model. Background Art
[0002] During surface modeling in CAD systems, a single parametric surface is often not enough to represent the target model; instead, multiple surface patches must be stitched together. This stitching process can create gaps, sharp edges, or holes in curved polygons. For gaps or sharp edges, a transition surface must be constructed for smooth stitching. For curved polygon holes, a single filler patch or a set of patches must be constructed to smoothly join with the surrounding surfaces.
[0003] Current technologies can be roughly divided into three categories based on the type of surface to be filled: multi-surface patch methods, single-surface patch uncut filling methods, and variational-based trimmed surface filling methods. The core idea of the multi-surface patch method is to divide the polygonal hole into multiple subregions and fill each subregion with a surface. The disadvantage of this method is that the partitioning of the hole has a decisive influence on the smoothness of the surface shape, and it is difficult to simultaneously meet the high continuity requirements at the hole boundary and between subregions. The single-surface patch uncut filling method involves filling the hole area with a complete surface. This method often uses implicit surfaces, and to meet high continuity requirements, higher-order surfaces are usually adopted, which increases complexity and limits its application in CAD models. The core idea of the variational-based trimmed surface filling method is to define an energy function as the objective function, use the control vertices of the B-spline surface as unknowns, and use the hole boundary as a constraint to construct a constrained optimization problem. If the Lagrange multiplier method is used to solve the problem, each time the number of B-spline vertices is specified to solve the problem, the problem will be transformed into a nonlinear problem and require iterative solution, which is time-consuming. If the penalty function method is used to solve the problem, the G2 continuity constraint cannot be flexibly satisfied. Summary of the Invention
[0004] The purpose of the present invention is to construct a cubic B-spline surface that meets the G2 continuity requirements under given polygonal boundary conditions, thereby achieving surface transition and hole repair. The present invention addresses the shortcomings of the existing technology and takes into account practicality, solution efficiency, accuracy and high continuity requirements.
[0005] The specific technical solutions adopted in the present invention are as follows:
[0006] In a first aspect, the present invention provides a CAD model-oriented G2 continuous transition and hole repair method for repairing gaps and holes in a workpiece CAD model in a CAD environment, comprising:
[0007] S1: Reading a workpiece CAD model with gaps and holes on its surface, traversing the model to find the gaps and holes and adding them to a set of objects to be processed; the gaps and holes originally existed when the workpiece CAD model was initially constructed, or were generated during the 3D conversion of the workpiece CAD model;
[0008] S2: for each object to be processed in the set of objects to be processed, calculating the least square plane of its boundary curve as a parameterized plane, projecting the boundary curve onto the parameterized plane, and performing initial parameterization of the boundary curve;
[0009] S3: For each object to be processed in the set of objects to be processed, setting a node vector of a B-spline surface, and solving the control vertices of the B-spline surface using a penalty function method according to the energy equation of the G0 and G1 constraints, thereby obtaining a B-spline surface for filling the object to be processed;
[0010] S4: For each object to be processed in the set of objects to be processed, check whether the B-spline surface used to fill the object to be processed meets the given G0, G1, and G2 tolerance standards; if all three tolerance standards are met, perform boundary clipping on the generated B-spline surface to generate a surface filling the object to be processed and update it to the workpiece CAD model; if any tolerance standard is not met, proceed to S5;
[0011] S5: After re-parameterizing the boundary curve, if the surface satisfies the G0 and G1 constraints, add the G2 continuity constraint condition; then re-calculate the B-spline surface using the penalty function method. If the penalty factor does not reach the upper bound, increase the penalty factor value; if the penalty factor reaches the upper bound, increase the number of surface control vertices, and obtain a new B-spline surface by re-solving the optimization problem. Return to S4 to perform a tolerance standard check on the new B-spline surface.
[0012] As a preference of the first aspect above, when the object to be processed is a gap, its boundary curve selects an open transition boundary; when the object to be processed is a hole, its boundary curve selects a closed hole boundary.
[0013] As a preferred embodiment of the first aspect, in S2, the specific implementation steps of performing initial parameterization of the boundary curve for each object to be processed in the set of objects to be processed are as follows:
[0014] S2-1: uniformly sample points on all boundary curves of the object to be processed to obtain a point set;
[0015] S2-2: Fit the least square plane according to the point set as the parameterized plane, and establish a local coordinate system on the parameterized plane;
[0016] S2-3: Project the point set onto the parameterized plane to obtain the projected point set; calculate the two-dimensional OBB bounding box of the projected point set, and use the two axes of the OBB bounding box as new coordinate axes and establish a new uv local coordinate system; for the i-th boundary curve in the object to be processed n is the number of boundary curves in the object to be processed, which is projected onto the parameterized plane to obtain the p-Curve curve to complete the initial parameterization; the local coordinates of any point on the p-Curve curve are marked as (u i (t),v i (t)), t represents the curve parameter.
[0017] As a preferred embodiment of the first aspect, in S3, for each object to be processed in the set of objects to be processed, the specific steps of solving the corresponding B-spline surface are as follows:
[0018] The penalty function method is used to solve the following optimization problem with G0 and G1 constraints. The objective function of the optimization problem is defined as the energy functional E of the surface:
[0019]
[0020] Where: S(u,v) represents the B-spline surface to be solved, n i (t) represents the i-th boundary curve The unit normal vector function, S(u i (t),v i (t)) represents the i-th boundary curve Projection lines on the B-spline surface;
[0021] When solving the optimization problem, the node vectors of the B-spline surface to be solved are first set, and then the partial derivatives of the control vertices are taken to construct a linear equation group about the control vertices. Then, by solving the linear equation group, the initial B-spline surface filling the object to be processed is obtained.
[0022] As a preferred embodiment of the first aspect, the specific implementation steps of S4 are as follows:
[0023] For each object to be processed in the set of objects to be processed, points are evenly taken on all boundary curves of the object to be processed, and the taken points are projected onto the B-spline surface used to fill the object to be processed, and the distance between the original point and the projected point is calculated and compared with the G0 tolerance. If the distance is greater than the tolerance, the B-spline surface does not meet the requirements; the angle between the unit normal vector at the point and the projected point is calculated and compared with the G1 tolerance. If the angle is greater than the tolerance, the B-spline surface does not meet the requirements; the Gaussian curvature difference at the point and the projected point is calculated and compared with the G2 tolerance. If the difference is greater than the tolerance, the B-spline surface does not meet the requirements; if the distance, the angle and the Gaussian curvature difference are all within their respective tolerance ranges, the B-spline surface is deemed to meet the requirements, the current B-spline surface is boundary clipped and the clipped surface is output to the workpiece CAD model for filling the object to be processed, otherwise enter S5 for further optimization.
[0024] As a preferred embodiment of the first aspect, the specific implementation steps of S5 are as follows:
[0025] S5-1: Use the newly generated B-spline surface as the parametric surface to reparameterize the boundary curve;
[0026] S5-2: If the newly generated B-spline surface satisfies the G0 and G1 constraints, according to the equivalent definition of the G1 constraint, for each boundary curve All calculations satisfy The four intermediate functions α = α(u(t), v(t)), β = β(u(t), v(t)), γ = γ(u(t), v(t)), η = η(u(t), v(t)); and according to the equivalent condition of G2 continuity, the G2 constraint is added to the optimization problem, and the optimization problem is transformed into the following new optimization problem with constraints:
[0027]
[0028] S5-3: converting the constrained new optimization problem into an unconstrained optimization problem by using a penalty function method, resolving the unconstrained optimization problem, and obtaining a new B-spline surface for filling the object to be processed; when solving the unconstrained optimization problem, if the penalty factor does not reach the upper bound, increasing the penalty factor value; if the penalty factor reaches the upper bound, increasing the number of surface control vertices, and then obtaining a system of linear equations by taking partial derivatives of the control vertices, and then solving the control vertices to obtain a new B-spline surface;
[0029] S5-4. Based on the new B-spline surface, return to S4 and check whether it meets the G0, G1, and G2 tolerance standards.
[0030] As a preferred embodiment of the first aspect, when the object to be processed is a gap, when performing boundary clipping on the generated B-spline surface in S4, the clipping boundary needs to be closed.
[0031] In a second aspect, the present invention provides a G2 continuous transition and hole repair system for CAD models, comprising:
[0032] Import module, used for allowing users to select the workpiece CAD model that needs to be repaired in the form of a GUI interface;
[0033] a repair module for repairing gaps and holes in an imported workpiece CAD model according to the G2 continuous transition and hole repair method as described in any one of the solutions of the first aspect;
[0034] The output module is used to store the repaired workpiece CAD model according to a specified path or visualize it in a specified manner.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] The present invention utilizes B-spline surfaces as transition and filling surfaces, significantly enhancing compatibility with existing CAD systems. Furthermore, the present invention can generate high-quality surfaces with a lower surface degree, thereby reducing the complexity of surface calculations. Furthermore, the present invention addresses the generation of transition and hole-filling surfaces that satisfy G2 constraints. The generated B-spline surfaces are more flexible than those with C2 constraints. Furthermore, the optimization problem constructed is a constrained quadratic optimization problem, ultimately requiring only the solution of a single linear system of equations, avoiding the iterative solution of nonlinear optimization problems and significantly improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 Schematic diagram of the basic steps of the G2 continuous transition and hole repair method provided by an embodiment of the present invention.
[0038] Figure 2 Schematic diagram of the implementation process of the G2 continuous transition and hole repair method provided in an embodiment of the present invention.
[0039] Figure 3 This is a diagram of the hole filling results of the workpiece CAD model provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0040] To make the above-mentioned objects, features, and advantages of the present invention more readily apparent, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following description sets forth numerous specific details to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art may make similar modifications without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0041] like Figure 1 As shown, in a preferred embodiment of the present invention, a G2 continuous transition and hole repair method for CAD models is provided, which is used to repair gaps and holes in a workpiece CAD model in a CAD environment, and includes the following steps:
[0042] S1: Read in a workpiece CAD model with gaps and holes on the model surface, traverse and search for gaps and holes in the model and add them to the set of objects to be processed.
[0043] It should be noted that the gaps and holes in the above-mentioned workpiece CAD model may exist when the workpiece CAD model is initially constructed, or may be generated during the three-dimensional conversion process of the workpiece CAD model, and there is no limitation on this.
[0044] The workpiece CAD model in the present invention is a model for modeling the workpiece in CAD software. The workpiece type can be in the form of mechanical parts, assemblies of different parts, integrated large-scale equipment and structures, etc., and there is no limitation on this.
[0045] S2: For each object to be processed in the set of objects to be processed, calculate the least square plane of its boundary curve as a parameterized plane, project the boundary curve onto the parameterized plane, and perform initial parameterization of the boundary curve.
[0046] In addition, the objects to be repaired in the present invention can be two types of gaps and holes in the workpiece CAD model. When the object to be processed is a gap, its boundary curve selects an open transition boundary; when the object to be processed is a hole, its boundary curve selects a closed hole boundary.
[0047] In an embodiment of the present invention, in the above step S2, the specific implementation steps of performing initial parameterization of the boundary curve for each object to be processed in the set of objects to be processed are as follows:
[0048] S2-1: uniformly sample points on all boundary curves of the object to be processed to obtain a point set;
[0049] S2-2: Fit the least square plane according to the point set as the parameterized plane, and establish a local coordinate system on the parameterized plane;
[0050] S2-3: Project the point set onto the parameterized plane to obtain the projected point set; calculate the two-dimensional OBB bounding box of the projected point set, and use the two axes of the OBB bounding box as new coordinate axes and establish a new uv local coordinate system. Represents the surface where the i-th boundary curve in the object to be processed is located, is the i-th boundary curve in the object to be processed, i=1,2,...,n, n is the number of boundary curves in the object to be processed. Project it onto the parameterized plane to obtain the p-Curve curve, completing the initial parameterization; the local coordinates of any point on the p-Curve curve are marked as (u i (t),v i (t)), t represents the curve parameter.
[0051] S3: For each object to be processed in the above set of objects to be processed, set the node vector of the B-spline surface, and use the penalty function method to solve the control vertices of the B-spline surface according to the energy equation of the G0 and G1 constraints, so as to obtain the B-spline surface used to fill the object to be processed.
[0052] In an embodiment of the present invention, in the above step S3, for each object to be processed in the set of objects to be processed, the specific steps of solving the corresponding B-spline surface are as follows:
[0053] Let S(u,v) represent the B-spline surface to be solved, n i (t) represents the i-th boundary curve The unit normal vector function, S(u i (t),v i (t)) represents the i-th boundary curve Projection line on the B-spline surface. The penalty function method is used to solve the following optimization problem with G0 and G1 constraints. The objective function of the optimization problem is defined as the energy functional E of the surface:
[0054]
[0055] When solving the above optimization problem, the node vectors of the B-spline surface to be solved are first set, and then the partial derivatives of the control vertices are taken to construct a linear equation system about the control vertices. Then, by solving the linear equation system, the initial B-spline surface filling the object to be processed is obtained.
[0056] S4: For each object to be processed in the set of objects to be processed, check whether the B-spline surface used to fill the object to be processed meets the given G0, G1, and G2 tolerance standards; if all three tolerance standards are met at the same time, perform boundary clipping on the generated B-spline surface to generate a surface filling the object to be processed and update it to the workpiece CAD model; if any tolerance standard is not met, enter S5.
[0057] In an embodiment of the present invention, the specific implementation steps of the above step S4 are as follows:
[0058] For each object to be processed in the set of objects to be processed, points are evenly taken on all boundary curves of the object to be processed, and the taken points are projected onto the B-spline surface used to fill the object to be processed, and the distance between the original point and the projected point is calculated and compared with the G0 tolerance. If the distance is greater than the tolerance, the B-spline surface does not meet the requirements; the angle between the unit normal vector at the point and the projected point is calculated and compared with the G1 tolerance. If the angle is greater than the tolerance, the B-spline surface does not meet the requirements; the Gaussian curvature difference at the point and the projected point is calculated and compared with the G2 tolerance. If the difference is greater than the tolerance, the B-spline surface does not meet the requirements; if the distance, the angle and the Gaussian curvature difference are all within their respective tolerance ranges, the B-spline surface is deemed to meet the requirements, the current B-spline surface is boundary clipped and the clipped surface is output to the workpiece CAD model for filling the object to be processed, otherwise enter S5 for further optimization.
[0059] It should be noted that when the object to be processed is a gap, when the generated B-spline surface is clipped at the boundary in S4, the clipping boundary needs to be closed and then patched into the workpiece CAD model.
[0060] S5: After re-parameterizing the boundary curve, if the surface satisfies the G1 constraint, add the G2 continuity constraint; then recalculate the B-spline surface using the penalty function method. If the penalty factor does not reach the upper bound, increase the penalty factor value; if the penalty factor reaches the upper bound, increase the number of surface control vertices. By re-solving the optimization problem, a new B-spline surface is obtained. Return to S4 to perform a tolerance standard check on the new B-spline surface.
[0061] In an embodiment of the present invention, the specific implementation steps of the above step S5 are as follows:
[0062] S5-1: Use the newly generated B-spline surface as the parametric surface to reparameterize the boundary curve;
[0063] S5-2: If the newly generated B-spline surface satisfies the G1 constraint, according to the equivalent definition of the G1 constraint, for each boundary curve All calculations satisfy The four intermediate functions α = α(u(t), v(t)), β = β(u(t), v(t)), γ = γ(u(t), v(t)), η = η(u(t), v(t)); and according to the equivalent condition of G2 continuity, the G2 constraint is added to the optimization problem, and the optimization problem is transformed into the following new optimization problem with constraints:
[0064]
[0065] S5-3: The new constrained optimization problem is converted into an unconstrained optimization problem through the penalty function method, and the unconstrained optimization problem is re-solved to obtain a new B-spline surface for filling the object to be processed; when solving the unconstrained optimization problem, if the penalty factor does not reach the upper bound, the penalty factor value is increased; if the penalty factor reaches the upper bound, the number of surface control vertices is increased, and then a system of linear equations is obtained by taking partial derivatives of the control vertices, and then the control vertices are solved to obtain a new B-spline surface.
[0066] S5-4. Based on the new B-spline surface, return to S4 and check whether it meets the G0, G1, and G2 tolerance standards.
[0067] In the embodiment of the present invention, the methods described in S1 to S5 above can be performed according to Figure 2 The process shown is processed. Figure 3 An example of patching based on this method is shown. In this example, Figure 2 The left picture is a CAD model of a workpiece before repair, with a missing hole on the top. Figure 2 The right picture in the figure is the repaired workpiece CAD model. It can be seen that the originally missing hole on the top has been well filled. Based on this exemplary workpiece CAD model, the method of the present invention and the traditional XNURBS plug-in are used to fill the gaps. The parameter index comparison between the two is shown in Table 1:
[0068] Table 1
[0069]
[0070] It can be seen that the method of the present invention can achieve G2 continuous transition and hole repair at a lower degree, and the error is significantly smaller than that of the traditional XNURBS plug-in.
[0071] In another embodiment of the present invention, a G2 continuous transition and hole repair system for CAD models is provided, which includes:
[0072] Import module, used for allowing users to select the workpiece CAD model that needs to be repaired in the form of a GUI interface;
[0073] a repair module for repairing gaps and holes in the imported workpiece CAD model according to the G2 continuous transition and hole repair method described in the aforementioned embodiment;
[0074] The output module is used to store the repaired workpiece CAD model according to a specified path or visualize it in a specified manner.
[0075] It should be noted that the import module, patch module, and output module can essentially be written using computer program code and integrated into the CAD software as software functional modules for user access. The storage path and visualization method within the output module can be adjusted and configured by the user based on actual needs.
[0076] The embodiments described above are merely some preferred implementations of the present invention and are not intended to limit the present invention. Persons skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, any technical solution obtained by equivalent substitution or equivalent transformation falls within the scope of protection of the present invention.
Claims
1. A G2 continuous transition and hole repair method for CAD models, used to repair gaps and holes in workpiece CAD models in a CAD environment, characterized by: include: S1: Reading a workpiece CAD model with gaps and holes on its surface, traversing the model to find the gaps and holes and adding them to a set of objects to be processed; the gaps and holes originally existed when the workpiece CAD model was initially constructed, or were generated during the 3D conversion of the workpiece CAD model; S2: for each object to be processed in the set of objects to be processed, calculating the least square plane of its boundary curve as a parameterized plane, projecting the boundary curve onto the parameterized plane, and performing initial parameterization of the boundary curve; S3: For each object to be processed in the set of objects to be processed, setting a node vector of a B-spline surface, and solving the control vertices of the B-spline surface using a penalty function method according to the energy equation of the G0 and G1 constraints, thereby obtaining a B-spline surface for filling the object to be processed; S4: For each object to be processed in the set of objects to be processed, check whether the B-spline surface used to fill the object to be processed meets the given G0, G1, and G2 tolerance standards; if all three tolerance standards are met, perform boundary clipping on the generated B-spline surface to generate a surface filling the object to be processed and update it to the workpiece CAD model; if any tolerance standard is not met, proceed to S5; S5: After reparameterizing the boundary curve, if the surface satisfies the G1 constraint, add the G2 continuity constraint. Then, use the penalty function method to recalculate the B-spline surface. If the penalty factor does not reach the upper bound, increase the penalty factor value. If the penalty factor reaches the upper bound, increase the number of surface control vertices. By resolving the optimization problem, a new B-spline surface is obtained. Return to S4 to perform a tolerance standard check on the new B-spline surface.
2. The G2 continuous transition and hole repair method for CAD models according to claim 1, characterized in that: When the object to be processed is a gap, its boundary curve selects an open transition boundary; when the object to be processed is a hole, its boundary curve selects a closed hole boundary.
3. The G2 continuous transition and hole repair method for CAD models according to claim 1, characterized in that: In S2, the specific implementation steps of performing initial parameterization of the boundary curve for each object to be processed in the set of objects to be processed are as follows: S2-1: uniformly sample points on all boundary curves of the object to be processed to obtain a point set; S2-2: Fit the least square plane according to the point set as the parameterized plane, and establish a local coordinate system on the parameterized plane; S2-3: Project the point set onto the parameterized plane to obtain the projected point set; calculate the two-dimensional OBB bounding box of the projected point set, and use the two axes of the OBB bounding box as new coordinate axes and establish a new uv local coordinate system; for the i-th boundary curve in the object to be processed i=1,2,...,n, where n is the number of boundary curves in the object to be processed, and the p-Curve curve is obtained by projecting it onto the parameterized plane to complete the initial parameterization; the local coordinates of any point on the p-Curve curve are marked as (u i (t),v i (t)), t represents the curve parameter.
4. The G2 continuous transition and hole repair method for CAD models according to claim 1, characterized in that: In S3, for each object to be processed in the set of objects to be processed, the specific steps of solving the corresponding B-spline surface are as follows: The penalty function method is used to solve the following optimization problem with G0 and G1 constraints. The objective function of the optimization problem is defined as the energy functional E of the surface: Where: S(u,v) represents the B-spline surface to be solved, n i (t) represents the i-th boundary curve The unit normal vector function, S(u i (t),v i (t)) represents the i-th boundary curve Projection lines on the B-spline surface; When solving the optimization problem, the node vectors of the B-spline surface to be solved are first set, and then the partial derivatives of the control vertices are taken to construct a linear equation group about the control vertices. Then, by solving the linear equation group, the initial B-spline surface filling the object to be processed is obtained.
5. The G2 continuous transition and hole repair method for CAD models according to claim 1, characterized in that: The specific implementation steps of S4 are as follows: For each object to be processed in the set of objects to be processed, points are evenly taken on all boundary curves of the object to be processed, and the taken points are projected onto the B-spline surface used to fill the object to be processed, and the distance between the original point and the projected point is calculated and compared with the G0 tolerance. If the distance is greater than the tolerance, the B-spline surface does not meet the requirements; the angle between the unit normal vector at the point and the projected point is calculated and compared with the G1 tolerance. If the angle is greater than the tolerance, the B-spline surface does not meet the requirements; the Gaussian curvature difference at the point and the projected point is calculated and compared with the G2 tolerance. If the difference is greater than the tolerance, the B-spline surface does not meet the requirements; if the distance, the angle and the Gaussian curvature difference are all within their respective tolerance ranges, the B-spline surface is deemed to meet the requirements, the current B-spline surface is boundary clipped and the clipped surface is output to the workpiece CAD model for filling the object to be processed, otherwise enter S5 for further optimization.
6. The G2 continuous transition and hole repair method for CAD models according to claim 1, characterized in that: The specific implementation steps of S5 are as follows: S5-1: Use the newly generated B-spline surface as the parametric surface to reparameterize the boundary curve; S5-2: If the newly generated B-spline surface satisfies the G0 and G1 constraints, according to the equivalent definition of the G1 constraint, for each boundary curve All calculations satisfy The four intermediate functions α = α(u(t), v(t)), β = β(u(t), v(t)), γ = γ(u(t), v(t)), η = η(u(t), v(t)); and according to the equivalent condition of G2 continuity, the G2 constraint is added to the optimization problem, and the optimization problem is transformed into the following new optimization problem with constraints: S5-3: converting the constrained new optimization problem into an unconstrained optimization problem by using a penalty function method, resolving the unconstrained optimization problem, and obtaining a new B-spline surface for filling the object to be processed; when solving the unconstrained optimization problem, if the penalty factor does not reach the upper bound, increasing the penalty factor value; if the penalty factor reaches the upper bound, increasing the number of surface control vertices, and then obtaining a system of linear equations by taking partial derivatives of the control vertices, and then solving the control vertices to obtain a new B-spline surface; S5-4: Based on the new B-spline surface, return to S4 and check whether it meets the G0, G1, and G2 tolerance standards.
7. The G2 continuous transition and hole repair method for CAD models according to claim 1, characterized in that: When the object to be processed is a gap, when performing boundary clipping on the generated B-spline surface in S4, the clipping boundary needs to be closed.
8. A G2 continuous transition and hole repair system for CAD models, characterized by: include: Import module, used for allowing users to select the workpiece CAD model that needs to be repaired in the form of a GUI interface; a repair module for repairing gaps and holes in an imported workpiece CAD model according to the G2 continuous transition and hole repair method according to any one of claims 1 to 7; The output module is used to store the repaired workpiece CAD model according to a specified path or visualize it in a specified manner.
Citation Information
Patent Citations
Deformable healer for removing CAD database connectivity gaps from free-form curves and surfaces
US20040174362A1
Modeling and interactive manipulation of complex three-dimensional surface models using networks of non-uniform rational b-spline curves and a constrained minimization technique
US6639592B1