MeshChecker: rewrite a check with modern APIs, make error message more verbose.
This commit is contained in:
@@ -220,24 +220,18 @@ check(unsigned int _targets, std::ostream& _os)
|
||||
typename Mesh::FaceHandle fh;
|
||||
typename Mesh::ConstFaceHalfedgeIter fh_it;
|
||||
|
||||
for (; f_it != f_end; ++f_it)
|
||||
{
|
||||
if (!is_deleted(*f_it))
|
||||
{
|
||||
fh = *f_it;
|
||||
|
||||
for (fh_it=mesh_.cfh_iter(fh); fh_it.is_valid(); ++fh_it)
|
||||
{
|
||||
if (mesh_.face_handle(*fh_it) != fh)
|
||||
{
|
||||
for(const auto fh: mesh_.faces()) {
|
||||
for(const auto heh: fh.halfedges()) {
|
||||
if (heh.face() != fh) {
|
||||
_os << "MeshChecker: face " << fh
|
||||
<< ": its halfedge does not reference face\n";
|
||||
<< ": its halfedge " << heh << " references a different face: "
|
||||
<< heh.face()
|
||||
<< ".\n";
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user