]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Merge from PHASE_25_BR 14/11/2010 V5_1_main_20101116 V5_1_main_20101117 V5_1_main_20101119 V5_1_main_20101123 before_mergefrom_V5_1_5_BR_23Nov10 mergefrom_PHASE_25_BR_14Nov10
authorvsr <vsr@opencascade.com>
Mon, 15 Nov 2010 06:53:21 +0000 (06:53 +0000)
committervsr <vsr@opencascade.com>
Mon, 15 Nov 2010 06:53:21 +0000 (06:53 +0000)
idl/VISU_Gen.idl
src/VISU_I/VISU_Result_i.cc
src/VISU_I/VISU_Result_i.hh

index 58d4036870c5a1f2cd7270a2470a5ff601be1903..cadc44b5a496ef65424dd2be22ea8f7fef571547 100644 (file)
@@ -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);
 
index d2da6f153cd240a60a64c4b33b86a01341fa9133..09c78b1812334cf9b35be670d22d1fdd913626e5 100644 (file)
@@ -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
index 676a0e39312fa78f1058a8d05ee7013ca3e85bb0..ffe65bb55d738d2b91140b16a1e989a9581ed7ba 100644 (file)
@@ -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,