hm_xformvectoratpointtolocal

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

Syntax

hm_xformvectoratpointtolocal x y z syst_id node_id

Type

HyperWorks Tcl Query

Description

This command returns the three local components of a globally defined vector.

This command can be used in conjunction with hm_xformvectoratpointtoglobal 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 global coordinate system.
syst_id
The local system to transform into is given by syst_id. If syst_id is a rectangular system, x, y, and z are returned. If syst_id is a cylindrical system, r, t, and z are returned. If syst_id is a spherical system, r, t, and p are returned.
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.