You are here: Start » FIL.NET » Function Reference » Path » Polygon Features » FIL.PolygonCircularity
Computes the area of a polygon divided by the area of a circle having the same feature.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void PolygonCircularity ( FilNet.Path inPolygon, FilNet.CircularityMeasure inCircularityMeasure, out float outCircularity )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inPolygon | FilNet.Path | |||
![]() | inCircularityMeasure | FilNet.CircularityMeasure | RadiusPreserving | Default value: RadiusPreserving. | |
![]() | outCircularity | float |
Description
Circularity is a measure of similarity of a polygon to the perfect circle. Circular polygons have circularity close to 1.0, while the more elongated the shape is (or contains more holes), the closer to 0.0 is its circularity.
Mathematically, the circularity is calculated as follows:
Where c denotes a
circular polygon having the same feature as input polygon s. The feature being considered depends on the inCircularityMeasure chosen and it is:
- the minimal bounding circle in case of BoundingCirclePreserving
- the perimeter in case of PerimeterPreserving
- the radius (maximal distance from mass center to any of the shape points) in case of RadiusPreserving
Note that if the input path is not a valid polygon (i.e. it has at least one self-intersection), the computation may lead to results that are not intuitive.
Examples
![]() Circularity with RadiusPreserving of the sample polygon equals to 0.340. |
![]() Circularity with PerimeterPreserving of the sample polygon equals to 0.998. |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Degenerate polygon on input in PolygonCircularity. |
DomainError | Not supported circularity measure in PolygonCircularity. |
DomainError | Open path on input in PolygonCircularity. |