G2 continuous transition and hole repairing method oriented to CAD model

Through the B-spline surface filling method, combined with the penalty function method and the G0, G1, and G2 tolerance standards optimization, the problem of difficult to meet the high continuity of hole boundaries in the CAD system is solved, and efficient G2 continuous transition and hole repair are achieved, reducing the number of times the G2 continuous transition and hole repair. The surface calculation complexity and iterative solution time are obtained.

CN119131318AActive Publication Date: 2024-12-13ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411278823.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-13
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

The existing CAD system is difficult to meet the high continuity requirements of hole boundaries during surface splicing, and the cutting surface filling method based on the variational method takes a long time and cannot flexibly meet the G2 continuity constraints.

Method used

The B-spline surface filling method is used to calculate the least squares plane of the boundary curve by reading the gaps and holes on the model surface for parameterization. The penalty function method is used to solve the control vertices of the B-spline surface, and the G0, G1, G2 tolerance standard optimizes the surface, adds penalty factors or controls the number of vertices to meet G2 continuity.

Benefits of technology

It realizes the generation of high-quality surfaces at a lower number of surfaces, which reduces the complexity of surface calculation, improves efficiency, meets the requirements of G2 continuity, and avoids iterative solution to nonlinear optimization problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131318A_ABST
    Figure CN119131318A_ABST
Patent Text Reader

Abstract

The invention discloses a CAD model-oriented G2 continuous transition and hole repairing method. The method comprises the following specific steps of selecting a transition boundary or a boundary curve of a hole, calculating a least square plane of the boundary curve of the hole as a parameterization plane, projecting the boundary curve to the parameterization plane, and performing initial parameterization on the boundary curve. And setting a node vector of the B-spline surface, and solving a control vertex of the B-spline surface by adopting a penalty function method according to the G0 and G1 constraint condition energy equations so as to obtain the B-spline surface. And checking whether the obtained B-spline curved surface meets the given G0, G1 and G2 tolerance standards or not. If yes, boundary cutting is carried out on the generated B-spline curved surface, and a filling hole or transition curved surface is generated; and if not, re-optimizing the B-spline curved surface. The method can be used for repairing gaps and holes which originally exist when the workpiece CAD model is initially constructed or are generated in the three-dimensional conversion process.
Need to check novelty before this filing date? Find Prior Art

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 repairing method of a CAD model. Background Art

[0002] In the surface modeling process of CAD system, it is usually impossible to use a single parametric surface to represent the target model, and multiple surface patches need to be stitched together. In the stitching process, gaps, sharp edges, or curved polygon holes may appear. For gaps or sharp edges, transition surfaces need to be constructed for smooth stitching, while for curved polygon holes, one or a group of filling surface patches that can be smoothly spliced ​​with the surrounding surfaces need to be constructed.

[0003] The current technology can be roughly divided into three categories according to the type of filling surface: one is the multi-surface patch method, one is the single-surface patch non-cutting filling method, and one is the clipping surface filling method based on the variational method. The core idea of ​​the multi-surface patch method is to divide the polygonal hole into multiple sub-regions and use the surface to fill each sub-region. The disadvantage of this method is that the division 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 sub-regions. The single-surface patch non-cutting filling method refers to filling the hole area with a complete surface. This method often uses implicit surfaces, and in order to meet high continuity, high-order surfaces are usually used, which increases the complexity and limits the application of this method in CAD models. The core idea of ​​the clipping surface filling method based on the variational method is to define the energy function as the objective function, take the control vertices of the B-spline surface as unknowns, and use the boundary of the hole as a constraint condition 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 will result in a high time consumption; 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 multilateral boundary conditions, thereby achieving surface transition and hole repair. The present invention addresses the shortcomings of the prior art and takes into account practicality, solution efficiency, accuracy and high continuity requirements.

[0005] The specific technical solutions adopted by 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, which is used to repair gaps and holes in a workpiece CAD model in a CAD environment, and comprises:

[0007] S1: reading in a workpiece CAD model with gaps and holes on the model surface, traversing and searching for gaps and holes in the model 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 three-dimensional 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, a node vector of a B-spline surface is set, and according to the energy equation of the G0 and G1 constraints, a penalty function method is used to solve the control vertices of the B-spline surface, so as to obtain 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 obtained 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;

[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 limit, increase the penalty factor value; if the penalty factor reaches the upper limit, 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 preferred embodiment of the first aspect, when the object to be processed is a gap, its boundary curve selects an open transition boundary, and 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, and then the initial B-spline surface filling the object to be processed is obtained by solving the linear equation group.

[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 taken point and the projection 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 projection 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 projection 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 corresponding 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 parameter surface to re-parameterize 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, G2 constraints are added to the optimization problem to transform the optimization problem into the following new optimization problem with constraints:

[0027]

[0028] S5-3: converting the constrained new optimization problem into an unconstrained optimization problem by 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 limit, increasing the value of the penalty factor; if the penalty factor reaches the upper limit, increasing the number of surface control vertices, and then obtaining a linear equation group 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 to 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, which comprises:

[0032] An import module is used to allow users to select a workpiece CAD model that needs to be repaired in the form of a GUI interface;

[0033] A repair module, used to repair gaps and holes in the 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 adopts B-spline surfaces as transition and filling surfaces, which is highly compatible with existing CAD systems. Secondly, the present invention can generate high-quality surfaces with lower surface degrees, thereby reducing the complexity of surface calculation. Then, the present invention solves the generation of transition surfaces and hole filling surfaces that meet the G2 constraint. The generated B-spline surfaces are more flexible than the C2 constraint conditions. At the same time, the optimization problem constructed is a constrained quadratic optimization problem. In the end, only a linear equation group needs to be solved, avoiding the iterative solution of nonlinear optimization problems, greatly improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram of the basic steps of the G2 continuous transition and hole repair method provided in an embodiment of the present invention.

[0038] Figure 2 A 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 workpiece CAD model hole filling result diagram provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by 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 a CAD model 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 a set of objects to be processed.

[0043] It should be noted that the gaps and holes in the above-mentioned workpiece CAD model may be originally existing 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 the 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-mentioned set of objects to be processed, the node vector of the B-spline surface is set, and the control vertices of the B-spline surface are solved by the penalty function method according to the energy equation of the G0 and G1 constraints, so as to obtain the B-spline surface for filling 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 group about the control vertices, and then the initial B-spline surface filling the object to be processed is obtained by solving the linear equation group.

[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 taken point and the projection 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 projection 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 projection 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 corresponding 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 subjected to boundary clipping in S4, the clipping boundary needs to be closed and then repaired 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 limit, increase the penalty factor value; if the penalty factor reaches the upper limit, increase the number of surface control vertices. By re-solving the optimization problem, a new B-spline surface is obtained, and 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 parameter surface to re-parameterize 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, G2 constraints are added to the optimization problem to transform the optimization problem 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 a 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 limit, the penalty factor value is increased; if the penalty factor reaches the upper limit, the number of surface control vertices is increased, and then a group 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 to check whether it meets the G0, G1, and G2 tolerance standards.

[0067] In an 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 in the figure 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 completed. Based on this exemplary workpiece CAD model, the method of the present invention and the traditional XNURBS plug-in are used to complete the workpiece respectively. 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 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] An import module is used to allow users to select a workpiece CAD model that needs to be repaired in the form of a GUI interface;

[0073] A repair module, used to repair gaps and holes in the imported workpiece CAD model according to the G2 continuous transition and hole repair method described in the above 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 above-mentioned import module, repair module and output module can be essentially written by computer program code and integrated into the CAD software in the form of software function modules for users to call. Among them, the storage path or visualization method in the output module can be adjusted and set by the user according to actual needs.

[0076] The above-described embodiments are only some preferred implementations of the present invention, but are not intended to limit the present invention. A person skilled in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.

Claims

1. A G2 continuous transition and hole repair method for CAD models, used to repair gaps and holes in a workpiece CAD model in a CAD environment, characterized in that: include: S1: reading in a workpiece CAD model with gaps and holes on the model surface, traversing and searching for gaps and holes in the model 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 three-dimensional 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, a node vector of a B-spline surface is set, and according to the energy equation of the G0 and G1 constraints, a penalty function method is used to solve the control vertices of the B-spline surface, so as to obtain 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 obtained 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; S5: After re-parameterizing the boundary curve, if the surface satisfies the G1 constraint, add the G2 continuity constraint condition; then use the penalty function method to recalculate the B-spline surface. If the penalty factor does not reach the upper limit, increase the penalty factor value; if the penalty factor reaches the upper limit, 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 tolerance standard check on the new B-spline surface.

2. The G2 continuous transition and hole repair method for CAD models as claimed in claim 1, characterized in that: When the object to be processed is a gap, its boundary curve selects an open transition boundary, and when the object to be processed is a hole, its boundary curve selects a closed hole boundary.

3. The G2 continuous transition and hole repairing method for CAD models as claimed in 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, 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 as claimed in 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, and then the initial B-spline surface filling the object to be processed is obtained by solving the linear equation group.

5. The G2 continuous transition and hole repair method for CAD models as claimed in 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 taken point and the projection 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 projection 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 projection 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 corresponding 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 as claimed in 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 parameter surface to re-parameterize 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, G2 constraints are added to the optimization problem to transform the optimization problem into the following new optimization problem with constraints: S5-3: converting the constrained new optimization problem into an unconstrained optimization problem by 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 limit, increasing the value of the penalty factor; if the penalty factor reaches the upper limit, increasing the number of surface control vertices, and then obtaining a linear equation group 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 to check whether it meets the G0, G1, and G2 tolerance standards.

7. The G2 continuous transition and hole repair method for CAD models as claimed in 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 in that: include: An import module is used to allow users to select a workpiece CAD model that needs to be repaired in the form of a GUI interface; A repair module, used to repair 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 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