# EditRegion3D

The EditRegion3D function inserts an interactive graphical Region3D control into the selected spreadsheet cell. It returns an EditRegion3D control element, allowing you to modify the Region3D structure in accordance with the enabled parameters.

Note: The HMI does not currently support the EditRegion3D function.

To use the EditRegion3D function:

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

2. In the property sheet that pops up, check or uncheck the Move, Size, and Rotate checkboxes to enable or disable moving, resizing, or rotating the interactive Region3D structure.

3. Click OK to finalize the settings and create the EditRegion3D button.

4. In the Spreadsheet, click the EditRegion3D button to modify the interactive Region3D structure using the projected region in the acquisition display:

   To open the Property Sheet again after finalizing the settings for EditRegion3D, right-click on the cell containing the EditRegion3D button, and select Edit Function... from the context menu.

Input

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.
Move | Disables or enables the ability to adjust the input region position. This setting is enabled by default.
Size | Disables or enables the ability to resize the input region (that is, change its height and width). This setting is enabled by default.
Rotate | Disables or enables the ability to adjust the input region orientation. This setting is enabled by default.
Name | Specifies the text string label of the control.
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.

Output

Returns | An EditRegion3D structure that allows you to modify the related Region3D 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
❒<EditRegion3D_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 can be used to extract data from the result structure:

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