CN117876631B - Broken surface processing method and related device based on triangular mesh model - Google Patents

Broken surface processing method and related device based on triangular mesh model Download PDF

Info

Publication number
CN117876631B
CN117876631B CN202410278795.6A CN202410278795A CN117876631B CN 117876631 B CN117876631 B CN 117876631B CN 202410278795 A CN202410278795 A CN 202410278795A CN 117876631 B CN117876631 B CN 117876631B
Authority
CN
China
Prior art keywords
repaired
broken
broken surface
planning
triangle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410278795.6A
Other languages
Chinese (zh)
Other versions
CN117876631A (en
Inventor
孙捷
高云翔
李忠林
郭志鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shichuang Technology Co ltd
Original Assignee
Beijing Shichuang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Shichuang Technology Co ltd filed Critical Beijing Shichuang Technology Co ltd
Priority to CN202410278795.6A priority Critical patent/CN117876631B/en
Publication of CN117876631A publication Critical patent/CN117876631A/en
Application granted granted Critical
Publication of CN117876631B publication Critical patent/CN117876631B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Generation (AREA)

Abstract

The application discloses a broken surface processing method and a related device based on a triangular mesh model, wherein the method comprises the following steps: detecting broken surfaces in the triangular mesh model to obtain a broken surface set; aiming at broken surfaces to be repaired in the broken surface set, when the broken surfaces to be repaired are selfed polygonal broken surfaces, repairing the broken surfaces to be repaired in a broken surface repairing mode aiming at the selfed polygons to obtain first repaired broken surfaces; the broken surface to be repaired is a gap broken surface, and the broken surface to be repaired is repaired in a broken surface repairing mode aiming at the gap to obtain a first repaired broken surface; when the broken surface to be repaired is a non-self-intersecting polygonal broken surface and is not a gap broken surface, repairing the broken surface to be repaired by a broken surface repairing mode corresponding to the target flatness of the broken surface to be repaired to obtain a first repaired broken surface; namely, selecting the most suitable repair algorithm for broken surfaces of different types to realize broken surface repair; and updating the triangular mesh model through the first repaired broken surface to obtain an updated triangular mesh model, and improving the broken surface repairing effect of the updated triangular mesh model.

Description

Broken surface processing method and related device based on triangular mesh model
Technical Field
The application relates to the technical field of data processing, in particular to a broken surface processing method and a related device based on a triangular mesh model.
Background
In the geometric modeling process, triangular mesh files are generally used for model display, propagation, simulation calculation and the like; due to the fact that the surface of the model is subjected to selfing or triangle mesh file damage and the like in the geometric modeling process, broken surfaces formed by some missing triangles appear on the triangle mesh model, and the display effect, the propagation effect and the simulation calculation result of the model are affected.
In the related art, to repair broken faces of a triangular mesh model, it is generally referred to repairing broken faces of the triangular mesh model by software with a broken face repair algorithm, so as to obtain repaired broken faces to update the triangular mesh model.
However, the broken surface repairing algorithm in the software is more focused on the realization property of the algorithm, does not focus on the coverage property of the algorithm, and is difficult to repair various broken surfaces, so that the broken surface repairing effect of the triangular mesh model is poor, and the display effect, the propagation effect and the simulation calculation result of the model are affected.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method and apparatus, and a method and related apparatus, which pay attention to the type of broken surface so as to select the most suitable repair algorithm to repair various types of broken surfaces, so that the broken surface repair effect of the triangular mesh model is better, and thus the display effect, propagation effect and simulation calculation result of the model are improved.
In one aspect, the embodiment of the application provides a method and a device, wherein the method comprises the following steps:
carrying out broken surface detection on the triangular mesh model to obtain a broken surface set of the triangular mesh model;
Aiming at a broken surface to be repaired in the broken surface set, if the broken surface to be repaired is an selfing polygon broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the selfing polygon, and obtaining a first repaired broken surface;
if the broken surface to be repaired is a gap broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the gap, so as to obtain a first repaired broken surface;
If the surface to be repaired is a non-self-intersecting polygonal surface and is a non-gap surface, repairing the surface to be repaired according to a surface repairing mode corresponding to the target flatness of the surface to be repaired to obtain a first repaired surface;
And updating the model of the triangular mesh model according to the first repaired broken surface to obtain an updated triangular mesh model.
Optionally, the performing broken surface repair on the broken surface to be repaired according to a broken surface repair mode for the selfing polygon to obtain a first repaired broken surface, including:
Performing triangle dynamic programming on the surface to be repaired to obtain M programming triangle sets; m is a positive integer, M is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles;
Determining M target calculation sums corresponding to the M planning triangle sets; the target calculation sum comprises a planned triangle area sum or a maximum dihedral angle sum;
And carrying out broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the minimum value in the M target calculation sums, and obtaining the first restored broken surface.
Optionally, the performing broken surface repair on the broken surface to be repaired according to a broken surface repair mode for the gap to obtain a first repaired broken surface, including:
performing approximate point detection on a plurality of preset grid points of the surface to be repaired to obtain a plurality of approximate target grid points in the plurality of preset grid points;
And performing broken surface restoration on the surface to be restored by connecting the approximate target grid points to obtain the first restored broken surface.
Optionally, the target flatness is smaller than a preset flatness; performing broken surface restoration on the broken surface to be restored according to a broken surface restoration mode corresponding to the target flatness of the broken surface to be restored to obtain a first restored broken surface, including:
Performing triangle dynamic programming on the surface to be repaired to obtain P programming triangle sets; p is a positive integer, P is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles;
determining P planning triangle areas corresponding to the P planning triangle sets;
Performing broken surface restoration on the broken surface to be restored according to the P planned triangle areas and the planned triangle set corresponding to the minimum value in the P planned triangle areas to obtain the first restored broken surface;
Or alternatively, the first and second heat exchangers may be,
And carrying out broken surface restoration on the broken surface to be restored according to a preferential planning mode of the equilateral triangle to obtain the first restored broken surface.
Optionally, the target flatness is greater than or equal to a preset flatness; performing broken surface restoration on the broken surface to be restored according to a broken surface restoration mode corresponding to the target flatness of the broken surface to be restored to obtain a first restored broken surface, including:
Performing triangle dynamic programming on the surface to be repaired to obtain Q programming triangle sets; q is a positive integer, Q is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles;
Determining Q maximum dihedral angle sums corresponding to the Q planning triangle sets;
performing broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the Q maximum dihedral angles and the middle minimum value to obtain the first restored broken surface;
Or alternatively, the first and second heat exchangers may be,
And carrying out broken surface restoration on the broken surface to be restored according to a priority planning mode of the triangle with the maximum dihedral angle, so as to obtain the first restored broken surface.
Optionally, the method further comprises:
If the surface to be repaired is the selfing polygonal surface, performing surface breaking segmentation on the surface to be repaired to obtain a plurality of non-selfing polygonal surfaces;
And updating the broken surface to be repaired according to the plurality of non-self-intersecting polygonal broken surfaces in the broken surface set.
Optionally, the method further comprises:
If the first repaired broken surface does not meet the repair requirement of the target user, carrying out broken surface repair on the broken surface to be repaired according to other broken surface repair modes to obtain a second repaired broken surface;
If the second repaired broken surface meets the repair expectations, updating the first repaired broken surface according to the second repaired broken surface before model updating;
If the second repaired broken surface does not meet the repairing expectation, responding to the broken surface repairing operation of a target user on the broken surface to be repaired, and repairing the broken surface to be repaired to obtain a third repaired broken surface;
Updating the first repaired broken surface according to the third repaired broken surface before model updating.
Optionally, the method further comprises:
if the surface to be repaired is connected with the non-manifold structure, cleaning the non-manifold structure to obtain the cleaned surface to be repaired;
And updating the broken surface to be repaired according to the cleaned broken surface to be repaired in the broken surface set.
On the other hand, the embodiment of the application provides a broken surface processing device based on a triangular mesh model, which comprises the following components: the device comprises a detection unit, a repair unit and an update unit;
The detection unit is used for carrying out broken surface detection on the triangular mesh model to obtain a broken surface set of the triangular mesh model;
The restoration unit is used for restoring the broken surface to be restored in the broken surface set according to a broken surface restoration mode aiming at the selfing polygon if the broken surface to be restored is the selfing polygon broken surface, so as to obtain a first restored broken surface; if the broken surface to be repaired is a gap broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the gap, so as to obtain a first repaired broken surface; if the surface to be repaired is a non-self-intersecting polygonal surface and is a non-gap surface, repairing the surface to be repaired according to a surface repairing mode corresponding to the target flatness of the surface to be repaired to obtain a first repaired surface;
And the updating unit is used for updating the model of the triangular mesh model according to the first repaired broken surface to obtain an updated triangular mesh model.
Optionally, the repairing unit is specifically configured to:
if the surface to be repaired is an selfing polygonal surface, performing triangle dynamic planning on the surface to be repaired to obtain M planned triangle sets; m is a positive integer, M is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles;
Determining M target calculation sums corresponding to the M planning triangle sets; the target calculation sum comprises a planned triangle area sum or a maximum dihedral angle sum;
And carrying out broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the minimum value in the M target calculation sums, and obtaining the first restored broken surface.
Optionally, the repairing unit is specifically configured to:
If the surface to be repaired is a gap surface, performing approximate point detection on a plurality of preset grid points of the surface to be repaired to obtain a plurality of approximate target grid points in the plurality of preset grid points;
And performing broken surface restoration on the surface to be restored by connecting the approximate target grid points to obtain the first restored broken surface.
Optionally, the target flatness is smaller than a preset flatness; the repair unit is specifically configured to:
Performing triangle dynamic programming on the surface to be repaired to obtain P programming triangle sets; p is a positive integer, P is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles;
determining P planning triangle areas corresponding to the P planning triangle sets;
Performing broken surface restoration on the broken surface to be restored according to the P planned triangle areas and the planned triangle set corresponding to the minimum value in the P planned triangle areas to obtain the first restored broken surface;
Or alternatively, the first and second heat exchangers may be,
And carrying out broken surface restoration on the broken surface to be restored according to a preferential planning mode of the equilateral triangle to obtain the first restored broken surface.
Optionally, the target flatness is greater than or equal to a preset flatness; the repair unit is specifically configured to:
Performing triangle dynamic programming on the surface to be repaired to obtain Q programming triangle sets; q is a positive integer, Q is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles;
Determining Q maximum dihedral angle sums corresponding to the Q planning triangle sets;
performing broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the Q maximum dihedral angles and the middle minimum value to obtain the first restored broken surface;
Or alternatively, the first and second heat exchangers may be,
And carrying out broken surface restoration on the broken surface to be restored according to a priority planning mode of the triangle with the maximum dihedral angle, so as to obtain the first restored broken surface.
Optionally, the apparatus further includes: a dividing unit;
the splitting unit is used for splitting the surface to be repaired to obtain a plurality of non-self-intersecting polygonal broken surfaces if the surface to be repaired is the self-intersecting polygonal broken surface;
the updating unit is further configured to update the broken surface to be repaired according to the multiple non-selfing polygonal broken surfaces in the broken surface set.
Optionally, the repairing unit is further configured to:
If the first repaired broken surface does not meet the repair requirement of the target user, carrying out broken surface repair on the broken surface to be repaired according to other broken surface repair modes to obtain a second repaired broken surface;
the updating unit is further configured to:
If the second repaired broken surface meets the repair expectations, updating the first repaired broken surface according to the second repaired broken surface before model updating;
the repair unit is further configured to:
If the second repaired broken surface does not meet the repairing expectation, responding to the broken surface repairing operation of a target user on the broken surface to be repaired, and repairing the broken surface to be repaired to obtain a third repaired broken surface;
the updating unit is further configured to:
Updating the first repaired broken surface according to the third repaired broken surface before model updating.
Optionally, the apparatus further includes: a cleaning unit;
the cleaning unit is used for cleaning the non-manifold structure if the surface to be repaired is connected with the non-manifold structure, so as to obtain the cleaned surface to be repaired;
the updating unit is used for updating the broken surface to be repaired according to the cleaned broken surface to be repaired in the broken surface set.
In another aspect, an embodiment of the present application provides a computer device including a processor and a memory:
The memory is used for storing a computer program and transmitting the computer program to the processor;
The processor is configured to perform the method of the above aspect according to instructions in the computer program.
Compared with the prior art, the application has at least the following advantages:
By adopting the technical scheme provided by the embodiment of the application, firstly, broken surfaces in the triangular mesh model are detected to obtain a broken surface set, and broken surfaces to be repaired in the triangular mesh model can be detected; then, aiming at broken surfaces to be repaired in the broken surface set, when the broken surfaces to be repaired are selfing polygon broken surfaces, repairing the broken surfaces to be repaired in a broken surface repairing mode aiming at the selfing polygon to obtain first repaired broken surfaces; when the broken surface to be repaired is a gap broken surface, repairing the broken surface to be repaired in a broken surface repairing mode aiming at the gap to obtain a first repaired broken surface; when the broken surface to be repaired is neither an selfing polygonal broken surface nor a gap broken surface, repairing the broken surface to be repaired by a broken surface repairing mode corresponding to the target flatness of the broken surface to be repaired to obtain a first repaired broken surface; aiming at broken surfaces to be repaired in a triangular mesh model, according to various broken surfaces such as self-intersecting polygonal broken surfaces, gap broken surfaces and the like to which the broken surfaces to be repaired belong, the most suitable repair algorithm is selected to realize broken surface repair so as to improve broken surface repair effects; finally, the triangle mesh model is updated through the first repaired broken surface, so that the updated triangle mesh model is obtained, and the broken surface repairing effect of the updated triangle mesh model can be improved. Based on the method, the type of broken surface is focused so as to select the most suitable repairing algorithm to repair various broken surfaces, so that the broken surface repairing effect of the triangular mesh model is better, and the display effect, the propagation effect and the simulation calculation result of the model are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a system frame related to an application scenario in an embodiment of the present application;
fig. 2 is a schematic flow chart of a broken surface processing method based on a triangular mesh model according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a broken surface set of a triangular mesh model according to an embodiment of the present application;
Fig. 4 is a specific flowchart of a broken surface processing method based on a triangular mesh model according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a first repaired broken surface according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a second repaired broken surface according to an embodiment of the present application;
FIG. 7 is a flowchart of another method for processing broken surfaces based on a triangular mesh model according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a broken surface processing device based on a triangular mesh model according to an embodiment of the present application.
Detailed Description
In order to make the present application better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present application, 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.
At present, the surface of the model is damaged due to selfing or triangle mesh file damage in the geometric modeling process, so that broken surfaces formed by missing triangles appear on the triangle mesh model, and the display effect, the propagation effect and the simulation calculation result of the model are affected. In order to repair broken faces of the triangular mesh model, the broken faces of the triangular mesh model are usually repaired by software with a broken face repair algorithm, and the repaired broken faces are obtained to update the triangular mesh model.
The inventor finds that the broken surface types are various, the broken surface repairing algorithm in the software focuses on the realization property of the algorithm, does not focus on the coverage property of the algorithm, and is difficult to repair various broken surfaces, so that the broken surface repairing effect of the triangular mesh model is poor, and the display effect, the propagation effect and the simulation calculation result of the model are affected.
In order to solve the problem, in the embodiment of the application, the type of broken surface is concerned so as to select the most suitable repairing algorithm to repair various broken surfaces, so that the broken surface repairing effect of the triangular mesh model is better, and the display effect, the propagation effect and the simulation calculation result of the model are improved.
For example, one of the scenarios of the embodiments of the present application may be applied to the scenario shown in fig. 1. The scene comprises a terminal 101 and a server 102, wherein a user determines a triangular grid model through the terminal 101 and sends the triangular grid model to the server 102, the server 102 executes the implementation mode provided by the embodiment of the application to realize the surface breaking process based on the triangular grid model, an updated triangular grid model is obtained and returned to the terminal 101, and the terminal 101 displays the updated triangular grid model to the user.
First, in the above application scenario, although the description of the actions of the implementation manner provided by the embodiment of the present application is performed by the server 102; however, the embodiment of the present application is not limited in terms of execution subject, and only the operations disclosed in the embodiments provided by the embodiment of the present application are executed.
Next, the above-described scenario is merely one example of a scenario provided by the embodiment of the present application, and the embodiment of the present application is not limited to this scenario.
The following describes in detail, by way of example, specific implementation manners of a surface breaking processing method and related devices based on a triangle mesh model in the embodiment of the present application with reference to the accompanying drawings.
Firstly, a specific implementation manner of the broken surface processing method based on the triangle mesh model in the embodiment of the application is described in detail through an embodiment.
Referring to fig. 2, a flow diagram of a broken surface processing method based on a triangle mesh model in an embodiment of the application is shown. In this embodiment, the method may include, for example, the following S201-S204:
s201: and carrying out broken surface detection on the triangular mesh model to obtain a broken surface set of the triangular mesh model.
In the embodiment of the application, in order to repair broken surfaces of a triangular mesh model, firstly, the broken surfaces to be repaired in the triangular mesh model need to be clarified, and then a broken surface set formed by the broken surfaces to be repaired in the triangular mesh model needs to be detected.
The S201 can detect broken surfaces to be repaired in the triangular mesh model, and provides a data basis for subsequent broken surface processing.
As an example of S201, referring to fig. 3, fig. 3 is a schematic diagram of a broken surface set of a triangular mesh model according to an embodiment of the present application, where the broken surface set of the triangular mesh model includes a broken surface to be repaired 301, a broken surface to be repaired 302, and the like.
S202: and aiming at the broken surface to be repaired in the broken surface set, if the broken surface to be repaired is an selfing polygon broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the selfing polygon, and obtaining a first repaired broken surface.
S203: if the broken surface to be repaired is a slit broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the slit, and obtaining a first repaired broken surface.
S204: if the broken surface to be repaired is a non-self-intersecting polygonal broken surface and the broken surface to be repaired is a non-gap broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode corresponding to the target flatness of the broken surface to be repaired, and obtaining a first repaired broken surface.
In the related art, in order to repair broken surfaces to be repaired in a broken surface set of a triangular mesh model, the broken surfaces of the triangular mesh model are repaired by software with a broken surface repair algorithm, so that the repaired broken surfaces are obtained to update the triangular mesh model. However, the broken surface repairing algorithm in the software focuses on the realization property of the algorithm, does not focus on the coverage property of the algorithm, and is difficult to repair various broken surfaces, so that the broken surface repairing effect of the triangular mesh model is poor, and the display effect, the propagation effect and the simulation calculation result of the model are affected.
In order to solve the above problems, in the embodiment of the present application, it is considered that the surface to be repaired may be an selfing polygonal surface, or the surface to be repaired may be a slit surface, or the surface to be repaired may be neither an selfing polygonal surface nor a slit surface; the characteristics of broken surfaces of different types are different, and the most suitable repair algorithm is selected for the broken surfaces of different types to realize broken surface repair so as to improve broken surface repair effect.
Based on this, after executing the above-mentioned S201 detection of a broken surface set formed by broken surfaces to be repaired in the triangular mesh model; aiming at broken surfaces to be repaired in the broken surface set, when the broken surfaces to be repaired are selfing polygon broken surfaces, repairing the broken surfaces to be repaired in a broken surface repairing mode aiming at the selfing polygons to obtain first repaired broken surfaces; when the broken surface to be repaired is a gap broken surface, repairing the broken surface to be repaired in a broken surface repairing mode aiming at the gap to obtain a first repaired broken surface; when the broken surface to be repaired is neither an selfing polygonal broken surface nor a gap broken surface, repairing the broken surface to be repaired by a broken surface repairing mode corresponding to the target flatness of the broken surface to be repaired to obtain a first repaired broken surface.
The S202-S204 aims at broken faces to be repaired in the triangular mesh model, and according to various broken faces such as self-intersecting polygonal broken faces, gap broken faces and the like of the broken faces to be repaired, the most suitable repair algorithm is selected to achieve broken face repair, the first repaired broken faces are obtained, various broken faces are repaired, and the broken face repair effect can be improved.
S205: and updating the model of the triangular mesh model according to the first repaired broken surface to obtain an updated triangular mesh model.
In the embodiment of the present application, after the step S202, the step S203, or the step S204 is executed to repair the broken surface to be repaired to obtain a first repaired broken surface; because the broken surface repairing effect of the first repaired broken surface is good, the triangular mesh model is updated through the first repaired broken surface, and the updated triangular mesh model is obtained, so that the broken surface repairing effect of the updated triangular mesh model is good.
In the step S205, on the basis that the broken surface repairing effect is improved in the step S202, the step S203 or the step S204, the updated triangular mesh model is obtained by updating the triangular mesh model through the first repaired broken surface, so that the broken surface repairing effect of the updated triangular mesh model can be improved, the influence on the display effect, the propagation effect and the simulation calculation result of the model is avoided, and the display effect, the propagation effect and the simulation calculation result of the model are improved.
In the embodiment of the present application, when the above-mentioned step S202 is implemented, in order to repair the selfing multi-deformation broken surface when the broken surface to be repaired is a selfing polygonal broken surface, the repairing problem caused by edge intersection in the selfing multi-deformation is effectively avoided; firstly, dynamically planning broken surfaces to be repaired by a triangle dynamic planning algorithm to obtain M planning triangle sets, wherein M is a positive integer, M is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles; determining the corresponding planning triangle area of each planning triangle set so as to repair the broken surface to be repaired according to the planning triangle set corresponding to the minimum value in the M planning triangle areas and to obtain a first repaired broken surface; or determining the maximum dihedral angle sum corresponding to each planning triangle set so as to repair the broken surface to be repaired according to the planning triangle set corresponding to the minimum value in the M maximum dihedral angle sums, thereby obtaining a first repaired broken surface. Therefore, in an alternative implementation manner of the embodiment of the present application, in the step S202, the step of repairing the broken surface to be repaired according to the broken surface repairing method for the selfing polygon to obtain the first repaired broken surface includes the following steps S2021-S2023 (not shown in the figure):
S2021: performing triangle dynamic planning on the broken surface to be repaired to obtain M planning triangle sets; m is a positive integer, M is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles.
S2022: determining M target calculation sums corresponding to the M planning triangle sets; the target calculation sum includes a planned triangle area sum or a maximum dihedral angle sum.
The sum of the areas of the planning triangles corresponding to the planning triangle set refers to the sum of the areas of a plurality of planning triangles in the planning triangle set; the sum of maximum dihedral angles corresponding to the set of planning triangles refers to the sum of larger values of dihedral angles of each planning triangle in the set of planning triangles relative to two triangles corresponding to two adjacent edges of the planning triangle; the two edges of the triangle are the original two edges before the triangle dynamic programming.
S2023: and carrying out broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the minimum value in the M target calculation sums, and obtaining a first restored broken surface.
In the embodiment of the present application, when the broken surface to be repaired is a slit broken surface in the implementation of S203, in order to repair the slit broken surface, it is considered that approximate points exist in a plurality of grid points representing the slit broken surface due to the very narrow slit broken surface, and the broken surface repair is realized by connecting the approximate points; based on the method, firstly, detecting approximate points in a plurality of preset grid points of a broken surface to be repaired to obtain a plurality of approximate target grid points in the plurality of preset grid points; and then connecting the approximate multiple target grid points to repair the broken surface to be repaired to obtain a first repaired broken surface. Therefore, in an alternative implementation manner of the embodiment of the present application, in the step S203, the surface breaking repair is performed on the surface to be repaired according to the surface breaking repair manner for the gap, so as to obtain a first repaired surface, which includes the following steps S2031-S2032 (not shown in the figure):
S2031: performing approximate point detection on a plurality of preset grid points of the fracture surface to be repaired to obtain a plurality of approximate target grid points in the plurality of preset grid points.
S2032: and performing broken surface restoration on the broken surface to be restored by connecting a plurality of approximate target grid points to obtain a first restored broken surface.
In the embodiment of the present application, when the broken surface to be repaired is neither an selfing polygonal broken surface nor a slit broken surface in the implementation of S204, whether the broken surface to be repaired is a planar broken surface or a non-planar broken surface can be determined by the target flatness of the broken surface to be repaired, and the broken surface repair modes for the planar broken surface and the non-planar broken surface are different, specifically as follows:
When the target flatness of the broken surface to be repaired is smaller than the preset flatness, the broken surface to be repaired is a plane broken surface; at this time, the broken surface to be repaired can be dynamically planned through a triangle dynamic programming algorithm to obtain P planned triangle sets, P is a positive integer, P is more than or equal to 2, each planned triangle set comprises a plurality of planned triangles, and then the planned triangle area corresponding to each planned triangle set is determined so as to repair the broken surface to be repaired according to the planned triangle set corresponding to the minimum value of the P planned triangle areas to obtain a first repaired broken surface; or repairing the broken surface to be repaired directly according to the priority planning mode of the equilateral triangle to obtain a first repaired broken surface. Therefore, in an alternative implementation manner of the embodiment of the present application, the target flatness is smaller than the preset flatness; in S204, the step of repairing broken surfaces to be repaired according to the broken surface repairing method corresponding to the target flatness of the broken surfaces to be repaired to obtain the first repaired broken surfaces includes the following steps S2041-S2043 or S2044 (not shown in the figure):
S2041: performing triangle dynamic programming on the broken surface to be repaired to obtain P programming triangle sets; p is a positive integer, P is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles.
S2042: and determining P planning triangle area sums corresponding to the P planning triangle sets.
S2043: and carrying out broken surface restoration on the broken surface to be restored according to the P planned triangle areas and the planned triangle set corresponding to the minimum value in the P planned triangle areas, so as to obtain a first restored broken surface.
S2044: and carrying out broken surface restoration on the broken surface to be restored according to the priority planning mode of the equilateral triangle to obtain a first restored broken surface.
When the target flatness of the broken surface to be repaired is larger than or equal to the preset flatness, the broken surface to be repaired is a non-planar broken surface; at this time, the broken surface to be repaired can be dynamically planned through a triangle dynamic programming algorithm to obtain Q planned triangle sets, Q is a positive integer, Q is more than or equal to 2, each planned triangle set comprises a plurality of planned triangles, and then the maximum dihedral angle sum corresponding to each planned triangle set is determined so as to repair the broken surface to be repaired according to the planned triangle set corresponding to the minimum value in the Q maximum dihedral angle sums, so that a first repaired broken surface is obtained; or repairing the broken surface to be repaired directly according to the priority planning mode of the triangle with the maximum dihedral angle, so as to obtain a first repaired broken surface. Therefore, in an alternative implementation of the embodiment of the present application, the target flatness is greater than or equal to the preset flatness; in S204, according to a broken surface repairing manner corresponding to the target flatness of the broken surface to be repaired, the broken surface repairing is performed on the broken surface to be repaired, so as to obtain a first repaired broken surface, which includes the following steps S2045-S2047 or S2048 (not shown in the figure):
S2045: performing triangle dynamic programming on the broken surface to be repaired to obtain Q programming triangle sets; q is a positive integer, Q is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles.
S2046: and determining Q maximum dihedral angle sums corresponding to the Q planning triangle sets.
S2047: and carrying out broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the Q maximum dihedral angles and the minimum value in the dihedral angles, and obtaining a first restored broken surface.
S2048: and carrying out broken surface restoration on the broken surface to be restored according to a priority planning mode of the triangle with the maximum dihedral angle, and obtaining a first restored broken surface.
In addition, in the embodiment of the application, considering that the broken surface restoration mode of the non-self-cross polygonal broken surface is simpler relative to that of the self-cross polygonal broken surface, when the broken surface to be restored is the self-cross polygonal broken surface, the broken surface to be restored is restored to obtain the first restored broken surface not directly through the broken surface restoration mode aiming at the self-cross polygonal broken surface, the broken surface to be restored can be further divided into a plurality of non-self-cross polygonal broken surfaces, and in the broken surface set of the triangular mesh model, the broken surface to be restored is updated through the plurality of non-self-cross polygonal broken surfaces corresponding to the broken surface to be restored, so that the complexity of broken surface restoration is reduced, the broken surface restoration efficiency is improved, and the broken surface restoration effect is further improved. Thus, in an alternative implementation of the embodiment of the present application, the method further comprises the following S1-S2 (not shown in the figures):
S1: if the broken surface to be repaired is the self-cross polygonal broken surface, the broken surface segmentation is carried out on the broken surface to be repaired, and a plurality of non-self-cross polygonal broken surfaces are obtained.
S2: and updating broken faces to be repaired according to the plurality of non-self-intersecting polygonal broken faces in the broken face set.
In addition, in the embodiment of the application, the broken surface to be repaired can be connected with a non-manifold structure, and the non-manifold structure influences the broken surface repairing efficiency of the following broken surface to be repaired; based on the method, when the surface to be repaired is connected with the non-manifold structure, the non-manifold structure is cleaned to obtain the cleaned surface to be repaired, and the surface to be repaired is updated through the cleaned surface to be repaired, so that the surface to be repaired of the non-manifold structure is connected in the surface to be repaired set of the triangular mesh model, the surface to be repaired repairing efficiency is improved, and the surface to be repaired effect is further improved. Thus, in an alternative implementation of the embodiment of the present application, the method further comprises the following S3-S4 (not shown in the figures):
S3: and if the broken surface to be repaired is connected with the non-manifold structure, cleaning the non-manifold structure to obtain the cleaned broken surface to be repaired.
S4: and updating the broken surface to be repaired according to the cleaned broken surface to be repaired in the broken surface set.
To sum up, referring to fig. 4, fig. 4 is a specific flowchart of a broken surface processing method based on a triangle mesh model according to an embodiment of the present application; the specific flow is as follows:
Firstly, carrying out broken surface detection on a triangular mesh model to obtain a broken surface set of the triangular mesh model; judging whether the broken surface to be repaired is connected with a non-manifold structure or not according to the broken surface to be repaired in the broken surface set, judging whether the non-manifold structure is cleaned or not if the broken surface to be repaired is connected with the non-manifold structure, and cleaning the non-manifold structure if the non-manifold structure is cleaned to obtain the cleaned broken surface to be repaired; and updating the broken surface to be repaired according to the cleaned broken surface to be repaired in the broken surface set.
Then judging whether the broken surface to be repaired is an selfing polygonal broken surface (if the broken surface to be repaired is not connected with a non-manifold structure, or if the non-manifold structure is not cleaned, directly judging whether the broken surface to be repaired is an selfing polygonal broken surface, if the broken surface to be repaired is an selfing polygonal broken surface, judging whether the broken surface to be repaired is segmented into a plurality of non-selfing polygonal broken surfaces, if the broken surface to be repaired is not segmented into a plurality of non-selfing polygonal broken surfaces (if the broken surface to be repaired is segmented into a plurality of non-selfing polygonal broken surfaces, updating the broken surface to be repaired according to the non-selfing polygonal broken surfaces in a broken surface collection), and repairing the broken surface to be repaired according to a broken surface repairing mode aiming at the selfing polygonal, thereby obtaining a first repaired broken surface; if the broken surface to be repaired is a non-self-intersecting polygonal broken surface, judging whether the broken surface to be repaired is a slit broken surface, and if the broken surface to be repaired is a slit broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the slit to obtain a first repaired broken surface; if the broken surface to be repaired is a non-gap broken surface, judging whether the target flatness of the broken surface to be repaired is smaller than the preset flatness, and if the target flatness is smaller than the preset flatness, repairing the broken surface to be repaired according to a broken surface repairing mode aiming at the plane broken surface to obtain a first repaired broken surface; if the target flatness is greater than or equal to the preset flatness, performing broken surface restoration on the broken surface to be restored according to a broken surface restoration mode aiming at the non-planar broken surface, and obtaining a first restored broken surface.
And finally, updating the model of the triangular mesh model according to the first repaired broken surface to obtain an updated triangular mesh model.
In addition, in the embodiment of the application, after the broken surface to be repaired is repaired to obtain the first repaired broken surface, the first repaired broken surface may not meet the repairing expectation of the target user; at this time, the broken surface to be repaired can be repaired by other broken surface repairing methods to obtain a second repaired broken surface, and whether the second repaired broken surface meets the repairing expectation of the target user is further judged, if yes, in order to enable the repaired broken surface of the broken surface to be repaired in the triangular mesh model to meet the repairing expectation of the target user, before executing the step S205, the first repaired broken surface needs to be updated through the second repaired broken surface, so that the triangular mesh model is updated in the step S205 to obtain an updated triangular mesh model, and the broken surface repairing effect of the updated triangular mesh model can be further improved; if not, repairing the broken surface to be repaired by responding to the broken surface repairing operation of the target user aiming at the broken surface to be repaired to obtain a third repaired broken surface, and similarly, updating the first repaired broken surface by the third repaired broken surface before executing the step S205 so as to update the triangular mesh model to obtain an updated triangular mesh model after executing the step S205, and further improving the broken surface repairing effect of the updated triangular mesh model. Thus, in an alternative implementation of the embodiment of the present application, the method further comprises the following S5-S6 or S5, S7-S8 (not shown in the figures):
S5: if the first repaired broken surface does not meet the repairing expectation of the target user, carrying out broken surface repairing on the broken surface to be repaired according to other broken surface repairing modes to obtain a second repaired broken surface.
S6: if the second repaired broken surface meets the repair expectations, updating the first repaired broken surface according to the second repaired broken surface before updating the model.
S7: if the second repaired broken surface does not meet the repairing expectation, responding to the broken surface repairing operation of the target user aiming at the broken surface to be repaired, and performing broken surface repairing on the broken surface to be repaired to obtain a third repaired broken surface.
S8: the first repaired broken surface is updated according to the third repaired broken surface before the model is updated.
As an example, referring to fig. 5, fig. 5 is a schematic diagram of a first repaired broken surface provided by an embodiment of the present application, where the first repaired broken surface does not meet a repair requirement of a target user, and referring to fig. 6, fig. 6 is a schematic diagram of a second repaired broken surface provided by an embodiment of the present application, where the second repaired broken surface is obtained by repairing a broken surface to be repaired according to other broken surface repairing methods, and meets the repair requirement of the target user.
To sum up, referring to fig. 7, fig. 7 is a specific flowchart of another surface breaking processing method based on triangle mesh model according to an embodiment of the present application; the specific flow is as follows:
Firstly, carrying out broken surface detection on a triangular mesh model to obtain a broken surface set of the triangular mesh model; aiming at broken surfaces to be repaired in the broken surface set, if the broken surfaces to be repaired are selfed polygonal broken surfaces, carrying out broken surface repair on the broken surfaces to be repaired according to a broken surface repair mode aiming at the selfed polygonal broken surfaces, and obtaining first repaired broken surfaces; if the broken surface to be repaired is a gap broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the gap, so as to obtain a first repaired broken surface; if the broken surface to be repaired is a non-self-intersecting polygonal broken surface and the broken surface to be repaired is a non-gap broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode corresponding to the target flatness of the broken surface to be repaired, and obtaining a first repaired broken surface.
Then judging whether the first repaired broken surface meets the repair expectations of the target user, if the first repaired broken surface does not meet the repair expectations of the target user, carrying out broken surface repair on the broken surface to be repaired according to other broken surface repair modes, and obtaining a second repaired broken surface; judging whether the second repaired broken surface meets the repair expectations of the target user or not, if so, updating the first repaired broken surface according to the second repaired broken surface before updating the model; if the second repaired broken surface does not meet the repairing expectation of the target user, responding to broken surface repairing operation of the target user on the broken surface to be repaired, and performing broken surface repairing on the broken surface to be repaired to obtain a third repaired broken surface; the first repaired broken surface is updated according to the third repaired broken surface before the model is updated.
Finally, the triangular mesh model is updated according to the first repaired broken surface, and an updated triangular mesh model is obtained (if the first repaired broken surface meets the repair expectations of the target user, the triangular mesh model is directly updated according to the first repaired broken surface, and the updated triangular mesh model is obtained).
Through the various implementation manners provided in this embodiment, firstly, broken surfaces in a triangular mesh model are detected to obtain a broken surface set, so that broken surfaces to be repaired in the triangular mesh model can be detected; then, aiming at broken surfaces to be repaired in the broken surface set, when the broken surfaces to be repaired are selfing polygon broken surfaces, repairing the broken surfaces to be repaired in a broken surface repairing mode aiming at the selfing polygon to obtain first repaired broken surfaces; when the broken surface to be repaired is a gap broken surface, repairing the broken surface to be repaired in a broken surface repairing mode aiming at the gap to obtain a first repaired broken surface; when the broken surface to be repaired is neither an selfing polygonal broken surface nor a gap broken surface, repairing the broken surface to be repaired by a broken surface repairing mode corresponding to the target flatness of the broken surface to be repaired to obtain a first repaired broken surface; aiming at broken surfaces to be repaired in a triangular mesh model, according to various broken surfaces such as self-intersecting polygonal broken surfaces, gap broken surfaces and the like to which the broken surfaces to be repaired belong, the most suitable repair algorithm is selected to realize broken surface repair so as to improve broken surface repair effects; finally, the triangle mesh model is updated through the first repaired broken surface, so that the updated triangle mesh model is obtained, and the broken surface repairing effect of the updated triangle mesh model can be improved. Based on the method, the type of broken surface is focused so as to select the most suitable repairing algorithm to repair various broken surfaces, so that the broken surface repairing effect of the triangular mesh model is better, and the display effect, the propagation effect and the simulation calculation result of the model are improved.
Next, a specific implementation manner of the surface breaking processing device based on the triangle mesh model in the embodiment of the present application will be described in detail through an embodiment.
Referring to fig. 8, a schematic structural diagram of a broken surface processing device based on a triangular mesh model in an embodiment of the application is shown. In this embodiment, the apparatus may specifically include, for example: a detection unit 801, a repair unit 802, and an update unit 803;
the detection unit 801 is configured to perform broken surface detection on a triangular mesh model, so as to obtain a broken surface set of the triangular mesh model;
The repairing unit 802 is configured to repair the surface to be repaired in the surface to be repaired set according to a surface to be repaired repairing mode for the self-bred polygon if the surface to be repaired is the self-bred polygon surface to obtain a first repaired surface; if the broken surface to be repaired is a gap broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the gap, so as to obtain a first repaired broken surface; if the surface to be repaired is a non-self-intersecting polygonal surface and is a non-gap surface, repairing the surface to be repaired according to a surface repairing mode corresponding to the target flatness of the surface to be repaired to obtain a first repaired surface;
The updating unit 803 is configured to update the model of the triangular mesh model according to the first repaired broken surface, and obtain an updated triangular mesh model.
In an alternative implementation manner of the embodiment of the present application, the repairing unit 802 is specifically configured to:
if the surface to be repaired is an selfing polygonal surface, performing triangle dynamic planning on the surface to be repaired to obtain M planned triangle sets; m is a positive integer, M is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles;
Determining M target calculation sums corresponding to the M planning triangle sets; the target calculation sum comprises a planned triangle area sum or a maximum dihedral angle sum;
And carrying out broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the minimum value in the M target calculation sums, and obtaining the first restored broken surface.
In an alternative implementation manner of the embodiment of the present application, the repairing unit 802 is specifically configured to:
If the surface to be repaired is a gap surface, performing approximate point detection on a plurality of preset grid points of the surface to be repaired to obtain a plurality of approximate target grid points in the plurality of preset grid points;
And performing broken surface restoration on the surface to be restored by connecting the approximate target grid points to obtain the first restored broken surface.
In an optional implementation manner of the embodiment of the present application, the target flatness is smaller than a preset flatness; the repairing unit 802 is specifically configured to:
Performing triangle dynamic programming on the surface to be repaired to obtain P programming triangle sets; p is a positive integer, P is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles;
determining P planning triangle areas corresponding to the P planning triangle sets;
Performing broken surface restoration on the broken surface to be restored according to the P planned triangle areas and the planned triangle set corresponding to the minimum value in the P planned triangle areas to obtain the first restored broken surface;
Or alternatively, the first and second heat exchangers may be,
And carrying out broken surface restoration on the broken surface to be restored according to a preferential planning mode of the equilateral triangle to obtain the first restored broken surface.
In an optional implementation manner of the embodiment of the present application, the target flatness is greater than or equal to a preset flatness; the repairing unit 802 is specifically configured to:
Performing triangle dynamic programming on the surface to be repaired to obtain Q programming triangle sets; q is a positive integer, Q is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles;
Determining Q maximum dihedral angle sums corresponding to the Q planning triangle sets;
performing broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the Q maximum dihedral angles and the middle minimum value to obtain the first restored broken surface;
Or alternatively, the first and second heat exchangers may be,
And carrying out broken surface restoration on the broken surface to be restored according to a priority planning mode of the triangle with the maximum dihedral angle, so as to obtain the first restored broken surface.
In an alternative implementation manner of the embodiment of the present application, the apparatus further includes: a dividing unit;
the splitting unit is used for splitting the surface to be repaired to obtain a plurality of non-self-intersecting polygonal broken surfaces if the surface to be repaired is the self-intersecting polygonal broken surface;
The updating unit 803 is further configured to update the broken surface to be repaired according to the multiple non-selfing polygonal broken surfaces in the broken surface set.
In an alternative implementation manner of the embodiment of the present application, the repairing unit 802 is further configured to:
If the first repaired broken surface does not meet the repair requirement of the target user, carrying out broken surface repair on the broken surface to be repaired according to other broken surface repair modes to obtain a second repaired broken surface;
the updating unit 803 is further configured to:
If the second repaired broken surface meets the repair expectations, updating the first repaired broken surface according to the second repaired broken surface before model updating;
The repairing unit 802 is further configured to:
If the second repaired broken surface does not meet the repairing expectation, responding to the broken surface repairing operation of a target user on the broken surface to be repaired, and repairing the broken surface to be repaired to obtain a third repaired broken surface;
the updating unit 803 is further configured to:
Updating the first repaired broken surface according to the third repaired broken surface before model updating.
In an alternative implementation manner of the embodiment of the present application, the apparatus further includes: a cleaning unit;
the cleaning unit is used for cleaning the non-manifold structure if the surface to be repaired is connected with the non-manifold structure, so as to obtain the cleaned surface to be repaired;
the updating unit 803 is configured to update the surface to be repaired according to the cleaned surface to be repaired in the surface breaking set.
Through various implementations provided by the embodiment, a broken surface processing device based on a triangular mesh model comprises a detection unit, a repair unit and an update unit; the detection unit detects broken surfaces in the triangular mesh model to obtain a broken surface set, and the broken surfaces to be repaired in the triangular mesh model can be detected; the repairing unit is used for repairing broken surfaces to be repaired in the broken surface set, and when the broken surfaces to be repaired are selfing polygon broken surfaces, the broken surfaces to be repaired are repaired in a broken surface repairing mode aiming at the selfing polygon to obtain first repaired broken surfaces; when the broken surface to be repaired is a gap broken surface, repairing the broken surface to be repaired in a broken surface repairing mode aiming at the gap to obtain a first repaired broken surface; when the broken surface to be repaired is neither an selfing polygonal broken surface nor a gap broken surface, repairing the broken surface to be repaired by a broken surface repairing mode corresponding to the target flatness of the broken surface to be repaired to obtain a first repaired broken surface; aiming at broken surfaces to be repaired in the triangular mesh model, the unit selects the most suitable repair algorithm to realize broken surface repair according to various broken surfaces such as self-intersecting polygonal broken surfaces, gap broken surfaces and the like to which the broken surfaces to be repaired belong so as to improve broken surface repair effects; the updating unit updates the triangular mesh model through the first repaired broken surface to obtain an updated triangular mesh model, and the broken surface repairing effect of the updated triangular mesh model can be improved. Based on the method, the device pays attention to the type of broken surface so as to select the most suitable repairing algorithm to repair various broken surfaces, so that the broken surface repairing effect of the triangular mesh model is better, and the display effect, the propagation effect and the simulation calculation result of the model are improved.
In addition, the embodiment of the application also provides computer equipment, which comprises a processor and a memory:
The memory is used for storing a computer program and transmitting the computer program to the processor;
The processor is configured to execute the method according to the above embodiment according to the instructions in the computer program.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer 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.
It is 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. 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 the element.
The above description is only of the preferred embodiment of the present application, and is not intended to limit the present application in any way. While the application has been described with reference to preferred embodiments, it is not intended to be limiting. Any person skilled in the art can make many possible variations and modifications to the technical solution of the present application or modifications to equivalent embodiments using the methods and technical contents disclosed above, without departing from the scope of the technical solution of the present application. Therefore, any simple modification, equivalent variation and modification of the above embodiments according to the technical substance of the present application still fall within the scope of the technical solution of the present application.

Claims (5)

1. A broken surface processing method based on a triangular mesh model is characterized by comprising the following steps:
carrying out broken surface detection on the triangular mesh model to obtain a broken surface set of the triangular mesh model;
Aiming at a broken surface to be repaired in the broken surface set, if the broken surface to be repaired is an selfing polygon broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the selfing polygon, and obtaining a first repaired broken surface; or, carrying out broken surface segmentation on the broken surface to be repaired to obtain a plurality of non-self-intersecting polygonal broken surfaces, and updating the broken surface to be repaired according to the plurality of non-self-intersecting polygonal broken surfaces in the broken surface set;
if the broken surface to be repaired is a gap broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the gap, so as to obtain a first repaired broken surface;
If the surface to be repaired is a non-self-intersecting polygonal surface and is a non-gap surface, repairing the surface to be repaired according to a surface repairing mode corresponding to the target flatness of the surface to be repaired to obtain a first repaired surface;
updating the model of the triangular mesh model according to the first repaired broken surface to obtain an updated triangular mesh model;
The method for repairing broken surfaces of the to-be-repaired broken surfaces according to the broken surface repairing mode aiming at the selfing polygon, and obtaining first repaired broken surfaces comprises the following steps:
Performing triangle dynamic programming on the surface to be repaired to obtain M programming triangle sets; m is a positive integer, M is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles;
Determining M target calculation sums corresponding to the M planning triangle sets; the target calculation sum comprises a planned triangle area sum or a maximum dihedral angle sum;
performing broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the minimum value in the M target calculation sums, and obtaining the first restored broken surface;
Performing broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at a gap to obtain a first repaired broken surface, wherein the method comprises the following steps:
performing approximate point detection on a plurality of preset grid points of the surface to be repaired to obtain a plurality of approximate target grid points in the plurality of preset grid points;
Performing broken surface restoration on the broken surface to be restored by connecting the approximate target grid points to obtain the first restored broken surface;
Performing broken surface restoration on the broken surface to be restored according to a broken surface restoration mode corresponding to the target flatness of the broken surface to be restored to obtain a first restored broken surface, including:
The target flatness is smaller than preset flatness, triangular dynamic programming is conducted on the surface to be repaired, and P planned triangular sets are obtained; p is a positive integer, P is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles; determining P planning triangle areas corresponding to the P planning triangle sets; performing broken surface restoration on the broken surface to be restored according to the P planned triangle areas and the planned triangle set corresponding to the minimum value in the P planned triangle areas to obtain the first restored broken surface; or alternatively, the first and second heat exchangers may be,
Performing broken surface restoration on the broken surface to be restored according to a preferential planning mode of the equilateral triangle to obtain the first restored broken surface;
Performing broken surface restoration on the broken surface to be restored according to a broken surface restoration mode corresponding to the target flatness of the broken surface to be restored to obtain a first restored broken surface, including:
The target flatness is larger than or equal to preset flatness, triangular dynamic planning is conducted on the broken surface to be repaired, and Q planned triangular sets are obtained; q is a positive integer, Q is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles; determining Q maximum dihedral angle sums corresponding to the Q planning triangle sets; performing broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the Q maximum dihedral angles and the middle minimum value to obtain the first restored broken surface; or alternatively, the first and second heat exchangers may be,
And carrying out broken surface restoration on the broken surface to be restored according to a priority planning mode of the triangle with the maximum dihedral angle, so as to obtain the first restored broken surface.
2. The method according to claim 1, wherein the method further comprises:
If the first repaired broken surface does not meet the repair requirement of the target user, carrying out broken surface repair on the broken surface to be repaired according to other broken surface repair modes to obtain a second repaired broken surface;
If the second repaired broken surface meets the repair expectations, updating the first repaired broken surface according to the second repaired broken surface before model updating;
If the second repaired broken surface does not meet the repairing expectation, responding to the broken surface repairing operation of a target user on the broken surface to be repaired, and repairing the broken surface to be repaired to obtain a third repaired broken surface;
Updating the first repaired broken surface according to the third repaired broken surface before model updating.
3. The method according to any one of claims 1-2, wherein the method further comprises:
if the surface to be repaired is connected with the non-manifold structure, cleaning the non-manifold structure to obtain the cleaned surface to be repaired;
And updating the broken surface to be repaired according to the cleaned broken surface to be repaired in the broken surface set.
4. Broken surface processing apparatus based on triangle-shaped net model, characterized by comprising: the device comprises a detection unit, a repair unit and an update unit;
The detection unit is used for carrying out broken surface detection on the triangular mesh model to obtain a broken surface set of the triangular mesh model;
the restoration unit is configured to restore the surface to be restored in the surface to be restored set according to a surface to be restored restoration mode of the surface to be restored in the surface to be restored set, or to divide the surface to be restored to obtain a plurality of non-self-cross polygonal surface to be restored, and update the surface to be restored in the surface to be restored set according to the plurality of non-self-cross polygonal surface to be restored if the surface to be restored is the self-cross polygonal surface to be restored; if the broken surface to be repaired is a gap broken surface, carrying out broken surface repair on the broken surface to be repaired according to a broken surface repair mode aiming at the gap, so as to obtain a first repaired broken surface; if the surface to be repaired is a non-self-intersecting polygonal surface and is a non-gap surface, repairing the surface to be repaired according to a surface repairing mode corresponding to the target flatness of the surface to be repaired to obtain a first repaired surface;
the updating unit is used for updating the model of the triangular mesh model according to the first repaired broken surface to obtain an updated triangular mesh model;
The repairing unit is used for carrying out triangle dynamic programming on the surface to be repaired to obtain M planning triangle sets, M is a positive integer, M is more than or equal to 2, each planning triangle set comprises a plurality of planning triangles, M target calculation sums corresponding to the M planning triangle sets are determined, the target calculation sums comprise planning triangle area sums or maximum dihedral angle sums, and the surface to be repaired is repaired according to the planning triangle set corresponding to the minimum value in the M target calculation sums to obtain the first repaired surface;
If the surface to be repaired is a gap surface, performing approximate point detection on a plurality of preset grid points of the surface to be repaired to obtain a plurality of approximate target grid points in the plurality of preset grid points, and performing surface repairing on the surface to be repaired by connecting the plurality of approximate target grid points to obtain the first repaired surface;
If the surface to be repaired is a non-self-intersecting polygonal surface and the surface to be repaired is a non-gap surface, the target flatness is smaller than the preset flatness, triangular dynamic planning is carried out on the surface to be repaired to obtain P planning triangle sets, P is a positive integer, P is more than or equal to 2, each planning triangle set comprises a plurality of planning triangles, P planning triangle areas corresponding to the P planning triangle sets are determined, surface breaking repair is carried out on the surface to be repaired according to the planning triangle set corresponding to the minimum value in the P planning triangle areas to obtain the first repaired surface to be broken, or surface breaking repair is carried out on the surface to be repaired according to a preferential planning mode of an equilateral triangle to obtain the first repaired surface to be broken;
If the surface to be repaired is a non-self-intersecting polygonal surface and the surface to be repaired is a non-gap surface, the target flatness is greater than or equal to preset flatness, and triangle dynamic planning is carried out on the surface to be repaired to obtain Q planning triangle sets; q is a positive integer, Q is more than or equal to 2, and each planning triangle set comprises a plurality of planning triangles; determining Q maximum dihedral angle sums corresponding to the Q planning triangle sets; and carrying out broken surface restoration on the broken surface to be restored according to the planning triangle set corresponding to the Q maximum dihedral angles and the middle minimum value to obtain the first restored broken surface, or carrying out broken surface restoration on the broken surface to be restored according to a priority planning mode of the maximum dihedral angle triangle to obtain the first restored broken surface.
5. A computer device, the computer device comprising a processor and a memory:
The memory is used for storing a computer program and transmitting the computer program to the processor;
the processor is configured to perform the method of any of claims 1-3 according to instructions in the computer program.
CN202410278795.6A 2024-03-12 2024-03-12 Broken surface processing method and related device based on triangular mesh model Active CN117876631B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410278795.6A CN117876631B (en) 2024-03-12 2024-03-12 Broken surface processing method and related device based on triangular mesh model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410278795.6A CN117876631B (en) 2024-03-12 2024-03-12 Broken surface processing method and related device based on triangular mesh model

Publications (2)

Publication Number Publication Date
CN117876631A CN117876631A (en) 2024-04-12
CN117876631B true CN117876631B (en) 2024-05-28

Family

ID=90593324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410278795.6A Active CN117876631B (en) 2024-03-12 2024-03-12 Broken surface processing method and related device based on triangular mesh model

Country Status (1)

Country Link
CN (1) CN117876631B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5880977A (en) * 1996-03-28 1999-03-09 Nec Corporation Mesh generation device and its method for generating meshes having a boundary protective layer
CN104361632A (en) * 2014-11-03 2015-02-18 北京航空航天大学 Triangular mesh hole-filling method based on Hermite radial basis function
CN110543819A (en) * 2019-07-26 2019-12-06 山东大学 Three-dimensional (3D) printing triangular mesh single-hole classification identification and repair method and system
CN113593011A (en) * 2021-07-12 2021-11-02 杭州思锐迪科技有限公司 Hole repairing method, electronic device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5880977A (en) * 1996-03-28 1999-03-09 Nec Corporation Mesh generation device and its method for generating meshes having a boundary protective layer
CN104361632A (en) * 2014-11-03 2015-02-18 北京航空航天大学 Triangular mesh hole-filling method based on Hermite radial basis function
CN110543819A (en) * 2019-07-26 2019-12-06 山东大学 Three-dimensional (3D) printing triangular mesh single-hole classification identification and repair method and system
CN113593011A (en) * 2021-07-12 2021-11-02 杭州思锐迪科技有限公司 Hole repairing method, electronic device and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
三维重建网格模型的缺陷孔洞识别与修复方法;温佩芝 等;计算机应用研究;20200430;第37卷(第4期);第1234-1238页 *
基于STL三角网格模型孔洞修补的研究;闫涛;电子设计工程;20120131;第20卷(第2期);第27-29、33页 *
基于局部的全自动网格修复算法;王骁 等;计算机辅助设计与图形学学报;20220930;第34卷(第9期);第1391-1401页 *

Also Published As

Publication number Publication date
CN117876631A (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN107480274B (en) Method and device for processing regional boundary information
US7750905B2 (en) Method for constructing a triangular mesh surface of a point cloud
Cuillière et al. Automatic construction of structural CAD models from 3D topology optimization
US20080062171A1 (en) Method for simplifying maintenance of feature of three-dimensional mesh data
Tkáč et al. On the evaluation of Six Sigma projects
CN117876631B (en) Broken surface processing method and related device based on triangular mesh model
JP2011033987A (en) Map creating device and map creating method
JP6177649B2 (en) Data processing apparatus, length measurement system, defect inspection system, image tracking system, and data processing method
CN112910708A (en) Distributed service calling method and device
CN111295695B (en) Three-dimensional grid data simplifying method and device
CN113959400B (en) Intersection vertex height value acquisition method and device, electronic equipment and storage medium
CN114416819A (en) Mining method and device for public clients
US6690827B1 (en) Approximation method of shape data, information processing apparatus and medium
CN112631630A (en) Service configuration updating method and device
JP4899789B2 (en) Image processing program and image processing apparatus
CN113010946B (en) Data analysis method, electronic equipment and related products
CN114723868A (en) Cloth selfing repairing method, equipment, storage medium and device
US20060160593A1 (en) Negotiation system and processor-based method
CN108898291A (en) A kind of real-time method and system for calculating single Hong Kong stock broker and buying and selling data only
CN109919521B (en) Block chain operation confirmation method and device and electronic equipment
Alboul et al. Mesh optimisation based on Willmore energy
WO2023084609A1 (en) Behavior model cost estimation device, method, and program
JP4457186B2 (en) Mesh correction method using quasi-statistical model
Bandini et al. A CA approach to study complex dynamics in asset markets
CN116720234A (en) Curved surface grid generation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant