mirror of https://github.com/CGAL/cgal
Fixed trailing whitespace in refine_mesh_3.h (no real changes)
This commit is contained in:
parent
62fa9be278
commit
c038e25f98
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include <CGAL/license/Mesh_3.h>
|
||||
|
||||
|
||||
#include <CGAL/config.h>
|
||||
#include <CGAL/Mesh_3/config.h>
|
||||
#include <CGAL/Mesh_3/Dump_c3t3.h>
|
||||
|
|
@ -37,190 +36,190 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
namespace details {
|
||||
|
||||
/**
|
||||
* @class Insert_vertex_in_c3t3
|
||||
*
|
||||
* A functor designed to insert unweighted points into the triangulation
|
||||
* of a C3T3 from C3T3::Tr::Vertex , keeping the dimension and indices.
|
||||
*/
|
||||
template <typename C3T3>
|
||||
class Insert_vertex_in_c3t3
|
||||
{
|
||||
private:
|
||||
typedef typename C3T3::Vertex_handle Vertex_handle;
|
||||
typedef typename C3T3::Index Index;
|
||||
|
||||
typedef typename C3T3::Triangulation Tr;
|
||||
typedef typename Tr::Geom_traits Geom_traits;
|
||||
typedef typename Tr::Vertex Vertex;
|
||||
typedef typename Tr::Weighted_point Weighted_point;
|
||||
typedef typename Weighted_point::Weight Weight;
|
||||
|
||||
public:
|
||||
Insert_vertex_in_c3t3(C3T3& c3t3)
|
||||
: r_c3t3_(c3t3) {}
|
||||
|
||||
void operator()(const Vertex& vertex) const
|
||||
{
|
||||
typename Geom_traits::Construct_point_3 cp =
|
||||
r_c3t3_.triangulation().geom_traits().construct_point_3_object();
|
||||
typename Geom_traits::Compute_weight_3 cw =
|
||||
r_c3t3_.triangulation().geom_traits().compute_weight_3_object();
|
||||
namespace details {
|
||||
|
||||
// Get vh properties
|
||||
int dimension = vertex.in_dimension();
|
||||
Weight w = (dimension < 2) ? cw(vertex.point()) : 0;
|
||||
Weighted_point point(cp(vertex.point()), w);
|
||||
Index index = vertex.index();
|
||||
/**
|
||||
* @class Insert_vertex_in_c3t3
|
||||
*
|
||||
* A functor designed to insert unweighted points into the triangulation
|
||||
* of a C3T3 from C3T3::Tr::Vertex , keeping the dimension and indices.
|
||||
*/
|
||||
template <typename C3T3>
|
||||
class Insert_vertex_in_c3t3
|
||||
{
|
||||
private:
|
||||
typedef typename C3T3::Vertex_handle Vertex_handle;
|
||||
typedef typename C3T3::Index Index;
|
||||
|
||||
// Insert point and restore handle properties
|
||||
Vertex_handle new_vertex = r_c3t3_.triangulation().insert(point);
|
||||
r_c3t3_.set_index(new_vertex, index);
|
||||
r_c3t3_.set_dimension(new_vertex, dimension);
|
||||
typedef typename C3T3::Triangulation Tr;
|
||||
typedef typename Tr::Geom_traits Geom_traits;
|
||||
typedef typename Tr::Vertex Vertex;
|
||||
typedef typename Tr::Weighted_point Weighted_point;
|
||||
typedef typename Weighted_point::Weight Weight;
|
||||
|
||||
public:
|
||||
Insert_vertex_in_c3t3(C3T3& c3t3)
|
||||
: r_c3t3_(c3t3) {}
|
||||
|
||||
void operator()(const Vertex& vertex) const
|
||||
{
|
||||
typename Geom_traits::Construct_point_3 cp =
|
||||
r_c3t3_.triangulation().geom_traits().construct_point_3_object();
|
||||
typename Geom_traits::Compute_weight_3 cw =
|
||||
r_c3t3_.triangulation().geom_traits().compute_weight_3_object();
|
||||
|
||||
// Get vh properties
|
||||
int dimension = vertex.in_dimension();
|
||||
Weight w = (dimension < 2) ? cw(vertex.point()) : 0;
|
||||
Weighted_point point(cp(vertex.point()), w);
|
||||
Index index = vertex.index();
|
||||
|
||||
// Insert point and restore handle properties
|
||||
Vertex_handle new_vertex = r_c3t3_.triangulation().insert(point);
|
||||
r_c3t3_.set_index(new_vertex, index);
|
||||
r_c3t3_.set_dimension(new_vertex, dimension);
|
||||
|
||||
#if defined(CGAL_LINKED_WITH_TBB)\
|
||||
&& !defined(CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE)
|
||||
if (boost::is_convertible<typename C3T3::Concurrency_tag, CGAL::Parallel_tag>::value)
|
||||
{
|
||||
if (dimension == -1)
|
||||
r_c3t3_.add_far_point(new_vertex);
|
||||
}
|
||||
&& !defined(CGAL_PARALLEL_MESH_3_DO_NOT_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE)
|
||||
if (boost::is_convertible<typename C3T3::Concurrency_tag, CGAL::Parallel_tag>::value)
|
||||
{
|
||||
if (dimension == -1)
|
||||
r_c3t3_.add_far_point(new_vertex);
|
||||
}
|
||||
#endif
|
||||
#ifdef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE
|
||||
if (boost::is_convertible<typename C3T3::Concurrency_tag, CGAL::Sequential_tag>::value)
|
||||
{
|
||||
if (dimension == -1)
|
||||
r_c3t3_.add_far_point(new_vertex);
|
||||
}
|
||||
if (boost::is_convertible<typename C3T3::Concurrency_tag, CGAL::Sequential_tag>::value)
|
||||
{
|
||||
if (dimension == -1)
|
||||
r_c3t3_.add_far_point(new_vertex);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
C3T3& r_c3t3_;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
C3T3& r_c3t3_;
|
||||
};
|
||||
|
||||
} // namespace details
|
||||
|
||||
namespace parameters {
|
||||
|
||||
namespace internal {
|
||||
|
||||
const int undef_parameter = -1;
|
||||
|
||||
// Helpers
|
||||
struct Optimization_options_base
|
||||
{
|
||||
Optimization_options_base(bool b)
|
||||
: b_(b), time_limit_(undef_parameter), bound_(undef_parameter) {}
|
||||
|
||||
operator bool() const { return b_; }
|
||||
|
||||
bool is_time_limit_set() const { return time_limit_ != undef_parameter; }
|
||||
void set_time_limit(double d) { time_limit_ = d; }
|
||||
double time_limit() const { return time_limit_; }
|
||||
|
||||
bool is_bound_set() const { return bound_ != undef_parameter; }
|
||||
void set_bound(double d) { bound_ = d; }
|
||||
double bound() const { return bound_; }
|
||||
|
||||
private:
|
||||
bool b_;
|
||||
double time_limit_;
|
||||
double bound_;
|
||||
};
|
||||
|
||||
struct Global_optimization_options_base
|
||||
{
|
||||
Global_optimization_options_base()
|
||||
: convergence_(undef_parameter), max_it_nb_(undef_parameter) {}
|
||||
|
||||
bool is_convergence_set() const { return convergence_ != undef_parameter; }
|
||||
void set_convergence(double d) { convergence_ = d; }
|
||||
double convergence() const { return convergence_; }
|
||||
|
||||
bool is_max_iteration_number_set() const { return max_it_nb_ != undef_parameter; }
|
||||
void set_max_iteration_number(int i) { max_it_nb_ = i; }
|
||||
int max_iteration_number() const { return max_it_nb_; }
|
||||
|
||||
private:
|
||||
double convergence_;
|
||||
int max_it_nb_;
|
||||
};
|
||||
|
||||
// Perturb
|
||||
struct Perturb_options : public Optimization_options_base
|
||||
{
|
||||
Perturb_options(bool b) : Optimization_options_base(b) {}
|
||||
};
|
||||
|
||||
// Exude
|
||||
struct Exude_options : public Optimization_options_base
|
||||
{
|
||||
Exude_options(bool b) : Optimization_options_base(b) {}
|
||||
};
|
||||
|
||||
// Odt
|
||||
struct Odt_options : public Optimization_options_base
|
||||
, public Global_optimization_options_base
|
||||
{
|
||||
Odt_options(bool b) : Optimization_options_base(b)
|
||||
, Global_optimization_options_base() {}
|
||||
};
|
||||
|
||||
// Lloyd
|
||||
struct Lloyd_options : public Optimization_options_base
|
||||
, public Global_optimization_options_base
|
||||
{
|
||||
Lloyd_options(bool b) : Optimization_options_base(b)
|
||||
, Global_optimization_options_base() {}
|
||||
};
|
||||
|
||||
// Manifold
|
||||
struct Manifold_options {
|
||||
enum {
|
||||
NON_MANIFOLD = 0,
|
||||
MANIFOLD_WITH_BOUNDARY = 8,
|
||||
NO_BOUNDARY = 16,
|
||||
MANIFOLD = 24
|
||||
};
|
||||
|
||||
Manifold_options(const int topology)
|
||||
: mesh_topology(topology)
|
||||
{}
|
||||
Manifold_options()
|
||||
: mesh_topology(NON_MANIFOLD)
|
||||
{}
|
||||
namespace internal {
|
||||
|
||||
int mesh_topology;
|
||||
};
|
||||
const int undef_parameter = -1;
|
||||
|
||||
// Various Mesh_3 option
|
||||
struct Mesh_3_options {
|
||||
Mesh_3_options()
|
||||
: dump_after_init_prefix()
|
||||
, dump_after_refine_surface_prefix()
|
||||
, dump_after_refine_prefix()
|
||||
, dump_after_glob_opt_prefix()
|
||||
, dump_after_perturb_prefix()
|
||||
, dump_after_exude_prefix()
|
||||
, number_of_initial_points()
|
||||
, nonlinear_growth_of_balls(false)
|
||||
{}
|
||||
// Helpers
|
||||
struct Optimization_options_base
|
||||
{
|
||||
Optimization_options_base(bool b)
|
||||
: b_(b), time_limit_(undef_parameter), bound_(undef_parameter) {}
|
||||
|
||||
std::string dump_after_init_prefix;
|
||||
std::string dump_after_refine_surface_prefix;
|
||||
std::string dump_after_refine_prefix;
|
||||
std::string dump_after_glob_opt_prefix;
|
||||
std::string dump_after_perturb_prefix;
|
||||
std::string dump_after_exude_prefix;
|
||||
int number_of_initial_points;
|
||||
bool nonlinear_growth_of_balls;
|
||||
operator bool() const { return b_; }
|
||||
|
||||
}; // end struct Mesh_3_options
|
||||
bool is_time_limit_set() const { return time_limit_ != undef_parameter; }
|
||||
void set_time_limit(double d) { time_limit_ = d; }
|
||||
double time_limit() const { return time_limit_; }
|
||||
|
||||
} // end namespace internal
|
||||
bool is_bound_set() const { return bound_ != undef_parameter; }
|
||||
void set_bound(double d) { bound_ = d; }
|
||||
double bound() const { return bound_; }
|
||||
|
||||
private:
|
||||
bool b_;
|
||||
double time_limit_;
|
||||
double bound_;
|
||||
};
|
||||
|
||||
struct Global_optimization_options_base
|
||||
{
|
||||
Global_optimization_options_base()
|
||||
: convergence_(undef_parameter), max_it_nb_(undef_parameter) {}
|
||||
|
||||
bool is_convergence_set() const { return convergence_ != undef_parameter; }
|
||||
void set_convergence(double d) { convergence_ = d; }
|
||||
double convergence() const { return convergence_; }
|
||||
|
||||
bool is_max_iteration_number_set() const { return max_it_nb_ != undef_parameter; }
|
||||
void set_max_iteration_number(int i) { max_it_nb_ = i; }
|
||||
int max_iteration_number() const { return max_it_nb_; }
|
||||
|
||||
private:
|
||||
double convergence_;
|
||||
int max_it_nb_;
|
||||
};
|
||||
|
||||
// Perturb
|
||||
struct Perturb_options : public Optimization_options_base
|
||||
{
|
||||
Perturb_options(bool b) : Optimization_options_base(b) {}
|
||||
};
|
||||
|
||||
// Exude
|
||||
struct Exude_options : public Optimization_options_base
|
||||
{
|
||||
Exude_options(bool b) : Optimization_options_base(b) {}
|
||||
};
|
||||
|
||||
// Odt
|
||||
struct Odt_options : public Optimization_options_base
|
||||
, public Global_optimization_options_base
|
||||
{
|
||||
Odt_options(bool b) : Optimization_options_base(b)
|
||||
, Global_optimization_options_base() {}
|
||||
};
|
||||
|
||||
// Lloyd
|
||||
struct Lloyd_options : public Optimization_options_base
|
||||
, public Global_optimization_options_base
|
||||
{
|
||||
Lloyd_options(bool b) : Optimization_options_base(b)
|
||||
, Global_optimization_options_base() {}
|
||||
};
|
||||
|
||||
// Manifold
|
||||
struct Manifold_options {
|
||||
enum {
|
||||
NON_MANIFOLD = 0,
|
||||
MANIFOLD_WITH_BOUNDARY = 8,
|
||||
NO_BOUNDARY = 16,
|
||||
MANIFOLD = 24
|
||||
};
|
||||
|
||||
Manifold_options(const int topology)
|
||||
: mesh_topology(topology)
|
||||
{}
|
||||
Manifold_options()
|
||||
: mesh_topology(NON_MANIFOLD)
|
||||
{}
|
||||
|
||||
int mesh_topology;
|
||||
};
|
||||
|
||||
// Various Mesh_3 option
|
||||
struct Mesh_3_options {
|
||||
Mesh_3_options()
|
||||
: dump_after_init_prefix()
|
||||
, dump_after_refine_surface_prefix()
|
||||
, dump_after_refine_prefix()
|
||||
, dump_after_glob_opt_prefix()
|
||||
, dump_after_perturb_prefix()
|
||||
, dump_after_exude_prefix()
|
||||
, number_of_initial_points()
|
||||
, nonlinear_growth_of_balls(false)
|
||||
{}
|
||||
|
||||
std::string dump_after_init_prefix;
|
||||
std::string dump_after_refine_surface_prefix;
|
||||
std::string dump_after_refine_prefix;
|
||||
std::string dump_after_glob_opt_prefix;
|
||||
std::string dump_after_perturb_prefix;
|
||||
std::string dump_after_exude_prefix;
|
||||
int number_of_initial_points;
|
||||
bool nonlinear_growth_of_balls;
|
||||
|
||||
}; // end struct Mesh_3_options
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
// see <CGAL/config.h>
|
||||
CGAL_PRAGMA_DIAG_PUSH
|
||||
|
|
@ -228,191 +227,191 @@ CGAL_PRAGMA_DIAG_PUSH
|
|||
CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
|
||||
|
||||
|
||||
// -----------------------------------
|
||||
// Perturb
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_FUNCTION((internal::Perturb_options), perturb, tag,
|
||||
(optional (time_limit_, *, internal::undef_parameter )
|
||||
(sliver_bound_, *, default_values::perturb_sliver_bound )))
|
||||
{
|
||||
internal::Perturb_options options(true);
|
||||
|
||||
if ( internal::undef_parameter != time_limit_ )
|
||||
options.set_time_limit(time_limit_);
|
||||
|
||||
options.set_bound(sliver_bound_);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
inline internal::Perturb_options no_perturb() { return internal::Perturb_options(false); }
|
||||
|
||||
// -----------------------------------
|
||||
// Exude
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_FUNCTION((internal::Exude_options), exude, tag,
|
||||
(optional (time_limit_, *, internal::undef_parameter )
|
||||
(sliver_bound_, *, default_values::exude_sliver_bound )))
|
||||
{
|
||||
internal::Exude_options options(true);
|
||||
|
||||
if ( internal::undef_parameter != time_limit_ )
|
||||
options.set_time_limit(time_limit_);
|
||||
|
||||
options.set_bound(sliver_bound_);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
inline internal::Exude_options no_exude() { return internal::Exude_options(false); }
|
||||
|
||||
// -----------------------------------
|
||||
// Odt
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_FUNCTION((internal::Odt_options), odt, tag,
|
||||
(optional (time_limit_, *, 0 )
|
||||
(max_iteration_number_, *, 0 )
|
||||
(convergence_, *, default_values::odt_convergence_ratio )
|
||||
(freeze_bound_, *, default_values::odt_freeze_ratio )))
|
||||
{
|
||||
internal::Odt_options options(true);
|
||||
// -----------------------------------
|
||||
// Perturb
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_FUNCTION((internal::Perturb_options), perturb, tag,
|
||||
(optional (time_limit_, *, internal::undef_parameter )
|
||||
(sliver_bound_, *, default_values::perturb_sliver_bound )))
|
||||
{
|
||||
internal::Perturb_options options(true);
|
||||
|
||||
if ( internal::undef_parameter != time_limit_ )
|
||||
options.set_time_limit(time_limit_);
|
||||
options.set_bound(freeze_bound_);
|
||||
options.set_convergence(convergence_);
|
||||
options.set_max_iteration_number(max_iteration_number_);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
inline internal::Odt_options no_odt() { return internal::Odt_options(false); }
|
||||
|
||||
// -----------------------------------
|
||||
// Lloyd
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_FUNCTION((internal::Lloyd_options), lloyd, tag,
|
||||
(optional (time_limit_, *, 0 )
|
||||
(max_iteration_number_, *, 0 )
|
||||
(convergence_, *, default_values::lloyd_convergence_ratio )
|
||||
(freeze_bound_, *, default_values::lloyd_freeze_ratio )))
|
||||
{
|
||||
internal::Lloyd_options options(true);
|
||||
|
||||
options.set_time_limit(time_limit_);
|
||||
options.set_bound(freeze_bound_);
|
||||
options.set_convergence(convergence_);
|
||||
options.set_max_iteration_number(max_iteration_number_);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
inline internal::Lloyd_options no_lloyd() { return internal::Lloyd_options(false); }
|
||||
|
||||
// -----------------------------------
|
||||
// Manifold options ------------------
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_FUNCTION((internal::Manifold_options), manifold_options, tag,
|
||||
(optional
|
||||
(mesh_topology_, (int), -1)
|
||||
)
|
||||
options.set_bound(sliver_bound_);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
inline internal::Perturb_options no_perturb() { return internal::Perturb_options(false); }
|
||||
|
||||
// -----------------------------------
|
||||
// Exude
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_FUNCTION((internal::Exude_options), exude, tag,
|
||||
(optional (time_limit_, *, internal::undef_parameter )
|
||||
(sliver_bound_, *, default_values::exude_sliver_bound )))
|
||||
{
|
||||
internal::Exude_options options(true);
|
||||
|
||||
if ( internal::undef_parameter != time_limit_ )
|
||||
options.set_time_limit(time_limit_);
|
||||
|
||||
options.set_bound(sliver_bound_);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
inline internal::Exude_options no_exude() { return internal::Exude_options(false); }
|
||||
|
||||
// -----------------------------------
|
||||
// Odt
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_FUNCTION((internal::Odt_options), odt, tag,
|
||||
(optional (time_limit_, *, 0 )
|
||||
(max_iteration_number_, *, 0 )
|
||||
(convergence_, *, default_values::odt_convergence_ratio )
|
||||
(freeze_bound_, *, default_values::odt_freeze_ratio )))
|
||||
{
|
||||
internal::Odt_options options(true);
|
||||
|
||||
options.set_time_limit(time_limit_);
|
||||
options.set_bound(freeze_bound_);
|
||||
options.set_convergence(convergence_);
|
||||
options.set_max_iteration_number(max_iteration_number_);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
inline internal::Odt_options no_odt() { return internal::Odt_options(false); }
|
||||
|
||||
// -----------------------------------
|
||||
// Lloyd
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_FUNCTION((internal::Lloyd_options), lloyd, tag,
|
||||
(optional (time_limit_, *, 0 )
|
||||
(max_iteration_number_, *, 0 )
|
||||
(convergence_, *, default_values::lloyd_convergence_ratio )
|
||||
(freeze_bound_, *, default_values::lloyd_freeze_ratio )))
|
||||
{
|
||||
internal::Lloyd_options options(true);
|
||||
|
||||
options.set_time_limit(time_limit_);
|
||||
options.set_bound(freeze_bound_);
|
||||
options.set_convergence(convergence_);
|
||||
options.set_max_iteration_number(max_iteration_number_);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
inline internal::Lloyd_options no_lloyd() { return internal::Lloyd_options(false); }
|
||||
|
||||
// -----------------------------------
|
||||
// Manifold options ------------------
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_FUNCTION((internal::Manifold_options), manifold_options, tag,
|
||||
(optional
|
||||
(mesh_topology_, (int), -1)
|
||||
)
|
||||
)
|
||||
{
|
||||
internal::Manifold_options options;
|
||||
options.mesh_topology = mesh_topology_;
|
||||
return options;
|
||||
}
|
||||
|
||||
inline internal::Manifold_options manifold()
|
||||
{
|
||||
return internal::Manifold_options(
|
||||
internal::Manifold_options::MANIFOLD);
|
||||
}
|
||||
inline internal::Manifold_options manifold_with_boundary()
|
||||
{
|
||||
return internal::Manifold_options(
|
||||
internal::Manifold_options::MANIFOLD_WITH_BOUNDARY);
|
||||
}
|
||||
inline internal::Manifold_options non_manifold()
|
||||
{
|
||||
return internal::Manifold_options(
|
||||
internal::Manifold_options::NON_MANIFOLD);
|
||||
}
|
||||
|
||||
// -----------------------------------
|
||||
// Mesh options
|
||||
// -----------------------------------
|
||||
|
||||
// Undocumented Boost parameter for refine_mesh_3 and make_mesh_3.
|
||||
// Allows to dump the mesh at given stage of the mesh generation
|
||||
// algorithm.
|
||||
BOOST_PARAMETER_FUNCTION((internal::Mesh_3_options), mesh_3_options, tag,
|
||||
(optional
|
||||
(dump_after_init_prefix_, (std::string), "" )
|
||||
(dump_after_refine_surface_prefix_, (std::string), "" )
|
||||
(dump_after_refine_prefix_, (std::string), "" )
|
||||
(dump_after_glob_opt_prefix_, (std::string), "" )
|
||||
(dump_after_perturb_prefix_, (std::string), "" )
|
||||
(dump_after_exude_prefix_, (std::string), "" )
|
||||
(number_of_initial_points_, (int), -1)
|
||||
)
|
||||
{
|
||||
internal::Manifold_options options;
|
||||
options.mesh_topology = mesh_topology_;
|
||||
return options;
|
||||
}
|
||||
)
|
||||
{
|
||||
internal::Mesh_3_options options;
|
||||
|
||||
inline internal::Manifold_options manifold()
|
||||
{
|
||||
return internal::Manifold_options(
|
||||
internal::Manifold_options::MANIFOLD);
|
||||
}
|
||||
inline internal::Manifold_options manifold_with_boundary()
|
||||
{
|
||||
return internal::Manifold_options(
|
||||
internal::Manifold_options::MANIFOLD_WITH_BOUNDARY);
|
||||
}
|
||||
inline internal::Manifold_options non_manifold()
|
||||
{
|
||||
return internal::Manifold_options(
|
||||
internal::Manifold_options::NON_MANIFOLD);
|
||||
}
|
||||
options.dump_after_init_prefix=dump_after_init_prefix_;
|
||||
options.dump_after_refine_surface_prefix=dump_after_refine_surface_prefix_;
|
||||
options.dump_after_refine_prefix=dump_after_refine_prefix_;
|
||||
options.dump_after_glob_opt_prefix=dump_after_glob_opt_prefix_;
|
||||
options.dump_after_perturb_prefix=dump_after_perturb_prefix_;
|
||||
options.dump_after_exude_prefix=dump_after_exude_prefix_;
|
||||
options.number_of_initial_points=number_of_initial_points_;
|
||||
|
||||
// -----------------------------------
|
||||
// Mesh options
|
||||
// -----------------------------------
|
||||
return options;
|
||||
}
|
||||
|
||||
// Undocumented Boost parameter for refine_mesh_3 and make_mesh_3.
|
||||
// Allows to dump the mesh at given stage of the mesh generation
|
||||
// algorithm.
|
||||
BOOST_PARAMETER_FUNCTION((internal::Mesh_3_options), mesh_3_options, tag,
|
||||
(optional
|
||||
(dump_after_init_prefix_, (std::string), "" )
|
||||
(dump_after_refine_surface_prefix_, (std::string), "" )
|
||||
(dump_after_refine_prefix_, (std::string), "" )
|
||||
(dump_after_glob_opt_prefix_, (std::string), "" )
|
||||
(dump_after_perturb_prefix_, (std::string), "" )
|
||||
(dump_after_exude_prefix_, (std::string), "" )
|
||||
(number_of_initial_points_, (int), -1)
|
||||
)
|
||||
)
|
||||
{
|
||||
internal::Mesh_3_options options;
|
||||
// Undocumented Boost parameter for refine_mesh_3 and make_mesh_3.
|
||||
// Default Mesh_3_options: dump at every stage of the mesh generation.
|
||||
inline internal::Mesh_3_options mesh_3_dump()
|
||||
{
|
||||
internal::Mesh_3_options options;
|
||||
|
||||
options.dump_after_init_prefix=dump_after_init_prefix_;
|
||||
options.dump_after_refine_surface_prefix=dump_after_refine_surface_prefix_;
|
||||
options.dump_after_refine_prefix=dump_after_refine_prefix_;
|
||||
options.dump_after_glob_opt_prefix=dump_after_glob_opt_prefix_;
|
||||
options.dump_after_perturb_prefix=dump_after_perturb_prefix_;
|
||||
options.dump_after_exude_prefix=dump_after_exude_prefix_;
|
||||
options.number_of_initial_points=number_of_initial_points_;
|
||||
options.dump_after_init_prefix = "mesh_dump_after_init";
|
||||
options.dump_after_refine_surface_prefix = "mesh_dump_after_refine_surface";
|
||||
options.dump_after_refine_prefix = "mesh_dump_after_refine";
|
||||
options.dump_after_glob_opt_prefix = "mesh_dump_after_glob_opt";
|
||||
options.dump_after_perturb_prefix = "mesh_dump_after_perturb";
|
||||
options.dump_after_exude_prefix = "mesh_dump_after_exude";
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
// Undocumented Boost parameter for refine_mesh_3 and make_mesh_3.
|
||||
// Default Mesh_3_options: dump at every stage of the mesh generation.
|
||||
inline internal::Mesh_3_options mesh_3_dump()
|
||||
{
|
||||
internal::Mesh_3_options options;
|
||||
|
||||
options.dump_after_init_prefix="mesh_dump_after_init";
|
||||
options.dump_after_refine_surface_prefix="mesh_dump_after_refine_surface";
|
||||
options.dump_after_refine_prefix="mesh_dump_after_refine";
|
||||
options.dump_after_glob_opt_prefix="mesh_dump_after_glob_opt";
|
||||
options.dump_after_perturb_prefix="mesh_dump_after_perturb";
|
||||
options.dump_after_exude_prefix="mesh_dump_after_exude";
|
||||
|
||||
return options;
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
CGAL_PRAGMA_DIAG_POP
|
||||
|
||||
// -----------------------------------
|
||||
// Reset_c3t3 (undocumented)
|
||||
// -----------------------------------
|
||||
CGAL_MESH_BOOLEAN_PARAMETER(Reset,reset_c3t3,no_reset_c3t3)
|
||||
// CGAL_MESH_BOOLEAN_PARAMETER defined in <CGAL/Mesh_3/global_parameters.h>
|
||||
|
||||
// -----------------------------------
|
||||
// Reset_c3t3 (undocumented)
|
||||
// -----------------------------------
|
||||
CGAL_MESH_BOOLEAN_PARAMETER(Reset, reset_c3t3, no_reset_c3t3)
|
||||
// CGAL_MESH_BOOLEAN_PARAMETER defined in <CGAL/Mesh_3/global_parameters.h>
|
||||
|
||||
// see <CGAL/config.h>
|
||||
CGAL_PRAGMA_DIAG_PUSH
|
||||
// see <CGAL/Mesh_3/config.h>
|
||||
CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
|
||||
|
||||
// -----------------------------------
|
||||
// Parameters
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_NAME( exude_param )
|
||||
BOOST_PARAMETER_NAME( perturb_param )
|
||||
BOOST_PARAMETER_NAME( odt_param )
|
||||
BOOST_PARAMETER_NAME( lloyd_param )
|
||||
BOOST_PARAMETER_NAME( reset_param )
|
||||
BOOST_PARAMETER_NAME( mesh_options_param )
|
||||
BOOST_PARAMETER_NAME( manifold_options_param )
|
||||
// -----------------------------------
|
||||
// Parameters
|
||||
// -----------------------------------
|
||||
BOOST_PARAMETER_NAME( exude_param )
|
||||
BOOST_PARAMETER_NAME( perturb_param )
|
||||
BOOST_PARAMETER_NAME( odt_param )
|
||||
BOOST_PARAMETER_NAME( lloyd_param )
|
||||
BOOST_PARAMETER_NAME( reset_param )
|
||||
BOOST_PARAMETER_NAME( mesh_options_param )
|
||||
BOOST_PARAMETER_NAME( manifold_options_param )
|
||||
|
||||
CGAL_PRAGMA_DIAG_POP
|
||||
} // end namespace parameters
|
||||
|
||||
|
||||
// see <CGAL/config.h>
|
||||
CGAL_PRAGMA_DIAG_PUSH
|
||||
// see <CGAL/Mesh_3/config.h>
|
||||
|
|
@ -423,14 +422,14 @@ BOOST_PARAMETER_FUNCTION(
|
|||
refine_mesh_3,
|
||||
parameters::tag,
|
||||
(required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced
|
||||
(deduced
|
||||
(deduced
|
||||
(optional
|
||||
(exude_param, (parameters::internal::Exude_options), parameters::exude())
|
||||
(perturb_param, (parameters::internal::Perturb_options), parameters::perturb())
|
||||
(odt_param, (parameters::internal::Odt_options), parameters::no_odt())
|
||||
(lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd())
|
||||
(reset_param, (parameters::Reset), parameters::reset_c3t3())
|
||||
(mesh_options_param, (parameters::internal::Mesh_3_options),
|
||||
(mesh_options_param, (parameters::internal::Mesh_3_options),
|
||||
parameters::internal::Mesh_3_options())
|
||||
(manifold_options_param, (parameters::internal::Manifold_options),
|
||||
parameters::internal::Manifold_options())
|
||||
|
|
@ -452,7 +451,7 @@ BOOST_PARAMETER_FUNCTION(
|
|||
|
||||
CGAL_PRAGMA_DIAG_POP
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief This function refines the mesh c3t3 wrt domain & criteria
|
||||
*
|
||||
|
|
@ -479,7 +478,7 @@ void refine_mesh_3_impl(C3T3& c3t3,
|
|||
const parameters::internal::Odt_options& odt,
|
||||
const parameters::internal::Lloyd_options& lloyd,
|
||||
bool reset_c3t3,
|
||||
const parameters::internal::Mesh_3_options&
|
||||
const parameters::internal::Mesh_3_options&
|
||||
mesh_options = parameters::internal::Mesh_3_options(),
|
||||
const parameters::internal::Manifold_options&
|
||||
manifold_options = parameters::internal::Manifold_options())
|
||||
|
|
@ -498,7 +497,7 @@ void refine_mesh_3_impl(C3T3& c3t3,
|
|||
// TODO: corners and edges are not restored
|
||||
c3t3.swap(tmp_c3t3);
|
||||
}
|
||||
|
||||
|
||||
dump_c3t3(c3t3, mesh_options.dump_after_init_prefix);
|
||||
|
||||
// Build mesher and launch refinement process
|
||||
|
|
@ -518,7 +517,7 @@ void refine_mesh_3_impl(C3T3& c3t3,
|
|||
parameters::convergence = odt.convergence(),
|
||||
parameters::freeze_bound = odt.bound());
|
||||
}
|
||||
|
||||
|
||||
// Lloyd
|
||||
if ( lloyd )
|
||||
{
|
||||
|
|
@ -538,7 +537,7 @@ void refine_mesh_3_impl(C3T3& c3t3,
|
|||
if ( perturb )
|
||||
{
|
||||
double perturb_time_limit = refine_time;
|
||||
|
||||
|
||||
if ( perturb.is_time_limit_set() )
|
||||
perturb_time_limit = perturb.time_limit();
|
||||
|
||||
|
|
@ -554,20 +553,18 @@ void refine_mesh_3_impl(C3T3& c3t3,
|
|||
if ( exude )
|
||||
{
|
||||
double exude_time_limit = refine_time;
|
||||
|
||||
|
||||
if ( exude.is_time_limit_set() )
|
||||
exude_time_limit = exude.time_limit();
|
||||
|
||||
|
||||
exude_mesh_3(c3t3,
|
||||
parameters::time_limit = exude_time_limit,
|
||||
parameters::sliver_bound = exude.bound());
|
||||
|
||||
dump_c3t3(c3t3, mesh_options.dump_after_exude_prefix);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // end namespace CGAL
|
||||
|
||||
|
||||
#endif // CGAL_REFINE_MESH_3_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue