Method, device, program product and medium for identifying graphic elements in rapid automatic modeling

By constructing a composite spatial index structure of geometric data and using R tree and KD tree for search, the problem of identifying DWG drawing elements in fast and automatic modeling is solved, and efficient recognition and automatic modeling is realized, suitable for highly diverse graphical data.

CN119741725APending Publication Date: 2025-04-01BWTON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411939352.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently identify the primitives in the form of DWG drawings and other graphic data in rapid automatic modeling, especially when the graphic data diversity and labeling are limited.

Method used

By constructing the geometric data composite spatial index structure of the primitives, using the R tree and KD tree to conduct continuous wall search and query of object tiles, identifying geometric entities and the distribution of objects on them, thereby obtaining wall, door and window data.

Benefits of technology

It realizes efficient identification of the elements in the graphic data without manual intervention, and is suitable for highly diverse graphic data, improving the efficiency of rapid automatic modeling in architectural design and engineering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741725A_ABST
    Figure CN119741725A_ABST
Patent Text Reader

Abstract

The present application provides a method, device, program product, and medium for identifying graphic elements in rapid and automatic modeling, which provides an efficient graphic element recognition service for input drawings, such as graphic data in the form of DOG drawings, and can efficiently identify graphic elements in rapid and automatic modeling without human intervention. It can be widely applicable to graphic data with data diversity, and provides efficient recognition of graphic elements in rapid and automatic modeling of drawings for architectural design and engineering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of three-dimensional modeling of geometric figures, and in particular to a method for identifying graphic elements in rapid and automatic modeling, a computer device and a computer program product, and a computer-readable storage medium. Background Art

[0002] In the rapid and automatic modeling based on BIM (Building Information Modeling), the recognition results obtained by performing primitive recognition provide a data basis for the creation of parametric three-dimensional models.

[0003] In order to realize the recognition of graphic elements in fast and automatic modeling, computer vision technology, machine learning technology and image processing algorithms are usually used in existing implementations. On the one hand, computer vision technology is used to perform edge detection, contour analysis and image segmentation on the drawing to extract the structural lines in the drawing for conversion into geometric data for further processing.

[0004] On the other hand, machine learning is often used to extract features from graphics elements in drawings, and predictions are made on each graphic element based on the extracted features, so as to achieve the purpose of graphic element recognition.

[0005] However, both computer vision technology and machine learning methods have many defects when applied to primitive recognition. The application of computer vision technology in primitive recognition is limited to graphic files obtained by scanning paper drawings, and is not applicable to graphic data, such as drawings in DWG format; machine learning is limited by the contradiction between drawings with extremely different expressions and very limited drawing annotations, and is not applicable to graphic data with data diversity.

[0006] In short, the graphic element recognition performed by computer vision technology, machine learning technology, and image processing algorithms cannot be applied to graphic data in the form of DWG drawings. Summary of the invention

[0007] One purpose of the present application is to efficiently identify primitives in fast automatic modeling for drawings that describe geometric entities through graphic data.

[0008] According to one aspect of an embodiment of the present application, a method for identifying primitives in rapid automatic modeling is disclosed, the method comprising:

[0009] Constructing a composite spatial index structure for geometric data of primitives in a drawing, wherein the drawing is input graphic data and the primitives in the drawing are primitives to be identified in rapid automatic modeling;

[0010] Perform a continuous wall search in the geometric data composite spatial index structure according to a list of wall lines to be searched formed by graphic element identifiers belonging to the wall lines in the drawing, and obtain the wall lines constituting the continuous wall and the blocks of the objects set by the continuous wall;

[0011] Obtaining the geometric entity corresponding to the continuous wall on the drawing and the distribution of the objects set on the geometric entity according to the wall lines constituting the continuous wall and the blocks of the objects set on the continuous wall;

[0012] The geometric entity and the objects set on the geometric entity are identified to obtain the wall, door and window data of the drawing, and the wall, door and window data are used as the identification result of the graphic elements distributed on the drawing.

[0013] According to one aspect of an embodiment of the present application, a computer device is disclosed, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described above.

[0014] According to one aspect of an embodiment of the present application, a computer program product is disclosed, including a computer program, wherein when the computer program is executed by a processor, the steps of the method described above are implemented.

[0015] According to one aspect of an embodiment of the present application, a computer-readable storage medium is disclosed, on which a computer program is stored, and when the program is executed by a processor, the steps of the above-mentioned method are implemented.

[0016] In an embodiment of the present application, for an input drawing, that is, graphic data in the form of a DWG drawing, the drawing is the input graphic data, and the graphic elements in the drawing are the graphic elements to be identified in rapid and automatic modeling. For this purpose, a continuous wall search will first be performed in the composite spatial index structure of geometric data based on a list of wall lines to be searched composed of graphic element identifiers belonging to the wall lines in the drawing, so as to obtain the wall lines constituting the continuous wall and the blocks of the objects set by the continuous wall. The geometric entities corresponding to the continuous wall on the drawing and the distribution of the objects set on the geometric entities are obtained from the wall lines constituting the continuous wall and the blocks of the objects set by the continuous wall. Then, the geometric entities and the objects set on the geometric entities are identified to obtain the wall, door and window data of the drawing, which is obtained by identifying the drawings. For drawings that describe geometric entities through graphic data, graphic elements can be efficiently identified in rapid and automatic modeling without human intervention. This can be widely applied to graphic data with data diversity, and provides efficient identification of graphic elements in rapid and automatic modeling of drawings for architectural design and engineering.

[0017] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0018] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.

[0020] Figure 1 A flow chart of a method for identifying graphic primitives in rapid automatic modeling according to an embodiment of the present application is shown.

[0021] Figure 2 is based on Figure 1 A flowchart of a method for describing the steps of constructing a composite spatial index structure from the geometric data of graphic elements in a drawing is shown in the corresponding embodiment.

[0022] Figure 3 Yes Figure 2 The corresponding embodiment shows a method flow chart of generating a spatial index for the geometric data of a graphic element, so that the corresponding graphic element identifier is respectively combined with the two-dimensional geometric range and key point position information defined for the graphic element in the geometric data to construct two spatial index structure steps.

[0023] Figure 4 Yes Figure 2 The corresponding embodiment shows a method flow chart of generating a spatial index for the geometric data of a graphic element, so that the corresponding graphic element identifier is respectively combined with the two-dimensional geometric range and key point position information defined for the graphic element in the geometric data to construct two spatial index structure steps.

[0024] Figure 5 The figure is a flowchart of a method for rapid and automatic modeling based on building information according to another exemplary embodiment.

[0025] Figure 6 is based on Figure 1 The corresponding embodiment shows a flowchart describing the steps of performing continuous wall search in the composite spatial index structure of geometric data based on the list of wall lines to be searched formed by the graphic element identifiers belonging to the wall wires in the drawing, and obtaining the wall lines constituting the continuous wall and the blocks of the objects set by the continuous wall.

[0026] Figure 7 is based on Figure 1 A flow chart of a method for identifying geometric entities and objects set on the geometric entities to obtain wall, door and window data of a drawing rescued in a corresponding embodiment.

[0027] Figure 8 It is a schematic diagram of the left wall line and the right wall line that have been searched in the example.

[0028] Fig. 9 Yes Figure 8Schematic diagram of the endpoints obtained by calculating the wall line.

[0029] Fig.10 is based on Fig. 9 A schematic diagram of the wall centerline endpoints shown in the corresponding embodiment. DETAILED DESCRIPTION

[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0031] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.

[0032] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0033] In the BIM-based rapid automatic modeling, the embodiment of the present application implements graphic element recognition one by one for a large amount of graphic data, namely a large amount of DWG drawings, etc., to obtain corresponding recognition results for parametric modeling of the drawings.

[0034] The embodiment of the present application deploys a fast automatic modeling client to obtain the input of the drawing, and then initiates the recognition of the graphics elements in the drawing through interaction with the recognition server to obtain the corresponding recognition results.

[0035] See also Figure 1 , Figure 1 A flowchart of a method for identifying primitives in rapid automatic modeling according to an embodiment of the present application is shown. The present application embodiment provides a method for identifying primitives in rapid automatic modeling, the method comprising:

[0036] Step S110, constructing a composite spatial index structure for the geometric data of the graphic elements in the drawing, the drawing is the input graphic data, and the graphic elements in the drawing are the graphic elements to be identified in the rapid automatic modeling;

[0037] Step S120, performing a continuous wall search in the geometric data composite spatial index structure according to a list of wall lines to be searched formed by graphic element identifiers belonging to the wall lines in the drawing, and obtaining wall lines constituting the continuous wall and blocks of objects set by the continuous wall;

[0038] Step S130, obtaining the geometric entity corresponding to the continuous wall on the drawing and the distribution of the objects set on the geometric entity according to the wall lines constituting the continuous wall and the blocks of the objects set on the continuous wall;

[0039] Step S140, identifying the geometric entities and the objects set on the geometric entities to obtain the wall, door and window data of the drawing, and taking the wall, door and window data as the identification result of the graphic elements distributed in the drawing.

[0040] First of all, it should be noted that the graphic data in the embodiments of the present application is digital data describing geometric shapes, spatial positions and relationships. The graphic data includes the appearance, structure, size and position of related objects and buildings, and can be drawings in DWG format.

[0041] For example, drawings depict the walls and doors and windows in a building in two dimensions, and depict the building as a whole through a series of drawings. Drawings contain a lot of information related to the design, construction and function of the building, for example, not only geometric shapes and spatial layouts, but also materials, construction methods, spatial functions, dimensioning and other architectural information.

[0042] Further classified explanation, the drawings carry architectural information, which includes wall information, door and window information, etc. Based on the architectural information carried, the ownership information of each element on the drawings is obtained, and then the elements belonging to the wall line on the drawings are identified by the ownership information.

[0043] Since the drawings carry building information, the geometric data of each wall line can be obtained from the wall information in the building information. Similarly, the geometric data belonging to the doors and / or windows can be obtained from the door and window information in the building information, which does not need to be obtained through manual operation, greatly reducing or even blocking human intervention.

[0044] In step S110, for a drawing, such as the aforementioned two-dimensional drawing, the architectural information is scattered on the drawing, and the drawing needs to be parsed to obtain the architectural information in the drawing. Specifically, the architectural information obtained by parsing includes the geometric data of the distributed primitives in the drawing and the attribution information of the primitives, that is, the primitives of the drawing and even the primitive attributes are extracted.

[0045] As the drawing is parsed and the graphics are extracted, all the geometric data will be extracted from the drawing. These geometric data are used to represent the walls, doors, windows and other components of the building. The distribution of each graphic element on the drawing can then be obtained through the geometric data. For example, the geometric data indicates the two-dimensional geometric range of the graphic element and the position of key points.

[0046] The layer information contained in the building information in the drawing, such as "Walls", "Doors", "Windows", etc., as layer information, identifies the category to which the elements belong. For example, the elements on this layer belong to walls, doors, windows, etc.

[0047] Based on this, the geometric data and attribution information of the graphic elements distributed on the drawing can be obtained by analyzing the drawing.

[0048] In another embodiment, the drawings may not be compiled in a standardized manner, and the graphics elements distributed on the drawings are not completely classified into corresponding layers. For example, the graphics element of a wall line is not set on the wall line layer during the drawing, but is on other layers. In this case, it is necessary to extract the attributes of the graphics element during the drawing parsing process, rather than relying solely on the layer information contained in the building information to obtain the graphics element's attribution information.

[0049] Specifically, the primitive attribute extraction is to extract the semantic information of the primitive, and then determine the type of the primitive according to the semantic information of the primitive to obtain the attribution information.

[0050] Among them, semantic information includes annotations, line shapes, dimensions, materials and other information, which are added to the drawing parsing process as a supplement to assist in obtaining the ownership information of the graphics elements based on the layer information, thereby ensuring the accuracy and comprehensiveness of the ownership information corresponding to the graphics elements and avoiding confusion or even loss of the obtained graphics element ownership information.

[0051] After parsing the drawings to obtain the geometric data and attribution information of the graphics elements, a geometric data composite spatial index structure for storing the geometric data can be constructed for the graphics elements, and a list of wall lines to be searched can be generated for the graphics elements parsed from the drawings based on the obtained attribution information, so that efficient search can be implemented in the geometric data composite spatial index structure based on the list of wall lines to be searched.

[0052] Based on the characteristics of the drawings, a geometric data composite spatial index structure adapted to the geometric data in the drawings is constructed. The geometric data composite spatial index structure realizes structured storage for the geometric data of the parsed primitives on the one hand, and realizes efficient search for the parsed geometric data on the other hand.

[0053] It should be clear that a geometric data composite spatial index structure is constructed for the automatic rapid modeling of each drawing. In other words, a drawing can correspond to a geometric data composite spatial index structure to ensure the orderly storage and efficient search of the data of the drawing, so as to achieve rapid modeling of the drawing.

[0054] Exemplarily, the geometric data composite spatial index structure is in a tree shape, including a plurality of nodes, and the geometric data is stored through the tree-shaped nodes. In other words, the geometric data composite spatial index structure is used to insert the geometric data into the node using the primitive identifier as an index.

[0055] In an exemplary embodiment, the geometric data composite spatial index structure includes two spatial index structures. In other words, the two spatial index structures are adapted to the two-dimensional geometric range and key point position information corresponding to the primitives in the geometric data.

[0056] As mentioned above, the geometric data of the primitive includes two-dimensional geometric range and key point location information. Correspondingly, the geometric data composite spatial index structure includes two spatial index structures, namely R-tree (Rectangle Tree) and KD-tree (K-Dimensional Tree). By inserting the two-dimensional geometric range into the node with the primitive identifier as the index into the R-tree, since the R-tree supports hierarchical storage of rectangular areas, and the two-dimensional geometric range is mostly limited to rectangular areas, the geometric data in the drawing can be efficiently queried and searched with the support of the R-tree.

[0057] In addition, by inserting key point location information into the node with the primitive identifier as the index into the KD tree, the query search of the key point location information is realized with the help of the KD tree applicable to two-dimensional spatial data.

[0058] In summary, by adapting to the characteristics of various types of data in geometric data, two spatial index structures are constructed as the composite spatial index structure of geometric data. While adapting the drawings to achieve orderly storage of data, it also ensures the efficiency of subsequent query and search.

[0059] Further explained, the two-dimensional geometric range defined by the primitive can be obtained by calculating the outer box of the primitive. The outer box is the minimum rectangular bounding box of the primitive in the two-dimensional space. Specifically, the outer box can be an axis-aligned outer box. Therefore, the minimum matrix bounding box of the primitive in the two-dimensional space will be used as the two-dimensional geometric range defined by the primitive, and then inserted into the R-tree with the primitive identifier as the index. The two-dimensional geometric range and primitive identifier of each primitive are used as a node of the R-tree, which realizes the hierarchical storage of geometric data in the drawing and can efficiently support query search.

[0060] It should be understood that the two-dimensional geometric scope of the graphics elements obtained through drawing analysis can be straight lines, arcs, polylines, splines, etc. The spatial relationship between the graphics elements can be quickly determined under the action of the two-dimensional geometric scope. In addition, the R-tree suitable for data storage and search of this type of two-dimensional geometric scope optimizes its own storage while enhancing the data search performance of the modeling process, thereby enhancing timeliness while ensuring lightweight modeling.

[0061] The composite spatial index structure of geometric data does not refer to the complexity of the geometric data, but to the construction of two spatial index structures adapted to the characteristics of the geometric data itself to achieve fast query and search of graphics elements.

[0062] The key point position information of the primitives and the two-dimensional geometric range are both part of the geometric data obtained by parsing the drawings, but the composite spatial index structure of the geometric data is adapted to their respective characteristics to obtain the optimal processing of the geometric data.

[0063] Exemplarily, the key point position information of a graphic element may exist in the form of point coordinates. For example, for graphic elements such as a straight line, an arc, a polyline, and a spline, it may be the starting point coordinates and the ending point coordinates corresponding to the graphic element.

[0064] The construction of KD tree is based on point coordinates. For all primitives, their point coordinates are taken from the geometric data as the key point position information of the primitive, such as the starting point coordinates and the ending point coordinates mentioned above, and then inserted into the KD tree together with the primitive identifier. In the drawing, the primitive is the decomposition of the block. Therefore, the execution process of parsing the drawing actually includes decomposing the blocks in the drawing, obtaining the decomposed primitive and the key point position information of the primitive, and then constructing the corresponding spatial index structure.

[0065] In geometric data, both key point location information and two-dimensional geometric range are representations and descriptions of the corresponding primitives. The two-dimensional geometric range limits the primitives in space, and the key point location information represents the key points of the primitives, such as the starting point coordinates and the end point coordinates mentioned above. Therefore, parsing the drawings to obtain two-dimensional geometric information, key point location information and even attribution information, all represent and describe the corresponding primitives from various dimensions, which will greatly improve the accuracy of the subsequent model construction.

[0066] The two spatial index structures, R-tree and KD-tree, work together to realize the storage of geometric data for the graphics elements in the drawings. This will significantly improve the query and search efficiency of geometric data and the accuracy of spatial relationship judgment in the subsequent building information modeling (BIM) and automated modeling, and can be suitable for batch modeling under large-scale drawings.

[0067] See also Figure 2 , Figure 2 is based on Figure 1 A flowchart of a method for describing the steps of constructing a composite spatial index structure from the geometric data of graphic elements in a drawing is shown in the corresponding embodiment.

[0068] The embodiment of the present application provides a step S110 of constructing a composite spatial index structure for geometric data of a graphic element in a drawing, including:

[0069] Step S111, performing drawing analysis to obtain geometric data of distributed graphic elements;

[0070] Step S112, generating a spatial index for the geometric data of the primitive, so that the corresponding primitive identifier and the two-dimensional geometric range and key point position information defined for the primitive in the geometric data respectively construct two spatial index structures.

[0071] These two steps are described in detail below.

[0072] When analyzing drawings that carry architectural information, the geometric data and attribution information of the graphics elements distributed in the drawings are extracted from the drawings. The attribution information indicates the classification of the graphics element, that is, the type. In other words, the attribution information can be used to determine whether the corresponding graphics element is a wall line, a door, or a window.

[0073] The geometric information of the primitive at least includes the two-dimensional geometric range and key point position information defined by the primitive. Therefore, the spatial index structure can be constructed based on the two-dimensional geometric range and the key point position information respectively.

[0074] In an exemplary embodiment, the two spatial index structures include an R-tree and a KD-tree, wherein the R-tree creates nodes with primitive identifiers and corresponding two-dimensional geometric ranges, and the KD-tree creates nodes with primitive identifiers and corresponding key point location information.

[0075] In an exemplary embodiment, the key point positions are the starting point coordinates and the ending point coordinates of the corresponding primitive.

[0076] See also Figure 3 , Figure 3 Yes Figure 2 The corresponding embodiment shows a method flow chart of generating a spatial index for the geometric data of a graphic element, so that the corresponding graphic element identifier is respectively combined with the two-dimensional geometric range and key point position information defined for the graphic element in the geometric data to construct two spatial index structure steps.

[0077] The spatial index structure is an R-tree. The embodiment of the present application provides a step S112 of generating a spatial index for the geometric data of a primitive, so that the corresponding primitive identifier and the two-dimensional geometric range and key point position information defined for the primitive in the geometric data respectively construct two spatial index structures, including:

[0078] Step S1121a, calculating the two-dimensional geometric range defined by each primitive;

[0079] Step S1122a, creating an R-tree, inserting the primitive identifier and the two-dimensional geometric range corresponding to each primitive into the node of the R-tree one by one, and constructing an R-tree that maps the two-dimensional geometric range defined by the primitive in the drawing.

[0080] These two steps are described in detail below.

[0081] Exemplarily, the two-dimensional geometric range of a primitive can be defined by the minimum coordinate and maximum coordinate of the primitive to represent the spatial range of the primitive in the two-dimensional space. For a primitive, the two-dimensional geometric range can be determined by the coordinate values ​​of its vertices, and the two-dimensional geometric range gives the boundary of the primitive.

[0082] The 2D geometric range calculation is performed according to the type of primitive. For example, for a wall formed by a line segment, the axis-aligned outer bounding box mapped by its two endpoints contains all the spatial range of the wall, so it can be used as a 2D geometric range.

[0083] The wall line formed by polylines requires all the spatial ranges defined by the entire polylines as the two-dimensional geometric range; the two-dimensional geometric range of an arc can be calculated by the starting and ending angles of the arc.

[0084] By calculating the two-dimensional geometric range of each primitive, a basis is provided for constructing a spatial index for the primitive. The calculation of the two-dimensional geometric range is used as the core step in geometric data processing. When processing large-scale building data, it can be used to create an efficient spatial index structure for the primitive, thereby supporting fast query searches and ultimately accelerating building automation modeling.

[0085] For each drawing, an R-tree is created, and the two-dimensional geometric range corresponding to each primitive is inserted into the R-tree one by one. Thus, the primitive identifier and the two-dimensional geometric range of each primitive are stored in a node of the R-tree. Similarly, the two-dimensional geometric range of all primitives on the drawing will be placed on the R-tree, and finally an R-tree that maps the two-dimensional geometric range defined by the primitives in the drawing is obtained.

[0086] Please continue to read Figure 4 , Figure 4 Yes Figure 2 The corresponding embodiment shows a method flow chart of generating a spatial index for the geometric data of a graphic element, so that the corresponding graphic element identifier is respectively combined with the two-dimensional geometric range and key point position information defined for the graphic element in the geometric data to construct two spatial index structure steps.

[0087] The spatial index structure is a KD tree. The embodiment of the present application provides a step S122 of generating a spatial index for the geometric data of the primitive, so that the corresponding primitive identifier and the two-dimensional geometric range and key point position information defined for the primitive in the geometric data respectively construct two spatial index structures, including:

[0088] Step S1221b, taking the coordinates of the starting point and the ending point of each graphic element as the key point position information of the graphic element;

[0089] Step S1222b, creating a KD tree, inserting the graphic element identification and key point position information corresponding to each graphic element into the nodes of the KD tree one by one, and constructing a KD tree that maps the key point position information corresponding to the graphic elements in the drawing.

[0090] These two steps are described in detail below.

[0091] As mentioned above, the construction of the composite spatial index structure of geometric data is, on the one hand, the construction of the R-tree implemented in the two-dimensional geometric range, and on the other hand, the construction of the KD-tree implemented in the key point position information. The R-tree is used to perform the query of the objects set by the continuous wall, which includes but is not limited to doors and / or windows, and the KD-tree is used to perform the search for the next wall line in the continuous wall search.

[0092] In other words, through the cooperation of R-tree and KD-tree, it is possible to search for continuous walls in drawings and search for blocks corresponding to doors and windows on continuous walls, thereby quickly and accurately obtaining various components of the building, and then implementing accurate and fast automatic modeling.

[0093] With the execution of step S110, after the corresponding geometric data composite spatial index structure is constructed for the drawing, the continuous wall and the objects set on the continuous wall are searched in the geometric data composite spatial index structure through the execution of step S120.

[0094] Step S110 realizes the digitization of the drawing, and step S120 realizes the query and search of various structures of the digitized drawing, such as walls, and various objects such as doors and windows on the walls.

[0095] In step S120, the search for the continuous wall is performed on the KD tree, and the next wall line is searched for the current wall line through the key point positions stored in the nodes of each graphic element in the KD tree until the search for the current continuous wall is completed.

[0096] In the search for the next wall line, if the next wall line does not exist, the block intersected by the current wall line is searched through the R tree.

[0097] Therefore, by searching for continuous walls and door and window blocks on the continuous walls through R-tree and KD-tree, the automated modeling can significantly improve the efficiency and accuracy of wall modeling and reduce the consumption of computer resources.

[0098] In drawings, walls are one of the most basic and widely covered elements, and doors and windows are important components of walls. Efficient and accurate identification of continuous walls (i.e. a series of adjacent and connected wall lines) and the doors and windows above them helps to quickly generate models.

[0099] Exemplarily, the continuous wall search for drawings is performed based on the list of wall lines to be searched. The continuous wall search is performed based on the list of wall lines to be searched to efficiently identify a group of continuously connected walls.

[0100] The list of wall lines to be searched contains all the wall lines in the drawing. These wall lines may have different geometric shapes and sizes, for example, they may be straight lines, curved lines or polylines, and each wall line has a unique primitive identifier. Therefore, in an exemplary embodiment, the list of wall lines to be searched will mark the wall lines in the drawing in the form of primitive identifiers, and the wall lines are the wall lines to be searched for in the current modeling. In other words, when the continuous wall search is about to be implemented, the wall to be searched is placed in the list of walls to be searched in the form of its corresponding primitive identifier to complete the data preparation for the continuous wall search to be carried out.

[0101] Therefore, before executing the continuous wall search, the process of generating the wall line list to be searched will also be executed.

[0102] See also Figure 5 , Figure 5 The figure is a flowchart of a method for rapid and automatic modeling based on building information according to another exemplary embodiment.

[0103] The rapid automatic modeling method based on building information provided in the embodiment of the present application further includes the following steps before executing step S120:

[0104] Step S210, identifying the attribution information of the graphic element in the drawing, and determining the graphic element identifier belonging to the wall line in the geometric data composite spatial index structure;

[0105] Step S220: Generate a to-be-searched wall line list using all graphic element identifiers corresponding to the wall lines. The to-be-searched wall line list indicates the wall lines existing in the drawing.

[0106] These two steps are described in detail below.

[0107] As described above, as the layer information that can be outputted from the drawing is parsed in step S210 , or the semantic information extracted from the graphic elements, the type to which each graphic element in the drawing belongs is identified, that is, the attribution information is obtained.

[0108] The attribution information of the primitive indicates whether the primitive belongs to the wall line in the drawing or other components, such as whether the primitive belongs to a door or a window. According to the attribution information of the primitive, a list of wall lines to be searched is formed for all the wall lines in the drawing with their primitive identifiers. The list of wall lines to be searched is used to determine the primitive identifier and corresponding geometric data belonging to the wall line in the composite spatial index structure of geometric data. In short, the attribution information of the primitive is used to indicate the entity type of the object corresponding to the primitive, which includes walls, doors and windows.

[0109] The geometric data composite spatial index structure contains the geometric data of all the graphics elements in the drawing, not just the graphics elements belonging to the wall lines. Therefore, after obtaining the graphics element's ownership information, the nodes belonging to the wall lines and the graphics element identifiers on the nodes can be located in the geometric data composite spatial index structure through the ownership information, thereby forming a list of wall lines to be searched.

[0110] The list of wall lines to be searched includes all the graphic elements corresponding to the wall lines in the composite spatial index structure of geometric data into the constructed form, so that the composite spatial index structure of geometric data can orderly realize the search of several continuous walls in the drawing under the coordinated control of the list of wall lines to be searched. In other words, the list of wall lines to be searched is used to determine the current wall line and the next wall line to be searched for the execution of the continuous wall search, so as to ensure the search of the current continuous wall and the search of the next continuous wall.

[0111] Therefore, in the execution of step S120, based on the list of wall lines to be searched formed by the graphic element identifiers belonging to the wall lines in the drawing, the wall lines in the continuous wall and the block search of objects such as doors and windows set in the current continuous wall are implemented.

[0112] As the search proceeds, for the wall line obtained by the search, the corresponding graphic element identifier is removed from the wall line list to be searched, that is, the wall line is removed from the wall line list to be searched, so that the wall line is no longer searched.

[0113] Similarly, after completing the search for a continuous wall, the first wall line in the next continuous wall search is determined through the list of wall lines to be searched, and then used as the current wall to search for the next continuous wall, until the list of wall lines to be searched is empty and the search for all continuous walls in the drawing is completed.

[0114] At this point, it can be clearly seen that, with the help of the list of wall lines to be searched, the comprehensiveness of the continuous wall search in the drawings is also guaranteed, avoiding the omission of wall lines and other objects.

[0115] See also Figure 6 , Figure 6 is based on Figure 1The corresponding embodiment shows a flowchart describing the steps of performing a continuous wall search in a composite spatial index structure of geometric data based on a list of wall lines to be searched formed according to the graphic element identifiers belonging to the wall wires in the drawing, and obtaining the wall lines constituting the continuous wall and the blocks of the objects set by the continuous wall.

[0116] The step S120 of performing a continuous wall search in a geometric data composite spatial index structure according to a list of wall lines to be searched formed by graphic element identifiers belonging to wall wires in a drawing to obtain wall lines constituting a continuous wall and blocks of objects set by the continuous wall, provided in an embodiment of the present application, includes:

[0117] Step S121, obtaining the first wall line in the list of wall lines to be searched as the current wall line, and listing the wall line in the list of wall lines to be searched;

[0118] Step S122, searching for a continuous wall in the geometric data composite spatial index structure, and querying the next wall line that is connected to the current wall line end to end;

[0119] Step S123, if the next wall line does not exist, query the block intersecting with the current wall line;

[0120] Step S124, if the next wall line is obtained, the search for the continuous wall is continued with the wall line as the current wall line, and the wall line is removed from the list of wall lines to be searched;

[0121] Step S125, after the search of the current continuous wall is completed, continue searching for other continuous walls until the list of continuous walls to be searched is empty.

[0122] These steps are described in detail below.

[0123] First of all, it should be pointed out that the continuous wall search can take any wall line on the drawing as the first wall line, obtain the corresponding geometric data in the geometric data composite spatial index structure, and perform a query search for the next wall line connected to itself.

[0124] In addition, the current continuous wall search can be directly initiated with the first wall line in the list of wall lines to be searched as the current wall line. Specifically, on the one hand, its geometric data is obtained, and on the other hand, a query search for the next wall line is initiated, so as to simplify the algorithm logic, reduce the complexity of the algorithm, and improve the execution efficiency.

[0125] Therefore, in the execution of step S121, the current continuous wall search is initiated with the first wall line in the list of wall lines to be searched. When the first wall line is taken as the current wall line, the wall line is removed from the list of wall lines to be searched, so that the query search for the wall line is no longer performed.

[0126] The continuous wall search is the execution process of querying the next wall line connected to the current wall line in the composite spatial index structure of geometric data. If the next wall line connected to the current wall line does not exist, the block intersecting with the current wall line is searched.

[0127] That is to say, in the search for continuous walls, the next wall line is searched for the current wall line first. If the next wall line does not exist, the blocks such as doors and windows are searched.

[0128] Exemplarily, the search for the next wall line is achieved through key point position information, that is, the key point position information of the current wall line and the key point position information of the next wall line can confirm whether the currently searched wall line is connected to the current wall line end to end.

[0129] As mentioned above, for the graphic elements belonging to the wall line, the key point position information includes the starting point coordinates and the ending point coordinates. Therefore, whether two wall lines are connected end to end can be determined based on the ending point coordinates of the current wall line and the starting point coordinates of the searched wall line.

[0130] In an exemplary embodiment, key point position information of the primitive is stored in a KD tree in the composite spatial index structure of geometric data, and therefore, the query search for the next wall line is performed in the KD tree in the composite spatial index structure of geometric data.

[0131] Specifically, it is determined whether the starting point coordinates stored in each node corresponding to the KD tree wall line in the geometric data composite spatial index structure are the same as the ending point coordinates of the current wall line and the wall line is colinear with the current wall line, and the wall line is obtained as the next wall line.

[0132] When the current wall line fails to successfully search for the next wall line in the KD tree, it jumps to the search for blocks, that is, blocks corresponding to doors or windows. If a block intersects with the current wall line, it means that it is an object set in the continuous wall where the current wall line is located.

[0133] The blocks that intersect with the current wall line need to be determined through the two-dimensional geometric range in the geometric data. This is done by judging whether the two-dimensional geometric range of the current wall line intersects with the two-dimensional geometric range of other elements. If so, it can be confirmed that the block where the element is located is an object set in the continuous wall where the current wall line is located, such as a door or window.

[0134] The two-dimensional geometric range of the primitives is stored in the R-tree in the composite spatial index structure of the geometric data. Therefore, the query of the tiles intersecting the current wall line is executed in the R-tree in the composite spatial index structure of the geometric data.

[0135] Specifically, for the tiles of other objects besides the R-tree wall line in the composite spatial index structure of geometric data, the tiles intersecting with the current wall line are queried according to the two-dimensional geometric range limited by the contained graphics elements. If the tiles intersecting with the current wall line are obtained, the R-tree wall line query is performed; depending on whether the next wall line is obtained in the R-tree wall line query, the other object tiles are iteratively queried or the next wall line is obtained.

[0136] By finding the door and window blocks in the R-tree that intersect or touch the wall line, it is possible to identify which doors and windows are part of the continuous wall.

[0137] For each continuous wall line, all the door and window blocks that intersect with the wall line are found through R-tree query. The two-dimensional geometric range of each door and window block can be tested for intersection with the two-dimensional geometric range of the wall line to determine whether it is within the two-dimensional geometric range of the current wall line. If it is within the two-dimensional geometric range of the current wall line, the intersection can be confirmed.

[0138] In addition, in other exemplary embodiments, a neighboring search may be performed to find blocks close to the current wall line, namely, door and window blocks, to adapt to more complex architectural designs where doors and windows may not be directly within the two-dimensional geometric range of the wall line.

[0139] At this point, with the cooperation of R-tree and KD-tree, the query efficiency of wall lines and doors and windows can be greatly improved through the use of R-tree and KD-tree, especially in the context of large-scale architectural drawings or complex structures, avoiding the inefficient method of checking all graphics one by one.

[0140] Through the intersection and proximity query of the R-tree, the range of the continuous wall can be automatically identified, avoiding the complexity of manual division and achieving automatic identification of the continuous wall.

[0141] Through the implementation of continuous wall search, the spatial relationship between wall lines and doors and windows can be accurately identified, thereby ensuring that the generated model accurately reflects the drawings and accurately positions the door and window blocks on the continuous wall, ensuring the consistency of door and window positions and sizes during the modeling process, and still has very good performance even in multi-story buildings and building structures with complex geometric shapes.

[0142] Aiming at the large-scale drawings existing in large-scale construction projects, the continuous wall search realized by this application can efficiently process very large drawing data, thereby improving the modeling capabilities on the basis of improving the system processing speed and responsiveness.

[0143] With the execution of step S120, the search for continuous walls on the drawing and the search for wall lines, doors and windows in the continuous walls are completed. Based on the wall lines obtained from the search and the corresponding blocks set for the continuous walls, the geometric entities and the distribution of objects set on the geometric entities are reconstructed through step S130.

[0144] That is to say, during the execution of step S130, the geometric entities corresponding to the continuous wall are reconstructed based on the wall lines obtained through the search, and the distribution of objects is set on the reconstructed continuous wall according to the blocks intersecting with the wall lines, such as setting objects such as doors and / or windows on the continuous wall, thereby truly realizing the digitization of the drawings.

[0145] In an exemplary embodiment, the execution process of step S120 includes: reconstructing the geometric entity corresponding to the continuous wall in the drawing according to the wall line, and reconstructing the door and / or window on the continuous wall according to the set object block in the geometric entity.

[0146] Exemplarily, for step S120, the corresponding geometric entities and their subsidiary objects can be constructed from the searched continuous walls and objects such as doors and windows on the walls (ie, the searched blocks), thereby completing the automatic generation of the parametric three-dimensional model.

[0147] Here, for continuous walls, the corresponding geometric data will be sorted. First, the geometric merging of wall lines is performed, that is, the wall lines (straight lines, curves, etc.) belonging to the same continuous wall are merged in sequence to form the contour polygon or path of the wall. The connection continuity and direction consistency of the wall lines are ensured by aligning the endpoints.

[0148] Then the blocks are parsed, which are used to represent doors, windows, openings or decorations on the wall. Each block has corresponding geometric data, based on which the center point, direction angle and position relationship of the block relative to the wall line are obtained, and the position relationship of the block projected onto the wall line is set on the wall.

[0149] By reconstructing the geometric entity and its attached objects, the geometric entity and the set objects are obtained in the two-dimensional space, and then the geometric entity and the objects set thereon can be identified by executing step S140 to obtain the wall, door and window data of the drawing.

[0150] In step S140, the geometric entities corresponding to the continuous walls are repeatedly obtained, the wall width is extracted, and the materials, floor heights, etc. can be obtained from the building information carried in the drawings to construct the wall door and window data of the continuous wall. The parameters provided by the wall door and window data will serve as the basis for the subsequent generation of the model.

[0151] For objects attached to the continuous wall, such as doors, windows, openings, and decorations, feature points are extracted and matched by reconstructing the objects on the geometric entities to achieve object recognition and obtain the wall door and window data of the attached objects on the continuous wall.

[0152] Therefore, in summary, please also refer to Figure 7 , Figure 7 is based on Figure 1A flow chart of a method for identifying geometric entities and objects set on the geometric entities to obtain wall, door and window data of a drawing rescued in a corresponding embodiment.

[0153] The step S140 of identifying geometric entities and objects set on the geometric entities to obtain wall, door and window data of the drawing provided by the embodiment of the present application includes:

[0154] Step S141, calculating the center line and the wall width of the geometric entity corresponding to the continuous wall to obtain the recognition result of the continuous wall;

[0155] Step S142, generating an object recognition result based on the position, width, type and direction of the objects distributed on the identified continuous wall;

[0156] Step S143, constructing the wall, door and window data of the drawing based on the recognition results of the continuous wall and the objects thereon.

[0157] Exemplarily, in order to obtain recognition results, first of all, for doors and windows, feature points on the constructed objects are extracted, such as sampling the existing straight lines, polylines, and even curves, blocks, etc., to obtain a set of feature points corresponding to each object, and then normalize them and match them with the built-in data set to confirm the corresponding door and window type, opening direction and other attributes.

[0158] The built-in data set includes the collected built-in door and window feature point data set. For example, feature points can be collected for each type of door and window block, such as a single-door block and a double-door block, as a piece of data and the door and window type and opening direction of the data are identified, and stored in the built-in data set for door and window matching.

[0159] In the feature point extraction on the object, straight line sampling is the process of obtaining the starting point and midpoint on the straight line; polyline sampling is the process of obtaining all control points of the polyline. For the sampling of secondary and multiple curves, it is the process of multi-point equal sampling. For the sampling of blocks, it is necessary to decompose them, extract the decomposed straight lines, polylines and even curves, and then perform sampling again.

[0160] After obtaining the feature points, they need to be normalized according to the built-in data set, and then the sum of square differences between each item is calculated by executing the matching process of sum of square differences. The item with the smallest sum of square differences is taken as the result with the highest matching confidence, and then the corresponding attributes are obtained to complete the recognition of the constructed geometric entity and the objects attached to it, and the recognition result is obtained. The obtained recognition structure constitutes the door, wall and window data of the drawing.

[0161] For example, to ensure the lightweight of rapid and automatic modeling, the execution process described above can be implemented through a deployed recognition server, and each rapid and automatic modeling client obtains the recognition result, i.e., the wall, door and window data, through interaction with the recognition server, and can directly create the corresponding parametric three-dimensional model.

[0162] The implementation of the method of the present application is described below with reference to a specific example. It should be explained first that when a fast automatic modeling client triggers modeling of a drawing, it first requests the primitive recognition service of the recognition server to provide a basis for the required parametric 3D model construction.

[0163] In this example, the DWG drawing is used as input, and parameters such as layer name and wall width range are set in the drawing. The recognition server responds to the modeling initiated by the automatic modeling client on the drawing, and after parsing, it identifies the wall edge line, door and window position, size and orientation, and other recognition results, that is, obtains the wall, door and window data, and then serializes the recognition results and implements AES encryption. The self-modeling client can obtain the encrypted data, and then modeling is performed based on the wall, door and window size parameters obtained by recognition.

[0164] Among them, the automatic modeling client is used to input drawings and parameters, such as setting the original DWG drawing file path, inputting DWG drawings into the automatic modeling client, and then uploading them to the recognition server to request the recognition server to parse them.

[0165] Necessary parameter input may include the layer name of the wall, door and window, the wall width recognition range, etc., which are not limited here. The input parameters will be passed to the recognition server in JSON format.

[0166] The recognition server performs drawing parsing and initialization. Specifically, the recognition server parses the DWG drawing to obtain the geometric data of the primitives in the drawing, and then constructs a composite spatial index structure of R-tree and KD-tree according to the geometric data of the primitives, that is, the composite spatial index structure of geometric data as mentioned above.

[0167] Specifically, for the extracted geometric data, on the one hand, a composite spatial index structure of the geometric data is constructed, and on the other hand, the primitives and their geometric data are initialized, that is, all the geometric data belonging to walls, doors and windows and the corresponding primitive identifiers are stored in a hash table, that is, the primitive identifier is used as the index and the corresponding geometric data is written into the hash table as the value, so that the corresponding primitive can be quickly obtained through the primitive identifier during the subsequent execution process.

[0168] As for the construction of R-tree and KD-tree, 1) the construction of R-tree is based on two-dimensional geometric scope, such as axis-aligned outer box; for each element in the wall, door, window column, its axis-aligned outer box is calculated, and then the element identifier and the axis-aligned outer box of the element are used to create a node and inserted into the R-tree.

[0169] 2) The construction of KD tree is based on key point location information, such as the starting point coordinates and the ending point coordinates. For each element in the wall, door, window column, if it is a straight line, arc, polyline, or spline, its starting point coordinates and ending point coordinates are taken as the key point location information, and the element identifier and key point location information will be inserted into the KD tree.

[0170] If it is a block, the block is decomposed, and the decomposed straight lines, arcs, polylines, splines and other primitives are obtained and inserted into the KD tree based on their primitive identifiers and key point position information.

[0171] Generate a list of wall lines to be searched for the wall lines in the drawing, so as to cooperate with the execution of continuous wall search in the R tree and KD tree.

[0172] For the continuous wall search, firstly, a list of wall lines to be searched is initialized for the continuous wall search, and the continuous wall search is performed based on the list of wall lines to be searched.

[0173] It should be understood that the search of continuous walls is the search of at least one continuous wall in the drawings. In the search of each continuous wall, the wall line is searched and the objects set on the continuous wall are searched, such as the search of door elements and window elements based on other decorative object elements.

[0174] The searched wall line will be recorded as the current continuous wall and used as the current wall for searching the next wall line. Accordingly, the wall line will be removed from the list of wall lines to be searched, as described in steps S450 to S470.

[0175] With the completion of the current continuous wall, the search for the next continuous wall will also be performed, and the search for the next continuous wall can be initiated by the first wall in the current list of wall lines to be searched, as shown in step S440.

[0176] To further explain, in the process of searching for wall lines and doors and windows, starting from any wall edge line, use the KD tree to search for the next wall line whose head and tail endpoints intersect and are parallel and collinear. If it cannot be found, use the R tree to quickly search for the end block of the wall line and perform feature matching on the searched block to determine whether it is a door or window. If not, end the search and the continuous wall search is completed. If it is a door or window, calculate and identify the position, size and orientation of the door or window, and continue to retrieve the next wall line until all wall edge lines are searched.

[0177] That is to say, when searching for wall lines and door and window blocks that constitute a continuous wall, on the one hand, the door and window blocks are identified by feature matching, such as type, position, size and other parameters, to obtain the door data and window data in the wall door and window data.

[0178] For the continuous wall obtained through the search, the centerline coordinates and the width of the wall will also be calculated through the reconstructed geometric entities.

[0179] Figure 8 is a schematic diagram of the left wall line and the right wall line that have been searched in the example. Figure 8 As shown, among the searched left wall lines 1 and 2 and the right wall line 3, the wall line 1 and the wall line 2 are colinear but are interrupted by the horizontal wall.

[0180] Fig. 9 Yes Figure 8 Specifically, the two farthest endpoints A and B on the collinear wall line 1 and the wall line 2 are calculated, and the two farthest endpoints C and D on the right wall line 3 are calculated, thereby obtaining the straight line AB and the straight line CD. The direction of a straight line parallel to and equidistant from the straight line AB and the straight line CD can be calculated, and the four endpoints A, B, C and D are projected onto the straight line. The two farthest points among the four projected points are taken as the two end points of the wall centerline, that is, Fig.10 The endpoints S and E are shown, and the distance between straight line AB and straight line CD is the wall width.

[0181] For the door and window recognition, on the one hand, the built-in data set is configured in advance, and on the other hand, the door blocks, window blocks, etc. are recognized based on the built-in data set to obtain the corresponding door data and window data.

[0182] The configuration of the built-in data set includes the collection of door and window feature point sets, that is, collecting feature points for single-door blocks, double-door blocks, etc. For example, by collecting door and window blocks in common and commonly used design drawings, the feature points of each type of door and window blocks are sampled as a piece of data, and the door and window type and opening direction corresponding to the data are identified. The feature data of all types of door and window blocks constitute the door and window feature point data set.

[0183] For the blocks obtained from the continuous wall search, feature points will be extracted for matching doors and windows with the built-in dataset.

[0184] For example, the feature points collected from the door and window graphics to be matched are normalized and matched with the built-in data set. The SSD square difference algorithm is used to calculate the sum of square differences between the feature point data to be matched and each item in the feature point data set. The item with the smallest sum of square differences is the door and window type with the highest matching similarity and the corresponding opening direction.

[0185] At this point, the recognition server completes the processing of the input DWG drawings, and returns the obtained recognition results, i.e., the wall, door and window data, to the fast automatic modeling client after serialization and encryption.

[0186] To further illustrate, the serialized wall, door and window data, whose complete description information includes the following fields: the coordinates of the two end points of the wall centerline, the wall width; the center position, door width, door type and door opening direction of each door installed on the wall; the center position, window width, window type and window opening direction of each window installed on the wall, etc., which will be represented and transmitted in Json format.

[0187] The serialized wall, door and window data will be encrypted with AES to prevent third-party developers from illegally calling the interface and using the recognition results. The encrypted content is not readable. The recognition results encrypted by AES can only be decrypted and restored with a unique key. The encrypted recognition results obtained by third-party users without the key are of no use value, effectively preventing them from abusing the recognition interface.

[0188] Correspondingly, the fast automatic modeling client will use the unique key to perform AES decryption on the return value and then restore it to plain text Json content. The Json content can be deserialized into a memory object to obtain the various properties and parameters of the walls, doors and windows.

[0189] In an exemplary embodiment, the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described above.

[0190] In an exemplary embodiment, the present application further provides a computer program product, including a computer program, wherein the computer program implements the steps of the above-mentioned method when executed by a processor.

[0191] In an exemplary embodiment, the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described above are implemented.

[0192] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0193] In an exemplary embodiment of the present application, a computer program medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is enabled to execute the method described in the above method embodiment.

[0194] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0195] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0196] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0197] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0198] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0199] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0200] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0201] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0202] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.

Claims

1. A method for identifying primitives in rapid automatic modeling, characterized in that: The method comprises: Constructing a composite spatial index structure for geometric data of primitives in a drawing, wherein the drawing is input graphic data and the primitives in the drawing are primitives to be identified in rapid automatic modeling; Perform a continuous wall search in the geometric data composite spatial index structure according to a list of wall lines to be searched formed by graphic element identifiers belonging to the wall lines in the drawing, and obtain the wall lines constituting the continuous wall and the blocks of the objects set by the continuous wall; Obtaining the geometric entity corresponding to the continuous wall on the drawing and the distribution of the objects set on the geometric entity according to the wall lines constituting the continuous wall and the blocks of the objects set on the continuous wall; The geometric entity and the objects set on the geometric entity are identified to obtain the wall, door and window data of the drawing, and the wall, door and window data are used as the identification result of the graphic elements distributed on the drawing.

2. The method according to claim 1, characterized in that The step of constructing a composite spatial index structure for geometric data of graphic elements in the drawing includes: Perform drawing analysis to obtain the geometric data of the distributed graphics elements; A spatial index is generated for the geometric data of the primitive, so that the corresponding primitive identifier and the two-dimensional geometric range and key point position information defined for the primitive in the geometric data respectively construct two spatial index structures.

3. The method according to claim 2, characterized in that The two spatial index structures include R-tree and KD-tree; The R-tree creates nodes with the primitive identifier and the corresponding two-dimensional geometric range, and the KD-tree creates nodes with the primitive identifier and the corresponding key point position information.

4. The method according to claim 2, characterized in that: The key point positions are the starting point coordinates and the ending point coordinates of the corresponding primitives.

5. The method according to claim 2, characterized in that: The spatial index structure is an R-tree, and the spatial index is generated for the geometric data of the primitive, so that the corresponding primitive identifier and the two-dimensional geometric range and key point position information defined for the primitive in the geometric data respectively construct two spatial index structures, including: Calculate the two-dimensional geometric range defined by each primitive; An R-tree is created, and the graphic element identifier and the two-dimensional geometric range corresponding to each graphic element are inserted into the nodes of the R-tree one by one, so as to construct an R-tree that maps the two-dimensional geometric range defined by the graphic element in the drawing.

6. The method according to claim 2, characterized in that The spatial index structure is a KD tree, and the spatial index is generated for the geometric data of the primitive, so that the corresponding primitive identifier and the two-dimensional geometric range and key point position information defined for the primitive in the geometric data respectively construct two spatial index structures, including: For each graphic element, the coordinates of the starting point and the ending point are taken as the key point position information of the graphic element; A KD tree is created, and the graphic element identifier and key point position information corresponding to each graphic element are inserted into the nodes of the KD tree one by one, so as to construct a KD tree that maps the key point position information corresponding to the graphic elements in the drawing.

7. The method according to claim 3, characterized in that The R-tree is used to perform a query on the objects set by the continuous wall; The KD tree is used to perform the search for the next wall line in the continuous wall search.

8. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.