hm_getdistance

Returns the distance between two nodes/points relative to a local coordinate system.

Syntax

hm_getdistance entity_type id1 id2 syst_id

Type

HyperMesh Tcl Query

Description

Returns the distance between two nodes/points relative to a local coordinate system. This returns four values indicating the total distance and the three component values between the input nodes/points, relative to a local coordinate system. If the system is rectangular, the component values returned are x, y, and z. If the system is cylindrical, the component values returned are r, t, and z. If the system is spherical, the component values returned are r, t, and p

Inputs

entity_type
The type of entity to query. Valid values are nodes and points.
id1
The ID of the first entity.
id2
The ID of the second entity.
syst_id
The ID of the local coordinate system to use. If the value is specified as 0, the global coordinate system is used.

Example

To get the distance between nodes 25 and 100 relative to spherical coordinate system 3:

foreach {tot r t p} [hm_getdistance nodes 25 100 3] {}

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

10.0