Mesh analyzing algorithms

This commit is contained in:
wmayer
2013-02-17 08:28:01 +01:00
parent 8079e6452b
commit 0abef4d4e3
13 changed files with 441 additions and 55 deletions

View File

@@ -1108,15 +1108,18 @@ bool MeshObject::hasNonManifolds() const
void MeshObject::removeNonManifolds()
{
unsigned long count = _kernel.CountFacets();
MeshCore::MeshEvalTopology cMeshEval(_kernel);
if (!cMeshEval.Evaluate()) {
MeshCore::MeshFixTopology cMeshFix(_kernel, cMeshEval.GetFacets());
cMeshFix.Fixup();
MeshCore::MeshEvalTopology f_eval(_kernel);
if (!f_eval.Evaluate()) {
MeshCore::MeshFixTopology f_fix(_kernel, f_eval.GetFacets());
f_fix.Fixup();
deletedFacets(f_fix.GetDeletedFaces());
}
MeshCore::MeshEvalPointManifolds p_eval(_kernel);
if (!p_eval.Evaluate()) {
std::vector<unsigned long> faces;
p_eval.GetFacetIndices(faces);
deleteFacets(faces);
}
if (_kernel.CountFacets() < count)
this->_segments.clear();
}
bool MeshObject::hasSelfIntersections() const