Disclosure of Invention
In view of the above, the present invention aims to provide a method, an apparatus, a device and a medium for processing a degradation surface of a CAD model, which can automatically identify and process the degradation surface without modifying the original geometric data. The specific scheme is as follows:
in a first aspect, the application discloses a method for processing a degradation surface of a CAD model, which comprises the following steps:
Importing and repairing an initial CAD model, and establishing a watertight grid data structure to obtain a composite curved surface comprising a continuous curved surface and a discrete curved surface;
Carrying out degradation surface identification on the composite curved surface to obtain a corresponding degradation surface identification result;
if the degradation surface in the composite curved surface is a complete degradation surface, deleting the complete degradation surface, fusing adjacent edges of a target surface sheet adjacent to the complete degradation surface, and performing boundary topology reconstruction and stitching of discrete grid data after reconstruction by using fused curved surface information to obtain a degradation surface processing result;
and if the degradation surface in the composite curved surface is a partial degradation surface, cutting the area where the partial degradation surface is located, converting the cut area into a complete degradation surface, and executing the step of deleting the complete degradation surface.
Optionally, the performing degradation surface recognition on the composite curved surface to obtain a corresponding degradation surface recognition result includes:
traversing the composite curved surface to obtain a patch identification table constructed based on the patch information;
Determining a face as a current face according to the face identification sequence in the face identification table, and determining first area information of the current face;
Determining second area information of a target patch adjacent to the current patch;
judging whether the current front sheet belongs to a completely degraded surface or not according to the size relation between the area ratio of the first area information and the second area information and a preset area ratio threshold value;
And determining the next patch as a new current patch according to the patch identification sequence, and jumping to the step of determining the first area information of the current patch so as to acquire a degradation surface identification result of whether each patch belongs to a complete degradation surface.
Optionally, the performing degradation surface recognition on the composite curved surface to obtain a corresponding degradation surface recognition result includes:
traversing all boundary edges of each panel, and determining an included angle value between two boundary edges of each panel;
And if the included angle value is smaller than a preset included angle tolerance, judging that the current front sheet is a partial degradation surface, wherein the partial degradation surface comprises a normal boundary edge and a candidate degradation edge.
Optionally, the clipping the area where the part of the degradation surface is located includes:
Calculating distance information between corresponding points of the candidate degradation edges of the same partial degradation surface under the same parameters to determine boundary edge spacing of the candidate degradation edges;
and if the boundary edge distance is smaller than the preset edge distance tolerance, judging that the region between the candidate degradation edges in the candidate degradation surface is a region to be cut, and cutting the region to be cut.
Optionally, the performing boundary topology reconstruction by using the fused curved surface information and stitching the reconstructed discrete grid data to obtain a degraded surface processing result includes:
Reconstructing the boundary topological relation of the target surface patch according to the virtual supersides and the superpoints obtained by fusion, and uniformly processing the distribution information of each discrete point of the target adjacent sides in the reconstructed boundary topological relation to obtain each target discrete point;
And carrying out alignment processing and edge merging processing on the target discrete points of the two target adjacent edges to obtain updated discrete grid data as a degradation surface processing result.
Optionally, the reconstructing the boundary topological relation of the target patch according to the virtual superside and the superpoint obtained by fusion includes:
generating a superpoint by utilizing the virtual superside obtained by fusion and the geometric data associated with the virtual superside;
And reconstructing the boundary topological relation of the target surface patch after deleting the completely degraded surface by utilizing the virtual supersides and the superpoints to obtain the reconstructed boundary topological relation.
Optionally, the uniformly processing the distribution information of each discrete point of the target adjacent edge in the reconstructed boundary topological relation to obtain each target discrete point includes:
And carrying out synchronous discrete processing on the discrete point distribution of each discrete point of the target adjacent side in the reconstructed boundary topological relation so as to refresh the current discrete points of the target adjacent side into the same distribution, and taking each current discrete point as each target discrete point of the target adjacent side.
In a second aspect, the present application discloses a degenerate surface processing device for a CAD model, comprising:
the structure building module is used for importing and repairing the initial CAD model, and building a watertight grid data structure so as to obtain a composite curved surface comprising a continuous curved surface and a discrete curved surface;
The degradation surface identification module is used for carrying out degradation surface identification on the composite curved surface so as to obtain a corresponding degradation surface identification result;
The first processing module is used for deleting the completely degraded surface if the degraded surface in the composite curved surface is the completely degraded surface, fusing adjacent edges of the target surface sheet adjacent to the completely degraded surface, and performing boundary topology reconstruction and stitching of the reconstructed discrete grid data by utilizing the fused curved surface information so as to obtain a degraded surface processing result;
and the second processing module is used for cutting the area where the partial degradation surface is located if the degradation surface in the composite curved surface is the partial degradation surface, converting the cut area into a complete degradation surface, and executing the step of deleting the complete degradation surface.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the above disclosed method for processing a degenerate surface of a CAD model.
In a fourth aspect, the present application discloses a computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of the above disclosed method for processing a degenerate surface of a CAD model.
The application discloses a degradation surface processing method of a CAD model, which comprises the steps of importing and repairing an initial CAD model, establishing a watertight grid data structure to obtain a composite surface comprising a continuous surface and a discrete surface, carrying out degradation surface identification on the composite surface to obtain a corresponding degradation surface identification result, deleting the complete degradation surface if the degradation surface in the composite surface is the complete degradation surface, fusing adjacent edges of a target surface adjacent to the complete degradation surface, carrying out boundary topology reconstruction by utilizing fused back surface information, and stitching discrete grid data after reconstruction to obtain a degradation surface processing result, and carrying out cutting processing on an area where the partial degradation surface is located if the degradation surface in the composite surface is the partial degradation surface, converting the cut area into the complete degradation surface, and executing the step of deleting the complete degradation surface. Therefore, the composite curved surface comprising the continuous curved surface and the discrete curved surface can be obtained by repairing the initial CAD model and establishing the watertight grid data structure, so that the virtual surface information is processed by further processing the composite curved surface, and the degradation surface can be processed without processing the original geometric information.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In CAD models, degradation surface problems often originate from the scenario 1. In the actual modeling process, the user may set unsuitable parameters during stretching, rotation, lofting, etc. For example, when stretching a two-dimensional profile, degradation of the profile may occur after stretching if the lines of the profile are not closed or if there is self-intersection. In lofting operations, if the guideline or cross-sectional profile is not properly set, it is also likely to cause degradation of the resulting model. 2. Boolean operations between entities are also one of the common causes of degradation. When performing union, difference and intersection operations on two or more entities, if the geometric relationship between the entities is complex, the boundary conditions are unclear, some facets that cannot be processed correctly may appear, and thus a degenerate surface may be formed. When the CAD model performs data conversion between different software, the model machine and information can be lost or deformed due to the differences of geometric kernels, data formats, precision and the like of the different software. For example, when converting from one CAD software format (e.g., pro/E file format) to another CAD software format (e.g., solidWorks file format), some complex curved or thin-shell structures may exhibit degenerate surfaces. When CAD models are converted from high-precision to low-precision formats, the geometry may be simplified to create a degenerate surface in order to accommodate new data structures and precision requirements.
The presence of the degradation surface problem may lead to a decrease in the geometric accuracy of the model. These outliers may lead to erroneous results when performing accurate dimensioning, measurement or model-based engineering analysis (finite element analysis). For example, in finite element analysis, the degradation surface may affect the quality of meshing, resulting in inaccurate local stress, strain calculations. Furthermore, if CAD models are used for numerical control machining, degraded surfaces may lead to tool path generation errors. In the process of model manufacturing, these erroneous surfaces may affect the molding accuracy of the mold, and thus the product quality.
Common degradation surface treatment modes include geometric repair, topology reconstruction, model simplification or repair by using various professional three-dimensional modeling software. For example, in SolidWorks, new solid geometry may be created for processing by creating lines, deleting facets, etc. The geometric repair of the operation pair and the complex entity model can require a large amount of manual interaction, the efficiency is low, the error rate is high, in addition, huge differences exist between the repaired model and the input original model geometric data and topology information, and the actual information of the original CAD model can be changed.
Therefore, the invention provides a degradation surface processing scheme of a CAD model, which can automatically identify and process degradation surfaces on the premise of not modifying original geometric data.
Referring to fig. 1, an embodiment of the invention discloses a method for processing a degradation surface of a CAD model, which includes:
And S11, importing and repairing the initial CAD model, and establishing a watertight grid data structure to obtain a composite curved surface comprising a continuous curved surface and a discrete curved surface.
In this embodiment, a model surface gap processing is performed on an initial CAD model to obtain a target CAD model without a surface gap. It is to be understood that, in order to obtain an accurate degradation surface processing result, a curved surface gap repair process needs to be performed on the initial CAD model with a gap to obtain a target CAD model without a curved surface gap, and it should be noted that, generation of the initial CAD model based on actual parameter information of a part in the degradation surface processing requirement is a conventional generation means, such as a reverse engineering method based on measurement data, a forward design method based on design parameters, and a hybrid design method combining the two, which are not limited specifically. The degradation surface processing requirement may specifically be a part degradation surface processing requirement, where the part may be a mechanical part in different fields, such as a part with a complex curved surface, for example, an automobile body part, an aircraft shell, and the like, and this is not limited specifically. For example, when the degradation surface processing requirement is the degradation surface processing requirement of the aircraft wing-body junction, all wing parameters (airfoil data, plane shape, wing-body junction mode), body parameters (section shape, junction area matching requirement) and junction characteristic parameters of the aircraft wing-body junction are imported to generate a corresponding initial CAD model. And performing gap repair on the initial CAD model at the connection position of the aircraft wing and the aircraft body to obtain a target CAD model at the connection position of the aircraft wing and the aircraft body without curved gaps.
Further, grid division and generation processing are carried out on the target CAD model so as to obtain a composite curved surface comprising a discrete curved surface and a continuous curved surface. It can be understood that when the initial CAD model performs the gap repair in the gap repair manner, after the target CAD model is obtained, the watertight grid data structure of the target CAD model is further generated by the watertight grid generating method, where the watertight grid generating frame is a tool or method for constructing the data structure of the target CAD model, and in the processing of the target CAD model, the grid is a discretized representation of the model surface. Watertight grid means that the connection between the grids is tight, free of gaps, as well as sealed, a property that is critical for subsequent accurate calculations and analysis. By using the framework to build the data structure, each part of the target CAD model can be organized in an orderly and standard mode, so that various subsequent operations on the model are facilitated. Specifically, after the data structure of the target CAD model is established through the watertight grid generating frame, each obtained composite curved surface comprises a discrete curved surface and a continuous curved surface. The discrete curved surface is obtained by discretizing a continuous curved surface and consists of a series of discrete points, lines and surface elements. In the subsequent degradation surface treatment, the discrete curved surface is easier to operate, and the continuous curved surface is a curved surface part which keeps the original continuous characteristic and reflects the overall shape and geometric characteristics of the curved surface. The discrete curved surface and the continuous curved surface are matched with each other, the discrete curved surface provides a quantifiable basis for specific operation, the continuous curved surface ensures the overall geometric attribute of the curved surface, the composite curved surface is formed together, and complete curved surface information is provided for subsequent operations such as degradation surface processing analysis and the like. For example, for a target CAD model of an aircraft wing-fuselage junction, the composite curved surface comprises a discrete curved surface and a continuous curved surface, wherein the continuous curved surface is a wing theoretical shape (an airfoil curve and a torsion curved surface) or a transition curved surface of a fuselage butt joint section. The discrete curved surface is a discretization of a continuous curved surface (such as a surface grid required by CFD/structural analysis), and a repaired gap region supplement grid (such as a filling grid at a wing-body joint).
And step S12, carrying out degradation surface identification on the composite curved surface to obtain a corresponding degradation surface identification result.
In this embodiment, the composite curved surface is traversed to obtain a patch identification table constructed based on each piece of patch information, a patch is determined as a current patch according to a patch identification sequence in the patch identification table, first area information of the current patch is determined, second area information of a target patch adjacent to the current patch is determined, whether the current patch belongs to a completely degraded surface is judged according to a size relation between an area ratio of the first area information to the second area information and a preset area ratio threshold, a next patch is determined as a new current patch according to the patch identification sequence, and the step of determining the first area information of the current patch is skipped to obtain a degraded surface identification result of whether each patch belongs to the completely degraded surface. It can be understood that traversing the composite curved surface in the CAD model, checking the geometric and topological characteristics of the composite curved surface, and entering the step of judging whether each surface piece is a completely degraded surface or not, wherein the specific judging process is as follows, calculating the first area of the current surface piece) A second area of the adjacent surface). If the area ratio is [ ]Or (b)) And if the area ratio exceeds a preset area ratio threshold (such as 1:100), judging that the area is a completely degraded surface, and acquiring the completely degraded surface identification results of all the patches according to the steps. For example, for a target CAD model of an aircraft wing-body junction, identifying an area in a composite curved surface where a degradation surface is likely to occur at the wing junction, specifically, detecting a small area patch (such as an area ratio < 1:100) at the wing-skin junction, so as to obtain a complete degradation surface identification result.
In the embodiment, all boundary edges of each panel are traversed, an included angle value between two boundary edges of each panel is determined, if the included angle value is smaller than a preset included angle tolerance, the current panel is judged to be a partial degradation surface, and the partial degradation surface comprises a normal boundary edge and a candidate degradation edge. It can be understood that the step of judging whether the corresponding surface piece identified as the incompletely degraded surface is a partially degraded surface is performed, specifically, the step of judging includes traversing all boundary edges of the current surface piece, calculating an included angle value between every two boundary edges, specifically calculating the included angle value through tangent vectors of the boundary edges (for example, using a vector dot product formula), and judging that the current surface piece is a partially degraded surface if the included angle value is smaller than a preset included angle tolerance (for example, 1 °). For example, calculating the included angle (such as included angle <1 °) of the boundary edge of the wing leading edge curved surface. The corresponding marked completely degraded surface (such as redundant skin surface) or partially degraded surface (such as micro-gap at the joint) is output.
And S13, if the degradation surface in the composite curved surface is a complete degradation surface, deleting the complete degradation surface, fusing adjacent edges of the target surface sheet adjacent to the complete degradation surface, and performing boundary topology reconstruction and stitching of discrete grid data after reconstruction by using the fused curved surface information to obtain a degradation surface processing result.
In this embodiment, if the curved surface is a completely degraded surface, as shown in FIG. 2 belowIs a completely degenerated surface. The degenerate surface refers to a geometrically incomplete surface patch (such as the vertex collineation of a triangle surface), and is generally stretching, rotating, lofting operation parameter errors in CAD modeling or geometric conflicts after Boolean operation. The fully degraded surface is the current surface piece which is similar to one side and has a large area ratio with the adjacent surface. When the curved surface is determined to be the completely degraded surface, the curved surface is firstly processedAnd performing a deleting operation. Target patch after deletionIs connected with the target surface sheetThe edge bd of (a) is a free edge and is an adjacent edge, in order to repair the topological relation and maintain the geometric consistency, the two adjacent edges are required to be reconnected to repair the topological relation, specifically, the ac edge and the bd edge are fused to obtain a virtual superedge, and note that the virtual superedge is a virtual edge used for representing the fusion result of the two adjacent edges, and the two adjacent edges are combined into a logic unit through the virtual topological relation without directly modifying the original geometric data. The virtual superside underlying data is based on bd or ac, that is, when generating the virtual superside, one of the edges (such as bd or ac) is selected 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 parameterized information) of the virtual superside is based on bd, and the data of the ac edge is mapped onto bd. As shown in FIG. 3, when the fully degraded surface is deleted, the two exposed edges are edge ac, starting point a and ending point c. Edge bd, starting point b, ending point d. The operation process is that the edge ac and the edge bd are fused to generate the virtual superedge. Assuming bd is selected as the primary side, the geometric data of the virtual superside is subject to bd. The dotted line in the figure is the generated virtual superside. For example, the processing of the completely degraded surface of the wing skin is to remove the redundant completely degraded surface of the wing surface, and the adjacent edges (such as the edges ac and bd) exposed by the deleted back piece are fused into virtual superficially edges, and the bottom layer data is based on the main bearing edge (such as the main girder edge bd of the wing).
In the embodiment, the boundary topological relation of the target surface patch is reconstructed according to the virtual supersides and the superpoints obtained by fusion, the distribution information of each discrete point of the target adjacent sides in the reconstructed boundary topological relation is uniformly processed to obtain each target discrete point, and the target discrete points of the two target adjacent sides are aligned and combined to obtain updated discrete grid data as a degradation surface processing result.
The method comprises the steps of generating the superpoints by utilizing the geometric data associated with the virtual supersides obtained by fusion, and reconstructing the boundary topological relation of the target surface patch after deleting the completely degraded surface by utilizing the virtual supersides and the superpoints to obtain the reconstructed boundary topological relation. It will be appreciated that after generating the virtual superedge, two new superpoints are further generated, and it should be noted that a superpoint is a virtual point that represents a logical fusion of multiple geometric points, and it does not directly modify the original geometric data, but merges the multiple points into one logical unit through a virtual topological relationship. Therefore, in this embodiment, the generated super point is related to ab two points by one super point and cd two points by the other super point. And then, carrying out boundary topological relation reconstruction processing on the target surface patch with the completely degenerated surface deleted by the generated virtual superside and superpoint, so that the exposed free edges (such as ac and bd) after deleting the degenerated surface are repaired by generating the virtual superside and the superpoint, and the topological relation integrity of the model is ensured. In this way, the virtual supersides and superpoints do not modify the original geometric data, but realize the fusion of sides and the association of points through virtual topological relations, so that the loss or deformation of geometric information is avoided. Two adjacent edges are fused into a virtual superedge, so that the model topological structure is simplified, and the subsequent processing is facilitated. In the processing process of the complete degradation surface of the wing skin, the generation steps of the super point are as follows, wherein the super point is related to the wing leading edge points a and b, and the aerodynamic shape continuity is ensured. The other super point is associated with the trailing edge points c and d of the wing, and topological symmetry is maintained.
As shown in FIG. 3, the first superpoint, point a and point b, are associated, indicating their topological consistency. And the second super point is a correlation point c and a point d, which represent the consistency of the points in topology. The virtual superside represents the fusion result of the side ac and the side bd, and the underlying data is mainly bd. The two superpoints are respectively associated with a starting point (a) and a finishing point (c) and a finishing point (d), so that the correctness of the topological relation is ensured. Reconstructing the target surface patch based on the virtual superside, the superpoint and the target surface patch from which the completely degraded surface is removedAnd target dough sheetUpdating the boundary topology data of two curved surfaces as shown in fig. 4The boundary of (2) is updated to be ef-fc-edge-be, the curved surfaceIs updated to edge-dh-hg-gb.
In this embodiment, the unified processing of the distribution information of each discrete point of the target adjacent edge in the reconstructed boundary topological relation to obtain each target discrete point includes performing synchronous discrete processing on the distribution of the discrete points of each discrete point of the target adjacent edge in the reconstructed boundary topological relation to refresh the current discrete point of the target adjacent edge to the same distribution, and taking each current discrete point as each target discrete point of the target adjacent edge. It can be understood that, determining the adjacent target edges on the updated curved surface based on the reconstructed boundary topological relation, ensuring that the discrete grid nodes on the two edges have consistent distribution for realizing seamless connection, further performing synchronous discrete processing on the discrete point distribution of the adjacent target edges, and refreshing the current discrete points of the two adjacent target edges into the same distribution to obtain the discrete target points. As shown in the following figure 5, the discrete points on the adjacent sides of the two item marks are re-parameterized, and the number and the distance between the discrete points are adjusted so that the distribution (such as the number, the position and the density) of the discrete points on the adjacent sides of the two item marks are completely consistent. For example, if 10 discrete points are original on the target adjacent side ac and 8 discrete points are original on the target adjacent side bd, the two sides adopt the same number of target discrete points (for example, 9 points are unified) through interpolation or deletion, and the target discrete point spacing is ensured to be distributed according to the same proportion. Forcing the point coordinates of the adjusted discrete points of the target to be aligned, e.g. the first adjacent edge ac of the targetThe discrete points are adjacent to the target edge bdThe discrete points are strictly geometrically corresponding, so that position deviation is avoided. This process forced alignment process may be implemented based on equal arc length segmentation of parameterized curves (e.g., B-splines) or an equal parameter segmentation algorithm. And then merging the forced aligned adjacent edges of the item marks to the other adjacent edges of the object, and completing the merging process of the discrete points of the object, namely completing the merging process of the discrete geometry of the edges. The node distribution of the discrete grid in the process of the complete degradation surface of the wing skin is to refresh the discrete points on the virtual super edge (such as the front edge nodes of the wing) to be the same density, so as to ensure the uniformity of the pneumatic grid.
Further, after the merging of the edge discrete geometries is completed, the discrete geometries on the two curved surfaces are connected, as shown in fig. 6 below, corresponding boundary points of the two curved surfaces are fused first, then one curved surface is used as a first curved surface, boundary grids on the first curved surface are used as a reference, the other curved surface is used as a second curved surface, corresponding grid points are inserted into the discrete grids on the second curved surface, the edge segmentation operation is performed, then the boundary grids on the second curved surface are used as the reference, corresponding grid points are inserted into the discrete grids of the first curved surface, the edge segmentation operation is performed, and finally the corresponding grid points of the first curved surface and the second curved surface are stitched to complete the updating operation of the discrete grid data. The deleting operation of the completely degenerated curved surface is finished, the modification of the surrounding topological relation is finished, and meanwhile, the updating of the discrete geometry on the virtual surface is finished.
And S14, if the degradation surface in the composite curved surface is a partial degradation surface, cutting the area where the partial degradation surface is located, converting the cut area into a complete degradation surface, and executing the step of deleting the complete degradation surface.
In this embodiment, as shown in fig. 7, fig. 7 is a schematic view of a partially degraded surface, where the partially degraded surface refers to a surface in which the boundary pitch of the partial boundary is extremely small, but the whole area is not greatly different from the surrounding surface. The cutting processing of the area where the partial degradation surface is located comprises the steps of calculating distance information between corresponding points of the candidate degradation edges of the same partial degradation surface under the same parameters to determine boundary edge spacing of the candidate degradation edges, judging that the area between the candidate degradation edges in the candidate degradation surface is an area to be cut if the boundary edge spacing is smaller than a preset edge spacing tolerance, and cutting the area to be cut. It can be understood that firstly, determining the region to be cut, specifically, searching boundary edges with included angle values smaller than the preset included angle tolerance from all boundary edges in partial degradation surfaces as candidate degradation edges, calculating the distance between every two candidate degradation edges, and calculating the distance between two edges in such a way that the distance between discrete point pairs under the same parameter u between two candidate degradation edges is calculated, wherein u is 0 and represents the head end of the edge, 1 represents the tail end of the edge, 0.5 represents the middle point of the edge, and the like. The average distance between these distances is used as the boundary edge spacing between two candidate degenerate edges, wherein the boundary edge spacing of the candidate degenerate edges is calculated as follows:
;
Wherein, Represent the firstThe distance between discrete pairs of points on each candidate degenerate edge,Representing the number of discrete point pairs.
If there is a boundary edge spacing between two edges in a curved surface smaller than a specified preset edge margin tolerance, the region to be cut is a region surrounded by the two edges, as shown in FIG. 8, when two candidate degraded edges are calculated based on discrete point pairsAnd candidate degraded edgesDiscrete point-to-distance betweenThereafter, based onCalculating that the boundary edge spacing is smaller than a specified preset edge spacing tolerance, then two candidate degraded edgesAnd candidate degraded edgesThe enclosed area is the area to be cut.
Further, as shown in FIG. 9, a candidate degraded edge is judgedAnd candidate degraded edgesWhether the length difference is too large or not, specifically, taking the candidate degenerated edgesAnd candidate degraded edgesIf the target length is larger than the preset length threshold, judging that the length difference is too large, and dividing the long side of the target length into long sides so that the length of the long sides is almost identical to the length of the short sides after cutting. After cutting at this timeUpdate to andIs connected and has a length andA uniform edge. Then, two boundary edges are removed from the current curved surfaceAnd after cutting) The remaining edges are then combined into a ring. Specifically, as shown in fig. 10, after deleting the sides ef and fg, the remaining sides de, gh, ha, ab, bd, and de are combined into a ring. Wherein, a new super point object m is generated in the process of combining into a ring and used for fusing the endpoint e and the endpoint g. Thus the edge de will share an endpoint m with the edge gh, as shown in fig. 11 below.
After clipping the partially degraded surface, the surrounding topology is updated, as shown in FIG. 12, and the partially degraded surface is then updatedAfter cutting, the curved surface after cuttingI.e. a completely degenerated surface. The adjacency of the surrounding surfaces will then be processed and updated in the manner described above for the completely degraded surfaces. After the processing of the steps, the topological relation between the virtual surfaces is updated to maintain the correctness of the topological relation of the model, and meanwhile, the discrete grids on the virtual surfaces are correspondingly updated, so that the discrete grids on the processed virtual surfaces are also connected with each other without gaps.
The application discloses a degradation surface processing method of a CAD model, which comprises the steps of importing and repairing an initial CAD model, establishing a watertight grid data structure to obtain a composite surface comprising a continuous surface and a discrete surface, carrying out degradation surface identification on the composite surface to obtain a corresponding degradation surface identification result, deleting the complete degradation surface if the degradation surface in the composite surface is the complete degradation surface, fusing adjacent edges of a target surface adjacent to the complete degradation surface, carrying out boundary topology reconstruction by utilizing fused back surface information, and stitching discrete grid data after reconstruction to obtain a degradation surface processing result, and carrying out cutting processing on an area where the partial degradation surface is located if the degradation surface in the composite surface is the partial degradation surface, converting the cut area into the complete degradation surface, and executing the step of deleting the complete degradation surface. Therefore, the composite curved surface comprising the continuous curved surface and the discrete curved surface can be obtained by repairing the initial CAD model and establishing the watertight grid data structure, so that the virtual surface information is processed by further processing the composite curved surface, and the degradation surface can be processed without processing the original geometric information.
Referring to fig. 13, the invention also correspondingly discloses a degradation surface processing device of the CAD model, which comprises:
The structure building module 11 is used for importing and repairing the initial CAD model, and building a watertight grid data structure so as to obtain a composite curved surface comprising a continuous curved surface and a discrete curved surface;
the degradation surface recognition module 12 is configured to perform degradation surface recognition on the composite curved surface to obtain a corresponding degradation surface recognition result;
the first processing module 13 is configured to delete the completely degraded surface if the degraded surface in the composite curved surface is the completely degraded surface, and fuse adjacent edges of the target surface patch adjacent to the completely degraded surface, so as to reconstruct a boundary topology by using the fused curved surface information and stitch the reconstructed discrete grid data, so as to obtain a degraded surface processing result;
And the second processing module 14 is configured to, if the degraded surface in the composite curved surface is a partially degraded surface, cut the area where the partially degraded surface is located, convert the cut area into a completely degraded surface, and execute the step of deleting the completely degraded surface.
The application discloses importing and repairing an initial CAD model, establishing a watertight grid data structure to obtain a composite curved surface comprising a continuous curved surface and a discrete curved surface, carrying out degradation surface identification on the composite curved surface to obtain a corresponding degradation surface identification result, deleting the complete degradation surface if the degradation surface in the composite curved surface is the complete degradation surface, fusing adjacent edges of a target surface sheet adjacent to the complete degradation surface, carrying out boundary topology reconstruction by utilizing fused curved surface information, and stitching discrete grid data after reconstruction to obtain a degradation surface processing result, and carrying out cutting processing on an area where the partial degradation surface is located if the degradation surface in the composite curved surface is the partial degradation surface, converting the cut area into the complete degradation surface, and executing the step of deleting the complete degradation surface. Therefore, the composite curved surface comprising the continuous curved surface and the discrete curved surface can be obtained by repairing the initial CAD model and establishing the watertight grid data structure, so that the virtual surface information is processed by further processing the composite curved surface, and the degradation surface can be processed without processing the original geometric information.
Further, the embodiment of the present application further discloses an electronic device, and fig. 14 is a block diagram of an electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 14 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may include, in particular, 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. Wherein the memory 22 is configured to store a computer program that is loaded and executed by the processor 21 to implement the relevant steps in the method for processing a degenerate surface of a CAD model as disclosed in any one of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide working voltages for each hardware device on the electronic device 20, the communication interface 24 is capable of creating a data transmission channel with an external device for the electronic device 20, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein, and the input/output interface 25 is configured to obtain external input data or output data to the external device, and the specific interface type of the input/output interface may be selected according to the specific application needs and is not specifically limited herein.
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), PLA (Programmable Logic Array ). The processor 21 may also include a main processor, which is a processor for processing data in a wake-up state, also called a CPU (Central Processing Unit ), and a coprocessor, which is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (ARTIFICIAL INTELLIGENCE ) processor for processing computing operations related to machine learning.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the processor 21 on the mass data 223 in the memory 22, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the method of processing the degenerate surface of the CAD model performed by the electronic device 20 as disclosed in any of the previous embodiments. The data 223 may include, in addition to data received by the electronic device and transmitted by the external device, data collected by the input/output interface 25 itself, and so on.
Furthermore, the application also discloses a computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to realize the degradation surface processing method of the CAD model. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in random access Memory RAM (Random Access Memory), memory, read-Only Memory ROM (Read Only Memory), electrically programmable EPROM (Electrically Programmable Read Only Memory), electrically erasable programmable EEPROM (Electric Erasable Programmable Read Only Memory), registers, hard disk, a removable disk, a CD-ROM (Compact Disc-Read Only Memory), or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
While the foregoing has been provided to illustrate the principles and embodiments of the present invention, specific examples have been provided herein to assist in understanding the principles and concepts of the invention, and are intended to be in the spirit and scope of the invention as defined by the appended claims.