Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Fitting » FitArcToPath

FitArcToPath
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationBasic |
Approximates path by an arc using the selected outliers suppression method and considering path's start and end.
Syntax
C++
C#
void fil::FitArcToPath ( const fil::Path& inPath, fil::CircleFittingMethod::Type inFittingMethod, ftl::Optional<fil::MEstimator::Type> inOutlierSuppression, ftl::Conditional<fil::Arc2D>& outArc )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inPath | const Path& | Input path | |
![]() |
inFittingMethod | CircleFittingMethod::Type | ||
![]() |
inOutlierSuppression | Optional<MEstimator::Type> | NIL | |
![]() |
outArc | Conditional<Arc2D>& | Fitted arc or nothing if the computations failed to converge |
Examples
![]() |
The resulting outArc drawn with the input path, inFittingMethod = AlgebraicKasa and inOutlierSuppression = Auto.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Outlier suppression is supported only in algebraic fitting methods. |