FitLineToPoints3D_M
Approximates points in 3D with a line using selected M-estimator for outlier suppression.
Applications:Finding a locally optimal line in 3D. Good enough when the number of outliers is small.
Syntax
C++
C#
Python
def FitLineToPoints3D_M( inPoints: list[Point3D], inIterationCount: int, /, *, inOutlierSuppression: MEstimator = MEstimator.Huber, inClippingFactor: float = 2.5, inInitialLine: Line3D | None = None ) -> ( outLine: Line3D, outInliers: list[Point3D] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inPoints | list[Point3D] | |||
![]() |
inOutlierSuppression | MEstimator | MEstimator.Huber | ||
![]() |
inClippingFactor | float | 0.675 - 6.0 | 2.5 | Multitude of standard deviation within which points are considered inliers |
![]() |
inIterationCount | int | 0 - ![]() |
Number of iterations of outlier suppressing algorithm | |
![]() |
inInitialLine | Line3D | None | None | Initial approximation (if available) | |
![]() |
outLine | Line3D | |||
![]() |
outInliers | list[Point3D] | Points matching the computed line |



