Rendering display method and device of MBD model, electronic equipment and storage medium

By analyzing and mapping geometric and MBD information in MBD model files, a renderable data file is generated, which solves the problem that MBD models cannot be rendered on the web page, and efficient and complete rendering effects are achieved, reducing the technical threshold.

CN119271914APending Publication Date: 2025-01-07ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411393990.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing web graphics technology cannot directly parse and render three-dimensional model files based on MBD technology, resulting in the MBD model being unable to render and display on the web page, and the existing format conversion tools cannot retain the key attribute information of the model, affecting the rendering effect.

Method used

By obtaining MBD model files, parsing out geometric information and MBD information, generating data files in the target format, and mapping data based on preset parsing rules, it realizes rendering of MBD models on web pages, and uses WebGL and other technologies to efficiently convert and render model data. .

Benefits of technology

It realizes efficient conversion of MBD model files to target format, retains the key attribute information of the model, improves data processing efficiency and rendering performance, ensures the integrity and accuracy of model data, reduces development complexity, and allows non-professional personnel to It can also be easily operated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271914A_ABST
    Figure CN119271914A_ABST
Patent Text Reader

Abstract

The invention relates to an MBD model rendering display method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a to-be-rendered MBD model file; the MBD model file is analyzed, and geometric information and MBD information in the MBD model file are obtained; based on the geometric information and the MBD information, generating an MBD data file in a target format; analyzing the MBD data file based on a preset analysis rule to obtain model mapping data; and based on the model mapping data, rendering and displaying the corresponding MBD model in the webpage. By the adoption of the technical scheme, the geometric information and the MBD information are analyzed from the MBD model file, then the MBD data file in the target format is generated, efficient conversion from the MBD model file to the file in the target format is achieved, the MBD data file obtained through format conversion can render a corresponding MBD model in a webpage, and the efficiency of the webpage is improved. And the data processing efficiency and the rendering performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer application technology, and in particular to a rendering and display method, device, electronic device and storage medium for an MBD model. Background Art

[0002] The core idea of ​​Model-Based Design (MBD) is to attach all relevant design definitions, process descriptions, attributes and management information of the product to the three-dimensional model of the product. This technology has been widely used in aerospace, automobile manufacturing, machinery manufacturing and other fields.

[0003] However, the three-dimensional model files generated by MBD technology cannot be directly parsed and rendered by existing Web graphics technology, making it impossible to realize MBD model rendering and display on the web page. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, at least one embodiment of the present disclosure provides a rendering and display method, device, electronic device and storage medium for an MBD model.

[0005] In a first aspect, the present disclosure provides a rendering and display method of an MBD model, comprising:

[0006] Get the MBD model file to be rendered;

[0007] Parsing the MBD model file to obtain geometric information and MBD information in the MBD model file;

[0008] Based on the geometric information and the MBD information, generate an MBD data file in a target format;

[0009] Parsing the MBD data file based on preset parsing rules to obtain model mapping data;

[0010] Based on the model mapping data, the corresponding MBD model is rendered and displayed on the web page.

[0011] In a second aspect, the present disclosure provides a rendering and display device for an MBD model, comprising:

[0012] A file acquisition module, used to acquire the MBD model file to be rendered;

[0013] A file parsing module, used to parse the MBD model file to obtain geometric information and MBD information in the MBD model file;

[0014] A format conversion module, used for generating an MBD data file in a target format based on the geometric information and the MBD information;

[0015] A data mapping module, used to parse the MBD data file based on preset parsing rules to obtain model mapping data;

[0016] The model rendering module is used to render and display the corresponding MBD model on the web page based on the model mapping data.

[0017] In a third aspect, the present disclosure provides an electronic device, including: a processor and a memory;

[0018] The processor is used to execute the rendering and display method of the MBD model as described in the first aspect by calling the program or instruction stored in the memory.

[0019] In a fourth aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute the rendering and display method of the MBD model as described in the first aspect.

[0020] In a fifth aspect, the present disclosure provides a computer program product, wherein the computer program product is used to execute the rendering and display method of the MBD model as described in the first aspect.

[0021] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:

[0022] In the disclosed embodiment, an MBD model file to be rendered is obtained, the MBD model file is parsed to obtain geometric information and MBD information in the MBD model file, and then, based on the geometric information and MBD information, an MBD data file in a target format is generated; then, the MBD data file is parsed based on a preset parsing rule to obtain model mapping data, and based on the model mapping data, the corresponding MBD model is rendered and displayed in a web page. The above technical solution is adopted to parse geometric information and MBD information from the MBD model file to generate an MBD data file in a target format, thereby realizing efficient conversion of the MBD model file to a target format file, so that the MBD data file obtained by format conversion can render the corresponding MBD model in a web page, thereby improving the efficiency of data processing and rendering performance. In addition, in this solution, not only geometric information but also MBD information can be parsed from the MBD model file, so that the parsed data retains the key attribute information in the MBD model file as much as possible, thereby improving the integrity and accuracy of the model data, and providing data support for accurately rendering the MBD model. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0025] Figure 1 A flowchart of a method for rendering and displaying an MBD model provided by an exemplary embodiment of the present disclosure;

[0026] Figure 2 A flowchart of a method for rendering and displaying an MBD model provided by another exemplary embodiment of the present disclosure;

[0027] Figure 3 A schematic diagram showing a process of converting an MBD model file into an MBD data file in JSON format according to an exemplary embodiment of the present disclosure is shown;

[0028] Figure 4 A system architecture diagram of a model format converter according to an exemplary embodiment of the present disclosure;

[0029] Figure 5 A system architecture diagram of a model data viewer according to an exemplary embodiment of the present disclosure;

[0030] Figure 6 A schematic diagram of a rendering process of an MBD model according to an exemplary embodiment of the present disclosure is shown;

[0031] Figure 7 A schematic diagram of the structure of a rendering and display device for an MBD model provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understandable that the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments, and the specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. In the absence of conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in the field belong to the scope of protection of the present disclosure.

[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0034] MBD technology attaches all relevant design definitions, process descriptions, attributes, and management information of the product to the three-dimensional model of the product, and uses the three-dimensional solid model as a carrier for data exchange and transmission. It abandons the traditional way of expressing solid models with two-dimensional CAD drawings, ensures the uniqueness of data throughout the product life cycle, and realizes the unique expression and efficient transmission of product definition information, providing strong support for the informatization and intelligent development of the manufacturing industry.

[0035] Web Graphics Library (WebGL) is a browser-based 3D drawing standard that provides web developers with the ability to directly access the underlying graphics hardware through JavaScript without relying on any plug-ins, thereby rendering high-quality 3D graphics and creating interactive 3D applications on web pages. WebGL is widely used in interactive graphics applications such as data visualization, virtual reality, and games due to its cross-platform, high-performance, flexibility, and real-time interaction.

[0036] However, in the existing solutions, the computer-aided design (CAD) format model files that support MBD technology, such as CATIA, SolidWorks, NX, which are mainly used in the manufacturing industry, and the product model data exchange standard (STEP) model files, which are the common standard format of the manufacturing industry, cannot be directly parsed and rendered by Web graphics technologies such as WebGL, resulting in the inability to render and display MBD models on the web page.

[0037] In order to solve the above problems, some format conversion tools have appeared on the market, which try to convert the format of MBD model files and render them on the web page. However, the existing format conversion tools can only convert the geometric information in model files in formats such as STEP and CATPart into lightweight model files that can be parsed and rendered by WebGL. They cannot retain the key product attribute information based on MBD technology, which makes the converted model data incomplete and affects the rendering effect of the model. In addition, since WebGL is the underlying drawing standard, a lot of development work is required to truly render 3D models on web pages, and the technical requirements for developers are relatively high.

[0038] In view of the above problems, the present disclosure provides a rendering and display solution for MBD models. By adopting this solution, MBD model files such as CATIA and STEP can be parsed and converted into lightweight model data that can be directly parsed and rendered by WebGL. The converted data not only includes the geometric information of the model, but also includes the MBD information of the model, thereby solving the problem that the MBD model file cannot be parsed by WebGL, while retaining the MBD information in the model as much as possible, and maintaining the integrity of the MBD model (including MBD information such as geometric shape, topological relationship, tolerance, material, process requirements, etc.), while achieving efficient parsing and rendering of the MBD model in a Web environment.

[0039] The specific implementations of the MBD model rendering and display method, device, electronic device, and storage medium disclosed in the present invention are explained in detail below with reference to the accompanying drawings.

[0040] Figure 1 A flow chart of a method for rendering and displaying an MBD model provided for an exemplary embodiment of the present disclosure is provided. The method can be executed by a rendering and display device for an MBD model provided for an embodiment of the present disclosure. The rendering and display device for an MBD model can be implemented by software and / or hardware and can be integrated in an electronic device.

[0041] like Figure 1 As shown, the rendering and display method of the MBD model may include the following steps:

[0042] Step 101: Obtain the MBD model file to be rendered.

[0043] Among them, the MBD model file can be a dedicated CAD file such as CATIA, SolidWorks, NX, or a standard CAD file such as STEP.

[0044] As an example, the acquired MBD model file may be a file uploaded by a user. For example, a file upload control may be provided in the graphical user interface, and the user uploads the MBD file to be rendered through the file upload control.

[0045] As another example, the acquired MBD model file may be a file directly imported from software such as CATIA, SolidWorks, NX, etc. For example, CATIA, SolidWorks, NX, etc. software may be associated with the rendering and display device of the MBD model disclosed in the present invention. After the above software generates the MBD model file, the generated MBD model file is automatically transmitted to the rendering and display device of the MBD model to realize the rendering and display of the corresponding MBD model.

[0046] Step 102: parse the MBD model file to obtain geometric information and MBD information in the MBD model file.

[0047] In the disclosed embodiment, after obtaining the MBD model file to be rendered, the MBD model file may be parsed to extract attribute information related to geometry and MBD, such as geometric shape, topological structure, assembly relationship, material property, geometric dimensioning and tolerance (GD&T) in the MBD model file, and then the geometric information and MBD information are separated from the parsed information, wherein the geometric information may include but is not limited to information such as the geometric shape and topological structure of the MBD model, and the MBD information may include but is not limited to information such as material property, assembly relationship, geometric dimensioning and tolerance.

[0048] Step 103: Generate an MBD data file in a target format based on the geometric information and the MBD information.

[0049] The target format is a preset format. For example, the target format may be a lightweight JSON format or other formats that support rendering and display in a Web environment.

[0050] In the disclosed embodiment, after the geometric information and the MBD information in the MBD model file are parsed and obtained, an MBD data file in a target format may be generated based on the geometric information and the MBD information.

[0051] Taking the target format as JSON format as an example, for the acquired geometric information and MBD information, each piece of geometric information can be expressed as a JSON object, and each piece of MBD information can be expressed as a JSON object, and then each JSON object can be encapsulated into an MBD data file in JSON format.

[0052] Step 104: parse the MBD data file based on preset parsing rules to obtain model mapping data.

[0053] Among them, the preset parsing rules can be pre-set according to actual needs. Since different industries or data standards have different information such as geometry and MBD, in order to improve the versatility of this solution, parsing rules are used to map the different items of different industries or data standards. The parsing rules define data mapping rules for different industries and data standards. Through the parsing rules, information from different industries or data standards can be mapped into information with a unified data structure, and can be viewed on the web page.

[0054] Exemplarily, the preset parsing rules include an MBD information rule dictionary, a geometric information rule dictionary, and a custom rule dictionary. The MBD information rule dictionary defines the parsing rules for MBD information to ensure that the manufacturing information in the model can be correctly read and displayed; the geometric information rule dictionary defines the parsing rules for the model's geometric information, such as vertices, meshes, edges, topology and other data; the custom rule dictionary allows users to define additional data parsing rules as needed, increasing the flexibility and scalability of the solution.

[0055] In the disclosed embodiment, after obtaining the MBD data file in the target format, the MBD data file in the target format may be mapped into model mapping data based on a preset parsing rule.

[0056] Step 105: Render and display the corresponding MBD model on the web page based on the model mapping data.

[0057] In the disclosed embodiment, after obtaining the model mapping data, the model mapping data can be parsed and rendered using Web graphics technology, and the MBD model corresponding to the MBD model file can be rendered and displayed on the web page. For example, the model mapping data can be rendered using WebGL, and the MBD model can be displayed on the web page.

[0058] The rendering and display method of the MBD model of the embodiment of the present disclosure obtains the MBD model file to be rendered, parses the MBD model file, obtains the geometric information and MBD information in the MBD model file, and then generates the MBD data file in the target format based on the geometric information and the MBD information; then, parses the MBD data file based on the preset parsing rules to obtain the model mapping data, and renders and displays the corresponding MBD model in the web page based on the model mapping data. The above technical scheme is adopted to parse the geometric information and the MBD information from the MBD model file, and then generate the MBD data file in the target format, so that the MBD model file is efficiently converted to the target format file, so that the MBD data file obtained by the format conversion can render the corresponding MBD model in the web page, and the efficiency of data processing and rendering performance are improved. In addition, in this scheme, not only the geometric information can be parsed from the MBD model file, but also the MBD information can be parsed, so that the parsed data retains the key attribute information in the MBD model file as much as possible, improves the integrity and accuracy of the model data, and provides data support for accurately rendering the MBD model.

[0059] In the embodiment of the present disclosure, different ways of parsing and processing MBD model files of different file formats may be performed. Figure 2 As shown, based on the above embodiment, step 102 may include the following sub-steps:

[0060] Step 201, obtaining the file format of the MBD model file.

[0061] It is understandable that the file formats corresponding to the MBD model files generated by different 3D modeling software may be the same or different, and the file format can be reflected by the file suffix. Therefore, in this embodiment, for the obtained MBD model file, its corresponding file format can be obtained.

[0062] Step 202, determining whether the file format belongs to a preset file format.

[0063] Among them, the preset file format can be pre-set, for example, the preset file format can be set to a dedicated CAD file format such as CATIA, SolidWorks, NX, etc.

[0064] In this embodiment, after the file format of the MBD model file is obtained, the file format can be compared with the preset file format to determine whether the file format belongs to the preset file format. If there is a format consistent with the file format of the MBD model file in the preset file format, it is determined that the file format belongs to the preset file format, otherwise it is considered that the file format does not belong to the preset file format. If the file format belongs to the preset file format, step 203 and its subsequent step 204 are executed; if the file format does not belong to the preset file format, step 205 is executed.

[0065] Step 203: Call the target API interface corresponding to the file format to perform preliminary analysis on the MBD model file to obtain an intermediate format file.

[0066] In this embodiment, when the file format of the MBD model file belongs to the preset file format, the application programming interface (Application Programming Interface, API) corresponding to the file format of the MBD model file is called (for the convenience of description and distinction, referred to as the target API interface), and the MBD model file is preliminarily parsed into an intermediate format file with the help of the target API interface.

[0067] Step 204: parse the intermediate format file to obtain geometric information and MBD information.

[0068] In this embodiment, after the intermediate format file is initially parsed, the intermediate format file may be further parsed to obtain geometric information and MBD information related to the MBD model file.

[0069] Exemplarily, the intermediate format file is first parsed to obtain attribute information related to geometry and MBD, and then the geometry information is separated from the attribute information of geometry and MBD and output to a mesh topology information set, and the MBD information is separated and output to a three-dimensional annotation information set. By outputting the geometry information and MBD information to different sets, it is convenient to use different processing engines to convert the formats of the geometry information and MBD information respectively.

[0070] In an optional implementation of the present disclosure, when the intermediate format file is parsed to obtain the geometry information and the MBD information, the file conversion parameters configured by the user may be acquired, and then the intermediate format file may be parsed based on the file conversion parameters to obtain the geometry information and the MBD information.

[0071] The file conversion parameters can be configured by the user according to actual needs. For example, a conversion parameter setting panel can be provided on the graphical user interface, and the conversion parameter setting panel can provide configuration options for conversion parameters, such as conversion parameters of geometric accuracy, GD&T, material properties, assembly relationships, process requirements, etc. The user configures the conversion parameters of at least one option through the conversion parameter setting panel. After the configuration is completed, the file conversion parameters can be obtained, and then when the intermediate format file is parsed, it can be parsed according to the configured file conversion parameters.

[0072] In this embodiment, by obtaining the file conversion parameters configured by the user, the geometric information and MBD information are obtained based on the file conversion parameter parsing, so that the user can flexibly configure the conversion parameters according to needs, realize the function of personalized data parsing based on the conversion parameters, and improve the parsing flexibility of the MBD model file in the preset file format.

[0073] Step 205: When the file format does not belong to the preset file format, determine whether the file format is a standard file format.

[0074] The standard file format is pre-set, for example, standard CAD file formats such as STEP can be used as the standard file format.

[0075] In the disclosed embodiment, when the file format of the MBD model file does not belong to the preset file format, it can be further determined whether the file format of the MBD model file is a standard file format. If the file format of the MBD model file is a standard file format, step 206 is executed; otherwise, the user can be prompted that the current MBD model file cannot be rendered and displayed, and the user can also be reminded to upload a file that conforms to the preset file format or the standard file format.

[0076] Step 206: When the file format is a standard file format, the MBD model file is parsed to obtain geometric information and MBD information.

[0077] In this embodiment, if the file format of the MBD model file is a standard file format, the MBD model file may be directly parsed to obtain the geometric information and MBD information in the MBD model file.

[0078] Exemplarily, during parsing, the MBD model file can be parsed first to obtain attribute information related to geometry and MBD, and then the geometry information can be separated from the attribute information of geometry and MBD and output to a mesh topology information set, and the MBD information can be separated and output to a three-dimensional annotation information set. By outputting the geometry information and MBD information to different sets, it is convenient to use different processing engines to convert the formats of the geometry information and MBD information respectively.

[0079] In an optional implementation of the present disclosure, when parsing an MBD model file in a standard file format to obtain geometric information and MBD information, a file conversion parameter configured by a user can be obtained, and then the MBD model file in the standard file format is parsed based on the file conversion parameter to obtain the geometric information and the MBD information. Thus, the user can flexibly configure the conversion parameter according to the needs, realize the function of personalized data parsing based on the conversion parameter, and improve the parsing flexibility of the MBD model file in the standard file format.

[0080] The rendering and display method of the MBD model of the present embodiment obtains the file format of the MBD model file. When the file format of the MBD model file is a preset file format, the target API interface corresponding to the file format is first called to perform preliminary parsing on the MBD model file to obtain an intermediate format file, and then the intermediate format file is parsed to obtain geometric information and MBD information. This eliminates the need to decipher the preset file format, thereby reducing the difficulty of parsing the MBD model file in the preset file format. In addition, when the file format of the MBD model file is a standard file format, the MBD model file is directly parsed to obtain geometric information and MBD information, without first converting the MBD model file in the standard file format into an intermediate format, thereby reducing the complexity of MBD model file parsing and helping to improve data parsing efficiency.

[0081] In an optional implementation of the present disclosure, when generating an MBD data file in a target format based on geometric information and MBD information, the geometric information and MBD information may be processed respectively to obtain processed target geometric information and target MBD information, wherein the data processing includes but is not limited to optimizing and simplifying the geometric information and MBD information, such as performing de-redundancy and indexing processing on the geometric data and MBD information respectively. The geometric information and MBD information may be processed using currently commonly used de-redundancy and indexing techniques. Through data processing, the amount of data can be reduced, thereby improving rendering performance. Next, the processed target geometric data can be classified according to the preset classification objects, and an object in the target format (referred to as the first object for ease of description and distinction) is generated for each classification object, wherein the classification objects include but are not limited to vertices, line segments, triangular facets, meshes, topological relationships, etc., and through classification, the information of the same classification object in the target geometric information is divided together and a first object is generated, thereby reducing the number of first objects; and the processed target MBD information is classified according to the annotation type, and an object in the target format (referred to as the second object for ease of description and distinction) is generated for each annotation type, wherein the annotation type includes but is not limited to dimensions, geometric tolerances, assembly relationships, material properties, etc., and through classification by annotation type, the information of the same annotation type in the target MBD information is divided together and a second object is generated, thereby reducing the number of second objects. It can be understood that the steps of generating the first object and the second object can be performed successively or simultaneously, and when performed simultaneously, it helps to improve the efficiency of format conversion. Finally, based on the first object and the second object, the MBD data file is encapsulated. When the MBD data file in the target format is generated based on the object in the target format, the encapsulation method of the file in the target format commonly used can be used for encapsulation, which is not elaborated in the present disclosure.

[0082] Take the target format as JSON as an example. Figure 3 FIG. 1 is a schematic diagram showing a process of converting an MBD model file into an MBD data file in JSON format according to an exemplary embodiment of the present disclosure. Figure 3As shown in the figure, the process of converting the MBD model file into the MBD data file in JSON format includes three parts: MBD model file parsing, data optimization and format conversion, and target format file generation. When the MBD model file is parsed, the data parsing API parses the MBD model file. When the MBD model file is in the preset file format, the MBD model file is converted into an intermediate format that can be recognized by the data parsing module in combination with the relevant CAD system API interface components provided by the mainstream 3D CAD systems, and then submitted to the data parsing module for parsing, and the geometric shape, topological structure, assembly relationship, material properties, GD&T and other attribute information related to geometry and MBD are extracted, and the extracted geometric information is output to the mesh & topology information set, and the extracted MBD information is output to the data information set such as the 3D annotation information set, and the geometry-related data and MBD-related data are split. Next, considering that the mesh & topology information set, 3D annotation information set and other data information sets extracted from MBD model files of different formats have a large amount of redundant data and inconsistent data structures, the specific algorithm of the data conversion API is called to perform data processing operations such as normalization preprocessing and redundant data removal, complete data compression and index creation, classify the optimized mesh and topology structure data according to types such as vertices, line segments, and triangles, and express the data in the form of objects to generate JSON objects, and classify the 3D annotation data according to annotation types such as dimensions, geometric tolerances, assembly relationships, and material properties, and express the data in the form of annotation objects to generate JSON objects. Finally, the JSON objects generated based on the network & topology data set and the JSON objects generated based on the 3D annotation data set are processed and encapsulated in the form of name / value pairs, and converted into lightweight JSON format MBD model files that can be rendered and displayed in a Web environment.

[0083] In an optional implementation of the present disclosure, a function of configuring scene parameters can be provided for users. Users can configure the parameters of the scene used to render the MBD model according to actual needs, and then render a scene that meets the user's needs in the web page for displaying the MBD model. Therefore, in this embodiment, when rendering and displaying the MBD model, the scene configuration parameters configured by the user can be obtained, and based on the scene configuration parameters, a virtual three-dimensional scene can be constructed in the web page; then, based on the model mapping data, the MBD model can be rendered and displayed in the virtual three-dimensional scene.

[0084] Exemplarily, a scene configuration panel can be set in a graphical user interface, through which the user can configure parameters of scene configuration options such as lighting, camera, material, animation, and post-processing. The electronic device can then obtain the scene configuration parameters configured by the user, and build a virtual 3D scene that meets the user's personalization on the web page according to the scene configuration parameters to support the rendering of the MBD model.

[0085] In this embodiment, the scene configuration parameters configured by the user are obtained to construct a virtual three-dimensional scene in the web page, and then the MBD model is rendered and displayed in the virtual three-dimensional scene based on the model mapping data. Thus, personalized virtual three-dimensional scene rendering is achieved and the rendering effect of the MBD model is enriched.

[0086] In an optional implementation of the present disclosure, a viewing and browsing function of the rendered MBD model can be provided to the user, and the user can browse different information of the MBD model according to actual needs. Thus, in this embodiment, after rendering and displaying the MBD model, it can be monitored whether a user's request to browse the model is received, and in response to receiving a model browsing request triggered by the user, the browsing type and browsing parameters carried in the model browsing request are obtained, wherein the browsing type may include but is not limited to a model structure tree, a model explosion, a model measurement, a model section, a rendering style, a navigation compass, MBD information, and geometric information, and each browsing type corresponds to a different browsing parameter. For example, when the browsing type is a model structure tree, the corresponding browsing parameter may be one or more parts of the model, indicating viewing the structure tree of the one or more parts of the model; for another example, when the browsing type is a model section, the corresponding browsing parameter may be a cross section, a longitudinal section, or an arbitrary section of the model, indicating viewing the section information of a certain section of the model. Then, based on the browsing type and the browsing parameter, the target model data that meets the browsing type and the browsing parameter can be extracted from the rendered MBD model. For example, if the browsing type carried in the model browsing request is navigation compass and the browsing parameter is 30 degrees clockwise rotation, the model data after the MBD model is rotated 30 degrees clockwise is obtained as the target model data. For another example, if the browsing type is geometric information and the browsing parameter is grid, all the grid data in the MBD model is obtained as the target model data. Finally, the target model data is displayed on the web page.

[0087] As an example, when displaying the target model data, the MBD model in the webpage may be replaced with the target model data to display the target model data in the webpage.

[0088] As an example, when displaying the target model data, the target model data can be displayed in a designated blank area of ​​the web page. For example, the blank portion on the right side of the web page is used as the area for displaying the target model data, and the target model data is displayed on the right side of the web page, while the MBD model in the web page remains unchanged, that is, the MBD model and target model data are displayed on the web page at the same time to facilitate users to compare and analyze model data.

[0089] As an example, when displaying the target model data, the target model data may be displayed in a pop-up window, and the pop-up window may be displayed at any position of the web page.

[0090] In the embodiments of the present disclosure, when a model browsing request triggered by a user is received, the browsing type and browsing parameters carried in the model browsing request are obtained, and the target model data satisfying the browsing type and browsing parameters are extracted from the MBD model for display, so that the user can complete the interactive operation with the rendered MBD model according to actual needs. The user only needs to select the required browsing type and configure the browsing parameters to view the corresponding model data without having development capabilities, which reduces the complexity of WebGL rendering 3D models in web pages and improves the user experience, so that non-professional developers can also operate easily.

[0091] In practical applications, the solution disclosed in the present invention can be deployed as a system, which is integrated in an electronic device to enable the electronic device to implement the format conversion and model rendering of MBD model files. The system includes a model format converter and a model data viewer, which are combined with the model format converter and the model data viewer to implement the function of rendering the MBD model on the web page. Among them, the model format converter can parse MBD model files such as CATIA and STEP, and convert them into lightweight model data that can be directly parsed and rendered by WebGL. The system architecture diagram of the model format converter is shown in the figure below. Figure 4 As shown in the figure, the model data viewer can render the MBD model on the web page based on the MBD data file in the target format converted by the model format converter, and integrates the basic scene resource configuration library required for rendering 3D models on the web page (such as lighting, cameras, materials, animation, post-processing, etc.), and provides tool plug-ins for viewing 3D model data (such as structure tree, explosion, sectioning, measurement, view rendering, navigation compass, MBD information display, geometric information display, etc.). The system architecture diagram of the model data viewer is shown in the figure. Figure 5 shown.

[0092] like Figure 4 As shown in the figure, the model format converter includes the user interface layer, API integration layer, data processing layer, data storage / sharing layer and API interface layer. The functions and module composition of each layer are explained as follows:

[0093] (1) User interface layer:

[0094] Function: This layer is the interface between the system and the user, responsible for providing a graphical user interface so that the user can interact with the system. This layer is used to process user input (such as file upload, parameter setting, etc.) and display system output (such as conversion progress, result preview, etc.). The main goal of the user interface layer is to ensure that the user experience is friendly and intuitive.

[0095] Module composition:

[0096] a) File upload control: allows users to select and upload proprietary CAD files such as CATIA, SolidWorks, NX, or standard CAD files such as STEP.

[0097] b) Conversion parameter setting panel: provides configuration options for conversion parameters, such as geometric accuracy, GD&T (geometric dimensioning and tolerance), material properties, assembly relationships, process requirements and other model information.

[0098] c) Progress status display area (optional): displays the conversion progress and current status in real time.

[0099] d) Result preview area (optional): displays the preview of the converted model.

[0100] e) File export control: allows users to export the converted model file.

[0101] (2) API Integration Layer:

[0102] Function: This layer is responsible for integrating the application programming interface (API) of external systems, especially the secondary development API of mainstream CAD systems in the manufacturing field such as CATIA, SolidWorks, and NX. By encapsulating these APIs, the API integration layer enables the system to read and parse the files of these CAD systems. The API integration layer is a bridge for the system to interact with other CAD software.

[0103] Module composition:

[0104] a) CATIA API integration module: encapsulates CATIA's secondary development API and provides the ability to operate, read, parse and process CATIA systems and files.

[0105] b) SolidWorks API integration module: encapsulates the secondary development API of SolidWorks and provides the ability to operate, read, parse and process the SolidWorks system and files.

[0106] c) NX API integration module: Integrates NX Open API to provide the ability to operate, read, parse and process NX systems and files.

[0107] d) Other CAD API integration module (optional): Integrate APIs of other CAD systems as required.

[0108] (3) Data processing layer:

[0109] Function: The data processing layer is the core of the system and is responsible for data input, parsing, conversion and output. This layer receives file input from the user interface layer and interacts with the CAD system through the API integration layer to obtain interaction permissions. Then, internal algorithms or logic are used to parse the data and convert it into the system internal representation or target format. Finally, the converted data is output for display by the user interface layer or storage layer to save.

[0110] Module composition:

[0111] a) Data input module: receives file input from the user interface layer and performs preliminary file format verification.

[0112] b) Data parsing module (i.e. Figure 3 Data parsing API in the API integration layer): Use the API provided by the API integration layer to parse the MBD model file and extract attribute information related to geometry and MBD, such as geometric shape, topological structure, assembly relationship, material properties, GD&T, etc.

[0113] c) Data conversion module (i.e. Figure 3 Data conversion API in the system): Convert the parsed data into the system internal representation and perform necessary optimization and simplification to reduce the data volume and improve rendering performance. Then, convert the data in the internal representation into the target format data according to a specific algorithm.

[0114] d) Data output module: outputs the converted data into the specified file format and prepares for export.

[0115] (4) Data storage / sharing layer

[0116] Function: The data storage / sharing layer is responsible for the storage and sharing of system data, including a variety of storage solutions such as relational databases, non-relational databases, local file systems or cloud storage services. The data storage / sharing layer is used to save user information, conversion records, intermediate data and final conversion results. In addition, it also supports data sharing, allowing different users or systems to share and access stored data.

[0117] Module composition:

[0118] a) Database module: Use relational database or non-relational database to store model data, user information, conversion records, etc.

[0119] b) Local storage module: provides a storage solution for the local file system to temporarily store intermediate data during the conversion process.

[0120] c) Cloud storage module: Integrates cloud storage services to realize cloud storage and sharing of model data.

[0121] (5) API interface layer

[0122] Function: The API interface layer provides a set of standardized interfaces that allow other systems or applications to interact with the system through HTTP, WebSocket, etc. These interfaces can expose the functions of the data processing layer, allowing other systems to call the services of the model format converter. In addition, the API interface layer also contains the internal system call API for data transfer and functional collaboration between modules within the system.

[0123] Module composition:

[0124] a) External system call API: Define a series of API interfaces to allow other systems to call the functions of the model format converter through HTTP, WebSocket, etc.

[0125] b) Internal system call API: provides a calling interface between internal modules to achieve data transfer and functional collaboration between modules.

[0126] like Figure 5 As shown in the figure, the model data viewer includes the display layer, application component layer, functional component layer, visualization engine layer and data interface layer. The functions and module composition of each layer are explained as follows:

[0127] (1) Presentation Layer

[0128] Function: The presentation layer is the direct interface between the user and the system, responsible for presenting the data and functions processed within the system to the user in a visual form. Different presentation terminals adapt to different usage scenarios and user needs, ensuring that users can easily access and use the system on any device.

[0129] Module composition:

[0130] a) PC browser: Users access the system through a browser on their personal computer to view and operate 3D models.

[0131] b) Mobile phone / tablet: Support browsing and interaction on mobile devices, improving the portability and flexibility of the system.

[0132] c) Smart large screen: supports display on large display devices, suitable for conferences, exhibitions and other scenarios.

[0133] (2) Application Component Layer

[0134] Function: The application component layer contains a collection of tool components that users often use when viewing and browsing models in the daily production and manufacturing process.

[0135] Module composition:

[0136] a) Model structure tree: It can provide a hierarchical view of the model structure based on user needs, so that users can quickly locate and view various parts of the model and perform related human-computer interaction operations.

[0137] b) Model explosion: Based on user needs, the model can be automatically decomposed into explosion forms of different dimensions according to the structural hierarchy or assembly relationship, so that users can better understand its structure and assembly relationship.

[0138] c) Model cutting: Based on user needs and the selected cutting form, the model can be cut into cross-section, longitudinal section or any section, so that users can intuitively view the internal structure.

[0139] d) Model measurement: It provides a variety of general measurement functions such as length, thickness, angle, bounding box, feature (circle, edge, surface), area, volume, and distance between two points, so that users can quickly obtain model size parameters according to actual scene requirements.

[0140] e) Rendering style: It provides shading, wireframe, material, triangle, transparency, perspective, parallel and other view rendering styles, so that users can quickly select the corresponding model rendering display effect according to the actual scene requirements.

[0141] f) Navigation compass: It provides navigation tools in 3D space such as translation, zoom, rotation, viewpoint alignment, adaptive window, compass, etc., to help users quickly operate and view models from different angles.

[0142] g) MBD information: Displays manufacturing information in the model (such as dimensional tolerances, materials, assembly relationships, process requirements, technical requirements, etc.) to assist the production and manufacturing process.

[0143] h) Geometric information: Displays geometric data information such as meshes, vertices, and topological structures in the model, allowing users to intuitively understand the complexity of the current model.

[0144] (3) Functional component layer

[0145] Function: The functional component layer integrates basic functional modules such as access rights, data security, collaborative sharing, and 3D virtual scene construction involved in the system's model viewing and use process to ensure the stability, security, and efficient operation of the system.

[0146] Module composition:

[0147] a) User permissions: Manage user access rights to ensure data security and compliance.

[0148] b) Data security: Encrypt transmitted data to ensure that user information and model data are not illegally obtained.

[0149] c) Collaborative sharing: It supports multiple users to view and edit models online at the same time. It can generate sharing links, QR codes and other sharing resources to quickly share models and improve team collaboration efficiency.

[0150] d) Scene configuration: It provides a wealth of componentized scene configuration options, such as lighting, cameras, materials, animations, post-processing, etc. Through plug-and-play scene configuration components, it is possible to quickly build a virtual 3D scene that meets the user's personalized needs to support model rendering.

[0151] (4) Visualization engine layer

[0152] The visualization engine layer is the technical core layer of the entire viewer system. It is based on WebGL and Three.js as the core, and is encapsulated and redeveloped on this basis. It is also upwardly compatible with WebGPU technology, providing underlying rendering and interaction capabilities for viewing 3D models on web pages.

[0153] (5) Data interface layer

[0154] Function: The data interface layer is a bridge for the interaction between the viewer and the MBD data generated by the format converter. It is responsible for data parsing, verification, cleaning, conversion, and mapping to ensure data accuracy and consistency and provide reliable data support for upper-level applications.

[0155] Module composition:

[0156] a) MBD information rule dictionary: defines the parsing rules for MBD information to ensure that the manufacturing information in the model can be correctly read and displayed.

[0157] b) Geometry information rule dictionary: defines the parsing rules of the model geometry information, such as vertices, meshes, edges, topology and other data.

[0158] c) User-defined rule dictionary: allows users to define additional data parsing rules as needed, increasing the flexibility and scalability of the system.

[0159] (6) API interface layer

[0160] Function: The API interface layer provides a set of standardized interfaces that allow other systems or applications to interact with the system through HTTP, WebSocket, etc. These interfaces can expose the functions of the corresponding layers, allowing other systems to call the services of the model data viewer. In addition, the API interface layer also contains internal system call APIs for data transfer and functional collaboration between internal modules of the system.

[0161] Module composition:

[0162] c) External system call API: Define a series of API interfaces to allow other systems to call the functions of the model data viewer through HTTP, WebSocket, etc.

[0163] d) Internal system call API: provides a calling interface between internal modules to achieve data transfer and functional collaboration between modules.

[0164] The model format converter and model data viewer proposed in this solution can be used as general components and provide corresponding API interfaces, so that other digital and information systems can easily integrate these components to realize real-time rendering and interaction of MBD models in web pages. As a result, the application scope of this solution is greatly expanded, and the popularization and application of MBD technology in the Web environment are promoted. In addition, it should be noted that the two components of the model format converter and model data viewer can be combined and used together, or each can be used separately as an independent functional component to realize a separate model format conversion or render and display existing lightweight model data and browse and view model data.

[0165] Take the example of rendering MBD models in a browser that supports WebGL. Figure 6 FIG. 2 shows a schematic diagram of the rendering process of an MBD model according to an exemplary embodiment of the present disclosure. Figure 6 As shown, after the process starts, first check whether the browser in the electronic device supports WebGL. If not, prompt the user to select a browser that supports WebGL; if WebGL is supported, initialize the model data viewer. After the initialization is completed, the system can call the visualization engine layer, load the three.js library to create a scene, and then complete the scene configuration (including lighting, camera, material, texture, animation, post-processing, etc.) to complete the initialization process. When configuring the scene, if the user does not configure the scene parameters through the scene configuration module of the model data viewer, the scene is configured according to the default parameters. If the user configures the scene parameters, the scene is configured according to the scene parameters configured by the user. The data interface layer loads the MBD model data in lightweight JSON format from the model format converter, and pre-parses the MBD model data to obtain the model mapping data. After that, a shader is generated based on the model mapping data and the primitives are rasterized to complete the rendering and display of the model on the web page. In addition, different model data can be viewed through the application component layer provided by the model data viewer to achieve human-computer interaction.

[0166] Compared with the existing solutions, the solution disclosed in this disclosure has the following advantages:

[0167] 1) Information integrity: Existing solutions can only convert the geometric information of MBD models, while this solution can retain the key attribute information in the MBD model as much as possible, including tolerances, materials, process requirements, etc., thereby improving the integrity and accuracy of the model data;

[0168] 2) Ease of use: The model data viewer provided by this solution integrates a variety of tools and plug-ins, which lowers the technical threshold for WebGL to render 3D models on web pages, making it easy for non-professional developers to operate;

[0169] 3) Scalability: By providing common components and API interfaces, this solution can be easily integrated with other digital and information systems to achieve the wide application of MBD models in the Web environment;

[0170] 4) Efficiency: The model format converter of this solution realizes the efficient conversion of MBD model data to WebGL lightweight format, improving the efficiency of data processing and rendering performance.

[0171] In order to implement the above embodiments, the present disclosure further provides a rendering and display device for an MBD model. The rendering and display device for an MBD model can be implemented using software and / or hardware and can be integrated in an electronic device.

[0172] Figure 7 A schematic diagram of the structure of a rendering and display device for an MBD model provided in an embodiment of the present disclosure, such as Figure 7 As shown, the MBD model rendering and display device 30 may include: a file acquisition module 310 , a file parsing module 320 , a format conversion module 330 , a data mapping module 340 and a model rendering module 350 .

[0173] The file acquisition module 310 is used to acquire the MBD model file to be rendered;

[0174] A file parsing module 320 is used to parse the MBD model file to obtain geometric information and MBD information in the MBD model file;

[0175] A format conversion module 330, for generating an MBD data file in a target format based on the geometric information and the MBD information;

[0176] The data mapping module 340 is used to parse the MBD data file based on a preset parsing rule to obtain model mapping data;

[0177] The model rendering module 350 is used to render and display the corresponding MBD model in the web page based on the model mapping data.

[0178] Optionally, the file parsing module 320 includes:

[0179] A format acquisition unit, used to acquire the file format of the MBD model file;

[0180] A first judging unit, used to judge whether the file format belongs to a preset file format;

[0181] A preliminary parsing unit, used for, when the file format belongs to a preset file format, calling a target API interface corresponding to the file format to perform preliminary parsing on the MBD model file to obtain an intermediate format file;

[0182] The parsing unit is used to parse the intermediate format file to obtain geometric information and MBD information.

[0183] Further optionally, the file parsing module 320 further includes:

[0184] A second judging unit, configured to judge whether the file format is a standard file format when the file format does not belong to the preset file format;

[0185] The parsing unit is also used to parse the MBD model file to obtain geometric information and MBD information when the file format is a standard file format.

[0186] Further optionally, the parsing unit is further configured to:

[0187] Get the file conversion parameters configured by the user;

[0188] Based on the file conversion parameters, the file is parsed to obtain the geometric information and MBD information;

[0189] The file is an MBD model file in an intermediate format or a standard file format.

[0190] Optionally, the format conversion module 330 is further configured to:

[0191] The geometric information and the MBD information are processed respectively to obtain processed target geometric information and target MBD information;

[0192] Classifying the target geometric information according to preset classification objects, and generating a first object in a target format for each classification object;

[0193] Classifying the MBD information according to annotation types, and generating a second object in a target format for each annotation type;

[0194] Based on the first object and the second object, an MBD data file is obtained by encapsulation.

[0195] Optionally, the model rendering module 350 is further used to:

[0196] Get the scene configuration parameters configured by the user;

[0197] Based on the scene configuration parameters, a virtual three-dimensional scene is constructed on the web page;

[0198] Based on the model mapping data, the MBD model is rendered and displayed in a virtual 3D scene.

[0199] Optionally, the MBD model rendering and display device 30 further includes:

[0200] A browsing information acquisition module, used to obtain the browsing type and browsing parameters carried in the model browsing request in response to receiving a model browsing request triggered by a user;

[0201] A browsing data determination module, used for extracting target model data satisfying the browsing type and the browsing parameters from the MBD model based on the browsing type and the browsing parameters;

[0202] Display module, used to display target model data on the web page.

[0203] The rendering and display device of the MBD model applicable to the electronic device provided in the embodiment of the present disclosure can execute the rendering and display method of the MBD model provided in the embodiment of the present disclosure, and has the functional modules and beneficial effects corresponding to the execution method. For the contents not described in detail in the embodiment of the device of the present disclosure, reference can be made to the description in any method embodiment of the present disclosure.

[0204] The embodiments of the present disclosure also provide an electronic device, including a processor and a memory; the processor calls a program or instruction stored in the memory to execute the steps of each embodiment of the rendering and display method of the MBD model as described above, which will not be repeated here to avoid repeated description.

[0205] The embodiments of the present disclosure further provide a computer-readable storage medium, which is non-transitory and stores programs or instructions. The programs or instructions enable a computer to execute the steps of the embodiments of the rendering and display method of the MBD model as described above. To avoid repeated description, they are not repeated here.

[0206] The embodiments of the present disclosure further provide a computer program product, which is used to execute the steps of the embodiments of the aforementioned MBD model rendering and display method.

[0207] It should be noted that, in this article, 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 such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0208] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A rendering and display method of an MBD model, characterized in that: The method comprises: Get the MBD model file to be rendered; Parsing the MBD model file to obtain geometric information and MBD information in the MBD model file; Generate an MBD data file in a target format based on the geometric information and the MBD information; Parsing the MBD data file based on preset parsing rules to obtain model mapping data; Based on the model mapping data, the corresponding MBD model is rendered and displayed on the web page.

2. The method according to claim 1, characterized in that: The step of parsing the MBD model file to obtain geometric information and MBD information in the MBD model file includes: Obtain the file format of the MBD model file; Determining whether the file format belongs to a preset file format; In the case where the file format belongs to the preset file format, calling the target API interface corresponding to the file format to perform preliminary parsing on the MBD model file to obtain an intermediate format file; The intermediate format file is parsed to obtain the geometric information and the MBD information.

3. The method according to claim 2, characterized in that After determining whether the file format belongs to a preset file format, the method further includes: In the case that the file format does not belong to the preset file format, determining whether the file format is a standard file format; In the case where the file format is the standard file format, the MBD model file is parsed to obtain the geometric information and the MBD information.

4. The method according to claim 2 or 3, characterized in that: Parsing the file to obtain the geometric information and the MBD information includes: Get the file conversion parameters configured by the user; Based on the file conversion parameter, the file is parsed to obtain the geometric information and the MBD information; The file is the MBD model file in the intermediate format or the standard file format.

5. The method according to any one of claims 1 to 3, characterized in that: The generating of the MBD data file in a target format based on the geometric information and the MBD information comprises: Performing data processing on the geometric information and the MBD information respectively to obtain processed target geometric information and target MBD information; Classifying the target geometric information according to preset classification objects, and generating a first object in the target format for each of the classification objects; Classifying the MBD information according to annotation types, and generating a second object in the target format for each annotation type; The MBD data file is obtained by encapsulation based on the first object and the second object.

6. The method according to any one of claims 1 to 3, characterized in that: The rendering and displaying of the corresponding MBD model on a webpage based on the model mapping data includes: Get the scene configuration parameters configured by the user; Based on the scene configuration parameters, construct a virtual three-dimensional scene in the webpage; Based on the model mapping data, the MBD model is rendered and displayed in the virtual three-dimensional scene.

7. The method according to any one of claims 1 to 3, characterized in that: After rendering and displaying the corresponding MBD model on the webpage, the method further includes: In response to receiving a model browsing request triggered by a user, obtaining a browsing type and browsing parameters carried in the model browsing request; Based on the browsing type and the browsing parameter, extracting target model data satisfying the browsing type and the browsing parameter from the MBD model; The target model data is displayed on the webpage.

8. A rendering and display device for MBD models, characterized in that: include: A file acquisition module, used to acquire the MBD model file to be rendered; A file parsing module, used to parse the MBD model file to obtain geometric information and MBD information in the MBD model file; A format conversion module, used for generating an MBD data file in a target format based on the geometric information and the MBD information; A data mapping module, used to parse the MBD data file based on preset parsing rules to obtain model mapping data; The model rendering module is used to render and display the corresponding MBD model on the web page based on the model mapping data.

9. An electronic device, characterized in that: include: Processor and memory; The processor is used to execute the rendering and display method of the MBD model according to any one of claims 1 to 7 by calling the program or instruction stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the rendering and display method of the MBD model according to any one of claims 1 to 7.

Citation Information

Cited By

  • Development general data conversion middleware adaptable to various CAD tools and conversion method

    CN121029185A