CGAL 5.5.4 - Shape Regularization

Models and functions that can be used when regularizing planes.

Functions

template<typename PlaneRange , typename PointRange , typename NamedParameters >
void CGAL::Shape_regularization::Planes::regularize_planes (PlaneRange &planes, const PointRange &points, const NamedParameters &np)
 Hierarchical plane regularization. More...
 

Function Documentation

◆ regularize_planes()

template<typename PlaneRange , typename PointRange , typename NamedParameters >
void CGAL::Shape_regularization::Planes::regularize_planes ( PlaneRange &  planes,
const PointRange &  points,
const NamedParameters &  np 
)

#include <CGAL/Shape_regularization/regularize_planes.h>

Hierarchical plane regularization.

Given a set of detected planes with their corresponding inlier sets, this function enables to reinforce four types of regularities among these planes:

  • Parallelism: planes, which are detected as near parallel, are made exactly parallel.
  • Orthogonality: planes, which are detected as near orthogonal, are made exactly orthogonal.
  • Coplanarity: parallel planes, which are detected as near coplanar, are made exactly coplanar.
  • Axis-Symmetry: planes, which are detected as near symmetrical with respect to a user-specified axis, are made exactly symmetrical.

Planes are directly modified. Points are left unaltered, as well as their relationship to the planes (no transfer of a point from a primitive plane to another).

This function infers a traits class GeomTraits from the PointRange value type.

The implementation follows [2].

Template Parameters
PlaneRangea model of Range whose iterator type is RandomAccessIterator
PointRangea model of ConstRange whose iterator type is RandomAccessIterator
NamedParametersa sequence of Named Parameters
Parameters
planesa range of planes to be regularized
pointsa const range of points assigned to planes, see the plane_index_map below for more details
npa sequence of Named Parameters among the ones listed below:
Optional Named Parameters
  • a property map that associates the index of a point in the points range to the index of a plane in the planes range (-1 if point is not assigned to a plane)
  • Type: a model of ReadablePropertyMap with std::size_t as key type and int as value type
  • Default: There is no default, this parameters is mandatory
  • maximum allowed angle in degrees between plane normals used for parallelism, orthogonality, and axis symmetry
  • Type: GeomTraits::FT
  • Default: 25 degrees
  • maximum allowed orthogonal distance between two parallel planes such that they are considered to be coplanar
  • Type: GeomTraits::FT
  • Default: 0.01 unit length
  • indicates whether parallelism should be regularized or not
  • Type: boolean
  • Default: true
  • indicates whether orthogonality should be regularized or not
  • Type: boolean
  • Default: true
  • indicates whether coplanarity should be regularized or not
  • Type: boolean
  • Default: true
  • indicates whether axis symmetry should be regularized or not
  • Type: boolean
  • Default: true
  • an axis for symmetry regularization
  • Type: GeomTraits::Vector_3
  • Default: Z axis that is GeomTraits::Vector_3(0, 0, 1)
Examples:
Shape_regularization/regularize_planes.cpp.