CGAL 6.0.1 - Polygonal Surface Reconstruction
Loading...
Searching...
No Matches
CGAL::Polygonal_surface_reconstruction< GeomTraits > Class Template Reference

#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
GeomTraitsa 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
PointRangeis the range of input points, model of ConstRange.
PointMapis a model of ReadablePropertyMap with value type GeomTraits::Point_3.
NormalMapis a model of ReadablePropertyMap with value type GeomTraits::Vector_3.
IndexMapis a model of ReadablePropertyMap with value type int.
Parameters
pointsrange of input points.
point_mapproperty map: value_type of typename PointRange::const_iterator -> Point_3
normal_mapproperty map: value_type of typename PointRange::const_iterator -> Vector_3
index_mapproperty 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
PolygonMesha 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
MixedIntegerProgramTraitsa model of MixedIntegerProgramTraits
PolygonMesha model of MutableFaceGraph
Returns
true if the reconstruction succeeded, false otherwise.
Parameters
output_meshthe final reconstruction result
wt_fittingweight for the data fitting term.
wt_coverageweight for the point coverage term.
wt_complexityweight for the model complexity term.