Exercise 13.1 - NX to SysML.

Objectives

The new learning objective of this exercise is to generate a SysML model from a NX CAD assembly structure.

Preparation

This exercise assumes the student has

  • IBM Rational Rhapsody 8.2 installed correctly on his or her machine with a valid license for use, and

  • Syndeia 3.3 installed as a plugin for Rhapsody with a valid license for use

  • Syndeia NX interface, correctly installed with a valid license for use,

  • Siemens NX 11.0 or later, installed correctly on his or her machine with a valid license for use.
    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. It should be copied to your local file system where it is available through a local repository link (see Video 1.2 for adding a repository link).
    Caution: Rhapsody has, by default, restrictions on the naming of SysML elements, which can create problems when Syndeia tries to create Rhapsody model elements that violate these restrictions, e.g. beginning a SysML block name with a number. We recommend modifying any Rhapsody models you create to relax these restrictions. Modify the properties of the top-level package of the model under General::Model::NamesRegExp with the following string and save.

    ^(([a-zA-Z0-9_][a-zA-Z0-9_ ():-]*)|(operator.+))$

Exercise

  1. Open Syndeia Tutorial Testbed.rpy, (Get it here - ) and create an empty package named Toycar. Launch the Syndeia dashboard from that package. Select a Syndeia Cloud project, if required. Alternatively, create a new Rhapsody project, add the Syndeia profile and create an empty package in your SysML model. See Caution note above.

  2. Go to the Settings tab and make sure Use mapping is unchecked under General. Scroll down to NX settings, uncheck Get features of NX parts and click Apply. Note: Rhapsody has some problems with the Toycar part feature names. See Step 13 below for more information.


    Figure 1 Settings tab, NX settings, unchecked Get Features of NX Parts

  3. Go to the Connection Manager tab, expand the SysML model in the left column and your local repository (DZ Local in our example) in the right. Find 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

  4. 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 in Figure 2 below.


    Figure 2 NX model loads when a NX prt file is expanded 

     

  5. Expand the NX model to view the assembly structure, as shown in Figure 3. 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.

    Figure 3 Expand the NX model to view the assembly structure

     

  6. Right-click the prt file of the NX CAD model in the right column and select Open. This will open the CAD model in NX, as shown in Figure 4 below.

    Figure 4 Syndeia opens the NX CAD model from the Dashboard

     

  7. Select Model Transform connection type in the middle panel and drag-and-drop the NX model ( toycar_assy, not toycar_assy.prt) from the right column to the Toycar SysML package in the left column, as shown in Figure 5. Select Yes at the prompt.

    Figure 5 Drag and drop the NX model to a SysML package

     

  8. This generates a SysML block structure from NX assembly structure, as shown in Figure 6. Notice the generation of block value properties and associations corresponding to mass properties and assembly components respectively in the CAD model.

    Figure 6 SysML block structure generated (LHS) from the NX model structure (RHS)

     

  9. Create a SysML block diagram in the SysML tool and display the toycar_assy block and its the associations and value properties, as shown in Figure 7 below. Now, you can see the details of the block structure generated from NX assembly structure by Syndeia. The toycar_assy block has 4 associations—2 shown in an expanded form (FRONT_AXLE and REAR_AXLE). The semantic mapping from NX CAD assembly structure to SysML block structure is as follows:

    1. NX part or assembly -> SysML block

    2. NX part or assembly mass properties -> SysML block value properties

    3. NX assembly component -> SysML association block

    4. NX part feature -> SysML block and part property (optional)

    5. NX feature expression -> SysML value property (optional)


      Figure 7 SysML BDD showing the block structure generated from NX assembly structure

  10. 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 (as shown in Figure 8).


    Figure 8 SysML blocks are generated for every NX part/assembly in the assembly structure

  11. 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 an association end 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 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, as shown in Figure 7. The transformation that places the component in the assembly is expressed in terms of a translation vector and a 3x3 rotation matrix, as shown in Figure 7.

  12. In the drag-and-drop operations, Syndeia generates connections between SysML blocks and the NX CAD parts/assemblies. You can view the connections organized by the SysML model in the Connection Browser tab or as a flat list in the Connection Search tab. Users can invoke compare and sync operations by right-clicking on one or more connections.

    • Compare Source & Target compares the mass properties between the SysML blocks and NX parts/assemblies.

    • Sync Target -> Source updates the mass properties in the SysML block from the NX part/assembly

    • Sync Source -> 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. 

  13. Syndeia provides additional options to bring features on CAD parts and expressions/parameters on features to the SysML model. You can check or uncheck the following NX settings in the Settings tab—Get features of NX parts and Get expressions (parameters) of NX parts—and select Apply, as shown in Figure 9.

    Figure 9 Syndeia provides additional options to bring features and expressions (parameters) from NX

     

  14. 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 in Figure 10, the toycar_body block has 7 features—4 shown in the parts compartment and 3 shown in the expanded form. A SysML block, e.g. Extrude(4), was generated for each feature under the toycar_body block 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.

    Figure 10 Feature blocks and expression value properties generated from a NX part

    Â