# FixtureFromPoints3D

The FixtureFromPoints3D function is used to construct a fixture from three Point3D structures. 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 FixtureFromPoints3D function, define three Point3D structures 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 second input point.

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

- The Y-axis of the output 3D fixture is aligned with the line that runs through the origin and the third input point, with a positive direction toward the third input point.

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

  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 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.

Inputs

The FixtureFromPoints3D function has the following syntax:

FixtureFromPoints3D(PointCloud,Point3D0,ExternalPoint0,Point3D1,ExternalPoint1,Point3D2,ExternalPoint2,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 Point3D structure instead for the first point used to create the fixture.
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 Point3D structure instead for the second point used to create the fixture.
Point3D 2 | Specifies the offset of the third 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 2 | 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 Point3D structure instead for the third point used to create the fixture.
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.