PointLess

Fitting: plane / sphere / cylinder

Fits a plane, sphere or cylinder by least squares to the points in the selected area or the whole cloud; reports the shape parameters and residual statistics.

In the app: Processing › Geometry › Fitting (plane / sphere / cylinder)…

What does it do?

The points in scope (one or more clouds, class-filtered) are combined and a single shape is fitted. Plane: normal, slope, slope direction, equation (a·X + b·Y + c·Z + d = 0) and centroid. Sphere: center and radius. Cylinder: axis, radius and length. For the residuals, RMS, mean |residual|, 95% and maximum are given.

Optionally the signed residuals become the Fit residual scalar field (m) and the shape is drawn in the view: for a plane, a rectangle around the points and the normal; for a sphere, three circles; for a cylinder, the two end circles and the axis. At most 3 000 000 points are processed; for more, select a smaller area.

merkezleast squares: residual = distance of the point to the shape
Diagram: Fitting: shape and residuals

How to use it

  1. 1If needed, draw the region containing the shape with Tools → Area selection.
  2. 2Open Processing → Geometry → Fitting (plane / sphere / cylinder)…; choose the clouds, scope and classes.
  3. 3Choose the shape (Plane, Sphere, Cylinder) and click Fit.
  4. 4Take the values in the result window with Copy; Remove the drawing deletes the shape from the view.

Parameters

SettingWhat it doesDefault
PointsClouds used in the fit (check list); their points are combined.Visible clouds
Whole cloud / Selected areaScope; Selected area is disabled when there is no selection.Selected area if there is a selection
Classes to use:Class filter.All classes
ShapePlane, Sphere, Cylinder.Plane
Keep the residuals as a 'Fit residual' scalar fieldThe signed residual (m) is written per point.On
Draw the fitted shape in the viewThe shape lines are added to the 3D view.On

Outputs

  • Shape parameters and residual statistics (Shape fitting — result)
  • Fit residual scalar field (m, signed)
  • Shape drawing in the view

Tips

  • Use a plane for roofs and road cross slope, a cylinder for pipes and poles, a sphere for target spheres.
  • Narrow the scope to the relevant surface only; surrounding points inflate the residual.
  • Color the residual field with the Blue–White–Red scale to see the areas that deviate from the plane.

Related tools