You are here: Start » AVL.NET » Function Reference » Geometry 2D » Geometry 2D Fitting » AVL.FitSegmentToPoints

AVL.FitSegmentToPoints

Approximates points with a segment using selected outliers suppression method.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void FitSegmentToPoints
(
	IList<AvlNet.Point2D> inPoints,
	out AvlNet.Segment2D outSegment
)

Parameters

Name Type Range Default Description
inPointsSystem.Collections.Generic.IList<AvlNet.Point2D>
outSegmentAvlNet.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

See also