A method and device for constructing white formwork of a building
By segmenting the base surface vector of the building and using an integrated white model construction algorithm to generate a white model of the building without the base surface, the problem of unnecessary base surfaces in the existing method is solved, and work efficiency and model efficiency are improved.
Patent Information
- Application Number
- CN202410159035.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-04
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-02-04
AI Technical Summary
In the existing building white model construction method, the model results include unnecessary bottom surfaces, which increases useless workflow and limits work efficiency.
By obtaining the base surface vector of the building and segmenting it based on the preset segmentation method, multiple component polygons of the building are obtained, and the integrated white model construction algorithm is used to process these polygons to generate a white model of the building without the base surface, which is composed only of the exterior Facade and roof composition.
It eliminates unnecessary work steps and improves work efficiency. The generated building white model is more efficient and suitable for application scenarios that do not require a bottom surface.
Smart Images

Figure CN118135145B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of geographic information systems, and in particular to a method and device for constructing a white mold of a building. Background Art
[0002] Building white molds are digital expressions of the geometric properties of buildings in the real world and are widely used in geographic information system applications such as urban planning, spatial analysis, and information query. According to the national basic geographic entity expression model classification standard, the current mainstream building white mold product grade is 1.3, which can fully reflect the different heights of the top parts of the building and has a high degree of restoration.
[0003] At present, there are many methods for constructing 1.3-level building white molds. The commonly used method is based on the building base surface, that is, to construct a three-dimensional model by superimposing height information on the two-dimensional base surface vector. This method is to first pull the polygons in the building base surface vector into cylinders according to their respective heights to achieve the conversion from a two-dimensional surface to a three-dimensional body, where multiple cylinders can form a building, and multiple cylinders can be merged using the three-dimensional model Boolean operation algorithm, and the merged result is a complete building white mold.
[0004] The Boolean operation algorithm of the three-dimensional model requires that the volume model involved in the operation is closed on the surface. Therefore, the column obtained according to the above existing method must include the bottom surface, and the final building white mold also includes the bottom surface. However, the building white mold usually does not need the bottom surface because the application scenario does not require the bottom surface to be visible. As a result, the existing building white mold construction method adds useless workflows and limits work efficiency. Summary of the invention
[0005] In view of the above problems, the present invention provides a method and device for constructing a white formwork of a building, the main purpose of which is to solve the problem that the model results of the existing white formwork construction method of a building include unnecessary bottom surfaces.
[0006] In order to solve the above technical problems, the present invention proposes the following solutions:
[0007] In a first aspect, the present invention provides a method for constructing a white formwork for a building, the method comprising:
[0008] Get the building base surface vector;
[0009] Segment the building base surface vector based on a preset segmentation method to obtain multiple component polygons corresponding to the building;
[0010] An integrated white mold construction algorithm is used to process multiple component polygons to obtain a building white mold, wherein the building white mold is composed of a building facade and a building top surface.
[0011] In a second aspect, the present invention provides a building white formwork construction device, the device comprising:
[0012] An acquisition unit, used for acquiring a building base surface vector;
[0013] A segmentation unit, configured to segment the building base surface vector obtained by the acquisition unit based on a preset segmentation method to obtain a plurality of component polygons corresponding to the building;
[0014] The construction unit is used to process the multiple component polygons obtained by the segmentation unit using an integrated white mold construction algorithm to obtain a building white mold, wherein the building white mold is composed of a building facade and a building top surface.
[0015] In order to achieve the above-mentioned purpose, according to a third aspect of the present invention, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is run, the device where the storage medium is located is controlled to execute the building white mold construction method of the first aspect.
[0016] In order to achieve the above object, according to a fourth aspect of the present invention, a processor is provided, wherein the processor is used to run a program, wherein the program executes the building white formwork construction method of the first aspect when running.
[0017] By means of the above technical scheme, the present invention provides a method and device for constructing a white mold of a building, which can first obtain the base surface vector of the building, and then segment the base surface vector of the building according to a preset segmentation method to obtain a plurality of component polygons corresponding to the building. Then, the multiple component polygons are processed using an integrated white mold construction algorithm to obtain a white mold of the building. Compared with the existing construction method, the white mold of the building obtained by this method is composed of the facade and the top surface of the building, and does not contain any redundant bottom surface, thereby eliminating unnecessary work steps. In addition, the method for constructing a white mold of a building of the present invention is carried out in a two-dimensional space, which is more efficient than the Boolean operation of a three-dimensional model in a three-dimensional space, thereby improving the overall work efficiency.
[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0020] Figure 1 A flow chart of a method for constructing a white formwork of a building provided by an embodiment of the present invention is shown;
[0021] Figure 2 Another flow chart of a method for constructing a white formwork of a building provided by an embodiment of the present invention is shown;
[0022] Figure 3 A block diagram showing a composition of a building white formwork construction device provided by an embodiment of the present invention;
[0023] Figure 4 A block diagram showing the composition of another building white formwork construction device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0025] In view of the problem that the model results of the commonly used building white mold construction methods contain unnecessary bottom surfaces, the inventors have found through research that based on the characteristics of the 1.3-level white mold, a method can be proposed to directly generate the building facade and top surface to form the building white mold, thereby abandoning the white mold construction method that relies on Boolean operations of three-dimensional models. This not only solves the problem of unnecessary bottom surfaces, but also saves working time, thereby optimizing the overall workflow and improving efficiency. The specific execution steps are as follows: Figure 1 As shown, including:
[0026] 101. Obtain the building base surface vector.
[0027] In the present invention, the building base surface vector can be extracted from a True Digital Orthophoto Map (TDOM), or first extracted from a common digital orthophoto map (DOM) and then subjected to projection error correction, or extracted from a large-scale digital line graph (DLG). It should be noted that the resolution of the digital true orthophoto or digital orthophoto and the resolution of the original image should be better than 0.5 meters.
[0028] 102. Segment the base surface vector of the building based on a preset segmentation method to obtain a plurality of component polygons corresponding to the building.
[0029] In this step, the building base surface vector can be segmented according to the heights of various parts of the building based on a high-resolution (better than 0.5 meter) digital surface model (DSM) and a digital true orthogonal image. A building can be segmented into multiple adjacent polygons, which the present invention refers to as component polygons.
[0030] During segmentation, some building base surface vectors derived from large-scale digital linear maps have already been componentized and do not need to be segmented again.
[0031] After the segmentation is completed, you need to set the top height and bottom height attributes for the component polygon. You can use the height assignment method, such as the statistical method, to take the top height as the average elevation of the digital surface model within the component polygon, and the bottom height as the average elevation of the digital elevation model on the component polygon boundary. You can also use the stereo measurement method to measure the building height and ground height of the corresponding part of each component polygon, and set them as the top height and bottom height respectively. If the base surface vector has its own building height information, you can use this information to set it.
[0032] 103. The integrated white model construction algorithm is used to process multiple component polygons to obtain a white model of the building.
[0033] After obtaining the multiple component polygons corresponding to the building in step 102, the integrated white mold construction algorithm can be used to generate the building facade and the building top surface, that is, the building white mold construction is completed.
[0034] It should be noted that before generating the building facade and top surface, it is necessary to pre-process the polygons of multiple components, split the overlapping edges, and aggregate them. These are all automatically completed by the integrated white model construction algorithm.
[0035] Based on the above Figure 1It can be seen from the implementation method that the present invention provides a method for constructing a white mold of a building, which can first obtain the base surface vector of the building, and then segment the base surface vector of the building according to a preset segmentation method to obtain multiple component polygons corresponding to the building. Then, the multiple component polygons are processed using an integrated white mold construction algorithm to obtain a white mold of the building. Compared with the existing construction method, the white mold of the building obtained by this method is composed of the facade and the top surface of the building, and does not contain any redundant bottom surface, thereby eliminating unnecessary work steps. In addition, the method for constructing a white mold of a building of the present invention is carried out in a two-dimensional space, which is more efficient than the Boolean operation of a three-dimensional model in a three-dimensional space, thereby improving the overall work efficiency.
[0036] Furthermore, as a Figure 1 The embodiment shown in the figure is refined and expanded. The embodiment of the present invention also provides another method for constructing a white formwork of a building, such as Figure 2 As shown, the specific steps are as follows:
[0037] 201. Obtain the building base surface vector.
[0038] 202. Segment the building base surface vector based on a preset segmentation method to obtain a plurality of component polygons corresponding to the building.
[0039] Among them, the implementation method of step 201 to step 202 is the same as the implementation method of step 101 to step 102, and can achieve the same technical effect and solve the same technical problem, and will not be repeated here.
[0040] 203. Use an integrated white mold construction algorithm to process multiple component polygons to obtain a polygon object cluster.
[0041] In this step, the component polygons can be preprocessed using a preprocessing method to obtain the simplest component polygon object, referred to as a polygon object. Then, the polygon object obtained by preprocessing is segmented by overlapping edges using a segmentation method to obtain sub-segments with a single overlapping relationship, and then adjacency relationships between polygon objects are established based on the sub-segments. Finally, adjacent polygon objects are aggregated to obtain a polygon object cluster. A polygon object cluster represents an independent building.
[0042] (1) The preprocessing steps are as follows:
[0043] First, simplify the component polygons to remove redundant nodes, then create the object, and finally merge the nodes.
[0044] ① The method of simplifying component polygons is: check whether the two adjacent edges of each component polygon are collinear. If they are collinear, discard the common nodes of the two edges and merge the two edges into one edge.
[0045] ② The steps of establishing the object are as follows: establish the corresponding polygon object for the simplest component polygon obtained by simplification, and store its nodes in the global node set. Establish the edge objects and sub-segment objects contained in the polygon object in the order of nodes. Store the edge objects in the global edge set, and store the sub-segment objects in the global sub-segment set.
[0046] The nodes are points that form the component polygon in the two-dimensional vector and have two-dimensional coordinates. The edges are the lines connecting adjacent nodes of the component polygon in the two-dimensional vector and are uniquely determined by the start node (starting point) and the end node (end point).
[0047] A sub-segment is defined as the logical subordinate of an edge. An edge consists of one or more sub-segments connected end to end. A sub-segment is also uniquely determined by a start node (starting point) and an end node (end point).
[0048] A breakpoint is defined as a newly added node that splits an edge, which is ultimately selected from the endpoints (starting point or ending point) of the edge's subordinate segments.
[0049] The edge object is a computer program expression of the edge, which stores the start and end point indexes of the edge, the top height of the polygon of the component to which the edge belongs, the index of the subordinate sub-segment object, and the breakpoint set.
[0050] The sub-segment object is a computer program representation of the sub-segment, which stores the start and end indexes of the sub-segment. In addition, the sub-segment object defines three attributes: visibility, bottom height, and adjacent polygon object pointer.
[0051] The polygon object is a computer program representation of a two-dimensional component polygon, which stores the top and bottom height attributes of the component polygon. It also stores the indexes of the contained edge objects and sub-segment objects, as well as a collection of adjacent polygon object pointers.
[0052] It should be noted that after the component polygon object is established, the implementation object in this embodiment can be a polygon object, an edge object, and a sub-segment object, which correspond to the component polygon one by one. This is because the white mold construction algorithm involved in the present invention is implemented in a computer program, and the polygon object, the edge object, and the sub-segment object are just the expressions of the component polygon in the computer program.
[0053] ③ The steps of node merging are: traverse the global node set and merge the overlapping nodes. Whether two nodes overlap is determined by the point distance. If the distance is less than the set distance threshold, they are considered to overlap. After the merge is completed, the node index of the edge object and the sub-segment object needs to be updated.
[0054] (2) The specific steps of using the segmentation method to segment the overlapping edges of polygon objects are as follows:
[0055] ① Traverse the polygon objects as units, pair two sub-segment objects belonging to different polygon objects, and determine whether the two sub-segments partially overlap. (That is, determine whether there is a target edge object with partially overlapping sub-segment objects between different polygon objects).
[0056] ② For two sub-segment objects that pass the partial overlap test, use endpoints to split each other. The splitting basis is: if an endpoint of one sub-segment falls inside the other sub-segment, then the endpoint will produce an effective split on the other sub-segment. Otherwise, the split is invalid and is skipped directly. (That is, use endpoints to split the target edge object that partially overlaps the sub-segment objects, and obtain a polygon object with the edge re-segmented)
[0057] ③ According to the effective segmentation result, adjust the end point index of this sub-segment object, create a new sub-segment object, and add the new sub-segment object index to the polygon object and edge object to which this sub-segment object belongs, and arrange it after the sub-segment object index.
[0058] (3) The specific steps of establishing the adjacency relationship between polygon objects based on sub-segments are:
[0059] ①Traverse the polygon objects as units, pair two sub-segment objects belonging to different polygon objects, and determine whether they completely overlap, that is, ignore the endpoint order and determine whether the indexes of the two endpoints are the same. If they completely overlap, the two polygon objects are defined as adjacent, and the two polygon object pointers are assigned to the adjacent polygon object pointers of the other sub-segment object.
[0060] ② Taking polygon objects as units, check the adjacent polygon object pointers of each sub-segment object. If they are not empty, collect the adjacent polygon object pointer set.
[0061] (4) The steps of performing the aggregation operation on adjacent polygon objects are:
[0062] ① Clear the cluster container, select an unaggregated polygon object and put it into the cluster container, and mark the polygon object as aggregated.
[0063] ② Traverse the adjacent polygon object pointer set of the polygon object. If an unaggregated member is found, add it to the cluster container and mark it as aggregated.
[0064] ③ Repeat step ② for the polygon objects newly added to the cluster container until no new members are added. Thus, a polygon object cluster is obtained.
[0065] Generate building facades based on polygonal object clusters using an integrated white mold construction algorithm.
[0066] After completing the above steps, you can construct a white model of the building using polygon object clusters as units.
[0067] The construction steps are as follows: firstly, the average bottom height of the polygon objects in the polygon object cluster is calculated to obtain the average bottom height of the cluster, then the model vertices are created, then the model facade is generated, and finally the model top surface is generated to obtain a complete building white model.
[0068] (1) The steps to create model vertices are:
[0069] ① Establish a lookup table for three-dimensional vertices. The lookup table creates a directory based on the node index of the polygon object, and arranges the vertex indexes in descending order based on the vertex Z coordinates within the same directory. The lookup table needs to support two query operations:
[0070] Single query: With node index and single elevation value as query conditions, return the index of the vertex whose Z coordinate is equal to the elevation value or null value;
[0071] Interval query: Use node index and minimum and maximum elevations as query conditions, and return the indices of all vertices whose Z coordinates are between the two elevation values in the order of records.
[0072] ② Traverse the polygon objects in the polygon object cluster, and create vertices based on the sub-segment objects of each polygon object in the following way:
[0073] A. If the pointer of the adjacent polygon object of the sub-segment object is null, the sub-segment object is set to be visible, and the bottom height of the sub-segment object is the average bottom height of the cluster. Create the top and bottom points corresponding to the two end points of the sub-segment object respectively.
[0074] B. If the pointer of the adjacent polygon object of the sub-segment object is not empty, compare the top height of the current polygon object with that of the adjacent polygon object. If the top height of the current polygon object is greater than that of the adjacent polygon object, the sub-segment object is set to be visible, and the bottom side height of the sub-segment object is the top height of the adjacent polygon object. Create the top side point and bottom side point corresponding to the two end points respectively; otherwise, the sub-segment object is set to be invisible, and only the top side points corresponding to the two end points are created.
[0075] Here, the top point is the vertex created by combining the coordinates of the sub-segment object endpoint and the top height of the polygon object to which the sub-segment object belongs. The bottom point is the vertex created by combining the coordinates of the sub-segment object endpoint and the bottom height of the sub-segment object. The above sub-segment object is the specified sub-segment object, which can be any sub-segment object in each polygon object.
[0076] When creating a vertex, first query the vertex lookup table based on the node index and elevation value. If there is no record, create the vertex and record the vertex index in the vertex lookup table; otherwise skip.
[0077] (2) The steps to generate the model facade are:
[0078] Step 1: Collect the edge object index of each polygon object in the cluster, create a group linked list, group the edge objects according to the connection and collinear relationship, and arrange the indexes in the order of the end points in the group.
[0079] The specific implementation is as follows:
[0080] ①First, divide each edge object into a group.
[0081] ② Take out an unprocessed group each time. If the group is empty, skip it; if it is not empty, define the last edge object in the group as the current edge object.
[0082] ③Traverse all other groups. If the starting point of the first edge object of a group is the same as the end point of the current edge object, determine whether the first edge object is colinear with the current edge object and whether the direction from the starting point to the end point is the same. If the test passes, add all the edge object indexes of the group to the current group in sequence, clear the group, and then go to step ⑤; otherwise skip.
[0083] ④Repeat steps ② to ③ until all groups are processed.
[0084] ⑤Update the current edge object and repeat step ③ until no new edge object index is added. The current group is processed.
[0085] ⑥Remove the empty group in the linked list.
[0086] Step 2: Create two queues, the top edge queue and the bottom edge queue. The top edge queue records the vertex index of the top boundary of the facade, and the bottom edge queue records the vertex index of the bottom boundary.
[0087] Step 3: Take a group of edge objects from the group linked list each time, and collect the boundary vertex indexes in units of sub-segment objects according to the following method until all groups are processed.
[0088] ① Calculate the direction vector and normal based on the first edge object in the group. The direction vector points from the end point of the edge object to the starting point. The normal is the direction vector rotated 90 degrees clockwise.
[0089] ② For the first sub-segment object of the first edge object, if it is visible, add the top edge point index corresponding to the sub-segment object's starting point to the top edge queue. Perform interval query based on the starting point index, the edge object's top height, and the sub-segment object's bottom edge height, and add the query results to the bottom edge queue in sequence. Finally, add the bottom edge point indexes corresponding to the sub-segment object's starting point and end point to the bottom edge queue in sequence; if it is not visible, skip it.
[0090] ③ For other sub-segment objects of the first edge object, they are processed as follows according to visibility:
[0091] A. The current sub-segment object is visible.
[0092] If the previous sub-segment object is also visible, add the two bottom edge point indexes of the current sub-segment object to the bottom edge queue; if the previous sub-segment object is not visible, add the top edge point index corresponding to the starting point of the current sub-segment object to the top edge queue, and add the two bottom edge point indexes to the bottom edge queue. And add the starting point index to the end of the breakpoint set of the corresponding edge object.
[0093] B. The current sub-segment object is not visible.
[0094] If the previous sub-segment object is visible, add the starting point index of the current sub-segment object to the end of the breakpoint set of the edge object to which it belongs, add the top edge point index corresponding to the starting point to the top edge queue, and the facade boundary tracking ends. Reverse the top edge queue and append it to the end of the bottom edge queue, and use the bottom edge queue as the boundary node queue to proceed to step ⑦; if the previous sub-segment object is not visible, skip it.
[0095] ④ For the first sub-segment objects of other edge objects, they are processed as follows according to visibility:
[0096] A. The current sub-segment object is visible.
[0097] If the previous sub-segment object is also visible, first add the top edge point index corresponding to the end point of the previous sub-segment object to the top edge queue. Then make a face continuity judgment, that is, whether the height interval formed by the top edge point and the bottom edge point of the previous sub-segment object overlaps with that of the current segment. If there is overlap, then proceed to the boundary connection processing flow C. If there is no overlap, then proceed to the boundary segmentation processing flow D; if the previous sub-segment object is not visible, then start new face boundary tracking according to the same rules as step ②.
[0098] B. The current sub-segment object is not visible.
[0099] If the previous sub-segment object is visible, first add the top edge point index corresponding to the end point of the previous sub-segment object to the top edge queue, then perform interval query with the end point index of the previous sub-segment object, the top height of the previous edge object, and the bottom height of the previous sub-segment object, and add the query results to the top edge queue in sequence, and the facade boundary tracking is completed. Press E to simplify the top edge queue and the bottom edge queue respectively, then reverse the top edge queue and append it to the end of the bottom edge queue, and use the bottom edge queue as the boundary node queue to proceed to step ⑦. If the previous sub-segment object is not visible, skip it.
[0100] C. Boundary connection processing is as follows:
[0101] Compare the top heights of the previous edge object with the current edge object. If the current edge object is larger, use the starting index of the current sub-segment object and the top heights of the two side objects for interval query, and add the query results in reverse order to the top edge queue; if the previous edge object is larger, still use the starting index of the current sub-segment object and the top heights of the two side objects for interval query, and add the query results in sequence to the top edge queue.
[0102] Compare the bottom edge heights of the previous sub-segment object with the current sub-segment object. If the current sub-segment object is larger, use the starting index of the current sub-segment object and the bottom edge heights of the two sub-segment objects for interval query, and add the query results in reverse order to the bottom edge queue; if the previous sub-segment object is larger, still use the starting index of the current sub-segment object and the bottom edge heights of the two sub-segment objects for interval query, and add the query results in sequence to the bottom edge queue.
[0103] D. The boundary segmentation is processed as follows:
[0104] Perform interval query based on the end point index of the previous sub-segment object, the top height of the previous edge object, and the bottom height of the previous sub-segment object. Add the query results to the top edge queue in sequence, and then perform simplification on the top edge queue and the bottom edge queue according to E. Then, reverse the top edge queue and append it to the end of the bottom edge queue. Use the bottom edge queue as the boundary node queue and proceed to step ⑦. Finally, start tracking the new face boundary according to the same rules as step ②.
[0105] E. Queue streamlining rules are as follows:
[0106] For consecutive identical indices in the top edge queue, keep one;
[0107] For consecutive identical indexes in the bottom queue, all are discarded.
[0108] ⑤For other sub-segment objects of other edge objects, process them according to the same rules as step ③.
[0109] ⑥After all sub-segment objects are traversed, if the last sub-segment object is visible, first add the top edge point index corresponding to the end point of the last sub-segment object to the top edge queue, then perform interval query with the end point index of the last sub-segment object, the top height of the last edge object, and the bottom height of the last sub-segment object, add the query results to the top edge queue in sequence, and then perform simplification on the top edge queue and the bottom edge queue according to E respectively, reverse the top edge queue and append it to the end of the bottom edge queue, and use the bottom edge queue as the boundary node queue to proceed to step ⑦; if the last sub-segment object is not visible, skip it. The current edge group is processed.
[0110] ⑦ Based on the boundary node queue, calculate the minimum value of the facade vertex in the three axes of XYZ, take it as the local coordinate origin, and update the vertex coordinates to the local coordinates. Rotate the current facade around the Z axis according to the direction vector to coincide with the X axis, and then rotate 90 degrees clockwise around the X axis to the xoy plane. Finally, triangulate the boundary node queue and the transformed vertex coordinates to obtain the vertex index combination that constitutes the model surface. After the triangulation is completed, clear the top edge queue and the bottom edge queue.
[0111] (3) The triangulation processing steps are:
[0112] First, the polygons are triangulated, and then the triangulated triangulated network is optimized.
[0113] The triangulation is implemented as follows:
[0114] ① Traverse the boundary node queue, pick out the convex corner points, and sort them into the convex corner queue from small to large in terms of angle.
[0115] ② Take out the head node of the convex corner queue, and determine whether there are other nodes on the boundary in the triangle formed by this node and the front and back nodes. If there are, discard them and continue to take the next convex corner point for determination. If not, record the triangle and remove the node from the boundary node queue, then determine the change in the convexity of the front and back nodes and update the convex corner queue.
[0116] ③ Repeat step ② until there are only 3 nodes left in the boundary node queue. These 3 nodes form the final triangle. The triangulation process ends here.
[0117] The steps of triangulation optimization are as follows:
[0118] ① Pair all triangles in pairs according to their shared edges.
[0119] ② Take out a pair of triangles and determine whether the quadrilateral formed by them is a convex quadrilateral. If not, skip it. If so, calculate whether the length of the other diagonal is shorter than the shared edge. If so, re-divide the two triangles with the diagonal and update the pairing information of the other edges of the triangle; if not, skip it.
[0120] ③ Repeat step ② until all triangle pairs have been processed. This round of optimization ends.
[0121] ④ Repeat steps ① to ③ until no triangles are reconstructed.
[0122] It should be noted that the above-mentioned (3) triangulation processing step is the above-mentioned triangulation algorithm, which includes triangulation and triangulation network optimization.
[0123] 205. Generate the top surface of the building based on the polygonal object cluster using an integrated white mold construction algorithm.
[0124] In this step, the top surface construction is performed separately for each polygon object in the polygon object cluster. For polygon objects with only an outer ring, the triangulation process can be performed after the boundary is rearranged. For polygon objects with inner rings, they need to be converted into polygon objects without inner rings before triangulation.
[0125] (1) The method for reorganizing the boundaries of a polygon object is as follows:
[0126] The edge objects of the polygon object are traversed, and the starting point indexes of the edge objects are indexed in turn, and the breakpoints in the edge object breakpoint set are arranged to form a new boundary node queue.
[0127] (2) The processing method for polygon objects with only an outer ring is as follows:
[0128] Rearrange the outer ring according to step (1), and then send the boundary node queue to the triangulation process. Finally, query the vertex lookup table according to the index of each triangle node and the top height of the polygon object, replace the node index with the vertex index, and convert the plane triangle into a model triangle.
[0129] (3) The processing steps for polygon objects containing inner rings are as follows:
[0130] ① Rearrange all inner and outer rings according to step (1). For each node on the ring, find the nearest node that is not on the same ring. Save the node pairs that are the closest to each other into the node pair set, and sort them from small to large according to the distance between the nodes.
[0131] ② Establish a set of cut lines, initialize and query the set.
[0132] The secant line here is defined as the line connecting two nodes on different rings within the polygon object.
[0133] ③ Take a pair of nodes from the node pair set to create a secant, and determine whether the two rings connected by it are already connected. If yes, skip it. If not, determine whether the current secant intersects with the polygon or the secant in the secant set. If they intersect, discard it; if they do not intersect, add it to the secant set and mark the ring it is connected.
[0134] ④ Repeat step ③ until one of the following two conditions is met:
[0135] I. The number of secants in the secant set is equal to the number of polygon rings minus 1, that is, all rings are connected;
[0136] II. The node pair traversal is completed.
[0137] If step ④ ends under condition II, proceed as follows:
[0138] A. Find an unconnected cycle from the union-find set.
[0139] B. Compose node pairs with the nearest nodes of the ring and sort them in ascending order of distance. Use the same judgment principle as step ③ to select the shortest tangent line connecting the ring and other rings, add it to the tangent line set, and mark the ring where it is connected.
[0140] C. Repeat steps A to B until all rings are connected.
[0141] ⑤Establish new boundaries.
[0142] A. Create a line segment set. Add all the edges on the inner and outer rings reorganized in step (1) to the line segment set, add the secants in the secant set obtained in the previous step to the line segment set, and add the secants obtained by swapping the endpoints of each secant to the line segment set.
[0143] B. Count the out-degree of each endpoint of the line segment in the line segment set. Here, the out-degree is defined as the number of line segments starting from a certain node.
[0144] C. Establish a boundary node queue. Starting from the outer ring node, find a node with an outgoing degree of 1, define it as the current node, add it to the boundary node queue, and also add the end point of the line segment starting from it to the boundary node queue. Then define the reference vector with the line segment, with the direction from the starting point to the end point.
[0145] D. Update the current node to the end point of the previous line segment and examine its out-degree:
[0146] If it is 1, search the line segment set for a line segment starting from it;
[0147] If it is greater than 1, then among all the line segments starting from it, select the one that starts from the left side of the reference vector and ends farthest to the right.
[0148] Add the endpoint of the selected line segment to the boundary node queue and use the line segment to update the reference vector.
[0149] E. Repeat D until the current node is the first node in the boundary node queue. At this point, the operation of converting to a polygon object without an inner ring is completed.
[0150] ⑥ Perform triangulation and index conversion in the same way as step (2).
[0151] So far, the description of the method for constructing a white mold of a building in this embodiment has been completed.
[0152] Furthermore, as a response to the above Figure 1 In order to realize the method shown in the figure, the embodiment of the present invention also provides a building white mold construction device for the above Figure 1 The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Figure 3 As shown, the device comprises:
[0153] An acquisition unit 301 is used to acquire a building base surface vector;
[0154] A segmentation unit 302 is used to segment the building base surface vector obtained by the acquisition unit 301 based on a preset segmentation method to obtain a plurality of component polygons corresponding to the building;
[0155] The construction unit 303 is used to process the multiple component polygons obtained by the segmentation unit 302 using an integrated white mold construction algorithm to obtain a building white mold, where the building white mold is composed of a building facade and a building top surface.
[0156] Furthermore, as a response to the above Figure 2 In order to realize the method shown in the figure, the embodiment of the present invention also provides another building white mold construction device for the above Figure 2 The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Figure 4 As shown, the device comprises:
[0157] An acquisition unit 301 is used to acquire a building base surface vector;
[0158] A segmentation unit 302 is used to segment the building base surface vector obtained by the acquisition unit 301 based on a preset segmentation method to obtain a plurality of component polygons corresponding to the building;
[0159] The construction unit 303 is used to process the multiple component polygons obtained by the segmentation unit 302 using an integrated white mold construction algorithm to obtain a building white mold, where the building white mold is composed of a building facade and a building top surface.
[0160] In an optional implementation, the construction unit 303 includes:
[0161] A preprocessing module 3031 is used to preprocess a plurality of component polygons using a preprocessing method, wherein the preprocessing includes simplifying the component polygons, establishing component polygon objects, and merging coincident nodes between a plurality of component polygons, wherein the component polygon object is a data structure storing the component polygons, including a polygon object, an edge object, and a subsegment object, wherein the edge is used to constitute the component polygon, and the subsegment is used to constitute the edge of the component polygon;
[0162] A segmentation module 3032 is used to segment the polygon objects corresponding to the multiple component polygons preprocessed by the preprocessing module 3031 using a segmentation method to obtain multiple polygon objects with re-segmented edges;
[0163] Aggregation module 3033, used for aggregating multiple polygon objects after the overlapping edge segmentation by segmentation module 3032 by using an aggregation method to obtain a polygon object cluster;
[0164] The first construction module 3034 is used to generate the building facade based on the polygonal object cluster obtained by the aggregation module 3033 using an integrated white model construction algorithm;
[0165] The second construction module 3035 is used to generate the top surface of the building based on the polygonal object cluster obtained by the aggregation module 3033 by using an integrated white mold construction algorithm.
[0166] In an optional implementation manner, the segmentation module 3032 is specifically used for:
[0167] Determine whether there are target edge objects whose sub-segment objects partially overlap between different polygon objects;
[0168] If yes, the target edge object with partially overlapping sub-segment objects is segmented by endpoints to obtain a polygonal object with re-segmented edges, wherein the polygonal object with re-segmented edges has new sub-segment objects and start and end point indexes constituting the new sub-segment objects.
[0169] In an optional implementation manner, the first construction module 3034 is specifically used to:
[0170] According to the bottom heights stored in each polygon object in the polygon object cluster, the average bottom height of the polygon object cluster is calculated, wherein the bottom height and top height of each component polygon are obtained in advance according to the height assignment method, and each polygon object stores the bottom height and top height of the corresponding component polygon;
[0171] Generate building white model vertices according to the adjacent polygon object pointers stored in each sub-segment object in each polygon object in the polygon object cluster;
[0172] The building facade is generated based on the building white mold vertices.
[0173] In an optional implementation manner, when generating the building white model vertices according to the adjacent polygon object pointers stored in each sub-segment object in each polygon object in the polygon object cluster, the first construction module 3034 is specifically used to:
[0174] If the adjacent polygon object pointer stored in the specified sub-segment object of the polygon object is empty, the bottom height of the specified sub-segment object is the average bottom height of the polygon object cluster, and the top edge point and bottom edge point corresponding to the two end points of the specified sub-segment object are created respectively;
[0175] If the adjacent polygon object pointer stored in the designated sub-segment object of the polygon object is not empty, determining whether the top height of the polygon object is greater than the top height of the adjacent polygon object corresponding to the designated sub-segment object;
[0176] If yes, set the top height of the adjacent polygon object as the bottom height of the specified sub-segment object, and create top and bottom points corresponding to the two end points of the specified sub-segment object respectively;
[0177] If not, create the top edge points corresponding to the two end points of the specified sub-segment object.
[0178] In an optional implementation manner, when generating the building facade based on the building white mold vertices, the first construction module 3034 is specifically used to:
[0179] Establishing a group linked list, the group linked list is used to store edge object indexes stored in each polygon object in the polygon object cluster, the edge object stores a sub-segment object index, and the sub-segment object has an associated top edge point index and a bottom edge point index;
[0180] Create a facade top boundary vertex index queue and a facade bottom boundary vertex index queue;
[0181] Based on the adjacent polygon object pointers stored in each sub-segment object under each edge object in the group linked list, the visibility of each sub-segment object is determined respectively;
[0182] Based on the visibility of each sub-segment object, the top edge point index corresponding to the two end points of each sub-segment object is added to the top boundary vertex index queue of the facade, and the bottom edge point index corresponding to the two end points of each sub-segment object is added to the bottom boundary vertex index queue of the facade to form the facade boundary of the building;
[0183] The triangulation algorithm is used to process the boundary of the building facade to obtain the processed building facade.
[0184] In an optional implementation manner, the second construction module 3035 is specifically used to:
[0185] Arrange the boundaries of each polygon object in the polygon object cluster to obtain an arranged polygon boundary, wherein the arrangement is to traverse the edge objects under the polygon object, index the starting point of the edge object in turn, and arrange the breakpoints in the edge object breakpoint set to form a new boundary node queue, wherein the breakpoint is a newly added node for splitting the edge object, and is selected from the endpoints of the sub-segment objects under the edge object;
[0186] Each polygon object in the polygon object cluster after boundary arrangement is processed by a triangulation algorithm to obtain the top surface of the building. If the polygon object contains an inner ring, the polygon object is first converted into a corresponding polygon object without an inner ring before processing.
[0187] Furthermore, an embodiment of the present invention further provides a storage medium, wherein the storage medium is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the above Figure 1-2 The white formwork construction method of a building described in.
[0188] Furthermore, an embodiment of the present invention further provides a processor, the processor is used to run a program, wherein the program executes the above Figure 1-2 The white formwork construction method of a building described in.
[0189] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0190] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.
[0191] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0192] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0193] In addition, the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0194] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0195] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0196] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0197] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0198] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0199] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0200] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0201] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0202] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0203] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for constructing a white formwork of a building, characterized in that: The method comprises: Get the building base surface vector; Segment the building base surface vector based on a preset segmentation method to obtain multiple component polygons corresponding to the building; The integrated white mold construction algorithm is used to process multiple component polygons to obtain a building white mold, wherein the building white mold is composed of a building facade and a building top surface, including: Preprocessing a plurality of component polygons using a preprocessing method, the preprocessing comprising simplifying the component polygons, establishing an object of the component polygons, and merging coincident nodes between the plurality of component polygons, wherein the object of the component polygon is a data structure storing the component polygons, comprising a polygon object, an edge object, and a subsegment object, the edge being used to constitute the component polygon, and the subsegment being used to constitute the edge of the component polygon; Using a segmentation method, the polygon objects corresponding to the preprocessed multiple component polygons are segmented at overlapping edges to obtain multiple polygon objects with re-segmented edges; A plurality of polygonal objects after being segmented by coincident edges are aggregated by using an aggregation method to obtain a polygonal object cluster; Generate a building facade based on a polygonal object cluster using an integrated white mold construction algorithm, including: calculating an average bottom height of the polygonal object cluster according to the bottom heights stored in each polygonal object in the polygonal object cluster, wherein the bottom height and top height of each component polygon are obtained in advance according to a height assignment method, and each polygonal object stores the bottom height and top height of the corresponding component polygon; Generate building white model vertices according to the adjacent polygon object pointers stored in each sub-segment object in each polygon object in the polygon object cluster; Generating a building facade based on the building white mold vertices includes: Establishing a group linked list, the group linked list is used to store edge object indexes stored in each polygon object in the polygon object cluster, the edge object stores a sub-segment object index, and the sub-segment object has an associated top edge point index and a bottom edge point index; Create a facade top boundary vertex index queue and a facade bottom boundary vertex index queue; Based on the adjacent polygon object pointers stored in each sub-segment object under each edge object in the group linked list, the visibility of each sub-segment object is determined respectively; Based on the visibility of each sub-segment object, the top edge point index corresponding to the two end points of each sub-segment object is added to the top boundary vertex index queue of the facade, and the bottom edge point index corresponding to the two end points of each sub-segment object is added to the bottom boundary vertex index queue of the facade to form the facade boundary of the building; The building facade boundary is processed by using a triangulation algorithm to obtain a processed building facade; Generate building top surfaces based on polygonal object clusters using an integrated white model construction algorithm, including: Arrange the boundaries of each polygon object in the polygon object cluster to obtain an arranged polygon boundary, wherein the arrangement is to traverse the edge objects under the polygon object, index the starting point of the edge object in turn, and arrange the breakpoints in the edge object breakpoint set to form a new boundary node queue, wherein the breakpoint is a newly added node for splitting the edge object, and is selected from the endpoints of the sub-segment objects under the edge object; Each polygon object in the polygon object cluster after boundary arrangement is processed by a triangulation algorithm to obtain the top surface of the building. If the polygon object contains an inner ring, the polygon object is first converted into a corresponding polygon object without an inner ring before processing.
2. The method according to claim 1, characterized in that The polygon objects corresponding to the preprocessed multiple component polygons are segmented by overlapping edges using a segmentation method to obtain multiple polygon objects with re-segmented edges, including: Determine whether there are target edge objects whose sub-segment objects partially overlap between different polygon objects; If yes, the target edge object with partially overlapping sub-segment objects is segmented by endpoints to obtain a polygonal object with re-segmented edges, wherein the polygonal object with re-segmented edges has new sub-segment objects and start and end point indexes constituting the new sub-segment objects.
3. The method according to claim 1, characterized in that The building white model vertices are generated according to the adjacent polygon object pointers stored in each sub-segment object of each polygon object in the polygon object cluster, including: If the adjacent polygon object pointer stored in the specified sub-segment object of the polygon object is empty, the bottom height of the specified sub-segment object is the average bottom height of the polygon object cluster, and the top edge point and bottom edge point corresponding to the two end points of the specified sub-segment object are created respectively; If the adjacent polygon object pointer stored in the specified sub-segment object of the polygon object is not empty, determining whether the top height of the polygon object is greater than the top height of the adjacent polygon object corresponding to the specified sub-segment object; If yes, set the top height of the adjacent polygon object as the bottom height of the specified sub-segment object, and create top and bottom points corresponding to the two end points of the specified sub-segment object respectively; If not, create the top edge points corresponding to the two end points of the specified sub-segment object.
4. A building white formwork construction device, characterized in that: The device comprises: An acquisition unit, used for acquiring a building base surface vector; A segmentation unit, configured to segment the building base surface vector obtained by the acquisition unit based on a preset segmentation method to obtain a plurality of component polygons corresponding to the building; A construction unit is used to process the multiple component polygons obtained by the segmentation unit using an integrated white mold construction algorithm to obtain a building white mold, wherein the building white mold is composed of a building facade and a building top surface, and the construction unit includes: A preprocessing module, used for preprocessing a plurality of component polygons by using a preprocessing method, wherein the preprocessing includes simplifying the component polygons, establishing the object of the component polygons, and merging the coincident nodes between the plurality of component polygons, wherein the object of the component polygon is a data structure storing the component polygons, including a polygon object, an edge object and a subsegment object, wherein the edge is used to constitute the component polygon, and the subsegment is used to constitute the edge of the component polygon; A segmentation module, used for segmenting the polygon objects corresponding to the multiple component polygons preprocessed by the preprocessing module using a segmentation method to perform overlapping edge segmentation to obtain multiple polygon objects with re-segmented edges; An aggregation module is used to aggregate multiple polygon objects after the segmentation of overlapping edges by the segmentation module using an aggregation method to obtain a polygon object cluster; The first construction module is used to generate the building facade based on the polygonal object cluster obtained by the aggregation module using an integrated white mold construction algorithm; The first building block is specifically used for: According to the bottom heights stored in each polygon object in the polygon object cluster, the average bottom height of the polygon object cluster is calculated, wherein the bottom height and top height of each component polygon are obtained in advance according to the height assignment method, and each polygon object stores the bottom height and top height of the corresponding component polygon; Generate building white model vertices according to the adjacent polygon object pointers stored in each sub-segment object in each polygon object in the polygon object cluster; Generate a building facade based on the building white mold vertices; When generating the building facade based on the building white mold vertices, the first construction module is specifically used to: Establishing a group linked list, the group linked list is used to store edge object indexes stored in each polygon object in the polygon object cluster, the edge object stores a sub-segment object index, and the sub-segment object has an associated top edge point index and a bottom edge point index; Create a facade top boundary vertex index queue and a facade bottom boundary vertex index queue; Based on the adjacent polygon object pointers stored in each sub-segment object under each edge object in the group linked list, the visibility of each sub-segment object is determined respectively; Based on the visibility of each sub-segment object, the top edge point index corresponding to the two end points of each sub-segment object is added to the top boundary vertex index queue of the facade, and the bottom edge point index corresponding to the two end points of each sub-segment object is added to the bottom boundary vertex index queue of the facade to form the facade boundary of the building; The building facade boundary is processed by using a triangulation algorithm to obtain a processed building facade; The second construction module is used to generate the top surface of the building based on the polygon object cluster obtained by the aggregation module using the integrated white model construction algorithm. The second construction module is specifically used to: Arrange the boundaries of each polygon object in the polygon object cluster to obtain an arranged polygon boundary, wherein the arrangement is to traverse the edge objects under the polygon object, index the starting point of the edge object in turn, and arrange the breakpoints in the edge object breakpoint set to form a new boundary node queue, wherein the breakpoint is a newly added node for splitting the edge object, and is selected from the endpoints of the sub-segment objects under the edge object; Each polygon object in the polygon object cluster after boundary arrangement is processed by a triangulation algorithm to obtain the top surface of the building. If the polygon object contains an inner ring, the polygon object is first converted into a corresponding polygon object without an inner ring before processing.
5. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the building white formwork construction method according to any one of claims 1 to 3.
6. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the building white formwork construction method as described in any one of claims 1 to claim 3.
