Angle

Measures the angle of a line, between two points, relative to a chosen coordinate system. The results are similar to the angle calculations performed by Rhino's Distance command.

Syntax

Rhino.Angle (arrPoint1, arrPoint2 [, blnWorld])

Parameters

arrPoint1

Required.  Array.  The first 3-D point.

arrPoint2

Required.  Array.  The second 3-D point.

blnWorld

Optional.  Boolean.  If True, the angle calculation is based on the world coordinate system.  If False, the angle calculation is based on the active construction plane.  The default value is True.

Returns

Array

An array containing the following elements if successful.

0

The X,Y angle, relative to a chosen coordinate system, in degrees.

1

The elevation angle in degrees.

2

The delta (distance) in the X direction.

3

The delta (distance) in the Y direction.

4

The delta (distance) in the Z direction.

Null

If not successful, or on error.

Example

Dim arrPoint1, arrPoint2, arrAngle

arrPoint1 = Rhino.GetPoint("First point")

If IsArray(arrPoint1) Then

  arrPoint2 = Rhino.GetPoint("Second point")

  If IsArray(arrPoint2) Then

    arrAngle = Rhino.Angle(arrPoint1, arrPoint2)

    If IsArray(arrAngle) Then

      Rhino.Print "Angle: " & CStr(arrAngle(0))

    End If

  End If

End If

Also See

Angle2

Distance