A method, device, equipment and medium for processing degenerate surfaces of a CAD model
By establishing a watertight grid data structure in the CAD model and automatically identifying and processing degraded surfaces, the problem of reduced geometric accuracy in the CAD model is solved, and the analysis accuracy and grid generation quality are improved.
Patent Information
- Application Number
- CN202510581478.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-05-07
AI Technical Summary
In the prior art, the degraded surface problem in the CAD model leads to a reduction in model geometric accuracy, affecting the accuracy of dimension annotation and engineering analysis, and conventional repair methods are inefficient and change the original model information.
By establishing a watertight grid data structure, identifying and processing full or partial degradation faces, including deleting full degradation faces and fusing adjacent sides, cutting part of the degradation face areas, realizing automated processing without modifying the original geometric data.
It improves the geometric accuracy of the CAD model and the accuracy of CAE analysis, reduces the scale of grid generation, and maintains the geometric and topological information integrity of the original model.
Smart Images

Figure CN120124128B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer-aided design, and particularly relates to a method, device, equipment and medium for processing degenerate surfaces of a CAD model. Background Art
[0002] In a CAD (Computer-Aided Design) model, under different scenarios, such as during the modeling process, Boolean operations between entities, or the data conversion process of a CAD model between different software, some complex curved surfaces or thin shell structures may have degenerate surfaces. The existence of the degenerate surface problem will lead to a reduction in the geometric accuracy of the model. When performing precise dimensioning, measurement, or model-based engineering analysis (such as finite element analysis), these abnormal surfaces may lead to incorrect results. And the commonly used degenerate surface processing and repair require a large amount of manual interaction, with low efficiency and a high error rate. In addition, there are huge differences between the repaired model and the original model's geometric data and topological information, which will change the true information of the original CAD model.
[0003] In summary, how to automatically identify and process degenerate surfaces without modifying the original geometric data is a technical problem to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for processing degenerate surfaces of a CAD model, which can automatically identify and process degenerate surfaces without modifying the original geometric data. The specific solutions are as follows:
[0005] In the first aspect, the present application discloses a method for processing degenerate surfaces of a CAD model, including:
[0006] Import and repair the initial CAD model, and establish a watertight mesh data structure to obtain a composite surface containing continuous surfaces and discrete surfaces;
[0007] Identify degenerate surfaces of the composite surface to obtain corresponding degenerate surface identification results;
[0008] If the degenerate surface in the composite surface is a completely degenerate surface, delete the completely degenerate surface, and fuse the adjacent edges of the target patches adjacent to the completely degenerate surface, so as to perform boundary topology reconstruction and stitching of the reconstructed discrete grid data using the fused surface information to obtain a degenerate surface processing result;
[0009] If the degenerate surface in the composite surface is a partially degenerate surface, perform a cutting process on the area where the partially degenerate surface is located, convert the cut area into a completely degenerate surface, and execute the step of deleting the completely degenerate surface.
[0010] Optionally, the identification of the degenerate surface for the composite surface to obtain the corresponding degenerate surface identification result includes:
[0011] Traverse the composite surface to obtain a patch identification table constructed based on the information of each patch;
[0012] Determine a patch as the current patch according to the patch identification order in the patch identification table, and determine the first area information of the current patch;
[0013] Determine the second area information of the target patch adjacent to the current patch;
[0014] Judge whether the current patch belongs to a completely degenerate surface according to the magnitude relationship between the area ratio of the first area information to the second area information and a preset area ratio threshold;
[0015] Determine the next patch as the new current patch according to the patch identification order, and jump to the step of determining the first area information of the current patch to obtain the degenerate surface identification result of whether each patch belongs to a completely degenerate surface.
[0016] Optionally, the identification of the degenerate surface for the composite surface to obtain the corresponding degenerate surface identification result includes:
[0017] Traverse all the boundary edges of each patch and determine the included angle value between the two boundary edges of each patch;
[0018] If the included angle value is less than a preset included angle tolerance, determine that the current patch is a partially degenerate surface; the partially degenerate surface includes normal boundary edges and candidate degenerate edges.
[0019] Optionally, the process of cutting the area where the partially degenerate surface is located includes:
[0020] Calculate the distance information between the corresponding points of the candidate degenerate edges of the same partially degenerate surface under the same parameters to determine the boundary edge spacing of the candidate degenerate edges;
[0021] If the boundary edge spacing is less than a preset margin tolerance, determine that the area between the candidate degenerate edges in the candidate degenerate surface is the area to be cut, and perform a cutting process on the area to be cut.
[0022] Optionally, the use of the fused surface information for boundary topology reconstruction and stitching of the reconstructed discrete grid data to obtain the degenerate surface processing result includes:
[0023] Reconstruct the boundary topology relationship of the target patch according to the virtual super edges and super points obtained by fusion, and uniformly process the distribution information of each discrete point of the target adjacent edges in the reconstructed boundary topology relationship to obtain each target discrete point;
[0024] Align and merge the target discrete points on the two target adjacent edges to obtain updated discrete grid data as the result of degenerate surface processing.
[0025] Optionally, the reconstructing the boundary topological relationship of the target patch according to the virtual hyperedges and hyperpoints obtained by fusion includes:
[0026] Generate hyperpoints by using the virtual hyperedges obtained by fusion and the geometric data associated with the virtual hyperedges;
[0027] Reconstruct the boundary topological relationship of the target patch after deleting the completely degenerate surface by using the virtual hyperedges and the hyperpoints to obtain the reconstructed boundary topological relationship.
[0028] Optionally, the uniformly processing the distribution information of each discrete point of the target adjacent edge in the reconstructed boundary topological relationship to obtain each target discrete point includes:
[0029] Perform synchronous discretization processing on the discrete point distribution of each discrete point of the target adjacent edge in the reconstructed boundary topological relationship to refresh the current discrete points of the target adjacent edge to the same distribution, and use each of the current discrete points as each target discrete point of the target adjacent edge.
[0030] In a second aspect, the present application discloses a device for processing degenerate surfaces of a CAD model, including:
[0031] A structure building module, configured to import and repair an initial CAD model and build a watertight grid data structure to obtain a composite surface including a continuous surface and a discrete surface;
[0032] A degenerate surface recognition module, configured to recognize degenerate surfaces of the composite surface to obtain corresponding degenerate surface recognition results;
[0033] A first processing module, configured to, if the degenerate surface in the composite surface is a completely degenerate surface, delete the completely degenerate surface, and fuse the adjacent edges of the target patch adjacent to the completely degenerate surface, so as to perform boundary topology reconstruction and stitching of the reconstructed discrete grid data by using the fused surface information to obtain a degenerate surface processing result;
[0034] A second processing module, configured to, if the degenerate surface in the composite surface is a partially degenerate surface, perform a cutting process on the area where the partially degenerate surface is located, convert the cut area into a completely degenerate surface, and execute the step of deleting the completely degenerate surface.
[0035] In a third aspect, the present application discloses an electronic device, including:
[0036] A memory, configured to store a computer program;
[0037] A processor for executing the computer program to implement the steps of the aforementioned CAD model's degenerate surface processing method.
[0038] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned CAD model's degenerate surface processing method are implemented.
[0039] It can be seen that the present application discloses a method for processing degenerate surfaces of a CAD model, including: importing and repairing an initial CAD model, establishing a watertight mesh data structure to obtain a composite surface including continuous surfaces and discrete surfaces; performing degenerate surface recognition on the composite surface to obtain corresponding degenerate surface recognition results; if the degenerate surface in the composite surface is a completely degenerate surface, deleting the completely degenerate surface and fusing the adjacent edges of the target patches adjacent to the completely degenerate surface to perform boundary topology reconstruction and stitching of the discrete mesh data after reconstruction using the fused surface information to obtain a degenerate surface processing result; if the degenerate surface in the composite surface is a partially degenerate surface, performing a cropping process on the area where the partially degenerate surface is located, converting the cropped area into a completely degenerate surface, and executing the step of deleting the completely degenerate surface. Thus, by repairing the initial CAD model and establishing a watertight mesh data structure, a composite surface including continuous surfaces and discrete surfaces can be obtained. In this way, by further processing the composite surface, the processing of virtual surface information can be realized, and the processing of degenerate surfaces can be achieved without processing the original geometric information. Moreover, this solution identifies completely degenerate surfaces and partially degenerate surfaces, and then performs targeted processing on degenerate surfaces of different degenerate surface types, improving the quality of mesh generation, reducing the scale of mesh generation, and enhancing the accuracy and reliability of CAE analysis and calculation. Description of the Drawings
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.
[0041] Figure 1 It is a flowchart of a method for processing degenerate surfaces of a CAD model disclosed in the present application;
[0042] Figure 2 It is a schematic diagram of a completely degenerate surface disclosed in the present application;
[0043] Figure 3 It is a schematic diagram of virtual super-edge fusion disclosed in the present application;
[0044] Figure 4 Schematic diagram of the updated curved surface boundary disclosed in this application;
[0045] Figure 5 Schematic diagram of the process of updating and merging geometric data on the edge disclosed in this application;
[0046] Figure 6 Schematic diagram of the update operation of discrete grid data disclosed in this application;
[0047] Figure 7 Schematic diagram of a partially degenerate surface disclosed in this application;
[0048] Figure 8 Schematic diagram of the area to be trimmed of a partially degenerate surface disclosed in this application;
[0049] Figure 9 Schematic diagram of the edge segmentation of a partially degenerate surface disclosed in this application;
[0050] Figure 10 Schematic diagram of the trimming process of a partially degenerate surface disclosed in this application;
[0051] Figure 11 Schematic diagram of the process of forming a loop of a partially degenerate surface disclosed in this application;
[0052] Figure 12 Schematic diagram of the process of updating the surrounding adjacency relationship of a partially degenerate surface disclosed in this application;
[0053] Figure 13 Schematic diagram of the structure of a device for processing degenerate surfaces of a CAD model disclosed in this application;
[0054] Figure 14 Schematic diagram of the structure of an electronic device disclosed in this application. Detailed implementation manners
[0055] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0056] In a CAD model, the problem of degenerate faces often stems from the following scenarios: 1. During the actual modeling process, users may set inappropriate parameters during operations such as extrusion, rotation, and lofting. For example, when extruding a 2D profile, if the profile lines are not closed or self-intersect, degenerate faces may appear after extrusion. In the lofting operation, if the guide curves or cross-section profiles are not set properly, it is also easy to cause degenerate faces in the generated model. 2. Boolean operations between solids are also one of the common causes of degenerate faces. When performing union, difference, or intersection operations on two or more solids, if the geometric relationships between the solids are complex and the boundary conditions are unclear, some small faces that cannot be processed correctly may appear, thus forming degenerate faces. 3. When converting data of a CAD model between different software, due to differences in geometric kernels, data formats, and precision of different software, it may lead to loss or deformation of geometric information of the model. For example, when converting from one CAD software format (such as Pro / E file format) to another CAD software format (such as SolidWorks file format), some complex curved surfaces or thin shell structures may appear with degenerate faces. When a CAD model is converted from a high-precision format to a low-precision format, in order to adapt to the new data structure and precision requirements, the geometric shape may be simplified, resulting in degenerate faces.
[0057] The existence of the problem of degenerate faces will lead to a reduction in the geometric accuracy of the model. When performing precise dimensioning, measurement, or model-based engineering analysis (such as finite element analysis), these abnormal faces may lead to incorrect results. For example, in finite element analysis, degenerate faces may affect the quality of mesh generation, resulting in inaccurate calculation of local stress and strain. In addition, if the CAD model is used for numerical control machining, degenerate faces may cause errors in tool path generation. In processes such as model manufacturing, these incorrect faces may affect the forming accuracy of the mold, thereby affecting the product quality.
[0058] Commonly used methods for dealing with degenerate faces include geometric repair, topology reconstruction, model simplification, or using various professional 3D modeling software for repair. For example, in SolidWorks, new solid geometries can be created by establishing lines and deleting faces for processing. Such operations for geometric repair of complex solid models may require a large amount of manual interaction, with low efficiency and a high error rate. In addition, there are significant differences between the repaired model and the original input model in terms of geometric data and topological information, which may change the true information of the original CAD model.
[0059] Therefore, the present invention provides a solution for dealing with degenerate faces of a CAD model, which can automatically identify and process degenerate faces without modifying the original geometric data.
[0060] Refer to Figure 1As shown in the figure, an embodiment of the present invention discloses a method for processing degenerate surfaces of a CAD model, including:
[0061] Step S11: Import and repair the initial CAD model, and establish a watertight mesh data structure to obtain a composite surface including continuous surfaces and discrete surfaces.
[0062] In this embodiment, the model surface gaps of the initial CAD model are processed to obtain a target CAD model without surface gaps. It can be understood that the initial CAD model generated according to the degenerate surface processing requirements has gaps. In order to obtain accurate degenerate surface processing results, it is necessary to repair the surface gaps of the initial CAD model with gaps to obtain a target CAD model without surface gaps. It should be noted that generating the initial CAD model based on the actual parameter information of the part in the degenerate surface processing requirements is a conventional generation method, such as the reverse engineering method based on measurement data, the forward design method based on design parameters, and the hybrid design method combining the two, which are not specifically limited herein. The degenerate surface processing requirements can specifically be the degenerate surface processing requirements of parts, where the parts can be mechanical parts in different fields, such as parts with complex surfaces like automobile body parts and aircraft hulls, which are not specifically limited herein. For example: When the degenerate surface processing requirement is the degenerate surface processing requirement at the wing-body connection of an aircraft, all the wing parameters (airfoil data, planar shape, wing-body connection method), fuselage parameters (cross-sectional shape, connection area matching requirements), and connection area characteristic parameters of the wing-body connection of the aircraft are imported to generate the corresponding initial CAD model. The gaps of the initial CAD model at the wing-body connection of the aircraft are repaired to obtain a target CAD model without surface gaps at the wing-body connection of the aircraft.
[0063] Furthermore, the target CAD model is meshed and processed to obtain a composite surface that includes discrete surfaces and continuous surfaces. It can be understood that after the initial CAD model is repaired for gaps using the gap repair method to obtain the target CAD model, the watertight mesh data structure of the target CAD model is further generated through the watertight mesh generation method. Among them, the watertight mesh generation framework is a tool or method for constructing the data structure of the target CAD model. In the processing of the target CAD model, the mesh is a discrete representation of the model surface. A watertight mesh means that the connections between the meshes are tight and gapless, just like being sealed. This property is crucial for subsequent precise calculations and analyses. Using this framework to establish the data structure can organize each part of the target CAD model in an orderly and standardized manner, facilitating various subsequent operations on the model. Specifically, after establishing the data structure of the target CAD model through the watertight mesh generation framework, each obtained composite surface includes two parts: discrete surfaces and continuous surfaces. The discrete surface is obtained by discretizing the continuous surface and is composed of a series of discrete point, line, and surface elements. In subsequent degenerate surface processing, it is easier to perform operations on the discrete surface. The continuous surface is the part of the surface that maintains its original continuous characteristics and reflects the overall shape and geometric features of the surface. The discrete surface and the continuous surface cooperate with each other. The discrete surface provides a quantifiable basis for specific operations, and the continuous surface ensures the overall geometric properties of the surface, jointly constituting the composite surface and providing complete surface information for subsequent degenerate surface processing and analysis operations. For example: for the target CAD model at the wing-fuselage connection of an aircraft, its composite surface includes discrete surfaces and continuous surfaces. Among them, the continuous surfaces are: the theoretical shape of the wing (airfoil curve, twist surface), and the transition surface of the fuselage docking section. The discrete surfaces are the discretization of the continuous surface (such as the surface mesh required for CFD / structural analysis) and the supplementary mesh in the repaired gap area (such as the filling mesh at the wing-fuselage connection).
[0064] Step S12: Identify the degenerate surfaces of the composite surface to obtain the corresponding degenerate surface identification results.
[0065] In this embodiment, traverse the composite surface to obtain a patch recognition table constructed based on the information of each patch; determine a patch as the current patch according to the patch recognition order in the patch recognition table, and determine the first area information of the current patch; determine the second area information of the target patch adjacent to the current patch; according to the size relationship between the area ratio of the first area information and the second area information and a preset area ratio threshold, determine whether the current patch belongs to a completely degenerate surface; determine the next patch as the new current patch according to the patch recognition order, and jump to the step of determining the first area information of the current patch to obtain the degenerate surface recognition result of whether each patch belongs to a completely degenerate surface. It can be understood that by traversing the composite surface in the CAD model, checking its geometric and topological characteristics, and entering the judgment step of whether each patch is a completely degenerate surface, the specific judgment process is as follows: Calculate the first area ( ) of the current patch and the second area ( ) of its adjacent surface. If the area ratio ( or ) exceeds the preset area ratio threshold (such as 1:100), it is determined as a completely degenerate surface; obtain the completely degenerate surface recognition results of all patches according to the above steps. For example: For the target CAD model at the wing-body connection of an aircraft, identify the area where degenerate surfaces are likely to appear in the composite surface of the wing connection. Specifically, detect small-area patches (such as area ratio <1:100) at the connection between the wing and the skin to obtain the completely degenerate surface recognition result.
[0066] In this embodiment, traverse all the boundary edges of each patch and determine the included angle value between two boundary edges of each patch; if the included angle value is less than the preset angle tolerance, determine that the current patch is a partially degenerate surface; the partially degenerate surface includes normal boundary edges and candidate degenerate edges. It can be understood that for the corresponding patches identified as non-completely degenerate surfaces, a judgment step of whether they are partially degenerate surfaces is carried out. The specific judgment steps are as follows: Traverse all the boundary edges of the current patch and calculate the included angle values between two boundary edges; specifically, calculate the included angle value through the tangent vectors of the boundary edges (such as using the vector dot product formula). If the included angle value is less than the preset angle tolerance (such as 1°), determine that the current patch is a partially degenerate surface. For example: Calculate the included angle of the boundary edges of the leading edge surface of the wing (such as included angle <1°). Output the corresponding marked completely degenerate surface (such as redundant skin surface) or partially degenerate surface (such as micro-gap at the joint).
[0067] Step S13: If the degenerate surface in the composite surface is a completely degenerate surface, delete the completely degenerate surface, and fuse the adjacent edges of the target patch adjacent to the completely degenerate surface, so as to perform boundary topology reconstruction and stitching of the discrete grid data after reconstruction using the information of the fused surface to obtain the degenerate surface processing result.
[0068] In this embodiment, if the surface is a completely degenerate surface, as follows Figure 2 shown, the surface is a completely degenerate surface. Among them, a degenerate surface refers to a geometrically incomplete patch (such as the vertices of a triangular face being collinear), which is generally caused by incorrect operation parameters of stretching, rotating, or lofting in CAD modeling or geometric conflicts after Boolean operations. A completely degenerate surface is a current patch that has a huge difference in area ratio with adjacent faces and is approximately a single edge. When it is determined that the surface is a completely degenerate surface, first delete the surface . After deletion, the edge ac of the target patch and the edge bd of the target patch are free edges and also adjacent edges. To repair the topological relationship and maintain geometric consistency, they need to be reconnected to repair the topological relationship. Specifically, fuse the ac edge and the bd edge to obtain a virtual super-edge. It should be noted that a virtual super-edge is a virtual edge used to represent the fusion result of two adjacent edges. It does not directly modify the original geometric data but merges two adjacent edges into a logical unit through a virtual topological relationship. The underlying data of this virtual super-edge is based on bd or ac. That is, when generating the virtual super-edge, select one of the edges (such as bd or ac) as the main edge of the underlying data. For example, if bd is selected as the main edge, the geometric data (such as node coordinates and parameterization information) of the virtual super-edge is based on bd, and the data of the ac edge is mapped onto bd. As Figure 3 shown, after deleting the completely degenerate surface, the two exposed edges are: Edge ac: starting point a, ending point c. Edge bd: starting point b, ending point d. Operation process: Fuse edge ac and edge bd to generate a virtual super-edge. Assume that bd is selected as the main edge, then the geometric data of the virtual super-edge is based on bd. The dashed line in the figure is the generated virtual super-edge. For example: The treatment of the completely degenerate surface of the wing skin is to remove the redundant completely degenerate surface on the wing surface, and fuse the adjacent edges (such as edge ac and bd) exposed after deletion of the patch into a virtual super-edge, with the underlying data based on the main load-bearing edge (such as the wing main beam edge bd).
[0069] In this embodiment, reconstruct the boundary topological relationship of the target patch according to the virtual super-edge and super-point obtained by fusion, and uniformly process the distribution information of each discrete point of the target adjacent edge in the reconstructed boundary topological relationship to obtain each target discrete point; perform alignment processing and edge merging processing on the target discrete points of the two target adjacent edges to obtain updated discrete grid data as the processing result of the degenerate surface.
[0070] Among them, reconstructing the boundary topological relationship of the target patch according to the virtual super - edges and super - points obtained by fusion includes: generating super - points by using the virtual super - edges obtained by fusion and the geometric data associated with the virtual super - edges; reconstructing the boundary topological relationship of the target patch after deleting the completely degenerate face by using the virtual super - edges and the super - points to obtain the reconstructed boundary topological relationship. It can be understood that after generating the virtual super - edges, two new super - points are further generated. It should be noted that a super - point is a virtual point used to represent the logical fusion of multiple geometric points. It does not directly modify the original geometric data but combines multiple points into a logical unit through virtual topological relationships. Therefore, in this embodiment, one of the generated super - points is associated with two points a and b, and the other super - point is associated with two points c and d. Then, the boundary topological relationship of the target patch after deleting the completely degenerate face is reconstructed by using the generated virtual super - edges and super - points. In this way, by generating virtual super - edges and super - points, the free edges (such as ac and bd) exposed after deleting the degenerate face are repaired, ensuring the integrity of the model's topological relationship. In this way, the virtual super - edges and super - points do not modify the original geometric data but achieve the fusion of edges and the association of points through virtual topological relationships, avoiding the loss or deformation of geometric information. Fusing two adjacent edges into a virtual super - edge simplifies the model's topological structure and facilitates subsequent processing. In the process of dealing with the completely degenerate face of the wing skin, the steps for generating super - points are as follows: One super - point is associated with the leading - edge points a and b of the wing to ensure the continuity of the aerodynamic shape. Another super - point is associated with the trailing - edge points c and d of the wing to maintain topological symmetry.
[0071] As Figure 3 shown, the first super - point: associates point a and point b, indicating their topological consistency. The second super - point: associates point c and point d, indicating their topological consistency. The virtual super - edge represents the fusion result of edge ac and edge bd, with the underlying data mainly based on bd. The two super - points are respectively associated with the starting points (a and b) and the ending points (c and d) to ensure the correctness of the topological relationship. Based on the above - mentioned virtual super - edges, super - points, and the target patch after removing the completely degenerate face, reconstruct the target patch and the target patch 's boundary topological relationship, update the boundary topological data of the two surfaces. As Figure 4 shown, the boundary of surface is updated to ef - fc - edge - be, and the boundary of surface is updated to edge - dh - hg - gb.
[0072] In this embodiment, the unified processing of the distribution information of each discrete point of the target adjacent edges in the reconstructed boundary topological relationship to obtain each target discrete point includes: performing synchronous discrete processing on the discrete point distribution of each discrete point of the target adjacent edges in the reconstructed boundary topological relationship, so as to refresh the current discrete points of the target adjacent edges to the same distribution, and taking each of the current discrete points as each target discrete point of the target adjacent edges. It can be understood that based on the reconstructed boundary topological relationship, the target adjacent edges on the updated surface are determined. To achieve seamless connection, it is necessary to ensure that the discrete grid nodes on these two edges have a consistent distribution. Therefore, synchronous discrete processing is performed on the discrete point distribution of the target adjacent edges to refresh the current discrete points of the two target adjacent edges to the same distribution, and target discrete points are obtained. As follows Figure 5 shown: Reparameterize the discrete points on the two target adjacent edges, adjust the number and spacing of the discrete points, so that the discrete point distributions (such as the number, position, density) of the two target adjacent edges are exactly the same. For example: If the target adjacent edge ac originally had 10 discrete points and the target adjacent edge bd originally had 8 discrete points, then through interpolation or deletion, both edges use the same number of target discrete points (such as: unified to 9), and ensure that the spacing of the target discrete points is distributed in the same proportion. Force-align the point coordinates of the adjusted target discrete points. For example, the th discrete point of the target adjacent edge ac corresponds geometrically to the th discrete point of the target adjacent edge bd to avoid position deviation. This forced alignment process can be implemented based on the equal arc length segmentation or equal parameter segmentation algorithm of a parametric curve (such as a B-spline). Then merge one target adjacent edge after forced alignment into the other target adjacent edge to complete the merging process of the target discrete points, that is, complete the merging process of the discrete geometry on the edge. For the processing of the completely degenerate surface of the wing skin, the node distribution of the discrete grid in the process is: Refresh the discrete points (such as the wing leading edge nodes) on the virtual super edge to the same density to ensure a uniform aerodynamic grid.
[0073] Further, after completing the merging of the discrete geometry on the edge, perform a connection operation on the discrete geometry on the two surfaces, as follows Figure 6 shown, first fuse the corresponding boundary points of the two surfaces; then take one of the surfaces as the first surface, use the boundary grid on the first surface as the reference, take the other surface as the second surface, insert corresponding grid points in the discrete grid on the second surface and perform edge segmentation operations; then use the boundary grid on the second surface as the reference, insert corresponding grid points in the discrete grid on the first surface and perform edge segmentation operations; finally, suture the corresponding grid points of the first surface and the second surface to complete the update operation of the discrete grid data. At this point, the deletion operation of the completely degenerate surface is completed, the modification of the surrounding topological relationship is completed, and the update of the discrete geometry on the virtual surface is also completed.
[0074] Step S14: If the degenerate surface in the composite surface is a partially degenerate surface, the area where the partially degenerate surface is located is trimmed, and the trimmed area is converted into a completely degenerate surface, and the step of deleting the completely degenerate surface is executed.
[0075] In this embodiment, as Figure 7 shown, Figure 7 is a schematic diagram of a partially degenerate surface. Among them, a partially degenerate surface refers to a surface where the distance between some boundaries inside the surface is extremely small, but the overall area is not much different from the surrounding surfaces. The trimming process of the area where the partially degenerate surface is located includes: calculating the distance information between the corresponding points of the candidate degenerate edges of the same partially degenerate surface under the same parameters to determine the boundary edge spacing of the candidate degenerate edges; if the boundary edge spacing is less than the preset edge margin tolerance, it is determined that the area between the candidate degenerate edges in the candidate degenerate surface is the area to be trimmed, and the area to be trimmed is trimmed. It can be understood that the area to be trimmed is first determined. Specifically, the boundary edges corresponding to the included angle values less than the preset included angle tolerance are found from each boundary edge in the partially degenerate surface as the candidate degenerate edges, and the distance between two candidate degenerate edges is calculated. The method for calculating the distance between two edges is as follows: calculate the distance between the discrete point pairs under the same parameter u between two candidate degenerate edges. u = 0 represents the head end of the edge, 1 represents the tail end of the edge, 0.5 represents the midpoint of the edge, and so on. The average distance between these distances is used as the boundary edge spacing between two candidate degenerate edges. Among them, the calculation formula for the boundary edge spacing of the candidate degenerate edge is as follows:
[0076] ;
[0077] Among them, represents the distance between the discrete point pairs on the th candidate degenerate edge, represents the number of discrete point pairs.
[0078] If the boundary edge spacing between two edges in a certain surface is less than the specified preset edge margin tolerance, the area to be trimmed is the area enclosed by these two edges. As Figure 8 shown, when the discrete point pair distance between the two candidate degenerate edges calculated based on the discrete point pairs and the candidate degenerate edge is calculated, and after the boundary edge spacing calculated based on is less than the specified preset edge margin tolerance, then the area enclosed by the two candidate degenerate edges and the candidate degenerate edge is the area to be trimmed.
[0079] Furthermore, as Figure 9 shown, judge the candidate degenerate edge Whether the length gap with the candidate degenerate edge is too large. Specifically, take the length difference between the candidate degenerate edge and the candidate degenerate edge as the target length. If the target length is greater than the preset length threshold, it is determined that the length gap between the two is too large, and then the long side needs to be segmented so that the length of the long side after cutting is almost the same as that of the short side. At this time, after cutting is updated to be connected to and has the same length as . Then, two boundary edges ( and the cut ) are removed from the current surface, and then the remaining edges are combined into a loop. Specifically, as shown in Figure 10 , after deleting edge ef and edge fg, the remaining edges de, gh, ha, ab, bd, de are combined into a loop. Among them, a new superpoint object m is generated during the process of combining into a loop to fuse endpoint e and endpoint g. In this way, edge de and edge gh will share an endpoint m, as shown in Figure 11 .
[0080] After cutting part of the degenerate surface, update the surrounding topological relationship, specifically as shown in Figure 12 . After cutting the part of the degenerate surface , the cut surface is the completely degenerate surface. Then, it will be processed and the adjacent relationship of the surrounding surfaces will be updated according to the processing method of the aforementioned completely degenerate surface. After the processing of the above steps, the topological relationship between the virtual surfaces is updated to maintain the correctness of the model topological relationship. At the same time, the discrete grids on the virtual surfaces are also updated correspondingly, so that the discrete grids on the processed virtual surfaces are also connected seamlessly to each other.
[0081] It can be seen that the present application discloses a method for processing degenerate surfaces of a CAD model, including: importing and repairing an initial CAD model, establishing a watertight mesh data structure to obtain a composite surface including continuous surfaces and discrete surfaces; identifying degenerate surfaces of the composite surface to obtain corresponding degenerate surface identification results; if the degenerate surface in the composite surface is a completely degenerate surface, deleting the completely degenerate surface and fusing the adjacent edges of the target patches adjacent to the completely degenerate surface, so as to perform boundary topology reconstruction and stitching of the discrete mesh data after reconstruction using the surface information after fusion to obtain a degenerate surface processing result; if the degenerate surface in the composite surface is a partially degenerate surface, performing a cutting process on the area where the partially degenerate surface is located, converting the cut area into a completely degenerate surface, and executing the step of deleting the completely degenerate surface. Thus, by repairing the initial CAD model and establishing a watertight mesh data structure, a composite surface including continuous surfaces and discrete surfaces can be obtained. In this way, by further processing the composite surface, the processing of virtual surface information can be realized, and the processing of degenerate surfaces can be realized without processing the original geometric information. Moreover, this solution identifies completely degenerate surfaces and partially degenerate surfaces, and then performs targeted processing on degenerate surfaces of different degenerate surface types, improving the quality of mesh generation, reducing the scale of mesh generation, and enhancing the accuracy and reliability of CAE analysis and calculation.
[0082] Referring to Figure 13 as shown, the present invention also correspondingly discloses a device for processing degenerate surfaces of a CAD model, including:
[0083] A structure establishment module 11, configured to import and repair an initial CAD model, establish a watertight mesh data structure to obtain a composite surface including continuous surfaces and discrete surfaces;
[0084] A degenerate surface identification module 12, configured to identify degenerate surfaces of the composite surface to obtain corresponding degenerate surface identification results;
[0085] A first processing module 13, configured to, if the degenerate surface in the composite surface is a completely degenerate surface, delete the completely degenerate surface and fuse the adjacent edges of the target patches adjacent to the completely degenerate surface, so as to perform boundary topology reconstruction and stitching of the discrete mesh data after reconstruction using the surface information after fusion to obtain a degenerate surface processing result;
[0086] A second processing module 14, configured to, if the degenerate surface in the composite surface is a partially degenerate surface, perform a cutting process on the area where the partially degenerate surface is located, convert the cut area into a completely degenerate surface, and execute the step of deleting the completely degenerate surface.
[0087] It can be seen that the present application discloses importing and repairing an initial CAD model, establishing a watertight mesh data structure to obtain a composite surface including continuous surfaces and discrete surfaces; identifying degenerate surfaces for the composite surface to obtain corresponding degenerate surface identification results; if the degenerate surface in the composite surface is a completely degenerate surface, deleting the completely degenerate surface and fusing the adjacent edges of the target patches adjacent to the completely degenerate surface, so as to perform boundary topology reconstruction and stitching of the discrete mesh data after reconstruction using the information of the fused surface to obtain a degenerate surface processing result; if the degenerate surface in the composite surface is a partially degenerate surface, performing a cutting process on the area where the partially degenerate surface is located, converting the cut area into a completely degenerate surface, and executing the step of deleting the completely degenerate surface. Thus, by repairing the initial CAD model and establishing a watertight mesh data structure, a composite surface including continuous surfaces and discrete surfaces can be obtained. In this way, by further processing the composite surface, the processing of virtual surface information can be realized, and the processing of degenerate surfaces can be realized without processing the original geometric information. Moreover, this solution identifies completely degenerate surfaces and partially degenerate surfaces, and then performs targeted processing on degenerate surfaces of different degenerate surface types, improving the quality of mesh generation, reducing the scale of mesh generation, and enhancing the accuracy and reliability of CAE analysis and calculation.
[0088] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 14 which is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure should not be regarded as any limitation on the scope of use of the present application.
[0089] Figure 14 This is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the degenerate surface processing method of the CAD model disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0090] In this embodiment, the power supply 23 is used to provide working voltages for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0091] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for the rendering and drawing of the content to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0092] In addition, as a carrier for resource storage, the memory 22 may be a read-only memory, a random access memory, a disk, or an optical disc, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be transient storage or permanent storage.
[0093] Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21. It may be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the degenerated surface processing method of the CAD model executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program that can be used to complete other specific tasks. The data 223 may include not only the data transmitted by external devices received by the electronic device, but also the data collected by its own input / output interface 25, etc.
[0094] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the degenerated surface processing method of the CAD model disclosed above is implemented. For the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.
[0095] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method section.
[0096] Those skilled in the art can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application. The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disk, removable disk, CD-ROM (Compact Disc-Read Only Memory), or any other form of storage medium known in the technical field.
[0097] Finally, it should also be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article, or device comprising the element.
[0098] The above has introduced the solution provided by the present invention in detail. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for processing degenerate surfaces of a CAD model, characterized in that Including: Import and repair the initial CAD model, establish a watertight mesh data structure to obtain a composite surface containing continuous and discrete surfaces; Identify degenerate surfaces of the composite surface to obtain corresponding degenerate surface identification results; If the degenerate surface in the composite surface is a completely degenerate surface, delete the completely degenerate surface and fuse the adjacent edges of the target patches adjacent to the completely degenerate surface, so as to perform boundary topology reconstruction and stitching of the discrete mesh data after reconstruction using the information of the fused surface to obtain a degenerate surface processing result; If the degenerate surface in the composite surface is a partially degenerate surface, perform a cutting process on the area where the partially degenerate surface is located, convert the cut area into a completely degenerate surface, and execute the step of deleting the completely degenerate surface; The performing boundary topology reconstruction and stitching of the discrete mesh data after reconstruction using the information of the fused surface to obtain a degenerate surface processing result includes: Reconstruct the boundary topology relationship of the target patch according to the virtual superedges and superpoints obtained by fusion, and uniformly process the distribution information of each discrete point of the target adjacent edges in the reconstructed boundary topology relationship to obtain each target discrete point; Perform alignment processing and edge merging processing on the target discrete points of the two target adjacent edges to obtain the updated discrete mesh data as the degenerate surface processing result; The reconstructing the boundary topology relationship of the target patch according to the virtual superedges and superpoints obtained by fusion includes: Generate superpoints using the virtual superedges obtained by fusion and the geometric data associated with the virtual superedges; Reconstruct the boundary topology relationship of the target patch after deleting the completely degenerate surface using the virtual superedges and the superpoints to obtain the reconstructed boundary topology relationship; The uniformly processing the distribution information of each discrete point of the target adjacent edges in the reconstructed boundary topology relationship to obtain each target discrete point includes: Perform synchronous discretization processing on the discrete point distributions of each discrete point of the target adjacent edges in the reconstructed boundary topology relationship to refresh the current discrete points of the target adjacent edges to the same distribution, and use each of the current discrete points as each target discrete point of the target adjacent edges.
2. The method for processing the degenerate surface of a CAD model according to claim 1, wherein The identifying degenerate surfaces of the composite surface to obtain corresponding degenerate surface identification results includes: Traverse the composite surface to obtain a patch identification table constructed based on the information of each patch; Determine a patch as the current patch according to the patch identification order in the patch identification table, and determine the first area information of the current patch; Determine the second area information of the target patch adjacent to the current patch; Judge whether the current patch belongs to a completely degenerate surface according to the size relationship between the area ratio of the first area information and the second area information and a preset area ratio threshold; Determine the next patch as the new current patch according to the patch identification order, and jump to the step of determining the first area information of the current patch to obtain the degenerate surface identification results of whether each patch belongs to a completely degenerate surface.
3. The method for processing the degenerate surface of a CAD model according to claim 1, characterized in that, The identifying degenerate surfaces of the composite surface to obtain corresponding degenerate surface identification results includes: Traverse all the boundary edges of each patch and determine the included angle value between two boundary edges of each patch; If the included angle value is less than a preset included angle tolerance, it is determined that the current patch is a partially degenerate surface; the partially degenerate surface includes normal boundary edges and candidate degenerate edges.
4. The method for processing degenerate surfaces of a CAD model according to claim 3, wherein The clipping process of the area where the partially degenerate surface is located includes: Calculating the distance information between the corresponding points of the candidate degenerate edges of the same partially degenerate surface under the same parameters to determine the boundary edge spacing of the candidate degenerate edges; If the boundary edge spacing is less than a preset edge spacing tolerance, it is determined that the area between the candidate degenerate edges in the candidate degenerate surface is the area to be clipped, and the area to be clipped is clipped.
5. A device for processing degenerate surfaces of a CAD model, characterized in that, Including: A structure building module for importing and repairing an initial CAD model and building a watertight grid data structure to obtain a composite surface including continuous surfaces and discrete surfaces; A degenerate surface recognition module for recognizing degenerate surfaces in the composite surface to obtain corresponding degenerate surface recognition results; A first processing module for, if the degenerate surface in the composite surface is a completely degenerate surface, deleting the completely degenerate surface and fusing the adjacent edges of the target patch adjacent to the completely degenerate surface, so as to perform boundary topology reconstruction and stitching of the discrete grid data after reconstruction using the surface information after fusion to obtain a degenerate surface processing result; A second processing module for, if the degenerate surface in the composite surface is a partially degenerate surface, clipping the area where the partially degenerate surface is located, converting the clipped area into a completely degenerate surface, and performing the step of deleting the completely degenerate surface; The first processing module is specifically used to reconstruct the boundary topology relationship of the target patch according to the virtual super edges and super points obtained by fusion, and uniformly process the distribution information of each discrete point of the target adjacent edges in the reconstructed boundary topology relationship to obtain each target discrete point; performing alignment processing and edge merging processing on the target discrete points of the two target adjacent edges to obtain updated discrete grid data as the degenerate surface processing result; The degenerate surface processing device is specifically used to generate super points by using the virtual super edges obtained by fusion and the geometric data associated with the virtual super edges; Reconstructing the boundary topology relationship of the target patch after deleting the completely degenerate surface by using the virtual super edges and the super points to obtain a reconstructed boundary topology relationship; performing synchronous discretization processing on the discrete point distribution of each discrete point of the target adjacent edges in the reconstructed boundary topology relationship to refresh the current discrete points of the target adjacent edges to the same distribution, and using each of the current discrete points as each target discrete point of the target adjacent edges.
6. An electronic device, characterized in that, Including: A memory for storing a computer program; A processor for executing the computer program to implement the steps of the method for processing degenerate surfaces of a CAD model according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by a processor, the steps of the method for processing degenerate surfaces of a CAD model according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Superalloy solid freeform fabrication and repair with preforms of metal and flux
CN105939813A
Curved surface defect repairing method for complex curved surface offset
CN115879220A