Pipeline collision detection method, positioning method and system in BIM model

Through the particle swarm algorithm, the meshing and spatial hashing algorithm detection are optimized, and the problems of low efficiency and high complexity of pipeline collision detection in the BIM model are solved, and efficient and accurate pipeline collision detection and positioning are achieved.

CN120030664AActive Publication Date: 2025-05-23CENT SOUTH UNIV

Patent Information

Application Number
CN202510510417.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-05-23
Estimated Expiration
2045-04-23

AI Technical Summary

Technical Problem

In the existing BIM model, the pipeline collision detection method is slow and expensive when processing large models, and cannot classify collision results. The import and export process is cumbersome, the filtering conditions are configuration, and it is difficult to set complex collision tolerance conditions.

Method used

The particle swarm algorithm is used to optimize the pipeline mesh division, combined with the spatial hashing algorithm for hard collision detection, and soft collision detection and positioning are carried out through the positional relationship, distance relationship and angle relationship of the pipeline center line.

Benefits of technology

It achieves the reliability, accuracy and efficiency of pipeline collision detection in BIM models, can efficiently handle large models, and supports complex collision tolerance condition configurations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030664A_ABST
    Figure CN120030664A_ABST
Patent Text Reader

Abstract

The invention discloses a pipeline collision detection method, positioning method and system in a BIM model. The method comprises the steps of obtaining data information of a target BIM model; all pipeline and structure information of a set floor is selected; grid division is carried out on the selected pipeline; carrying out hard collision detection on the pipeline by adopting a space Hash algorithm; according to the position relation, the distance relation and the included angle relation of the center lines of any two pipelines, soft collision detection is conducted on the pipelines; detecting the soft collision severity of the pipelines according to the shortest distance between the center lines of any two pipelines and the set minimum allowable distance; and performing positioning detection of soft collision of the pipelines according to the position information and the intersection point information of any two pipelines in the planar graph or the three-dimensional graph. According to the method, the pipeline collision detection and positioning in the BIM model can be realized, the reliability is higher, the accuracy is better, and the efficiency is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer-aided design, and in particular relates to a pipeline collision detection method, a positioning method and a system in a BIM model. Background Art

[0002] BIM model is a commonly used solution in the field of computer-aided design; this solution is a full life cycle management technology for construction projects based on three-dimensional digitalization. It integrates structured data to achieve collaborative optimization of design, construction, operation and maintenance stages.

[0003] Pipeline collision detection is an important part of the design and application process of BIM models. At present, the commonly used pipeline collision detection solutions include the collision detection solution built into Revit and the collision detection solution in Naviswork. Although the collision detection solution built into Revit has achieved good results when processing small models, when processing large models, this solution not only has a slow detection speed, a large detection process overhead, and high requirements for system hardware, but also cannot classify collision results. The collision detection solution in Naviswork requires exporting the model file in Revit to the format required by Naviswork, and then importing it to use its collision detection function, but the import and export process is relatively cumbersome; moreover, the screening condition configuration during the detection process is relatively complex, the rule configuration is relatively rough, and it is difficult to set complex collision tolerance conditions, and the solution is relatively complex. Summary of the invention

[0004] One of the purposes of the present invention is to provide a pipeline collision detection method in a BIM model with high reliability, good accuracy and high efficiency.

[0005] A second object of the present invention is to provide a positioning method including the pipeline collision detection method in the BIM model.

[0006] A third object of the present invention is to provide a system for implementing the pipeline collision detection method in the BIM model.

[0007] The pipeline collision detection method in the BIM model provided by the present invention comprises the following steps: S1. Obtain data information of the target BIM model; S2. According to the data information obtained in step S1, all pipelines and structural information of the set floor are selected; S3. Based on the particle swarm algorithm, meshing the pipeline selected in step S2; S4. According to the meshing result obtained in step S3, a spatial hash algorithm is used to perform hard collision detection of the pipeline; S5. Perform soft collision detection of pipelines based on the position relationship, distance relationship and angle relationship between the center lines of any two pipelines; S6. According to the shortest distance between the center lines of any two pipes and the set minimum allowable distance, the severity of the soft collision of the pipes is detected, thereby completing the detection of pipe collision in the BIM model.

[0008] The step S3 specifically includes the following steps: Meshing the pipeline selected in step S2; Based on the median and interquartile range of the pipe length list, the ideal grid cell size is calculated using the following formula: Where s is the ideal grid unit size; mid is the median value of the pipeline length list; iqr is the interquartile range of the pipeline length list; The particle swarm optimization algorithm is used to optimize the grid size: During the optimization process, each particle represents a candidate grid size, the search range is set, and the initial velocity is randomly assigned to each particle; In the performance dimension, based on the number of builds, average build area, and average build size, the performance dimension score is calculated using the following formula: In the formula Score the performance dimensions; is the current position of the particle, which is used to indicate the size of the current grid unit; is the average build size, and , a is the grid area, c is the number of constructions; In the quality dimension, the ratio of the mesh size to the minimum size of the component is analyzed, and the quality dimension score is calculated using the following formula: In the formula Rating the quality dimensions; is the minimum size of the component, and , is the maximum value of the component on the X axis, is the minimum value of the component on the X axis, is the maximum value of the component on the Y axis, is the minimum value of the component on the Y axis; In the ideal value dimension, based on the degree of deviation between the current value of the grid and the ideal value of the grid, the ideal value dimension score is calculated using the following formula: Where dev is the relative deviation between the current grid cell size and the ideal grid cell size, and , is the size of the ideal grid cell; The fitness of particles is evaluated by weighted calculation based on scores in three dimensions: performance, quality, and ideal value. The particle speed is updated using the following formula: In the formula is the updated speed of the nth particle; w is the inertia weight; is the speed of the nth particle before updating; is the cognitive parameter; R is the random weight; is the historical optimal position of the particle; is the position of the nth particle before updating; for social parameters; is the global optimal position of the particle; The particle position is updated using the following formula: In the formula is the position of the nth particle before updating; is the updated speed of the nth particle; t is the unit time; After completing the set number of iterations, the final global optimal position of the particle is used as the final grid size.

[0009] The step S4 specifically comprises the following steps: According to the grid division result of step S3, the continuous three-dimensional space is divided into cubic grids; A hash function is used to map the spatial coordinates of pipes or structures in the space into a hash table to achieve fast access and query of spatial objects; According to the divided grids, the pipes or structures in the same grid unit are regarded as potential collision pipe targets of a pipe. The AABB bounding box method is used to detect potential collision elements: if the AABB bounding boxes of pipes and pipes, or pipes and structures intersect, it is determined that a hard collision exists.

[0010] The step S5 comprises the following steps: Soft collision detection of pipelines, including soft collision detection between pipelines and soft collision detection between hoses and structures; (1) Soft collision detection between pipelines: According to the radius of any two pipes and the set minimum distance between the two pipes, the pipe soft collision detection threshold is calculated; If the actual shortest distance between the two pipelines is less than the calculated pipeline soft collision detection threshold, it is determined that the two pipelines have a soft collision; otherwise, it is determined that the two pipelines do not have a soft collision; For two pipes with soft collision: If the center lines of the two pipes are not coplanar, the soft collision of the two pipes is directly determined to be a non-coplanar cross soft collision; If the center lines of the two pipes are coplanar: Calculate the cross product of the direction vectors of the center lines of the two pipes, and determine whether the soft collision is a coplanar collinear soft collision or a coplanar parallel soft collision based on the size of the cross product, the set compatible error tolerance, and the straight-line distance between the center lines of the two pipes; If the center lines of the two pipes have an intersection, calculate the distance and direction vector from the intersection to each endpoint; if the intersection is on the center line of any pipe, the soft collision is determined to be a coplanar internal intersection soft collision; If the center lines of the two pipes have no intersection, the actual shortest distance between the two pipes is calculated. If the actual shortest distance between the two pipes is less than the set minimum allowable distance, the soft collision is determined to be a soft collision of coplanar extension lines; otherwise, it is determined to be other types. (2) Soft collision detection between pipelines and structures: According to the pipeline radius and the set minimum distance between pipelines, the pipeline structure soft collision detection threshold is calculated; The shortest distance between the centerline of the pipeline and the structure is obtained, and compared with the calculated soft collision detection threshold of the pipeline structure: if the shortest distance between the centerline of the pipeline and the structure is greater than the soft collision detection threshold of the pipeline structure, it is determined that there is no soft collision between the pipeline and the structure; otherwise, it is determined that there is a soft collision between the pipeline and the structure; For existing soft collisions between pipelines and structures, the soft collision type of pipelines and structures is detected based on the shortest distance between the centerline of the pipeline and the structure and the number of intersections between each face of the structure and the centerline of the pipeline.

[0011] The step S5 specifically includes the following steps: Soft collision detection of pipelines, including soft collision detection between pipelines and soft collision detection between hoses and structures; (1) Soft collision detection between pipelines: According to the radius r1 and r2 of any two pipes and the minimum distance between the two pipes, the pipe soft collision detection threshold min is calculated as ; If the actual shortest distance d between the two pipelines is less than the calculated pipeline soft collision detection threshold min, it is determined that the two pipelines have a soft collision; otherwise, it is determined that the two pipelines do not have a soft collision; Set the soft collision types between pipelines to include non-planar intersection soft collision, coplanar collinear soft collision, coplanar parallel soft collision, coplanar internal intersection soft collision and coplanar extension line intersection soft collision; If the center lines of the two pipes in soft collision are not coplanar, the soft collision of the two pipes is directly determined to be a non-coplanar cross soft collision; the nearest collision points are set as p1 and p2, and the X-axis coordinate, Y-axis coordinate and Z-axis coordinate of p1 are , the X-axis coordinate, Y-axis coordinate and Z-axis coordinate of p2 are , calculate the actual distance between the two collision points for , calculate the angle between the direction vectors of the center lines of the two pipes for , where d1 is the centerline direction vector of the first of the two pipes, and d2 is the centerline direction vector of the second of the two pipes. is the magnitude of the centerline direction vector of the first pipe, is the magnitude of the centerline direction vector of the second pipe; If the center lines of the two pipes are coplanar: Calculate the cross product of the direction vectors of the center lines of the two pipes: if the modulus of the cross product is less than the set relative error tolerance, and the straight-line distance between the center lines of the two pipes is less than the set threshold, the soft collision is determined to be a coplanar and collinear soft collision; if the modulus of the cross product is less than the set relative error tolerance, and the straight-line distance between the center lines of the two pipes is not less than the set threshold, the soft collision is determined to be a coplanar and parallel soft collision; If the center lines of the two pipes have an intersection, the distance and direction vector from the intersection to the endpoints of the center points of the two pipes are calculated: if the intersection is on the center line of any pipe, the soft collision is determined to be a coplanar internal intersection soft collision; If the center lines of the two pipes have no intersection, calculate the actual shortest distance between the two pipes for ,in is the distance from the intersection point p of the extended lines of the center lines of the two pipes to the first endpoint A of the center line of the first pipe, is the distance from the intersection point p of the extended lines of the center lines of the two pipes to the second endpoint B of the center line of the first pipe, It is the distance from the intersection point p of the extended lines of the center lines of the two pipes to the first endpoint C of the center line of the second pipe. is the distance from the intersection point p of the extension lines of the center lines of the two pipes to the second endpoint D of the center line of the second pipe; if the actual shortest distance between the two pipes If the distance is less than the set minimum allowable distance, the soft collision is determined to be a soft collision of coplanar extension lines; otherwise, it is determined to be other types; (2) Soft collision detection between pipelines and structures: According to the pipe radius Minimum distance from the set pipeline , calculate the pipeline structure soft collision detection threshold for ; Get the shortest distance between the centerline of the pipe and the structure , and the calculated soft collision detection threshold of the pipeline structure For comparison: If the shortest distance between the centerline of the pipeline and the structure Greater than the pipeline structure soft collision detection threshold , it is determined that there is no soft collision between the pipeline and the structure; otherwise, it is determined that there is a soft collision between the pipeline and the structure; Set the soft collision types between pipelines and structures, including pipeline penetrating structure soft collision, pipeline and structure tangent soft collision, and pipeline and structure approach soft collision; For existing soft collisions between pipelines and structures, perform detection of soft collision types between pipelines and structures: If the shortest distance between the centerline of the pipe and the structure If it is 0, and the number of intersections between each face of the structure and the center line of the pipeline is not less than 2, the soft collision between the pipeline and the structure is determined to be a soft collision of the pipeline penetrating the structure; If the shortest distance between the centerline of the pipe and the structure If it is not 0 and the difference with 0 is less than the set value, the soft collision between the pipeline and the structure is determined to be a tangent soft collision between the pipeline and the structure; If the shortest distance between the centerline of the pipe and the structure If it is not 0 and the difference with 0 is greater than or equal to the set value, the soft collision between the pipeline and the structure is judged as a near soft collision between the pipeline and the structure; Among them, the shortest distance between the center line of the pipeline and the structure , use the following steps to obtain: Get the data information of the two end points of the pipeline centerline and each surface of the structure; Traverse the relationship between each face and the center line of the pipeline, and check the intersection of the center line of the pipeline and the face: if there is an intersection, directly determine is 0, and the traversal stops; if there is no intersection, the endpoint of the pipeline centerline is projected onto the current surface, and the minimum value of the distance between the endpoint and the corresponding projection point is taken as the shortest distance between the pipeline centerline and the structure .

[0012] The step S6 specifically includes the following steps: Set pipeline soft crash severity levels to include fatal, severe, moderate, and minor; Detection of the severity of soft collision between pipelines: If the actual shortest distance d between the two pipes is less than 0, or the pipe soft collision detection threshold min is not greater than 0, the severity is determined to be fatal; If the actual shortest distance d between two pipes is not less than 0 and the pipe soft collision detection threshold min is greater than 0, the collision degree ratio between the pipes is calculated as ; For coplanar internal intersection soft collisions and coplanar collinear soft collisions, the severity is determined to be fatal; For non-planar intersection soft collisions, coplanar parallel soft collisions, and coplanar extension line intersection soft collisions, if The severity is considered fatal. The severity is judged as severe. The severity is judged to be medium. The severity is judged to be mild; Detection of the severity of soft collision between pipelines and structures: If the shortest distance between the centerline of the pipe and the structure Less than 0 or the pipe structure soft collision detection threshold If it is not greater than 0, the severity is judged to be fatal; If the shortest distance between the centerline of the pipe and the structure Not less than 0 or the pipeline structure soft collision detection threshold If it is greater than 0, the collision degree between the pipeline and the structure is calculated. for ; For soft collisions of pipeline penetration structures, the severity is determined to be fatal; For tangent soft collision between pipeline and structure, the severity is judged as severe; For pipelines and structures close to soft collision, if The severity is considered fatal. The severity is judged as severe. The severity is judged to be medium. The severity is judged to be mild.

[0013] The present invention also provides a positioning method including the pipeline collision detection method in the BIM model, which also includes the following steps: S7. Perform positioning detection of soft collision of pipelines based on the position information and intersection information of any two pipelines in the plan view or three-dimensional view.

[0014] The step S7 comprises the following steps: Positioning detection of soft collision of pipelines, including plane positioning detection and three-dimensional positioning detection; Planar positioning detection is suitable for checking the layout of the BIM model on the plane and the plane relationship between the buildings; 3D positioning detection is suitable for checking the position relationship of the BIM model in three dimensions and the interaction effect between the buildings; Floor plan positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For the soft collision of skew intersection, the direction vectors of the center lines of the two pipes are projected on the XY plane and cross-calculated to obtain the projection information of the direction vectors of the center lines on the XY plane. The intersection coordinate information of the skew intersection is calculated by the projection information and the starting point coordinates of the center lines of the two pipes. The corresponding floor plane is positioned according to the intersection coordinate information of the skew intersection. 3D image positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For non-planar intersection soft collision, vectors are constructed according to the starting and ending points of the center lines of the two pipes, and the determinant calculation is performed; based on the determinant calculation results, the proportional position of the nearest point on the center lines of the two pipes relative to the starting points of their respective line segments is calculated and normalized, and finally the nearest point on the center lines of the two pipes is calculated based on the normalized proportional position; based on the obtained nearest point on the center lines of the two pipes, the corresponding floor plane is positioned.

[0015] The step S7 specifically includes the following steps: A. Floor plan positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For non-planar cross-collision soft collision: Set P1 to represent the starting point of the center line of the first pipeline, and the corresponding X-axis coordinates and Y-axis coordinates are ; Set P2 to represent the starting point of the center line of the second pipeline, and the corresponding X-axis coordinates and Y-axis coordinates are ; v1 is the direction vector of the center line of the first pipeline, v2 is the direction vector of the center line of the second pipeline; the coordinate of v1 on the X-axis is , the coordinate of v1 on the Y axis is , the coordinate of v2 on the X-axis is , the coordinate of v2 on the Y axis is ; The projection vectors of v1 and v2 on the XY plane are calculated using the following formula: In the formula is the projection vector of v1 on the XY plane; is the projection vector of v2 on the XY plane; The intersection parameter t is calculated using the following formula: In the formula for The Y-axis coordinate of for The X-axis coordinate of for The X-axis coordinate of for The Y-axis coordinate of The following formula is used to calculate the intersection coordinate information of non-planar intersections: In the formula is the X-axis coordinate of the intersection point Q of the skew intersection; is the Y-axis coordinate of the intersection point Q of the skew intersection; is the Z-axis coordinate of the intersection point Q of the skew intersection; According to the coordinate information of the intersection point Q of the non-planar intersection, the corresponding floor plane is located: according to the current active view, the associated elevation is obtained, and the current floor plane is obtained through the elevation; if the elevation cannot be obtained, the default value 0 is returned; B. 3D image positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For non-planar cross-collision soft collision: Set the start endpoint of the centerline of the first pipe to , the termination endpoint is ; The starting endpoint of the centerline of the second pipeline is , the termination endpoint is ; then the first vector Expressed as , the second vector Expressed as , the third vector Expressed as ; Perform determinant calculation and obtain the determinant calculation result D as follows: ; If D is less than the set minimum value, then: The first proportional position sc is 0; like Then the second proportional position tc is , otherwise the second proportional position tc is ; If D is not less than the set minimum value, then: The first proportional position sc is , the second proportional position tc is ; Normalize the first proportional position and the second proportional position to obtain a normalized first proportional position for , normalized second scale position for ; The closest point on the center line of the two pipes is calculated using the following formula: In the formula is the closest point on the centerline of the first pipe; is the closest point on the centerline of the second pipe; according to and , locate the corresponding floor plane: accurately locate on the floor plane through the elevation of the center position between the two nearest points.

[0016] The present invention also provides a system for implementing the pipeline collision detection method in the BIM model, comprising a data acquisition module, a data selection module, a grid division module, a hard collision detection module, a soft collision detection module, a degree detection module and a positioning detection module; the data acquisition module, the data selection module, the grid division module, the hard collision detection module, the soft collision detection module, the degree detection module and the positioning detection module are connected in series in sequence; the data acquisition module is used to acquire data information of the target BIM model, and upload the data information to the data selection module; the data selection module is used to select all pipelines and structural information of a set floor according to the received data information and the acquired data information, and upload the data information to the grid division module; the grid division module is used to grid the selected pipeline based on the received data information and the particle swarm algorithm, and upload the data information Upload hard collision detection module; the hard collision detection module is used to perform hard collision detection of pipelines according to the received data information and the grid division results, using the spatial hash algorithm, and upload the data information to the soft collision detection module; the soft collision detection module is used to perform soft collision detection of pipelines according to the received data information, the position relationship, distance relationship and angle relationship of the center lines of any two pipelines, and upload the data information to the degree detection module; the degree detection module is used to perform soft collision severity detection of pipelines according to the received data information, the shortest distance between the center lines of any two pipelines and the set minimum allowable distance, and upload the data information to the positioning detection module; the positioning detection module is used to perform positioning detection of soft collision of pipelines according to the received data information, the position information and intersection information of any two pipelines in the plane or three-dimensional diagram.

[0017] The pipeline collision detection method, positioning method and system in the BIM model provided by the present invention optimizes pipeline mesh division through a particle swarm optimization algorithm, performs hard collision detection in combination with a hash algorithm, and performs soft collision detection and positioning in combination with the position relationship, distance relationship and angle relationship of the center line of the pipeline. Therefore, the present invention can not only realize the detection and positioning of pipeline collision in the BIM model, but also has higher reliability, better accuracy and higher efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 The figure is a schematic diagram of the method flow of the detection method of the present invention.

[0019] Figure 2 It is a schematic diagram of the method route of the positioning method of the present invention.

[0020] Figure 3 The figure is a schematic diagram of the experimental comparison curve between the method of the present invention and the existing scheme.

[0021] Figure 4 Schematic diagram of the functional modules of the system of the present invention. DETAILED DESCRIPTION

[0022] like Figure 1 The method flow chart of the detection method of the present invention is shown as follows: The pipeline collision detection method in the BIM model disclosed by the present invention comprises the following steps: S1. Obtain data information of the target BIM model.

[0023] S2. Based on the data information obtained in step S1, all pipeline and structure information of the set floor is selected.

[0024] S3. Based on the particle swarm algorithm, meshing the pipeline selected in step S2 is performed; specifically comprising the following steps: Meshing the pipeline selected in step S2; Based on the median and interquartile range of the pipe length list, the ideal grid cell size is calculated using the following formula: Where s is the ideal grid unit size; mid is the median value of the pipeline length list; iqr is the interquartile range of the pipeline length list; The particle swarm optimization algorithm is used to optimize the grid size: During the optimization process, each particle represents a candidate grid size, the search range is set, and the initial velocity is randomly assigned to each particle; In the performance dimension, based on the number of builds, average build area, and average build size, the performance dimension score is calculated using the following formula: In the formula Score the performance dimensions; is the current position of the particle, which is used to indicate the size of the current grid unit; is the average build size, and , a is the grid area, c is the number of constructions; In the quality dimension, the ratio of the mesh size to the minimum size of the component is analyzed, and the quality dimension score is calculated using the following formula: In the formula Rating the quality dimensions; is the minimum size of the component, and , is the maximum value of the component on the X axis, is the minimum value of the component on the X axis, is the maximum value of the component on the Y axis, is the minimum value of the component on the Y axis; In the ideal value dimension, based on the degree of deviation between the current value of the grid and the ideal value of the grid, the ideal value dimension score is calculated using the following formula: Where dev is the relative deviation between the current grid cell size and the ideal grid cell size, and , is the size of the ideal grid cell; The fitness of particles is evaluated by weighted calculation based on scores in three dimensions: performance, quality, and ideal value. Each example records the individual's historical optimal position, and the group shares the global optimal position information, adjusting the particle movement according to the speed and position update formula; The particle speed is updated using the following formula: In the formula is the updated speed of the nth particle; w is the inertia weight; is the speed of the nth particle before updating; is the cognitive parameter; R is the random weight; is the best historical position of the particle; is the position of the nth particle before updating; for social parameters; is the global optimal position of the particle; The particle position is updated using the following formula: In the formula is the position of the nth particle before updating; is the updated speed of the nth particle; t is the unit time; After completing the set number of iterations, the final global optimal position of the particle is used as the final grid size.

[0025] S4. According to the meshing result obtained in step S3, a spatial hash algorithm is used to perform hard collision detection of the pipeline; specifically comprising the following steps: According to the grid division result of step S3, the continuous three-dimensional space is divided into cubic grids; A hash function is used to map the spatial coordinates of pipes or structures in the space into a hash table to achieve fast access and query of spatial objects; According to the divided grids, the pipes or structures in the same grid unit are taken as potential collision pipe targets of a pipe, so as to avoid mutual detection of all pipe elements and greatly improve the detection efficiency. For potential collision elements, the AABB bounding box method is used for detection: if the AABB bounding boxes of pipes and pipes, or pipes and structures intersect, it is determined that there is a hard collision.

[0026] S5. Perform soft collision detection of pipelines according to the position relationship, distance relationship and angle relationship between the center lines of any two pipelines; comprising the following steps: Soft collision detection of pipelines, including soft collision detection between pipelines and soft collision detection between hoses and structures; (1) Soft collision detection between pipelines: According to the radius of any two pipes and the set minimum distance between the two pipes, the pipe soft collision detection threshold is calculated; If the actual shortest distance between the two pipelines is less than the calculated pipeline soft collision detection threshold, it is determined that the two pipelines have a soft collision; otherwise, it is determined that the two pipelines do not have a soft collision; For two pipes with soft collision: If the center lines of the two pipes are not coplanar, the soft collision of the two pipes is directly determined to be a non-coplanar cross soft collision; If the center lines of the two pipes are coplanar: Calculate the cross product of the direction vectors of the center lines of the two pipes, and determine whether the soft collision is a coplanar collinear soft collision or a coplanar parallel soft collision based on the size of the cross product, the set compatible error tolerance, and the straight-line distance between the center lines of the two pipes; If the center lines of the two pipes have an intersection, calculate the distance and direction vector from the intersection to each endpoint; if the intersection is on the center line of any pipe, the soft collision is determined to be a coplanar internal intersection soft collision; If the center lines of the two pipes have no intersection, the actual shortest distance between the two pipes is calculated. If the actual shortest distance between the two pipes is less than the set minimum allowable distance, the soft collision is determined to be a soft collision of coplanar extension lines; otherwise, it is determined to be other types. (2) Soft collision detection between pipelines and structures: According to the pipeline radius and the set minimum distance between pipelines, the pipeline structure soft collision detection threshold is calculated; The shortest distance between the centerline of the pipeline and the structure is obtained, and compared with the calculated soft collision detection threshold of the pipeline structure: if the shortest distance between the centerline of the pipeline and the structure is greater than the soft collision detection threshold of the pipeline structure, it is determined that there is no soft collision between the pipeline and the structure; otherwise, it is determined that there is a soft collision between the pipeline and the structure; For existing soft collisions between pipelines and structures, the soft collision type of pipelines and structures is detected based on the shortest distance between the centerline of the pipeline and the structure and the number of intersections between each face of the structure and the centerline of the pipeline.

[0027] The specific implementation includes the following steps: Soft collision detection of pipelines, including soft collision detection between pipelines and soft collision detection between hoses and structures; (1) Soft collision detection between pipelines: According to the radius r1 and r2 of any two pipes and the minimum distance between the two pipes, the pipe soft collision detection threshold min is calculated as ; If the actual shortest distance d between the two pipelines is less than the calculated pipeline soft collision detection threshold min, it is determined that the two pipelines have a soft collision; otherwise, it is determined that the two pipelines do not have a soft collision; Set the soft collision types between pipelines to include non-planar intersection soft collision, coplanar collinear soft collision, coplanar parallel soft collision, coplanar internal intersection soft collision and coplanar extension line intersection soft collision; If the center lines of the two pipes in soft collision are not coplanar, the soft collision of the two pipes is directly determined to be a non-coplanar cross soft collision; the nearest collision points are set as p1 and p2, and the X-axis coordinate, Y-axis coordinate and Z-axis coordinate of p1 are , the X-axis coordinate, Y-axis coordinate and Z-axis coordinate of p2 are , calculate the actual distance between the two collision points for , calculate the angle between the direction vectors of the center lines of the two pipes for , where d1 is the centerline direction vector of the first of the two pipes, and d2 is the centerline direction vector of the second of the two pipes. is the magnitude of the centerline direction vector of the first pipe, is the magnitude of the centerline direction vector of the second pipe; If the center lines of the two pipes are coplanar: Calculate the cross product of the direction vectors of the center lines of the two pipes: if the modulus of the cross product is less than the set relative error tolerance (preferably 1e-6), and the straight-line distance between the center lines of the two pipes is less than the set threshold, the soft collision is determined to be a coplanar collinear soft collision; if the modulus of the cross product is less than the set relative error tolerance (preferably 1e-6), and the straight-line distance between the center lines of the two pipes is not less than the set threshold, the soft collision is determined to be a coplanar parallel soft collision; If the center lines of the two pipes have an intersection, the distance and direction vector from the intersection to the endpoints of the center points of the two pipes are calculated: if the intersection is on the center line of any pipe, the soft collision is determined to be a coplanar internal intersection soft collision; If the center lines of the two pipes have no intersection, calculate the actual shortest distance between the two pipes for ,in is the distance from the intersection point p of the extended lines of the center lines of the two pipes to the first endpoint A of the center line of the first pipe, is the distance from the intersection point p of the extended lines of the center lines of the two pipes to the second endpoint B of the center line of the first pipe, It is the distance from the intersection point p of the extended lines of the center lines of the two pipes to the first endpoint C of the center line of the second pipe. is the distance from the intersection point p of the extension lines of the center lines of the two pipes to the second endpoint D of the center line of the second pipe; if the actual shortest distance between the two pipes If the distance is less than the set minimum allowable distance, the soft collision is determined to be a soft collision of coplanar extension lines; otherwise, it is determined to be other types; (2) Soft collision detection between pipelines and structures: According to the pipe radius Minimum distance from the set pipeline , calculate the pipeline structure soft collision detection threshold for ; Get the shortest distance between the centerline of the pipe and the structure , and the calculated soft collision detection threshold of the pipeline structure For comparison: If the shortest distance between the centerline of the pipeline and the structure Greater than the pipeline structure soft collision detection threshold , it is determined that there is no soft collision between the pipeline and the structure; otherwise, it is determined that there is a soft collision between the pipeline and the structure; Set the soft collision types between pipelines and structures, including pipeline penetrating structure soft collision, pipeline and structure tangent soft collision, and pipeline and structure approach soft collision; For existing soft collisions between pipelines and structures, perform detection of soft collision types between pipelines and structures: If the shortest distance between the centerline of the pipe and the structure If it is 0, and the number of intersections between each face of the structure and the center line of the pipeline is not less than 2, the soft collision between the pipeline and the structure is determined to be a soft collision of the pipeline penetrating the structure; If the shortest distance between the centerline of the pipe and the structure If it is not 0 and the difference with 0 is less than the set value, the soft collision between the pipeline and the structure is determined to be a tangent soft collision between the pipeline and the structure; If the shortest distance between the centerline of the pipe and the structure If it is not 0 and the difference with 0 is greater than or equal to the set value, the soft collision between the pipeline and the structure is judged as a near soft collision between the pipeline and the structure; Among them, the shortest distance between the center line of the pipeline and the structure , use the following steps to obtain: Get the data information of the two end points of the pipeline centerline and each surface of the structure; Traverse the relationship between each face and the center line of the pipeline, and check the intersection of the center line of the pipeline and the face: if there is an intersection, directly determine is 0, and the traversal stops; if there is no intersection, the endpoint of the pipeline centerline is projected onto the current surface, and the minimum value of the distance between the endpoint and the corresponding projection point is taken as the shortest distance between the pipeline centerline and the structure .

[0028] S6. According to the shortest distance between the center lines of any two pipes and the set minimum allowable distance, the severity of the soft collision of the pipes is detected, thereby completing the detection of pipe collision in the BIM model; specifically, the steps include: Set pipeline soft crash severity levels to include fatal, severe, moderate, and minor; Detection of the severity of soft collision between pipelines: If the actual shortest distance d between the two pipes is less than 0, or the pipe soft collision detection threshold min is not greater than 0, the severity is determined to be fatal; If the actual shortest distance d between two pipes is not less than 0 and the pipe soft collision detection threshold min is greater than 0, the collision degree ratio between the pipes is calculated as ; For coplanar internal intersection soft collisions and coplanar collinear soft collisions, the severity is determined to be fatal; For non-planar intersection soft collisions, coplanar parallel soft collisions, and coplanar extension line intersection soft collisions, if The severity is considered fatal. The severity is considered severe if The severity is judged to be medium. The severity is judged to be mild; Detection of the severity of soft collision between pipelines and structures: If the shortest distance between the centerline of the pipe and the structure Less than 0 or the pipe structure soft collision detection threshold If it is not greater than 0, the severity is judged to be fatal; If the shortest distance between the centerline of the pipe and the structure Not less than 0 or the pipeline structure soft collision detection threshold If it is greater than 0, the collision degree between the pipeline and the structure is calculated. for ; For soft collisions of pipeline penetration structures, the severity is determined to be fatal; For tangent soft collision between pipeline and structure, the severity is judged as severe; For pipelines and structures close to soft collision, if The severity is considered fatal. The severity is judged as severe. The severity is judged to be medium. The severity is judged to be mild.

[0029] like Figure 2 The method flow diagram of the positioning method of the present invention is shown as follows: the positioning method disclosed in the present invention, which includes the pipeline collision detection method in the BIM model, also includes the following steps: S7. Performing positioning detection of soft collision of pipelines according to the position information and intersection information of any two pipelines in the plane or three-dimensional map; comprising the following steps: Positioning detection of soft collision of pipelines, including plane positioning detection and three-dimensional positioning detection; Planar positioning detection is suitable for checking the layout of the BIM model on the plane and the plane relationship between the buildings; 3D positioning detection is suitable for checking the position relationship of the BIM model in three dimensions and the interaction effect between the buildings; Floor plan positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For the soft collision of skew intersection, the direction vectors of the center lines of the two pipes are projected on the XY plane and cross-calculated to obtain the projection information of the direction vectors of the center lines on the XY plane. The intersection coordinate information of the skew intersection is calculated by the projection information and the starting point coordinates of the center lines of the two pipes. The corresponding floor plane is positioned according to the intersection coordinate information of the skew intersection. 3D image positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For non-planar intersection soft collision, vectors are constructed according to the starting and ending points of the center lines of the two pipes, and the determinant calculation is performed; based on the determinant calculation results, the proportional position of the nearest point on the center lines of the two pipes relative to the starting points of their respective line segments is calculated and normalized, and finally the nearest point on the center lines of the two pipes is calculated based on the normalized proportional position; based on the obtained nearest point on the center lines of the two pipes, the corresponding floor plane is positioned.

[0030] The specific implementation includes the following steps: A. Floor plan positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For non-planar cross-collision soft collision: Set P1 to represent the starting point of the center line of the first pipeline, and the corresponding X-axis coordinates and Y-axis coordinates are ; Set P2 to represent the starting point of the center line of the second pipeline, and the corresponding X-axis coordinates and Y-axis coordinates are ; v1 is the direction vector of the center line of the first pipeline, v2 is the direction vector of the center line of the second pipeline; the coordinate of v1 on the X-axis is , the coordinate of v1 on the Y axis is , the coordinate of v2 on the X-axis is , the coordinate of v2 on the Y axis is ; The projection vectors of v1 and v2 on the XY plane are calculated using the following formula: In the formula is the projection vector of v1 on the XY plane; is the projection vector of v2 on the XY plane; The intersection parameter t is calculated using the following formula: In the formula for The Y-axis coordinate of for The X-axis coordinate of for The X-axis coordinate of for The Y-axis coordinate of The following formula is used to calculate the intersection coordinate information of non-planar intersections: In the formula is the X-axis coordinate of the intersection point Q of the skew intersection; is the Y-axis coordinate of the intersection point Q of the skew intersection; is the Z-axis coordinate of the intersection point Q of the skew intersection; According to the coordinate information of the intersection point Q of the non-planar intersection, the corresponding floor plane is located: according to the current active view, the associated elevation is obtained, and the current floor plane is obtained through the elevation; if the elevation cannot be obtained, the default value 0 is returned; B. 3D image positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For non-planar cross-collision soft collision: Set the start endpoint of the centerline of the first pipe to , the termination endpoint is ; The starting endpoint of the centerline of the second pipeline is , the termination endpoint is ; then the first vector Expressed as , the second vector Expressed as , the third vector Expressed as ; Perform determinant calculation and obtain the determinant calculation result D as follows: ; If D is less than the set minimum value, then: The first proportional position sc is 0; like Then the second proportional position tc is , otherwise the second proportional position tc is ; If D is not less than the set minimum value, then: The first proportional position sc is , the second proportional position tc is ; Normalize the first proportional position and the second proportional position to obtain a normalized first proportional position for , normalized second scale position for ; The closest point on the center line of the two pipes is calculated using the following formula: In the formula is the closest point on the centerline of the first pipe; is the closest point on the centerline of the second pipe; according to and , locate the corresponding floor plane: accurately locate on the floor plane through the elevation of the center position between the two nearest points.

[0031] The effect of the method of the present invention is described below in conjunction with an embodiment: The object of this embodiment is the revit model file of the basement negative second floor designed by a construction company. The experimental environment is Revit2020 and Visual Studio2022. The experimental data set is the floor plan in the model, including 24 floor plans, and the model file size is 242.64MB.

[0032] The method of the present invention is compared with the existing original scheme, grid optimization scheme, and spatial hashing scheme: among them, the original scheme is the scheme proposed by Li Changjie et al. in the paper "Pipeline Optimization Method Based on BIM" in 2019; the grid optimization scheme is the scheme proposed by Wang Zhenwen et al. in the paper "Collision Detection Algorithm Based on Topological Space Grid in Complex Scenes" in 2017; the spatial hashing scheme is based on the method proposed by Kyungjin Kang in the paper "Hash-Based Method for Generating Building Information Models From 2D CAD Drawings" in 2024, which applies the hash strategy to 2D drawings to automatically generate 3D models. This scheme applies the hash strategy to 3D space.

[0033] The test results are shown in Table 1, and the comparison curve is shown in Figure 3 As shown;

[0034] Through Table 1 and Figure 3 It can be seen that the four methods obtain the same detection results, but there are great differences in detection time; in the 10 experiments, the detection time of the loop traversal detection method of the original scheme is the highest, with an average value of 4504.10ms; the detection time of the grid optimization method is second, with an average value of 4092.00ms; the spatial hashing method has a great improvement over the first two, the average detection time is reduced to 885.90ms, and the detection results are more stable; and the method of the present invention further reduces the average detection time to 609.00, and further improves the stability of the detection time.

[0035] Therefore, through comparative experiments, it can be known that the scheme of the present invention has greatly improved the average detection time and detection stability compared with the original scheme and the method using the grid optimization scheme and the spatial hashing scheme.

[0036] like Figure 4 The functional module schematic diagram of the system of the present invention is shown as follows: the system for realizing the pipeline collision detection method in the BIM model disclosed by the present invention comprises a data acquisition module, a data selection module, a grid division module, a hard collision detection module, a soft collision detection module, a degree detection module and a positioning detection module; the data acquisition module, the data selection module, the grid division module, the hard collision detection module, the soft collision detection module, the degree detection module and the positioning detection module are connected in series in sequence; the data acquisition module is used to acquire the data information of the target BIM model, and upload the data information to the data selection module; the data selection module is used to select all the pipelines and structural information of the set floor according to the received data information and the acquired data information, and upload the data information to the grid division module; the grid division module is used to grid the selected pipeline according to the received data information based on the particle swarm algorithm The hard collision detection module is used to perform hard collision detection of pipelines according to the received data information and the grid division result, and upload the data information to the soft collision detection module; the soft collision detection module is used to perform soft collision detection of pipelines according to the received data information, the position relationship, distance relationship and angle relationship of the center lines of any two pipelines, and upload the data information to the degree detection module; the degree detection module is used to perform soft collision severity detection of pipelines according to the received data information, the shortest distance between the center lines of any two pipelines and the set minimum allowable distance, and upload the data information to the positioning detection module; the positioning detection module is used to perform positioning detection of soft collision of pipelines according to the received data information, the position information and intersection information of any two pipelines in the plane or three-dimensional diagram.

[0037] In specific implementation, the method or system of the present invention can be formed into a Revit plug-in, so as to be embedded in the Revit software to realize the detection and location of collisions. In addition, a corresponding visualization module can be added to the plug-in to display the collision detection and location results and special markings.

Claims

1. A pipeline collision detection method in a BIM model, characterized in that The steps include: S1. Obtain data information of the target BIM model; S2. According to the data information obtained in step S1, all pipelines and structural information of the set floor are selected; S3. Based on the particle swarm algorithm, meshing the pipeline selected in step S2; S4. According to the meshing result obtained in step S3, a spatial hash algorithm is used to perform hard collision detection of the pipeline; S5. Perform soft collision detection of pipelines based on the position relationship, distance relationship and angle relationship between the center lines of any two pipelines; S6. According to the shortest distance between the center lines of any two pipes and the set minimum allowable distance, the severity of the soft collision of the pipes is detected, thereby completing the detection of pipe collision in the BIM model.

2. The pipeline collision detection method in the BIM model according to claim 1 is characterized in that The step S3 specifically includes the following steps: Meshing the pipeline selected in step S2; Based on the median and interquartile range of the pipe length list, the ideal grid cell size is calculated using the following formula: Where s is the ideal grid unit size; mid is the median value of the pipeline length list; iqr is the interquartile range of the pipeline length list; The particle swarm optimization algorithm is used to optimize the grid size: During the optimization process, each particle represents a candidate grid size, the search range is set, and the initial velocity is randomly assigned to each particle; In the performance dimension, based on the number of builds, average build area, and average build size, the performance dimension score is calculated using the following formula: In the formula Score the performance dimensions; is the current position of the particle, which is used to indicate the size of the current grid unit; is the average build size, and , a is the grid area, c is the number of constructions; In the quality dimension, the ratio of the mesh size to the minimum size of the component is analyzed, and the quality dimension score is calculated using the following formula: In the formula Rating the quality dimensions; is the minimum size of the component, and , is the maximum value of the component on the X axis, is the minimum value of the component on the X axis, is the maximum value of the component on the Y axis, is the minimum value of the component on the Y axis; In the ideal value dimension, based on the degree of deviation between the current value of the grid and the ideal value of the grid, the ideal value dimension score is calculated using the following formula: Where dev is the relative deviation between the current grid cell size and the ideal grid cell size, and , is the size of the ideal grid cell; The fitness of particles is evaluated by weighted calculation based on scores in three dimensions: performance, quality, and ideal value. The particle speed is updated using the following formula: In the formula is the updated speed of the nth particle; w is the inertia weight; is the speed of the nth particle before updating; is the cognitive parameter; R is the random weight; is the best historical position of the particle; is the position of the nth particle before updating; for social parameters; is the global optimal position of the particle; The particle position is updated using the following formula: In the formula is the position of the nth particle before updating; is the updated speed of the nth particle; t is the unit time; After completing the set number of iterations, the final global optimal position of the particle is used as the final grid size.

3. The pipeline collision detection method in the BIM model according to claim 2 is characterized in that The step S4 specifically comprises the following steps: According to the grid division result of step S3, the continuous three-dimensional space is divided into cubic grids; A hash function is used to map the spatial coordinates of pipes or structures in the space into a hash table to achieve fast access and query of spatial objects; According to the divided grids, the pipes or structures in the same grid unit are regarded as potential collision pipe targets of a pipe. The AABB bounding box method is used to detect potential collision elements: if the AABB bounding boxes of pipes and pipes, or pipes and structures intersect, it is determined that a hard collision exists.

4. The pipeline collision detection method in the BIM model according to claim 3 is characterized in that The step S5 comprises the following steps: Soft collision detection of pipelines, including soft collision detection between pipelines and soft collision detection between hoses and structures; (1) Soft collision detection between pipelines: According to the radius of any two pipes and the set minimum distance between the two pipes, the pipe soft collision detection threshold is calculated; If the actual shortest distance between the two pipelines is less than the calculated pipeline soft collision detection threshold, it is determined that the two pipelines have a soft collision; otherwise, it is determined that the two pipelines do not have a soft collision; For two pipes with soft collision: If the center lines of the two pipes are not coplanar, the soft collision of the two pipes is directly determined to be a non-coplanar cross soft collision; If the center lines of the two pipes are coplanar: Calculate the cross product of the direction vectors of the center lines of the two pipes, and determine whether the soft collision is a coplanar collinear soft collision or a coplanar parallel soft collision based on the size of the cross product, the set compatible error tolerance, and the straight-line distance between the center lines of the two pipes; If the center lines of the two pipes have an intersection, calculate the distance and direction vector from the intersection to each endpoint; if the intersection is on the center line of any pipe, the soft collision is determined to be a coplanar internal intersection soft collision; If the center lines of the two pipes have no intersection, the actual shortest distance between the two pipes is calculated. If the actual shortest distance between the two pipes is less than the set minimum allowable distance, the soft collision is determined to be a soft collision of coplanar extension lines; otherwise, it is determined to be other types. (2) Soft collision detection between pipelines and structures: According to the pipeline radius and the set minimum distance between pipelines, the pipeline structure soft collision detection threshold is calculated; The shortest distance between the centerline of the pipeline and the structure is obtained, and compared with the calculated soft collision detection threshold of the pipeline structure: if the shortest distance between the centerline of the pipeline and the structure is greater than the soft collision detection threshold of the pipeline structure, it is determined that there is no soft collision between the pipeline and the structure; otherwise, it is determined that there is a soft collision between the pipeline and the structure; For existing soft collisions between pipelines and structures, the soft collision type of pipelines and structures is detected based on the shortest distance between the centerline of the pipeline and the structure and the number of intersections between each face of the structure and the centerline of the pipeline.

5. The pipeline collision detection method in the BIM model according to claim 4 is characterized in that The step S5 specifically includes the following steps: Soft collision detection of pipelines, including soft collision detection between pipelines and soft collision detection between hoses and structures; (1) Soft collision detection between pipelines: According to the radius r1 and r2 of any two pipes and the minimum distance between the two pipes, the pipe soft collision detection threshold min is calculated as ; If the actual shortest distance d between the two pipelines is less than the calculated pipeline soft collision detection threshold min, it is determined that the two pipelines have a soft collision; otherwise, it is determined that the two pipelines do not have a soft collision; Set the soft collision types between pipelines to include non-planar intersection soft collision, coplanar collinear soft collision, coplanar parallel soft collision, coplanar internal intersection soft collision and coplanar extension line intersection soft collision; If the center lines of the two pipes in soft collision are not coplanar, the soft collision of the two pipes is directly determined to be a non-coplanar cross soft collision; the nearest collision points are set as p1 and p2, and the X-axis coordinate, Y-axis coordinate and Z-axis coordinate of p1 are , the X-axis coordinate, Y-axis coordinate and Z-axis coordinate of p2 are , calculate the actual distance between the two collision points for , calculate the angle between the direction vectors of the center lines of the two pipes for , where d1 is the centerline direction vector of the first of the two pipes, and d2 is the centerline direction vector of the second of the two pipes. is the magnitude of the centerline direction vector of the first pipe, is the magnitude of the centerline direction vector of the second pipe; If the center lines of the two pipes are coplanar: Calculate the cross product of the direction vectors of the center lines of the two pipes: if the modulus of the cross product is less than the set relative error tolerance, and the straight-line distance between the center lines of the two pipes is less than the set threshold, the soft collision is determined to be a coplanar and collinear soft collision; if the modulus of the cross product is less than the set relative error tolerance, and the straight-line distance between the center lines of the two pipes is not less than the set threshold, the soft collision is determined to be a coplanar and parallel soft collision; If the center lines of the two pipes have an intersection, the distance and direction vector from the intersection to the endpoints of the center points of the two pipes are calculated: if the intersection is on the center line of any pipe, the soft collision is determined to be a coplanar internal intersection soft collision; If the center lines of the two pipes have no intersection, calculate the actual shortest distance between the two pipes for ,in is the distance from the intersection point p of the extended lines of the center lines of the two pipes to the first endpoint A of the center line of the first pipe, is the distance from the intersection point p of the extended lines of the center lines of the two pipes to the second endpoint B of the center line of the first pipe, It is the distance from the intersection point p of the extended lines of the center lines of the two pipes to the first endpoint C of the center line of the second pipe. is the distance from the intersection point p of the extension lines of the center lines of the two pipes to the second endpoint D of the center line of the second pipe; if the actual shortest distance between the two pipes If the distance is less than the set minimum allowable distance, the soft collision is determined to be a soft collision of coplanar extension lines; otherwise, it is determined to be other types; (2) Soft collision detection between pipelines and structures: According to the pipe radius Minimum distance from the set pipeline , calculate the pipeline structure soft collision detection threshold for ; Get the shortest distance between the centerline of the pipe and the structure , and the calculated soft collision detection threshold of the pipeline structure For comparison: If the shortest distance between the centerline of the pipeline and the structure Greater than the pipeline structure soft collision detection threshold , it is determined that there is no soft collision between the pipeline and the structure; otherwise, it is determined that there is a soft collision between the pipeline and the structure; Set the soft collision types between pipelines and structures, including pipeline penetrating structure soft collision, pipeline and structure tangent soft collision, and pipeline and structure approach soft collision; For existing soft collisions between pipelines and structures, perform detection of soft collision types between pipelines and structures: If the shortest distance between the centerline of the pipe and the structure If it is 0, and the number of intersections between each face of the structure and the center line of the pipeline is not less than 2, the soft collision between the pipeline and the structure is determined to be a soft collision of the pipeline penetrating the structure; If the shortest distance between the centerline of the pipe and the structure If it is not 0 and the difference with 0 is less than the set value, the soft collision between the pipeline and the structure is determined to be a tangent soft collision between the pipeline and the structure; If the shortest distance between the centerline of the pipe and the structure If it is not 0 and the difference with 0 is greater than or equal to the set value, the soft collision between the pipeline and the structure is judged as a near soft collision between the pipeline and the structure; Among them, the shortest distance between the center line of the pipeline and the structure , use the following steps to obtain: Get the data information of the two end points of the pipeline centerline and each surface of the structure; Traverse the relationship between each face and the center line of the pipeline, and check the intersection of the center line of the pipeline and the face: if there is an intersection, directly determine is 0, and the traversal stops; if there is no intersection, the endpoint of the pipeline centerline is projected onto the current surface, and the minimum value of the distance between the endpoint and the corresponding projection point is taken as the shortest distance between the pipeline centerline and the structure .

6. The pipeline collision detection method in the BIM model according to claim 5 is characterized in that The step S6 specifically includes the following steps: Set pipeline soft crash severity levels to include fatal, severe, moderate, and minor; Detection of the severity of soft collision between pipelines: If the actual shortest distance d between the two pipes is less than 0, or the pipe soft collision detection threshold min is not greater than 0, the severity is determined to be fatal; If the actual shortest distance d between two pipes is not less than 0 and the pipe soft collision detection threshold min is greater than 0, the collision degree ratio between the pipes is calculated as ; For coplanar internal intersection soft collisions and coplanar collinear soft collisions, the severity is determined to be fatal; For non-planar intersection soft collisions, coplanar parallel soft collisions, and coplanar extension line intersection soft collisions, if The severity is considered fatal. The severity is considered severe if The severity is judged to be medium. The severity is judged to be mild; Detection of the severity of soft collision between pipelines and structures: If the shortest distance between the centerline of the pipe and the structure Less than 0 or the pipe structure soft collision detection threshold If it is not greater than 0, the severity is judged to be fatal; If the shortest distance between the centerline of the pipe and the structure Not less than 0 or the pipeline structure soft collision detection threshold If it is greater than 0, the collision degree between the pipeline and the structure is calculated. for ; For soft collisions of pipeline penetration structures, the severity is judged to be fatal; For tangent soft collision between pipeline and structure, the severity is judged as severe; For pipelines and structures close to soft collision, if The severity is considered fatal. The severity is considered severe if The severity is judged to be medium. The severity is judged to be mild.

7. A positioning method for pipeline collision detection in a BIM model including the method described in any one of claims 1 to 6, characterized in that The following steps are also included: S7. Perform positioning detection of soft collision of pipelines based on the position information and intersection information of any two pipelines in the plan view or three-dimensional view.

8. The positioning method according to claim 7, characterized in that The step S7 comprises the following steps: Positioning detection of soft collision of pipelines, including plane positioning detection and three-dimensional positioning detection; Planar positioning detection is suitable for checking the layout of the BIM model on the plane and the plane relationship between the buildings; 3D positioning detection is suitable for checking the position relationship of the BIM model in three dimensions and the interaction effect between the buildings; Floor plan positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For the soft collision of skew intersection, the direction vectors of the center lines of the two pipes are projected on the XY plane and cross-calculated to obtain the projection information of the direction vectors of the center lines on the XY plane. The intersection coordinate information of the skew intersection is calculated by the projection information and the starting point coordinates of the center lines of the two pipes. The corresponding floor plane is positioned according to the intersection coordinate information of the skew intersection. 3D image positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For non-planar intersection soft collision, vectors are constructed according to the starting and ending points of the center lines of the two pipes, and the determinant calculation is performed; based on the determinant calculation results, the proportional position of the nearest point on the center lines of the two pipes relative to the starting points of their respective line segments is calculated and normalized, and finally the nearest point on the center lines of the two pipes is calculated based on the normalized proportional position; based on the obtained nearest point on the center lines of the two pipes, the corresponding floor plane is positioned.

9. The positioning method according to claim 8, characterized in that The step S7 specifically includes the following steps: A. Floor plan positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For non-planar cross-collision soft collision: Set P1 to represent the starting point of the center line of the first pipeline, and the corresponding X-axis coordinates and Y-axis coordinates are ; Set P2 to represent the starting point of the center line of the second pipeline, and the corresponding X-axis coordinates and Y-axis coordinates are ; v1 is the direction vector of the center line of the first pipeline, v2 is the direction vector of the center line of the second pipeline; the coordinate of v1 on the X-axis is , the coordinate of v1 on the Y axis is , the coordinate of v2 on the X-axis is , the coordinate of v2 on the Y axis is ; The projection vectors of v1 and v2 on the XY plane are calculated using the following formula: In the formula is the projection vector of v1 on the XY plane; is the projection vector of v2 on the XY plane; The intersection parameter t is calculated using the following formula: In the formula for The Y-axis coordinate of for The X-axis coordinate of for The X-axis coordinate of for The Y-axis coordinate of The following formula is used to calculate the intersection coordinate information of non-planar intersections: In the formula is the X-axis coordinate of the intersection point Q of the skew intersection; is the Y-axis coordinate of the intersection point Q of the skew intersection; is the Z-axis coordinate of the intersection point Q of the skew intersection; According to the coordinate information of the intersection point Q of the non-planar intersection, the corresponding floor plane is located: according to the current active view, the associated elevation is obtained, and the current floor plane is obtained through the elevation; if the elevation cannot be obtained, the default value 0 is returned; B. 3D image positioning detection: For other soft collisions other than cross-plane soft collisions, directly obtain the corresponding collision point coordinates; directly locate the corresponding floor plane according to the Z-axis coordinates of the collision point coordinates; For non-planar cross-collision soft collision: Set the start endpoint of the centerline of the first pipe to , the termination endpoint is ; The starting endpoint of the centerline of the second pipe is , the termination endpoint is ; then the first vector Expressed as , the second vector Expressed as , the third vector Expressed as ; Perform determinant calculation and obtain the determinant calculation result D as follows: ; If D is less than the set minimum value, then: The first proportional position sc is 0; like Then the second proportional position tc is , otherwise the second proportional position tc is ; If D is not less than the set minimum value, then: The first proportional position sc is , the second proportional position tc is ; Normalize the first proportional position and the second proportional position to obtain a normalized first proportional position for , normalized second scale position for ; The closest point on the center line of the two pipes is calculated using the following formula: In the formula is the closest point on the centerline of the first pipe; is the closest point on the centerline of the second pipe; according to and , locate the corresponding floor plane: accurately locate on the floor plane through the elevation of the center position between the two nearest points.

10. A system for implementing the pipeline collision detection method in a BIM model according to any one of claims 1 to 9, characterized in that It includes a data acquisition module, a data selection module, a grid division module, a hard collision detection module, a soft collision detection module, a degree detection module and a positioning detection module; the data acquisition module, the data selection module, the grid division module, the hard collision detection module, the soft collision detection module, the degree detection module and the positioning detection module are connected in series in sequence; the data acquisition module is used to obtain the data information of the target BIM model, and upload the data information to the data selection module; The data selection module is used to select all pipeline and structure information of a set floor according to the received data information and upload the data information to the grid division module; The grid division module is used to grid the selected pipeline based on the particle swarm algorithm according to the received data information, and upload the data information to the hard collision detection module; the hard collision detection module is used to perform hard collision detection of the pipeline using the spatial hash algorithm according to the received data information and the grid division result, and upload the data information to the soft collision detection module; the soft collision detection module is used to perform soft collision detection of the pipeline according to the received data information and the position relationship, distance relationship and angle relationship between the center lines of any two pipelines, and upload the data information to the degree detection module; The degree detection module is used to detect the severity of soft collision of pipelines according to the received data information, the shortest distance between the center lines of any two pipelines and the set minimum allowable distance, and upload the data information to the positioning detection module; the positioning detection module is used to perform positioning detection of soft collision of pipelines according to the received data information, the position information and intersection information of any two pipelines in the plane or three-dimensional diagram.

Citation Information

Patent Citations

  • Pipeline integrated optimization method based on BIM

    CN106202831A

  • Municipal pipeline construction method based on BIM technology

    CN110889160A

  • Grid and bounding box-based collision detection method

    CN112669434A

  • Feature-based spatial hash continuous collision detection method

    CN112802203A

Cited By

  • Electromechanical pipeline collaborative arrangement method and system

    CN121787030A

  • Method and system for collaborative arrangement of mechanical and electrical pipelines

    CN121787030B