Method and device for quickly constructing virtual three-dimensional model

By using a half-side data structure and a static spatial indexing method, the problem of intersecting outer contour lines in existing technologies is solved, enabling fast and accurate extraction of 3D model outer contour lines and generation of virtual 3D models. This method is applicable to various line segment distributions and improves construction efficiency and visualization effects.

CN120876707APending Publication Date: 2025-10-31BEI JING YOU NUO KE JI GU FEN YOU XIAN GONG SI
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410533436.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing algorithms fail to correctly represent closed outer contours when dealing with intersecting outer contour lines, leading to erroneous results and affecting the efficiency and accuracy of virtual 3D model construction.

Method used

By employing a half-side data structure and a static spatial indexing method, and through self-intersection calculation and tree structure indexing, the outer contour lines of the 3D model are quickly extracted and smoothed to generate a virtual 3D model.

Benefits of technology

It enables rapid and accurate extraction of the outer contour lines of 3D models, applicable to both sparse and dense line segment distributions, thus improving the efficiency and visualization effect of virtual 3D model construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876707A_ABST
    Figure CN120876707A_ABST
Patent Text Reader

Abstract

The invention relates to a virtual three-dimensional model rapid construction method and device, and relates to the technical field of three-dimensional modeling, and the method comprises the steps: obtaining three-dimensional model data information; contour edge extraction is carried out on the three-dimensional model, and the extracted contour edge is stored in an edges array; carrying out self-intersection calculation on the contour edges in the edges array, storing line segments after the self-intersection calculation into an outputEdges array, and storing the vertexes of the line segments into an outputPoints array; constructing a half-edge data structure, and extracting an outer contour line of the three-dimensional model through the half-edge data structure on the basis of the outputPoints array and the outputEdges array; generating a virtual three-dimensional model based on the extracted outer contour line; and carrying out visual display on the virtual three-dimensional model. The invention provides a segmented spatial indexing method, line-line segmentation is quickly realized, and the method is suitable for sparse and dense line segment distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of 3D modeling technology, and in particular to a method and apparatus for rapid construction of virtual 3D models. Background Technology

[0002] The virtual-real integration of digital twins has wide applications in urban governance, advanced manufacturing, port shipping, and social welfare, effectively driving changes in modern economic and social models and efficiency. Digital twin models combine virtual and real elements, effectively using virtual numbers to represent certain indicators, such as water consumption, electricity consumption, and carbon dioxide emissions. In a 3D scene, these indicators are typically displayed as labels or billboards. To achieve better visual display, a virtual 3D model is constructed using the (building) model's outer contour. Combined with relevant indicators, the virtual model's height is dynamically set, enabling multi-state display of the virtual model. Therefore, rapid extraction of the model's outer contour is a crucial step in this process, and how to automate and efficiently extract it is a problem that urgently needs to be solved.

[0003] Existing algorithms find the outer contour line based on its connectivity, either by connecting the beginning and end of the contour line or by finding the maximum included angle between adjacent edges, until a closed outer contour line is obtained. When the outer contour lines intersect each other, meaning they do not intersect in space but intersect after being projected onto the same plane, the intersection point does not divide the original contour line. In this case, the above methods cannot correctly represent the prepared outer contour, resulting in incorrect results. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method and apparatus for rapid construction of virtual three-dimensional models, addressing the shortcomings of the prior art.

[0005] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:

[0006] A method for rapid construction of virtual 3D models, the method comprising:

[0007] Obtain 3D model data information;

[0008] The contour edges of the 3D model are extracted and stored in the edges array;

[0009] Perform self-intersection calculation on the contour edges in the edges array, store the line segments after self-intersection calculation in the outputEdges array, and store the line segment vertices in the outputPoints array;

[0010] Construct a half-side data structure, and extract the outer contour of the 3D model based on the outputPoints array and the outputEdges array through the half-side data structure;

[0011] A virtual 3D model is generated based on the extracted outer contour lines;

[0012] The virtual 3D model is then visualized.

[0013] Furthermore, self-intersection calculations are performed on the contour edges in the edges array, and the line segments after self-intersection calculations are stored in the outputEdges array, while the line segment vertices are stored in the outputPoints array. Specifically, this includes:

[0014] Static spatial indexes are constructed based on tree structures;

[0015] The static spatial index is used to find and return the index array linesArray that intersects with edge i. The index array linesArray is traversed to determine whether it intersects with edge i, and the set of intersection points is obtained.

[0016] Based on the intersection points in the intersection point set, the edge i is segmented, and the truncated line segments are stored in outputEdges, while the line segment vertices are stored in outputPoints.

[0017] Furthermore, the method of constructing a static spatial index based on a tree structure includes:

[0018] Construct a tree structure;

[0019] The space is divided into multiple subspaces based on a tree structure, and the nodes of the tree are divided into multiple child nodes, each child node representing a subspace.

[0020] Assign the data items in the original dataset to the corresponding leaf nodes;

[0021] A static spatial index is constructed based on the tree structure and the spatial range represented by each node.

[0022] Furthermore, the method of constructing a static spatial index based on a tree structure also includes:

[0023] Data items are queried using the static spatial index.

[0024] Furthermore, the querying of data items through the static spatial index includes:

[0025] Quickly locate nodes that contain the query range through query operations, and search for data items that meet the query conditions within these nodes;

[0026] By combining range queries with static spatial indexes, we can quickly locate potentially intersecting nodes and recursively search for data items within these nodes.

[0027] Furthermore, a half-side data structure is constructed, and the extraction of the 3D model's outer contour line is performed based on the outputPoints array and the outputEdges array through the half-side data structure, including:

[0028] The half-edge data structure of the model is constructed based on the vertices and edges in the outputPoints array and the outputEdges array;

[0029] Traverse the given half-side data structure and mark all half-sides that belong to the model boundary;

[0030] Convert the half-edge marked as the boundary into a boundary profile, and form a closed path of the boundary profile by connecting the vertices of the boundary half-edge.

[0031] The outer contour line is the closed path of the outermost surface with the largest absolute area.

[0032] Furthermore, constructing a half-side data structure, and extracting the outer contour of the 3D model based on the outputPoints array and the outputEdges array through the half-side data structure, also includes:

[0033] After extracting the outer contour of the 3D model, the outer contour is smoothed.

[0034] Output the outer contour of the processed 3D model.

[0035] Furthermore, the generation of the virtual 3D model based on the extracted outer contour lines includes:

[0036] Based on the extracted outer contour lines, a virtual 3D model is generated through elevation processing.

[0037] The beneficial effects of this invention are as follows: It proposes a method for rapidly constructing a virtual 3D model, including acquiring 3D model data information; extracting the contour edges of the 3D model and storing the extracted contour edges in an `edges` array; performing self-intersection calculations on the contour edges in the `edges` array, storing the line segments after the self-intersection calculations in an `outputEdges` array, and storing the line segment vertices in an `outputPoints` array; constructing a half-edge data structure, and extracting the outer contour lines of the 3D model based on the `outputPoints` array and the `outputEdges` array through the half-edge data structure; generating a virtual 3D model based on the extracted outer contour lines; and visualizing the virtual 3D model. This invention also proposes a segmented spatial indexing method to quickly achieve line segmentation, which is suitable for both sparse and dense line segment distributions.

[0038] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows:

[0039] A device for rapid construction of virtual 3D models, the device comprising:

[0040] The information acquisition module is used to acquire 3D model data information;

[0041] The contour edge extraction module is used to extract the contour edges of the 3D model and store the extracted contour edges in the edges array;

[0042] The intersection calculation module is used to perform self-intersection calculation on the contour edges in the edges array, store the line segments after self-intersection calculation in the outputEdges array, and store the line segment vertices in the outputPoints array;

[0043] The half-side data construction module is used to construct a half-side data structure, and extract the outer contour of the three-dimensional model based on the outputPoints array and the outputEdges array through the half-side data structure.

[0044] A virtual model generation module is used to generate a virtual three-dimensional model based on the extracted outer contour lines;

[0045] The display module is used to visualize the virtual 3D model.

[0046] Furthermore, the intersection calculation module is specifically used for:

[0047] Static spatial indexes are constructed based on tree structures;

[0048] The static spatial index is used to find and return the index array linesArray that intersects with edge i. The index array linesArray is traversed to determine whether it intersects with edge i, and the set of intersection points is obtained.

[0049] Based on the intersection points in the intersection point set, the edge i is segmented, and the truncated line segments are stored in outputEdges, while the line segment vertices are stored in outputPoints.

[0050] Furthermore, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for rapidly constructing a virtual three-dimensional model as described in any of the above technical solutions.

[0051] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the virtual three-dimensional model rapid construction method described in any of the above technical solutions.

[0052] The advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0053] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a flowchart illustrating a method for rapidly constructing a virtual 3D model according to an embodiment of the present invention;

[0055] Figure 2 This is a schematic diagram of a module of a rapid virtual 3D model construction device according to another embodiment of the present invention. Detailed Implementation

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

[0057] like Figure 1 As shown in the figure, a method for rapid construction of a virtual 3D model according to an embodiment of the present invention includes the following steps:

[0058] A method for rapid construction of virtual 3D models, the method comprising:

[0059] S110. Obtain 3D model data information;

[0060] S120. Extract the contour edges of the three-dimensional model and store the extracted contour edges in the edges array;

[0061] S130. Perform self-intersection calculation on the contour edges in the edges array, store the line segments after self-intersection calculation in the outputEdges array, and store the line segment vertices in the outputPoints array;

[0062] S140. Construct a half-side data structure, and extract the outer contour of the three-dimensional model based on the outputPoints array and the outputEdges array through the half-side data structure.

[0063] S150. Generate a virtual 3D model based on the extracted outer contour lines;

[0064] S160. Visualize the virtual 3D model.

[0065] Based on the above embodiments, further, in S120, the contour edges of the three-dimensional model are extracted and the extracted contour edges are stored in the edges array, which is specifically achieved by the following means.

[0066] First, as defined by the contour line, the visible and invisible surfaces of a model share a single edge; this edge is called the contour edge. The number of contour edges is relatively small compared to the total number of edges in the model, approximately [missing information].

[0067] Where n is the number of model edges. Therefore, by extracting the contour edges, the complexity of subsequent intersection point calculations can be effectively reduced.

[0068] Secondly, the edge of the model is shared by two faces, whose normals are respectively, and V is the direction of the projection view. If the condition is met, then this edge is a contour edge. The specific steps for extracting the contour edge are as follows:

[0069] 1) For each triangle, first calculate the normal and generate a hash value based on the vertex coordinates;

[0070] 2) Check the hash value and skip duplicate vertices;

[0071] 3) For each edge, check if its opposite edge is in edgeData. If it is, perform a threshold check. This invention uses the cosine of the angle as the threshold check, with an angle threshold of 40 degrees. edgeData is an object that stores edge data, where the opposite edge is the edge whose vertices are swapped in the original edge.

[0072] 4) If the threshold check is passed, the edge is added to the edges array;

[0073] 5) If the threshold check fails, the edge will be removed from edgeData;

[0074] 6) If an edge is not in edgeData, add it to edgeData;

[0075] In this invention, self-intersection calculation of the contour edges is performed after contour edge extraction to calculate the intersection points of line segments and the resulting line segments divided based on these intersection points. The search for line segment intersection points has important applications in computer graphics, geographic information systems, route planning, and other fields.

[0076] Based on the above embodiments, further, step S130, performing self-intersection calculations on the contour edges in the edges array, storing the self-intersection calculated line segments in the outputEdges array, and storing the line segment vertices in the outputPoints array, specifically includes:

[0077] S131. Construct a static spatial index based on a tree structure;

[0078] S132. Find and return the index array linesArray that intersects with edge i through the static spatial index, traverse the index array linesArray to determine whether it intersects with edge i, and obtain the intersection point set;

[0079] S133. Based on the intersection points in the intersection point set, divide the edge i, store the truncated line segments in outputEdges, and store the line segment vertices in outputPoints.

[0080] This invention implements spatial data indexing and querying through the construction of a static spatial index. It is a data structure that is efficient for querying and managing large two-dimensional datasets, especially suitable for spatial data indexing. Furthermore, it is a tree-based spatial index designed to provide fast range queries.

[0081] Specifically, step S131, the construction of the static spatial index based on the tree structure, includes:

[0082] S1311, Construct a tree structure;

[0083] The R-tree is used as the spatial indexing structure. The R-tree uses bounding rectangles to organize spatial objects, grouping them hierarchically based on their bounding rectangles. Each data item in the two-dimensional dataset is represented as a rectangle (i.e., the bounding box of the outline mentioned earlier), and these rectangles are placed in the leaf nodes of the tree.

[0084] S1312. Based on the tree structure, the space is divided into multiple subspaces, and the nodes of the tree are divided into multiple child nodes, each child node representing a subspace.

[0085] In the process of constructing the tree, the space is progressively divided into subspaces. Different strategies can be used for this division; this invention uses a four-partitioning approach. These divisions divide each node of the tree into multiple child nodes, each child node representing a subspace.

[0086] S1313. Assign the data items in the original dataset to the corresponding leaf nodes;

[0087] The leaf nodes store the actual data items, i.e., the rectangles from the original dataset. These data items are assigned to the appropriate leaf nodes during the tree construction process. This includes the following steps:

[0088] a) Constructing a Hilbert curve: A Hilbert curve is constructed by dividing space into small squares and then drawing a curve within each square. This method recursively subdivides the squares into smaller sub-squares and draws a portion of the Hilbert curve within each sub-square, ultimately obtaining the complete Hilbert curve.

[0089] b) Map the center of the rectangle to the Hilbert coordinate space and calculate the Hilbert value, then assign the Hilbert value to the leaf node;

[0090] c) Sort the rectangles by Hilbert value;

[0091] d) Generate nodes at each tree level from bottom to top;

[0092] e) Generate a parent node for each consecutive node block.

[0093] S1314. Construct a static spatial index based on the tree structure and the spatial range represented by each node.

[0094] After the tree is constructed, an index is built based on the tree's structure and the spatial range represented by each node. The index is an array whose elements sequentially correspond to the tree nodes. Each element contains the spatial range represented by the corresponding node. Specifically, the steps include:

[0095] 1) Initialize variables:

[0096] Construct an empty queue to store the indexes of the nodes to be searched;

[0097] Create an empty array named results to store the search results.

[0098] 2) Loop search:

[0099] First, starting with the root node, put the index of the root node into the queue.

[0100] Enter the while loop and check if the queue is empty. If the queue is empty, it means that all nodes have been traversed.

[0101] In the loop, a node index is taken from the queue (this node is a child node of a node found in the previous iteration).

[0102] For each node, check if the bounding boxes of its child nodes intersect the query rectangle. If they intersect, perform the appropriate operation based on the node type (leaf node or non-leaf node).

[0103] If the node is a leaf node, add its index to the results array.

[0104] If a node is not a leaf node, the index of its child nodes is added to the queue so that its child nodes can be searched later.

[0105] Continue the loop until the queue is empty.

[0106] 3) Return results:

[0107] When the search queue is empty, it indicates that the search is complete, and the results array (results) is returned.

[0108] By traversing the nodes in the index tree, the system quickly filters based on the query rectangle, adds the indices of the leaf nodes that meet the criteria to the result array, and performs further filtering as needed.

[0109] Furthermore, step S131, the construction of the static spatial index based on the tree structure, also includes:

[0110] S1315. Query data items using the static spatial index.

[0111] Furthermore, the querying of data items through the static spatial index includes:

[0112] Quickly locate nodes that contain the query range through query operations, and search for data items that meet the query conditions within these nodes;

[0113] By using range query operations, static spatial indexes are used to quickly locate potentially intersecting nodes and recursively search for data items in these nodes.

[0114] By constructing tree structures and static spatial indexes to efficiently organize and manage spatial datasets, range query operations become faster and more efficient. It can also perform fast spatial queries on large numbers of objects (such as millions), and is widely used in maps, data visualization, and computational geometry algorithms. Its indexing and search speeds are faster, and its memory usage is lower.

[0115] Specifically, step S132 involves finding and returning the index array linesArray that intersects with edge i using the static spatial index, traversing the index array linesArray to determine whether it intersects with edge i, and obtaining the intersection point set. This includes the following steps:

[0116] S1321. Traverse all edges i, calculate the bounding box rectangle of edge i, and quickly find and return the index array linesArray of edges that intersect with edge i using the static spatial index calculated in the previous step.

[0117] S1322. Traverse linesArray to find out whether it intersects with edge i. If it intersects, return the intersection point. Calculate the intersection point of two line segments. There are three cases: (1) no intersection point (2) one intersection point (3) two intersection points. There is interval overlap. Take the endpoint of edge j located inside edge i as the intersection point for later segmentation. When edge j is completely inside edge i, return two intersection points. When only a part is located inside edge i, return one intersection point.

[0118] S1323. Obtain the set of all intersection points that intersect edge i, intersectArray;

[0119] S1324. Calculate the distance between each intersection point and the starting point of edge i, and sort them.

[0120] Based on the above embodiments, specifically, step S133, which involves segmenting the edge i based on the intersection points in the intersection point set, storing the truncated line segments in outputEdges, and storing the line segment vertices in outputPoints, specifically includes the following steps:

[0121] Based on the ordered intersection points obtained in step S1324, edge i is divided, and the cut line segments are stored in outputEdges, while the line segment vertices are stored in outputPoints.

[0122] Based on the above embodiments, further, step S140, constructing a half-side data structure, and extracting the outer contour line of the 3D model through the half-side data structure based on the outputPoints array and the outputEdges array, includes:

[0123] S141. Construct a half-edge data structure of the model based on the vertices and edges in the outputPoints array and the outputEdges array;

[0124] It should be noted that constructing the half-side data structure of the model involves organizing the vertices, edges, and faces of the model into half-side data structures, ensuring that each half-side can access its adjacent half-sides, faces, and vertices.

[0125] S142. Traverse the half-edge data structure and mark all half-edges that belong to the model boundary; typically, boundary half-edges are those that belong to only one face.

[0126] S143. Convert the half-edge marked as the boundary into a boundary profile by connecting the vertices of the boundary half-edge, and connect these vertices in a certain order to form a closed path of the boundary profile; specifically including the following steps:

[0127] Extract the closed path to form the outer surface;

[0128] Due to numerical precision issues, there are some false closed path contours with areas very close to zero. The outermost surface with the largest absolute area is selected as the output result.

[0129] The output of the largest closed path of the outer surface is the outer contour line.

[0130] S144. Output the closed path of the outermost surface with the largest absolute value of the output area as the outer contour line.

[0131] Further, step S140, constructing a half-side data structure, and extracting the outer contour of the 3D model based on the outputPoints array and the outputEdges array through the half-side data structure, also includes:

[0132] S145. After extracting the outer contour lines of the 3D model, smooth the outer contour lines.

[0133] S146. Output the outer contour line of the processed 3D model.

[0134] By smoothing the outer contour lines, the jagged appearance of the contour can be reduced. This smoothing can be achieved by applying a smoothing algorithm (such as Gaussian smoothing).

[0135] The half-side data structure constructed in this invention provides a convenient and effective way to represent and process the topology of a model, thereby making the extraction of boundary contours simpler and more efficient.

[0136] Furthermore, this invention uses a half-side data structure to extract model boundary contours, and has the following advantages when processing complex models:

[0137] 1) Complete preservation of topological information: The half-edge data structure preserves the model's topological information in a compact way, including the relationships between vertices, edges, and faces. This makes it easy to access and manipulate the model's topological structure when extracting boundary contours.

[0138] 2) Boundary half-edge identification is simple: Since each half-edge in the half-edge data structure has a pointer to its adjacent face, boundary half-edges can be identified relatively easily. Boundary half-edges are usually half-edges that belong to only one face, so boundary half-edges can be marked by checking the adjacent faces of each half-edge.

[0139] 3) Efficiently extract boundary contours: Once the boundary half is marked, the extraction of boundary contours can be completed relatively efficiently; by traversing the boundary half and connecting their vertices, the boundary contours of the model can be obtained quickly.

[0140] 4) Applicable to complex models: Half-edge data structures can also perform well when dealing with complex models; regardless of whether the topology of the model is simple or complex, the boundary contour can be extracted through half-edge data structures without being limited by the complexity of the model.

[0141] Furthermore, the generation of the virtual 3D model based on the extracted outer contour lines includes:

[0142] Based on the extracted outer contour lines, a virtual 3D model is generated through elevation processing.

[0143] The beneficial effects of this invention are as follows: It proposes a rapid virtual 3D model construction method, including acquiring 3D model data information; extracting the contour edges of the 3D model and storing the extracted contour edges in an `edges` array; performing self-intersection calculations on the contour edges in the `edges` array, storing the self-intersection line segments in an `outputEdges` array, and storing the line segment vertices in an `outputPoints` array; constructing a half-edge data structure, and extracting the outer contour lines of the 3D model based on the `outputPoints` array and the `outputEdges` array through the half-edge data structure; generating a virtual 3D model based on the extracted outer contour lines; and visualizing the virtual 3D model. This invention also proposes a segmented spatial indexing method to quickly achieve line segmentation, which is suitable for both sparse and dense line segment distributions.

[0144] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows:

[0145] like Figure 2 As shown, a device for rapid construction of virtual 3D models includes:

[0146] Information acquisition module 110 is used to acquire three-dimensional model data information;

[0147] The contour edge extraction module 120 is used to extract the contour edges of the three-dimensional model and store the extracted contour edges in the edges array;

[0148] The intersection calculation module 130 is used to perform self-intersection calculation on the contour edges in the edges array, store the line segments after self-intersection calculation in the outputEdges array, and store the line segment vertices in the outputPoints array;

[0149] Half-side data construction module 140 is used to construct a half-side data structure and extract the outer contour of the three-dimensional model based on the outputPoints array and the outputEdges array through the half-side data structure.

[0150] Virtual model generation module 150 is used to generate a virtual three-dimensional model based on the extracted outer contour lines;

[0151] The display module 160 is used to visualize the virtual 3D model.

[0152] Furthermore, the intersection calculation module is specifically used for:

[0153] Static spatial indexes are constructed based on tree structures;

[0154] The static spatial index is used to find and return the index array linesArray that intersects with edge i. The index array linesArray is traversed to determine whether it intersects with edge i, and the set of intersection points is obtained.

[0155] Based on the intersection points in the intersection point set, the edge i is segmented, and the truncated line segments are stored in outputEdges, while the line segment vertices are stored in outputPoints.

[0156] Furthermore, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for rapidly constructing a virtual three-dimensional model as described in any of the above technical solutions.

[0157] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of a method for rapidly constructing a virtual three-dimensional model as described in any of the above technical solutions.

[0158] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0159] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0160] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

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

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

[0163] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0164] Based on this understanding, the present invention can implement all or part of the processes in the methods of the above embodiments, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

Claims

1. A method for rapid construction of a virtual 3D model, characterized in that, The method includes: Obtain 3D model data information; The contour edges of the 3D model are extracted and stored in the edges array; Perform self-intersection calculation on the contour edges in the edges array, store the line segments after self-intersection calculation in the outputEdges array, and store the line segment vertices in the outputPoints array; Construct a half-side data structure, and extract the outer contour of the 3D model based on the outputPoints array and the outputEdges array through the half-side data structure; A virtual 3D model is generated based on the extracted outer contour lines; The virtual 3D model is then visualized.

2. The method for rapid construction of virtual 3D models according to claim 1, characterized in that, Perform self-intersection calculations on the contour edges in the edges array, store the self-intersection calculated line segments in the outputEdges array, and store the line segment vertices in the outputPoints array. Specifically, this includes: Static spatial indexes are constructed based on tree structures; The static spatial index is used to find and return the index array linesArray that intersects with edge i. The index array linesArray is traversed to determine whether it intersects with edge i, and the set of intersection points is obtained. Based on the intersection points in the intersection point set, the edge i is segmented, and the truncated line segments are stored in outputEdges, while the vertices of the line segments are stored in the outputPoints array.

3. The method for rapid construction of virtual 3D models according to claim 2, characterized in that, The method of constructing a static spatial index based on a tree structure includes: Construct a tree structure; The space is divided into multiple subspaces based on a tree structure, and the nodes of the tree are divided into multiple child nodes, each child node representing a subspace. Assign the data items in the original dataset to the corresponding leaf nodes; A static spatial index is constructed based on the tree structure and the spatial range represented by each node.

4. The method for rapid construction of virtual 3D models according to claim 3, characterized in that, The method of constructing a static spatial index based on a tree structure also includes: Data items are queried using the static spatial index.

5. The method for rapid construction of virtual 3D models according to claim 4, characterized in that, The data items queried through the static spatial index include: Quickly locate nodes that contain the query range through query operations, and search for data items that meet the query conditions within these nodes; By combining range queries with static spatial indexes, we can quickly locate potentially intersecting nodes and recursively search for data items within these nodes.

6. The method for rapid construction of virtual 3D models according to claim 1, characterized in that, Constructing a half-side data structure, and extracting the outer contour of the 3D model based on the outputPoints array and the outputEdges array through the half-side data structure, includes: The half-edge data structure of the model is constructed based on the vertices and edges in the outputPoints array and the outputEdges array; Traverse the given half-side data structure and mark all half-sides that belong to the model boundary; Convert the half-edge marked as the boundary into a boundary profile, and form a closed path of the boundary profile by connecting the vertices of the boundary half-edge. The outer contour line is the closed path of the outermost surface with the largest absolute area.

7. The method for rapid construction of virtual 3D models according to claim 6, characterized in that, Constructing a half-side data structure, and extracting the outer contour of the 3D model based on the outputPoints array and the outputEdges array through the half-side data structure, further includes: After extracting the outer contour of the 3D model, the outer contour is smoothed. Output the outer contour of the processed 3D model.

8. The method for rapid construction of virtual 3D models according to claim 1, characterized in that, The process of generating a virtual 3D model based on the extracted outer contour lines includes: Based on the extracted outer contour lines, a virtual 3D model is generated through elevation processing.

9. A device for rapid construction of virtual 3D models, characterized in that, The device includes: The information acquisition module is used to acquire 3D model data information; The contour edge extraction module is used to extract the contour edges of the 3D model and store the extracted contour edges in the edges array; The intersection calculation module is used to perform self-intersection calculation on the contour edges in the edges array, store the line segments after self-intersection calculation in the outputEdges array, and store the line segment vertices in the outputPoints array; The half-side data construction module is used to construct a half-side data structure, and extract the outer contour of the three-dimensional model based on the outputPoints array and the outputEdges array through the half-side data structure. A virtual model generation module is used to generate a virtual three-dimensional model based on the extracted outer contour lines; The display module is used to visualize the virtual 3D model.

10. The virtual 3D model rapid construction device according to claim 9, characterized in that, The intersection calculation module is specifically used for: Static spatial indexes are constructed based on tree structures; The static spatial index is used to find and return the index array linesArray that intersects with edge i. The index array linesArray is traversed to determine whether it intersects with edge i, and the set of intersection points is obtained. Based on the intersection points in the intersection point set, the edge i is segmented, and the truncated line segments are stored in outputEdges, while the line segment vertices are stored in outputPoints.

Citation Information

Cited By

  • Three-dimensional building structure generation method and device, electronic equipment and storage medium

    CN122312930A