Building duct design method and apparatus
By converting building models into three-dimensional raster matrices and improving the A-Star algorithm, the problem of large model conversion errors in building pipeline design is solved, achieving efficient and accurate pipeline layout and improving the quality and efficiency of building design.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN UNIV
- Filing Date
- 2022-02-18
- Publication Date
- 2026-05-19
AI Technical Summary
Existing building piping design methods suffer from large model transformation errors in practical applications, leading to unsatisfactory piping layout results. In particular, when applying the A* algorithm, it is difficult to achieve efficient optimization in building scenarios.
An improved A-Star algorithm is used to convert the building model into a three-dimensional raster matrix. The improved A-Star algorithm is then used to find the pipe path. Revit software is used to obtain model information, and the starting point, ending point, direction and pipe diameter of the pipe are determined by the raster matrix. Path planning is then performed by combining a heuristic function based on the surface unit.
It achieves high accuracy while compressing the building model at a low scale, improving the accuracy and efficiency of pipe layout and reducing spatial and temporal complexity.
Smart Images

Figure CN114547742B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of building pipeline routing technology, and in particular to a building pipeline design method and device. Background Technology
[0002] Piping systems are a crucial component of buildings, serving as the medium for conduction and ensuring the normal operation of equipment, much like blood vessels in the human body. Problems with the piping system will inevitably affect the normal operation of the entire building. Furthermore, the quality of piping layout directly impacts building costs. With fierce market competition, high-performance, low-cost products that meet manufacturing, installation, and maintenance constraints have become the common goal of building material suppliers. Modern buildings are complex in function and have numerous pipelines, categorized by specialty, including water supply and drainage pipes, HVAC power pipes, high-voltage cables, low-voltage cables, gas pipelines, and process pipes. Each type of pipeline, whether vertical or horizontal, requires coordinated planning to ensure close cooperation between architecture, structure, electrical, and HVAC systems. Timely coordination reduces pipe crossings and overcrowding, increasing building height and usable floor space. Therefore, a good piping layout plays a vital role in the safety, reliability, ease of operation, and maintenance of the entire system. Currently, the methods and tools for piping system layout design and optimization in building engineering are relatively lagging behind, leading to numerous problems in the construction cycle, economic costs, and building quality.
[0003] Current research on building piping mainly focuses on experience-based discussions during construction design, with limited coverage of automated piping layout and optimization. Extensive research has been conducted by domestic and international scholars in application fields such as aero-engines, aerospace, shipbuilding, and complex electronic products, primarily concentrating on automated piping layout methods, piping path optimization, and computer-aided piping layout system design. The methods employed include maze algorithms, escape algorithms, Zhu algorithms, unit generation methods, heuristic algorithms, expert systems, fuzzy set theory, and reinforcement learning. Specifically, methods used for automated building piping layout include Dijkstra's algorithm, A* (A-Star) algorithm, breadth-first search, and ant colony optimization.
[0004] Dijkstra's algorithm works by starting with the origin of the object and visiting all vertices in the graph. It then repeatedly checks the nearest unchecked vertex, adding it to the set of vertices to be checked. It expands outwards from the origin until it reaches the destination. Dijkstra's algorithm guarantees finding the shortest path from the origin to the destination, provided that all edges have no negative cost.
[0005] The Greedy Best-First-Search algorithm works in a similar way, but with the difference that it has some estimate (called a heuristic) of the distance from any vertex to the target. Instead of choosing the vertex closest to the starting point, it chooses the vertex closest to the target. Greedy best-first search does not guarantee finding the shortest path. However, it runs much faster than Dijkstra's algorithm because it uses a heuristic function to guide it very quickly toward the target.
[0006] A* is similar to Dijkstra's algorithm because it can be used to find the shortest path. A* is also similar to Greedy Best-First-Search because it can use heuristics to guide itself. In the simplest case, it is as fast as Greedy Best-First-Search. It combines the pieces of information used by Dijkstra's algorithm (preferring vertices closer to the starting point) with the information used by Greedy Best-First-Search (preferring vertices closer to the target). In standard terminology used when discussing A*, g(n) represents the exact cost n of the path from the starting point to any vertex, and h(n) represents the heuristically estimated cost n from the vertex to the target.
[0007] Among these algorithms, the A* algorithm has advantages in time complexity and simplicity, making it the most widely used pipe layout algorithm. However, when applying the A* algorithm to real-world building scenarios, it often uses a single point on the model to represent the cross-section of a pipe in the actual building scene. When the pipe diameter is large, the model transformation results in a large error between the constructed model and the actual building scene, leading to unsatisfactory results. Summary of the Invention
[0008] The technical problem to be solved by the present invention is to provide a building pipeline design method and device, which aims to optimize pipeline routing.
[0009] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a building pipeline design method, including the following steps.
[0010] S10. Obtain architectural model information from architectural drawings using architectural design software;
[0011] S20. Convert the building model into a three-dimensional raster matrix based on the building model information;
[0012] S30. In a three-dimensional grid matrix, the pipeline is located by improving the A-Star algorithm.
[0013] Furthermore, step S10 specifically includes,
[0014] S11. Use architectural software to obtain the overall size information of the architectural model;
[0015] S12. Use Revit software to mark the origin on the drawing and obtain the position coordinates of each building module in the building model on the drawing;
[0016] S13. Determine the starting point, ending point, direction, and diameter of the pipelines to be laid.
[0017] Furthermore, step S20 specifically includes,
[0018] S21. Compress and transform the architectural model according to a preset ratio to obtain a compressed architectural model;
[0019] S22. Map each building module to a three-dimensional grid matrix. Transform the lower left and upper right corner coordinates of each building module proportionally and map them to the three-dimensional grid matrix to obtain the position of the building module in the grid matrix.
[0020] S23. Based on the starting point, ending point, direction, and diameter of the pipeline, determine the initial transition state of the pipeline, map it to the raster matrix, and assign values to the corresponding positions.
[0021] Furthermore, in step S22, the transformation formula used to map each building module to the three-dimensional raster matrix is as follows:
[0022]
[0023]
[0024] Where Cl is the coordinate of the bottom left corner of the Revit drawing in the building module, Cr is the coordinate of the bottom left corner of the Revit drawing in the building module, and L is the conversion scale. p The coordinates of the lower left corner of the building module are transformed to its position in the raster matrix. Cr p The coordinates of the top right corner of the building module are transformed and placed in the raster matrix.
[0025] Furthermore, step S30 specifically includes,
[0026] S31. Create a priority queue Frontier to store each state of the pipeline, two random access dictionaries came_from to store the previous state of each state of the pipeline, and a cost_so_far to store the cost of each state of the pipeline.
[0027] S32. Add the initial state of the pipeline to the priority queue Frontier;
[0028] S33. Check if the priority queue Frontier is empty. If it is empty, return an error report. If it is not empty, proceed to the next step.
[0029] S34. Pop the highest priority state current_state from the priority queue Frontier, and determine whether current_state is in the terminal state of the pipeline. If so, the pipeline path is successful, and output the pipeline path according to the information recorded by cost_so_far.
[0030] S35. Based on the highest priority state current_state, find the pipeline action in the grid matrix that leads to the next state next_state. Add the cost of the current state to the cost of the next pipeline action as the cost of next_state. Update next_state to cost_so_far and record the previous state of next_state as current_state in camel_from.
[0031] S36. Repeat steps S33-S36 until the pipeline layout is complete.
[0032] The present invention also provides a building piping design device, comprising,
[0033] The building model acquisition module is used to obtain building model information from architectural drawings through architectural design software.
[0034] The building model conversion module is used to convert building models into three-dimensional raster matrices based on building model information.
[0035] The pipeline pathfinding module is used to find pipelines in a three-dimensional grid matrix using an improved A-Star algorithm.
[0036] Furthermore, the building model acquisition module includes,
[0037] The building model information acquisition unit is used to acquire the overall size information of the building model using building software.
[0038] The building module coordinate acquisition unit is used to mark the origin on the drawing using Revit software and obtain the position coordinates of each building module in the building model on the drawing.
[0039] The pipeline information confirmation module is used to determine the starting point, ending point, direction, and diameter of the pipeline to be laid.
[0040] Furthermore, the building model conversion module includes,
[0041] The building model compression unit is used to compress and transform building models according to a preset ratio to obtain compressed building models.
[0042] The building model mapping unit is used to map each building module to a three-dimensional grid matrix. It transforms the lower left and upper right corner coordinates of each building module proportionally and maps them to the three-dimensional grid matrix to obtain the position of the building module in the grid matrix.
[0043] The pipeline mapping unit is used to determine the initial state of the pipeline based on its starting point, ending point, direction, and diameter, and to map it to the raster matrix, assigning values to the corresponding positions.
[0044] Furthermore, in the building model mapping unit, the transformation formula used to map each building module to the three-dimensional raster matrix is as follows:
[0045]
[0046]
[0047] Where Cl is the coordinate of the bottom left corner of the Revit drawing in the building module, Cr is the coordinate of the bottom left corner of the Revit drawing in the building module, and L is the conversion scale. p The coordinates of the lower left corner of the building module are transformed to its position in the raster matrix. Cr p The coordinates of the top right corner of the building module are transformed and placed in the raster matrix.
[0048] Furthermore, the pipeline routing module includes,
[0049] The state storage space creation unit creates a priority queue Frontier for storing each state of the pipeline, two random access dictionaries came_from for storing the previous state of each state of the pipeline, and a cost_so_far for storing each state of the pipeline.
[0050] The initial state addition unit is used to add the initial state of the pipeline to the priority queue Frontier.
[0051] The priority queue judgment unit checks whether the priority queue Frontier is empty. If it is empty, it returns an error report; otherwise, it proceeds to the next step.
[0052] The pipeline path output unit is used to pop the highest priority state current_state from the priority queue Frontier, and determine whether current_state is in the pipeline termination state. If so, the pipeline path is successful, and the pipeline path is output according to the information recorded by cost_so_far.
[0053] The pipeline pathfinding unit is used to find the pipeline action to reach the next state next_state in the grid matrix according to the highest priority state current_state. The cost of the current state plus the cost of the next pipeline action is used as the cost of next_state. Next_state is updated in cost_so_far, and the previous state of next_state is recorded as current_state in came_from.
[0054] The loop execution unit is used to repeatedly execute from the priority queue judgment unit to the pipeline routing unit until the pipeline layout is completed.
[0055] The beneficial effects of this invention are as follows: by converting the building model into a three-dimensional grid matrix based on the building model information, and using multiple grids to represent the cross-section of a pipe, the building model can be compressed at a low ratio while ensuring accuracy. Attached Figure Description
[0056] The specific structure of the present invention will now be described in detail with reference to the accompanying drawings.
[0057] Figure 1 This is a flowchart of a building piping design method according to an embodiment of the present invention;
[0058] Figure 2 This is a flowchart illustrating the process of obtaining building model information according to an embodiment of the present invention.
[0059] Figure 3 This is a flowchart illustrating the building model information conversion process according to an embodiment of the present invention.
[0060] Figure 4 This is a flowchart illustrating the pipeline routing process according to an embodiment of the present invention.
[0061] Figure 5 This is a block diagram of a building pipeline design device according to an embodiment of the present invention;
[0062] Figure 6 This is a block diagram of the building model acquisition module according to an embodiment of the present invention;
[0063] Figure 7 This is a block diagram of the building model conversion module according to an embodiment of the present invention;
[0064] Figure 8 This is a block diagram of the pipeline pathfinding module according to an embodiment of the present invention;
[0065] Figure 9 This is a schematic block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0067] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0068] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0069] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0070] like Figure 1 As shown, the first embodiment of the present invention is: a building pipeline design method, including the following steps:
[0071] S10. Obtain architectural model information from architectural drawings using architectural design software;
[0072] S20. Convert the building model into a three-dimensional raster matrix based on the building model information;
[0073] S30. In a three-dimensional grid matrix, the pipeline is located by improving the A-Star algorithm.
[0074] like Figure 2 As shown, step S10 specifically includes,
[0075] S11. Use architectural software to obtain the overall size information of the building model; architectural drawings are generally Revit drawings, which only show the building structure and not the pipes. Use architectural software such as Revit or CAD to view the overall size of the building, including its length, width, and height.
[0076] S12. Using Revit software, mark the origin on the drawing to obtain the position coordinates of each building module in the building model on the drawing; building modules include walls, beams, columns, etc. Since most building modules are square, you only need to check the coordinates of the lower left and upper right corners of each building module to determine the position of the module.
[0077] S13. Determine the starting point, ending point, direction, and diameter of the pipelines to be laid.
[0078] like Figure 3 As shown, step S20 specifically includes,
[0079] S21. Compress and transform the building model according to a preset ratio to obtain the compressed building model. In this step, the size of the 3D raster matrix is determined. A matrix that is too large will result in low algorithm efficiency and consume too much memory space. Therefore, under normal circumstances, the building will be compressed and transformed at a ratio of 1:50, which means that the edge of one cell in the raster matrix represents 50mm on the building. When the input building size is length L mm, width W mm, and height H mm, the size of the 3D matrix obtained after transformation is (L / 50, W / 50, H / 50).
[0080] S22. Map each building module to a 3D grid matrix. Scale the coordinates of the lower left and upper right corners of each building module to obtain the position of the building module in the grid matrix. For example, if the building module to be mapped is a beam with lower left corner coordinates (a, b, c) and upper right corner coordinates (d, e, f), scaling (a, b, c) and (d, e, f) will give the module's position in the grid matrix.
[0081] S23. Based on the starting point, ending point, direction, and diameter of the pipeline, determine the initial transition state of the pipeline, map it to the raster matrix, and assign values to the corresponding positions.
[0082] Furthermore, in step S22, the transformation formula used to map each building module to the three-dimensional raster matrix is as follows:
[0083]
[0084]
[0085] Where Cl is the coordinate of the bottom left corner of the Revit drawing in the building module, Cr is the coordinate of the bottom left corner of the Revit drawing in the building module, and L is the conversion scale. p The coordinates of the lower left corner of the building module are transformed to its position in the raster matrix. Cr pThe coordinates of the top right corner of the building module are transformed and placed in the raster matrix.
[0086] For areas that do not completely fill the grid, areas exceeding half the grid are replaced with a single grid cell, while areas less than half the grid cell are ignored. Based on the bottom-left and top-right coordinates of the module mapped to the matrix, values are assigned to the grid cells occupied by the square region in the matrix; different numbers distinguish the modules.
[0087] like Figure 4 As shown, step S30 specifically includes,
[0088] S31. Create a priority queue Frontier to store each state of the pipeline, two random access dictionaries came_from to store the previous state of each state of the pipeline, and a cost_so_far to store the cost of each state of the pipeline; the state of the pipeline has the current position coordinates, length, width and direction.
[0089] S32. Add the pipeline's initial state to the priority queue Frontier; the initial state has the highest priority. came_from[initial state] = none, cost_so_far[initial state] = 0.
[0090] S33. Determine if the priority queue Frontier is empty. If it is empty, it means that the pipeline cannot be placed in the grid matrix, so return an error report. If it is not empty, proceed to the next step.
[0091] S34. Pop the highest priority state current_state from the priority queue Frontier, and determine whether current_state is in the terminal state of the pipeline. If so, the pipeline path is successful, and output the pipeline path according to the information recorded by cost_so_far.
[0092] S35. Based on the highest priority state current_state, find the pipeline action in the grid matrix that leads to the next state next_state. Pipeline actions include moving forward one step, moving backward one step, turning left, turning right, turning up, and turning down. Add the cost of the next pipeline action to the cost of the current state as the cost of next_state, where the cost is the number of grids traversed. If next_state has not been traversed before, or if the current cost is lower than the previously recorded cost, update next_state in cost_so_far and record the previous state of next_state as current_state in camel_from.
[0093] S36. Repeat steps S33-S36 until the pipeline layout is complete.
[0094] In summary, the model uses a face composed of multiple grid cells to represent the cross-section of a pipe. For example, using 5x5 and 2x4 grid cells to represent the cross-section of a pipe allows for compression of the model at a lower scale, ensuring accuracy.
[0095] In real-world construction scenarios, pipe cross-sections have orientations, with x, y, and z axes representing the current orientation of the pipe cross-section. A point on the surface is then used to represent the current position of the surface.
[0096] Traditional A* algorithms lack a description of turns, requiring manual processing later. In this application, faces are redefined, and turns also need to be reconstructed. In real-world architectural scenarios, face turns form fan-shaped regions with one edge as the axis and the other as the radius, and the face's orientation also needs to be changed accordingly.
[0097] In order to successfully design pipelines using the new model building method, this application modifies the A* algorithm. The main differences compared to the traditional A* algorithm are in the current state of the pipeline, the next state of the pipeline, and the heuristic function.
[0098] The current state of a line consists of several elements: the position of the face, represented by the coordinates of a fixed point on the face, the length and width of the face, and the orientation of the face. In this algorithm, the orientation of the face is divided into three types: x-axis direction, y-axis direction, and z-axis direction.
[0099] When the pipeline needs to explore the next state, it first observes and determines whether it will encounter an obstacle if it goes straight, that is, if it takes one step forward. Then it determines whether there are obstacles in the area swept when the pipeline makes a turn, such as when it turns from the x-axis to the z-axis. The next state of the pipeline is added to the open list and the loop is repeated.
[0100] Unlike the traditional A* algorithm, the face-based A* algorithm calculates cost in face units. This is because each step of the pipeline's movement is performed on a face-by-face basis. When the pipeline moves in its original direction, it first checks the grid ahead, examining the cross-section formed by its length and width for obstacles. If no obstacles are found, the pipeline considers whether to move forward using a face-based approach, with the cost being the number of grid cells occupied by the cross-section. When the pipeline turns, the cost is the number of grid cells occupied by the sector region, i.e., the inscribed triangle.
[0101] The heuristic function is used to calculate the estimated cost from the current point to the destination. With the help of the heuristic function, the A* algorithm has a certain directionality during its exploration process, which distinguishes it from some traditional pathfinding algorithms. Compared to breadth-first search algorithms such as Dijkstra's algorithm, it effectively reduces space and time complexity. When calculating the cost from the pipeline to the destination, the heuristic function of the surface-based A* algorithm differs from the traditional A* algorithm, which can directly obtain a good estimate using the Manhattan distance. Since pathfinding is performed on a surface-by-surface basis, it is difficult to estimate the cost between two surfaces; therefore, the Manhattan distance between a point on one surface and a point on the destination surface is used as the estimate. The heuristic function is calculated as: Heuristic function = abs(node.x - goal.x) + abs(node.y - goal.y) + abs(node.z - goal.z).
[0102] like Figure 5 As shown, another embodiment of the present invention is a building pipeline design device, comprising,
[0103] Architectural model acquisition module 10 is used to acquire architectural model information from architectural drawings through architectural design software;
[0104] Building model conversion module 20 is used to convert the building model into a three-dimensional raster matrix based on the building model information;
[0105] The pipeline pathfinding module 30 is used to perform pipeline pathfinding in a three-dimensional grid matrix using an improved A-Star algorithm.
[0106] like Figure 6 As shown, the building model acquisition module 10 includes,
[0107] Building model information acquisition unit 11 is used to acquire the overall size information of the building model using building software;
[0108] Building module coordinate acquisition unit 12 is used to mark the origin on the drawing using Revit software and obtain the position coordinates of each building module in the building model on the drawing.
[0109] The pipeline information confirmation module 13 is used to determine the starting point, ending point, direction, and diameter of the pipeline to be laid.
[0110] like Figure 7 As shown, the building model conversion module 20 includes,
[0111] The building model compression unit 21 is used to compress and transform the building model according to a preset ratio to obtain the compressed building model.
[0112] The building model mapping unit 22 is used to map each building module to a three-dimensional grid matrix. It performs proportional transformation on the lower left and upper right corner coordinates of each building module and maps them to the three-dimensional grid matrix to obtain the position of the building module in the grid matrix.
[0113] Pipe mapping unit 23 is used to determine the initial state of the pipe and map it into the grid matrix based on the pipe's starting point, ending point, direction, and diameter, and assign values to the corresponding positions.
[0114] Furthermore, in the building model mapping unit 22, the transformation formula used to map each building module to the three-dimensional raster matrix is as follows:
[0115]
[0116]
[0117] Where Cl is the coordinate of the bottom left corner of the Revit drawing in the building module, Cr is the coordinate of the bottom left corner of the Revit drawing in the building module, and L is the conversion scale. p The coordinates of the lower left corner of the building module are transformed to its position in the raster matrix. Cr p The coordinates of the top right corner of the building module are transformed and placed in the raster matrix.
[0118] like Figure 8 As shown, the pipeline tracing module 30 includes,
[0119] State storage space creation unit 31 creates a priority queue Frontier for storing each state of the pipeline, two random access dictionaries came_from for storing the previous state of each state of the pipeline, and a cost_so_far for storing each state of the pipeline.
[0120] The initial state addition unit 32 is used to add the initial state of the pipeline to the priority queue Frontier;
[0121] Priority queue judgment unit 33 checks whether the priority queue Frontier is empty. If it is empty, it returns an error report; otherwise, it proceeds to the next step.
[0122] Pipeline path output unit 34 is used to pop the highest priority state current_state from the priority queue Frontier, and determine whether current_state is in the pipeline termination state. If so, the pipeline path is successful, and the pipeline path is output according to the information recorded by cost_so_far.
[0123] The pipeline pathfinding unit 35 is used to find the pipeline action to reach the next state next_state in the grid matrix according to the highest priority state current_state, add the cost of the current state to the cost of the next pipeline action as the cost of next_state, update next_state to cost_so_far, and record the previous state of next_state as current_state in camel_from.
[0124] The loop execution unit 36 is used to loop from the priority queue judgment unit to the pipeline routing unit until the pipeline layout is completed.
[0125] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned building pipeline design device and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.
[0126] The aforementioned building piping design device can be implemented as a computer program, which can, for example... Figure 9 It runs on the computer device shown.
[0127] Please see Figure 9 , Figure 9 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.
[0128] See Figure 9 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0129] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a building piping design method.
[0130] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0131] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a building piping design method.
[0132] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0133] The processor 502 is used to run a computer program 5032 stored in a memory to implement the building piping design method described above.
[0134] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0135] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0136] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the building piping design method as described above.
[0137] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0138] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0139] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0140] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0141] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0142] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A building piping design method, characterized in that: Including steps, S10. Obtain architectural model information from architectural drawings using architectural design software; S20. Convert the building model into a three-dimensional raster matrix based on the building model information; S30. In a three-dimensional grid matrix, the improved A-Star algorithm is used to find the path of the pipeline. Step S30 specifically includes, S31. Create a priority queue Frontier to store each state of the pipeline, two random access dictionaries came_from to store the previous state of each state of the pipeline, and a cost_so_far to store the cost of each state of the pipeline; where the state of the pipeline includes the position coordinates, length, width and direction of the current face. S32. Add the initial state of the pipeline to the priority queue Frontier; S33. Check if the priority queue Frontier is empty. If it is empty, return an error report. If it is not empty, proceed to the next step. S34. Pop the highest priority state current_state from the priority queue Frontier, and determine whether current_state is in the terminal state of the pipeline. If so, the pipeline path is successful, and output the pipeline path according to the information recorded by cost_so_far. S35. Based on the highest priority state current_state, find the pipeline action in the grid matrix that leads to the next state next_state. When searching for the next state, it is necessary to determine whether there are obstacles when moving straight and whether there are obstacles in the fan-shaped area swept when turning. Pipeline actions include moving forward one step, moving backward one step, turning left, turning right, turning up, and turning down. Add the cost of the next pipeline action to the cost of the current state as the cost of next_state, update next_state in cost_so_far, and record the previous state of next_state as current_state in camel_from. The cost is calculated as follows: when moving straight, it is the number of grids occupied by the cross section; when turning, it is the number of grids occupied by the fan-shaped area. S36. Repeat steps S33-S36 until the pipeline layout is completed.
2. The building piping design method as described in claim 1, characterized in that: Step S10 specifically includes, S11. Use architectural software to obtain the overall size information of the architectural model; S12. Use Revit software to mark the origin on the drawing and obtain the position coordinates of each building module in the building model on the drawing; S13. Determine the starting point, ending point, direction, and diameter of the pipelines to be laid.
3. The building piping design method as described in claim 1, characterized in that: Step S20 specifically includes, S21. Compress and transform the architectural model according to a preset ratio to obtain a compressed architectural model; S22. Map each building module to a three-dimensional grid matrix. Transform the lower left and upper right corner coordinates of each building module proportionally and map them to the three-dimensional grid matrix to obtain the position of the building module in the grid matrix. S23. Based on the starting point, ending point, direction, and diameter of the pipeline, determine the initial transition state of the pipeline, map it to the raster matrix, and assign values to the corresponding positions.
4. The building piping design method as described in claim 3, characterized in that: In step S22, the transformation formula used to map each building module to the three-dimensional raster matrix is as follows: in, These are the coordinates of the bottom left corner of the Revit drawing in the building module. These are the coordinates of the bottom left corner of the Revit drawing in the building module. For conversion ratio, This represents the position of the bottom left corner of the building module within the raster matrix after coordinate transformation. The coordinates of the top right corner of the building module are transformed and placed in the raster matrix.
5. A building piping design device, characterized in that: include, The building model acquisition module is used to obtain building model information from architectural drawings through architectural design software. The building model conversion module is used to convert building models into three-dimensional raster matrices based on building model information. The pipeline pathfinding module is used to find pipelines in a 3D grid matrix using an improved A-Star algorithm. The pipeline routing module includes, The state storage space creation unit creates a priority queue Frontier for storing each state of the pipeline, two random access dictionaries came_from for storing the previous state of each state of the pipeline, and a cost_so_far for storing each state of the pipeline; wherein, the state of the pipeline includes the position coordinates, length, width and direction of the current face; The initial state addition unit is used to add the initial state of the pipeline to the priority queue Frontier. The priority queue judgment unit checks whether the priority queue Frontier is empty. If it is empty, it returns an error report; otherwise, it proceeds to the next step. The pipeline path output unit is used to pop the highest priority state current_state from the priority queue Frontier, and determine whether current_state is in the pipeline termination state. If so, the pipeline path is successful, and the pipeline path is output according to the information recorded by cost_so_far. The pipeline pathfinding unit is used to find the pipeline action to reach the next state (next_state) in the grid matrix based on the highest priority state (current_state). When searching for the next state, it needs to determine whether there are obstacles when moving straight and whether there are obstacles in the fan-shaped area swept when turning. The pipeline actions include moving forward one step, moving backward one step, turning left, turning right, turning up, and turning down. The cost of the current state plus the cost of the next pipeline action is used as the cost of the next_state. The next_state is updated in cost_so_far, and the previous state of the next_state is recorded as the current_state in camel_from. The cost is calculated as follows: the number of grid cells occupied by the cross section when moving straight, and the number of grid cells occupied by the fan-shaped area when turning. The loop execution unit is used to repeatedly execute from the priority queue judgment unit to the pipeline routing unit until the pipeline layout is completed.
6. The building piping design device as described in claim 5, characterized in that: The building model acquisition module includes, The building model information acquisition unit is used to acquire the overall size information of the building model using building software. The building module coordinate acquisition unit is used to mark the origin on the drawing using Revit software and obtain the position coordinates of each building module in the building model on the drawing. The pipeline information confirmation module is used to determine the starting point, ending point, direction, and diameter of the pipeline to be laid.
7. The building piping design device as described in claim 5, characterized in that: The architectural model conversion module includes, The building model compression unit is used to compress and transform building models according to a preset ratio to obtain compressed building models. The building model mapping unit is used to map each building module to a three-dimensional grid matrix. It transforms the lower left and upper right corner coordinates of each building module proportionally and maps them to the three-dimensional grid matrix to obtain the position of the building module in the grid matrix. The pipeline mapping unit is used to determine the initial state of the pipeline based on its starting point, ending point, direction, and diameter, and to map it to the raster matrix, assigning values to the corresponding positions.
8. The building piping design device as described in claim 7, characterized in that: In the building model mapping unit, the transformation formula used to map each building module to a 3D raster matrix is as follows: in, These are the coordinates of the bottom left corner of the Revit drawing in the building module. These are the coordinates of the bottom left corner of the Revit drawing in the building module. For conversion ratio, This represents the position of the bottom left corner of the building module within the raster matrix after coordinate transformation. The coordinates of the top right corner of the building module are transformed and placed in the raster matrix.