mirror of https://github.com/CGAL/cgal
Merge pull request #1506 from lrineau/Mesh_3-fix_issue_1501-lrineau
Mesh_3: fix issue #1501 - about degenerate cases in initialization
This commit is contained in:
commit
31b3ae37f0
|
|
@ -775,6 +775,8 @@ public:
|
|||
ForwardIterator last_cell,
|
||||
Moving_vertices_set& moving_vertices);
|
||||
|
||||
void update_restricted_facets();
|
||||
|
||||
#ifdef CGAL_INTRUSIVE_LIST
|
||||
template <typename OutdatedCells>
|
||||
void rebuild_restricted_delaunay(OutdatedCells& outdated_cells,
|
||||
|
|
@ -2863,6 +2865,17 @@ rebuild_restricted_delaunay(ForwardIterator first_cell,
|
|||
}
|
||||
}
|
||||
|
||||
template <typename C3T3, typename MD>
|
||||
void
|
||||
C3T3_helpers<C3T3, MD>::
|
||||
update_restricted_facets()
|
||||
{
|
||||
Update_c3t3 updater(domain_, c3t3_);
|
||||
for (typename C3T3::Triangulation::Finite_facets_iterator
|
||||
fit = tr_.finite_facets_begin();
|
||||
fit != tr_.finite_facets_end(); ++fit)
|
||||
updater(*fit);
|
||||
}
|
||||
|
||||
template <typename C3T3, typename MD>
|
||||
template <typename OutdatedCellsOutputIterator,
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include <CGAL/tags.h>
|
||||
#include <CGAL/Mesh_3/Protect_edges_sizing_field.h>
|
||||
#include <CGAL/Mesh_3/Has_features.h>
|
||||
#include <CGAL/Mesh_3/C3T3_helpers.h>
|
||||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
|
||||
|
|
@ -262,7 +263,17 @@ struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_true >
|
|||
|
||||
// If c3t3 initialization is not sufficient (may happen if there is only
|
||||
// a planar curve as feature for example), add some surface points
|
||||
if ( c3t3.triangulation().dimension() != 3 ) {
|
||||
|
||||
bool need_more_init = c3t3.triangulation().dimension() != 3;
|
||||
if(!need_more_init) {
|
||||
CGAL::Mesh_3::C3T3_helpers<C3T3, MD> helper(c3t3, domain);
|
||||
helper.update_restricted_facets();
|
||||
|
||||
if (c3t3.number_of_facets() == 0) {
|
||||
need_more_init = true;
|
||||
}
|
||||
}
|
||||
if(need_more_init) {
|
||||
init_c3t3(c3t3, domain, criteria, nb_initial_points);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1387,10 +1387,6 @@ void Scene_c3t3_item_priv::computeElements()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (item->isEmpty()){
|
||||
return;
|
||||
}
|
||||
//The facets
|
||||
{
|
||||
for (C3t3::Facet_iterator
|
||||
|
|
|
|||
Loading…
Reference in New Issue