]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
some housekeeping on traces
authorPaul RASCLE <paul.rascle@edf.fr>
Wed, 12 Aug 2015 09:20:55 +0000 (11:20 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Wed, 12 Aug 2015 09:20:55 +0000 (11:20 +0200)
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_Channel.cxx
src/HYDROData/HYDROData_Channel.h
src/HYDROData/HYDROData_ChannelAltitude.cxx

index c59b01e33b10330daba54564ca5771021774b3e9..4f95d9ec0f293286a81437d81e3412a4655dac6e 100644 (file)
@@ -830,11 +830,11 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY&
   }
 
   HYDROData_Zone::MergeType aZoneMergeType = theZone->GetMergeType();
-  DEBTRACE("aZoneMergeType " << aZoneMergeType);
+  //DEBTRACE("aZoneMergeType " << aZoneMergeType);
   if ( !theZone->IsMergingNeed() )
   {
     aZoneMergeType = HYDROData_Zone::Merge_UNKNOWN;
-    DEBTRACE("---");
+    //DEBTRACE("---");
   }
   else if ( aZoneMergeType == HYDROData_Zone::Merge_UNKNOWN )
   {
@@ -864,7 +864,7 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY&
   }
   else
   {
-       DEBTRACE("aZoneMergeType != HYDROData_Zone::Merge_Object");
+       //DEBTRACE("aZoneMergeType != HYDROData_Zone::Merge_Object");
     HYDROData_SequenceOfObjects aZoneObjects = theZone->GetObjects();
     HYDROData_SequenceOfObjects::Iterator anIter( aZoneObjects );
     for ( ; anIter.More(); anIter.Next() )
@@ -887,7 +887,7 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY&
       }
       else
       {
-       DEBTRACE("aZoneInterpolator == NULL");
+       //DEBTRACE("aZoneInterpolator == NULL");
         aPointAltitude = anObjAltitude->GetAltitudeForPoint( thePoint );
       }
 
index 3ac722fbfa3be33792efb4322131ddcf7fe812c3..04b316c93f23420f26f1c900abcd83b3f29e7dfc 100644 (file)
@@ -126,11 +126,6 @@ TopoDS_Shape HYDROData_Channel::GetShape3D() const
   return getShape3D();
 }
 
-//TopoDS_Wire HYDROData_Channel::GetLeftBank() const
-//{
-//
-//}
-
 bool HYDROData_Channel::CreatePresentations( const Handle(HYDROData_Polyline3D)& theGuideLine,
                                              const Handle(HYDROData_Profile)&    theProfile,
                                              PrsDefinition&                      thePrs )
@@ -323,11 +318,6 @@ void HYDROData_Channel::Update()
   SetShape3D( aResultPrs.myPrs3D );
   SetTopShape( aResultPrs.myPrs2D );
 
-//  TopoDS_Wire aPrevLeftBank = GetLeftBank();
-//  if ( ! aPrevLeftBank.IsNull() )
-//    ClearReferenceObjects( DataTag_LeftBank );
-//  SetReferenceObject( aResultPrs.myLeftBank, DataTag_LeftBank );
-
   // Create groups for channel
   TopTools_SequenceOfShape aLeftBankEdges;
   HYDROData_ShapesTool::ExploreShapeToShapes( aResultPrs.myLeftBank, TopAbs_EDGE, aLeftBankEdges );
index 55a26aa78f0426df8c86d49ac38f65d044f5518e..8e9587643ec72ef8fca48f2665faffa059d1a276 100644 (file)
@@ -58,7 +58,6 @@ protected:
     DataTag_First = HYDROData_ArtificialObject::DataTag_First + 100, ///< first tag, to reserve
     DataTag_GuideLine, 
     DataTag_Profile,
-//    DataTag_LeftBank,
   };
 
 public:
@@ -101,11 +100,6 @@ public:
    */
   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
 
-//  /**
-//   * Returns the left bank of the object.
-//   */
-//  HYDRODATA_EXPORT virtual TopoDS_Wire GetLeftBank() const;
-
  /**
    * Update the shape presentations of stream.
    * Call this method whenever you made changes for channel data.
index 7d985833b7e56d8ff02fdec348aaf06390b292c5..413685f83f3ddbc4a8874ec8de21e856ee2d10c5 100644 (file)
@@ -67,7 +67,7 @@ HYDROData_ChannelAltitude::~HYDROData_ChannelAltitude()
 
 double HYDROData_ChannelAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) const
 {
-  DEBTRACE("HYDROData_ChannelAltitude::GetAltitudeForPoint");
+  DEBTRACE("GetAltitudeForPoint p(" << thePoint.X() << ", " << thePoint.Y() << ")");
   double aResAltitude = GetInvalidAltitude();
 
   Handle(HYDROData_Channel) aChannel =
@@ -85,7 +85,7 @@ double HYDROData_ChannelAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) c
       DEBTRACE("aGuideLine.IsNull()");
       return aResAltitude;
     }
-  DEBTRACE("aGuideLine: " << aGuideLine->GetName().toStdString());
+  //DEBTRACE("aGuideLine: " << aGuideLine->GetName().toStdString());
 
   Handle(HYDROData_PolylineXY) aGuideXY = aGuideLine->GetPolylineXY();
   if (aGuideXY.IsNull())
@@ -93,7 +93,7 @@ double HYDROData_ChannelAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) c
       DEBTRACE("aGuideXY.IsNull()");
       return aResAltitude;
     }
-  DEBTRACE("aGuideXY: " << aGuideXY->GetName().toStdString());
+  //DEBTRACE("aGuideXY: " << aGuideXY->GetName().toStdString());
 
   Handle(HYDROData_ProfileUZ) aGuideUZ = aGuideLine->GetProfileUZ();
   if (aGuideUZ.IsNull())
@@ -105,26 +105,17 @@ double HYDROData_ChannelAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) c
       DEBTRACE("aGuideUZ.IsNull()");
       return aResAltitude;
     }
-  DEBTRACE("aGuideUZ: " << aGuideUZ->GetName().toStdString());
+  //DEBTRACE("aGuideUZ: " << aGuideUZ->GetName().toStdString());
 
   Handle (HYDROData_Profile) aProfile = aChannel->GetProfile();
   if (aProfile.IsNull())
     {
       return aResAltitude;
     }
-  DEBTRACE("aProfile: " << aProfile->GetName().toStdString());
+  //DEBTRACE("aProfile: " << aProfile->GetName().toStdString());
 
   // --- See GEOMImpl_ProjectionDriver.cxx
 
-//  TopoDS_Shape aShape = aGuideLine->GetShape3D();
-//  double middleZ = -9999;
-//  aGuideLine->GetMiddleZ(middleZ); // use the middle Z value of the 3d line to help the projection.
-//  if (middleZ < -9000)
-//    {
-//      DEBTRACE("the middle Z value of the 3d line is incorrect");
-//    }
-//  gp_Pnt P1(thePoint.X(), thePoint.Y(), middleZ);
-
   TopoDS_Shape aShape =  aGuideXY->GetShape();
   gp_Pnt P1(thePoint.X(), thePoint.Y(), 0);
   TopoDS_Shape aPoint = BRepBuilderAPI_MakeVertex(P1).Shape();
@@ -256,18 +247,6 @@ double HYDROData_ChannelAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) c
           // Store the valid solution.
           hasValidSolution = Standard_True;
 
-          DEBTRACE("distance XY: "<< aParam);
-//          // Normalize parameter.
-//          TopoDS_Edge aSupportEdge = TopoDS::Edge(aSupportShape);
-//          Standard_Real aF, aL;
-//          BRep_Tool::Range(aSupportEdge, aF, aL);
-//          if (Abs(aL - aF) <= aTolConf)
-//            {
-//              DEBTRACE("Projection aborted : degenerated projection edge");
-//              return aResAltitude;
-//            }
-//          aParam = (aParam - aF)/(aL - aF);
-
           // profile altitude at projection point
           HYDROData_IPolyline::PointsList aProfilePoints = aGuideUZ->GetPoints();
           if ( aProfilePoints.IsEmpty() )
@@ -276,7 +255,7 @@ double HYDROData_ChannelAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) c
               return aResAltitude;
             }
           double aDepth = HYDROData_ProfileUZ::GetDepthFromDistance( aProfilePoints, aParam );
-          DEBTRACE("profile altitude: " << aDepth);
+          //DEBTRACE("profile altitude: " << aDepth);
 
           // Compute edge index.
           TopExp_Explorer anExp(aShape, TopAbs_EDGE);
@@ -291,13 +270,13 @@ double HYDROData_ChannelAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) c
 
           // get the XY distance from point to guideline
           const gp_Pnt &aPntProj = aDistShSh.PointOnShape2(i);
-          DEBTRACE("projection: (" << aPntProj.X() << ", " << aPntProj.Y() << ", " << aPntProj.Z() << ")");
+          //DEBTRACE("projection: (" << aPntProj.X() << ", " << aPntProj.Y() << ", " << aPntProj.Z() << ")");
           gp_XY aProjXY = gp_XY(aPntProj.X(), aPntProj.Y());
           aProjXY.Subtract(thePoint);
           double distance = aProjXY.Modulus();
-          DEBTRACE("distance to guideline " << distance);
+          //DEBTRACE("distance to guideline " << distance);
 
-          // get delta altitude on section (supposed symmetric) from guideline distance
+          // get delta altitude on section (supposed symmetric) from guideline distance (aParam)
           double delta = 0;
           int i1 = 0;
           gp_XY pt1 = gp_XY();
@@ -306,7 +285,7 @@ double HYDROData_ChannelAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) c
           for ( int i = 1, aNbPoints = aSectionPoints.Size(); i <= aNbPoints; ++i )
             {
               const HYDROData_IPolyline::Point& aPolylinePoint = aSectionPoints.Value( i );
-              DEBTRACE("  profile point: " << aPolylinePoint.X() << " " << aPolylinePoint.Y());
+              //DEBTRACE("  profile point: " << aPolylinePoint.X() << " " << aPolylinePoint.Y());
               if (aPolylinePoint.X() < distance)
                 {
                   i1 = i;
@@ -332,7 +311,7 @@ double HYDROData_ChannelAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) c
               delta = pt1.Y() + (pt2.Y() - pt1.Y())*(distance -pt1.X())/(pt2.X()-pt1.X());
             }
           aResAltitude = delta + aDepth;
-          DEBTRACE("final altitude: " << aResAltitude << " delta: " << delta);
+          DEBTRACE("distance XY: "<< aParam << " distance to guideline: " << distance << " final altitude: " << aResAltitude << " delta: " << delta);
           return aResAltitude;
         }
     }