From 53d24aa96f034667764b5e28a4ad6106abadc6a6 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 9 Nov 2010 12:42:55 +0000 Subject: [PATCH] 0021040: [CEA 428] Bug of visualization of node field on profile --- src/CONVERTOR/VISU_Convertor_impl.cxx | 8 ++++++++ src/CONVERTOR/VISU_Structures_impl.cxx | 8 +++++++- src/CONVERTOR/VISU_Structures_impl.hxx | 6 ++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index 40dddf27..4a266f9c 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -334,6 +334,14 @@ namespace const VISU::PSubProfileImpl& theSubProfile) { 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()"); const VISU::PUnstructuredGrid& aSource = theSubProfile->GetSource(); if(theSubProfile->myIsVTKDone) diff --git a/src/CONVERTOR/VISU_Structures_impl.cxx b/src/CONVERTOR/VISU_Structures_impl.cxx index a0c1012b..8b853a32 100644 --- a/src/CONVERTOR/VISU_Structures_impl.cxx +++ b/src/CONVERTOR/VISU_Structures_impl.cxx @@ -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) diff --git a/src/CONVERTOR/VISU_Structures_impl.hxx b/src/CONVERTOR/VISU_Structures_impl.hxx index 11d7e818..e465ef26 100644 --- a/src/CONVERTOR/VISU_Structures_impl.hxx +++ b/src/CONVERTOR/VISU_Structures_impl.hxx @@ -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 -- 2.39.2