Merge pull request #1151 from afabri/Polyhedron_IO-stl_reader-GF

ignore triangles with 2 or 3 identical vertices
This commit is contained in:
Sebastien Loriot 2016-06-13 09:15:53 +02:00 committed by GitHub
commit 162bdc67b4
1 changed files with 9 additions and 1 deletions

View File

@ -80,7 +80,15 @@ namespace CGAL{
ijk[j] = iti->second;
}
}
facets.push_back(ijk);
if((ijk[0] != ijk[1]) &&
(ijk[0] != ijk[2]) &&
(ijk[1] != ijk[2])){
facets.push_back(ijk);
}else{
if(verbose){
std::cerr << "ignore degenerate face" << std::endl;
}
}
char c;
input.read(reinterpret_cast<char*>(&c), sizeof(c));
input.read(reinterpret_cast<char*>(&c), sizeof(c));