diff --git a/src/fgt/filter_aging/filter_aging.cpp b/src/fgt/filter_aging/filter_aging.cpp index 65aad001a..6ac627c9f 100644 --- a/src/fgt/filter_aging/filter_aging.cpp +++ b/src/fgt/filter_aging/filter_aging.cpp @@ -323,7 +323,13 @@ bool GeometryAgingPlugin::faceIntersections(CMeshO &m, face::Pos bbox; std::vector inBox; - CFaceO* start = p.f; + face::Pos start(p); + + // look for a border face (if any) + do + p.NextE(); + while(p != start && !p.IsBorder()); + start = p; do { // test current face intersections @@ -335,9 +341,8 @@ bool GeometryAgingPlugin::faceIntersections(CMeshO &m, face::Pos::TestIntersection(p.f, *fib)) return true; // move to the next face - p.FlipE(); - p.FlipF(); - } while(p.f != start); + p.NextE(); + } while(p != start && !p.IsBorder()); return false; }