Three-dimensional model topology method, electronic device, storage medium, and computer program product
Patent Information
- Application Number
- CN202611122893.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-30
AI Technical Summary
但是,骨架提取易受噪声干扰且对复杂几何特征适应性不足,可能导致拓扑重构失真或分支断裂
[0016]在本实施例中,识别三维模型中的关键拓扑元素;基于所述关键拓扑元素的拓扑不变规则,对所述三维模型进行简化处理得到粗粒度模型;在本实施例中,基于所述粗粒度模型的几何特性和针对所述关键拓扑元素的约束规则,对所述粗粒度模型进行迭代细分处理,得到目标三维模型。这样,因为识别出关键拓扑元素在简化和细分过程中都保证了关键拓扑元素的拓扑约束,相对于相关技术提高了模型对复杂几何特征的适应性。并在每次细分过程中都根据模型的几何特性进行细分,保证了新顶点位置的精确放置,从而可以使得生成的目标三维模型可以更精细、更自适应的恢复三维模型的几何细节,相对于相关技术提高了模型对复杂几何特征的适应性,进而避免了针对三维模型的拓扑导致拓扑重构失真或分支断裂的问题。
Smart Images

Figure CN123015890A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer graphics technology, and in particular to a three-dimensional model topology method, electronic device, storage medium, and computer program product. Background Technology
[0002] The core of 3D model topology processing is the correction and optimization of 3D meshes. The aim is to transform raw, complex, or flawed models generated by scanning or AI into standardized models with clear structures, high performance, and suitability for specific professional fields. After topology processing, especially after reconstruction into quadrilateral meshes, the model performs better in animation, unique visitor (UV) unwrapping, smooth subdivision, and editing. This is a necessary prerequisite for its integration into professional applications such as games, film and television, and virtual reality (VR) / augmented reality (AR).
[0003] In related technologies, 3D model topology processing can be implemented manually or automatically. Automatic topology methods for 3D models based on topological skeletons or skeleton lines guide the topological reconstruction of the 3D model by extracting the model's topological "core"—the skeleton or skeleton lines. These methods effectively preserve the original model's topological information and can handle models with complex topologies (such as porous or branched structures). By reducing the dimensionality of the 3D problem, the algorithm's complexity can be simplified, and it is expected to generate structured meshes suitable for various applications. However, skeleton extraction is susceptible to noise interference and lacks adaptability to complex geometric features, potentially leading to distorted topology reconstruction or broken branches. Summary of the Invention
[0004] This application provides a three-dimensional model topology method, an electronic device, a storage medium, and a computer program product.
[0005] The technical solution of this application is implemented as follows: This application provides a three-dimensional model topology method, including: Identify key topological elements in a 3D model; Based on the topological invariance rules of the key topological elements, the three-dimensional model is simplified to obtain a coarse-grained model. Based on the geometric characteristics of the coarse-grained model and the constraint rules for the key topological elements, the coarse-grained model is iteratively subdivided to obtain the target three-dimensional model.
[0006] In the above scheme, the key topological elements include one or more of the following: boundary loops, interconnected basic elements, geometrically sharp edges, and geometrically sharp points; the identification of key topological elements in the 3D model includes: Obtain the topology layer of the three-dimensional model; wherein, the topology layer includes: basic element information in the three-dimensional model and the topological relationships between the basic elements; The key topological elements in the 3D model are identified based on the topological structure layer, and the key topological elements are marked in the 3D model.
[0007] In the above scheme, the iterative subdivision of the coarse-grained model based on its geometric characteristics and constraint rules for the key topological elements to obtain the target 3D model includes: Using the key topological elements as boundaries, the surface of the coarse-grained model is divided into local regions to obtain the model to be subdivided. Based on the geometric characteristics of each local region in the model to be subdivided, the first target local region in the model to be subdivided is subjected to the first subdivision of the local region to obtain the first subdivided model; wherein, the local connectivity of the first target local region in the first subdivided model remains unchanged, and the new vertices inserted for the subdivision of the first target local region are located on the original topological constraint lines corresponding to the three-dimensional model. Based on the geometric characteristics of each local region in the first subdivision model, a second subdivision process is performed on the second target local region in the first subdivision model to obtain a second subdivision model, until a predetermined subdivision condition is met, and the target three-dimensional model is obtained.
[0008] In the above scheme, the step of performing a first subdivision process on the first target local region in the model to be subdivided based on the geometric characteristics of each local region in the model to be subdivided, to obtain a first subdivided model, includes: Based on the geometric characteristics of each local region in the model to be subdivided, the first target local region that does not meet the resolution requirements is determined. The first local region of the target is subdivided to determine multiple initial vertices; Based on the geometric characteristics of the nearest point of the initial vertex in the 3D model, or the corresponding point of the initial vertex in the 3D model, the initial vertex is adjusted to obtain the first subdivision model.
[0009] In the above scheme, adjusting the initial vertex based on the nearest point in the 3D model or the geometric properties of the corresponding point of the initial vertex in the 3D model includes any one of the following: The initial vertex is projected onto the 3D model to determine the nearest point, and the initial vertex is adjusted based on the position information of the nearest point; In the three-dimensional model, the corresponding point of the initial vertex is determined, and the initial vertex is adjusted based on the product of the normal vector of the corresponding point and the displacement factor; wherein the displacement factor is determined based on the local curvature of the corresponding point and the geometric error between the initial vertex and the corresponding point.
[0010] In the above scheme, the step of simplifying the three-dimensional model to obtain a coarse-grained model includes: Based on the collapse cost of each edge element in the 3D model, a first target edge element is determined in the 3D model; wherein, the first target edge element does not belong to the key topological element; The first target edge element in the three-dimensional model is subjected to a first collapse simplification process to obtain the first coarse subdivision model; Based on the collapse cost of each edge element in the first coarse-grained model, the second target edge element is subjected to a second collapse simplification process to obtain the second coarse-grained model. This process continues until a preset simplification condition is met, at which point the coarse-grained model is obtained.
[0011] The method in the above scheme further includes: Obtain the first topological homeomorphic mapping relationship between each model during the simplification process of the 3D model, and obtain the second topological homeomorphic mapping relationship between each model during the subdivision process of the coarse-grained model; Topological consistency verification is performed based on the first and second topological homeomorphic mapping relationships.
[0012] This application also provides a three-dimensional model topology device, including: The identification unit is used to identify key topological elements in a 3D model. A simplification unit is used to simplify the three-dimensional model based on the topological invariance rules of the key topological elements to obtain a coarse-grained model. The subdivision unit is used to iteratively subdivide the coarse-grained model based on its geometric characteristics and the constraint rules for the key topological elements to obtain the target three-dimensional model.
[0013] This application also provides an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor and a communication interface. When the processor executes the computer program, it implements the steps in the above-described method.
[0014] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the above-described method.
[0015] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the above-described method.
[0016] In this embodiment, key topological elements in the 3D model are identified. Based on the topological invariance rules of these key topological elements, the 3D model is simplified to obtain a coarse-grained model. Then, based on the geometric characteristics of the coarse-grained model and the constraint rules for the key topological elements, iterative subdivision is performed to obtain the target 3D model. This approach, by identifying key topological elements and ensuring their topological constraints during simplification and subdivision, improves the model's adaptability to complex geometric features compared to related techniques. Furthermore, subdivision is performed based on the model's geometric characteristics in each subdivision process, ensuring the precise placement of new vertex positions. This allows the generated target 3D model to more accurately and adaptively recover the geometric details of the 3D model, improving its adaptability to complex geometric features compared to related techniques and avoiding problems such as topological reconstruction distortion or branch breakage caused by topological adjustments to the 3D model. Attached Figure Description
[0017] Figure 1 A flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 1 ; Figure 2 A flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 2 ; Figure 3 A flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 3 ; Figure 4 A flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 4 ; Figure 5 A flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 5 ; Figure 6 A flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 6 ; Figure 7 This is a schematic diagram of the structure of the three-dimensional model topology device provided in the embodiments of this application; Figure 8 This is a schematic diagram of a hardware entity of an electronic device provided in an embodiment of this application.
[0018] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application are further described in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] This application provides a three-dimensional model topology method. Please refer to [link / reference]. Figure 1 The above is a flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 1 , will combine Figure 1 The steps shown are explained below: S101. Identify key topological elements in the 3D model.
[0021] In this embodiment, the three-dimensional model topology device can acquire the three-dimensional model to be topologically analyzed, then perform geometric repair and cleaning on the three-dimensional model, and then identify the key topological elements with key topological features in the three-dimensional model through the topological structure layer in the three-dimensional model.
[0022] In this embodiment, the elements of the 3D model—points (coordinate data), surfaces (indexed connection data), and lines—are intermediate products (lines are also indexed connection data of point coordinates). Topological processing of the 3D model involves reshuffling the permutations and combinations of these "index numbers" without changing the appearance of the model itself.
[0023] In this embodiment, key topological elements may include one or more of the following: boundary ring elements (multiple boundary edge basic elements connected together), interconnected basic elements (which may include vertex basic elements, edge basic elements and face basic elements), geometrically sharp edges and geometrically sharp points.
[0024] In this embodiment, the geometric repair processing of the 3D model may include noise filtering and cleaning, non-manifold repair, small hole detection and repair, and self-crossing detection and separation.
[0025] In this embodiment, noise filtering and cleanup: After the 3D model data is loaded, nonlocal mean filtering or bilateral filtering is performed on the input raw vertex data using the noise filtering unit in the geometry repair submodule at the model's geometry data layer (which describes the shape of the model and typically includes: vertices: defined by 3D spatial coordinates (X,Y,Z); edges, faces, and meshes: a polygonal mesh composed of a large number of vertices, edges, and faces (usually triangles or quadrilaterals); solid models: the boundaries of the model are defined by precise mathematical surfaces and curves). Method: The surface is smoothed by weighted averaging of neighboring vertex positions, where the weights consider spatial distance and normal similarity to preserve sharp geometric features. Action features: Selective smoothing to preserve sharp geometric features.
[0026] Algorithm formula (simplified version of bilateral filtering): The new position of the vertex can be explained by formula (1): Formula (1) in, yes The set of neighboring vertices, It is a spatial Gaussian kernel function. It is the range (normal) Gaussian kernel function. , It is the vertex , The normal line.
[0027] In this embodiment, non-manifold repair: After noise filtering and before topological feature recognition, the non-manifold repair unit in the geometry repair submodule automatically detects and repairs edges (T-shaped edges) sharing more than two faces or vertices (non-manifold vertices) sharing more than one edge in the model's connectivity layer. Non-manifold connections are "opened" by copying the relevant vertices or faces, breaking them down into manifold structures and ensuring that each edge connects exactly two faces. Action feature: Modifying mesh connectivity, potentially increasing the number of vertices and faces to achieve manifolding.
[0028] In this embodiment, small hole detection and repair: After non-manifold repair, the hole repair unit in the geometric repair submodule detects and automatically fills small holes smaller than a preset threshold at the surface boundary layer of the model. All open boundary loops are identified, and new facets are generated to close the holes using geometric filling algorithms (such as least-squares plane fitting, Poisson reconstruction, or geodesic distance-based filling). Topological verification is then performed to avoid introducing new defects. Action characteristics: Identifying open boundaries and generating new facets to close the model improves watertightness.
[0029] In this embodiment, self-intersection detection and separation: After all other geometric repairs, the self-intersection processing unit in the geometry repair submodule identifies and attempts to separate self-intersecting parts in the model at the geometric entity layer. Accelerated triangle-triangle intersection detection is performed using spatial data structures (such as Axis-Aligned Bounding Box Tree (AABB) and k-dimensional tree (KD)), and facets are cut and connections are reassembled at the intersections. For complex self-intersections that cannot be automatically handled, the system can prompt the user to intervene or treat them as special "internal" topological constraint regions to avoid touching in subsequent processing. Action characteristics: Eliminating situations where the model surface intersects itself may lead to local mesh complexity.
[0030] S102. Based on the topological invariance rules of the key topological elements, the three-dimensional model is simplified to obtain a coarse-grained model.
[0031] In this embodiment, after identifying the key topological elements in the 3D model, the topology of the key topological elements can be kept unchanged. In the 3D model, the edge with the smallest collapse cost is iteratively collapsed and simplified according to the collapse cost of other edges until the predetermined simplification condition is reached, and then the process stops to obtain a coarse-grained model.
[0032] In this embodiment, the 3D model can be iteratively collapsed and simplified to reduce the number of faces until a preset simplification condition is met, resulting in a coarse-grained model. During the iterative collapse process of the 3D model, the original topology of key topological elements remains unchanged.
[0033] In this embodiment, during the iterative collapse process of the 3D model, each collapse can be performed on the edge element with the minimum collapse cost. The collapse cost can be determined by the quadratic error metric between the vertex element of the edge and the vertex after collapse, as well as the folding parameter that penalizes topological destruction (such as boundaries / holes) and the degradation parameter that penalizes geometric features such as high curvature regions.
[0034] S103. Based on the geometric characteristics of the coarse-grained model and the constraint rules for the key topological elements, the coarse-grained model is iteratively subdivided to obtain the target three-dimensional model.
[0035] In this embodiment, after determining the coarse-grained model, local regions can be divided within the coarse-grained model to obtain multiple local regions. Then, based on the geometric characteristics of the local regions, the local region with the lowest resolution is iteratively subdivided, keeping the topology of key topological elements unchanged during the process, until a predetermined number of subdivisions is reached, at which point the process stops, resulting in the target 3D model.
[0036] In this embodiment, after the coarse-grained model L0 is constructed, and based on the user-defined number of levels or accuracy requirements, a multi-resolution model hierarchy of subdivided models is iteratively generated from the coarse-grained model, progressively generating L1, L2…L… N At higher resolution levels, topological consistency is maintained at each level, and geometric details are progressively restored to determine L. N The final target 3D model.
[0037] In this embodiment, key topological elements in the 3D model are identified. Based on the topological invariance rules of these key topological elements, the 3D model is simplified to obtain a coarse-grained model. Then, based on the geometric characteristics of the coarse-grained model and the constraint rules for the key topological elements, iterative subdivision is performed to obtain the target 3D model. This approach, by identifying key topological elements and ensuring their topological constraints during simplification and subdivision, improves the model's adaptability to complex geometric features compared to related techniques. Furthermore, subdivision is performed based on the model's geometric characteristics in each subdivision process, ensuring the precise placement of new vertex positions. This allows the generated target 3D model to more accurately and adaptively recover the geometric details of the 3D model, improving its adaptability to complex geometric features compared to related techniques and avoiding problems such as topological reconstruction distortion or branch breakage caused by topological adjustments to the 3D model.
[0038] Please see Figure 2 The above is a flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 2 , Figure 1 S101 in the process can also be implemented through S201 to S202, which will combine Figure 2 The steps shown are explained below: S201. Obtain the topology layer of the three-dimensional model; wherein, the topology layer includes: basic element information in the three-dimensional model and the topological relationships between the basic elements.
[0039] In this embodiment, after loading the 3D model, the corresponding topology layer of the 3D model can be obtained. The topology layer includes the basic element information of the 3D model and the topological relationships between the basic elements.
[0040] The basic element information includes: the position information or index information of each basic element (point element, edge element, and face element), as well as the attribute information of each basic element.
[0041] In this embodiment, the topology layer is a data layer used to characterize the connection relationships between the components of the 3D model. • Basic elements: These typically include geometric elements of different dimensions such as vertices (0D), edges (1D), faces (2D), and volumes (3D). • Topological relationships: These record the adjacency, association, and containment relationships between these elements. For example, which edges constitute a face, and which faces share the same edge.
[0042] S202. Identify the key topological elements in the three-dimensional model based on the topological structure layer, and mark the key topological elements in the three-dimensional model.
[0043] In this embodiment, the key topological elements include one or more of the following: boundary loops, interconnected basic elements, geometrically sharp edges, geometrically sharp points, and geometrically sharp faces. Boundary loops can be identified by detecting each edge element in the topological structure layer. Interconnected elements can be categorized into a connected component by traversing the points or faces in the topological structure layer, and the connected points or faces can be identified as interconnected basic elements. Geometrically sharp edges and points can also be identified based on the dihedral angles or curvature of each vertex in the 3D model.
[0044] In this embodiment, after identifying key topological elements, they can also be marked in the attribute information of the corresponding elements in the 3D model. A specific marker can be added to the attribute information of the key topological elements.
[0045] In this embodiment, boundary loop identification: After the model has been manifolded and the small holes have been repaired, all edge elements of the model are traversed to identify edges that connect only one face. These edges are then traced until a closed loop is formed, thus identifying the boundary loop. Motion features: Identify the edges of the model's outer contour and internal holes.
[0046] In this embodiment, connected component identification: After boundary loop identification, the connectivity analysis unit uses a graph traversal algorithm (such as breadth-first search or depth-first search) to traverse all vertices or faces of the mesh, classifying all interconnected elements into a single connected component. Action characteristics: Ensure that the topological independence of different independent components is protected in subsequent processing.
[0047] In this embodiment, sharp geometric features are identified: after the connected components are identified, the geometric feature extraction unit identifies important sharp geometric edges and corners in the model based on geometric information such as local curvature or dihedral angles.
[0048] Based on dihedral angles: For each edge e, calculate the dihedral angle between the normals n1 and n2 of the two faces f1 and f2 it connects to. .if If the angle exceeds the preset threshold sharp, then the edge is marked as a sharp edge. The dihedral angle can be calculated using formula (2). .
[0049] Formula (2) if >thresholdsharp (e.g., π / 6 or 30 degrees), then e is marked as a geometrically sharp edge.
[0050] In this embodiment, based on local curvature: the Gaussian curvature or average curvature of vertices or faces is calculated, and local peak points or faces of curvature are considered sharp features. Motion features: to protect the visual fidelity of the model, they are treated as geometric constraints even if they are not directly topological constraints.
[0051] In this embodiment, topological constraint labeling: After all key topological elements are identified, the constraint labeling unit uniformly labels all identified boundary loops, connected components, and vertices and edges on geometrically sharp features as "topological constraint elements." A Boolean flag `is_topology_constrained` or an enumeration type `constraint_type` (e.g., `BOUNDARY_VERTEX`, `SHARP_EDGE`, `COMPONENT_BOUNDARY_EDGE`, etc.) is added to the attribute information of each vertex and edge to indicate its constraint attribute. Action features: This is the core of the entire strategy. These elements will be strictly protected during subsequent simplification and refinement processes to ensure topological homeomorphism.
[0052] In this embodiment, key topological elements in the 3D model are identified based on the topology layer, and these key topological elements are marked in the 3D model. This approach ensures the topological constraints of key topological elements during simplification and subdivision, improving the model's adaptability to complex geometric features compared to related techniques. This avoids problems such as topological reconstruction distortion or branch breakage caused by adjusting the topology of the 3D model.
[0053] Please see Figure 3 The above is a flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 3 , Figure 1 S103 in the above can also be implemented through S301 to S303, combining Figure 3 The steps shown are explained below: S301. Using the key topological element as the boundary, the surface of the coarse-grained model is divided into local regions to obtain the model to be subdivided.
[0054] In this embodiment, after determining multiple key topological elements, the local region can be divided on the surface of the coarse-grained model using the determined boundary rings, geometrically sharp elements, and connected components as boundaries to obtain the model to be subdivided.
[0055] In this embodiment, the coarse-grained model topology region partitioning is performed as follows: After the coarse-grained model is generated, the region partitioning submodule divides the model surface into several topologically consistent local regions at the model's surface topology layer, using identified key topological elements (such as hole boundaries and sharp edges) as boundaries. All traversed faces are categorized into different topological regions (patches) based on their adjacency with topological constraint elements. Each patch should be as smooth as possible and have a simple topological structure. Action features: Dividing the mesh surface into multiple independent "patches" provides finer-grained control for subsequent adaptive refinement.
[0056] S302. Based on the geometric characteristics of each local region in the model to be subdivided, the first target local region in the model to be subdivided is subjected to the first subdivision process to obtain the first subdivided model; wherein, the local connectivity of the first target local region in the first subdivided model remains unchanged, and the new vertices inserted for the subdivision of the first target local region are located on the original topological constraint lines corresponding to the three-dimensional model.
[0057] In this embodiment, after determining the model to be subdivided, a first subdivision process can be performed on the first target local region with the lowest resolution in the model to obtain the first subdivided model. In this embodiment, the corresponding resolution information can be determined based on the geometric characteristics of each local region, thereby determining the first target local region with the lowest resolution. In this embodiment, the first subdivision process on the first target local region may include constructing multiple new vertices within the first target local region, and then forming a new local region within the first target local region based on the new vertices.
[0058] Wherein, the local connectivity of the first target local region in the first subdivision model remains unchanged, and the new vertices inserted for the subdivision of the first target local region are located on the original topological constraint lines corresponding to the three-dimensional model.
[0059] In this embodiment, a first target local region requiring further subdivision can be determined from multiple local regions based on the geometric characteristics (local geometric error, curvature) of each local region. In this embodiment, the first target local region can also be specified from multiple local regions according to user instructions. That is, the user can specify the subdivided local region by interactively brushing or drawing a weight map.
[0060] In this embodiment, the first target local region can be determined based on the magnitude of the local geometric error between each local region and the 3D model. The first target local region can also be determined based on the magnitude of the curvature or normal deviation of each local region.
[0061] In this embodiment, the model subdivision process can be as follows: Hierarchy Definition and Iteration: When generating a new subdivision model, N subdivision levels are preset, and L is used as the starting point. i Iteratively towards L i+1 Refine the resolution until the highest resolution level L is reached. N Or it can meet preset geometric accuracy requirements. Motion characteristics: control the number of levels and resolution of multi-scale models.
[0062] Topology-preserving adaptive mesh subdivision: in each refinement model L i In the subdivision iteration, in the local mesh region, the selected face or region is subjected to mesh subdivision operation (such as improved Loop subdivision or Catmull-Clark subdivision).
[0063] Subdivision rules under topological constraints: When performing specific subdivision operations, the subdivision rule execution unit strictly adheres to topological constraints when performing mesh subdivision operations on selected faces or regions.
[0064] Internal subdivision: For subdivision operations within a topological region, only the number of faces and vertices is increased; no new holes are introduced, existing holes are merged, or local connectivity is changed. For example, new vertices are always inserted at the midpoint of existing edges or the center of faces, and no new edges are created to connect unrelated vertices.
[0065] Boundary subdivision processing: For edges located on topological constraint elements (such as hole boundaries, sharp edges) Its segmentation rules require special handling: Newly inserted vertex It must be precisely located on the original topological constraint line. This is usually achieved by... This is achieved by projecting the edges onto the corresponding constraint segments of the original 3D model. Newly generated edges must maintain the same connectivity properties as the original topological constraint lines (e.g., if the parent edge is sharp, the child edge must also be sharp). Ensure that subdivision does not change the connectivity of shared boundaries, maintaining seamless connections between regions. Action characteristics: This is crucial for achieving topological homeomorphism, ensuring that the topological structure remains strictly unchanged while increasing mesh density.
[0066] S303. Based on the geometric characteristics of each local region in the first subdivision model, a second subdivision process is performed on the second target local region in the first subdivision model to obtain a second subdivision model, until a predetermined subdivision condition is met, and the target three-dimensional model is obtained.
[0067] In this embodiment, a second subdivision process can be performed on the second target local region with the lowest resolution in the first subdivision model to obtain a second subdivision model. Then, a third subdivision process is performed on the second subdivision model until a predetermined subdivision condition is met, resulting in the target 3D model. In this embodiment, the corresponding resolution information can be determined based on the geometric characteristics of each local region, thereby identifying the first target local region with the lowest resolution.
[0068] In this embodiment, the method for determining the target local region in each subdivision process is the same as the method for determining the first target local region.
[0069] In this embodiment, during each subdivision process, it is necessary to maintain the local connectivity of the corresponding local region and insert new vertices on the original topological constraint lines corresponding to the 3D model.
[0070] In this embodiment, based on the geometric characteristics of each local region in the model to be subdivided, a first subdivision process is performed on the first target local region in the model to be subdivided to obtain a first subdivided model. The local connectivity of the first target local region in the first subdivided model remains unchanged, and the new vertices inserted for subdividing the first target local region are located on the original topological constraint lines corresponding to the 3D model. Based on the geometric characteristics of each local region in the first model, a second subdivision process is performed on the second target local region in the first subdivided model to obtain a second subdivided model, until a predetermined subdivision condition is met, resulting in the target 3D model. Thus, subdivision is performed according to the geometric characteristics of the model in each subdivision process, ensuring the precise placement of new vertex positions. This allows the generated target 3D model to more finely and adaptively recover the geometric details of the 3D model, improving the model's adaptability to complex geometric features compared to related technologies, and thus avoiding the problems of topological reconstruction distortion or branch breakage caused by subdividing the topology of the 3D model.
[0071] In this embodiment, S302 shown can also be implemented by S401 to S403, which will be explained in conjunction with the shown steps: S401. Based on the geometric characteristics of each local region in the model to be subdivided, determine the first target local region where the resolution condition does not meet the standard.
[0072] In this embodiment, the first target local region for which details need to be restored (if the resolution condition is not met) can be determined based on the point-to-surface distance error, normal deviation, or curvature of each local region in the model to be subdivided.
[0073] In this embodiment, the subdivision region selection: At the beginning of each subdivision iteration, the subdivision selection unit selects the region or surface to be subdivided based on geometric error, curvature, or user instructions. Wherein: Geometric error: Calculate the local geometric error (such as point-to-surface distance, normal deviation) between the current model and the original high-resolution model. Regions with errors exceeding a preset threshold are subdivided first. Among them, the point-to-surface distance error can be calculated by formula (3).
[0074] Formula (3) in, This represents the distance from point p to the surface of the original model. The shortest distance, point p belongs to the local region .
[0075] Curvature: Calculates local curvature changes; regions with high curvature require a denser mesh.
[0076] Action characteristics: Ensure that the subdivision is "adaptive", that is, only increase the mesh density in areas where details need to be restored.
[0077] S402. Perform a first subdivision process on the first target local region to determine multiple initial vertices.
[0078] In this embodiment, the first target local region can be subdivided using the Loop subdivision or Catmull-Clark subdivision method to determine multiple initial vertices.
[0079] S403. Based on the geometric characteristics of the nearest point of the initial vertex in the three-dimensional model, or the corresponding point of the initial vertex in the three-dimensional model, adjust the initial vertex to obtain the first subdivision model.
[0080] In this embodiment, after determining multiple initial vertices within the first target local region, the nearest point corresponding to each initial vertex can be determined by projection onto the 3D model, and the position information of the initial vertices can be adjusted using the position information of the nearest point. If projection cannot be completed, the corresponding point of the initial vertex can be determined in the 3D model, and the position information of the initial vertex can be adjusted using the geometric properties of the corresponding point. Finally, the adjusted position information of the initial vertices is used to divide the first target local region into new local regions, resulting in the first subdivision model.
[0081] In this embodiment, the corresponding point of the initial vertex can be determined by one or more of the following strategies: spatial acceleration search for nearest, normal filtering for intersection, fallback if there is no intersection, and centroid checking if there is history.
[0082] In this embodiment, the initial vertex is projected onto the 3D model to determine the nearest point, and the initial vertex is adjusted based on the position information of the nearest point. The position information of the nearest point can be used as the adjusted position information of the initial vertex.
[0083] In this embodiment, projection onto the original surface: for newly generated vertices In the original high-resolution model Find its nearest point on the surface .but = The initial vertices can be adjusted using formula (4). Determine the adjusted vertices .
[0084] Formula (4) The NearestPointOnSurface function searches for surfaces using a spatial search structure (such as a KD-tree). Find the distance The nearest point.
[0085] In this embodiment, the corresponding point of the initial vertex is determined in the 3D model, and the initial vertex is adjusted based on the product of the normal vector and the displacement factor of the corresponding point; wherein, the displacement factor is determined based on the local curvature of the corresponding point and the geometric error between the initial vertex and the corresponding point. The position information of the initial vertex can be adjusted using the product of the normal vector and the displacement factor.
[0086] In this embodiment, normal information and local curvature adjustment: If direct projection is not possible (e.g., the original model has been simplified), the normal information of the original model can be used to "push" new vertices. The initial vertices can be adjusted using formula (5). Determine the adjusted vertices .
[0087] Formula (5) in, yes The normal direction of the corresponding point on the original model It is a displacement factor adjusted based on local curvature and geometric errors. Action feature: While increasing mesh density, it restores the geometric details of the original model to the maximum extent.
[0088] In this embodiment, based on the geometric characteristics of each local region in the model to be subdivided, the first target local region whose resolution condition does not meet the standard is determined. A first subdivision process is performed on the first target local region to determine multiple initial vertices. Based on the geometric characteristics of the nearest point of the initial vertex in the 3D model, or the point corresponding to the initial vertex in the 3D model, the initial vertices are adjusted to obtain the first subdivided model. Thus, by subdividing the first target local region whose resolution condition does not meet the standard, the generated target 3D model can more accurately and adaptively recover the geometric details of the 3D model. Compared with related technologies, this improves the model's adaptability to complex geometric features, thereby avoiding the problems of topological reconstruction distortion or branch breakage caused by topological changes in the 3D model.
[0089] Please see Figure 4 The above is a flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 4 , Figure 1 S102 in the above can also be implemented through S501 to S503, combining Figure 4 The steps shown are explained below: S501. Based on the collapse cost of each edge element in the three-dimensional model, determine a first target edge element in the three-dimensional model; wherein the first target edge element does not belong to the key topology element.
[0090] In this embodiment, after loading the 3D model, the collapse cost of each edge element, excluding the key topological elements, can be determined. The first target edge element with the minimum collapse cost is then determined. This edge element can be determined using the position indices of two vertices. The collapse cost is determined using a quadratic error metric between the collapsed vertex and the original two vertices.
[0091] In this embodiment, the topology-preserving restricted simplification is performed: the restricted mesh simplification algorithm submodule iteratively selects the edge element with the lowest cost for collapse when obtaining the coarse-grained model, until the termination condition is met. The core is that when evaluating the collapse cost C(e) of each edge e, in addition to geometric errors, topological constraints must also be considered: the judgment includes, but is not limited to: edge e itself is a boundary loop edge or a geometrically sharp edge; the collapse operation will destroy the continuity of the boundary loop; the collapse operation will cause different connected components to merge or split; the collapse operation will increase the number of holes in the model. The collapse cost C(e) can be calculated by formula (6).
[0092] Formula (6) in, This represents the edge to be collapsed. The new apex after the collapse. As a quadratic error measure, through Penalize folds that disrupt topology (such as boundaries / holes) by... The degradation of geometric features such as high curvature regions is penalized, and the folding priority is finally determined by weighted summation of three costs. This represents a penalty for terms that disrupt the topology. If the edge collapse operation 'e' causes a change in the model's topology (such as the number of holes, connectivity, etc.), The value of will be very high, thus increasing the cost of the operation, or even set to infinity, in order to protect the topological homeomorphism of the model. The term represents the penalty for geometric feature degradation. If the edge collapse operation e causes severe loss or degradation of geometric details of the model (such as sharp features, curvature changes, etc.), The value of will increase accordingly, making the cost of the operation greater, thus prioritizing the preservation of important geometric features. Action features: While minimizing the number of faces, strictly protect the model's topology.
[0093] S502. Perform a first collapse simplification process on the first target edge element in the three-dimensional model to obtain the first coarse subdivision model.
[0094] In this embodiment, after determining the first target edge element, the two vertices corresponding to the first target edge element can be collapsed to obtain the first coarse subdivision model.
[0095] S503. Based on the collapse cost of each edge element in the first coarse-grained model, the second target edge element is subjected to a second collapse simplification process to obtain the second coarse-grained model. This process continues until a preset simplification condition is met, thus obtaining the coarse-grained model.
[0096] In this embodiment, the corresponding collapse cost information can be determined for edge elements other than key topological elements in the first coarse-grained model. Then, the second target edge element with the minimum collapse cost is determined. Next, the two vertices of the second target edge element are collapsed to obtain the third coarse-grained model, continuing until a predetermined number of collapses is reached or the collapse cost of all edges exceeds a preset threshold, thus obtaining a coarse-grained model.
[0097] In this embodiment, the simplification termination condition is as follows: After each edge collapse operation, the simplification control unit stops simplification when a preset minimum face count threshold is reached, or when the cost of all remaining collapsible operations exceeds a preset threshold. The edges in the simplification queue are continuously evaluated until no edges that meet the conditions are available for collapse.
[0098] In this embodiment, a first target edge element is determined in the 3D model based on the collapse cost of each edge element; wherein the first target edge element does not belong to the key topological element. The first target edge element in the 3D model undergoes a first collapse simplification process to obtain a first coarse-grained model. Based on the collapse cost of each edge element in the first coarse-grained model, a second target edge element undergoes a second collapse simplification process to obtain a second coarse-grained model, until a preset simplification condition is met, resulting in the coarse-grained model. Thus, iterative collapse processing is performed on target edge elements that do not belong to the key topological element, removing noise and redundant branches while ensuring the topology of the key topological element remains unchanged. This ensures the stability of each key topology in the model during the topology processing, thereby achieving high-quality mesh reconstruction with a good topological structure.
[0099] Please see Figure 5 The above is a flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 5 , will combine Figure 5 The steps shown are explained below: S601. Obtain the first topological homeomorphic mapping relationship between each model during the simplification process of the three-dimensional model, and obtain the second topological homeomorphic mapping relationship between each model during the subdivision process of the coarse-grained model.
[0100] In this embodiment, a first topological homeomorphic mapping relationship is obtained between various models (including various coarse sub-models and the 3D model) during the simplification process of the 3D model. This first topological homeomorphic mapping relationship may include the mapping relationship between vertices on each coarse sub-model and their corresponding projection points on the original 3D model, as well as the mapping relationship between normals and the topological connectivity relationship of key topological elements in each coarse sub-model.
[0101] In this embodiment, a second topological homeomorphic mapping relationship is obtained between each model (including each subdivision module and the 3D model) during the coarse-grained model subdivision process. The first topological homeomorphic mapping relationship may include the mapping relationship between vertices on each subdivision model and their corresponding projection points on the original 3D model, as well as the mapping relationship between normals and the topological connectivity relationship of key topological elements in each subdivision model.
[0102] In this embodiment, the implementation of topological homeomorphism mapping in the subdivision process during simplification is as follows: Vertex to original surface mapping: For each vertex at each refinement level, store its corresponding projection point and normal on the original model to establish semantic homology.
[0103] Topological constraint element ID: All topological constraint elements (boundary loops, connected components, sharp edges) identified and marked in Phase 1 are assigned a globally unique ID. These element IDs and topological connectivity relationships (e.g., which boundary loop connects which region) must remain unchanged across all multi-scale levels.
[0104] In this embodiment, the first topological homeomorphism mapping relationship and the second topological homeomorphism mapping relationship can be stored based on a hierarchical data structure.
[0105] In this embodiment, the first topological homeomorphism and the second topological homeomorphism can be stored in a hierarchical grid of an octree.
[0106] In this embodiment, the first topological homeomorphism mapping relationship and the second topological homeomorphism mapping relationship can be stored through a vertex history graph.
[0107] In this embodiment, a hierarchical data structure is constructed: the data structure builder uses a multi-resolution hierarchical structure to store the model when each model level is generated or updated. This includes: Hierarchical meshing based on octrees: Each octree node can store mesh data of different resolutions within a corresponding spatial region, and record the topological constraint elements and their mapping relationships within that region. This makes local refinement and coarsening of specific regions efficient. Each node stores the mesh data of the corresponding spatial region at L... i The grid data satisfies formula (7).
[0108] Formula (7) in, For any node in an octree, where It is the spatial index of the node, and L represents the level; This represents the volume of a node, that is, the amount of space that the node occupies in three-dimensional space. The volume of a child node is represented by m∈{1,2,3,4,5,6,7,8}, which means that a node usually has eight child nodes; U is the union operator, which represents the union of the volumes of the eight child nodes, ensuring that the volume of the parent node is completely composed of the volumes of its child nodes, without overlap or omission.
[0109] Vertex Evolution Graph: Records the parent-child relationships of each vertex during simplification (edge collapse) and refinement processes, allowing for fast bidirectional mapping of vertices, edges, and faces between different levels.
[0110] Define the cross-level evolution relationship of vertices:
[0111] Denotes the set of vertices in the i-th layer. Let represent the power set of the set of vertices at level j, that is, all possible subsets that contain all vertex sets at level j. It is a mapping of the cross-level evolution relationship of vertices from the i-th layer to the j-th layer.
[0112] When coarsening: (Child vertex → Parent vertex) This represents a sub-vertex in the refinement (or lower level). This represents the parent vertex in the coarsening (or higher-level) process. This formula indicates the child vertices during the coarsening process. Mapped to parent vertex .
[0113] When refining: (Set of parent vertices → child vertices) yes The inverse mapping, As the parent vertex, Represents the parent vertex The set of child vertices mapped during the thinning process. This formula represents the set of child vertices mapped during the thinning process. Mapped to its set of child vertices.
[0114] Action characteristics: Supports storage, access, and fast switching at different resolution levels, enabling efficient Level of Detail (LOD) management.
[0115] S602. Perform topological consistency verification based on the first topological homeomorphism mapping relationship and the second topological homeomorphism mapping relationship.
[0116] In this embodiment, topological consistency verification can be performed between each coarse subdivision model and the original 3D model based on a first topological homeomorphic mapping relationship. Topological consistency verification can also be performed between each subdivision model and the original 3D model based on a second topological homeomorphic mapping relationship.
[0117] In this embodiment, topology consistency verification involves performing a rigorous topology consistency check; Euler eigenvalue verification involves calculating the Euler eigenvalues of the current level model. And compare it with the feature values of the original model.
[0118] Validation conditions: For any subdivided model Li and the original 3D model Morig, the topological consistency requirement is: Equivalent to:
[0119] V represents the number of vertices, i.e., the total number of vertices in the model; E represents the number of edges, i.e., the total number of edges connecting all vertices in the model; F represents the number of faces, i.e., the number of planar regions enclosed by edges; Li represents the i-th level of the model, i.e., the different levels or degrees of refinement of the model. This represents the original model, i.e., the basic model that has not been modified or refined. , , These represent the number of vertices, edges, and faces of the i-th level model, respectively. , , These represent the number of vertices, edges, and faces of the original model, respectively.
[0120] This verification is a necessary but not sufficient condition for topological consistency, and it needs to be combined with the verification of the number of boundary rings and the number of connected components to form a complete guarantee system.
[0121] Hole / Boundary Loop Count Verification: Count the number of boundary loops in the current level model and compare it with the original model.
[0122] Validation of the number of connected components: Count the number of connected components in the current level model and compare it with the original model.
[0123] Topological constraint element integrity verification: Checks whether all vertices and edges marked as "topological constraint elements" still exist and whether their interconnections are intact. Action features: Ensuring that geometric detail restoration and functional equivalence are synchronized is the ultimate guarantee of this strategy.
[0124] In this embodiment, if a topology inconsistency is verified, a backtracking or repair mechanism is triggered: when topology consistency verification fails, if a topology inconsistency is detected, a backtracking to the previous valid state (the previous topology-consistent subdivision or coarse-division model) can be triggered, or a local repair can be attempted. Depending on the error type and severity, a backtracking operation (undoing the most recent simplification / subdivision step) or a local repair algorithm is invoked. Table 1 illustrates several error classification and repair methods:
[0125] Table 1 Backtracking mechanism: Suppose the error occurs after the operation opk at the Li level:
[0126] in, It is the grid area affected by opk; Represents the current processing level. This indicates the previous valid state level, used for backtracking operations; This refers to the grid area affected by the opk operation, used to locate the error range; These are correction parameters, ranging from [0,1], used to adjust vertex positions; These are newly inserted Steiner points used to fix the problem of unclosed boundary loops; , These are two related vertices when the boundary cycle is not closed; and These are projection functions, used for projection operations on vertices and constraint elements respectively; e is the original constraint element; These are the repaired constraint elements; It represents the original boundary, used to ensure that new points satisfy the boundary conditions. Action characteristics: ensure the rigor of the topology and improve the robustness of the system.
[0127] In this way, the closed loop of "identification-simplification-refinement-verification" effectively solves the challenges of topology preservation and geometric detail recovery in multi-scale topology processing of 3D models, without relying on skeleton extraction, thus avoiding the inherent defects and instability of traditional methods.
[0128] In this embodiment, a first topological homeomorphic mapping relationship between each model during the simplification process of the 3D model and a second topological homeomorphic mapping relationship between each model during the subdivision process of the coarse-grained model are obtained and stored. This allows for topological consistency verification based on the stored topological homeomorphic mapping relationships. When topological inconsistencies in key topological elements are detected, timely repairs can be made, thereby improving the stability and reliability of topology processing and ensuring the visual fidelity of the original model.
[0129] Please see Figure 6 The above is a flowchart illustrating the three-dimensional model topology method provided in the embodiments of this application. Figure 6 , will combine Figure 6 The steps shown are explained below: S1. Preprocessing and identification of key topological features.
[0130] In this embodiment, the original model is geometrically cleaned, and its inherent key topological elements are identified and marked as immutable topological constraint elements, laying the foundation for subsequent topological preservation.
[0131] Geometric repair and cleaning can include: noise filtering and cleaning, non-manifold repair, small hole detection and repair, and self-crossing detection and separation.
[0132] Key topological elements may include: boundary loops, connected components, and geometrically sharp elements.
[0133] S2. Initial coarse-grained model construction.
[0134] In this embodiment, after S1 is completed and the system is ready to perform its first major simplification, a coarse-grained model L0 with very few faces but strictly maintaining all key topological constraints is generated when establishing the multi-scale model baseline layer.
[0135] S3, Multi-scale hierarchical generation and adaptive refinement.
[0136] In this embodiment, after the coarse-grained model L0 is constructed, and based on the user-defined number of levels or accuracy requirements, a multi-resolution model hierarchy of subdivided models is iteratively generated from the coarse-grained model, progressively generating L1, L2…L… N At higher resolution levels, topological consistency is maintained at each level, and geometric details are gradually restored to determine LN as the final target 3D model.
[0137] S4, cross-scale data structure and topology consistency maintenance.
[0138] In this embodiment, in parallel with or after each of the aforementioned stages, an efficient data structure is constructed to store different resolution levels throughout the entire multi-scale model construction and use process, and the topological homeomorphism mapping between all levels and the original model is continuously maintained.
[0139] This proposal addresses the problem of topology reconstruction distortion or branch breakage that may result from existing automatic topology methods for 3D models based on topological skeletons or skeleton lines. It provides a multi-scale topology method for 3D models based on local topological constraints. After preprocessing the 3D model, all boundary loops, connected components, and geometrically sharp features are identified and labeled as topological constraint elements. Based on these elements, a topology-preserving constrained simplification algorithm is used to generate an initial coarse-grained model. Starting from this initial coarse-grained model, adaptive mesh subdivision is performed iteratively. Each subdivision selects the subdivision region based on local geometric errors, curvature, or user instructions, strictly adhering to topological constraint rules to ensure that newly generated vertices are precisely located on the original topological constraint lines without altering the original topology. The system establishes and maintains cross-scale data structures during multi-scale generation, supporting topological homeomorphism mapping between different resolution levels and real-time topological consistency verification. This improves the stability and reliability of topological processing and ensures the visual fidelity of the original model. The innovations are: 1. Directly identifying and locking key topological features (such as hole boundaries and sharp edges) on the original model, fundamentally avoiding various problems caused by inaccurate skeleton extraction; 2. Through an adaptive refinement strategy under local topological constraints, it can perform differentiated refinement in different regions based on the model's geometric complexity and detail requirements (such as curvature changes and normal deviations), and combine this with the geometric information of the original model for precise vertex placement, thereby more finely and adaptively restoring geometric details.
[0140] Please see Figure 7 This is a schematic diagram of the structure of the three-dimensional model topology device provided in the embodiments of this application.
[0141] This application embodiment also provides a three-dimensional model topology device 800, including: The identification unit 801 is used to identify key topological elements in the 3D model; Simplification unit 802 is used to simplify the three-dimensional model based on the topological invariance rules of the key topological elements to obtain a coarse-grained model. Subdivision unit 803 is used to perform iterative subdivision processing on the coarse-grained model based on the geometric characteristics of the coarse-grained model and the constraint rules for the key topological elements to obtain the target three-dimensional model.
[0142] In this embodiment, the key topological elements include one or more of the following: boundary loops, interconnected basic elements, geometrically sharp edges, and geometrically sharp points; the identification unit 801 in the 3D model topology device 800 is used to obtain the topological structure layer of the 3D model; wherein, the topological structure layer includes: basic element information in the 3D model and the topological relationships between basic elements; The key topological elements in the 3D model are identified based on the topological structure layer, and the key topological elements are marked in the 3D model.
[0143] In this embodiment, the subdivision unit 803 in the three-dimensional model topology device 800 is used to divide the surface of the coarse-grained model into local regions using the key topological element as the boundary, so as to obtain the model to be subdivided. Based on the geometric characteristics of each local region in the model to be subdivided, the first target local region in the model to be subdivided is subjected to the first subdivision of the local region to obtain the first subdivided model; wherein, the local connectivity of the first target local region in the first subdivided model remains unchanged, and the new vertices inserted for the subdivision of the first target local region are located on the original topological constraint lines corresponding to the three-dimensional model. Based on the geometric characteristics of each local region in the first subdivision model, a second subdivision process is performed on the second target local region in the first subdivision model to obtain a second subdivision model, until a predetermined subdivision condition is met, and the target three-dimensional model is obtained.
[0144] In this embodiment, the subdivision unit 803 in the three-dimensional model topology device 800 is used to determine the first target local region whose resolution condition does not meet the standard based on the geometric characteristics of each local region in the model to be subdivided. The first local region of the target is subdivided to determine multiple initial vertices; Based on the geometric characteristics of the nearest point of the initial vertex in the 3D model, or the corresponding point of the initial vertex in the 3D model, the initial vertex is adjusted to obtain the first subdivision model.
[0145] In this embodiment, the subdivision unit 803 in the three-dimensional model topology device 800 is used to project the initial vertex into the three-dimensional model to determine the nearest point, and adjust the initial vertex based on the position information of the nearest point; In the three-dimensional model, the corresponding point of the initial vertex is determined, and the initial vertex is adjusted based on the product of the normal vector of the corresponding point and the displacement factor; wherein the displacement factor is determined based on the local curvature of the corresponding point and the geometric error between the initial vertex and the corresponding point.
[0146] In this embodiment, the simplification unit 802 in the three-dimensional model topology device 800 is used to determine a first target edge element in the three-dimensional model based on the collapse cost of each edge element in the three-dimensional model; wherein, the first target edge element does not belong to the key topology element; The first target edge element in the three-dimensional model is subjected to a first collapse simplification process to obtain the first coarse subdivision model; Based on the collapse cost of each edge element in the first coarse-grained model, the second target edge element is subjected to a second collapse simplification process to obtain the second coarse-grained model. This process continues until a preset simplification condition is met, at which point the coarse-grained model is obtained.
[0147] In this embodiment, the three-dimensional model topology device 800 is used to obtain the first topological homeomorphic mapping relationship between each model during the simplification process of the three-dimensional model, and to obtain the second topological homeomorphic mapping relationship between each model during the subdivision process of the coarse-grained model. Topological consistency verification is performed based on the first and second topological homeomorphic mapping relationships.
[0148] It should be noted that, in the embodiments of this application, if the above-described 3D model topology method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, 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 3D model topology device (which may be a personal computer, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0149] Correspondingly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the method of the three-dimensional model topology device 800.
[0150] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0151] It should be noted that, Figure 8 A schematic diagram of a hardware entity of an electronic device provided in an embodiment of this application, such as... Figure 8 As shown, this application embodiment provides an electronic device 900, including a memory 902 and a processor 901. The memory 902 stores a computer program that can run on the processor 901. When the processor 901 executes the program, it implements the steps in the above-described method, wherein; Processor 901 typically controls the overall operation of electronic device 900.
[0152] The memory 902 is configured to store instructions and applications executable by the processor 901, and can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data and video communication data) in the processor 901 and various modules in the electronic device 900. It can be implemented by flash memory or random access memory (RAM).
[0153] Correspondingly, this application also provides a computer program product, including a computer program that can be executed by the processor 901 of the electronic device 900 to complete the steps in the method of the three-dimensional model topology device 800.
[0154] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A three-dimensional model topology method, characterized in that, include: Identify key topological elements in a 3D model; Based on the topological invariance rules of the key topological elements, the three-dimensional model is simplified to obtain a coarse-grained model. Based on the geometric characteristics of the coarse-grained model and the constraint rules for the key topological elements, the coarse-grained model is iteratively subdivided to obtain the target three-dimensional model.
2. The three-dimensional model topology method according to claim 1, characterized in that, The key topological elements include one or more of the following: boundary rings, interconnected basic elements, geometrically sharp edges, geometrically sharp points, and geometrically sharp faces; The identification of key topological elements in the 3D model includes: Obtain the topology layer of the three-dimensional model; wherein, the topology layer includes: basic element information in the three-dimensional model and the topological relationships between the basic elements; The key topological elements in the 3D model are identified based on the topological structure layer, and the key topological elements are marked in the 3D model.
3. The three-dimensional model topology method according to claim 1 or 2, characterized in that, Based on the geometric properties of the coarse-grained model and the constraint rules for the key topological elements, the coarse-grained model is iteratively subdivided to obtain the target 3D model, including: Using the key topological elements as boundaries, the surface of the coarse-grained model is divided into local regions to obtain the model to be subdivided. Based on the geometric characteristics of each local region in the model to be subdivided, the first target local region in the model to be subdivided is subjected to the first subdivision process to obtain the first subdivided model; wherein, the local connectivity of the first target local region in the first subdivided model remains unchanged, and the new vertices inserted for the subdivision of the first target local region are located on the original topological constraint lines corresponding to the three-dimensional model. Based on the geometric characteristics of each local region in the first subdivision model, a second subdivision process is performed on the second target local region in the first subdivision model to obtain a second subdivision model, until a predetermined subdivision condition is met, and the target three-dimensional model is obtained.
4. The three-dimensional model topology method according to claim 3, characterized in that, The first subdivision process, based on the geometric characteristics of each local region in the model to be subdivided, performs a first subdivision of the first target local region in the model to be subdivided to obtain a first subdivided model, including: Based on the geometric characteristics of each local region in the model to be subdivided, the first target local region that does not meet the resolution requirements is determined. The first local region of the target is subdivided to determine multiple initial vertices; Based on the geometric characteristics of the nearest point of the initial vertex in the 3D model, or the corresponding point of the initial vertex in the 3D model, the initial vertex is adjusted to obtain the first subdivision model.
5. The three-dimensional model topology method according to claim 4, characterized in that, The adjustment of the initial vertex based on the geometric properties of the nearest point to the initial vertex in the 3D model, or the corresponding point of the initial vertex in the 3D model, includes any one of the following: The initial vertex is projected onto the 3D model to determine the nearest point, and the initial vertex is adjusted based on the position information of the nearest point; In the three-dimensional model, the corresponding point of the initial vertex is determined, and the initial vertex is adjusted based on the product of the normal vector of the corresponding point and the displacement factor; wherein the displacement factor is determined based on the local curvature of the corresponding point and the geometric error between the initial vertex and the corresponding point.
6. The three-dimensional model topology method according to claim 1 or 2, characterized in that, The process of simplifying the three-dimensional model to obtain a coarse-grained model includes: Based on the collapse cost of each edge element in the 3D model, a first target edge element is determined in the 3D model; wherein, the first target edge element does not belong to the key topological element; The first target edge element in the three-dimensional model is subjected to a first collapse simplification process to obtain the first coarse subdivision model; Based on the collapse cost of each edge element in the first coarse-grained model, the second target edge element is subjected to a second collapse simplification process to obtain the second coarse-grained model. This process continues until a preset simplification condition is met, at which point the coarse-grained model is obtained.
7. The three-dimensional model topology method according to claim 1 or 2, characterized in that, The method further includes: Obtain the first topological homeomorphic mapping relationship between each model during the simplification process of the 3D model, and obtain the second topological homeomorphic mapping relationship between each model during the subdivision process of the coarse-grained model; Topological consistency verification is performed based on the first and second topological homeomorphic mapping relationships.
8. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program that can run on the processor, the processor executing the computer program to implement the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
