From: rnv Date: Wed, 21 Mar 2012 10:27:45 +0000 (+0000) Subject: Fix for the "0021518: EDF 2155 VISU: Gauss view on field not possible: either object... X-Git-Tag: V6_main_20120323 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0d4e0df62ba4bcbc7102c0c94919b28aaba93e76;p=modules%2Fvisu.git Fix for the "0021518: EDF 2155 VISU: Gauss view on field not possible: either object cannot be built, either Salome crashes" issue. --- diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index 46d62499..451ce585 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -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 = "<myGeom<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){