#include <CGAL/Polygonal_surface_reconstruction.h>
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_complexty_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.
|
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.
|
|
|
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. More...
|
|
|
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. More...
|
|
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). More...
|
|
const std::string & | error_message () const |
| Gets the error message (if reconstruction failed).
|
|
◆ Polygonal_surface_reconstruction()
template<class GeomTraits >
template<typename PointRange , typename PointMap , typename NormalMap , typename IndexMap >
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
-
- 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) |
◆ output_candidate_faces()
template<class GeomTraits >
template<typename PolygonMesh >
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 >
Reconstructs a watertight polygonal mesh model.
- Template Parameters
-
- 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. |