# ExtractParallelCrossSections3D

The ExtractParallelCrossSections3D 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 extract multiple parallel profiles from a 3D point cloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition. by defining a 3D Region of Interest and the distance between the extracted profiles.

The function creates parallel planes within the Region of Interest, offset from each other by the defined step distance. Each plane serves as a slicing object, creating a profile using the points where the plane intersects with the 3D point cloud. The planes for each profile are parallel to the X and Z axes of the Region of Interest.

3D Point Cloud with ExtractParallelCrossSections3D | Profile View of Profile3D 1

The ExtractParallelCrossSections3D function also allows you to use an External Fixture3D as input, which ensures that the function extracts the same profile for each acquisition Acquisition is the process or result of the vision system acquiring a new image.. You can add a finding tool such as PatMax3D or Lines3D to create a fixture A fixture is a coordinate location on the image that keeps the tool in the place determined by the fixture., and use the Fixture3D output of the finding tool as an External Fixture for the ExtractParallelCrossSections3D function. Once the finding tool locates the trained feature for a new acquisition, the ExtractParallelCrossSections3D function can use the located feature to align the Region of Interest in the 3D point cloud, and produce consistent profiles regardless of positioning inconsistencies in the acquisition.

You can use the Profile3D outputs of the ExtractParallelCrossSections3D function as input for profile feature extraction tools. Profile feature extraction tools allow you to extract Circle3D, Point3D, and Line3D structures from the profile.

Inputs

The ExtractParallelCrossSections3D function has the following syntax:

ExtractParallelCrossSections3D(PointCloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition., Fixture3D, ExternalFixture, Region3D, ExternalRegion, StepDistance, StepOffset, Thickness, SampleDistance, GapFillSize, VerticalDiscontinuityMode, ZDiscontinuityThreshold, InsertCliffs, CliffLength, CliffXThreshold, 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.
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.
Region3D | Specifies the dimensions, offset and angle for 3D region of interest (ROI) of the function. It is offset from the Fixture3D origin in the following format with the following arguments: {SizeX, SizeY, SizeZ, X, Y, Z, Rotation, Tilt, TiltDirection}
SizeX | The size of the ROI along the Fixture3D X-axis.
SizeY | The size of the ROI along the Fixture3D Y-axis.
SizeZ | The size of the ROI along the Fixture3D Z-axis.
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 in degrees around the Fixture3D Z-axis of the tool. The value range is -360 to 360. The tool normalizes external references with values outside the allowed range to the allowed range.
Tilt | Specifies the tilt angle in degrees from the Fixture3D Z-axis of the tool 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 Fixture3D X-axis of the tool, around the Fixture3D Z-axis of the tool . The value range is -360 to 360. The tool normalizes external references with values outside the allowed range to the allowed range.
Note: This setting is only available if you set External Region to 0.
External Region | Specifies a reference to a 3D region defined in another cell. The function uses the referenced cell as the Region of Interest of the function. Set to 0 (OFF) to use the internal Box3D structure of the function as the ROI.
Step Distance | Specifies the distance between adjacent slicing rectangles within the Region of Interest. The number of slicing rectangles depends on the number of steps that the tool can complete within the Region of Interest.
Step Offset | Specifies the distance of the first slicing rectangle on the Y-axis from the origin of the Region of Interest.
Thickness | Specifies the thickness of the slicing rectangle that the function uses to search for points. When you define a thickness greater than 0, the function picks up points that deviate from the slicing rectangle on the perpendicular axis by a distance up to half the defined thickness in both directions, creating a flattened composite profile from the registered points.
Sample Distance | Specifies the distance between sampling points for the profile creation. A small sample distance creates a profile that highlights surface imperfections and sudden peaks or valleys. A large sample distance creates a profile that can smooth over imperfections.
Gap Fill Size | Specifies the minimum distance on the Xp-axis of the extraction rectangle between adjacent points for identifying a gap in the profile. For adjacent points with an Xp-axis distance below the Gap Fill Size, the function creates a continuous profile. For adjacent points with an Xp-axis distance above the Gap Fill Size, the function displays a gap between the two points.
Vertical Discontinuity Mode | Specifies the method of compensating for discontinuity on the Zp-axis of the extraction rectangle between adjacent points: 0 = Interpolate: draws a direct line between the two points. 1 = Z Aligned: draws a vertical line aligned with the Zp-axis from the point with a larger Zp value.
Z Discontinuity Threshold | Specifies the minimum distance on the Zp-axis between adjacent points for which the function considers the profile to be discontinuous. For adjacent points with a Zp-axis distance below the Z Discontinuity Threshold, the function creates a continuous profile. For adjacent points with a Zp-axis distance above the Z Discontinuity Threshold, the function creates a gap between the two points.
Insert Cliffs | Specifies whether the function inserts cliffs into the profile. The function inserts cliffs on either side of a gap, dropping the Zp-axis to a negative value. Inserting cliffs allows you to extract corner points from gaps.
Cliff Length | Specifies the length of the inserted cliffs.
Cliff X Threshold | Specifies the distance on the Xp-axis between adjacent points across a gap above which the function inserts cliffs.
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 Profile3D data structure containing the extracted profile, 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:
| Num Found | Index | Profile
❒Profiles3D | GetNFound(Profiles3D) | 0 | GetProfile(Profiles3D,0)
|  | 1 | GetProfile(Profiles3D,1)
|  | ... | ...
|  | N-1 | GetProfile(Profiles3D,N-1)

Vision Data Access functions

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

Function | Description
GetNFound(Profiles3D, index) | Returns the number of extracted profiles.
GetProfile(Profiles3D, index) | Returns the extracted profile with the specified index.
GetNPoints(Profile3D) | Returns the number of points in the extracted profile
GetRectangle(Profile3D) | Returns the Rectangle3D structure used as a slicing object for the extracted profile.