Residential water supply arrangement method, device, equipment and storage medium
Patent Information
- Application Number
- CN202210696288.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-20
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2042-06-20
AI Technical Summary
[0005]本发明的主要目的在于解决现有的住宅给水的布置过程中需要人工完成导致影响开发周期的技术问题
[0022]In this invention, the technical solution involves acquiring a 3D model of the residence to be arranged and the water supply parameters of each room in the 3D model; calculating the runnable space for water supply pipes in the 3D model based on the water supply parameters; dividing the runnable space for water supply pipes into a grid according to a preset visual algorithm to obtain the grid lines of the 3D model; using water-using equipment in the 3D model as the starting point and water meter equipment in the 3D model as the ending point, performing path planning on the grid lines to obtain the corresponding optimal path, and using the optimal path as the residential water supply line in the 3D model. This method automatically identifies the residential floor plan layout and generates water supply pipes. This method differs from the purely manual 2D design of CAD and from the single-point water supply pipe generation function currently available on the market. This method combines practical engineering experience and analysis of diverse residential floor plans, extracting a set of universal and flexible algorithms, and combining them with fast computing power, allowing designers to generate a water supply pipe layout model of the entire residence in a short time, greatly shortening the design cycle and more intuitively expressing the design intent.
Smart Images

Figure CN115455748B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of architectural design, and more particularly to a method, apparatus, equipment and storage medium for residential water supply layout. Background Technology
[0002] The layout of residential water supply pipes is one of the most time-consuming design processes in water supply and drainage design. It is also a very detailed process. To save time, designers often use a simplified two-dimensional representation, which does not accurately reflect the actual installation effect. This results in a lot of time being spent communicating during the construction process. Sometimes, errors are only discovered after construction is completed, requiring demolition and reconstruction, which is an unnecessary expense for real estate developers.
[0003] Currently, there are two technical solutions: one is AutoCAD-aided design software developed by Autodesk. The water supply pipes and water-using equipment drawn by this software exist in two-dimensional form, which cannot accurately express the actual height of the pipes, the connection points of the water-using equipment, and other information. Due to the lack of information, it is impossible to use CAD to better develop automated design functions. At present, designers can only complete the design work manually, which takes a long time and greatly affects the development cycle.
[0004] Secondly, there is Autodesk's Revit design software. This software creates water supply pipes and water-using equipment in three dimensions, and can include information such as pipe height and water-using equipment connection points. Some companies have tried to use this information for automated design, but it is limited to the connection of a single water-using equipment and a single water supply pipe. It cannot consider the water supply pipe connection of all water-using equipment globally, so the degree of automation is not high. It is only slightly more efficient than the CAD design mode. Most of the work is still done manually, which is time-consuming and also greatly affects the development cycle. Summary of the Invention
[0005] The main objective of this invention is to solve the technical problem that the existing residential water supply layout requires manual completion, which affects the development cycle.
[0006] The first aspect of the present invention provides a method for residential water supply layout, comprising: acquiring a three-dimensional model of the residential building to be arranged and water supply parameters of each room in the three-dimensional model; calculating the runnable space of the water supply pipes in the three-dimensional model according to the water supply parameters; dividing the runnable space of the water supply pipes into a grid according to a preset visual algorithm to obtain the grid lines of the three-dimensional model; performing path planning on the grid lines with water-using devices in the three-dimensional model as the starting point and water meter devices in the three-dimensional model as the ending point to obtain the corresponding optimal path, and using the optimal path as the residential water supply line of the three-dimensional model.
[0007] Optionally, in a first implementation of the first aspect of the present invention, the step of calculating the traversable space of the water supply pipe of the three-dimensional model based on the water supply parameters includes: extracting the horizontal and vertical spaces corresponding to each room in the three-dimensional model based on the water supply parameters; and merging the horizontal and vertical spaces of all rooms to obtain the traversable space of the water supply pipe of the three-dimensional model.
[0008] Optionally, in a second implementation of the first aspect of the present invention, the step of dividing the walkable space of the water supply pipe into a grid according to a preset visual algorithm to obtain the grid lines of the three-dimensional model includes: converting the walkable space of the water supply pipe into multiple planar regions; determining obstacles in the three-dimensional model and obtaining the contour map of the obstacles in the planar regions, wherein the contour map includes contour endpoints and the contour lines where the contour endpoints are located; dividing the walkable space of the water supply pipe into a grid according to the contour endpoints of all obstacles in the walkable space of the water supply pipe and the contour endpoints, to obtain the grid lines of the three-dimensional model.
[0009] Optionally, in a third implementation of the first aspect of the present invention, the step of dividing the space accessible to the water supply pipe into a grid based on the contour endpoints of all obstacles and the contour endpoints to obtain the grid lines of the three-dimensional model includes: emitting rays from all contour endpoints along their respective contour lines, wherein the rays stop when they collide with other contour lines; determining, based on the water supply parameters, whether the room containing the rays emitted by each contour point is waterproof; if not, removing the rays from the non-waterproof room; and generating the grid lines of the three-dimensional model based on the removed rays.
[0010] Optionally, in a fourth implementation of the first aspect of the present invention, after generating the mesh lines of the three-dimensional model based on the removed rays, the method further includes: determining the direction of all mesh lines in the three-dimensional model; determining whether there are any mesh lines in the three-dimensional model whose direction is not orthogonal; if so, converting the mesh lines whose direction is not orthogonal into mesh lines with two orthogonal directions that are perpendicular to each other.
[0011] Optionally, in a fifth implementation of the first aspect of the present invention, the step of using the water-using equipment in the three-dimensional model as the starting point and the water meter device in the three-dimensional model as the ending point to perform path planning on the grid lines to obtain the corresponding optimal path includes: extracting all nodes in the grid points; generating multiple connected paths by using the nodes corresponding to the water-using equipment in the three-dimensional model as the starting point and the nodes corresponding to the water meter device in the three-dimensional model as the ending point; calculating the distance length of all connected paths according to a preset weight algorithm; and selecting the connected path with the longest distance length as the corresponding optimal path.
[0012] Optionally, in a sixth implementation of the first aspect of the present invention, calculating the distance length of all connected paths according to a preset weighting algorithm includes: obtaining a weight ratio parameter input by the user, wherein the weight ratio parameter includes a weight ratio for the number of turns, a weight ratio for the distance length, a weight ratio for the number of walls passed through, and a weight ratio for the number of intersections; determining the number of turns, line segment length, number of walls passed through, and number of intersections corresponding to each connected path; and calculating the distance length corresponding to each connected path based on the number of turns, line segment length, number of walls passed through, and number of intersections corresponding to each connected path and the weight ratio parameter.
[0013] A second aspect of the present invention provides a residential water supply layout device, comprising: an acquisition module for acquiring a three-dimensional model of the residential building to be arranged and water supply parameters of each room in the three-dimensional model; a space calculation module for calculating the runnable space of the water supply pipes in the three-dimensional model based on the water supply parameters; a grid division module for dividing the runnable space of the water supply pipes into grids according to a preset visibility algorithm to obtain grid lines of the three-dimensional model; and a path planning module for performing path planning on the grid lines with water-using devices in the three-dimensional model as starting points and water meter devices in the three-dimensional model as ending points to obtain the corresponding optimal path, and using the optimal path as the residential water supply line of the three-dimensional model.
[0014] In this embodiment, in the first implementation of the second aspect of the present invention, the spatial calculation module is specifically used to: extract the horizontal and vertical spaces corresponding to each room in the three-dimensional model according to the water supply parameters; and merge the horizontal and vertical spaces of all rooms to obtain the water supply pipe travel space of the three-dimensional model.
[0015] In this embodiment, in a second implementation of the second aspect of the present invention, the mesh division module specifically includes: a conversion unit, used to convert the walkable space of the water supply pipe into multiple planar regions; a contour acquisition unit, used to determine obstacles in the three-dimensional model and acquire the contour map of the obstacles in the planar regions, wherein the contour map includes contour endpoints and the contour lines where the contour endpoints are located; and a division unit, used to perform mesh division on the walkable space of the water supply pipe according to the contour endpoints of all obstacles in the walkable space of the water supply pipe and the contour endpoints, to obtain the mesh lines of the three-dimensional model.
[0016] In this embodiment, in the third implementation of the second aspect of the present invention, the dividing unit is specifically used to: emit rays along the contour lines of all contour endpoints, wherein the rays stop when they collide with other contour lines; determine whether the room where the rays emitted by each contour point are located is waterproof according to the water supply parameters; if not, remove the rays that are not waterproof in the room; and generate the mesh lines of the three-dimensional model based on the removed rays.
[0017] In this embodiment, in the fourth implementation of the second aspect of the present invention, the residential water supply layout device further includes a grid line modification module, which is specifically used to: determine the direction of all grid lines in the three-dimensional model; determine whether there are any grid lines in the three-dimensional model whose direction is not orthogonal; if so, convert the grid lines whose direction is not orthogonal into grid lines with two orthogonal directions that are perpendicular to each other.
[0018] In this embodiment, in the fifth implementation of the second aspect of the present invention, the path planning module specifically includes: a node extraction unit, used to extract all nodes in the grid points; a path generation unit, used to generate multiple connected paths by taking the nodes corresponding to the water-using equipment in the three-dimensional model as the starting point and the nodes corresponding to the water meter equipment in the three-dimensional model as the ending point; and a distance calculation unit, used to calculate the distance length of all connected paths according to a preset weight algorithm, and take the connected path with the shortest distance length as the corresponding optimal path.
[0019] In this embodiment, in the sixth implementation of the second aspect of the present invention, the distance calculation unit is specifically used to: obtain the weight ratio parameters input by the user, wherein the weight ratio parameters include the weight ratio of the number of turns, the weight ratio of the distance length, the weight ratio of the number of walls passed through, and the weight ratio of the number of intersections; determine the number of turns, the length of the line segment, the number of walls passed through, and the number of intersections corresponding to each connecting path; and calculate the distance length corresponding to each connecting path based on the number of turns, the length of the line segment, the number of walls passed through, and the number of intersections corresponding to each connecting path and the weight ratio parameters.
[0020] A third aspect of the present invention provides a residential water supply layout device, comprising: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; the at least one processor invokes the instructions in the memory to cause the residential water supply layout device to perform the steps of the aforementioned residential water supply layout method.
[0021] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the steps of the above-described residential water supply layout method.
[0022] In this invention, the technical solution involves acquiring a 3D model of the residence to be arranged and the water supply parameters of each room in the 3D model; calculating the runnable space for water supply pipes in the 3D model based on the water supply parameters; dividing the runnable space for water supply pipes into a grid according to a preset visual algorithm to obtain the grid lines of the 3D model; using water-using equipment in the 3D model as the starting point and water meter equipment in the 3D model as the ending point, performing path planning on the grid lines to obtain the corresponding optimal path, and using the optimal path as the residential water supply line in the 3D model. This method automatically identifies the residential floor plan layout and generates water supply pipes. This method differs from the purely manual 2D design of CAD and from the single-point water supply pipe generation function currently available on the market. This method combines practical engineering experience and analysis of diverse residential floor plans, extracting a set of universal and flexible algorithms, and combining them with fast computing power, allowing designers to generate a water supply pipe layout model of the entire residence in a short time, greatly shortening the design cycle and more intuitively expressing the design intent. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the first embodiment of the residential water supply layout method in this invention; Figure 2 This is a schematic diagram of a second embodiment of the residential water supply layout method in this invention; Figure 3 This is a schematic diagram of a third embodiment of the residential water supply layout method in this invention; Figure 4 This is a schematic diagram of one embodiment of the residential water supply layout device according to the present invention; Figure 5 This is a schematic diagram of another embodiment of the residential water supply arrangement device in this invention; Figure 6 This is a schematic diagram of one embodiment of the residential water supply layout equipment in this invention. Detailed Implementation
[0024] This application provides a method, apparatus, equipment, and storage medium for residential water supply layout. The method involves acquiring a 3D model of the residential building to be arranged and the water supply parameters of each room within the model; calculating the runnable space for water supply pipes in the 3D model based on the water supply parameters; dividing the runnable space into a grid using a preset visualization algorithm to obtain the grid lines of the 3D model; using water-using devices in the 3D model as starting points and water meters as ending points, performing path planning within the grid lines to obtain the corresponding optimal path, and using the optimal path as the residential water supply line in the 3D model. This method leverages the information inherent in 3D models and, combined with engineering experience, extracts a set of universal algorithms to ensure that the generated results maximally reproduce the actual water supply pipe layout scenario; it also solves the problem of slow rendering speed in existing technologies, enabling the generation of water supply pipes for an entire building in a short time.
[0025] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 The first embodiment of the residential water supply layout method in this invention includes: 101. Obtain the 3D model of the residence to be arranged and the water supply parameters of each room in the 3D model; It is understood that the executing entity of this invention can be a residential water supply system, a terminal, or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example.
[0027] In this embodiment, before arranging the water supply, the user needs to use Revit software to create a 3D model of the residence to be arranged. The 3D model of the residence to be arranged consists of 3D models of rooms, walls, beams, slabs, columns, water meters, and water-using equipment. The rooms are labeled with names so that the subsequent algorithm can directly obtain the parameter information of the required rooms.
[0028] In this embodiment, after generating a 3D model of the residence to be arranged, the user needs to input the water supply parameters of each room in the 3D model according to actual needs. The water supply parameters mainly define the water supply characteristics of different rooms, which affect the subsequent algorithm's arrangement of water supply pipes in that room. The water supply parameters include whether water supply pipes are allowed to pass through, whether the water supply pipes are arranged on the ceiling or subfloor of the room, etc. In addition, the water supply parameters can also be factors in other rooms that affect the arrangement of water supply pipes, which are not limited in this invention.
[0029] 102. Calculate the space where the water supply pipe can run in the three-dimensional model based on the water supply parameters; In this embodiment, the characteristics of different rooms are determined based on the water supply parameters of different rooms, and spatial extraction is performed based on the characteristics of each room. The data of the horizontal space and the vertical space in each room are extracted, and the horizontal space and vertical space of all rooms are merged to obtain the water supply pipe travel space of the three-dimensional model. The water supply pipe travel space is used to characterize the spatial area in the three-dimensional model where the water supply pipe can be arranged.
[0030] 103. The space in which the water supply pipe can run is divided into grids according to the preset visual algorithm to obtain the grid lines of the three-dimensional model; In this embodiment, each room is marked as waterproof or not waterproof based on the water supply parameters. Whether a room is waterproof or not will affect the grid line division parameters of that room. If the room is waterproof, grid lines can be generated at any position in the room. If the room is not waterproof, the grid lines must be arranged along the wall.
[0031] In this embodiment, the three-dimensional walkable space is transformed into a planar region. Based on whether the room is waterproof, a grid is constructed within the region. The grid must ensure that there are one or more compliant movement paths between each starting point and the ending point in the space. The improved VisibilityGraph algorithm is mainly used in the grid division process.
[0032] In this embodiment, after dividing the grid lines, it is necessary to define the obstacles in the room, distinguish which grid lines cannot be crossed and which can only be crossed perpendicularly. It is necessary to analyze the crossing relationship between water supply pipes and each type of obstacle in actual engineering. The obstacles include beams, slabs, columns, water meters and water-using equipment that make up the house to be arranged. At the same time, in order to meet the aesthetic requirements of water supply pipe layout, it is necessary to convert grid lines that are not orthogonal and match the relationship between the grid lines and the direction of the room walls. Find the room wall where the grid line is closest and match the grid line with the same perpendicular direction of the successfully matched relationship to ensure that the grid lines are divided along the wall.
[0033] 104. Using the water-using equipment in the 3D model as the starting point and the water meter equipment in the 3D model as the ending point, perform path planning on the grid lines to obtain the corresponding optimal path, and use the optimal path as the residential water supply line in the 3D model.
[0034] In this embodiment, the water supply pipe is used to connect the water-using equipment and the water meter. The layout of the residential water supply line is determined by calculating the optimal path between the two. The optimal path refers to the optimal distance between the two, which is affected by various factors, including the number of bends, the straight-line distance, the number of times the pipe passes through walls, and the number of times it intersects with other water supply pipes. The proportional relationship between different factors can be displayed in the operation interface. When the optimal path does not meet the user's needs, the weight ratio can be reset, and the algorithm will recalculate the optimal path and recommend it to the user. This operation continues until the generated path meets the user's needs. After the path is determined, it can be converted into a three-dimensional pipeline.
[0035] In this embodiment, the optimal path between two points is calculated using an improved Dijkstra algorithm. The algorithm automatically takes each water-using device in the 3D model as the starting point and the water meter as the ending point. The grid lines are divided as the movement route from the starting point to the ending point. By traversing the path algorithm, multiple connecting routes are obtained. The route records the number of turns, line segment length, number of walls passed through, and number of intersections. The values are multiplied by the corresponding weight ratio and converted into distance length. Finally, the shortest path is selected as the optimal path.
[0036] In this embodiment, a 3D model of the residence to be arranged and the water supply parameters of each room in the 3D model are obtained. The feasible space for water supply pipes in the 3D model is calculated based on the water supply parameters. The feasible space for water supply pipes is then divided into grids according to a preset visualization algorithm, resulting in grid lines for the 3D model. Using water-using devices in the 3D model as the starting point and water meters as the ending point, path planning is performed within the grid lines to obtain the corresponding optimal path, which is then used as the residential water supply line in the 3D model. This method leverages the information inherent in 3D models and, combined with engineering experience, extracts a set of universal algorithms to ensure that the generated results can reproduce the actual water supply pipe layout scene to the greatest extent possible. Simultaneously, it solves the problem of slow rendering speed in existing technologies, enabling the generation of water supply pipes for the entire building in a short time.
[0037] Please see Figure 2 The second embodiment of the residential water supply layout method in this invention includes: 201. Obtain the 3D model of the residence to be arranged and the water supply parameters of each room in the 3D model; 202. Extract the horizontal and vertical spaces corresponding to each room in the 3D model based on the water supply parameters; 203. Merge the horizontal and vertical spaces of all rooms to obtain the space where the water supply pipes can run in the three-dimensional model; 204. Convert the space where the water supply pipe can run into multiple planar regions; 205. Identify obstacles in the 3D model and obtain the outline of the obstacles in the planar region, wherein the outline includes the outline endpoints and the outline lines on which the outline endpoints are located; In this embodiment, a contour refers to a closed, non-self-intersecting polygon formed by a series of continuous points. A planar region refers to a planar space containing 0 or 1 outer contours and n (n>=0) inner contours. The outer contours and inner contours do not intersect, and the space enclosed by the inner contours is a subset of the space enclosed by the outer contours. Such a planar region can abstractly describe any inner and outer planar space in a 3D model.
[0038] In this embodiment, each contour map contains multiple edges, i.e. contour lines, and each contour line has multiple points, two of which are contour endpoints. The contour endpoints on the outer and inner contours of the planar region are extracted using the Revit API. In addition, when the contour contains curves, the curves are converted into polylines with a certain precision before the contour endpoints are extracted.
[0039] 206. Emit rays from all contour endpoints along the contour lines they belong to, wherein the rays stop when they collide with other contour lines; In this embodiment, each contour endpoint in the contour map is rayed outward along a direction parallel to its line, and collision events are detected. The process stops when a ray collides with the contour line of another contour. By traversing each contour line and the contour endpoints on the contour line, all rays are treated as grid lines.
[0040] In this embodiment, the visibility graph of the 3D image can be calculated first based on the ordinary Visibility Graph algorithm. After obtaining the visibility graph, grid lines can be obtained by replacing all the diagonal lines in the visibility graph with two corresponding mutually perpendicular lines.
[0041] 207. Based on the water supply parameters, determine whether the room where the rays emitted from each contour point are located is waterproof; 208. If not, then remove any non-waterproof rays from the room. 209. Generate the mesh lines of the 3D model based on the removed rays; In this embodiment, after generating the mesh lines of the three-dimensional model based on the removed rays, the method further includes determining the direction of all mesh lines in the three-dimensional model; determining whether there are any mesh lines in the three-dimensional model whose direction is not orthogonal; if so, converting the non-orthogonal mesh lines into mesh lines with two orthogonal directions that are perpendicular to each other.
[0042] Specifically, since the direction of the outline may not be orthogonal, and in order to meet the aesthetic requirements of the water supply pipe layout, it is necessary to ensure that the grid lines are orthogonal. Therefore, after obtaining the initial grid lines, it is necessary to replace the diagonal lines in the grid lines that are not orthogonal with two corresponding mutually perpendicular lines to obtain the grid lines.
[0043] 210. Using the water-using equipment in the 3D model as the starting point and the water meter equipment in the 3D model as the ending point, perform path planning on the grid lines to obtain the corresponding optimal path, and use the optimal path as the residential water supply line in the 3D model.
[0044] This embodiment, based on the previous embodiment, details the process of dividing the walkable space of the water supply pipe into a grid according to a preset visual algorithm to obtain the grid lines of the 3D model. This involves converting the walkable space of the water supply pipe into multiple planar regions; identifying obstacles in the 3D model and obtaining the contour maps of the obstacles within the planar regions, wherein the contour maps include contour endpoints and the contour lines containing the contour endpoints; and dividing the walkable space of the water supply pipe into a grid based on the contour endpoints of all obstacles and the contour endpoints themselves to obtain the grid lines of the 3D model. This method differs from purely manual 2D design in CAD and from the single-point generation functions for water supply pipes currently available on the market. This method combines practical engineering experience and analysis of diverse residential floor plans, extracting a universal and flexible algorithm. Combined with rapid computing power, this allows designers to generate a water supply pipe layout model for the entire building in a short time, significantly shortening the design cycle and more intuitively expressing design intent.
[0045] Please see Figure 3 The third embodiment of the residential water supply layout method in this invention includes: 301. Obtain the 3D model of the residence to be arranged and the water supply parameters of each room in the 3D model; 302. Calculate the space where the water supply pipe can run in the three-dimensional model based on the water supply parameters; 303. The space in which the water supply pipe can run is divided into grids according to the preset visual algorithm to obtain the grid lines of the three-dimensional model; 304. Extract all nodes from the grid points; 305. Using the nodes corresponding to the water-using equipment in the 3D model as the starting point and the nodes corresponding to the water meter equipment in the 3D model as the ending point, generate multiple connected paths. 306. Obtain the weight ratio parameters input by the user, wherein the weight ratio parameters include the weight ratio of the number of turns, the weight ratio of the distance length, the weight ratio of the number of walls passed through, and the weight ratio of the number of intersections. 307. Determine the number of turns, line segment lengths, number of wall penetrations, and number of intersections for each connecting path; In this embodiment, the number of turns refers to the number of times the connecting path changes direction, the line segment length refers to the length of the connecting path on the grid line, the number of wall penetrations refers to the number of times the connecting path crosses a wall, and the number of intersections refers to the number of times the connecting path intersects with other water supply pipes.
[0046] 308. Calculate the distance of each connecting path based on the number of turns, line segment length, number of wall penetrations, number of intersections, and weight ratio parameters, and take the connecting path with the shortest distance as the corresponding optimal path. 309. Use the optimal path as the residential water supply line in the three-dimensional model.
[0047] In this embodiment, an improved version of Dijkstra's algorithm is used. Dijkstra's algorithm is stable and adaptable to changes in network topology, making it a classic algorithm for path planning. The idea behind Dijkstra's algorithm is as follows: Let G = (V, E) be a weighted directed graph. Divide the set of vertices V into two groups. The first group is the set of vertices for which the shortest path has been found (denoted by S; initially, S contains only one source vertex. Each time a shortest path is found, it is added to set S until all vertices are added to S, at which point the algorithm terminates). The second group is the set of vertices for which the shortest path has not yet been determined (denoted by U). Vertices in the second group are added to S in ascending order of shortest path length. During the addition process, the shortest path length from the source vertex v to any vertex in S is always maintained at no greater than the shortest path length from the source vertex v to any vertex in U. In addition, each vertex corresponds to a distance. The distance between vertices in S is the shortest path length from v to this vertex, and the distance between vertices in U is the current shortest path length from v to this vertex, including only vertices in S as intermediate vertices.
[0048] In this embodiment, the algorithm automatically obtains each water-using device in the 3D model as the starting point, the water meter as the ending point, and the divided grid lines as the movement route from the starting point to the ending point. Through the traversal path algorithm, multiple connecting routes are obtained. The route records the number of turns, line segment length, number of walls passed through, and number of intersections. The values are multiplied by the corresponding weight ratio and converted into distance length. Finally, the shortest path is selected as the optimal path.
[0049] In this embodiment, the optimal path can also be calculated by extracting all nodes in the grid lines and determining the node corresponding to the water-using equipment in the 3D model as the starting point; adding the node as the starting point to a first set and adding all nodes except the starting point to a second set; calculating the distance between each node according to a preset weighting algorithm, repeatedly selecting the node 'a' from the second set that is closest to the node in the first set, adding node 'a' to the first set, deleting node 'a' from the second set, until all nodes have been traversed; and generating the corresponding optimal path according to the order of nodes selected from the second set and the starting point.
[0050] Specifically, the formula for calculating the weights in the above weighting algorithm is: f = ω1×f1 + ω2×f2 + ... + ωn×fn In the formula, f represents the distance length, n represents the total number of selection factors, f1, f2, ... and fn are the weights of each factor between two nodes, and ω1, ω2, ... and ωn are the weights corresponding to f1, f2, ... and fn, respectively.
[0051] This embodiment, based on the previous embodiment, describes in detail the process of using water-using devices in the 3D model as starting points and water meter devices in the 3D model as ending points for path planning on the grid lines to obtain the corresponding optimal path. This is achieved by extracting all nodes from the grid points; using the nodes corresponding to the water-using devices in the 3D model as starting points and the nodes corresponding to the water meter devices in the 3D model as ending points to generate multiple connected paths; calculating the distance of all connected paths according to a preset weighting algorithm, and selecting the connected path with the shortest distance as the corresponding optimal path. This method differs from purely manual 2D design in CAD and from the single-point generation functions for water supply pipelines currently available on the market. This method combines practical engineering experience and analysis of diverse residential floor plans, extracting a universal and flexible algorithm, and combining it with fast computing power, allowing designers to generate a water supply pipeline layout model for the entire building in a short time, greatly shortening the design cycle and more intuitively expressing design intent.
[0052] The residential water supply layout method in the embodiments of the present invention has been described above. The residential water supply layout device in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 4 One embodiment of the residential water supply arrangement device in this invention includes: The acquisition module 401 is used to acquire the three-dimensional model of the residence to be arranged and the water supply parameters of each room in the three-dimensional model; The spatial calculation module 402 is used to calculate the space available for the water supply pipe of the three-dimensional model based on the water supply parameters. The meshing module 403 is used to divide the space in which the water supply pipe can travel into a mesh according to a preset visual algorithm, so as to obtain the mesh lines of the three-dimensional model. The path planning module 404 is used to perform path planning on the grid lines with the water-using equipment in the three-dimensional model as the starting point and the water meter equipment in the three-dimensional model as the ending point, to obtain the corresponding optimal path, and to use the optimal path as the residential water supply line of the three-dimensional model.
[0053] In this embodiment of the invention, the residential water supply layout device operates the aforementioned residential water supply layout method. The device acquires a three-dimensional model of the residence to be arranged and the water supply parameters of each room in the three-dimensional model; calculates the runnable space of the water supply pipes in the three-dimensional model based on the water supply parameters; divides the runnable space of the water supply pipes into a grid according to a preset visual algorithm, obtaining the grid lines of the three-dimensional model; uses the water-using equipment in the three-dimensional model as the starting point and the water meter equipment in the three-dimensional model as the ending point, performs path planning on the grid lines to obtain the corresponding optimal path, and uses the optimal path as the residential water supply line of the three-dimensional model. This device utilizes the advantage of the information contained in the three-dimensional model, combined with engineering experience, to extract a set of universal algorithms, enabling the generated results to reproduce the real water supply pipe layout scene to the greatest extent; at the same time, it solves the problem of slow drawing speed in existing technologies, and can generate the water supply pipes of the entire building in a short time.
[0054] Please see Figure 5 The second embodiment of the residential water supply arrangement device in this invention includes: The acquisition module 401 is used to acquire the three-dimensional model of the residence to be arranged and the water supply parameters of each room in the three-dimensional model; The spatial calculation module 402 is used to calculate the space available for the water supply pipe of the three-dimensional model based on the water supply parameters. The meshing module 403 is used to divide the space in which the water supply pipe can travel into a mesh according to a preset visual algorithm, so as to obtain the mesh lines of the three-dimensional model. The path planning module 404 is used to perform path planning on the grid lines with the water-using equipment in the three-dimensional model as the starting point and the water meter equipment in the three-dimensional model as the ending point, to obtain the corresponding optimal path, and to use the optimal path as the residential water supply line of the three-dimensional model.
[0055] In this embodiment, the spatial calculation module 402 is specifically used to: extract the horizontal and vertical spaces corresponding to each room in the three-dimensional model according to the water supply parameters; and merge the horizontal and vertical spaces of all rooms to obtain the water supply pipe travel space of the three-dimensional model.
[0056] In this embodiment, the mesh division module 403 specifically includes: a conversion unit 4031, used to convert the walkable space of the water supply pipe into multiple planar regions; a contour acquisition unit 4032, used to determine the obstacles in the three-dimensional model and acquire the contour map of the obstacles in the planar regions, wherein the contour map includes contour endpoints and the contour lines where the contour endpoints are located; and a division unit 4033, used to perform mesh division on the walkable space of the water supply pipe according to the contour endpoints of all obstacles in the walkable space of the water supply pipe and the contour endpoints, to obtain the mesh lines of the three-dimensional model.
[0057] In this embodiment, the partitioning unit 4033 is specifically used to: emit rays from all contour endpoints along their respective contour lines, wherein the rays stop when they collide with other contour lines; determine whether the room where the rays emitted by each contour point are located is waterproof according to the water supply parameters; if not, remove the rays that are not waterproof in the room; and generate the mesh lines of the three-dimensional model based on the removed rays.
[0058] In this embodiment, the residential water supply layout device further includes a grid line modification module 405, which is specifically used to: determine the direction of all grid lines in the three-dimensional model; determine whether there are any grid lines in the three-dimensional model whose direction is not orthogonal; if so, convert the grid lines whose direction is not orthogonal into grid lines with two orthogonal directions that are perpendicular to each other.
[0059] In this embodiment, the path planning module 404 specifically includes: a node extraction unit 4041, used to extract all nodes in the grid points; a path generation unit 4042, used to generate multiple connected paths by taking the nodes corresponding to the water-using equipment in the 3D model as the starting point and the nodes corresponding to the water meter equipment in the 3D model as the ending point; and a distance calculation unit 4043, used to calculate the distance length of all connected paths according to a preset weight algorithm, and take the connected path with the shortest distance length as the corresponding optimal path.
[0060] In this embodiment, the distance calculation unit 4043 is specifically used to: obtain the weight ratio parameters input by the user, wherein the weight ratio parameters include the weight ratio of the number of turns, the weight ratio of the distance length, the weight ratio of the number of walls passed through, and the weight ratio of the number of intersections; determine the number of turns, the length of the line segment, the number of walls passed through, and the number of intersections corresponding to each connecting path; and calculate the distance length corresponding to each connecting path based on the number of turns, the length of the line segment, the number of walls passed through, and the number of intersections corresponding to each connecting path and the weight ratio parameters.
[0061] This embodiment, building upon the previous embodiment, details the specific functions of each module and the unit composition of some modules. It obtains a 3D model of the residence to be arranged and the water supply parameters of each room in the 3D model; calculates the runnable space for water supply pipes in the 3D model based on the water supply parameters; divides the runnable space for water supply pipes into a grid according to a preset visualization algorithm, obtaining the grid lines of the 3D model; uses water-using devices in the 3D model as starting points and water meters as ending points, performs path planning within the grid lines to obtain the corresponding optimal path, and uses the optimal path as the residential water supply line in the 3D model. This device combines practical engineering experience and analysis of diverse residential floor plans, extracting a set of universal and flexible algorithms. Combined with rapid computing power, it allows designers to generate a water supply pipe layout model of the entire residence in a short time, greatly shortening the design cycle and more intuitively expressing design intent.
[0062] above Figure 4 and Figure 5 The residential water supply layout device in this embodiment of the invention is described in detail from the perspective of modular functional entities. The residential water supply layout equipment in this embodiment of the invention is described in detail from the perspective of hardware processing.
[0063] Figure 6 This is a schematic diagram of a residential water supply layout device 600 provided in an embodiment of the present invention. The residential water supply layout device 600 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 610 (e.g., one or more processors) and a memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) storing application programs 633 or data 632. The memory 620 and storage media 630 can be temporary or persistent storage. The program stored in the storage media 630 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the residential water supply layout device 600. Furthermore, the processor 610 may be configured to communicate with the storage media 630 and execute the series of instruction operations in the storage media 630 on the residential water supply layout device 600 to implement the steps of the aforementioned residential water supply layout method.
[0064] The residential water supply system 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input / output interfaces 660, and / or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 6The residential water supply layout shown does not constitute a limitation on the residential water supply layout provided in this application. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0065] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the residential water supply layout method.
[0066] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0067] 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 computer-readable 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, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0068] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A residential water supply layout method, characterized in that, The residential water supply layout method includes: Obtain a 3D model of the residence to be arranged and the water supply parameters of each room in the 3D model; The available space for the water supply pipe in the three-dimensional model is calculated based on the water supply parameters. The space through which the water supply pipe can travel is divided into grids according to a preset visual algorithm, thereby obtaining the grid lines of the three-dimensional model; Using the water-using equipment in the 3D model as the starting point and the water meter equipment in the 3D model as the ending point, path planning is performed on the grid lines to obtain the corresponding optimal path, and the optimal path is used as the residential water supply line of the 3D model. The step of dividing the walkable space of the water supply pipe into a grid according to a preset visual algorithm to obtain the grid lines of the three-dimensional model includes: converting the walkable space of the water supply pipe into multiple planar regions; identifying obstacles in the three-dimensional model and obtaining the contour map of the obstacle in the planar region, wherein the contour map includes contour endpoints and the contour line where the contour endpoints are located; emitting rays from all contour endpoints along the contour line where they are located, wherein the rays stop when they collide with other contour lines; determining whether the room where the rays emitted by each contour point are located is waterproof according to the water supply parameters; if not, removing the rays where the room is not waterproof; and generating the grid lines of the three-dimensional model based on the removed rays.
2. The residential water supply layout method according to claim 1, characterized in that, The calculation of the traverseable space of the water supply pipe in the three-dimensional model based on the water supply parameters includes: Based on the water supply parameters, extract the horizontal and vertical spaces corresponding to each room in the three-dimensional model; By merging the horizontal and vertical spaces of all rooms, the space where the water supply pipes can run in the three-dimensional model is obtained.
3. The residential water supply layout method according to claim 1, characterized in that, After generating the mesh lines of the 3D model based on the removed rays, the method further includes: Determine the orientation of all grid lines in the 3D model; Determine whether there are any grid lines in the 3D model whose directions are not orthogonal; If they exist, grid lines that are not in orthogonal directions will be converted into grid lines that are in two orthogonal directions and perpendicular to each other.
4. The residential water supply layout method according to any one of claims 1-3, characterized in that, The step of using the water-using equipment in the 3D model as the starting point and the water meter device in the 3D model as the ending point to perform path planning on the grid lines to obtain the corresponding optimal path includes: Extract all nodes from the grid points; Using the nodes corresponding to the water-using devices in the 3D model as the starting point and the nodes corresponding to the water meter devices in the 3D model as the ending point, multiple connected paths are generated. Based on the preset weighting algorithm, calculate the distance of all connected paths and take the connected path with the shortest distance as the corresponding optimal path. The step of calculating the distance length of all connected paths according to a preset weighting algorithm includes: obtaining the weight ratio parameters input by the user, wherein the weight ratio parameters include the weight ratio of the number of turns, the weight ratio of the line segment length, the weight ratio of the number of walls passed through, and the weight ratio of the number of intersections; determining the number of turns, the line segment length, the number of walls passed through, and the number of intersections corresponding to each connected path; and calculating the distance length corresponding to each connected path based on the number of turns, the line segment length, the number of walls passed through, and the number of intersections corresponding to each connected path and the weight ratio parameters.
5. A residential water supply system, characterized in that, The residential water supply system includes: The acquisition module is used to acquire the three-dimensional model of the residence to be arranged and the water supply parameters of each room in the three-dimensional model; The spatial calculation module is used to calculate the space available for the water supply pipe of the three-dimensional model based on the water supply parameters. The mesh generation module is used to divide the space in which the water supply pipe can travel into a mesh according to a preset visual algorithm, so as to obtain the mesh lines of the three-dimensional model; The path planning module is used to perform path planning on the grid lines with water-using devices in the three-dimensional model as the starting point and water meter devices in the three-dimensional model as the ending point, to obtain the corresponding optimal path, and to use the optimal path as the residential water supply line of the three-dimensional model. The step of dividing the walkable space of the water supply pipe into a grid according to a preset visual algorithm to obtain the grid lines of the three-dimensional model includes: converting the walkable space of the water supply pipe into multiple planar regions; identifying obstacles in the three-dimensional model and obtaining the contour map of the obstacle in the planar region, wherein the contour map includes contour endpoints and the contour line where the contour endpoints are located; emitting rays from all contour endpoints along the contour line where they are located, wherein the rays stop when they collide with other contour lines; determining whether the room where the rays emitted by each contour point are located is waterproof according to the water supply parameters; if not, removing the rays where the room is not waterproof; and generating the grid lines of the three-dimensional model based on the removed rays.
6. A residential water supply system, characterized in that, The residential water supply system includes: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor invokes the instructions in the memory to cause the residential water supply layout device to perform the steps of the residential water supply layout method as described in any one of claims 1-4.
7. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the residential water supply layout method as described in any one of claims 1-4.
Citation Information
Patent Citations
Hydraulic pipe network quick arrangement method
CN107273577A
Basement domestic water supply pipe specification automatic calculation and route automatic generation device
CN113987635A