reuse the first full cell in case it already exist.

when a triangulation is cleared, a full cell is always
created when adding the infinite vertex
This commit is contained in:
Sébastien Loriot 2018-10-04 15:16:40 +02:00
parent 4ed546edce
commit 3ed89cbbab
1 changed files with 3 additions and 1 deletions

View File

@ -1390,7 +1390,9 @@ Triangulation_data_structure<Dimen, Vb, Fcb>
std::size_t i = 0; std::size_t i = 0;
while( i < m ) while( i < m )
{ {
Full_cell_handle s = new_full_cell(); Full_cell_handle s = (i==0 && full_cells_.size()==1 )
? full_cells_begin()
: new_full_cell();
full_cells.push_back(s); full_cells.push_back(s);
for( int j = 0; j <= cd; ++j ) for( int j = 0; j <= cd; ++j )
{ {