MotionView User's Guide

Vectors

Vectors

Previous topic Next topic Expand/collapse all hidden text  

Vectors

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

This section describes the Vector entity of MotionView and shows the various usage, creation, and editing methods.

Theory/Background

Vectors are entities that can be used for orienting other entities such as Joints, Bushings, Beams, Coil Springs, etc.  Vectors provide direction and have no particular location in space.

The topological information required to define a Vector is shown in the figure below:

vector_diagram_mv

You can create the following types of vectors in MotionView:

Single Vector
Pair Vector (Asymmetric or Symmetric)

When used to orient entities in MotionView, the corresponding axis of the markers of the entity (the primary axis that defines the entity direction) gets oriented in the same direction as that of the Vector.  For example, when a vector is used to orient the direction of the revolute joint, the Z axis of the joint I and J Markers are oriented along the direction of the Vector.

Vector Entity Properties

A Vector is primarily defined by its Cartesian Coordinates in the Global Frame.  The only property that is applicable to the Vector entities are the components in the respective directions.  The vector direction is determined along the direction of the coordinate values provided from the Global Origin.  When creating Pair Vector entities, you have the option of making the Vector properties symmetric about the ZX plane of the model.

This entity does not have a graphical representation in the MotionView graphics area.

Creating and Editing Vectors

To learn how to add an "Entity" to a model, please see the Entity Manual topic. 

hmtoggle_plus1To create/add a Vector to a model:
1.An Vector entity can be added to the model using two different methods:
-From the MotionView Reference Entity toolbar, right-click the Vectors icon entityVectors-24.

OR

-From the Project Browser, right-click on the Model label (or on any System/Analysis of your choice) and select Add > Reference Entity > Vector from the context menu.

The Add Vector or VectorPair dialog is displayed.

add_vector_or_vectorpair_dialog_mv

2.In the Add Vector or VectorPair dialog, double click the System collector button and select the desired system from the Select a System or Assembly or Analysis dialog.

Note - The selection of System collector for the entity can also be done after the entity has been added.

3.Enter the Label and Variable name for the Vector.
4.Select the vector type (Single or Pair) using the Type radio button.
5.Add any comment information related to the Vector in the Comments area (Optional).
6.Click OK to add the vector.

OR

-If several Vectors are to be added, click Apply.  This keeps the Add Vector or VectorPair dialog box open for adding additional vectors.
7.Once an Vector has been added to the model using any of the entity creation methods, the panel for the Vector will be displayed in the panel area.

vector_panel_mv

Vector Panel - Properties Tab - Single Entity

vector_panel_pair_mv

Vector Panel - Properties Tab - Pair Entity

8.Enter the Vector component values along with the X, Y, and Z global directions.
9.To enable Symmetric properties for Pair entities, activate the Symmetric properties check box.

Vector in MDL and XML Formats

The Vector entity can be defined through the MDL format using the *Vector statement, and its property is set using the *SetVector statement.  This entity by itself does not have a MotionSolve XML equivalent to it.

hmtoggle_plus1Vector in MDL (Model Definition Language)

The Vector entity can be of the following types:

1.Single
2.Pair (Asymmetric or Symmetric)

All of the types of entities mentioned above can be added to the model using the MDL Statements shown below:

Syntax:

*Vector(vector_name, "vector_label")

*SetVector(vector_name, x, y, z)

Example:

*Vector( v_a, "Vector A" )

*SetVector( v_a, 3, 6, 9 )

Syntax:

*VectorPair(vector_name, "vector_label")

*SetVector(vector_name, LEFT|RIGHT, x, y, z) – Symmetric Pair

*SetVector(vector_name, , x_l, y_l, z_l, x_r, y_r, z_r) – Asymmetric Pair

Example:

*VectorPair( v_f, "Vector F" )

*SetVector( v_f, LEFT, -3, -9, -7)

*SetVector( v_f, , -3, -9, -7, 4, 9 5)

To understand the complete syntax of the MDL statements mentioned above, please refer to the following MotionView MDL Reference Guide topics: *Vector(), *VectorPair(), *SetVector().

hmtoggle_plus1Vector in XML Format

The Vector entity by itself does not have a MotionSolve XML equivalent to it.

Creating and Editing Vectors using Tcl

In MotionView, Tcl can be used to add any MDL entities to the model.  There are two Tcl commands that can be used to add an entity:

hmtoggle_arrow1InterpretEntity

Syntax:

mdlmodel_handle InterpretEntity new_handle keyword varname label

In case of the Vector the statement will look as shown below:

mdlmodel_handle InterpretEntity Vector_handle Vector v_b "\"Torsion Axis Vector\"";

hmtoggle_arrow1InterpretSet

Syntax: 

mdlmodel_handle InterpretSet keyword tokens;

In case of the Vector the statement will look as shown below:

mdlmodel_handle InterpretSet SetVector v_b 3.0 6.0 9.0;

The InterpretEntity command is used to add entities to the model and the InterpretSet command is used to set the entity properties.  To understand the complete usage and syntax of these commands, please refer to the following HyperWorks Desktop Reference Guide/Programming with Tcl/Tk Commands topics: InterpretEntity and InterpretSet.

Note - When using the InterpretEntity and InterpretSet commands, it is important to also use the Evaluate command in order for the changes to take effect immediately.

To learn how to create a complete model using Tcl commands, please refer to tutorial MV-1040: Model Building Using Tcl.

Example Model

The following example shows the various Vector types that are used in MotionView:

hmtoggle_plus1Vector.mdl

*BeginMDL( the_model, "Model", "12.0.0.71" )

 

 *StandardInclude(FILE)

 *SetCurrentSolverMode(MotionSolve)

 *Point( p_a, "Point A" )

 *Body( b_a, "Body A", p_a, , , ,  )

 *Set( p_a.x, 10 )

 *Set( b_a.usecm, true )

 *SetOrientation( b_a.cm, TWOAXES, ZX, DXDYDZ, , , , DXDYDZ )

 *Set( THIS.state,  )

 

#Example for Single Vector:

 *Vector( v_vec_single, "Vector_Single" )

 

#Example for a Pair Vector

 *VectorPair( v_vec_pair, "Vector _Pair" )

 

#Example for *SetVector statement.

 *SetVector( v_vec_single,               1.0, 1.0, 1.0 )

 *SetVector( v_vec_pair,           LEFT, -1.0, 2.0, 3.0 )

*EndMDL()

See Also:

Vector Panel

Adding and Removing Entities

*Vector() (MDL Model Statement)

*VectorPair() (MDL Model Statement)

*SetVector() - single vector (MDL Model Statement)

*SetVector() - asymmetric pair (MDL Model Statement)

*SetVector() - symmetric pair (MDL Model Statement)

Reference_Marker (XML Command)

InterpretEntity (Tcl Command)

InterpretSet (Tcl Command)