Three-dimensional model processing method and device, electronic equipment and storage medium

By constructing and optimizing a high-order tetrahedral mesh of a 3D model, and performing feature detection and fitting, the problem of high-order mesh failure at locations with large curvature is solved, thus achieving accurate capture and efficient expression of the model's geometric features.

CN115564923BActive Publication Date: 2026-05-01DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DUXIAOMAN TECH (BEIJING) CO LTD
Filing Date
2022-09-28
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing techniques are prone to failure when performing high-order tetrahedral mesh generation on 3D models, especially in areas with large curvature, making it difficult to accurately capture the geometric features of the model.

Method used

By acquiring the 3D model and mesh parameters, an initial high-order tetrahedral mesh is constructed. Feature detection is performed, and fitting processing is carried out based on geometric features, including optimization operations such as edge flipping, face flipping, edge deletion, face deletion, point insertion, and point deletion. Corner points, ridge points, and planar points are determined, and the movement of intermediate mesh points is controlled to fit the target high-order tetrahedral mesh.

Benefits of technology

It effectively solves the problem of meshing failure in areas with large curvature of high-order meshes, ensuring that high-order meshes accurately capture the geometric features of the model in areas with large curvature, and improving the accuracy and robustness of mesh generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115564923B_ABST
    Figure CN115564923B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, electronic device, and storage medium for processing three-dimensional models. The method includes: acquiring a three-dimensional model and mesh parameters, wherein the three-dimensional model is obtained by modeling a three-dimensional object; dividing the three-dimensional model into linear tetrahedral meshes, wherein each linear tetrahedral mesh comprises multiple linear tetrahedral elements; constructing an initial higher-order tetrahedral mesh based on the mesh parameters and the linear tetrahedral meshes, wherein the initial higher-order tetrahedral mesh comprises multiple higher-order tetrahedral elements; performing feature detection on the initial higher-order tetrahedral mesh to determine geometric features; and fitting the initial higher-order tetrahedral mesh based on the geometric features to obtain a target higher-order tetrahedral mesh. This invention solves the technical problem that meshing may fail at locations with large curvature when dividing a three-dimensional model into higher-order tetrahedral meshes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and more specifically, to a method, apparatus, electronic device, and storage medium for processing three-dimensional models. Background Technology

[0002] In the process of meshing 3D models, for highly curved regions, using high-order meshes with curved edge elements often offers greater flexibility than using linear meshes. However, the key challenge in using high-order meshes in complex geometries lies in developing an efficient and robust high-order meshing method.

[0003] High-order meshing methods primarily address two issues: firstly, the high-order mesh must accurately represent the characteristics of the geometric model; secondly, the constructed high-order elements must be effective and possess high precision. Current high-order tetrahedral meshing methods may fail at locations with significant curvature, making it difficult to accurately capture the geometric features of the model while ensuring the effectiveness of the high-order mesh. Summary of the Invention

[0004] This invention provides a method, apparatus, electronic device, and storage medium for processing three-dimensional models, to at least solve the technical problem that meshing may fail at locations with large curvature when performing high-order tetrahedral meshing on three-dimensional models.

[0005] According to one embodiment of the present invention, a method for processing a three-dimensional model is provided, comprising:

[0006] The process involves acquiring a 3D model and mesh parameters, with the 3D model derived from modeling a 3D object. The 3D model is then divided into linear tetrahedral meshes, each consisting of multiple linear tetrahedral elements. An initial higher-order tetrahedral mesh is constructed based on the mesh parameters and the linear tetrahedral meshes, again consisting of multiple higher-order tetrahedral elements. Feature detection is performed on the initial higher-order tetrahedral mesh to determine its geometric features. Finally, the initial higher-order tetrahedral mesh is fitted based on these geometric features to obtain the target higher-order tetrahedral mesh.

[0007] Optionally, the process of meshing the 3D model to obtain a linear tetrahedral mesh includes: meshing the 3D model to obtain a first tetrahedral mesh; and performing optimization operations on the first tetrahedral mesh to obtain a linear tetrahedral mesh, wherein the optimization operations include at least edge flipping, face flipping, edge deletion, face deletion, point insertion, and point deletion.

[0008] Optionally, constructing an initial higher-order tetrahedral mesh based on mesh parameters and a linear tetrahedral mesh includes: determining the target order of the linear tetrahedral elements based on mesh parameters; inserting nodes into the linear tetrahedral elements according to the target order to obtain higher-order tetrahedral elements; and determining the initial higher-order tetrahedral mesh based on the higher-order tetrahedral elements.

[0009] Optionally, feature detection to determine geometric features of the initial high-order tetrahedral mesh includes: obtaining feature values ​​of the mesh points of the initial high-order tetrahedral mesh; classifying the mesh points into corner points, ridge points, and planar points based on the feature values; and determining geometric features based on the corner points, ridge points, and planar points.

[0010] Optionally, the eigenvalues ​​include a first eigenvalue, a second eigenvalue, and a third eigenvalue. Dividing the mesh points of the initial higher-order tetrahedral mesh into corner points, ridge points, and planar points based on the eigenvalues ​​includes: if the first, second, and third eigenvalues ​​of a mesh point are equal, the mesh point is marked as a corner point; if the first and second eigenvalues ​​of a mesh point are equal, and the third eigenvalue is greater than the second eigenvalue, the mesh point is marked as a ridge point; if the second and third eigenvalues ​​of a mesh point are equal, and the first eigenvalue is less than the second eigenvalue, the mesh point is marked as a planar point.

[0011] Optionally, the process of fitting the initial higher-order tetrahedral mesh to obtain the target higher-order tetrahedral mesh based on geometric features includes: sampling the surface of the 3D model to obtain a 3D point set; dividing the mesh points into end mesh points and middle mesh points according to their positions on the edges of the higher-order tetrahedral elements; and controlling the movement of the middle mesh points to fit the initial higher-order tetrahedral mesh based on the 3D point set and geometric features. Specifically, when controlling the movement of the mesh points, it is necessary to determine the markings of the end mesh points on the edges where the middle mesh points are located, and control the movement of the mesh points based on these markings.

[0012] Optionally, the processing methods for the 3D model also include: topology optimization and geometry optimization of the target high-order mesh.

[0013] According to one embodiment of the present invention, a three-dimensional model processing apparatus is also provided, comprising:

[0014] The system comprises the following modules: an acquisition module for acquiring the 3D model and mesh parameters (the 3D model is obtained by modeling a 3D object); a meshing module for meshing the 3D model to obtain a linear tetrahedral mesh, where the linear tetrahedral mesh consists of multiple linear tetrahedral elements; a construction module for constructing an initial higher-order tetrahedral mesh based on the mesh parameters and the linear tetrahedral mesh, where the initial higher-order tetrahedral mesh consists of multiple higher-order tetrahedral elements; a feature detection module for performing feature detection on the initial higher-order tetrahedral mesh to determine geometric features; and a fitting module for fitting the initial higher-order tetrahedral mesh based on the geometric features to obtain the target higher-order tetrahedral mesh.

[0015] Optionally, the meshing module is also used to mesh the 3D model to obtain a linear tetrahedral mesh, including: meshing the 3D model to obtain a first tetrahedral mesh; and performing optimization operations on the first tetrahedral mesh to obtain a linear tetrahedral mesh, wherein the optimization operations include at least edge flipping, face flipping, edge deletion, face deletion, point insertion, and point deletion.

[0016] Optionally, the building module is also used to construct an initial higher-order tetrahedral mesh based on mesh parameters and a linear tetrahedral mesh, including: determining the target order of the linear tetrahedral elements based on mesh parameters; inserting nodes into the linear tetrahedral elements according to the target order to obtain higher-order tetrahedral elements; and determining the initial higher-order tetrahedral mesh based on the higher-order tetrahedral elements.

[0017] Optionally, the feature detection module is also used to perform feature detection on the initial high-order tetrahedral mesh to determine geometric features, including: obtaining the feature values ​​of the mesh points of the initial high-order tetrahedral mesh; classifying the mesh points into corner points, ridge points, and planar points according to the feature values; and determining geometric features based on the corner points, ridge points, and planar points.

[0018] Optionally, the feature values ​​in the feature detection module include a first feature value, a second feature value, and a third feature value. The feature detection module is also used to classify the grid points of the initial high-order tetrahedral mesh into corner points, ridge points, and planar points according to the feature values, including: if the first feature value, the second feature value, and the third feature value of the grid point are equal, the grid point is marked as a corner point; if the first feature value and the second feature value of the grid point are equal, and the third feature value is greater than the second feature value, the grid point is marked as a ridge point; if the second feature value and the third feature value of the grid point are equal, and the first feature value is less than the second feature value, the grid point is marked as a planar point.

[0019] Optionally, the fitting module is also used to fit the initial higher-order tetrahedral mesh to obtain the target higher-order tetrahedral mesh based on geometric features, including: sampling the surface of the 3D model to obtain a 3D point set; dividing the mesh points into end mesh points and middle mesh points according to their positions on the edges of the higher-order tetrahedral elements; and controlling the movement of the middle mesh points to fit the initial higher-order tetrahedral mesh based on the 3D point set and geometric features. Specifically, when controlling the movement of the mesh points, it is necessary to determine the markings of the end mesh points on the edges where the middle mesh points are located, and control the movement of the mesh points based on the markings of the end mesh points.

[0020] Optionally, the 3D model processing device also includes an optimization module, which is used to perform topology optimization and geometry optimization on the target high-order mesh.

[0021] According to one embodiment of the present invention, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the processing method of the three-dimensional model as described above.

[0022] According to one embodiment of the present invention, a non-volatile storage medium is also provided, wherein a computer program is stored in the non-volatile storage medium, and the computer program is configured to execute the processing method of the three-dimensional model described above when running on a computer or processor.

[0023] In this embodiment of the invention, a three-dimensional model and mesh parameters are first obtained. The three-dimensional model is obtained by modeling a three-dimensional object. The three-dimensional model is then divided into linear tetrahedral meshes, each comprising multiple linear tetrahedral elements. An initial higher-order tetrahedral mesh is constructed based on the mesh parameters and the linear tetrahedral meshes, each comprising multiple higher-order tetrahedral elements. Feature detection is performed on the initial higher-order tetrahedral mesh to determine its geometric features. The initial higher-order tetrahedral mesh is then fitted with these geometric features to obtain a target higher-order tetrahedral mesh. The method provided by this invention, after constructing the initial higher-order tetrahedral mesh, performs feature detection on the higher-order tetrahedral mesh. The geometric features obtained from the feature detection are then fitted with the higher-order tetrahedral mesh to obtain the target higher-order tetrahedral mesh. Feature detection can better capture the geometric features of the more curved portions of the three-dimensional model, solving the technical problem that meshing may fail at locations with greater curvature when dividing a three-dimensional model into higher-order tetrahedral meshes. This ensures accurate capture of the model's geometric features while maintaining the effectiveness of the higher-order mesh. Attached Figure Description

[0024] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0025] Figure 1 This is a flowchart of a method for processing a three-dimensional model according to one embodiment of the present invention;

[0026] Figure 2 This is a schematic diagram of a linear tetrahedron according to one embodiment of the present invention;

[0027] Figure 3 This is a schematic diagram of a higher-order tetrahedron according to one embodiment of the present invention;

[0028] Figure 4 This is a flowchart illustrating a method for processing a three-dimensional model according to one embodiment of the present invention;

[0029] Figure 5 This is a structural block diagram of a three-dimensional model processing device according to one embodiment of the present invention. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] According to an embodiment of the present invention, an embodiment of a method for processing three-dimensional models is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0033] This method embodiment can be executed in an electronic device, similar control device, or system that includes a memory and a processor. Taking an electronic device as an example, the electronic device may include one or more processors and a memory for storing data. Optionally, the electronic device may also include a communication device for communication functions and a display device. Those skilled in the art will understand that the above structural description is merely illustrative and does not limit the structure of the electronic device. For example, the electronic device may include more or fewer components than described above, or have a different configuration than described above.

[0034] A processor may include one or more processing units. For example, a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a field-programmable gate array (FPGA), a neural network processing unit (NPU), a tensor processing unit (TPU), or an artificial intelligence (AI) processor. Different processing units may be independent components or integrated into one or more processors. In some instances, electronic devices may also include one or more processors.

[0035] The memory can be used to store computer programs, such as the computer program corresponding to the three-dimensional model processing method in this embodiment of the invention. The processor implements the aforementioned three-dimensional model processing method by running the computer program stored in the memory. The memory may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to electronic devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0036] Communication devices are used to receive or send data via a network. Specific examples of such networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the communication device includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the communication device may be a radio frequency (RF) module used for wireless communication with the Internet.

[0037] Display devices can be, for example, touchscreen liquid crystal displays (LCDs) and touch displays (also referred to as "touchscreens" or "touch displays"). The LCD allows users to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows users to interact with the GUI through finger contact and / or gestures on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.

[0038] Figure 1 This is a flowchart of a method for processing a three-dimensional model according to an embodiment of the present invention. Figure 1 As shown, the method for processing 3D models includes the following steps:

[0039] Step S101: Obtain the 3D model and mesh parameters.

[0040] The 3D model is obtained by modeling 3D objects in the real world.

[0041] For example, a 3D modeling program is used to perform 3D modeling on the automotive component to obtain a 3D model of the automotive component. This method obtains the 3D model of the component and processes it.

[0042] Step S102: Divide the 3D model into linear tetrahedral meshes.

[0043] A linear tetrahedral mesh consists of multiple linear tetrahedral elements. In other words, multiple linear tetrahedral elements together constitute a linear tetrahedral mesh. A linear tetrahedral element is a tetrahedron obtained by dividing a 3D model; dividing a 3D model means dividing it into multiple smaller tetrahedrons.

[0044] The process of dividing a 3D model into a linear tetrahedral mesh can be performed using common meshing tools, such as Hypermesh and ANSYS.

[0045] Step S103: Construct an initial high-order tetrahedral mesh based on the mesh parameters and the linear tetrahedral mesh.

[0046] The initial higher-order tetrahedral mesh consists of multiple higher-order tetrahedral elements, and the mesh parameters include at least the order of the higher-order tetrahedral elements.

[0047] It should be noted that when using the finite element method, the solution domain needs to be discretized, and tetrahedrons are a commonly used element type for discretization. A typical linear tetrahedral element, also known as a first-order element, consists of four nodes. When nodes are added to the edges, faces, or interior of the tetrahedron of a linear element, it is transformed into a higher-order element. Using higher-order elements in the finite element method yields a more accurate solution.

[0048] Specifically, higher-order tetrahedral elements are the constituent units of the initial higher-order tetrahedral mesh. When constructing the initial higher-order tetrahedral mesh, it is necessary to first construct higher-order tetrahedral elements. Multiple higher-order tetrahedral elements together constitute the initial higher-order tetrahedral mesh.

[0049] Step S104: Perform feature detection on the initial high-order tetrahedral mesh to determine its geometric features.

[0050] Step S105: Fit the initial high-order tetrahedral mesh according to the geometric features to obtain the target high-order tetrahedral mesh.

[0051] The fitting process involves bending the edges of the linear tetrahedral elements to fit the surface nodes to the model boundary, thus conforming to the model's geometry. The fitted target high-order tetrahedral mesh accurately represents the geometric features of the 3D model.

[0052] In this embodiment of the invention, a three-dimensional model and mesh parameters are first obtained. The three-dimensional model is obtained by modeling a three-dimensional object. The three-dimensional model is then divided into linear tetrahedral meshes, each comprising multiple linear tetrahedral elements. An initial higher-order tetrahedral mesh is constructed based on the mesh parameters and the linear tetrahedral meshes, each comprising multiple higher-order tetrahedral elements. Feature detection is performed on the initial higher-order tetrahedral mesh to determine its geometric features. The initial higher-order tetrahedral mesh is then fitted with these geometric features to obtain a target higher-order tetrahedral mesh. The method provided by this invention, after constructing the initial higher-order tetrahedral mesh, performs feature detection on the higher-order tetrahedral mesh. The geometric features obtained from the feature detection are then fitted with the higher-order tetrahedral mesh to obtain the target higher-order tetrahedral mesh. Feature detection can better capture the geometric features of the more curved portions of the three-dimensional model, solving the technical problem that meshing may fail at locations with greater curvature when dividing a three-dimensional model into higher-order tetrahedral meshes. This ensures accurate capture of the model's geometric features while maintaining the effectiveness of the higher-order mesh.

[0053] Optionally, in step S102, meshing the 3D model to obtain a linear tetrahedral mesh may include the following steps:

[0054] Step S1021: Divide the three-dimensional model to obtain the first tetrahedral mesh.

[0055] Step S1022: Optimize the first tetrahedral mesh to obtain a linear tetrahedral mesh. The optimization operation includes at least edge flipping, face flipping, edge deletion, face deletion, point insertion, and point deletion.

[0056] Specifically, the first tetrahedral mesh obtained by dividing the 3D model is the initial linear tetrahedral mesh. Then, the initial linear tetrahedral mesh is optimized to obtain a high-quality linear tetrahedral mesh. A high-quality linear tetrahedral mesh can reduce the generation time of higher-order tetrahedral meshes.

[0057] Optionally, in step S103, constructing the initial higher-order tetrahedral mesh based on the mesh parameters and the linear tetrahedral mesh may include the following steps:

[0058] Step S1031: Determine the target order of the linear tetrahedral element based on the mesh parameters.

[0059] The mesh parameters include the target order of the preset linear tetrahedral elements. When constructing higher-order tetrahedral elements, the order of the higher-order tetrahedral elements must first be determined.

[0060] Step S1032: Insert nodes into the linear tetrahedral element according to the target order to obtain a higher-order tetrahedral element.

[0061] Specifically, when constructing a higher-order tetrahedral element, a higher-order tetrahedral element is first defined based on the higher-order tetrahedral element order and Bernstein polynomial in the mesh parameters. Then, according to the definition of the higher-order tetrahedral element, nodes are inserted into each linear tetrahedral element to convert the linear tetrahedral element into a higher-order tetrahedral element.

[0062] Defining a higher-order tetrahedral element based on the higher-order tetrahedral element order and Bernstein polynomial in the mesh parameters involves three definition steps:

[0063] The first step in defining a higher-order tetrahedral element is: for any point within the simplex t in d-dimensional space... Each of these can be represented by a set of (d+1)-dimensional non-negative vectors, which can be represented as follows:

[0064]

[0065] It should be noted that the simplex is the most fundamental concept in algebraic topology. The simplex is a generalization of triangles and tetrahedrons, and a k-dimensional simplex is a convex polyhedron containing (k+1) nodes.

[0066] Step 2 in defining a higher-order tetrahedral element: For any Bernstein polynomial on a d-dimensional n-order simplex, its barycentric index i can be defined as a set of (d+1)-dimensional nonnegative integers. , where n is the order of the higher-order tetrahedral elements in the mesh parameters. Therefore, the Bernstein polynomial on the corresponding simplex t can be defined as:

[0067]

[0068] Step 3 in defining a higher-order tetrahedral element: Further define a d-dimensional n-order higher-order simplex. Given a set of Bernstein control points The corresponding higher-order simplex It can be mapped The definition is as follows:

[0069]

[0070] It should be noted that, referring to Figure 2 and Figure 3 , Figure 2 This is a schematic diagram of a linear tetrahedron 200. Figure 3 This is a schematic diagram of a higher-order tetrahedron 300. A linear tetrahedron 200 is a standard tetrahedron, consisting of four faces and six edges, each with two endpoints. To more accurately represent models with complex shapes, the higher-order tetrahedron 300 has additional nodes on its edges, faces, or interior. The shape of the higher-order tetrahedron 300 can be adjusted by modifying these nodes.

[0071] Step S1033: Determine the initial high-order tetrahedral mesh based on the high-order tetrahedral elements.

[0072] The multiple higher-order tetrahedral elements constructed in step S1032 are the constituent units of the initial higher-order tetrahedral mesh, and the multiple higher-order tetrahedral elements together constitute the initial higher-order tetrahedral mesh.

[0073] Optionally, in step S104, determining the geometric features of the initial high-order tetrahedral mesh through feature detection may include the following steps:

[0074] Step S1041: Obtain the eigenvalues ​​of the grid points of the initial high-order tetrahedral mesh.

[0075] Specifically, the initial higher-order tetrahedral mesh includes multiple nodes. For each node located on the surface of the 3D model, its corresponding higher-order tetrahedral element is determined, and the nodes at the corresponding positions of its adjacent higher-order tetrahedral elements are searched. Based on these nodes, a patch is determined, which is used to identify the geometric features of the 3D model. During feature detection, the size of the patch can be modified to identify small-scale and large-scale geometric features.

[0076] For example, if the surface node currently being processed is the first node, then its corresponding higher-order tetrahedral element is taken as the first element. At least two higher-order tetrahedral elements adjacent to the first element are selected as the second and third elements, and the nodes on the second and third elements are taken as the second and third nodes, respectively. The facets of the first node are determined based on the first node, the second node, and the third node.

[0077] When determining the patch corresponding to a node located on the surface of the 3D model, the current node is defined as the i-th node, and the patch is created. By generating The set of k normals of each face: We can consider different higher-order tetrahedral elements adjacent to node i.

[0078] For each vector Define the covariance matrix The eigenvalues ​​of the grid points of the initial high-order tetrahedral mesh are obtained based on the covariance matrix.

[0079] Step S1042: Divide the grid points into corner points, ridge points, and planar points according to the feature values.

[0080] An angle point is a point that changes significantly in three directions, a ridge point is a point that changes significantly in one direction, and a planar point is a point that changes significantly in two directions.

[0081] Optionally, the feature values ​​obtained in step S1041 may include a first feature value, a second feature value, and a third feature value.

[0082] In step S1042, classifying the mesh points of the initial high-order tetrahedral mesh into corner points, ridge points, and planar points based on eigenvalues ​​may include the following steps:

[0083] Step S1042a: If the first feature value, the second feature value, and the third feature value of a grid point are equal, mark the grid point as a corner point.

[0084] Step S1042b: If the first and second eigenvalues ​​of a grid point are equal and the third eigenvalue is greater than the second eigenvalue, mark the grid point as a ridge point.

[0085] Step S1042c: If the second and third eigenvalues ​​of a grid point are equal and the first eigenvalue is less than the second eigenvalue, mark the grid point as a planar point.

[0086] It should be noted that the equality in steps S1042a, S1042b, and S1042c refers to approximate equality, meaning that the two values ​​are considered equal if the difference between them does not exceed a first preset difference. The greater than and less than values ​​in steps S1042a, S1042b, and S1042c require a difference exceeding a second preset difference; that is, if the difference between two values ​​exceeds the second preset difference, one value is considered greater than or less than the other.

[0087] Step S1043: Determine the geometric features based on the corner points, ridge points, and plane points.

[0088] Corner points, ridge points, and plane points are used together as geometric features of the 3D model.

[0089] Optionally, in step S105, fitting the initial high-order tetrahedral mesh according to geometric features to obtain the target high-order tetrahedral mesh may include the following steps:

[0090] Step S1051: Sample the surface of the three-dimensional model to obtain a three-dimensional point set.

[0091] Step S1052: Based on the position of the mesh points on the edge of the higher-order tetrahedral element, divide the mesh points into end mesh points and middle mesh points.

[0092] Step S1053: Based on the three-dimensional point set and geometric features, control the movement of intermediate grid points to fit the initial high-order tetrahedral mesh.

[0093] When controlling the movement of grid points, it is necessary to determine the markings of the end grid points on the edge where the middle grid point is located, and control the movement of the grid points based on the markings of the end grid points.

[0094] Specifically, for an edge in the grid The middle node is The nodes at both ends are respectively and So for intermediate nodes The following constraints can be used to limit Movement range: if Both endpoints of the plane are points, then... Limited to The endpoint moves within the tangent plane, more specifically, it moves... Limited to and Within the intersection of the tangent planes; if If one endpoint is a ridge point and the other is a corner point or ridge point, then... Restricted on the edge Move up; if If one endpoint is a plane point and the other endpoint is a ridge point or a corner point, then... Limited to Within an ellipsoid whose two endpoints are axes, the boundary of the ellipsoid does not extend beyond the edge. The tetrahedral element it belongs to; if Both endpoints of the given point are corner points, then Movement is not permitted.

[0095] For any node to be updated on a higher-order tetrahedral element That is, it is necessary to control the movement of intermediate grid points and search for them in the 3D point set. The nearest sampling point Simultaneously obtain sampling points After this step, the tangent plane obtains a list of sampling points corresponding to the list of nodes to be updated, and each corresponding point uses the same indexing method.

[0096] Controlling the node to be updated During movement, the control points of the higher-order tetrahedral elements need to be adjusted, moving the nodes in the list of nodes to be updated towards the nodes in the sampling point list. For any node to be updated... The objective function to be minimized is set as the sum of the values ​​of the points and the corresponding sampling points. The squared error distance between Through control points Calculating the nodes on the higher-order tetrahedral elements, the overall squared error distance, i.e., the objective function to be minimized, can be expressed as:

[0097]

[0098] Solving this least squares problem yields the positions of the control points. Further calculations based on these control point positions provide the target positions for the nodes to be updated. Once the target positions are obtained, the nodes to be updated are moved to these target positions to complete the fitting process.

[0099] Optionally, in some embodiments of the present invention, the method for processing the three-dimensional model further includes: performing topology optimization and geometry optimization on the target high-order tetrahedral mesh.

[0100] Specifically, before optimizing the target high-order tetrahedral mesh, a quality standard for measuring the high-order tetrahedral elements is first selected, such as the proportional Jacobian matrix. Edge deletion, face flipping, and edge shrinking operations are then performed on the high-order tetrahedral elements. If the optimization operation improves the mesh quality, the optimized mesh replaces the original target high-order tetrahedral mesh. If the optimization operation fails to improve the quality of the target high-order tetrahedral mesh or adversely affects the quality of adjacent high-order tetrahedral elements, the original target high-order tetrahedral mesh will continue to be used. After each successful local topology optimization, point smoothing is performed on any node in the local target high-order tetrahedral mesh. During topology optimization and point smoothing, the validity of the high-order tetrahedral elements is checked at each operation; the optimization operation is only retained if the high-order tetrahedral elements are valid.

[0101] Reference Figure 4 In some embodiments of the present invention, the execution flow of the 3D model processing method includes: first, initializing a linear tetrahedral mesh, i.e., obtaining a linear tetrahedral mesh based on the 3D model. Next, constructing an initial higher-order tetrahedral mesh based on the linear tetrahedral mesh, requiring the acquisition of the higher-order tetrahedral element order. Then, determining a target higher-order tetrahedral mesh based on the initial higher-order tetrahedral mesh. Determining the target higher-order tetrahedral mesh includes feature detection, feature processing, and surface fitting. Feature detection yields corner points, ridge points, and planar points. During feature processing, different processing is applied to four cases to obtain geometric features. Surface fitting is then performed on the initial higher-order tetrahedral mesh based on these geometric features to obtain the target higher-order tetrahedral mesh. Next, the target higher-order tetrahedral mesh is optimized. After optimization, the 3D model processing flow ends. At this point, the 3D model processing method of this embodiment has constructed a target higher-order tetrahedral mesh that accurately captures the geometric features of the 3D model.

[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0103] This embodiment also provides a three-dimensional model processing device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.

[0104] Figure 5 This is a structural block diagram of a three-dimensional model processing apparatus 400 according to one embodiment of the present invention, such as... Figure 5 As shown, a 3D model processing device 400 is used as an example. This device includes: an acquisition module 401, which is used to acquire a 3D model and mesh parameters, wherein the 3D model is obtained by modeling a 3D object; a partitioning module 402, which is used to partition the 3D model to obtain a linear tetrahedral mesh, wherein the linear tetrahedral mesh includes multiple linear tetrahedral elements; a construction module 403, which is used to construct an initial higher-order tetrahedral mesh based on the mesh parameters and the linear tetrahedral mesh, wherein the initial higher-order tetrahedral mesh includes multiple higher-order tetrahedral elements; a feature detection module 404, which is used to perform feature detection on the initial higher-order tetrahedral mesh to determine geometric features; and a fitting module 405, which is used to perform fitting processing on the initial higher-order tetrahedral mesh based on the geometric features to obtain a target higher-order tetrahedral mesh.

[0105] Optionally, the meshing module 402 is also used to mesh the 3D model to obtain a linear tetrahedral mesh, including: meshing the 3D model to obtain a first tetrahedral mesh; and performing optimization operations on the first tetrahedral mesh to obtain a linear tetrahedral mesh, wherein the optimization operations include at least edge flipping, face flipping, edge deletion, face deletion, point insertion, and point deletion.

[0106] Optionally, the construction module 403 is also used to construct an initial higher-order tetrahedral mesh based on mesh parameters and a linear tetrahedral mesh, including: determining the target order of the linear tetrahedral elements based on mesh parameters; inserting nodes into the linear tetrahedral elements according to the target order to obtain higher-order tetrahedral elements; and determining the initial higher-order tetrahedral mesh based on the higher-order tetrahedral elements.

[0107] Optionally, the feature detection module 404 is also used to perform feature detection on the initial high-order tetrahedral mesh to determine geometric features, including: obtaining the feature values ​​of the mesh points of the initial high-order tetrahedral mesh; classifying the mesh points into corner points, ridge points and planar points according to the feature values; and determining geometric features based on the corner points, ridge points and planar points.

[0108] Optionally, the feature values ​​in the feature detection module 404 include a first feature value, a second feature value, and a third feature value; the feature detection module 404 is also used to classify the grid points of the initial high-order tetrahedral mesh into corner points, ridge points, and planar points according to the feature values, including: if the first feature value, the second feature value, and the third feature value of the grid point are equal, the grid point is marked as a corner point; if the first feature value and the second feature value of the grid point are equal, and the third feature value is greater than the second feature value, the grid point is marked as a ridge point; if the second feature value and the third feature value of the grid point are equal, and the first feature value is less than the second feature value, the grid point is marked as a planar point.

[0109] Optionally, the fitting module 405 is further configured to perform fitting processing on the initial higher-order tetrahedral mesh to obtain the target higher-order tetrahedral mesh based on geometric features, including: sampling the surface of the three-dimensional model to obtain a three-dimensional point set; dividing the mesh points into end mesh points and middle mesh points according to the position of the mesh points on the edge of the higher-order tetrahedral element; and controlling the movement of the middle mesh points to fit the initial higher-order tetrahedral mesh based on the three-dimensional point set and geometric features; wherein, when controlling the movement of the mesh points, it is necessary to determine the marking of the end mesh points on the edge where the middle mesh point is located, and control the movement of the mesh points according to the marking of the end mesh points.

[0110] Optionally, the 3D model processing device also includes an optimization module, which is connected to the fitting module 405. The optimization module is used to perform topology optimization and geometry optimization on the target high-order mesh.

[0111] An embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the three-dimensional model processing method described above.

[0112] Optionally, in this embodiment, the processor in the above-described electronic device may be configured to run a computer program to perform the following steps:

[0113] Step S101: Obtain the 3D model and mesh parameters.

[0114] Step S102: Divide the 3D model into linear tetrahedral meshes.

[0115] Step S103: Construct an initial high-order tetrahedral mesh based on the mesh parameters and the linear tetrahedral mesh.

[0116] Step S104: Perform feature detection on the initial high-order tetrahedral mesh to determine its geometric features.

[0117] Step S105: Fit the initial high-order tetrahedral mesh according to the geometric features to obtain the target high-order tetrahedral mesh.

[0118] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0119] Embodiments of the present invention also provide a non-volatile storage medium storing a computer program, wherein the computer program is configured to execute the steps of the embodiments of the above-described three-dimensional model processing method when run on a computer or processor.

[0120] Optionally, in this embodiment, the non-volatile storage medium described above can be configured to store a computer program for performing the following steps:

[0121] Step S101: Obtain the 3D model and mesh parameters.

[0122] Step S102: Divide the 3D model into linear tetrahedral meshes.

[0123] Step S103: Construct an initial high-order tetrahedral mesh based on the mesh parameters and the linear tetrahedral mesh.

[0124] Step S104: Perform feature detection on the initial high-order tetrahedral mesh to determine its geometric features.

[0125] Step S105: Fit the initial high-order tetrahedral mesh according to the geometric features to obtain the target high-order tetrahedral mesh.

[0126] Optionally, in this embodiment, the aforementioned non-volatile storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0127] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0128] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0129] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0130] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0131] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0132] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0133] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for processing three-dimensional models, characterized in that, include: Obtain the 3D model and mesh parameters, wherein the 3D model is obtained based on 3D object modeling; The three-dimensional model is divided into linear tetrahedral meshes, wherein the linear tetrahedral meshes include multiple linear tetrahedral elements; An initial higher-order tetrahedral mesh is constructed based on the mesh parameters and the linear tetrahedral mesh, wherein the initial higher-order tetrahedral mesh comprises multiple higher-order tetrahedral elements; Obtain the feature values ​​of the grid points of the initial high-order tetrahedral mesh, wherein the feature values ​​include a first feature value, a second feature value, and a third feature value; If the first feature value, the second feature value, and the third feature value of the grid point are equal, the grid point is marked as a corner point; If the first feature value and the second feature value of the grid point are equal, and the third feature value is greater than the second feature value, the grid point is marked as a ridge point; If the second feature value and the third feature value of the grid point are equal, and the first feature value is less than the second feature value, the grid point is marked as a planar point; Geometric features are determined based on the corner points, the ridge points, and the planar points; The target high-order tetrahedral mesh is obtained by fitting the initial high-order tetrahedral mesh according to the geometric features. The process of fitting the initial higher-order tetrahedral mesh to obtain the target higher-order tetrahedral mesh based on the geometric features includes: sampling the surface of the three-dimensional model to obtain a three-dimensional point set; dividing the mesh points into end mesh points and middle mesh points according to their positions on the edges of the higher-order tetrahedral elements; and controlling the movement of the middle mesh points to fit the initial higher-order tetrahedral mesh based on the three-dimensional point set and the geometric features. Specifically, when controlling the movement of the mesh points, it is necessary to determine the markings of the end mesh points on the edges where the middle mesh points are located, and control the movement of the mesh points based on the markings of the end mesh points.

2. The method for processing three-dimensional models according to claim 1, characterized in that, The process of meshing the three-dimensional model to obtain a linear tetrahedral mesh includes: The three-dimensional model is divided into a first tetrahedral mesh; The linear tetrahedral mesh is obtained by optimizing the first tetrahedral mesh, wherein the optimization operation includes at least edge flipping, face flipping, edge deletion, face deletion, point insertion, and point deletion.

3. The method for processing three-dimensional models according to claim 1, characterized in that, The step of constructing an initial higher-order tetrahedral mesh based on the mesh parameters and the linear tetrahedral mesh includes: The target order of the linear tetrahedral element is determined based on the mesh parameters. The higher-order tetrahedral element is obtained by inserting nodes into the linear tetrahedral element according to the target order; The initial higher-order tetrahedral mesh is determined based on the higher-order tetrahedral elements.

4. The method for processing three-dimensional models according to claim 1, characterized in that, Also includes: Topology and geometry optimizations are performed on the target high-order mesh.

5. A three-dimensional model processing device, characterized in that, include: The acquisition module is used to acquire the 3D model and mesh parameters, wherein the 3D model is obtained based on the modeling of the 3D object; A partitioning module is used to partition the three-dimensional model to obtain a linear tetrahedral mesh, wherein the linear tetrahedral mesh includes multiple linear tetrahedral elements; A construction module is used to construct an initial higher-order tetrahedral mesh based on the mesh parameters and the linear tetrahedral mesh, wherein the initial higher-order tetrahedral mesh includes multiple higher-order tetrahedral elements; A feature detection module is used to acquire feature values ​​of grid points of the initial high-order tetrahedral mesh, wherein the feature values ​​include a first feature value, a second feature value, and a third feature value; if the first feature value, the second feature value, and the third feature value of the grid point are equal, the grid point is marked as a corner point; if the first feature value and the second feature value of the grid point are equal, and the third feature value is greater than the second feature value, the grid point is marked as a ridge point; if the second feature value and the third feature value of the grid point are equal, and the first feature value is less than the second feature value, the grid point is marked as a planar point; geometric features are determined based on the corner points, the ridge points, and the planar points. A fitting module is used to fit the initial high-order tetrahedral mesh according to the geometric features to obtain a target high-order tetrahedral mesh. The fitting module is further configured to sample the surface of the three-dimensional model to obtain a three-dimensional point set; divide the mesh points into end mesh points and middle mesh points according to the position of the mesh points on the edge of the higher-order tetrahedral unit; control the movement of the middle mesh points to fit the initial higher-order tetrahedral mesh according to the three-dimensional point set and the geometric features; wherein, when controlling the movement of the mesh points, it is necessary to determine the mark of the end mesh points on the edge where the middle mesh point is located, and control the movement of the mesh points according to the mark of the end mesh points.

6. An electronic device, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.

7. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a computer program, wherein the computer program is configured to execute the three-dimensional model processing method described in any one of claims 1 to 4 when running on a computer or processor.