Expand description
Plane and cylinder detection in point clouds (#6870): scan-to-BIM groundwork.
voxel: points average into voxels with exact integer sums, so the result does not depend on point order or chunking; the voxel size doubles when the working set exceeds its budget.normals: PCA over the neighbouring voxel means gives each voxel a normal and a curvature.grow: regions grow from the flattest voxels, gated by angle and distance to a plane refitted as the region grows.refit: a median/MAD trim and refit per region; adjacent coplanar regions merge through union-find; regions whose normals turn like a column’s are refused.plane_report: area, in-plane extent, orientation hint and facing side.cylinder: seeded RANSAC over the smoothly connected voxels no plane claimed, a least-squares refit, and refusal of spheres, narrow arcs and short pieces: columns and pipes.ringandprism: rings of vertical planes about a common axis are wide round columns split into strips, or polygonal columns (#6893);columnsruns 6 and 7 and gives a column precedence over the planes it is made of, so a surface is reported once.
Every stage is bounded by the voxel count, which the budget bounds; the
report’s limits says when a budget acted. A clean-room implementation of
the published technique (region growing on voxel means); no third-party
code was consulted.
Structs§
- Plane
Extent - Oriented box of the plane’s inlier voxel means within the plane. For
vertical and sloped planes
v_axispoints up (along the fall line) andu_axisis horizontal; horizontal planes take the minimum-area rectangle.u_axis x v_axis = normal. - Scan
Cylinder - A detected cylinder (column, pipe). The axis runs from
axis_starttoaxis_endover the inliers’ extent. A polygonal column of six or more faces is reported here too, withfacetedset. - Scan
Facets - The faces of a polygonal (prism) column: a regular polygon of
facessides about the cylinder’s axis,radiusbeing its circumradius (axis to corner). - Scan
Plane - Scan
Region - Axis-aligned crop box in the positions’ frame (inclusive).
- Scan
Segmentation Limits - Which bounds acted. A bound that acts is always reported here.
- Scan
Segmentation Options - Scan
Segmentation Report - Scan
Segmentation Stats - Scan
Voxelizer - Streaming entry: add points chunk by chunk (any order, any split) and
segment once. The result is identical to one
segment_scan_pointscall.
Enums§
- Axis
Orientation - Axis direction relative to
options.up_axis, with the plane tolerance. - Normal
Source - Which side the reported normal faces.
- Plane
Orientation - Classification hint relative to
options.up_axis.
Functions§
- segment_
scan_ points - Segment one buffer of xyz f32 positions (metres).