CGAL 6.2 - Shape Regularization

Loading...
Searching...
No Matches
Functions
Planes
Reference Manual

##

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.

## 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

  PlaneRange | a model of `Range` whose iterator type is `RandomAccessIterator`
  PointRange | a model of `ConstRange` whose iterator type is `RandomAccessIterator`
  NamedParameters | a sequence of Named Parameters

Parameters

  planes | a range of planes to be regularized
  points | a const range of points assigned to planes, see the `plane_index_map` below for more details
  np | a sequence of Named Parameters among the ones listed below:

Optional Named Parameters

  a property map that maps a plane from `planes` range to `CGAL::Plane_3<GeomTraits>` Type: a model of `WritablePropertyMap` with the value type `CGAL::Plane_3<GeomTraits>` Default: `PlaneMap()` |
  a property map that maps a point from `points` range to `CGAL::Point_3<GeomTraits>` Type: a model of `ReadablePropertyMap` with the value type `CGAL::Point_3<GeomTraits>` Default: `PointMap()` |
  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.