Mechanisms

Mechanisms play a very important role in Vortex® content, as they contain the link between the dynamics objects and the rest of the simulation.

A mechanism contains assemblies, parts, constraints, and extensions for simulation.

 The figure below indicates where mechanisms are located in the Vortex hierarchy.

Working with Mechanisms

To start building a mechanism, first you import a 3D model, create assemblies, and connect parts and geometries to 3D models.

From there, you can connect two assemblies together by attachment points on them in the Assembly editor.

To add more functionalities, you can insert extensions.

If you need to create access to some properties of your mechanism, i.e. exposing an interface to other content objects or to the outside world, you should define them in an interface call the VHL Interface. The exposed fields are then available in the Connection Editor at the scene level, from the Remote Debugger or can be accessed outside of Vortex (for example, in an external simulator or game engine or database).

Mechanisms created in the Mechanism editor can be tested with the simulate button or loaded in the Player or any Vortex simulation application.

Working with VHL Interfaces

The Vortex® High Level (VHL) Interface exposed a defined subset of the mechanism's internal fields as inputs, outputs and parameters.

The values of the VHL interface are exposed so that a systems integrator can modify these values without knowledge of the internal complexity of the mechanism, its assemblies, scripts and extensions.

Additionally, non-modifiable properties and their respective values and parameters are protected during modification, testing, and validation stages. 

VHL properties are accessible at both the Mechanism and Scene level, but they can only be created in the Mechanism editor.

VHL properties are comprised of the following:

  • Inputs: These are properties used to operate the mechanism during simulation.
  • Outputs: These are properties used to get and read information about the outcomes of the simulation.
  • Parameters: These are the properties that define or specify mechanism behavior or used to control and condition the way a mechanism is simulated. They are typically agreed upon and provided at the design stage of the development of a given mechanism.

Opening an Existing VHL Interface

This procedure explains how to load a existing interface in the VHL Interface Editor.

  1. If you are not already in the Mechanism editor, open the mechanism containing the VHL Interface.
  2. From the Explorer panel, open the VHL Interfaces folder and locate the Interface you want to open.
  3. Right-click the Interface and select Edit from the context menu. The VHL Interface Editor loads in the main window (where the 3D View usually appears).

    Each VHL target can only be bound to a single property.


  4. To undock the VHL Editor, right-click anywhere on the VHL Editor and select Undock. This allows you to see the contents of the 3D View and the VHL Editor at the same time and move it around the workspace. To dock it again, right-click inside the VHL Interface Editor window and click Dock.

Creating a New VHL Interface

Expose object's properties

The VHL Interface Editor allows you to expose properties in the VHL. You can also use it to rename properties, change minmum and maximum values and add meaningful descriptions for each property.

  1. If you are not already in the Mechanism editor, either open an existing mechanism or create a new one.
  2. Select Simulation in the Toolbox.
  3. Double-click VHL Interface. The VHL Interface Editor appears.
  4. In the Explorer tree, select an object that you want to expose its properties. The selected object's properties are shown in the property panel on the right.
  5. From the Property panel, drag and drop the property you want to expose onto either the Input, Output, or Parameters section of the VHL Interface. It creates a VHL Interface property and maps the property to the object's exposed property.

    Read-only input and parameter properties cannot be exposed in the VHL Interface Editor.


  6. Now you can perform any of these tasks to customize your VHL Interface property:
    • By default, the VHL Interface property uses the name of the object's exposed property. To use a different name, double-click on the Name cell and type the new name.
    • To add a description for the VHL Interface property, double-click on the Description cell and type the description. You can press the Enter or Tab key to finish editing.
    • To enter minimum and maximum values for the VHL Interface property, double-click on the appropriate Minimum and Maximum cells, enter the values and press the Enter or Tab key. Only property of double or integer type supports min and max values.
    • To break the map between the VHL Interface property and the object's property, hover over the arrow in the Data column of the property you want to unmap, a trash can icon appears, click on it. The property still appears in the VHL Interface Editor, but the map to the object's property has been unmapped.
    • To map an object's property to an existing VHL Interface property, drag and drop the object's property onto the Data column of the VHL property's row. An existing VHL Interface property can be mapped to multiple properties of the same object or different objects.
    • To delete an entire VHL Interface property from the VHL Interface, select the row you want to delete and press the Delete key.

Create VHL Interface properties

Additionally, you can add Inputs, Outputs and Parameters properties to the VHL Interface editor by clicking the + button next to Container heading. 

Clicking the + button prompts a drop-down list, select the type of data for this new output (e.g., Integer, Boolean, String etc.). A property of the selected data type is created and inserted at the end of the container, where you can edit its details.

The feature allows you to create and organize VHL Interface properties in advance. You can group the properties using containers. The organized properties can then be mapped to objects' properties via drag and drop.