# ProfileFlatness3D

The ProfileFlatness3D 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 measure the flatness of a profile in a Profile3D structure.

The ProfileFlatness3D function requires an existing Profile3D structure as input. You can also define a Region of Interest within the profile to narrow down the analysis and provide more specific results.

3D Point Cloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition. with ProfileFlatness3D | Profile View

The ProfileFlatness3D function also allows you to use an external ProfileFixture3D input, which ensures that the function measures the same profile flatness for each acquisition Acquisition is the process or result of the vision system acquiring a new image.. The ProfileFlatness3D function can use the profile fixture A fixture is a coordinate location on the image that keeps the tool in the place determined by the fixture. to align the Profile Region, and produce consistent results regardless of positioning inconsistencies in the acquisition.

Inputs

The ProfileFlatness3D function has the following syntax:

ProfileFlatness3D(Profile3D, ProfileFixture3D, ExternalProfileFixture3D, ProfileRegion, FlatnessMode, Show)

Parameter | Description
External Profile | Specifies the Profile3D structure to use.
Profile Fixture | Specifies the coordinates defining the profile fixture. It is offset from the profile origin in the following format with the following arguments: {Xp, Zp, Angle}
Xp | Offset on the Xp-axis from the profile origin.
Zp | Offset on the Zp-axis from the profile origin.
Angle | Specifies the in-plane rotation in degrees around the Yp-axis of the profile origin. The value range is 0 to 180.
Note: This parameter is only available if you set External Profile Fixture to 0.
External Profile Fixture | Specifies a reference to a ProfileFixture3D structure defined in another cell. The function uses the ProfileFixture3D cell as the profile fixture of the function. Set to 0 (OFF) to use the internal profile fixture of the function instead.
Profile Region | Specifies the dimensions, offset and angle for the Profile Region of the function. The Profile Region is offset from the profile origin or the external fixture in the following format with the following arguments: {SizeXp, SizeZp, Xp, Zp, Angle}
SizeXp | The size of the Profile Region along the profile X-axis.
SizeZp | The size of the Profile Region along the profile Z-axis.
Xp | Offset on the X-axis from the profile origin.
Zp | Offset on the Z-axis from the profile origin.
Angle | Specifies the in-plane rotation in degrees around the profile Z-axis. The value range is 0 to 180.
Flatness Mode | Specifies the mode of flatness measurement: Least Squares(0) - minimizes the sum of the squared residuals for all the measurement points. Minimum Zone(1) - determines two parallel lines enclosing the profile with the least separation. The Minimum Zone flatness measurement mode provides a more accurate definition of flatness, but can take more processing time than the Least Squares mode.
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.
1 = result graphics only | The result graphics of the function are displayed at all times.
2 = input and result graphics | The region of interest, the input data and the results are displayed at all times.

Outputs

Returns | A flatness value, 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:
| Flatness | Point Above | Point Below | Line Above | Line Below
❒ProfileFlatness3D | GetFlatness(Profile3D) | ❒Point3D | ❒Point3D | ❒Line3D | ❒Line3D

Vision Data Access functions

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

Function | Description
GetArea(ProfileFlatness3D) | Returns the profile flatness value, where 0 is perfectly flat.
GetPointAbove(ProfileFlatness3D) | Returns the Point3D above the flatness measurement area.
GetPointBelow(ProfileFlatness3D) | Returns the Point3D below the flatness measurement area.
GetLineAbove(ProfileFlatness3D) | Returns the Line3D above the flatness measurement area.
GetLineBelow(ProfileFlatness3D) | Returns the Line3D below the flatness measurement area.