MeshChecker: rewrite a check with modern APIs, make error message more verbose.

This commit is contained in:
Martin Heistermann
2023-07-21 17:25:42 +02:00
parent 197a80bcb8
commit 6e2d5a8548

View File

@@ -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;
}
}
}
}
}