mirror of https://github.com/CGAL/cgal
replace overloads with default parameters (PMP)
This commit is contained in:
parent
e2a24f8ca3
commit
9714557046
|
|
@ -149,7 +149,7 @@ struct Face_filtered_graph
|
||||||
*/
|
*/
|
||||||
template <class CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <class CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
Face_filtered_graph(const Graph& graph,
|
Face_filtered_graph(const Graph& graph,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
: _graph(const_cast<Graph&>(graph))
|
: _graph(const_cast<Graph&>(graph))
|
||||||
, fimap(CGAL::get_initialized_face_index_map(graph, np))
|
, fimap(CGAL::get_initialized_face_index_map(graph, np))
|
||||||
, vimap(CGAL::get_initialized_vertex_index_map(graph, np))
|
, vimap(CGAL::get_initialized_vertex_index_map(graph, np))
|
||||||
|
|
@ -159,10 +159,6 @@ struct Face_filtered_graph
|
||||||
, selected_halfedges(num_halfedges(graph), 0)
|
, selected_halfedges(num_halfedges(graph), 0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Face_filtered_graph(const Graph& graph)
|
|
||||||
:Face_filtered_graph(graph, parameters::all_default())
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Constructor where the set of selected faces is specified as a range of patch ids.
|
* \brief Constructor where the set of selected faces is specified as a range of patch ids.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -87,23 +87,15 @@ bool write_INP(const std::string& fname,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||||
template <typename FaceGraph, typename NamedParameters>
|
template <typename FaceGraph, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
CGAL_DEPRECATED bool write_inp(std::ostream& os,
|
CGAL_DEPRECATED bool write_inp(std::ostream& os,
|
||||||
const FaceGraph& g,
|
const FaceGraph& g,
|
||||||
std::string name,
|
std::string name,
|
||||||
std::string type,
|
std::string type,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
return write_INP(os, name, type, g, np);
|
return write_INP(os, name, type, g, np);
|
||||||
}
|
}
|
||||||
template <typename FaceGraph>
|
|
||||||
CGAL_DEPRECATED bool write_inp(std::ostream& os,
|
|
||||||
const FaceGraph& g,
|
|
||||||
std::string name,
|
|
||||||
std::string type)
|
|
||||||
{
|
|
||||||
return write_INP(os, name, type, g, parameters::all_default());
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
/// \endcond
|
/// \endcond
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ public:
|
||||||
template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool read_PLY_BGL(std::istream& is,
|
bool read_PLY_BGL(std::istream& is,
|
||||||
Graph& g,
|
Graph& g,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename CGAL::GetVertexPointMap<Graph, CGAL_BGL_NP_CLASS>::type VPM;
|
typedef typename CGAL::GetVertexPointMap<Graph, CGAL_BGL_NP_CLASS>::type VPM;
|
||||||
typedef typename boost::property_traits<VPM>::value_type Point;
|
typedef typename boost::property_traits<VPM>::value_type Point;
|
||||||
|
|
@ -134,7 +134,7 @@ template <typename Graph,
|
||||||
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool read_PLY(std::istream& is,
|
bool read_PLY(std::istream& is,
|
||||||
Graph& g,
|
Graph& g,
|
||||||
const CGAL_BGL_NP_CLASS& np
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
|
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -143,17 +143,6 @@ bool read_PLY(std::istream& is,
|
||||||
return internal::read_PLY_BGL(is, g, np);
|
return internal::read_PLY_BGL(is, g, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
|
|
||||||
template <typename Graph>
|
|
||||||
bool read_PLY(std::istream& is, Graph& g,
|
|
||||||
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
|
|
||||||
{
|
|
||||||
return internal::read_PLY_BGL(is, g, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgBGLIoFuncsPLY
|
\ingroup PkgBGLIoFuncsPLY
|
||||||
|
|
||||||
|
|
@ -220,7 +209,7 @@ template <typename Graph,
|
||||||
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool read_PLY(const std::string& fname,
|
bool read_PLY(const std::string& fname,
|
||||||
Graph& g,
|
Graph& g,
|
||||||
const CGAL_BGL_NP_CLASS& np
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
|
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -241,17 +230,6 @@ bool read_PLY(const std::string& fname,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
|
|
||||||
template <typename Graph>
|
|
||||||
bool read_PLY(const std::string& fname, Graph& g,
|
|
||||||
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
|
|
||||||
{
|
|
||||||
return read_PLY(fname, g, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Write
|
// Write
|
||||||
|
|
@ -318,7 +296,7 @@ template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool write_PLY(std::ostream& os,
|
bool write_PLY(std::ostream& os,
|
||||||
const Graph& g,
|
const Graph& g,
|
||||||
const std::string& comments,
|
const std::string& comments,
|
||||||
const CGAL_BGL_NP_CLASS& np
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
|
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -441,27 +419,13 @@ bool write_PLY(std::ostream& os,
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
|
|
||||||
template <typename Graph>
|
|
||||||
bool write_PLY(std::ostream& os, const Graph& g, const std::string& comments,
|
|
||||||
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
|
|
||||||
{
|
|
||||||
return write_PLY(os, g, comments, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool write_PLY(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np,
|
bool write_PLY(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values(),
|
||||||
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
|
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
|
||||||
{
|
{
|
||||||
return write_PLY(os, g, std::string(), np);
|
return write_PLY(os, g, std::string(), np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Graph>
|
|
||||||
bool write_PLY(std::ostream& os, const Graph& g,
|
|
||||||
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
|
|
||||||
{
|
|
||||||
return write_PLY(os, g, std::string(), parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \endcond
|
/// \endcond
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -528,7 +492,7 @@ template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool write_PLY(const std::string& fname,
|
bool write_PLY(const std::string& fname,
|
||||||
const Graph& g,
|
const Graph& g,
|
||||||
const std::string& comments,
|
const std::string& comments,
|
||||||
const CGAL_BGL_NP_CLASS& np
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
|
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -552,27 +516,13 @@ bool write_PLY(const std::string& fname,
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
|
|
||||||
template <typename Graph>
|
|
||||||
bool write_PLY(const std::string& fname, const Graph& g, const std::string comments,
|
|
||||||
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
|
|
||||||
{
|
|
||||||
return write_PLY(fname, g, comments, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool write_PLY(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np,
|
bool write_PLY(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values(),
|
||||||
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
|
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
|
||||||
{
|
{
|
||||||
return write_PLY(fname, g, std::string(), np);
|
return write_PLY(fname, g, std::string(), np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Graph>
|
|
||||||
bool write_PLY(const std::string& fname, const Graph& g,
|
|
||||||
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
|
|
||||||
{
|
|
||||||
return write_PLY(fname, g, std::string(), parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \endcond
|
/// \endcond
|
||||||
|
|
||||||
} } // namespace CGAL::IO
|
} } // namespace CGAL::IO
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ bool read_STL(const std::string& fname,
|
||||||
template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool write_STL(std::ostream& os,
|
bool write_STL(std::ostream& os,
|
||||||
const Graph& g,
|
const Graph& g,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
|
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
|
||||||
typedef typename boost::graph_traits<Graph>::face_descriptor face_descriptor;
|
typedef typename boost::graph_traits<Graph>::face_descriptor face_descriptor;
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,10 @@
|
||||||
#define CGAL_BGL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT NP_T, typename NP_Tag, typename NP_Base
|
#define CGAL_BGL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT NP_T, typename NP_Tag, typename NP_Base
|
||||||
#define CGAL_BGL_NP_CLASS CGAL::Named_function_parameters<NP_T,NP_Tag,NP_Base>
|
#define CGAL_BGL_NP_CLASS CGAL::Named_function_parameters<NP_T,NP_Tag,NP_Base>
|
||||||
|
|
||||||
|
#define CGAL_BGL_NP_TEMPLATE_PARAMETERS_1 NP_T1=bool, typename NP_Tag1=CGAL::internal_np::all_default_t, typename NP_Base1=CGAL::internal_np::No_property
|
||||||
|
#define CGAL_BGL_NP_CLASS_1 CGAL::Named_function_parameters<NP_T1,NP_Tag1,NP_Base1>
|
||||||
|
#define CGAL_BGL_NP_TEMPLATE_PARAMETERS_2 NP_T2=bool, typename NP_Tag2=CGAL::internal_np::all_default_t, typename NP_Base2=CGAL::internal_np::No_property
|
||||||
|
#define CGAL_BGL_NP_CLASS_2 CGAL::Named_function_parameters<NP_T2,NP_Tag2,NP_Base2>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
namespace internal_np{
|
namespace internal_np{
|
||||||
|
|
|
||||||
|
|
@ -271,7 +271,7 @@ get_initialized_index_map(CGAL::internal_np::Param_not_found,
|
||||||
|
|
||||||
template <typename PropertyTag, typename Tag, typename DynamicTag,
|
template <typename PropertyTag, typename Tag, typename DynamicTag,
|
||||||
typename Graph,
|
typename Graph,
|
||||||
typename NamedParameters = Named_function_parameters<bool, internal_np::all_default_t> >
|
typename NamedParameters = parameters::Default_named_parameters >
|
||||||
class GetInitializedIndexMap
|
class GetInitializedIndexMap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -2175,6 +2175,10 @@ INCLUDE_FILE_PATTERNS =
|
||||||
PREDEFINED = DOXYGEN_RUNNING \
|
PREDEFINED = DOXYGEN_RUNNING \
|
||||||
"CGAL_BGL_NP_TEMPLATE_PARAMETERS=NamedParameters" \
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS=NamedParameters" \
|
||||||
"CGAL_BGL_NP_CLASS=NamedParameters" \
|
"CGAL_BGL_NP_CLASS=NamedParameters" \
|
||||||
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS_1=NamedParameters1" \
|
||||||
|
"CGAL_BGL_NP_CLASS_1=NamedParameters1" \
|
||||||
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS_2=NamedParameters2" \
|
||||||
|
"CGAL_BGL_NP_CLASS_2=NamedParameters2" \
|
||||||
CGAL_DEPRECATED
|
CGAL_DEPRECATED
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||||
|
|
|
||||||
|
|
@ -2163,6 +2163,10 @@ INCLUDE_FILE_PATTERNS =
|
||||||
PREDEFINED = DOXYGEN_RUNNING \
|
PREDEFINED = DOXYGEN_RUNNING \
|
||||||
"CGAL_BGL_NP_TEMPLATE_PARAMETERS=NamedParameters" \
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS=NamedParameters" \
|
||||||
"CGAL_BGL_NP_CLASS=NamedParameters" \
|
"CGAL_BGL_NP_CLASS=NamedParameters" \
|
||||||
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS_1=NamedParameters1" \
|
||||||
|
"CGAL_BGL_NP_CLASS_1=NamedParameters1" \
|
||||||
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS_2=NamedParameters2" \
|
||||||
|
"CGAL_BGL_NP_CLASS_2=NamedParameters2" \
|
||||||
CGAL_DEPRECATED
|
CGAL_DEPRECATED
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||||
|
|
|
||||||
|
|
@ -2246,6 +2246,10 @@ INCLUDE_FILE_PATTERNS =
|
||||||
PREDEFINED = DOXYGEN_RUNNING \
|
PREDEFINED = DOXYGEN_RUNNING \
|
||||||
"CGAL_BGL_NP_TEMPLATE_PARAMETERS=NamedParameters" \
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS=NamedParameters" \
|
||||||
"CGAL_BGL_NP_CLASS=NamedParameters" \
|
"CGAL_BGL_NP_CLASS=NamedParameters" \
|
||||||
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS_1=NamedParameters1" \
|
||||||
|
"CGAL_BGL_NP_CLASS_1=NamedParameters1" \
|
||||||
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS_2=NamedParameters2" \
|
||||||
|
"CGAL_BGL_NP_CLASS_2=NamedParameters2" \
|
||||||
CGAL_DEPRECATED
|
CGAL_DEPRECATED
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||||
|
|
|
||||||
|
|
@ -1763,6 +1763,10 @@ INCLUDE_FILE_PATTERNS =
|
||||||
PREDEFINED = DOXYGEN_RUNNING \
|
PREDEFINED = DOXYGEN_RUNNING \
|
||||||
"CGAL_BGL_NP_TEMPLATE_PARAMETERS=NamedParameters" \
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS=NamedParameters" \
|
||||||
"CGAL_BGL_NP_CLASS=NamedParameters" \
|
"CGAL_BGL_NP_CLASS=NamedParameters" \
|
||||||
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS_1=NamedParameters1" \
|
||||||
|
"CGAL_BGL_NP_CLASS_1=NamedParameters1" \
|
||||||
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS_2=NamedParameters2" \
|
||||||
|
"CGAL_BGL_NP_CLASS_2=NamedParameters2" \
|
||||||
CGAL_DEPRECATED
|
CGAL_DEPRECATED
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
||||||
|
|
|
||||||
|
|
@ -2246,6 +2246,10 @@ INCLUDE_FILE_PATTERNS =
|
||||||
PREDEFINED = DOXYGEN_RUNNING \
|
PREDEFINED = DOXYGEN_RUNNING \
|
||||||
"CGAL_BGL_NP_TEMPLATE_PARAMETERS=NamedParameters" \
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS=NamedParameters" \
|
||||||
"CGAL_BGL_NP_CLASS=NamedParameters" \
|
"CGAL_BGL_NP_CLASS=NamedParameters" \
|
||||||
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS_1=NamedParameters1" \
|
||||||
|
"CGAL_BGL_NP_CLASS_1=NamedParameters1" \
|
||||||
|
"CGAL_BGL_NP_TEMPLATE_PARAMETERS_2=NamedParameters2" \
|
||||||
|
"CGAL_BGL_NP_CLASS_2=NamedParameters2" \
|
||||||
CGAL_DEPRECATED
|
CGAL_DEPRECATED
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,10 +84,10 @@ namespace IO {
|
||||||
*
|
*
|
||||||
* \sa \link PkgBGLIOFct `CGAL::IO::write_polygon_mesh()` \endlink
|
* \sa \link PkgBGLIOFct `CGAL::IO::write_polygon_mesh()` \endlink
|
||||||
*/
|
*/
|
||||||
template <typename PolygonMesh, typename NamedParameters>
|
template <typename PolygonMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool read_polygon_mesh(const std::string& fname,
|
bool read_polygon_mesh(const std::string& fname,
|
||||||
PolygonMesh& g,
|
PolygonMesh& g,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
namespace PMP = CGAL::Polygon_mesh_processing;
|
namespace PMP = CGAL::Polygon_mesh_processing;
|
||||||
|
|
||||||
|
|
@ -125,21 +125,11 @@ bool read_polygon_mesh(const std::string& fname,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PMP::polygon_soup_to_polygon_mesh(points, faces, g, parameters::all_default(), np);
|
PMP::polygon_soup_to_polygon_mesh(points, faces, g, parameters::use_default_values(), np);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
|
|
||||||
template <typename PolygonMesh>
|
|
||||||
bool read_polygon_mesh(const std::string& fname, PolygonMesh& g)
|
|
||||||
{
|
|
||||||
return CGAL::Polygon_mesh_processing::IO::read_polygon_mesh(fname, g, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
} // namespace IO
|
} // namespace IO
|
||||||
} // namespace Polygon_mesh_processing
|
} // namespace Polygon_mesh_processing
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -717,7 +717,7 @@ bool clip(TriangleMesh& tm,
|
||||||
bbox=CGAL::Bbox_3(bbox.xmin()-xd, bbox.ymin()-yd, bbox.zmin()-zd,
|
bbox=CGAL::Bbox_3(bbox.xmin()-xd, bbox.ymin()-yd, bbox.zmin()-zd,
|
||||||
bbox.xmax()+xd, bbox.ymax()+yd, bbox.zmax()+zd);
|
bbox.xmax()+xd, bbox.ymax()+yd, bbox.zmax()+zd);
|
||||||
TriangleMesh clipper;
|
TriangleMesh clipper;
|
||||||
Oriented_side os = internal::clip_to_bbox(plane, bbox, clipper, parameters::all_default());
|
Oriented_side os = internal::clip_to_bbox(plane, bbox, clipper, parameters::use_default_values());
|
||||||
switch(os)
|
switch(os)
|
||||||
{
|
{
|
||||||
case ON_NEGATIVE_SIDE:
|
case ON_NEGATIVE_SIDE:
|
||||||
|
|
|
||||||
|
|
@ -300,7 +300,7 @@ namespace internal {
|
||||||
template <typename PolygonMesh,
|
template <typename PolygonMesh,
|
||||||
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
std::size_t number_of_connected_components(const PolygonMesh& pmesh,
|
std::size_t number_of_connected_components(const PolygonMesh& pmesh,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<PolygonMesh>::faces_size_type faces_size_type;
|
typedef typename boost::graph_traits<PolygonMesh>::faces_size_type faces_size_type;
|
||||||
typedef CGAL::dynamic_face_property_t<faces_size_type> Face_property_tag;
|
typedef CGAL::dynamic_face_property_t<faces_size_type> Face_property_tag;
|
||||||
|
|
@ -311,12 +311,6 @@ std::size_t number_of_connected_components(const PolygonMesh& pmesh,
|
||||||
return CGAL::Polygon_mesh_processing::connected_components(pmesh, patch_ids_map, np);
|
return CGAL::Polygon_mesh_processing::connected_components(pmesh, patch_ids_map, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename PolygonMesh>
|
|
||||||
std::size_t number_of_connected_components(const PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
return internal::number_of_connected_components(pmesh, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
|
|
@ -175,23 +175,24 @@ enum Boolean_operation_type {UNION = 0, INTERSECTION=1,
|
||||||
* will only be corefined.
|
* will only be corefined.
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh,
|
template <class TriangleMesh,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2,
|
class NamedParameters2 = parameters::Default_named_parameters,
|
||||||
class NamedParametersOut0,
|
class NamedParametersOut0 = parameters::Default_named_parameters,
|
||||||
class NamedParametersOut1,
|
class NamedParametersOut1 = parameters::Default_named_parameters,
|
||||||
class NamedParametersOut2,
|
class NamedParametersOut2 = parameters::Default_named_parameters,
|
||||||
class NamedParametersOut3>
|
class NamedParametersOut3 = parameters::Default_named_parameters>
|
||||||
std::array<bool,4>
|
std::array<bool,4>
|
||||||
corefine_and_compute_boolean_operations(
|
corefine_and_compute_boolean_operations(
|
||||||
TriangleMesh& tm1,
|
TriangleMesh& tm1,
|
||||||
TriangleMesh& tm2,
|
TriangleMesh& tm2,
|
||||||
const std::array< boost::optional<TriangleMesh*>,4>& output,
|
const std::array< boost::optional<TriangleMesh*>,4>& output,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2,
|
const NamedParameters2& np2 = parameters::use_default_values(),
|
||||||
const std::tuple<NamedParametersOut0,
|
const std::tuple<NamedParametersOut0,
|
||||||
NamedParametersOut1,
|
NamedParametersOut1,
|
||||||
NamedParametersOut2,
|
NamedParametersOut2,
|
||||||
NamedParametersOut3>& nps_out)
|
NamedParametersOut3>& nps_out
|
||||||
|
= std::tuple<NamedParametersOut0,NamedParametersOut1,NamedParametersOut2,NamedParametersOut3>())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -412,51 +413,6 @@ corefine_and_compute_boolean_operations(
|
||||||
ob.tm2_minus_tm1_is_valid());
|
ob.tm2_minus_tm1_is_valid());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class TriangleMesh>
|
|
||||||
std::array<bool,4>
|
|
||||||
corefine_and_compute_boolean_operations(
|
|
||||||
TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
const std::array< boost::optional<TriangleMesh*>,4>& output)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_boolean_operations(tm1, tm2, output,
|
|
||||||
all_default(), all_default(),
|
|
||||||
std::make_tuple(all_default(), all_default(),
|
|
||||||
all_default(), all_default()));
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh, class NamedParameters1>
|
|
||||||
std::array<bool,4>
|
|
||||||
corefine_and_compute_boolean_operations(
|
|
||||||
TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
const std::array< boost::optional<TriangleMesh*>,4>& output,
|
|
||||||
const NamedParameters1& np1)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_boolean_operations(tm1, tm2, output,
|
|
||||||
np1, all_default(),
|
|
||||||
std::make_tuple(all_default(), all_default(),
|
|
||||||
all_default(), all_default()));
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh, class NamedParameters1, class NamedParameters2>
|
|
||||||
std::array<bool,4>
|
|
||||||
corefine_and_compute_boolean_operations(
|
|
||||||
TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
const std::array< boost::optional<TriangleMesh*>,4>& output,
|
|
||||||
const NamedParameters1& np1,
|
|
||||||
const NamedParameters2& np2)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_boolean_operations(tm1, tm2, output,
|
|
||||||
np1, np2,
|
|
||||||
std::make_tuple(all_default(), all_default(),
|
|
||||||
all_default(), all_default()));
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef CGAL_COREF_SET_OUTPUT_VERTEX_POINT_MAP
|
#undef CGAL_COREF_SET_OUTPUT_VERTEX_POINT_MAP
|
||||||
#undef CGAL_COREF_SET_OUTPUT_EDGE_MARK_MAP
|
#undef CGAL_COREF_SET_OUTPUT_EDGE_MARK_MAP
|
||||||
|
|
||||||
|
|
@ -554,16 +510,16 @@ corefine_and_compute_boolean_operations(
|
||||||
* If `false` is returned and if `tm_out` is one of the input surface meshes,
|
* If `false` is returned and if `tm_out` is one of the input surface meshes,
|
||||||
* then `tm_out` is only corefined. */
|
* then `tm_out` is only corefined. */
|
||||||
template <class TriangleMesh,
|
template <class TriangleMesh,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2,
|
class NamedParameters2 = parameters::Default_named_parameters,
|
||||||
class NamedParametersOut>
|
class NamedParametersOut = parameters::Default_named_parameters>
|
||||||
bool
|
bool
|
||||||
corefine_and_compute_union( TriangleMesh& tm1,
|
corefine_and_compute_union( TriangleMesh& tm1,
|
||||||
TriangleMesh& tm2,
|
TriangleMesh& tm2,
|
||||||
TriangleMesh& tm_out,
|
TriangleMesh& tm_out,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2,
|
const NamedParameters2& np2 = parameters::use_default_values(),
|
||||||
const NamedParametersOut& np_out)
|
const NamedParametersOut& np_out = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
using namespace CGAL::Polygon_mesh_processing::parameters;
|
||||||
std::array< boost::optional<TriangleMesh*>,4> output;
|
std::array< boost::optional<TriangleMesh*>,4> output;
|
||||||
|
|
@ -572,9 +528,9 @@ corefine_and_compute_union( TriangleMesh& tm1,
|
||||||
return
|
return
|
||||||
corefine_and_compute_boolean_operations(tm1, tm2, output, np1, np2,
|
corefine_and_compute_boolean_operations(tm1, tm2, output, np1, np2,
|
||||||
std::make_tuple(np_out,
|
std::make_tuple(np_out,
|
||||||
all_default(),
|
parameters::use_default_values(),
|
||||||
all_default(),
|
parameters::use_default_values(),
|
||||||
all_default()))
|
parameters::use_default_values()))
|
||||||
[Corefinement::UNION];
|
[Corefinement::UNION];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -586,16 +542,16 @@ corefine_and_compute_union( TriangleMesh& tm1,
|
||||||
* \copydetails CGAL::Polygon_mesh_processing::corefine_and_compute_union()
|
* \copydetails CGAL::Polygon_mesh_processing::corefine_and_compute_union()
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh,
|
template <class TriangleMesh,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2,
|
class NamedParameters2 = parameters::Default_named_parameters,
|
||||||
class NamedParametersOut>
|
class NamedParametersOut = parameters::Default_named_parameters>
|
||||||
bool
|
bool
|
||||||
corefine_and_compute_intersection( TriangleMesh& tm1,
|
corefine_and_compute_intersection( TriangleMesh& tm1,
|
||||||
TriangleMesh& tm2,
|
TriangleMesh& tm2,
|
||||||
TriangleMesh& tm_out,
|
TriangleMesh& tm_out,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2,
|
const NamedParameters2& np2 = parameters::use_default_values(),
|
||||||
const NamedParametersOut& np_out)
|
const NamedParametersOut& np_out = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
using namespace CGAL::Polygon_mesh_processing::parameters;
|
||||||
std::array< boost::optional<TriangleMesh*>,4> output;
|
std::array< boost::optional<TriangleMesh*>,4> output;
|
||||||
|
|
@ -603,10 +559,10 @@ corefine_and_compute_intersection( TriangleMesh& tm1,
|
||||||
|
|
||||||
return
|
return
|
||||||
corefine_and_compute_boolean_operations(tm1, tm2, output, np1, np2,
|
corefine_and_compute_boolean_operations(tm1, tm2, output, np1, np2,
|
||||||
std::make_tuple(all_default(),
|
std::make_tuple(parameters::use_default_values(),
|
||||||
np_out,
|
np_out,
|
||||||
all_default(),
|
parameters::use_default_values(),
|
||||||
all_default()))
|
parameters::use_default_values()))
|
||||||
[Corefinement::INTERSECTION];
|
[Corefinement::INTERSECTION];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -618,16 +574,16 @@ corefine_and_compute_intersection( TriangleMesh& tm1,
|
||||||
* \copydetails CGAL::Polygon_mesh_processing::corefine_and_compute_union()
|
* \copydetails CGAL::Polygon_mesh_processing::corefine_and_compute_union()
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh,
|
template <class TriangleMesh,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2,
|
class NamedParameters2 = parameters::Default_named_parameters,
|
||||||
class NamedParametersOut>
|
class NamedParametersOut = parameters::Default_named_parameters>
|
||||||
bool
|
bool
|
||||||
corefine_and_compute_difference( TriangleMesh& tm1,
|
corefine_and_compute_difference( TriangleMesh& tm1,
|
||||||
TriangleMesh& tm2,
|
TriangleMesh& tm2,
|
||||||
TriangleMesh& tm_out,
|
TriangleMesh& tm_out,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2,
|
const NamedParameters2& np2 = parameters::use_default_values(),
|
||||||
const NamedParametersOut& np_out)
|
const NamedParametersOut& np_out = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
using namespace CGAL::Polygon_mesh_processing::parameters;
|
||||||
using namespace CGAL::Polygon_mesh_processing::Corefinement;
|
using namespace CGAL::Polygon_mesh_processing::Corefinement;
|
||||||
|
|
@ -636,10 +592,10 @@ corefine_and_compute_difference( TriangleMesh& tm1,
|
||||||
|
|
||||||
return
|
return
|
||||||
corefine_and_compute_boolean_operations(tm1, tm2, output, np1, np2,
|
corefine_and_compute_boolean_operations(tm1, tm2, output, np1, np2,
|
||||||
std::make_tuple(all_default(),
|
std::make_tuple(parameters::use_default_values(),
|
||||||
all_default(),
|
parameters::use_default_values(),
|
||||||
np_out,
|
np_out,
|
||||||
all_default()))
|
parameters::use_default_values()))
|
||||||
[TM1_MINUS_TM2];
|
[TM1_MINUS_TM2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -706,13 +662,13 @@ corefine_and_compute_difference( TriangleMesh& tm1,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh,
|
template <class TriangleMesh,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2>
|
class NamedParameters2 = parameters::Default_named_parameters>
|
||||||
void
|
void
|
||||||
corefine( TriangleMesh& tm1,
|
corefine( TriangleMesh& tm1,
|
||||||
TriangleMesh& tm2,
|
TriangleMesh& tm2,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2)
|
const NamedParameters2& np2 = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -849,10 +805,10 @@ namespace experimental {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh,
|
template <class TriangleMesh,
|
||||||
class NamedParameters>
|
class NamedParameters = parameters::Default_named_parameters>
|
||||||
void
|
void
|
||||||
autorefine( TriangleMesh& tm,
|
autorefine( TriangleMesh& tm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -942,10 +898,10 @@ autorefine( TriangleMesh& tm,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh,
|
template <class TriangleMesh,
|
||||||
class NamedParameters>
|
class NamedParameters = parameters::Default_named_parameters>
|
||||||
bool
|
bool
|
||||||
autorefine_and_remove_self_intersections( TriangleMesh& tm,
|
autorefine_and_remove_self_intersections( TriangleMesh& tm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -997,208 +953,6 @@ autorefine_and_remove_self_intersections( TriangleMesh& tm,
|
||||||
|
|
||||||
}// end of namespace experimental
|
}// end of namespace experimental
|
||||||
|
|
||||||
// overload with default named parameters
|
|
||||||
///// corefine_and_compute_union /////
|
|
||||||
template <class TriangleMesh,
|
|
||||||
class NamedParameters1,
|
|
||||||
class NamedParameters2>
|
|
||||||
bool
|
|
||||||
corefine_and_compute_union( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
TriangleMesh& tm_out,
|
|
||||||
const NamedParameters1& np1,
|
|
||||||
const NamedParameters2& np2)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_union(tm1, tm2, tm_out,
|
|
||||||
np1, np2, all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh,
|
|
||||||
class NamedParameters1>
|
|
||||||
bool
|
|
||||||
corefine_and_compute_union( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
TriangleMesh& tm_out,
|
|
||||||
const NamedParameters1& np1)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_union(tm1, tm2, tm_out,
|
|
||||||
np1, all_default(), all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh>
|
|
||||||
bool
|
|
||||||
corefine_and_compute_union(TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
TriangleMesh& tm_out)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_union(tm1, tm2, tm_out,
|
|
||||||
all_default(), all_default(), all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
///// corefine_and_compute_intersection /////
|
|
||||||
template <class TriangleMesh,
|
|
||||||
class NamedParameters1,
|
|
||||||
class NamedParameters2>
|
|
||||||
bool
|
|
||||||
corefine_and_compute_intersection( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
TriangleMesh& tm_out,
|
|
||||||
const NamedParameters1& np1,
|
|
||||||
const NamedParameters2& np2)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_intersection(tm1, tm2, tm_out,
|
|
||||||
np1, np2, all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh,
|
|
||||||
class NamedParameters1>
|
|
||||||
bool
|
|
||||||
corefine_and_compute_intersection( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
TriangleMesh& tm_out,
|
|
||||||
const NamedParameters1& np1)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_intersection(tm1, tm2, tm_out,
|
|
||||||
np1, all_default(), all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh>
|
|
||||||
bool
|
|
||||||
corefine_and_compute_intersection(TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
TriangleMesh& tm_out)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_intersection(tm1, tm2, tm_out,
|
|
||||||
all_default(), all_default(), all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
///// difference /////
|
|
||||||
template <class TriangleMesh,
|
|
||||||
class NamedParameters1,
|
|
||||||
class NamedParameters2>
|
|
||||||
bool
|
|
||||||
corefine_and_compute_difference( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
TriangleMesh& tm_out,
|
|
||||||
const NamedParameters1& np1,
|
|
||||||
const NamedParameters2& np2)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_difference(tm1, tm2, tm_out,
|
|
||||||
np1, np2, all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh,
|
|
||||||
class NamedParameters1>
|
|
||||||
bool
|
|
||||||
corefine_and_compute_difference( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
TriangleMesh& tm_out,
|
|
||||||
const NamedParameters1& np1)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_difference(tm1, tm2, tm_out,
|
|
||||||
np1, all_default(), all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh>
|
|
||||||
bool
|
|
||||||
corefine_and_compute_difference(TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
TriangleMesh& tm_out)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return corefine_and_compute_difference(tm1, tm2, tm_out,
|
|
||||||
all_default(), all_default(), all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
///// corefine /////
|
|
||||||
template <class TriangleMesh, class NamedParameters1>
|
|
||||||
void
|
|
||||||
corefine( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
const NamedParameters1& np1)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
corefine(tm1, tm2, np1, all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh>
|
|
||||||
void
|
|
||||||
corefine( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
corefine(tm1, tm2, all_default(), all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
|
||||||
template <class TriangleMesh,
|
|
||||||
class NamedParameters1,
|
|
||||||
class NamedParameters2>
|
|
||||||
void
|
|
||||||
corefine( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
const NamedParameters1& np1,
|
|
||||||
const NamedParameters2& np2,
|
|
||||||
const bool throw_on_self_intersection)
|
|
||||||
{
|
|
||||||
corefine(tm1, tm2, np1.throw_on_self_intersection(throw_on_self_intersection), np2);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh, class NamedParameters1>
|
|
||||||
void
|
|
||||||
corefine( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
const NamedParameters1& np1,
|
|
||||||
const bool throw_on_self_intersection)
|
|
||||||
{
|
|
||||||
namespace params = CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
corefine(tm1, tm2,
|
|
||||||
np1.throw_on_self_intersection(throw_on_self_intersection),
|
|
||||||
params::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh>
|
|
||||||
void
|
|
||||||
corefine( TriangleMesh& tm1,
|
|
||||||
TriangleMesh& tm2,
|
|
||||||
const bool throw_on_self_intersection)
|
|
||||||
{
|
|
||||||
namespace params = CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
corefine(tm1, tm2,
|
|
||||||
params::throw_on_self_intersection(throw_on_self_intersection),
|
|
||||||
params::all_default());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
///// autorefine /////
|
|
||||||
namespace experimental {
|
|
||||||
template <class TriangleMesh>
|
|
||||||
void
|
|
||||||
autorefine(TriangleMesh& tm)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
autorefine(tm, all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
///// autorefine_and_remove_self_intersections /////
|
|
||||||
template <class TriangleMesh>
|
|
||||||
bool
|
|
||||||
autorefine_and_remove_self_intersections(TriangleMesh& tm)
|
|
||||||
{
|
|
||||||
using namespace CGAL::Polygon_mesh_processing::parameters;
|
|
||||||
return autorefine_and_remove_self_intersections(tm, all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // end of namespace experimental
|
|
||||||
|
|
||||||
} } // end of namespace CGAL::Polygon_mesh_processing
|
} } // end of namespace CGAL::Polygon_mesh_processing
|
||||||
|
|
||||||
#include <CGAL/enable_warnings.h>
|
#include <CGAL/enable_warnings.h>
|
||||||
|
|
|
||||||
|
|
@ -2288,14 +2288,14 @@ double bounded_error_Hausdorff_naive_impl(
|
||||||
template< class Concurrency_tag,
|
template< class Concurrency_tag,
|
||||||
class TriangleMesh1,
|
class TriangleMesh1,
|
||||||
class TriangleMesh2,
|
class TriangleMesh2,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2 >
|
class NamedParameters2 = parameters::Default_named_parameters >
|
||||||
double bounded_error_Hausdorff_distance(
|
double bounded_error_Hausdorff_distance(
|
||||||
const TriangleMesh1& tm1,
|
const TriangleMesh1& tm1,
|
||||||
const TriangleMesh2& tm2,
|
const TriangleMesh2& tm2,
|
||||||
const double error_bound,
|
const double error_bound = 0.0001,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2)
|
const NamedParameters2& np2 = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_assertion_code(
|
CGAL_assertion_code(
|
||||||
const bool is_triangle = is_triangle_mesh(tm1) && is_triangle_mesh(tm2));
|
const bool is_triangle = is_triangle_mesh(tm1) && is_triangle_mesh(tm2));
|
||||||
|
|
@ -2328,32 +2328,6 @@ double bounded_error_Hausdorff_distance(
|
||||||
tm1, tm2, error_threshold, -FT(1), match_faces, vpm1, vpm2, np1, np2, out);
|
tm1, tm2, error_threshold, -FT(1), match_faces, vpm1, vpm2, np1, np2, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
template< class Concurrency_tag,
|
|
||||||
class TriangleMesh1,
|
|
||||||
class TriangleMesh2,
|
|
||||||
class NamedParameters1 >
|
|
||||||
double bounded_error_Hausdorff_distance(
|
|
||||||
const TriangleMesh1& tm1,
|
|
||||||
const TriangleMesh2& tm2,
|
|
||||||
const double error_bound,
|
|
||||||
const NamedParameters1& np1)
|
|
||||||
{
|
|
||||||
return bounded_error_Hausdorff_distance<Concurrency_tag>(
|
|
||||||
tm1, tm2, error_bound, np1, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template< class Concurrency_tag,
|
|
||||||
class TriangleMesh1,
|
|
||||||
class TriangleMesh2 >
|
|
||||||
double bounded_error_Hausdorff_distance(
|
|
||||||
const TriangleMesh1& tm1,
|
|
||||||
const TriangleMesh2& tm2,
|
|
||||||
const double error_bound = 0.0001)
|
|
||||||
{
|
|
||||||
return bounded_error_Hausdorff_distance<Concurrency_tag>(
|
|
||||||
tm1, tm2, error_bound, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup PMP_distance_grp
|
* \ingroup PMP_distance_grp
|
||||||
* returns the maximum of `bounded_error_Hausdorff_distance(tm1, tm2, error_bound, np1, np2)`
|
* returns the maximum of `bounded_error_Hausdorff_distance(tm1, tm2, error_bound, np1, np2)`
|
||||||
|
|
@ -2368,14 +2342,14 @@ double bounded_error_Hausdorff_distance(
|
||||||
template< class Concurrency_tag,
|
template< class Concurrency_tag,
|
||||||
class TriangleMesh1,
|
class TriangleMesh1,
|
||||||
class TriangleMesh2,
|
class TriangleMesh2,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2 >
|
class NamedParameters2 = parameters::Default_named_parameters >
|
||||||
double bounded_error_symmetric_Hausdorff_distance(
|
double bounded_error_symmetric_Hausdorff_distance(
|
||||||
const TriangleMesh1& tm1,
|
const TriangleMesh1& tm1,
|
||||||
const TriangleMesh2& tm2,
|
const TriangleMesh2& tm2,
|
||||||
const double error_bound,
|
const double error_bound,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2)
|
const NamedParameters2& np2 = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_assertion_code(
|
CGAL_assertion_code(
|
||||||
const bool is_triangle = is_triangle_mesh(tm1) && is_triangle_mesh(tm2));
|
const bool is_triangle = is_triangle_mesh(tm1) && is_triangle_mesh(tm2));
|
||||||
|
|
@ -2412,35 +2386,6 @@ double bounded_error_symmetric_Hausdorff_distance(
|
||||||
tm1, tm2, error_threshold, -FT(1), match_faces, vpm1, vpm2, np1, np2, out1, out2);
|
tm1, tm2, error_threshold, -FT(1), match_faces, vpm1, vpm2, np1, np2, out1, out2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template< class Concurrency_tag,
|
|
||||||
class TriangleMesh1,
|
|
||||||
class TriangleMesh2,
|
|
||||||
class NamedParameters1 >
|
|
||||||
double bounded_error_symmetric_Hausdorff_distance(
|
|
||||||
const TriangleMesh1& tm1,
|
|
||||||
const TriangleMesh2& tm2,
|
|
||||||
const double error_bound,
|
|
||||||
const NamedParameters1& np1)
|
|
||||||
{
|
|
||||||
return bounded_error_symmetric_Hausdorff_distance<Concurrency_tag>(
|
|
||||||
tm1, tm2, error_bound, np1, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template< class Concurrency_tag,
|
|
||||||
class TriangleMesh1,
|
|
||||||
class TriangleMesh2>
|
|
||||||
double bounded_error_symmetric_Hausdorff_distance(
|
|
||||||
const TriangleMesh1& tm1,
|
|
||||||
const TriangleMesh2& tm2,
|
|
||||||
const double error_bound = 0.0001)
|
|
||||||
{
|
|
||||||
return bounded_error_symmetric_Hausdorff_distance<Concurrency_tag>(
|
|
||||||
tm1, tm2, error_bound, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Find better name!
|
|
||||||
// TODO: Should we use one-sided or symmetric distance here?
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup PMP_distance_grp
|
* \ingroup PMP_distance_grp
|
||||||
* returns `true` if the Hausdorff distance between two meshes is larger than
|
* returns `true` if the Hausdorff distance between two meshes is larger than
|
||||||
|
|
@ -2466,15 +2411,15 @@ double bounded_error_symmetric_Hausdorff_distance(
|
||||||
template< class Concurrency_tag,
|
template< class Concurrency_tag,
|
||||||
class TriangleMesh1,
|
class TriangleMesh1,
|
||||||
class TriangleMesh2,
|
class TriangleMesh2,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2 >
|
class NamedParameters2 = parameters::Default_named_parameters>
|
||||||
bool is_Hausdorff_distance_larger(
|
bool is_Hausdorff_distance_larger(
|
||||||
const TriangleMesh1& tm1,
|
const TriangleMesh1& tm1,
|
||||||
const TriangleMesh2& tm2,
|
const TriangleMesh2& tm2,
|
||||||
const double distance_bound,
|
const double distance_bound,
|
||||||
const double error_bound,
|
const double error_bound,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2)
|
const NamedParameters2& np2 = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_assertion_code(
|
CGAL_assertion_code(
|
||||||
const bool is_triangle = is_triangle_mesh(tm1) && is_triangle_mesh(tm2));
|
const bool is_triangle = is_triangle_mesh(tm1) && is_triangle_mesh(tm2));
|
||||||
|
|
@ -2523,46 +2468,18 @@ bool is_Hausdorff_distance_larger(
|
||||||
return hdist > distance_bound;
|
return hdist > distance_bound;
|
||||||
}
|
}
|
||||||
|
|
||||||
template< class Concurrency_tag,
|
|
||||||
class TriangleMesh1,
|
|
||||||
class TriangleMesh2,
|
|
||||||
class NamedParameters1 >
|
|
||||||
double is_Hausdorff_distance_larger(
|
|
||||||
const TriangleMesh1& tm1,
|
|
||||||
const TriangleMesh2& tm2,
|
|
||||||
const double max_distance,
|
|
||||||
const double error_bound,
|
|
||||||
const NamedParameters1& np1)
|
|
||||||
{
|
|
||||||
return is_Hausdorff_distance_larger<Concurrency_tag>(
|
|
||||||
tm1, tm2, max_distance, error_bound, np1, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template< class Concurrency_tag,
|
|
||||||
class TriangleMesh1,
|
|
||||||
class TriangleMesh2 >
|
|
||||||
double is_Hausdorff_distance_larger(
|
|
||||||
const TriangleMesh1& tm1,
|
|
||||||
const TriangleMesh2& tm2,
|
|
||||||
const double max_distance = 1.0,
|
|
||||||
const double error_bound = 0.0001)
|
|
||||||
{
|
|
||||||
return is_Hausdorff_distance_larger<Concurrency_tag>(
|
|
||||||
tm1, tm2, max_distance, error_bound, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Implementation of the naive Bounded Error Hausdorff distance.
|
// Implementation of the naive Bounded Error Hausdorff distance.
|
||||||
template< class Concurrency_tag,
|
template< class Concurrency_tag,
|
||||||
class TriangleMesh1,
|
class TriangleMesh1,
|
||||||
class TriangleMesh2,
|
class TriangleMesh2,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2 >
|
class NamedParameters2 = parameters::Default_named_parameters >
|
||||||
double bounded_error_Hausdorff_distance_naive(
|
double bounded_error_Hausdorff_distance_naive(
|
||||||
const TriangleMesh1& tm1,
|
const TriangleMesh1& tm1,
|
||||||
const TriangleMesh2& tm2,
|
const TriangleMesh2& tm2,
|
||||||
const double error_bound,
|
const double error_bound,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2)
|
const NamedParameters2& np2 = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_assertion_code(
|
CGAL_assertion_code(
|
||||||
const bool is_triangle = is_triangle_mesh(tm1) && is_triangle_mesh(tm2));
|
const bool is_triangle = is_triangle_mesh(tm1) && is_triangle_mesh(tm2));
|
||||||
|
|
@ -2586,32 +2503,6 @@ double bounded_error_Hausdorff_distance_naive(
|
||||||
tm1, tm2, error_threshold, vpm1, vpm2);
|
tm1, tm2, error_threshold, vpm1, vpm2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template< class Concurrency_tag,
|
|
||||||
class TriangleMesh1,
|
|
||||||
class TriangleMesh2,
|
|
||||||
class NamedParameters1 >
|
|
||||||
double bounded_error_Hausdorff_distance_naive(
|
|
||||||
const TriangleMesh1& tm1,
|
|
||||||
const TriangleMesh2& tm2,
|
|
||||||
const double error_bound,
|
|
||||||
const NamedParameters1& np1)
|
|
||||||
{
|
|
||||||
return bounded_error_Hausdorff_distance_naive<Concurrency_tag>(
|
|
||||||
tm1, tm2, error_bound, np1, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template< class Concurrency_tag,
|
|
||||||
class TriangleMesh1,
|
|
||||||
class TriangleMesh2 >
|
|
||||||
double bounded_error_Hausdorff_distance_naive(
|
|
||||||
const TriangleMesh1& tm1,
|
|
||||||
const TriangleMesh2& tm2,
|
|
||||||
const double error_bound = 0.0001)
|
|
||||||
{
|
|
||||||
return bounded_error_Hausdorff_distance_naive<Concurrency_tag>(
|
|
||||||
tm1, tm2, error_bound, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} } // end of namespace CGAL::Polygon_mesh_processing
|
} } // end of namespace CGAL::Polygon_mesh_processing
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,15 +158,15 @@ template <class InputMesh,
|
||||||
class OutputMesh,
|
class OutputMesh,
|
||||||
class BottomFunctor,
|
class BottomFunctor,
|
||||||
class TopFunctor,
|
class TopFunctor,
|
||||||
class NamedParameters1,
|
class CGAL_BGL_NP_TEMPLATE_PARAMETERS_1,
|
||||||
class NamedParameters2
|
class CGAL_BGL_NP_TEMPLATE_PARAMETERS_2
|
||||||
>
|
>
|
||||||
void extrude_mesh(const InputMesh& input,
|
void extrude_mesh(const InputMesh& input,
|
||||||
OutputMesh& output,
|
OutputMesh& output,
|
||||||
const BottomFunctor& bot,
|
const BottomFunctor& bot,
|
||||||
const TopFunctor& top,
|
const TopFunctor& top,
|
||||||
const NamedParameters1& np_in,
|
const CGAL_BGL_NP_CLASS_1& np_in = parameters::use_default_values(),
|
||||||
const NamedParameters2& np_out)
|
const CGAL_BGL_NP_CLASS_2& np_out = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<InputMesh>::vertex_descriptor input_vertex_descriptor;
|
typedef typename boost::graph_traits<InputMesh>::vertex_descriptor input_vertex_descriptor;
|
||||||
typedef typename boost::graph_traits<InputMesh>::halfedge_descriptor input_halfedge_descriptor;
|
typedef typename boost::graph_traits<InputMesh>::halfedge_descriptor input_halfedge_descriptor;
|
||||||
|
|
@ -175,8 +175,8 @@ void extrude_mesh(const InputMesh& input,
|
||||||
typedef typename boost::graph_traits<OutputMesh>::halfedge_descriptor output_halfedge_descriptor;
|
typedef typename boost::graph_traits<OutputMesh>::halfedge_descriptor output_halfedge_descriptor;
|
||||||
|
|
||||||
CGAL_assertion(!CGAL::is_closed(input));
|
CGAL_assertion(!CGAL::is_closed(input));
|
||||||
typedef typename GetVertexPointMap < OutputMesh, NamedParameters2>::type VPMap;
|
typedef typename GetVertexPointMap < OutputMesh, CGAL_BGL_NP_CLASS_2>::type VPMap;
|
||||||
typedef typename GetVertexPointMap < InputMesh, NamedParameters1>::const_type IVPMap;
|
typedef typename GetVertexPointMap < InputMesh, CGAL_BGL_NP_CLASS_1>::const_type IVPMap;
|
||||||
|
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
|
|
@ -276,68 +276,29 @@ void extrude_mesh(const InputMesh& input,
|
||||||
*/
|
*/
|
||||||
template <class InputMesh,
|
template <class InputMesh,
|
||||||
class OutputMesh,
|
class OutputMesh,
|
||||||
class NamedParameters1,
|
class CGAL_BGL_NP_TEMPLATE_PARAMETERS_1,
|
||||||
class NamedParameters2>
|
class CGAL_BGL_NP_TEMPLATE_PARAMETERS_2>
|
||||||
void extrude_mesh(const InputMesh& input,
|
void extrude_mesh(const InputMesh& input,
|
||||||
OutputMesh& output,
|
OutputMesh& output,
|
||||||
#ifdef DOXYGEN_RUNNING
|
#ifdef DOXYGEN_RUNNING
|
||||||
Vector_3 v,
|
Vector_3 v,
|
||||||
#else
|
#else
|
||||||
typename GetGeomTraits<OutputMesh, NamedParameters2>::type::Vector_3 v,
|
typename GetGeomTraits<OutputMesh, CGAL_BGL_NP_CLASS_2>::type::Vector_3 v,
|
||||||
#endif
|
#endif
|
||||||
const NamedParameters1& np_in,
|
const CGAL_BGL_NP_CLASS_1& np_in = parameters::use_default_values(),
|
||||||
const NamedParameters2& np_out)
|
const CGAL_BGL_NP_CLASS_2& np_out = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename GetVertexPointMap < OutputMesh, NamedParameters2>::type VPMap;
|
typedef typename GetVertexPointMap < OutputMesh, CGAL_BGL_NP_CLASS_2>::type VPMap;
|
||||||
VPMap output_vpm = parameters::choose_parameter(parameters::get_parameter(np_out, internal_np::vertex_point),
|
VPMap output_vpm = parameters::choose_parameter(parameters::get_parameter(np_out, internal_np::vertex_point),
|
||||||
get_property_map(vertex_point, output));
|
get_property_map(vertex_point, output));
|
||||||
|
|
||||||
extrude_impl::Const_dist_translation<
|
extrude_impl::Const_dist_translation<
|
||||||
typename GetVertexPointMap<OutputMesh, NamedParameters2>::type,
|
typename GetVertexPointMap<OutputMesh, CGAL_BGL_NP_CLASS_2>::type,
|
||||||
typename GetGeomTraits<OutputMesh, NamedParameters2>::type::Vector_3> bot(output_vpm,
|
typename GetGeomTraits<OutputMesh, CGAL_BGL_NP_CLASS_2>::type::Vector_3> bot(output_vpm,
|
||||||
v);
|
v);
|
||||||
extrude_impl::Identity_functor top;
|
extrude_impl::Identity_functor top;
|
||||||
extrude_mesh(input, output, bot,top, np_in, np_out);
|
extrude_mesh(input, output, bot,top, np_in, np_out);
|
||||||
}
|
}
|
||||||
//convenience overload
|
|
||||||
template <class InputMesh,
|
|
||||||
class OutputMesh,
|
|
||||||
typename Vector>
|
|
||||||
void extrude_mesh(const InputMesh& input,
|
|
||||||
OutputMesh& output,
|
|
||||||
Vector dir)
|
|
||||||
{
|
|
||||||
extrude_mesh(input, output, dir,
|
|
||||||
parameters::all_default(),
|
|
||||||
parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class InputMesh,
|
|
||||||
class OutputMesh,
|
|
||||||
typename Vector,
|
|
||||||
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
|
||||||
void extrude_mesh(const InputMesh& input,
|
|
||||||
OutputMesh& output,
|
|
||||||
Vector dir,
|
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
|
||||||
{
|
|
||||||
extrude_mesh(input, output, dir,
|
|
||||||
np,
|
|
||||||
parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class InputMesh,
|
|
||||||
class OutputMesh,
|
|
||||||
class BottomFunctor,
|
|
||||||
class TopFunctor>
|
|
||||||
void extrude_mesh(const InputMesh& input,
|
|
||||||
OutputMesh& output,
|
|
||||||
const BottomFunctor& bot,
|
|
||||||
const TopFunctor& top)
|
|
||||||
{
|
|
||||||
extrude_mesh(input, output, bot, top,
|
|
||||||
parameters::all_default(), parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
}} //end CGAL::PMP
|
}} //end CGAL::PMP
|
||||||
#endif //CGAL_POLYGON_MESH_PROCESSING_EXTRUDE_H
|
#endif //CGAL_POLYGON_MESH_PROCESSING_EXTRUDE_H
|
||||||
|
|
|
||||||
|
|
@ -1355,7 +1355,7 @@ template <typename ConcurrencyTag = CGAL::Sequential_tag,
|
||||||
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
std::size_t snap_borders(TriangleMesh& tm,
|
std::size_t snap_borders(TriangleMesh& tm,
|
||||||
ToleranceMap tolerance_map,
|
ToleranceMap tolerance_map,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor halfedge_descriptor;
|
typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor halfedge_descriptor;
|
||||||
|
|
||||||
|
|
@ -1367,20 +1367,11 @@ std::size_t snap_borders(TriangleMesh& tm,
|
||||||
true /*self snapping*/, np, np);
|
true /*self snapping*/, np, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ConcurrencyTag = CGAL::Sequential_tag,
|
|
||||||
typename TriangleMesh,
|
|
||||||
typename ToleranceMap>
|
|
||||||
std::size_t snap_borders(TriangleMesh& tm,
|
|
||||||
ToleranceMap tolerance_map)
|
|
||||||
{
|
|
||||||
return snap_borders<ConcurrencyTag>(tm, tolerance_map, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename ConcurrencyTag = CGAL::Sequential_tag,
|
template <typename ConcurrencyTag = CGAL::Sequential_tag,
|
||||||
typename TriangleMesh,
|
typename TriangleMesh,
|
||||||
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
std::size_t snap_borders(TriangleMesh& tm,
|
std::size_t snap_borders(TriangleMesh& tm,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor halfedge_descriptor;
|
typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor halfedge_descriptor;
|
||||||
|
|
||||||
|
|
@ -1402,13 +1393,6 @@ std::size_t snap_borders(TriangleMesh& tm,
|
||||||
true /*self snapping*/, np, np);
|
true /*self snapping*/, np, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ConcurrencyTag = CGAL::Sequential_tag,
|
|
||||||
typename TriangleMesh>
|
|
||||||
std::size_t snap_borders(TriangleMesh& tm)
|
|
||||||
{
|
|
||||||
return snap_borders<ConcurrencyTag>(tm, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // end namespace experimental
|
} // end namespace experimental
|
||||||
} // end namespace Polygon_mesh_processing
|
} // end namespace Polygon_mesh_processing
|
||||||
} // end namespace CGAL
|
} // end namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -1218,17 +1218,16 @@ std::size_t snap_vertices(const HalfedgeRange_A& halfedge_range_A,
|
||||||
|
|
||||||
template <typename ConcurrencyTag = CGAL::Sequential_tag,
|
template <typename ConcurrencyTag = CGAL::Sequential_tag,
|
||||||
typename HalfedgeRange_A, typename HalfedgeRange_B, typename PolygonMesh,
|
typename HalfedgeRange_A, typename HalfedgeRange_B, typename PolygonMesh,
|
||||||
typename T_A, typename Tag_A, typename Base_A,
|
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS_1,
|
||||||
typename T_B, typename Tag_B, typename Base_B>
|
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS_2>
|
||||||
std::size_t snap_vertices(const HalfedgeRange_A& halfedge_range_A,
|
std::size_t snap_vertices(const HalfedgeRange_A& halfedge_range_A,
|
||||||
PolygonMesh& tm_A,
|
PolygonMesh& tm_A,
|
||||||
const HalfedgeRange_B& halfedge_range_B,
|
const HalfedgeRange_B& halfedge_range_B,
|
||||||
PolygonMesh& tm_B,
|
PolygonMesh& tm_B,
|
||||||
const CGAL::Named_function_parameters<T_A, Tag_A, Base_A>& np_A,
|
const CGAL_BGL_NP_CLASS_1& np_A=parameters::use_default_values(),
|
||||||
const CGAL::Named_function_parameters<T_B, Tag_B, Base_B>& np_B)
|
const CGAL_BGL_NP_CLASS_2& np_B=parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef CGAL::Named_function_parameters<T_A, Tag_A, Base_A> NamedParameters_A;
|
typedef typename GetGeomTraits<PolygonMesh, CGAL_BGL_NP_CLASS_1>::type GT;
|
||||||
typedef typename GetGeomTraits<PolygonMesh, NamedParameters_A>::type GT;
|
|
||||||
typedef typename GT::FT FT;
|
typedef typename GT::FT FT;
|
||||||
typedef CGAL::dynamic_vertex_property_t<FT> Vertex_property_tag;
|
typedef CGAL::dynamic_vertex_property_t<FT> Vertex_property_tag;
|
||||||
typedef typename boost::property_map<PolygonMesh, Vertex_property_tag>::type Tolerance_map;
|
typedef typename boost::property_map<PolygonMesh, Vertex_property_tag>::type Tolerance_map;
|
||||||
|
|
@ -1243,17 +1242,6 @@ std::size_t snap_vertices(const HalfedgeRange_A& halfedge_range_A,
|
||||||
return snap_vertices(halfedge_range_A, tm_A, tolerance_map_A, halfedge_range_B, tm_B, tolerance_map_B, np_A, np_B);
|
return snap_vertices(halfedge_range_A, tm_A, tolerance_map_A, halfedge_range_B, tm_B, tolerance_map_B, np_A, np_B);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ConcurrencyTag = CGAL::Sequential_tag,
|
|
||||||
typename HalfedgeRange_A, typename HalfedgeRange_B, typename PolygonMesh>
|
|
||||||
std::size_t snap_vertices(const HalfedgeRange_A& halfedge_range_A,
|
|
||||||
PolygonMesh& tm_A,
|
|
||||||
const HalfedgeRange_B& halfedge_range_B,
|
|
||||||
PolygonMesh& tm_B)
|
|
||||||
{
|
|
||||||
return snap_vertices<ConcurrencyTag>(halfedge_range_A, tm_A, halfedge_range_B, tm_B,
|
|
||||||
parameters::all_default(), parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/// Border convenience overloads
|
/// Border convenience overloads
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -1251,12 +1251,18 @@ bool do_intersect(const Polyline& polyline1,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh,
|
template <class TriangleMesh,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2>
|
class NamedParameters2 = parameters::Default_named_parameters>
|
||||||
bool do_intersect(const TriangleMesh& tm1,
|
bool do_intersect(const TriangleMesh& tm1,
|
||||||
const TriangleMesh& tm2,
|
const TriangleMesh& tm2,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2)
|
const NamedParameters2& np2 = parameters::use_default_values()
|
||||||
|
#ifndef DOXYGEN_RUNNING
|
||||||
|
, const typename boost::disable_if<
|
||||||
|
typename boost::has_range_const_iterator<TriangleMesh>::type
|
||||||
|
>::type* = 0
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -1294,19 +1300,6 @@ bool do_intersect(const TriangleMesh& tm1,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//convenient overload
|
|
||||||
template <class TriangleMesh>
|
|
||||||
bool do_intersect(const TriangleMesh& tm1,
|
|
||||||
const TriangleMesh& tm2,
|
|
||||||
const typename boost::disable_if<
|
|
||||||
typename boost::has_range_const_iterator<TriangleMesh>::type
|
|
||||||
>::type* = 0)
|
|
||||||
{
|
|
||||||
CGAL_precondition(CGAL::is_triangle_mesh(tm1));
|
|
||||||
CGAL_precondition(CGAL::is_triangle_mesh(tm2));
|
|
||||||
return CGAL::Polygon_mesh_processing::do_intersect(tm1, tm2, parameters::all_default(), parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup PMP_predicates_grp
|
* \ingroup PMP_predicates_grp
|
||||||
* returns `true` if there exists a face of `tm` and a segment of a polyline of `polylines` which intersect,
|
* returns `true` if there exists a face of `tm` and a segment of a polyline of `polylines` which intersect,
|
||||||
|
|
@ -1344,10 +1337,10 @@ bool do_intersect(const TriangleMesh& tm1,
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh,
|
template <class TriangleMesh,
|
||||||
class PolylineRange,
|
class PolylineRange,
|
||||||
class NamedParameters>
|
class NamedParameters = parameters::Default_named_parameters>
|
||||||
bool do_intersect(const TriangleMesh& tm,
|
bool do_intersect(const TriangleMesh& tm,
|
||||||
const PolylineRange& polylines,
|
const PolylineRange& polylines,
|
||||||
const NamedParameters& np
|
const NamedParameters& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
, const typename boost::enable_if<
|
, const typename boost::enable_if<
|
||||||
typename boost::has_range_iterator<
|
typename boost::has_range_iterator<
|
||||||
|
|
@ -1409,10 +1402,10 @@ bool do_intersect(const TriangleMesh& tm,
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh,
|
template <class TriangleMesh,
|
||||||
class Polyline,
|
class Polyline,
|
||||||
class NamedParameters>
|
class NamedParameters = parameters::Default_named_parameters>
|
||||||
bool do_intersect(const TriangleMesh& tm,
|
bool do_intersect(const TriangleMesh& tm,
|
||||||
const Polyline& polyline,
|
const Polyline& polyline,
|
||||||
const NamedParameters& np
|
const NamedParameters& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
, const typename boost::disable_if<
|
, const typename boost::disable_if<
|
||||||
typename boost::has_range_iterator<
|
typename boost::has_range_iterator<
|
||||||
|
|
@ -1438,46 +1431,6 @@ bool do_intersect(const TriangleMesh& tm,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class TriangleMesh,
|
|
||||||
class PolylineRange>
|
|
||||||
bool do_intersect(const TriangleMesh& tm,
|
|
||||||
const PolylineRange& polylines,
|
|
||||||
const typename boost::enable_if<
|
|
||||||
typename boost::has_range_iterator<
|
|
||||||
typename boost::mpl::eval_if<
|
|
||||||
boost::has_range_iterator<PolylineRange>,
|
|
||||||
boost::range_value<PolylineRange>,
|
|
||||||
boost::false_type
|
|
||||||
>::type
|
|
||||||
>::type
|
|
||||||
>::type* = 0)
|
|
||||||
{
|
|
||||||
CGAL_precondition(CGAL::is_triangle_mesh(tm));
|
|
||||||
return CGAL::Polygon_mesh_processing::do_intersect(tm, polylines, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <class TriangleMesh,
|
|
||||||
class Polyline>
|
|
||||||
bool do_intersect(const TriangleMesh& tm,
|
|
||||||
const Polyline& polyline,
|
|
||||||
const typename boost::disable_if<
|
|
||||||
typename boost::has_range_const_iterator<TriangleMesh>::type
|
|
||||||
>::type* = 0,
|
|
||||||
const typename boost::disable_if<
|
|
||||||
typename boost::has_range_iterator<
|
|
||||||
typename boost::mpl::eval_if<
|
|
||||||
boost::has_range_iterator<Polyline>,
|
|
||||||
boost::range_value<Polyline>,
|
|
||||||
boost::false_type
|
|
||||||
>::type
|
|
||||||
>::type
|
|
||||||
>::type* = 0)
|
|
||||||
{
|
|
||||||
CGAL_precondition(CGAL::is_triangle_mesh(tm));
|
|
||||||
return CGAL::Polygon_mesh_processing::do_intersect(tm, polyline, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace internal{
|
namespace internal{
|
||||||
|
|
||||||
template<class TriangleMeshRange,
|
template<class TriangleMeshRange,
|
||||||
|
|
@ -1688,8 +1641,8 @@ OutputIterator intersecting_meshes(const TriangleMeshRange& range,
|
||||||
OutputIterator out,
|
OutputIterator out,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np)
|
||||||
{
|
{
|
||||||
std::vector<Named_function_parameters<bool, internal_np::all_default_t> >nps(
|
std::vector<parameters::Default_named_parameters> nps(
|
||||||
std::distance(range.begin(), range.end()), parameters::all_default());
|
std::distance(range.begin(), range.end()), parameters::use_default_values());
|
||||||
return intersecting_meshes(range, out, np, nps);
|
return intersecting_meshes(range, out, np, nps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1697,7 +1650,7 @@ template <class TriangleMeshRange, class OutputIterator>
|
||||||
OutputIterator intersecting_meshes(const TriangleMeshRange& range,
|
OutputIterator intersecting_meshes(const TriangleMeshRange& range,
|
||||||
OutputIterator out)
|
OutputIterator out)
|
||||||
{
|
{
|
||||||
return intersecting_meshes(range, out, parameters::all_default());
|
return intersecting_meshes(range, out, parameters::use_default_values());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1746,14 +1699,14 @@ OutputIterator intersecting_meshes(const TriangleMeshRange& range,
|
||||||
*/
|
*/
|
||||||
template <class OutputIterator,
|
template <class OutputIterator,
|
||||||
class TriangleMesh,
|
class TriangleMesh,
|
||||||
class NamedParameters1,
|
class NamedParameters1 = parameters::Default_named_parameters,
|
||||||
class NamedParameters2 >
|
class NamedParameters2 = parameters::Default_named_parameters >
|
||||||
OutputIterator
|
OutputIterator
|
||||||
surface_intersection(const TriangleMesh& tm1,
|
surface_intersection(const TriangleMesh& tm1,
|
||||||
const TriangleMesh& tm2,
|
const TriangleMesh& tm2,
|
||||||
OutputIterator polyline_output,
|
OutputIterator polyline_output,
|
||||||
const NamedParameters1& np1,
|
const NamedParameters1& np1 = parameters::use_default_values(),
|
||||||
const NamedParameters2& np2)
|
const NamedParameters2& np2 = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
const bool throw_on_self_intersection =
|
const bool throw_on_self_intersection =
|
||||||
parameters::choose_parameter(parameters::get_parameter(np1, internal_np::throw_on_self_intersection), false);
|
parameters::choose_parameter(parameters::get_parameter(np1, internal_np::throw_on_self_intersection), false);
|
||||||
|
|
@ -1809,11 +1762,11 @@ namespace experimental {
|
||||||
*/
|
*/
|
||||||
template <class OutputIterator,
|
template <class OutputIterator,
|
||||||
class TriangleMesh,
|
class TriangleMesh,
|
||||||
class NamedParameters >
|
class NamedParameters = parameters::Default_named_parameters >
|
||||||
OutputIterator
|
OutputIterator
|
||||||
surface_self_intersection(const TriangleMesh& tm,
|
surface_self_intersection(const TriangleMesh& tm,
|
||||||
OutputIterator polyline_output,
|
OutputIterator polyline_output,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
// Vertex point maps
|
// Vertex point maps
|
||||||
typedef typename GetVertexPointMap<TriangleMesh, NamedParameters>::const_type VPM;
|
typedef typename GetVertexPointMap<TriangleMesh, NamedParameters>::const_type VPM;
|
||||||
|
|
@ -1829,77 +1782,6 @@ surface_self_intersection(const TriangleMesh& tm,
|
||||||
return polyline_output;
|
return polyline_output;
|
||||||
}
|
}
|
||||||
|
|
||||||
} //end of namespace experimental
|
|
||||||
|
|
||||||
|
|
||||||
template <class OutputIterator,
|
|
||||||
class TriangleMesh >
|
|
||||||
OutputIterator
|
|
||||||
surface_intersection(const TriangleMesh& tm1,
|
|
||||||
const TriangleMesh& tm2,
|
|
||||||
OutputIterator polyline_output)
|
|
||||||
{
|
|
||||||
return surface_intersection(tm1, tm2, polyline_output,
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default(),
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class OutputIterator,
|
|
||||||
class TriangleMesh,
|
|
||||||
class NamedParameters1>
|
|
||||||
OutputIterator
|
|
||||||
surface_intersection(const TriangleMesh& tm1,
|
|
||||||
const TriangleMesh& tm2,
|
|
||||||
OutputIterator polyline_output,
|
|
||||||
const NamedParameters1& np)
|
|
||||||
{
|
|
||||||
return surface_intersection(tm1, tm2, polyline_output, np,
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
|
||||||
template <class OutputIterator,
|
|
||||||
class TriangleMesh,
|
|
||||||
class NamedParameters1,
|
|
||||||
class NamedParameters2 >
|
|
||||||
OutputIterator
|
|
||||||
surface_intersection(const TriangleMesh& tm1,
|
|
||||||
const TriangleMesh& tm2,
|
|
||||||
OutputIterator polyline_output,
|
|
||||||
const NamedParameters1& np1,
|
|
||||||
const NamedParameters2& np2,
|
|
||||||
const bool throw_on_self_intersection)
|
|
||||||
{
|
|
||||||
return surface_intersection(tm1, tm2, polyline_output,
|
|
||||||
np1.throw_on_self_intersection(throw_on_self_intersection), np2);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class OutputIterator,
|
|
||||||
class TriangleMesh >
|
|
||||||
OutputIterator
|
|
||||||
surface_intersection(const TriangleMesh& tm1,
|
|
||||||
const TriangleMesh& tm2,
|
|
||||||
OutputIterator polyline_output,
|
|
||||||
const bool throw_on_self_intersection)
|
|
||||||
{
|
|
||||||
return surface_intersection(tm1, tm2, polyline_output,
|
|
||||||
CGAL::parameters::throw_on_self_intersection(throw_on_self_intersection),
|
|
||||||
CGAL::parameters::use_default_values());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace experimental {
|
|
||||||
template <class OutputIterator,
|
|
||||||
class TriangleMesh >
|
|
||||||
OutputIterator
|
|
||||||
surface_self_intersection(const TriangleMesh& tm,
|
|
||||||
OutputIterator polyline_output)
|
|
||||||
{
|
|
||||||
return surface_self_intersection(tm, polyline_output,
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
} //end of namespace experimental
|
} //end of namespace experimental
|
||||||
} //end of namespace Polygon_mesh_processing
|
} //end of namespace Polygon_mesh_processing
|
||||||
} //end of namespace CGAL
|
} //end of namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ struct Ray_type_selector<Point, 3>
|
||||||
|
|
||||||
// Just for convenience
|
// Just for convenience
|
||||||
template <typename TriangleMesh,
|
template <typename TriangleMesh,
|
||||||
typename NamedParameters = Named_function_parameters<bool, internal_np::all_default_t> >
|
typename NamedParameters = parameters::Default_named_parameters>
|
||||||
struct Location_traits
|
struct Location_traits
|
||||||
{
|
{
|
||||||
typedef typename GetVertexPointMap<TriangleMesh, NamedParameters>::const_type VertexPointMap;
|
typedef typename GetVertexPointMap<TriangleMesh, NamedParameters>::const_type VertexPointMap;
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ edge_length(typename boost::graph_traits<PolygonMesh>::edge_descriptor e,
|
||||||
* @sa `face_border_length()`
|
* @sa `face_border_length()`
|
||||||
*/
|
*/
|
||||||
template<typename PolygonMesh,
|
template<typename PolygonMesh,
|
||||||
typename NamedParameters>
|
typename NamedParameters = parameters::Default_named_parameters>
|
||||||
#ifdef DOXYGEN_RUNNING
|
#ifdef DOXYGEN_RUNNING
|
||||||
FT
|
FT
|
||||||
#else
|
#else
|
||||||
|
|
@ -180,7 +180,7 @@ typename GetGeomTraits<PolygonMesh, NamedParameters>::type::FT
|
||||||
#endif
|
#endif
|
||||||
squared_edge_length(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h,
|
squared_edge_length(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h,
|
||||||
const PolygonMesh& pmesh,
|
const PolygonMesh& pmesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename GetGeomTraits<PolygonMesh, NamedParameters>::type Geom_traits;
|
typedef typename GetGeomTraits<PolygonMesh, NamedParameters>::type Geom_traits;
|
||||||
|
|
||||||
|
|
@ -199,35 +199,18 @@ squared_edge_length(typename boost::graph_traits<PolygonMesh>::halfedge_descript
|
||||||
get(vpm, target(h, pmesh)));
|
get(vpm, target(h, pmesh)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename PolygonMesh>
|
|
||||||
typename CGAL::Kernel_traits<typename property_map_value<PolygonMesh,
|
|
||||||
CGAL::vertex_point_t>::type>::Kernel::FT
|
|
||||||
squared_edge_length(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h,
|
|
||||||
const PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
return squared_edge_length(h, pmesh, CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
// edge overloads
|
// edge overloads
|
||||||
template<typename PolygonMesh,
|
template<typename PolygonMesh,
|
||||||
typename NamedParameters>
|
typename NamedParameters = parameters::Default_named_parameters>
|
||||||
typename GetGeomTraits<PolygonMesh, NamedParameters>::type::FT
|
typename GetGeomTraits<PolygonMesh, NamedParameters>::type::FT
|
||||||
squared_edge_length(typename boost::graph_traits<PolygonMesh>::edge_descriptor e,
|
squared_edge_length(typename boost::graph_traits<PolygonMesh>::edge_descriptor e,
|
||||||
const PolygonMesh& pmesh,
|
const PolygonMesh& pmesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
return squared_edge_length(halfedge(e, pmesh), pmesh, np);
|
return squared_edge_length(halfedge(e, pmesh), pmesh, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename PolygonMesh>
|
|
||||||
typename CGAL::Kernel_traits<typename property_map_value<PolygonMesh,
|
|
||||||
CGAL::vertex_point_t>::type>::Kernel::FT
|
|
||||||
squared_edge_length(typename boost::graph_traits<PolygonMesh>::edge_descriptor e,
|
|
||||||
const PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
return squared_edge_length(halfedge(e, pmesh), pmesh);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup measure_grp
|
* \ingroup measure_grp
|
||||||
* computes the length of the border polyline
|
* computes the length of the border polyline
|
||||||
|
|
|
||||||
|
|
@ -277,11 +277,11 @@ void merge_vertices_in_range(const HalfedgeRange& sorted_hedges,
|
||||||
/// \cgalParamNEnd
|
/// \cgalParamNEnd
|
||||||
/// \cgalNamedParamsEnd
|
/// \cgalNamedParamsEnd
|
||||||
///
|
///
|
||||||
template <class PolygonMesh, class NamedParameters>
|
template <class PolygonMesh, class NamedParameters = parameters::Default_named_parameters>
|
||||||
void merge_duplicated_vertices_in_boundary_cycle(
|
void merge_duplicated_vertices_in_boundary_cycle(
|
||||||
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h,
|
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h,
|
||||||
PolygonMesh& pm,
|
PolygonMesh& pm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
|
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
|
||||||
typedef typename GetVertexPointMap<PolygonMesh, NamedParameters>::const_type Vpm;
|
typedef typename GetVertexPointMap<PolygonMesh, NamedParameters>::const_type Vpm;
|
||||||
|
|
@ -333,9 +333,9 @@ void merge_duplicated_vertices_in_boundary_cycle(
|
||||||
/// \cgalNamedParamsEnd
|
/// \cgalNamedParamsEnd
|
||||||
///
|
///
|
||||||
/// \sa `merge_duplicated_vertices_in_boundary_cycle()`
|
/// \sa `merge_duplicated_vertices_in_boundary_cycle()`
|
||||||
template <class PolygonMesh, class NamedParameters>
|
template <class PolygonMesh, class NamedParameters = parameters::Default_named_parameters>
|
||||||
void merge_duplicated_vertices_in_boundary_cycles( PolygonMesh& pm,
|
void merge_duplicated_vertices_in_boundary_cycles( PolygonMesh& pm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
|
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
|
||||||
|
|
||||||
|
|
@ -346,20 +346,6 @@ void merge_duplicated_vertices_in_boundary_cycles( PolygonMesh& pm,
|
||||||
merge_duplicated_vertices_in_boundary_cycle(h, pm, np);
|
merge_duplicated_vertices_in_boundary_cycle(h, pm, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class PolygonMesh>
|
|
||||||
void merge_duplicated_vertices_in_boundary_cycles(PolygonMesh& pm)
|
|
||||||
{
|
|
||||||
merge_duplicated_vertices_in_boundary_cycles(pm, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class PolygonMesh>
|
|
||||||
void merge_duplicated_vertices_in_boundary_cycle(
|
|
||||||
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h,
|
|
||||||
PolygonMesh& pm)
|
|
||||||
{
|
|
||||||
merge_duplicated_vertices_in_boundary_cycle(h, pm, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} } // end of CGAL::Polygon_mesh_processing
|
} } // end of CGAL::Polygon_mesh_processing
|
||||||
|
|
||||||
#endif //CGAL_POLYGON_MESH_PROCESSING_MERGE_BORDER_VERTICES_H
|
#endif //CGAL_POLYGON_MESH_PROCESSING_MERGE_BORDER_VERTICES_H
|
||||||
|
|
|
||||||
|
|
@ -522,10 +522,10 @@ struct Polygon_soup_orienter
|
||||||
* @return `false` if some points were duplicated, thus producing a self-intersecting polyhedron.
|
* @return `false` if some points were duplicated, thus producing a self-intersecting polyhedron.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <class PointRange, class PolygonRange, class NamedParameters>
|
template <class PointRange, class PolygonRange, class NamedParameters = parameters::Default_named_parameters>
|
||||||
bool orient_polygon_soup(PointRange& points,
|
bool orient_polygon_soup(PointRange& points,
|
||||||
PolygonRange& polygons,
|
PolygonRange& polygons,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -546,14 +546,6 @@ bool orient_polygon_soup(PointRange& points,
|
||||||
return inital_nb_pts==points.size();
|
return inital_nb_pts==points.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class PointRange, class PolygonRange>
|
|
||||||
bool orient_polygon_soup(PointRange& points,
|
|
||||||
PolygonRange& polygons)
|
|
||||||
{
|
|
||||||
return orient_polygon_soup(points, polygons, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} }//end namespace CGAL::Polygon_mesh_processing
|
} }//end namespace CGAL::Polygon_mesh_processing
|
||||||
|
|
||||||
#include <CGAL/enable_warnings.h>
|
#include <CGAL/enable_warnings.h>
|
||||||
|
|
|
||||||
|
|
@ -118,13 +118,13 @@ duplicate_non_manifold_edges_in_polygon_soup(PointRange& points,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template <class Concurrency_tag = Sequential_tag, class PointRange, class TriangleRange,
|
template <class Concurrency_tag = Sequential_tag, class PointRange, class TriangleRange,
|
||||||
class TriangleMesh, class NamedParameters>
|
class TriangleMesh, class NamedParameters = parameters::Default_named_parameters>
|
||||||
void
|
void
|
||||||
orient_triangle_soup_with_reference_triangle_mesh(
|
orient_triangle_soup_with_reference_triangle_mesh(
|
||||||
const TriangleMesh& tm_ref,
|
const TriangleMesh& tm_ref,
|
||||||
PointRange& points,
|
PointRange& points,
|
||||||
TriangleRange& triangles,
|
TriangleRange& triangles,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
namespace PMP = CGAL::Polygon_mesh_processing;
|
namespace PMP = CGAL::Polygon_mesh_processing;
|
||||||
|
|
||||||
|
|
@ -187,17 +187,5 @@ orient_triangle_soup_with_reference_triangle_mesh(
|
||||||
process_facet);
|
process_facet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class Concurrency_tag = Sequential_tag, class PointRange, class TriangleRange,
|
|
||||||
class TriangleMesh>
|
|
||||||
void
|
|
||||||
orient_triangle_soup_with_reference_triangle_mesh(
|
|
||||||
const TriangleMesh& tm_ref,
|
|
||||||
PointRange& points,
|
|
||||||
TriangleRange& triangles)
|
|
||||||
{
|
|
||||||
orient_triangle_soup_with_reference_triangle_mesh<Concurrency_tag>(tm_ref, points, triangles, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
}}//end namespace CGAL::Polygon_mesh_processing
|
}}//end namespace CGAL::Polygon_mesh_processing
|
||||||
#endif // CGAL_ORIENT_POLYGON_SOUP_EXTENSION_H
|
#endif // CGAL_ORIENT_POLYGON_SOUP_EXTENSION_H
|
||||||
|
|
|
||||||
|
|
@ -181,9 +181,9 @@ namespace internal{
|
||||||
*
|
*
|
||||||
* \sa `CGAL::Polygon_mesh_processing::reverse_face_orientations()`
|
* \sa `CGAL::Polygon_mesh_processing::reverse_face_orientations()`
|
||||||
*/
|
*/
|
||||||
template<typename TriangleMesh, typename NamedParameters>
|
template<typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool is_outward_oriented(const TriangleMesh& tm,
|
bool is_outward_oriented(const TriangleMesh& tm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_warning(CGAL::is_closed(tm));
|
CGAL_warning(CGAL::is_closed(tm));
|
||||||
CGAL_warning(CGAL::is_triangle_mesh(tm));
|
CGAL_warning(CGAL::is_triangle_mesh(tm));
|
||||||
|
|
@ -230,17 +230,6 @@ bool is_outward_oriented(const TriangleMesh& tm,
|
||||||
return internal::is_outward_oriented(v_max, tm, np);
|
return internal::is_outward_oriented(v_max, tm, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
///\cond SKIP_IN_MANUAL
|
|
||||||
|
|
||||||
template<typename TriangleMesh>
|
|
||||||
bool is_outward_oriented(const TriangleMesh& tm)
|
|
||||||
{
|
|
||||||
return is_outward_oriented(tm,
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
template<typename PolygonMesh>
|
template<typename PolygonMesh>
|
||||||
void reverse_orientation(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor first, PolygonMesh& pmesh)
|
void reverse_orientation(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor first, PolygonMesh& pmesh)
|
||||||
{
|
{
|
||||||
|
|
@ -405,9 +394,9 @@ void reverse_face_orientations(const FaceRange& face_range, PolygonMesh& pmesh)
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
*/
|
*/
|
||||||
template<class TriangleMesh, class NamedParameters>
|
template<class TriangleMesh, class NamedParameters = parameters::Default_named_parameters>
|
||||||
void orient(TriangleMesh& tm,
|
void orient(TriangleMesh& tm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef boost::graph_traits<TriangleMesh> Graph_traits;
|
typedef boost::graph_traits<TriangleMesh> Graph_traits;
|
||||||
typedef typename Graph_traits::vertex_descriptor vertex_descriptor;
|
typedef typename Graph_traits::vertex_descriptor vertex_descriptor;
|
||||||
|
|
@ -472,12 +461,6 @@ void orient(TriangleMesh& tm,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class TriangleMesh>
|
|
||||||
void orient(TriangleMesh& tm)
|
|
||||||
{
|
|
||||||
orient(tm, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \ingroup PMP_orientation_grp
|
* \ingroup PMP_orientation_grp
|
||||||
* Enumeration type used to indicate the status of a set of faces
|
* Enumeration type used to indicate the status of a set of faces
|
||||||
|
|
@ -811,11 +794,11 @@ void set_cc_intersecting_pairs(
|
||||||
*
|
*
|
||||||
* \return the number of volume components defined by `tm`
|
* \return the number of volume components defined by `tm`
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh, class VolumeFaceIndexMap, class NamedParameters>
|
template <class TriangleMesh, class VolumeFaceIndexMap, class NamedParameters = parameters::Default_named_parameters>
|
||||||
std::size_t
|
std::size_t
|
||||||
volume_connected_components(const TriangleMesh& tm,
|
volume_connected_components(const TriangleMesh& tm,
|
||||||
VolumeFaceIndexMap volume_id_map,
|
VolumeFaceIndexMap volume_id_map,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_precondition(is_triangle_mesh(tm));
|
CGAL_precondition(is_triangle_mesh(tm));
|
||||||
CGAL_precondition(is_closed(tm));
|
CGAL_precondition(is_closed(tm));
|
||||||
|
|
@ -1269,8 +1252,8 @@ volume_connected_components(const TriangleMesh& tm,
|
||||||
*
|
*
|
||||||
* \see `CGAL::Polygon_mesh_processing::orient_to_bound_a_volume()`
|
* \see `CGAL::Polygon_mesh_processing::orient_to_bound_a_volume()`
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh, class NamedParameters>
|
template <class TriangleMesh, class NamedParameters = parameters::Default_named_parameters>
|
||||||
bool does_bound_a_volume(const TriangleMesh& tm, const NamedParameters& np)
|
bool does_bound_a_volume(const TriangleMesh& tm, const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef boost::graph_traits<TriangleMesh> GT;
|
typedef boost::graph_traits<TriangleMesh> GT;
|
||||||
typedef typename GT::face_descriptor face_descriptor;
|
typedef typename GT::face_descriptor face_descriptor;
|
||||||
|
|
@ -1287,21 +1270,6 @@ bool does_bound_a_volume(const TriangleMesh& tm, const NamedParameters& np)
|
||||||
return res!=0;
|
return res!=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
template <class TriangleMesh>
|
|
||||||
bool does_bound_a_volume(const TriangleMesh& tm)
|
|
||||||
{
|
|
||||||
return does_bound_a_volume(tm, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TriangleMesh, class VolumeFaceIndexMap>
|
|
||||||
std::size_t volume_connected_components(const TriangleMesh& tm, VolumeFaceIndexMap volume_id_map)
|
|
||||||
{
|
|
||||||
return volume_connected_components(tm, volume_id_map, parameters::all_default());
|
|
||||||
}
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
|
|
||||||
/** \ingroup PMP_orientation_grp
|
/** \ingroup PMP_orientation_grp
|
||||||
*
|
*
|
||||||
* orients the connected components of `tm` to make it bound a volume.
|
* orients the connected components of `tm` to make it bound a volume.
|
||||||
|
|
@ -1349,9 +1317,9 @@ std::size_t volume_connected_components(const TriangleMesh& tm, VolumeFaceIndexM
|
||||||
*
|
*
|
||||||
* \see `CGAL::Polygon_mesh_processing::does_bound_a_volume()`
|
* \see `CGAL::Polygon_mesh_processing::does_bound_a_volume()`
|
||||||
*/
|
*/
|
||||||
template <class TriangleMesh, class NamedParameters>
|
template <class TriangleMesh, class NamedParameters = parameters::Default_named_parameters>
|
||||||
void orient_to_bound_a_volume(TriangleMesh& tm,
|
void orient_to_bound_a_volume(TriangleMesh& tm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef boost::graph_traits<TriangleMesh> Graph_traits;
|
typedef boost::graph_traits<TriangleMesh> Graph_traits;
|
||||||
typedef typename Graph_traits::face_descriptor face_descriptor;
|
typedef typename Graph_traits::face_descriptor face_descriptor;
|
||||||
|
|
@ -1415,12 +1383,6 @@ void orient_to_bound_a_volume(TriangleMesh& tm,
|
||||||
reverse_face_orientations(faces_to_reverse, tm);
|
reverse_face_orientations(faces_to_reverse, tm);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class TriangleMesh>
|
|
||||||
void orient_to_bound_a_volume(TriangleMesh& tm)
|
|
||||||
{
|
|
||||||
orient_to_bound_a_volume(tm, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \ingroup PMP_orientation_grp
|
* \ingroup PMP_orientation_grp
|
||||||
* reverses the connected components of `tm` having compatible boundary cycles
|
* reverses the connected components of `tm` having compatible boundary cycles
|
||||||
|
|
@ -1460,9 +1422,9 @@ void orient_to_bound_a_volume(TriangleMesh& tm)
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
*/
|
*/
|
||||||
template <class PolygonMesh, class NamedParameters>
|
template <class PolygonMesh, class NamedParameters = parameters::Default_named_parameters>
|
||||||
void merge_reversible_connected_components(PolygonMesh& pm,
|
void merge_reversible_connected_components(PolygonMesh& pm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef boost::graph_traits<PolygonMesh> GrT;
|
typedef boost::graph_traits<PolygonMesh> GrT;
|
||||||
typedef typename GrT::face_descriptor face_descriptor;
|
typedef typename GrT::face_descriptor face_descriptor;
|
||||||
|
|
@ -1627,11 +1589,6 @@ void merge_reversible_connected_components(PolygonMesh& pm,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class PolygonMesh>
|
|
||||||
void merge_reversible_connected_components(PolygonMesh& pm)
|
|
||||||
{
|
|
||||||
merge_reversible_connected_components(pm, parameters::all_default());
|
|
||||||
}
|
|
||||||
} // namespace Polygon_mesh_processing
|
} // namespace Polygon_mesh_processing
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
#endif // CGAL_ORIENT_POLYGON_MESH_H
|
#endif // CGAL_ORIENT_POLYGON_MESH_H
|
||||||
|
|
|
||||||
|
|
@ -68,11 +68,11 @@ namespace Polygon_mesh_processing {
|
||||||
///
|
///
|
||||||
template<typename PolygonMesh,
|
template<typename PolygonMesh,
|
||||||
typename PointRange, typename PolygonRange,
|
typename PointRange, typename PolygonRange,
|
||||||
typename NamedParameters>
|
typename NamedParameters = parameters::Default_named_parameters>
|
||||||
void polygon_mesh_to_polygon_soup(const PolygonMesh& mesh,
|
void polygon_mesh_to_polygon_soup(const PolygonMesh& mesh,
|
||||||
PointRange& points,
|
PointRange& points,
|
||||||
PolygonRange& polygons,
|
PolygonRange& polygons,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
|
typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor vertex_descriptor;
|
||||||
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
|
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
|
||||||
|
|
@ -117,18 +117,6 @@ void polygon_mesh_to_polygon_soup(const PolygonMesh& mesh,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
|
|
||||||
template<typename PolygonMesh, typename PointRange, typename PolygonRange>
|
|
||||||
void polygon_mesh_to_polygon_soup(const PolygonMesh& mesh,
|
|
||||||
PointRange& points,
|
|
||||||
PolygonRange& polygons)
|
|
||||||
{
|
|
||||||
return polygon_mesh_to_polygon_soup(mesh, points, polygons, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
} // namespace Polygon_mesh_processing
|
} // namespace Polygon_mesh_processing
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -269,12 +269,12 @@ bool is_polygon_soup_a_polygon_mesh(const PolygonRange& polygons)
|
||||||
*/
|
*/
|
||||||
template<typename PolygonMesh,
|
template<typename PolygonMesh,
|
||||||
typename PointRange, typename PolygonRange,
|
typename PointRange, typename PolygonRange,
|
||||||
typename NamedParameters_PS, typename NamedParameters_PM>
|
typename NamedParameters_PS = parameters::Default_named_parameters, typename NamedParameters_PM = parameters::Default_named_parameters>
|
||||||
void polygon_soup_to_polygon_mesh(const PointRange& points,
|
void polygon_soup_to_polygon_mesh(const PointRange& points,
|
||||||
const PolygonRange& polygons,
|
const PolygonRange& polygons,
|
||||||
PolygonMesh& out,
|
PolygonMesh& out,
|
||||||
const NamedParameters_PS& np_ps,
|
const NamedParameters_PS& np_ps = parameters::use_default_values(),
|
||||||
const NamedParameters_PM& np_pm)
|
const NamedParameters_PM& np_pm = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_precondition_msg(is_polygon_soup_a_polygon_mesh(polygons),
|
CGAL_precondition_msg(is_polygon_soup_a_polygon_mesh(polygons),
|
||||||
"Input soup needs to define a valid polygon mesh! See is_polygon_soup_a_polygon_mesh() for further information.");
|
"Input soup needs to define a valid polygon mesh! See is_polygon_soup_a_polygon_mesh() for further information.");
|
||||||
|
|
@ -293,29 +293,6 @@ void polygon_soup_to_polygon_mesh(const PointRange& points,
|
||||||
converter(out, vpm);
|
converter(out, vpm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
|
|
||||||
template<typename PolygonMesh,
|
|
||||||
typename PointRange, typename PolygonRange,
|
|
||||||
typename NamedParameters_PS>
|
|
||||||
void polygon_soup_to_polygon_mesh(const PointRange& points,
|
|
||||||
const PolygonRange& polygons,
|
|
||||||
PolygonMesh& out,
|
|
||||||
const NamedParameters_PS& np_ps)
|
|
||||||
{
|
|
||||||
return polygon_soup_to_polygon_mesh(points, polygons, out, np_ps, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename PolygonMesh, typename PointRange, typename PolygonRange>
|
|
||||||
void polygon_soup_to_polygon_mesh(const PointRange& points,
|
|
||||||
const PolygonRange& polygons,
|
|
||||||
PolygonMesh& out)
|
|
||||||
{
|
|
||||||
return polygon_soup_to_polygon_mesh(points, polygons, out, parameters::all_default(), parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
} // namespace Polygon_mesh_processing
|
} // namespace Polygon_mesh_processing
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,11 +152,11 @@ namespace internal {
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template<typename VertexRange, typename TriangleMesh, typename NamedParameters>
|
template<typename VertexRange, typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
void random_perturbation(VertexRange vertices
|
void random_perturbation(VertexRange vertices
|
||||||
, TriangleMesh& tmesh
|
, TriangleMesh& tmesh
|
||||||
, const double& perturbation_max_size
|
, const double& perturbation_max_size
|
||||||
, const NamedParameters& np)
|
, const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef TriangleMesh PM;
|
typedef TriangleMesh PM;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -212,32 +212,13 @@ void random_perturbation(VertexRange vertices
|
||||||
* \ingroup PMP_meshing_grp
|
* \ingroup PMP_meshing_grp
|
||||||
* @brief same as above, but all non-border vertices of `tmesh` are perturbed.
|
* @brief same as above, but all non-border vertices of `tmesh` are perturbed.
|
||||||
*/
|
*/
|
||||||
template<typename TriangleMesh, typename NamedParameters>
|
template<typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
void random_perturbation(TriangleMesh& tmesh
|
void random_perturbation(TriangleMesh& tmesh
|
||||||
, const double& perturbation_max_size
|
, const double& perturbation_max_size
|
||||||
, const NamedParameters& np)
|
, const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
random_perturbation(vertices(tmesh), tmesh, perturbation_max_size, np);
|
random_perturbation(vertices(tmesh), tmesh, perturbation_max_size, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename VertexRange, typename TriangleMesh>
|
|
||||||
void random_perturbation(VertexRange vertices
|
|
||||||
, TriangleMesh& tmesh
|
|
||||||
, const double& perturbation_max_size)
|
|
||||||
{
|
|
||||||
random_perturbation(vertices, tmesh, perturbation_max_size,
|
|
||||||
parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename TriangleMesh>
|
|
||||||
void random_perturbation(TriangleMesh& tmesh
|
|
||||||
, const double& perturbation_max_size)
|
|
||||||
{
|
|
||||||
random_perturbation(tmesh,
|
|
||||||
perturbation_max_size,
|
|
||||||
parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} //end namespace Polygon_mesh_processing
|
} //end namespace Polygon_mesh_processing
|
||||||
} //end namespace CGAL
|
} //end namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,13 +72,13 @@ namespace Polygon_mesh_processing {
|
||||||
typename FaceRange,
|
typename FaceRange,
|
||||||
typename FaceOutputIterator,
|
typename FaceOutputIterator,
|
||||||
typename VertexOutputIterator,
|
typename VertexOutputIterator,
|
||||||
typename NamedParameters>
|
typename NamedParameters = parameters::Default_named_parameters>
|
||||||
std::pair<FaceOutputIterator, VertexOutputIterator>
|
std::pair<FaceOutputIterator, VertexOutputIterator>
|
||||||
refine(TriangleMesh& tmesh,
|
refine(TriangleMesh& tmesh,
|
||||||
const FaceRange& faces,
|
const FaceRange& faces,
|
||||||
FaceOutputIterator faces_out,
|
FaceOutputIterator faces_out,
|
||||||
VertexOutputIterator vertices_out,
|
VertexOutputIterator vertices_out,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -97,22 +97,6 @@ namespace Polygon_mesh_processing {
|
||||||
return std::make_pair(faces_out, vertices_out);
|
return std::make_pair(faces_out, vertices_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
///\cond SKIP_IN_MANUAL
|
|
||||||
template<typename TriangleMesh,
|
|
||||||
typename FaceRange,
|
|
||||||
typename FaceOutputIterator,
|
|
||||||
typename VertexOutputIterator>
|
|
||||||
|
|
||||||
std::pair<FaceOutputIterator, VertexOutputIterator>
|
|
||||||
refine(TriangleMesh& tmesh,
|
|
||||||
const FaceRange& faces,
|
|
||||||
FaceOutputIterator faces_out,
|
|
||||||
VertexOutputIterator vertices_out)
|
|
||||||
{
|
|
||||||
return refine(tmesh, faces, faces_out, vertices_out,
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
///\endcond
|
|
||||||
}//end namespace Polygon_mesh_processing
|
}//end namespace Polygon_mesh_processing
|
||||||
|
|
||||||
}//end namespace CGAL
|
}//end namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -192,11 +192,11 @@ namespace Polygon_mesh_processing {
|
||||||
*/
|
*/
|
||||||
template<typename PolygonMesh
|
template<typename PolygonMesh
|
||||||
, typename FaceRange
|
, typename FaceRange
|
||||||
, typename NamedParameters>
|
, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
void isotropic_remeshing(const FaceRange& faces
|
void isotropic_remeshing(const FaceRange& faces
|
||||||
, const double& target_edge_length
|
, const double& target_edge_length
|
||||||
, PolygonMesh& pmesh
|
, PolygonMesh& pmesh
|
||||||
, const NamedParameters& np)
|
, const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
if (boost::begin(faces)==boost::end(faces))
|
if (boost::begin(faces)==boost::end(faces))
|
||||||
return;
|
return;
|
||||||
|
|
@ -337,20 +337,6 @@ void isotropic_remeshing(const FaceRange& faces
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename PolygonMesh
|
|
||||||
, typename FaceRange>
|
|
||||||
void isotropic_remeshing(
|
|
||||||
const FaceRange& faces
|
|
||||||
, const double& target_edge_length
|
|
||||||
, PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
isotropic_remeshing(
|
|
||||||
faces,
|
|
||||||
target_edge_length,
|
|
||||||
pmesh,
|
|
||||||
parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \ingroup PMP_meshing_grp
|
* \ingroup PMP_meshing_grp
|
||||||
* @brief splits the edges listed in `edges` into sub-edges
|
* @brief splits the edges listed in `edges` into sub-edges
|
||||||
|
|
@ -404,11 +390,11 @@ void isotropic_remeshing(
|
||||||
*/
|
*/
|
||||||
template<typename PolygonMesh
|
template<typename PolygonMesh
|
||||||
, typename EdgeRange
|
, typename EdgeRange
|
||||||
, typename NamedParameters>
|
, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
void split_long_edges(const EdgeRange& edges
|
void split_long_edges(const EdgeRange& edges
|
||||||
, const double& max_length
|
, const double& max_length
|
||||||
, PolygonMesh& pmesh
|
, PolygonMesh& pmesh
|
||||||
, const NamedParameters& np)
|
, const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef PolygonMesh PM;
|
typedef PolygonMesh PM;
|
||||||
typedef typename boost::graph_traits<PM>::edge_descriptor edge_descriptor;
|
typedef typename boost::graph_traits<PM>::edge_descriptor edge_descriptor;
|
||||||
|
|
@ -448,17 +434,6 @@ void split_long_edges(const EdgeRange& edges
|
||||||
remesher.split_long_edges(edges, max_length);
|
remesher.split_long_edges(edges, max_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename PolygonMesh, typename EdgeRange>
|
|
||||||
void split_long_edges(const EdgeRange& edges
|
|
||||||
, const double& max_length
|
|
||||||
, PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
split_long_edges(edges,
|
|
||||||
max_length,
|
|
||||||
pmesh,
|
|
||||||
parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} //end namespace Polygon_mesh_processing
|
} //end namespace Polygon_mesh_processing
|
||||||
} //end namespace CGAL
|
} //end namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,9 +148,9 @@ std::size_t remove_isolated_vertices(PolygonMesh& pmesh)
|
||||||
/// \return the number of connected components removed (ignoring isolated vertices).
|
/// \return the number of connected components removed (ignoring isolated vertices).
|
||||||
///
|
///
|
||||||
template <typename TriangleMesh,
|
template <typename TriangleMesh,
|
||||||
typename NamedParameters>
|
typename NamedParameters = parameters::Default_named_parameters>
|
||||||
std::size_t remove_connected_components_of_negligible_size(TriangleMesh& tmesh,
|
std::size_t remove_connected_components_of_negligible_size(TriangleMesh& tmesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::is_default_parameter;
|
using parameters::is_default_parameter;
|
||||||
|
|
@ -339,12 +339,6 @@ std::size_t remove_connected_components_of_negligible_size(TriangleMesh& tmesh,
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename TriangleMesh>
|
|
||||||
std::size_t remove_connected_components_of_negligible_size(TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
return remove_connected_components_of_negligible_size(tmesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Polygon_mesh_processing
|
} // namespace Polygon_mesh_processing
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -529,13 +529,13 @@ struct Filter_wrapper_for_cap_needle_removal<TriangleMesh, VPM, Traits, Identity
|
||||||
namespace experimental {
|
namespace experimental {
|
||||||
|
|
||||||
// @todo check what to use as priority queue with removable elements, set might not be optimal
|
// @todo check what to use as priority queue with removable elements, set might not be optimal
|
||||||
template <typename FaceRange, typename TriangleMesh, typename NamedParameters>
|
template <typename FaceRange, typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool remove_almost_degenerate_faces(const FaceRange& face_range,
|
bool remove_almost_degenerate_faces(const FaceRange& face_range,
|
||||||
TriangleMesh& tmesh,
|
TriangleMesh& tmesh,
|
||||||
const double cap_threshold,
|
const double cap_threshold,
|
||||||
const double needle_threshold,
|
const double needle_threshold,
|
||||||
const double collapse_length_threshold,
|
const double collapse_length_threshold,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using CGAL::parameters::choose_parameter;
|
using CGAL::parameters::choose_parameter;
|
||||||
using CGAL::parameters::get_parameter;
|
using CGAL::parameters::get_parameter;
|
||||||
|
|
@ -908,40 +908,17 @@ bool remove_almost_degenerate_faces(const FaceRange& face_range,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FaceRange, typename TriangleMesh>
|
|
||||||
bool remove_almost_degenerate_faces(const FaceRange& face_range,
|
|
||||||
TriangleMesh& tmesh,
|
|
||||||
const double cap_threshold,
|
|
||||||
const double needle_threshold,
|
|
||||||
const double collapse_length_threshold)
|
|
||||||
{
|
|
||||||
return remove_almost_degenerate_faces(face_range, tmesh,
|
|
||||||
cap_threshold, needle_threshold, collapse_length_threshold,
|
|
||||||
CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool remove_almost_degenerate_faces(TriangleMesh& tmesh,
|
bool remove_almost_degenerate_faces(TriangleMesh& tmesh,
|
||||||
const double cap_threshold,
|
const double cap_threshold,
|
||||||
const double needle_threshold,
|
const double needle_threshold,
|
||||||
const double collapse_length_threshold,
|
const double collapse_length_threshold,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
return remove_almost_degenerate_faces(faces(tmesh), tmesh, cap_threshold, needle_threshold,
|
return remove_almost_degenerate_faces(faces(tmesh), tmesh, cap_threshold, needle_threshold,
|
||||||
collapse_length_threshold, np);
|
collapse_length_threshold, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class TriangleMesh>
|
|
||||||
bool remove_almost_degenerate_faces(TriangleMesh& tmesh,
|
|
||||||
const double cap_threshold,
|
|
||||||
const double needle_threshold,
|
|
||||||
const double collapse_length_threshold)
|
|
||||||
{
|
|
||||||
return remove_almost_degenerate_faces(faces(tmesh), tmesh,
|
|
||||||
cap_threshold, needle_threshold, collapse_length_threshold,
|
|
||||||
CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace experimental
|
} // namespace experimental
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -1225,11 +1202,11 @@ remove_a_border_edge(typename boost::graph_traits<TriangleMesh>::edge_descriptor
|
||||||
return remove_a_border_edge(ed, tm, input_range, edge_set, face_set);
|
return remove_a_border_edge(ed, tm, input_range, edge_set, face_set);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename EdgeRange, typename TriangleMesh, typename NamedParameters, typename FaceSet>
|
template <typename EdgeRange, typename TriangleMesh, typename FaceSet, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool remove_degenerate_edges(const EdgeRange& edge_range,
|
bool remove_degenerate_edges(const EdgeRange& edge_range,
|
||||||
TriangleMesh& tmesh,
|
TriangleMesh& tmesh,
|
||||||
FaceSet& face_set,
|
FaceSet& face_set,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_assertion(CGAL::is_triangle_mesh(tmesh));
|
CGAL_assertion(CGAL::is_triangle_mesh(tmesh));
|
||||||
CGAL_assertion(CGAL::is_valid_polygon_mesh(tmesh));
|
CGAL_assertion(CGAL::is_valid_polygon_mesh(tmesh));
|
||||||
|
|
@ -1731,7 +1708,7 @@ bool remove_degenerate_edges(const EdgeRange& edge_range,
|
||||||
template <typename EdgeRange, typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename EdgeRange, typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool remove_degenerate_edges(const EdgeRange& edge_range,
|
bool remove_degenerate_edges(const EdgeRange& edge_range,
|
||||||
TriangleMesh& tmesh,
|
TriangleMesh& tmesh,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
std::set<typename boost::graph_traits<TriangleMesh>::face_descriptor> face_set;
|
std::set<typename boost::graph_traits<TriangleMesh>::face_descriptor> face_set;
|
||||||
return remove_degenerate_edges(edge_range, tmesh, face_set, np);
|
return remove_degenerate_edges(edge_range, tmesh, face_set, np);
|
||||||
|
|
@ -1739,27 +1716,12 @@ bool remove_degenerate_edges(const EdgeRange& edge_range,
|
||||||
|
|
||||||
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool remove_degenerate_edges(TriangleMesh& tmesh,
|
bool remove_degenerate_edges(TriangleMesh& tmesh,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
std::set<typename boost::graph_traits<TriangleMesh>::face_descriptor> face_set;
|
std::set<typename boost::graph_traits<TriangleMesh>::face_descriptor> face_set;
|
||||||
return remove_degenerate_edges(edges(tmesh), tmesh, face_set, np);
|
return remove_degenerate_edges(edges(tmesh), tmesh, face_set, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename EdgeRange, typename TriangleMesh>
|
|
||||||
bool remove_degenerate_edges(const EdgeRange& edge_range,
|
|
||||||
TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
std::set<typename boost::graph_traits<TriangleMesh>::face_descriptor> face_set;
|
|
||||||
return remove_degenerate_edges(edge_range, tmesh, face_set, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename TriangleMesh>
|
|
||||||
bool remove_degenerate_edges(TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
std::set<typename boost::graph_traits<TriangleMesh>::face_descriptor> face_set;
|
|
||||||
return remove_degenerate_edges(edges(tmesh), tmesh, face_set, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
// \ingroup PMP_repairing_grp
|
// \ingroup PMP_repairing_grp
|
||||||
// removes the degenerate faces from a triangulated surface mesh.
|
// removes the degenerate faces from a triangulated surface mesh.
|
||||||
// A face is considered degenerate if two of its vertices share the same location,
|
// A face is considered degenerate if two of its vertices share the same location,
|
||||||
|
|
@ -1801,10 +1763,10 @@ bool remove_degenerate_edges(TriangleMesh& tmesh)
|
||||||
// We should probably do something with the return type.
|
// We should probably do something with the return type.
|
||||||
//
|
//
|
||||||
// \return `true` if all degenerate faces were successfully removed, and `false` otherwise.
|
// \return `true` if all degenerate faces were successfully removed, and `false` otherwise.
|
||||||
template <typename FaceRange, typename TriangleMesh, typename NamedParameters>
|
template <typename FaceRange, typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool remove_degenerate_faces(const FaceRange& face_range,
|
bool remove_degenerate_faces(const FaceRange& face_range,
|
||||||
TriangleMesh& tmesh,
|
TriangleMesh& tmesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_assertion(CGAL::is_triangle_mesh(tmesh));
|
CGAL_assertion(CGAL::is_triangle_mesh(tmesh));
|
||||||
CGAL_assertion(CGAL::is_valid_polygon_mesh(tmesh));
|
CGAL_assertion(CGAL::is_valid_polygon_mesh(tmesh));
|
||||||
|
|
@ -2617,26 +2579,13 @@ bool remove_degenerate_faces(const FaceRange& face_range,
|
||||||
return all_removed;
|
return all_removed;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FaceRange, typename TriangleMesh>
|
|
||||||
bool remove_degenerate_faces(const FaceRange& face_range,
|
|
||||||
TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
return remove_degenerate_faces(face_range, tmesh, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool remove_degenerate_faces(TriangleMesh& tmesh,
|
bool remove_degenerate_faces(TriangleMesh& tmesh,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
return remove_degenerate_faces(faces(tmesh), tmesh, np);
|
return remove_degenerate_faces(faces(tmesh), tmesh, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename TriangleMesh>
|
|
||||||
bool remove_degenerate_faces(TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
return remove_degenerate_faces(tmesh, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Polygon_mesh_processing
|
} // namespace Polygon_mesh_processing
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -475,10 +475,10 @@ std::size_t remove_isolated_points_in_polygon_soup(PointRange& points,
|
||||||
///
|
///
|
||||||
/// \returns the number of removed points
|
/// \returns the number of removed points
|
||||||
///
|
///
|
||||||
template <typename PointRange, typename PolygonRange, typename NamedParameters>
|
template <typename PointRange, typename PolygonRange, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
std::size_t merge_duplicate_points_in_polygon_soup(PointRange& points,
|
std::size_t merge_duplicate_points_in_polygon_soup(PointRange& points,
|
||||||
PolygonRange& polygons,
|
PolygonRange& polygons,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename internal::Polygon_types<PointRange, PolygonRange>::P_ID P_ID;
|
typedef typename internal::Polygon_types<PointRange, PolygonRange>::P_ID P_ID;
|
||||||
typedef typename internal::Polygon_types<PointRange, PolygonRange>::Point_3 Point_3;
|
typedef typename internal::Polygon_types<PointRange, PolygonRange>::Point_3 Point_3;
|
||||||
|
|
@ -549,13 +549,6 @@ std::size_t merge_duplicate_points_in_polygon_soup(PointRange& points,
|
||||||
return removed_points_n;
|
return removed_points_n;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename PointRange, typename PolygonRange>
|
|
||||||
std::size_t merge_duplicate_points_in_polygon_soup(PointRange& points,
|
|
||||||
PolygonRange& polygons)
|
|
||||||
{
|
|
||||||
return merge_duplicate_points_in_polygon_soup(points, polygons, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
// Find the position of the (arbitrarily chose) first point of the canonical point
|
// Find the position of the (arbitrarily chose) first point of the canonical point
|
||||||
|
|
@ -881,10 +874,10 @@ DuplicateOutputIterator collect_duplicate_polygons(const PointRange& points,
|
||||||
///
|
///
|
||||||
/// \returns the number of removed polygons
|
/// \returns the number of removed polygons
|
||||||
///
|
///
|
||||||
template <typename PointRange, typename PolygonRange, typename NamedParameters>
|
template <typename PointRange, typename PolygonRange, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
std::size_t merge_duplicate_polygons_in_polygon_soup(const PointRange& points,
|
std::size_t merge_duplicate_polygons_in_polygon_soup(const PointRange& points,
|
||||||
PolygonRange& polygons,
|
PolygonRange& polygons,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
|
|
@ -980,13 +973,6 @@ std::size_t merge_duplicate_polygons_in_polygon_soup(const PointRange& points,
|
||||||
return removed_polygons_n;
|
return removed_polygons_n;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename PointRange, typename PolygonRange>
|
|
||||||
std::size_t merge_duplicate_polygons_in_polygon_soup(PointRange& points,
|
|
||||||
PolygonRange& polygons)
|
|
||||||
{
|
|
||||||
return merge_duplicate_polygons_in_polygon_soup(points, polygons, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \ingroup PMP_repairing_grp
|
/// \ingroup PMP_repairing_grp
|
||||||
///
|
///
|
||||||
/// cleans a given polygon soup through various repairing operations. More precisely, this function
|
/// cleans a given polygon soup through various repairing operations. More precisely, this function
|
||||||
|
|
@ -1044,10 +1030,10 @@ std::size_t merge_duplicate_polygons_in_polygon_soup(PointRange& points,
|
||||||
/// \cgalParamNEnd
|
/// \cgalParamNEnd
|
||||||
/// \cgalNamedParamsEnd
|
/// \cgalNamedParamsEnd
|
||||||
///
|
///
|
||||||
template <typename PointRange, typename PolygonRange, typename NamedParameters>
|
template <typename PointRange, typename PolygonRange, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
void repair_polygon_soup(PointRange& points,
|
void repair_polygon_soup(PointRange& points,
|
||||||
PolygonRange& polygons,
|
PolygonRange& polygons,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
|
|
@ -1067,13 +1053,6 @@ void repair_polygon_soup(PointRange& points,
|
||||||
remove_isolated_points_in_polygon_soup(points, polygons);
|
remove_isolated_points_in_polygon_soup(points, polygons);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename PointRange, typename PolygonRange>
|
|
||||||
void repair_polygon_soup(PointRange& points,
|
|
||||||
PolygonRange& polygons)
|
|
||||||
{
|
|
||||||
return repair_polygon_soup(points, polygons, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // end namespace Polygon_mesh_processing
|
} // end namespace Polygon_mesh_processing
|
||||||
|
|
||||||
} // end namespace CGAL
|
} // end namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -1956,10 +1956,10 @@ struct Remove_self_intersection_default_visitor
|
||||||
double /* containment_epsilon */ ) {}
|
double /* containment_epsilon */ ) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename FaceRange, typename TriangleMesh, typename NamedParameters>
|
template <typename FaceRange, typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool remove_self_intersections(const FaceRange& face_range,
|
bool remove_self_intersections(const FaceRange& face_range,
|
||||||
TriangleMesh& tmesh,
|
TriangleMesh& tmesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -2104,24 +2104,12 @@ bool remove_self_intersections(const FaceRange& face_range,
|
||||||
return step < max_steps;
|
return step < max_steps;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FaceRange, typename TriangleMesh>
|
|
||||||
bool remove_self_intersections(const FaceRange& face_range, TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
return remove_self_intersections(face_range, tmesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool remove_self_intersections(TriangleMesh& tmesh, const CGAL_BGL_NP_CLASS& np)
|
bool remove_self_intersections(TriangleMesh& tmesh, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
return remove_self_intersections(faces(tmesh), tmesh, np);
|
return remove_self_intersections(faces(tmesh), tmesh, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename TriangleMesh>
|
|
||||||
bool remove_self_intersections(TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
return remove_self_intersections(tmesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace experimental
|
} // namespace experimental
|
||||||
} // namespace Polygon_mesh_processing
|
} // namespace Polygon_mesh_processing
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -456,30 +456,16 @@ template < class ConcurrencyTag = Sequential_tag,
|
||||||
class TriangleMesh,
|
class TriangleMesh,
|
||||||
class FaceRange,
|
class FaceRange,
|
||||||
class FacePairOutputIterator,
|
class FacePairOutputIterator,
|
||||||
class NamedParameters>
|
class NamedParameters = parameters::Default_named_parameters>
|
||||||
FacePairOutputIterator
|
FacePairOutputIterator
|
||||||
self_intersections(const FaceRange& face_range,
|
self_intersections(const FaceRange& face_range,
|
||||||
const TriangleMesh& tmesh,
|
const TriangleMesh& tmesh,
|
||||||
FacePairOutputIterator out,
|
FacePairOutputIterator out,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
return internal::self_intersections_impl<ConcurrencyTag>(face_range, tmesh, out, false /*don't throw*/, np);
|
return internal::self_intersections_impl<ConcurrencyTag>(face_range, tmesh, out, false /*don't throw*/, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
template <class ConcurrencyTag = Sequential_tag,
|
|
||||||
class TriangleMesh,
|
|
||||||
class FaceRange,
|
|
||||||
class FacePairOutputIterator>
|
|
||||||
FacePairOutputIterator
|
|
||||||
self_intersections(const FaceRange& face_range,
|
|
||||||
const TriangleMesh& tmesh,
|
|
||||||
FacePairOutputIterator out)
|
|
||||||
{
|
|
||||||
return self_intersections<ConcurrencyTag>(face_range, tmesh, out, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup PMP_intersection_grp
|
* \ingroup PMP_intersection_grp
|
||||||
* collects intersections between all the faces of a triangulated surface mesh.
|
* collects intersections between all the faces of a triangulated surface mesh.
|
||||||
|
|
@ -538,20 +524,11 @@ template <class ConcurrencyTag = Sequential_tag,
|
||||||
FacePairOutputIterator
|
FacePairOutputIterator
|
||||||
self_intersections(const TriangleMesh& tmesh,
|
self_intersections(const TriangleMesh& tmesh,
|
||||||
FacePairOutputIterator out,
|
FacePairOutputIterator out,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
return self_intersections<ConcurrencyTag>(faces(tmesh), tmesh, out, np);
|
return self_intersections<ConcurrencyTag>(faces(tmesh), tmesh, out, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
template <class ConcurrencyTag = Sequential_tag, class TriangleMesh, class FacePairOutputIterator>
|
|
||||||
FacePairOutputIterator
|
|
||||||
self_intersections(const TriangleMesh& tmesh, FacePairOutputIterator out)
|
|
||||||
{
|
|
||||||
return self_intersections<ConcurrencyTag>(faces(tmesh), tmesh, out, parameters::all_default());
|
|
||||||
}
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup PMP_intersection_grp
|
* \ingroup PMP_intersection_grp
|
||||||
* tests if a set of faces of a triangulated surface mesh self-intersects.
|
* tests if a set of faces of a triangulated surface mesh self-intersects.
|
||||||
|
|
@ -590,10 +567,10 @@ self_intersections(const TriangleMesh& tmesh, FacePairOutputIterator out)
|
||||||
template <class ConcurrencyTag = Sequential_tag,
|
template <class ConcurrencyTag = Sequential_tag,
|
||||||
class FaceRange,
|
class FaceRange,
|
||||||
class TriangleMesh,
|
class TriangleMesh,
|
||||||
class NamedParameters>
|
class NamedParameters = parameters::Default_named_parameters>
|
||||||
bool does_self_intersect(const FaceRange& face_range,
|
bool does_self_intersect(const FaceRange& face_range,
|
||||||
const TriangleMesh& tmesh,
|
const TriangleMesh& tmesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_precondition(CGAL::is_triangle_mesh(tmesh));
|
CGAL_precondition(CGAL::is_triangle_mesh(tmesh));
|
||||||
|
|
||||||
|
|
@ -657,26 +634,11 @@ template <class ConcurrencyTag = Sequential_tag,
|
||||||
class TriangleMesh,
|
class TriangleMesh,
|
||||||
class CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
class CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool does_self_intersect(const TriangleMesh& tmesh,
|
bool does_self_intersect(const TriangleMesh& tmesh,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
return does_self_intersect<ConcurrencyTag>(faces(tmesh), tmesh, np);
|
return does_self_intersect<ConcurrencyTag>(faces(tmesh), tmesh, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
template <class ConcurrencyTag = Sequential_tag, class TriangleMesh>
|
|
||||||
bool does_self_intersect(const TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
return does_self_intersect<ConcurrencyTag>(faces(tmesh), tmesh, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class ConcurrencyTag = Sequential_tag, class FaceRange, class TriangleMesh>
|
|
||||||
bool does_self_intersect(const FaceRange& face_range,
|
|
||||||
const TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
return does_self_intersect<ConcurrencyTag>(face_range, tmesh, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
}// namespace Polygon_mesh_processing
|
}// namespace Polygon_mesh_processing
|
||||||
}// namespace CGAL
|
}// namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,10 +66,10 @@ namespace Polygon_mesh_processing {
|
||||||
/// \sa `degenerate_edges()`
|
/// \sa `degenerate_edges()`
|
||||||
///
|
///
|
||||||
/// \return `true` if the edge `e` is degenerate, `false` otherwise.
|
/// \return `true` if the edge `e` is degenerate, `false` otherwise.
|
||||||
template <typename PolygonMesh, typename NamedParameters>
|
template <typename PolygonMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool is_degenerate_edge(typename boost::graph_traits<PolygonMesh>::edge_descriptor e,
|
bool is_degenerate_edge(typename boost::graph_traits<PolygonMesh>::edge_descriptor e,
|
||||||
const PolygonMesh& pm,
|
const PolygonMesh& pm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
|
|
@ -84,13 +84,6 @@ bool is_degenerate_edge(typename boost::graph_traits<PolygonMesh>::edge_descript
|
||||||
return traits.equal_3_object()(get(vpmap, source(e, pm)), get(vpmap, target(e, pm)));
|
return traits.equal_3_object()(get(vpmap, source(e, pm)), get(vpmap, target(e, pm)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename PolygonMesh>
|
|
||||||
bool is_degenerate_edge(typename boost::graph_traits<PolygonMesh>::edge_descriptor e,
|
|
||||||
const PolygonMesh& pm)
|
|
||||||
{
|
|
||||||
return is_degenerate_edge(e, pm, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \ingroup PMP_repairing_grp
|
/// \ingroup PMP_repairing_grp
|
||||||
/// collects the degenerate edges within a given range of edges.
|
/// collects the degenerate edges within a given range of edges.
|
||||||
///
|
///
|
||||||
|
|
@ -121,11 +114,11 @@ bool is_degenerate_edge(typename boost::graph_traits<PolygonMesh>::edge_descript
|
||||||
/// \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.}
|
/// \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.}
|
||||||
/// \cgalParamNEnd
|
/// \cgalParamNEnd
|
||||||
/// \cgalNamedParamsEnd
|
/// \cgalNamedParamsEnd
|
||||||
template <typename EdgeRange, typename TriangleMesh, typename OutputIterator, typename NamedParameters>
|
template <typename EdgeRange, typename TriangleMesh, typename OutputIterator, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
OutputIterator degenerate_edges(const EdgeRange& edges,
|
OutputIterator degenerate_edges(const EdgeRange& edges,
|
||||||
const TriangleMesh& tm,
|
const TriangleMesh& tm,
|
||||||
OutputIterator out,
|
OutputIterator out,
|
||||||
const NamedParameters& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<TriangleMesh>::edge_descriptor edge_descriptor;
|
typedef typename boost::graph_traits<TriangleMesh>::edge_descriptor edge_descriptor;
|
||||||
|
|
||||||
|
|
@ -136,43 +129,20 @@ OutputIterator degenerate_edges(const EdgeRange& edges,
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename EdgeRange, typename TriangleMesh, typename OutputIterator>
|
|
||||||
OutputIterator degenerate_edges(const EdgeRange& edges,
|
|
||||||
const TriangleMesh& tm,
|
|
||||||
OutputIterator out,
|
|
||||||
typename boost::enable_if<
|
|
||||||
typename boost::has_range_iterator<EdgeRange>
|
|
||||||
>::type* = 0)
|
|
||||||
{
|
|
||||||
return degenerate_edges(edges, tm, out, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \ingroup PMP_repairing_grp
|
/// \ingroup PMP_repairing_grp
|
||||||
/// calls the function `degenerate_edges()` with the range: `edges(tm)`.
|
/// calls the function `degenerate_edges()` with the range: `edges(tm)`.
|
||||||
///
|
///
|
||||||
/// See above for the comprehensive description of the parameters.
|
/// See above for the comprehensive description of the parameters.
|
||||||
///
|
///
|
||||||
template <typename TriangleMesh, typename OutputIterator, typename NamedParameters>
|
template <typename TriangleMesh, typename OutputIterator, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
OutputIterator degenerate_edges(const TriangleMesh& tm,
|
OutputIterator degenerate_edges(const TriangleMesh& tm,
|
||||||
OutputIterator out,
|
OutputIterator out,
|
||||||
const NamedParameters& np
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
|
||||||
,
|
|
||||||
typename boost::disable_if<
|
|
||||||
boost::has_range_iterator<TriangleMesh>
|
|
||||||
>::type* = 0
|
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return degenerate_edges(edges(tm), tm, out, np);
|
return degenerate_edges(edges(tm), tm, out, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename TriangleMesh, typename OutputIterator>
|
|
||||||
OutputIterator degenerate_edges(const TriangleMesh& tm, OutputIterator out)
|
|
||||||
{
|
|
||||||
return degenerate_edges(edges(tm), tm, out, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \ingroup PMP_repairing_grp
|
/// \ingroup PMP_repairing_grp
|
||||||
/// checks whether a triangle face is degenerate.
|
/// checks whether a triangle face is degenerate.
|
||||||
/// A triangle face is considered degenerate if the geometric positions of its vertices are collinear.
|
/// A triangle face is considered degenerate if the geometric positions of its vertices are collinear.
|
||||||
|
|
@ -204,10 +174,10 @@ OutputIterator degenerate_edges(const TriangleMesh& tm, OutputIterator out)
|
||||||
/// \sa `degenerate_faces()`
|
/// \sa `degenerate_faces()`
|
||||||
///
|
///
|
||||||
/// \return `true` if the face `f` is degenerate, `false` otherwise.
|
/// \return `true` if the face `f` is degenerate, `false` otherwise.
|
||||||
template <typename TriangleMesh, typename NamedParameters>
|
template <typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool is_degenerate_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descriptor f,
|
bool is_degenerate_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descriptor f,
|
||||||
const TriangleMesh& tm,
|
const TriangleMesh& tm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm));
|
CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm));
|
||||||
|
|
||||||
|
|
@ -228,13 +198,6 @@ bool is_degenerate_triangle_face(typename boost::graph_traits<TriangleMesh>::fac
|
||||||
get(vpmap, target(next(h, tm), tm)));
|
get(vpmap, target(next(h, tm), tm)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename TriangleMesh>
|
|
||||||
bool is_degenerate_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descriptor f,
|
|
||||||
const TriangleMesh& tm)
|
|
||||||
{
|
|
||||||
return CGAL::Polygon_mesh_processing::is_degenerate_triangle_face(f, tm, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \ingroup PMP_repairing_grp
|
/// \ingroup PMP_repairing_grp
|
||||||
/// collects the degenerate faces within a given range of faces.
|
/// collects the degenerate faces within a given range of faces.
|
||||||
///
|
///
|
||||||
|
|
@ -266,11 +229,11 @@ bool is_degenerate_triangle_face(typename boost::graph_traits<TriangleMesh>::fac
|
||||||
/// \cgalParamNEnd
|
/// \cgalParamNEnd
|
||||||
/// \cgalNamedParamsEnd
|
/// \cgalNamedParamsEnd
|
||||||
///
|
///
|
||||||
template <typename FaceRange, typename TriangleMesh, typename OutputIterator, typename NamedParameters>
|
template <typename FaceRange, typename TriangleMesh, typename OutputIterator, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
OutputIterator degenerate_faces(const FaceRange& faces,
|
OutputIterator degenerate_faces(const FaceRange& faces,
|
||||||
const TriangleMesh& tm,
|
const TriangleMesh& tm,
|
||||||
OutputIterator out,
|
OutputIterator out,
|
||||||
const NamedParameters& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<TriangleMesh>::face_descriptor face_descriptor;
|
typedef typename boost::graph_traits<TriangleMesh>::face_descriptor face_descriptor;
|
||||||
|
|
||||||
|
|
@ -282,43 +245,20 @@ OutputIterator degenerate_faces(const FaceRange& faces,
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FaceRange, typename TriangleMesh, typename OutputIterator>
|
|
||||||
OutputIterator degenerate_faces(const FaceRange& faces,
|
|
||||||
const TriangleMesh& tm,
|
|
||||||
OutputIterator out,
|
|
||||||
typename boost::enable_if<
|
|
||||||
boost::has_range_iterator<FaceRange>
|
|
||||||
>::type* = 0)
|
|
||||||
{
|
|
||||||
return degenerate_faces(faces, tm, out, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \ingroup PMP_repairing_grp
|
/// \ingroup PMP_repairing_grp
|
||||||
/// calls the function `degenerate_faces()` with the range: `faces(tm)`.
|
/// calls the function `degenerate_faces()` with the range: `faces(tm)`.
|
||||||
///
|
///
|
||||||
/// See above for the comprehensive description of the parameters.
|
/// See above for the comprehensive description of the parameters.
|
||||||
///
|
///
|
||||||
template <typename TriangleMesh, typename OutputIterator, typename NamedParameters>
|
template <typename TriangleMesh, typename OutputIterator, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
OutputIterator degenerate_faces(const TriangleMesh& tm,
|
OutputIterator degenerate_faces(const TriangleMesh& tm,
|
||||||
OutputIterator out,
|
OutputIterator out,
|
||||||
const NamedParameters& np
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
|
||||||
,
|
|
||||||
typename boost::disable_if<
|
|
||||||
boost::has_range_iterator<TriangleMesh>
|
|
||||||
>::type* = 0
|
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return degenerate_faces(faces(tm), tm, out, np);
|
return degenerate_faces(faces(tm), tm, out, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename TriangleMesh, typename OutputIterator>
|
|
||||||
OutputIterator degenerate_faces(const TriangleMesh& tm, OutputIterator out)
|
|
||||||
{
|
|
||||||
return degenerate_faces(faces(tm), tm, out, CGAL::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \ingroup PMP_repairing_grp
|
/// \ingroup PMP_repairing_grp
|
||||||
/// checks whether a triangle face is needle.
|
/// checks whether a triangle face is needle.
|
||||||
/// A triangle is said to be a <i>needle</i> if its longest edge is much longer than its shortest edge.
|
/// A triangle is said to be a <i>needle</i> if its longest edge is much longer than its shortest edge.
|
||||||
|
|
@ -350,12 +290,12 @@ OutputIterator degenerate_faces(const TriangleMesh& tm, OutputIterator out)
|
||||||
///
|
///
|
||||||
/// \return the shortest halfedge if the triangle face is a needle, and a null halfedge otherwise.
|
/// \return the shortest halfedge if the triangle face is a needle, and a null halfedge otherwise.
|
||||||
/// If the face contains degenerate edges, a halfedge corresponding to one of these edges is returned.
|
/// If the face contains degenerate edges, a halfedge corresponding to one of these edges is returned.
|
||||||
template <typename TriangleMesh, typename NamedParameters>
|
template <typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
typename boost::graph_traits<TriangleMesh>::halfedge_descriptor
|
typename boost::graph_traits<TriangleMesh>::halfedge_descriptor
|
||||||
is_needle_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descriptor f,
|
is_needle_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descriptor f,
|
||||||
const TriangleMesh& tm,
|
const TriangleMesh& tm,
|
||||||
const double threshold,
|
const double threshold,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_precondition(threshold >= 1.);
|
CGAL_precondition(threshold >= 1.);
|
||||||
CGAL_precondition(f != boost::graph_traits<TriangleMesh>::null_face());
|
CGAL_precondition(f != boost::graph_traits<TriangleMesh>::null_face());
|
||||||
|
|
@ -415,15 +355,6 @@ is_needle_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descrip
|
||||||
return boost::graph_traits<TriangleMesh>::null_halfedge();
|
return boost::graph_traits<TriangleMesh>::null_halfedge();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename TriangleMesh>
|
|
||||||
typename boost::graph_traits<TriangleMesh>::halfedge_descriptor
|
|
||||||
is_needle_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descriptor f,
|
|
||||||
const TriangleMesh& tm,
|
|
||||||
const double threshold)
|
|
||||||
{
|
|
||||||
return is_needle_triangle_face(f, tm, threshold, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \ingroup PMP_repairing_grp
|
/// \ingroup PMP_repairing_grp
|
||||||
/// checks whether a triangle face is a cap.
|
/// checks whether a triangle face is a cap.
|
||||||
/// A triangle is said to be a <i>cap</i> if one of the its angles is close to `180` degrees.
|
/// A triangle is said to be a <i>cap</i> if one of the its angles is close to `180` degrees.
|
||||||
|
|
@ -457,12 +388,12 @@ is_needle_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descrip
|
||||||
/// \cgalNamedParamsEnd
|
/// \cgalNamedParamsEnd
|
||||||
///
|
///
|
||||||
/// \return the halfedge opposite of the largest angle if the face is a cap, and a null halfedge otherwise.
|
/// \return the halfedge opposite of the largest angle if the face is a cap, and a null halfedge otherwise.
|
||||||
template <typename TriangleMesh, typename NamedParameters>
|
template <typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
typename boost::graph_traits<TriangleMesh>::halfedge_descriptor
|
typename boost::graph_traits<TriangleMesh>::halfedge_descriptor
|
||||||
is_cap_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descriptor f,
|
is_cap_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descriptor f,
|
||||||
const TriangleMesh& tm,
|
const TriangleMesh& tm,
|
||||||
const double threshold,
|
const double threshold,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
CGAL_precondition(f != boost::graph_traits<TriangleMesh>::null_face());
|
CGAL_precondition(f != boost::graph_traits<TriangleMesh>::null_face());
|
||||||
CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm));
|
CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm));
|
||||||
|
|
@ -524,15 +455,6 @@ is_cap_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descriptor
|
||||||
return boost::graph_traits<TriangleMesh>::null_halfedge();
|
return boost::graph_traits<TriangleMesh>::null_halfedge();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename TriangleMesh>
|
|
||||||
typename boost::graph_traits<TriangleMesh>::halfedge_descriptor
|
|
||||||
is_cap_triangle_face(typename boost::graph_traits<TriangleMesh>::face_descriptor f,
|
|
||||||
const TriangleMesh& tm,
|
|
||||||
const double threshold)
|
|
||||||
{
|
|
||||||
return is_cap_triangle_face(f, tm, threshold, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} } // end namespaces CGAL and PMP
|
} } // end namespaces CGAL and PMP
|
||||||
|
|
||||||
#endif // CGAL_POLYGON_MESH_PROCESSING_SHAPE_PREDICATES_H
|
#endif // CGAL_POLYGON_MESH_PROCESSING_SHAPE_PREDICATES_H
|
||||||
|
|
|
||||||
|
|
@ -129,10 +129,10 @@ namespace Polygon_mesh_processing {
|
||||||
*
|
*
|
||||||
* @pre `tmesh` does not contain any degenerate faces
|
* @pre `tmesh` does not contain any degenerate faces
|
||||||
*/
|
*/
|
||||||
template<typename TriangleMesh, typename FaceRange, typename NamedParameters>
|
template<typename TriangleMesh, typename FaceRange, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
void smooth_mesh(const FaceRange& faces,
|
void smooth_mesh(const FaceRange& faces,
|
||||||
TriangleMesh& tmesh,
|
TriangleMesh& tmesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor vertex_descriptor;
|
typedef typename boost::graph_traits<TriangleMesh>::vertex_descriptor vertex_descriptor;
|
||||||
typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor halfedge_descriptor;
|
typedef typename boost::graph_traits<TriangleMesh>::halfedge_descriptor halfedge_descriptor;
|
||||||
|
|
@ -324,24 +324,12 @@ void smooth_mesh(const FaceRange& faces,
|
||||||
}
|
}
|
||||||
|
|
||||||
///\cond SKIP_IN_MANUAL
|
///\cond SKIP_IN_MANUAL
|
||||||
template <typename FaceRange, typename TriangleMesh>
|
|
||||||
void smooth_mesh(const FaceRange& face_range, TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
smooth_mesh(face_range, tmesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
void smooth_mesh(TriangleMesh& tmesh, const CGAL_BGL_NP_CLASS& np)
|
void smooth_mesh(TriangleMesh& tmesh, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
smooth_mesh(faces(tmesh), tmesh, np);
|
smooth_mesh(faces(tmesh), tmesh, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename TriangleMesh>
|
|
||||||
void smooth_mesh(TriangleMesh& tmesh)
|
|
||||||
{
|
|
||||||
smooth_mesh(faces(tmesh), tmesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename TriangleMesh, typename GeomTraits, typename Stream>
|
template<typename TriangleMesh, typename GeomTraits, typename Stream>
|
||||||
void angles_evaluation(TriangleMesh& tmesh, GeomTraits traits, Stream& output)
|
void angles_evaluation(TriangleMesh& tmesh, GeomTraits traits, Stream& output)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -95,11 +95,11 @@ namespace Polygon_mesh_processing {
|
||||||
*
|
*
|
||||||
* @warning This function involves linear algebra, that is computed using a non-exact floating-point arithmetic.
|
* @warning This function involves linear algebra, that is computed using a non-exact floating-point arithmetic.
|
||||||
*/
|
*/
|
||||||
template<typename TriangleMesh, typename FaceRange, typename NamedParameters>
|
template<typename TriangleMesh, typename FaceRange, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
void smooth_shape(const FaceRange& faces,
|
void smooth_shape(const FaceRange& faces,
|
||||||
TriangleMesh& tmesh,
|
TriangleMesh& tmesh,
|
||||||
const double time,
|
const double time,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
if(std::begin(faces) == std::end(faces))
|
if(std::begin(faces) == std::end(faces))
|
||||||
return;
|
return;
|
||||||
|
|
@ -197,28 +197,13 @@ void smooth_shape(const FaceRange& faces,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
template<typename TriangleMesh, typename FaceRange>
|
|
||||||
void smooth_shape(const FaceRange& faces,
|
|
||||||
TriangleMesh& tmesh,
|
|
||||||
const double time)
|
|
||||||
{
|
|
||||||
smooth_shape(faces, tmesh, time, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
void smooth_shape(TriangleMesh& tmesh,
|
void smooth_shape(TriangleMesh& tmesh,
|
||||||
const double time,
|
const double time,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
smooth_shape(faces(tmesh), tmesh, time, np);
|
smooth_shape(faces(tmesh), tmesh, time, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename TriangleMesh>
|
|
||||||
void smooth_shape(TriangleMesh& tmesh,
|
|
||||||
const double time)
|
|
||||||
{
|
|
||||||
smooth_shape(faces(tmesh), tmesh, time, parameters::all_default());
|
|
||||||
}
|
|
||||||
/// \endcond
|
/// \endcond
|
||||||
|
|
||||||
} // Polygon_mesh_processing
|
} // Polygon_mesh_processing
|
||||||
|
|
|
||||||
|
|
@ -1117,19 +1117,12 @@ std::size_t stitch_boundary_cycle(const typename boost::graph_traits<PolygonMesh
|
||||||
template <typename PolygonMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename PolygonMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
std::size_t stitch_boundary_cycle(const typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h,
|
std::size_t stitch_boundary_cycle(const typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h,
|
||||||
PolygonMesh& pmesh,
|
PolygonMesh& pmesh,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
internal::Dummy_cycle_rep_maintainer<PolygonMesh> dummy_maintainer(pmesh);
|
internal::Dummy_cycle_rep_maintainer<PolygonMesh> dummy_maintainer(pmesh);
|
||||||
return internal::stitch_boundary_cycle(h, pmesh, dummy_maintainer, np);
|
return internal::stitch_boundary_cycle(h, pmesh, dummy_maintainer, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename PolygonMesh>
|
|
||||||
std::size_t stitch_boundary_cycle(const typename boost::graph_traits<PolygonMesh>::halfedge_descriptor h,
|
|
||||||
PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
return stitch_boundary_cycle(h, pmesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template <typename BorderHalfedgeRange, typename PolygonMesh,
|
template <typename BorderHalfedgeRange, typename PolygonMesh,
|
||||||
|
|
@ -1185,7 +1178,7 @@ std::size_t stitch_boundary_cycles(const BorderHalfedgeRange& boundary_cycle_rep
|
||||||
template <typename BorderHalfedgeRange, typename PolygonMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename BorderHalfedgeRange, typename PolygonMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
std::size_t stitch_boundary_cycles(const BorderHalfedgeRange& boundary_cycle_representatives,
|
std::size_t stitch_boundary_cycles(const BorderHalfedgeRange& boundary_cycle_representatives,
|
||||||
PolygonMesh& pmesh,
|
PolygonMesh& pmesh,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
// If this API is called, we are not from stitch_borders() (otherwise there would be a maintainer)
|
// If this API is called, we are not from stitch_borders() (otherwise there would be a maintainer)
|
||||||
// so there is only one pass and we don't carea bout maintaining the cycle subset
|
// so there is only one pass and we don't carea bout maintaining the cycle subset
|
||||||
|
|
@ -1198,7 +1191,7 @@ std::size_t stitch_boundary_cycles(const BorderHalfedgeRange& boundary_cycle_rep
|
||||||
// convenience overloads
|
// convenience overloads
|
||||||
template <typename PolygonMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename PolygonMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
std::size_t stitch_boundary_cycles(PolygonMesh& pmesh,
|
std::size_t stitch_boundary_cycles(PolygonMesh& pmesh,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
|
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
|
||||||
|
|
||||||
|
|
@ -1208,44 +1201,11 @@ std::size_t stitch_boundary_cycles(PolygonMesh& pmesh,
|
||||||
return stitch_boundary_cycles(boundary_cycle_representatives, pmesh, np);
|
return stitch_boundary_cycles(boundary_cycle_representatives, pmesh, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename BorderHalfedgeRange, typename PolygonMesh>
|
/// \endcond
|
||||||
std::size_t stitch_boundary_cycles(const BorderHalfedgeRange& boundary_cycle_representatives,
|
|
||||||
PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
return stitch_boundary_cycles(boundary_cycle_representatives, pmesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename PolygonMesh>
|
|
||||||
std::size_t stitch_boundary_cycles(PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
return stitch_boundary_cycles(pmesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
// The VPM is only used here for debugging info purposes as in this overload, the halfedges
|
// The VPM is only used here for debugging info purposes as in this overload, the halfedges
|
||||||
// to stitch are already provided and all further checks are combinatorial and not geometrical.
|
// to stitch are already provided and all further checks are combinatorial and not geometrical.
|
||||||
// There is thus nothing interesting to pass via named parameters and this overload is not documented.
|
|
||||||
template <typename PolygonMesh,
|
|
||||||
typename HalfedgePairsRange,
|
|
||||||
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
|
||||||
std::size_t stitch_borders(PolygonMesh& pmesh,
|
|
||||||
const HalfedgePairsRange& hedge_pairs_to_stitch,
|
|
||||||
const CGAL_BGL_NP_CLASS& np,
|
|
||||||
typename boost::enable_if<
|
|
||||||
typename boost::has_range_iterator<HalfedgePairsRange>
|
|
||||||
>::type* = 0)
|
|
||||||
{
|
|
||||||
using parameters::choose_parameter;
|
|
||||||
using parameters::get_parameter;
|
|
||||||
|
|
||||||
typedef typename GetVertexPointMap<PolygonMesh, CGAL_BGL_NP_CLASS>::const_type VPM;
|
|
||||||
VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point),
|
|
||||||
get_const_property_map(vertex_point, pmesh));
|
|
||||||
|
|
||||||
return internal::stitch_halfedge_range_dispatcher(hedge_pairs_to_stitch, pmesh, vpm);
|
|
||||||
}
|
|
||||||
|
|
||||||
///\endcond
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \ingroup PMP_repairing_grp
|
* \ingroup PMP_repairing_grp
|
||||||
*
|
*
|
||||||
|
|
@ -1264,22 +1224,40 @@ std::size_t stitch_borders(PolygonMesh& pmesh,
|
||||||
*
|
*
|
||||||
* \param pmesh the polygon mesh to be modified by stitching
|
* \param pmesh the polygon mesh to be modified by stitching
|
||||||
* \param hedge_pairs_to_stitch a range of `std::pair` of halfedges to be stitched together
|
* \param hedge_pairs_to_stitch a range of `std::pair` of halfedges to be stitched together
|
||||||
|
* \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below
|
||||||
|
*
|
||||||
|
* \cgalNamedParamsBegin
|
||||||
|
* \cgalParamNBegin{vertex_point_map}
|
||||||
|
* \cgalParamDescription{a property map associating points to the vertices of `pm`}
|
||||||
|
* \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits<PolygonMesh>::%vertex_descriptor`
|
||||||
|
* as key type and `%Point_3` as value type}
|
||||||
|
* \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`}
|
||||||
|
* \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t`
|
||||||
|
* must be available in `PolygonMesh`.}
|
||||||
|
* \cgalParamNEnd
|
||||||
|
* \cgalNamedParamsEnd
|
||||||
*
|
*
|
||||||
* \return the number of pairs of halfedges that were stitched.
|
* \return the number of pairs of halfedges that were stitched.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <typename PolygonMesh,
|
template <typename PolygonMesh,
|
||||||
typename HalfedgePairsRange>
|
typename HalfedgePairsRange,
|
||||||
|
typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
std::size_t stitch_borders(PolygonMesh& pmesh,
|
std::size_t stitch_borders(PolygonMesh& pmesh,
|
||||||
const HalfedgePairsRange& hedge_pairs_to_stitch
|
const HalfedgePairsRange& hedge_pairs_to_stitch,
|
||||||
#ifndef DOXYGEN_RUNNING
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values(),
|
||||||
, typename boost::enable_if<
|
typename boost::enable_if<
|
||||||
typename boost::has_range_iterator<HalfedgePairsRange>
|
typename boost::has_range_iterator<HalfedgePairsRange>
|
||||||
>::type* = 0
|
>::type* = 0)
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return stitch_borders(pmesh, hedge_pairs_to_stitch, parameters::all_default());
|
using parameters::choose_parameter;
|
||||||
|
using parameters::get_parameter;
|
||||||
|
|
||||||
|
typedef typename GetVertexPointMap<PolygonMesh, CGAL_BGL_NP_CLASS>::const_type VPM;
|
||||||
|
VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point),
|
||||||
|
get_const_property_map(vertex_point, pmesh));
|
||||||
|
|
||||||
|
return internal::stitch_halfedge_range_dispatcher(hedge_pairs_to_stitch, pmesh, vpm);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
@ -1364,6 +1342,65 @@ std::size_t stitch_borders(const BorderHalfedgeRange& boundary_cycle_representat
|
||||||
/// \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
|
/// \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
|
||||||
/// \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
/// \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
||||||
///
|
///
|
||||||
|
/// \param pmesh the polygon mesh to be modified by the stitching procedure
|
||||||
|
/// \param np optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below
|
||||||
|
///
|
||||||
|
/// \cgalNamedParamsBegin
|
||||||
|
/// \cgalParamNBegin{vertex_point_map}
|
||||||
|
/// \cgalParamDescription{a property map associating points to the vertices of `pmesh`}
|
||||||
|
/// \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits<PolygonMesh>::%vertex_descriptor`
|
||||||
|
/// as key type and `%Point_3` as value type}
|
||||||
|
/// \cgalParamDefault{`boost::get(CGAL::vertex_point, pmesh)`}
|
||||||
|
/// \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t`
|
||||||
|
/// must be available in `PolygonMesh`.}
|
||||||
|
/// \cgalParamNEnd
|
||||||
|
///
|
||||||
|
/// \cgalParamNBegin{apply_per_connected_component}
|
||||||
|
/// \cgalParamDescription{specifies if the borders should only be stitched only within their own connected component.}
|
||||||
|
/// \cgalParamType{Boolean}
|
||||||
|
/// \cgalParamDefault{`false`}
|
||||||
|
/// \cgalParamNEnd
|
||||||
|
///
|
||||||
|
/// \cgalParamNBegin{face_index_map}
|
||||||
|
/// \cgalParamDescription{a property map associating to each face of `pmesh` a unique index between `0` and `num_faces(pmesh) - 1`}
|
||||||
|
/// \cgalParamType{a class model of `ReadablePropertyMap` with `boost::graph_traits<PolygonMesh>::%face_descriptor`
|
||||||
|
/// as key type and `std::size_t` as value type}
|
||||||
|
/// \cgalParamDefault{an automatically indexed internal map}
|
||||||
|
/// \cgalParamNEnd
|
||||||
|
/// \cgalNamedParamsEnd
|
||||||
|
///
|
||||||
|
/// \return the number of pairs of halfedges that were stitched.
|
||||||
|
///
|
||||||
|
/// \sa `stitch_boundary_cycle()`
|
||||||
|
/// \sa `stitch_boundary_cycles()`
|
||||||
|
///
|
||||||
|
template <typename PolygonMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
|
std::size_t stitch_borders(PolygonMesh& pmesh,
|
||||||
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
|
{
|
||||||
|
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
|
||||||
|
|
||||||
|
std::vector<halfedge_descriptor> boundary_cycle_representatives;
|
||||||
|
extract_boundary_cycles(pmesh, std::back_inserter(boundary_cycle_representatives));
|
||||||
|
|
||||||
|
// We are working on all boundary cycles, so there is no need to keep track of any subset
|
||||||
|
internal::Dummy_cycle_rep_maintainer<PolygonMesh> dummy_maintainer(pmesh);
|
||||||
|
return stitch_borders(boundary_cycle_representatives, pmesh, dummy_maintainer, np);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \ingroup PMP_repairing_grp
|
||||||
|
///
|
||||||
|
/// \brief Same as the other overload, but the pairs of halfedges to be stitched
|
||||||
|
/// are automatically found amongst halfedges in cycles described by `boundary_cycle_representatives`.
|
||||||
|
///
|
||||||
|
/// Two border halfedges `h1` and `h2` are set to be stitched
|
||||||
|
/// if the points associated to the source and target vertices of `h1` are
|
||||||
|
/// the same as those of the target and source vertices of `h2`, respectively.
|
||||||
|
///
|
||||||
|
/// \tparam BorderHalfedgeRange a model of `Range` with value type `boost::graph_traits<PolygonMesh>::%halfedge_descriptor`
|
||||||
|
/// \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph`
|
||||||
|
/// \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
|
||||||
|
///
|
||||||
/// \param boundary_cycle_representatives a range of border halfedges, each describing a boundary cycle whose halfedges
|
/// \param boundary_cycle_representatives a range of border halfedges, each describing a boundary cycle whose halfedges
|
||||||
/// will be considered for stitching
|
/// will be considered for stitching
|
||||||
/// \param pmesh the polygon mesh to be modified by the stitching procedure
|
/// \param pmesh the polygon mesh to be modified by the stitching procedure
|
||||||
|
|
@ -1401,7 +1438,7 @@ std::size_t stitch_borders(const BorderHalfedgeRange& boundary_cycle_representat
|
||||||
template <typename BorderHalfedgeRange, typename PolygonMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename BorderHalfedgeRange, typename PolygonMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
std::size_t stitch_borders(const BorderHalfedgeRange& boundary_cycle_representatives,
|
std::size_t stitch_borders(const BorderHalfedgeRange& boundary_cycle_representatives,
|
||||||
PolygonMesh& pmesh,
|
PolygonMesh& pmesh,
|
||||||
const CGAL_BGL_NP_CLASS& np
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
, typename boost::enable_if<
|
, typename boost::enable_if<
|
||||||
typename boost::has_range_iterator<BorderHalfedgeRange>
|
typename boost::has_range_iterator<BorderHalfedgeRange>
|
||||||
|
|
@ -1414,41 +1451,6 @@ std::size_t stitch_borders(const BorderHalfedgeRange& boundary_cycle_representat
|
||||||
return stitch_borders(boundary_cycle_representatives, pmesh, cycle_reps_maintainer, np);
|
return stitch_borders(boundary_cycle_representatives, pmesh, cycle_reps_maintainer, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
|
|
||||||
template <typename BorderHalfedgeRange, typename PolygonMesh>
|
|
||||||
std::size_t stitch_borders(const BorderHalfedgeRange& boundary_cycle_representatives,
|
|
||||||
PolygonMesh& pmesh,
|
|
||||||
typename boost::enable_if<
|
|
||||||
typename boost::has_range_iterator<BorderHalfedgeRange>
|
|
||||||
>::type* = 0)
|
|
||||||
{
|
|
||||||
// Need to keep track of the cycles since we are working on a subset of all the boundary cycles
|
|
||||||
internal::Boundary_cycle_rep_maintainer<PolygonMesh> cycle_reps_maintainer(pmesh);
|
|
||||||
return stitch_borders(boundary_cycle_representatives, pmesh, cycle_reps_maintainer, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename PolygonMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
|
||||||
std::size_t stitch_borders(PolygonMesh& pmesh,
|
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
|
||||||
{
|
|
||||||
typedef typename boost::graph_traits<PolygonMesh>::halfedge_descriptor halfedge_descriptor;
|
|
||||||
|
|
||||||
std::vector<halfedge_descriptor> boundary_cycle_representatives;
|
|
||||||
extract_boundary_cycles(pmesh, std::back_inserter(boundary_cycle_representatives));
|
|
||||||
|
|
||||||
// We are working on all boundary cycles, so there is no need to keep track of any subset
|
|
||||||
internal::Dummy_cycle_rep_maintainer<PolygonMesh> dummy_maintainer(pmesh);
|
|
||||||
return stitch_borders(boundary_cycle_representatives, pmesh, dummy_maintainer, np);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename PolygonMesh>
|
|
||||||
std::size_t stitch_borders(PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
return stitch_borders(pmesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \endcond
|
|
||||||
|
|
||||||
} // namespace Polygon_mesh_processing
|
} // namespace Polygon_mesh_processing
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,10 @@ namespace Polygon_mesh_processing{
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template<class Transformation, class PolygonMesh,class NamedParameters>
|
template<class Transformation, class PolygonMesh,class NamedParameters = parameters::Default_named_parameters>
|
||||||
void transform(const Transformation& transformation,
|
void transform(const Transformation& transformation,
|
||||||
PolygonMesh& mesh,
|
PolygonMesh& mesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename GetVertexPointMap<PolygonMesh, NamedParameters>::type VPMap;
|
typedef typename GetVertexPointMap<PolygonMesh, NamedParameters>::type VPMap;
|
||||||
VPMap vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point),
|
VPMap vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point),
|
||||||
|
|
@ -59,14 +59,6 @@ void transform(const Transformation& transformation,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
|
||||||
template<class Transformation, class PolygonMesh>
|
|
||||||
void transform(const Transformation& transformation,
|
|
||||||
PolygonMesh& mesh)
|
|
||||||
{
|
|
||||||
transform(transformation, mesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
/// \endcond
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -462,10 +462,10 @@ public:
|
||||||
*
|
*
|
||||||
* @return `true` if the face has been triangulated.
|
* @return `true` if the face has been triangulated.
|
||||||
*/
|
*/
|
||||||
template<typename PolygonMesh, typename NamedParameters>
|
template<typename PolygonMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool triangulate_face(typename boost::graph_traits<PolygonMesh>::face_descriptor f,
|
bool triangulate_face(typename boost::graph_traits<PolygonMesh>::face_descriptor f,
|
||||||
PolygonMesh& pmesh,
|
PolygonMesh& pmesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -495,13 +495,6 @@ bool triangulate_face(typename boost::graph_traits<PolygonMesh>::face_descriptor
|
||||||
return modifier.triangulate_face(f, pmesh, use_cdt, visitor);
|
return modifier.triangulate_face(f, pmesh, use_cdt, visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename PolygonMesh>
|
|
||||||
bool triangulate_face(typename boost::graph_traits<PolygonMesh>::face_descriptor f,
|
|
||||||
PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
return triangulate_face(f, pmesh, CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup PMP_meshing_grp
|
* \ingroup PMP_meshing_grp
|
||||||
* triangulates given faces of a polygon mesh. This function depends on the package \ref PkgTriangulation2
|
* triangulates given faces of a polygon mesh. This function depends on the package \ref PkgTriangulation2
|
||||||
|
|
@ -546,10 +539,10 @@ bool triangulate_face(typename boost::graph_traits<PolygonMesh>::face_descriptor
|
||||||
*
|
*
|
||||||
* @see triangulate_face()
|
* @see triangulate_face()
|
||||||
*/
|
*/
|
||||||
template <typename FaceRange, typename PolygonMesh, typename NamedParameters>
|
template <typename FaceRange, typename PolygonMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool triangulate_faces(FaceRange face_range,
|
bool triangulate_faces(FaceRange face_range,
|
||||||
PolygonMesh& pmesh,
|
PolygonMesh& pmesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -579,12 +572,6 @@ bool triangulate_faces(FaceRange face_range,
|
||||||
return modifier(face_range, pmesh, use_cdt, visitor);
|
return modifier(face_range, pmesh, use_cdt, visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FaceRange, typename PolygonMesh>
|
|
||||||
bool triangulate_faces(FaceRange face_range, PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
return triangulate_faces(face_range, pmesh, CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup PMP_meshing_grp
|
* \ingroup PMP_meshing_grp
|
||||||
* triangulates all faces of a polygon mesh. This function depends on the package \ref PkgTriangulation2
|
* triangulates all faces of a polygon mesh. This function depends on the package \ref PkgTriangulation2
|
||||||
|
|
@ -624,19 +611,13 @@ bool triangulate_faces(FaceRange face_range, PolygonMesh& pmesh)
|
||||||
*
|
*
|
||||||
* @see triangulate_face()
|
* @see triangulate_face()
|
||||||
*/
|
*/
|
||||||
template <typename PolygonMesh, typename NamedParameters>
|
template <typename PolygonMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool triangulate_faces(PolygonMesh& pmesh,
|
bool triangulate_faces(PolygonMesh& pmesh,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
return triangulate_faces(faces(pmesh), pmesh, np);
|
return triangulate_faces(faces(pmesh), pmesh, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename PolygonMesh>
|
|
||||||
bool triangulate_faces(PolygonMesh& pmesh)
|
|
||||||
{
|
|
||||||
return triangulate_faces(faces(pmesh), pmesh, CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // end namespace Polygon_mesh_processing
|
} // end namespace Polygon_mesh_processing
|
||||||
|
|
||||||
} // end namespace CGAL
|
} // end namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -115,12 +115,12 @@ namespace Polygon_mesh_processing {
|
||||||
*/
|
*/
|
||||||
template<typename PolygonMesh,
|
template<typename PolygonMesh,
|
||||||
typename OutputIterator,
|
typename OutputIterator,
|
||||||
typename NamedParameters>
|
typename NamedParameters = parameters::Default_named_parameters>
|
||||||
OutputIterator
|
OutputIterator
|
||||||
triangulate_hole(PolygonMesh& pmesh,
|
triangulate_hole(PolygonMesh& pmesh,
|
||||||
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
|
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
|
||||||
OutputIterator out,
|
OutputIterator out,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -176,16 +176,6 @@ namespace Polygon_mesh_processing {
|
||||||
max_squared_distance).first;
|
max_squared_distance).first;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename PolygonMesh, typename OutputIterator>
|
|
||||||
OutputIterator
|
|
||||||
triangulate_hole(PolygonMesh& pmesh,
|
|
||||||
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
|
|
||||||
OutputIterator out)
|
|
||||||
{
|
|
||||||
return triangulate_hole(pmesh, border_halfedge, out,
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename PM, typename VertexRange>
|
template<typename PM, typename VertexRange>
|
||||||
void test_in_edges(const PM& pmesh, const VertexRange& patch)
|
void test_in_edges(const PM& pmesh, const VertexRange& patch)
|
||||||
{
|
{
|
||||||
|
|
@ -283,13 +273,13 @@ namespace Polygon_mesh_processing {
|
||||||
template<typename PolygonMesh,
|
template<typename PolygonMesh,
|
||||||
typename FaceOutputIterator,
|
typename FaceOutputIterator,
|
||||||
typename VertexOutputIterator,
|
typename VertexOutputIterator,
|
||||||
typename NamedParameters>
|
typename NamedParameters = parameters::Default_named_parameters>
|
||||||
std::pair<FaceOutputIterator, VertexOutputIterator>
|
std::pair<FaceOutputIterator, VertexOutputIterator>
|
||||||
triangulate_and_refine_hole(PolygonMesh& pmesh,
|
triangulate_and_refine_hole(PolygonMesh& pmesh,
|
||||||
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
|
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
|
||||||
FaceOutputIterator face_out,
|
FaceOutputIterator face_out,
|
||||||
VertexOutputIterator vertex_out,
|
VertexOutputIterator vertex_out,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
std::vector<typename boost::graph_traits<PolygonMesh>::face_descriptor> patch;
|
std::vector<typename boost::graph_traits<PolygonMesh>::face_descriptor> patch;
|
||||||
triangulate_hole(pmesh, border_halfedge, std::back_inserter(patch), np);
|
triangulate_hole(pmesh, border_halfedge, std::back_inserter(patch), np);
|
||||||
|
|
@ -300,20 +290,6 @@ namespace Polygon_mesh_processing {
|
||||||
return refine(pmesh, patch, face_out, vertex_out, np);
|
return refine(pmesh, patch, face_out, vertex_out, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename PolygonMesh,
|
|
||||||
typename FaceOutputIterator,
|
|
||||||
typename VertexOutputIterator>
|
|
||||||
std::pair<FaceOutputIterator, VertexOutputIterator>
|
|
||||||
triangulate_and_refine_hole(PolygonMesh& pmesh,
|
|
||||||
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
|
|
||||||
FaceOutputIterator face_out,
|
|
||||||
VertexOutputIterator vertex_out)
|
|
||||||
{
|
|
||||||
return triangulate_and_refine_hole(pmesh, border_halfedge,
|
|
||||||
face_out, vertex_out,
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup hole_filling_grp
|
\ingroup hole_filling_grp
|
||||||
@brief triangulates, refines and fairs a hole in a polygon mesh.
|
@brief triangulates, refines and fairs a hole in a polygon mesh.
|
||||||
|
|
@ -417,13 +393,13 @@ namespace Polygon_mesh_processing {
|
||||||
template<typename PolygonMesh,
|
template<typename PolygonMesh,
|
||||||
typename FaceOutputIterator,
|
typename FaceOutputIterator,
|
||||||
typename VertexOutputIterator,
|
typename VertexOutputIterator,
|
||||||
typename NamedParameters>
|
typename NamedParameters = parameters::Default_named_parameters>
|
||||||
std::tuple<bool, FaceOutputIterator, VertexOutputIterator>
|
std::tuple<bool, FaceOutputIterator, VertexOutputIterator>
|
||||||
triangulate_refine_and_fair_hole(PolygonMesh& pmesh,
|
triangulate_refine_and_fair_hole(PolygonMesh& pmesh,
|
||||||
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
|
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
|
||||||
FaceOutputIterator face_out,
|
FaceOutputIterator face_out,
|
||||||
VertexOutputIterator vertex_out,
|
VertexOutputIterator vertex_out,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
std::vector<typename boost::graph_traits<PolygonMesh>::vertex_descriptor> patch;
|
std::vector<typename boost::graph_traits<PolygonMesh>::vertex_descriptor> patch;
|
||||||
|
|
||||||
|
|
@ -442,20 +418,6 @@ namespace Polygon_mesh_processing {
|
||||||
return std::make_tuple(fair_success, face_out, vertex_out);
|
return std::make_tuple(fair_success, face_out, vertex_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename PolygonMesh,
|
|
||||||
typename FaceOutputIterator,
|
|
||||||
typename VertexOutputIterator>
|
|
||||||
std::tuple<bool, FaceOutputIterator, VertexOutputIterator>
|
|
||||||
triangulate_refine_and_fair_hole(PolygonMesh& pmesh,
|
|
||||||
typename boost::graph_traits<PolygonMesh>::halfedge_descriptor border_halfedge,
|
|
||||||
FaceOutputIterator face_out,
|
|
||||||
VertexOutputIterator vertex_out)
|
|
||||||
{
|
|
||||||
return triangulate_refine_and_fair_hole(pmesh, border_halfedge,
|
|
||||||
face_out, vertex_out,
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup hole_filling_grp
|
\ingroup hole_filling_grp
|
||||||
creates triangles to fill the hole defined by points in the range `points`.
|
creates triangles to fill the hole defined by points in the range `points`.
|
||||||
|
|
@ -531,12 +493,12 @@ namespace Polygon_mesh_processing {
|
||||||
template <typename PointRange1,
|
template <typename PointRange1,
|
||||||
typename PointRange2,
|
typename PointRange2,
|
||||||
typename OutputIterator,
|
typename OutputIterator,
|
||||||
typename NamedParameters>
|
typename NamedParameters = parameters::Default_named_parameters>
|
||||||
OutputIterator
|
OutputIterator
|
||||||
triangulate_hole_polyline(const PointRange1& points,
|
triangulate_hole_polyline(const PointRange1& points,
|
||||||
const PointRange2& third_points,
|
const PointRange2& third_points,
|
||||||
OutputIterator out,
|
OutputIterator out,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
if (points.empty()) return out;
|
if (points.empty()) return out;
|
||||||
|
|
||||||
|
|
@ -610,18 +572,6 @@ bool use_dt3 =
|
||||||
return tracer.out;
|
return tracer.out;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename PointRange1,
|
|
||||||
typename PointRange2,
|
|
||||||
typename OutputIterator>
|
|
||||||
OutputIterator
|
|
||||||
triangulate_hole_polyline(const PointRange1& points,
|
|
||||||
const PointRange2& third_points,
|
|
||||||
OutputIterator out)
|
|
||||||
{
|
|
||||||
return triangulate_hole_polyline(points, third_points, out,
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup hole_filling_grp
|
\ingroup hole_filling_grp
|
||||||
Same as above but the range of third points is omitted. They are not
|
Same as above but the range of third points is omitted. They are not
|
||||||
|
|
@ -633,7 +583,7 @@ bool use_dt3 =
|
||||||
OutputIterator
|
OutputIterator
|
||||||
triangulate_hole_polyline(const PointRange& points,
|
triangulate_hole_polyline(const PointRange& points,
|
||||||
OutputIterator out,
|
OutputIterator out,
|
||||||
const CGAL_BGL_NP_CLASS& np)
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<
|
typedef typename std::iterator_traits<
|
||||||
typename PointRange::iterator>::value_type Point;
|
typename PointRange::iterator>::value_type Point;
|
||||||
|
|
@ -641,16 +591,6 @@ bool use_dt3 =
|
||||||
return triangulate_hole_polyline(points, third_points, out, np);
|
return triangulate_hole_polyline(points, third_points, out, np);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename PointRange,
|
|
||||||
typename OutputIterator>
|
|
||||||
OutputIterator
|
|
||||||
triangulate_hole_polyline(const PointRange& points,
|
|
||||||
OutputIterator out)
|
|
||||||
{
|
|
||||||
return triangulate_hole_polyline(points, out,
|
|
||||||
CGAL::Polygon_mesh_processing::parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
} //end namespace Polygon_mesh_processing
|
} //end namespace Polygon_mesh_processing
|
||||||
|
|
||||||
} //end namespace CGAL
|
} //end namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -359,10 +359,10 @@ public:
|
||||||
* \note The triangle mesh gets copied internally, that is it can be modifed after having passed as argument,
|
* \note The triangle mesh gets copied internally, that is it can be modifed after having passed as argument,
|
||||||
* while the queries are performed
|
* while the queries are performed
|
||||||
*/
|
*/
|
||||||
template <typename TriangleMesh, typename NamedParameters>
|
template <typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
Polyhedral_envelope(const TriangleMesh& tmesh,
|
Polyhedral_envelope(const TriangleMesh& tmesh,
|
||||||
double epsilon,
|
double epsilon,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -459,11 +459,11 @@ public:
|
||||||
* \note The triangle mesh gets copied internally, that is it can be modifed after having passed as argument,
|
* \note The triangle mesh gets copied internally, that is it can be modifed after having passed as argument,
|
||||||
* while the queries are performed
|
* while the queries are performed
|
||||||
*/
|
*/
|
||||||
template <typename FaceRange, typename TriangleMesh, typename NamedParameters>
|
template <typename FaceRange, typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
Polyhedral_envelope(const FaceRange& face_range,
|
Polyhedral_envelope(const FaceRange& face_range,
|
||||||
const TriangleMesh& tmesh,
|
const TriangleMesh& tmesh,
|
||||||
double epsilon,
|
double epsilon,
|
||||||
const NamedParameters& np
|
const NamedParameters& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
, typename std::enable_if<!boost::has_range_const_iterator<TriangleMesh>::value>::type* = 0
|
, typename std::enable_if<!boost::has_range_const_iterator<TriangleMesh>::value>::type* = 0
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -563,11 +563,11 @@ public:
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <typename PointRange, typename TriangleRange, typename NamedParameters>
|
template <typename PointRange, typename TriangleRange, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
Polyhedral_envelope(const PointRange& points,
|
Polyhedral_envelope(const PointRange& points,
|
||||||
const TriangleRange& triangles,
|
const TriangleRange& triangles,
|
||||||
double epsilon,
|
double epsilon,
|
||||||
const NamedParameters& np
|
const NamedParameters& np = parameters::use_default_values()
|
||||||
#ifndef DOXYGEN_RUNNING
|
#ifndef DOXYGEN_RUNNING
|
||||||
, typename std::enable_if<boost::has_range_const_iterator<TriangleRange>::value>::type* = 0
|
, typename std::enable_if<boost::has_range_const_iterator<TriangleRange>::value>::type* = 0
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -618,30 +618,6 @@ public:
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
#ifndef DOXYGEN_RUNNING
|
|
||||||
template <typename TriangleMesh>
|
|
||||||
Polyhedral_envelope(const TriangleMesh& tmesh,
|
|
||||||
double epsilon)
|
|
||||||
: Polyhedral_envelope(tmesh, epsilon, parameters::all_default())
|
|
||||||
{}
|
|
||||||
|
|
||||||
template <typename FaceRange, typename TriangleMesh>
|
|
||||||
Polyhedral_envelope(const FaceRange& face_range,
|
|
||||||
const TriangleMesh& tmesh,
|
|
||||||
double epsilon,
|
|
||||||
typename std::enable_if<!boost::has_range_const_iterator<TriangleMesh>::value>::type* = 0)
|
|
||||||
: Polyhedral_envelope(face_range, tmesh, epsilon, parameters::all_default())
|
|
||||||
{}
|
|
||||||
|
|
||||||
template <typename PointRange, typename TriangleRange>
|
|
||||||
Polyhedral_envelope(const PointRange& points,
|
|
||||||
const TriangleRange& triangles,
|
|
||||||
double epsilon,
|
|
||||||
typename std::enable_if<boost::has_range_const_iterator<TriangleRange>::value>::type* = 0)
|
|
||||||
: Polyhedral_envelope(points, triangles, epsilon, parameters::all_default())
|
|
||||||
{}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
template <class Epsilons>
|
template <class Epsilons>
|
||||||
|
|
@ -2246,7 +2222,12 @@ public:
|
||||||
*/
|
*/
|
||||||
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
template <typename TriangleMesh, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
|
||||||
bool
|
bool
|
||||||
operator()(const TriangleMesh& tmesh, const CGAL_BGL_NP_CLASS& np) const
|
operator()(const TriangleMesh& tmesh,
|
||||||
|
const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()
|
||||||
|
#ifndef DOXYGEN_RUNNING
|
||||||
|
, typename std::enable_if<!boost::has_range_const_iterator<TriangleMesh>::value>::type* = 0
|
||||||
|
#endif
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -2270,16 +2251,6 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DOXYGEN_RUNNING
|
|
||||||
template <typename TriangleMesh>
|
|
||||||
bool
|
|
||||||
operator()(const TriangleMesh& tmesh,
|
|
||||||
typename std::enable_if<!boost::has_range_const_iterator<TriangleMesh>::value>::type* = 0) const
|
|
||||||
{
|
|
||||||
return this->operator()(tmesh, parameters::all_default());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns `true`, iff all the triangles in `triangles` are inside the polyhedral envelope.
|
* returns `true`, iff all the triangles in `triangles` are inside the polyhedral envelope.
|
||||||
*
|
*
|
||||||
|
|
@ -2304,10 +2275,10 @@ public:
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <typename PointRange, typename TriangleRange, typename NamedParameters>
|
template <typename PointRange, typename TriangleRange, typename NamedParameters = parameters::Default_named_parameters>
|
||||||
bool operator()(const PointRange& points,
|
bool operator()(const PointRange& points,
|
||||||
const TriangleRange& triangles,
|
const TriangleRange& triangles,
|
||||||
const NamedParameters& np) const
|
const NamedParameters& np = parameters::use_default_values()) const
|
||||||
{
|
{
|
||||||
using parameters::choose_parameter;
|
using parameters::choose_parameter;
|
||||||
using parameters::get_parameter;
|
using parameters::get_parameter;
|
||||||
|
|
@ -2333,16 +2304,6 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DOXYGEN_RUNNING
|
|
||||||
template <typename PointRange, typename TriangleRange>
|
|
||||||
bool operator()(const PointRange& points,
|
|
||||||
const TriangleRange& triangles) const
|
|
||||||
{
|
|
||||||
return this->operator()(points, triangles, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns `true`, iff all the triangles in `triangle_range` are inside the polyhedral envelope.
|
* returns `true`, iff all the triangles in `triangle_range` are inside the polyhedral envelope.
|
||||||
* @tparam TriangleRange a model of `ConstRange` with `ConstRange::const_iterator`
|
* @tparam TriangleRange a model of `ConstRange` with `ConstRange::const_iterator`
|
||||||
|
|
|
||||||
|
|
@ -240,9 +240,9 @@ public:
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
*/
|
*/
|
||||||
template <class NamedParameters>
|
template <class NamedParameters = parameters::Default_named_parameters>
|
||||||
std::size_t add_mesh(const TriangleMesh& tm,
|
std::size_t add_mesh(const TriangleMesh& tm,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
// handle vpm
|
// handle vpm
|
||||||
typedef typename CGAL::GetVertexPointMap<TriangleMesh, NamedParameters>::const_type Local_vpm;
|
typedef typename CGAL::GetVertexPointMap<TriangleMesh, NamedParameters>::const_type Local_vpm;
|
||||||
|
|
@ -299,8 +299,8 @@ public:
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
*/
|
*/
|
||||||
template <class NamedParameters>
|
template <class NamedParameters = parameters::Default_named_parameters>
|
||||||
std::size_t add_mesh(const AABB_tree& tree, const TriangleMesh& tm, const NamedParameters& np)
|
std::size_t add_mesh(const AABB_tree& tree, const TriangleMesh& tm, const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
std::size_t id = get_id_for_new_mesh();
|
std::size_t id = get_id_for_new_mesh();
|
||||||
CGAL_assertion( m_aabb_trees[id] == nullptr );
|
CGAL_assertion( m_aabb_trees[id] == nullptr );
|
||||||
|
|
@ -546,12 +546,12 @@ public:
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
*/
|
*/
|
||||||
template <class NamedParameters>
|
template <class NamedParameters = parameters::Default_named_parameters>
|
||||||
static
|
static
|
||||||
void collect_one_point_per_connected_component(
|
void collect_one_point_per_connected_component(
|
||||||
const TriangleMesh& tm,
|
const TriangleMesh& tm,
|
||||||
std::vector<Point_3>& points,
|
std::vector<Point_3>& points,
|
||||||
const NamedParameters& np)
|
const NamedParameters& np = parameters::use_default_values())
|
||||||
{
|
{
|
||||||
const bool maybe_several_cc =
|
const bool maybe_several_cc =
|
||||||
parameters::choose_parameter(
|
parameters::choose_parameter(
|
||||||
|
|
@ -625,25 +625,6 @@ public:
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// versions without NP
|
|
||||||
static
|
|
||||||
void collect_one_point_per_connected_component(
|
|
||||||
const TriangleMesh& tm,
|
|
||||||
std::vector<typename K::Point_3>& points)
|
|
||||||
{
|
|
||||||
collect_one_point_per_connected_component(tm, points, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
std::size_t add_mesh(const TriangleMesh& tm)
|
|
||||||
{
|
|
||||||
return add_mesh(tm, parameters::all_default());
|
|
||||||
}
|
|
||||||
|
|
||||||
std::size_t add_mesh(const AABB_tree& tree, const TriangleMesh& tm)
|
|
||||||
{
|
|
||||||
return add_mesh(tree, tm, parameters::all_default());
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1132,7 +1132,7 @@ void test_early_quit(const std::string filepath) {
|
||||||
std::cout << " ---- distance 0.0 = 0.0 ---- " << std::endl;
|
std::cout << " ---- distance 0.0 = 0.0 ---- " << std::endl;
|
||||||
timer.reset();
|
timer.reset();
|
||||||
timer.start();
|
timer.start();
|
||||||
assert(!PMP::is_Hausdorff_distance_larger<TAG>(mesh1, mesh2, 0.0));
|
assert(!PMP::is_Hausdorff_distance_larger<TAG>(mesh1, mesh2, 0.0, 0.0001));
|
||||||
timer.stop();
|
timer.stop();
|
||||||
const double timea = timer.time();
|
const double timea = timer.time();
|
||||||
|
|
||||||
|
|
@ -1142,25 +1142,25 @@ void test_early_quit(const std::string filepath) {
|
||||||
std::cout << " ---- distance 0.5 < 1.0 ---- " << std::endl;
|
std::cout << " ---- distance 0.5 < 1.0 ---- " << std::endl;
|
||||||
timer.reset();
|
timer.reset();
|
||||||
timer.start();
|
timer.start();
|
||||||
assert(!PMP::is_Hausdorff_distance_larger<TAG>(mesh1, mesh2, 1.0));
|
assert(!PMP::is_Hausdorff_distance_larger<TAG>(mesh1, mesh2, 1.0, 0.0001));
|
||||||
timer.stop();
|
timer.stop();
|
||||||
const double timeb = timer.time();
|
const double timeb = timer.time();
|
||||||
std::cout << " ---- distance 0.5 < 0.6 ---- " << std::endl;
|
std::cout << " ---- distance 0.5 < 0.6 ---- " << std::endl;
|
||||||
timer.reset();
|
timer.reset();
|
||||||
timer.start();
|
timer.start();
|
||||||
assert(!PMP::is_Hausdorff_distance_larger<TAG>(mesh1, mesh2, 0.6));
|
assert(!PMP::is_Hausdorff_distance_larger<TAG>(mesh1, mesh2, 0.6, 0.0001));
|
||||||
timer.stop();
|
timer.stop();
|
||||||
const double timec = timer.time();
|
const double timec = timer.time();
|
||||||
std::cout << " ---- distance 0.5 > 0.4 ---- " << std::endl;
|
std::cout << " ---- distance 0.5 > 0.4 ---- " << std::endl;
|
||||||
timer.reset();
|
timer.reset();
|
||||||
timer.start();
|
timer.start();
|
||||||
assert(PMP::is_Hausdorff_distance_larger<TAG>(mesh1, mesh2, 0.4));
|
assert(PMP::is_Hausdorff_distance_larger<TAG>(mesh1, mesh2, 0.4, 0.0001));
|
||||||
timer.stop();
|
timer.stop();
|
||||||
const double timed = timer.time();
|
const double timed = timer.time();
|
||||||
std::cout << " ---- distance 0.5 > 0.0 ---- " << std::endl;
|
std::cout << " ---- distance 0.5 > 0.0 ---- " << std::endl;
|
||||||
timer.reset();
|
timer.reset();
|
||||||
timer.start();
|
timer.start();
|
||||||
assert(PMP::is_Hausdorff_distance_larger<TAG>(mesh1, mesh2, 0.0));
|
assert(PMP::is_Hausdorff_distance_larger<TAG>(mesh1, mesh2, 0.0, 0.0001));
|
||||||
timer.stop();
|
timer.stop();
|
||||||
const double timee = timer.time();
|
const double timee = timer.time();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue