You are here: Start » FIL.NET » Function Reference » Geometry 2D » Geometry 2D Fitting » FIL.FitSegmentToPoints
Approximates points with a segment using selected outliers suppression method.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void FitSegmentToPoints ( IList<FilNet.Point2D> inPoints, FilNet.Range? inRange, FilNet.MEstimator? inOutlierSuppression, out FilNet.Segment2D outSegment )
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. | ||
![]() | inOutlierSuppression | FilNet.MEstimator? | |||
![]() | outSegment | FilNet.Segment2D |
Description
The orientation of the resulting outSegment is always between 0 and 180 degrees.
Examples
![]() |
The resulting outSegment drawn with the input points, inOutlierSuppression = Auto.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty array of points in FitSegmentToPoints. |
DomainError | Range exceeds the input point array in FitSegmentToPoints. |
Function Overrides
- FitSegmentToPoints(IList<Point2D>, Segment2D)
- FitSegmentToPoints(IList<Point2D>, Nullable<Range>, Nullable<MEstimator>, Segment2D, NullableRef<List<Point2D>>)