A method, apparatus, device, and storage medium for creating a Revit model

By reading 3dxml files, building three-dimensional data objects, simplifying the modeling process, and calling the Revit modeling interface, the efficiency and quality problems of converting CATIA or SOLIDWORKS models to Revit models are solved, and efficient model conversion and assembly relationship retention is achieved.

CN114239094BActive Publication Date: 2025-06-27SINOMACH IND INTERNET RES INST (HENAN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111509795.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-06-27
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

It is difficult for the prior art to quickly and efficiently convert the three-dimensional model designed by CATIA or SOLIDWORKS software into a model available for Revit, and there are problems such as slow export speed, large files, and loss of assembly relationships.

Method used

By reading the 3dxml file exported by CATIA or SOLIDWORKS, obtaining model information, building three-dimensional data objects, simplifying the model, including simplification of parts and faces, classifying model data, and calling the Revit model model interface to create a Revit model.

Benefits of technology

The rapid and efficient conversion of CATIA or SOLIDWORKS three-dimensional model to the Revit model is realized, retaining the original assembly relationship and necessary attributes, improving the efficiency and quality of model conversion, and solving the problem of interaction of software design results on different platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114239094B_ABST
    Figure CN114239094B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and storage medium for creating a Revit model. The method includes: reading a 3dxml file exported by CATIA or SOLIDWORKS to obtain model information contained in the file; constructing a three-dimensional data object according to the obtained model information; performing model simplification processing according to the three-dimensional data object, including simplification of parts and / or faces; classifying the simplified model data to obtain modeling classification information; reading the modeling classification information and calling the Revit modeling interface to create a Revit model. By using the 3dxml file as an intermediary, it is possible to perform fully controllable streamlining and lightweighting on the three-dimensional models designed by CATIA or SOLIDWORKS software. After conversion, the original assembly relationship and necessary attributes can be retained, improving the efficiency and quality of model conversion, and there is no need to provide the original three-dimensional model, avoiding the risk of disclosure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of model creation, and particularly to a method, device, equipment and storage medium for creating a Revit model. Background Art

[0002] CATIA, SOLIDWORKS, and Revit are currently popular 3D design software, which are widely used in industries such as mechanical design, building materials, transportation, and aerospace. They can not only show a more three-dimensional and beautiful visual effect to the owners, but also have innate advantages in aspects such as pipeline adjustment, engineering quantity statistics, and construction guidance. The above-mentioned 3D design software has achieved success in their respective sub-fields and has a large market share.

[0003] 3dxml is a 3D data format that can be generated by CATIA and SOLIDWORKS, but this file cannot be directly used in Revit. Most of the construction industry uses Revit for Building Information Modeling (BIM) design. During the design process, it is necessary to arrange the equipment model into Revit to complete subsequent work such as space occupancy, collision analysis, engineering statistics, and cost. Therefore, how to quickly convert the 3D models built by CATIA and Solidworks into models that Revit can use has become a key requirement.

[0004] Currently, there are two existing model conversion methods: The first method is the export method, that is, through the CATIA or SOLIDWORKS software, the model is output in formats such as dwg, sat, ifc, etc., and then imported or linked into Revit for use. This method has problems such as inability to quickly simplify the model, slow export speed, large export file size, and loss of assembly relationships. When the generated model is imported into Revit, there are also problems such as inability to load due to inconsistent data format versions, display distortion, loss of geometric primitives, and loss of assembly relationships; The second method is manual re-modeling, that is, according to the 3D model or 2D drawing, manually perform secondary modeling to create a model that Revit can use. This method has problems such as low efficiency, repetitive labor, and inability to implement complex surfaces in Revit. And in many cases, equipment manufacturers are reluctant to provide the original 3D model for confidentiality reasons and do not provide detailed drawings, and it is difficult to overcome the problem of distortion in secondary modeling. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a method, device, equipment and storage medium for creating a Revit model, which can quickly and efficiently convert a 3D model designed by CATIA or SOLIDWORKS software into a Revit model. The specific solutions are as follows:

[0006] A method for creating a Revit model, comprising:

[0007] Reading a 3dxml file exported by CATIA or SOLIDWORKS to obtain the model information contained in the file;

[0008] Constructing a three-dimensional data object according to the obtained model information;

[0009] Performing model simplification processing according to the three-dimensional data object, including simplification of parts and / or simplification of faces;

[0010] Classifying the simplified model data to obtain modeling classification information;

[0011] Reading the modeling classification information and calling the Revit modeling interface to create a Revit model.

[0012] Preferably, in the above-mentioned method for creating a Revit model provided by the embodiments of the present invention, the constructing a three-dimensional data object according to the obtained model information includes:

[0013] Calculating an overall transformation matrix according to the assembly relationship and relative position matrix in the model information;

[0014] Obtaining all vertex coordinates in the world coordinate system according to the overall transformation matrix and generating a three-dimensional data object.

[0015] Preferably, in the above-mentioned method for creating a Revit model provided by the embodiments of the present invention, the simplification of parts and / or simplification of faces includes:

[0016] Removing internal parts and / or small parts; and / or,

[0017] Automatically merging planar triangular patches and removing micropores in the faces.

[0018] Preferably, in the above-mentioned method for creating a Revit model provided by the embodiments of the present invention, the removing internal parts and / or small parts includes:

[0019] Obtaining the OBB bounding boxes of all parts;

[0020] Judging whether to remove internal parts; if so, calculating the inclusion and being included relationships of the OBB bounding boxes of all parts and obtaining all included parts;

[0021] Judge the visibility of all the included parts;

[0022] According to the visibility judgment results of the parts, find out all the invisible parts as the removable internal parts;

[0023] Judge whether to remove small parts; if so, calculate the OBB bounding box of the entire assembly;

[0024] Calculate the ratio between the geometric dimensions of the OBB bounding box of each part and the geometric dimensions of the OBB bounding box of the assembly one by one;

[0025] Find out all the parts with ratio values less than the set value as the removable small parts;

[0026] Remove the found removable internal parts and the removable small parts.

[0027] Preferably, in the above-mentioned Revit model creation method provided by the embodiment of the present invention, the automatic merging of planar triangular patches and the removal of micropores in the surface include:

[0028] Find all the boundaries of the triangular patches in the surface and distinguish the external boundaries and internal boundaries;

[0029] Calculate the perimeters of the external and internal boundaries;

[0030] Calculate the normal vectors of all the triangular patches in the surface. If the normal vectors are all equal, automatically merge the planar triangular patches and take their external and internal boundaries as the merging results;

[0031] Judge whether to remove the micropores in the surface; if so, judge whether the current surface is a plane after merging triangular patches;

[0032] If the current surface is a plane after merging triangular patches, perform the direct internal boundary removal method, remove the internal boundaries whose ratio of the internal boundary perimeter to the external boundary perimeter is less than the set value, and return the external boundary and internal boundary data;

[0033] If the current surface is not a plane after merging triangular patches, perform the boundary vertex replacement method, find out all the internal boundaries whose ratio of the internal boundary perimeter to the external boundary perimeter is less than the set value, calculate the centroid coordinates of the internal boundaries one by one, and replace the coordinates of the boundary vertices to be removed with the centroid coordinates of the boundary. After the vertex replacement is completed, recalculate all the triangular patches after replacement.

[0034] Preferably, in the above-mentioned Revit model creation method provided by the embodiment of the present invention, the classification of the simplified model data to obtain the modeling classification information includes:

[0035] Read all the entities included in the model;

[0036] Judging one by one whether the entities in the model can be created as entity objects;

[0037] If so, classify them into the category of entity objects that can be created;

[0038] If not, classify them into the category of grid objects that can be created;

[0039] Loop through all the entities in the model, complete the classification of all entities, and obtain the modeling classification information.

[0040] Preferably, in the above method for creating a Revit model provided by the embodiments of the present invention, the step of reading the modeling classification information, calling the Revit modeling interface, and creating a Revit model includes:

[0041] Reading all the entities and the modeling classification information included in the model;

[0042] Generating all the entities included in the model by using the method of modeling one by one, and creating each entity as one or more Revit objects;

[0043] Judging whether the current entity belongs to the category of entity objects that can be created according to the modeling classification information;

[0044] If so, call the Revit modeling interface to create an entity object;

[0045] If not, call the Revit modeling interface to generate a grid object;

[0046] Loop through the entities, model them one by one, complete the creation of all entities, and generate a Revit model.

[0047] The embodiments of the present invention also provide a device for creating a Revit model, including:

[0048] A data reading module, configured to read a 3dxml file exported by CATIA or SOLIDWORKS, and obtain the model information included in the file;

[0049] An object construction module, configured to construct three-dimensional data objects according to the obtained model information;

[0050] A model simplification module, configured to perform model simplification processing according to the three-dimensional data objects, including simplification of parts and / or faces;

[0051] A data classification module, configured to classify the simplified model data to obtain modeling classification information;

[0052] A model creation module, configured to read the modeling classification information, call the Revit modeling interface, and create a Revit model.

[0053] An embodiment of the present invention further provides a device for creating a Revit model, including a processor and a memory. When the processor executes a computer program stored in the memory, the above-mentioned method for creating a Revit model provided by the embodiment of the present invention is implemented.

[0054] An embodiment of the present invention further provides a computer-readable storage medium for storing a computer program. When the computer program is executed by a processor, the above-mentioned method for creating a Revit model provided by the embodiment of the present invention is implemented.

[0055] As can be seen from the above technical solution, a method for creating a Revit model provided by the present invention includes: reading a 3dxml file exported from CATIA or SOLIDWORKS to obtain model information contained in the file; constructing a three-dimensional data object according to the obtained model information; performing model simplification processing according to the three-dimensional data object, including simplification of parts and / or simplification of faces; classifying the simplified model data to obtain modeling classification information; reading the modeling classification information and calling the Revit modeling interface to create a Revit model.

[0056] The above-mentioned creation method provided by the present invention uses a 3dxml file as an intermediary. During the model conversion process, it can perform fully controllable streamlining and lightweighting on the three-dimensional models designed by CATIA or SOLIDWORKS software. After conversion, the original assembly relationship and necessary attributes can be retained, ensuring no distortion when imported into Revit, automatically creating a Revit model, improving the efficiency and quality of model conversion, and being able to eliminate the concerns of equipment manufacturers who are reluctant to provide three-dimensional models due to reasons such as confidentiality, and thoroughly solving the problem of interaction of design results of software on different platforms.

[0057] In addition, the present invention also provides corresponding devices, equipment and computer-readable storage media for the method for creating a Revit model, further making the above method more practical, and the devices, equipment and computer-readable storage media have corresponding advantages. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0059] Figure 1 It is a flowchart of the method for creating a Revit model provided by an embodiment of the present invention;

[0060] Figure 2 Specific flowchart for removing internal parts and / or small parts provided by an embodiment of the present invention;

[0061] Figure 3 Specific flowchart for automatically merging planar triangular patches and removing micro holes in the surface provided by an embodiment of the present invention;

[0062] Figure 4 Specific flowchart for classifying model data provided by an embodiment of the present invention;

[0063] Figure 5 Specific flowchart for creating a Revit model provided by an embodiment of the present invention;

[0064] Figure 6 Schematic structural diagram of a device for creating a Revit model provided by an embodiment of the present invention. Detailed implementation manners

[0065] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0066] The present invention provides a method for creating a Revit model, as Figure 1 shown, including the following steps:

[0067] S101. Read the 3dxml file exported by CATIA or SOLIDWORKS, and obtain the model information contained in the file;

[0068] In practical applications, before performing step S101, it is necessary to use CATIA or SOLIDWORKS to open the original design model and export the 3dxml file, which is a built-in export function of the software. 3dxml is a highly compressed and completely open data format. Based on the open source characteristics and data structure of the 3dxml format, after reading the content of the 3dxml file in the present invention, its structural composition is parsed. According to the requirements of the Revit modeling interface, the necessary model information for modeling should be retained, mainly including the names of components, relative position matrices, indexes, assembly relationships, instance reference relationships, types, included edges, faces, vertices, face materials, normal vectors, etc.

[0069] S102. Construct a three-dimensional data object according to the obtained model information;

[0070] It can be understood that since 3DXML realizes the reuse of resources through the reference / instance mechanism, this method can reduce the storage space. The disadvantage of this mechanism is that it does not directly contain geometric information, but only contains model entity information and assembly information. When creating a Revit model, geometric information is necessary. This requires in-depth parsing and multiple coordinate transformations of 3DXML data to obtain geometric information and construct objects convenient for executing geometric algorithms. The above three-dimensional data object belongs to a custom format to facilitate the subsequent execution of simplification algorithms by the computer.

[0071] S103. Perform model simplification processing on the three-dimensional data object, including simplification of parts and / or faces;

[0072] It should be noted that based on the three-dimensional data object, the present invention performs operations such as model simplification and face simplification, so as to selectively and controllably streamline and lightweight the model. The purpose is to reduce the number of geometric primitives, improve the visual perception of the model, and avoid the problem of an overly large model on the premise of meeting the requirements of the BIM model.

[0073] S104. Classify the simplified model data to obtain modeling classification information;

[0074] It should be noted that classifying the model data of the present invention can facilitate the creation of different geometric models as needed, and then call the Revit modeling interface to create the model. Specifically, combined with the characteristics of the Autodesk Revit modeling interface, classifying the modeling data, entities that can be created as entity objects can be created as entity objects; others can be created as mesh objects. This classification and creation method solves the problem of chaotic normal vectors of some faces in the generated model.

[0075] S105. Read the modeling classification information, call the Revit modeling interface, and create a Revit model.

[0076] In practical applications, after creating a Revit model, necessary modeling information, such as assembly information, creator, creation date, copyright data, etc., can be written into the model.

[0077] In the above method for creating a Revit model provided by the embodiments of the present invention, using a 3DXML file as an intermediary, during the model conversion process, it is possible to completely controllably streamline and lightweight the three-dimensional model designed by CATIA or SOLIDWORKS software. After conversion, the original assembly relationship and necessary attributes can be retained, ensuring no distortion when imported into Revit, automatically creating a Revit model, improving the efficiency and quality of model conversion, and eliminating the concern of equipment manufacturers being unwilling to provide three-dimensional models due to reasons such as confidentiality, and completely solving the problem of the interaction of design results of software on different platforms.

[0078] In specific implementation, in the above-mentioned Revit model creation method provided by the embodiments of the present invention, in step S102, according to the obtained model information, a three-dimensional data object is constructed, which may specifically include: calculating an overall transformation matrix according to the assembly relationship and relative position matrix in the model information; and obtaining all vertex coordinates in the world coordinate system according to the overall transformation matrix to generate a three-dimensional data object.

[0079] It should be noted that 3dxml adopts a reference / instance mechanism to achieve the reuse of resources, and the spatial relationship between the assembly and parts is expressed by the object coordinate system and relative position matrix. This method is convenient for reducing the storage space, but cannot be directly used to execute the model simplification algorithm. Rebuilding the three-dimensional data object and converting all components and their contained geometric information into a unified coordinate system are beneficial to the execution of the simplification algorithm and modeling. The key to reconstructing the data object is to calculate the overall transformation matrix according to the assembly relationship and relative position matrix, and calculate all vertex coordinates in the world coordinate system based on this.

[0080] In specific implementation, in the above-mentioned Revit model creation method provided by the embodiments of the present invention, step S103, the simplification of parts and / or the simplification of faces may include: removing internal parts and / or small parts; and / or automatically merging planar triangular patches and removing micro holes in the faces.

[0081] Since the building information model does not require internal structures, fine design details, etc. For large assemblies, there are a large number of components, and many parts have bolt holes, chamfers, etc. Without affecting the overall effect of the model, part simplification and face simplification should be carried out to reduce the number of parts and the complexity of the faces. For part simplification, without affecting the overall effect of the model, the number of parts is reduced, and the main rules include removing internal parts and removing small parts. For face simplification, the faces of each entity are refined to reduce the complexity of the faces, and the main rules include automatically merging planar triangular patches and removing tiny holes.

[0082] Further, in specific implementation, in the above-mentioned Revit model creation method provided by the embodiments of the present invention, removing the internal parts and / or small parts in the above steps, as Figure 2 shown, may specifically include the following steps:

[0083] Step 1: Obtain the OBB bounding boxes of all parts; it should be noted that the OBB (Oriented BoundingBox) is essentially a cuboid that best fits the object, except that the cuboid can be rotated arbitrarily according to the first moment of the object; obtaining the OBB bounding boxes of all parts is required for subsequent algorithms.

[0084] Step 2: Determine whether to remove internal parts; if so, execute the internal part removal algorithm, that is, execute Step 3; if not, directly proceed to the next simplification rule: remove small parts, that is, execute Step 4.

[0085] Step 3: Calculate the inclusion and being-included relationships of the OBB bounding boxes of all parts, that is, calculate the inclusion and being-included relationships between all parts in turn; obtain all the parts that are included; judge the visibility of all the included parts. The purpose of this step is to find the parts that are blocked by other parts and cannot be directly seen from the outside; according to the visibility judgment results of the parts, find all the invisible parts as removable internal parts.

[0086] Step 4: Determine whether to remove small parts; if so, execute the small part removal algorithm, that is, execute Step 5; if not, directly return the result, that is, the number of small parts to be streamlined is 0. The purpose of removing small parts is that some parts are visible but do not need to be modeled in Revit, such as the connecting bolts on a large steel structure model, which are numerous and have little modeling significance.

[0087] Step 5: Set the removal algorithm to be adopted and the removal ratio; calculate the OBB bounding box of the entire assembly. Its calculation principle is the same as that of a single part, except that the number of points is more; then, calculate the ratio between the geometric dimensions of the OBB bounding box of each part and the geometric dimensions of the OBB bounding box of the assembly one by one, mainly including the diagonal length ratio, volume ratio, etc.; finally, find all the parts with ratio values less than the set value as removable small parts.

[0088] Step 6: Combine the results of the found removable internal parts and removable small parts to obtain the parts to be simplified and removed, and remove these parts. These parts do not need to be modeled.

[0089] Furthermore, in specific implementation, in the above Revit model creation method provided by the embodiments of the present invention, in the above steps, the planar triangular patches are automatically merged, and the micro holes in the surface are removed, as Figure 3 shown, which may specifically include the following steps:

[0090] Step 7: Since a surface is composed of multiple triangular patches, most triangular patches have common edges with other triangular patches, and the unshared edges are the boundaries. Each surface has an outer boundary, which may be a planar polygon or a spatial polygon. A surface with holes inside will have inner boundaries. This step is to find all the boundaries of the triangular patches in the surface and distinguish the outer boundaries and inner boundaries, and the formed edges are sorted in the counterclockwise direction; then, traverse in a loop to calculate the perimeters of all the boundaries, that is, calculate the perimeters of the outer and all inner boundaries.

[0091] Step 8: Determine whether to execute the triangular patch merging algorithm. The model has a better effect after the triangular patches are merged. If so, enter the merging algorithm, that is, execute Step 9; if not, enter the next rule: remove tiny holes, that is, execute Step 10.

[0092] Step 9: Calculate the normal vectors of all triangular patches in the face. If all the normal vectors are equal, it indicates a plane; otherwise, it is a curved surface. Only planes can execute the triangular patch merging algorithm; if a non-plane executes this algorithm, it may cause serious distortion of the model appearance. This step automatically merges the planar triangular patches and takes their external and internal boundaries as the merging result.

[0093] Step 10: Determine whether to execute the algorithm for removing tiny holes; if so, execute Step 11; if not, summarize the patch data to end.

[0094] Step 11: Determine whether the current face is a plane after merging triangular patches;

[0095] If the current face is a plane after merging triangular patches, execute the direct internal boundary removal method to remove the internal boundaries whose ratio of the internal boundary perimeter to the external boundary perimeter is less than the set value, and return the external boundary and internal boundary data; after this step is executed, the removable internal boundaries are removed, and the simplified external boundary and internal boundary are returned for summarization.

[0096] If the current face is not a plane after merging triangular patches, execute the boundary vertex replacement method to find all the internal boundaries whose ratio of the internal boundary perimeter to the external boundary perimeter is less than the set value. When the face to be simplified is not a merged plane (it may be a curve or a plane), calculate the ratio of the perimeter of each internal boundary to the external boundary. When it is less than the set value, it is considered an object that can be removed. Record all the internal boundaries that need to be removed. Since each internal boundary is a polygon. This polygon may be located on a plane or may be a spatial polygon. Calculate the centroid coordinates of all the internal boundaries that need to be removed one by one. For the internal boundaries that do not need to be removed, there is no need to calculate. Then, traverse the vertex coordinates of the current geometric face and replace the vertex coordinates of all the boundaries that need to be removed with the centroid coordinates of this boundary. After the vertex replacement is completed, recalculate all the triangular patches included in the current face. At this time, the holes formed by the internal boundaries are simplified and disappear.

[0097] So far, the geometric data of each face has been simplified. After simplification, it may be a new set of triangular patch collections (mainly for curved surfaces), or it may be a plane composed of internal and external boundaries (only for planes).

[0098] In specific implementation, in the above-mentioned Revit model creation method provided by the embodiments of the present invention, in Step S104, the simplified model data is classified to obtain modeling classification information, such asFigure 4 As shown in the figure, the following steps may be specifically included:

[0099] Step Twelve: Read all entities included in the model; generally, a model contains N entities, where N > 1. For example, a reducer model contains multiple components such as a housing, a shaft, gears, bolts, bearings, etc. Each component may contain multiple entities. The purpose of this step is to read out all entities.

[0100] Step Thirteen: Judging one by one whether the entities in the model can be created as entity objects; when processing the nth entity, where n ≥ 1, judge whether the entity can be created as an entity object; creating an entity object is the simplest and can minimize the model storage space to the greatest extent, but the conditions are also the most stringent. Slightly complex entities cannot be created successfully. The main basis for judgment is whether all the faces of the model are completely closed.

[0101] If so, classify it into the category of entity objects that can be created; if not, classify it into the category of grid objects that can be created; it should be particularly noted that even if the judgment result is that an entity model can be created, it does not mean that it can be created successfully with 100%. This needs to be noted and corresponding measures should be taken during subsequent modeling. Entities that cannot create an entity model are added to the category of grid models that can be created. Such models will be created as grid models in Revit. After the above process, the nth entity is classified.

[0102] Step Fourteen: Loop through all entities in the model, complete the classification of all entities, and obtain the modeling classification information.

[0103] It should be understood that if no additional processing is done to the model data and all are created as entity models, the normal vectors of the faces may be chaotic; if all are created as grid models, the number of models will increase significantly. Only by treating them differently according to the characteristics of the model data is the best solution.

[0104] In specific implementation, in the above method for creating a Revit model provided by the embodiment of the present invention, in step S105, read the modeling classification information, call the Revit modeling interface, and create a Revit model, as Figure 5 shown, the following steps may be specifically included:

[0105] Step Fifteen: Read all entities and modeling classification information included in the model.

[0106] Step Sixteen: Generate multiple entities included in the model by using the method of modeling one by one, and each entity is created as one or more Revit objects.

[0107] Step Seventeen: According to the modeling classification information, judge whether the current entity belongs to the category of entity objects that can be created; if so, execute step Eighteen; if not, execute step Nineteen.

[0108] Step 18: Call the Revit modeling interface and try to create a physical object. All exceptions in the creation process should be captured. After the creation, it should be determined whether the creation is successful. If the creation is successful, it means that the physical modeling is completed. If the creation fails, go to step 19.

[0109] Step 19: Call the Revit modeling interface to generate a mesh object;

[0110] After the above process, the nth entity is created and the necessary creation information is written, such as the part name, the component to which it belongs, etc.

[0111] Step 20: Loop through the entities, model them one by one, complete the creation of all entities, and generate the Revit model.

[0112] It should be noted that the present invention first constructs the geometric information required for modeling by reading and parsing files in 3dxml format; then performs a large model simplification algorithm, including but not limited to parts simplification and surface simplification; thereafter, the model data is classified to facilitate the creation of different geometric models suitable for different scenes as needed; finally, the Revit modeling interface is called to create models according to different situations.

[0113] The present invention proposes the simplification of parts and the simplification of faces, but it must be pointed out that these two means are not indispensable. It is possible to use only one simplification means or not use them at all. This depends on the size of the model. In addition, this modeling method is also applicable to model creation in other software, not just Revit.

[0114] Based on the same inventive concept, an embodiment of the present invention also provides a device for creating a Revit model. Since the principle of solving the problem by the device is similar to that of the aforementioned method for creating a Revit model, the implementation of the device can refer to the implementation of the method for creating a Revit model, and the repeated parts will not be repeated.

[0115] In a specific implementation, the Revit model creation device provided by the embodiment of the present invention is as follows: Figure 6 As shown, specifically including:

[0116] The data reading module 11 is used to read the 3dxml file exported by CATIA or SOLIDWORKS and obtain the model information contained in the file;

[0117] The object construction module 12 is used to construct a three-dimensional data object according to the acquired model information;

[0118] The model simplification module 13 is used to perform model simplification processing according to the three-dimensional data object, including simplification of parts and / or simplification of faces;

[0119] A data classification module 14 is used to classify the simplified model data to obtain modeling classification information.

[0120] A model creation module 15 is used to read the modeling classification information, call the Revit modeling interface, and create a Revit model.

[0121] In the above-mentioned Revit model creation device provided by the embodiments of the present invention, through the interaction of the above five modules, the three-dimensional model designed by CATIA or SOLIDWORKS software can be completely controllably streamlined and lightweighted. After conversion, the original assembly relationship and necessary attributes can be retained, ensuring no distortion when imported into Revit, automatically creating a Revit model, improving the efficiency and quality of model conversion, and being able to eliminate the concerns of equipment manufacturers who are reluctant to provide three-dimensional models due to reasons such as confidentiality, and completely solving the problem of interaction of design results of software on different platforms.

[0122] For the more specific working processes of the above-mentioned various modules, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated here.

[0123] Correspondingly, the embodiments of the present invention also disclose a Revit model creation device, including a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the Revit model creation method disclosed in the foregoing embodiments is implemented.

[0124] For the more specific process of the above method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated here.

[0125] Furthermore, the present invention also discloses a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the Revit model creation method disclosed above is implemented.

[0126] For the more specific process of the above method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated here.

[0127] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the devices, equipment, and storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0128] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0129] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the technical field.

[0130] In summary, a method for creating a Revit model provided by an embodiment of the present invention includes: reading a 3dxml file exported by CATIA or SOLIDWORKS to obtain model information contained in the file; constructing a three-dimensional data object according to the obtained model information; performing model simplification processing on the three-dimensional data object, including simplification of parts and / or faces; classifying the simplified model data to obtain modeling classification information; reading the modeling classification information and calling the Revit modeling interface to create a Revit model. This method uses the 3dxml file as an intermediary. During the model conversion process, it can perform fully controllable streamlining and lightweighting on the three-dimensional models designed by CATIA or SOLIDWORKS software. After conversion, the original assembly relationship and necessary attributes can be retained, ensuring no distortion when imported into Revit, automatically creating a Revit model, improving the efficiency and quality of model conversion, and being able to eliminate the concerns of equipment manufacturers who are reluctant to provide three-dimensional models due to reasons such as confidentiality, completely solving the problem of interaction of design results between software on different platforms. In addition, the present invention also provides a corresponding device, equipment, and computer-readable storage medium for the method of creating a Revit model, further making the above method more practical, and the device, equipment, and computer-readable storage medium have corresponding advantages.

[0131] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.

[0132] The above has introduced in detail the method, apparatus, device and storage medium for creating a Revit model provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for creating a Revit model, characterized in that, Including: Read the 3dxml file exported from CATIA or SOLIDWORKS to obtain the model information contained in the file; Construct a three-dimensional data object according to the obtained model information; Perform model simplification processing according to the three-dimensional data object, including simplification of parts and / or simplification of faces; wherein, the simplification of the face includes: finding all boundaries of triangular patches in the face and distinguishing external boundaries and internal boundaries; calculating the perimeters of the external and internal boundaries; calculating the normal vectors of all triangular patches in the face, if the normal vectors are all equal, automatically merge the planar triangular patches and take their external and internal boundaries as the merge result; determine whether to remove the micro holes on the face; if so, determine whether the current face is a planar face after merging triangular patches; if the current face is a planar face after merging triangular patches, execute the internal boundary direct elimination method to eliminate the internal boundaries whose ratio of the internal boundary perimeter to the external boundary perimeter is less than the set value, and return the external boundary and internal boundary data; if the current face is not a planar face after merging triangular patches, execute the boundary vertex replacement method, find all internal boundaries whose ratio of the internal boundary perimeter to the external boundary perimeter is less than the set value, calculate the centroid coordinates of each internal boundary one by one, and replace the coordinates of the boundary vertices to be removed with the centroid coordinates of the boundary. After the vertex replacement is completed, recalculate all the triangular patches after replacement; Classify the simplified model data to obtain modeling classification information; Read the modeling classification information and call the Revit modeling interface to create a Revit model.

2. The method for creating a Revit model according to claim 1, wherein, The constructing a three-dimensional data object according to the obtained model information includes: Calculate the overall transformation matrix according to the assembly relationship and relative position matrix in the model information; Obtain all vertex coordinates in the world coordinate system according to the overall transformation matrix and generate a three-dimensional data object.

3. The method for creating a Revit model according to claim 1, characterized in that, The simplification of the parts includes: Remove internal parts and / or small parts.

4. The method for creating a Revit model according to claim 3, wherein, The removing internal parts and / or small parts includes: Obtain the OBB bounding boxes of all parts; Determine whether to remove internal parts; if so, calculate the inclusion and being included relationships of the OBB bounding boxes of all parts and obtain all the included parts; Judge the visibility of all the included parts; Find all invisible parts as removable internal parts according to the visibility judgment result of the parts; Determine whether to remove small parts; if so, calculate the OBB bounding box of the entire assembly; Calculate the ratio between the geometric size of the OBB bounding box of each part and the geometric size of the OBB bounding box of the assembly one by one; Find all parts with ratio values less than the set value as removable small parts; Remove the found removable internal parts and removable small parts.

5. The method for creating a Revit model according to claim 1, characterized in that, The classifying the simplified model data to obtain modeling classification information includes: Read all entities contained in the model; Judge one by one whether the entities in the model can be created as entity objects; If so, classify them into the classification of entity objects that can be created; If not, classify them into the classification of mesh objects that can be created; Loop through all entities in the model, complete the classification of all entities, and obtain the modeling classification information.

6. The method for creating a Revit model according to claim 5, characterized in that Reading the modeling classification information, invoking the Revit modeling interface, and creating a Revit model, including: Reading all entities contained in the model and the modeling classification information; Generating all entities contained in the model by using a method of modeling one by one, and creating each entity as one or more Revit objects; Judging whether the current entity belongs to the classification of entities that can be created according to the modeling classification information; If so, invoking the Revit modeling interface to create an entity object; If not, invoking the Revit modeling interface to generate a mesh object; Looping through the entities and modeling them one by one to complete the creation of all entities and generate a Revit model.

7. An apparatus for creating a Revit model, characterized in that Including: A data reading module for reading a 3dxml file exported by CATIA or SOLIDWORKS to obtain the model information contained in the file; An object construction module for constructing a three-dimensional data object according to the obtained model information; A model simplification module for performing model simplification processing according to the three-dimensional data object, including simplification of parts and / or simplification of faces; wherein, the simplification of faces includes: finding all boundaries of triangular patches in the face and distinguishing external boundaries and internal boundaries; calculating the perimeters of the external and internal boundaries; calculating the normal vectors of all triangular patches in the face, if the normal vectors are all equal, automatically merging the planar triangular patches and taking their external and internal boundaries as the merging result; judging whether to remove the micro holes of the face; if so, judging whether the current face is a planar face after merging triangular patches; if the current face is a planar face after merging triangular patches, performing the internal boundary direct elimination method to eliminate the internal boundaries whose ratio of the internal boundary perimeter to the external boundary perimeter is less than the set value, and returning the external boundary and internal boundary data; if the current face is not a planar face after merging triangular patches, performing the boundary vertex replacement method, finding all internal boundaries whose ratio of the internal boundary perimeter to the external boundary perimeter is less than the set value, calculating the centroid coordinates of the internal boundaries one by one, and replacing the coordinates of the boundary vertices to be removed with the centroid coordinates of the boundary, and after the vertex replacement is completed, recalculating all the triangular patches after replacement; A data classification module for classifying the simplified model data to obtain the modeling classification information; A model creation module for reading the modeling classification information, invoking the Revit modeling interface, and creating a Revit model.

8. A device for creating a Revit model, characterized in that, Including a processor and a memory, wherein when the processor executes the computer program stored in the memory, the method for creating a Revit model according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that, For storing a computer program, wherein when the computer program is executed by a processor, the method for creating a Revit model according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • VR-oriented ship giant data model lightweight method and system, terminal and medium

    CN111210521A

  • Complex large-scale electromechanical mixed loading three-dimensional model simplification method

    CN111783272A

  • Water conservancy and hydropower engineering multi-source data fusion method based on BIM+GIS

    CN112765720A