Get Distance Function

Function to find distance between two nodes or user-defined points

This script uses the Pythagoras’ theorem to find the shortest distance between two nodes or user-defined points.

Functions:
GetDist – this function utilises the Pythagoras’ theorem using two points defined in a 3D space.

Two objects must be input into the function. Example: GetDist(obj_1, obj_2).

The function takes two types of inputs:
– Node objects.
– User defined objects with properties *.x, *.y and *.z.

GetDist returns a float value of the distance.

In the example, the user is prompted to select two nodes in the model,  and the distance between the nodes are subsequently displayed in the dialogue box.