hm_xformnodetolocal
Returns the coordinates of a node relative to a local coordinate system.
Syntax
hm_xformnodetolocal node_id syst_id
Type
HyperWorks Tcl Query Command
Description
This command returns the coordinates of node_id relative to the coordinate system syst_id.
This is useful for finding distances relative to local coordinate systems.
Inputs
- node_id
- The coordinates of node_id relative to the coordinate system syst_id are returned.
- 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. syst_id of 0 returns the global x, y, and z coordinates.
Example
To get the coordinates of node ID 50 relative to system ID 5:
hm_xformnodetolocal 50 5
Errors
Incorrect usage results in a Tcl error. To detect
errors, you can use the catch
command:
if { [ catch {command_name...} ] } {
# Handle error
}
If node_id does not exist, you will get the following error:
Node node_id could not be found.
If syst_id does not exist, you will get the following error:
System syst_id could not be found.