This section presents details of drag-n-drop operations for NX models in local file system or Teamcenter. The following scenarios are presented in a step-by-step manner:
Generate SysML block structure from NX CAD assembly structure
The process of generating SysML models from NX CAD assembly structure follows the common drag-n-drop pattern in Syndeia. Follow the instructions below to generate SysML block structure from NX CAD assembly structure or a piece part.
The NX CAD model used in this illustration is the Toycar model that is available with NX installation. It is located under:
<NX_Installation>\ UGOPEN\SampleNXOpenApplications\Java\parts, e.g.
C:\Program Files\Siemens\NX 9.0\UGOPEN\SampleNXOpenApplications\Java\parts
- Create a new MagicDraw project. Add the Syndeia profile to your SysML model, as shown in Section 2.1.
- Launch the Syndeia Dashboard and access the NX CAD model (.prt) file, using a repository link pointing to the section of your local file system where the CAD model is located (see Section 2.1 for adding a repository link).
- Expand the prt file to view the NX model structure. This will initialize a NX session if this is the first time you are accessing NX models after creating/opening your SysML project. Once the NX session is initialized, you will see an assembly icon (for NX assemblies) or a part icon (for NX piece parts) under the prt file, as shown for the toycar_assy assembly model under toycar_assy.prt file.
- Expand the NX model to view the assembly structure. You can also expand any other NX prt file to view the part/assembly structure, as shown for the toycar_axle_assy.prt file below. You can right click the prt file or the NX CAD model in the RHS pane and select Open.. This will open the CAD model in NX.
- Select Model Transform connection type in the middle panel and drag and drop the NX model (e.g. toycar_assy) from the RHS pane to a SysML package on the LHS pane.
- Select Model Transform connection type in the middle panel and drag and drop the NX model (e.g. toycar_assy) from the RHS pane to a SysML package on the LHS panel.
- Select Yes at the prompt.
- This will generate a SysML block structure from NX assembly structure. Notice the generation of block value properties and part properties corresponding to mass properties and assembly components respectively in the CAD model.
- Create a SysML block diagram in the SysML tool and drag and drop the toycar_assy block generated in the previous step to the diagram and expose all the part properties and value properties of the toycar_assy block. Now, you can see the details of the block structure generated from NX assembly structure by Syndeia. The toycar_assy block has 4 part properties—3 shown in the parts compartment and 1 shown in an expanded form (FRONT_AXLE). The semantic mapping from NX CAD assembly structure to SysML block structure is as follows:
NX part or assembly -> SysML block
NX part or assembly mass properties -> SysML block value properties
NX assembly component -> SysML block part property with an association block
NX part feature -> SysML block and part property (optional)
NX feature expression -> SysML value property (optional) - Syndeia generates a SysML block corresponding to every NX CAD part or sub-assembly in the root assembly structure. It applies the NX_Part stereotype to identify NX parts (piece parts or assemblies) and sets the base unit for the part (e.g. mm) in the unit stereotype tag. The mass properties of the part or assembly are generated as value properties. This includes mass, volume, density, surface area, center of gravity, and the coordinates of the lower left corner and upper right corner of the geometric bounding box of that part/assembly. The units for mass properties are assigned to the unit stereotype applied to the value property, e.g. unit for mass is kg.
A CAD assembly is made of up of components, each of which are usages of a part (or sub-assembly) in the context of that assembly. Syndeia generates two important elements for assembly components. First, it creates a part property relationship (FRONT_AXLE) from the parent assembly block (toycar_assy) to the child part or sub-assembly block (toycar_axle_assy). Second, it creates an association block for the composition (part property) relationship that stores information regarding the placement of the component in the assembly, specifically the transformation from the child part (or sub-assembly) co-ordinate system to the parent assembly (or global) co-ordinate system. Syndeia applies the NX_Component stereotype to association blocks. The transformation that places the component in the assembly is expressed in terms of a translation vector and a 3x3 rotation matrix. - Similar to all drag and drop operations, Syndeia generates connections between SysML blocks and the NX CAD parts/assemblies. These connections are stored in the SysML model. You can view the connections organized by the SysML model in the Connection Browser tab or as a flat list in the Connection Summary tab. Users can invoke compare and sync operations by right clicking on one or more connections.
Currently, the following are supported in the compare and sync operations.- Compare only compares the mass properties between the SysML blocks and NX parts/assemblies.
- Sync from Target > SysML only updates the mass properties in the SysML block from the NX part/assembly
- Sync SysML > Target is not supported. This use case is not a high priority for system engineers since they usually do not modify existing CAD models directly. Mass properties in a CAD model are computed from the geometry and hence they are read-only properties.
- Syndeia provides additional options to bring features on CAD parts and expressions/parameters on features to the SysML model. You can select the following 2 NX settings in the Settings tab—Get features of NX parts and Get expressions (parameters) of NX parts—and select Apply.
- If these settings are applied, then dragging a NX model to a SysML package (as shown in previous steps) will also generate SysML blocks corresponding to part features, and block value properties corresponding to feature expressions/parameters. The NX_Part_Feature stereotype is applied to each block corresponding to a part feature. As shown, the toycar_body block has 7 features—5 shown in the parts compartment and 2 shown in the expanded form. A SysML block, e.g. Extrude(4), was generated for each feature under the toycar_body block—see model containment tree on LHS—and a part property relationship was created from the toycar_body block to each of the feature blocks. The Extrude(4) feature block has 2 value properties indicating the extrusion depth of 23 mm.
Generate NX CAD part with features from a SysML block structure
Syndeia can also seed NX CAD models from SysML block structures. This is very useful for enabling model-based communication between system engineers and mechanical/electrical designers during early phases of system development. This enables system engineers to enrich the representation of system-level geometric requirements and pass them to the mechanical designers by seeding CAD models with features corresponding to those requirements, such as the desired boundaries of an assembly, max/min distance between parts, keep-out zones around parts and assemblies, and desired center-of-gravity location.
The SysML model used in these instructions is the My System Part Features model included in the Syndeia plugin installations at the following locations. The resulting NX CAD model is also included in <MagicDraw_Installation>\samples\Syndeia.
The process of generating a NX CAD model from a SysML model follows the common pattern of drag-n-drop operations in Syndeia. Follow the instructions below. First, the instructions show the mechanics of generating a NX CAD model with features from the given My System Part Features SysML model. Then, the instructions present the general rules for creating your own SysML model for generate NX CAD models.
- Open the My System Part Features model in MagicDraw. Open the Part feature decomposition BDD under the Parts package.
- Right click on the Parts package in the SysML model containment tree and select Syndeia > Dashboard menu. This will launch the Syndeia Dashboard. Go to the Connection Manager tab.
- In the Syndeia Dashboard, select the connection type in the middle panel as Model Transform and drag-n-drop the My System block from the SysML tree (LHS) to a folder on your local file system (RHS).
- Select the option to Generate NX CAD model in the dialog box, and then click Yes to generate the NX CAD model.
- This will generate a NX CAD model with the same name as the SysML block (e.g. My System).
- Right click on the My System.prt file or My System NX model in the Syndeia Dashboard and select Open. This will open the CAD model in NX. Note that 7 features have been generated in NX (as highlighted) from the 7 feature definitions in the SysML block structure. The part property names for the feature definitions in the SysML model have been used to name the features in the NX CAD model, e.g. "my earth" for the Sphere feature used in My System.
Follow the general rules below to create your own SysML model for generating NX CAD parts with features. These rules are also mentioned in a note form in the SysML BDD Part::Part feature decomposition in the My System Part Features SysML model.
- Define a block to represent the parent part. Apply the NX_Part stereotype to this block and populate the unit tag (allowable values are mm and inch). The units apply to everything in the part, including computed parameters such as volume and bounding box.
- Create blocks to represent the primitive features. Allowable names are - Point, Line, Plane, Cuboid, Cone, Cylinder, and Sphere. Apply the NX_Part_Feature stereotype to these blocks.
Create and populate (default value) the value properties of the feature blocks. The names of value properties for the feature blocks must be exactly same as in the My System Part Features model.
For steps 2-3 above, it is recommended that you copy the feature blocks in the example model My System Part Features in your own SysML model and then modify the value properties for the feature parameters, as needed.- Create part properties (composition relationships) from the parent part block to the feature blocks, as shown in the My System Part Features model.
- Name the part properties with names that are relevant to your domain. These names will be used to set the feature names in the NX CAD model.