# PointToPoint3D

The PointToPoint3D function is used to measure the angle and distance between two Point3D structures. It returns the calculated distance and angle data in a Dist3D structure, which can be referenced with Dist3D Vision Data Access functions.

## PointToPoint3D Inputs

The PointToPoint3D function has the following syntax:

PointToPoint3D(PointCloud,Point3D0,ExternalPoint0,Point3D1,ExternalPoint1,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 0 | Specifies the offset of the first 3D point to measure. It is offset from the PointCloud 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 0 is set to 0.
External Point 0 | Specifies a reference to a Point3D structure defined in another cell to be used as the first 3D point to check. Set to 0 (OFF) to use the function's internal Point3D structure.
Point3D 1 | Specifies the offset of the second 3D point to measure. It is offset from the PointCloud 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 1 is set to 0.
External Point 1 | Specifies a reference to a Point3D structure defined in another cell to be used as the second 3D point to check. Set to 0 (OFF) to use the function's internal Point3D structure.
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.

## PointToPoint3D 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)