# FixtureFromPointsAndPlane3D

The FixtureFromPointsAndPlane3D 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 construct a fixture A fixture is a coordinate location on the image that keeps the tool in the place determined by the fixture. from two Point3D structures and a Plane3D structure. The resulting fixture is returned as a Fixture3D structure.

3D Fixture Axis Color | 3D Fixture Axis
--- | ---
Red | X
Green | Y
Blue | Z

To create a 3D fixture using the FixtureFromPointsandPlane3D function, define two Point3D structures and a Plane3D structure for the function to use. The function defines the 3D fixture based on the input structures in the following way:

- The origin of the output 3D fixture is the first input point.
- The X-axis of the output 3D fixture is aligned with the line defined by the two input points, with a positive direction toward the second input point.

- The Z-axis of the output 3D fixture is perpendicular to the X-axis and parallel to the input plane. The positive direction of the Z-axis is defined by the right-hand rule from the X-axis to the positive normal vector of the input plane.

  Note: The function creates the 3D fixture so that the positive direction of the fixture Z-axis always corresponds with the positive direction of the point cloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition. coordinate Z-axis. If the general rule would create a fixture Z-axis with a positive direction that aligns with the negative direction of the point cloud coordinate Z-axis, the function inverts the fixture Z-axis, and consequently the Y-axis.

- The Y-axis of the output 3D fixture is perpendicular to the X and Z axes, with a positive direction defined by the right-hand rule from the Z-axis to the X-axis.

Inputs

The FixtureFromPointsAndPlane3D function has the following syntax:

FixtureFromPointsAndPlane3D(PointCloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition.,Point3D0,ExternalPoint0,Point3D1,ExternalPoint1,Plane3D,ExternalPlane,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 use for constructing the fixture. 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.
External Point 0 | Specifies a reference to a Point3D structure defined in another cell to be used for fixturing. Set to 0 (OFF) to use the function's internal Line3D structure instead as the first point used for fixturing.
Point3D 1 | Specifies the offset of the second 3D point to use for constructing the fixture. 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.
External Point 1 | Specifies a reference to a Point3D structure defined in another cell to be used for fixturing. Set to 0 (OFF) to use the function's internal Line3D structure instead as the second point used for fixturing.
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 Plane3D structure defined in another cell to be used for fixturing. Set to 0 (OFF) to use the function's internal Plane3D structure for fixturing 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 Fixture3D structure that stores 3D fixture coordinates.
Results | When initially inserted into a cell, the following functions are automatically inserted into the spreadsheet to create a result table.
| X | Y | Z | Rotation | Tilt | Tilt Direction
❒Fixture3D | GetX(Fixture3D) | GetY(Fixture3D) | GetZ(Fixture3D) | GetRotation(Fixture3D) | GetTilt(Fixture3D) | GetTiltDirection(Fixture3D)

Vision Data Access functions

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

Function | Description
GetRotation(Fixture3D) | Returns the rotation of the Z-axis in degrees, also known as the in-plane rotation.
GetTilt(Fixture3D) | Returns the tilt angle of the Fixture3D structure in degrees on the Z-axis.
GetTiltDirection(Fixture3D) | Returns the tilt direction angle of the specified Fixture3D 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.
GetX(Fixture3D) | Returns the X-axis coordinate of the constructed fixture.
GetY(Fixture3D) | Returns the Y-axis coordinate of the constructed fixture.
GetZ(Fixture3D) | Returns the Z-axis coordinate of the constructed fixture.