improve initialization when features are inserted

when the c3t3 contains no cells after initialization by features,
it may be needed to add more points for initialization, even when
the nb of facets in complex is > 0
It is the case for example when facets cover a very small part, or
too few connected components of the domain
This commit is contained in:
Jane Tournois
2023-02-21 09:28:48 +00:00
committed by Jane Tournois
parent ec00fa30b2
commit de1369d8ec
2 changed files with 20 additions and 0 deletions
+13
View File
@@ -792,6 +792,7 @@ public:
Moving_vertices_set& moving_vertices);
void update_restricted_facets();
void update_restricted_cells();
#ifdef CGAL_INTRUSIVE_LIST
template <typename OutdatedCells>
@@ -2925,6 +2926,18 @@ update_restricted_facets()
updater(*fit);
}
template <typename C3T3, typename MD>
void
C3T3_helpers<C3T3, MD>::
update_restricted_cells()
{
Update_c3t3 updater(domain_, c3t3_);
for (typename C3T3::Triangulation::Finite_cells_iterator
cit = tr_.finite_cells_begin();
cit != tr_.finite_cells_end(); ++cit)
updater(cit);
}
template <typename C3T3, typename MD>
template <typename OutdatedCellsOutputIterator,
typename DeletedCellsOutputIterator>
+7
View File
@@ -326,6 +326,13 @@ struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_true >
if (c3t3.number_of_facets() == 0) {
need_more_init = true;
}
else
{
helper.update_restricted_cells();
if(c3t3.number_of_cells() == 0) {
need_more_init = true;
}
}
}
if(need_more_init) {
init_c3t3(c3t3, domain, criteria,