Modeling method and device, electronic equipment and storage medium

By analyzing and processing the modeling files composed of markup languages, we ensure that the decoupling and independent operation between sub-models is solved, and the problem that the model cannot be operated independently due to operations during the modeling process is improved, and modeling efficiency and user experience are improved.

CN119760973APending Publication Date: 2025-04-04CHINA COAL RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411774831.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

During the modeling process, the model may be affected by the modeling operations, resulting in the inability to operate independently, the user operations are complex, the modeling efficiency is low, resulting in poor user experience.

Method used

By obtaining the target modeling file composed of markup language, parsing the file, obtaining the object code used to describe the modeling information of multiple sub-models, ensuring that the sub-models are decoupled and that each sub-model can operate independently. Execute the code in the order of execution of the target code, generate and integrate sub-models, form the total model, and display the total model on the interactive interface.

Benefits of technology

The independent operation of each sub-model is realized, which facilitates users to adjust the model in real time, simplifies user operations, improves modeling efficiency, and optimizes the user experience in modeling scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760973A_ABST
    Figure CN119760973A_ABST
Patent Text Reader

Abstract

The invention provides a modeling method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a target modeling file composed of markup languages; the target modeling file is analyzed, target codes used for describing first modeling information of the multiple first sub-models are obtained, and the target codes corresponding to the multiple first sub-models are decoupled so that each first sub-model can be independently operated; executing the plurality of target codes according to the execution sequence of the plurality of target codes to generate a plurality of target sub-models, and integrating the plurality of target sub-models to obtain a total target model; and displaying the target total model on the interactive interface. Therefore, each first sub-model cannot be affected by modeling operation, so that the first sub-models cannot be independently operated, each first sub-model can be independently operated in the whole modeling process, a user can conveniently adjust the first sub-models in real time, user operation is simplified, modeling efficiency is improved, and user experience in a modeling scene is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of modeling technology, and in particular to a modeling method, device, electronic device and storage medium. Background Art

[0002] In the related art, during the modeling process, the model may be affected by some modeling operations, resulting in the inability to operate independently. For example, if model A and model B are merged (such as Boolean join), welded, bridged, topologically connected, etc., model A and model B will be converted into a new model C. The new model C can be operated independently, while the original model A and model B cannot be operated independently. If the user wants to operate the original model A and model B independently, such as redrawing model A or moving model B, the user needs to undo the above operations on model A and model B, which complicates the user operation and reduces the modeling efficiency, resulting in a poor user experience in the modeling scenario. Summary of the invention

[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0004] To this end, the first objective of this application is to propose a modeling method.

[0005] The second objective of this application is to provide a modeling device.

[0006] The third objective of the present application is to provide an electronic device.

[0007] A fourth objective of the present application is to provide a computer-readable storage medium.

[0008] A fifth object of the present application is to provide a computer program product.

[0009] To achieve the above-mentioned purpose, the first aspect of the present application proposes a modeling method, including: obtaining a target modeling file composed of a markup language; parsing the target modeling file to obtain a target code for describing the first modeling information of each of multiple first sub-models, wherein the first modeling information includes at least one of a modeling parameter and a modeling operation, and the target codes corresponding to each of the multiple first sub-models are decoupled from each other so that each of the first sub-models can be operated independently; executing the multiple target codes in the execution order of the multiple target codes to generate multiple target sub-models, and integrating the multiple target sub-models to obtain a target overall model; and displaying the target overall model on an interactive interface.

[0010] To achieve the above-mentioned purpose, the second aspect of the present application proposes a modeling device, including: an acquisition module, used to acquire a target modeling file composed of a markup language; a parsing module, used to parse the target modeling file to obtain a target code for describing the first modeling information of each of multiple first sub-models, wherein the first modeling information includes at least one of a modeling parameter and a modeling operation, and the target codes corresponding to each of the multiple first sub-models are decoupled from each other so that each of the first sub-models can be operated independently; an execution module, used to execute multiple target codes in the execution order of the multiple target codes to generate multiple target sub-models, and integrate the multiple target sub-models to obtain a target overall model; a display module, used to display the target overall model on an interactive interface.

[0011] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect embodiment above.

[0012] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the method described in the first aspect embodiment above.

[0013] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first aspect of the present application.

[0014] The modeling method, device, electronic device and storage medium provided by the present application obtain a target modeling file composed of a markup language, parse the target modeling file, and obtain a target code for describing the first modeling information of each of the multiple first sub-models, wherein the first modeling information includes at least one of a modeling parameter and a modeling operation, and the target codes corresponding to the multiple first sub-models are decoupled from each other so that each first sub-model can be operated independently, and the multiple target codes are executed in the execution order of the multiple target codes to generate multiple target sub-models, and the multiple target sub-models are integrated to obtain a target overall model, and the target overall model is displayed on an interactive interface. As a result, each first sub-model will not be affected by the modeling operation, resulting in the inability to operate independently. During the entire modeling process, each first sub-model can be operated independently, which is convenient for users to adjust the first sub-model in real time, simplifying user operations, and in addition, automatic modeling can be performed based on the modeling file, which improves modeling efficiency and optimizes user experience in modeling scenarios.

[0015] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0017] Figure 1 A schematic diagram of a flow chart of a modeling method provided in an embodiment of the present application;

[0018] Figure 2 A flowchart of another modeling method provided in an embodiment of the present application;

[0019] Figure 3 A flowchart of another modeling method provided in an embodiment of the present application;

[0020] Figure 4 A flowchart of another modeling method provided in an embodiment of the present application;

[0021] Figure 5 A general structure diagram of the graph.xml language provided in an embodiment of the present application;

[0022] Figure 6 A structural diagram of subgraph parameters in the graph.xml language provided in an embodiment of the present application;

[0023] Figure 7 A structural diagram of a subgraph variable in the graph.xml language provided in an embodiment of the present application;

[0024] Figure 8 A structural diagram of reference variables of a subgraph in the graph.xml language provided in an embodiment of the present application;

[0025] Fig. 9 A structural diagram of a subgraph variable processing expression in the graph.xml language provided in an embodiment of the present application;

[0026] Fig.10 A structural diagram of the public attributes of a subgraph in the graph.xml language provided in an embodiment of the present application;

[0027] Fig.11 A structural diagram of a subgraph output node in the graph.xml language provided in an embodiment of the present application;

[0028] Fig.12 A structural diagram of an operation node in the graph.xml language provided in an embodiment of the present application;

[0029] Fig.13 A structural diagram of a subgraph reference object node in the graph.xml language provided in an embodiment of the present application;

[0030] Fig.14 A schematic diagram of a modeling method provided in an embodiment of the present application;

[0031] Fig.15 A schematic diagram of another modeling method provided in an embodiment of the present application;

[0032] Fig.16 A schematic diagram of another modeling method provided in an embodiment of the present application;

[0033] Fig.17 A schematic diagram of the structure of a modeling device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0035] The modeling method, device, electronic device and storage medium of the embodiments of the present application are described below with reference to the accompanying drawings.

[0036] Figure 1 A flow chart of a modeling method provided in an embodiment of the present application.

[0037] In the related art, during the modeling process, the model may be affected by some modeling operations, resulting in the inability to operate independently. For example, if model A and model B are merged (such as Boolean join), welded, bridged, topologically connected, etc., model A and model B will be converted into a new model C. The new model C can be operated independently, while the original model A and model B cannot be operated independently. If the user wants to operate the original model A and model B independently, such as redrawing model A or moving model B, the user needs to undo the above operations on model A and model B, which complicates the user operation and reduces the modeling efficiency, resulting in a poor user experience in the modeling scenario.

[0038] To address this problem, the embodiment of the present application provides a modeling method, in which each first sub-model will not be affected by the modeling operation, resulting in the inability to operate independently. During the entire modeling process, each first sub-model can be operated independently, which is convenient for users to adjust the first sub-model in real time, simplifying user operations. In addition, modeling can be automatically performed based on the modeling file, thereby improving modeling efficiency and optimizing the user experience in the modeling scenario. Figure 1As shown, the method comprises the following steps:

[0039] S101, obtaining a target modeling file composed of a markup language.

[0040] It should be noted that there are no excessive restrictions on the markup language, for example, it may include XML (Extensible Markup Language), etc. The target modeling file is in text format.

[0041] Exemplarily, the present application provides a markup language named graph.xml (which may be referred to as graph.xml language for short). The relevant contents of graph.xml language can be found in the following embodiments and will not be described here. graph.xml language is applicable to a variety of graphics platforms, so only one modeling file needs to be written in graph.xml language, and one modeling file can be used to model on a variety of graphics platforms, thereby improving modeling efficiency.

[0042] In addition, compared with the related art where modeling files are mostly in binary format, resulting in poor readability and high maintenance difficulty of the modeling files, the graph.xml language has better readability, so that the modeling files have better readability and are easy to maintain.

[0043] S102, parsing the target modeling file to obtain a target code for describing first modeling information of each of the plurality of first sub-models, wherein the first modeling information includes at least one of a modeling parameter and a modeling operation, and the target codes corresponding to the plurality of first sub-models are decoupled from each other so that each first sub-model can be operated independently.

[0044] It should be noted that there are no excessive restrictions on the sub-models and the overall model, for example, they may include 2D (Dimensional) models, 3D models, etc. There may be one or more target codes corresponding to a first sub-model, and the target code is used to model the first sub-model corresponding to the target code. The relevant contents of the target code, modeling parameters, and modeling operations can all be found in the following embodiments, which will not be repeated here.

[0045] It is understandable that the first modeling information of different first sub-models may be different, and the target codes corresponding to different first sub-models may be different.

[0046] In the related art, during the modeling process, the model may be affected by some modeling operations, resulting in the inability to operate independently. For example, if model A and model B are merged (such as Boolean join), welded, bridged, topologically connected, etc., model A and model B will be converted into a new model C. The new model C can be operated independently, while the original model A and model B cannot be operated independently. If the user wants to operate the original model A and model B independently, such as redrawing model A or moving model B, the user needs to undo the above operations on model A and model B, which complicates the user operation and reduces the modeling efficiency, resulting in a poor user experience in the modeling scenario.

[0047] However, in the present solution, the target codes corresponding to the multiple first sub-models are decoupled from each other so that each first sub-model can be operated independently, that is, each first sub-model will not be affected by the modeling operation, resulting in an inability to operate independently. During the entire modeling process, each first sub-model can be operated independently, which facilitates users to adjust the first sub-model in real time, simplifies user operations, improves modeling efficiency, and optimizes the user experience in modeling scenarios.

[0048] In addition, in this solution, the target codes corresponding to multiple first sub-models are decoupled from each other, so that the target code corresponding to any first sub-model can be operated independently, which is convenient for users to adjust the target code (such as adding code, deleting code, modifying code, etc.), reducing the difficulty of maintaining the modeling file.

[0049] It should be noted that the target modeling file can be parsed by using any code file parsing method in the related art, and no further limitation is made here. For example, a python interpreter can be used to parse the target modeling file. It should be noted that python is an interpreted programming language.

[0050] S103, executing the multiple target codes in the execution order of the multiple target codes to generate multiple target sub-models, and integrating the multiple target sub-models to obtain a target overall model.

[0051] It should be noted that the multiple first sub-models include multiple target sub-models, and the target sub-model refers to the first sub-model that constitutes the target overall model.

[0052] In the related art, after modeling is completed, the user can only see the final constructed model, and cannot know which modeling parameters are used, which modeling operations are performed, and the execution order of these modeling operations, resulting in a poor user experience in the modeling scenario.

[0053] However, in this solution, the modeling file carries a target code for describing at least one of the modeling parameters and modeling operations, so that the user can view the modeling file to know which modeling parameters are used and / or which modeling operations are performed, thereby optimizing the user experience in the modeling scenario.

[0054] In addition, there is an execution order between the multiple target codes, so that the multiple target codes can be executed in sequence, that is, multiple target sub-models are generated in sequence based on multiple modeling parameters, and / or multiple modeling operations are executed in sequence to generate multiple target sub-models.

[0055] In addition, users can view modeling files to know the execution order of multiple target codes, such as the execution order of multiple modeling operations, which optimizes the user experience in modeling scenarios.

[0056] In one embodiment, multiple target codes are executed, including at least one of the following embodiments:

[0057] Mode 1: In response to the target modeling file including a target code for instructing to determine whether to execute the second code or the third code, and the set condition is met, the second code is executed.

[0058] Mode 2: In response to the target modeling file including a target code for instructing to judge whether to execute the second code or the third code, and the set condition is not satisfied, the third code is executed.

[0059] It should be noted that the second code and the third code are different target codes.

[0060] Therefore, in this method, the process branch control function can be defined in the modeling file, and the code to be executed can be determined from multiple preset codes through judgment conditions.

[0061] Mode 3: In response to the target modeling file including a target code for instructing to execute the fourth code in a loop, the fourth code is executed in a loop.

[0062] It should be noted that the plurality of target codes include the fourth code. The terms such as loop execution, repeated execution, multiple execution, etc. can be used interchangeably.

[0063] Therefore, in this method, a loop control function can be defined in the modeling file, and one or some codes can be executed cyclically.

[0064] Method 4: Generate a target sub-model based on the modeling information of the target sub-model.

[0065] Exemplarily, executing a plurality of target codes includes generating a target sub-model based on modeling parameters of the target sub-model.

[0066] Exemplarily, a plurality of target codes are executed, including modeling operations based on a target sub-model, to generate a target sub-model.

[0067] S104, displaying the target overall model on the interactive interface.

[0068] In one embodiment, the method further includes parsing the target modeling file to obtain graph structure information, and displaying the graph structure information on the interactive interface. It should be noted that there are no excessive restrictions on the graph structure, for example, it may include a tree graph, a directed graph, an undirected graph, etc. Thus, the graph structure information of the modeling file can be displayed on the interactive interface, and the graph structure information has good readability, which is convenient for users to understand the content of the modeling file more intuitively.

[0069] In one embodiment, the method further includes displaying the target modeling file on an interactive interface.

[0070] It should be noted that the display areas of the target overall model, graph structure information, and target modeling file on the interactive interface may be different. For example, the interactive interface includes a first display area, a second display area, and a third display area. The target modeling file can be displayed in the first display area, the target overall model can be displayed in the second display area, and the graph structure information can be displayed in the third display area. Exemplarily, the first display area is the coding area, the second display area is the graphics area, and the third display area is the display area of ​​the graphics construction browser.

[0071] In one embodiment, the method further includes, in response to detecting a first export operation for the first sub-model, adding the first sub-model exported by the first export operation to the template model library, and using the target code corresponding to the exported first sub-model as the template code corresponding to the exported first sub-model. Thus, the sub-model can be exported to the template model library to add a new template model, and the target code corresponding to the exported sub-model can be used as the template code corresponding to the sub-model to add a new template code.

[0072] In one embodiment, the method further includes, in response to detecting a second export operation for the target overall model, adding the target overall model to the template model library, and using the target modeling file as the template code corresponding to the target overall model. Thus, the overall model can be exported to the template model library to add a template model, and the template file can be used as the template code corresponding to the overall model to add a template code.

[0073] It is understandable that different first sub-models may correspond to different template codes, and different overall models may correspond to different template codes. The template model library includes template codes for describing modeling information of multiple models (such as sub-models and overall models).

[0074] In one embodiment, the method further includes, in response to detecting a third export operation for the first sub-model, adding the first sub-model exported by the third export operation to the historical model library, and using the target code corresponding to the exported first sub-model as the historical code corresponding to the exported first sub-model. Thus, the sub-model can be exported to the historical model library to add a new historical model, and the target code corresponding to the exported sub-model can be used as the historical code corresponding to the sub-model to add a new historical code.

[0075] In one embodiment, the method further includes, in response to detecting a fourth export operation for the target overall model, adding the target overall model to the historical model library, and using the target modeling file as the historical code corresponding to the target overall model. Thus, the overall model can be exported to the historical model library to add a new historical model, and the template file can be used as the historical code corresponding to the overall model to add a new historical code.

[0076] It is understandable that different first sub-models may correspond to different historical codes, and different overall models may correspond to different historical codes.

[0077] It should be noted that there are no excessive restrictions on the export operation, for example, it may include a selection operation (such as a click operation, a drag operation, etc.) The historical model library includes historical codes for describing modeling information of each of multiple models (such as a sub-model, a total model).

[0078] In summary, according to the modeling method of the embodiment of the present application, a target modeling file composed of a markup language is obtained, the target modeling file is parsed, and a target code for describing the first modeling information of each of the multiple first sub-models is obtained, wherein the first modeling information includes at least one of a modeling parameter and a modeling operation, and the target codes corresponding to the multiple first sub-models are decoupled from each other so that each first sub-model can be operated independently, and the multiple target codes are executed in the execution order of the multiple target codes to generate multiple target sub-models, and the multiple target sub-models are integrated to obtain a target overall model, and the target overall model is displayed on the interactive interface. As a result, each first sub-model will not be affected by the modeling operation, resulting in an inability to operate independently. During the entire modeling process, each first sub-model can be operated independently, which is convenient for users to adjust the first sub-model in real time, simplifying user operations. In addition, modeling can be automatically performed based on the modeling file, which improves modeling efficiency and optimizes user experience in modeling scenarios.

[0079] Based on any of the above embodiments, the method further includes, in response to detecting an input operation for a target code, obtaining the target code input by the input operation, and adding the input target code to the target modeling file, and in response to detecting an adjustment operation for the target code, adjusting the target code adjusted by the adjustment operation based on the adjustment operation. Thus, the target code input by the user can be added to the modeling file, and / or, considering the user's adjustment operation for certain target codes, the target code to be adjusted can be adjusted to update the modeling file.

[0080] It should be noted that there are not too many restrictions on the adjustment operations, for example, it may include adding code, deleting code, modifying code, etc.

[0081] Exemplarily, the user may perform entry operations and / or adjustment operations on the target code in the first display area (such as the coding area).

[0082] Based on any of the above embodiments, the method further includes, in response to detecting a selection operation for candidate template information, obtaining the candidate template information selected by the selection operation as target template information, adding the template code corresponding to the target template information to the target modeling file, and / or, generating a first code based on the target template information, and adding the first code to the target modeling file. The candidate template information includes at least one of a candidate template model, a candidate template text, and a candidate template operation. Thus, the candidate template information selected by the user can be used as the target template information, and the template code corresponding to the target template information can be added to the modeling file, and / or, the first code can be generated considering the target template information, and the first code can be added to the modeling file to update the modeling file.

[0083] It is understandable that different candidate template information may correspond to different template codes.

[0084] In one embodiment, generating the first code based on the target template information includes inputting the target template information into a large model, and outputting the first code from the large model. It should be noted that the large model is not limited in many ways, and may include, for example, an LLM (Large Language Model).

[0085] In one implementation, generating the first code based on the target template information includes calling a code generation tool, and generating the first code based on the target template information through the code generation tool.

[0086] In one implementation, generating the first code based on the target template information includes acquiring the template code, replacing the to-be-replaced text in the template code with the target template information, and generating the first code.

[0087] Exemplarily, the user may perform a selection operation on candidate template information in the third display area (such as the display area of ​​the graphic construction browser).

[0088] Based on any of the above embodiments, the method further includes, in response to detecting a setting operation for at least one of the first sub-model and the target overall model, adjusting the target modeling file based on the setting operation. Thus, the modeling file can be adjusted to update the modeling file in consideration of the user's setting operation for the sub-model and / or the overall model.

[0089] It should be noted that there are no excessive restrictions on the setting operations, such as adding entities, deleting entities, modifying entities, etc. Among them, the entity includes at least one of the first sub-model, the object included in the first sub-model, and the target overall model. It can be understood that the sub-model is composed of at least one object, and the object can include basic geometric shapes such as curves, circles, and cuboids, and can also include devices such as screws, semiconductors, transistors, and valves.

[0090] In one implementation, adjusting the target modeling file based on the setting operation includes generating a fifth code based on the setting operation and adding the fifth code to the target modeling file. It should be noted that the relevant content of generating the fifth code based on the setting operation can refer to the relevant content of generating the first code based on the target template information in the above embodiment, which will not be repeated here.

[0091] In one embodiment, adjusting the target modeling file based on the setting operation includes generating a sixth code for describing modeling information of the newly added entity based on the setting operation in response to the setting operation being a newly added entity, and adding the sixth code to the target modeling file.

[0092] In one embodiment, adjusting the target modeling file based on the setting operation includes, in response to the setting operation being to delete the entity, determining from the target modeling file a seventh code for describing modeling information of the deleted entity, and deleting the seventh code from the target modeling file.

[0093] In one embodiment, adjusting the target modeling file based on the setting operation includes, in response to the setting operation being to modify the entity, determining from the target modeling file an eighth code for describing the modeling information of the entity before the modification, generating, based on the setting operation, a ninth code for describing the modeling information of the entity after the modification, and replacing the eighth code in the target modeling file with the ninth code.

[0094] It should be noted that the multiple target codes include the seventh code and the eighth code.

[0095] Exemplarily, the user may perform setting operations for at least one of the first sub-model and the target overall model in the second display area (such as the graphic area).

[0096] The embodiment of the present application provides another modeling method.

[0097] like Figure 2 As shown, executing multiple target codes in step S103 may include the following steps:

[0098] S201, in response to a target modeling file including a target code for indicating that a second sub-model references second modeling information of a third sub-model, wherein the second sub-model and the third sub-model are different first sub-models, and the first modeling information of the third sub-model includes the second modeling information.

[0099] S202: Add the second modeling information to the first modeling information of the second sub-model.

[0100] It should be noted that adding the second modeling information to the first modeling information of the second sub-model means that during the modeling process, the second modeling information can be added to the first modeling information of the second sub-model to update the first modeling information of the second sub-model, so that the second sub-model can be generated based on the updated first modeling information of the second sub-model.

[0101] Exemplarily, in response to the target modeling file including a target code for indicating that the second sub-model references the modeling parameter x of the third sub-model, wherein the first modeling information of the third sub-model includes the modeling parameter x, the modeling parameter x is added to the first modeling information of the second sub-model. It should be noted that in this embodiment, the modeling parameter x is the second modeling information. Thus, the sub-model can reference the modeling parameters of the remaining sub-models, so that when multiple sub-models have the same modeling parameter, the same modeling parameter only needs to be defined in one sub-model, and does not need to be repeatedly defined in multiple sub-models, which can reduce the redundancy of modeling parameters in the modeling file and help improve modeling efficiency.

[0102] Exemplarily, in response to the target modeling file including a target code for indicating that the second sub-model references the modeling operation y of the third sub-model, wherein the first modeling information of the third sub-model includes the modeling operation y, the modeling operation y is added to the first modeling information of the second sub-model. It should be noted that in this embodiment, the modeling operation y is the second modeling information. Thus, the sub-model can reference the modeling operations of the remaining sub-models, so that when multiple sub-models have the same modeling operation, the same modeling operation only needs to be defined in one sub-model, and does not need to be repeatedly defined in multiple sub-models, which can reduce the redundancy of modeling operations in the modeling file and help improve modeling efficiency.

[0103] Therefore, the sub-model in this method can reference the modeling information of other sub-models. Therefore, when multiple sub-models have the same modeling information, the same modeling information only needs to be defined in one sub-model, and there is no need to repeat the definition in multiple sub-models. This can reduce the redundancy of modeling information in the modeling file. In addition, it also simplifies the user's writing operations on the modeling file, improves the modeling efficiency, and optimizes the user experience in the modeling scenario.

[0104] The embodiment of the present application provides another modeling method.

[0105] like Figure 3 As shown, executing multiple target codes in step S103 may include the following steps:

[0106] S301: In response to a target modeling file including a target code for instructing a fourth sub-model to reference a target object included in a fifth sub-model, wherein the fourth sub-model and the fifth sub-model are different first sub-models.

[0107] S302: Add the target object to the fourth sub-model.

[0108] Exemplarily, in response to the target modeling file including a target code for instructing the fourth sub-model to reference the object z included in the fifth sub-model, the object z is added to the fourth sub-model. It should be noted that in this embodiment, the object z is a target object.

[0109] In this way, a sub-model can reference objects of other sub-models. Therefore, when multiple sub-models have the same object, the same object only needs to be defined in one sub-model, and there is no need to repeat the definition in multiple sub-models. This can reduce object redundancy in the modeling file. In addition, it also simplifies the user's writing operations for the modeling file, improves modeling efficiency, and optimizes the user experience in the modeling scenario.

[0110] The embodiment of the present application provides another modeling method.

[0111] like Figure 4 As shown, executing multiple target codes in step S103 may include the following steps:

[0112] S401, adding at least one of a first sub-model whose type attribute is graphics, a first sub-model whose display attribute is display, and a first sub-model that conforms to the current display mode to a target sub-model.

[0113] It should be noted that in this embodiment, the submodel has attributes such as type (t), display (show) and display mode (m). The attribute value of the type attribute includes graph (graph), reference (func), etc. The attribute value of the display attribute includes display, non-display, etc. For example, display can be represented by true, and non-display can be represented by false. The attribute value of the display mode attribute includes multiple candidate display modes, and the multiple candidate display modes include the current display mode.

[0114] Exemplarily, the attribute value of the display mode attribute includes display modes 1 to 9, and the display mode attribute of the first sub-model D is display mode 1.

[0115] If the current display mode is display mode 1, the first sub-model D conforms to the current display mode.

[0116] If the current display mode is display mode 2, the first sub-model D does not conform to the current display mode.

[0117] Exemplarily, at least one of the first sub-model whose type attribute is graphics, the first sub-model whose display attribute is display, and the first sub-model that conforms to the current display mode is added to the target sub-model, including adding the first sub-model whose type attribute is graphics, whose display attribute is display, and that conforms to the current display mode to the target sub-model. Thus, when the first sub-model's type attribute is graphics, whose display attribute is display, and that conforms to the current display mode, is added to the target sub-model, the first sub-model that meets the above conditions can be displayed on the interactive interface.

[0118] For example, in response to the current display mode being display mode 1, the type attribute of the first submodel D being graphic, and the display mode of the first submodel D being attribute, the first submodel D is added to the target submodel.

[0119] S402, in response to the target modeling file including a target code for indicating reference to the second sub-model, adding the second sub-model to the target sub-model, or adding at least one of the second sub-model whose display attribute is display and the second sub-model that conforms to the current display mode to the target sub-model.

[0120] It should be noted that the second sub-model is derived from other modeling files other than the target modeling file, and the type attribute of the second sub-model is reference.

[0121] Exemplarily, at least one of the second sub-model whose display attribute is display and the second sub-model that conforms to the current display mode is added to the target sub-model, including adding the second sub-model whose display attribute is display and conforms to the current display mode to the target sub-model. Thus, when the display attribute of the second sub-model is display and conforms to the current display mode, the second sub-model can be added to the target sub-model, and the second sub-model that meets the above conditions can be displayed on the interactive interface.

[0122] Exemplarily, the attribute value of the display mode attribute includes display modes 1 to 9, and the display mode attribute of the second sub-model E is display mode 1.

[0123] In response to the target modeling file including a target code for indicating reference to the second sub-model E, the second sub-model E may be added to the target sub-model.

[0124] In response to the target modeling file including a target code for indicating reference to the second sub-model E, and the display attribute of the second sub-model is display, the second sub-model E is added to the target sub-model.

[0125] In response to the target modeling file including a target code for indicating reference to the second sub-model E, and the current display mode is display mode 1, the second sub-model E is added to the target sub-model.

[0126] In response to the target modeling file including a target code for indicating reference to the second sub-model E, the display attribute of the second sub-model is display, and the current display mode is display mode 1, the second sub-model E is added to the target sub-model.

[0127] In one embodiment, in the process of displaying the target overall model on the interactive interface, it also includes responding to detecting a switching operation for the current display mode, switching the current display mode based on the switching operation, executing multiple target codes in the execution order of the multiple target codes to regenerate the target overall model, and displaying the regenerated target overall model on the interactive interface. It is understandable that switching the current display mode may cause changes in the target sub-model, and then cause changes in the target overall model. Therefore, when the user switches the current display mode, the overall model can be regenerated and redisplayed. The overall model has multiple display modes, which improves the flexibility of the overall model and can achieve the modeling effects of multiple overall models. In addition, only one modeling file needs to be written to achieve the modeling effects of multiple overall models, which simplifies the user's writing operation for the modeling file, improves the modeling efficiency, and optimizes the user experience in the modeling scenario.

[0128] Therefore, the method can take into account type attributes, display attributes and current display mode, and determine the target sub-model from multiple first sub-models defined in the modeling file. In addition, the overall model can reference the second sub-models contained in the remaining overall models. Therefore, when multiple overall models have the same sub-model, the same sub-model only needs to be defined in one overall model, and there is no need to repeat the definition in multiple overall models. This can reduce the redundancy of sub-models in the modeling file. In addition, it also simplifies the user's writing operations for the modeling file, improves the modeling efficiency, and optimizes the user experience in the modeling scenario.

[0129] In the above embodiment, the relevant content of the graph.xml language can be found in Figures 5 to 13 .

[0130] Figure 5 The overall structure diagram of a graph.xml language provided in the embodiment of the present application is as follows: Figure 5 As shown, the structure includes:

[0131] 1-1: Main node root, this node is used to lead and manage all other application structures.

[0132] 1-2: ParametricGraphs, a graph set, is a direct child of the main node. It contains all subgraphs (also called subgraphs, submodels) of the structured graph (also called the total model), and also contains metadata attributes: type (t); description (desc); version (version); Python interpreter version number (python); It should be noted that the type here refers to the type of the structured graph, which is used to identify the entire structured graph, the description refers to the description of the structured graph, the version refers to the version of the structured graph, and the Python interpreter version number refers to the Python version used to parse expressions in the structured graph.

[0133] In actual applications, the version attribute of this graph collection and the Python interpreter version attribute need to be automatically added in the language editor to prevent users from filling in errors that cause internal version conflicts.

[0134] 1-3: ParametricGraph, which is subordinate to 1-2 and is used for subgraph modeling. It contains metadata attributes: name (n); type (t); display mode (m). The attribute value of type (t) includes graph and reference (func), which is also called method call. It should be noted that the name here refers to the name of the subgraph, the type refers to the type of the subgraph, and the display mode refers to the display mode of the subgraph.

[0135] In the process of modeling, users generally divide the target object into different parts, model them separately, and then assemble them together. This target object corresponds to the graphics set 1-2 of this application, and the different parts correspond to sub-graphics 1-3. Ultimately, these sub-graphics will be constructed in the order of execution and output to the view of the corresponding display mode according to the display mode. When the type (t) of 1-3 is set to "func", this 1-3 is designed as a method call and will be called as a method in the modeling of other 1-3, and its output will be managed by the 1-3 that calls it, rather than directly output.

[0136] For ease of understanding, an exemplary embodiment SH001 is provided:

[0137]

[0138] This code indicates that there is a graph set node 1-2 under the main node 1-1. The graph set type is "PartTest" and the description is "Template". The graph.xml language version used by graph set 1-2 is "1.0" and the version of the python interpreter used is 3.8. This graph set 1-2 contains a sub Figure 1-3 , the name is "bottom"; the type is "graph"; the display mode is "1". Only when the display mode is "1", this sub Figure 1-3 It should be noted that "=" is used to indicate assignment.

[0139] Figure 6 A structural diagram of a subgraph parameter in the graph.xml language provided in an embodiment of the present application, such as Figure 6 As shown, the structure includes:

[0140] 2-1: Parameter node (also called parameter set) para, subordinate to 1-3, used to manage all parameters in 1-3 of the function call type.

[0141] 2-2: Simple type set (also called simple parameter variable set, simple variable set) simples, subordinate to 2-1, used to contain simple parameter variables (also called simple variables) 2-3.

[0142] 2-3: Simple parameter variable simple node, subordinate to 2-2, is used to declare a simple parameter variable, including the following attributes: name (n); type (t). It should be noted that the name here refers to the name of the simple parameter variable, and the type refers to the type of the simple parameter variable.

[0143] 2-4: 3D point type set (also called 3D point parameter variable set, 3D point variable set) points, subordinate to 2-1, used to contain point parameter variables 2-5.

[0144] 2-5: 3D point parameter variable (also called 3D point variable) point node, subordinate to 2-4, is used to declare 3D point parameter variable, including attributes: name (n); type (t). It should be noted that the name here refers to the name of the 3D point parameter variable, and the type refers to the type of the 3D point parameter variable.

[0145] 2-6: Array type set (also called array parameter variable set, array variable set) vecs node, subordinate to 2-1, used to contain array parameter variables 2-7.

[0146] 2-7: Array parameter variable (also called array variable) vec, subordinate to 2-6, is used to declare array parameter variables, including attributes: name (n); type (t). It should be noted that the name here refers to the name of the array parameter variable, and the type refers to the type of the array element.

[0147] 2-8: Graphics object set (also called graphics object parameter set) objs, subordinate to 2-1, used to contain graphics object parameters 2-9.

[0148] 2-9: Graphics object parameter obj, subordinate to 2-8, is used to declare the graphics object parameter, including the following attributes: name (n); type (t). It should be noted that the name here refers to the name of the graphics object parameter, and the type refers to the type of the graphics object parameter.

[0149] In actual modeling, users often encounter situations where they may need to perform a series of operations on an object, such as copying, moving, cutting, rotating, Boolean, etc., and such multi-step operations also need to be applied to multiple different objects. Therefore, this application provides this function to facilitate users to combine one or more operations into a modeling subgraph, and obtain different results by passing in different variable parameters and object parameters to improve the user's modeling efficiency.

[0150] For ease of understanding, an exemplary embodiment SH002 is provided:

[0151]

[0152] This code describes a sub Figure 1-3 , the name is "CopyAndSetPlacementAndCut"; the type is "func" (method call type); this subgraph contains these parameters: double precision parameters (yaw, pitch, roll); 3D point parameters (origin); double precision array parameters (arrRadius); curve object parameters (curveObj); core geometry parameters (b_cutTarget).

[0153] Figure 7 A structural diagram of a subgraph variable in the graph.xml language provided in an embodiment of the present application, such as Figure 7 As shown, the structure includes:

[0154] 3-1: Variable declaration node (also called variable set) var, subordinate to 1-3, used to manage all variables in 1-3. That is, all variables in 1-3 must be declared in 3-1 before they can be used.

[0155] 3-2: Simple type set simples, subordinate to 3-1, used to contain simple variable 3-3 of 1-3.

[0156] 3-3: Simple variable simple node, subordinate to 3-2, is used to declare simple variables, including attributes: name (n); value (v); type (t), the value range is shown in Table 1. It should be noted that the name here refers to the name of the simple variable, the value refers to the value of the simple variable, and the type refers to the type of the simple variable.

[0157] 3-4: Three-dimensional point type set points, subordinate to 3-1, used to contain point variable 3-5 of 1-3.

[0158] 3-5: 3D point variable point node, subordinate to 3-4, is used to declare a 3D point variable, including the following attributes: name (n); x coordinate (x); y coordinate (y); z coordinate (z). It should be noted that the name here refers to the name of the 3D point variable, and the x coordinate, y coordinate, and z coordinate together constitute the value of the 3D point variable.

[0159] 3-6: Array type set vecs, subordinate to 3-1, used to contain array variable 3-7 of 1-3.

[0160] 3-7: Array variable vec, subordinate to 3-6, is used to declare array variables, including attributes: name (n); size (s); type (t), the value range refers to Table 1; subVec, subVec attribute values ​​include value (v), coordinates (x, y, z). It should be noted that the name here refers to the name of the array variable, the size refers to the number of elements in the array, and the type refers to the type of the array variable.

[0161] 3-8: Array variable node subVec, subordinate to 3-7, is used to declare array elements and contains attributes: If the array type is a simple type, it only contains the value (v), where the value refers to the value of the array element; if the array type is a three-dimensional point type, it contains the x coordinate (x); y coordinate (y); z coordinate (z).

[0162] Table 1 Value range of variable types

[0163] Variable type - t int string double bool transform color point simple yes yes yes yes yes yes no point no no no no no no yes vec yes yes yes yes yes yes yes

[0164] As shown in Table 1, the value range of the simple variable type includes int, string, double, bool, transform, and color, the value range of the point variable type only includes point, and the value range of the vec variable type includes int, string, double, bool, transform, color, and point.

[0165] In practical applications, users need to consider a series of parameters of the target object to be modeled, such as the total length, width and height of the object, the shapes of the various components of the object and the parameters that constitute these shapes, the positions of different parts relative to the overall design zero point, etc. Users can control the generation of the final modeling by changing these variables, and different modeling results can be obtained by entering different parameter values ​​in these variables. Therefore, through this method, users can express similar physical objects with a set of geometric parameters, and use these parameters and geometric operations that match this set of parameters to establish a unified template. When users encounter modeling work for such objects later, they only need to fill in specific parameter values ​​in the template (text file) to obtain the modeling results. This greatly improves the efficiency of users in modeling similar objects.

[0166] For ease of understanding, an exemplary embodiment SH003 is provided:

[0167]

[0168] This code describes a subgraph named "BoxGraph1" and the display mode is "1". It contains the following variables: double precision variable (width); 3D point variables (bCenter, tCenter, vectorX, vectorY); 3D point array variable (JustThePresentation); integer array variable (JustThePresentation1).

[0169] Figure 8 A structure diagram of reference variables of a subgraph in the graph.xml language provided in an embodiment of the present application, such as Figure 8 As shown, the structure includes:

[0170] 4-1: Reference variable declaration node (also called reference variable set) rvar, subordinate to 1-3, used to manage all variables in 1-3 that reference other 1-3.

[0171] 4-2: Simple type set (also called simple reference variable set) simples, subordinate to 4-1, used for 4-3 that contains 1-3.

[0172] 4-3: Simple reference variable simple node, subordinate to 4-2, used to declare reference to 3-3 of other 1-3, including attributes: name (n); referenced source subgraph (r); name in the source subgraph (o); type (t). It should be noted that the name here refers to the name of the referenced simple variable in the current subgraph, the referenced source subgraph refers to the name of the referenced source subgraph, the name in the source subgraph is also called the referenced variable source name, here refers to the name of the referenced simple variable in the source subgraph, and the type refers to the type of the referenced simple variable.

[0173] 4-4: 3D point type set (also called 3D point reference variable set) points, subordinate to 3-1, used for 4-5 containing 1-3.

[0174] 4-5: 3D point reference variable point node, subordinate to 4-4, used to declare references to 3-5 of other 1-3, including attributes: name (n); referenced source sub-graph (r); name in the source sub-graph (o). It should be noted that the name here refers to the name of the referenced 3D point variable in the current sub-graph, the referenced source sub-graph refers to the name of the referenced source sub-graph, and the name in the source sub-graph refers to the name of the referenced 3D point variable in the source sub-graph.

[0175] 4-6: Array type set (also called array reference variable set) vecs, subordinate to 4-1, used for 4-7 including 1-3.

[0176] 4-7: Array reference variable vec node, subordinate to 4-6, used to declare references to 3-7 of other 1-3, including attributes: name (n); referenced source subgraph (r); name in the source subgraph (o); type (t). It should be noted that the name here refers to the name of the referenced array variable in the current subgraph, the referenced source subgraph refers to the name of the referenced source subgraph, the name in the source subgraph refers to the name of the referenced array variable in the source subgraph, and the type refers to the type of the referenced array variable.

[0177] In actual applications, users often have multiple children in a graphic set 1-2. Figure 1-3 , and in the child Figure 1-3 Variables defined in Figure 1-3 In this case, the user needs to use the reference variable function to ensure that the same variable is only used in a certain child. Figure 1-3It is defined once in the code but can be referenced by multiple subgraph declarations, reducing variable redundancy in the code.

[0178] For ease of understanding, an exemplary embodiment SH004 is provided:

[0179]

[0180]

[0181] This code describes a subgraph named "BoxGraph2" and the display mode is "1". The reference variables included are shown in Table 2.

[0182] Table 2 Reference variables

[0183]

[0184] Combining Example SH003 and Example SH004, it can be seen that Figure 1-3 The object box1 references the child Figure 1-3 All variables in the object box.

[0185] Fig. 9 A structural diagram of a subgraph variable processing expression in the graph.xml language provided in an embodiment of the present application, such as Fig. 9 As shown, the structure includes:

[0186] 5-1: Expression node (also called expression set) eval, subordinate to 1-3, used to perform operations on the variables in 1-3.

[0187] 5-2: Simple type (also called simple expression set) simples, subordinate to 5-1, used to include 5-3.

[0188] 5-3: Simple expression simple node, subordinate to 5-2, including nodes:

[0189] (i) Assignment node, including attributes: name (n) and value (v). It should be noted that the name here refers to the variable name, and the value refers to the Python expression of the variable value.

[0190] (ii) Script node, including attribute(s). It should be noted that the attribute here refers to the Python script.

[0191] In actual applications, users can use mode 5-3-i to modify variables one by one, so that the modification of a certain variable will be clear and easy to maintain. However, when users need to perform large-scale operations on many variables and the process becomes very complicated, users can use mode 5-3-ii to write a multi-line python script to complete this task. In the python script, you can use the parameters used in this sub-graph 1-3 (when this sub-graph Figure 1-3 Is a method call type), declared variables or declared reference variables, and use a large number of library functions provided by Python to complete the calculation.

[0192] For ease of understanding, an exemplary embodiment SH005 is provided:

[0193]

[0194] This code describes a sub Figure 1-3 , the name is "BoxGraph1"; the display mode is "1". It has the following processing on variables:

[0195] Processing clause 1: Assign widthU a value 10 times the size of width

[0196] Processing clause 2: Use the Python interpreter to execute the script "tCenter = point (0.0, 0.0, 10.0 * uor)" to assign (0, 0, 10 times uor) to the three-dimensional point variable tCenter, where uor is a unit of resolution.

[0197] Fig.10 A structural diagram of a subgraph public attribute in the graph.xml language provided in an embodiment of the present application, such as Fig.10 As shown, the structure includes:

[0198] 6-1: Property set (also called public property set) properties, subordinate to 1-3, used to Figure 1-3 The variables are exported publicly.

[0199] 6-2: Attribute child node (also called public attribute) property, subordinate to 6-1, contains attributes: variable name (n); attribute name (p).

[0200] In practical applications, users often need to keep relevant information of the model on the model during the modeling process. This language provides this attribute method to Figure 1-3 Declared variables or referenced variables are exported publicly. After exporting a model using the Export Model function, users can view the exported properties in the structure of the subgraph in the exported model through the functions provided by the graphics platform.

[0201] For ease of understanding, an exemplary embodiment SH006 is provided:

[0202]

[0203] This code describes a subgraph named "BoxGraph1" and the display mode is "1". When the user exports this structured graph, the subgraph "BoxGraph1" in the exported graph will contain the attribute "width", and the attribute value is provided by the variable "width" in this box subgraph. Please refer to the effect of this code Fig.14 .

[0204] Fig.11 A structural diagram of a subgraph output node in the graph.xml language provided in an embodiment of the present application, such as Fig.11 As shown, the structure includes:

[0205] 7-1: Output set outs, subordinate to 1-3, used to Figure 1-3 The graphics are output to the view.

[0206] 7-2: Output child node out, subordinate to 7-1, contains the following attributes: graphic object name (also called geometric object name) (n); graphic object type (also called geometric object type) (t); whether to display the graphic object (show).

[0207] In actual application, the user controls the display by adding different 7-2 to 7-1 (when the sub Figure 1-3 is of type "graph") or exported (when the sub Figure 1-3 The type of the sub Figure 1-3 The type is "graph" and the value of the attribute "show" in 7-2 is "False", and the object corresponding to the attribute n in 7-2 will not be displayed.

[0208] For ease of understanding, an exemplary embodiment SH007 is provided:

[0209]

[0210] This code describes a sub-image named "box1" and display mode "1". When this embodiment is applied, a three-dimensional geometric object "solid" will be displayed in display mode 1.

[0211] Fig.12 A structural diagram of an operation node in the graph.xml language provided in an embodiment of the present application, such as Fig.12 As shown, the structure includes:

[0212] 8-1: Operation node (also called operation flow control node) draw, subordinate to 1-3, used to execute the sub Figure 1-3 Geometric operations, variable operations, and flow control in , including:

[0213] Get the plane graphics normal vector module, used to obtain the plane graphics normal vector;

[0214] Scaling vector module, used to scale the target vector;

[0215] Create a rotation transformation module for creating a transformation matrix for rotation;

[0216] Create an offset transformation module for creating a transformation matrix for displacement;

[0217] Add modules to modify existing integer, floating point, and 3D point variables;

[0218] The setter module is used to assign values ​​to different variables;

[0219] Circle operation module, used to create a circle using three-dimensional coordinates;

[0220] Ellipse operation module, used to create an ellipse using three-dimensional coordinates;

[0221] Line string module, used to create a spatial line connected by multiple 3D point coordinates;

[0222] B-spline curve module, used to create B-spline curves;

[0223] Cone module, used to create a cone;

[0224] Box module, used to create a box;

[0225] Ring pipeline module, used to create a ring pipeline;

[0226] The extrusion module is used to create a three-dimensional body by extruding a flat shape;

[0227] Rotation scanning module, used to create a three-dimensional volume by rotating a plane figure;

[0228] Core body module, used to extract core body;

[0229] Path stretching module, used to stretch a plane graphic object along a specified path to create a three-dimensional core body;

[0230] Lofting module, used to create a core volume graphics object from a series of cross-section curves;

[0231] A Boolean difference module for subtracting one or more core volume objects from one core volume object;

[0232] Boolean Cut module, used to cut out specific parts from a solid through Boolean operations;

[0233] Boolean join module, used to merge multiple entity objects into a single entity;

[0234] Chamfering module, used to chamfer the edge of the core body;

[0235] The transformation module is used to apply a transformation matrix to a specified geometric object to change its position, orientation or size;

[0236] The mirror module is used to mirror a geometric object through a specified mirror plane;

[0237] The Set Position module is used to set the position and orientation of a geometric object by specifying the Euler angle and placement point;

[0238] The copy module is used to copy an existing geometric object and create a new graphic object;

[0239] Around point array module, used to create an array of graphics objects around a point;

[0240] The Around Line Array module is used to create an array of graphics objects around a line;

[0241] Create a text style module, which is used to define and create a new text style;

[0242] Text module, used to create text objects;

[0243] Set color module, used to set the color for graphic objects;

[0244] Call sub-graphics module, which is used to call function-type sub-graphs to generate complex geometries.

[0245] In addition to the 8-1 node, the 8-2 to 8-16 nodes are also included, and the 8-2 to 8-16 nodes are not shown in the figure.

[0246] 8-2: Process branch control node if, subordinate to 8-1, 8-2 or 8-3, the user selects the operation path through conditional judgment.

[0247] 8-3: Loop control node while, subordinate to 8-1, 8-2 or 8-3, the user performs a loop on one or more operations.

[0248] 8-4: Operation node op, subordinate to 8-1, 8-2 or 8-3, it can be interpreted as applying different operations by containing different attributes. The structured modeling software corresponding to the current language can interpret and execute the following functions:

[0249] (i) Generate a new three-dimensional point variable, including the following attributes: t==“GetNormal”; the name of the newly generated vector variable (n); set the length of the generated vector (scaleTo); ignore this operation statement (igg). It should be noted that “==” is used to indicate equal.

[0250] (ii) Scale a vector to a specified length and create a new point variable with the following attributes: t == "ScaleVector"; the name of the newly generated vector variable (n); set the length of the generated vector (scaleTo); ignore this operation statement (igg).

[0251] (iii) Create a rotation transformation matrix variable, containing the following attributes: t == "ScaleVector"; the name of the newly generated transformation matrix (n); set the length of the generated vector (scaleTo); define the starting point of the rotation axis (axis_origin); define the direction of the rotation axis (axis_vector); specify the angle of rotation (rotation); ignore this operation statement (igg).

[0252] (iv) Generate a 3x4 matrix for offset transformation, containing the following attributes: t == "CreateOffsetTransform"; the name of the newly created transformation matrix (n); the name of the offset vector to be applied to the transformation (offset); ignore this operation statement (igg).

[0253] (v) Performs addition operation on two values, including the following attributes: t == "Add"; the source variable to be added (o); the value added to the source variable or another variable (v); ignores this operation statement (igg).

[0254] (vi) Assign a new value to a variable, including the following attributes: t == "Set"; the target variable to be set (o); assign a new value to the variable o or another variable (v); ignore this operation statement (igg).

[0255] (vii) Create a three-dimensional circle, including the following attributes: t == "Circle3d"; the name of the newly created circle object (n); the position of the center of the circle (center); the normal vector of the circle (normal); the radius of the circle (radius); ignore this operation statement (igg).

[0256] (viii) Create a three-dimensional elliptical arc, including the following properties: t == "Ellipse3d"; the name of the newly created elliptical arc object (n); the specified position of the center of the ellipse (center); the radius vector of the ellipse in the direction of the 0 degree angle (vector0); the radius vector of the ellipse in the direction of the 90 degree angle (vector90); the starting angle of the elliptical arc (start); the sweep angle of the elliptical arc starting from the starting angle (sweep); ignore this operation statement (igg).

[0257] (ix) Create a line string based on the specified point set, including the following attributes: t == "LineString"; the name of the generated line string object (n); the name of the point array used to construct the line string (points); ignore this operation statement (igg).

[0258] (x) Create a B-spline curve, including the following properties: t == "BSPLineString"; the name of the newly created B-spline curve object (n); the order of the B-spline curve (order); whether the curve is closed (closed); the set of control vertices that make up the shape of the curve (poles); the node sequence of the B-spline curve, used to control the segmentation of the curve (nkots); vertex specified weights (weights); ignore this operation statement (igg).

[0259] (xi) Compose a complex line, including the following attributes: t == "CurveVector"; the name of the single line object of the complex line (o); ignore this operation statement (igg).

[0260] (xii) Create a cone, including the following properties: t == "Cone"; the name of the created cone object (n); the center position of the cone base (centerA); the center position of the cone top (centerB); the radius of the cone top (radiusA); the radius of the cone base (radiusB); whether the cone is closed (capped); ignore this operation statement (igg).

[0261] (xiii) Create a box, including the following properties: t == "Box"; the name of the created box object (n); the center origin of the bottom rectangle of the box (baseCenterOrigin); the center origin of the top rectangle of the box (topCenterOrigin); the unit vector of the box in the x direction (vectorX); the unit vector of the box in the y direction (vectorY); the length of the bottom of the box in the x direction (baseX); the length of the bottom of the box in the y direction (baseY); the length of the top of the box in the x direction (topX); the length of the top of the box in the y direction (topY); whether the box is closed (capped); ignore this operation statement (igg).

[0262] (xiv) Create a torus pipe body, including the following properties: t == TorusPipe; the name of the newly created torus pipe object (n); specify the center point of the main circle of the torus pipe (center); the unit vector of the main circle in the x direction (vectorX); the unit vector of the main circle in the y direction (vectorY); the radius of the outer circle of the pipe section (majorRadius); the radius of the inner circle of the pipe section (minorRadius); the sweep angle of the main circle rotation (sweepAngle); whether the pipe is closed (capped); ignore this operation statement (igg).

[0263] (xv) Stretches a plane figure to create a three-dimensional body, including the following properties: t == Extrusion; the name of the newly created three-dimensional body object (n); the plane figure object to be stretched (o); the direction vector of the stretching operation (extrusionVector); whether to stretch along both directions of the vector at the same time (bothSide); whether the stretched body is closed (capped); ignore this operation statement (igg).

[0264] (xvi) Create a three-dimensional body by rotating a plane figure, including the following properties: t == Revolution; the name of the newly created three-dimensional body object (n); the plane figure object to be rotated (o); the center point of rotation (center); the axis of rotation (axis); the sweep angle of rotation (sweep); whether the rotation body is closed (capped); ignore this operation statement (igg).

[0265] (xvii) Extract the core body from the given entity, including the following attributes: t == BodyFromSolid; the name of the newly created core body object (n); the original entity object from which the core body is extracted (o); ignore this operation statement (igg).

[0266] (xviii) Stretches a plane graphic object along a specified path to create a three-dimensional core body, including the following attributes: t == ExtrusionAlong; the name of the newly created core body object (n); the plane graphic object to be stretched (profile); the path object along which the stretching operation is performed (path); the starting point of the stretching behavior (start); ignore this operation statement (igg).

[0267] (xix) Lofting generates a three-dimensional graphic object, which contains the attribute t=="Loft"; the name of the newly created graphic object (n); whether to use the first cross-section curve as the last cross-section curve to construct a closed surface (periodic); whether to create linear surfaces between each cross-section curve without smoothing (segment); ignore this operation statement (igg).

[0268] This operation also contains one or more sub-operations 8-5, which are used to add multiple different operation conditions, including properties:

[0269] a) t == "profiles", cross-sectional objects (o)

[0270] b) t == "guids", objects that control the guide curves of the lofting (o)

[0271] (xx) Perform a Boolean subtraction operation, subtracting one or more other core body objects from one core body object, including the attribute t== "BooleanSubtract"; target core body object (o); ignore this operation statement (igg).

[0272] This operation also includes 1 to more sub-operations 8-5, which are used to add multiple core objects that need to be Boolean subtracted from the target object, including the attribute: the tool core object (o) for Boolean subtraction.

[0273] (xxi) Cut out a specific part from an entity through Boolean operations, including the attribute t=="BooleanCut"; the planar body object of the cutting contour (planarTool); the direction of the cutting tool relative to the normal of the cutting contour (directionMode), the value range is: Forward (remove along the direction of the surface normal), Backward (remove in the opposite direction of the surface normal), Both (remove in both directions); the depth range of cutting (depthMode), the value range is: All (cut through the entire entity), Blind (cut to a specified depth); the fixed depth of cutting (distance); whether to flip the direction (invert); the cutting direction (defaultNormal); ignore this operation statement (igg).

[0274] (xxii) Boolean union operation, merging multiple entity objects into a single entity, including attribute t== "BooleanUnions"; target core entity object (o).

[0275] This operation also includes 1 to more sub-operations 8-5, which are used to add the core object that needs to be added to the target object, including the properties: the core object of the tool for Boolean addition (o).

[0276] (xxiii) Chamfering the edges of the core body, including the attribute t== "BlendEdges"; the core body object that needs to be chamfered (o); whether to automatically apply smoothing to connected edges (propagateSmooth); whether to apply to all edges (allEdges); and the radius of the chamfer (radius).

[0277] When allEdges is set to "False", this operation also includes one or more sub-operations 8-5, which are used to add chamfered edges, including the following attributes: the index of the edge to be chamfered (edgesIdx); the radius of the edge chamfer (radius).

[0278] (xxiv) Apply a transformation matrix to the specified geometric object, including the attribute t== "Transform"; the geometric object to which the transformation is applied (o); the name of the matrix variable applied to the transformation operation, which contains transformation information such as translation, rotation, and scaling (trans); ignore this operation statement (igg).

[0279] (xxv) Mirror a geometric object through the specified mirror plane, including the attribute t== "Mirror"; the geometric object to be mirrored (o); a point on the mirror plane (origin); the normal direction of the mirror plane (normal); ignore this operation statement (igg).

[0280] (xxvi) Set the position and orientation of a geometric object, including the attribute t=="SetPlacement"; the geometric object whose position and orientation are to be set (o); the base point or origin position of the object (origin); the pitch angle (pitch); the yaw angle (yaw); the roll angle (roll); ignore this operation statement (igg).

[0281] (xxvii) Copy an existing geometric object to create a new object, including the attribute t==“Copy”; the name of the new object generated by the copy operation (n); the source geometric object (o); ignore this operation statement (igg).

[0282] (xxviii) Creates an array of graphics objects around a point, including the attributes t == "RotateAboutPointArray"; the name of the newly created graphics array object (n); the source geometry object (o); the path on which the array operation is performed (path); the total number of objects in the array (arrayCount); the point around which the array is rotated (rotateAbout); (optionally) defines the position of each array object on the path (fractions); the reference position of the array object (objOrigin); whether the array object rotates along the tangent direction of the path (followWithTangent); ignore this operation statement (igg).

[0283] (xxix) Creates an array of graphic objects along a straight line path, including the properties t=="RotateAboutLineArray"; the name of the newly created graphic array object (n); the source object (o); the path on which the array operation is performed (path); the total number of objects in the array (arrayCount); the linear axis around which the array rotates (rotateAbout); (optionally) defines the position of each array object on the path; ignores this operation statement (igg).

[0284] (xxx) Define and create a new text style, including the properties t=="CreateTextStyle"; the name of the created text style (n); the font name (font); the font width (fontWidth); the font height (fontHeight); whether it is bold (isBold); whether it is italic (isItalic); whether it is underlined (isUnderlined); whether it is displayed independently of the view orientation (viewIndependent); the text alignment (just); ignore this operation statement (igg).

[0285] (xxxi) Create a text object in the document or view, including the attributes t == "name of the text object"; text content (content); position of the text object (origin); text direction transformation matrix (orientation); style (text style object created by 8-2-xxix); ignore this operation statement (igg).

[0286] (xxxii) Set the color for the graphic object, including attribute t==“SetColor”; the name of the target graphic object (o); the name of the color variable (color); ignore this operation statement (igg).

[0287] (xxxiii) Caller Figure 1-3, contains the attribute t=="ParametricGraph"; calling sub Figure 1-3 Name(n);

[0288] This operation also includes calling the operation node 8-5 and the hierarchical child nodes of 8-5 (8-6, 8-7, 8-8, 8-9, 8-10, 8-11, 8-12, 8-13), calling the result node 8-14 and the sub-node 8-15 of 8-14, etc., which together realize the function of user-defined method calling.

[0289] 8-5: operation node subOp, subordinate to 8-4. One 8-5 can include 0 to n 8-4s, which are used to decompose and execute the operations of 8-4.

[0290] 8-6: Parameter node para, subordinate to 8-4 (when the operation is 8-4-xxxii).

[0291] 8-7: Simple parameter variable set simples, subordinate to 8-6, used to contain simple parameter variables 8-8.

[0292] 8-8: Simple parameter variable simple, subordinate to 8-7, is used to prepare simple variable parameters for operation 8-4-xxxiii, including attributes: parameter name (n); passed variable (o).

[0293] 8-9: Three-dimensional point parameter variable set points, subordinate to 8-6, used to contain point parameter variable 8-10.

[0294] 8-10: Three-dimensional point parameter variable point, subordinate to 8-9, used to prepare three-dimensional point variable parameters for operation 8-4-xxxiii, including attributes: name (n); passed variable (o).

[0295] 8-11: Array parameter variable set vecs, subordinate to 8-6, used to contain array parameter variables 8-12.

[0296] 8-12: Array parameter variable vec, subordinate to 8-11, is used to prepare array variable parameters for operation 8-4-xxxiii, including attributes: name (n); passed variable (o).

[0297] 8-13: Graphics object parameter set objs, subordinate to 8-6, used to contain graphics object parameters 8-14.

[0298] 8-14: Graphic object parameter obj, subordinate to 8-13, used to prepare graphic object parameters for operation 8-4-xxxiii, including attributes: name (n); incoming graphic object (o).

[0299] 8-15: Operation output set outs, subordinate to 8-4 (when the operation is 8-4-xxxii), used to contain operation output 8-16.

[0300] 8-16: Operation output out, subordinate to 8-15, is used to introduce the output object of operation 8-4-xxxiii into the current sub Figure 1-3 .

[0301] In the actual operation process, the user needs to combine the specific parameters of the object with the specific modeling technology and follow the established process and steps to complete the modeling task. 8-4 of this application provides users with a wealth of modeling techniques, which, combined with 8-2 ​​and 8-3, facilitates users to build templated sub- Figure 1-3 This not only enhances the flexibility of the design, but also improves the maintainability of the work and expands the scope of application of the design.

[0302] For ease of understanding, an exemplary embodiment SH008 is provided:

[0303]

[0304]

[0305] This code describes a subgraph, which is a method call subgraph (type is "func"), named "CopyAndSetPlacementAndCut", which copies a curve, rotates it by a three-dimensional angle, and then uses this circle to perform a Boolean cut operation on the passed core body.

[0306] The parameters it receives are: double precision parameter variables of 3D rotation angle Euler angle (yaw, pitch, roll); 3D point variable about position (origin); curve source object (curveObj) used for deformation and as a cutting tool; target core body object to be cut (b_cutTarget). The following steps will be executed in sequence under node 8-1 under 1-3:

[0307] Step 1: Copy the input curve object curveObj to generate a new curve object curveObj1.

[0308] Step 2: Set the position of the newly created curve object curveObj1 according to the passed parameter origin, and set its rotation direction according to the passed Euler angle parameters (yaw, pitch, roll).

[0309] Step 3: Perform a Boolean cut operation on the parameter core object b_cutTarget passed in. The cut operation uses curveObj1 as a plane tool and performs penetrating cuts in both directions along the normal direction of curveObj1.

[0310] This subgraph derives curveObj1 copied in step 1 of 8-1.

[0311] Let's combine it with actual application. The base of this part has a big circle, and there are four small holes at the four corners of the big circle that penetrate the base. The centers of these four small holes are respectively on the circumference of 45 degrees, 135 degrees, 225 degrees, and 315 degrees of the big circle (0 degrees is the positive direction of the x-axis). The diameter of the big circle is 160mm (radius 80mm), etc.; the diameter of the small hole is 15mm (radius 7.5mm). This embodiment is called by a method to punch holes at 45 degrees, 135 degrees, and 225 degrees of the big circle.

[0312] Variables related to this embodiment:

[0313] The variable is declared (3-1):

[0314] 3-3_1: Rotation angle "earRotation", type is double precision number, value is 1.5707963267949;

[0315] 3-5_1: The positive direction of the Z axis is "zPosAxis", the type is a three-dimensional point variable, and the value is (0,0,1);

[0316] 3-5_2: The center of the big circle "baseCenter", the type is a three-dimensional point variable, and the value is (0,0,0);

[0317] Expression (5-3) related to this embodiment:

[0318] 5-3_1: Calculate the radius of the big circle "mainRadius" using the formula "80.0*uor";

[0319] 5-3_2: Calculate the radius of the small circle "earRadius" using the formula "7.5*uor";

[0320] 5-3_3: Calculate the x-coordinate of the center of the small circular hole on the 315-degree circumference of the big circle, "earCenter1.x", using the formula "mainRadius*math.sin(math.pi*3.0 / 4.0)";

[0321] Expression 4: Calculate the y coordinate "earCenter1.y" of the center of the small circular hole on the 315-degree circumference of the big circle, using the formula "mainRadius*math.cos(math.pi*3.0 / 4.0)".

[0322] Operations related to this embodiment (8-4):

[0323]

[0324]

[0325]

[0326] This code belongs to a child of a graphic pattern in the graphic set 1-2 "PartTestBottom" Figure 1-3 "bottom".

[0327] In the omitted code, the program draws the outline of the bottom surface of the part base, then stretches the outline to form a stretched body, and obtains the core body "b_baseSurface" (the core body of the base model) from it.

[0328] This code contains the following operations:

[0329] Step 1: Model the bottom surface of the small circular hole on the 315-degree circumference of the large circle, use 8-4-vii to draw a circle, the circle object name is "ear1", the center is "earCenter1", the normal direction is "zPosAxis", and the radius is "earRadius";

[0330] Step 2: Use the circle "ear1" to drill the first hole in the base model, use 8-4-xxi Boolean cutting, the cutting object is "b_baseSurface", the plane tool used is "ear1", the cutting direction is both directions "Both", the depth mode is penetration "All", the depth here is "0" (meaningless), no inversion "False", and the specified normal direction is empty to indicate that the normal direction of "ear1" is used.

[0331] Step 3: Call the child Figure 1-3The method "CopyAndSetPlacementAndCut" makes a hole in the small circle at 225 degrees of the big circle. Pass the variable "earRotation" to the yaw angle parameter "yaw"; pass "0" to the pitch angle parameter "pitch"; pass "0" to the roll angle parameter "roll"; pass the variable "baseCenter" to the surrounding point parameter "origin"; pass the graphic object "ear1" to the parameter object "curveObj"; pass the core body object "b_baseSurface" to the parameter object "b_cutTarget"; output the curve graphic object "ear2".

[0332] Step 4: Call the child Figure 1-3 The method "CopyAndSetPlacementAndCut" makes a hole at the small circle of 135 degrees from the big circle. Pass the variable "earRotation" to the yaw angle parameter "yaw"; pass "0" to the pitch angle parameter "pitch"; pass "0" to the roll angle parameter "roll"; pass the variable "baseCenter" to the surrounding point parameter "origin"; pass the graphic object "ear2" to the parameter object "curveObj"; pass the core body object "b_baseSurface" to the parameter object "b_cutTarget"; output the curve graphic object "ear3".

[0333] Step 5: Call the child Figure 1-3 The method "CopyAndSetPlacementAndCut" makes a hole at the small circle 45 degrees from the big circle. Pass the variable "earRotation" to the yaw angle parameter "yaw"; pass "0" to the pitch angle parameter "pitch"; pass "0" to the roll angle parameter "roll"; pass the variable "baseCenter" to the surrounding point parameter "origin"; pass the graphic object "ear3" to the parameter object "curveObj"; pass the core body object "b_baseSurface" to the parameter object "b_cutTarget"; output the curve graphic object "ear4".

[0334] At this point, the modeling of the four small holes is completed.

[0335] Fig.13 A structural diagram of a subgraph reference object node in the graph.xml language provided in an embodiment of the present application, such as Fig.13 As shown, the structure includes:

[0336] 9-1: Reference object node (also called reference object set efObjs, subordinate to 1-3, used to reference other sub- Figure 1-3 The geometric object in the current child Figure 1-3 middle.

[0337] 9-2: Node (also called reference object) refObj, subordinate to 9-1, contains attributes: name (n); referenced subgraph (r); reference name (o); type (t). It should be noted that the name here refers to the name of the referenced object in the current subgraph, the type refers to the type of the referenced object, the reference name refers to the name of the referenced object in the source subgraph, and the referenced subgraph refers to the name of the referenced source subgraph.

[0338] In actual applications, when users model a complex object, they usually divide the object into different parts and model them separately. These different parts correspond to the sub- Figure 1-3 , when these subgraphs often have some common components (screws in furniture, common modules in electrical appliances, etc.), users do not want to repeat the modeling of these common objects. Suppose the user needs to use this application to model a table with 4 drawers. The user divides the drawers and the table into two subgraphs. Figure 1-3 First, model the drawer, then model the table body. The user has modeled screw A when modeling the drawer, and screw A is also needed when modeling the table body. Here, the reference object function is needed to introduce the screw A object previously modeled in the drawer into the sub-modeling of the main body. Figure 1-3 .

[0339] For ease of understanding, an exemplary embodiment SH009 is provided:

[0340]

[0341]

[0342]

[0343] This code describes a collection Boxes, which contains two sub Figure 1-3 , respectively called "BoxGraph1" and "BoxGraph2". In the subgraph "BoxGraph1", a 3D volume is constructed, named "box1", and the output is "box1". Figure 1-3 This 3D body is referenced in "BoxGraph2". This reference is named "box2". Figure 1-3 "BoxGraph2" has the following operations:

[0344] Step 1: Use operation 8-4-xiii to copy the reference "box2" to get "box2_copy";

[0345] Step 2: Use operation 8-4-xxvii to create a move transformation matrix and name it "move_box2_1";

[0346] Step 3: Apply the transformation matrix "move_box2_1" to "box2_copy" using operation 8-4-xxiv.

[0347] The Last Son Figure 1-3 "BoxGraph2" outputs "box2_copy". Please refer to the effect of this code Fig.15 .

[0348] For ease of understanding, an exemplary embodiment is provided, comprising the following steps:

[0349] S601: inserting a structured graphic into a graphic platform.

[0350] In the structured modeling software, you need to first insert an empty structured graphic element, and then use tools such as the graphic construction browser to operate this element.

[0351] S602: Interpret and run the graph.xml file in the structured graph to perform modeling.

[0352] The structured modeling software will interpret the configuration content in the structured graphic elements, that is, the code in the graph.xml language, and use the corresponding functions one by one to model in the graphic platform.

[0353] S603: Open the graphic construction browser to view the configuration content of the structured graphic.

[0354] The graphical construction browser is an important dialog box in the structured modeling software. In the middle part of this dialog box, you can see the tree diagram of the structured graphical code.

[0355] S604: Parse the curve in the graphics platform and add it to the modeling configuration of the target structured graphics.

[0356] In this interactive command, the structural modeler parses the curve specified by the user and adds it to the configuration code of the current drawing.

[0357] S605: Parse the text in the graphic platform and add it to the modeling configuration of the target structured graphic.

[0358] In this interactive command, the structured modeling software parses the text specified by the user and adds it to the configuration code of the current drawing.

[0359] S606: Record the user's operation in the modeling configuration of the target structured graph in the graph.xml format through command interaction.

[0360] Through these buttons, you can add user operations such as stretching, scanning generation, Boolean addition, etc. to the configuration code of the current graphic in a command interactive manner.

[0361] S607: Importing the structured graphic template in the template library into the currently selected structured graphic element.

[0362] Overwrite the graphic configuration code of the current structured graphic element with the content of the selected configuration file in the template library and interpret and execute it.

[0363] S608: Export the configuration content of the currently selected structured graphic element to the template library.

[0364] The graphic configuration code of the currently selected structured graphic element is saved in the template library with the type attribute of the overall atlas S102 as the name.

[0365] S609: Edit the configuration content of the currently selected structured graphic element.

[0366] Opens the XML editor to edit the graphic configuration code of the currently selected structured graphic element.

[0367] S610: Switch to a different display mode.

[0368] Switch between different display modes to display structured graphics in different display modes.

[0369] S611: Export to normal primitives.

[0370] Export the currently selected structured graphic element as a common graphic platform element.

[0371] For example, Fig.16 As shown, users can perform modeling operations on the structured modeling software, such as inputting variables, creating geometric figures, modifying geometric figures, browsing graphic structures, etc. The structured modeling software can interpret and execute graph.xml, export graphics, display control, etc. The graphics platform is used to store structured graphics, and the structured modeling software needs to rely on the graphics platform to achieve modeling.

[0372] For ease of understanding, an exemplary embodiment SH010 is provided:

[0373] First, use step 1 to insert a structured element in the graphics platform, select it, and then use step 2 to open the graphic construction browser. In the graphic construction browser, click to insert the structured graphic element named PartTest in the template library. After the structural modeling software interprets and executes this configuration code, the user will see this part in the view of the graphics platform.

[0374] In order to implement the above embodiment, the present application also proposes a modeling device.

[0375] Fig.17 A schematic diagram of the structure of a modeling device provided in an embodiment of the present application.

[0376] like Fig.17 As shown, the modeling device 100 includes: an acquisition module 110 , a parsing module 120 , an execution module 130 and a display module 140 .

[0377] An acquisition module, used for acquiring a target modeling file composed of a markup language;

[0378] a parsing module, configured to parse the target modeling file to obtain a target code for describing first modeling information of each of the plurality of first sub-models, wherein the first modeling information includes at least one of a modeling parameter and a modeling operation, and the target codes corresponding to the plurality of first sub-models are decoupled from each other so that each of the first sub-models can be operated independently;

[0379] An execution module, used for executing the plurality of target codes in the execution order of the plurality of target codes to generate a plurality of target sub-models, and integrating the plurality of target sub-models to obtain a target overall model;

[0380] The display module is used to display the target overall model on an interactive interface.

[0381] Furthermore, in a possible implementation of an embodiment of the present application, the acquisition module 110 is also used to: in response to detecting an entry operation for the target code, obtain the target code entered by the entry operation, and add the entered target code to the target modeling file; in response to detecting an adjustment operation for the target code, adjust the target code adjusted by the adjustment operation based on the adjustment operation.

[0382] Furthermore, in a possible implementation of an embodiment of the present application, the acquisition module 110 is also used to: in response to detecting a selection operation on candidate template information, acquire the candidate template information selected by the selection operation as target template information; add the template code corresponding to the target template information to the target modeling file, and / or generate a first code based on the target template information, and add the first code to the target modeling file; wherein the candidate template information includes at least one of a candidate template model, a candidate template text, and a candidate template operation.

[0383] Furthermore, in a possible implementation of an embodiment of the present application, the acquisition module 110 is also used to: in response to detecting a setting operation for at least one of the first sub-model and the target overall model, adjust the target modeling file based on the setting operation.

[0384] Furthermore, in a possible implementation of an embodiment of the present application, the execution module 130 is also used for: in response to the target modeling file including a target code for indicating that the second sub-model references the second modeling information of the third sub-model, wherein the second sub-model and the third sub-model are different first sub-models, and the first modeling information of the third sub-model includes the second modeling information; adding the second modeling information to the first modeling information of the second sub-model.

[0385] Furthermore, in a possible implementation of an embodiment of the present application, the execution module 130 is also used for: in response to the target modeling file including a target code for indicating that the fourth sub-model references a target object included in a fifth sub-model, wherein the fourth sub-model and the fifth sub-model are different first sub-models; adding the target object to the fourth sub-model.

[0386] Further, in a possible implementation manner of the embodiment of the present application, the execution module 130 is also used to: in response to the target modeling file including a target code for indicating whether to execute the second code or the third code, and a set condition is met, execute the second code; in response to the target modeling file including the target code for indicating whether to execute the second code or the third code, and the set condition is not met, execute the third code; in response to the target modeling file including a target code for indicating a loop execution of a fourth code, loop execute the fourth code.

[0387] Furthermore, in a possible implementation of the embodiment of the present application, the execution module 130 is also used to: add at least one of a first sub-model whose type attribute is graphics, a first sub-model whose display attribute is display, and a first sub-model that conforms to the current display mode to the target sub-model; in response to the target modeling file including a target code for indicating a reference to a second sub-model, add the second sub-model to the target sub-model, or add at least one of a second sub-model whose display attribute is display and a second sub-model that conforms to the current display mode to the target sub-model; wherein the second sub-model originates from remaining modeling files other than the target modeling file, and the type attribute of the second sub-model is reference.

[0388] Furthermore, in a possible implementation of an embodiment of the present application, the device 100 also includes: a switching module. In the process of displaying the target overall model on the interactive interface, the switching module is used to: in response to detecting a switching operation for the current display mode, switch the current display mode based on the switching operation; execute multiple target codes in an execution order of the multiple target codes to regenerate the target overall model; and display the regenerated target overall model on the interactive interface.

[0389] Furthermore, in a possible implementation of an embodiment of the present application, the device 100 also includes: a first export module, used to: in response to detecting a first export operation for the first sub-model, add the first sub-model exported by the first export operation to the template model library; and use the target code corresponding to the exported first sub-model as the template code corresponding to the exported first sub-model.

[0390] Furthermore, in a possible implementation of an embodiment of the present application, the device 100 also includes: a second export module, used to: in response to detecting a second export operation for the target overall model, add the target overall model to a template model library; and use the target modeling file as the template code corresponding to the target overall model.

[0391] Furthermore, in a possible implementation of the embodiment of the present application, the display module 140 is further used to: parse the target modeling file to obtain graph structure information; and display the graph structure information on the interactive interface.

[0392] It should be noted that the above explanation of the modeling method embodiment is also applicable to the modeling device of this embodiment, and will not be repeated here.

[0393] In summary, the modeling device of the embodiment of the present application obtains a target modeling file composed of a markup language, parses the target modeling file, and obtains a target code for describing the first modeling information of each of the multiple first sub-models, wherein the first modeling information includes at least one of a modeling parameter and a modeling operation, and the target codes corresponding to the multiple first sub-models are decoupled from each other so that each first sub-model can be operated independently, and the multiple target codes are executed in the execution order of the multiple target codes to generate multiple target sub-models, and the multiple target sub-models are integrated to obtain a target overall model, and the target overall model is displayed on the interactive interface. As a result, each first sub-model will not be affected by the modeling operation, resulting in an inability to operate independently. During the entire modeling process, each first sub-model can be operated independently, which is convenient for users to adjust the first sub-model in real time, simplifying user operations. In addition, modeling can be automatically performed based on the modeling file, which improves modeling efficiency and optimizes user experience in modeling scenarios.

[0394] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the modeling method provided by the above embodiments.

[0395] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the modeling method provided by the above embodiments.

[0396] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the modeling method provided by the above embodiments when executed by a processor.

[0397] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0398] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.

[0399] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.

[0400] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0401] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood to control or imply relative importance or implicitly indicate the number of technical features controlled. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0402] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0403] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0404] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0405] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0406] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0407] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A modeling method, characterized in that: include: Obtaining a target modeling file composed of a markup language; Parsing the target modeling file to obtain a target code for describing first modeling information of each of the plurality of first sub-models, wherein the first modeling information includes at least one of a modeling parameter and a modeling operation, and the target codes corresponding to the plurality of first sub-models are decoupled from each other so that each of the first sub-models can be operated independently; Executing the plurality of target codes in the execution order of the plurality of target codes to generate a plurality of target sub-models, and integrating the plurality of target sub-models to obtain a target overall model; The target overall model is displayed on the interactive interface.

2. The method according to claim 1, characterized in that The method further comprises: In response to detecting an input operation for the target code, acquiring the target code input by the input operation, and adding the input target code to the target modeling file; In response to detecting an adjustment operation for the target code, the target code adjusted by the adjustment operation is adjusted based on the adjustment operation.

3. The method according to claim 1, characterized in that The method further comprises: In response to detecting a selection operation on candidate template information, acquiring the candidate template information selected by the selection operation as target template information; Adding the template code corresponding to the target template information to the target modeling file, and / or generating a first code based on the target template information, and adding the first code to the target modeling file; wherein, The candidate template information includes at least one of a candidate template model, a candidate template text, and a candidate template operation.

4. The method according to claim 1, characterized in that: The method further comprises: In response to detecting a setting operation for at least one of the first sub-model and the target overall model, the target modeling file is adjusted based on the setting operation.

5. The method according to claim 1, characterized in that: The executing of the plurality of target codes comprises: In response to the target modeling file including the target code for instructing the second sub-model to reference the second modeling information of the third sub-model, wherein the second sub-model and the third sub-model are different first sub-models, and the first modeling information of the third sub-model includes the second modeling information; The second modeling information is added to the first modeling information of the second sub-model.

6. The method according to claim 1, characterized in that The executing of the plurality of target codes comprises: In response to the target modeling file including a target code for instructing the fourth sub-model to reference a target object included in a fifth sub-model, wherein the fourth sub-model and the fifth sub-model are different first sub-models; The target object is added to the fourth sub-model.

7. The method according to claim 1, characterized in that The executing of the plurality of target codes comprises at least one of the following: In response to the target modeling file including a target code for instructing to determine whether to execute the second code or the third code, and the set condition is met, executing the second code; In response to the target modeling file including the target code for instructing to judge whether to execute the second code or the third code, and the set condition is not satisfied, executing the third code; In response to the target modeling file including the target code for instructing to execute the fourth code in a loop, the fourth code is executed in a loop.

8. The method according to claim 1, characterized in that The executing of the plurality of target codes comprises: Add at least one of a first sub-model whose type attribute is graphics, a first sub-model whose display attribute is display, and a first sub-model that conforms to the current display mode to the target sub-model; In response to the target modeling file including a target code for indicating reference to a second sub-model, the second sub-model is added to the target sub-model, or at least one of a second sub-model whose display attribute is display and a second sub-model conforming to the current display mode is added to the target sub-model; wherein, The second sub-model is derived from other modeling files other than the target modeling file, and the type attribute of the second sub-model is reference.

9. The method according to claim 8, characterized in that The process of displaying the target overall model on the interactive interface also includes: In response to detecting a switching operation for the current display mode, switching the current display mode based on the switching operation; Executing the plurality of target codes in the execution order of the plurality of target codes to regenerate the target overall model; The regenerated target overall model is displayed on the interactive interface.

10. The method according to claim 1, characterized in that The method further comprises: In response to detecting a first export operation for the first sub-model, adding the first sub-model exported by the first export operation to the template model library; The target code corresponding to the exported first sub-model is used as the template code corresponding to the exported first sub-model.

11. The method according to claim 1, characterized in that: The method further comprises: In response to detecting a second export operation for the target overall model, adding the target overall model to a template model library; The target modeling file is used as the template code corresponding to the target overall model.

12. The method according to any one of claims 1 to 11, characterized in that The method further comprises: Parsing the target modeling file to obtain graph structure information; The graph structure information is displayed on the interactive interface.

13. A modeling device, characterized in that: include: An acquisition module, used for acquiring a target modeling file composed of a markup language; a parsing module, configured to parse the target modeling file to obtain a target code for describing first modeling information of each of the plurality of first sub-models, wherein the first modeling information includes at least one of a modeling parameter and a modeling operation, and the target codes corresponding to the plurality of first sub-models are decoupled from each other so that each of the first sub-models can be operated independently; An execution module, used for executing the plurality of target codes in the execution order of the plurality of target codes to generate a plurality of target sub-models, and integrating the plurality of target sub-models to obtain a target overall model; The display module is used to display the target overall model on an interactive interface.

14. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 12 when executed by a processor.

16. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 12.