Method and device for constructing hydraulic simulation data

CN121682942BActive Publication Date: 2026-08-18BEIJING GENERAL MUNICIPAL ENG DESIGN & RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511532733.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2026-08-18
Estimated Expiration
2045-10-24

AI Technical Summary

Technical Problem

设计人员或工程师需要在不同软件间频繁切换,不仅效率低下,而且当原始BIM设计发生变更时,需要重复整个繁琐的数据转换流程,难以实现设计与分析的快速迭代

Benefits of technology

[0026]According to the technical solution of this application, for each visible component in the BIM model, the hydraulic role corresponding to the visible component is determined. Based on the determination of the hydraulic role, a first face dictionary, a connection element dictionary, and a connection face list are established. Based on the first face dictionary, a support DEM dictionary and a blocking DEM dictionary are determined, and based on the determined support DEM dictionary and the determined blocking DEM dictionary, a final support DEM dictionary is determined. Based on the first face dictionary and the connection face list, a connection DEM dictionary is determined. In this way, the construction of hydraulic simulation data is realized. In addition, in the process of constructing hydraulic simulation data, there is no need to frequently switch between different software, which improves efficiency. When the BIM design changes, it is not necessary to change only the BIM model, and the entire cumbersome data conversion process is not repeated. This enables rapid iteration of design and analysis, thus improving the conversion efficiency from BIM model to hydraulic simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121682942B_ABST
    Figure CN121682942B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for constructing hydraulic simulation data. The method comprises: determining a hydraulic role corresponding to each visible component in a BIM model; determining a first face dictionary, a connection element dictionary and a connection face list based on the determination result of the hydraulic role; processing bottom surface data and top surface data of the visible component whose corresponding hydraulic role is a connection element based on the connection element dictionary to determine a receiving area set and a centroid point set; determining a support DEM dictionary and a blocking DEM dictionary based on the first face dictionary, and determining a final support DEM dictionary based on the determined support DEM dictionary and the determined blocking DEM dictionary; and determining a connection DEM dictionary based on the first face dictionary and the connection face list. Thus, the conversion efficiency from the BIM model to the hydraulic simulation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the interdisciplinary field of Building Information Modeling and Computer Aided Engineering (CAE), and more specifically, to a method and apparatus for constructing hydraulic simulation data. Background Technology

[0002] With the acceleration of urbanization and the frequent occurrence of extreme weather events, accurate hydraulic simulation analysis (such as waterlogging analysis, flood evolution, and drainage system assessment) of urban built-up areas, individual buildings, and their surrounding environment has become increasingly important. Building Information Modeling (BIM), as a digital platform carrying information throughout the entire life cycle of a building, contains rich and accurate three-dimensional geometric and non-geometric attribute information, making it an ideal data source for such simulation analysis.

[0003] Applying BIM models to hydraulic simulation faces significant challenges. The entire data preparation process is fragmented across multiple heterogeneous software platforms, including Revit, GIS, and data processing scripts. Designers or engineers need to frequently switch between different software, which is not only inefficient but also requires repeating the entire cumbersome data conversion process when the original BIM design changes, hindering rapid iteration of design and analysis.

[0004] Therefore, improving the conversion efficiency from BIM models to hydraulic simulations has become a technical problem that needs to be solved in this field. Summary of the Invention

[0005] In view of this, this application proposes a method and apparatus for constructing hydraulic simulation data to improve the conversion efficiency from BIM model to hydraulic simulation.

[0006] Firstly, this application provides a method for constructing hydraulic simulation data. The method includes: for each visible component in a BIM model, determining the hydraulic role corresponding to that visible component; based on the determination of the hydraulic role, determining a first face dictionary, a connection element dictionary, and a connection face list, wherein, for the first face dictionary, the key is the face name of the first face, and the value is the face DEM dictionary of the first face, where the first face is the face of a visible component whose corresponding hydraulic role is one of support element, blocking element, or connection element; for the face DEM dictionary, the key is the planar coordinates of the mesh structure corresponding to the face of the visible component, and the value is the z-value elevation of the rasterized mesh structure corresponding to the face of the visible component; for the connection element dictionary, the key is the unique identifier of the visible component whose corresponding hydraulic role is a connection element, and the value is its corresponding hydraulic... The coordinate combination of the visible components whose role is a connecting element is determined. The coordinate combination includes the set of top vertex coordinates of the triangulated mesh structure of the top surface of the visible component, the set of bottom vertex coordinates of the triangulated mesh structure of the bottom surface of the visible component, and the unique identifier of the visible component. The connecting surface list includes the faces of the visible components whose hydraulic role is a connecting element. Based on the connecting element dictionary, the bottom and top surface data of the visible components whose hydraulic role is a connecting element are processed to determine the receiving area set and the centroid point set. Based on the first surface dictionary, the support DEM dictionary and the blocking DEM dictionary are determined, and the final support DEM dictionary is determined based on the determined support DEM dictionary and the determined blocking DEM dictionary. Based on the first surface dictionary and the connecting surface list, the connecting DEM dictionary is determined.

[0007] Optionally, based on the determination of the hydraulic role, the first face dictionary, the connection element dictionary, and the connection face list are determined, including: when the hydraulic role corresponding to the visible component is one of a support element, a blocking element, or a connection element, for each face corresponding to the visible component, the following steps are performed: using the planar coordinates corresponding to the mesh structure of the face as the key and the z-value elevation of the rasterized mesh structure of the face as the value, a face DEM dictionary is established; the face name of the face is used as the key and the established face DEM dictionary is used as the value to store it in the first face dictionary; the face is stored in the face list corresponding to the one of the above to determine the support face list, the blocking face list, or the connection face list; when the hydraulic role corresponding to the visible component is a connection element, the unique identifier of the visible component is used as the key and the coordinate combination of the visible component is used as the value to store it in the connection element dictionary, and the visible component is stored in the connection element list.

[0008] Optionally, if the hydraulic role corresponding to the visible component is one of a support element, a blocking element, or a connecting element, the construction method further includes, for each face corresponding to the visible component, storing the face name as a key and the unique identifier of the face as a value in a second face dictionary.

[0009] Optionally, based on the connection element dictionary, the bottom and top surface data of the visible components whose corresponding hydraulic role is a connection element are processed to determine the receiving area set and the centroid point set, including: traversing the connection element dictionary, and for each visible component whose corresponding hydraulic role is a connection element, performing the following: determining the bottom vertex coordinate set after the mesh structure of the bottom surface of the visible component is triangulated; based on the determined bottom vertex coordinate set, performing convex hull processing and deduplication processing to determine the receiving area and storing the determined receiving area in the receiving area set; performing reconstructed surface processing and storing the surface name of the reconstructed surface in the support surface list; establishing a surface DEM dictionary for the reconstructed surface and storing the surface name of the reconstructed surface as the key and the established surface DEM dictionary as the value in the first surface dictionary; determining the top vertex coordinate set after the mesh structure of the top surface of the visible component is triangulated; based on the determined top vertex coordinate set, performing convex hull processing, deduplication processing and centroid determination processing to determine the centroid point and storing the determined centroid point in the centroid point set.

[0010] Optionally, the construction method further includes: determining the floor to which the BIM model belongs; determining the top surface connected to the floor to which the BIM model belongs based on the floor to which the BIM model belongs and a preset set of top surfaces of external connecting components; for each determined top surface, establishing a surface DEM dictionary and storing the surface name of the top surface as the key and the established surface DEM dictionary as the value in a first surface dictionary, and storing the top surface in a support surface list.

[0011] Optionally, determining the supporting DEM dictionary and the blocking DEM dictionary based on the first face dictionary includes: determining the model DEM output range of the BIM model based on the second face dictionary; establishing a first empty dictionary and a second empty dictionary, wherein for the first empty dictionary and the second empty dictionary, the key is the planar coordinate determined based on the DEM output range of the BIM model, and the value is an empty numerical value; determining the supporting DEM dictionary based on the first empty dictionary and the first face dictionary; and determining the blocking DEM dictionary based on the second empty dictionary and the first face dictionary.

[0012] Optionally, determining the final support DEM dictionary based on the determined support DEM dictionary and the determined obstruction DEM dictionary includes: traversing the list of obstruction reduction elements, and for each visible component whose corresponding hydraulic role is obstruction reduction element, performing the following: determining the bounding coordinates of the visible component based on its bounding box; for the obstruction DEM dictionary, deleting keys and corresponding values ​​that are the same as the determined bounding coordinates; traversing the support DEM dictionary, and for each key, if there is a matching key in the obstruction DEM dictionary, replacing the corresponding value in the support DEM dictionary with the corresponding value in the obstruction DEM dictionary to determine the final support DEM dictionary.

[0013] Optionally, determining the connection DEM dictionary based on the first face dictionary and the connection face list includes: determining the connection DEM output range of visible components in the BIM model whose corresponding hydraulic role is a connection element; establishing a third empty dictionary, wherein, for the third empty dictionary, the key is the planar coordinate determined based on the connection DEM output range, and the value is an empty numerical value; and determining the connection DEM dictionary based on the third empty dictionary, the first face dictionary, and the connection face list.

[0014] Optionally, for each visible component in the BIM model, the hydraulic role corresponding to the visible component is determined, including: determining the hydraulic role corresponding to the visible component based on at least one of the component category, material category, family name, and instance parameters of the visible component.

[0015] Secondly, this application also provides a device for constructing hydraulic simulation data, the device comprising: a first determining module, configured to determine the hydraulic role corresponding to each visible component in the BIM model; a second determining module, configured to determine a first face dictionary, a connection element dictionary, and a connection face list based on the determination result of the hydraulic role, wherein, for the first face dictionary, the key is the face name of the first face, and the value is the face DEM dictionary of the first face, the first face being the face of a visible component whose corresponding hydraulic role is one of support element, blocking element, or connection element; for the face DEM dictionary, the key is the planar coordinates of the grid structure corresponding to the face of the visible component, and the value is the z-value elevation of the grid structure corresponding to the face of the visible component after rasterization; for the connection element dictionary, the key is the unique identifier of the visible component whose corresponding hydraulic role is a connection element, and the value is the unique identifier of the visible component whose corresponding hydraulic role is a connection element. The coordinate combination of the visible components of the connecting element includes the set of top vertex coordinates of the triangulated mesh structure of the top surface of the visible component, the set of bottom vertex coordinates of the triangulated mesh structure of the bottom surface of the visible component, and the unique identifier of the visible component; the connecting surface list includes the faces whose corresponding hydraulic roles are visible components in the connecting element; the third determining module is used to process the bottom and top surface data of the visible components whose corresponding hydraulic roles are connecting elements based on the connecting element dictionary to determine the receiving area set and the centroid point set; the fourth determining module is used to determine the support DEM dictionary and the blocking DEM dictionary based on the first surface dictionary, and to determine the final support DEM dictionary based on the determined support DEM dictionary and the determined blocking DEM dictionary; the fifth determining module is used to determine the connecting DEM dictionary based on the first surface dictionary and the connecting surface list.

[0016] Optionally, the second determining module determines a first face dictionary, a connection element dictionary, and a connection face list based on the determination result of the hydraulic role, including: when the hydraulic role corresponding to the visible component is one of a support element, a blocking element, or a connection element, for each face corresponding to the visible component, the following is performed: using the planar coordinates corresponding to the mesh structure of the face as the key and the z-value elevation of the rasterized mesh structure of the face as the value, a face DEM dictionary is established; the face name of the face is used as the key and the established face DEM dictionary is used as the value to store in the first face dictionary; the face is stored in the face list corresponding to the one of them to determine the support face list, the blocking face list, or the connection face list; when the hydraulic role corresponding to the visible component is a connection element, the unique identifier of the visible component is used as the key and the coordinate combination of the visible component is used as the value to store in the connection element dictionary, and the visible component is stored in the connection element list.

[0017] Optionally, the construction device further includes a storage module, configured to, when the hydraulic role corresponding to the visible component is one of a support element, a blocking element, or a connecting element, store the face name as a key and the unique identifier of the face as a value in a second face dictionary for each face corresponding to the visible component.

[0018] Optionally, based on the connection element dictionary, the bottom and top surface data of the visible components whose corresponding hydraulic role is a connection element are processed to determine the receiving area set and the centroid point set, including: traversing the connection element dictionary, and for each visible component whose corresponding hydraulic role is a connection element, performing the following: determining the bottom vertex coordinate set after the mesh structure of the bottom surface of the visible component is triangulated; based on the determined bottom vertex coordinate set, performing convex hull processing and deduplication processing to determine the receiving area and storing the determined receiving area in the receiving area set; performing reconstructed surface processing and storing the surface name of the reconstructed surface in the support surface list; establishing a surface DEM dictionary for the reconstructed surface and storing the surface name of the reconstructed surface as the key and the established surface DEM dictionary as the value in the first surface dictionary; determining the top vertex coordinate set after the mesh structure of the top surface of the visible component is triangulated; based on the determined top vertex coordinate set, performing convex hull processing, deduplication processing and centroid determination processing to determine the centroid point and storing the determined centroid point in the centroid point set.

[0019] Optionally, the construction device further includes: a sixth determining module for determining the floor to which the BIM model belongs; a seventh determining module for determining the top surface connected to the floor to which the BIM model belongs based on the floor to which the BIM model belongs and a preset set of top surfaces of external connecting components; and a storage module for creating a surface DEM dictionary for each determined top surface, storing the surface name of the top surface as a key and the created surface DEM dictionary as a value in a first surface dictionary, and storing the top surface in a support surface list.

[0020] Optionally, the fourth determining module determines a supporting DEM dictionary and a blocking DEM dictionary based on the first face dictionary, including: determining the model DEM output range of the BIM model based on the second face dictionary; establishing a first empty dictionary and a second empty dictionary, wherein for the first empty dictionary and the second empty dictionary, the key is the planar coordinate determined based on the DEM output range of the BIM model, and the value is an empty numerical value; determining the supporting DEM dictionary based on the first empty dictionary and the first face dictionary; and determining the blocking DEM dictionary based on the second empty dictionary and the first face dictionary.

[0021] Optionally, the fourth determining module determines the final support DEM dictionary based on the determined support DEM dictionary and the determined obstruction DEM dictionary, including: traversing the list of obstruction reduction elements, and for each visible component whose corresponding hydraulic role is obstruction reduction element, performing the following: determining the bounding coordinates of the visible component based on its bounding box; for the obstruction DEM dictionary, deleting keys and corresponding values ​​that are the same as the determined bounding coordinates; traversing the support DEM dictionary, and for each key, if there is a matching key in the obstruction DEM dictionary, replacing the corresponding value in the support DEM dictionary with the corresponding value in the obstruction DEM dictionary to determine the final support DEM dictionary.

[0022] Optionally, the fifth determining module determines the connection DEM dictionary based on the first face dictionary and the connection face list, including: determining the connection DEM output range of visible components in the BIM model whose corresponding hydraulic role is a connection element; establishing a third empty dictionary, wherein, for the third empty dictionary, the key is the planar coordinate determined based on the connection DEM output range, and the value is an empty numerical value; and determining the connection DEM dictionary based on the third empty dictionary, the first face dictionary, and the connection face list.

[0023] Optionally, the first determining module determines the hydraulic role corresponding to each visible component in the BIM model, including: determining the hydraulic role corresponding to the visible component based on at least one of the component category, material category, family name, and instance parameters of the visible component.

[0024] Thirdly, this application also provides a machine-readable storage medium storing instructions that cause a machine to execute the above-described construction method.

[0025] Fourthly, this application also provides an electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the executable instructions to implement the above-described construction method.

[0026] According to the technical solution of this application, for each visible component in the BIM model, the hydraulic role corresponding to the visible component is determined. Based on the determination of the hydraulic role, a first face dictionary, a connection element dictionary, and a connection face list are established. Based on the first face dictionary, a support DEM dictionary and a blocking DEM dictionary are determined, and based on the determined support DEM dictionary and the determined blocking DEM dictionary, a final support DEM dictionary is determined. Based on the first face dictionary and the connection face list, a connection DEM dictionary is determined. In this way, the construction of hydraulic simulation data is realized. In addition, in the process of constructing hydraulic simulation data, there is no need to frequently switch between different software, which improves efficiency. When the BIM design changes, it is not necessary to change only the BIM model, and the entire cumbersome data conversion process is not repeated. This enables rapid iteration of design and analysis, thus improving the conversion efficiency from BIM model to hydraulic simulation.

[0027] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0028] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application, and the illustrative embodiments and descriptions thereof are used to explain this application. In the drawings:

[0029] Figure 1 This is a flowchart of a method for constructing hydraulic simulation data according to a preferred embodiment of this application;

[0030] Figure 2 This is a structural block diagram of an apparatus for constructing hydraulic simulation data according to a preferred embodiment of this application. Detailed Implementation

[0031] The technical solution of this application will now be described in detail with reference to the accompanying drawings and embodiments.

[0032] In a first aspect, embodiments of this application provide a method for constructing hydraulic simulation data.

[0033] Figure 1 This is a flowchart illustrating a method for constructing hydraulic simulation data according to a preferred embodiment of this application. Figure 1 As shown, the construction method includes the following.

[0034] In step S10, for each visible component in the BIM model, the corresponding hydraulic role is determined. Specifically, for any visible component in the BIM model, the corresponding hydraulic role is the object in the hydraulic simulation that corresponds to that visible component when it is transferred to the hydraulic simulation.

[0035] Optionally, in this embodiment of the application, determining the hydraulic role corresponding to a visible component in the BIM model may include the following: determining the hydraulic role corresponding to the visible component based on at least one of the component category, material class, family name, and instance parameters.

[0036] Specifically, a classification rule is pre-defined, which indicates the correspondence between visible components and hydraulic roles based on their component category, material class, family name, and instance parameters. Specifically, multiple built-in lists can be used to store the component category name, material class name, family name, and instance parameters corresponding to different hydraulic roles.

[0037] If the component category includes "floor slab" or "beam," and the material category includes "concrete," "metal," "asphalt," "brick," "wood," or "turf," then the visible component's corresponding hydraulic role is a support element. The surface of this hydraulic element, especially its top surface, constitutes the basic plane for water flow support and movement. This visible component can be named a support component.

[0038] If the component category includes "wall", "curtain wall panel", "column", "staircase" or "special equipment", and the material category includes "concrete", "glass", "brick" or "wood", then the visible component's corresponding hydraulic role is a block element. The facade of this type of hydraulic element forms an obstruction to water flow. This visible component can be named a block component.

[0039] If a component category includes "stairs" or "special equipment," and a material category includes "concrete," "metal," or "asphalt," and the component instance does not contain keywords such as "handrail," "balustrade," or "guardrail," then the visible component's corresponding hydraulic role is a Link element. This type of hydraulic role connects support surfaces at different elevations and serves as a channel for water flow across floors; such a visible component can be named a Link component. Furthermore, for visible components classified as Special Equipment, filtering family instances can precisely identify components containing the specific identifier "escalator" as Link components. Within Special Equipment, families containing escalators can be created. Therefore, when filtering escalators, in addition to changing the class name to "Special Equipment," the final filter should also identify families within Special Equipment that contain escalators.

[0040] If the component category mainly includes "doors," then the hydraulic role corresponding to the visible component is an unblocking element. The area where this type of hydraulic element exists should be considered an unobstructed area, and the visible component can be named an unblocking component. In this embodiment, the "door" element will be recorded for subsequent processing to eliminate the blocking effect of the wall (block) at its location.

[0041] In this embodiment of the application, all visible components in the current 3D view can be traversed through the Revit IExportContext interface. During the OnElementBegin stage of the traversal, rules for real-time hydraulic semantic classification are established for each component (Element), that is, the corresponding hydraulic role is determined.

[0042] In subsequent program execution, rule matching is performed on objects representing the concepts of element, material, face, and mesh geometry. Based on the characteristics of the IExportContext interface, the current element (currentElement) is set in the OnElementBegin process, the current material (currentMaterial) is set in the OnMaterial process, and the current face (currentFace) is set in the OnFaceBegin process. This information is then used for filtering in the OnPolyMesh process.

[0043] In step S11, based on the determination results of the hydraulic roles, the first face dictionary, the connection element dictionary, and the connection face list are determined.

[0044] Specifically, for the first face dictionary, the key is the face name of the first face, and the value is the face DEM dictionary of the first face. The first face is the face of a visible component whose hydraulic role is one of support element, blocking element, or connecting element. For the face DEM dictionary, the key is the planar coordinates of the mesh structure corresponding to the face of the visible component, and the value is the z-value elevation of the rasterized mesh structure corresponding to the face of the visible component.

[0045] For the dictionary of connecting elements, the key is the unique identifier of the visible component whose corresponding hydraulic role is the connecting element, and the value is the coordinate combination of the visible component whose corresponding hydraulic role is the connecting element. The coordinate combination includes the set of top vertex coordinates after the triangulation of the mesh structure of the top surface of the visible component, the set of bottom vertex coordinates after the triangulation of the mesh structure of the bottom surface of the visible component, and the unique identifier of the visible component.

[0046] The list of connected faces includes faces whose corresponding hydraulic roles are visible components within the connected elements.

[0047] In step S12, based on the connection element dictionary, the bottom and top surface data of the visible components whose corresponding hydraulic roles are connection elements are processed to determine the receiving area set and the centroid point set.

[0048] In step S13, based on the first face dictionary, the support DEM dictionary and the blocking DEM dictionary are determined, and the final support DEM dictionary is determined based on the determined support DEM dictionary and the determined blocking DEM dictionary.

[0049] Among them, the support DEM dictionary corresponds to the face of the visible component whose corresponding hydraulic role is support element, and the composition of the key-value pairs is the same as that of the face DEM dictionary; the blocking DEM dictionary corresponds to the face of the visible component whose corresponding hydraulic role is blocking element, and the composition of the key-value pairs is the same as that of the face DEM dictionary; finally, the support DEM dictionary corresponds to the face of the visible component whose corresponding hydraulic role is support element and has blocking function.

[0050] In step S14, a connection DEM dictionary is determined based on the first face dictionary and the connection face list. The connection DEM dictionary is the face DEM dictionary of the visible components whose corresponding hydraulic role is a connection element.

[0051] Optionally, in this embodiment of the application, the determination of the first face dictionary, the connection element dictionary, and the connection face list based on the determination result of the hydraulic role may include the following:

[0052] When the hydraulic role of a visible component is one of a support element, a blocking element, or a connecting element, the following is performed for each face of the visible component. In other words, the following is performed for each first face. In this embodiment, the mesh geometry is extracted and filtered. In the onPolyMesh stage, the current geometry mesh corresponding to the current component, current material, and current face is obtained.

[0053] A surface DEM dictionary is created by using the planar coordinates corresponding to the mesh structure as the key and the z-value elevation of the rasterized mesh structure as the value. Specifically, the mesh structure of the surface is rasterized, and the string of x and y combinations of the planes within the mesh structure is the corresponding planar coordinate, which is used as the query key. For example, if x=200 and y=1000, the query would be "200,1000". The value corresponding to the query key is the rasterized z-value elevation. The scanning resolution of the mesh structure can be preset according to the resolution parameters provided by the user.

[0054] Optionally, in embodiments of this application, the following may also be included before establishing the surface DEM dictionary.

[0055] First, ensure that the geometry mesh is physically real (for the face, the face may have resolution but its actual existence is uncertain; the face only truly exists when it has a mesh structure), indicating that the current face (currenface) is a face with a shape that can be described.

[0056] The face names are used as keys, and the created face DEM dictionary is used as values ​​to store the first face dictionary, `faces`. The first face dictionary contains all key-value pairs corresponding to the first faces; it is a composite dictionary.

[0057] The faces are stored in a corresponding face list to determine whether they are support faces, block faces, or link faces. Specifically, the face names are stored in the face lists. If the hydraulic role of the visible component is a support element, the face name is stored in the support face list; if the hydraulic role of the visible component is a block element, the face name is stored in the block face list; and if the hydraulic role of the visible component is a link element, the face name is stored in the link face list. In this embodiment, all faces stored in the dictionary `faces` are categorized by storing three different types of faces in three corresponding lists: `supportfaces`, `blockfaces`, and `linkfaces`.

[0058] When the hydraulic role corresponding to a visible component is a connecting element, the unique identifier of the visible component is stored as the key, and the coordinate combination of the visible component is stored as the value in the connecting element dictionary, and the visible component is stored in the connecting element list. Specifically, the name of the visible component is stored in the connecting element list. The coordinate combination includes the set of coordinates of the top vertex of the triangulated mesh structure of the top surface of the visible component, the set of coordinates of the bottom vertex of the triangulated mesh structure of the bottom surface of the visible component, and the unique identifier of the visible component.

[0059] Specifically, in this embodiment, for each visible component whose corresponding hydraulic role is a connecting element, the following steps are performed: Determine the bottom surface of the visible component. Triangulate the mesh structure of the determined bottom surface to determine the set of coordinates of the bottom vertices and the set of points bot of the triangle vertices. Determine the top surface of the visible component. Triangulate the mesh structure of the determined top surface to determine the set of coordinates of the top vertices and the set of points top of the triangle vertices. Optionally, in this embodiment, the bottom and top surfaces of the visible component can be determined based on the surface normal vectors.

[0060] In this embodiment, the visible components (link components) whose corresponding hydraulic role is a connecting element are further processed to obtain the linktrigroups dictionary, i.e., the connecting element dictionary. For the connecting element dictionary, the key is the unique identifier (uuid) of the link component, and the corresponding query value is a combination. This combination includes the triangulated point set `top` (the set of triangulated top vertex coordinates) of the top mesh and the triangulated point set `bot` (the set of triangulated bottom vertex coordinates) of the bottom mesh, as well as the unique identifier (uuid) of the corresponding link component.

[0061] Optionally, in this embodiment, when the hydraulic role of a visible component is a drag-reducing element, the visible component is stored in a drag-reducing element list. Specifically, the name of the visible component is stored in the drag-reducing element list.

[0062] Optionally, in this embodiment, when the hydraulic role of the visible component is one of a support element, a blocking element, or a connecting element, the construction method further includes the following for each face of the visible component: The face name is stored as the key, and the unique identifier of the face is stored as the value in a second face dictionary. The second face dictionary includes multiple key-value pairs corresponding to the first face.

[0063] In this application implementation, all three types of faces stored in their respective face lists and the unique identifiers (uuid) corresponding to these faces are stored in a dictionary named face2element. The second dictionary uses face as the query key and uudi as the value, so that the face can be used to query the uuid later.

[0064] Optionally, in this embodiment of the application, based on the connection element dictionary, the bottom and top surface data of the visible components whose corresponding hydraulic role is a connection element are processed to determine the receiving area set and the centroid point set, which may include the following:

[0065] Iterate through the dictionary of connection elements, and for each visible component whose corresponding hydraulic role is a connection element, perform the following:

[0066] Determine the set of bottom vertex coordinates of the triangulated mesh structure of the visible component's base. Specifically, based on the unique identifier of the visible component, look up the corresponding value in the connection element dictionary to determine the set of bottom vertex coordinates of the triangulated mesh structure of the base.

[0067] Based on the determined set of bottom vertex coordinates, convex hull processing and deduplication processing are performed to determine the receiving area and the determined receiving area is stored in the receiving area set. Reconstruction surface processing is performed and the surface name of the reconstructed surface is stored in the support surface list. A surface DEM dictionary is built for the reconstructed surface and the surface name of the reconstructed surface is used as the key and the built surface DEM dictionary is used as the value to store in the first surface dictionary.

[0068] Specifically, in this embodiment, the bottom vertex coordinate set is determined, and convex hull processing, deduplication processing, and surface reconstruction processing are performed. The edge contours after convex hull processing and deduplication processing are used as the receiving zones for water flow, and the receiving zones are stored in the receiving zone set. After traversal, zones (a set of contour point sets) are obtained, i.e., the receiving zone set. After reconstructing the face, the reconstructed face is rasterized, and a corresponding face DEM dictionary is established. The face name of the reconstructed face is used as the key, and the established face DEM dictionary is used as the value, stored in the first face dictionary. In addition, the face name of the reconstructed face is stored in the support face list. It should be noted that here the reconstructed face is added to the support face list, not to the connection face list. The purpose is to extract the lowest face of the connecting member as a support and connect it with the original support face.

[0069] Determine the set of top vertex coordinates of the triangulated mesh structure of the top surface of the visible component. Specifically, based on the unique identifier of the visible component, look up the corresponding value in the connection element dictionary to determine the set of top vertex coordinates of the triangulated mesh structure of the top surface.

[0070] Based on the determined set of top vertex coordinates, convex hull processing, deduplication processing, and centroid determination processing are performed to determine the centroid point and store it in the centroid point set. In this embodiment, the set of points top (i.e., the set of top vertex coordinates) of the triangle vertices of the highest face (i.e., the top face) is obtained. Through convex hull processing, deduplication processing, and centroid determination processing, the centroid point is finally obtained and stored in the centroid point set. The centroid points of all top faces are obtained by traversing the set.

[0071] Previously, the user-provided import file, populated with the variable `_facesdocfilename`, was used as an external data file. Its contents were imported, and the `levelname` (the floor to which the BIM model belongs), obtained in this step, was used for filtering. The goal was to import all faces whose top surfaces are connected to the current floor into the `faces` object using the zone method. These faces were then added to `supportfaces`, meaning the faces were reconstructed using the zone method, and the reconstructed faces were added to `supportfaces`. Since the imported data is also a vertex dataset after triangulation of the mesh surface (mesh structure), the faces formed by this part of the mesh and their corresponding rasterized DEMs can also be obtained by calculating `zones` (a set of contour point sets). It's important to note the physical difference between `zone` and `zone`: `zone` refers to the contours of the same mesh surfaces in the current file's link components that are also in the current floor, while the imported file refers to the contours of the same mesh surfaces in the current floor's link components from other files; `zone` refers to the bottom face, while the imported file refers to the top face.

[0072] Optionally, in embodiments of this application, the construction method may further include the following:

[0073] Determine the floor to which the BIM model belongs.

[0074] Optionally, in this embodiment, the floor to which the BIM model belongs can be determined as follows: For each visible component in the list of connected elements, the lowest floor to which the visible component is connected is determined based on the bounding box of the visible component. All determined lowest floors are compared, and the smallest one is determined, which is the floor to which the BIM model belongs. Thus, automatic identification of the floor to which the BIM model belongs is achieved in this application.

[0075] Based on the floor level of the BIM model and the set of preset external connection component top surfaces, the top surfaces connected to the floor level of the BIM model are determined. For each determined top surface, a surface DEM dictionary is created, and the surface name of the top surface is used as the key and the created surface DEM dictionary is used as the value to store it in the first surface dictionary. The top surface is then stored in the support surface list.

[0076] In this application embodiment, one BIM model corresponds to one Revit file, and the same project includes multiple Revit files, that is, multiple BIM models. The preset external connection component top surface set includes the set of top surfaces of all connection components in other BIM models in the same project, excluding the BIM model being processed.

[0077] Specifically, in this embodiment, an external connection data file (facesdocfilename) can be set, and the user can specify an external file path. This external connection data file records the connection surface information (such as stairwells) passed down from other floors, enabling this method to handle cross-floor connection relationships. The external connection data file is a 3D point set of the mesh structure of the top surface of all connection components in multiple Revit files of the same project, divided by floor. When all connection components in all Revit files are connected to the current floor (the floor where the opened Revit file is located, i.e., the floor to which the Revit file being processed belongs), the output is the same floor. For example, a project contains four Revit files for four floors: 1F, B1F, B2F, and B3F (F represents the floor level, B represents the basement). In this application, an ALLmesh.TXT data file needs to be obtained first by outputting the mesh structure of the top surface of all connection components in the four Revit files. Assuming the Revit file being processed is at layer B1F, all data lines starting with B1F from the ALLmesh.TXT text file will be imported, generating a set of top support surfaces for external connection components, i.e., the preset set of top surfaces for external connection components described in this embodiment. Subsequent processing will then proceed.

[0078] Optionally, in this embodiment of the application, determining the supporting DEM dictionary and the blocking DEM dictionary based on the first face dictionary may include the following:

[0079] Based on the second dictionary, determine the output range of the BIM model's DEM.

[0080] Specifically, by iterating through all values ​​of `face2element` (i.e., the second-face dictionary) (i.e., the unique identifier of the face), the maximum bounding box objects (BoundingBoxes) of all components that generate the geometric shape of the face are obtained. The minx, miny, maxx, and maxy values ​​of all BoundingBox objects are then iterated through to obtain the minimum minx and miny, and the maximum maxx and maxy. A resolution (step) expansion is then performed to calculate the output range of the model DEM for this project, i.e., assigning values ​​to `_dem_min_x`, `_dem_min_y`, `_dem_max_x`, and `_dem_max_y`. In this application, "resolution expansion" refers to expanding the boundary of the range after calculating the total range composed of all components. For example, if the calculated minimum X-coordinate is min_x, and the user-defined resolution (step) is step, then the final minimum X-coordinate of the expanded range, `_dem_min_x`, will be assigned the value min_x - step. Similarly, the maximum X-coordinate, `_dem_max_x`, will be assigned the value max_x + step. The same process is applied to the Y-axis. This is to ensure that the generated DEM mesh completely covers all components, preventing data distortion caused by components falling precisely on the boundaries. "Final assignment" refers to storing these coordinate values, after edge expansion calculations, into four variables: _dem_min_x, _dem_min_y, _dem_max_x, and _dem_max_y, to define the total range for subsequent DEM generation.

[0081] A first empty dictionary and a second empty dictionary are established. For both dictionaries, the key is the planar coordinates determined based on the DEM output range of the BIM model, and the value is a numeric value (no value). In this embodiment, two empty dictionaries, a first empty dictionary and a second empty dictionary, are created respectively. The key is a query string for x and y values ​​created based on the DEM output range of the model, and the value is filled with the numeric value -32768 (no value). Both the first and second empty dictionaries contain multiple key-value pairs.

[0082] A support DEM dictionary is determined based on a first empty dictionary and a first face dictionary. Specifically, the value in the first empty dictionary is determined based on the face DEM dictionary in the first face dictionary. For example, for any key in the first empty dictionary, the face DEM dictionary corresponding to the face of a visible component with the hydraulic role of a support element is determined in the first dictionary (dictionary faces). In the determined face DEM dictionary, the face DEM dictionary corresponding to the key that is the same as the key in the first empty dictionary is determined, and the value corresponding to the determined face DEM dictionary is filled into the value corresponding to the key in the first empty dictionary. Optionally, in this embodiment, the face of a visible component with the hydraulic role of a support element can be determined based on a support face list.

[0083] A blocking DEM dictionary is determined based on a second empty dictionary and a first face dictionary. Specifically, the value in the second empty dictionary is determined based on the face DEM dictionary in the first face dictionary. For example, for any key in the second empty dictionary, the face DEM dictionary corresponding to the face of a visible component with a hydraulic role as a blocking element is determined in the first dictionary (dictionary faces). In the determined face DEM dictionary, the face DEM dictionary corresponding to the key with the same key in the second empty dictionary is determined, and the value corresponding to the determined face DEM dictionary is filled into the value corresponding to the key in the second empty dictionary. Optionally, in this embodiment, the face of a visible component with a hydraulic role as a blocking element can be determined based on a blocking face list.

[0084] Optionally, in this embodiment of the application, determining the final support DEM dictionary based on the determined support DEM dictionary and the determined blocking DEM dictionary may include the following:

[0085] The list of resistance-reducing elements is traversed. For each visible component whose corresponding hydraulic role is resistance-reducing, the following steps are performed. The list of resistance-reducing elements includes visible components whose corresponding hydraulic role is resistance-reducing. Based on the bounding box of the visible component, its bounding coordinates are determined. Specifically, based on the bounding box of the visible component, its xy bounding values ​​are determined, and the visible component is rasterized to obtain its bounding coordinates. For the obstruction DEM dictionary, keys and their corresponding values ​​that are identical to the determined bounding coordinates are deleted. That is, if a key exists in the obstruction DEM dictionary that is identical to the determined bounding coordinates, that key and its corresponding value are deleted. If no identical key exists, it is ignored. In this way, the height of the resistance-reducing component on the obstruction component can be eliminated, which is equivalent to this part being unobstructed.

[0086] The support DEM dictionary is traversed. For each key, if the same key exists in the blocking DEM dictionary, the corresponding value in the support DEM dictionary is replaced with the corresponding value in the blocking DEM dictionary to determine the final support DEM dictionary. In this way, the support surfaces with blocking functions are finally determined, and the final support DEM dictionary corresponds to the support surfaces with blocking functions. Here, the support surface is the surface of the visible component whose corresponding hydraulic role is the support element.

[0087] Optionally, in this embodiment of the application, determining the connection DEM dictionary based on the first face dictionary and the connection face list may include the following:

[0088] Determine the DEM output range of visible components in the BIM model whose corresponding hydraulic role is a connection element. The connection DEM output range refers to the DEM output range that can encompass all connection components.

[0089] In this embodiment of the application, the connecting components do not cover the entire floor. Therefore, in order to save the output file size, the connecting components are traversed, that is, the linkelements (list of connecting elements) are traversed to determine the overall output range size of all connecting components, _dem_min_x, _dem_min_y, _dem_max_x, and _dem_max_y, which is the output range of the connected DEM.

[0090] Specifically, for each connecting component, determine the maximum boundingBox object (i.e., the bounding box). Iterate through the minx, miny, maxx, and maxy values ​​of all the boundingBox objects corresponding to all connecting components to obtain the minimum minx and miny values ​​and the maximum maxx and maxy values. Then, perform a resolution (step) expansion to calculate the output range of the connected DEM, i.e., assign values ​​to _dem_min_x, _dem_min_y, _dem_max_x, and _dem_max_y.

[0091] Create a third empty dictionary, where the keys are planar coordinates determined based on the connected DEM output range, and the values ​​are empty numerical values. The third empty dictionary contains multiple key-value pairs. An empty numerical value can be -32768.

[0092] The connection DEM dictionary is determined based on the third empty dictionary, the first face dictionary, and the list of connected faces.

[0093] Specifically, the value in the third empty dictionary is determined based on the face DEM dictionary in the first face dictionary. For example, for any key in the third empty dictionary, the face DEM dictionary corresponding to the visible component face with the hydraulic role of a connecting element is determined in the first dictionary (dictionary faces). In the determined face DEM dictionary, the face DEM dictionary corresponding to the key with the same key in the third empty dictionary is determined, and the value corresponding to the determined face DEM dictionary is filled into the value corresponding to the key in the third empty dictionary. The face of the visible component with the hydraulic role of a connecting element can be determined based on the list of connecting faces.

[0094] Optionally, in this embodiment, data output is performed, including the receiving area set `zones`, the centroid point set `points`, the final supporting DEM dictionary `lastDEMs`, and the connecting DEM dictionary `linkDEM`. Specifically, the output can be formatted as files. The `zones` and `points` sets should output the highest and lowest layers, IDs, and point sets. Specifically, two text files (e.g., `zones.txt` and `points.txt`) are created. Then, the pre-calculated `zones` and `points` data sets in memory are traversed. For each element in the set, a string is concatenated according to the format "highest layer, lowest layer, ID, point set", and this string is written as a line to the corresponding text file. The `lastDEMs` and `linkDEM` sets should be output in ASCII data format as required.

[0095] Optionally, in this embodiment, error correction processing can be performed on the connecting components. Specifically, error correction processing on the visible components (i.e., connecting components) whose corresponding hydraulic role is a connecting element can include the following:

[0096] For each visible component in the list of connected elements, perform the following: Based on the bounding box of the visible component, determine the highest and lowest floors connected to the visible component. Specifically, by analyzing the bounding box of the visible component and its projection onto the elevations of all levels in the model, automatically determine the highest and lowest floors connected to the visible component.

[0097] If the highest and lowest floors are the same, the visible component is removed from the connection element list, and the face name of the corresponding face is moved to the support face list. If the highest and lowest floors of a visible component are the same, it means that it does not achieve cross-floor connection (e.g., a platform), so it is removed from the connection element list, and all its related faces are added to the support face list to correct the error. If the highest and lowest floors are the same, the visible component does not have the function of cross-floor water transport in the hydraulic simulation.

[0098] Optionally, in this embodiment, parameters can be pre-configured for initialization and user interaction. Specifically, in this embodiment, grid step size, unit data, and external connection data (facesdocfilename) can be pre-configured.

[0099] The technical solution provided in this application can begin with a user activating a plugin command in Revit. The plugin first pops up a user interface (Form) that allows the user to parametrically control the data generation process. These parameters form the basis for the flexibility and versatility of the implementation method.

[0100] The grid step size defines the size of the DEM grid cells, i.e., the resolution. Users can input a value (e.g., 200 mm) based on simulation accuracy requirements. The unit data control allows users to choose whether the output data is in meters or millimeters.

[0101] After the user confirms the parameters, the main execution flow of the method begins.

[0102] This application provides a novel, efficient, and automated method for directly converting 3D building models into core data required for hydraulic simulation within Revit software. Specifically, it provides a complete method for automating the processing of 3D BIM models within the Autodesk Revit software environment to generate datasets suitable for hydraulic simulation analysis. That is, it directly generates rasterized elevation data (DEM) and connectivity data suitable for hydraulic simulation analysis. This method is implemented through a Revit plugin, and its core workflow includes key steps such as user interaction, component semantic classification, geometric face extraction, rasterized elevation calculation, and connectivity resolution. It aims to solve the data barriers and efficiency bottlenecks in the conversion process from BIM models to hydraulic simulation models.

[0103] This application aims to establish a data channel between BIM models and hydraulic simulations, enabling a "one-click" conversion from detailed BIM models to simplified, effective simulation models, thereby significantly improving the efficiency and accuracy of hydraulic analysis. Specifically, the objectives of this application include the following aspects.

[0104] (1) Achieve process integration and automation. The aim is to create a plug-in tool embedded in Revit software, integrating the processes of data extraction, classification, simplification, and formatting, which were originally scattered across multiple software programs, into a unified environment. Users only need to make simple settings in Revit and execute commands to automatically complete the entire data generation process, avoiding cumbersome software switching and manual operation, and significantly shortening the preparation time for simulation.

[0105] (2) Establishing a semantic classification system for hydraulic simulation. The purpose of this application is to propose and implement an automated component classification logic based on the role of components in water flow. By analyzing the inherent properties of Revit components, such as category and material, the massive number of components in the model are automatically and intelligently classified into several categories, such as "supporting elements," "blocking elements," "connecting elements," and "blockage-reducing elements," laying the foundation for subsequent differentiated data processing. This classification based on hydraulic semantics is the key to achieving efficient and accurate modeling.

[0106] (3) Develop an efficient raster data generation algorithm. Addressing the core DEM data requirement for hydraulic simulation, this application aims to propose an efficient raster elevation extraction algorithm based on the vertical ray method. By generating a virtual vertical ray mesh within a specified range and calculating the intersections of these rays with the classified component surfaces, a DEM file containing terrain and obstacle elevation information can be generated accurately and quickly. This method directly extracts two-and-a-half-dimensional raster data from three-dimensional solid geometry, achieving effective dimensionality reduction and simplification of the BIM model.

[0107] (4) Automated identification and parameterized representation of connecting components. For key connecting components such as stairs and ramps, this application aims to achieve automatic analysis of their spatial connection relationships, automatically identify the upper and lower floors connected by the connecting components, and accurately extract their geometric ranges (Zones, receiving area set) and center points (Points, centroid point set) at the entrances and exits of different floors. This information is output as an independent, structured text file, providing direct data support for accurately defining the "connection relationship" of inter-floor water flow exchange in simulation software.

[0108] (5) Improve the flexibility and applicability of data processing. This application allows users to customize key processing parameters, such as the range of raster data, resolution (step size), and output unit (meter or millimeter), to adapt to the requirements of different hydraulic simulation software and the analysis accuracy requirements of different scenarios. At the same time, it provides the function of automatically calculating the model range, simplifying user operation.

[0109] By achieving the above objectives, this application closely integrates the geometric advantages of BIM models with the analytical capabilities of hydraulic simulation, providing architects and engineers with a powerful and convenient tool that enables them to quickly assess the hydraulic performance of a design in the early stages of the design process. This, in turn, better guides flood control and drainage design and enhances the resilience of buildings and the urban environment.

[0110] The technical solutions provided by the embodiments of this application have achieved significant technical progress and beneficial effects in practical applications, mainly reflected in the following aspects.

[0111] (1) Revolutionary improvement in efficiency. Compared with the cumbersome, multi-step, and manual conversion process of existing technologies that rely on "Revit -> intermediate format -> GIS / data processing software -> simulation software", this application realizes "one-click" automated processing within Revit. The data preparation work that may have taken several hours or even days can be completed in a few minutes to a dozen minutes (the specific time depends on the complexity of the model and the performance of the computer). This greatly saves the time cost of engineers and designers, making it possible to compare the hydraulic performance of multiple schemes in the early stage of design, so as to discover and optimize potential problems in the design earlier.

[0112] (2) Guarantee of data accuracy and fidelity. Since the entire data conversion process is completed in a unified Revit environment, problems such as data loss, accuracy degradation, or coordinate system misalignment caused by multiple format conversions are avoided. This method directly operates on Revit's underlying geometry API, enabling the extraction of surface geometric information of components with extremely high precision (double-precision floating-point numbers). By generating a DEM based on the intersection of vertical rays and the original 3D surface, the accuracy of the raster elevation is guaranteed, and the results are far more reliable than methods based on simplified models or contour interpolation.

[0113] (3) High degree of automation and intelligence. One of the biggest innovations of this application is its automated semantic classification mechanism for hydraulic analysis. By pre-setting rules, it automatically identifies the hydraulic roles of components such as "support", "block", "connection" and "resistance reduction", solving the huge pain point of manual interpretation and separation of components in the prior art. In addition, intelligent processing such as automatic calculation of model range, dynamic correction of connection component classification and automatic identification of connection ports further reduces manual intervention and lowers the complexity of operation and the possibility of errors.

[0114] (4) Flexibility and universality of model conversion. This application provides a user-defined resolution option, which can flexibly adapt to the specific requirements of different hydraulic simulation software for input data.

[0115] (5) Integration of Design and Analysis. Embedding data generation tools within the BIM creation environment breaks down the barriers between design and analysis. When architectural designs are modified (e.g., adjusting ground slope, changing wall positions, or adding doorways), users do not need to repeat complex external processes; they can simply rerun this method in Revit to quickly update the dataset required for the simulation. This ability to iterate rapidly is crucial for performance-based design and optimization.

[0116] (6) Precise description of key connection elements is achieved. This application provides particularly detailed processing of cross-floor connection components such as stairs and ramps. It not only generates the DEM of these connection components themselves, but more importantly, it can automatically extract their connection relationships (connected floors) and the location and extent of entrances and exits on each floor (Points and Zones files). This is a significant challenge and weakness in the prior art. This precise connection data provides unprecedented detail and accuracy for simulation software to simulate the transmission of water flow between different floors (such as overflow in stairwells), which is of great significance for flood analysis inside buildings.

[0117] In summary, this application, through technological innovation, successfully lightweights, semanticizes, and formats complex BIM models, transforming them into high-quality data that can be directly used for hydraulic simulation. This solves the long-standing data conversion problem that has plagued the industry. The resulting benefits, including increased efficiency, guaranteed accuracy, high automation, and integrated design and analysis, will strongly promote the in-depth application of BIM technology in fields such as urban flood control, sponge city construction, and building water supply and drainage design. It has significant engineering practical value and broad market prospects.

[0118] Secondly, embodiments of this application provide an apparatus for constructing hydraulic simulation data.

[0119] Figure 2 This is a structural block diagram of a device for constructing hydraulic simulation data according to a preferred embodiment of this application. Figure 2 As shown, the construction device includes a first determining module 10, a second determining module 20, a third determining module 30, a fourth determining module 40, and a fifth determining module 50.

[0120] The first determining module 10 is used to determine the hydraulic role corresponding to each visible component in the BIM model.

[0121] The second determining module 20 is used to determine a first face dictionary, a connection element dictionary, and a connection face list based on the determination result of the hydraulic role. For the first face dictionary, the key is the face name of the first face, and the value is the face DEM dictionary of the first face. The first face is the face of a visible component whose corresponding hydraulic role is one of support element, blocking element, or connection element. For the face DEM dictionary, the key is the planar coordinates of the mesh structure corresponding to the face of the visible component, and the value is the z-value elevation of the rasterized mesh structure corresponding to the face of the visible component. For the connection element dictionary, the key is the unique identifier of the visible component whose corresponding hydraulic role is a connection element, and the value is the coordinate combination of the visible component whose corresponding hydraulic role is a connection element. The coordinate combination includes the set of top vertex coordinates of the triangulated mesh structure of the top face of the visible component, the set of bottom vertex coordinates of the triangulated mesh structure of the bottom face of the visible component, and the unique identifier of the visible component. The connection face list includes the faces of visible components whose corresponding hydraulic role is a connection element.

[0122] The third determining module 30 is used to process the bottom and top surface data of the visible components whose corresponding hydraulic roles are connecting elements based on the connecting element dictionary, and to determine the receiving area set and the centroid point set.

[0123] The fourth determining module 40 is used to determine the supporting DEM dictionary and the blocking DEM dictionary based on the first face dictionary, and to determine the final supporting DEM dictionary based on the determined supporting DEM dictionary and the determined blocking DEM dictionary.

[0124] The fifth determining module 50 is used to determine the connection DEM dictionary based on the first face dictionary and the connection face list.

[0125] Optionally, the second determining module determines the first face dictionary, the connection element dictionary, and the connection face list based on the determination result of the hydraulic role, including: when the hydraulic role corresponding to the visible component is one of the support element, the blocking element, or the connection element, for each face corresponding to the visible component, the following is performed: using the plane coordinates corresponding to the mesh structure of the face as the key and the z-value elevation of the rasterized mesh structure of the face as the value, a face DEM dictionary is established; the face name of the face is used as the key and the established face DEM dictionary is used as the value to store the face in the first face dictionary; the face is stored in the face list corresponding to one of the roles to determine the support face list, the blocking face list, or the connection face list; when the hydraulic role corresponding to the visible component is a connection element, the unique identifier of the visible component is used as the key and the coordinate combination of the visible component is used as the value to store the connection element dictionary, and the visible component is stored in the connection element list.

[0126] Optionally, the construction device further includes a storage module, used to store the face name as a key and the unique identifier of the face as a value in a second face dictionary when the hydraulic role corresponding to the visible component is one of a support element, a blocking element, or a connecting element.

[0127] Optionally, based on the connection element dictionary, the bottom and top surface data of the visible components whose corresponding hydraulic role is a connection element are processed to determine the receiving area set and the centroid point set. This includes: traversing the connection element dictionary, and for each visible component whose corresponding hydraulic role is a connection element, performing the following: determining the bottom vertex coordinate set after the mesh structure of the bottom surface of the visible component is triangulated; based on the determined bottom vertex coordinate set, performing convex hull processing and deduplication processing to determine the receiving area and storing the determined receiving area in the receiving area set; performing reconstructed surface processing and storing the surface name of the reconstructed surface in the support surface list; establishing a surface DEM dictionary for the reconstructed surface and storing the surface name of the reconstructed surface as the key and the established surface DEM dictionary as the value in the first surface dictionary; determining the top vertex coordinate set after the mesh structure of the top surface of the visible component is triangulated; based on the determined top vertex coordinate set, performing convex hull processing, deduplication processing, and centroid determination processing to determine the centroid point and storing the determined centroid point in the centroid point set.

[0128] Optionally, the construction device further includes: a sixth determining module for determining the floor to which the BIM model belongs; a seventh determining module for determining the top surface connected to the floor to which the BIM model belongs based on the floor to which the BIM model belongs and a preset set of top surfaces of external connecting components; and a storage module for creating a surface DEM dictionary for each determined top surface, storing the surface name of the top surface as the key and the created surface DEM dictionary as the value in a first surface dictionary, and storing the top surface in a support surface list.

[0129] Optionally, the fourth determining module determines the supporting DEM dictionary and the blocking DEM dictionary based on the first face dictionary, including: determining the model DEM output range of the BIM model based on the second face dictionary; establishing a first empty dictionary and a second empty dictionary, wherein for the first empty dictionary and the second empty dictionary, the key is the planar coordinate determined based on the DEM output range of the BIM model, and the value is an empty numerical value; determining the supporting DEM dictionary based on the first empty dictionary and the first face dictionary; and determining the blocking DEM dictionary based on the second empty dictionary and the first face dictionary.

[0130] Optionally, the fourth determining module determines the final support DEM dictionary based on the determined support DEM dictionary and the determined obstruction DEM dictionary, including: traversing the list of obstruction reduction elements, and for each visible component whose corresponding hydraulic role is obstruction reduction element, performing the following: determining the bounding coordinates of the visible component based on its bounding box; for the obstruction DEM dictionary, deleting keys and corresponding values ​​that are the same as the determined bounding coordinates; traversing the support DEM dictionary, and for each key, if there is a corresponding key in the obstruction DEM dictionary, replacing the corresponding value in the support DEM dictionary with the corresponding value in the obstruction DEM dictionary to determine the final support DEM dictionary.

[0131] Optionally, the fifth determining module determines the connection DEM dictionary based on the first face dictionary and the connection face list, including: determining the connection DEM output range of visible components in the BIM model whose corresponding hydraulic role is a connection element; establishing a third empty dictionary, wherein, for the third empty dictionary, the key is the planar coordinate determined based on the connection DEM output range, and the value is an empty numerical value; and determining the connection DEM dictionary based on the third empty dictionary, the first face dictionary, and the connection face list.

[0132] Optionally, the first determining module determines the hydraulic role corresponding to each visible component in the BIM model, including: determining the hydraulic role corresponding to the visible component based on at least one of the component category, material category, family name, and instance parameters of the visible component.

[0133] The working principle and benefits of the hydraulic simulation data construction device provided in this application are similar to those of the hydraulic simulation data construction method provided in this application, and will not be repeated here.

[0134] Thirdly, this application also provides a machine-readable storage medium storing instructions that cause a machine to execute the above-described construction method.

[0135] Fourthly, this application also provides an electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the executable instructions to implement the above-described construction method.

[0136] The preferred embodiments of this application have been described in detail above. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solution of this application, and these simple modifications all fall within the protection scope of this application.

[0137] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this application will not describe the various possible combinations separately.

[0138] Furthermore, various different implementations of this application can be combined in any way, as long as they do not violate the spirit of this application, they should also be regarded as the content disclosed in this application.

Claims

1. A method for constructing hydraulic simulation data, characterized in that, The construction method includes: For each visible component in the BIM model, determine the corresponding hydraulic role of the visible component; Based on the determination of hydraulic roles, a first face dictionary, a connection element dictionary, and a connection face list are determined. For the first face dictionary, the key is the face name of the first face, and the value is the face DEM dictionary of the first face. The first face is the face of a visible component whose hydraulic role is one of support element, blocking element, or connection element. For the face DEM dictionary, the key is the planar coordinates of the mesh structure corresponding to the visible component's face, and the value is the rasterized z-elevation of the mesh structure corresponding to the visible component's face. For the connection element dictionary, the key is the unique identifier of the visible component whose hydraulic role is a connection element, and the value is a combination of coordinates of the visible component whose hydraulic role is a connection element. The coordinate combination includes the set of top vertex coordinates of the triangulated mesh structure of the top face of the visible component, the set of bottom vertex coordinates of the triangulated mesh structure of the bottom face of the visible component, and the unique identifier of the visible component. The connection face list includes the faces of visible components whose hydraulic role is a connection element. Based on the dictionary of connecting elements, the bottom and top surface data of the visible components that correspond to the hydraulic role of connecting elements are processed to determine the set of receiving areas and the set of centroid points. Based on the first surface dictionary, the supporting DEM dictionary and the blocking DEM dictionary are determined, and the final supporting DEM dictionary is determined based on the determined supporting DEM dictionary and the determined blocking DEM dictionary. Based on the first face dictionary and the connection face list, determine the connection DEM dictionary; Based on the determination of the hydraulic role, the dictionary of the first face, the dictionary of connecting elements, and the list of connecting faces are determined, including: When the hydraulic role corresponding to the visible component is one of a support element, a blocking element, or a connecting element, the following is performed for each face of the visible component: A surface DEM dictionary is established by using the planar coordinates corresponding to the mesh structure of the surface as the key and the z-value elevation of the surface after the mesh structure is rasterized as the value. Store the face name as the key and the established face DEM dictionary as the value in the first face dictionary; Store the surface in the surface list corresponding to one of them to determine the support surface list, the blocking surface list, or the connecting surface list; When the hydraulic role corresponding to the visible component is a connecting element, the unique identifier of the visible component is stored as the key and the coordinate combination of the visible component is stored as the value in the connecting element dictionary, and the visible component is stored in the connecting element list; Wherein, when the hydraulic role corresponding to the visible component is one of a support element, a blocking element, or a connecting element, for each face corresponding to the visible component, the construction method further includes: storing the face name as a key and the unique identifier of the face as a value in a second face dictionary; Specifically, based on the connection element dictionary, the bottom and top surface data of the visible components whose corresponding hydraulic roles are connection elements are processed to determine the receiving area set and the centroid point set, including: The dictionary of connection elements is traversed, and for each visible component whose corresponding hydraulic role is a connection element, the following is performed: Determine the set of bottom vertex coordinates of the triangulated mesh structure of the bottom surface of the visible component; Based on the determined set of bottom vertex coordinates, convex hull processing and deduplication processing are performed to determine the receiving area and the determined receiving area is stored in the receiving area set. Reconstruction surface processing is performed and the surface name of the reconstructed surface is stored in the support surface list. A surface DEM dictionary is built for the reconstructed surface and the surface name of the reconstructed surface is used as the key and the built surface DEM dictionary is used as the value to store in the first surface dictionary. Determine the set of top vertex coordinates of the triangulated mesh structure of the top surface of the visible component; Based on the determined set of top vertex coordinates, convex hull processing, deduplication processing, and centroid determination processing are performed to determine the centroid points and store them in the centroid point set.

2. The construction method according to claim 1, characterized in that, This construction method also includes: Determine the floor to which the BIM model belongs; Based on the floor to which the BIM model belongs and the set of preset external connection component top surfaces, determine the top surface connected to the floor to which the BIM model belongs; For each determined top surface, a surface DEM dictionary is created, and the surface name of the top surface is used as the key and the created surface DEM dictionary is used as the value to store it in the first surface dictionary. The top surface is then stored in the support surface list.

3. The construction method according to claim 1, characterized in that, Based on the first face dictionary, the supporting DEM dictionary and the blocking DEM dictionary are determined, including: Based on the second dictionary, the output range of the model DEM of the BIM model is determined; Establish a first empty dictionary and a second empty dictionary, wherein for the first empty dictionary and the second empty dictionary, the key is the planar coordinate determined based on the DEM output range of the BIM model, and the value is an empty numerical value; Based on the first empty dictionary and the first face dictionary, determine the supporting DEM dictionary; Based on the second empty dictionary and the first face dictionary, the blocking DEM dictionary is determined.

4. The construction method according to claim 1, characterized in that, The final support DEM dictionary is determined based on the established support DEM dictionary and the established blocking DEM dictionary, including: Iterate through the list of resistance-reducing elements, and for each visible component whose corresponding hydraulic role is a resistance-reducing element, perform the following: Based on the bounding box of the visible component, determine the bounding coordinates of the visible component; For the blocking DEM dictionary, delete the keys and corresponding values ​​that are the same as the determined bounding coordinates; The supporting DEM dictionary is traversed. For each key, if there is a matching key in the blocking DEM dictionary, the corresponding value in the supporting DEM dictionary is replaced with the corresponding value in the blocking DEM dictionary to determine the final supporting DEM dictionary.

5. The construction method according to claim 1, characterized in that, Based on the first face dictionary and the connection face list, the connection DEM dictionary is determined, including: Determine the DEM output range of visible components whose corresponding hydraulic role is a connection element in the BIM model; Establish a third empty dictionary, wherein the key of the third empty dictionary is the planar coordinate determined based on the output range of the connected DEM, and the value is an empty numerical value; Based on the third empty dictionary, the first face dictionary, and the connection face list, the connection DEM dictionary is determined.

6. The construction method according to claim 1, characterized in that, For each visible component in the BIM model, determine the hydraulic role corresponding to the visible component, including: The hydraulic role corresponding to the visible component is determined based on at least one of the component category, material category, family name, and instance parameters of the visible component.

7. A device for constructing hydraulic simulation data, characterized in that, The construction device includes: The first determining module is used to determine the hydraulic role corresponding to each visible component in the BIM model. The second determining module is used to determine a first face dictionary, a connection element dictionary, and a connection face list based on the determination result of the hydraulic role. For the first face dictionary, the key is the face name of the first face, and the value is the face DEM dictionary of the first face. The first face is the face of a visible component whose corresponding hydraulic role is one of support element, blocking element, or connection element. For the face DEM dictionary, the key is the planar coordinates of the mesh structure corresponding to the face of the visible component, and the value is the z-value elevation of the rasterized mesh structure corresponding to the face of the visible component. For the connection element dictionary, the key is the unique identifier of the visible component whose corresponding hydraulic role is a connection element, and the value is the coordinate combination of the visible component whose corresponding hydraulic role is a connection element. The coordinate combination includes the set of top vertex coordinates of the triangulated mesh structure of the top face of the visible component, the set of bottom vertex coordinates of the triangulated mesh structure of the bottom face of the visible component, and the unique identifier of the visible component. The connection face list includes the faces of visible components whose corresponding hydraulic role is a connection element. The third determining module is used to process the bottom and top surface data of the visible components whose corresponding hydraulic role is a connecting element based on the connecting element dictionary, and to determine the receiving area set and the centroid point set. The fourth determining module is used to determine the supporting DEM dictionary and the blocking DEM dictionary based on the first surface dictionary, and to determine the final supporting DEM dictionary based on the determined supporting DEM dictionary and the determined blocking DEM dictionary. The fifth determining module is used to determine the connection DEM dictionary based on the first face dictionary and the connection face list; The second determining module, based on the determination result of the hydraulic role, determines the first face dictionary, the connection element dictionary, and the connection face list, including: When the hydraulic role corresponding to the visible component is one of a support element, a blocking element, or a connecting element, the following is performed for each face of the visible component: A surface DEM dictionary is established by using the planar coordinates corresponding to the mesh structure of the surface as the key and the z-value elevation of the surface after the mesh structure is rasterized as the value. Store the face name as the key and the established face DEM dictionary as the value in the first face dictionary; Store the surface in the surface list corresponding to one of them to determine the support surface list, the blocking surface list, or the connecting surface list; When the hydraulic role corresponding to the visible component is a connecting element, the unique identifier of the visible component is stored as the key and the coordinate combination of the visible component is stored as the value in the connecting element dictionary, and the visible component is stored in the connecting element list; The construction device further includes a storage module, which, when the hydraulic role corresponding to the visible component is one of a support element, a blocking element, or a connecting element, stores the face name as a key and the unique identifier of the face as a value in a second face dictionary for each face corresponding to the visible component. Specifically, based on the connection element dictionary, the bottom and top surface data of the visible components whose corresponding hydraulic roles are connection elements are processed to determine the receiving area set and the centroid point set, including: The dictionary of connection elements is traversed, and for each visible component whose corresponding hydraulic role is a connection element, the following is performed: Determine the set of bottom vertex coordinates of the triangulated mesh structure of the bottom surface of the visible component; Based on the determined set of bottom vertex coordinates, convex hull processing and deduplication processing are performed to determine the receiving area and the determined receiving area is stored in the receiving area set. Reconstruction surface processing is performed and the surface name of the reconstructed surface is stored in the support surface list. A surface DEM dictionary is built for the reconstructed surface and the surface name of the reconstructed surface is used as the key and the built surface DEM dictionary is used as the value to store in the first surface dictionary. Determine the set of top vertex coordinates of the triangulated mesh structure of the top surface of the visible component; Based on the determined set of top vertex coordinates, convex hull processing, deduplication processing, and centroid determination processing are performed to determine the centroid points and store them in the centroid point set.

8. The construction apparatus according to claim 7, characterized in that, The construction device also includes: The sixth determining module is used to determine the floor to which the BIM model belongs; The seventh determining module is used to determine the top surface connected to the floor of the BIM model based on the floor to which the BIM model belongs and a set of preset external connection component top surfaces; A storage module is established to create a surface DEM dictionary for each determined top surface, and store the surface name of the top surface as the key and the created surface DEM dictionary as the value in the first surface dictionary, and store the top surface in the support surface list.

9. The construction apparatus according to claim 7, characterized in that, The fourth determining module determines the supporting DEM dictionary and the blocking DEM dictionary based on the first surface dictionary, including: Based on the second dictionary, the output range of the model DEM of the BIM model is determined; Establish a first empty dictionary and a second empty dictionary, wherein for the first empty dictionary and the second empty dictionary, the key is the planar coordinate determined based on the DEM output range of the BIM model, and the value is an empty numerical value; Based on the first empty dictionary and the first face dictionary, determine the supporting DEM dictionary; Based on the second empty dictionary and the first face dictionary, the blocking DEM dictionary is determined.

10. The construction apparatus according to claim 7, characterized in that, The fourth determining module determines the final supporting DEM dictionary based on the determined supporting DEM dictionary and the determined blocking DEM dictionary, including: Iterate through the list of resistance-reducing elements, and for each visible component whose corresponding hydraulic role is a resistance-reducing element, perform the following: Based on the bounding box of the visible component, determine the bounding coordinates of the visible component; For the blocking DEM dictionary, delete the keys and corresponding values ​​that are the same as the determined bounding coordinates; The supporting DEM dictionary is traversed. For each key, if there is a matching key in the blocking DEM dictionary, the corresponding value in the supporting DEM dictionary is replaced with the corresponding value in the blocking DEM dictionary to determine the final supporting DEM dictionary.

11. The construction apparatus according to claim 7, characterized in that, The fifth determining module determines the connection DEM dictionary based on the first face dictionary and the connection face list, including: Determine the DEM output range of visible components whose corresponding hydraulic role is a connection element in the BIM model; Establish a third empty dictionary, wherein the key of the third empty dictionary is the planar coordinate determined based on the output range of the connected DEM, and the value is an empty numerical value; Based on the third empty dictionary, the first face dictionary, and the connection face list, the connection DEM dictionary is determined.

12. The construction apparatus according to claim 7, characterized in that, The first determining module determines the hydraulic role corresponding to each visible component in the BIM model, including: The hydraulic role corresponding to the visible component is determined based on at least one of the component category, material category, family name, and instance parameters of the visible component.

13. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions that cause the machine to perform the construction method according to any one of claims 1-6.

14. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the construction method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Method for converting various BIM model data to DEM data

    CN107992702A

  • Immersive perception method for flood control risk and measure effect based on BIM + VR

    CN117572962A