A method for extracting a surface of a three-dimensional mesh model
Patent Information
- Application Number
- CN202611155206.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-23
AI Technical Summary
[0008]本发明的目的是提供一种三维网格模型表面提取方法,用来解决复杂结构下的网格提取方法
[0008]本发明的目的是提供一种三维网格模型表面提取方法,用来解决复杂结构下的网格提取方法。
Smart Images

Figure CN122966903A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer three-dimensional graphics and engineering simulation technology, specifically to a method for extracting the surface of a three-dimensional mesh model. Background Technology
[0002] In engineering fields such as shipbuilding and marine engineering, mechanical manufacturing, and 3D simulation analysis, surface extraction of 3D mesh models is a fundamental step in CAE preprocessing, 3D visualization, and fluid dynamics simulation. Accurate extraction of surface meshes is particularly crucial in complex mesh model scenarios with geometric abrupt changes and interlocking multiple components, such as semi-submersible drilling platforms and complex ship structures.
[0003] Existing surface extraction methods mainly include the following categories: The curvature flow method uses the curvature of the mesh surface as the basis for calculation. It infers the surface position by adjusting the mesh surface morphology through expansion and erosion operations. It is suitable for simple mesh models with smooth surfaces and regular curvature variations.
[0004] The distance field method calculates the directed distance field from each point on the grid surface to the nearest boundary, and uses the points with zero distance field values as a reference to interpolate and determine the surface.
[0005] Reconstruction methods are divided into two categories: boundary extraction and surface reconstruction. The former determines the normal direction by calculating feature quantities such as the projected area to define the surface, while the latter first smooths and denoises the mesh and then reconstructs a smooth surface, judging the surface by the distance between the mesh and the smooth surface.
[0006] The manifold boundary edge-based method relies on the manifold topology and closure of the mesh to identify the boundary by determining whether the edge is shared by two meshes, and then extracts the surface. Methods based on normal clustering or traditional region growing can be used to expand the surface region gradually by using grid normal similarity or topological adjacency.
[0007] The existing methods mentioned above have the following technical defects: for multi-grid edge-sharing structures with three or more grids sharing the same edge, there is a lack of effective internal and external judgment criteria, which can easily lead to errors such as surface breakage, jumps, or intrusion into the model interior; the adaptability to complex grid models with non-closed, non-manifold, and free grid interleaving is poor, and false boundaries are easily generated; some methods (such as reconstruction method and distance field method) require preprocessing of the original grid, which destroys the original geometric topology of the grid. Summary of the Invention
[0008] The purpose of this invention is to provide a method for extracting the surface of a three-dimensional mesh model, which can be used to solve the problem of mesh extraction under complex structures.
[0009] To address the above problems, this invention provides a method for extracting the surface of a three-dimensional mesh model, comprising the following steps: At least one mesh in the 3D mesh model is selected as the target region, and the mesh normal of the mesh is obtained; Extract the outer boundary of the target region and search for associated meshes that contain the outer boundary but do not belong to the target region; Based on the number of associated meshes, the following target surface determination is performed on the associated meshes: If the number of associated grids is greater than 1, then the following steps are performed: Generate mesh vectors that are perpendicular to the outer boundary and coplanar with the meshes containing the outer boundary within the target area, and feature vectors that are coplanar with each of the associated meshes. Calculate the standard angle for each of the associated grids, where the standard angle is the deflection angle when the grid vector is rotated along the grid normal to be parallel to the feature vector of the associated grid; The associated grid with the smallest standard angle is assigned to the target region; Repeat the steps of extracting the outer boundary, searching for associated meshes, and determining the target surface until no more target regions are added.
[0010] Furthermore, in the above-described three-dimensional mesh model surface extraction method, in response to the number of associated meshes being 0, the outer boundary is removed. Furthermore, in the above-mentioned three-dimensional mesh model surface extraction method, in response to the number of associated meshes being 1, the associated meshes are assigned to the target region; Furthermore, the extraction of the outer boundary of the target region in the above-mentioned three-dimensional mesh model surface extraction method includes: Extract the grid edges of all grids in the target region; Count the number of times each grid edge appears in the target region; The outer boundary is defined as the grid edge that appears only once. Furthermore, in the above-described three-dimensional mesh model surface extraction method, after the associated mesh is assigned to the target region, the method further includes: Obtain the determined grid within the target area that includes the outer boundary; Obtain the common edge direction of the outer boundary within the determined grid and the associated grid respectively. If the common edge direction is opposite, the grid normal of the associated grid is the same as the grid normal of the determined grid. If the common edge direction is the same, the grid normal of the associated grid is opposite to the grid normal of the determined grid. Furthermore, the step of calculating the standard angle of each associated mesh in the above-mentioned three-dimensional mesh model surface extraction method includes: Calculate the first angle between the grid vector and the feature vector; Offset the non-shared-edge vertices of the grid containing the outer boundary within the target area by a set distance along the grid normal, and then project them back onto the outer boundary to generate an offset grid vector; Calculate the second angle between the offset grid vector and the feature vector; If the first included angle is greater than the second included angle, then the standard angle is the first included angle; if the first included angle is less than the second included angle, then the standard angle is 360° minus the first included angle. Furthermore, in the above-mentioned three-dimensional mesh model surface extraction method, the set distance is less than or equal to 1% of the distance between the non-shared edge vertex and the outer boundary. Furthermore, the determination of the mesh normal in the above-mentioned three-dimensional mesh model surface extraction method includes: Obtain the mesh of the target region, and obtain the mesh normal based on the right-hand rule. Furthermore, in the above-mentioned three-dimensional mesh model surface extraction method, the preset direction of the required surface is obtained, and it is determined whether the preset direction is consistent with the direction of the mesh normal of the target area; If they match, the normal of the demand surface will be specified to be the same as the mesh normal; If they are inconsistent, the normal of the demand surface will be specified to be opposite to the normal of the mesh. The required surface can be either the outer surface or the inner surface. By selecting at least one mesh in the 3D mesh model as the starting point, the target region is determined, and the mesh normal of that mesh is obtained. Next, the outer boundary of the target region is extracted, i.e., the boundary between the target region and the undetermined region. Along each outer boundary, a search is conducted to identify associated meshes that contain that boundary but do not belong to the target region. The outer boundaries act as a leading guide for the outward search of the target region. When the number of associated meshes along a certain outer boundary is greater than one (i.e., multiple meshes sharing an edge), a standard angle is introduced to determine which associated mesh should be included in the target region. Attached Figure Description
[0011] Figure 1 This is an overall flowchart of the three-dimensional mesh model surface extraction method in an embodiment of the present invention; Figure 2 This is a schematic diagram of the mesh vector generation process (orthogonal projection) in an embodiment of the present invention; Figure 3 This is a schematic diagram showing the distribution of vectors on the projection plane perpendicular to the outer boundary under a multi-grid shared-edge structure in an embodiment of the present invention. Figure 4 This is a schematic diagram of the quadrant division and feature vector distribution of the projection plane in an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the standard angle determination when the first included angle is greater than the second included angle in an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the standard angle determination when the first included angle is less than the second included angle in an embodiment of the present invention; Figure 7 This is a mesh result diagram obtained after 50 iterations of a mesh model of a semi-submersible drilling platform in an embodiment of the present invention. Figure 8 This is a mesh result image obtained after 100 iterations of a mesh model of a semi-submersible drilling platform in an embodiment of the present invention; Figure 9 This is a mesh result image obtained after 150 iterations of a mesh model of a semi-submersible drilling platform in an embodiment of the present invention. Figure 10 This is a mesh result image obtained after 250 iterations of a mesh model of a semi-submersible drilling platform in an embodiment of the present invention. Figure 11 This is a graph showing the changes in the number of newly added outer boundaries and the number of newly added grids in each iteration of the search, as verified in the embodiments of the present invention. Figure 12 This is a graph showing the time taken to search for the newly added outer boundary and new mesh in each iteration of the present invention. Figure 13 This is a graph showing the average search time variation for each outer boundary in the verification of embodiments of the present invention. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0013] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0014] For ease of understanding, the terms involved in this invention are defined as follows: 3D mesh model: A three-dimensional discrete model consisting of multiple meshes (including, for example, triangular meshes, quadrilateral meshes, etc.) connected by sharing vertices and edges.
[0015] Target region: During the surface extraction process, the set of meshes that have been identified as the target surface. Initially, the target region contains the initial mesh selected by the user (hereinafter also referred to as the seed mesh); as the extraction process progresses, newly identified meshes are continuously added to this set, and the target region gradually expands until it covers the entire target surface.
[0016] Mesh normal: A unit vector representing the orientation of a mesh cell. In one or more embodiments, it can be obtained based on the right-hand rule: perform a cross product of the direction vectors from the first vertex to the second vertex and the direction vectors from the second vertex to the third vertex of the mesh, and normalize the result to a unit length. The resulting vector is the mesh normal of the mesh.
[0017] Outer boundary: A mesh edge that appears only once in the target region. In one or more embodiments, if a mesh edge is shared by two or more meshes in the target region, then that edge is an internal edge of the target region and does not constitute an outer boundary. The outer boundary is the leading edge boundary of the target region as it extends outward.
[0018] Associated mesh: A mesh that contains an outer boundary (i.e., contains both connected vertices of that outer boundary) but does not belong to the target region. Associated meshes are candidate objects for target surface determination.
[0019] Mesh vector: A vector perpendicular to an outer boundary and coplanar with the mesh containing that outer boundary within the target area. In one or more embodiments, it is generated by orthogonally projecting the vertices of the mesh that are not on the outer boundary (i.e., non-shared-edge vertices) onto the line containing the outer boundary. The direction vector from the projection point to the non-shared-edge vertex is the mesh vector.
[0020] Eigenvector: A vector perpendicular to an outer boundary and coplanar with an associated mesh. It is generated in the same way as the mesh vector: the non-shared vertices of the associated mesh are orthogonally projected onto the line containing the outer boundary; the direction vector from the projection point to the non-shared vertex is the eigenvector.
[0021] Standard angle: The deflection angle of a mesh vector when it is rotated along the mesh normal until it is parallel to the characteristic vector of a certain associated mesh. The standard angle ranges from 0° to 360° (excluding 360°) and is used to uniquely determine the next mesh to be assigned to the target region in a multi-mesh shared-edge scenario.
[0022] Demand side: The type of target surface that users expect to extract, including external surfaces (surfaces in contact with external space) or internal surfaces (surfaces in contact with internal cavities).
[0023] Preset direction: A reference direction vector used to determine the orientation of the required surface.
[0024] The embodiments of the present invention will now be described in detail, with reference to... Figure 1 Specifically, it includes the following steps: Step S100: Select at least one mesh from the three-dimensional mesh model of the surface to be extracted as the target area, and obtain the mesh normal of the mesh.
[0025] For ease of description, the initially selected mesh will be referred to as the seed mesh. There are no special restrictions on the selection of the seed mesh; it can be any mesh located in the 3D model according to engineering requirements. Examples include meshes in flat areas, concave areas, hole edges, or bends of the model. In one or more embodiments, if the model has a distinct outer surface area, the mesh in that area can be preferentially selected as the seed mesh to improve the efficiency of subsequent iterations.
[0026] In one or more embodiments, the grid of the target region is obtained, the grid normal is obtained based on the right-hand rule, the cross product operation is performed on the direction vector from the first vertex to the second vertex and the direction vector from the second vertex to the third vertex of the grid, and the result is normalized to a unit length to obtain the grid normal.
[0027] In one or more embodiments, a preset direction of the demand surface can be further obtained, and it can be determined whether the preset direction is consistent with the direction of the grid normal of the target area. Specifically, the preset direction can be obtained in the following three exemplary ways: Method 1: User interaction via a graphical user interface. The user specifies a direction vector in the 3D view by clicking or dragging with the mouse; this direction vector is the preset direction.
[0028] Method two allows the user to directly specify a global coordinate axis direction. For example, in shipbuilding engineering, the user can specify the positive Z-axis direction (vertically upward) as the preset direction.
[0029] Method 3: The system automatically infers the direction based on the seed mesh's position in the model. For example, it calculates the direction vector from the geometric center of the seed mesh to the center of the overall bounding box of the model and uses this direction vector as the preset direction.
[0030] When determining whether the preset direction and the mesh normal direction are consistent, in one or more embodiments, this can be achieved by calculating the dot product of the preset direction vector and the mesh normal vector: if the dot product is greater than zero (i.e., the angle between them is less than 90°), the directions are considered consistent, and the normal of the required surface is specified to be the same as the mesh normal; if the dot product is less than zero (i.e., the angle between them is greater than 90°), the directions are considered inconsistent, and the normal of the required surface is specified to be opposite to the mesh normal. The required surface can be an outer surface or an inner surface.
[0031] The seed mesh is stored in the target region as the starting point for subsequent propagation and determination. The marking process only records the mesh number and the required surface type, without modifying the geometric information of the mesh itself.
[0032] Step S200: Extract the outer boundary of the target region and search for associated meshes that contain the outer boundary but do not belong to the target region; like Figure 2 As shown, in one or more embodiments, extracting the outer boundary of the target region includes the following steps: Step S210: Traverse all determined grids in the target region, extract all grid edges of each grid, and form a grid edge set. The grid edge set records the two connecting vertices of each edge and the grid number to which it belongs.
[0033] Step S220: For each edge in the grid edge set, count the number of times that edge appears in the target region. In one or more embodiments, if the two connecting vertices of two edges have completely identical numbers (regardless of order), they are determined to be the same edge.
[0034] Step S230: Filter out grid edges that appear only once as outer boundaries. Edges that appear twice or more are internal edges of the target region and are not included in subsequent searches. After filtering, a set of outer boundaries is formed.
[0035] It should be noted that the above method for extracting the outer boundary is an exemplary implementation. In other embodiments, the outer boundary can also be determined by establishing a half-edge data structure and directly querying the half-edge without a counterpart edge, with the same technical effect as the frequency statistics method described above.
[0036] Step S300: Based on the number of associated meshes, perform the following target surface determination on the associated meshes: For each outer boundary in the outer boundary set, search for associated meshes that contain that outer boundary but do not belong to the target region, and perform target surface determination based on the number of associated meshes. Specifically, this includes the following steps: Step S310: Select an outer boundary and search for meshes in the 3D mesh model that are not included in the target area. These meshes are the associated meshes.
[0037] In a 3D mesh model, any outer boundary must be contained within at least one identified mesh within the target region; otherwise, the edge will not be recognized as an outer boundary. Therefore, after excluding meshes within the target region, the number of associated meshes may be 0, 1, or greater than 1.
[0038] Step S320: Perform target surface determination based on the number of associated meshes.
[0039] Case 1: The number of associated grids is 0.
[0040] This indicates that the outer boundary is only contained within the determined meshes within the target region, and there are no other meshes connected to this outer boundary outside the target region. This outer boundary is a free edge of the model, exemplarily including hole edges, open boundaries, etc. This outer boundary is removed and will no longer participate in subsequent searches.
[0041] Case 2: The number of associated grids is 1.
[0042] This indicates that the outer boundary connects only one mesh outside the target region. The associated mesh is then incorporated into the target region. This scenario applies to manifold topologies and regular mesh regions with no intersecting meshes.
[0043] Case 3: The number of associated grids is greater than 1.
[0044] This indicates that the outer boundary connects to multiple grids outside the target area, meaning there is a multi-grid shared-edge structure, which implies a complex structure at this location. The following will combine... Figure 2 , Figure 3 and Figure 4 Please provide a detailed explanation.
[0045] Let A and B be the two connecting vertices of the outer boundary. Within the target region, the determined mesh containing the outer boundary has a non-shared edge vertex P1 that is not on the outer boundary. Each associated mesh has non-shared edge vertices P2, P3, ... P1. i …、P n .
[0046] The process of generating grid vectors is as follows: Figure 2 As shown, the non-shared-edge vertex P1 is orthogonally projected onto the line containing the outer boundary AB. Specifically, the projection length of the direction vector from vertex P1 to vertex A along the outer boundary AB is calculated. This projection length represents the component of the non-shared-edge vertex along the outer boundary. Based on the projection length and the unit direction vector of the outer boundary, the position of the projection point Q1 on the outer boundary AB is determined. The direction vector from the projection point Q1 to the non-shared-edge vertex P1 is the mesh vector. This mesh vector is perpendicular to the outer boundary AB and coplanar with the determined mesh.
[0047] The characteristic vectors of each associated grid are generated in the same way as the grid vectors. Taking the i-th associated grid as an example, its non-shared edge vertices P are... i By orthogonally projecting onto the line containing the outer boundary AB, we obtain the projection point P. i , by projection point Q i Point to non-shared-edge vertex P i The direction vector is the feature vector of the associated grid.
[0048] In this embodiment, the number of associated meshes on the outer boundary is 3 as an example for illustration. (Refer to...) Figure 3 Grid 1 is the determined grid, and grids 2, 3, and 4 are associated grids. Since all grid vectors and eigenvectors are perpendicular to the outer boundary AB, they all lie in a projection plane perpendicular to the outer boundary. Figure 4 As shown, within the projection plane, For the determined mesh vector, For the feature vector of grid 2, The feature vector of grid 3, grid vector The plane is divided into two half-plane regions, namely quadrant 1 and quadrant 2, the region located on the positive rotation side of the mesh normal and the region located on the negative rotation side of the mesh normal, which correspond to different value ranges of the standard angle. The standard angle is defined as the deflection angle when the mesh vector rotates along the mesh normal to be parallel to the characteristic vector of a certain associated mesh, and the value range is 0° to 360° (excluding 360°).
[0049] In one or more embodiments, the calculation of the standard angle includes the following steps: The angle between the grid vector and the eigenvector is calculated and defined as the first angle. Since this angle is obtained by the inverse cosine operation of the vector dot product, its value ranges from 0° to 180°, and it is not yet possible to distinguish which side of the projection plane the eigenvector is located on.
[0050] refer to Figure 4 The non-shared-edge vertices of the mesh containing the outer boundary within the target area are offset by a set distance along the mesh normal to obtain temporary vertices. These temporary vertices are then orthogonally projected onto the line containing the outer boundary; the direction vector from the new projection point to the temporary vertex is the offset mesh vector. Offset grid vector Relative to grid vector A slight angular deflection occurred, the direction of which indicated the side where the grid normal was located, thus providing an absolute reference for determining the orientation of the eigenvectors.
[0051] In one or more embodiments, the distance is set to be less than or equal to 1% of the distance between the non-shared edge vertex and the outer boundary. The principle for selecting this value is: the offset should be small enough to ensure that the angular deviation between the offset grid vector and the grid vector in the projection plane is minimal and does not affect the judgment accuracy; at the same time, the offset cannot be zero, otherwise the offset grid vector will coincide with the grid vector, losing its function as a direction reference.
[0052] Calculate the angle between the offset grid vector and the eigenvector, and define it as the second angle.
[0053] The standard angle is determined by comparing the size of the first and second included angles. If the first included angle is greater than the second included angle, it indicates that the eigenvector is located on the side biased by the offset mesh vector, that is, on the side of positive rotation of the mesh normal. In this case, the standard angle is equal to the first included angle. If the first included angle is less than the second included angle, it indicates that the eigenvector is located on the side of negative rotation of the mesh normal. In this case, the standard angle is equal to 360° minus the first included angle.
[0054] The standard angle is calculated using grid 2 as an example below. First, the grid vector of grid 1 is calculated. With the feature vector of grid 2 The first angle between Next, calculate the grid vector of grid 1. With offset grid vector The second included angle between Let's compare the first included angle. Second angle The size between them, if the first included angle Greater than the second included angle ,like Figure 5 As shown, at this time the standard angle is equal to the first included angle. If the first included angle Less than the second included angle ,like Figure 6 As shown, the standard angle at this time is equal to 360° minus the first included angle. .
[0055] The physical essence of the above determination lies in the fact that the offset grid vector is slightly biased towards the side where the grid normal is located due to the offset along the normal. If the angle between a certain feature vector and the offset grid vector (the second angle) is smaller than the angle between it and the original grid vector (the first angle), it means that the feature vector is located on the same side of the offset direction—that is, the positive rotation side of the normal, and the standard angle is directly taken as the angle value (between 0° and 180°); conversely, the feature vector is located on the negative rotation side of the normal, and the standard angle is taken as 360° minus the angle value (between 180° and 360°).
[0056] like Figure 4 The typical cross-shaped structure shown has eigenvectors of the associated meshes uniformly distributed around the mesh vectors, with standard angles of approximately 90°, 180°, and 270°. The associated mesh with the smallest standard angle (approximately 90°) is closest to the normal positive spiral side of the mesh vector.
[0057] After calculating the standard angles for all associated grids of the outer boundary, the associated grid with the smallest standard angle is selected and assigned to the target region.
[0058] The minimum standard angle means the starting position of the associated mesh closest to the mesh vector in the projection plane along the positive rotation direction of the mesh normal. In other words, it's the minimum deflection angle when the mesh vector rotates along the positive rotation direction of the mesh normal until it is parallel to the characteristic vector of any associated mesh. Geometrically, this corresponds to the mesh that most tightly wraps around the outermost part of the target region. Through this selection rule, the search path is strictly constrained to the outermost contour of the model, avoiding intrusion into the model's interior or path breakage.
[0059] Step S330: Obtain the determined grids within the target region that include the outer boundary, and obtain the common edge directions of the outer boundary in both the determined grids and the newly assigned associated grids. The common edge directions are determined by the arrangement order of the two connecting vertices of the outer boundary within their respective grids. After the associated grid is assigned to the target region, it is necessary to determine the grid normal of the newly assigned grid to ensure the consistency of the grid normal during subsequent propagation.
[0060] If the common edge directions are opposite (i.e., the order in which the vertices of the outer boundary are traversed in the two grids are opposite), then the grid normal of the newly assigned grid is the same as the grid normal of the already assigned grid. If the common edge directions are the same (i.e., the order in which the vertices of the outer boundary are traversed in the two grids are consistent), then the grid normal of the newly assigned grid is opposite to the grid normal of the already assigned grid.
[0061] The physical essence of the above determination is that for two adjacent grids that share an edge, if they form a continuous outer surface, the directions of travel along their respective grid boundaries should be opposite at the shared edge (one goes clockwise and the other goes counterclockwise) to ensure that the normals of the two grids face the same side.
[0062] Step S400: After incorporating the newly added meshes in this iteration into the target region, return to step S200 to re-extract the outer boundary, and execute step S300 to perform associated mesh search and target surface determination. This process is repeated until no new meshes are added to the target region in a given iteration, at which point the iteration terminates. At this point, all determined meshes in the target region constitute the extracted target surface. In one or more embodiments, the iteration termination condition can be further configured, exemplarily including: setting a maximum iteration count limit, setting a threshold for the number of newly added meshes, setting a node coordinate range limit, specifying a specific mesh to stop searching, etc., to adapt to mesh models of different scales and engineering needs.
[0063] The effects of the embodiments of the present invention will be described in detail below with reference to specific applications.
[0064] A three-dimensional mesh model of a semi-submersible drilling platform was selected as the verification object. The model contains complex structures such as multiple meshes sharing edges, concave areas, and holes, with a total of 392,524 meshes.
[0065] Select one mesh in the bottom region of the platform as the seed mesh, obtain its mesh normal, designate the required surface as the outer surface, and assign it to the target region. Execute the iterative process of steps S200 to S400 above. Figures 7 to 10 The results, as shown, are the meshes obtained after 50, 100, 150, and 250 iterations. A total of 74,445 meshes were obtained on the outer surface in this extraction, which took approximately 123.7 seconds. The extracted results show no breaks or jumps in the shared edge regions of the multi-mesh arrays, and the outer surface perfectly matches the actual contour of the model, preserving all key features such as concavities, holes, and bends. The extracted results can be directly imported into finite element analysis software for subsequent simulations.
[0066] The number of new outer boundaries and grids searched in each iteration Figure 11 As shown, the horizontal axis represents the number of searches, and the vertical axes represent the number of new outer boundaries and the number of new grids added in each search. In the early stages of iteration, the number of new boundaries is relatively small; as the target region expands, it reaches a peak between approximately the 100th and 175th iterations; thereafter, it gradually decreases to zero, indicating that the boundary of the target region has been completely closed.
[0067] The time taken to search for the newly added outer boundary and mesh in each iteration is as follows: Figure 12 As shown, the time taken for the search boundary and search grid changes is related to... Figure 11 The trend in the number of new cases is consistent with expectations.
[0068] like Figure 13 As shown, the average search time for each outer boundary remains stable throughout the iteration process, ranging from approximately 0.0007 to 0.0011 seconds, indicating that the single-step computational complexity of this method does not increase significantly with the expansion of the target region.
[0069] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the protection scope of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
Claims
1. A method for extracting the surface of a three-dimensional mesh model, characterized in that, Includes the following steps: At least one mesh in the 3D mesh model is selected as the target region, and the mesh normal of the mesh is obtained; Extract the outer boundary of the target region and search for associated meshes that contain the outer boundary but do not belong to the target region; Based on the number of associated meshes, the following target surface determination is performed on the associated meshes: If the number of associated grids is greater than 1, then the following steps are performed: Generate mesh vectors that are perpendicular to the outer boundary and coplanar with the meshes containing the outer boundary within the target area, and feature vectors that are coplanar with each of the associated meshes. Calculate the standard angle for each of the associated grids, where the standard angle is the deflection angle when the grid vector is rotated along the grid normal to be parallel to the feature vector of the associated grid; The associated grid with the smallest standard angle is assigned to the target region; Repeat the steps of extracting the outer boundary, searching for associated meshes, and determining the target surface until no more target regions are added.
2. The method for extracting the surface of a three-dimensional mesh model according to claim 1, characterized in that, If the number of associated meshes is 0, then the outer boundary is removed.
3. The method for extracting the surface of a three-dimensional mesh model according to claim 1, characterized in that, If the number of associated grids is 1, then the associated grid is assigned to the target region.
4. The method for extracting the surface of a three-dimensional mesh model according to claim 1, characterized in that, Extracting the outer boundary of the target region includes: Extract the grid edges of all grids in the target region; Count the number of times each grid edge appears in the target region; The outer boundary is defined as the grid edge that appears only once.
5. The method for extracting the surface of a three-dimensional mesh model according to claim 1, characterized in that, After the associated grid is assigned to the target region, the following is also included: Obtain the determined grid within the target area that includes the outer boundary; Obtain the common edge direction of the outer boundary within the determined grid and the associated grid respectively. If the common edge direction is opposite, the grid normal of the associated grid is the same as the grid normal of the determined grid. If the common edge direction is the same, the grid normal of the associated grid is opposite to the grid normal of the determined grid.
6. The method for extracting the surface of a three-dimensional mesh model according to claim 1, characterized in that, The step of calculating the standard angle of each of the associated grids includes: Calculate the first angle between the grid vector and the feature vector; Offset the non-shared-edge vertices of the grid containing the outer boundary within the target area by a set distance along the grid normal, and then project them back onto the outer boundary to generate an offset grid vector; Calculate the second angle between the offset grid vector and the feature vector; If the first included angle is greater than the second included angle, then the standard angle is the first included angle; if the first included angle is less than the second included angle, then the standard angle is 360° minus the first included angle.
7. The method for extracting the surface of a three-dimensional mesh model according to claim 6, characterized in that, The set distance is less than or equal to 1% of the distance between the non-shared edge vertex and the outer boundary.
8. The method for extracting the surface of a three-dimensional mesh model according to claim 1, characterized in that, Determining its mesh normal includes: Obtain the mesh of the target region, and obtain the mesh normal based on the right-hand rule.
9. The method for extracting the surface of a three-dimensional mesh model according to claim 8, characterized in that, Obtain the preset direction of the demand surface and determine whether the preset direction is consistent with the direction of the grid normal of the target area; If they match, the normal of the demand surface will be specified to be the same as the mesh normal; If they are inconsistent, the normal of the demand surface will be specified to be opposite to the normal of the mesh. The required surface can be either the outer surface or the inner surface.