# Line3D

The Line3D function allows you to create a fixtured 3D line segment in the point cloud.

It returns a Line3D structure containing the settings of the fixtured 3D line segment.

Inputs

The Line3D function has the following syntax:

Line3D(PointCloud,Fixture3D,ExternalFixture,Line3D,Show)

Parameter | Description
PointCloud | Reference to a cell containing a point cloud. The default value is $A$0.
Fixture3D | Specifies the point cloud coordinate system in which the 3D fixture is defined. It is offset from the PointCloud origin in the following format with the following arguments: {X, Y, Z, Rotation, 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.
Rotation | Specifies the in-plane rotation in degrees around the PointCloud Z-axis. The value range is -180 to 180. The tool normalizes external references with values outside the allowed range to the allowed range.
Tilt | Specifies the tilt angle in degrees from the PointCloud Z-axis after rotation. The value range is 0-180. External references with values outside the allowed range result in an error.
Tilt Direction | Specifies the direction of tilt in degrees from the rotated PointCloud X-axis of the tool, around the PointCloud Z-axis of the tool. The value range is -180 to 180. The tool normalizes external references with values outside the allowed range to the allowed range.
Note: The Fixture3D parameter is only available if you set External Fixture to 0.
External Fixture | Specifies a reference to a Fixture3D structure defined in another cell. The function uses the referenced cell as the fixture of the function. Set to 0 (OFF) to use the internal fixture of the function instead.
Line3D | Specifies the offsets of the 3D line to configure. It is offset from the Fixture3D 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 Fixture3D origin. The value range is -inf. to inf.
Y0 | Offset of the 3D line's starting point on the Y-axis from the Fixture3D origin. The value range is -inf. to inf.
Z0 | Offset of the 3D line's starting point on the Z-axis from the Fixture3D origin. The value range is -inf. to inf.
X1 | Offset of the 3D line's ending point on the X-axis from the Fixture3D origin. The value range is -inf. to inf.
Y1 | Offset of the 3D line's ending point on the Y-axis from the Fixture3D origin. The value range is -inf. to inf.
Z1 | Offset of the 3D line's ending point on the Z-axis from the Fixture3D origin. The value range is -inf. to inf.
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 Line3D data structure as the projected 3D line, or #ERR if any of the input parameters are invalid.
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
❒Line3D | GetX(Line3D, 0) | GetY(Line3D, 0) | GetZ(Line3D, 0) | GetX(Line3D, 1) | GetY(Line3D, 1) | GetZ(Line3D, 1)

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
GetX(Line3D, index) | Returns the X-axis coordinate of the 3D line point specified with the index. An index value of 0 indicates the first endpoint of the line, while a value of 1 indicates its second endpoint.
GetY(Line3D, index) | Returns the Y-axis coordinate of the 3D line point specified with the index. An index value of 0 indicates the first endpoint of the line, while a value of 1 indicates its second endpoint.
GetZ(Line3D, index) | Returns the Z-axis coordinate of the 3D line point specified with the index. An index value of 0 indicates the first endpoint of the line, while a value of 1 indicates its second endpoint.