Octree grid construction method and device, equipment and storage medium

By building an R tree and using it to quickly judge the intersection information, the problem of inefficient construction of traditional octree mesh is solved, and the technical effect of accelerating grid construction is achieved.

CN119068119APending Publication Date: 2024-12-03SHENZHEN YUNBO SOFTWARE TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411194074.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The traditional octree mesh construction method is low in efficiency, and requires frequent judgment of the intersecting of the sub-region and the model boundary, resulting in high computational complexity.

Method used

By constructing an R tree, the leaf nodes of the R tree represent the bounding box of the triangle unit, and the intersection information of the octree node and the model is quickly judged, thereby accelerating the mesh construction process.

Benefits of technology

It significantly reduces the complexity of intersecting tests during the octree subdivision process, improves the efficiency of mesh construction, and improves the speed and efficiency of octree mesh construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119068119A_ABST
    Figure CN119068119A_ABST
Patent Text Reader

Abstract

The invention discloses an octree grid construction method and device, equipment and a storage medium, and relates to the technical field of computer simulation, the octree grid construction method comprises the steps that a three-dimensional model based on triangular grid expression is acquired, a triangular grid is composed of N triangular units, and N is an integer larger than 1; constructing a model R tree based on the triangular mesh on the three-dimensional model; wherein leaf nodes of the model R tree represent bounding boxes of the triangular units in the three-dimensional model; an octree grid of the three-dimensional model is constructed based on the model R tree; and outputting the octree grid. According to the method, the octree grid of the three-dimensional model is constructed based on the model R tree, and the technical effect of improving the octree grid construction efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer simulation technology, and in particular to an octree grid construction method, device, equipment and storage medium. Background Art

[0002] Octree grid is a common space partitioning method in the field of computational geometry. It continuously subdivides the three-dimensional space into the same sub-regions, each of which is called a node of the octree. After the octree grid is constructed, the three-dimensional model area can be approximated as a collection of sub-node spaces. As a background grid, the octree grid can assist in the generation of other types of surface grids and volume grids in the pre-processing field of CAE (Computer Aided Engineering). It can also be used as a grid directly for fluid numerical simulation calculations. In addition, in the field of computer graphics, collision detection can be performed efficiently by expressing the three-dimensional model through the octree.

[0003] The traditional octree mesh construction method needs to constantly judge whether the octree sub-region intersects with the model boundary, which is relatively inefficient. Summary of the invention

[0004] The main purpose of the present application is to provide an octree grid construction method, device, equipment and storage medium, aiming to solve the technical problem of low efficiency of traditional octree grid construction.

[0005] To achieve the above object, the present application provides an octree grid construction method, the octree grid construction method comprising:

[0006] Acquire a three-dimensional model based on a triangular mesh expression; wherein the triangular mesh is composed of N triangular units, where N is an integer greater than 1;

[0007] Constructing a model R tree based on the triangular mesh on the three-dimensional model; wherein the leaf nodes of the model R tree represent the bounding boxes of each triangular unit in the three-dimensional model;

[0008] Constructing an octree grid of the three-dimensional model based on the model R-tree;

[0009] Output the octree grid.

[0010] In one embodiment, the step of constructing a model R-tree based on the triangular mesh on the three-dimensional model includes:

[0011] Calculate the bounding box corresponding to each of the triangular units in the three-dimensional model;

[0012] Taking the bounding box corresponding to each triangle unit as a leaf node of the model R tree;

[0013] All the leaf nodes are aggregated to construct the model R-tree.

[0014] In one embodiment, the step of aggregating all the leaf nodes to construct the model R-tree includes:

[0015] Select any one of the bounding boxes as the initial bounding box, and the leaf node corresponding to the initial bounding box is the initial leaf node;

[0016] Aggregation starts from the initial leaf node, the nodes formed during the aggregation process are intermediate nodes, and a final node formed by aggregation is the root node of the model R-tree.

[0017] In one embodiment, the bounding box represented by the intermediate node is the minimum bounding box covering the child nodes of the intermediate node.

[0018] In one embodiment, the step of constructing an octree mesh of the three-dimensional model based on the model R-tree comprises:

[0019] Calculating a bounding box corresponding to the three-dimensional model;

[0020] Divide the bounding box corresponding to the three-dimensional model into eight subspaces, each of which corresponds to a child node of the octree;

[0021] Based on the intersection information of the bounding box of the child node of the octree and the bounding box of the leaf node of the model R tree, the octree grid of the three-dimensional model is constructed.

[0022] In one embodiment, the step of constructing the octree mesh of the three-dimensional model based on the intersection information of the bounding box of the child node of the octree and the bounding box of the leaf node of the model R tree includes:

[0023] Detect whether the bounding box of the child node of the octree intersects with the bounding box of the leaf node of the model R tree;

[0024] If they intersect, and the size of the subspace corresponding to any of the subnodes is greater than a preset threshold, the subspace is divided into eight subordinate subspaces;

[0025] Repeat the above steps until the size of all the lower-level subspaces is less than or equal to a preset threshold, or the lower-level subspaces do not intersect with the bounding boxes of the leaf nodes of the model R-tree, and construct the octree grid.

[0026] In one embodiment, the step of detecting whether the bounding box of the child node intersects with the bounding box of the leaf node of the model R tree comprises:

[0027] Traversing from the root node of the model R tree to the leaf nodes of the model R tree, determining whether there is a target leaf node of the model R tree that intersects with the bounding box of the octree child node;

[0028] If the target leaf node exists, stop traversal and determine whether the bounding box of the child node of the octree intersects with the bounding box of the leaf node of the model R tree.

[0029] In addition, to achieve the above-mentioned purpose, the present application also provides an octree grid construction device, the octree grid construction device comprising:

[0030] A model input module, used to obtain a three-dimensional model based on a triangular mesh expression; wherein the triangular mesh is composed of N triangular units, where N is an integer greater than 1;

[0031] An R-tree construction module, used to construct a model R-tree based on the triangular mesh on the three-dimensional model; wherein the leaf nodes of the model R-tree represent the bounding boxes of each of the triangular units in the three-dimensional model;

[0032] An octree construction module, used for constructing an octree grid of the three-dimensional model based on the model R-tree;

[0033] An output module is used to output the octree grid.

[0034] In addition, to achieve the above-mentioned purpose, the present application also provides an octree grid construction device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the octree grid construction method as described above.

[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a program for implementing the octree grid construction method is stored on the computer-readable storage medium. The program for implementing the octree grid construction method is executed by a processor to implement the steps of the octree grid construction method as described above.

[0036] The present application provides an octree mesh construction method, device, equipment and storage medium, wherein the method obtains a three-dimensional model expressed based on a triangular mesh, and constructs a model R-tree based on the triangular mesh on the three-dimensional model; wherein the leaf nodes of the model R-tree represent the bounding boxes of each triangular unit in the three-dimensional model; an octree mesh of the three-dimensional model is constructed based on the model R-tree; and the octree mesh is output. The present application first constructs an R-tree according to a three-dimensional geometric model, and with the help of the R-tree, quickly determines whether an octree node intersects with the model, which can accelerate the construction speed of the octree mesh and achieve the technical effect of improving the efficiency of octree mesh construction. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the octree grid construction method of the present application;

[0040] Figure 2 A schematic diagram of a flow chart provided for the second embodiment of the octree grid construction method of the present application;

[0041] Figure 3 This is a schematic diagram of constructing a model R tree in Embodiment 2 of the octree grid construction method of the present application;

[0042] Figure 4 A schematic diagram of a flow chart provided for the fourth embodiment of the octree grid construction method of the present application;

[0043] Figure 5 This is a schematic diagram of octree subdivision in Embodiment 5 of the octree grid construction method of the present application;

[0044] Figure 6 This is a schematic diagram of the module structure of the octree grid construction device according to an embodiment of the present application;

[0045] Figure 7 This is a schematic diagram of the structure involved in an octree grid construction device embodiment of the present application.

[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0049] At present, octree mesh is a common space division method in the field of computational geometry. It continuously subdivides the three-dimensional space into the same sub-regions, each of which is called a node of the octree. After the octree mesh is constructed, the three-dimensional model area can be approximated as a collection of sub-node spaces. As a background mesh, the octree mesh can assist in the generation of other types of surface meshes and volume meshes in the pre-processing field. It can also be used as a mesh directly for fluid numerical simulation calculations. In addition, in the field of computer graphics, collision detection can be performed efficiently by expressing the three-dimensional model through the octree. However, the traditional octree mesh construction method needs to continuously judge whether the octree sub-region intersects with the model boundary, which is relatively inefficient.

[0050] The main solution of the present application is: obtain a three-dimensional model expressed based on a triangular mesh, wherein the triangular mesh is composed of N triangular units, and N is an integer greater than 1; construct a model R tree based on the triangular mesh on the three-dimensional model; wherein the leaf nodes of the model R tree represent the bounding boxes of each triangular unit in the three-dimensional model; construct an octree mesh of the three-dimensional model based on the model R tree; and output the octree mesh.

[0051] By pre-building an R-tree, this application can significantly reduce the complexity of intersection testing with model boundaries during the octree subdivision process. Since the leaf nodes of the R-tree have encoded the spatial information of the triangle unit, the intersection detection is more efficient, thereby improving the efficiency of octree mesh construction.

[0052] It should be noted that the execution subject of this embodiment can be an octree grid construction device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an octree grid construction device capable of realizing the above functions, etc., and this embodiment does not specifically limit this. The following takes the octree grid construction device as an example of the execution subject to illustrate this embodiment and the following embodiments.

[0053] Based on this, the first embodiment of the present application proposes an octree grid construction method, please refer to Figure 1 , the octree grid construction method includes:

[0054] Step S110, obtaining a three-dimensional model expressed based on a triangular mesh, wherein the triangular mesh is composed of N triangular units, and N is an integer greater than 1.

[0055] It should be noted that in a three-dimensional model, the surface of an object can be composed of multiple polygonal blocks. In one embodiment, the surface of an object is composed of multiple triangular blocks. Each triangular block is called a triangular unit, and a collection of triangular units is a triangular mesh. A three-dimensional model expressed by a triangular mesh refers to an object model formed by using a number of connected triangular units to simulate the shape and structure of an object.

[0056] A three-dimensional model expressed as a triangular mesh is obtained. If the three-dimensional model is not expressed as a triangular mesh, the three-dimensional model is processed based on a preset method and then converted into a three-dimensional model expressed as a triangular mesh.

[0057] Step S120, constructing a model R-tree based on the triangular mesh on the three-dimensional model; wherein the leaf nodes of the model R-tree represent the bounding boxes of each of the triangular units in the three-dimensional model.

[0058] It should be noted that the model R-tree is composed of leaf nodes, and the leaf nodes express the bounding box of each triangle unit in the three-dimensional model. The bounding box is a closed space that completely contains the object combination.

[0059] As an optional implementation, the bounding box of the triangle unit is a bounding box of the minimum volume that can enclose the triangle unit, for example, it can be a minimum cuboid or a minimum cube.

[0060] In the three-dimensional model expressed based on the model R-tree in this embodiment, the leaf nodes of the model R-tree have encoded the spatial information of the triangle unit.

[0061] As an optional implementation, first, all triangle units are extracted from the three-dimensional model. According to the spatial positions and ranges of these triangle units, a preliminary R-tree is constructed. Each leaf node corresponds to the bounding box of a triangle unit.

[0062] Step S130: constructing an octree grid of the three-dimensional model based on the model R-tree.

[0063] It should be noted that the octree grid is a three-dimensional space division technology that divides the space into eight subspaces. The eight subspaces serve as eight child nodes of the octree, and each subspace can be further subdivided.

[0064] As an optional implementation, the bounding box of the three-dimensional model is calculated. The bounding box of the three-dimensional model is the bounding box of the minimum volume that can enclose the three-dimensional model, for example, it can be a minimum cuboid or a minimum cube. Take this bounding box as the root node and start to build an octree grid. Each node represents an area of ​​the space. Initially, the entire bounding box is the root node. The root node and the eight subspaces of the first subdivision are used as the initial octree grid. Then, each subspace of the initial octree grid has its corresponding bounding box, and each leaf node of the model R tree has its corresponding bounding box. Then, by judging whether the bounding box corresponding to the subspace intersects with the bounding box corresponding to the leaf node, it is determined whether the subspace needs to be subdivided. Then, when all subspaces do not need to be subdivided, the octree grid is output.

[0065] Furthermore, if the volume size of the subspace meets the accuracy requirement preset by the user, it is determined that the subspace does not need to be further subdivided.

[0066] Step S140, outputting the octree grid.

[0067] If the octree grid is determined, the octree grid is output to the user through the output module.

[0068] The present application obtains a three-dimensional model expressed based on a triangular mesh, wherein the triangular mesh is composed of N triangular units, where N is an integer greater than 1; constructs a model R-tree based on the triangular mesh on the three-dimensional model; wherein the leaf nodes of the model R-tree represent the bounding boxes of each triangular unit in the three-dimensional model; constructs an octree mesh of the three-dimensional model based on the model R-tree; and outputs the octree mesh. The present application first constructs an R-tree based on the three-dimensional geometric model, and with the help of the R-tree, quickly determines whether the octree node intersects with the model, which can accelerate the construction speed of the octree mesh and achieve the technical effect of improving the efficiency of octree mesh construction.

[0069] In summary, this application can significantly reduce the complexity of model boundary intersection testing during octree subdivision by pre-building an R-tree. This is because the leaf nodes of the R-tree have encoded the spatial information of the triangle unit, making intersection detection more efficient, thereby improving the efficiency of octree mesh construction.

[0070] Based on the first embodiment, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 2 , step S120, comprising:

[0071] Step S210, calculating a bounding box corresponding to each of the triangle units in the three-dimensional model.

[0072] In this embodiment, first, the minimum bounding box of each triangle unit in the three-dimensional model is calculated, and a bounding box that can enclose the entire triangle unit is defined by finding the minimum and maximum x, y, z coordinate values ​​of the triangle vertices.

[0073] Step S220: taking the bounding box corresponding to each triangle unit as a leaf node of the model R-tree.

[0074] It should be noted that in the model R-tree, the leaf node represents the bounding box corresponding to each triangle unit.

[0075] As an optional implementation, after determining the bounding box corresponding to each triangle unit, the bounding box of each triangle unit is used as a leaf node.

[0076] As another optional implementation, after determining the bounding box corresponding to each triangle unit, the bounding boxes of a number of adjacent triangle units are selected as a leaf node.

[0077] Step S230, aggregating all the leaf nodes to construct the model R-tree.

[0078] It should be noted that inserting other bounding boxes into leaf nodes to form intermediate nodes is a repetitive process.

[0079] In this embodiment, based on the leaf node selected for the first time, other bounding boxes are recursively inserted into the R-tree. During the insertion process, the structure of the tree is dynamically adjusted to maintain balance according to the spatial relationship and size of the bounding boxes. Whenever a new bounding box is inserted, it is checked whether there is an intersection with the bounding box of the existing node, and it is decided whether to add it as a new leaf node or adjust the structure of the existing node accordingly. This process continues until all the triangle unit bounding boxes are inserted into the R-tree, and finally a model R-tree representing the spatial structure of the entire three-dimensional model is formed.

[0080] As an optional implementation, firstly, an R-tree aggregation node set is constructed according to the bounding box of the triangle unit, and nodes are selected from the aggregation node set to form a new R-tree node, which is added to the aggregation node set and further aggregated with other nodes, and the aggregated nodes are deleted from the aggregation node set. Through continuous aggregation between nodes, the R-tree of this model is finally constructed. Finally, through continuous aggregation, only one node remains in the aggregation node set, which is the root node of the R-tree. The bounding box expressed by the new node constructed upward by the mutually aggregated nodes can contain all the bounding boxes of its child nodes.

[0081] For example, suppose there is a three-dimensional model of a mechanical part, which consists of 5,000 triangular units. First, the bounding box of each triangular unit is calculated. Then, a bounding box is randomly selected as the initial leaf node of the R-tree. Next, the remaining bounding boxes are inserted one by one, and each time they are inserted, it is checked whether there is an intersection with the bounding box of the existing node. If so, the tree structure is adjusted appropriately. Finally, when all bounding boxes are inserted, a complete model R-tree representing the mechanical part is obtained. This structure can efficiently perform spatial queries, such as collision detection and spatial analysis, and is particularly suitable for subsequent CAE (Computer Aided Engineering) simulation and graphics processing.

[0082] As an optional implementation, step S230 includes:

[0083] Step S231, selecting any one of the bounding boxes as an initial bounding box, and the leaf node corresponding to the initial bounding box is the first leaf node;

[0084] Step S232, aggregating the first leaf node and the second leaf node to generate a first intermediate node; wherein the first leaf node and the second leaf node are child nodes of the first intermediate node;

[0085] Step S233, aggregating the third leaf node and the fourth leaf node to generate a second intermediate node; wherein the third leaf node and the fourth leaf node are child nodes of the second intermediate node;

[0086] Step S234, repeat the above steps until all the leaf nodes and all the intermediate nodes are aggregated to form a final node, and the final node is the root node of the model R tree.

[0087] It should be noted that the intermediate nodes are nodes formed during the aggregation process of leaf nodes.

[0088] As an optional implementation, the bounding box corresponding to each triangular unit is used as a leaf node of the model R tree. In the set of bounding boxes, any bounding box is selected as the initial bounding box, and the leaf node corresponding to the initial bounding box is the first leaf node; then, in the set of bounding boxes, a bounding box other than the initial bounding box is selected, preferably a bounding box adjacent to the initial bounding box, as the second leaf node, and the first leaf node and the second leaf node are aggregated to generate a first intermediate node; wherein the first leaf node and the second leaf node are child nodes of the first intermediate node. Similarly, in the set of bounding boxes, a bounding box other than those already aggregated is selected as the third leaf node, and another bounding box other than those aggregated is selected as the fourth leaf node, and the third leaf node and the fourth leaf node are aggregated to generate a second intermediate node; wherein the third leaf node and the fourth leaf node are child nodes of the second intermediate node. Then, the first intermediate node is aggregated with the second intermediate node. Repeat the above steps until all the leaf nodes and all the intermediate nodes are aggregated to form a final node, and the final node is the root node of the model R-tree.

[0089] Furthermore, in the above-mentioned aggregation process, the number of child nodes aggregated into the intermediate node is not specifically limited. For example, in each aggregation, three child nodes are aggregated into the upper intermediate node.

[0090] As another optional implementation, take the initial bounding box as the base point, select a bounding box that has not been processed, and integrate it into the current node link. Check whether the newly added bounding box overlaps with the nodes in the existing node link in space. If so, split or merge some nodes according to the construction rules of the R-tree. Repeat the above steps until all bounding boxes have been processed to form a complete model R-tree.

[0091] In this embodiment, the bounding box represented by the intermediate node is the minimum bounding box covering the child nodes of the intermediate node.

[0092] For example, refer to Figure 3 First, the bounding box of each triangle unit of the three-dimensional geometric model expressed by the triangle mesh is calculated. The bounding box of the first triangle unit is used as the first node of the R-tree, and other unit bounding boxes are continuously inserted as new leaf nodes, and the intermediate nodes are constructed to build the R-tree from bottom to top. The leaf nodes of the R-tree are the bounding boxes of each triangle unit of the three-dimensional geometric model, and the intermediate nodes are also bounding boxes, whose size is the minimum bounding box that can cover each child node of the intermediate node. Figure 3A schematic diagram of a model R-tree is shown. As shown in the figure, each R-tree node represents a bounding box. In this application, each R-tree leaf node is the bounding box of each triangle unit of the three-dimensional geometric model. First, a set S of bounding boxes can be created from the surface triangle units of the three-dimensional geometric model. Each element in S is the bounding box of each surface triangle unit of the three-dimensional geometric model. Select any bounding box b∈S as the first node of the R-tree, and continuously select new bounding boxes from S as new nodes to insert into the current R-tree for adjustment, and finally generate an R-tree with all leaf nodes as triangle bounding boxes. Figure 3 For example, B1 and B2 first construct the B6 node, then select the bounding box B3 in the S set, B3 and B6 construct B7 upward, and continue to select nodes B4 and B5 in S, and construct the root node B8 with B7. Each time a new upward node is constructed, the new intermediate node represents the minimum bounding box covering all the child nodes of the intermediate node. At this point, the R tree is constructed with the bounding box of the triangle unit on the surface of the three-dimensional geometric model.

[0093] As another optional implementation, a model R-tree is constructed based on at least two node links, and multiple threads or processes are started, each thread is responsible for constructing a node link. Each thread starts from the initial leaf node, independently selects an unprocessed bounding box and adds it to its link. The threads avoid data competition through a synchronization mechanism to ensure that each bounding box is only processed once. When all bounding boxes are processed, each thread will generate an independent node link. The node links obtained by all concurrent processing are merged to construct the final R-tree. During the merging process, the bounding boxes of some nodes are recalculated, or the nodes are split and reorganized to ensure that the overall structure of the R-tree is optimal.

[0094] For example, a complex three-dimensional map model is being processed, which is composed of thousands of different triangular units. In a first embodiment, the bounding boxes of these triangular units can be added one by one, and the node links of the R-tree can be gradually constructed, and then the R-tree can be constructed based on the links. In a second embodiment, the advantages of multi-core processors can be used to construct multiple node links in parallel, and finally these links are merged into a complete R-tree. This parallel method is particularly useful when processing large-scale data, and can significantly reduce the time required to build the R-tree.

[0095] Based on any of the above embodiments of the present application, the third embodiment of the present application proposes an octree grid construction method, which can be referred to the above introduction and will not be described in detail later. On this basis, step S130 includes:

[0096] Step S310, calculating a bounding box corresponding to the three-dimensional model.

[0097] In this embodiment, first, by traversing all the triangular units in the three-dimensional model, the maximum and minimum values ​​of the model in the three axes of x, y, and z are determined. These maximum and minimum values ​​are used to calculate the minimum bounding box that can just contain the entire model. In a preferred embodiment, the minimum bounding box is a minimum cube, and the minimum cube is the bounding box corresponding to the three-dimensional model.

[0098] Step S320: divide the bounding box corresponding to the three-dimensional model into eight subspaces, each of which corresponds to a child node of the octree.

[0099] It should be noted that the octree obtained after the first octave operation of the bounding box corresponding to the three-dimensional model is named as the initial octree grid.

[0100] In this embodiment, the bounding box calculated above is cut along the x, y, and z axes respectively, and each axis is divided into two halves, so that the bounding box is evenly divided into 8 smaller sub-cubes, i.e., sub-spaces. These 8 sub-cubes constitute the initial octree grid, in which each sub-cube becomes a child node of the octree, and each of them represents an area in the space.

[0101] Exemplarily, the bounding box of the entire 3D model is first calculated, and the 3D space area represented by the root node of the octree is the bounding box of the 3D model. The bounding box is equally divided into eight subspaces, each of which is an octree child node of the root node.

[0102] Step S330, constructing the octree mesh of the three-dimensional model based on the intersection information of the bounding box of the child node of the octree and the bounding box of the leaf node of the model R tree.

[0103] In this embodiment, each leaf node of the model R tree is traversed to check whether its bounding box intersects with any subspace of the current octree grid. The judgment process is to determine whether the bounding box of each child node of the octree intersects with the bounding box corresponding to the leaf node of the model R tree. For the intersecting subspaces, if the current level has not reached the expected subdivision depth, the subspace is further subdivided into eight smaller subspaces. Repeat the above process until the preset subdivision condition or the subdivision depth of the octree grid is reached. The octree grid finally obtained is the optimized three-dimensional model background grid, that is, the octree grid.

[0104] According to the intersection information between the leaf nodes contained in the model R tree and the eight subspaces of the initial octree grid, it is determined whether each subspace needs to be further divided into eight smaller subspaces. Among the eight subspaces, there are subspaces that need to be divided, and there are also subspaces that do not need to be divided. In this embodiment, the space after each division is defined as a subspace. That is, in the nth judgment, the subspace after n-1 divisions is used as an object that needs to be judged whether it intersects with the leaf nodes contained in the model R tree. For each subspace, if the subspace does not intersect with all the leaf nodes of the model R tree, and / or the subdivision accuracy of the subspace meets the user's set value, then the subspace does not need to be subdivided. The above process is continuously repeated until all subspaces do not need to be subdivided, and the octree at this time is determined to be an octree grid.

[0105] Optionally, after obtaining the octree grid, the constructed octree grid is output, including outputting information such as the center point and width of the bounding box of each node of the octree grid.

[0106] For example, there is a three-dimensional model of a mechanical part, which is composed of thousands of triangular units. According to the above method, all triangular units are first extracted and the corresponding model R-tree is constructed. Then the bounding box of the entire part is calculated, and the initial octree grid is constructed based on this bounding box. Then, the octree is subdivided using the information in the R-tree, and only the subspaces that intersect with the bounding boxes of the model R-tree leaf nodes are further subdivided. In this way, the efficiency of constructing the spatial grid is improved while ensuring accuracy, which is particularly suitable for complex three-dimensional scenes and large data sets.

[0107] By first determining the bounding box of the object, the three-dimensional space can be quickly divided into eight regular sub-areas, which facilitates the subsequent spatial indexing and management. In graphics rendering and simulation, the use of octree grids can speed up the determination of visible objects, especially when dealing with large three-dimensional models or scenes, which can effectively reduce unnecessary calculations.

[0108] Based on any of the above embodiments, the fourth embodiment of the present application proposes an octree grid construction method, referring to Figure 4 , step S330, comprising:

[0109] Step S410, detecting whether the bounding box of the child node of the octree intersects with the bounding box of the leaf node of the model R-tree.

[0110] Step S420: If they intersect, and the size of the subspace corresponding to any of the child nodes is greater than a preset threshold, the subspace is divided into eight lower-level subspaces.

[0111] Step S430, repeat the above steps until the size of all the lower-level subspaces is less than or equal to a preset threshold, or the lower-level subspaces do not intersect with the bounding boxes of the leaf nodes of the model R-tree, and construct the octree grid.

[0112] It should be noted that the subspace is in the octree grid, and each small area obtained by recursive subdivision is called a subspace. The intersection information refers to the spatial overlap between the subspace and the model R-tree leaf node, that is, whether the bounding box of the octree child node intersects with the bounding box of the leaf node of the model R-tree.

[0113] In this embodiment, for each child node of the octree, all leaf nodes of the model R tree are traversed, and it is determined whether the bounding box corresponding to each leaf node and the child node of the octree intersects. The detailed information of all intersections is recorded, including the intersecting child node numbers and the intersecting leaf nodes.

[0114] As an optional implementation, starting from the root node of the model R tree, determine whether the R tree child node intersects with the octree node. If so, determine the child node of the R tree child node. By determining the intersection from top to bottom, it is finally detected whether there is a leaf node intersecting with the octree node. Record all the detailed information of the intersection, including the intersecting subspace number and the intersecting leaf node.

[0115] If the current octree child node intersects with the model R tree child node, and / or the subspace size corresponding to the child node is greater than the preset threshold, the octree child node meets the subdivision condition, and the subspace corresponding to the child node is further subdivided into eight lower-level subspaces. At the same time, if an octree child node does not intersect with any model R tree child node, and / or the subspace size corresponding to the child node is less than or equal to the preset threshold, it is determined that the subspace corresponding to the octree child node does not need to be further subdivided. Repeat the above process until the size of all the lower-level subspaces is less than or equal to the preset threshold, or the lower-level subspace does not intersect with the bounding box of the leaf node of the model R tree, and the octree grid is constructed.

[0116] As an optional implementation, analyze the intersection information collected in the previous step to find out the subspaces that need to be further segmented, involving the situation where the subspace contains multiple intersecting objects or the intersection area exceeds a certain threshold. Mark these subspaces that meet the segmentation conditions as target subspaces and prepare for the next subdivision operation. Subdivide each target subspace into eight smaller subspaces and update the structure of the octree grid. Repeat steps S410 to S430 for the newly generated subspaces until all subspaces no longer meet the segmentation conditions.

[0117] In this embodiment, after checking the updated octree grid and confirming that all subspaces do not meet the segmentation condition, the octree grid at this time is output as the background grid. The background grid is used for subsequent spatial query, collision detection or other graphics processing tasks.

[0118] As an optional implementation, if it is determined based on the intersection information of each subspace that a certain subspace does not have a leaf node intersecting with it, it is determined that it does not meet the segmentation condition.

[0119] As another optional implementation, if the subdivision accuracy of the subspace meets the accuracy threshold set by the user, it is determined that it does not meet the segmentation condition.

[0120] As another optional implementation, if it is determined based on the intersection information of each subspace that a certain subspace does not have a leaf node intersecting with it, and the subdivision accuracy of the subspace meets the accuracy threshold set by the user, it is determined that it does not meet the segmentation condition.

[0121] For example, a digital model of a mechanical assembly line is being processed. The model consists of hundreds of different parts, each of which is represented by a number of triangular units. First, the R-tree of the model is constructed and the initial octree mesh is determined. Then, the intersection of each subspace with the triangular unit of the part is analyzed, and it is found that the triangular units of multiple parts intersect inside some subspaces. According to the preset segmentation conditions, these subspaces are selected for subdivision and the octree mesh is updated. After several iterations, a fine octree mesh is obtained, which can accurately reflect the position and shape of each part in the model and is suitable for subsequent simulation and analysis tasks.

[0122] In this embodiment, by pre-building the R-tree, the complexity of the intersection test with the model boundary during the octree subdivision process can be significantly reduced. This is because the nodes of the R-tree have encoded the spatial information of the triangle unit, making the intersection detection more efficient, thereby improving the efficiency of the octree mesh construction.

[0123] Based on any of the above embodiments, the fifth embodiment of the present application proposes an octree grid construction method, step S410 includes:

[0124] Step S510, traverse from the root node of the model R tree to the leaf nodes of the model R tree, and determine whether there is a target leaf node of the model R tree that intersects with the bounding box of the octree child node.

[0125] It should be noted that the target leaf node is an R-tree leaf node in the model R-tree that has a spatial intersection with the subspace corresponding to the octree child node.

[0126] In this embodiment, starting from the root node of the model R-tree, for each subspace, traverse downward from the root node step by step according to the hierarchical structure of the R-tree. Use the bounding box corresponding to the R-tree node to perform fast intersection detection to determine whether the current node has an intersection with the subspace. If the bounding box of the current node intersects with the subspace, continue to traverse its child nodes; if the current node is a leaf node and intersects, mark it as the target leaf node.

[0127] Step S520: If the target leaf node exists, stop traversal and determine whether the bounding box of the child node of the octree intersects with the bounding box of the leaf node of the model R tree.

[0128] It should be noted that once a leaf node is detected to intersect with a subspace, further traversal is stopped. The information of the leaf node, such as triangle unit data, bounding box, etc., is recorded as the basis of the intersection information. Otherwise, it is determined that the subspace does not have the intersection information corresponding to the intersection node. If no intersection is found when traversing to the leaf node of the R-tree, the information that the subspace does not have an intersection node is recorded.

[0129] Exemplarily, a complex building model is being processed, which consists of thousands of different components, each of which is composed of multiple triangular units, and the corresponding model R-tree has been constructed. Now it is necessary to determine the intersection of each leaf node subspace in the initial octree grid with the component. Starting from the root node of the R-tree, each octree leaf node subspace is checked. For example, for a subspace, it is quickly detected that it intersects with a part of a component, that is, a target leaf node in the R-tree, and the information of this component is recorded, and further traversal is stopped. For subspaces that do not intersect with any component, its non-intersecting state is recorded. In this way, the intersection information of each subspace in the octree grid is effectively determined.

[0130] For example, refer to Figure 5 , divide the bounding box of the 3D model into eight subspaces, each of which is an octree subnode of the root node. Continue to check whether the octree subnode area intersects with the R-tree subnode. If it intersects, and the size of the subspace represented by the current octree node does not reach the minimum threshold set by the user, then further subdivide the octree node. By continuously recursively subdividing the octree nodes, an octree grid that covers the entire model and meets the user's required division accuracy is finally generated. Figure 5 A schematic diagram of octree subdivision is shown. Checking whether the octree child node area intersects with the R-tree leaf node means first obtaining the three-dimensional bounding box area represented by the octree child node, starting from the root node of the R-tree, and continuously checking downward to see whether the bounding box expressed by the R-tree child node intersects with the octree node bounding box until the leaf node of the R-tree is accessed, and then determining whether there is an R-tree leaf node that intersects with the octree node bounding box.

[0131] In this embodiment, through the rapid traversal of the R-tree and the intersection detection of the bounding box, the intersection between a large number of subspaces and a complex three-dimensional model can be efficiently determined. The specific intersecting model parts, that is, the leaf nodes in the R-tree, can be accurately identified to provide accurate data support for subsequent space segmentation. Furthermore, it is not only applicable to static models, but also to dynamically changing scenes, because the structure of the R-tree can be dynamically updated to adapt to changes in the model. That is, this embodiment first constructs an R-tree based on a three-dimensional geometric model, and uses the R-tree to assist in quickly determining whether the octree node intersects with the model, which can accelerate the construction speed of the octree grid and improve the efficiency of octree grid generation.

[0132] The present application also provides an octree grid construction device, please refer to Figure 6 , the octree grid construction device comprises:

[0133] A model input module, used to obtain a three-dimensional model based on a triangular mesh expression; wherein the triangular mesh is composed of N triangular units, where N is an integer greater than 1;

[0134] An R-tree construction module, used to construct a model R-tree based on the triangular mesh on the three-dimensional model; wherein the leaf nodes of the model R-tree represent the bounding boxes of each of the triangular units in the three-dimensional model;

[0135] An octree construction module, used for constructing an octree grid of the three-dimensional model based on the model R-tree;

[0136] An output module is used to output the octree grid.

[0137] Optionally, the R-tree construction module is further used for:

[0138] Calculate the bounding box corresponding to each of the triangular units in the three-dimensional model;

[0139] Taking the bounding box corresponding to each triangle unit as a leaf node of the model R tree;

[0140] All the leaf nodes are aggregated to construct the model R-tree.

[0141] Optionally, the R-tree construction module is further used for:

[0142] Select any one of the bounding boxes as the initial bounding box, and the leaf node corresponding to the initial bounding box is the initial leaf node;

[0143] Aggregation starts from the initial leaf node, the nodes formed during the aggregation process are intermediate nodes, and a final node formed by aggregation is the root node of the model R-tree.

[0144] Optionally, the octree construction module is further used for:

[0145] Calculating a bounding box corresponding to the three-dimensional model;

[0146] Divide the bounding box corresponding to the three-dimensional model into eight subspaces, each of which corresponds to a child node of the octree;

[0147] Based on the intersection information of the bounding box of the child node of the octree and the bounding box of the leaf node of the model R tree, the octree grid of the three-dimensional model is constructed.

[0148] Optionally, the octree construction module is further used for:

[0149] Detect whether the bounding box of the child node of the octree intersects with the bounding box of the leaf node of the model R tree;

[0150] If they intersect, and the size of the subspace corresponding to any of the subnodes is greater than a preset threshold, the subspace is divided into eight subordinate subspaces;

[0151] Repeat the above steps until the size of all the lower-level subspaces is less than or equal to a preset threshold, or the lower-level subspaces do not intersect with the bounding boxes of the leaf nodes of the model R-tree, and construct the octree grid.

[0152] Optionally, the octree construction module is further used to: traverse from the root node of the model R tree to the leaf nodes of the model R tree, and determine whether there is a target leaf node of the model R tree that intersects with the bounding box of the octree child node;

[0153] If the target leaf node exists, stop traversal and determine whether the bounding box of the child node of the octree intersects with the bounding box of the leaf node of the model R tree.

[0154] The octree grid construction device provided in the embodiment of the present application adopts the octree grid construction method in the above embodiment, which can solve the technical problem of low efficiency of octree grid construction caused by judging whether the sub-region of the octree intersects with the model boundary each time the subdivision is performed. Compared with the prior art, the beneficial effects of the octree grid construction device provided in the embodiment of the present application are the same as the beneficial effects of the octree grid construction method provided in the above embodiment, and the other technical features in the octree grid construction device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0155] The present application provides an octree grid construction device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the octree grid construction method in the above-mentioned embodiment 1.

[0156] Reference below Figure 7 , which shows a schematic diagram of the structure of an octree grid construction device suitable for implementing the embodiment of the present application. The octree grid construction device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The octree grid construction device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0157] like Figure 7As shown, the octree mesh construction device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the octree mesh construction device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. The following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the octree mesh construction device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an octree mesh construction device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0158] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0159] The octree grid construction device provided by the present application adopts the octree grid construction method in the above embodiment, which can solve the technical problem of low efficiency of octree grid construction caused by judging whether the sub-region of the octree intersects with the model boundary each time the subdivision is performed. Compared with the prior art, the beneficial effects of the octree grid construction device provided by the present application are the same as the beneficial effects of the octree grid construction device provided by the above embodiment, and the other technical features in the octree grid construction device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0160] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0161] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0162] The present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is used to execute the octree grid construction method in the above embodiment.

[0163] The computer-readable storage medium provided in the present application may be a non-volatile storage medium or a volatile storage medium. For example, it may be a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0164] The computer-readable storage medium may be included in the octree grid construction device; or may exist independently without being assembled into the octree grid construction device.

[0165] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the octree mesh construction device, the octree mesh construction device: obtains a three-dimensional model expressed based on a triangular mesh; wherein the triangular mesh is composed of N triangular units, where N is an integer greater than 1;

[0166] Constructing a model R tree based on the triangular mesh on the three-dimensional model; wherein the leaf nodes of the model R tree represent the bounding boxes of each triangular unit in the three-dimensional model;

[0167] Constructing an octree grid of the three-dimensional model based on the model R-tree;

[0168] Output the octree grid.

[0169] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0170] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0171] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0172] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned octree grid construction method, and can solve the technical problem of low efficiency of octree grid construction caused by determining whether the sub-region of the octree intersects with the model boundary each time the subdivision is performed. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the octree grid construction method provided by the above-mentioned embodiment, and will not be repeated here.

[0173] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned octree grid construction method when executed by a processor.

[0174] The computer program product provided by the present application can solve the technical problem of inefficient octree mesh construction caused by determining whether the sub-region of the octree intersects with the model boundary each time the octree is subdivided. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the octree mesh construction method provided by the above embodiment, and will not be repeated here.

[0175] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. An octree grid construction method, characterized in that: The octree grid construction method comprises: Acquire a three-dimensional model based on a triangular mesh expression; wherein the triangular mesh is composed of N triangular units, where N is an integer greater than 1; Constructing a model R tree based on the triangular mesh on the three-dimensional model; wherein the leaf nodes of the model R tree represent the bounding boxes of each triangular unit in the three-dimensional model; Constructing an octree grid of the three-dimensional model based on the model R-tree; Output the octree grid.

2. The octree grid construction method according to claim 1, characterized in that: The step of constructing a model R-tree based on the triangular mesh on the three-dimensional model comprises: Calculate the bounding box corresponding to each of the triangular units in the three-dimensional model; Taking the bounding box corresponding to each triangle unit as a leaf node of the model R tree; All the leaf nodes are aggregated to construct the model R-tree.

3. The octree grid construction method according to claim 2, characterized in that: The step of aggregating all the leaf nodes to construct the model R-tree includes: Select any one of the bounding boxes as the initial bounding box, and the leaf node corresponding to the initial bounding box is the initial leaf node; Aggregation starts from the initial leaf node, the nodes formed during the aggregation process are intermediate nodes, and a final node formed by aggregation is the root node of the model R-tree.

4. The octree grid construction method according to claim 3, characterized in that: The bounding box represented by the intermediate node is the minimum bounding box covering the child nodes of the intermediate node.

5. The octree grid construction method according to claim 1, characterized in that: The step of constructing an octree grid of the three-dimensional model based on the model R-tree comprises: Calculating a bounding box corresponding to the three-dimensional model; Divide the bounding box corresponding to the three-dimensional model into eight subspaces, each of which corresponds to a child node of the octree; Based on the intersection information of the bounding box of the child node of the octree and the bounding box of the leaf node of the model R tree, the octree grid of the three-dimensional model is constructed.

6. The octree grid construction method according to claim 5, characterized in that: The step of constructing the octree mesh of the three-dimensional model based on the intersection information of the bounding box of the child node of the octree and the bounding box of the leaf node of the model R tree comprises: Detect whether the bounding box of the child node of the octree intersects with the bounding box of the leaf node of the model R tree; If they intersect, and the size of the subspace corresponding to any of the subnodes is greater than a preset threshold, the subspace is divided into eight subordinate subspaces; Repeat the above steps until the size of all the lower-level subspaces is less than or equal to a preset threshold, or the lower-level subspaces do not intersect with the bounding boxes of the leaf nodes of the model R-tree, and construct the octree grid.

7. The octree grid construction method according to claim 6, characterized in that: The step of detecting whether the bounding box of the child node intersects with the bounding box of the leaf node of the model R tree comprises: Traversing from the root node of the model R tree to the leaf nodes of the model R tree, determining whether there is a target leaf node of the model R tree that intersects with the bounding box of the octree child node; If the target leaf node exists, stop traversal and determine whether the bounding box of the child node of the octree intersects with the bounding box of the leaf node of the model R tree.

8. An octree grid construction device, characterized in that: The octree grid construction device comprises: A model input module, used to obtain a three-dimensional model based on a triangular mesh expression; wherein the triangular mesh is composed of N triangular units, where N is an integer greater than 1; An R-tree construction module, used to construct a model R-tree based on the triangular mesh on the three-dimensional model; wherein the leaf nodes of the model R-tree represent the bounding boxes of each of the triangular units in the three-dimensional model; An octree construction module, used for constructing an octree grid of the three-dimensional model based on the model R-tree; An output module is used to output the octree grid.

9. An octree grid construction device, characterized in that: The octree grid construction device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the octree grid construction method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the octree grid construction method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Coarse and fine granularity combined three-dimensional building model organization method and device, electronic equipment and storage medium

    CN120125771A