# PointToLine3D

The PointToLine3D function is used to measure the angle and distance between a Point3D structure and the center point of a Line3D structure. It returns the calculated distance and angle data in a Dist3D structure.

## PointToLine3D Inputs

The PointToLine3D function has the following syntax:

PointToLine3D(PointCloud,Point3D,ExternalPoint,Line3D,ExternalLine,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.
Point3D | Specifies the offset of the 3D point to use. It is offset from the PointCloud (or Fixture3D, if Fixture Reference is enabled) origin in the following format with the following arguments: {X, Y, Z}
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.
Note: This parameter is available only if External Point is set to 0.
External Point | Specifies a reference to a Point3D structure defined in another cell to be used by the function. Set to 0 (OFF) to use the function's internal Point3D structure.
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.
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.

## PointToLine3D Outputs

Returns | A Dist3D data structure containing distance and angle measurement.
Results | When initially inserted into a cell, the following functions are automatically inserted into the spreadsheet to create a result table.
| X0 | Y0 | Z0 | X1 | Y1 | Z1 | AngleX | AngleY | AngleZ | Distance
❒Dist3D | GetX(Dist3D, 0) | GetY(Dist3D, 0) | GetZ(Dist3D, 0) | GetX(Dist3D, 1) | GetY(Dist3D, 1) | GetZ(Dist3D, 1) | GetAngleX(Dist3D) | GetAngleY(Dist3D) | GetAngleZ(Dist3D) | GetDistance(Dist3D)

## PointToLine3D Vision Data Access Functions

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

Function | Description
GetAngleX(Dist3D) | Returns the rotation between the 3D point and the plane about the X-axis.
GetAngleY(Dist3D) | Returns the rotation between the 3D point and the plane about the Y-axis.
GetAngleZ(Dist3D) | Returns the rotation between the 3D point and the plane about the Z-axis.
GetDistance(Dist3D) | Returns the distance calculated between the 3D point and the plane.
GetX(Dist3D, index) | Returns the X-axis coordinate of the center point of the shape specified with the index number. index = 0: First shape. index = 1: Second shape.
GetY(Dist3D, index) | Returns the Y-axis coordinate of the center point of the shape specified with the index number. index = 0: First shape. index = 1: Second shape.
GetZ(Dist3D, index) | Returns the Z-axis coordinate of the center point of the shape specified with the index number. index = 0: First shape. index = 1: Second shape.