Method and device for generating WebGL data, storage medium and electronic device
By analyzing the Revit model file and generating model outline information, the problems of inefficiency and poor accuracy when converting the Revit model to WebGL data are solved, and efficient and accurate storage and conversion of building information models are achieved.
Patent Information
- Application Number
- CN202111182943.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-11
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-10-11
AI Technical Summary
The prior art is inefficient and poorly accurate when converting Revit models to WebGL data.
By analyzing the Revit model file, the storage format of the model in WebGL and the description information of the target object and the storage conversion matrix are determined, the model outline information of the building information model is generated, and stored as WebGL data in the corresponding storage format.
Improves the storage efficiency and accuracy of building information models in WebGL, and can quickly and correctly restore the contour of the model or the contour of the specified object.
Smart Images

Figure CN113901051B_ABST
Abstract
Description
Background Art
[0002] In the electronic storage of building information, BIM (Building Information Modeling) technology is widely used, and Revit is one of the mainstream tool software. In practical applications, it is often necessary to display Revit models in WebGL (Web Graphics Library).
[0003] The implementation method in the related technology is that the designer user manually completes the drawing in other engines such as WebGL based on various dimension annotations and base maps in the Revit model. This method is inefficient and has poor accuracy.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a method, device, electronic device and storage medium for generating WebGL data to solve the problem of low efficiency and poor accuracy when storing building information as WebGL data according to a Revit model.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, there is provided a method for generating WebGL data, comprising:
[0008] Acquire a model file of a building information model; parse the model file to determine a storage format of the building information model in WebGL, and parse the model file to obtain description information of a target object in the building information model and a storage conversion matrix of the target object; determine model contour information of the building information model according to the description information of each target object and the corresponding storage conversion matrix; store the model contour information according to the storage format, and generate WebGL data of the building information model.
[0009] In one embodiment of the present disclosure, the model file is a Revit file; and before parsing the model file, the process further includes: confirming that the visibility of all objects and / or all linked objects in the model file is turned on.
[0010] In one embodiment of the present disclosure, parsing a model file to determine a storage format of the model file includes: obtaining a device identifier of a model in the model file, and / or obtaining a device identifier of a model in a linked model file corresponding to a linked object in the model file; calling a device record table to determine a device type corresponding to the device identifier, and then determining a universal standard type to which the device type belongs; and using the storage format of the corresponding universal standard type as the storage format of the model file and / or the linked model file.
[0011] In one embodiment of the present disclosure, before parsing the model file to obtain the description information of the target object in the building information model and the storage conversion matrix of the target object, it also includes determining the target object in the following manner: parsing the file name of the model file to obtain the business identifier of the model file; and / or parsing the link file name of the linked model file corresponding to the link object in the model file to obtain the business identifier of the linked model file; determining the business type of the corresponding model file and / or the linked model file according to the business identifier; and obtaining the object under the corresponding business type in the model file and / or the linked model file as the target object.
[0012] In one embodiment of the present disclosure, parsing a model file to obtain description information of a target object in a building information model includes: parsing the model file to obtain original model data; calling object storage specification information to determine a data storage specification of the target object, and then determining one or more contour description attributes of the target object based on the data storage specification of the target object; determining attribute values of the contour description attributes from the original model data; and using the attribute values of all contour description attributes of the target object as the description information of the target object.
[0013] In one embodiment of the present disclosure, object storage specification information is called to determine the data storage specification of the target object, including: obtaining the object type of the target object; determining the data storage specification corresponding to the object type in the object storage specification information as the data storage specification of the target object; wherein the object types include: rooms, wall outlines, floors, fill areas, doors, windows, structural columns, escalators, advertising spaces, cylindrical screens, parking spaces, stairs, walking ladders, railings, and the Internet of Things.
[0014] In one embodiment of the present disclosure, parsing a model file to obtain a storage conversion matrix of a target object in a building information model includes: parsing the model file to obtain objects in the model file, and / or a hierarchical structure between objects in a linked model file corresponding to the linked object; determining a storage path for each target object according to the hierarchical structure, and then determining a storage conversion matrix for each target object.
[0015] In one embodiment of the present disclosure, model outline information of a building information model is determined according to description information of each target object and a corresponding storage conversion matrix, including: for each target object, data conversion is performed on the description information according to the storage conversion matrix in turn to obtain outline information to be stored of each target object; wherein the outline information to be stored indicates a storage hierarchy path; and the outline information to be stored of all target objects in a model file is organized based on the corresponding storage hierarchy path to obtain the model outline information of the building information model.
[0016] In one embodiment of the present disclosure, the method for generating WebGL data provided by the present application further includes: when a transmission instruction of the WebGL data of the building information model is received, exporting the WebGL data in json format for transmission.
[0017] According to another aspect of the present disclosure, there is provided a device for generating WebGL data, comprising:
[0018] The file acquisition module is used to acquire the model file of the building information model; the file parsing module is used to parse the model file to determine the storage format of the building information model in WebGL, and parse the model file to obtain the description information of the target object in the building information model and the storage conversion matrix of the target object; the data conversion module is used to determine the model outline information of the building information model according to the description information of each target object and the corresponding storage conversion matrix; the storage module is used to store the model outline information according to the storage format and generate the WebGL data of the building information model.
[0019] In one embodiment of the present disclosure, the model file is a Revit file; and before the file parsing module parses the model file, the file acquisition module is further used to: confirm that the visibility of all objects and / or all linked objects in the model file is turned on.
[0020] In one embodiment of the present disclosure, a file parsing module parses a model file to determine a storage format of the model file, including: obtaining a device identifier of a model in the model file, and / or obtaining a device identifier of a model in a linked model file corresponding to a linked object in the model file; calling a device record table to determine a device type corresponding to the device identifier, and then determining a universal standard type to which the device type belongs; and using the storage format of the corresponding universal standard type as the storage format of the model file and / or the linked model file.
[0021] In one embodiment of the present disclosure, before the file parsing module parses the model file to obtain the description information of the target object in the building information model and the storage conversion matrix of the target object, it also includes determining the target object in the following manner: parsing the file name of the model file to obtain the business identifier of the model file; and / or parsing the link file name of the linked model file corresponding to the link object in the model file to obtain the business identifier of the linked model file; determining the business type of the corresponding model file and / or the linked model file according to the business identifier; and obtaining the object under the corresponding business type in the model file and / or the linked model file as the target object.
[0022] In one embodiment of the present disclosure, a file parsing module parses a model file to obtain description information of a target object in a building information model, including: parsing the model file to obtain original model data; calling object storage specification information to determine a data storage specification of the target object, and then determining one or more contour description attributes of the target object based on the data storage specification of the target object; determining an attribute value of the contour description attribute from the original model data; and using the attribute values of all contour description attributes of the target object as the description information of the target object.
[0023] In one embodiment of the present disclosure, a file parsing module calls object storage specification information to determine a data storage specification of a target object, including: obtaining an object type of the target object; determining a data storage specification corresponding to the object type in the object storage specification information as the data storage specification of the target object; wherein the object types include: rooms, wall outlines, floors, fill areas, doors, windows, structural columns, escalators, advertising spaces, cylindrical screens, parking spaces, stairs, walking ladders, railings, and the Internet of Things.
[0024] In one embodiment of the present disclosure, a file parsing module parses a model file to obtain a storage conversion matrix of a target object in a building information model, including: parsing the model file to obtain objects in the model file, and / or a hierarchical structure between objects in a linked model file corresponding to the linked object; determining a storage path for each target object according to the hierarchical structure, and then determining a storage conversion matrix for each target object.
[0025] In one embodiment of the present disclosure, a data conversion module determines model outline information of a building information model according to description information of each target object and a corresponding storage conversion matrix, including: for each target object, performing data conversion on the description information in turn according to the storage conversion matrix to obtain outline information to be stored of each target object; wherein the outline information to be stored indicates a storage hierarchy path; and assembling the outline information to be stored of all target objects in a model file based on the corresponding storage hierarchy path to obtain the model outline information of the building information model.
[0026] In one embodiment of the present disclosure, the device for generating WebGL data provided by the present application further includes: a transmission module, which is used to export WebGL data in json format for transmission when receiving a transmission instruction of WebGL data of a building information model.
[0027] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for generating WebGL data is implemented.
[0028] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned method for generating WebGL data by executing the executable instructions.
[0029] The method for generating WebGL data provided by the embodiment of the present disclosure can parse the model file of the building information model, obtain detailed description information of each target object, and then accurately generate the model outline information of the building information model, so as to store it as WebGL data of the building information model in a corresponding storage format.
[0030] Furthermore, the method for generating WebGL data provided by the embodiment of the present disclosure can also export WebGL data in json format to send to other systems or clients 103 when there is a need for data transmission.
[0031] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0033] Figure 1 A schematic diagram showing an exemplary system architecture to which the method for generating WebGL data according to an embodiment of the present disclosure can be applied;
[0034] Figure 2 A flowchart of a method for generating WebGL data according to an embodiment of the present disclosure is shown;
[0035] Figure 3 A schematic diagram showing a method for generating WebGL data according to an embodiment of the present disclosure is shown;
[0036] Figure 4 A schematic diagram showing the determination of contour information to be stored of a room object in a method for generating WebGL data according to an embodiment of the present disclosure is shown;
[0037] Figure 5 A schematic diagram showing the determination of the contour information to be stored of a wall object in a method for generating WebGL data according to an embodiment of the present disclosure is shown;
[0038] Figure 6 A schematic diagram showing the method for generating WebGL data according to an embodiment of the present disclosure for determining the outline information of a door object to be stored is shown;
[0039] Figure 7 A schematic diagram showing the determination of the outline information to be stored of a cylindrical screen object in a method for generating WebGL data according to an embodiment of the present disclosure is shown;
[0040] Figure 8 A schematic diagram showing the method for generating WebGL data according to an embodiment of the present disclosure for determining the outline information to be stored of a structural column object;
[0041] Fig. 9 A schematic diagram showing the determination of outline information to be stored for an advertisement slot object in a method for generating WebGL data according to an embodiment of the present disclosure is shown;
[0042] Fig.10 A block diagram of an apparatus for generating WebGL data according to an embodiment of the present disclosure; and
[0043] Fig.11 A structural block diagram of a computer device for generating WebGL data in an embodiment of the present disclosure is provided. DETAILED DESCRIPTION
[0044] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0045] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0046] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present disclosure, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0047] In view of the technical problems existing in the above-mentioned related technologies, the embodiments of the present disclosure provide a method for generating WebGL data, so as to solve at least one or all of the above-mentioned technical problems.
[0048] Figure 1 A schematic diagram showing an exemplary system architecture to which the method for generating WebGL data according to an embodiment of the present disclosure can be applied; Figure 1 As shown:
[0049] The system architecture may include a server 101, a network 102, and a client 103. The network 102 is used to provide a medium for a communication link between the client 103 and the server 101. The network 102 may include various connection types, such as wired, wireless communication links, or optical fiber cables.
[0050] The server 101 may be a server that provides various services, such as a background management server that can obtain a model file of a building information model, parse the model file, assemble the outline information to be stored of the object in the model file into the model outline information of the building information model, and generate WebGL data of the building information model according to the model outline information. The background management server may parse the received model file of the building information model, obtain detailed description information of each target object, and then accurately generate the model outline information of the building information model, so as to store it as WebGL data of the building information model in a corresponding storage format.
[0051] In some embodiments, the server 101 may also export WebGL data in json format to send to other systems or the client 103 when data transmission is required.
[0052] The client 103 may be a mobile terminal such as a mobile phone, a game console, a tablet computer, an e-book reader, smart glasses, smart home devices, AR (Augmented Reality) devices, VR (Virtual Reality) devices, etc., or the client 103 may also be a personal computer, such as a laptop computer and a desktop computer.
[0053] It should be understood that Figure 1 The number of clients, networks and servers is merely illustrative, and the server 101 may be a physical server, a server cluster consisting of multiple servers, or a cloud server. It may have any number of clients, networks and servers according to actual needs.
[0054] Below, each step of the method for generating WebGL data in the exemplary embodiment of the present disclosure will be described in more detail with reference to the accompanying drawings and embodiments.
[0055] Figure 2 A flowchart of a method for generating WebGL data according to an embodiment of the present disclosure is shown. The method provided by the embodiment of the present disclosure can be performed as follows: Figure 1 The process is executed in the server or client shown in the figure, but the present disclosure is not limited to this.
[0056] In the following examples, the server cluster 101 is used as the execution subject for example description.
[0057] like Figure 2 As shown, the method for generating WebGL data provided by the embodiment of the present disclosure may include the following steps:
[0058] Step S201, obtaining a model file of a building information model; in some practical applications, the model file may be a Revit file; a Revit file contains a lot of information, and the model outline data usually only requires a portion of it, so it is necessary to parse the file in subsequent steps to extract the required data.
[0059] Step S203, parsing the model file to determine the storage format of the building information model in WebGL, and parsing the model file to obtain the description information of the target object in the building information model and the storage conversion matrix of the target object; the obtained model file can be a file created and configured by the designer user based on certain standards, and then the necessary information such as the above-mentioned storage format, the description information of the object, the storage conversion matrix of the object can be determined by parsing the file name and the model information in the file.
[0060] Step S205, determining the model outline information of the building information model according to the description information of each target object and the corresponding storage conversion matrix; after parsing the file to obtain the description information of the target object and the corresponding storage conversion matrix, the outline information to be stored of each target object can be obtained, and then accurately assembled to generate complete and accurate model outline information of the building information model.
[0061] Step S207, storing the model outline information according to the storage format, and generating WebGL data of the building information model; based on the determined storage format, the model outline information generates WebGL data for accurate storage in the WebGL engine, so that the outline of the model or the outline of the specified object can be quickly and correctly restored in the WebGL engine when necessary.
[0062] Through the method in this application, the model file of the building information model can be parsed to obtain detailed description information of each target object, and then the model outline information of the building information model can be accurately generated, so as to be stored as WebGL data of the building information model in the corresponding storage format. The method in this application can realize the automatic parsing of online data of buildings, floors, shops, resources, points and engineering conditions that are consistent with offline data from the BIM model, and store them in the library in the WebGL standard structure, which greatly improves the storage efficiency and accuracy of building information storage conversion.
[0063] In some embodiments, the model file is a Revit file; and before parsing the model file, the process further includes: confirming that visibility of all objects and / or all linked objects in the model file is turned on.
[0064] After obtaining the file, you can first turn on the visibility of the required objects, including the visibility of the links. In some practical applications, if the object type is determined in advance, you can also turn on the visibility of only the specified type of objects. Among them, the linked objects in the Revit file can be used to determine the corresponding linked model files.
[0065] In some embodiments, parsing a model file to determine a storage format of the model file includes: obtaining a device identifier of a model in the model file, and / or obtaining a device identifier of a model in a linked model file corresponding to a linked object in the model file; calling a device record table to determine a device type corresponding to the device identifier, and then determining a universal standard type to which the device type belongs; and using the storage format of the corresponding universal standard type as the storage format of the model file and / or the linked model file.
[0066] When creating a model file, designers can add custom attributes to the model in the model file based on agreed rules to record the C2 device number attribute of the model, that is, the device identifier of the device (such as a store or advertising space) corresponding to the model in the actual application scenario.
[0067] Furthermore, when designers create architectural data for objects in model files, they should ensure that the architectural data for the objects conform to the data storage specifications of the common standard type (i.e., original type) to which the equipment type of the objects belongs, so that the corresponding data storage specifications can be applied in subsequent steps to read the required data.
[0068] In some practical applications, the correspondence between device types and universal standard types can be shown in Table 1:
[0069] Table 1
[0070] Device Type Common standard types Wall / curtain wall System Family-Wall floor System Family-Floor Empty area System Family-Slab Edit Main store System Family - Filled Area Straight Elevator-Barrier-free Elevator Special equipment Vertical Elevator-Cargo Elevator Special equipment Escalator Special equipment Ramp Hall Special equipment …… ……
[0071] In some embodiments, before parsing the model file to obtain the description information of the target object in the building information model and the storage conversion matrix of the target object, it also includes determining the target object in the following manner: parsing the file name of the model file to obtain the business identifier of the model file; and / or parsing the link file name of the linked model file corresponding to the link object in the model file to obtain the business identifier of the linked model file; determining the business type of the corresponding model file and / or the linked model file based on the business identifier; and obtaining the object under the corresponding business type in the model file and / or the linked model file as the target object.
[0072] When creating a model file, the designer can add the "professional" information (i.e., business type) corresponding to the model to the file name based on the agreed rules, where the "professional" information can be considered as information related to the application scenario type / business type of the building. For example, add a business identification field at a specified position in the file name, and then parse the file name to obtain the business identification of the model file in the specified field in the file name. After obtaining the business identification of the model file, the object under the business type in the model file can be used as the target object, and then in the subsequent steps, it is only necessary to extract the relevant data of the target object from the numerous data in the model file, thereby achieving efficient extraction of the required data. For example, when the business identification containing the structure type is obtained in the file name, all objects under the "structure type" in the model file can be used as target objects.
[0073] When the model file contains link objects, the link model files corresponding to the link objects can be determined in sequence, the business type of each link model file can be determined according to the above method, and then the target object in each link model file can be determined.
[0074] In some practical applications, the correspondence between the service type and the service identifier may be as shown in Table 2:
[0075] Table 2
[0076] Business Type Business Logo architecture -A- structure -S- HVAC -M- Household water supply and drainage -P- Heating pipe water supply and drainage -F- Electrical appliances -E- …… ……
[0077] In some embodiments, parsing a model file to obtain description information of a target object in a building information model includes: parsing a model file to obtain original model data; calling object storage specification information to determine a data storage specification of the target object, and then determining one or more contour description attributes of the target object based on the data storage specification of the target object; determining attribute values of the contour description attributes from the original model data; and using the attribute values of all contour description attributes of the target object as the description information of the target object.
[0078] Further, in some embodiments, calling the object storage specification information to determine the data storage specification of the target object includes: obtaining the object type of the target object; determining the data storage specification corresponding to the object type in the object storage specification information as the data storage specification of the target object; wherein the object types include: rooms, wall outlines, floors, fill areas, doors, windows, structural columns, escalators, advertising spaces, cylindrical screens, parking spaces, stairs, walking ladders, railings, and the Internet of Things.
[0079] The object storage specification information may be determined according to the relevant information in the WebGL protocol. In order to display the object in WebGL, different object types may have different description methods, that is, different outline description attributes. For example, for a wall object, the outline description attributes may include: the wall starting point, wall thickness, alignment and other attribute information; for an ad slot object, the outline description attributes may include: the insertion point, length, width, height information, resource location and other attribute information.
[0080] In some embodiments, parsing a model file to obtain a storage conversion matrix of a target object in a building information model includes: parsing the model file to obtain objects in the model file, and / or a hierarchical structure between objects in a linked model file corresponding to the linked object; determining a storage path for each target object according to the hierarchical structure, and then determining a storage conversion matrix for each target object.
[0081] Furthermore, in some embodiments, model outline information of a building information model is determined according to the description information of each target object and a corresponding storage conversion matrix, including: for each target object, data conversion is performed on the description information in turn according to the storage conversion matrix to obtain outline information to be stored for each target object; wherein the outline information to be stored indicates a storage hierarchy path; and the outline information to be stored of all target objects in the model file is organized based on the corresponding storage hierarchy path to obtain the model outline information of the building information model.
[0082] When a model file contains linked objects, the object's storage transformation matrix can indicate the routing path of the object's description information in the entire file structure. In this way, when there are multi-level structures in the file, the storage hierarchical path of the description information of each object can be determined, the description information of each object can be accurately stored, and the model outline information of the entire building information model can be constructed. The model outline information obtained in this way can quickly and correctly restore the outline of the model or the outline of the specified object in WebGL.
[0083] Figure 3 A schematic diagram of a method for generating WebGL data according to an embodiment of the present disclosure is shown. Figure 3 As shown, including:
[0084] (1) Open the Revit model file and turn on the visibility of each object in it, including the visibility of linked objects. In some practical applications, if the object type is determined in advance, you can also turn on the visibility of only the specified type of objects.
[0085] (2) Obtain the data of the object according to the data storage specification corresponding to the object type, and read the specific data that needs to be obtained for each object, such as: object description information, object storage conversion matrix, object area information, other attribute information, etc. The description information may include one or more contour description attributes.
[0086] (3) The read description information can be recalculated through the storage transformation matrix to determine the contour information of the object to be stored; in this way, when there is a multi-level structure in the file, the storage level path of the description information of each object can be determined to accurately store the description information of each object.
[0087] (4) The model outline information is stored according to the storage format of the building information model in WebGL.
[0088] (5) All the linked model files corresponding to the linked objects in the Revit file can be read recursively, and steps (1) to (4) are performed for each of the files. When all the files are traversed, it can be determined that the data storage is complete.
[0089] (6) When there is a need for data transmission, the WebGL data can be exported in json format for data transmission.
[0090] Figure 4 FIG. 1 is a schematic diagram showing a method for generating WebGL data according to an embodiment of the present disclosure for determining the outline information to be stored of a room object. Figure 4As shown, the point family of the room boundary can be obtained according to the room boundary, combined into closed point group information, and the room area value can be read; then the data is stored through the corresponding storage conversion matrix to determine the contour information to be stored of the room object.
[0091] Figure 5 FIG. 1 is a schematic diagram showing a method for generating WebGL data according to an embodiment of the present disclosure for determining the outline information of a wall object to be stored. Figure 5 As shown, the contour point group of the wall can be read, and the attribute information such as the thickness and alignment of the wall can be read; then the data is stored through the corresponding storage conversion matrix to determine the contour information to be stored of the wall object.
[0092] Figure 6 A schematic diagram of determining the outline information to be stored of a door object in a method for generating WebGL data according to an embodiment of the present disclosure is shown. Figure 6 As shown, the insertion point, door height, door width, and the wall to which the door belongs can be read, and the left and right point positions of the door can be calculated through the direction of the wall to which it belongs. The data is then stored through the corresponding storage conversion matrix to determine the contour information to be stored of the door object.
[0093] Figure 7 FIG. 1 is a schematic diagram showing a method for generating WebGL data according to an embodiment of the present disclosure for determining the outline information to be stored of a cylindrical screen object. Figure 7 As shown, all surface data of the cylindrical advertisement can be read, and triangular surface information can be calculated based on single surface data; then data is stored through the corresponding storage conversion matrix to determine the contour information to be stored of the cylindrical screen object.
[0094] Figure 8 A schematic diagram of determining the outline information to be stored of a structural column object in a method for generating WebGL data according to an embodiment of the present disclosure is shown. Figure 8 As shown, all faces of the structural column can be obtained first, and then the face with the lowest elevation can be calculated as the data of the structural column; then the data can be stored through the corresponding storage conversion matrix to determine the contour information to be stored of the structural column object.
[0095] Fig. 9 A schematic diagram of determining the outline information to be stored of an advertisement slot object in a method for generating WebGL data according to an embodiment of the present disclosure is shown. Fig. 9 As shown, the length, width, height, and resource location information that are input according to the agreed rules can be extracted to extract the insertion point of the ad slot; then the data is stored through the corresponding storage conversion matrix to determine the outline information to be stored of the ad slot object.
[0096] In some embodiments, in a method for generating WebGL data in an embodiment of the present disclosure, the contour information to be stored of the escalator object can also be determined in the following manner: extract the envelope box of the escalator, calculate the length, width, height, and center point information of the escalator; then store the data through the corresponding storage conversion matrix to determine the contour information to be stored of the escalator object.
[0097] In some embodiments, in a method for generating WebGL data in an embodiment of the present disclosure, contour information to be stored of an IoT point data object can also be determined in the following manner: extract the insertion point information of the model, and obtain the corresponding type according to the naming; then store the data through the corresponding storage conversion matrix to determine the contour information to be stored of the IoT point data object.
[0098] In some embodiments, the method for generating WebGL data provided by the present application further includes: when a transmission instruction of the WebGL data of the building information model is received, exporting the WebGL data in json format for transmission.
[0099] In the method of the present application, when the export requirement is "export the entire model", the model can be exported or displayed; when the export requirement is "export specified objects", the specified objects in the model can be exported or displayed.
[0100] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0101] Fig.10 FIG. 1 is a block diagram of a device 1000 for generating WebGL data in a fifth embodiment of the present disclosure; Fig.10 As shown, including:
[0102] The file acquisition module 1001 is used to acquire the model file of the building information model; the file parsing module 1002 is used to parse the model file to determine the storage format of the building information model in WebGL, and parse the model file to obtain the description information of the target object in the building information model and the storage conversion matrix of the target object; the data conversion module 1003 is used to determine the model outline information of the building information model according to the description information of each target object and the corresponding storage conversion matrix; the storage module 1004 is used to store the model outline information according to the storage format to generate the WebGL data of the building information model.
[0103] In some embodiments, the apparatus for generating WebGL data provided by the present application further includes: a transmission module 1005, which is used to export WebGL data in json format for transmission when receiving a transmission instruction for WebGL data of a building information model.
[0104] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0105] Fig.11 A block diagram of a computer device for generating WebGL data in an embodiment of the present disclosure is shown. It should be noted that the electronic device shown in the figure is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present invention.
[0106] Refer to the following Fig.11 The electronic device 1100 according to this embodiment of the present invention is described. Fig.11 The electronic device 1100 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0107] like Fig.11 As shown, the electronic device 1100 is in the form of a general computing device. The components of the electronic device 1100 may include but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and a bus 1130 connecting different system components (including the storage unit 1120 and the processing unit 1110).
[0108] The storage unit stores program codes, which can be executed by the processing unit 1110, so that the processing unit 1110 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 1110 can perform the following steps: Figure 2 In step S201 shown in the figure, a model file of a building information model is obtained; in some practical applications, the model file may be a Revit file; in step S203, the model file is parsed to determine a storage format of the building information model in WebGL, and the model file is parsed to obtain description information of target objects in the building information model and a storage conversion matrix of the target objects; in step S205, model outline information of the building information model is determined according to the description information of each target object and the corresponding storage conversion matrix; in step S207, the model outline information is stored according to the storage format to generate WebGL data of the building information model.
[0109] The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 11201 and / or a cache storage unit 11202 , and may further include a read-only storage unit (ROM) 11203 .
[0110] The storage unit 1120 may also include a program / utility 11204 having a set (at least one) of program modules 11205, such program modules 11205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0111] Bus 1130 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0112] The electronic device 1100 may also communicate with one or more external devices 1200 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and / or communicate with any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1150. Furthermore, the electronic device 1100 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1160. As shown, the network adapter 1160 communicates with other modules of the electronic device 1100 via a bus 1130. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0113] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0114] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0115] The program product for implementing the above method according to the embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0116] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0117] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0118] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0119] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0120] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0121] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0122] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0123] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A method for generating WebGL data, characterized in that: include: Obtaining a model file of a building information model; Parsing the model file to determine the storage format of the building information model in WebGL, and parsing the model file to obtain description information of a target object in the building information model and a storage conversion matrix of the target object; Determining model profile information of the building information model according to the description information of each target object and the corresponding storage conversion matrix; The model outline information is stored according to the storage format to generate WebGL data of the building information model; Wherein, parsing the model file to obtain description information of the target object in the building information model includes: Parsing the model file to obtain model original data; calling object storage specification information to determine the data storage specification of the target object, and then determining one or more profile description attributes of the target object based on the data storage specification of the target object; determining the attribute value of the profile description attribute from the model original data; using the attribute values of all profile description attributes of the target object as the description information of the target object; Wherein, parsing the model file to obtain a storage conversion matrix of a target object in the building information model includes: Parsing the model file to obtain the objects in the model file and / or the hierarchical structure between the objects in the linked model file corresponding to the linked objects; determining the storage path of each target object according to the hierarchical structure, and then determining the storage conversion matrix of each target object; Wherein, determining the model profile information of the building information model according to the description information of each target object and the corresponding storage conversion matrix includes: For each target object, the description information is converted in turn according to the storage conversion matrix to obtain the outline information to be stored of each target object; wherein the outline information to be stored indicates a storage hierarchy path; the outline information to be stored of all target objects in the model file is assembled based on the corresponding storage hierarchy path to obtain the model outline information of the building information model.
2. The method according to claim 1, characterized in that The model file is a Revit file; And, before parsing the model file, it also includes: Verify that visibility is turned on for all objects in the model file in question and / or all linked objects.
3. The method according to claim 2, characterized in that Parsing the model file to determine the storage format of the model file includes: Obtaining a device identifier of a model in the model file, and / or obtaining a device identifier of a model in a linked model file corresponding to a linked object in the model file; Calling a device record table to determine a device type corresponding to the device identifier, and then determining a universal standard type to which the device type belongs; The storage format of the model file and / or the link model file is a storage format of a corresponding universal standard type.
4. The method according to claim 2, characterized in that: Before parsing the model file to obtain the description information of the target object in the building information model and the storage conversion matrix of the target object, the target object is determined in the following manner: Parsing the file name of the model file to obtain the service identifier of the model file; and / or parsing the link file name of the link model file corresponding to the link object in the model file to obtain the service identifier of the link model file; Determine the business type of the corresponding model file and / or the linked model file according to the business identifier; An object under a corresponding business type in the model file and / or the linked model file is obtained as the target object.
5. The method according to claim 1, characterized in that Calling the object storage specification information to determine the data storage specification of the target object includes: Obtaining the object type of the target object; Determine a data storage specification corresponding to the object type in the object storage specification information as the data storage specification of the target object; Among them, the object types include: room, wall outline, floor, infill area, door, window, structural column, escalator, advertising space, cylindrical screen, parking space, staircase, walking ladder, railing handrail, and Internet of Things.
6. The method according to claim 1, characterized in that Also includes: When a transmission instruction of the WebGL data of the building information model is received, the WebGL data in json format is exported for transmission.
7. A device for generating WebGL data, characterized in that: include: A file acquisition module is used to acquire a model file of a building information model; A file parsing module, used for parsing the model file to determine the storage format of the building information model in WebGL, and parsing the model file to obtain description information of the target object in the building information model and a storage conversion matrix of the target object; A data conversion module, used to determine the model profile information of the building information model according to the description information of each target object and the corresponding storage conversion matrix; A storage module, used for storing the model outline information according to the storage format, and generating WebGL data of the building information model; The file parsing module parses the model file to obtain description information of the target object in the building information model, including: Parsing the model file to obtain model original data; calling object storage specification information to determine the data storage specification of the target object, and then determining one or more profile description attributes of the target object based on the data storage specification of the target object; determining the attribute value of the profile description attribute from the model original data; using the attribute values of all profile description attributes of the target object as the description information of the target object; The file parsing module parses the model file to obtain a storage conversion matrix of the target object in the building information model, including: Parsing the model file to obtain the objects in the model file and / or the hierarchical structure between the objects in the linked model file corresponding to the linked objects; determining the storage path of each target object according to the hierarchical structure, and then determining the storage conversion matrix of each target object; The data conversion module determines the model profile information of the building information model according to the description information of each target object and the corresponding storage conversion matrix, including: For each target object, the description information is converted in turn according to the storage conversion matrix to obtain the outline information to be stored of each target object; wherein the outline information to be stored indicates a storage hierarchy path; the outline information to be stored of all target objects in the model file is assembled based on the corresponding storage hierarchy path to obtain the model outline information of the building information model.
8. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for generating WebGL data according to any one of claims 1 to 7 is implemented.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the method for generating WebGL data as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for building information modeling light weight and three-dimensional scene visualization
CN108710739A
Three-dimensional model lightweight method for WEBGL engine and BIM application
CN111833388A