Measure Cylinder
Description
This Step is used to fit a cylinder from the surface data and calculate the cylinder’s radius, center point, tilt angle, etc.

Workflow
The process of configuring this Step is shown below:

-
Configure the input. Connect the Step ports in the graphical programming workspace or select the input under Input in the parameter configuration panel.
-
Determine whether to use a feature region.
-
Set the radius range of the cylinder.
-
Set other parameters.
-
Select the desired output items under Output. For an expandable output item, click ▶ and configure the Min and Max values to determine the acceptable range for the item.
Parameters
Parameter | Description | ||
---|---|---|---|
Use Feature Region |
When unselected, the Step processes all of the surface data to fit the cylinder. Otherwise, the Step only processes the surface data defined by the feature region(s). In this case, set the following parameters:
|
||
Max Radius |
The radius of the fitted cylinder must not exceed this value. |
||
Min Radius |
The radius of the fitted cylinder must not be less than this value. |
||
Distance Tolerance |
A point is considered an inlier if its distance to the surface of the fitted cylinder is within the tolerance. |
||
Percentage of Inliers for Fitting |
Specifies the proportion of inliers used for optimal cylinder fitting. |
||
Fitting Accuracy |
Determines how accurate the fitted cylinder is. Typically, higher accuracy requires more iterations and increases computational cost.
|
||
Max Iterations |
The maximum number of attempts the algorithm will make to fit an optimal cylinder. Iteration stops once this limit is reached. |
Output Description
Select the output item(s) to add the output port(s) to the Step, and the corresponding data will be output after the Step is run. You can select the output according to the actual measurement requirements.
If you select an expandable output item, you should expand it by clicking ▶, and then set the Min and Max values to determine the acceptable range. If the output value falls within the acceptable range, the measurement item is judged as passing (OK), or else it is judged as failing (NG). |
Output item | Description |
---|---|
Radius |
The radius of the fitted cylinder. |
Center X/Y/Z |
The location of the fitted cylinder’s center. |
Axis–Z Angle |
The angle between the axis of the fitted cylinder and the positive Z-axis. |
Axis–X Angle |
The angle between the axis of the fitted cylinder and the positive X-axis. |
X/Y/Z-Component of Axis Vector |
The x-, y-, and z-components of the axis vector of the fitted cylinder, respectively. |
Troubleshooting
|
CV-W3801
Error: Unable to fit a cylinder within the specified radius range.
Possible causes:
-
The set radius range is invalid.
-
No cylinder surface exists within set radius range in the cylinder fitting region.
Solutions:
-
Make sure the set radius range is valid.
-
Make sure there are cylinder surface within the set radius range in the cylinder fitting region.
CV-W3802
Error: The “Min/Max Radius” value must exceed 0, and the “Min Radius” must not exceed the “Max Radius.” Please check and try again.
Solution: Make sure the maximum/minimum radius values exceed 0, and the “Min Radius” does not exceed the “Max Radius.”
CV-W3803
Error: The “Distance Tolerance” value must be greater than or equal to 0. Please enter a valid value.
Solution: Make sure the parameter value is not less than 0.
CV-W3804
Error: The “Percentage of Inliers for Fitting” value must be a percentage between 0% and 100%. Please enter a valid value.
Solution: Make sure the parameter value is within 0–100%.