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