You are here: Start » FIL.NET » Function Reference » Geometry 2D » Geometry 2D Fitting » FIL.FitCircleToPoints
Approximates points with a circle using selected outliers suppression method.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void FitCircleToPoints ( IList<FilNet.Point2D> inPoints, FilNet.Range? inRange, FilNet.CircleFittingMethod inFittingMethod, FilNet.MEstimator? inOutlierSuppression, out FilNet.Circle2D? outCircle, NullableRef<List<FilNet.Point2D>> outInliers )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inPoints | System.Collections.Generic.IList<FilNet.Point2D> | |||
![]() | inRange | FilNet.Range? | Determines which array points take part in fitting process. Default value: ftl::NIL. | ||
![]() | inFittingMethod | FilNet.CircleFittingMethod | |||
![]() | inOutlierSuppression | FilNet.MEstimator? | |||
![]() | outCircle | FilNet.Circle2D? | Fitted circle or nothing if method failed to converge. | ||
![]() | outInliers | FilNet.NullableRef<System.Collections.Generic.List<FilNet.Point2D>> | Points matching the computed circle. Can be null to skip this parameter calculation. |
Description
The operation computes a circle which approximates the input points best. Several methods are available, AlgebraicKasa being the fastest one. It is also the most inaccurate when the input points are sampled along small arc only.
Examples
![]() |
The resulting outCircle drawn with the input points, inFittingMethod = AlgebraicKasa and inOutlierSuppression = Auto.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Outlier suppression is supported only in algebraic fitting methods. |
DomainError | Range exceeds the input point array in FitCircleToPoints. |
Function Overrides
- FitCircleToPoints(IList<Point2D>, CircleFittingMethod, Nullable<Circle2D>)
- FitCircleToPoints(IList<Point2D>, Nullable<Range>, CircleFittingMethod, Nullable<MEstimator>, Nullable<Circle2D>)