Salome HOME
specific altitude object for channel and embankment
[modules/hydro.git] / src / HYDROData / HYDROData_CalculationCase.cxx
index 8814d9aaa28b5c31c4411c0303dfa03aa8c9a5b9..c59b01e33b10330daba54564ca5771021774b3e9 100644 (file)
@@ -376,6 +376,7 @@ void HYDROData_CalculationCase::CreateRegionsAuto( const Handle(HYDROData_Docume
                                                    const HYDROData_SplitToZonesTool::SplitDataList& theZones,
                                                    const bool theLandCover )
 {
+  DEBTRACE("HYDROData_CalculationCase::CreateRegionsAuto");
   QMap<QString, Handle(HYDROData_Region)> aRegionsMap; //object name to region
   QMap<QString, QString> aRegionNameToObjNameMap;
   QString aZonesPref = theLandCover ? CALCULATION_LANDCOVER_ZONES_PREF : CALCULATION_ZONES_PREF;
@@ -419,6 +420,7 @@ void HYDROData_CalculationCase::CreateRegionsAuto( const Handle(HYDROData_Docume
     if ( !theLandCover ) {
       Handle(HYDROData_Object) aMergeObject = Handle(HYDROData_Object)::DownCast( aMergeEntity );
       if ( !aMergeObject.IsNull() ) {
+       DEBTRACE("aMergeEntity " << aMergeEntity->GetName().toStdString());
         aMergeEntity = aMergeObject->GetAltitudeObject();
       }
     }
@@ -822,15 +824,21 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY&
   //DEBTRACE("GetAltitudeForPoint Zone " << theZone->GetName().toStdString());
   double aResAltitude = HYDROData_IAltitudeObject::GetInvalidAltitude();
   if ( theZone.IsNull() )
+  {
+       DEBTRACE("Zone nulle");
     return aResAltitude;
+  }
 
   HYDROData_Zone::MergeType aZoneMergeType = theZone->GetMergeType();
+  DEBTRACE("aZoneMergeType " << aZoneMergeType);
   if ( !theZone->IsMergingNeed() )
   {
     aZoneMergeType = HYDROData_Zone::Merge_UNKNOWN;
+    DEBTRACE("---");
   }
   else if ( aZoneMergeType == HYDROData_Zone::Merge_UNKNOWN )
   {
+       DEBTRACE("GetAltitudeForPoint Zone " << theZone->GetName().toStdString() << " Merge_UNKNOWN");
     return aResAltitude;
   }
 
@@ -843,15 +851,20 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY&
     {
       if ( aZoneInterpolator != NULL )
       {
+       DEBTRACE("aZoneInterpolator != NULL");
         aZoneInterpolator->SetAltitudeObject( aMergeAltitude );
         aResAltitude = aZoneInterpolator->GetAltitudeForPoint( thePoint );
       }
       else
+      {
+       DEBTRACE("aZoneInterpolator == NULL");
         aResAltitude = aMergeAltitude->GetAltitudeForPoint( thePoint );
+      }
     }
   }
   else
   {
+       DEBTRACE("aZoneMergeType != HYDROData_Zone::Merge_Object");
     HYDROData_SequenceOfObjects aZoneObjects = theZone->GetObjects();
     HYDROData_SequenceOfObjects::Iterator anIter( aZoneObjects );
     for ( ; anIter.More(); anIter.Next() )
@@ -868,11 +881,15 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY&
       double aPointAltitude = 0.0;
       if ( aZoneInterpolator != NULL )
       {
+       DEBTRACE("aZoneInterpolator != NULL");
         aZoneInterpolator->SetAltitudeObject( anObjAltitude );
         aPointAltitude = aZoneInterpolator->GetAltitudeForPoint( thePoint );
       }
       else
+      {
+       DEBTRACE("aZoneInterpolator == NULL");
         aPointAltitude = anObjAltitude->GetAltitudeForPoint( thePoint );
+      }
 
       if ( ValuesEquals( aPointAltitude, HYDROData_IAltitudeObject::GetInvalidAltitude() ) )
         continue;