QApplication::setOverrideCursor(Qt::waitCursor);
if(LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this)){
- SALOME_ListIO aList;
- aSelectionMgr->selectedObjects(aList);
+ SALOME_ListIO aSel, aList;
+ aSelectionMgr->selectedObjects(aSel);
+ extractContainers(aSel, aList);
+
for(SALOME_ListIteratorOfListIO it( aList ); it.More(); it.Next()){
Handle(SALOME_InteractiveObject) anIO = it.Value();
CORBA::Object_var anObject = GetSelectedObj( GetAppStudy(this), anIO->getEntry() );
{
QApplication::setOverrideCursor(Qt::waitCursor);
- SALOME_ListIO aList;
LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
- aSelectionMgr->selectedObjects(aList);
+ SALOME_ListIO aSel, aList;
+ aSelectionMgr->selectedObjects(aSel);
+ extractContainers(aSel, aList);
for(SALOME_ListIteratorOfListIO it( aList ); it.More(); it.Next()){
Handle(SALOME_InteractiveObject) anIO = it.Value();
INFOS(exc.what());
SUIT_MessageBox::warn1
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": pammy1 " + QObject::tr(exc.what()),
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
QObject::tr("BUT_OK"));
aPrs3d->RemoveActors();
#include "VisuGUI_ScalarMapOnDeformedShapeDlg.h"
#include "VisuGUI_Tools.h"
+#include "VISU_Result_i.hh"
#include "VISU_ScalarMapOnDeformedShape_i.hh"
#include "VISU_ScalarMapOnDeformedShapePL.hxx"
#include "SalomeApp_Module.h"
myTimeStampsCombo->setDisabled(isAnim);
QString aFieldName(thePrs->GetScalarFieldName());
- float aIterFloat = GetFloatValueOfTimeStamp(thePrs->GetScalarIteration());
+ float aIterFloat = GetFloatValueOfTimeStamp(thePrs->GetMeshName().c_str(),
+ thePrs->GetScalarFieldName().c_str(),
+ thePrs->GetScalarIteration(),
+ thePrs->GetScalarEntity());
QString aIteration(QString("%1").arg(aIterFloat));
if (myMeshFieldsTimes.size() == 0)
}
TFT &aFieldsMap = myMeshFieldsTimes[aMeshName.latin1()];
TFE aKey(aFieldName.latin1(),anEntity);
- aFieldsMap[aKey][aTimeIter.toInt()] = GetFloatValueOfTimeStamp(aTimeIter.toInt());
+ aFieldsMap[aKey][aTimeIter.toInt()] =
+ GetFloatValueOfTimeStamp(myPrs->GetMeshName().c_str(),
+ aFieldName.latin1(),
+ aTimeIter.toInt(),
+ anEntity);
}
}
}
myScalarPane->setRange(aDoubleRange[0],aDoubleRange[1],myScalarPane->isIRange());
}
-float VisuGUI_ScalarMapOnDeformedShapeDlg::GetFloatValueOfTimeStamp(int theIter){
+float VisuGUI_ScalarMapOnDeformedShapeDlg::GetFloatValueOfTimeStamp(const char* theMeshName,
+ const char* theFieldName,
+ const int theIter,
+ const VISU::TEntity theEntity){
float ret=1;
- VISU::PField aField = myPrs->GetField();
+ VISU::Result_i* theResult = myPrs->GetResult();
+ VISU::PField aField = theResult->GetInput()->GetField(theMeshName,theEntity,theFieldName);
+ if(!aField) return ret;
VISU::TValField& aValField = aField->myValField;
- VISU::PValForTime aValForTime = aValField.find(theIter)->second;
- if(aValForTime)
+ VISU::TValField::const_iterator aIter = aValField.find(theIter);
+ if(aIter != aValField.end()){
+ VISU::PValForTime aValForTime = aIter->second;
ret = float(aValForTime->myTime.first);
+ } else {
+ if(MYDEBUG){
+ cout << "Where are no aValForTime with iteration:"<<theIter<<endl;
+ cout << "\tThe possible interations is aValField.keys():";
+ VISU::TValField::const_iterator aTmp = aValField.begin();
+ for(;aTmp != aValField.end(); aTmp++)
+ cout << aTmp->first << ",";
+ cout << endl;
+ }
+ }
return ret;
}
void SetScalarField();
void AddAllFieldNames();
void AddAllTimes(const QString& theFieldName);
- float GetFloatValueOfTimeStamp(int iteration);
+ float GetFloatValueOfTimeStamp(const char* theMeshName,
+ const char* theFieldName,
+ const int theIteration,
+ const VISU::TEntity theEntity);
};
#endif // VISUGUI_DEFORMEDSHAPEDLS_H
}catch(std::exception& exc){
SUIT_MessageBox::warn1
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_CREATE_ACTOR") + ": pammy2 " + QObject::tr(exc.what()),
+ QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
QObject::tr("BUT_OK"));
}
QApplication::restoreOverrideCursor();
INFOS(exc.what());
SUIT_MessageBox::warn1
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_CREATE_ACTOR") + ": pammy3 " + QObject::tr(exc.what()),
+ QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
QObject::tr("BUT_OK"));
}
} else if (theDispOnly) {
QApplication::restoreOverrideCursor();
SUIT_MessageBox::warn1
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": pammy4 " + QObject::tr(exc.what()),
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
QObject::tr("BUT_OK"));
thePrs->RemoveActors();
INFOS(exc.what());
SUIT_MessageBox::warn1
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_CREATE_ACTOR") + ": pammy5 " + QObject::tr(exc.what()),
+ QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
QObject::tr("BUT_OK"));
}
}
INFOS(exc.what());
SUIT_MessageBox::warn1
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_CREATE_ACTOR") + ": pammy6 " + QObject::tr(exc.what()),
+ QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
QObject::tr("BUT_OK"));
}
}
QApplication::restoreOverrideCursor();
SUIT_MessageBox::warn1
(GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": pammy7 " + QObject::tr(exc.what()),
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
QObject::tr("BUT_OK"));
thePrs->RemoveActors();
#include "VISU_Plot3D_i.hh"
#include "VISU_Table_i.hh"
#include "VISU_TimeAnimation.h"
+#include "VISU_ScalarMapOnDeformedShape_i.hh"
#include "VISU_Actor.h"
Storable::Registry(Table_i::myComment.c_str(),&(Table_i::Restore));
Storable::Registry(Curve_i::myComment.c_str(),&(Curve_i::Restore));
Storable::Registry(Container_i::myComment.c_str(),&(Container_i::Restore));
+ Storable::Registry(ScalarMapOnDeformedShape_i::myComment.c_str(),&(Restore<ScalarMapOnDeformedShape_i>));
}
return Prs3dOnField<VISU::DeformedShape_i>(theResult,theMeshName,theEntity,theFieldName,theIteration)._retn();
}
+ ScalarMapOnDeformedShape_ptr VISU_Gen_i::ScalarMapOnDeformedShapeOnField(Result_ptr theResult,
+ const char* theMeshName,
+ VISU::Entity theEntity,
+ const char* theFieldName,
+ CORBA::Double theIteration)
+ {
+ return Prs3dOnField<VISU::ScalarMapOnDeformedShape_i>(theResult,theMeshName,theEntity,theFieldName,theIteration)._retn();
+ }
+
Vectors_ptr VISU_Gen_i::VectorsOnField(Result_ptr theResult,
const char* theMeshName,
VISU::Entity theEntity,
CORBA::Double theIteration);
virtual
+ ScalarMapOnDeformedShape_ptr
+ ScalarMapOnDeformedShapeOnField(Result_ptr theResult,
+ const char* theMeshName,
+ VISU::Entity theEntity,
+ const char* theFieldName,
+ CORBA::Double theIteration);
+ virtual
Vectors_ptr
VectorsOnField(Result_ptr theResult,
const char* theMeshName,
try{
aResult = VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,false);
if(isMemoryCheck && aResult){
+ const VISU::PField aField = theResult->GetInput()->GetField(theMeshName,(VISU::TEntity)theEntity,theFieldName);
+ if(aField->myNbComp <= 1)
+ return false;
float aSize = INCMEMORY*
theResult->GetInput()->GetTimeStampSize(theMeshName,(VISU::TEntity)theEntity,theFieldName,theIteration);
aResult = VISU_PipeLine::CheckAvailableMemory(aSize);