# Region3D

The Region3D 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. allows you to create a fixtured 3D region in the shape of an annular cylinder slice. The function returns a Region3D structure containing the settings of the fixtured 3D region. The EditRegion3D, Region3DFromRegion2D, and CompRegion3DFromCompRegion2D functions also return a Region3D structure.

The shape returned by the Region3D function is designed specifically to support the ExtractCircle3D and ExtractRadialCrossSections3D functions, which require this shape as input. However, you can use the output of this function with any tool that requires a Region3D input.

For 3D tools that require a Box3D input, you can use the GetBoundingBox function on the Region3D output to get a Box3D structure that fits the Region3D shape.

To use the Region3D function:

1. Drag and drop the Region3D function to the Spreadsheet.

2. In the property sheet that pops up, double-click the Region3D parameter to open the interactive display, and adjust the ROI shape projected onto the acquisition Acquisition is the process or result of the vision system acquiring a new image. display. Alternatively, you can expand the Region3D settings and define the parameters manually.

3. Click OK to finalize the settings.

Inputs

Parameter | Description
--- | ---
PointCloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition. | 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.
Fixture3D | Specifies the point cloud coordinate system in which the 3D fixture A fixture is a coordinate location on the image that keeps the tool in the place determined by the 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.
Region3D | Specifies the dimensions, offset and angle of the 3D region. It is offset from the Fixture3D origin in the following format with the following arguments: {SizeX, SizeY, SizeZ, Curve, X, Y, Z, Rotation, Tilt, TiltDirection}
SizeX | The size of the region along the Fixture3D X-axis.
SizeY | The size of the region along the Fixture3D Y-axis.
SizeZ | The size of the region along the Fixture3D Z-axis.
Curve | The angle between the radial edges of the annular slice.
X | Offset on the X-axis from the Fixture3D origin.
Y | Offset on the Y-axis from the Fixture3D origin.
Z | Offset on the Z-axis from the Fixture3D origin.
Rotation | Specifies the in-plane rotation of the 3D region (in degrees) around the Fixture3D Z-axis. The value range is -360 to 360. External references with values outside the allowed range are normalized to the allowed range.
Tilt | Specifies the tilt angle of the 3D region (in degrees) from the Fixture3D 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 tilt direction of the 3D region (in degrees) from the rotated Fixture3D X-axis, around the Fixture3D Z-axis. The value range is -360 to 360. External references with values outside the allowed range are normalized to the allowed range.
Show | Selects the type of graphics to overlay on the image.
0 = hide all (default) | All graphics are hidden, except when the cell containing the function is highlighted in the spreadsheet.
2 = input graphics only | Only the input graphics are displayed.

Outputs

Returns | A Box3D structure.
Results | When initially inserted into a cell, the following functions are automatically inserted into the spreadsheet to create a result table.
| SizeX | SizeY | SizeZ | Curve
❒<Region3D_Name> | GetSizeX(Region3D) | GetSizeY(Region3D) | GetSizeZ(Region3D) | GetCurve(Region3D)
X | Y | Z | Rotation | Tilt | TiltDirection
--- | --- | --- | --- | --- | ---
GetX(Region3D) | GetY(Region3D) | GetZ(Region3D) | GetRotation(Region3D) | GetTilt(Region3D) | GetTiltDirection(Region3D)

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
GetBoundingBox(Region3D) | Returns the bounding box of the Region3D structure as a Box3D structure.
GetSizeX(Region3D) | Returns the size of the Region3D structure along the X-axis.
GetSizeY(Region3D) | Returns the size of the Region3D structure along the Y-axis.
GetSizeZ(Region3D) | Returns the size of the Region3D structure along the Z-axis.
GetCurve(Region3D) | Returns the angle-of-curvature value in clockwise degrees for the annular slice shape of the Region3D structure.
GetX(Region3D) | Returns the X-axis coordinate of the Region3D center point.
GetY(Region3D) | Returns the Y-axis coordinate of the Region3D center point.
GetZ(Region3D) | Returns the Z-axis coordinate of the Region3D center point.
GetRotation(Region3D) | Returns the rotation of the Z-axis in degrees, also known as the in-plane rotation.
GetTilt(Region3D) | Returns the tilt angle of the Region3D structure in degrees on the Z-axis.
GetTiltDirection(Region3D) | Returns the tilt direction angle of the specified Region3Dstructure 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.