A method for automatic generation and optimization of 3D site layout based on BIM and layer recognition
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-09
- Publication Date
- 2026-08-11
AI Technical Summary
这使得算法在迭代过程中缺乏明确的受力分离导向,不仅寻优收敛效率低下,且难以在综合物流成本与地形限制的多约束条件下,快速生成满足工程安全间距的有效坐标解集
[0019]本发明通过构建图元实体的多维拓扑关系图谱并结合贝叶斯网络进行空间关系推理,有效提升了非规范图纸中缺失标注图元的语义识别准确率;将数字高程模型深度耦合至模型实例化与优化目标中,弥补了传统方法缺乏三维地形考量的缺陷;
Smart Images

Figure CN122548826A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of building information modeling and intelligent construction technology, specifically to a method for automatic generation and optimization of three-dimensional site layout based on BIM and layer recognition. Background Technology
[0002] Building Information Modeling (BIM) technology has been widely used in the 3D layout of construction sites to improve engineering planning efficiency. However, existing methods for automatically generating 3D site layouts and spatial optimization based on 2D drawings still have the following core technical shortcomings in terms of underlying data parsing, 3D terrain adaptation, and the physical mechanisms of spatial optimization algorithms: Existing technologies for converting 2D primitives to 3D semantics typically rely heavily on character matching and extraction from layer names or explicit text annotations in CAD drawings. In real-world engineering projects, many basic drawings suffer from non-standard drawing practices, inconsistent layer attributes, or missing text annotations. Existing extraction rules cannot make independent judgments based solely on explicit text attributes and lack the logical reasoning ability to understand the spatial topological relationships between primitive entities (such as geometric inclusion and boundary adjacency). This results in primitive entities in non-standard drawings being unable to be effectively identified and assigned accurate semantic labels, significantly reducing the error tolerance and accuracy of front-end data acquisition.
[0003] Current site layout optimization and model generation methods are mostly based on a two-dimensional ideal plane with absolute zero elevation (Z=0), ignoring the actual three-dimensional terrain undulations of the construction site. Because the generated temporary facilities lack coupling with the underlying data of the digital elevation model (DEM), the system cannot obtain the spatial elevation difference between the bottom surface of the site layout components and the actual terrain sampling points during the planning stage. This prevents the system from incorporating the earthwork excavation and filling volume for site leveling as a constraint into the overall optimization objective, often resulting in high earthwork modification costs when the output site layout scheme is actually implemented.
[0004] When introducing multi-objective evolutionary algorithms (such as genetic algorithms) for field layout coordinate optimization, traditional mutation operators generally employ random coordinate perturbation mechanisms. In confined spaces with dense building structures, such non-directional random displacements easily generate a massive number of invalid solutions with spatial geometric interference (hard collisions). Most existing algorithms only treat collision interference as a Boolean-type elimination condition, failing to deeply calculate and extract physical characteristics such as the normal vector of the geometric collision surface and the spatial intrusion depth. This results in a lack of clear force separation guidance during the iteration process, leading to not only low optimization convergence efficiency but also difficulty in quickly generating an effective coordinate solution set that meets engineering safety distances under multiple constraints, including comprehensive logistics costs and terrain limitations. Summary of the Invention
[0005] The purpose of this invention is to address the problems existing in the prior art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: This invention provides a method for automatic generation and optimization of 3D site layout based on BIM and layer recognition, comprising the following steps: Step S100: Obtain two-dimensional drawings and digital elevation models of the construction site, extract graphic entities from the two-dimensional drawings and construct a multi-dimensional topological relationship map, use the multi-dimensional topological relationship map to perform spatial relationship reasoning on the missing graphic entities, and output the completed field layout semantic dataset. Step S200: Match the field layout semantic dataset with the preset parameterized field layout family library, combine the elevation data of the corresponding coordinates in the digital elevation model, adaptively instantiate the field layout components in the three-dimensional building information model, and generate a primary three-dimensional field layout model. Step S300: Perform spatial collision detection on the field layout components in the primary three-dimensional field layout model. When spatial interference is detected between components, calculate and extract the normal vector of the collision surface and the spatial intrusion depth. Step S400: Convert the normal vector and the spatial intrusion depth into a spatial repulsion force vector, and use a multi-objective optimization algorithm for iterative optimization; in the population mutation stage of generating the next generation of alternative solutions, use the spatial repulsion force vector as a heuristic guide to force the field layout components that cause spatial interference to undergo penalized separation displacement along the direction of the spatial repulsion force vector; and combine the earthwork excavation and filling volume of the digital elevation model and the on-site transportation cost as optimization objectives to solve the problem, and output the optimal three-dimensional field layout coordinate set to reconstruct the target three-dimensional field layout model.
[0007] Furthermore, the specific construction mechanism for extracting the primitive entities from the two-dimensional drawing and constructing a multi-dimensional topological relationship graph is as follows: The preprocessed primitive entities are abstracted into graph nodes according to their geometric closure features; Calculate the physical boundary distance between any two graph nodes on a two-dimensional plane, and determine the spatial relationship of their geometric boundaries; Using the graph nodes as network vertices and the inclusion, adjacency, and cross-interference relationships between the graph nodes as directed connected edges, a multidimensional topological relationship graph reflecting the underlying planar logic of the construction site is generated.
[0008] Furthermore, the step of using the multidimensional topological relationship graph to perform spatial relationship reasoning on the missing labeled primitive entities is specifically implemented through the following sub-processes: S101. Traverse the multidimensional topological relationship map, identify the benchmark nodes with established field layout attributes based on the text information in the two-dimensional drawing, and mark the graphic entities for which no valid text information has been extracted as nodes to be inferred. S102. Along the directed connected edge, extract the spatial association features between the node to be inferred and the reference node within the preset topological distance range step by step; S103. Input the acquired spatial association features into the embedded Bayesian logic inference network, and calculate the confidence level of the node to be inferred belonging to different facility types by combining the preset engineering site layout prior probability. S104. Select the facility type corresponding to the maximum value of the confidence level that meets the preset threshold, and assign it as a determined semantic label to the node to be inferred.
[0009] Furthermore, the output completed field layout semantic dataset, the data structure for a single entity in the field layout semantic dataset not only includes planar positioning coordinates and inference completed semantic labels, but also carries shape feature vectors for constraining three-dimensional shapes; The shape feature vector is composed of the closed contour area of the corresponding primitive entity, the aspect ratio of the polygon, and the size parameters of the minimum oriented bounding box, which serves as the underlying data source for parameterization driving the subsequent generation of the primary 3D field layout model.
[0010] Furthermore, the adaptive instantiation of site layout components in the 3D building information model, based on the elevation data corresponding to the coordinates in the digital elevation model, specifically includes the following terrain adaptive calculation logic: The extracted two-dimensional planar contours of the primitive entities are mapped onto the coordinate grid of the digital elevation model; Iterate through and obtain the elevation sampling point data of all points within the coverage area of the two-dimensional plane contour projection; Based on preset site leveling rules, the elevation sampling point data are weighted and calculated to obtain the reference anchoring elevation of the current target site layout facilities; The reference anchor elevation is used as a Z-axis constraint parameter and assigned to the bottom elevation attribute of the field layout component to be generated, so that the primary three-dimensional field layout model conforms to the real site terrain undulations.
[0011] Furthermore, the underlying parameter mapping mechanism for the process of matching and instantiating the field layout semantic dataset with a preset parameterized field layout family library is as follows: Read the semantic tags of the target entities in the field layout semantic dataset, and retrieve the corresponding standard BIM family files in the parameterized field layout family library; The shape feature vector carried by the target entity is analyzed, and the closed contour area and the size parameters of the minimum oriented bounding box are extracted. The built-in mapping engine converts the closed contour area and the size parameters into instance-driven parameters of the standard BIM family file. The instance-driven parameters are used to control the three-dimensional geometric envelope size and internal structural arrangement of the generated components in real time, thereby automatically generating a three-dimensional materialized entity in the three-dimensional building information model that matches the spatial scale of the two-dimensional drawings. The preset parametric field layout family library is a pre-established collection of non-standard parts. Each standard BIM family file in the collection contains not only three-dimensional geometric mesh data, but also a set of engineering physical attributes. The set of engineering physical attributes includes at least: the dynamic safety influence radius for collision detection, the foundation depth parameter for earthwork calculation, and the upper limit parameter of material carrying capacity for constraining logistics handling algorithms.
[0012] Furthermore, spatial collision detection is performed on the field layout components in the primary three-dimensional field layout model. The specific collision determination process is as follows: The geometric topology information of each field layout component is analyzed, and a compact oriented bounding box is constructed for each field layout component using the law of separation axis. Map the bounding boxes of any two field layout components to the same local coordinate system, and determine whether geometric interference occurs between them by calculating the projection overlap of the two bounding boxes on all possible separation axes. If geometric interference occurs, it is marked as a hard collision conflict, and the identifier of the field layout component involved in the conflict and its real-time coordinates are stored in the conflict list.
[0013] Furthermore, the calculation and extraction of the normal vector of the collision surface and the spatial intrusion depth specifically includes the following extraction steps: Identify the intersection region of two oriented bounding boxes that are geometrically interfering, and extract the conflict feature surfaces that constitute the intersection region; Calculate the unit component of the conflict feature surface along the line connecting the centroids of the two field components that interfere, and use it as the normal vector of the collision surface to indicate the repulsion direction in the subsequent optimization process; Calculate the maximum overlap length of the two oriented bounding boxes in the direction of the normal vector, and define the maximum overlap length as the spatial intrusion depth; The spatial collision detection includes not only hard collision detection between entities, but also soft collision detection based on engineering specification constraints; The soft collision detection specifically involves: reading the dynamic safety influence radius as described in claim 7, and generating a corresponding safety envelope sphere with the geometric center of the field layout component as the center of the sphere; Calculate the distance between two adjacent safety envelope spheres. If the distance is less than the preset engineering safety distance, it is determined to be a violation of safety specifications. The direction of the line connecting the centers of the two spheres is extracted as a virtual repulsion vector to participate in subsequent iterative optimization.
[0014] Furthermore, the specific heuristic mutation operator iteration mechanism forcing the field arrangement components that cause spatial interference to undergo penalized separation displacement along the direction of the spatial repulsion force vector, using the spatial repulsion force vector as a heuristic guide, is as follows: Obtain the current iterative coordinates of the moving field layout component that causes spatial interference. ; Define dynamic penalty coefficient The dynamic penalty coefficient The decrease is non-linear as the number of algorithm iterations increases; Based on the collision surface normal vector of claim 9 and depth of spatial intrusion Construct a physical repulsive force model: ; During the mutation phase of the algorithm to generate the next generation population, the current iteration coordinates are forcibly offset:
[0015] in, The preset resistance coefficient of the site layout components is used to characterize the ease of movement of different types of temporary facilities; by introducing the physical repulsion force model, invalid interference solutions are guided to slide rapidly outward from the safety constraint boundary in the solution space; The earthwork excavation and filling volume and on-site transportation cost, combined with the digital elevation model, are used as optimization objectives. Specifically, the following multi-objective fitness function set is constructed for evaluation and solution: Logistics handling cost function :
[0016] in, This represents the total number of material flow lines within the site. This refers to the physical load capacity of the goods transported along the corresponding route. The actual path length after avoiding static obstacles; Earthwork leveling energy consumption function :
[0017] in, This refers to the planar projection area occupied by the site layout components. For digital elevation models in coordinate The actual terrain elevation at that location The reference anchoring elevation is used when the field layout component is instantiated; In the process of solving multi-objective optimization algorithms, simultaneously making and The goal is to find the optimal Pareto front that balances earthwork excavation and logistics transportation by approaching a minimum value.
[0018] Furthermore, the process of outputting the optimal three-dimensional field layout coordinate set to reconstruct the target three-dimensional field layout model includes the following engineering decision-making and dynamic reconstruction steps: Obtain the Pareto optimal solution set output by the multi-objective optimization algorithm after convergence, wherein the Pareto optimal solution set contains multiple sets of mutually non-dominated candidate coordinate configuration schemes; The system receives external input of engineering stage weight preferences. If the current stage is the foundation construction stage, the earthwork leveling energy consumption function is given a higher decision weight; if the current stage is the main structure stage, the logistics handling cost function is given a higher decision weight. Based on the weight preference of the engineering stage, the unique optimal three-dimensional field layout coordinate set is selected from the Pareto optimal solution set using the approximation ideal solution sorting method. The optimal 3D field layout coordinate set is written back to the 3D building information model through the application programming interface, which drives the corresponding parametric field layout family library to update its entity positioning points, and finally renders and reconstructs a conflict-free target 3D field layout model. Beneficial effects
[0019] This invention effectively improves the semantic recognition accuracy of missing labeled elements in non-standard drawings by constructing a multi-dimensional topological relationship map of graphic entities and combining it with Bayesian networks for spatial relationship reasoning; it also deeply couples the digital elevation model to the model instantiation and optimization objectives, making up for the lack of three-dimensional terrain considerations in traditional methods. This invention extracts the collision surface normal vector and intrusion depth during directional bounding box interference, and transforms them into a spatial repulsion force vector to guide the iterative mutation of a multi-objective optimization algorithm. This effectively overcomes the problem of low convergence efficiency caused by blind random mutation in traditional algorithms. Ultimately, it can automatically and efficiently generate the optimal three-dimensional field layout scheme that takes into account logistics and handling costs, earthwork leveling energy consumption, and strictly meets spatial physical interference constraints. Attached Figure Description
[0020] Figure 1 This is a flowchart of the overall method of the present invention.
[0021] Figure 2 This is a schematic diagram illustrating the multidimensional topological relationships and semantic reasoning of the present invention; Figure 3 This is a schematic diagram of terrain coupling and 3D adaptive generation according to the present invention; Figure 4This is a diagram of the physical-guided multi-objective optimization algorithm architecture of the present invention. Detailed Implementation
[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but includes other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] The present invention will now be described in further detail with reference to the accompanying drawings: Example
[0025] like Figure 1-4 As shown, a method for automatic generation and optimization of 3D site layout based on BIM and layer recognition includes the following steps: Step S100: Obtain two-dimensional drawings and digital elevation models of the construction site, extract graphic entities from the two-dimensional drawings and construct a multi-dimensional topological relationship map, use the multi-dimensional topological relationship map to perform spatial relationship reasoning on the missing graphic entities, and output the completed field layout semantic dataset. Step S200: Match the field layout semantic dataset with the preset parameterized field layout family library, combine the elevation data of the corresponding coordinates in the digital elevation model, adaptively instantiate the field layout components in the three-dimensional building information model, and generate a primary three-dimensional field layout model. Step S300: Perform spatial collision detection on the field layout components in the primary three-dimensional field layout model. When spatial interference is detected between components, calculate and extract the normal vector of the collision surface and the spatial intrusion depth. Step S400: Convert the normal vector and the spatial intrusion depth into a spatial repulsion force vector, and use a multi-objective optimization algorithm for iterative optimization; in the population mutation stage of generating the next generation of alternative solutions, use the spatial repulsion force vector as a heuristic guide to force the field layout components that cause spatial interference to undergo penalized separation displacement along the direction of the spatial repulsion force vector; and combine the earthwork excavation and filling volume of the digital elevation model and the on-site transportation cost as optimization objectives to solve the problem, and output the optimal three-dimensional field layout coordinate set to reconstruct the target three-dimensional field layout model.
[0026] Furthermore, the specific implementation process of step S100 is as follows: In an embodiment of the present invention, step S100 is used to solve the technical problem of missing semantic meaning of primitives in non-standard two-dimensional engineering drawings. By constructing a mathematical graph theory model and a probabilistic inference network, the transformation of two-dimensional primitives into computer-readable semantics is achieved. The specific execution logic of this step is as follows: First, two-dimensional drawings (such as DWG or DXF format) and a digital elevation model (DEM) of the site are obtained through a data interface. By calling a preset graphics parsing library, primitives are extracted from the two-dimensional drawings, free line segments and non-closed primitives are removed, and closed polylines (i.e. primitive entities) that constitute the boundaries of the site facilities are extracted.
[0027] In order to transform discrete primitive entities into data structures with spatial relationships, this embodiment constructs a multidimensional topological relationship graph.
[0028] Specifically, each extracted closed polyline is abstracted as a graph node in the graph. ,in For a set of nodes, Number the nodes. Calculate the number of any two graph nodes. and Physical boundary distance on a two-dimensional plane The physical boundary distance is defined as the minimum Euclidean distance between points on the boundary of two closed polylines.
[0029] Based on the calculated physical boundary distances and geometric coordinates, the system determines the spatial topological relationships between nodes and uses this to construct a set of directed connected edges in the graph. The specific construction rules include the determination of inclusion relationships and adjacency relationships. For the determination of inclusion relationships, the ray crossing method is used; if the node... Rays emanating from all geometric vertices and nodes If the number of intersections of the boundaries is odd, then the node is determined. Spatial contains nodes , generated by point to The includes directed edges. For determining adjacency, if... Less than the preset adjacency distance threshold (In this embodiment) If the actual physical distance is set to 0.5 meters according to the drawing scale, and there is no containment relationship between the two, then a bidirectional adjacent connected edge is generated. Through the above calculations, a node set is generated. and edge set The constructed multidimensional topological relationship map .
[0030] After completing the graph construction, for graph entities lacking text annotations, the system performs a spatial relationship reasoning process based on the multidimensional topological relationship graph. The system traverses the graph. By utilizing optical character recognition (OCR) and layer text parsing, nodes with explicit site-specific text (such as those labeled "construction road" or "wall") attached to their interior or boundaries are defined as the baseline node set. At the same time, nodes that did not parse valid text are marked as nodes to be inferred. .
[0031] For any node to be inferred The system along the directed connected edges Perform a breadth-first traversal to extract the distance. Topological hop count (In this embodiment) All baseline nodes within a certain range. Extract the semantic labels and edge types (containment or adjacency) of these baseline nodes to construct the node to be inferred. Spatial correlation feature vector ,in For the feature dimension, It represents the presence or number of a specific type of reference node in its neighborhood.
[0032] The spatial correlation feature vector The input is fed into the embedded Bayesian logic inference network. The core of this inference network lies in calculating the nodes to be inferred. Belongs to the Site layout facilities (such as processing sheds, material storage yards, etc.) are referred to as The posterior confidence level of the model is calculated. This embodiment uses a Naive Bayes classification model for probability calculation, and its confidence evaluation formula is:
[0033] In the formula, In order to observe spatial correlation features Under the condition, node Belongs to the facility category The posterior probability, i.e., the confidence level. The total number of categories of venue facilities preset for the system. Prior probability, representing the category The inherent frequency of occurrence in conventional building site layouts is obtained by statistically analyzing historical project databases. Let be the conditional probability, representing the probability given that the facility type is known. In this case, its neighborhood exhibits characteristics The probability (e.g., the conditional probability that “materials yard” is adjacent to “construction road”).
[0034] Parallel computing nodes based on the above formula Corresponding to all Confidence level of facility categories, and execution The process filters out facility categories corresponding to the highest confidence scores. If this highest confidence score exceeds a set inference acceptance threshold... If the value is 0.75, the system will assign the corresponding facility category as a semantic label to the node to be inferred. If the result is below the threshold, it will be marked as pending manual review.
[0035] After completing the semantic reasoning of the entire image, the system outputs the completed field layout semantic dataset. This dataset does not only contain coordinates and strings; its core data structure includes planar positioning coordinates, semantic labels, and shape feature vectors. For primitive entities with established semantics, the system extracts geometric parameters from their closed polylines and constructs shape feature vectors. .in: The projected area of the closed primitive is calculated using the Gaussian area formula combined with the coordinates of the polygon vertices. and These represent the length and width of the minimum oriented bounding box (OBB) for the primitive, respectively. To accurately obtain the oriented bounding box, the system employs principal component analysis to extract the eigenvectors of the polygon vertex covariance matrix as local orthogonal axes of the bounding box. Then, it calculates the extreme values of the primitive's projection onto these orthogonal axes to obtain the bounding box. and ; The aspect ratio characteristic of the primitive is determined by the formula. The calculated shape feature vectors are directly mapped to the underlying data source of the corresponding entity, ensuring that in the subsequent 3D generation stage, parametric components can be precisely geometrically driven based on their actual footprint, orientation, and scale, rather than producing spatial distortion.
[0036] Furthermore, the specific implementation process of step S200 is as follows: In this embodiment, combined with a digital elevation model, an engineering entity with attached physical properties is instantiated in three-dimensional space through a parameter mapping engine. This step overcomes the limitations of traditional static modeling based on absolute zero elevation (Z=0), achieving terrain adaptation and dynamic size-driven operation. Its underlying computational logic is as follows: The system performs terrain-adaptive 3D elevation calculation. The system reads the input 3D digital elevation model data, which is represented at the underlying data structure as a two-dimensional regular grid matrix containing discrete elevation sampling points. For any target entity in the field layout semantic dataset, the system extracts its planar closed contour polygon. and the polygon Orthographic projection onto the grid matrix In the global coordinate system.
[0037] By applying polygon interior point determination algorithms (such as the ray intersection method or the corner method), the system traverses and extracts the points whose projections fall on the polygon. All elevation sampling points inside and on the boundary constitute a local elevation point set. ,in This represents the total number of covered sampling points. This is used to obtain the reference anchoring elevation of the target entity in three-dimensional space. The system incorporates an elevation calculation model based on the principle of earthwork cut-fill balance. The formula for calculating the benchmark anchor elevation is set as follows:
[0038] In the formula, For the local elevation point concentration The actual terrain elevation of each sampling point; The spatial weighting coefficients are calculated using inverse distance weighted interpolation (IDW) over the distance polygon. The closer a sampling point is to the geometric center, the larger its weighting coefficient. This refers to the foundation depth parameter for this type of facility, which is preset in the system's engineering compliance database. The result is obtained through spatial interpolation and weighted calculation. The value directly assigned to the field layout component to be generated The axis constraint parameters enable the generated base plate to closely conform to the complex undulations of the real ground surface, and provide accurate geometric boundaries for subsequent earthwork leveling energy consumption calculations.
[0039] After completing the elevation constraints, the system invokes the parameter mapping engine to perform adaptive instantiation of the geometric scale and internal structure of the 3D component. First, based on the semantic tags of the target entity, the system retrieves and loads the corresponding standard BIM family file from a pre-defined parametric field family library. This standard BIM family file is not a fixed static mesh, but rather a set of parametric components driven by geometric constraint equations, and internally encapsulates a set of engineering physical attributes (including the dynamic safety influence radius) for subsequent algorithm evolution. and the upper limit of material carrying capacity The system parses the shape feature vector carried by the target entity. (i.e., area, length, width, and aspect ratio). The parameter mapping engine will determine the length of the oriented bounding box. With width The global bounding box dimensions are directly mapped to the BIM family file via the application programming interface (API) to control the bottom outer envelope size of the entity. For components... Shaft height The system does not use a fixed stretching value, but rather calculates the required capacity volume inversely based on a specific semantic category. Taking an entity with the semantic label "material storage yard" as an example, its dynamic height... The calculation formula is:
[0040] In the formula, This represents the total target volume of materials that the storage yard needs to accommodate during the current construction phase. The actual usable planar area provided by the shape feature vector; The effective space utilization coefficient of the storage yard (range of values) ): This refers to the porosity or angle of repose coefficient of a specific stacked material. The system uses this equation to calculate the minimum required height to meet the stacking capacity. And assign this dynamic height value to the BIM family file. In the shaft tension parameters.
[0041] After mapping the above parameters and solving the equations, the system dynamically assembles polygonal meshes in the three-dimensional building information model environment through the underlying graphics engine, generating a primary three-dimensional field layout model that not only matches the two-dimensional drawings in planar orientation and meets the engineering capacity requirements in three-dimensional scale, but also is fully coupled with the real digital terrain in bottom elevation.
[0042] Furthermore, the specific implementation process of step S300 is as follows: In this embodiment, step S300 is used to receive the primary three-dimensional field layout model generated in step S200 and perform high-precision spatial interferometry analysis through the underlying computational geometry engine. Unlike traditional Boolean intersection algorithms that only provide static identification, the core technical objective of this step is to calculate and extract the geometric topological features of the interfering entities, outputting physical dynamic parameters to drive subsequent heuristic algorithm mutations. The specific execution logic of this step is as follows: First, the system executes a hard collision determination process based on the separating axis law. To improve the computational convergence speed in 3D space and ensure the detection accuracy of components with arbitrary orientation, the system does not use the traditional axis-aligned bounding box (AABB). Instead, it analyzes the set of geometric mesh vertices of each field layout component in the primary 3D field layout model and constructs an extremely compact orientation bounding box for each field layout component through covariance matrix eigenvalue decomposition.
[0043] Define the directional bounding boxes corresponding to any two field layout components to be detected as follows: and From its geometric center coordinates Three mutually orthogonal unit direction vectors and the corresponding half-side length projection scalar Uniquely determined; similarly defined Corresponding parameters and .
[0044] According to the separating axis theorem, a hard collision occurs between two convex polyhedra if and only if their projected line segments overlap on all potential projection axes in three-dimensional space. The system selects 15 potential separating axes to form a test set. ,Include: The three normal directions (i.e.) For the test set any unit direction vector in ,calculate and In the separation shaft Projected radius on and :
[0045]
[0046] Subsequently, the vector of the line connecting the center points of the two bounding boxes on the separation axis is calculated. Projection distance on: If there exists a separation axis that satisfies... If no hard collision occurs, the system determines that no collision has occurred and terminates the detection of the two components. If the test set... All 15 separation axes satisfy the projection overlap condition, that is:
[0047] Then the system determines and A hard collision occurs in space, and the identifier of the component that caused the collision is stored in the interference matrix.
[0048] Upon confirmation of a hard collision, the system immediately initiates the physical feature extraction procedure to calculate the normal vector of the collision surface and the spatial intrusion depth. The system then re-traverses the aforementioned 15 separation axes, calculating the projected overlap on all axes. Based on the principle of minimum translational penetration, the separation axis that results in the minimum projected overlap represents the direction of the shallowest interference between the two entities in three-dimensional space. Therefore, the system selects the unit separation axis corresponding to the minimum overlap. Define it as the normal vector of the collision surface. : (in, Meanwhile, the actual scalar value of this minimum overlap in three-dimensional space is defined as the spatial intrusion depth. ,Right now The normal vector of the collision surface It provides an absolute three-dimensional spatial orientation guide, while the intrusion depth It provides the shortest translation distance required to separate the two components, which together constitute the physical characteristic parameter characterizing the severity of the interference.
[0049] In addition to the hard collision detection mentioned above, the system also performs soft collision detection for layouts that violate engineering specifications but do not involve mesh interference. The system reads the dynamic safety influence radius encapsulated in the BIM family file in step S200. (For example: the slewing collision avoidance safety distance of tower cranes, or the fire separation distance of hazardous chemical warehouses). Based on the geometric center of the component. For the center of the ball, Construct a safe envelope sphere in a three-dimensional coordinate system with radius .
[0050] Define the safety envelope centers of two adjacent components as follows: and The system calculates the Euclidean distance from the center of the sphere. .like If the collision fails, it is determined to be a soft collision that violates engineering specifications. For this type of soft collision, the system extracts the unit direction vector of the line connecting the centers of the two spheres as a virtual repulsion vector. And calculate the virtual intrusion depth as Whether extracted by hard collision or soft collision The system packages all of them into a set of conflict feature vectors containing direction and displacement scalars, and uses them as determined physical input boundary conditions, which are then directly passed to the subsequent heuristic multi-objective optimization model.
[0051] Furthermore, the specific implementation process of step S400 is as follows: In this embodiment, step S400 is used to receive the conflict feature vector set output in step S300, reconstruct the mutation operator of the non-dominated sorting genetic algorithm by introducing spatial dynamic parameters, perform multi-objective spatial coordinate optimization guided by deterministic physical repulsion, and finally map the optimal solution set back to the three-dimensional building information model. The specific calculation logic of this step is as follows: First, the system establishes a chromosome-based encoding mechanism for a multi-objective optimization algorithm. The central plane coordinates of all movable temporary facilities (such as material storage yards, processing sheds, and tower cranes) within the construction site are defined as the main variable set. The set of coordinates for each candidate An individual that constitutes a population (i.e., a field layout scheme).
[0052] Subsequently, the system constructs a set of multi-objective functions to evaluate individual fitness. This embodiment establishes two mutually restraining minimization objective functions: a logistics handling cost function. Energy consumption function of earthwork leveling .
[0053] For logistics handling cost function Its evaluation relies not only on the straight-line distance between coordinates, but also incorporates an A heuristic path planning algorithm to obtain the actual engineering route distance. Its function expression is:
[0054] In the formula, This refers to the total number of logistics lines within the venue that require the allocation of supplies. For the first one preset in the BIM family properties The rated physical load capacity of the transport line; This refers to the shortest collision-free path length from the source coordinates to the target coordinates calculated by calling the A* algorithm after avoiding static field obstacles (such as existing foundation pits or red-line fences).
[0055] The energy consumption function for earthwork leveling is used to calculate the volumetric deviation between the site layout and the actual digital terrain surface. Under the discrete grid data structure at the computer's underlying level, the system transforms the area double integral into a summation calculation over the elevation sampling point grid:
[0056] In the formula, This represents the discrete grid projection region of the current facility polygon on the XY plane. This corresponds to the actual digital elevation on the grid coordinates; The calculated benchmark anchorage elevation; and Do not specify the spatial resolution parameter for the DEM data grid.
[0057] In the iterative solution process, traditional genetic algorithms use random perturbation when performing population mutation, which easily generates a large number of invalid interference solutions within the confined building space. Therefore, this embodiment constructs a heuristic mutation operator guided by physical repulsion. When an individual is detected by step S300 during the evaluation phase to have a hard collision or a soft collision violating the safety distance, the system obtains the collision surface normal vector output by step S300. and depth of spatial intrusion The system constructs a physical repulsive force model:
[0058] In the formula, This is a dynamic penalty coefficient, whose value varies with the current iteration number of the algorithm. It exhibits non-linear decay, and the decay function is defined as follows: ,in The initial maximum penalty constant, As the attenuation control factor, Number of iterations.
[0059] When generating the next generation of alternative solutions, the system masks the random mutation probability of the interfering individual and forces the following position update formula to correct its coordinates:
[0060] In the formula, For the first The displacement resistance coefficient of structural members in a field. This coefficient characterizes the arrangement flexibility of different entities in practical engineering (e.g., heavy tower cranes). The value is set to a minimum to limit its large displacement, while the light steel prefabricated house... The value is set to a large value to allow for rapid slippage. According to this force equation, the interfering member will move along the direction of the fastest failure collision (normal vector). Forced separation is executed.
[0061] go through After non-dominated sorting and crowding calculation, the algorithm converges and outputs a Pareto front that approximates the global optimum. This front contains multiple sets of mutually non-dominated optimal three-dimensional field layout coordinates.
[0062] To output a final, unique solution, the system introduces an engineering decision-making mechanism based on approximation of the ideal solution's extreme value. The system receives an externally input engineering stage weight vector. If it is in the basic earthwork excavation stage, the system will allocate... If it is in the stage of transporting bulk materials for the main structure, the system allocation The system calculates the weighted Euclidean distance from each solution in the Pareto solution set to the positive and negative ideal solutions, and selects the coordinate set with the highest relative proximity as the target optimal solution.
[0063] Finally, the system extracts all coordinate data from the target optimal solution and directly processes the parametric field family instances in the 3D building information model through application programming interfaces such as Revit API. The positioning attributes are rewritten using matrix transformation. After receiving the update command, the BIM engine automatically renders, reconstructs, and outputs the target 3D site layout model without interference and with the lowest overall cost.
[0064] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A three-dimensional field layout automatic generation and optimization method based on BIM and layer identification, characterized in that, Includes the following steps: Step S100: Obtain two-dimensional drawings and digital elevation models of the construction site, extract graphic entities from the two-dimensional drawings and construct a multi-dimensional topological relationship map, use the multi-dimensional topological relationship map to perform spatial relationship reasoning on the missing graphic entities, and output the completed field layout semantic dataset. Step S200: Match the field layout semantic dataset with the preset parameterized field layout family library, combine the elevation data of the corresponding coordinates in the digital elevation model, adaptively instantiate the field layout components in the three-dimensional building information model, and generate a primary three-dimensional field layout model. Step S300: Perform spatial collision detection on the field layout components in the primary three-dimensional field layout model. When spatial interference is detected between components, calculate and extract the normal vector of the collision surface and the spatial intrusion depth. Step S400: Convert the normal vector and the spatial intrusion depth into a spatial repulsion force vector, and use a multi-objective optimization algorithm for iterative optimization; in the population mutation stage of generating the next generation of alternative solutions, use the spatial repulsion force vector as a heuristic guide to force the field layout components that cause spatial interference to undergo penalized separation displacement along the direction of the spatial repulsion force vector; and combine the earthwork excavation and filling volume of the digital elevation model and the on-site transportation cost as optimization objectives to solve the problem, and output the optimal three-dimensional field layout coordinate set to reconstruct the target three-dimensional field layout model.
2. The method for automatic generation and optimization of 3D site layout based on BIM and layer recognition according to claim 1, characterized in that, The specific construction mechanism for extracting graphic entities from the two-dimensional drawing and constructing a multi-dimensional topological relationship graph is as follows: The preprocessed primitive entities are abstracted into graph nodes according to their geometric closure features; Calculate the physical boundary distance between any two graph nodes on a two-dimensional plane, and determine the spatial relationship of their geometric boundaries; Using the graph nodes as network vertices and the inclusion, adjacency, and cross-interference relationships between the graph nodes as directed connected edges, a multidimensional topological relationship graph reflecting the underlying planar logic of the construction site is generated.
3. The method for automatic generation and optimization of 3D site layout based on BIM and layer recognition according to claim 2, characterized in that, The step of using the multidimensional topological relationship graph to perform spatial relationship reasoning on the missing labeled primitive entities is specifically implemented through the following sub-processes: S101. Traverse the multidimensional topological relationship map, identify the benchmark nodes with established field layout attributes based on the text information in the two-dimensional drawing, and mark the graphic entities for which no valid text information has been extracted as nodes to be inferred. S102. Along the directed connected edge, extract the spatial association features between the node to be inferred and the reference node within the preset topological distance range step by step; S103. Input the acquired spatial association features into the embedded Bayesian logic inference network, and calculate the confidence level of the node to be inferred belonging to different facility types by combining the preset engineering site layout prior probability. S104. Select the facility type corresponding to the maximum value of the confidence level that meets the preset threshold, and assign it as a determined semantic label to the node to be inferred.
4. The method for automatic generation and optimization of 3D site layout based on BIM and layer recognition according to claim 3, characterized in that, The output completed field layout semantic dataset, the data structure for a single entity in the field layout semantic dataset not only includes planar positioning coordinates and inference completed semantic labels, but also carries shape feature vectors for constraining three-dimensional shapes; The shape feature vector is composed of the closed contour area of the corresponding primitive entity, the aspect ratio of the polygon, and the size parameters of the minimum oriented bounding box, which serves as the underlying data source for parameterization driving the subsequent generation of the primary 3D field layout model.
5. The method for automatic generation and optimization of 3D site layout based on BIM and layer recognition according to claim 4, characterized in that, The step of adaptively instantiating site layout components in the 3D building information model by combining the elevation data of the corresponding coordinates in the digital elevation model specifically includes the following terrain adaptive calculation logic: The extracted two-dimensional planar contours of the primitive entities are mapped onto the coordinate grid of the digital elevation model; Iterate through and obtain the elevation sampling point data of all points within the coverage area of the two-dimensional plane contour projection; Based on preset site leveling rules, the elevation sampling point data are weighted and calculated to obtain the reference anchoring elevation of the current target site layout facilities; The reference anchor elevation is used as a Z-axis constraint parameter and assigned to the bottom elevation attribute of the field layout component to be generated, so that the primary three-dimensional field layout model conforms to the real site terrain undulations.
6. The method for automatic generation and optimization of 3D site layout based on BIM and layer recognition according to claim 5, characterized in that, The process of matching and instantiating the field layout semantic dataset with a preset parameterized field layout family library has the following underlying parameter mapping mechanism: Read the semantic tags of the target entities in the field layout semantic dataset, and retrieve the corresponding standard BIM family files in the parameterized field layout family library; The shape feature vector carried by the target entity is analyzed, and the closed contour area and the size parameters of the minimum oriented bounding box are extracted. The built-in mapping engine converts the closed contour area and the size parameters into instance-driven parameters of the standard BIM family file. The instance-driven parameters are used to control the three-dimensional geometric envelope size and internal structural arrangement of the generated components in real time, thereby automatically generating a three-dimensional materialized entity in the three-dimensional building information model that matches the spatial scale of the two-dimensional drawings. The preset parametric field layout family library is a pre-established collection of non-standard parts. Each standard BIM family file in the collection contains not only three-dimensional geometric mesh data, but also a set of engineering physical attributes. The set of engineering physical attributes includes at least: the dynamic safety influence radius for collision detection, the foundation depth parameter for earthwork calculation, and the upper limit parameter of material carrying capacity for constraining logistics handling algorithms.
7. The method for automatic generation and optimization of 3D site layout based on BIM and layer recognition according to claim 6, characterized in that, Spatial collision detection is performed on the field layout components in the primary three-dimensional field layout model. The specific collision determination process is as follows: The geometric topology information of each field layout component is analyzed, and a compact oriented bounding box is constructed for each field layout component using the law of separation axis. Map the bounding boxes of any two field layout components to the same local coordinate system, and determine whether geometric interference occurs between them by calculating the projection overlap of the two bounding boxes on all possible separation axes. If geometric interference occurs, it is marked as a hard collision conflict, and the identifier of the field layout component involved in the conflict and its real-time coordinates are stored in the conflict list.
8. The method for automatic generation and optimization of 3D site layout based on BIM and layer recognition according to claim 7, characterized in that, The calculation and extraction of the normal vector of the collision surface and the spatial intrusion depth specifically includes the following extraction steps: Identify the intersection region of two oriented bounding boxes that are geometrically interfering, and extract the conflict feature surfaces that constitute the intersection region; Calculate the unit component of the conflict feature surface along the line connecting the centroids of the two field components that interfere, and use it as the normal vector of the collision surface to indicate the repulsion direction in the subsequent optimization process; Calculate the maximum overlap length of the two oriented bounding boxes in the normal vector direction, and define the maximum overlap length as the spatial intrusion depth; The spatial collision detection includes not only hard collision detection between entities, but also soft collision detection based on engineering specification constraints; The soft collision detection specifically involves: reading the dynamic safety influence radius as described in claim 7, and generating a corresponding safety envelope sphere with the geometric center of the field layout component as the center of the sphere; Calculate the distance between two adjacent safety envelope spheres. If the distance is less than the preset engineering safety distance, it is determined to be a violation of safety specifications. The direction of the line connecting the centers of the two spheres is extracted as a virtual repulsion vector to participate in subsequent iterative optimization.
9. The method for automatic generation and optimization of 3D site layout based on BIM and layer recognition according to claim 8, characterized in that, The specific heuristic mutation operator iteration mechanism forcing the field layout components that cause spatial interference to undergo penalized separation displacement along the direction of the spatial repulsion force vector, guided by the spatial repulsion force vector, is as follows: Obtain the current iterative coordinates of the moving field layout component that causes spatial interference. ; Define dynamic penalty coefficient The dynamic penalty coefficient The decrease is non-linear as the number of algorithm iterations increases; Based on the collision surface normal vector of claim 9 and depth of spatial intrusion Construct a physical repulsive force model: ; During the mutation phase of the algorithm to generate the next generation population, the current iteration coordinates are forcibly offset: , in, The preset resistance coefficient of the site layout components is used to characterize the ease of movement of different types of temporary facilities; by introducing the physical repulsion force model, invalid interference solutions are guided to slide rapidly outward from the safety constraint boundary in the solution space; The earthwork excavation and filling volume and on-site transportation cost, combined with the digital elevation model, are used as optimization objectives. Specifically, the following multi-objective fitness function set is constructed for evaluation and solution: Logistics handling cost function : , in, This represents the total number of material flow lines within the site. This refers to the physical load capacity of the goods transported along the corresponding route. The actual path length after avoiding static obstacles; Earthwork leveling energy consumption function : , Where S is the planar projection area occupied by the site layout component. For digital elevation models in coordinate The actual terrain elevation at that location The reference anchoring elevation is used when the field layout component is instantiated; In the process of solving multi-objective optimization algorithms, simultaneously making and The goal is to find the optimal Pareto front that balances earthwork excavation and logistics transportation by approaching a minimum value.
10. The method for automatic generation and optimization of 3D site layout based on BIM and layer recognition according to claim 9, characterized in that, The process of outputting the optimal three-dimensional field layout coordinate set to reconstruct the target three-dimensional field layout model includes the following engineering decision-making and dynamic reconstruction steps: Obtain the Pareto optimal solution set output by the multi-objective optimization algorithm after convergence, wherein the Pareto optimal solution set contains multiple sets of mutually non-dominated candidate coordinate configuration schemes; The system receives external input of engineering stage weight preferences. If the current stage is the foundation construction stage, the system assigns a higher decision weight to the earthwork leveling energy consumption function. If it is in the main structure stage, then the logistics handling cost function is given a higher decision weight; Based on the weight preference of the engineering stage, the unique optimal three-dimensional field layout coordinate set is selected from the Pareto optimal solution set using the approximation ideal solution sorting method. The optimal 3D field layout coordinate set is written back to the 3D building information model through the application programming interface, which drives the corresponding parametric field layout family library to update its entity positioning points, and finally renders and reconstructs a conflict-free target 3D field layout model.