From: gdd Date: Mon, 5 Sep 2011 14:40:43 +0000 (+0000) Subject: rnc : removed unnecessary debug messages and comments X-Git-Tag: V6_4_0a1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a06013c1c63937e2bf7360ce09c5b957921eb20;p=plugins%2Fblsurfplugin.git rnc : removed unnecessary debug messages and comments --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_Attractor.cxx b/src/BLSURFPlugin/BLSURFPlugin_Attractor.cxx index 88f522a..410c0ea 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Attractor.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Attractor.cxx @@ -100,10 +100,6 @@ bool BLSURFPlugin_Attractor::init(){ // Calculation of the bounds of the face ShapeAnalysis::GetFaceUVBounds(_face,_u1,_u2,_v1,_v2); - MESSAGE("u1 = "<<_u1<<" ,u2 = "<<_u2); - MESSAGE("v1 = "<<_v1<<" ,v2 = "<<_v2); -// _gridU = floor (_u2 - _u1) / _step; -// _gridV = floor (_v2 - _v1) / _step; _gridU = 300; _gridV = 300; @@ -141,14 +137,13 @@ bool BLSURFPlugin_Attractor::init(){ gp_Pnt P = BRep_Tool::Pnt(aVertex); GeomAPI_ProjectPointOnSurf projector( P, aSurf ); projector.LowerDistanceParameters(u0,v0); - MESSAGE("u0 = "<Value(first + i * (last-first) / N); i0 = floor( (P2.X() - _u1) * _gridU / (_u2 - _u1) + 0.5 ); j0 = floor( (P2.Y() - _v1) * _gridV / (_v2 - _v1) + 0.5 ); -// MESSAGE("i0 = "< u_sup+v_sup); -// double d; -// if (P_switch){ -// d = P_inf; -// } -// else { -// d = P_sup; -// } -// -// return d; - // BLSURF seems to perform a linear interpolation so it's sufficient to give it a non-continuous distance map int i = floor ( (u - _u1) * _gridU / (_u2 - _u1) + 0.5 ); int j = floor ( (v - _v1) * _gridV / (_v2 - _v1) + 0.5 ); @@ -259,9 +193,6 @@ double BLSURFPlugin_Attractor::_distance(double u, double v){ double BLSURFPlugin_Attractor::GetSize(double u, double v){ double myDist = 0.5 * (_distance(u,v) - _constantRadius + fabs(_distance(u,v) - _constantRadius)); -// if (myDist<0){ -// MESSAGE("Warning myDist<0 : myDist= "<IsUPeriodic()){ // Periodic conditions in U @@ -332,7 +263,7 @@ void BLSURFPlugin_Attractor::BuildMap(){ jp = (j + _gridV + 1) % (_gridV+1); if (!_known[ip][jp]){ // If the distance is not known yet - aSurf->D1(_vectU[ip],_vectV[jp],P,D1U,D1V); // Calculate the metric at (i,j) + aSurf->D1(_vectU[ip],_vectV[jp],P,D1U,D1V); // Calculate the metric tensor at (i,j) // G(i,j) = | ||dS/du||**2 * | // | ||dS/dv||**2 | Guu = D1U.X()*D1U.X() + D1U.Y()*D1U.Y() + D1U.Z()*D1U.Z(); // Guu = ||dS/du||**2 @@ -343,6 +274,7 @@ void BLSURFPlugin_Attractor::BuildMap(){ TPnt[1] = ip; TPnt[2] = jp; Dist_changed = false; + // Loop on neighbours to calculate the min distance from them --------------------------------------------------------------------------------- for (k=i - 1 ; k <= i + 1 ; k++){ if (!aSurf->IsUPeriodic()){ // Periodic conditions in U @@ -374,6 +306,7 @@ void BLSURFPlugin_Attractor::BuildMap(){ } } } // End of the loop on neighbours -------------------------------------------------------------------------------------------------------------- + if (Dist_changed) { // If distance has been updated, update _trial found=_trial.find(TPnt); if (found != _trial.end()){ @@ -392,7 +325,6 @@ void BLSURFPlugin_Attractor::BuildMap(){ _known.clear(); _trial.clear(); _isMapBuilt = true; - MESSAGE("_gridU = "<<_gridU<<" , _gridV = "<<_gridV) } // end of BuildMap() diff --git a/src/BLSURFPlugin/BLSURFPlugin_Attractor.hxx b/src/BLSURFPlugin/BLSURFPlugin_Attractor.hxx index 1db6d78..94df9e1 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Attractor.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Attractor.hxx @@ -88,7 +88,8 @@ class BLSURFPlugin_Attractor { public: BLSURFPlugin_Attractor (); - BLSURFPlugin_Attractor (const TopoDS_Face& Face, const TopoDS_Shape& Attractor, const std::string& attEntry); //, double Step = 0.015); + BLSURFPlugin_Attractor (const TopoDS_Face& Face, const TopoDS_Shape& Attractor, const std::string& attEntry); + bool init(); // Calculates the discrete points correponding to attractor // and intialises the map of distances void edgeInit(Handle(Geom_Surface) aSurf, const TopoDS_Edge& anEdge); @@ -97,7 +98,6 @@ class BLSURFPlugin_Attractor { TopoDS_Face GetFace() const { return _face; } TopoDS_Shape GetAttractorShape() const { return _attractorShape; } std::string GetAttractorEntry() const { return _attEntry; } -// double GetStep() const { return _step; } std::vector GetParameters() const { double tab_params[] = {_startSize, _endSize, _actionRadius, _constantRadius}; @@ -130,7 +130,6 @@ class BLSURFPlugin_Attractor { TPointSet _known; TTrialSet _trial; int _type; // Type of function used to calculate the size from the distance (unused for now) -// double _step; // Step between two values of the discretized parametric space in U or V direction int _gridU; // Number of grid points in U direction int _gridV; // Number of grid points in V direction double _u1, _u2, _v1, _v2; // Bounds of the parametric space of the face @@ -140,7 +139,7 @@ class BLSURFPlugin_Attractor { bool _isMapBuilt; bool _isEmpty; - double _distance(double u, double v); + double _distance(double u, double v); // Retrieve the value of the distance map at point (u,v) of the parametric space of _face }; #endif