hm_xformvectoratpointtoglobal

Returns the global components of a vector defined at a node and relative to a local coordinate system.

Syntax

hm_xformvectoratpointtoglobal x y z syst_id node_id

Type

HyperWorks Tcl Query

Description

This command returns the three global components of a locally defined vector.

This command can be used in conjunction with hm_xformvectoratpointtolocal to convert a vector from one coordinate system to another.

Inputs

x y z
The x, y, and z values should be given relative to the local coordinate system syst_id.
syst_id
The x, y, and z values should be given relative to the local coordinate system syst_id. If syst_id is a cylindrical system, r, t, and z must be used for x, y, and z. If syst_id is a spherical system, r, t, and p must be used for x, y, and z.
node_id
The base of the vector is specified by node_id which must be a node in the current model.

Example

To convert the vector (1,0,0) at base node 10 defined in rectangular system ID 5 to the cylindrical system ID 8:

set g_xyz [hm_xformvectoratpointtoglobal 1 0 0 5 10]
set g_x [lindex $g_xyz 0]
set g_y [lindex $g_xyz 1]
set g_z [lindex $g_xyz 2]
set l_rtz [hm_xformvectoratpointtolocal $g_x $g_y $g_z 8 10]

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}
If syst_id does not exist, you will get the following error:
System syst_id could not be found. 
If node_id does not exist, you will get the following error:
Node node_id could not be found.