mirror of https://github.com/CGAL/cgal
add Manifold_options as a new boost parameter name for Mesh_3
there are 3 possible values for this parameter : manifold(), manifold_with_boundary(), non_manifold() //the default it will eventually replace the part of Mesh_facet_topology that is dedicated to MANIFOLD
This commit is contained in:
parent
bac0452224
commit
f4c8415dca
|
|
@ -83,6 +83,8 @@ BOOST_PARAMETER_NAME( (do_freeze, tag) do_freeze_)
|
|||
BOOST_PARAMETER_NAME( (max_iteration_number, tag) max_iteration_number_ )
|
||||
BOOST_PARAMETER_NAME( (convergence, tag) convergence_)
|
||||
|
||||
BOOST_PARAMETER_NAME( (mesh_topology, tag) mesh_topology_)
|
||||
|
||||
BOOST_PARAMETER_NAME( (dump_after_init_prefix, tag ) dump_after_init_prefix_)
|
||||
BOOST_PARAMETER_NAME( (dump_after_refine_surface_prefix, tag ) dump_after_refine_surface_prefix_)
|
||||
BOOST_PARAMETER_NAME( (dump_after_refine_prefix, tag ) dump_after_refine_prefix_)
|
||||
|
|
|
|||
|
|
@ -413,13 +413,16 @@ BOOST_PARAMETER_FUNCTION(
|
|||
(lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd())
|
||||
(mesh_options_param, (parameters::internal::Mesh_3_options),
|
||||
parameters::internal::Mesh_3_options())
|
||||
(manifold_options_param, (parameters::internal::Manifold_options),
|
||||
parameters::internal::Manifold_options())
|
||||
)
|
||||
)
|
||||
)
|
||||
{
|
||||
make_mesh_3_impl(c3t3, domain, criteria,
|
||||
exude_param, perturb_param, odt_param, lloyd_param,
|
||||
features_param.features(), mesh_options_param);
|
||||
features_param.features(), mesh_options_param,
|
||||
manifold_options_param);
|
||||
}
|
||||
CGAL_PRAGMA_DIAG_POP
|
||||
|
||||
|
|
@ -444,7 +447,9 @@ void make_mesh_3_impl(C3T3& c3t3,
|
|||
const parameters::internal::Lloyd_options& lloyd,
|
||||
const bool with_features,
|
||||
const parameters::internal::Mesh_3_options&
|
||||
mesh_options = parameters::internal::Mesh_3_options())
|
||||
mesh_options = parameters::internal::Mesh_3_options(),
|
||||
const parameters::internal::Manifold_options&
|
||||
manifold_options = parameters::internal::Manifold_options())
|
||||
{
|
||||
#ifdef CGAL_MESH_3_INITIAL_POINTS_NO_RANDOM_SHOOTING
|
||||
CGAL::get_default_random() = CGAL::Random(0);
|
||||
|
|
@ -467,7 +472,8 @@ void make_mesh_3_impl(C3T3& c3t3,
|
|||
// Build mesher and launch refinement process
|
||||
// Don't reset c3t3 as we just created it
|
||||
refine_mesh_3(c3t3, domain, criteria,
|
||||
exude, perturb, odt, lloyd, parameters::no_reset_c3t3(), mesh_options);
|
||||
exude, perturb, odt, lloyd, parameters::no_reset_c3t3(), mesh_options,
|
||||
manifold_options);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -177,6 +177,25 @@ namespace parameters {
|
|||
, Global_optimization_options_base() {}
|
||||
};
|
||||
|
||||
// Manifold
|
||||
struct Manifold_options {
|
||||
enum {
|
||||
NON_MANIFOLD = -1,
|
||||
MANIFOLD_WITH_BOUNDARY = 8,
|
||||
NO_BOUNDARY = 16,
|
||||
MANIFOLD = 24
|
||||
};
|
||||
|
||||
Manifold_options(const int& topology)
|
||||
: mesh_topology(topology)
|
||||
{}
|
||||
Manifold_options()
|
||||
: mesh_topology(MANIFOLD)
|
||||
{}
|
||||
|
||||
int mesh_topology;
|
||||
};
|
||||
|
||||
// Various Mesh_3 option
|
||||
struct Mesh_3_options {
|
||||
Mesh_3_options()
|
||||
|
|
@ -288,7 +307,38 @@ CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
|
|||
}
|
||||
|
||||
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
|
||||
// -----------------------------------
|
||||
|
||||
|
|
@ -358,6 +408,7 @@ CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
|
|||
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
|
||||
|
|
@ -381,6 +432,8 @@ BOOST_PARAMETER_FUNCTION(
|
|||
(reset_param, (parameters::Reset), parameters::reset_c3t3())
|
||||
(mesh_options_param, (parameters::internal::Mesh_3_options),
|
||||
parameters::internal::Mesh_3_options())
|
||||
(manifold_options_param, (parameters::internal::Manifold_options),
|
||||
parameters::internal::Manifold_options())
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
@ -393,7 +446,8 @@ BOOST_PARAMETER_FUNCTION(
|
|||
odt_param,
|
||||
lloyd_param,
|
||||
reset_param(),
|
||||
mesh_options_param);
|
||||
mesh_options_param,
|
||||
manifold_options_param);
|
||||
}
|
||||
|
||||
CGAL_PRAGMA_DIAG_POP
|
||||
|
|
@ -426,10 +480,14 @@ void refine_mesh_3_impl(C3T3& c3t3,
|
|||
const parameters::internal::Lloyd_options& lloyd,
|
||||
bool reset_c3t3,
|
||||
const parameters::internal::Mesh_3_options&
|
||||
mesh_options = parameters::internal::Mesh_3_options())
|
||||
mesh_options = parameters::internal::Mesh_3_options(),
|
||||
const parameters::internal::Manifold_options&
|
||||
manifold_options = parameters::internal::Manifold_options())
|
||||
{
|
||||
typedef Mesh_3::Mesher_3<C3T3, MeshCriteria, MeshDomain> Mesher;
|
||||
|
||||
//TODO : do something with the manifold_options
|
||||
|
||||
// Reset c3t3 (i.e. remove weights) if needed
|
||||
if ( reset_c3t3 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue