From f72e9a1481333dc19e928950cf3a52ea1c3c72ed Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Sun, 4 May 2014 23:33:31 +0000 Subject: [PATCH] corrected one bug to make the refine predicate do not refine when the edge is perfectly aligned with the distance function (and both or just one value is zero) --- vcg/complex/algorithms/refine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcg/complex/algorithms/refine.h b/vcg/complex/algorithms/refine.h index eb91d766..6bf57be3 100644 --- a/vcg/complex/algorithms/refine.h +++ b/vcg/complex/algorithms/refine.h @@ -814,7 +814,7 @@ class QualityEdgePredicate ScalarType q0=ep.f->V0(ep.z)->Q()-thr; ScalarType q1=ep.f->V1(ep.z)->Q()-thr; if(q0>q1) std::swap(q0,q1); - if ( q0*q1 > 0) return false; + if ( q0*q1 >= 0) return false; // now a small check to be sure that we do not make too thin crossing. double pp= q0/(q0-q1); if ((fabs(pp)< tolerance)||(fabs(pp)> (1-tolerance))) return false;