]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
0021040: [CEA 428] Bug of visualization of node field on profile
authorvsr <vsr@opencascade.com>
Tue, 9 Nov 2010 12:42:55 +0000 (12:42 +0000)
committervsr <vsr@opencascade.com>
Tue, 9 Nov 2010 12:42:55 +0000 (12:42 +0000)
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_Structures_impl.cxx
src/CONVERTOR/VISU_Structures_impl.hxx

index 40dddf27f4bf216e711b792b366474a03f28d98e..4a266f9cc6dde4e394d1d526f3771c3140f2c4fa 100644 (file)
@@ -334,6 +334,14 @@ namespace
                       const VISU::PSubProfileImpl& theSubProfile)
   {
     INITMSG(MYDEBUG,"GetMeshOnSubProfile - aEGeom = "<<theSubProfile->myGeom<<endl);
+
+    //rnv to fix the: 21040: [CEA 428] Bug of visualization of node field on profile
+    //throw exception in case if the profile on node.
+    //This exception catch in tne VISU_Convertor_impl::GetTimeStampOnMesh(...) function.
+    if( theMeshOnEntity->myEntity == VISU::CELL_ENTITY && 
+       theSubProfile->myGeom == VISU::ePOINT1 &&
+       !theSubProfile->isDefault() ) 
+      EXCEPTION(std::runtime_error,"theMeshOnEntity->myEntity == VISU::CELL_ENTITY && theSubProfile->myGeom == VISU::ePOINT1 && theSubProfile->isDefault()");
     
     const VISU::PUnstructuredGrid& aSource = theSubProfile->GetSource();
     if(theSubProfile->myIsVTKDone)
index a0c1012b66523b3498974573bcd694152465c256..8b853a32197a2e6839c9a89d857ef254c6534b8a 100644 (file)
@@ -516,7 +516,13 @@ namespace VISU
     return aSize;
   }
 
-
+  bool 
+  TSubProfileImpl
+  ::isDefault() const
+  {
+    return std::strcmp(myName.c_str(),"") == 0;
+  }
+  
   //---------------------------------------------------------------
   bool
   operator<(const PSubProfile& theLeft, const PSubProfile& theRight)
index 11d7e8188e90892a0211fab0012e6dc1a8b7e877..e465ef26ba904dae477211a6e3c4150ac0293cde 100644 (file)
@@ -226,6 +226,12 @@ namespace VISU
     virtual
     vtkIdType 
     GetElemVTKID(vtkIdType theID) const;
+    
+    //! Return true in case if it is default profile,
+    //! i.e myName == "" (MED_NOPFL, see med.h)
+    virtual
+    bool 
+    isDefault() const;
 
     //! Gets memory size used by the instance (bytes).
     virtual