]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for the "0021518: EDF 2155 VISU: Gauss view on field not possible: either object... V6_main_20120323
authorrnv <rnv@opencascade.com>
Wed, 21 Mar 2012 10:27:45 +0000 (10:27 +0000)
committerrnv <rnv@opencascade.com>
Wed, 21 Mar 2012 10:27:45 +0000 (10:27 +0000)
src/CONVERTOR/VISU_Convertor_impl.cxx

index 46d624992da43e72019af7b8e5a0b024c85f0d31..451ce58511d9de37e5fe4b80c38f1cb52a590d19 100644 (file)
@@ -331,7 +331,8 @@ namespace
   GetMeshOnSubProfile(const VISU::PMeshImpl& theMesh,
                       const VISU::PMeshOnEntityImpl& theMeshOnEntity,
                       const VISU::PProfileImpl& theProfile,
-                      const VISU::PSubProfileImpl& theSubProfile)
+                      const VISU::PSubProfileImpl& theSubProfile,
+                      const bool checkEntity = true)
   {
     INITMSG(MYDEBUG,"GetMeshOnSubProfile - aEGeom = "<<theSubProfile->myGeom<<endl);
 
@@ -339,9 +340,9 @@ namespace
     //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()");
+             theSubProfile->myGeom == VISU::ePOINT1 &&
+             !theSubProfile->isDefault() && checkEntity ) 
+          EXCEPTION(std::runtime_error,"theMeshOnEntity->myEntity == VISU::CELL_ENTITY && theSubProfile->myGeom == VISU::ePOINT1 && theSubProfile->isDefault()");
     
     const VISU::PUnstructuredGrid& aSource = theSubProfile->GetSource();
     if(theSubProfile->myIsVTKDone)
@@ -360,7 +361,8 @@ namespace
   bool
   GetMeshOnProfile(const VISU::PMeshImpl& theMesh,
                    const VISU::PMeshOnEntityImpl& theMeshOnEntity,
-                   const VISU::PProfileImpl& theProfile)
+                   const VISU::PProfileImpl& theProfile,
+                   const bool checkEntity = true)
   {
     //rnv fix for bug IPAL18514 4x (CRASH after trying to build of presentation):
     // throw exection in case if pointer on profile =0
@@ -406,7 +408,8 @@ namespace
         GetMeshOnSubProfile(theMesh,
                             theMeshOnEntity,
                             theProfile,
-                            aSubProfile);
+                            aSubProfile,
+                            checkEntity);
         
         const VISU::PUnstructuredGrid& aSource = aSubProfile->GetSource();
         anAppendFilter->AddInput(aSource.GetPointer());
@@ -1041,7 +1044,7 @@ VISU_Convertor_impl
       GetMeshOnEntity(aVTKMeshOnEntity->myMeshName, aVTKMeshOnEntity->myEntity);
       
       VISU::PProfileImpl aProfile = aValForTime->myProfile;
-      GetMeshOnProfile(aMesh, aVTKMeshOnEntity, aProfile);
+      GetMeshOnProfile(aMesh, aVTKMeshOnEntity, aProfile, false);
 
       VISU::PGaussMeshImpl aGaussMesh = aValForTime->myGaussMesh;
       if(!aGaussMesh->myIsVTKDone){