Method and system for generating SysML model to three-dimensional CAD model
Through the meta-model-driven method, the SysML model to the three-dimensional CAD model is automatically generated, solving the problems of cumbersome design process and inconsistent information in the existing technology, and improving design efficiency and accuracy.
Patent Information
- Application Number
- CN202510671198.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-15
AI Technical Summary
The existing SysML model is difficult to automatically convert into a three-dimensional CAD model in nuclear engineering design, resulting in cumbersome, time-consuming and difficult to ensure the consistency and accuracy of design information.
Using a meta-model-driven method, by identifying the target structure information of the SysML model and the CAD model, traverse the SysML model tree from top to bottom, call the application programming interface to generate a three-dimensional CAD model, and perform incremental updates when the SysML model is updated.
The automatic conversion of SysML model to three-dimensional CAD model is realized, which reduces manual operations, improves design efficiency, ensures the consistency and accuracy of the model, and simplifies the design process.
Smart Images

Figure CN120493560A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of nuclear engineering design, and in particular to a method and system for generating a SysML model into a three-dimensional CAD model. Background Art
[0002] With the introduction of model-based systems engineering (MBSE), SysML models have been widely used in system design. Starting from user needs, system design requirements, functions, and preliminary structural components are gradually analyzed to obtain the system architecture solution for the product. SysML models based on forward design can improve the systematicity and integrity of the design. The use of existing SysML models is limited by the capabilities of software tools and lacks flexibility. This makes it difficult to express models in downstream nuclear engineering design disciplines such as layout design and equipment design, and to solve potential design problems. Therefore, after the SysML model is verified, its system solution and related design requirements will be passed as important outputs of the system design to downstream design disciplines such as layout, equipment, mechanics, electrical instrumentation, and structure. If these disciplines carry out 3D detailed design, they are required to continuously refine and improve the design solution under the drive of the system architecture solution and rely on the 3D CAD design platform.
[0003] Traditional 3D CAD design methods require designers to manually model and modify designs, which is time-consuming, cumbersome, and difficult to ensure consistency with upstream design information and model accuracy. To effectively support the top-down forward transfer of system top-level design information, the inventors of this application have designed a method and system for generating 3D CAD models from SysML models, aiming to overcome these technical issues. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to overcome the defects of the traditional 3D CAD design method in the prior art, which requires designers to manually model and modify, consumes a lot of time, has a cumbersome design process, and is difficult to ensure consistency with the design information transmitted from upstream and to ensure the accuracy of the model. A method and system for generating a SysML model into a 3D CAD model is provided.
[0005] The present invention solves the above technical problems through the following technical solutions:
[0006] The present invention provides a method for generating a SysML model into a three-dimensional CAD model. The method is characterized in that the method adopts a metamodel to drive the integration of information and generates a three-dimensional CAD model. The method comprises the following steps: S1, using a metamodel to identify target structural information to be integrated in a system modeling language model and a CAD model; S2, checking whether the system modeling language model has been identified using a metamodel, and traversing a system modeling language model tree from top to bottom for the identified system modeling language model; S3, calling an application programming interface based on a metamodel mapping relationship to create a corresponding three-dimensional CAD model; S4, calling an application programming interface to set attribute information of the three-dimensional CAD model based on attribute values of the system modeling language model; and S5, calling an application programming interface to add a metamodel identifier to the three-dimensional CAD model.
[0007] According to one or more embodiments of the present invention, when the three-dimensional CAD model needs to be updated by the system modeling language model, the generation method also includes the following steps: S6, outputting the change content of the system modeling language model identified by the metamodel in an extensible markup language file, and further clarifying the information that needs to be updated to the three-dimensional CAD model based on the change status query output table; S7, identifying the relevant metamodels defined as three-dimensional CAD integration based on the metamodel mapping relationship; S8, calling the application programming interface of the three-dimensional CAD platform, and adding, updating or deleting the target three-dimensional CAD model information according to the status information defined in the extensible markup language file after the metamodel identification.
[0008] According to one or more embodiments of the present invention, the types of metamodels used in the generation method include: detailed design identification metamodel, system architecture identification metamodel, common metamodel and system modeling language metamodel.
[0009] According to one or more embodiments of the present invention, the metamodel of the system modeling language model in step S1 includes SysMLModel4Integration and SysMLModelProperty4Integration metamodels, which are identified in the following manner: SysMLModel4Integration identifies the system modeling language model to be integrated; SysMLModelProperty4Integration includes:
[0010] SysMLModelSimpleProperty4Integration, identifies the value type property in the system modeling language model to be integrated; SysMLModelCompositeProperty4Integration, identifies the module type property in the system modeling language model to be integrated;
[0011] SysMLModelStructureProperty4Integration identifies the component type property in the System Modeling Language model to be integrated.
[0012] According to one or more embodiments of the present invention, the metamodel of the 3D CAD model in step S1 includes CADModel4Integration and CADModelProperty4Integration metamodels, which are identified in the following manner: CADModel4Integration identifies the 3D CAD model to be integrated; CADModelProperty4Integration includes:
[0013] CADModelValueProperty4Integration identifies the parameters defined in the 3D CAD model that will participate in the integration; CADModelPartProperty4Integration identifies the lower-level substructure defined in the 3D CAD model that will participate in the integration, such as a subassembly or part.
[0014] According to one or more embodiments of the present invention, the use rules of the meta-model include: Rule I: When the system modeling language model is not identified by SysMLModel4Integration, the system modeling language model and all its internal sub-models do not participate in the integration, and the system modeling language model information does not transmit information with any 3D CAD model, regardless of whether its attributes are identified by any one
[0015] SysMLModelProperty4Integration metamodel identification; Rule II: When a 3D CAD model is not identified by CADModel4Integration, the 3D CAD model and all its internal sub-models do not participate in the integration, and the 3D CAD model information does not transfer information with any 3D CAD model, regardless of whether its properties are identified by CADModelValueProperty4Integration or
[0016] Identified by CADModelPartProperty4Integration.
[0017] According to one or more embodiments of the present invention, the following integration rules are defined for 3D CAD model generation: Rule A: If a structural attribute is not identified by the metamodel, the type definition of the structural attribute will be ignored; Rule B: If a structural attribute has been identified by the metamodel, the module type of the structural attribute should be included in the integration scope regardless of whether the module type definition of the structural attribute is identified by the metamodel SysMLModel4Integration.
[0018] According to one or more embodiments of the present invention, step S5 includes the following steps: 51 , search the CADModel4Integration top-level model node in the attribute information of the 3D CAD model in the current CAD platform project environment; if the search result shows that it does not exist, create the top-level CAD model node and set the CADModel4Integration identifier for the node; S 52 , use the breadth traversal algorithm to traverse other nodes in the attribute information of the 3D CAD model, and perform the following processing according to the tag type of the node: for the CADPartProperty4Integration node, retrieve the corresponding CADModel4Integratin node through the type attribute information. If the retrieval result is non-existent, first create the model through the platform application programming interface, and then use the model to generate an instantiated object, and use CADPartProperty4Integration to identify the object type; for other nodes except the CADModel4Integratin top-level model node and the CADPartProperty4Integration node, parse them separately according to their type attribute information, and use the application programming interface to generate corresponding attributes under the current model, and use the type node metamodel to identify the attributes.
[0019] The present invention also provides a system for generating a SysML model into a three-dimensional CAD model. The system for generating a SysML model into a three-dimensional CAD model adopts the method for generating a SysML model into a three-dimensional CAD model as described above. The system for generating a SysML model into a three-dimensional CAD model comprises: a metamodel management module for using a metamodel to identify target structure information to be integrated in a system modeling language model and a CAD model; a metamodel parsing and traversal module for checking whether a system modeling language model has been identified using a metamodel, and traversing a system modeling language model tree from top to bottom for an identified system modeling language model; a CAD model generation module for calling an application programming interface based on a metamodel mapping relationship to create a corresponding three-dimensional CAD model; a property synchronization module for calling an application programming interface to set property information of the three-dimensional CAD model based on property values of the system modeling language model; and a metamodel reverse identification module for calling an application programming interface to add a metamodel identification to the three-dimensional CAD model.
[0020] According to one or more embodiments of the present invention, the SysML model to 3D CAD model generation system further includes: a model change export and difference analysis module, which is used to output the system modeling language model change content identified by the metamodel in an extensible markup language file, and further clarify the information that needs to be updated to the 3D CAD model based on the change status query output table; a CAD metamodel identification mapping module, which is used to identify the relevant metamodels defined for 3D CAD integration based on the metamodel mapping relationship; and a CAD model dynamic update module, which is used to call the application programming interface of the 3D CAD platform, and add, update or delete the target 3D CAD model information according to the status information defined in the extensible markup language file after the metamodel identification.
[0021] The positive progress effect of the present invention is:
[0022] The method and system for generating a SysML model into a 3D CAD model of the present invention have at least the following advantages:
[0023] 1. Automated methods directly convert the system architecture defined in the SysML model into a 3D CAD model, reducing the time spent on manual drawing and interface information transmission, significantly improving design efficiency. The automated process reduces reliance on manual labor and reduces errors and delays caused by improper human operation.
[0024] 2. Supports incremental update of generated 3D CAD models when SysML models are updated, reducing the amount of data transferred and improving the update efficiency of 3D CAD models.
[0025] 3. The automatically generated CAD model is highly consistent with the SysML model, avoiding information loss or errors that may occur during manual conversion and ensuring the accuracy and completeness of the design.
[0026] 4. The method of the present invention is seamlessly integrated with existing MBSE tools, CAD design tools and design modeling processes, which simplifies the design process and improves overall design efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and other features, properties and advantages of the present invention will become more apparent through the following description in conjunction with the accompanying drawings and embodiments, in which like reference numerals represent like features throughout, wherein:
[0028] Figure 1 It is a schematic diagram of the meta-model definition for product structure information integration in an embodiment of the method for generating a SysML model to a three-dimensional CAD model of the present invention.
[0029] Figure 2 This is a schematic diagram of the definition of model integration options in an embodiment of the method for generating a SysML model into a three-dimensional CAD model according to the present invention.
[0030] Figure 3 Schematic diagram of a SysML model defining a system architecture in an embodiment of a method for generating a SysML model into a 3D CAD model according to the present invention.
[0031] Figure 4 This is another schematic diagram of a system architecture definition SysML model in one embodiment of the method for generating a SysML model into a 3D CAD model according to the present invention.
[0032] Figure 5 It is a schematic diagram of SysML model integration information presented in XML format in an embodiment of the method for generating a SysML model into a three-dimensional CAD model according to the present invention.
[0033] Figure 6 It is a schematic diagram of integrated information after conversion of CAD metamodel in an embodiment of the method for generating a SysML model into a three-dimensional CAD model of the present invention.
[0034] Figure 7 This is a schematic diagram of cross-platform model mapping association based on unified ID identification in an embodiment of the method for generating a SysML model to a three-dimensional CAD model of the present invention.
[0035] Figure 8 Schematic diagram of a SysML model after the system architecture is changed in an embodiment of the method for generating a SysML model into a 3D CAD model according to the present invention.
[0036] Figure 9This is a schematic diagram of a SysML model formed after the system architecture is changed in one embodiment of the method for generating a SysML model into a three-dimensional CAD model according to the present invention.
[0037] Figure 10 This is a schematic diagram of integrated information output after the architecture of the SysML model is changed in one embodiment of the method for generating a SysML model into a three-dimensional CAD model of the present invention.
[0038] Figure 11 It is a schematic diagram of the architecture change integration information after the CAD metamodel is converted in one embodiment of the method for generating a SysML model into a three-dimensional CAD model of the present invention.
[0039] Figure 12 It is a schematic diagram of a CAD model generation process based on metamodel drive in an embodiment of a method for generating a SysML model into a three-dimensional CAD model according to the present invention.
[0040] Figure 13 It is a schematic diagram of a CAD model update process based on metamodel drive in an embodiment of a method for generating a SysML model into a three-dimensional CAD model according to the present invention. DETAILED DESCRIPTION
[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0042] Embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Reference will now be made in detail to preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numerals will be used throughout the drawings to represent the same or similar parts. In addition, although the terms used in the present invention are selected from commonly known and commonly used terms, some of the terms mentioned in this specification may be selected by the applicant at his or her discretion, and their detailed meanings are explained in the relevant parts of the description herein. In addition, it is required to understand the present invention not only by the actual terms used, but also by the meaning implied by each term. At the same time, for ease of description, the dimensions of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0043] See also Figure 12 The present invention provides a method for generating a three-dimensional CAD model from a System Modeling Language (SysML) model. The method uses a metamodel to drive integrated information and generates a three-dimensional CAD model. The method comprises the following steps:
[0044] Step S1: using a metamodel to identify target structural information to be integrated in a System Modeling Language (SysML) model and a CAD model;
[0045] Step S2: Check whether the SysML model has been identified using the metamodel, and traverse the SysML model tree from top to bottom for the identified SysML model;
[0046] Step S3: Calling an application programming interface (API) based on the meta-model mapping relationship to create a corresponding 3D CAD model;
[0047] Step S4: calling an application programming interface (API) to set attribute information of the 3D CAD model based on attribute values of the System Modeling Language (SysML) model;
[0048] Step S5: calling an application programming interface (API) to add a meta-model identifier to the 3D CAD model.
[0049] Preferably, the above steps S1 to S5 can form an algorithm 1, which is used to generate an initial CAD model from a product architecture SysML model.
[0050] The method for generating a SysML model to a 3D CAD model of the present invention integrates the configuration options when performing the model generation operation. Figure 2 In "Generate", all model states default to "Added", and there is no need to explicitly define states in the model.
[0051] Preferably, step S2 of Algorithm 1 can identify the SysML model identified by the above-mentioned system architecture scheme metamodel by traversing the product architecture SysML model M, and output it as M according to the hierarchical structure of the original product architecture model. t , if M t If it is empty, it means that there is no product architecture information for the generated CAD model and the algorithm exits;
[0052] As an example of the above steps: Figure 3 In this example, we first filter Part 1 and obtain all the information in the product except Part 1. This information is presented in XML format. Figure 5 .
[0053] Preferably, step S3 of Algorithm 1 can be based on M t Model information, the corresponding CAD meta-model in Table 2 below performs identification conversion on this information to generate CAD model information M c ,This information serves as analytical input for generating CAD models;
[0054] As an example of the above steps: Figure 5 For example, the information is generated by using the CAD metamodel identifier. Figure 6(Presented in XML format), the CAD model information formed here directly reuses the id attribute in the SysML model, and uses the id to establish a one-to-one mapping relationship between SysML and CAD model objects.
[0055] Preferably, step S4 of Algorithm 1 is based on the CAD model information M obtained above. c As input, parse and create a CAD model using the CAD platform API and assign initial values. In step S5 of Algorithm 1, after the model is created, the metamodel is used to identify the model and record the corresponding id information for the generated CAD model.
[0056] Through the above steps, a one-to-one mapping based on a unified ID is essentially established between the SysML model and the CAD model. The mapping relationship is as follows: Figure 7 As shown in the example, the model-level ID should be globally unique, while the model's internal attribute ID is only used for internal model retrieval and only needs to be unique within the model. Subsequent model updates will use the unified ID as the basis for capturing the target model and specific attributes.
[0057] See also Figure 13 The present invention provides a method for generating a SysML model into a three-dimensional CAD model. When the three-dimensional CAD model needs to be updated by the system modeling language model, the generation method further includes the following steps:
[0058] Step S6: Output the SysML model changes identified by the metamodel in an Extensible Markup Language (XML) file, and query the output table based on the change status to further identify the information that needs to be updated to the 3D CAD model;
[0059] Step S7: identifying relevant metamodels defined for 3D CAD integration based on the metamodel mapping relationship;
[0060] Step S8: calling the application programming interface (API) of the 3D CAD platform to add, update or delete the target 3D CAD model information according to the status information defined in the extensible markup language (XML) file after the metamodel identification.
[0061] Preferably, the above steps S6 to S8 can form Algorithm 2, which updates the CAD product architecture model from the SysML model.
[0062] Preferably, after several editing operations on the SysML model, the latest model information should be integrated into the CAD model. The integration configuration options are Figure 2 In "Updated", the model and its attributes are in the state Figure 1 "Added", "Updated" or "Deleted", the status information must be given respectively.
[0063] Preferably, step S6 of Algorithm 2 performs update integration and needs to detect two parts of content, which are detailed as follows:
[0064] (1) According to the hierarchical structure of the product architecture model, the information of the integrated metamodel identification part in the SysML incremental change model is output as M t , M t The state information of each model and its attributes should be explicitly described in it;
[0065] (2) Identify the configuration changes of the metamodel identifier in the model and integrate the hierarchical structure information of the product architecture model into the M t .
[0066] As an example of the above steps: Figure 3 、 Figure 4 The example is the initial model. Assume that the model is changed to the following after editing: Figure 8 、 Figure 9 The structure shown.
[0067] Obviously, with Figure 4 Compared with the original structure, Figure 9 In this example, the information that belongs to the incremental changes of the model includes:
[0068] The length attribute in the product model has been deleted;
[0069] The quality attribute value in the product model is updated from 15 to 17;
[0070] The mass property value of the Part 1 model is updated from 10 to 12;
[0071] From the perspective of the metamodel's identity configuration, the changes are as follows:
[0072] The Part 1 model is identified by the metamodel SysMLModelStructuralProperty4Integration;
[0073] The mass properties of the Part 1 model are identified by the metamodel SysMLModelMassProperty4Integration;
[0074] Obviously, according to the above-mentioned relevant rules, Figure 9 For example, the integrated information output of this step is M t like Figure 10 As shown in the figure, the structural attribute part 1 included in the product model is newly added, and the mass attribute gives the latest updated value. Since the length attribute status is Deleted, its specific value and unit information do not need to be output.
[0075] Preferably, step S7 of Algorithm 2 converts the above output information M t :According to the mapping rules in Table 2, M t The SysML metamodel is replaced by the CAD metamodel;
[0076] As an example of the above steps: Figure 10 Shown M t Model information is taken as an example, the information M obtained after the metamodel is replaced c like Figure 11 shown.
[0077] Preferably, in step S8 of Algorithm 2, the CAD platform analyzes the output information M c , parse the target model's status information, and use the CAD platform API to add, update, or delete the target CAD model. Adding a model is the same as step S5 in Algorithm 1. Updates require searching for the target model based on a unified ID and then modifying its properties. Deletes require simply deleting the target element.
[0078] It's important to note that the SysML model describing the system architecture is a recursively nested structure, primarily composed of sub-models defining the product structure, model attributes, and their associated definitions. The structure of a 3D CAD model follows a similar principle: an assembly can contain multiple sub-assemblies and parts. Each level of assembly, down to the parts, can define specific attributes. Constraints can exist between attributes at different levels, such as the mass of an assembly being equal to the sum of the masses of its sub-assemblies and its parts.
[0079] Since SysML models have different types of models such as definition requirements, structure and behavior, and design iteration information is only for the structural part of the SysML model and the 3D CAD model, the integration boundary should be accurately located during the integration process, not only filtering out interference items of SysML requirements and behavior models, but also filtering out structural information that does not need to be integrated.
[0080] Based on the product system design positioning and the SysML model representation capabilities, system design information primarily includes system functions and structural components, as well as system demonstration indicators and parameters. Information relevant to 3D CAD integration includes information on the hierarchical hardware structure and the domain attributes of each hierarchical level. Because SysML lacks the ability to represent 3D spatial geometric constraints, the system model does not include this information.
[0081] As mentioned above, the present invention preferably uses metamodel technology to explicitly identify the target structure information to be integrated in the SysML model. The defined metamodel is as follows: Figure 1 As shown in the figure, the prerequisite for predefined model integration is: if and only if the SysML model is Figure 1The model integration options are divided into two types: Generate and Update. The metamodel definition is as follows: Figure 2 shown.
[0082] See also Figure 1 As a preferred embodiment of the method for generating a SysML model to a 3D CAD model of the present invention, the types of metamodels used in the generation method include: detailed design identification metamodel, system architecture identification metamodel, common metamodel and System Modeling Language (SysML) metamodel.
[0083] Figure 1 The yellow part in the middle is the system architecture identification metamodel, which is used as the metamodel to identify the target structure information in the SysML model of the product system architecture solution; Figure 1 The orange part on the left is the detailed design identification metamodel, which is used as the metamodel for identifying the target integration information in the CAD model; the blue part in the middle is the public metamodel definition. Figure 1 The common metamodel StatusEnum defines three possible states of a model: "Added", "Updated" and "Deleted".
[0084] The present invention addresses the problem of automatically converting SysML models into 3D CAD models. This method proposes a metamodel-based method for identifying attributes between SysML and 3D CAD models, and establishes metamodel mapping rules between the two models. This method establishes a matching relationship between SysML model elements and 3D CAD model elements, supporting both the generation of 3D CAD models from SysML models and incremental updates to 3D CAD models. This method is also applicable to the generation and update of SysML models into other specialized CAD models.
[0085] As a preferred embodiment of the method for generating a SysML model into a 3D CAD model according to the present invention, the metamodel of the System Modeling Language (SysML) model in step S1 includes SysMLModel4Integration and SysMLModelProperty4Integration metamodels, which are identified as follows:
[0086] The SysMLModel4Integration identifies a System Modeling Language (SysML) model to be integrated;
[0087] The SysMLModelProperty4Integration includes:
[0088] SysMLModelSimpleProperty4Integration, identifies a value-type property in the Systems Modeling Language (SysML) model to be integrated;
[0089] SysMLModelCompositeProperty4Integration, identifies the module type property in the Systems Modeling Language (SysML) model to be integrated;
[0090] SysMLModelStructureProperty4Integration identifies the component type property in the System Modeling Language (SysML) model to be integrated.
[0091] As a preferred embodiment of the method for generating a SysML model into a 3D CAD model according to the present invention, the metamodel of the 3D CAD model in step S1 includes the CADModel4Integration and CADModelProperty4Integration metamodels, which are identified as follows:
[0092] The CADModel4Integration identifies the 3D CAD models that will participate in the integration
[0093] The CADModelProperty4Integration includes:
[0094] CADModelValueProperty4Integration, identifies the parameters defined in the 3D CAD model that will participate in the integration;
[0095] CADModelPartProperty4Integration identifies the lower-level substructure defined in the 3D CAD model that will participate in the integration, such as a subassembly or part.
[0096] It should be noted that the meta-model definitions and usage instructions of the above SysML and CAD models are shown in Table 1 below.
[0097] Table 1: SysML / CAD related metamodel definitions
[0098]
[0099]
[0100] As a preferred embodiment of the method for generating a SysML model into a 3D CAD model according to the present invention, the use rules of the metamodel include:
[0101] Rule I: When a SysML model is not identified by SysMLModel4Integration, the SysML model and all its sub-models do not participate in the integration. The SysML model information does not transfer information with any 3D CAD model, regardless of whether its properties are identified by any SysMLModelProperty4Integration meta-model.
[0102] Rule II: When a 3D CAD model is not identified by CADModel4Integration, the 3D CAD model and all its sub-models will not participate in the integration, and the 3D CAD model information will not be transferred to any other 3D CAD model, regardless of whether its attributes are
[0103] Identified by CADModelValueProperty4Integration or CADModelPartProperty4Integration.
[0104] It should be noted that the semantic correspondence between the above meta-models is shown in Table 2 below.
[0105] Table 2: Metamodel semantic mapping relationship
[0106]
[0107]
[0108] Based on the design iteration business scenario between the product system design and detailed design stages, the top-down transfer of SysML models to CAD models can be divided into the following two scenario tasks.
[0109] ① Generate the initial CAD model from the product architecture SysML model;
[0110] ② Update the CAD model from the product architecture SysML model;
[0111] The present invention will combine Figure 3 and Figure 4 The examples shown describe the algorithm execution process for two scenarios. Figure 3 Structurally, the product consists of Part 1 and Part 2. Part 1 is unidentified, while Part 2 is identified by the SysMLModelStructuralProperty4Integration metamodel, indicating that the model integration with CAD only considers the structure of Part 2. In addition to the structural composition properties, the product also defines mass and length parameters, which are identified using the parameter property integration metamodel.
[0112] Figure 3 The Element_ID attribute on the right is the platform-specific ID definition of the SysML model, which is used to uniquely identify the model object and related attributes. The product model itself also includes this attribute and is displayed in the model view, that is, Figure 3 The red box part in the model. To establish a unified standard logo across platforms, based on Figure 1 The metamodel definition in Figure 3 The id attribute is defined for both the model and the model attribute, as shown in the blue box in the figure.
[0113] Figure 4 For the part model definition, shape features and quality parameters are defined for part 2 involved in the integration. The shape is defined by the SysML Block module type cube, and the quality parameters are SysML value types. Therefore, the metamodel that identifies different types of attributes is used to treat them differently.
[0114] based on Figure 3 、 Figure 4 For example, the integration rules of the integration algorithm are defined as follows:
[0115] As a preferred embodiment of the method for generating a SysML model into a 3D CAD model according to the present invention, the following integration rules are defined for generating a 3D CAD model:
[0116] Rule A: If a structure attribute does not apply a metamodel identifier, the type definition of the structure attribute will be ignored;
[0117] Rule B: If a structural attribute has been identified by the metamodel, the module type of the structural attribute should be included in the integration scope regardless of whether the module type definition of the structural attribute is identified by the metamodel SysMLModel4Integration.
[0118] It should be noted that in rule A, if the structural attribute of the product is not identified by the metamodel, the type definition of the attribute will be ignored. Figure 3 Part 1 in the product structure is not marked, so it is automatically filtered during model integration. Figure 4 Part 1 model information in .
[0119] It should be noted that in rule B, if the attributes of the product have been identified by the metamodel, then regardless of whether the module type definition of the structural attribute is identified by the metamodel SysMLModel4Integration, its module type should be included in the integration scope. Figure 4 In the figure, the shape features of part 2 have been identified, and the shape type definition "cube" has not been identified, but the integration process must take this into account, otherwise the CAD model cannot be generated due to the lack of shape information.
[0120] It should be noted that there are four types of structural changes in the model: addition, update, deletion, and unchanged. The application of metamodel identification in the two integrations also changes (2×2=4 cases).
[0121] Based on the above rules, the output model status determination results under the combined effect of structural changes and metamodel identification changes are shown in Table 3 below. This table illustrates the control effect of the identification metamodel on the integrated output, realizing the decoupling of architectural design and detailed design information, that is, structural changes are aimed at the product architecture model structure itself, while the metamodel controls the model integration process.
[0122] Table 3: Model change type and metamodel identifier combined status output table
[0123]
[0124]
[0125] As a preferred embodiment of the method for generating a SysML model into a 3D CAD model according to the present invention, step S5 includes the following steps:
[0126] Step S 51 , searching for the CADModel4Integration top-level model node in the attribute information of the 3D CAD model in the current CAD platform project environment; if the search result shows that the top-level CAD model node does not exist, creating the top-level CAD model node and setting the CADModel4Integration identifier for the node;
[0127] Step S 52 , Use the breadth traversal algorithm to traverse other nodes in the attribute information of the 3D CAD model, and perform the following processing according to the tag type of the node:
[0128] For the CADPartProperty4Integration node, the corresponding CADModel4Integratin node is retrieved through the type attribute information. If the search result shows that it does not exist, the model is first created through the platform application programming interface, and then the model is used to generate an instantiated object, and the object type is identified using CADPartProperty4Integration.
[0129] For all top-level model nodes except CADModel4Integratin and
[0130] Other nodes except the CADPartProperty4Integration node are parsed according to their type attribute information, and the corresponding attributes are generated under the current model using the application programming interface, and the attributes are identified using the type node metamodel.
[0131] Preferably, step S5 uses the metamodel to identify the model after the model is created, and records the corresponding ID information for the generated CAD model. The preferred process is as follows:
[0132] Step S 51 , for M c In the CADModel4Integratin top-level model node, search for it in the current CAD platform project environment based on its ID. If the ID does not exist, create a top-level CAD model node and set the CADModel4Integration identifier for the node. Use the name information in the model information to set the model name, add a new id attribute and assign a value.
[0133] Step S 52 , using the breadth traversal algorithm, thus traversing M c Other nodes in the , are processed as follows according to their node tag type:
[0134] For the node CADPartProperty4Integration, the corresponding CADModel4Integratin node is retrieved through the type attribute, and whether the node model exists in the current CAD model range is determined. If it does not exist, the model is first created through the platform API, and then the instantiated object is generated using the model. The object name is set using the node name, and the id attribute is created for the object and assigned a value. Finally, the object type is identified using CADPartProperty4Integration.
[0135] For other types of nodes, they are parsed according to their types, and the corresponding attributes are generated under the current model using the API. The attribute name and unique identifier are set using name and id respectively, and the attribute value is set as the node value. Finally, the attribute is identified using the type node metamodel.
[0136] The present invention further provides a system for generating a SysML model into a 3D CAD model. The system for generating a SysML model into a 3D CAD model adopts the above-mentioned method for generating a SysML model into a 3D CAD model. The system for generating a SysML model into a 3D CAD model comprises:
[0137] A metamodel management module, used to use the metamodel to identify target structure information to be integrated between the system modeling language model and the CAD model;
[0138] The metamodel parsing and traversal module is used to check whether the system modeling language model has been identified using the metamodel, and traverse the system modeling language model tree from top to bottom for the identified system modeling language model;
[0139] A CAD model generation module is used to call an application programming interface based on the meta-model mapping relationship to create a corresponding 3D CAD model;
[0140] An attribute synchronization module is used to call an application programming interface to set attribute information of a 3D CAD model based on attribute values of a system modeling language model;
[0141] The metamodel reverse identification module is used to call the application programming interface to add a metamodel identification to the 3D CAD model.
[0142] As a preferred embodiment of the system for generating a SysML model into a 3D CAD model according to the present invention, the system for generating a SysML model into a 3D CAD model further includes:
[0143] The model change export and difference analysis module is used to output the system modeling language model changes identified by the metamodel in an extensible markup language file, and query the output table based on the change status to further clarify the information that needs to be updated to the 3D CAD model;
[0144] A CAD metamodel identification mapping module is used to identify relevant metamodels defined for 3D CAD integration based on metamodel mapping relationships;
[0145] The CAD model dynamic update module is used to call the application programming interface of the 3D CAD platform and add, update or delete the target 3D CAD model information according to the status information defined in the extensible markup language file after the metamodel identification.
[0146] In summary, the present invention's method and system for converting SysML models into 3D CAD models is efficient, accurate, and flexible, enabling automatic conversion of SysML models into 3D CAD models and is applicable to fields such as nuclear engineering design. The advantages of the present invention are primarily reflected in improving design efficiency, ensuring design quality, and enhancing design flexibility, as follows:
[0147] 1. Automated methods directly convert the system architecture defined in the SysML model into a 3D CAD model, reducing the time spent on manual drawing and interface information transmission, significantly improving design efficiency. The automated process reduces reliance on manual labor and reduces errors and delays caused by improper human operation.
[0148] 2. Supports incremental update of generated 3D CAD models when SysML models are updated, reducing the amount of data transferred and improving the update efficiency of 3D CAD models.
[0149] 3. The automatically generated CAD model is highly consistent with the SysML model, avoiding information loss or errors that may occur during manual conversion and ensuring the accuracy and completeness of the design.
[0150] 4. The method of the present invention is seamlessly integrated with existing MBSE tools, CAD design tools and design modeling processes, which simplifies the design process and improves overall design efficiency.
[0151] Although specific embodiments of the present invention have been described above, those skilled in the art will appreciate that these are merely illustrative and that the scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, and such changes and modifications are intended to fall within the scope of the present invention.
Claims
1. A method for generating a SysML model into a 3D CAD model, characterized in that: The generation method uses a meta-model to drive the integration of information and generate a three-dimensional CAD model. The generation method includes the following steps: S1. Using a metamodel to identify target structural information to be integrated between the system modeling language model and the CAD model; S2. Check whether the system modeling language model has been identified using the metamodel, and traverse the system modeling language model tree from top to bottom for the identified system modeling language model; S3, calling the application programming interface based on the meta-model mapping relationship to create a corresponding 3D CAD model; S4. Calling an application programming interface to set attribute information of the 3D CAD model based on the attribute values of the system modeling language model; S5. Call an application programming interface to add a metamodel identifier to the 3D CAD model.
2. The method for generating a SysML model into a 3D CAD model according to claim 1, wherein: When the 3D CAD model needs to be updated by the system modeling language model, the generation method further includes the following steps: S6. Output the system modeling language model changes identified by the metamodel in an extensible markup language file, query the output table based on the change status, and further identify the information that needs to be updated to the 3D CAD model; S7, identifying relevant metamodels defined for 3D CAD integration based on metamodel mapping relationships; S8. Calling the application programming interface of the 3D CAD platform to add, update or delete the target 3D CAD model information according to the state information defined in the extensible markup language file after the metamodel identification.
3. The method for generating a SysML model into a 3D CAD model according to claim 1 or 2, wherein: The types of metamodels used in the generation method include: detailed design identification metamodel, system architecture identification metamodel, common metamodel and system modeling language metamodel.
4. The method for generating a SysML model into a 3D CAD model according to claim 1, wherein: The metamodel of the system modeling language model in step S1 includes SysMLModel4Integration and SysMLModelProperty4Integration metamodels, which are identified as follows: The SysMLModel4Integration identifies the system modeling language model to be integrated; The SysMLModelProperty4Integration includes: SysMLModelSimpleProperty4Integration, identifies the value type property in the System Modeling Language model to be integrated; SysMLModelCompositeProperty4Integration, identifies the module type property in the System Modeling Language model to be integrated; SysMLModelStructureProperty4Integration identifies the component type property in the System Modeling Language model to be integrated.
5. The method for generating a SysML model into a 3D CAD model according to claim 4, wherein: The metamodel of the 3D CAD model in step S1 includes the CADModel4Integration and CADModelProperty4Integration metamodels, which are identified as follows: The CADModel4Integration identifies the 3D CAD model that will participate in the integration; The CADModelProperty4Integration includes: CADModelValueProperty4Integration, identifies the parameters defined in the 3D CAD model that will participate in the integration; CADModelPartProperty4Integration identifies the lower-level substructure defined in the 3D CAD model that will participate in the integration, such as a subassembly or part.
6. The method for generating a SysML model into a 3D CAD model according to claim 5, wherein: The usage rules of the meta-model include: Rule I: When a system modeling language model is not identified by SysMLModel4Integration, the system modeling language model and all its internal sub-models do not participate in the integration. The system modeling language model information does not transfer information with any 3D CAD model, regardless of whether its properties are identified by any SysMLModelProperty4Integration meta-model; Rule II: When a 3D CAD model is not identified by CADModel4Integration, the 3D CAD model and all its sub-models will not participate in the integration, and the 3D CAD model information will not be transferred to any other 3D CAD model, regardless of whether its attributes are Identified by CADModelValueProperty4Integration or CADModelPartProperty4Integration.
7. The method for generating a SysML model into a 3D CAD model according to claim 5, wherein: Define the following integration rules for 3D CAD model generation: Rule A: If a structure attribute does not apply a metamodel identifier, the type definition of the structure attribute will be ignored; Rule B: If a structural attribute has been identified by the metamodel, the module type of the structural attribute should be included in the integration scope regardless of whether the module type definition of the structural attribute is identified by the metamodel SysMLModel4Integration.
8. The method for generating a SysML model into a 3D CAD model according to claim 1, wherein: The step S5 comprises the following steps: S 51 , searching for the CADModel4Integration top-level model node in the attribute information of the 3D CAD model in the current CAD platform project environment; if the search result shows that the top-level CAD model node does not exist, creating the top-level CAD model node and setting the CADModel4Integration identifier for the node; S 52 , Use the breadth traversal algorithm to traverse other nodes in the attribute information of the 3D CAD model, and perform the following processing according to the tag type of the node: For the CADPartProperty4Integration node, the corresponding CADModel4Integratin node is retrieved through the type attribute information. If the search result shows that it does not exist, the model is first created through the platform application programming interface, and then the model is used to generate an instantiated object, and the object type is identified using CADPartProperty4Integration. For all top-level model nodes except CADModel4Integratin and Other nodes except the CADPartProperty4Integration node are parsed according to their type attribute information, and the corresponding attributes are generated under the current model using the application programming interface, and the attributes are identified using the type node metamodel.
9. A system for generating a SysML model into a 3D CAD model, characterized in that: The system for generating a SysML model into a 3D CAD model adopts the method for generating a SysML model into a 3D CAD model according to any one of claims 1 to 7, and the system for generating a SysML model into a 3D CAD model comprises: A metamodel management module, used to use the metamodel to identify target structure information to be integrated between the system modeling language model and the CAD model; The metamodel parsing and traversal module is used to check whether the system modeling language model has been identified using the metamodel, and traverse the system modeling language model tree from top to bottom for the identified system modeling language model; A CAD model generation module is used to call an application programming interface based on the meta-model mapping relationship to create a corresponding 3D CAD model; An attribute synchronization module is used to call an application programming interface to set attribute information of a 3D CAD model based on attribute values of a system modeling language model; The metamodel reverse identification module is used to call the application programming interface to add a metamodel identification to the 3D CAD model.
10. The system for generating a SysML model into a 3D CAD model according to claim 9, wherein: The SysML model to 3D CAD model generation system further includes: The model change export and difference analysis module is used to output the system modeling language model changes identified by the metamodel in an extensible markup language file, and query the output table based on the change status to further clarify the information that needs to be updated to the 3D CAD model; A CAD metamodel identification mapping module is used to identify relevant metamodels defined for 3D CAD integration based on metamodel mapping relationships; The CAD model dynamic update module is used to call the application programming interface of the 3D CAD platform and add, update or delete the target 3D CAD model information according to the status information defined in the extensible markup language file after the metamodel identification.
Citation Information
Cited By
Model graph synchronization method of three-dimensional modeling graph based on Chili3D
CN121120941A
Model pattern synchronization method based on chili 3D three-dimensional modeling pattern
CN121120941B
Digital prototype model construction method for part machining
CN122113409A