PMP misc spring cleaning

This commit is contained in:
Mael Rouxel-Labbé 2022-03-23 18:39:31 +01:00
parent 712f3a66ac
commit d5b51a84ef
48 changed files with 115 additions and 71 deletions

View File

@ -4,8 +4,8 @@
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <fstream>
#include <iostream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

View File

@ -7,7 +7,7 @@
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
#include <iostream>
#include <fstream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point;

View File

@ -9,8 +9,8 @@
#include <boost/property_map/property_map.hpp>
#include <iostream>
#include <fstream>
#include <map>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point;

View File

@ -8,8 +8,9 @@
#include <boost/property_map/property_map.hpp>
#include <iostream>
#include <fstream>
#include <iterator>
#include <map>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point;

View File

@ -5,6 +5,8 @@
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <fstream>
#include <iostream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point;

View File

@ -7,14 +7,13 @@
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <fstream>
#include <iostream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; // default kernel for OpenMesh point type
typedef CGAL::Exact_predicates_exact_constructions_kernel EK; // alternatice kernel we want to use
typedef OpenMesh::PolyMesh_ArrayKernelT< > Mesh;
typedef boost::property_map<Mesh, CGAL::dynamic_vertex_property_t<EK::Point_3> >::type Exact_point_map;
struct Exact_vertex_point_map

View File

@ -4,8 +4,8 @@
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <fstream>
#include <iostream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;

View File

@ -5,8 +5,8 @@
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <fstream>
#include <iostream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Exact_predicates_exact_constructions_kernel EK;

View File

@ -9,6 +9,8 @@
#include <fstream>
#include <iostream>
#include <iterator>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

View File

@ -4,7 +4,8 @@
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <fstream>
#include <iostream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;

View File

@ -4,8 +4,10 @@
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <fstream>
#include <array>
#include <iostream>
#include <string>
#include <tuple>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;

View File

@ -6,8 +6,8 @@
#include <boost/container/flat_map.hpp>
#include <fstream>
#include <iostream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;

View File

@ -7,6 +7,7 @@
#include <fstream>
#include <iostream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Polyhedron_3<K, CGAL::Polyhedron_items_with_id_3> Mesh;

View File

@ -4,8 +4,8 @@
#include <CGAL/Polygon_mesh_processing/detect_features.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <fstream>
#include <iostream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;
@ -43,8 +43,8 @@ int main(int argc, char* argv[])
++nb_sharp_edges;
}
std::cout<<"This mesh contains "<<nb_sharp_edges<<" sharp edges"<<std::endl;
std::cout<<" and "<<number_of_patches<<" surface patches."<<std::endl;
std::cout << "This mesh contains " << nb_sharp_edges << " sharp edges" << std::endl;
std::cout << " and " << number_of_patches << " surface patches." << std::endl;
return 0;
}

View File

@ -8,8 +8,9 @@
#include <boost/property_map/property_map.hpp>
#include <iostream>
#include <fstream>
#include <map>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point;

View File

@ -4,8 +4,10 @@
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
#include <iostream>
#include <fstream>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;

View File

@ -5,8 +5,10 @@
#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <iostream>
#include <fstream>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;

View File

@ -7,10 +7,12 @@
#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
#include <iostream>
#include <fstream>
#include <vector>
#include <cassert>
#include <fstream>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;

View File

@ -8,9 +8,10 @@
#include <boost/lexical_cast.hpp>
#include <iostream>
#include <fstream>
#include <iterator>
#include <string>
#include <tuple>
#include <vector>
#include <set>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point;

View File

@ -6,9 +6,9 @@
#include <boost/iterator/function_output_iterator.hpp>
#include <fstream>
#include <vector>
#include <iostream>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;
@ -57,7 +57,7 @@ int main(int argc, char* argv[])
PMP::isotropic_remeshing(faces(mesh), target_edge_length, mesh,
CGAL::parameters::number_of_iterations(nb_iter)
.protect_constraints(true)); //i.e. protect border, here
.protect_constraints(true)); //i.e. protect border, here
std::cout << "Remeshing done." << std::endl;

View File

@ -7,7 +7,9 @@
#include <boost/iterator/function_output_iterator.hpp>
#include <fstream>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

View File

@ -6,9 +6,9 @@
#include <CGAL/boost/graph/iterator.h>
#include <fstream>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
namespace PMP = CGAL::Polygon_mesh_processing;

View File

@ -9,8 +9,9 @@
#include <CGAL/boost/graph/named_params_helper.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <fstream>
#include <iostream>
#include <iterator>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

View File

@ -8,7 +8,10 @@
#include <CGAL/AABB_tree.h>
#include <CGAL/AABB_traits.h>
#include <fstream>
#include <iostream>
#include <list>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;

View File

@ -6,7 +6,7 @@
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <iostream>
#include <fstream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;

View File

@ -9,9 +9,10 @@
#include <CGAL/IO/polygon_soup_io.h>
#include <vector>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Polyhedron_3<K, CGAL::Polyhedron_items_with_id_3> Polyhedron;

View File

@ -12,8 +12,9 @@
#include <algorithm>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point_3;

View File

@ -5,9 +5,10 @@
#include <CGAL/point_generators_3.h>
#include <CGAL/Side_of_triangle_mesh.h>
#include <vector>
#include <fstream>
#include <iostream>
#include <limits>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point;

View File

@ -7,9 +7,10 @@
#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
#include <vector>
#include <fstream>
#include <iostream>
#include <limits>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

View File

@ -2,6 +2,7 @@
#include <CGAL/Polyhedral_envelope.h>
#include <CGAL/Surface_mesh.h>
#include <iostream>
#include <fstream>
int main(int argc, char* argv[])

View File

@ -3,6 +3,8 @@
#include <CGAL/Polygon_mesh_processing/remesh.h>
#include <CGAL/Surface_mesh.h>
#include <algorithm>
#include <iostream>
#include <fstream>
namespace PMP = CGAL::Polygon_mesh_processing;

View File

@ -2,8 +2,9 @@
#include <CGAL/Polyhedral_envelope.h>
#include <CGAL/IO/OFF.h>
#include <vector>
#include <iostream>
#include <fstream>
#include <vector>
int main(int argc, char* argv[])
{

View File

@ -5,7 +5,7 @@
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <iostream>
#include <fstream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point;

View File

@ -5,8 +5,11 @@
#include <CGAL/Polygon_mesh_processing/fair.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <fstream>
#include <iostream>
#include <iterator>
#include <map>
#include <utility>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;

View File

@ -8,7 +8,9 @@
#include <CGAL/tags.h>
#include <iostream>
#include <fstream>
#include <iterator>
#include <string>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;

View File

@ -5,7 +5,8 @@
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <iostream>
#include <fstream>
#include <set>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;

View File

@ -6,7 +6,7 @@
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <iostream>
#include <fstream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Polyhedron_3<K> Polyhedron;

View File

@ -7,7 +7,7 @@
#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
#include <iostream>
#include <fstream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

View File

@ -6,8 +6,9 @@
#include <CGAL/iterator.h>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <vector>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point;

View File

@ -6,8 +6,8 @@
#include <CGAL/boost/graph/helpers.h>
#include <fstream>
#include <iostream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point;

View File

@ -6,7 +6,7 @@
#include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
#include <fstream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point;

View File

@ -4,17 +4,18 @@
#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
#include <CGAL/boost/graph/copy_face_graph.h>
#include <unordered_map>
#include <iostream>
#include <fstream>
#include <map>
#include <string>
#include <unordered_map>
#include <utility>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point;
typedef CGAL::Surface_mesh<Point> Surface_mesh;
typedef boost::graph_traits<Surface_mesh>::face_descriptor face_descriptor;
class Insert_iterator
{
typedef std::unordered_map<face_descriptor,face_descriptor> Container;

View File

@ -9,6 +9,7 @@
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef CGAL::Surface_mesh<Kernel::Point_3> Surface_mesh;

View File

@ -50,6 +50,9 @@ namespace IO {
*
* The format is detected from the filename extension (letter case is not important).
*
* If repairing and orientation are known to not be required, one can use
* \link PkgBGLIOFct `CGAL::IO::read_polygon_mesh()` \endlink directly.
*
* \tparam PolygonMesh a model of `MutableFaceGraph`
* \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
*

View File

@ -476,7 +476,9 @@ std::size_t keep_largest_connected_components(PolygonMesh& pmesh,
* of faces it contains), but it is also possible to pass custom sizes, such as the area of the face.
*
* \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
* \tparam ThresholdValueType the type of the threshold value
* \tparam ThresholdValueType the type of the threshold value. If a face size property map is passed
* by the user, `ThresholdValueType` must be the same type as the value type of the property map.
* Otherwise, `ThresholdValueType` must be `std::size_t`.
* \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
*
* \param pmesh the polygon mesh
@ -527,9 +529,6 @@ std::size_t keep_largest_connected_components(PolygonMesh& pmesh,
* \cgalParamNEnd
* \cgalNamedParamsEnd
*
* \pre If a face size property map is passed by the user, `ThresholdValueType` must be the same
* type as the value type of the property map. Otherwise, `ThresholdValueType` must be `std::size_t`.
*
* \return the number of connected components removed (ignoring isolated vertices).
*
* \see `keep_largest_connected_components()`

View File

@ -2560,10 +2560,11 @@ double bounded_error_symmetric_Hausdorff_distance(const TriangleMesh1& tm1,
/**
* \ingroup PMP_distance_grp
* returns `true` if the Hausdorff distance between two meshes is larger than
* the user-defined max distance, otherwise it returns `false`. The distance used
* to compute the proximity of the meshes is the bounded-error Hausdorff distance.
*
* \brief returns `true` if the Hausdorff distance between two meshes is larger than
* the user-defined max distance, otherwise it returns `false`.
*
* The distance used to compute the proximity of the meshes is the bounded-error Hausdorff distance.
* Instead of computing the full distance and checking it against the user-provided
* value, this function returns early if certain criteria show that the meshes
* do not satisfy the provided `distance_bound`.
@ -2577,8 +2578,6 @@ double bounded_error_symmetric_Hausdorff_distance(const TriangleMesh1& tm1,
* \cgalParamNEnd
* \cgalNamedParamsEnd
*
* @return Boolean `true` or `false`
*
* @see `CGAL::Polygon_mesh_processing::bounded_error_Hausdorff_distance()`
*/
template< class Concurrency_tag,

View File

@ -90,8 +90,8 @@ inline void rearrange_face_ids(boost::container::small_vector<std::size_t, 4>& i
* or the geometric traits class deduced from the point property map of `pmesh`.
*
* \warning This function involves a square root computation.
* If `FT` does not have a `sqrt()` operation, the square root computation
* will be done approximately.
* If `FT` does not support the `sqrt()` operation, the square root computation
* will be performed approximately.
*
* @sa `squared_edge_length()`
* @sa `face_border_length()`
@ -245,8 +245,8 @@ squared_edge_length(typename boost::graph_traits<PolygonMesh>::edge_descriptor e
* from the point property map of `pmesh`.
*
* \warning This function involves a square root computation.
* If `Kernel::FT` does not have a `sqrt()` operation, the square root computation
* will be done approximately.
* If `Kernel::FT` does not support the `sqrt()` operation, the square root computation
* will be performed approximately.
*
* @sa `edge_length()`
*/
@ -309,6 +309,10 @@ face_border_length(typename boost::graph_traits<PolygonMesh>::halfedge_descripto
* \ref bgl_namedparameters "Named Parameters" if provided,
* or the geometric traits class deduced from the point property map of `pmesh`
*
* @warning This function involves a square root computation.
* If `Kernel::FT` does not support the `sqrt()` operation, the square root computation
* will be performed approximately.
*
* @see `face_border_length()`
*/
template<typename PolygonMesh,
@ -389,8 +393,8 @@ longest_border(const PolygonMesh& pmesh,
* from the point property map of `tmesh`.
*
* \warning This function involves a square root computation.
* If `Kernel::FT` does not have a `sqrt()` operation, the square root computation
* will be done approximately.
* If `Kernel::FT` does not support the `sqrt()` operation, the square root computation
* will be performed approximately.
*
* @sa `squared_face_area()`
* @sa `area()`
@ -536,8 +540,8 @@ squared_face_area(typename boost::graph_traits<TriangleMesh>::face_descriptor f,
* or the geometric traits class deduced from the point property map of `tmesh`.
*
* \warning This function involves a square root computation.
* If `Kernel::FT` does not have a `sqrt()` operation, the square root computation
* will be done approximately.
* If `Kernel::FT` does not support the `sqrt()` operation, the square root computation
* will be performed approximately.
*
* @sa `face_area()`
*/
@ -597,8 +601,8 @@ area(FaceRange face_range,
* or the geometric traits class deduced from the point property map of `tmesh`.
*
* \warning This function involves a square root computation.
* If `Kernel::FT` does not have a `sqrt()` operation, the square root computation
* will be done approximately.
* If `Kernel::FT` does not support the `sqrt()` operation, the square root computation
* will be performed approximately.
*
* @sa `face_area()`
*/
@ -723,8 +727,8 @@ volume(const TriangleMesh& tmesh,
* or the geometric traits class deduced from the point property map of `tmesh`.
*
* \warning This function involves a square root computation.
* If `Kernel::FT` does not have a `sqrt()` operation, the square root computation
* will be done approximately.
* If `Kernel::FT` does not support the `sqrt()` operation, the square root computation
* will be performed approximately.
*/
template<typename TriangleMesh,
typename CGAL_NP_TEMPLATE_PARAMETERS>

View File

@ -33,7 +33,7 @@ namespace Polygon_mesh_processing {
///
/// \brief removes the isolated vertices from any polygon mesh.
///
/// A vertex is considered isolated if it is not incident to any simplex of higher dimension.
/// A vertex is considered isolated if it is not incident to a simplex of higher dimension.
///
/// @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
///