From 33fb3fea9b2cd4ca7de51bcbf307cf8285b80058 Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Tue, 6 May 2008 11:51:03 +0000 Subject: [PATCH] Modified method to perform self intersection test to handle border faces. --- src/fgt/filter_aging/filter_aging.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; }