ndist#
- Nodes.ndist(nd1='', nd2='', **kwargs)#
Calculates and lists the distance between two nodes.
Mechanical APDL Command: NDIST
- Parameters:
- Returns:
list[DIST, X, Y, Z]distancebetweentwonodes.
Notes
ndist lists the distance between nodes
ND1andND2, as well as the current coordinate system offsets fromND1toND2, where the X, Y, and Z locations ofND1are subtracted from the X, Y, and Z locations ofND2(respectively) to determine the offsets. ndist is valid in any coordinate system except toroidal ( csys,3).ndist returns a variable, called “
_RETURN,” which contains the distance value. You can use this value for various purposes, such as the calculation of distributed loads. In interactive mode, you can access this command by using the Model Query Picker ( Utility Menu> List> Picked Entities ), where you can also access automatic annotation functions and display the value on your model.This command is valid in any processor.
Examples
Compute the distance between two nodes.
>>> node1 = (0, 8, -3) >>> node2 = (13, 5, 7) >>> node_num1 = mapdl.n("", *node1) >>> node_num2 = mapdl.n("", *node2) >>> node_dist = mapdl.ndist(node_num1, node_num2) >>> node_dist [16.673332000533065, 13.0, -3.0, 10.0]