From: vsr Date: Mon, 15 Nov 2010 06:53:21 +0000 (+0000) Subject: Merge from PHASE_25_BR 14/11/2010 X-Git-Tag: V5_1_main_20101116 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=50b48959b8f9cb292a1ae34bc95d807efaf69c74;p=modules%2Fvisu.git Merge from PHASE_25_BR 14/11/2010 --- diff --git a/idl/VISU_Gen.idl b/idl/VISU_Gen.idl index 58d40368..cadc44b5 100644 --- a/idl/VISU_Gen.idl +++ b/idl/VISU_Gen.idl @@ -2253,6 +2253,9 @@ module VISU { /*! Gets existing numbers of time stamps for the given mesh name, entity and name of field */ TimeStampNumbers GetTimeStampNumbers(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName); + /*! Gets time values of time stamps for the given mesh name, entity and name of field */ + double_array GetTimeStampValues(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName); + /*! Gets existing parts of multi resolution structure for the given mesh name */ EntityNames GetPartNames(in EntityName theMeshName); diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index d2da6f15..09c78b18 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -1220,6 +1220,65 @@ VISU::Result_i } +//--------------------------------------------------------------- +VISU::double_array* +VISU::Result_i +::GetTimeStampValues(const char* theMeshName, + VISU::Entity theEntity, + const char* theFieldName) +{ + VISU::double_array_var aResult = new VISU::double_array(); + const VISU::TMeshMap& aMeshMap = GetInput()->GetMeshMap(); + if(aMeshMap.empty()) + return aResult._retn(); + + VISU::TMeshMap::const_iterator anIter = aMeshMap.find(theMeshName); + if(anIter == aMeshMap.end()) + return aResult._retn(); + + const VISU::PMesh& aMesh = anIter->second; + const VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap; + if(aMeshOnEntityMap.empty()) + return aResult._retn(); + + { + VISU::TEntity anEntity = VISU::TEntity(theEntity); + VISU::TMeshOnEntityMap::const_iterator anIter = aMeshOnEntityMap.find(anEntity); + if(anIter == aMeshOnEntityMap.end()) + return aResult._retn(); + + const VISU::PMeshOnEntity& aMeshOnEntity = anIter->second; + const VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap; + if(aFieldMap.empty()) + return aResult._retn(); + + { + VISU::TFieldMap::const_iterator anIter = aFieldMap.find(theFieldName); + if(anIter == aFieldMap.end()) + return aResult._retn(); + + { + const VISU::PField& aField = anIter->second; + const VISU::TValField& aValField = aField->myValField; + if(aValField.empty()) + return aResult._retn(); + + { + aResult->length(aValField.size()); + VISU::TValField::const_iterator anIter = aValField.begin(); + for(size_t anId = 0; anIter != aValField.end(); anIter++, anId++){ + const PValForTime& aValForTime = anIter->second; + aResult[anId] = aValForTime->myTime.first; + } + } + } + } + } + + return aResult._retn(); +} + + //--------------------------------------------------------------- CORBA::Long VISU::Result_i diff --git a/src/VISU_I/VISU_Result_i.hh b/src/VISU_I/VISU_Result_i.hh index 676a0e39..ffe65bb5 100644 --- a/src/VISU_I/VISU_Result_i.hh +++ b/src/VISU_I/VISU_Result_i.hh @@ -166,6 +166,12 @@ namespace VISU Entity theEntity, const char* theFieldName); + virtual + VISU::double_array* + GetTimeStampValues(const char* theMeshName, + Entity theEntity, + const char* theFieldName); + virtual CORBA::Long GetNumberOfComponents(const char* theMeshName,