Method for automatically generating structural BIM model through CAD drawing based on graph neural network
By analyzing CAD drawings based on graph neural network, building a graph neural network model, and automatically generating a BIM model of the building structure, solving the problem of insufficient modeling efficiency and accuracy in the existing technology, and achieving efficient and intelligent BIM model generation.
Patent Information
- Application Number
- CN202510544473.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-08
AI Technical Summary
The existing three-dimensional modeling technology of building structures has shortcomings in information extraction, modeling efficiency and accuracy. Especially in the automated modeling process based on traditional CAD drawings, it is difficult to efficiently and accurately convert the information in the structural drawings into three-dimensional models, and it lacks intelligent analysis and processing capabilities.
The graph neural network-based method is used to construct a graph neural network model, analyze CAD drawings through the graph neural network model, identify structural component symbols, extract their position, geometry and attribute information, and realize automated BIM model generation through multi-graph information aggregation.
It realizes automatic recognition of symbols and layers with high accuracy, and automatically converts multiple CAD drawings into drawing structures, which improves the efficiency and stability of the reconstruction of information model of the building pipeline system, reduces manual intervention, and significantly improves the intelligence level of BIM model generation.
Smart Images

Figure BDA0005380322150000081 
Figure BDA0005380322150000082 
Figure HDA0005380322160000011
Abstract
Description
Technical Field
[0001] The present invention relates to a method for automatically generating a structural BIM model, and in particular to a method for automatically generating a structural BIM model from a CAD drawing based on a graph neural network. Background Art
[0002] Building structure is one of the core contents in modern building design and construction, which directly affects the safety, functionality and sustainability of buildings. With the rapid development of information technology, Building Information Modeling (BIM) technology has become a widely used method for building design and management, and has gradually become a standard tool in the construction industry. BIM technology integrates various types of information of construction projects in a digital way, improving the design, construction and operation efficiency of buildings. However, the existing three-dimensional modeling technology of building structures still has some shortcomings in terms of information extraction, modeling efficiency and accuracy. Especially in the automated modeling process based on traditional design drawings (such as CAD drawings), how to efficiently and accurately convert the information in the structural drawings into three-dimensional models is still a key issue.
[0003] Currently, most architectural structure modeling methods still rely on manual operations and semi-automated processes. This is especially true for traditional CAD drawings, where complex element features and annotation symbols make information extraction and modeling cumbersome and error-prone. Existing modeling software systems are mostly based on manual selection and construction, making it difficult to fully extract implicit information from drawings. Furthermore, existing research often fails to effectively integrate multi-dimensional information from different drawings and lacks the ability to intelligently analyze and process drawing-based information. These issues not only hinder modeling efficiency but also significantly reduce the accuracy and usability of the models.
[0004] In recent years, with the development of artificial intelligence technology, intelligent modeling methods based on deep learning have received widespread attention. Graph Neural Networks (GNNs) have advantages in processing graph-structured data and can be used to analyze the topological relationships and semantic information of building components in CAD drawings, providing a new solution for automated BIM modeling. In the field of BIM analysis applications for building pipe networks, some scholars have structured the BIM model graphs of building pipe networks and used subgraph matching technology to conduct regulatory checks on the pipe network system. Therefore, for the BIM conversion and modeling of CAD drawings for multi-disciplinary building pipe networks, research based on a deep learning-driven technology based on graph methods to reduce the need for manual intervention and improve modeling efficiency has important engineering application value. Summary of the Invention
[0005] Purpose of the invention: The purpose of the present invention is to propose a method for automatically generating structural BIM models from CAD drawings based on graph neural networks, which can efficiently and automatically generate building structure BIM models from CAD drawings.
[0006] Technical solution: The present invention includes: structural CAD drawing information analysis and structural BIM model generation. The structural CAD drawing information analysis includes graph neural network model construction, CAD drawing analysis based on the graph neural network model, and multi-graph information aggregation; the structural BIM model generation adopts different reconstruction strategies for different types of structural components based on the obtained structural system information aggregation diagram.
[0007] The graph neural network model construction specifically includes:
[0008] Step 1: Specify sample labels;
[0009] Step 2: Construct the model input layer, use two separate multi-layer perceptrons to receive the initial node features V and edge features E respectively, and stack them separately into and
[0010] Step 3: Construct the GATv2 stacking layer of the model. The initial GATv2 layer receives the stacked node features V′ and edge features E′. Each subsequent GATv2 layer receives the node features and edge features output by the previous GATv2 layer.
[0011] Step 4: Construct the output layer of the model, an MLP receives the node features V output from the GATv2 stacked layer ″ , and maps it to the probability distribution vector p of the classification prediction result; the output layer MLP consists of two fully connected layers, which are connected by the ReLU activation function in the middle, and finally mapped to the probability vector p of the category through the activation function.
[0012] The CAD drawing parsing based on the graph neural network model specifically includes:
[0013] Step 1: Split a single drawing file containing multiple drawing sheets into individual drawing sheets;
[0014] Step 2: For all the plan view sheets obtained by dividing the drawing, select points with the same vertical position as the registration points, and adjust the position of each plan view sheet by horizontal translation;
[0015] Step 3: Explode all drawing entities contained in each drawing sheet multiple times until only basic entities remain.
[0016] Step 4: For each exploded plan view, extract the geometric properties of all basic primitives and calculate the topological connection relationship between each primitive.
[0017] Step 5: For each exploded planar image sheet, an undirected graph is generated with each basic primitive as a node and the topological connections between primitives as edges. The characteristics of each graph node include the type and geometric attributes of the primitive corresponding to the node.
[0018] Step 6: For each undirected graph corresponding to a floor plan, input it into the constructed graph neural network model and output the building component type classification results of all nodes;
[0019] Step 7: Map the node classification results of the undirected graph back to the plane graph corresponding to the undirected graph to obtain the semantic type classification results of all graph elements;
[0020] Step 8: For the elements with semantic type of wall, column or beam, align them respectively using the left-turn closed topological faceting algorithm to obtain a set of closed polygons, which is the complete symbol of the corresponding structural component;
[0021] Step 9: For primitives based on semantic types, extract all closed polylines that are not surrounded by other closed polylines, use these closed polylines as segmentation boundaries, and obtain the complete symbol of the corresponding basic component;
[0022] Step 10: For text-type primitives whose semantic type is text annotation, establish structured parsing rules, extract their key parameters using regular expressions, and determine their annotation type based on their text content and expression pattern;
[0023] Step 11: Based on whether the text element intersects with the structural component symbol, associate the text annotation with the component entity and assign the attribute information represented by the text annotation to the structural component;
[0024] Step 12: For text elements with the semantic type of height annotation, if its content contains ▽, it is a top surface height annotation, and it is associated with the section / cut surface detail drawing where it is located;
[0025] Step 13: For dimension annotation elements with the semantic type of height annotation, associate the dimension value contained in it as height information to the section / cut surface detail drawing.
[0026] The graphic elements based on the semantic type include pile foundation, independent foundation and raft foundation.
[0027] The basic graphic elements include line segments, circles, arcs, ellipses and text.
[0028] The multi-graph information aggregation specifically includes:
[0029] Step 1: Loop through each planar graph to obtain the symbol objects of all structural components. Take each component symbol as a node and calculate whether there is topological adjacency between each component symbol. If so, establish an edge of type connection between the two nodes to construct the structural graph.
[0030] Step 2: Traverse each plan view in pairs, obtain their respective structural diagrams generated in step 1, and check whether the component symbols corresponding to each node overlap. If so, and the overlapping part occupies more than 99% of the area of both component symbols, it is determined that there is a support relationship between the corresponding two component entities, and an edge of type support is established between the corresponding two nodes;
[0031] Step 3: Traverse all column-type nodes in the structure diagram, search for all directly connected beam-type nodes, and add a subdivision type of main beam to the beam nodes;
[0032] Step 4: Get all main beam nodes obtained in step 3, search for all directly connected nodes that are beams and have no subdivision type, and add the subdivision type of secondary beam to these beam nodes;
[0033] Step 5: Traverse all nodes of type wall in the structure diagram, search for all nodes of type beam directly connected to them, and add a subdivision type of coupling beam to these beam nodes;
[0034] Step 6: Traverse all nodes of type Basic in the structural diagram, search for all directly connected nodes of type Column, and add subdivision type Basic Column to these beam nodes;
[0035] Step 7: Traverse all text annotation elements, use regular expressions to retrieve annotation text that matches the beam annotation, and parse out the span number n, number, and other related attributes of the beam;
[0036] Step 8: Traverse all beam annotation text entities retrieved in step 7, obtain the other endpoint of its annotation leader that is not connected to the annotation text and the beam where the endpoint is located, and draw a straight line through the endpoint in the direction of the straight line where the annotation leader intersects the beam component symbol;
[0037] Step 9: Find all unmarked beams that intersect the line drawn in step 8, and calculate the number of non-beam nodes on the shortest path from the nodes of the unmarked beams to the nodes of the beam selected in step 8 in the structural diagram. Sort the unmarked beams in ascending order based on this number, select the first n-1 unmarked beams, and associate the current beam annotation to the unmarked beam component entity;
[0038] Step 10: Traverse each plan detail drawing and section / cut detail drawing to obtain its drawing number;
[0039] Step 11: Traverse each plan drawing, obtain all the text annotations it contains, and search for text annotations with the same color line element directly below it;
[0040] Step 12: Traverse each floor plan drawing and search for the text content of the floor plan drawing number in the text annotations in all floor plans.
[0041] The structural BIM model generation includes modeling for walls, columns and beams; modeling for plate components; and modeling for foundation components.
[0042] The modeling of walls, columns, and beams specifically includes:
[0043] Step 1: Traverse all plan drawings and obtain all building component symbols of the wall or column type;
[0044] Step 2: For each complete component symbol of a wall or column, use its plane shape as the stretching object, the elevation of the floor where it is located as the stretching starting point, and the floor height as the stretching amount. Stretch it vertically to obtain the corresponding wall or column model.
[0045] Step 3: For the complete component symbol of each beam, use its plane shape as the stretching object, its own elevation minus its own height as the stretching starting point, its own height as the stretching amount, and stretch it in the vertical direction to obtain the corresponding beam model.
[0046] The modeling of the plate component specifically includes:
[0047] Step 1: Traverse all plan drawings, obtain the symbols of all walls, columns and beam components, and take the union of the symbol shapes;
[0048] Step 2: Take the union of the symbols obtained in step 1 and take the overall outer contour that can contain these shapes to form a closed polygon;
[0049] Step 3: Take the union of the symbols obtained in step 1 and the closed polygons obtained in step 2, and take the difference between the two. The resulting shape set is the area that needs to be filled with the floor slab, which is the plane symbol representation of all the floor slabs;
[0050] Step 4: Take the symbols of all floor slabs obtained in step 3, use the floor elevation as the stretching starting point, the floor slab thickness as the absolute value of the stretching amount, and stretch vertically downward to obtain the model of the plate component.
[0051] The modeling of basic components specifically includes:
[0052] Step 1: Traverse all plan drawings, obtain the symbols of all foundation components and process them cyclically. If it is a pile cap foundation, execute step 2; if it is a raft foundation, execute step 3; if it is an independent foundation, execute step 4;
[0053] Step 2: Take the outer closed polygon representing the upper cap in the pile cap foundation symbol and the multiple circles inside it representing the piles. Perform segmented stretching on these two parts according to their elevation and height. Then combine the two models to obtain the pile cap foundation component model.
[0054] Step 3: Take the outer closed polygon representing the overall outline of the raft foundation symbol and the multiple polygons representing the holes inside it, perform segmented stretching on these two parts according to their elevation and height, and then perform a difference operation on the two parts to obtain the raft foundation component model;
[0055] Step 4: Take the outer closed polygon representing the lower half of the outline of the independent base symbol, and search inside the symbol for an inner polygon that does not intersect with the lower half of the outline polygon, representing the top surface of the independent base;
[0056] Step 5: Take the lower half outline obtained in step 4, use it as the stretching object, use the bottom elevation of the independent foundation as the stretching starting point, use the height of the lower half of the independent foundation as the stretching value, and stretch upward in the vertical direction to obtain the model of the lower half of the independent foundation;
[0057] Step 6: Take all the points in the initial independent basic symbol corresponding to all the vertices of the top polygon obtained in step 4, and assign the independent basic top surface height value as the vertical coordinate to these points;
[0058] Step 7: Take all the points in the initial independent basic symbol corresponding to all the vertices of the lower half contour obtained in step 4, and assign the height value of the lower half as the vertical coordinate to these points;
[0059] Step 8: Based on the independent foundation symbol with the completed height coordinates, create a model of the upper part of the independent foundation;
[0060] Step 9: Perform a union operation on the models obtained in step 5 and step 8 to obtain a complete model with independent basis.
[0061] Beneficial effects: The present invention has the following advantages:
[0062] 1) We developed a technology approach for automated building pipe network CAD drawing parsing that combines deep learning with knowledge-based rule constraints. We extracted semantic meanings of symbols and primitives based on graph neural networks, achieving highly accurate automatic recognition of symbols and layers. We converted pipe network systems represented by multiple CAD drawings into graph structures, and performed entity matching and information aggregation across multiple drawings and graph structures, enabling automatic, efficient, and stable reconstruction of building pipe network system information models.
[0063] 2) The automated BIM modeling technology for multi-disciplinary pipe network systems is based on and extends the IFC (Industry Foundation Classes) standard. It adopts different modeling strategies, including parametric modeling and model replacement, for different disciplines and types of pipe network component entities. This outputs complete BIM data for multi-disciplinary building pipe networks. The modeling results strongly support the management and maintenance of urban building facilities.
[0064] 3) It significantly improves the intelligence level of BIM model generation of building structure, reduces dependence on complex knowledge rule bases and manual intervention, reduces system maintenance and labor costs, and improves modeling efficiency. Compared with traditional human-computer interaction modeling, the present invention can efficiently and accurately complete the automatic construction of BIM model of building structure, and has wide application value in the fields of construction engineering informatization, digital twins and city information model (CIM). BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 is a flow chart of the present invention;
[0066] Figure 2 Network architecture for graph node classification and recognition tasks;
[0067] Figure 3 Diagram of azimuth definition;
[0068] Figure 4 Illustration of steps 15-16;
[0069] Figure 5 Illustration of step 21;
[0070] Figure 6 Illustration of steps 21-24;
[0071] Figure 7 Left-turn algorithm topology generation flow chart;
[0072] Figure 8 Pile cap foundation element;
[0073] Figure 9 Independent basic graphics elements;
[0074] Figure 10Raft foundation element;
[0075] Figure 11 Structural diagram construction;
[0076] Figure 12 The support relationship edge of the structure diagram is established;
[0077] Figure 13 Beam annotation text parsing example;
[0078] Figure 14 Schematic diagram of wall / column / beam component modeling;
[0079] Figure 15 Schematic diagram of plate construction modeling;
[0080] Figure 16 Schematic diagram of pile cap foundation component modeling;
[0081] Figure 17 Schematic diagram of raft foundation component modeling;
[0082] Figure 18 Schematic diagram of independent basic component modeling;
[0083] Figure 19 Structural BIM model generation results. DETAILED DESCRIPTION
[0084] The present invention will be further described below with reference to the accompanying drawings.
[0085] like Figure 1 As shown in the figure, this embodiment of the method for automatically generating structural BIM models from CAD drawings based on graph neural networks combines deep learning-driven and knowledge-based rule constraints to build a graph neural network model to parse and identify the drawing elements and layer organization of structural CAD drawings. By building a graph structure, the entities in the drawings are integrated, and the relationship information in the drawings is supplemented by geometric and spatial position judgment, thereby achieving the aggregation of multi-graph information and automatically generating a complete and realistic building structure BIM model. Specifically, it includes: structural CAD drawing information parsing and structural BIM model generation.
[0086] During the structural CAD drawing information parsing phase, a graph neural network-based approach parses building structure CAD drawings, identifies structural component symbols, and extracts information such as their location, geometry, and attributes. This phase is divided into three sub-phases: graph neural network model construction, CAD drawing parsing based on the graph neural network model, and multi-graph information aggregation.
[0087] The specific process of building a graph neural network model is as follows:
[0088] Step 1: Specify sample labels, i.e., semantic types of CAD drawing elements, including walls, columns, beams, foundations, annotations, and others;
[0089] Step 2: Based on Python language and PyTorch library, use the GATv2 version of the Graph Attention Network (GAT) as the backbone of the graph neural network model to build a graph neural network model. Its architecture is as follows: Figure 2 As shown, it includes three modules: model input layer, GATv2 stacking layer and output layer. The specific construction method of each module is described in steps 3 to 5.
[0090] Step 3: Construct the model input layer, use two separate multilayer perceptrons (MLP) to receive the initial node features V and edge features E respectively, and stack them into and The two MLPs in the input layer have the same structure, each consisting of two fully connected layers connected by a ReLU activation function. For the input value x, the ReLU function is calculated as follows:
[0091] ReLU(x)=max(0,x)
[0092] Step 4: Construct the GATv2 stacking layer of the model. The initial GATv2 layer receives the stacked node features V′ and edge features E′. Each subsequent GATv2 layer receives the node features and edge features output by the previous GATv2 layer.
[0093] Step 5: Construct the output layer of the model, an MLP receives the node features V output from the GATv2 stacked layer ″ , and maps it to the probability distribution vector p of the classification prediction result. The output layer MLP consists of two fully connected layers, connected by the ReLU activation function in the middle, and finally mapped to the probability vector p of the category through the Softmax activation function. The Softmax function is often used in the output layer of multi-class classification tasks. It can convert a real number vector into a probability distribution. For any real number vector z=[z1,z2,…,z C ], where C is the total number of categories and the Softmax function is defined as:
[0094]
[0095] Step 6: Construct the output layer of the model, an MLP receives the node features V output from the GATv2 stacked layer ″, and maps it to the probability distribution vector p of the classification prediction result. The output MLP layer consists of two fully connected layers, connected by a ReLU activation function, and finally mapped to the category probability vector p through the Softmax activation function. The Softmax function is often used in the output layer of multi-class classification tasks. It can convert a real number vector into a probability distribution.
[0096] The specific process of CAD drawing parsing based on the graph neural network model is as follows:
[0097] Step 1: Open the engineering drawing file (.dwg format) in AutoCAD, and split the single architectural drawing file containing multiple drawing sheets into drawing files (.dwg format) for each drawing sheet.
[0098] Step 2: For all the plan view sheets and plan detail sheets obtained by segmenting the drawing, select points with the same vertical position as the registration points, and adjust the position of each sheet by horizontal translation;
[0099] Step 3: Based on the elevation drawing or section drawing, confirm the height information of each floor of the building;
[0100] Step 4: Explode all drawing entities contained in each plan view or plan detail view multiple times until only line segments, circles, arcs, ellipses, and text remain.
[0101] Step 5: For each exploded plan view or plan detail view, extract the geometric attributes of all its primitives and calculate the topological connection relationship between each primitive;
[0102] Step 6: For each plan view sheet or plan detail view sheet after explosion processing, an undirected graph is generated with each graphic element as a node and the topological connection relationship between the graphic elements as an edge. The characteristics of each graph node include the type and geometric properties of the graphic element corresponding to the node, and the characteristics of each graph edge include the type and properties of the topological connection relationship corresponding to the edge.
[0103] Step 7: For each undirected graph corresponding to a plan view or a plan detail view, input it into the constructed graph neural network model and output the building component type classification results of all nodes;
[0104] Step 8: Map the node classification results of the undirected graph back to the corresponding plan view or plan detail view of the undirected graph to obtain the semantic classification results of all graph elements;
[0105] Step 9: Define the line segment ls with endpoints p0 and p1, construct the vector v = p1-p0, and v = (x, y). Then the azimuth angle α of ls starting from p0 is Figure 3 , calculated as follows:
[0106]
[0107] Step 10: For the element whose semantic type is wall, column or beam, repeat steps 12-26 until all line segment sets have been processed;
[0108] Step 11: Let the input line segment set be lss, which contains the line segment elements of all wall / column components in the current group, and the neighbor spacing tolerance nbr (Take 10mm);
[0109] Step 12: Loop to calculate the midpoint distance d between each pair of line segments in LSS mid and the sum of their lengths, len sum , if d mid Less than len sum Half and tolerance nbr The sum of , then mark the two line segments as neighbors;
[0110] Step 13: Let the line segment set lss used1 ,lss used2 Is an empty set, lss re Equal to lss;
[0111] Step 14: Set the polygon vertex set vertices and edge set edges to empty sets;
[0112] Step 15: Loop LSS re For all the line segments in the equation, find the point p0 whose sum of horizontal and vertical coordinates is the smallest among the endpoints of all the line segments;
[0113] Step 16: Find all line segments ls with p0 as one of their endpoints in lss st0 and its other endpoint p other , calculate ls st0 The azimuth angle α starting from p0 is taken as ls which makes α have the minimum value. st0 for ls st ,like Figure 4 ;
[0114] Step 17: Check ls st Is it in lss used0 If so, then ls st Join LSS used2 and from lss used1 Remove lsst Otherwise, ls st Join LSS used1 ;
[0115] Step 18: ls st The two endpoints p0 and p1 are added to vertices in turn, and ls st Add edges;
[0116] Step 19: Let point p cur Equal to p1, line segment ls next Equal to ls st ;
[0117] Step 20: Let the line segment set lss next Is an empty set, loop ls next All neighboring line segments ls j , find all the cur Is one of the endpoints and is not in lss used2 ls in j Join LSS next ;
[0118] Step 21: lss next If it contains only one element ls j , then let ls next Equal to ls j Otherwise, if Figure 5 , calculate ls next With p cur is the azimuth angle of the starting point α i , loop lss next All line segments in ls j , calculate ls j With p cur is the azimuth angle of the starting point α j , and for all α j Sort in ascending order, in all i Take the maximum value α from the azimuth radian value maxj , take the corresponding ls j , let ls next Equal to ls j ;
[0119] Step 22: Check ls next Is it in lss used0 If so, then ls next Join LSS used2 and from lss used1 Remove ls st Otherwise, ls next Join LSS used1 ;
[0120] Step 23: Get ls next The difference between cur The other endpoint p of the overlap next , p next Add vertices and change ls next Add edges and let p cur Equal to p next ;
[0121] Step 24: Repeat steps 35 to 38 until p cur is equal to p0, such as Figure 6 As shown, output vertices and edges;
[0122] Step 25: Check whether the first and last elements in vertices are the same. If so, connect all vertices in the order recorded in vertices to generate a polygon. i and from lss re Delete all elements located in edges;
[0123] Step 26: Repeat steps 29-40. Figure 7 As shown, until lss re Empty to output all polygons, that is, complete component symbols for all walls and columns.
[0124] Step 27: For semantic type based, including Figure 8 Pile foundation, such as Figure 9 The independent basis and Figure 10 The raft foundation element is extracted, and all closed polylines that are not surrounded by other closed polylines are extracted. These closed polylines are used as segmentation boundaries to obtain the complete symbols of the corresponding foundation components.
[0125] Step 28: For text-type primitives whose semantic type is text annotation, a structured parsing rule is established based on the standardized annotation grammar, and its key parameters are extracted by combining regular expressions. The annotation type is determined based on its text content and expression pattern.
[0126] Step 29: Based on whether the text element intersects with the structural component symbol, the text annotation is associated with the component entity, and the attribute information represented by the text annotation is assigned to the structural component;
[0127] Step 30: For a text element with a semantic type of height annotation, if its content contains “▽”, it is a top surface height annotation and is associated with the section / cut surface detail drawing where it is located;
[0128] Step 31: For dimension annotation elements with the semantic type of height annotation, associate the dimension value contained in it as height information to the section / cut surface detail drawing.
[0129] Multi-graph information aggregation specifically includes:
[0130] Step 1: Loop through each plan or detail drawing to obtain the symbol objects of all structural components. Take each component symbol as a node and calculate whether there is topological adjacency between component symbols. If so, establish an edge of type "connection" between the two nodes to construct an undirected graph structure, called a structural graph, such as Figure 11 As shown;
[0131] Step 2: Traverse each plane diagram in pairs, obtain their respective structural diagrams generated in step 1, and check whether the component symbols corresponding to each node overlap. If so, and the overlapping part occupies more than 99% of the area of both component symbols, it is determined that there is a support relationship between the corresponding two component entities, and an edge of type "support" is established between their corresponding two nodes, such as Figure 12 shown.
[0132] Step 3: Traverse all column-type nodes in the structural diagram, search for all directly connected beam-type nodes, and add a subdivision type of "main beam" to these beam nodes;
[0133] Step 4: Get all the main beam nodes obtained in step 3, search for all directly connected nodes that are of beam type and have no subdivision type, and add the subdivision type of "secondary beam" to these beam nodes;
[0134] Step 5: Traverse all nodes of type wall in the structure diagram, search for all nodes of type beam directly connected to them, and add the subdivision type of "connecting beam" to these beam nodes;
[0135] Step 6: Traverse all nodes of type foundation in the structural diagram, search for all nodes of type column directly connected to them, and add a subdivision type of "foundation column" to these beam nodes;
[0136] Step 7: Traverse all text annotation elements and search for annotation text that matches the beam annotation using regular expressions, such as Figure 13 As shown, the span number n, number and other related properties of the beam are analyzed;
[0137] Step 8: Traverse all beam annotation text entities retrieved in step 7, obtain the other endpoint of its annotation leader that is not connected to the annotation text and the beam where the endpoint is located, and draw a straight line through the endpoint in the direction of the straight line where the annotation leader intersects the beam component symbol;
[0138] Step 9: Find all unlabeled beams that intersect the straight line drawn in step 8, and calculate the number of non-beam nodes on the shortest path from the nodes of these unlabeled beams to the nodes of the beam selected in step 8 in the structural diagram. Sort these unlabeled beams in ascending order based on this number, select the first n-1 unlabeled beams, and associate the currently processed beam annotations with these unlabeled beam component entities;
[0139] Step 10: Traverse each plan detail drawing and section / cut detail drawing and obtain the drawing number;
[0140] Step 11: Traverse each plan detail drawing, obtain all the text annotations it contains, and search for text annotations with the same color line element directly below it. If the plan detail drawing contains two text annotations that meet the above conditions and their text content is the same, search to see if there is any section / cut detail drawing with the drawing number "ss". If so, associate the current plan detail drawing with the section / cut detail drawing;
[0141] Step 12: Traverse each plan drawing and search for the text content of the plan drawing number in the text annotations in all plan drawings. If there is any text content, assign the attribute information contained in the plan drawing and the attribute information contained in the section / cut-plane drawing associated with the plan drawing to all structural component entities associated with the text annotation.
[0142] In the processing stage of the structural BIM model generation device, different reconstruction strategies are adopted for different types of structural components based on the obtained structural system information aggregation diagram.
[0143] like Figure 14 As shown in the figure, the modeling process for walls, columns and beams is as follows:
[0144] Step 1: Traverse all plan drawings and obtain all building component symbols of the wall or column type;
[0145] Step 2: For each complete component symbol of a wall or column, use its plane shape as the stretching object, the elevation of the floor where it is located as the stretching starting point, and the floor height as the stretching amount. Stretch it vertically to obtain the corresponding wall or column model.
[0146] Step 3: For the complete component symbol of each beam, use its plane shape as the stretching object, its own elevation minus its own height as the stretching starting point, its own height as the stretching amount, and stretch it in the vertical direction to obtain the corresponding beam model.
[0147] like Figure 15 As shown in the figure, the modeling process for plate components is as follows:
[0148] Step 1: Traverse all plan drawings, obtain the symbols of all walls, columns and beam components, and take the union of these symbol shapes;
[0149] Step 2: Take the symbol union obtained in step 1 and take the overall outer contour that can contain these shapes to form a closed polygon.
[0150] Step 3: Take the symbolic union obtained in step 1 and the closed polygon obtained in step 2, and take the difference between the two. The resulting shape set is the area that needs to be filled with the floor slab, which is the plane symbolic representation of all the floor slabs;
[0151] Step 4: Take the symbols of all floor slabs obtained in step 3, use the floor elevation as the stretching starting point, the floor slab thickness as the absolute value of the stretching amount, and stretch vertically downward to obtain the model of the plate component.
[0152] like Figures 16 to 18 As shown in the figure, the modeling process for basic components is as follows:
[0153] Step 1: Traverse all plan drawings, obtain the symbols of all foundation components and process them in a loop. If it is a pile cap foundation, execute step 2; if it is a raft foundation, execute step 3; if it is an independent foundation, execute steps 4 to 9;
[0154] Step 2: Take the outer closed polygon representing the upper cap in the pile cap foundation symbol and the multiple circles inside it representing the piles. Perform segmented stretching on these two parts according to their elevation and height. Then combine the two models to obtain the pile cap foundation component model.
[0155] Step 3: Take the outer closed polygon representing the overall outline of the raft foundation symbol and the multiple polygons representing the holes inside it, perform segmented stretching on these two parts according to their elevation and height, and then perform a difference operation on the two parts to obtain the raft foundation component model;
[0156] Step 4: Take the outer closed polygon representing the lower half of the outline of the independent base symbol, and search inside the symbol for an inner polygon that does not intersect with the lower half of the outline polygon, representing the top surface of the independent base;
[0157] Step 5: Take the lower half outline obtained in step 4, use it as the stretching object, use the bottom elevation of the independent foundation as the stretching starting point, use the height of the lower half of the independent foundation as the stretching value, and stretch upward in the vertical direction to obtain the model of the lower half of the independent foundation;
[0158] Step 6: Take all the points in the initial independent basic symbol corresponding to all the vertices of the top polygon obtained in step 4, and assign the independent basic top surface height value as the vertical coordinate to these points;
[0159] Step 7: Take all the points in the initial independent basic symbol corresponding to all the vertices of the lower half contour obtained in step 4, and assign the height value of the lower half as the vertical coordinate to these points;
[0160] Step 8: Based on the independent foundation symbol with the completed height coordinates, use the B-rep representation method to create a model of the upper part of the independent foundation;
[0161] Step 9: Perform a union operation on the models obtained in step 5 and step 8 to obtain a complete model with independent basis, such as Figure 19 shown.
Claims
1. A method for automatically generating structural BIM models from CAD drawings based on graph neural networks, characterized in that: include: Structural CAD drawing information analysis and structural BIM model generation. The structural CAD drawing information analysis includes graph neural network model construction, CAD drawing analysis based on the graph neural network model, and multi-graph information aggregation. The structural BIM model generation adopts different reconstruction strategies for different types of structural components based on the obtained structural system information aggregation diagram.
2. The method for automatically generating a structural BIM model from a CAD drawing based on a graph neural network according to claim 1, characterized in that: The graph neural network model construction specifically includes: Step 1: Specify sample labels; Step 2: Construct the model input layer, use two separate multi-layer perceptrons to receive the initial node features V and edge features E respectively, and stack them separately into and Step 3: Construct the GATv2 stacking layer of the model. The initial GATv2 layer receives the stacked node features V ′ and edge feature E ′ , each subsequent GATv2 layer receives the node features and edge features output by the previous GATv2 layer; Step 4: Construct the output layer of the model, an MLP receives the node features V output from the GATv2 stacked layer ″ , and maps it to the probability distribution vector p of the classification prediction result; the output layer MLP consists of two fully connected layers, which are connected by the ReLU activation function in the middle, and finally mapped to the probability vector p of the category through the activation function.
3. The method for automatically generating a structural BIM model from a CAD drawing based on a graph neural network according to claim 2, characterized in that: The CAD drawing parsing based on the graph neural network model specifically includes: Step 1: Split a single drawing file containing multiple drawing sheets into individual drawing sheets; Step 2: For all the plan view sheets obtained by dividing the drawing, select points with the same vertical position as the registration points, and adjust the position of each plan view sheet by horizontal translation; Step 3: Explode all drawing entities contained in each drawing sheet multiple times until only basic entities remain. Step 4: For each exploded plan view, extract the geometric properties of all basic primitives and calculate the topological connection relationship between each primitive. Step 5: For each exploded planar image sheet, an undirected graph is generated with each basic primitive as a node and the topological connections between primitives as edges. The characteristics of each graph node include the type and geometric attributes of the primitive corresponding to the node. Step 6: For each undirected graph corresponding to a floor plan, input it into the constructed graph neural network model and output the building component type classification results of all nodes; Step 7: Map the node classification results of the undirected graph back to the plane graph corresponding to the undirected graph to obtain the semantic type classification results of all graph elements; Step 8: For the elements with semantic type of wall, column or beam, align them respectively using the left-turn closed topological faceting algorithm to obtain a set of closed polygons, which is the complete symbol of the corresponding structural component; Step 9: For primitives based on semantic types, extract all closed polylines that are not surrounded by other closed polylines, use these closed polylines as segmentation boundaries, and obtain the complete symbols of the corresponding basic components; Step 10: For text-type primitives whose semantic type is text annotation, establish structured parsing rules, extract their key parameters using regular expressions, and determine their annotation type based on their text content and expression pattern; Step 11: Based on whether the text element intersects with the structural component symbol, associate the text annotation with the component entity and assign the attribute information represented by the text annotation to the structural component; Step 12: For text elements with the semantic type of height annotation, if its content contains ▽, it is a top surface height annotation, and it is associated with the section / cut surface detail drawing where it is located; Step 13: For dimension annotation elements with the semantic type of height annotation, associate the dimension value contained in it as height information to the section / cut surface detail drawing.
4. The method for automatically generating a structural BIM model from a CAD drawing based on a graph neural network according to claim 3, characterized in that: The graphic elements based on the semantic type include pile foundation, independent foundation and raft foundation.
5. The method for automatically generating a structural BIM model from a CAD drawing based on a graph neural network according to claim 3, characterized in that: The basic graphic elements include line segments, circles, arcs, ellipses and text.
6. The method for automatically generating a structural BIM model from a CAD drawing based on a graph neural network according to claim 3, characterized in that: The multi-graph information aggregation specifically includes: Step 1: Loop through each planar graph to obtain the symbol objects of all structural components. Take each component symbol as a node and calculate whether there is topological adjacency between each component symbol. If so, establish an edge of type connection between the two nodes to construct the structural graph. Step 2: Traverse each plan view in pairs, obtain their respective structural diagrams generated in step 1, and check whether the component symbols corresponding to each node overlap. If so, and the overlapping part occupies more than 99% of the area of both component symbols, it is determined that there is a support relationship between the corresponding two component entities, and an edge of type support is established between the corresponding two nodes; Step 3: Traverse all column-type nodes in the structure diagram, search for all directly connected beam-type nodes, and add a subdivision type of main beam to the beam nodes; Step 4: Get all main beam nodes obtained in step 3, search for all directly connected nodes that are beams and have no subdivision type, and add the subdivision type of secondary beam to these beam nodes; Step 5: Traverse all nodes of type wall in the structure diagram, search for all nodes of type beam directly connected to them, and add a subdivision type of coupling beam to these beam nodes; Step 6: Traverse all nodes of type Basic in the structural diagram, search for all directly connected nodes of type Column, and add subdivision type Basic Column to these beam nodes; Step 7: Traverse all text annotation elements, use regular expressions to retrieve annotation text that matches the beam annotation, and parse out the span number n, number, and other related attributes of the beam; Step 8: Traverse all beam annotation text entities retrieved in step 7, obtain the other endpoint of its annotation leader that is not connected to the annotation text and the beam where the endpoint is located, and draw a straight line through the endpoint in the direction of the straight line where the annotation leader intersects the beam component symbol; Step 9: Find all unmarked beams that intersect the line drawn in step 8, and calculate the number of non-beam nodes on the shortest path from the nodes of the unmarked beams to the nodes of the beam selected in step 8 in the structural diagram. Sort the unmarked beams in ascending order based on this number, select the first n-1 unmarked beams, and associate the current beam annotation to the unmarked beam component entity; Step 10: Traverse each plan detail drawing and section / cut detail drawing to obtain its drawing number; Step 11: Traverse each plan drawing, obtain all the text annotations it contains, and search for text annotations with the same color line element directly below it; Step 12: Traverse each floor plan drawing and search for the text content of the floor plan drawing number in the text annotations in all floor plans.
7. The method for automatically generating a structural BIM model from a CAD drawing based on a graph neural network according to claim 1, characterized in that: The structural BIM model generation includes modeling for walls, columns and beams; modeling for plate components; and modeling for foundation components.
8. The method for automatically generating a structural BIM model from a CAD drawing based on a graph neural network according to claim 7, characterized in that: The modeling of walls, columns, and beams specifically includes: Step 1: Traverse all plan drawings and obtain all building component symbols of the wall or column type; Step 2: For each complete component symbol of a wall or column, use its plane shape as the stretching object, the elevation of the floor where it is located as the stretching starting point, and the floor height as the stretching amount. Stretch it vertically to obtain the corresponding wall or column model. Step 3: For the complete component symbol of each beam, use its plane shape as the stretching object, its own elevation minus its own height as the stretching starting point, its own height as the stretching amount, and stretch it in the vertical direction to obtain the corresponding beam model.
9. The method for automatically generating a structural BIM model from a CAD drawing based on a graph neural network according to claim 7, characterized in that: The modeling of the plate component specifically includes: Step 1: Traverse all plan drawings, obtain the symbols of all walls, columns and beam components, and take the union of the symbol shapes; Step 2: Take the union of the symbols obtained in step 1 and take the overall outer contour that can contain these shapes to form a closed polygon; Step 3: Take the union of the symbols obtained in step 1 and the closed polygons obtained in step 2, and take the difference between the two. The resulting shape set is the area that needs to be filled with the floor slab, which is the plane symbol representation of all the floor slabs; Step 4: Take the symbols of all floor slabs obtained in step 3, use the floor elevation as the stretching starting point, the floor slab thickness as the absolute value of the stretching amount, and stretch vertically downward to obtain the model of the plate component.
10. The method for automatically generating a structural BIM model from a CAD drawing based on a graph neural network according to claim 7, characterized in that: The modeling of basic components specifically includes: Step 1: Traverse all plan drawings, obtain the symbols of all foundation components and process them cyclically. If it is a pile cap foundation, execute step 2; if it is a raft foundation, execute step 3; if it is an independent foundation, execute step 4; Step 2: Take the outer closed polygon representing the upper cap in the pile cap foundation symbol and the multiple circles inside it representing the piles. Perform segmented stretching on these two parts according to their elevation and height. Then combine the two models to obtain the pile cap foundation component model. Step 3: Take the outer closed polygon representing the overall outline of the raft foundation symbol and the multiple polygons representing the holes inside it, perform segmented stretching on these two parts according to their elevation and height, and then perform a difference operation on the two parts to obtain the raft foundation component model; Step 4: Take the outer closed polygon representing the lower half of the outline of the independent base symbol, and search inside the symbol for an inner polygon that does not intersect with the lower half of the outline polygon, representing the top surface of the independent base; Step 5: Take the lower half outline obtained in step 4, use it as the stretching object, use the bottom elevation of the independent foundation as the stretching starting point, use the height of the lower half of the independent foundation as the stretching value, and stretch upward in the vertical direction to obtain the model of the lower half of the independent foundation; Step 6: Take all the points in the initial independent basic symbol corresponding to all the vertices of the top polygon obtained in step 4, and assign the independent basic top surface height value as the vertical coordinate to these points; Step 7: Take all the points in the initial independent basic symbol corresponding to all the vertices of the lower half contour obtained in step 4, and assign the height value of the lower half as the vertical coordinate to these points; Step 8: Based on the independent foundation symbol with the completed height coordinates, create a model of the upper part of the independent foundation; Step 9: Perform a union operation on the models obtained in step 5 and step 8 to obtain a complete model with independent basis.