Merge pull request #18 from sloriot/Polyhedron_demo-fix_erode-sloriot

handle when boundary of the selection is on the border
This commit is contained in:
Sebastien Loriot 2015-03-17 17:06:19 +01:00
commit 755c95e5e9
1 changed files with 1 additions and 2 deletions

View File

@ -145,12 +145,11 @@ erode_face_selection(
{
hd = opposite(hd, graph);
face_descriptor fd=face( hd, graph );
while( get(is_selected,fd) )
while( face(hd, graph)!=GT::null_face() && get(is_selected,fd) )
{
elements_to_remove.insert(fd);
hd=opposite( next(hd, graph), graph );
fd=face(hd, graph);
if ( face(hd, graph)==GT::null_face() ) break;
}
}