# LineToRectangleAngles3D

The LineToRectangleAngles3D function measures the angles of the specified Line3D structure relative to the specified Rectangle3D structure. It returns the results (that is, the tilt and tilt direction of the detected angle) in an Angles3D structure.

## LineToRectangleAngles3D Inputs

The LineToRectangleAngles3D function has the following syntax:

LineToRectangleAngles3D(PointCloud,Line3D,ExternalLine,Rectangle3D,ExternalRectangle,Show)

See the table for a description of the available parameters.

Parameter | Description
PointCloud | Reference to a cell containing a point cloud. The default value is $A$0.
Line3D | Specifies the offsets of the 3D line structure to use. It is offset from the PointCloud origin in the following format with the following arguments: {X0, Y0, Z0, X1, Y1, Z1}
X0 | Offset of the 3D line's starting point on the X-axis from the PointCloud origin.
Y0 | Offset of the 3D line's starting point on the Y-axis from the PointCloud origin.
Z0 | Offset of the 3D line's starting point on the Z-axis from the PointCloud origin.
X1 | Offset of the 3D line's ending point on the X-axis from the PointCloud origin.
Y1 | Offset of the 3D line's ending point on the Y-axis from the PointCloud origin.
Z1 | Offset of the 3D line's ending point on the Z-axis from the PointCloud origin.
Note: This parameter is available only if External Line is set to 0.
External Line | Specifies a reference to the Line3D structure defined in another cell to be used by the function. Set to 0 (OFF) to use the function's internal Line3D structure instead.
Rectangle3D | Specifies the dimensions, offset and angle for the 3D rectangle of the function. Double-click on the Rectangle3D parameter in the property sheet to adjust the rectangle on the acquisition display. Rectangle3D is offset from the PointCloud origin or the external fixture in the following format with the following arguments: {SizeX, SizeY, X, Y, Z, Rotation, Tilt, TiltDirection}
SizeX | The size of the rectangle along the PointCloud X-axis.
SizeY | The size of the rectangle along the PointCloud Y-axis.
X | Offset on the X-axis from the PointCloud origin.
Y | Offset on the Y-axis from the PointCloud origin.
Z | Offset on the Z-axis from the PointCloud origin.
Rotation | Specifies the in-plane rotation in degrees around the PointCloud Z-axis of the tool. The value range is -360 to 360. The tool normalizes external references with values outside the allowed range to the allowed range.
Tilt | Specifies the tilt angle in degrees from the PointCloud Z-axis of the tool. The value range is 0 - 180. External references with values outside the allowed range result in an error.
Tilt Direction | Specifies the direction of tilt in degrees from the rotated PointCloud X-axis of the tool, around the PointCloud Z-axis of the tool. The value range is -360 to 360. The tool normalizes external references with values outside the allowed range to the allowed range.
Note: This parameter is only available if you set External Rectangle to 0.
External Rectangle | Specifies a reference to a Rectangle3D structure defined in another cell. The function uses the referenced cell for constructing the 3D structure. Set to 0 (OFF) to use the internal Rectangle3D structure of the function.
Show | Selects the type of graphics to overlay on the image.
0 = hide all (default) | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
2 = input graphics only | The input data will be displayed at all times.

## LineToRectangleAngles3D Outputs

Returns | An Angles3D data structure containing the angle measurements, or #ERR if any of the input parameters are invalid.
Results | When initially inserted into a cell, the following functions are automatically inserted into the spreadsheet to create a result table.
| Tilt | Tilt Direction
❒Angles3D | GetTilt(Angles3D) | GetTiltDirection(Angles3D)

## Angles3D Vision Data Access functions

The following Angles3D Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:

Function | Description
GetTiltDirection(Angles3D) | Returns the tilt direction angle of the specified Angles3D structure in degrees. The angle is measured in the X-Y plane of the original reference coordinate system, and specifies the direction for the projection of the tilted Z-axis onto that plane.
GetTilt(Angles3D) | Returns the tilt angle of the Angles3D structure in degrees on the Z-axis.