X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_CalculationCase.cxx;h=58d15770f88c2b5172aaafee04b51771aede958e;hb=cde2ec476486fcd7c9b7b38ce814c648d73e7fd3;hp=e6e62169d8eafafb3e3ed5ff7657e37618908711;hpb=a02c04b9d092485d58fa206a33f7bea84e983279;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index e6e62169..58d15770 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -77,6 +77,12 @@ #define EXPORT_NAME "HYDRO_" + GetName() +#include +#include + +#define _DEVDEBUG_ +#include "HYDRO_trace.hxx" + IMPLEMENT_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_CalculationCase, HYDROData_Entity) @@ -326,6 +332,7 @@ void HYDROData_CalculationCase::CreateRegionsDef( const Handle(HYDROData_Documen void HYDROData_CalculationCase::CreateRegionsAuto( const Handle(HYDROData_Document)& theDoc, const HYDROData_SplitToZonesTool::SplitDataList& theZones ) { + DEBTRACE("HYDROData_CalculationCase::CreateRegionsAuto"); QMap aRegionsMap; //object name to region QMap aRegionNameToObjNameMap; QString aZonesPref = CALCULATION_ZONES_PREF; @@ -368,6 +375,7 @@ void HYDROData_CalculationCase::CreateRegionsAuto( const Handle(HYDROData_Docume Handle(HYDROData_Entity) aMergeEntity = aRegObj; Handle(HYDROData_Object) aMergeObject = Handle(HYDROData_Object)::DownCast( aMergeEntity ); if ( !aMergeObject.IsNull() ) { + DEBTRACE("aMergeEntity " << aMergeEntity->GetName().toStdString()); aMergeEntity = aMergeObject->GetAltitudeObject(); } @@ -718,10 +726,20 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY& Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint ); if ( !aZone.IsNull() ) { + //DEBTRACE("GetAltitudeForPoint Region " << theRegion->GetName().toStdString() << " Zone " << aZone->GetName().toStdString()); Handle(HYDROData_Region) aRefRegion = Handle(HYDROData_Region)::DownCast( aZone->GetFatherObject() ); if ( IsEqual( aRefRegion, theRegion ) ) aResAltitude = GetAltitudeForPoint( thePoint, aZone ); + else + { + DEBTRACE("GetAltitudeForPoint Region " << aRefRegion->GetName().toStdString() << " Zone " << aZone->GetName().toStdString() << " ---------------------------"); + aResAltitude = GetAltitudeForPoint( thePoint, aZone ); + } } + else + { + DEBTRACE(" --- GetAltitudeForPoint No Zone ---"); + } return aResAltitude; } @@ -729,17 +747,24 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY& double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY& thePoint, const Handle(HYDROData_Zone)& theZone ) const { + //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; } @@ -752,15 +777,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() ) @@ -777,11 +807,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; @@ -817,6 +851,7 @@ NCollection_Sequence HYDROData_CalculationCase::GetAltitudesForPoints( const NCollection_Sequence& thePoints, const Handle(HYDROData_Region)& theRegion ) const { + //DEBTRACE("HYDROData_CalculationCase::GetAltitudesForPoints " << theRegion->GetName().toStdString()); NCollection_Sequence aResSeq; for ( int i = 1, n = thePoints.Length(); i <= n; ++i )