CGAL 6.1.2 - Polygonal Surface Reconstruction: CGAL::Polygonal_surface_reconstruction< GeomTraits > Class Template Reference

CGAL 6.1.2 - Polygonal Surface Reconstruction

Loading...
Searching...
No Matches
List of all members
CGAL::Polygonal_surface_reconstruction< GeomTraits > Class Template Reference
Reference Manual

`#include <CGAL/Polygonal_surface_reconstruction.h>`

## Definition

template<class GeomTraits>
class CGAL::Polygonal_surface_reconstruction< GeomTraits >

Implementation of the Polygonal Surface Reconstruction method.

Given a set of 3D points with unoriented normals sampled from the outer boundary of a piecewise planar object, the Polygonal Surface Reconstruction method [1] outputs a simplified and watertight surface mesh interpolating the input point set.

The method first generates a set of face candidates by intersecting the planar primitives. Then an optimal subset of the candidate faces is selected through optimization under hard constraints that enforce the final model to be manifold and watertight.

The reconstruction assumes the planar segmentation of the point cloud is provided in the input.

Template Parameters

  GeomTraits | a geometric traits class, model of Kernel

Examples
  Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp, Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp, Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp, and Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp.

## Types
typedef GeomTraits::FT | FT
| number type.
typedef GeomTraits::Point_3 | Point
| point type.
typedef GeomTraits::Vector_3 | Vector
| vector type.
typedef GeomTraits::Plane_3 | Plane
| plane type.

## Operations
template<typename MixedIntegerProgramTraits , typename PolygonMesh >
bool | reconstruct (PolygonMesh &output_mesh, double wt_fitting=0.43, double wt_coverage=0.27, double wt_complexity=0.30)
| Reconstructs a watertight polygonal mesh model.
template<typename PolygonMesh >
void | output_candidate_faces (PolygonMesh &candidate_faces) const
| Gives the user the possibility to access the intermediate candidate faces (i.e., the faces induced by the intersection of the supporting planes).
const std::string & | error_message () const
| Gets the error message (if reconstruction failed).

## Creation
template<typename PointRange , typename PointMap , typename NormalMap , typename IndexMap >
| Polygonal_surface_reconstruction (const PointRange &points, PointMap point_map, NormalMap normal_map, IndexMap index_map)
| Creates a Polygonal Surface Reconstruction object.

## Constructor & Destructor Documentation

## ◆ Polygonal_surface_reconstruction()

template<class GeomTraits >
template<typename PointRange , typename PointMap , typename NormalMap , typename IndexMap >

CGAL::Polygonal_surface_reconstruction< GeomTraits >::Polygonal_surface_reconstruction | ( | const PointRange & | points,
|  | PointMap | point_map,
|  | NormalMap | normal_map,
|  | IndexMap | index_map
| ) |  |

Creates a Polygonal Surface Reconstruction object.

After construction, candidate faces are generated and point/face confidence values are computed, allowing to reuse them in the subsequent reconstruction step with different parameters.

Template Parameters

  PointRange | is the range of input points, model of `ConstRange`.
  PointMap | is a model of `ReadablePropertyMap` with value type `GeomTraits::Point_3`.
  NormalMap | is a model of `ReadablePropertyMap` with value type `GeomTraits::Vector_3`.
  IndexMap | is a model of `ReadablePropertyMap` with value type `int`.

Parameters

  points | range of input points.
  point_map | property map: value_type of `typename PointRange::const_iterator` -> `Point_3`
  normal_map | property map: value_type of `typename PointRange::const_iterator` -> `Vector_3`
  index_map | property map: value_type of `typename PointRange::const_iterator` -> `int`, denoting the index of the plane it belongs to (-1 if the point is not assigned to a plane)

## Member Function Documentation

## ◆ output_candidate_faces()

template<class GeomTraits >
template<typename PolygonMesh >

void CGAL::Polygonal_surface_reconstruction< GeomTraits >::output_candidate_faces | ( | PolygonMesh & | candidate_faces | ) | const

Gives the user the possibility to access the intermediate candidate faces (i.e., the faces induced by the intersection of the supporting planes).

Template Parameters

  PolygonMesh | a model of `MutableFaceGraph`.

## ◆ reconstruct()

template<class GeomTraits >
template<typename MixedIntegerProgramTraits , typename PolygonMesh >

bool CGAL::Polygonal_surface_reconstruction< GeomTraits >::reconstruct | ( | PolygonMesh & | output_mesh,
|  | double | wt_fitting = `0.43`,
|  | double | wt_coverage = `0.27`,
|  | double | wt_complexity = `0.30`
| ) |  |

Reconstructs a watertight polygonal mesh model.

Template Parameters

  MixedIntegerProgramTraits | a model of `MixedIntegerProgramTraits`
  PolygonMesh | a model of `MutableFaceGraph`

Returns
  `true` if the reconstruction succeeded, `false` otherwise.

Parameters

  output_mesh | the final reconstruction result
  wt_fitting | weight for the data fitting term.
  wt_coverage | weight for the point coverage term.
  wt_complexity | weight for the model complexity term.