# PointToPlane3D

The PointToPlane3D function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. is used to measure the angle and distance between a Point3D structure and a Plane3D structure. It returns the calculated distance and angle values in a Dist3D structure, which can be referenced with Dist3D Vision Data Access functions.

Inputs

The PointToPlane3D function has the following syntax:

PointToPlane3D(PointCloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition.,Point3D,ExternalPoint,Plane3D,ExternalPlane,Show)

See the table for a description of the available parameters.

Parameter | Description
PointCloud | Reference to a cell containing a point cloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition.. 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 A fixture is a coordinate location on the image that keeps the tool in the place determined by the 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.
Plane3D | Specifies the offset and the angle of the plane to use. It is offset from the PointCloud origin in the following format with the following arguments: {X, Y, Z, Tilt, TiltDirection}
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.
Tilt | Specifies the tilt angle (in degrees) from the PointCloud Z-axis. The value range is 0-180. External references with values outside the allowed range will result in an error.
Tilt Direction | Specifies the direction of tilt (in degrees) from the plane's rotated PointCloud X-axis, about the tool's PointCloud Z-axis. The value range is -360 - 360. External references with values outside the allowed range will be normalized to the allowed range.
Note: This parameter is available only if External Plane is set to 0.
External Plane | Specifies a reference to a Rectangle3D or Circle3D structure defined in another cell to be used by the function. Set to 0 (OFF) to use the function's internal Plane3D 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.

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)

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.