Method and system for collaborative arrangement of mechanical and electrical pipelines
By using a non-uniform octree structure and optimization algorithm, the problem of efficient collaborative layout of electromechanical pipelines in building engineering is solved, and the automated detection and optimization of hard and soft collisions are realized, thereby improving the efficiency and quality of building design.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTR FIFTH ENG DIV CORP LTD
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies are inefficient in the layout of electromechanical pipelines in building engineering, and pipeline collisions are prone to occur. In particular, it is difficult to achieve efficient automated detection and optimization of the coordinated layout of pipelines of multiple disciplines and systems in a limited space. Moreover, existing detection methods are unable to identify soft collision problems in installation and operation space and maintenance and repair space.
A non-uniform octree structure is used to efficiently partition the building space. Combining the pipeline center axis with the minimum circumscribed column model, the collision type is determined by hard collision and soft collision monitoring modules. A layout cost function is constructed, and simulated annealing or particle swarm optimization algorithm is used to adjust the pipeline position to eliminate collisions. The resulting 3D model is output after collaborative layout.
It improves the computational efficiency of pipeline data processing and collision detection, realizes automated collaborative layout of pipelines from multiple disciplines, reduces the risk of construction rework, and improves design quality and efficiency.
Smart Images

Figure CN121787030B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of pipeline layout, and in particular relates to a method and system for the coordinated layout of electromechanical pipelines. Background Technology
[0002] In modern building engineering, the number of various equipment is increasing, such as HVAC, water supply and drainage, electrical, and fire protection systems, leading to increasingly complex and densely packed mechanical and electrical pipelines. Within limited building spaces, such as ceilings, pipe shafts, and equipment floors, pipelines from multiple disciplines and systems need to be arranged collaboratively while meeting their respective functional and regulatory requirements to avoid spatial conflicts and ensure ease of installation and maintenance. Current mechanical and electrical design mainly relies on two-dimensional drawings and the designer's personal experience for manual coordination, which is inefficient and prone to numerous pipeline collision problems due to limitations in spatial imagination. These problems are often only discovered during the construction phase, leading to frequent design changes, material waste, and construction delays. In recent years, the widespread application of Building Information Modeling (BIM) technology, through 3D visualization modeling, has made automated clash detection possible during the design phase. This, to some extent, exposes pipeline conflicts in advance, reducing construction rework.
[0003] Mainstream software typically employs traversal-based pairwise detection algorithms. When the building model is large and the number of pipelines is numerous, the computational load is high, and the detection efficiency cannot meet the needs of rapid iterative design. Moreover, existing detection methods mainly focus on detecting "hard collisions" where pipeline entities directly intersect. However, their ability to identify "soft collisions"—such as installation and operation space, maintenance and repair space, or insulation layer thickness—is very limited. They still require manual setting of complex rules or verification, which is prone to oversights. Summary of the Invention
[0004] To address the above problems, in a first aspect of the present invention, a method for the coordinated layout of electromechanical pipelines is proposed, comprising:
[0005] Based on the input 3D building model and the geometric and semantic information of various professional electromechanical pipelines, the space is divided into a non-uniform octree structure, and the central axis vector and minimum circumscribed column of each pipeline are extracted.
[0006] Within the same leaf node or adjacent leaf nodes of the octree, calculate the distance between the nearest common perpendicular segments between the central axis vectors of any two pipelines. When the distance is less than or equal to the sum of the radii of the minimum circumscribed cylinders of the two pipelines, it is determined that a hard collision exists.
[0007] For pipelines with high priority or gravity slope constraints, a discretized directed distance field covering the pipeline safety distance is generated, and the field value of the directed distance field is queried at key points on the surface of other pipelines to be arranged to determine whether there is a soft collision.
[0008] When a hard or soft collision is identified, a layout cost function is constructed based on the collision type, the professional attributes of the pipeline involved, and the estimated increase in pipe sections and fittings to eliminate the collision.
[0009] Using the layout cost function as the optimization objective, simulated annealing or particle swarm optimization algorithms are used to solve the adjustment vector of each pipeline and iteratively update its position until all collisions are eliminated, and the three-dimensional model of the pipeline after collaborative layout is output.
[0010] In a second aspect of the invention, an electromechanical pipeline collaborative layout system is proposed, comprising the following modules:
[0011] The segmentation module is used to divide the space into a non-uniform octree structure based on the geometric and semantic information of the input 3D building model and the electromechanical pipelines of various disciplines, and to extract the central axis vector and minimum circumscribed column of each pipeline.
[0012] The hard collision detection module is used to calculate the distance between the nearest common perpendicular segments between the central axis vectors of any two pipelines within the same leaf node or adjacent leaf nodes of the octree. When the distance is less than or equal to the sum of the radii of the minimum circumscribed cylinders of the two pipelines, a hard collision is determined to exist.
[0013] The soft collision monitoring module is used to generate a discretized directed distance field covering the safety distance of pipelines with high priority or gravity slope constraints, and to determine whether a soft collision exists by querying the field value of the directed distance field at key points on the surface of other pipelines to be arranged.
[0014] The function building module is used to construct a layout cost function based on the collision type, the professional attributes of the pipeline involved, and the estimated increase in pipe segments and fittings to eliminate the collision when a hard or soft collision is detected.
[0015] The optimization module is used to take the layout cost function as the optimization objective, use simulated annealing or particle swarm optimization algorithm to solve the adjustment vector of each pipeline and iteratively update its position until all collisions are eliminated, and output the three-dimensional model of the pipeline after cooperative layout.
[0016] This invention efficiently partitions building space using a non-uniform octree structure and improves the computational efficiency of large-scale pipeline data processing and collision detection by combining a simplified model of pipeline central axes and minimum circumscribed columns. By incorporating complex professional specifications such as high priority and gravity slope into the soft collision judgment scope through a directed distance field, collision analysis becomes more aligned with actual engineering needs. Furthermore, the layout cost function is calculated by combining collision type, professional attributes, and economic costs, providing professional guidance for the optimization process. This improves automation, quality, and efficiency, avoids the blindness of manual adjustments, and reduces the risk of rework in later construction. Attached Figure Description
[0017] Figure 1 This is a flowchart of a specific embodiment one;
[0018] Figure 2 This is a schematic diagram of the total cost function;
[0019] Figure 3 A schematic diagram for optimizing the layout of front electromechanical pipelines;
[0020] Figure 4 This is a schematic diagram of the optimized electromechanical pipeline layout. Detailed Implementation
[0021] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples. Specific Implementation Example 1
[0023] See Figure 1 This invention proposes a method for the coordinated layout of electromechanical pipelines, including:
[0024] Step 1: Based on the input 3D building model and the geometric and semantic information of various professional electromechanical pipelines, the space is divided into a non-uniform octree structure, and the central axis vector and minimum circumscribed column of each pipeline are extracted.
[0025] The system reads 3D building model files in IFC or RVT format, parses the geometric information of building components such as walls, slabs, beams, and columns, and obtains semantic information such as geometry, outer diameter, system type, and material of various mechanical and electrical pipelines, such as HVAC ducts, water supply and drainage pipes, and cable trays. The minimum axis-aligned bounding box of the entire building model is calculated as the root node of the octree. The root node is recursively partitioned. If the number of pipeline entities contained in a node space exceeds a preset threshold (e.g., 8) or the node size exceeds the minimum resolution (e.g., 100 mm), it is uniformly partitioned into eight child nodes. This process continues until all leaf nodes meet the partitioning termination condition, resulting in a non-uniform octree. For each straight pipeline segment, the difference between its start and end coordinates is the central axis vector; for fittings such as elbows or tees, the central axis vector is extracted segment by segment. The minimum circumscribed column of the pipeline is determined by its central axis as the axis, half the actual outer diameter of the pipeline as the radius, and the length of the central axis as the height. The collision detection of complex irregular pipelines, such as rectangular ducts after rotation, is simplified to a comparison of "the sum of the axial distance and the radius". This avoids the tedious split axis theorem calculations when dealing with OBBs. At the same time, the redundant space naturally formed by the circumscribed cylinder can be directly used as a reserved space for construction tolerance, flange protrusions or insulation layers, reducing the computational power consumption when performing pairwise pairwise detection in large-scale pipeline scenarios and preventing the algorithm from getting stuck.
[0026] In one embodiment, the semantic attributes of the pipeline are obtained using IfcOpenShell or a specific BIM interface. The center axis vector of each pipe segment and the parameterized minimum bounding box (OBB) are extracted using OCCT's B-Rep (boundary representation) geometry processing module, such as the BRepBndLib package. The extracted bounding box center or boundary vertex can be input into open3d.geometry.Octree. By rewriting the node splitting conditions, a non-uniform octree space partition that meets the algorithm requirements can be quickly achieved.
[0027] Step 2: In the same leaf node or adjacent leaf nodes of the octree, calculate the distance between the nearest common perpendicular segments between the center axis vectors of any two pipelines. When the distance is less than or equal to the sum of the radii of the minimum circumscribed cylinders of the two pipelines, it is determined that a hard collision exists.
[0028] Traverse each leaf node of the octree, pairing all pipelines within that leaf node with all pipelines within its 26 adjacent leaf nodes. For any pair of pipelines, their central axis vectors are L1 and L2, respectively. Let the equation of L1 be P1 = A + t × u, and the equation of L2 be P2 = B + s × v, where A and B are the starting points, and u and v are the direction vectors. By solving the system of equations, find the parameters t and s that minimize the distance between P1 and P2; this distance is the nearest common perpendicular distance d. For example, cross-product the two vectors to obtain the direction of the common perpendicular n, and then calculate the projection length of the line AB connecting the starting points of the two segments in the direction n, which is d. Then obtain the radii r1 and r2 of the two pipelines. If the calculated distance d is less than or equal to the sum of r1 and r2, record that the two pipelines have a hard collision, and record its collision depth, i.e., the value of r1 + r2 - d. Furthermore, it is determined whether the common perpendicular of the infinitely long straight lines containing the two line segments is within the range of the line segments. If not, the shortest distance from the two endpoints of one line segment to the other line segment is traversed, and the minimum value among all calculation results is taken as the final distance. This ensures that parallel but misaligned pipelines are not misjudged as hard collisions.
[0029] Step 3: For pipelines with high priority or gravity slope constraints, generate a discretized directed distance field covering the pipeline safety distance, and determine whether there is a soft collision by querying the field value of the directed distance field at key points on the surface of other pipelines to be arranged.
[0030] Large main air ducts or gravity drainage pipes are selected as high-priority pipelines. A 3D voxel mesh is created around them, covering the outer surface of the pipeline entity and extending outwards by a preset safety distance, such as 500 mm. The mesh resolution is set to 50 mm. For each voxel center point in the mesh, the shortest distance from it to the high-priority pipeline and its safety envelope surface is calculated. If the point is outside the envelope, the distance value is positive; if it is inside, the distance value is negative; if it is exactly on the surface, the distance value is zero. The distance values of all voxels together constitute a discretized directed distance field. Next, for other ordinary pipelines to be arranged, a series of key points are sampled on their outer surface. For example, a cross-sectional circle is taken every 200 mm along the pipeline length, and 8 points are taken at equal angles on each circle. The 3D coordinates of each key point are obtained, and the corresponding field value is queried in the generated directed distance field. The accurate value can be obtained through trilinear interpolation. If any queried field value is less than or equal to zero, it is determined that there is a soft collision between the ordinary pipeline and the high-priority pipeline. In an optional embodiment, OpenVDB, an industry-grade standard library for efficiently processing sparse volumetric data, is used when generating the discretized directed distance field for the safety spacing of the covered pipelines. OpenVDB employs a hierarchical tree data structure (VDB tree), which can efficiently convert the 3D outer surface mesh of high-priority / gravity pipelines into a sparse SDF 3D raster with field values using its built-in tools::meshToVolume or tools::LevelSet functions.
[0031] For common pipelines such as electrical branch conduits and small-diameter water pipes, a geometric bounding box expansion method is adopted. This involves virtually expanding the collision detection bounding box (AABB or OBB) of these pipelines based on the required installation and maintenance clearances during the octree collision detection stage. This allows the original hard collision detection method to directly cover the soft collision requirements between these pipelines and between them and higher-priority pipelines, thereby reducing computational costs while ensuring all pipelines meet safety clearance constraints. In some embodiments, soft collision intrusion and material adjustment costs are only calculated in the solution space where hard collision costs are zero. This ensures that the optimal solution ultimately converged by the algorithm is first and foremost a feasible solution without clipping.
[0032] Step 4: When a hard or soft collision is identified, a layout cost function is constructed based on the collision type, the professional attributes of the pipeline involved, and the estimated increase in pipe sections and fittings to eliminate the collision.
[0033] In one embodiment, the cost function includes hard collision cost, soft collision cost, and adjustment cost. The hard collision cost equals the sum of the collision depths of all hard collision pairs multiplied by a large weighting coefficient, such as 100. The soft collision cost equals the sum of the intrusion distances (i.e., the absolute values of the negative field values) of all soft collision critical points multiplied by a medium weighting coefficient, such as 50. The adjustment cost is specifically determined by setting an adjustment difficulty coefficient based on the pipeline's professional attributes, for example, 10 for main air ducts, 8 for fire protection pipes, 5 for ordinary water pipes, and 3 for cable trays. An estimated adjustment scheme is proposed, such as horizontal relocation or using two 45-degree bends for detour. The increased pipe section length and number of fittings are calculated, multiplied by the corresponding material unit price and difficulty coefficient, to obtain the economic and construction costs of the adjustment. See also Figure 2 In some embodiments, the construction of the layout cost function based on the collision type, the professional attributes of the pipeline involved, and the estimated increase in pipe segments and fittings to eliminate the collision includes:
[0034] The layout cost function is a weighted sum of all cost factors, expressed as:
[0035] in, The sum of the normalized penalty scores for all hard collisions. This is the sum of the normalized penalty scores for all soft collisions. The total length added to the pipe section, For the total number of pipe fittings added, , These are the severity weighting coefficients for hard and soft collisions, respectively, and are dimensionless. This is the length penalty factor, expressed in cost per meter. Penalty factor for a single pipe, per unit cost; penalty value for a single collision. or The determination is based on the professional attributes, size, or priority of the pipelines involved.
[0036] For hard collisions, the total penalty value is obtained by summing the penalties of all collision events. The penalty value for a single collision... The penalty is dynamically set based on the overlap volume of the colliding objects, the depth of intrusion, and the pipeline's professional attributes. For example, a penalty of 5000 is set for a high-severity collision, such as a DN400 duct colliding with a structural beam, while a penalty of 200 is set for a low-severity collision, such as the intersection of two DN25 cable trays, to guide the algorithm to prioritize resolving severe conflicts. For soft collisions, the total penalty value is calculated similarly, and the penalty value is proportional to the depth of the intrusion safety clearance. For example, the penalty value is 50 for a 10mm intrusion, and increases to 300 for a 50mm intrusion. Simultaneously, the generalized cost of economic benefits resulting from path adjustments is calculated: the total increase in pipe segment length is the difference between the current and initial schemes, in meters; the total increase in pipe fittings is the number of newly added elbows, tees, and other components, in units. In one embodiment, a priority weight lookup table is pre-established, which includes different disciplines (HVAC, water supply and drainage, electrical) and pipeline functions (gravity flow, pressure flow). The basic score is set according to the principle of gravity pipe > large air duct > large water pipe > cable tray > small pipe. When calculating the specific collision penalty value, the basic weight of the pipeline involved is extracted and multiplied by its geometric size coefficient, such as pipe diameter or cross-sectional area. The larger the size, the heavier the penalty to avoid its movement. The collision severity coefficient is also calculated. Hard collisions are given a high fixed value, while soft collisions vary linearly with the intrusion depth. A quantitative value is obtained, which forces the optimization algorithm to prioritize the retention of high-priority and high-installation-difficulty pipelines in the iteration, while sacrificing the position of low-priority pipelines.
[0037] Weights and conversion factors are set according to engineering objectives: To establish the absolute priority of "no collisions," the weight of hard collisions is... Set to a large value, such as 1000, for soft collision weights. Set it to a moderate value, such as 200; to reflect cost constraints, set the length penalty factor. Set to 5, unit: cost / meter, fitting penalty factor. Set to 50, with the unit being cost per unit. Taking this parameter as an example, if the current plan has one severe hard collision with a score of 5000, two soft collisions with scores of 50 and 300 respectively, the total pipeline length increases by 2.1 meters, and 3 new bends are added, then the total layout cost is 5070160.5.
[0038] Step 5: Using the layout cost function as the optimization objective, simulated annealing or particle swarm optimization algorithms are used to solve the adjustment vector of each pipeline and iteratively update its position until all collisions are eliminated, and output the three-dimensional model of the pipeline after collaborative layout.
[0039] The preferred algorithm is Particle Swarm Optimization (PSO). Each collided pipeline is considered a variable to be optimized. Each particle represents a possible solution, and its position is a multi-dimensional vector, where each dimension corresponds to the displacement of a pipeline in the x, y, and z directions. A population of N particles is initialized, with each particle's initial position and velocity being random values. In each iteration, for each pipeline layout scheme represented by a particle, the total layout cost function is calculated using the aforementioned steps. Based on this cost value, the individual optimal position of each particle and the global optimal position of the entire population are updated. Based on the updated individual and global optimal positions, the velocity and position of each particle are adjusted to move towards a better solution space. This iterative process is repeated until the total cost function value is less than a very small threshold, indicating that all collisions have been essentially eliminated, or the preset maximum number of iterations has been reached. Figure 3 and Figure 4 This is a schematic diagram showing the electromechanical pipeline layout before and after optimization. Figure 4 As can be seen, for areas where collisions occur, the pipeline layout or routing is automatically adjusted. The globally optimal position vector is the optimal adjustment vector for each pipeline. Applying the vector to the original pipeline model updates the coordinates of all pipelines, generating a collision-free, collaboratively arranged 3D model, and outputting it as an IFC format file.
[0040] Optionally, after moving the main pipeline segment, the adjustment vector is automatically generated based on the new spatial location using preset routing rules such as limiting the turning angle to 45 degrees or 90 degrees to generate the bending fittings and risers required to connect the preceding and subsequent pipeline segments. The length increment and the number of fittings in the cost function are calculated based on the reconstructed complete geometric path, thereby ensuring that the solution generated in each iteration is topologically continuous and constructible.
[0041] In some embodiments, the partitioning of the space into a non-uniform octree structure includes:
[0042] The root node of the octree is the smallest bounding box containing all pipelines. When the number of pipeline geometric primitives contained in the node is greater than a preset entity number threshold and the size of the node is greater than a preset minimum size threshold, the node is recursively divided into eight child nodes until all leaf nodes meet the termination division condition.
[0043] The process iterates through all pipeline models in the 3D scene, such as a set of IFC files representing HVAC, plumbing, and electrical systems. For each pipeline, its axis-aligned bounding box is determined by finding the minimum and maximum coordinates of all its vertices. The bounding boxes of all pipelines are then integrated, and the global minimum and maximum coordinates covering the entire scene are calculated to define a final minimum bounding box, which becomes the root node of the octree. For example, if the spatial range of the entire densely populated pipeline area is from coordinates (0,0,0) to (50,80,10), then this cuboid space becomes the root node.
[0044] Set termination conditions for the recursive partitioning, such as a preset threshold of 10 pipeline geometry primitives and a preset minimum size threshold of 0.2 meters. Starting from the root node, check if the number of pipeline primitives it contains is greater than 10 and if its longest side is greater than 0.2 meters. If both conditions are met, the node is cut along the midpoint plane of the x, y, and z axes, uniformly dividing it into eight child nodes of the same size. Then, all pipeline primitives within the parent node are assigned to one or more of its child nodes. This recursive partitioning process continues until all leaf nodes in the tree structure no longer meet the partitioning conditions, i.e., each leaf node contains less than or equal to 10 primitives, or its size is less than or equal to 0.2 meters. This ultimately forms a non-uniform octree spatial index, with finer node partitioning in densely populated areas and larger node partitioning in sparsely populated areas, greatly optimizing the search efficiency of subsequent collision detection.
[0045] In some embodiments, generating a discretized directed distance field covering the pipeline safety distance for pipelines with high priority or gravity slope constraints, and determining whether soft collisions exist by querying the field value of the directed distance field at key points on the surface of other pipelines to be arranged, includes:
[0046] For pipelines with high priority or gravity slope constraints, create a 3D grid around them with a preset resolution.
[0047] Using the outer surface of the pipeline as the zero potential surface, the distance field to the preset safety distance is calculated and stored in the three-dimensional grid.
[0048] On the outer surface of other pipelines to be laid out, select a series of key points according to a preset density;
[0049] Query the distance value corresponding to each key point in the distance field. If the distance value is less than the preset minimum safe clearance, it is determined to be a soft collision.
[0050] High-priority pipelines requiring protection are identified, such as a DN300 main drain pipe that must maintain a gravity slope. A three-dimensional grid, or voxel field, is created around the geometric model of this drain pipe, with a resolution of 50 mm, meaning the space is divided into numerous 50×50×50 mm cubic units. Using a fast-travel algorithm or similar approach, starting with the outer surface of the drain pipe as the initial surface (distance to zero), the shortest Euclidean distance from the center point of each grid cell to this surface is calculated, forming a scalar distance field. This distance field is calculated only up to a preset maximum influence range, such as 1 meter, and the calculated distance values are stored in the corresponding grid cells.
[0051] For other ordinary pipelines requiring inspection, such as a DN80 water supply pipe, a series of discrete key points are selected on its outer surface according to a preset sampling density. For example, a cross-section is taken every 200 mm along the pipeline centerline, and four points are evenly selected along the circumference of each cross-section, such as the top, bottom, left, and right positions. For each selected key point, its absolute coordinates in three-dimensional space are obtained. Then, these coordinates are used to query the previously generated three-dimensional grid distance field. Through methods such as trilinear interpolation, the distance field value of the key point's location can be accurately calculated based on the distance values stored in the grid cell where the point is located and its surrounding cells. For example, the distance value of a certain key point is found to be 80 mm. Finally, this queried distance value is compared with the preset minimum safety clearance, such as the standard requirement of 100 mm. Because 80 mm is less than 100 mm, the system determines that the water supply pipe has violated the safety clearance of the main drainage pipe at this location, constituting a soft collision.
[0052] In some embodiments, the step of using simulated annealing or particle swarm optimization algorithms to solve for the adjustment vectors of each pipeline and iteratively updating their positions includes:
[0053] Set the preset initial temperature, cooling strategy, and termination conditions;
[0054] In each iteration, a random perturbation vector generated in its neighborhood is applied to the pipelines that are colliding.
[0055] The probability of accepting the disturbance is calculated based on the change in the cost function and the Metropolis criterion, and a decision is made on whether to update the pipeline location.
[0056] Initialize the control parameters of the simulated annealing algorithm. Set a relatively high initial temperature T, for example... To ensure the algorithm can extensively search the solution space in the early stages, an exponential decay cooling strategy is adopted, meaning the temperature is multiplied by a decay coefficient after each iteration. ,For example The termination condition can be set to the temperature falling below a certain threshold, such as... This can be achieved by reaching a maximum number of iterations, such as 20,000. The initial pipeline layout is used as the starting solution for the algorithm, and its initial cost is calculated. .
[0057] In each iteration, a pipeline, such as a water pipe, is randomly selected from the list of currently colliding pipelines. Then, a random perturbation vector is generated within the allowable movement range of this pipeline; for example, it might be translated by -200 mm along the y-axis, or simultaneously moved by +50 mm and -30 mm along the x-axis and z-axis respectively, resulting in a new pipeline position. The system then recalculates the cost function value of the entire layout based on this new position. Calculate the change in cost. If the cost change is less than 0, it indicates the new location is better, and the system unconditionally accepts the move, updating the current solution to the new one. If the cost change is greater than or equal to 0, it indicates the new location is a worse solution, and the probability of accepting this worse solution is calculated according to the Metropolis criterion. For example, if And the current temperature The probability of acceptance is Approximately 0.905. Generate a random number between 0 and 1. If this random number is less than P, the move is still accepted, giving the algorithm a chance to escape local optima. After the iteration, the temperature is adjusted according to... Cool it down, then start the next iteration, until the termination condition is met.
[0058] In some embodiments, extracting the center axis vector and minimum circumscribed cylinder of each pipeline includes:
[0059] For a pipeline consisting of straight pipe sections and fittings, its centerline is discretized into a series of centerline vectors connected end to end;
[0060] Based on the semantic information of the pipeline, its outer diameter is read. and insulation layer thickness The minimum circumscribed column radius R of the corresponding pipeline segment is calculated using the following formula: .
[0061] The system analyzes the geometric and non-geometric information of a specific pipeline from a 3D model database, such as a BIM model. For a complex pipeline composed of multiple parts, such as an air supply duct in a HVAC system, the system identifies all its components, including straight pipe sections, elbows, and reducers. For each straight pipe section, its centerline is directly represented as a spatial vector defined by the coordinates of its start and end points. For curved components such as elbows, whose centerline is an arc, the system discretizes it into multiple short, connected straight line vector segments with a preset precision to approximate its shape. By splicing the centerline vectors of all components in the order of connection, a simplified centerline model of the entire pipeline, consisting of a series of vector segments, is obtained.
[0062] While extracting the centerline, the semantic attribute data associated with each pipe segment or fitting is queried. For example, for a DN200 chilled water pipe segment, the nominal diameter information is read from its attributes, and its actual outer diameter is retrieved from the built-in pipe standard library. The thickness is 219.1 mm. Next, the insulation layer information is read to obtain the insulation layer thickness. The radius is 80 mm. Then, the system applies a given formula to calculate the minimum circumscribed cylinder radius R of the pipe segment. Specifically, R = 189.55 mm. The radius value R is associated with the corresponding centerline vector of the pipe segment, together forming a simplified geometric model for subsequent collision detection calculations: a cylinder with a radius of 189.55 mm and an axis equal to the extracted centerline vector. Specific Implementation Example 2
[0064] This invention proposes a coordinated layout system for electromechanical pipelines, comprising the following modules:
[0065] The segmentation module is used to divide the space into a non-uniform octree structure based on the geometric and semantic information of the input 3D building model and the electromechanical pipelines of various disciplines, and to extract the central axis vector and minimum circumscribed column of each pipeline.
[0066] The hard collision detection module is used to calculate the distance between the nearest common perpendicular segments between the central axis vectors of any two pipelines within the same leaf node or adjacent leaf nodes of the octree. When the distance is less than or equal to the sum of the radii of the minimum circumscribed cylinders of the two pipelines, a hard collision is determined to exist.
[0067] The soft collision monitoring module is used to generate a discretized directed distance field covering the safety distance of pipelines with high priority or gravity slope constraints, and to determine whether a soft collision exists by querying the field value of the directed distance field at key points on the surface of other pipelines to be arranged.
[0068] The function building module is used to construct a layout cost function based on the collision type, the professional attributes of the pipeline involved, and the estimated increase in pipe segments and fittings to eliminate the collision when a hard or soft collision is detected.
[0069] The optimization module is used to take the layout cost function as the optimization objective, use simulated annealing or particle swarm optimization algorithm to solve the adjustment vector of each pipeline and iteratively update its position until all collisions are eliminated, and output the three-dimensional model of the pipeline after cooperative layout.
[0070] The exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
Claims
1. A method for coordinated layout of electromechanical pipelines, characterized in that, include: Based on the input 3D building model and the geometric and semantic information of various professional electromechanical pipelines, the space is divided into a non-uniform octree structure, and the central axis vector and minimum circumscribed column of each pipeline are extracted. Within the same leaf node or adjacent leaf nodes of the octree, calculate the distance between the nearest common perpendicular segments between the central axis vectors of any two pipelines. When the distance is less than or equal to the sum of the radii of the minimum circumscribed cylinders of the two pipelines, it is determined that a hard collision exists. For pipelines with high priority or gravity slope constraints, a discretized directed distance field covering the pipeline safety distance is generated, and the field value of the directed distance field is queried at key points on the surface of other pipelines to be arranged to determine whether there is a soft collision. When a hard or soft collision is identified, a layout cost function is constructed based on the collision type, the professional attributes of the pipeline involved, and the estimated increase in pipe sections and fittings to eliminate the collision. Using the layout cost function as the optimization objective, simulated annealing or particle swarm optimization algorithms are used to solve the adjustment vector of each pipeline and iteratively update its position until all collisions are eliminated, and the three-dimensional model of the pipeline after collaborative layout is output.
2. The method according to claim 1, characterized in that, The method of partitioning the space into a non-uniform octree structure includes: The root node of the octree is the smallest bounding box containing all pipelines. When the number of pipeline geometric primitives contained in the node is greater than a preset entity number threshold and the size of the node is greater than a preset minimum size threshold, the node is recursively divided into eight child nodes until all leaf nodes meet the termination division condition.
3. The method according to claim 1, characterized in that, For pipelines with high priority or gravity slope constraints, a discretized directed distance field covering the pipeline safety distance is generated. The presence of soft collisions is determined by querying the field values of this directed distance field at key points on the surfaces of other pipelines to be arranged, including: For pipelines with high priority or gravity slope constraints, create a 3D grid around them with a preset resolution. Using the outer surface of the pipeline as the zero potential surface, calculate the distance field outward to the preset safety distance and store it in the three-dimensional grid. On the outer surface of other pipelines to be laid out, select a series of key points according to a preset density; Query the distance value corresponding to each key point in the distance field. If the distance value is less than the preset minimum safe clearance, it is determined to be a soft collision.
4. The method according to claim 1, characterized in that, The layout cost function is constructed based on the collision type, the professional attributes of the pipelines involved, and the estimated increase in pipe sections and fittings to eliminate the collision, including: The layout cost function is a weighted sum of all cost factors, expressed as: ; in, The sum of the normalized penalty scores for all hard collisions. This is the sum of the normalized penalty scores for all soft collisions. The total length added to the pipe section, For the total number of pipe fittings added, , These are the severity weighting coefficients for hard and soft collisions, respectively, and are dimensionless. This is the length penalty factor, expressed in cost per meter. Penalty factor for a single pipe, per unit cost; penalty value for a single collision. or The determination is based on the professional attributes, size, or priority of the pipelines involved.
5. The method according to claim 1, characterized in that, The process of using simulated annealing or particle swarm optimization algorithms to solve for the adjustment vectors of each pipeline and iteratively updating their positions includes: Set the preset initial temperature, cooling strategy, and termination conditions; In each iteration, a random perturbation vector generated in its neighborhood is applied to the pipelines that have collisions; The probability of accepting the disturbance is calculated based on the change in the cost function and the Metropolis criterion, and a decision is made on whether to update the pipeline location.
6. The method according to claim 1, characterized in that, The extraction of the central axis vector and minimum circumscribed cylinder of each pipeline includes: For a pipeline consisting of straight pipe sections and fittings, its centerline is discretized into a series of centerline vectors connected end to end; Based on the semantic information of the pipeline, its outer diameter is read. and insulation layer thickness The minimum circumscribed column radius R of the corresponding pipeline segment is calculated using the following formula: 。 7. A system for coordinated layout of electromechanical pipelines, characterized in that, Includes the following modules: The segmentation module is used to divide the space into a non-uniform octree structure based on the geometric and semantic information of the input 3D building model and the electromechanical pipelines of various disciplines, and to extract the central axis vector and minimum circumscribed column of each pipeline. The hard collision detection module is used to calculate the distance between the nearest common perpendicular segments between the central axis vectors of any two pipelines within the same leaf node or adjacent leaf nodes of the octree. When the distance is less than or equal to the sum of the radii of the minimum circumscribed cylinders of the two pipelines, a hard collision is determined to exist. The soft collision monitoring module is used to generate a discretized directed distance field covering the safety distance of pipelines with high priority or gravity slope constraints, and to determine whether a soft collision exists by querying the field value of the directed distance field at key points on the surface of other pipelines to be arranged. The function building module is used to construct a layout cost function based on the collision type, the professional attributes of the pipeline involved, and the estimated increase in pipe segments and fittings to eliminate the collision when a hard or soft collision is detected. The optimization module is used to take the layout cost function as the optimization objective, use simulated annealing or particle swarm optimization algorithm to solve the adjustment vector of each pipeline and iteratively update its position until all collisions are eliminated, and output the three-dimensional model of the pipeline after cooperative layout.
8. The system according to claim 7, characterized in that, The method of partitioning the space into a non-uniform octree structure includes: The root node of the octree is the smallest bounding box containing all pipelines. When the number of pipeline geometric primitives contained in the node is greater than a preset entity number threshold and the size of the node is greater than a preset minimum size threshold, the node is recursively divided into eight child nodes until all leaf nodes meet the termination division condition.
9. The system according to claim 7, characterized in that, For pipelines with high priority or gravity slope constraints, a discretized directed distance field covering the pipeline safety distance is generated. The presence of soft collisions is determined by querying the field values of this directed distance field at key points on the surfaces of other pipelines to be arranged, including: For pipelines with high priority or gravity slope constraints, create a 3D grid around them with a preset resolution. Using the outer surface of the pipeline as the zero potential surface, calculate the distance field outward to the preset safety distance and store it in the three-dimensional grid. On the outer surface of other pipelines to be laid out, select a series of key points according to a preset density; Query the distance value corresponding to each key point in the distance field. If the distance value is less than the preset minimum safe clearance, it is determined to be a soft collision.
10. The system according to claim 7, characterized in that, The layout cost function is constructed based on the collision type, the professional attributes of the pipelines involved, and the estimated increase in pipe sections and fittings to eliminate the collision, including: The layout cost function is a weighted sum of all cost factors, expressed as: ; in, The sum of the normalized penalty scores for all hard collisions. This is the sum of the normalized penalty scores for all soft collisions. The total length added to the pipe section, For the total number of pipe fittings added, , These are the severity weighting coefficients for hard and soft collisions, respectively, and are dimensionless. This is the length penalty factor, expressed in cost per meter. Penalty factor for a single pipe, per unit cost; penalty value for a single collision. or The determination is based on the professional attributes, size, or priority of the pipelines involved.