From 626ac3982a104a99db29198d0d3386231b2111b0 Mon Sep 17 00:00:00 2001 From: gdd Date: Wed, 9 Feb 2011 14:57:04 +0000 Subject: [PATCH] rnc: calculation of face bounds with ShapeAnalysis in order to allow attractors on faces with unclosed underlying surfaces. --- src/BLSURFPlugin/BLSURFPlugin_Attractor.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/BLSURFPlugin/BLSURFPlugin_Attractor.cxx b/src/BLSURFPlugin/BLSURFPlugin_Attractor.cxx index 566fd25..f8a343f 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Attractor.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Attractor.cxx @@ -1,6 +1,9 @@ #include "BLSURFPlugin_Attractor.hxx" #include +// cascade include +#include "ShapeAnalysis.hxx" + BLSURFPlugin_Attractor::BLSURFPlugin_Attractor () : _face(), _attractorShape(), @@ -51,7 +54,10 @@ bool BLSURFPlugin_Attractor::init(){ // Discretization of the parameters MESSAGE("Calcul des bornes de la surface : "); - aSurf->Bounds(_u1, _u2, _v1, _v2); // unusable in the generic case because the surface may be infinite (ok for prototype on a Sphere) + //aSurf->Bounds(_u1, _u2, _v1, _v2); // unusable in the generic case because the surface may be infinite (ok for prototype on a Sphere) + + // Calculation of the bounds for the generic case + ShapeAnalysis::GetFaceUVBounds(_face,_u1,_u2,_v1,_v2); MESSAGE("u1 = "<<_u1<<" ,u2 = "<<_u2); MESSAGE("v1 = "<<_v1<<" ,v2 = "<<_v2); double Ustep = (_u2 - _u1) / _mapGrid; -- 2.39.2