// Mesh data management
//==========================================================
- MeshHandler getMesh(in long meshId) raises (SALOME::SALOME_Exception);
- MeshHandlerList getMeshList(in long datasourceId);
+ MeshHandler getMeshHandler(in long meshId) raises (SALOME::SALOME_Exception);
+ MeshHandlerList getMeshHandlerList(in long datasourceId);
//==========================================================
// Field data management
// Print out server data
void serverlog();
+
+ void cleanUp() raises (SALOME::SALOME_Exception);
};
};
// const long SCALAR_BAR_RANGE_VAL_MAX_DEFAULT = -1;
const string DISPLAY_DEFAULT = DISPLAY_EUCLIDEAN_NORM;
const SliceOrientationType SLICE_ORIENTATION_DEFAULT = SLICE_NORMAL_TO_X;
+
const long NB_CONTOURS_DEFAULT = 10;
const long NB_SLICES_DEFAULT = 1;
+ const long NB_CONTOURS_MAX = 50;
+ const long NB_SLICES_MAX = 20;
+
/* Structs */
// Just showing the mesh
struct MeshViewParameters {
- long fieldHandlerId; // TODO should be a meshHandlerId really ...
+ long meshHandlerId;
MeshModeType mode;
};
// ViewModeType getPresentationViewMode(in long presId);
PresentationsList getAllPresentations();
+
+ void cleanUp() raises (SALOME::SALOME_Exception);
};
};
in MEDCALC::DatasourceHandler datasourceHandler)
raises (SALOME::SALOME_Exception);
- status registerPresentation(in SALOMEDS::Study study,
+ status registerPresentationField(in SALOMEDS::Study study,
in long fieldId,
in string name,
in string type,
in long presentationId)
raises (SALOME::SALOME_Exception);
+ status registerPresentationMesh(in SALOMEDS::Study study,
+ in long meshId,
+ in string name,
+ in string type,
+ in string ico,
+ in long presentationId)
+ raises (SALOME::SALOME_Exception);
+
status unregisterPresentation(in SALOMEDS::Study study,
in long presentationId)
raises (SALOME::SALOME_Exception);
- PresentationsList getSiblingPresentations(in SALOMEDS::Study study,
- in long presentationId)
- raises (SALOME::SALOME_Exception);
+// PresentationsList getSiblingPresentations(in SALOMEDS::Study study,
+// in long presentationId)
+// raises (SALOME::SALOME_Exception);
// Get all presentations in study:
PresentationsList getStudyPresentations(in SALOMEDS::Study study)
raises (SALOME::SALOME_Exception);
+
+ string getStudyPresentationEntry(in SALOMEDS::Study study,
+ in long presentationId)
+ raises (SALOME::SALOME_Exception);
+
+ void cleanUp();
};
};
<parameter name="MED" value="%MED_ROOT_DIR%/share/salome/resources/med"/>
</section>
<section name="windows_geometry">
- <parameter name="MED" value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #C6 #FC #02 #00 #00 #00 #02 #FB #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #59 #00 #00 #01 #CD #00 #00 #00 #53 #00 #FF #FF #FF #FB #00 #00 #00 #20 #00 #6D #00 #65 #00 #64 #00 #57 #00 #6F #00 #72 #00 #6B #00 #73 #00 #70 #00 #61 #00 #63 #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #02 #2E #00 #00 #00 #F1 #00 #00 #00 #DE #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #04 #38 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #01 #08 #00 #00 #04 #38 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #6B #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #01 #00 #00 #00 #02 #FC #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #01 #00 #00 #00 #06 #00 #4D #00 #45 #00 #44 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00"/>
+ <parameter name="MED" value="@ByteArray[#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #2C #00 #00 #02 #DD #FC #02 #00 #00 #00 #03 #FB #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #5B #00 #00 #00 #FE #00 #00 #00 #53 #00 #FF #FF #FF #FB #00 #00 #00 #20 #00 #6D #00 #65 #00 #64 #00 #57 #00 #6F #00 #72 #00 #6B #00 #73 #00 #70 #00 #61 #00 #63 #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #01 #61 #00 #00 #00 #F1 #00 #00 #00 #DE #00 #FF #FF #FF #FB #00 #00 #00 #2E #00 #50 #00 #72 #00 #65 #00 #73 #00 #65 #00 #6E #00 #74 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #70 #00 #61 #00 #72 #00 #61 #00 #6D #00 #65 #00 #74 #00 #65 #00 #72 #00 #73 #01 #00 #00 #02 #5A #00 #00 #00 #DE #00 #00 #00 #DE #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #04 #CC #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #01 #34 #00 #00 #04 #CC #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #CC #00 #00 #02 #82 #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #01 #00 #00 #00 #02 #FC #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #0F #00 #00 #00 #26 #00 #4D #00 #61 #00 #69 #00 #6E #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1E #00 #76 #00 #61 #00 #72 #00 #69 #00 #61 #00 #62 #00 #6C #00 #65 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #2A #00 #72 #00 #65 #00 #70 #00 #72 #00 #65 #00 #73 #00 #65 #00 #6E #00 #74 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #63 #00 #61 #00 #6D #00 #65 #00 #72 #00 #61 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #16 #00 #61 #00 #78 #00 #65 #00 #73 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #4D #00 #61 #00 #63 #00 #72 #00 #6F #00 #73 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #0C #00 #43 #00 #6F #00 #6D #00 #6D #00 #6F #00 #6E #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #18 #00 #44 #00 #61 #00 #74 #00 #61 #00 #41 #00 #6E #00 #61 #00 #6C #00 #79 #00 #73 #00 #69 #00 #73 #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #22 #00 #44 #00 #61 #00 #74 #00 #61 #00 #73 #00 #6F #00 #75 #00 #72 #00 #63 #00 #65 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #20 #00 #57 #00 #6F #00 #72 #00 #6B #00 #73 #00 #70 #00 #61 #00 #63 #00 #65 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #4C #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1E #00 #56 #00 #69 #00 #65 #00 #77 #00 #4D #00 #6F #00 #64 #00 #65 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #98 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #26 #00 #50 #00 #72 #00 #65 #00 #73 #00 #65 #00 #6E #00 #74 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #F4 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #22 #00 #50 #00 #72 #00 #6F #00 #63 #00 #65 #00 #73 #00 #73 #00 #69 #00 #6E #00 #67 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #01 #DB #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #14 #00 #56 #00 #43 #00 #52 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #02 #27 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #24 #00 #63 #00 #75 #00 #72 #00 #72 #00 #65 #00 #6E #00 #74 #00 #54 #00 #69 #00 #6D #00 #65 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #02 #EF #00 #00 #03 #11 #00 #00 #00 #00 #00 #00 #00 #00]"/>
</section>
<section name="windows_visibility">
<parameter name="MED" value="#00 #00 #00 #00 #05 #00 #00 #00 #06 #00 #4D #00 #45 #00 #44 #01 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #01 #00 #00 #00 #03 #00 #00 #00 #20 #00 #6D #00 #65 #00 #64 #00 #57 #00 #6F #00 #72 #00 #6B #00 #73 #00 #70 #00 #61 #00 #63 #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01"/>
const char* instanceName,
const char* interfaceName)
: Engines_Component_i(orb, poa, contId, instanceName, interfaceName),
- _fieldSeriesEntries()
+ _fieldSeriesEntries(),
+ _meshEntries()
{
_thisObj = this;
_id = _poa->activate_object(_thisObj); // register and activate this servant object
// We can add the meshes as children of the datasource
MEDCALC::MeshHandlerList* meshHandlerList =
- MEDFactoryClient::getDataManager()->getMeshList(datasourceHandler.id);
+ MEDFactoryClient::getDataManager()->getMeshHandlerList(datasourceHandler.id);
for(CORBA::ULong iMesh=0; iMesh<meshHandlerList->length(); iMesh++) {
MEDCALC::MeshHandler meshHandler = (*meshHandlerList)[iMesh];
SALOMEDS::SObject_var soMesh = studyBuilder->NewObject(soDatasource);
+ _meshEntries[meshHandler.id] = soMesh->GetID();
soMesh->SetAttrString("AttributeName", meshHandler.name);
soMesh->SetAttrString("AttributePixMap", "ICO_DATASOURCE_MESH");
anAttr = studyBuilder->FindOrCreateAttribute(soMesh, "AttributeParameter");
}
MED_ORB::status
-MED::registerPresentation(SALOMEDS::Study_ptr study,
+MED::registerPresentationField(SALOMEDS::Study_ptr study,
CORBA::Long fieldId,
const char* name,
const char* type,
MEDCALC::FieldHandler_var fldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
int fieldSeriesId = fldHandler->fieldseriesId;
if (fieldSeriesId < 0){
- std::cerr << "MED::registerPresentation(): Error getting field handler\n";
+ std::cerr << "MED::registerPresentationField(): Error getting field handler\n";
return MED_ORB::OP_ERROR ;
}
if (_fieldSeriesEntries.find(fieldSeriesId) == _fieldSeriesEntries.end()) {
- std::cerr << "MED::registerPresentation(): Field series not found\n";
+ std::cerr << "MED::registerPresentationField(): Field series not found\n";
return MED_ORB::OP_ERROR ;
}
std::string entry = _fieldSeriesEntries[fieldSeriesId];
SALOMEDS::SObject_ptr soFieldseries = sobject._retn();
if (soFieldseries->IsNull()) {
- std::cerr << "MED::registerPresentation(): Entry not found\n";
+ std::cerr << "MED::registerPresentationField(): Entry not found\n";
return MED_ORB::OP_ERROR;
}
return MED_ORB::OP_OK;
}
+MED_ORB::status
+MED::registerPresentationMesh(SALOMEDS::Study_ptr study,
+ CORBA::Long meshId,
+ const char* name,
+ const char* type,
+ const char* ico,
+ CORBA::Long presentationId)
+{
+ // set exception handler to catch unexpected CORBA exceptions
+ Unexpect aCatch(SALOME_SalomeException);
+
+ MEDCALC::MeshHandler_var meshHandler = MEDFactoryClient::getDataManager()->getMeshHandler(meshId);
+ if (meshHandler->id < 0){
+ std::cerr << "MED::registerPresentationMesh(): Error getting mesh handler\n";
+ return MED_ORB::OP_ERROR ;
+ }
+
+ if (_meshEntries.find(meshHandler->id) == _meshEntries.end()) {
+ std::cerr << "MED::registerPresentationMesh(): mesh not found\n";
+ return MED_ORB::OP_ERROR ;
+ }
+ std::string entry = _meshEntries[meshHandler->id];
+ SALOMEDS::SObject_var sobject = study->FindObjectID(entry.c_str());
+ SALOMEDS::SObject_ptr soMesh = sobject._retn();
+
+ if (soMesh->IsNull()) {
+ std::cerr << "MED::registerPresentationMesh(): Entry not found\n";
+ return MED_ORB::OP_ERROR;
+ }
+
+ SALOMEDS::StudyBuilder_var studyBuilder = study->NewBuilder();
+ SALOMEDS::UseCaseBuilder_var useCaseBuilder = study->GetUseCaseBuilder();
+ SALOMEDS::SObject_var soPresentation = studyBuilder->NewObject(soMesh);
+ useCaseBuilder->AppendTo(soPresentation->GetFather(), soPresentation);
+
+ soPresentation->SetAttrString("AttributeName", name);
+ soPresentation->SetAttrString("AttributePixMap", ico);
+
+ SALOMEDS::GenericAttribute_var anAttr;
+ SALOMEDS::AttributeParameter_var aParam;
+ anAttr = studyBuilder->FindOrCreateAttribute(soPresentation, "AttributeParameter");
+ aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
+ aParam->SetInt(MESH_ID, meshId);
+ aParam->SetBool(IS_PRESENTATION, true);
+ aParam->SetInt(PRESENTATION_ID, presentationId);
+ aParam->SetString(PRESENTATION_TYPE, type);
+
+ return MED_ORB::OP_OK;
+}
+
+
MED_ORB::status
MED::unregisterPresentation(SALOMEDS::Study_ptr study,
CORBA::Long presentationId)
return presList;
}
-
-MED_ORB::PresentationsList*
-MED::getSiblingPresentations(SALOMEDS::Study_ptr study, CORBA::Long presentationId)
+char*
+MED::getStudyPresentationEntry(SALOMEDS::Study_ptr study, int presentationId)
{
// set exception handler to catch unexpected CORBA exceptions
Unexpect aCatch(SALOME_SalomeException);
SALOMEDS::GenericAttribute_var anAttribute;
SALOMEDS::SComponent_var father = study->FindComponent("MED");
SALOMEDS::ChildIterator_var it = study->NewChildIterator(father);
- for (it->InitEx(true); it->More(); it->Next()) {
- SALOMEDS::SObject_var child(it->Value());
-
- if (child->FindAttribute(anAttribute, "AttributeParameter")) {
- SALOMEDS::AttributeParameter_var attrParam = SALOMEDS::AttributeParameter::_narrow(anAttribute);
- if (!attrParam->IsSet(IS_PRESENTATION, PT_BOOLEAN) || !attrParam->GetBool(IS_PRESENTATION) || !attrParam->IsSet(PRESENTATION_ID, PT_INTEGER))
- continue;
+ for (it->InitEx(true); it->More(); it->Next())
+ {
+ SALOMEDS::SObject_var child(it->Value());
+ if (child->FindAttribute(anAttribute, "AttributeParameter"))
+ {
+ SALOMEDS::AttributeParameter_var attrParam = SALOMEDS::AttributeParameter::_narrow(anAttribute);
+ if (!attrParam->IsSet(IS_PRESENTATION, PT_BOOLEAN) || !attrParam->GetBool(IS_PRESENTATION) || !attrParam->IsSet(PRESENTATION_ID, PT_INTEGER))
+ continue;
- if (presentationId == attrParam->GetInt(PRESENTATION_ID)) {
- // get siblings
- SALOMEDS::ChildIterator_var siblItr = study->NewChildIterator(child->GetFather());
- for (siblItr->InitEx(true); siblItr->More(); siblItr->Next()) {
- SALOMEDS::SObject_var sibl(siblItr->Value());
-
- if (sibl->FindAttribute(anAttribute, "AttributeParameter")) {
- SALOMEDS::AttributeParameter_var attrParam = SALOMEDS::AttributeParameter::_narrow(anAttribute);
- if (!attrParam->IsSet(IS_PRESENTATION, PT_BOOLEAN) || !attrParam->GetBool(IS_PRESENTATION) || !attrParam->IsSet(PRESENTATION_ID, PT_INTEGER))
- continue;
-
- if (attrParam->GetInt(PRESENTATION_ID) != presentationId) {
- CORBA::ULong size = presList->length();
- presList->length(size+1);
- (*presList)[size] = attrParam->GetInt(PRESENTATION_ID);
- }
- }
+ if (attrParam->GetInt(PRESENTATION_ID) == presentationId)
+ return CORBA::string_dup(child->GetID());
}
- return presList;
- }
}
- }
-
- return presList;
+ return CORBA::string_dup("");
}
+
Engines::TMPFile*
MED::DumpPython(CORBA::Object_ptr theStudy,
CORBA::Boolean isPublished,
CORBA::Boolean isMultiFile,
CORBA::Boolean& isValidScript)
{
- std::cout << "In MED::DumpPython\n";
-
SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy);
if(CORBA::is_nil(aStudy)) {
std::cerr << "Error: Cannot find the study\n";
return CORBA::string_dup(oss.str().c_str());
}
+void MED::cleanUp()
+{
+ _fieldSeriesEntries.clear();
+ _meshEntries.clear();
+}
+
extern "C"
{
/*!
MED_ORB::status addDatasourceToStudy(SALOMEDS::Study_ptr study,
const MEDCALC::DatasourceHandler& datasourceHandler);
- MED_ORB::status registerPresentation(SALOMEDS::Study_ptr study,
+ MED_ORB::status registerPresentationField(SALOMEDS::Study_ptr study,
CORBA::Long fieldId,
const char* name,
const char* type,
const char* ico,
CORBA::Long presentationId);
+ MED_ORB::status registerPresentationMesh(SALOMEDS::Study_ptr study,
+ CORBA::Long meshId,
+ const char* name,
+ const char* type,
+ const char* ico,
+ CORBA::Long presentationId);
+
MED_ORB::status unregisterPresentation(SALOMEDS::Study_ptr study,
CORBA::Long presentationId);
- // Caller owns the returned list, and is responsible for the list deletion.
- MED_ORB::PresentationsList* getSiblingPresentations(SALOMEDS::Study_ptr study,
- CORBA::Long presentationId);
+// // Caller owns the returned list, and is responsible for the list deletion.
+// MED_ORB::PresentationsList* getSiblingPresentations(SALOMEDS::Study_ptr study,
+// CORBA::Long presentationId);
// Get all presentations registered in the study
MED_ORB::PresentationsList* getStudyPresentations(SALOMEDS::Study_ptr study);
+ char* getStudyPresentationEntry(SALOMEDS::Study_ptr study, int presentationId);
+
+ void cleanUp();
+
/*! Dump the study as a Python file */
virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
CORBA::Boolean isPublished,
private:
std::map<long, std::string> _fieldSeriesEntries;
+ std::map<long, std::string> _meshEntries;
};
extern "C"
_meshLastId = 0;
_fieldseriesLastId = 0;
}
+
MEDDataManager_i::~MEDDataManager_i()
{
LOG("Deleting MEDDataManager_i instance");
}
+void MEDDataManager_i::cleanUp()
+{
+ _fieldLastId = 0;
+ _sourceLastId = 0;
+ _meshLastId = 0;
+ _fieldseriesLastId = 0;
+
+ // [ABN] Is it the proper way?
+ _datasourceHandlerMap.clear();
+ _meshHandlerMap.clear();
+ _fieldseriesHandlerMap.clear();
+ _fieldHandlerMap.clear();
+ _fieldDoubleMap.clear();
+ _meshMap.clear();
+ _fieldPersistencyMap.clear();
+}
+
+
std::string MEDDataManager_i::file_to_source(const char * filepath)
{
string source("file://");
return NULL;
}
-MEDCALC::MeshHandler * MEDDataManager_i::getMesh(CORBA::Long meshId) {
+MEDCALC::MeshHandler * MEDDataManager_i::getMeshHandler(CORBA::Long meshId) {
if ( _meshHandlerMap.count(meshId) == 0 ) {
std::string message =
std::string("The mesh of id=") + ToString(meshId) +
* specified datasource. It corresponds to the list ofmeshes defined
* in the datasource.
*/
-MEDCALC::MeshHandlerList * MEDDataManager_i::getMeshList(CORBA::Long datasourceId) {
+MEDCALC::MeshHandlerList * MEDDataManager_i::getMeshHandlerList(CORBA::Long datasourceId) {
// We initiate a list with the maximum lentgh
MEDCALC::MeshHandlerList_var meshHandlerList = new MEDCALC::MeshHandlerList();
// -----------------------------------------------------------
// Mesh management
- MEDCALC_EXPORT MEDCALC::MeshHandlerList * getMeshList(CORBA::Long datasourceId);
- MEDCALC_EXPORT MEDCALC::MeshHandler * getMesh(CORBA::Long meshId);
+ MEDCALC_EXPORT MEDCALC::MeshHandlerList * getMeshHandlerList(CORBA::Long datasourceId);
+ MEDCALC_EXPORT MEDCALC::MeshHandler * getMeshHandler(CORBA::Long meshId);
// -----------------------------------------------------------
// Field management
MEDCALC_EXPORT void serverlog();
+ MEDCALC_EXPORT void cleanUp();
+
//
// ===========================================================
// Other public functions (non available via CORBA)
const std::string MEDPresentation::PROP_COLOR_MAP = "colorMap";
const std::string MEDPresentation::PROP_SCALAR_BAR_RANGE = "scalarBarRange";
-MEDPresentation::MEDPresentation(MEDPresentation::TypeID fieldHandlerId, const std::string& name,
+MEDPresentation::MEDPresentation(MEDPresentation::TypeID handlerId, const std::string& name,
const MEDCALC::ViewModeType viewMode,
const MEDCALC::ColorMapType colorMap,
const MEDCALC::ScalarBarRangeType sbRange)
- : _fieldHandlerId(fieldHandlerId), _propertiesStr(),
- //_pipeline(0), _display(0)
+ : _handlerId(handlerId), _propertiesStr(),
+ _mcFieldType(MEDCoupling::ON_CELLS),
+ _pvFieldType(""), _meshName(""), _fieldName(""), _fileName(""),
_selectedComponentIndex(-1),
_viewMode(viewMode),
_colorMap(colorMap),
_sbRange(sbRange),
- _renderViewPyId(-1), // will be set by getRenderViewCommand()
+ _renderViewPyId(-1), // will be set by MEDPresentationManager_i::_makePresentation()
_globalDict(0)
{
- MEDCALC::MEDDataManager_ptr dataManager(MEDFactoryClient::getDataManager());
- MEDCALC::FieldHandler* fieldHandler = dataManager->getFieldHandler(fieldHandlerId);
- MEDCALC::MeshHandler* meshHandler = dataManager->getMesh(fieldHandler->meshid);
- MEDCALC::DatasourceHandler* dataSHandler = dataManager->getDatasourceHandlerFromID(meshHandler->sourceid);
-
- _fileName = dataSHandler->uri;
- _fieldName = fieldHandler->fieldname;
- _mcFieldType = (MEDCoupling::TypeOfField) fieldHandler->type;
- _pvFieldType = getPVFieldTypeString(_mcFieldType);
- _meshName = meshHandler->name;
-
- if (_fileName.substr(0, 7) != std::string("file://")) {
- const char* msg = "MEDPresentation(): Data source is not a file! Can not proceed.";
- STDLOG(msg);
- throw MEDPresentationException(msg);
- }
- _fileName = _fileName.substr(7, _fileName.size());
-
setStringProperty(MEDPresentation::PROP_NAME, name);
setIntProperty(MEDPresentation::PROP_NB_COMPONENTS, 0);
_rangeVar = oss_r.str();
}
+/**
+ * For most of the presentations the field name etc is required.
+ * For the MEDPresentationMeshView however, the handler ID is a mesh handler ID, not a field, and the
+ * treatment is specific.
+ */
+void
+MEDPresentation::initFieldMeshInfos()
+{
+ MEDCALC::MEDDataManager_ptr dataManager(MEDFactoryClient::getDataManager());
+ MEDCALC::FieldHandler* fieldHandler = dataManager->getFieldHandler(_handlerId);
+ MEDCALC::MeshHandler* meshHandler = dataManager->getMeshHandler(fieldHandler->meshid);
+ MEDCALC::DatasourceHandler* dataSHandler = dataManager->getDatasourceHandlerFromID(meshHandler->sourceid);
+
+ extractFileName(std::string(dataSHandler->uri));
+
+ _fieldName = fieldHandler->fieldname;
+ _mcFieldType = (MEDCoupling::TypeOfField) fieldHandler->type;
+ _pvFieldType = getPVFieldTypeString(_mcFieldType);
+ _colorByType = _pvFieldType; // by default the same; overriden in DeflectionShape, VectorField, PointSprite and Contour
+ _meshName = meshHandler->name;
+}
+
+void
+MEDPresentation::extractFileName(const std::string& name)
+{
+ _fileName = name;
+ if (_fileName.substr(0, 7) != std::string("file://")) {
+ const char* msg = "MEDPresentation(): Data source is not a file! Can not proceed.";
+ STDLOG(msg);
+ throw MEDPresentationException(msg);
+ }
+ _fileName = _fileName.substr(7, _fileName.size());
+}
+
MEDPresentation::~MEDPresentation()
{
STDLOG("~MEDPresentation(): clear display");
{
MEDPyLockWrapper lock;
- std::ostringstream oss_v, oss;
- oss_v << "__view" << _renderViewPyId;
- oss << "pvs.Hide(" << _objVar << ", view=" << oss_v.str() << ");";
- oss << "pvs.Render();";
+ std::ostringstream oss;
- PyRun_SimpleString(oss.str().c_str());
+ oss << "pvs.Hide(" << _objVar << ", view=" << getRenderViewVar() << ");";
+ execPyLine(oss.str());
+ execPyLine(getRenderViewVar() + ".ResetCamera();");
+ execPyLine("pvs.Render();");
}
}
oss << "medcalc.SelectSourceField(" << _srcObjVar << ", '" << _meshName << "', '"
<< _fieldName << "', '" << typ << "');";
pushAndExecPyLine(oss.str()); oss.str("");
+ // Generate complete vector fields: fields with 2 components will copied into <name>_vector and
+ // have a third null component added.
oss << _srcObjVar << ".GenerateVectors = 1;";
pushAndExecPyLine(oss.str()); oss.str("");
+ // Make sure this is set so we stick to time steps:
+ pushAndExecPyLine("pvs.GetAnimationScene().PlayMode = 'Snap To TimeSteps'");
+
// Deal with GAUSS fields:
if(_mcFieldType == MEDCoupling::ON_GAUSS_PT)
{
pushAndExecPyLine(oss2.str()); oss2.str("");
if (_viewMode == MEDCALC::VIEW_MODE_OVERLAP) {
// this might potentially re-assign to an existing view variable, but this is OK, we
- // normally reassign exaclty the same RenderView object.
+ // normally reassign exactly the same RenderView object.
oss2 << view << " = pvs.GetActiveViewOrCreate('RenderView');";
pushAndExecPyLine(oss2.str()); oss2.str("");
} else if (_viewMode == MEDCALC::VIEW_MODE_REPLACE) {
}
void
-MEDPresentation::colorBy(const std::string & fieldType)
+MEDPresentation::colorBy()
{
std::ostringstream oss;
- oss << "pvs.ColorBy(" << _dispVar << ", ('" << fieldType << "', '" << _fieldName << "'));";
+ oss << "pvs.ColorBy(" << _dispVar << ", ('" << _colorByType << "', '" << _fieldName << "'));";
pushAndExecPyLine(oss.str());
}
return INIT_ID++;
}
-void
+bool
MEDPresentation::activateView()
{
MEDPyLockWrapper lock;
- pushAndExecPyLine("pvs.SetActiveView(" + getRenderViewVar() + ");");
+
+ execPyLine("__alive = " + getRenderViewVar() + " in pvs.GetRenderViews()");
+ PyObject * obj = getPythonObjectFromMain("__alive");
+ bool alive = true;
+ if (obj && PyBool_Check(obj))
+ alive = (obj == Py_True);
+
+ if (alive)
+ // The view is still there,just activate it:
+ pushAndExecPyLine("pvs.SetActiveView(" + getRenderViewVar() + ");");
+ else
+ {
+ // The view disappeared, recreate it in a new layout. The transfer of the objects is to be done by the caller.
+ std::ostringstream oss;
+ oss << "pvs.servermanager.misc.ViewLayout(registrationGroup='layouts');";
+ pushAndExecPyLine(oss.str()); oss.str("");
+ oss << getRenderViewVar() << " = pvs.CreateView('RenderView');";
+ pushAndExecPyLine(oss.str()); oss.str("");
+ }
+ return alive;
}
+/**!
+ * Called when the view has been recreated (because the user closed it).
+ * All the objects and set up are re-shown in the new view (which is stored in the same Python variable).
+ */
+void
+MEDPresentation::recreateViewSetup()
+{
+ showObject();
+ colorBy();
+ showScalarBar();
+ selectColorMap();
+ rescaleTransferFunction();
+ resetCameraAndRender();
+}
std::string
MEDPresentation::paravisDump() const
public:
typedef ::CORBA::Long TypeID;
+ virtual void initFieldMeshInfos();
+
virtual ~MEDPresentation();
static const std::string PROP_NAME; // name of the presentation
virtual void setIntProperty(const std::string& propName, const int propValue);
int getIntProperty(const std::string& propName) const;
- void activateView(); // non const because generates a Python trace
+ // returns True if the view was still alive, False if it must have been recreated
+ // because the user closed it.
+ bool activateView();
+ virtual void recreateViewSetup();
void dumpIntProperties() const;
void dumpStringProperties() const;
typedef std::pair<int, PyObject *> PyObjectId;
static int GeneratePythonId();
- MEDPresentation(MEDPresentation::TypeID fieldHandlerId, const std::string& name,
+ MEDPresentation(MEDPresentation::TypeID handlerId, const std::string& name,
const MEDCALC::ViewModeType viewMode,
const MEDCALC::ColorMapType colorMap,
const MEDCALC::ScalarBarRangeType sbRange);
void createSource();
void selectFieldComponent();
void showObject();
- void colorBy(const std::string & fieldType);
+ void colorBy();
void showScalarBar();
void rescaleTransferFunction();
void selectColorMap();
void execPyLine(const std::string & lin);
void pushAndExecPyLine(const std::string & lin);
- MEDPresentation::TypeID getID() const { return _fieldHandlerId; }
+ MEDPresentation::TypeID getID() const { return _handlerId; }
void fillAvailableFieldComponents();
void applyCellToPointIfNeeded();
+ void extractFileName(const std::string& name);
// void convertTo3DVectorField();
-// virtual MEDCALC::ViewModeType getViewMode() = 0;
-
template<typename PresentationType, typename PresentationParameters>
void updateComponent(const std::string& newCompo);
MEDCoupling::TypeOfField _mcFieldType;
///! ParaView field type: "CELLS" or "POINTS"
std::string _pvFieldType;
+ ///! ParaView field type: "CELLS" or "POINTS" used in the ColorBy method. Not necessarily equal to _pvFieldType.
+ std::string _colorByType;
- MEDPresentation::TypeID _fieldHandlerId;
+ MEDPresentation::TypeID _handlerId; // either a field or a mesh id (a field ID though, most of the time)
int _selectedComponentIndex;
MEDCALC::ViewModeType _viewMode;
setIntProperty(MEDPresentationContour::PROP_NB_CONTOUR, params.nbContours);
}
+void
+MEDPresentationContour::initFieldMeshInfos()
+{
+ MEDPresentation::initFieldMeshInfos();
+ _colorByType = "POINTS";
+}
+
void
MEDPresentationContour::setNumberContours()
{
throw KERNEL::createSalomeException(mes);
}
- setOrCreateRenderView(); // instanciate __viewXXX
+ setOrCreateRenderView(); // instanciate __viewXXX, needs to be after the exception above otherwise previous elements in the view will be hidden.
// Contour needs point data:
applyCellToPointIfNeeded();
// Set number of contours
setNumberContours();
- colorBy("POINTS"); // necessarily POINTS because of the conversion above
+ colorBy(); // see initFieldInfo() - necessarily POINTS because of the conversion above
showScalarBar();
selectColorMap();
rescaleTransferFunction();
MEDPresentationContour(const MEDCALC::ContourParameters& params, const MEDCALC::ViewModeType viewMode);
virtual ~MEDPresentationContour() {}
+ virtual void initFieldMeshInfos();
+
void updatePipeline(const MEDCALC::ContourParameters& params);
void getParameters(MEDCALC::ContourParameters & params) const { params = _params; } ;
{
}
+void
+MEDPresentationDeflectionShape::initFieldMeshInfos()
+{
+ MEDPresentation::initFieldMeshInfos();
+ _colorByType = "POINTS";
+}
+
void
MEDPresentationDeflectionShape::autoScale()
{
MEDPyLockWrapper lock;
- setOrCreateRenderView();
createSource();
// Populate internal array of available components:
fillAvailableFieldComponents();
- if (getIntProperty(MEDPresentation::PROP_NB_COMPONENTS) <= 1)
+ int nbCompo = getIntProperty(MEDPresentation::PROP_NB_COMPONENTS);
+ if (nbCompo <= 1)
{
const char * msg = "Deflection shape presentation does not work for scalar field!"; // this message will appear in GUI too
STDLOG(msg);
throw KERNEL::createSalomeException(msg);
}
+ setOrCreateRenderView(); // needs to be after the exception above otherwise previous elements in the view will be hidden.
+
// Warp needs point data:
applyCellToPointIfNeeded();
showObject(); // to be done first so that the scale factor computation properly works
- oss << _objVar << ".Vectors = ['POINTS', '" << _fieldName << "'];";
+ std::string fieldName = nbCompo <= 2 ? _fieldName + "_Vector" : _fieldName;
+ oss << _objVar << ".Vectors = ['POINTS', '" << fieldName << "'];";
pushAndExecPyLine(oss.str()); oss.str("");
- colorBy("POINTS");
+ colorBy(); // see initFieldInfo() - necessarily POINTS
showScalarBar();
selectColorMap();
rescaleTransferFunction();
MEDPresentationDeflectionShape(const MEDCALC::DeflectionShapeParameters& params, const MEDCALC::ViewModeType viewMode);
virtual ~MEDPresentationDeflectionShape() {}
+ virtual void initFieldMeshInfos();
+
void updatePipeline(const MEDCALC::DeflectionShapeParameters& params);
void getParameters(MEDCALC::DeflectionShapeParameters & params) const { params = _params; } ;
}
MEDPresentation* presentation = (*citr).second;
- presentation->activateView();
+ if (!presentation->activateView())
+ {
+ // The view has been recreated - transfer all presentations that were in the deleted view to this new one
+ int viewId = presentation->getPyViewID();
+ std::map<MEDPresentation::TypeID, MEDPresentation*>::iterator citr = _presentations.begin();
+ for (; citr != _presentations.end(); ++citr)
+ {
+ if(citr->second->getPyViewID() == viewId)
+ citr->second->recreateViewSetup();
+ }
+ }
_activeViewPythonId = presentation->getPyViewID();
STDLOG("Activated view " << _activeViewPythonId);
return true;
(*presList)[i] = it->first;
return presList;
}
+
+void
+MEDPresentationManager_i::cleanUp()
+{
+ _activeViewPythonId = -1;
+ std::map<MEDPresentation::TypeID, MEDPresentation*>::iterator it;
+ for (it = _presentations.begin(); it != _presentations.end(); ++it)
+ delete(it->second);
+ _presentations.clear();
+}
// MEDCALC_EXPORT MEDCALC::ViewModeType getPresentationViewMode(MEDPresentation::TypeID);
MEDCALC_EXPORT char * getParavisDump(MEDPresentation::TypeID presentationID);
MEDCALC_EXPORT MEDCALC::PresentationsList* getAllPresentations();
+ MEDCALC_EXPORT void cleanUp();
private:
MEDPresentationManager_i();
std::vector<int> to_del;
if (viewMode == MEDCALC::VIEW_MODE_REPLACE)
{
- // Remove all presentations from this view:
- STDLOG("About to remove all presentations from view " << activeViewId);
+ // Prepare all presentations to be removed from this view:
std::map<MEDPresentation::TypeID, MEDPresentation*>::const_iterator it;
for (it = _presentations.begin(); it != _presentations.end(); ++it)
{
STDLOG("Generated presentation ID: " << newID);
try {
presentation = new PresentationType(params, viewMode); // on stack or on heap?? heap for now
+ presentation->initFieldMeshInfos();
// In replace or overlap mode we force the display in the active view:
if(activeViewId != -1 && (viewMode == MEDCALC::VIEW_MODE_REPLACE || viewMode == MEDCALC::VIEW_MODE_OVERLAP))
presentation->setPyViewID(activeViewId);
presentation->generatePipeline();
// If generatePipeline didn't throw, we can actually remove presentations to be deleted:
+ STDLOG("About to remove all presentations from view " << activeViewId);
for (std::vector<int>::const_iterator it2 = to_del.begin(); it2 != to_del.end(); ++it2)
removePresentation(*it2);
//
#include "MEDPresentationMeshView.hxx"
+#include "MEDFactoryClient.hxx"
#include <SALOME_KernelServices.hxx>
#undef LOG // should be fixed in KERNEL - double definition
MEDPresentationMeshView::MEDPresentationMeshView(const MEDCALC::MeshViewParameters& params,
const MEDCALC::ViewModeType viewMode) :
// Cheating a bit here - a mesh view doesn't need a color map or a range:
- MEDPresentation(params.fieldHandlerId, TYPE_NAME, viewMode, MEDCALC::COLOR_MAP_DEFAULT,
+ MEDPresentation(params.meshHandlerId, TYPE_NAME, viewMode, MEDCALC::COLOR_MAP_DEFAULT,
MEDCALC::SCALAR_BAR_RANGE_DEFAULT),
_params(params)
{
setIntProperty(MEDPresentationMeshView::PROP_MESH_MODE, params.mode);
}
+void
+MEDPresentationMeshView::initFieldMeshInfos()
+{
+ MEDCALC::MEDDataManager_ptr dataManager(MEDFactoryClient::getDataManager());
+ MEDCALC::MeshHandler* meshHandler = dataManager->getMeshHandler(_handlerId);
+ MEDCALC::DatasourceHandler* dataSHandler = dataManager->getDatasourceHandlerFromID(meshHandler->sourceid);
+
+ extractFileName(std::string(dataSHandler->uri));
+
+ _meshName = meshHandler->name;
+}
+
void
MEDPresentationMeshView::representationType()
{
oss << _objVar << " = " << _srcObjVar << ";";
pushAndExecPyLine(oss.str()); oss.str("");
+ recreateViewSetup();
+}
+
+void
+MEDPresentationMeshView::recreateViewSetup()
+{
showObject();
representationType();
resetCameraAndRender();
void
MEDPresentationMeshView::updatePipeline(const MEDCALC::MeshViewParameters& params)
{
- if (params.fieldHandlerId != _params.fieldHandlerId)
- throw KERNEL::createSalomeException("Unexpected updatePipeline error! Mismatching fieldHandlerId!");
+ if (params.meshHandlerId != _params.meshHandlerId)
+ throw KERNEL::createSalomeException("Unexpected updatePipeline error! Mismatching meshHandlerId!");
if (params.mode != _params.mode)
updateMeshMode(params.mode);
static const std::string PROP_MESH_MODE;
MEDPresentationMeshView(const MEDCALC::MeshViewParameters& params, const MEDCALC::ViewModeType viewMode);
+ virtual void initFieldMeshInfos();
virtual ~MEDPresentationMeshView() {}
void updatePipeline(const MEDCALC::MeshViewParameters& params);
void getParameters(MEDCALC::MeshViewParameters & params) const { params = _params; } ;
void setParameters(const MEDCALC::MeshViewParameters & params) { _params = params; } ;
+ virtual void recreateViewSetup();
+
protected:
void updateMeshMode(const MEDCALC::MeshModeType mode);
virtual void internalGeneratePipeline();
{
}
+void
+MEDPresentationPointSprite::initFieldMeshInfos()
+{
+ MEDPresentation::initFieldMeshInfos();
+ _colorByType = "POINTS";
+}
+
+void
+MEDPresentationPointSprite::scaleBallRadius()
+{
+ std::ostringstream oss;
+ oss << _dispVar << ".RadiusVectorComponent = " << _selectedComponentIndex << ";";
+ pushAndExecPyLine(oss.str()); oss.str("");
+}
+
+
void
MEDPresentationPointSprite::internalGeneratePipeline()
{
oss << "__avgSize = medcalc.ComputeCellAverageSize(" << _srcObjVar << ");";
pushAndExecPyLine(oss.str()); oss.str("");
- colorBy("POINTS"); // like in Contour
+ colorBy(); // see initFieldInfo() - necessarily POINTS like in Contour
// Set point sprite:
oss << _dispVar << ".SetRepresentationType('Point Sprite');";
oss << _dispVar << ".RadiusMode = 'Scalar';";
pushAndExecPyLine(oss.str()); oss.str("");
- oss << _dispVar << ".RadiusVectorComponent = " << _selectedComponentIndex << ";";
- pushAndExecPyLine(oss.str()); oss.str("");
+ scaleBallRadius();
oss << _dispVar << ".RadiusIsProportional = 0 ;";
pushAndExecPyLine(oss.str()); oss.str("");
oss << _dispVar << ".RadiusTransferFunctionEnabled = 1 ;";
throw KERNEL::createSalomeException("Unexpected updatePipeline error! Mismatching fieldHandlerId!");
if (std::string(params.displayedComponent) != std::string(_params.displayedComponent))
- updateComponent<MEDPresentationPointSprite, MEDCALC::PointSpriteParameters>(std::string(params.displayedComponent));
+ {
+ updateComponent<MEDPresentationPointSprite, MEDCALC::PointSpriteParameters>(std::string(params.displayedComponent));
+ scaleBallRadius();
+ pushAndExecPyLine("pvs.Render();");
+ }
if (params.scalarBarRange != _params.scalarBarRange)
updateScalarBarRange<MEDPresentationPointSprite, MEDCALC::PointSpriteParameters>(params.scalarBarRange);
if (params.colorMap != _params.colorMap)
MEDPresentationPointSprite(const MEDCALC::PointSpriteParameters& params, const MEDCALC::ViewModeType viewMode);
virtual ~MEDPresentationPointSprite() {}
+ virtual void initFieldMeshInfos();
+
void updatePipeline(const MEDCALC::PointSpriteParameters& params);
void getParameters(MEDCALC::PointSpriteParameters & params) const { params = _params; } ;
protected:
virtual void internalGeneratePipeline();
+ void scaleBallRadius();
private:
MEDCALC::PointSpriteParameters _params;
showObject();
- colorBy(_pvFieldType);
+ colorBy();
showScalarBar();
selectColorMap();
rescaleTransferFunction();
adaptNumberOfSlices();
setSliceParametersAndGroup();
- showObject();
-
- colorBy(_pvFieldType);
- showScalarBar();
- selectColorMap();
- rescaleTransferFunction();
- resetCameraAndRender();
+ recreateViewSetup();
}
std::string
{
}
+void
+MEDPresentationVectorField::initFieldMeshInfos()
+{
+ MEDPresentation::initFieldMeshInfos();
+ _colorByType = "POINTS";
+}
+
void
MEDPresentationVectorField::autoScale()
{
MEDPyLockWrapper lock;
- setOrCreateRenderView();
createSource();
// Populate internal array of available components:
fillAvailableFieldComponents();
- if (getIntProperty(MEDPresentation::PROP_NB_COMPONENTS) <= 1)
+ int nbCompo = getIntProperty(MEDPresentation::PROP_NB_COMPONENTS);
+ if (nbCompo <= 1)
{
const char * msg = "Vector field presentation does not work for scalar field!"; // this message will appear in GUI too
STDLOG(msg);
throw KERNEL::createSalomeException(msg);
}
+ setOrCreateRenderView(); // instanciate __viewXXX, needs to be after the exception above otherwise previous elements in the view will be hidden.
+
std::ostringstream oss;
oss << _objVar << " = pvs.Glyph(Input=" << _srcObjVar << ", GlyphType='Arrow');";
pushAndExecPyLine(oss.str()); oss.str("");
oss << _objVar << ".Scalars = ['"<< _pvFieldType << "', 'None'];";
pushAndExecPyLine(oss.str()); oss.str("");
- oss << _objVar << ".Vectors = ['"<< _pvFieldType << "', '" << _fieldName << "'];";
+
+ std::string fieldName = nbCompo <= 2 ? _fieldName + "_Vector" : _fieldName;
+ oss << _objVar << ".Vectors = ['"<< _pvFieldType << "', '" << fieldName << "'];";
+
pushAndExecPyLine(oss.str()); oss.str("");
oss << _objVar << ".ScaleMode = 'vector';";
pushAndExecPyLine(oss.str()); oss.str("");
oss << _objVar << "GlyphTransform = 'Transform2';"; // not sure this is really needed?
pushAndExecPyLine(oss.str()); oss.str("");
- colorBy("POINTS");
+ colorBy(); // see initFieldInfo() - necessarily POINTS
showScalarBar();
selectColorMap();
rescaleTransferFunction();
MEDPresentationVectorField(const MEDCALC::VectorFieldParameters& params, const MEDCALC::ViewModeType viewMode);
virtual ~MEDPresentationVectorField() {}
+ virtual void initFieldMeshInfos();
+
void updatePipeline(const MEDCALC::VectorFieldParameters& params);
void getParameters(MEDCALC::VectorFieldParameters & params) const { params = _params; } ;
SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
for (int i=0; i<listOfSObject->size(); i++) {
SALOMEDS::SObject_var soFieldseries = listOfSObject->at(i);
+ std::string name(_studyEditor->getName(soFieldseries));
+ if (soFieldseries->_is_nil() || name == "MEDCalc")
+ return;
// First retrieve the fieldseries id associated to this study object
- long fieldseriesId = _studyEditor->getParameterInt(soFieldseries,FIELD_SERIES_ID);
- //long fieldseriesId = _studyEditor->getParameterInt(soFieldseries,FIELD_ID);
+ SALOMEDS::GenericAttribute_var anAttr;
+ SALOMEDS::AttributeParameter_var aParam;
+ if ( soFieldseries->FindAttribute(anAttr,"AttributeParameter") ) {
+ aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
+ if (! aParam->IsSet(FIELD_SERIES_ID, PT_INTEGER))
+ return;
+ }
+ long fieldseriesId = aParam->GetInt(FIELD_SERIES_ID);
STDLOG("Expand the field timeseries "<<fieldseriesId);
// If fieldseriesId equals -1, then it means that it is not a
// <<<
SALOMEDS::SObject_var soField = listOfSObject->at(0);
-
- bool isInWorkspace = _studyEditor->getParameterBool(soField,IS_IN_WORKSPACE);
+ std::string name(_studyEditor->getName(soField));
+ if (soField->_is_nil() || name == "MEDCalc")
+ return;
+ SALOMEDS::GenericAttribute_var anAttr;
+ SALOMEDS::AttributeParameter_var aParam;
+ if ( soField->FindAttribute(anAttr,"AttributeParameter") ) {
+ aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
+ if (! aParam->IsSet(IS_IN_WORKSPACE, PT_BOOLEAN))
+ return;
+ }
+ bool isInWorkspace = aParam->GetBool(IS_IN_WORKSPACE);
if ( isInWorkspace ) {
QMessageBox::warning(_salomeModule->getApp()->desktop(),
tr("Operation not allowed"),
return;
}
- int fieldId = _studyEditor->getParameterInt(soField,FIELD_ID);
+ if (! aParam->IsSet(FIELD_ID, PT_INTEGER))
+ return;
+ int fieldId = aParam->GetInt(FIELD_ID);
// If fieldId equals -1, then it means that it is not a field
// managed by the MED module, and we stop this function process.
// each item, we just import the whole set of items.
for (int i=0; i<listOfSObject->size(); i++) {
SALOMEDS::SObject_var soField = listOfSObject->at(i);
-
- bool isInWorkspace = _studyEditor->getParameterBool(soField,IS_IN_WORKSPACE);
+ if (soField->_is_nil())
+ continue;
+ SALOMEDS::GenericAttribute_var anAttr;
+ SALOMEDS::AttributeParameter_var aParam;
+ if ( soField->FindAttribute(anAttr,"AttributeParameter") ) {
+ aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
+ if (! aParam->IsSet(IS_IN_WORKSPACE, PT_BOOLEAN))
+ return;
+ }
+ bool isInWorkspace = aParam->GetBool(IS_IN_WORKSPACE);
if ( !isInWorkspace ) {
- int fieldId = _studyEditor->getParameterInt(soField,FIELD_ID);
+ if (! aParam->IsSet(FIELD_ID, PT_INTEGER))
+ continue;
+ int fieldId = aParam->GetInt(FIELD_ID);
MEDCALC::FieldHandler* fieldHandler =
MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
DatasourceEvent* event = new DatasourceEvent();
if ( CORBA::is_nil( _MED_engine ) ) {
Engines::EngineComponent_var comp =
SalomeApp_Application::lcc()->FindOrLoad_Component( "FactoryServer", "MED" );
+ if (CORBA::is_nil( comp ))
+ STDLOG("Could not FindOrLoad_Component MED");
_MED_engine = MED_ORB::MED_Gen::_narrow( comp );
+ if (CORBA::is_nil( _MED_engine ))
+ STDLOG("Could not narrow MED engine");
}
}
// The following initializes the GUI widget and associated actions
this->createModuleWidgets();
this->createModuleActions();
+
+ // Now that the workspace controller is created, ParaView core application has normally been started,
+ // and hidden GUI elements have been created. We can fire the VCR toolbar activation:
+ initToolbars();
}
QString
bool
MEDModule::deactivateModule( SUIT_Study* theStudy )
{
+ // Clean up engine:
+ STDLOG("MEDModule::deactivateModule(): cleaning up engine side.");
+ _MED_engine->cleanUp();
+ MEDFactoryClient::getFactory()->getPresentationManager()->cleanUp();
+ MEDFactoryClient::getFactory()->getDataManager()->cleanUp();
+
_workspaceController->showDockWidgets(false);
_presentationController->showDockWidgets(false);
//this->unsetDockLayout();
connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent*)),
_presentationController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent*)));
-
-
- // Now that the workspace controller is created, ParaView core application has normally been started,
- // and hidden GUI elements have been created. We can fire the VCR toolbar activation:
- initToolbars();
}
void
//}
+/**
+ * Returns presentation name, type and ID from the currently selected presentation in the object
+ * browser.
+ */
bool
-MEDModule::itemClickGeneric(const QModelIndex & index, std::string & name, std::string & type, int & fieldId, int & presId) const
+MEDModule::itemClickGeneric(std::string & name, std::string & type, int & presId) const
{
DataObjectList dol = getApp()->objectBrowser()->getSelected();
if (dol.isEmpty())
|| ! attrParam->GetBool(IS_PRESENTATION)) { // Not a presentation
return false;
}
- if (!attrParam->IsSet(FIELD_ID, PT_INTEGER))
- return false;
- fieldId = attrParam->GetInt(FIELD_ID);
+// if (!attrParam->IsSet(FIELD_ID, PT_INTEGER))
+// return false;
+// fieldId = attrParam->GetInt(FIELD_ID);
if (!attrParam->IsSet(PRESENTATION_ID, PT_INTEGER))
return false;
presId = attrParam->GetInt(PRESENTATION_ID);
void
MEDModule::onClick(const QModelIndex & index)
{
- int fieldId, presId;
+ int presId;
std::string name, type;
- if (!itemClickGeneric(index, name, type, fieldId, presId))
+ if (!itemClickGeneric(name, type, presId))
{
// Not a presentation - clear widget:
emit presentationSelected(-1, QString(""), QString(""));
void
MEDModule::onDblClick(const QModelIndex& index)
{
- int fieldId, presId;
+ int presId;
std::string name, type;
- if (!itemClickGeneric(index, name, type, fieldId, presId))
+ if (!itemClickGeneric(name, type, presId))
return;
- STDLOG("Presentation edition: NOT IMPLEMENTED YET");
- STDLOG(" Presentation infos:");
+// STDLOG("Presentation double click");
+// STDLOG(" Presentation infos:");
// STDLOG(" - Component: " + item->componentDataType().toStdString());
// STDLOG(" - Item entry: " + item->entry().toStdString());
// STDLOG(" - Item name: " + item->name().toStdString());
- std::ostringstream oss;
- oss << fieldId;
- STDLOG(" - Field id: " + oss.str());
- STDLOG(" - Presentation name: " + name);
-
- // :TODO:
- // get edited values from a popup widget
- // get presentation
- // call presentation edit function
-
+// std::ostringstream oss;
+// oss << fieldId;
+// STDLOG(" - Field id: " + oss.str());
+// STDLOG(" - Presentation name: " + name);
}
void
inline SALOME_AppStudyEditor* getStudyEditor() { return _studyEditor; }
void requestSALOMETermination() const;
+ bool itemClickGeneric(std::string & name, std::string & type, int & presId) const;
+
signals:
void presentationSelected(int presId, const QString& presType, const QString& presName);
void createModuleActions();
void initToolbars();
- bool itemClickGeneric(const QModelIndex & index, std::string & name,
- std::string & type, int & fieldId, int & presId) const;
-
static void init();
private:
static MED_ORB::MED_Gen_var _MED_engine;
- // GUI needs to talk directly to the pres manager to activate a view, get some params, etc ...:
- static MEDCALC::MEDPresentationManager_ptr _presManager;
-
#ifdef MED_HAS_QTTESTING
TestController * _testController;
#endif
loadParametersFromEngine();
// Set properly color map and scalar bar range
+ STDLOG("MEDWidgetHelper::udpateWidget() colorMap is " << _colorMap);
_paramWidget->setColorMap(_colorMap);
+ STDLOG("MEDWidgetHelper::udpateWidget() scalarBarRange is " << _scalarBarRange);
_paramWidget->setScalarBarRange(_scalarBarRange);
if (connect)
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0">
- <context>
+<TS version="2.0" language="en_GB">
+<context>
<name>PresentationController</name>
<message>
- <source>TITLE_PRESENTATION_PARAMETERS</source>
- <translation>Presentation parameters</translation>
+ <source>TITLE_PRESENTATION_PARAMETERS</source>
+ <translation>Presentation parameters</translation>
</message>
<message>
- <source>LAB_PRESENTATION_MESH_VIEW</source>
- <translation>Mesh</translation>
+ <source>LAB_PRESENTATION_MESH_VIEW</source>
+ <translation>Mesh</translation>
</message>
<message>
- <source>TIP_PRESENTATION_MESH_VIEW</source>
- <translation>Mesh</translation>
+ <source>TIP_PRESENTATION_MESH_VIEW</source>
+ <translation>Mesh</translation>
</message>
<message>
- <source>LAB_PRESENTATION_SCALAR_MAP</source>
- <translation>Scalar map</translation>
+ <source>LAB_PRESENTATION_SCALAR_MAP</source>
+ <translation>Scalar map</translation>
</message>
<message>
- <source>TIP_PRESENTATION_SCALAR_MAP</source>
- <translation>Scalar map</translation>
+ <source>TIP_PRESENTATION_SCALAR_MAP</source>
+ <translation>Scalar map</translation>
</message>
<message>
- <source>LAB_PRESENTATION_CONTOUR</source>
- <translation>Contour</translation>
+ <source>LAB_PRESENTATION_CONTOUR</source>
+ <translation>Contour</translation>
</message>
<message>
- <source>TIP_PRESENTATION_CONTOUR</source>
- <translation>Contour</translation>
+ <source>TIP_PRESENTATION_CONTOUR</source>
+ <translation>Contour</translation>
</message>
<message>
- <source>LAB_PRESENTATION_VECTOR_FIELD</source>
- <translation>Vector field</translation>
+ <source>LAB_PRESENTATION_VECTOR_FIELD</source>
+ <translation>Vector field</translation>
</message>
<message>
- <source>TIP_PRESENTATION_VECTOR_FIELD</source>
- <translation>Vector field</translation>
+ <source>TIP_PRESENTATION_VECTOR_FIELD</source>
+ <translation>Vector field</translation>
</message>
<message>
- <source>LAB_PRESENTATION_SLICES</source>
- <translation>Slices</translation>
+ <source>LAB_PRESENTATION_SLICES</source>
+ <translation>Slices</translation>
</message>
<message>
- <source>TIP_PRESENTATION_SLICES</source>
- <translation>Slices</translation>
+ <source>TIP_PRESENTATION_SLICES</source>
+ <translation>Slices</translation>
</message>
<message>
- <source>LAB_PRESENTATION_DEFLECTION_SHAPE</source>
- <translation>Deflection shape</translation>
+ <source>LAB_PRESENTATION_DEFLECTION_SHAPE</source>
+ <translation>Deflection shape</translation>
</message>
<message>
- <source>TIP_PRESENTATION_DEFLECTION_SHAPE</source>
- <translation>Deflection shape</translation>
+ <source>TIP_PRESENTATION_DEFLECTION_SHAPE</source>
+ <translation>Deflection shape</translation>
</message>
<message>
- <source>LAB_PRESENTATION_POINT_SPRITE</source>
- <translation>Point sprite</translation>
+ <source>LAB_PRESENTATION_POINT_SPRITE</source>
+ <translation>Point sprite</translation>
</message>
<message>
- <source>TIP_PRESENTATION_POINT_SPRITE</source>
- <translation>Point sprite</translation>
+ <source>TIP_PRESENTATION_POINT_SPRITE</source>
+ <translation>Point sprite</translation>
</message>
<message>
- <source>LAB_DELETE_PRESENTATION</source>
- <translation>Delete presentation</translation>
+ <source>LAB_DELETE_PRESENTATION</source>
+ <translation>Delete presentation</translation>
</message>
<message>
- <source>TIP_DELETE_PRESENTATION</source>
- <translation>Delete selected presentation</translation>
+ <source>TIP_DELETE_PRESENTATION</source>
+ <translation>Delete selected presentation</translation>
</message>
<message>
- <source>LAB_PARAVIS_DUMP</source>
- <translation>Dump pipeline</translation>
+ <source>LAB_PARAVIS_DUMP</source>
+ <translation>Dump pipeline</translation>
</message>
<message>
- <source>TIP_PARAVIS_DUMP</source>
- <translation>Dump the low level Python commands of the presentation</translation>
- </message>
+ <source>TIP_PARAVIS_DUMP</source>
+ <translation>Dump the low level Python commands of the presentation</translation>
+ </message>
<message>
- <source>MENU_PRESENTATIONS</source>
- <translation>Presentations</translation>
+ <source>MENU_PRESENTATIONS</source>
+ <translation>Presentations</translation>
</message>
<message>
- <source>MEDPresentationMeshView</source>
- <translation>Mesh view</translation>
+ <source>MEDPresentationMeshView</source>
+ <translation>Mesh view</translation>
</message>
<message>
- <source>MEDPresentationScalarMap</source>
- <translation>Scalar map</translation>
+ <source>MEDPresentationScalarMap</source>
+ <translation>Scalar map</translation>
</message>
<message>
- <source>MEDPresentationContour</source>
- <translation>Contour</translation>
+ <source>MEDPresentationContour</source>
+ <translation>Contour</translation>
</message>
<message>
- <source>MEDPresentationVectorField</source>
- <translation>Vector field</translation>
+ <source>MEDPresentationVectorField</source>
+ <translation>Vector field</translation>
</message>
<message>
- <source>MEDPresentationSlices</source>
- <translation>Slices</translation>
+ <source>MEDPresentationSlices</source>
+ <translation>Slices</translation>
</message>
<message>
- <source>MEDPresentationDeflectionShape</source>
- <translation>Deflection shape</translation>
+ <source>MEDPresentationDeflectionShape</source>
+ <translation>Deflection shape</translation>
</message>
<message>
- <source>MEDPresentationPointSprite</source>
- <translation>Point sprite</translation>
+ <source>MEDPresentationPointSprite</source>
+ <translation>Point sprite</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>ProcessingController</name>
<message>
- <source>MENU_PROCESSING</source>
- <translation>Processing</translation>
+ <source>MENU_PROCESSING</source>
+ <translation>Processing</translation>
</message>
<message>
- <source>LAB_PROCESSING_CHANGE_MESH</source>
- <translation>Change underlying mesh</translation>
+ <source>LAB_PROCESSING_CHANGE_MESH</source>
+ <translation>Change underlying mesh</translation>
</message>
<message>
- <source>LAB_PROCESSING_INTERPOLATE_FIELD</source>
- <translation>Interpolate field</translation>
+ <source>LAB_PROCESSING_INTERPOLATE_FIELD</source>
+ <translation>Interpolate field</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DatasourceController</name>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="45"/>
- <source>LAB_ADD_DATA_SOURCE</source>
- <translation>Add Data Source</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="45"/>
+ <source>LAB_ADD_DATA_SOURCE</source>
+ <translation>Add Data Source</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="46"/>
- <source>TIP_ADD_DATA_SOURCE</source>
- <translation>Add a file data source (file providing med data)</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="46"/>
+ <source>TIP_ADD_DATA_SOURCE</source>
+ <translation>Add a file data source (file providing med data)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="52"/>
- <source>LAB_ADD_IMAGE_SOURCE</source>
- <translation>Add Image Source</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="52"/>
+ <source>LAB_ADD_IMAGE_SOURCE</source>
+ <translation>Add Image Source</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="53"/>
- <source>TIP_ADD_IMAGE_SOURCE</source>
- <translation>Create a Data Source from an image file</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="53"/>
+ <source>TIP_ADD_IMAGE_SOURCE</source>
+ <translation>Create a Data Source from an image file</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="62"/>
- <source>LAB_EXPAND_FIELD</source>
- <translation>Expand field timeseries</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="62"/>
+ <source>LAB_EXPAND_FIELD</source>
+ <translation>Expand field timeseries</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="75"/>
- <source>LAB_USE_IN_WORKSPACE</source>
- <translation>Use in workspace</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="75"/>
+ <source>LAB_USE_IN_WORKSPACE</source>
+ <translation>Use in workspace</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="157"/>
- <source>IMPORT_MED_FIELDS</source>
- <translation>Import MED fields</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="157"/>
+ <source>IMPORT_MED_FIELDS</source>
+ <translation>Import MED fields</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="191"/>
- <source>OPERATION_FAILED</source>
- <translation>Operation failed</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="191"/>
+ <source>OPERATION_FAILED</source>
+ <translation>Operation failed</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="192"/>
- <source>CREATION_FAILED</source>
- <translation>The creation of med data from the image file failed</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="192"/>
+ <source>CREATION_FAILED</source>
+ <translation>The creation of med data from the image file failed</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="283"/>
- <source>OPERATION_NOT_ALLOWED</source>
- <translation>Operation not allowed</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="283"/>
+ <source>OPERATION_NOT_ALLOWED</source>
+ <translation>Operation not allowed</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="284"/>
- <source>FIELD_ALREADY_DEFINED</source>
- <translation>This field is already defined in the workspace</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="284"/>
+ <source>FIELD_ALREADY_DEFINED</source>
+ <translation>This field is already defined in the workspace</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>WidgetPresentationParameters</name>
<message>
- <source>LAB_DEFAULT_DYN_TITLE</source>
- <translation>Default parameters</translation>
- </message>
+ <source>LAB_DEFAULT_DYN_TITLE</source>
+ <translation>Default parameters</translation>
+ </message>
+ <message>
+ <source>LAB_DISP_COMP</source>
+ <translation>Displayed component:</translation>
+ </message>
+ <message>
+ <source>LAB_EUCLIDEAN_NORM</source>
+ <translation>Euclidean norm</translation>
+ </message>
+ <message>
+ <source>LAB_SCALARBAR</source>
+ <translation>Scalar bar:</translation>
+ </message>
<message>
- <source>LAB_DISP_COMP</source>
- <translation>Displayed component:</translation>
+ <source>LAB_RANGE</source>
+ <translation>Range:</translation>
</message>
<message>
- <source>LAB_EUCLIDEAN_NORM</source>
- <translation>Euclidean norm</translation>
+ <source>LAB_ALL_TIMESTEPS</source>
+ <translation>All timesteps</translation>
</message>
<message>
- <source>LAB_SCALARBAR</source>
- <translation>Scalar bar:</translation>
+ <source>LAB_CURRENT_TIMESTEP</source>
+ <translation>Current timestep</translation>
</message>
<message>
- <source>LAB_RANGE</source>
- <translation>Range:</translation>
+ <source>LAB_USER_RANGE</source>
+ <translation>User-specified</translation>
</message>
<message>
- <source>LAB_ALL_TIMESTEPS</source>
- <translation>All timesteps</translation>
+ <source>LAB_TIMESTEP</source>
+ <translation>Timestep:</translation>
</message>
<message>
- <source>LAB_CURRENT_TIMESTEP</source>
- <translation>Current timestep</translation>
+ <source>LAB_MIN_VALUE</source>
+ <translation>Min value:</translation>
</message>
<message>
- <source>LAB_USER_RANGE</source>
- <translation>User-specified</translation>
+ <source>LAB_MAX_VALUE</source>
+ <translation>Max value:</translation>
</message>
<message>
- <source>LAB_TIMESTEP</source>
- <translation>Timestep:</translation>
+ <source>LAB_COLOR_MAP</source>
+ <translation>Color map:</translation>
</message>
<message>
- <source>LAB_MIN_VALUE</source>
- <translation>Min value:</translation>
+ <source>LAB_MESH_WIREFRAME</source>
+ <translation>Wireframe</translation>
</message>
<message>
- <source>LAB_MAX_VALUE</source>
- <translation>Max value:</translation>
+ <source>LAB_MESH_SURFACE</source>
+ <translation>Surface</translation>
</message>
<message>
- <source>LAB_COLOR_MAP</source>
- <translation>Color map:</translation>
+ <source>LAB_MESH_SURF_EDGES</source>
+ <translation>Surface With Edges</translation>
</message>
-
<message>
- <source>LAB_MESH_WIREFRAME</source>
- <translation>Wireframe</translation>
+ <source>LAB_DISP_MESH_MODE</source>
+ <translation>Mesh display:</translation>
</message>
<message>
- <source>LAB_MESH_SURFACE</source>
- <translation>Surface</translation>
+ <source>LAB_NB_CONTOURS</source>
+ <translation>Number of contours (max. %1):</translation>
</message>
<message>
- <source>LAB_MESH_SURF_EDGES</source>
- <translation>Surface With Edges</translation>
+ <source>LAB_NB_SLICES</source>
+ <translation>Number of slices (max. %1):</translation>
</message>
<message>
- <source>LAB_DISP_MESH_MODE</source>
- <translation>Mesh display:</translation>
+ <source>LAB_SPINBOX_TOOLTIP</source>
+ <translation>Hit 'Enter' to apply</translation>
</message>
<message>
- <source>LAB_NB_CONTOURS</source>
- <translation>Number of contours:</translation>
+ <source>LAB_SLICE_ORIENT</source>
+ <translation>Slice orientation:</translation>
</message>
<message>
- <source>LAB_NB_SLICES</source>
- <translation>Number of slices:</translation>
+ <source>LAB_SLICE_NORMAL_TO_X</source>
+ <translation>Normal to X</translation>
</message>
<message>
- <source>LAB_SLICE_ORIENT</source>
- <translation>Slice orientation:</translation>
+ <source>LAB_SLICE_NORMAL_TO_Y</source>
+ <translation>Normal to Y</translation>
</message>
-
<message>
- <source>LAB_SLICE_NORMAL_TO_X</source>
- <translation>Normal to X</translation>
+ <source>LAB_SLICE_NORMAL_TO_Z</source>
+ <translation>Normal to Z</translation>
</message>
<message>
- <source>LAB_SLICE_NORMAL_TO_Y</source>
- <translation>Normal to Y</translation>
+ <source>LAB_SLICE_NORMAL_TO_XY</source>
+ <translation>Normal to XY</translation>
</message>
<message>
- <source>LAB_SLICE_NORMAL_TO_Z</source>
- <translation>Normal to Z</translation>
+ <source>LAB_SLICE_NORMAL_TO_XZ</source>
+ <translation>Normal to XZ</translation>
</message>
<message>
- <source>LAB_SLICE_NORMAL_TO_XY</source>
- <translation>Normal to XY</translation>
+ <source>LAB_SLICE_NORMAL_TO_YZ</source>
+ <translation>Normal to YZ</translation>
</message>
<message>
- <source>LAB_SLICE_NORMAL_TO_XZ</source>
- <translation>Normal to XZ</translation>
+ <source>LAB_SLICE_NORMAL_TO_XYZ</source>
+ <translation>Normal to XYZ</translation>
</message>
<message>
- <source>LAB_SLICE_NORMAL_TO_YZ</source>
- <translation>Normal to YZ</translation>
+ <source>LAB_BLUE_TO_RED</source>
+ <translation>Blue to red rainbow</translation>
</message>
<message>
- <source>LAB_SLICE_NORMAL_TO_XYZ</source>
- <translation>Normal to XYZ</translation>
+ <source>LAB_COOL_TO_WARM</source>
+ <translation>Cool to warm</translation>
</message>
-
- </context>
- <context>
+</context>
+<context>
<name>DlgAlias</name>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="14"/>
- <source>SELECT_AN_ALIAS_FOR_THE_FIELD</source>
- <translation>Select an alias for the field</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="14"/>
+ <source>SELECT_AN_ALIAS_FOR_THE_FIELD</source>
+ <translation>Select an alias for the field</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="401"/>
- <source>DEFINE_AN_ALIAS</source>
- <translation>You can define an alias to manipulate the field in console:</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="401"/>
+ <source>DEFINE_AN_ALIAS</source>
+ <translation>You can define an alias to manipulate the field in console:</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="419"/>
- <source>ALIAS</source>
- <translation>Alias</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="419"/>
+ <source>ALIAS</source>
+ <translation>Alias</translation>
</message>
<message utf8="true">
- <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="436"/>
- <source>MSG_OPERATION_DEFINES_VARIABLE</source>
- <translation>(this operation defines a variable named <alias> in TUI console. Enter "<alias>.help()" to see available functions, or simply "doc")</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="436"/>
+ <source>MSG_OPERATION_DEFINES_VARIABLE</source>
+ <translation>(this operation defines a variable named <alias> in TUI console. Enter "<alias>.help()" to see available functions, or simply "doc")</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DlgChangeUnderlyingMesh</name>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="14"/>
- <source>FORM</source>
- <translation>Form</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="14"/>
+ <source>FORM</source>
+ <translation>Form</translation>
</message>
<message utf8="true">
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="403"/>
- <source>MESH_GT</source>
- <translation>Mesh -></translation>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="403"/>
+ <source>MESH_GT</source>
+ <translation>Mesh -></translation>
</message>
<message utf8="true">
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="420"/>
- <source>MSG_EXPLORER</source>
- <translation>(Explorer provides a view on MED data sources (mesh and fields) referenced in data space)</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="420"/>
+ <source>MSG_EXPLORER</source>
+ <translation>(Explorer provides a view on MED data sources (mesh and fields) referenced in data space)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="35"/>
- <source>DATA_VERIFICATION</source>
- <translation>Data verification</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="35"/>
+ <source>DATA_VERIFICATION</source>
+ <translation>Data verification</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="36"/>
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="391"/>
- <source>SELECT_MESH</source>
- <translation>You must select a mesh in the explorer and clic the button Mesh</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="36"/>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="391"/>
+ <source>SELECT_MESH</source>
+ <translation>You must select a mesh in the explorer and clic the button Mesh</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DlgInterpolateField</name>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="391"/>
- <source>SELECT_MESH</source>
- <translation>You must select a mesh in the explorer and clic the button Mesh</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="391"/>
+ <source>SELECT_MESH</source>
+ <translation>You must select a mesh in the explorer and clic the button Mesh</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="406"/>
- <source>TARGET_MESH_GT</source>
- <translation>Target mesh -></translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="406"/>
+ <source>TARGET_MESH_GT</source>
+ <translation>Target mesh -></translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="423"/>
- <source>MSG_EXPLORER</source>
- <translation>(Explorer provides a view on MED data sources (mesh and fields) referenced in data space)</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="423"/>
+ <source>MSG_EXPLORER</source>
+ <translation>(Explorer provides a view on MED data sources (mesh and fields) referenced in data space)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="450"/>
- <source>LABEL_PRECISION</source>
- <translation>Interpolator precision</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="450"/>
+ <source>LABEL_PRECISION</source>
+ <translation>Interpolator precision</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="493"/>
- <source>LABEL_INTERSECTION_TYPE</source>
- <translation>Intersection type</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="493"/>
+ <source>LABEL_INTERSECTION_TYPE</source>
+ <translation>Intersection type</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="520"/>
- <source>LABEL_METHOD</source>
- <translation>Interpolation method</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="520"/>
+ <source>LABEL_METHOD</source>
+ <translation>Interpolation method</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="547"/>
- <source>LABEL_DEFAULT_VALUE</source>
- <translation>Default value of resulting field</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="547"/>
+ <source>LABEL_DEFAULT_VALUE</source>
+ <translation>Default value of resulting field</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="581"/>
- <source>LABEL_REVERSE</source>
- <translation>Reverse interpolation ?</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="581"/>
+ <source>LABEL_REVERSE</source>
+ <translation>Reverse interpolation ?</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="612"/>
- <source>LABEL_NATURE</source>
- <translation>Field nature</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="612"/>
+ <source>LABEL_NATURE</source>
+ <translation>Field nature</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DlgImageToMed</name>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="14"/>
- <source>FORM</source>
- <translation>Form</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="14"/>
+ <source>FORM</source>
+ <translation>Form</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="28"/>
- <source>IMAGE_FILE</source>
- <translation>Image file:</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="28"/>
+ <source>IMAGE_FILE</source>
+ <translation>Image file:</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="35"/>
- <source>MED_FILE</source>
- <translation>MED file:</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="35"/>
+ <source>MED_FILE</source>
+ <translation>MED file:</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="64"/>
- <source>SELECT_IMAGE_FILE</source>
- <translation>Select image file</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="64"/>
+ <source>SELECT_IMAGE_FILE</source>
+ <translation>Select image file</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="79"/>
- <source>SPECIFY_MED_FILE</source>
- <translation>Specify a MED file</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="79"/>
+ <source>SPECIFY_MED_FILE</source>
+ <translation>Specify a MED file</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="82"/>
- <source>LOAD_AUTOMATICALLY</source>
- <translation>Load automatically</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="82"/>
+ <source>LOAD_AUTOMATICALLY</source>
+ <translation>Load automatically</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DlgUseInWorkspace</name>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="13"/>
- <source>FORM</source>
- <translation>Form</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="13"/>
+ <source>FORM</source>
+ <translation>Form</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="49"/>
- <source>PRESSURE</source>
- <translation>Pressure:</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="49"/>
+ <source>PRESSURE</source>
+ <translation>Pressure:</translation>
</message>
<message utf8="true">
- <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="56"/>
- <source>TEMPERATURE</source>
- <translation>Temperature:</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="56"/>
+ <source>TEMPERATURE</source>
+ <translation>Temperature:</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>GenericDialog</name>
<message>
- <location filename="MEDCALC/gui/dialogs/GenericDialog.ui" line="13"/>
- <source>DIALOG</source>
- <translation>Dialog</translation>
+ <location filename="MEDCALC/gui/dialogs/GenericDialog.ui" line="13"/>
+ <source>DIALOG</source>
+ <translation>Dialog</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>MEDModule</name>
<message>
- <location filename="MEDCALC/gui/MEDModule.cxx" line="68"/>
- <location filename="MEDCALC/gui/MEDModule.cxx" line="157"/>
- <source>IMPORT_FROM_FILE</source>
- <translation>Import from File</translation>
+ <location filename="MEDCALC/gui/MEDModule.cxx" line="68"/>
+ <location filename="MEDCALC/gui/MEDModule.cxx" line="157"/>
+ <source>IMPORT_FROM_FILE</source>
+ <translation>Import from File</translation>
</message>
<message>
- <location filename="MEDCALC/gui/MEDModule.cxx" line="69"/>
- <source>IMPORT_MED_FILE</source>
- <translation>Import MED file</translation>
+ <location filename="MEDCALC/gui/MEDModule.cxx" line="69"/>
+ <source>IMPORT_MED_FILE</source>
+ <translation>Import MED file</translation>
</message>
<message>
- <location filename="MEDCALC/gui/MEDModule.cxx" line="72"/>
- <source>MEN_FILE</source>
- <translation>&File</translation>
+ <location filename="MEDCALC/gui/MEDModule.cxx" line="72"/>
+ <source>MEN_FILE</source>
+ <translation>&File</translation>
</message>
<message>
- <source>PREF_TAB_GENERAL</source>
- <translation>General</translation>
+ <source>PREF_TAB_GENERAL</source>
+ <translation>General</translation>
</message>
<message>
- <source>PREF_THEME_GROUP</source>
- <translation>Theme</translation>
+ <source>PREF_THEME_GROUP</source>
+ <translation>Theme</translation>
</message>
<message>
- <source>PREF_ICONS</source>
- <translation>Icons</translation>
+ <source>PREF_ICONS</source>
+ <translation>Icons</translation>
</message>
<message>
- <source>PREF_ICON_THEME_MODERN</source>
- <translation>Modern</translation>
+ <source>PREF_ICON_THEME_MODERN</source>
+ <translation>Modern</translation>
</message>
<message>
- <source>PREF_ICON_THEME_CLASSIC</source>
- <translation>Classic</translation>
+ <source>PREF_ICON_THEME_CLASSIC</source>
+ <translation>Classic</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>WorkspaceController</name>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="66"/>
- <source>VISUALIZE_SCALAR_MAP</source>
- <translation>Visualize (scalar map)</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="66"/>
+ <source>VISUALIZE_SCALAR_MAP</source>
+ <translation>Visualize (scalar map)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="67"/>
- <source>USE_IN_CONSOLE</source>
- <translation>Use (in console)</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="67"/>
+ <source>USE_IN_CONSOLE</source>
+ <translation>Use (in console)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="68"/>
- <source>EXPORT_TO_PARAVIS</source>
- <translation>Export (to PARAVIS)</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="68"/>
+ <source>EXPORT_TO_PARAVIS</source>
+ <translation>Export (to PARAVIS)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="69"/>
- <source>SAVE_AS_MED</source>
- <translation>Save (as MED file)</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="69"/>
+ <source>SAVE_AS_MED</source>
+ <translation>Save (as MED file)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="70"/>
- <source>REMOVE_FROM_WORKSPACE</source>
- <translation>Remove (from workspace)</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="70"/>
+ <source>REMOVE_FROM_WORKSPACE</source>
+ <translation>Remove (from workspace)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="91"/>
- <source>LAB_SAVE_WORKSPACE</source>
- <translation>Save workspace</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="91"/>
+ <source>LAB_SAVE_WORKSPACE</source>
+ <translation>Save workspace</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="92"/>
- <source>TIP_SAVE_WORKSPACE</source>
- <translation>Save the workspace (fields and meshes) in a MED file</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="92"/>
+ <source>TIP_SAVE_WORKSPACE</source>
+ <translation>Save the workspace (fields and meshes) in a MED file</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="97"/>
- <source>LAB_CLEAN_WORKSPACE</source>
- <translation>Clean workspace</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="97"/>
+ <source>LAB_CLEAN_WORKSPACE</source>
+ <translation>Clean workspace</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="98"/>
- <source>TIP_CLEAN_WORKSPACE</source>
- <translation>Clean all data in the workspace</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="98"/>
+ <source>TIP_CLEAN_WORKSPACE</source>
+ <translation>Clean all data in the workspace</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="271"/>
- <source>SAVE_SELECTED_FIELDS</source>
- <translation>Save selected fields</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="271"/>
+ <source>SAVE_SELECTED_FIELDS</source>
+ <translation>Save selected fields</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="425"/>
- <source>SAVE_WORKSPACE_DATA</source>
- <translation>Save workspace data</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="425"/>
+ <source>SAVE_WORKSPACE_DATA</source>
+ <translation>Save workspace data</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="439"/>
- <source>NOT_IMPLEMENTED_YET</source>
- <translation>Not implemented yet</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="439"/>
+ <source>NOT_IMPLEMENTED_YET</source>
+ <translation>Not implemented yet</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="440"/>
- <source>FUNCTION_NOT_IMPLEMENTED</source>
- <translation>This function is not implemented yet</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="440"/>
+ <source>FUNCTION_NOT_IMPLEMENTED</source>
+ <translation>This function is not implemented yet</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>@default</name>
<message>
- <location filename="MEDCALC/gui/MEDModule.cxx" line="151"/>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="152"/>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="75"/>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="267"/>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="420"/>
- <source>FILE_FILTER_MED</source>
- <translation>MED files (*.med)</translation>
- </message>
- <message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="57"/>
- <source>FILE_FILTER_PNG</source>
- <translation>PNG image (*.png)</translation>
- </message>
- <message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="58"/>
- <source>FILE_FILTER_JPG</source>
- <translation>JPG image (*.jpg)</translation>
+ <location filename="MEDCALC/gui/MEDModule.cxx" line="151"/>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="152"/>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="75"/>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="267"/>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="420"/>
+ <source>FILE_FILTER_MED</source>
+ <translation>MED files (*.med)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="59"/>
- <source>FILE_FILTER_PGM</source>
- <translation>PGM image (*.jpg)</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="57"/>
+ <source>FILE_FILTER_PNG</source>
+ <translation>PNG image (*.png)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="60"/>
- <source>FILE_FILTER_ALL</source>
- <translation>All files (*.*)</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="58"/>
+ <source>FILE_FILTER_JPG</source>
+ <translation>JPG image (*.jpg)</translation>
</message>
<message>
- <source>LAB_VIEW_MODE</source>
- <translation>View mode:</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="59"/>
+ <source>FILE_FILTER_PGM</source>
+ <translation>PGM image (*.jpg)</translation>
</message>
<message>
- <source>LAB_VIEW_MODE_REPLACE</source>
- <translation>Replace</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="60"/>
+ <source>FILE_FILTER_ALL</source>
+ <translation>All files (*.*)</translation>
</message>
<message>
- <source>LAB_VIEW_MODE_OVERLAP</source>
- <translation>Overlap</translation>
+ <source>LAB_VIEW_MODE</source>
+ <translation>View mode:</translation>
</message>
<message>
- <source>LAB_VIEW_MODE_NEW_LAYOUT</source>
- <translation>New layout</translation>
+ <source>LAB_VIEW_MODE_REPLACE</source>
+ <translation>Replace</translation>
</message>
<message>
- <source>LAB_VIEW_MODE_SPLIT_VIEW</source>
- <translation>Split</translation>
+ <source>LAB_VIEW_MODE_OVERLAP</source>
+ <translation>Overlap</translation>
</message>
<message>
- <source>LAB_BLUE_TO_RED</source>
- <translation>Blue to red rainbow</translation>
+ <source>LAB_VIEW_MODE_NEW_LAYOUT</source>
+ <translation>New layout</translation>
</message>
<message>
- <source>LAB_COOL_TO_WARM</source>
- <translation>Cool to warm</translation>
+ <source>LAB_VIEW_MODE_SPLIT_VIEW</source>
+ <translation>Split</translation>
</message>
- </context>
+</context>
</TS>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0">
- <context>
+<TS version="2.0" language="fr">
+<context>
<name>PresentationController</name>
<message>
- <source>TITLE_PRESENTATION_PARAMETERS</source>
- <translation>Paramètres de presentation</translation>
+ <source>TITLE_PRESENTATION_PARAMETERS</source>
+ <translation>Paramètres de presentation</translation>
</message>
<message>
- <source>LAB_PRESENTATION_SCALAR_MAP</source>
- <translation>Carte scalaire</translation>
+ <source>LAB_PRESENTATION_MESH_VIEW</source>
+ <translation>Maillage</translation>
</message>
<message>
- <source>TIP_PRESENTATION_SCALAR_MAP</source>
- <translation>Carte scalaire</translation>
+ <source>TIP_PRESENTATION_MESH_VIEW</source>
+ <translation>Maillage</translation>
</message>
<message>
- <source>LAB_PRESENTATION_CONTOUR</source>
- <translation>Contour</translation>
+ <source>LAB_PRESENTATION_SCALAR_MAP</source>
+ <translation>Carte scalaire</translation>
</message>
<message>
- <source>TIP_PRESENTATION_CONTOUR</source>
- <translation>Contour</translation>
+ <source>TIP_PRESENTATION_SCALAR_MAP</source>
+ <translation>Carte scalaire</translation>
</message>
<message>
- <source>LAB_PRESENTATION_VECTOR_FIELD</source>
- <translation>Champ de vecteurs</translation>
+ <source>LAB_PRESENTATION_CONTOUR</source>
+ <translation>Contour</translation>
</message>
<message>
- <source>TIP_PRESENTATION_VECTOR_FIELD</source>
- <translation>Champ de vecteurs</translation>
+ <source>TIP_PRESENTATION_CONTOUR</source>
+ <translation>Contour</translation>
</message>
<message>
- <source>LAB_PRESENTATION_SLICES</source>
- <translation>Coupes</translation>
+ <source>LAB_PRESENTATION_VECTOR_FIELD</source>
+ <translation>Champ de vecteurs</translation>
</message>
<message>
- <source>TIP_PRESENTATION_SLICES</source>
- <translation>Coupes</translation>
+ <source>TIP_PRESENTATION_VECTOR_FIELD</source>
+ <translation>Champ de vecteurs</translation>
</message>
<message>
- <source>LAB_PRESENTATION_DEFLECTION_SHAPE</source>
- <translation>Déformée</translation>
+ <source>LAB_PRESENTATION_SLICES</source>
+ <translation>Coupes</translation>
</message>
<message>
- <source>TIP_PRESENTATION_DEFLECTION_SHAPE</source>
- <translation>Déformée</translation>
+ <source>TIP_PRESENTATION_SLICES</source>
+ <translation>Coupes</translation>
</message>
<message>
- <source>LAB_PRESENTATION_POINT_SPRITE</source>
- <translation>Point sprite</translation>
+ <source>LAB_PRESENTATION_DEFLECTION_SHAPE</source>
+ <translation>Déformée</translation>
</message>
<message>
- <source>TIP_PRESENTATION_POINT_SPRITE</source>
- <translation>Point sprite</translation>
+ <source>TIP_PRESENTATION_DEFLECTION_SHAPE</source>
+ <translation>Déformée</translation>
</message>
<message>
- <source>MENU_PRESENTATIONS</source>
- <translation>Présentations</translation>
+ <source>LAB_PRESENTATION_POINT_SPRITE</source>
+ <translation>Point sprite</translation>
</message>
<message>
- <source>MEDPresentationScalarMap</source>
- <translation>Carte scalaire</translation>
+ <source>TIP_PRESENTATION_POINT_SPRITE</source>
+ <translation>Point sprite</translation>
</message>
<message>
- <source>MEDPresentationContour</source>
- <translation>Contour</translation>
+ <source>LAB_DELETE_PRESENTATION</source>
+ <translation>Supprimer</translation>
</message>
<message>
- <source>MEDPresentationVectorField</source>
- <translation>Champ de vecteurs</translation>
+ <source>TIP_DELETE_PRESENTATION</source>
+ <translation>Supprime la présentation sélectionnée</translation>
</message>
<message>
- <source>MEDPresentationSlices</source>
- <translation>Coupes</translation>
+ <source>LAB_PARAVIS_DUMP</source>
+ <translation>Trace du pipeline</translation>
</message>
<message>
- <source>MEDPresentationDeflectionShape</source>
- <translation>Déformée</translation>
+ <source>TIP_PARAVIS_DUMP</source>
+ <translation>Affiche les commandes Python bas niveau de la présentation</translation>
</message>
<message>
- <source>MEDPresentationPointSprite</source>
- <translation>Point sprite</translation>
+ <source>MENU_PRESENTATIONS</source>
+ <translation>Présentations</translation>
</message>
- </context>
- <context>
+ <message>
+ <source>MEDPresentationMeshView</source>
+ <translation>Maillage</translation>
+ </message>
+ <message>
+ <source>MEDPresentationScalarMap</source>
+ <translation>Carte scalaire</translation>
+ </message>
+ <message>
+ <source>MEDPresentationContour</source>
+ <translation>Contour</translation>
+ </message>
+ <message>
+ <source>MEDPresentationVectorField</source>
+ <translation>Champ de vecteurs</translation>
+ </message>
+ <message>
+ <source>MEDPresentationSlices</source>
+ <translation>Coupes</translation>
+ </message>
+ <message>
+ <source>MEDPresentationDeflectionShape</source>
+ <translation>Déformée</translation>
+ </message>
+ <message>
+ <source>MEDPresentationPointSprite</source>
+ <translation>Point sprite</translation>
+ </message>
+</context>
+<context>
<name>ProcessingController</name>
<message>
- <source>MENU_PROCESSING</source>
- <translation>Traitement</translation>
+ <source>MENU_PROCESSING</source>
+ <translation>Traitement</translation>
</message>
<message>
- <source>LAB_PROCESSING_CHANGE_MESH</source>
- <translation>Changer le maillage sous-jacent</translation>
+ <source>LAB_PROCESSING_CHANGE_MESH</source>
+ <translation>Changer le maillage sous-jacent</translation>
</message>
<message>
- <source>LAB_PROCESSING_INTERPOLATE_FIELD</source>
- <translation>Interpoler le champ</translation>
+ <source>LAB_PROCESSING_INTERPOLATE_FIELD</source>
+ <translation>Interpoler le champ</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DatasourceController</name>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="45"/>
- <source>LAB_ADD_DATA_SOURCE</source>
- <translation>Importer des données MED</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="45"/>
+ <source>LAB_ADD_DATA_SOURCE</source>
+ <translation>Importer des données MED</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="46"/>
- <source>TIP_ADD_DATA_SOURCE</source>
- <translation>Ajouter des données par import de fichiers MED</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="46"/>
+ <source>TIP_ADD_DATA_SOURCE</source>
+ <translation>Ajouter des données par import de fichiers MED</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="52"/>
- <source>LAB_ADD_IMAGE_SOURCE</source>
- <translation>Ajouter une image</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="52"/>
+ <source>LAB_ADD_IMAGE_SOURCE</source>
+ <translation>Ajouter une image</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="53"/>
- <source>TIP_ADD_IMAGE_SOURCE</source>
- <translation>Ajouter des données par import d'un fichier image</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="53"/>
+ <source>TIP_ADD_IMAGE_SOURCE</source>
+ <translation>Ajouter des données par import d'un fichier image</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="62"/>
- <source>LAB_EXPAND_FIELD</source>
- <translation>Étendre les series temporelles du champ</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="62"/>
+ <source>LAB_EXPAND_FIELD</source>
+ <translation>Étendre les series temporelles du champ</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="75"/>
- <source>LAB_USE_IN_WORKSPACE</source>
- <translation>Utiliser dans l'espace de travail</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="75"/>
+ <source>LAB_USE_IN_WORKSPACE</source>
+ <translation>Utiliser dans l'espace de travail</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="157"/>
- <source>IMPORT_MED_FIELDS</source>
- <translation>Importer des champs (format MED)</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="157"/>
+ <source>IMPORT_MED_FIELDS</source>
+ <translation>Importer des champs (format MED)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="191"/>
- <source>OPERATION_FAILED</source>
- <translation>L'opération a échoué</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="191"/>
+ <source>OPERATION_FAILED</source>
+ <translation>L'opération a échoué</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="192"/>
- <source>CREATION_FAILED</source>
- <translation>La création des données MED à partir d'un fichier image a échoué</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="192"/>
+ <source>CREATION_FAILED</source>
+ <translation>La création des données MED à partir d'un fichier image a échoué</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="283"/>
- <source>OPERATION_NOT_ALLOWED</source>
- <translation>Opération non autorisée</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="283"/>
+ <source>OPERATION_NOT_ALLOWED</source>
+ <translation>Opération non autorisée</translation>
</message>
<message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="284"/>
- <source>FIELD_ALREADY_DEFINED</source>
- <translation>Ce champ est déjà défini dans l'espace de travail</translation>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="284"/>
+ <source>FIELD_ALREADY_DEFINED</source>
+ <translation>Ce champ est déjà défini dans l'espace de travail</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>WidgetPresentationParameters</name>
<message>
- <source>LAB_DISP_COMP</source>
- <translation>Composante affichée :</translation>
+ <source>LAB_DEFAULT_DYN_TITLE</source>
+ <translation>Paramètres par défaut</translation>
+ </message>
+ <message>
+ <source>LAB_DISP_COMP</source>
+ <translation>Composante affichée :</translation>
+ </message>
+ <message>
+ <source>LAB_EUCLIDEAN_NORM</source>
+ <translation>Norme euclidienne</translation>
</message>
<message>
- <source>LAB_EUCLIDEAN_NORM</source>
- <translation>Norme euclidienne</translation>
+ <source>LAB_SCALARBAR</source>
+ <translation>Echelle de valeurs :</translation>
</message>
<message>
- <source>LAB_SCALARBAR</source>
- <translation>Echelle de valeurs :</translation>
+ <source>LAB_RANGE</source>
+ <translation>Intervalle :</translation>
</message>
<message>
- <source>LAB_RANGE</source>
- <translation>Intervalle :</translation>
+ <source>LAB_ALL_TIMESTEPS</source>
+ <translation>Tous les pas de temps</translation>
</message>
<message>
- <source>LAB_ALL_TIMESTEPS</source>
- <translation>Tous les pas de temps</translation>
+ <source>LAB_CURRENT_TIMESTEP</source>
+ <translation>Pas de temps courant</translation>
</message>
<message>
- <source>LAB_CURRENT_TIMESTEP</source>
- <translation>Pas de temps courant</translation>
+ <source>LAB_USER_RANGE</source>
+ <translation>Personnalisé :</translation>
</message>
<message>
- <source>LAB_USER_RANGE</source>
- <translation>Personnalisé :</translation>
+ <source>LAB_TIMESTEP</source>
+ <translation>Pas de temps :</translation>
</message>
<message>
- <source>LAB_TIMESTEP</source>
- <translation>Pas de temps :</translation>
+ <source>LAB_MIN_VALUE</source>
+ <translation>Valeur min :</translation>
</message>
<message>
- <source>LAB_MIN_VALUE</source>
- <translation>Valeur min :</translation>
+ <source>LAB_MAX_VALUE</source>
+ <translation>Valeur max :</translation>
</message>
<message>
- <source>LAB_MAX_VALUE</source>
- <translation>Valeur max :</translation>
+ <source>LAB_COLOR_MAP</source>
+ <translation>Table de couleurs :</translation>
</message>
<message>
- <source>LAB_COLOR_MAP</source>
- <translation>Table de couleurs :</translation>
+ <source>LAB_MESH_WIREFRAME</source>
+ <translation>Fil de fer</translation>
</message>
<message>
- <source>LAB_BLUE_TO_RED</source>
- <translation>Arc-en-ciel bleu vers rouge</translation>
+ <source>LAB_MESH_SURFACE</source>
+ <translation>Surface</translation>
+ </message>
+ <message>
+ <source>LAB_MESH_SURF_EDGES</source>
+ <translation>Surface Avec Arrêtes</translation>
+ </message>
+ <message>
+ <source>LAB_DISP_MESH_MODE</source>
+ <translation>Affichage du maillage:</translation>
+ </message>
+ <message>
+ <source>LAB_NB_CONTOURS</source>
+ <translation>Nombre de contours (max. %1) :</translation>
+ </message>
+ <message>
+ <source>LAB_NB_SLICES</source>
+ <translation>Nombres de coupes (max. %1) :</translation>
+ </message>
+ <message>
+ <source>LAB_SPINBOX_TOOLTIP</source>
+ <translation>Taper 'Entrée' pour appliquer</translation>
+ </message>
+ <message>
+ <source>LAB_SLICE_ORIENT</source>
+ <translation>Orientation des coupes:</translation>
+ </message>
+ <message>
+ <source>LAB_SLICE_NORMAL_TO_X</source>
+ <translation>Normale à X</translation>
+ </message>
+ <message>
+ <source>LAB_SLICE_NORMAL_TO_Y</source>
+ <translation>Normale à Y</translation>
+ </message>
+ <message>
+ <source>LAB_SLICE_NORMAL_TO_Z</source>
+ <translation>Normale à Z</translation>
+ </message>
+ <message>
+ <source>LAB_SLICE_NORMAL_TO_XY</source>
+ <translation>Normale à XY</translation>
+ </message>
+ <message>
+ <source>LAB_SLICE_NORMAL_TO_XZ</source>
+ <translation>Normale à XZ</translation>
+ </message>
+ <message>
+ <source>LAB_SLICE_NORMAL_TO_YZ</source>
+ <translation>Normale à YZ</translation>
+ </message>
+ <message>
+ <source>LAB_SLICE_NORMAL_TO_XYZ</source>
+ <translation>Normale à XYZ</translation>
+ </message>
+ <message>
+ <source>LAB_BLUE_TO_RED</source>
+ <translation>Arc-en-ciel bleu vers rouge</translation>
</message>
<message>
- <source>LAB_COOL_TO_WARM</source>
- <translation>Froid vers chaud</translation>
+ <source>LAB_COOL_TO_WARM</source>
+ <translation>Froid vers chaud</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DlgAlias</name>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="14"/>
- <source>SELECT_AN_ALIAS_FOR_THE_FIELD</source>
- <translation>Selectionner un alias pour ce champ</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="14"/>
+ <source>SELECT_AN_ALIAS_FOR_THE_FIELD</source>
+ <translation>Selectionner un alias pour ce champ</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="401"/>
- <source>DEFINE_AN_ALIAS</source>
- <translation>Vous pouvez définir un alias pour manipuler le champs dans la console:</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="401"/>
+ <source>DEFINE_AN_ALIAS</source>
+ <translation>Vous pouvez définir un alias pour manipuler le champs dans la console:</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="419"/>
- <source>ALIAS</source>
- <translation>Alias</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="419"/>
+ <source>ALIAS</source>
+ <translation>Alias</translation>
</message>
<message utf8="true">
- <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="436"/>
- <source>MSG_OPERATION_DEFINES_VARIABLE</source>
- <translation>(cette opération définit une variable nommée <alias> dans la console texte. Tapez "<alias>.help()" pour voir les fonctions disponibles, ou simplement "doc")</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgAlias.ui" line="436"/>
+ <source>MSG_OPERATION_DEFINES_VARIABLE</source>
+ <translation>(cette opération définit une variable nommée <alias> dans la console texte. Tapez "<alias>.help()" pour voir les fonctions disponibles, ou simplement "doc")</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DlgChangeUnderlyingMesh</name>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="14"/>
- <source>FORM</source>
- <translation>Formulaire</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="14"/>
+ <source>FORM</source>
+ <translation>Formulaire</translation>
</message>
<message utf8="true">
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="403"/>
- <source>MESH_GT</source>
- <translation>Maillage -></translation>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="403"/>
+ <source>MESH_GT</source>
+ <translation>Maillage -></translation>
</message>
<message utf8="true">
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="420"/>
- <source>MSG_EXPLORER</source>
- <translation>(L'explorateur fournit une vue des données MED (maillage et champs) référencées dans l'espace des données)</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="420"/>
+ <source>MSG_EXPLORER</source>
+ <translation>(L'explorateur fournit une vue des données MED (maillage et champs) référencées dans l'espace des données)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="35"/>
- <source>DATA_VERIFICATION</source>
- <translation>Vérification des données</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="35"/>
+ <source>DATA_VERIFICATION</source>
+ <translation>Vérification des données</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="36"/>
- <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="391"/>
- <source>SELECT_MESH</source>
- <translation>Vous devez sélectionner un maillage dans l'explorateur et cliquer sur le bouton Maillage</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="36"/>
+ <location filename="MEDCALC/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="391"/>
+ <source>SELECT_MESH</source>
+ <translation>Vous devez sélectionner un maillage dans l'explorateur et cliquer sur le bouton Maillage</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DlgInterpolateField</name>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="391"/>
- <source>SELECT_MESH</source>
- <translation>Vous devez sélectionner un maillage dans l'explorateur et cliquer sur le bouton Maillage</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="391"/>
+ <source>SELECT_MESH</source>
+ <translation>Vous devez sélectionner un maillage dans l'explorateur et cliquer sur le bouton Maillage</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="406"/>
- <source>TARGET_MESH_GT</source>
- <translation>Maillage cible -></translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="406"/>
+ <source>TARGET_MESH_GT</source>
+ <translation>Maillage cible -></translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="423"/>
- <source>MSG_EXPLORER</source>
- <translation>(L'explorateur fournit une vue des données MED (maillage et champs) référencées dans l'espace des données)</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="423"/>
+ <source>MSG_EXPLORER</source>
+ <translation>(L'explorateur fournit une vue des données MED (maillage et champs) référencées dans l'espace des données)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="450"/>
- <source>LABEL_PRECISION</source>
- <translation>Précision de l'interpolateur</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="450"/>
+ <source>LABEL_PRECISION</source>
+ <translation>Précision de l'interpolateur</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="493"/>
- <source>LABEL_INTERSECTION_TYPE</source>
- <translation>Type d'intersection</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="493"/>
+ <source>LABEL_INTERSECTION_TYPE</source>
+ <translation>Type d'intersection</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="520"/>
- <source>LABEL_METHOD</source>
- <translation>Méthode d'interpolation</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="520"/>
+ <source>LABEL_METHOD</source>
+ <translation>Méthode d'interpolation</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="547"/>
- <source>LABEL_DEFAULT_VALUE</source>
- <translation>Valeur par défaut du champ résultant</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="547"/>
+ <source>LABEL_DEFAULT_VALUE</source>
+ <translation>Valeur par défaut du champ résultant</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="581"/>
- <source>LABEL_REVERSE</source>
- <translation>Interpolation inverse ?</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="581"/>
+ <source>LABEL_REVERSE</source>
+ <translation>Interpolation inverse ?</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="612"/>
- <source>LABEL_NATURE</source>
- <translation>Nature du champ</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgInterpolateField.ui" line="612"/>
+ <source>LABEL_NATURE</source>
+ <translation>Nature du champ</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DlgImageToMed</name>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="14"/>
- <source>FORM</source>
- <translation>Formulaire</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="14"/>
+ <source>FORM</source>
+ <translation>Formulaire</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="28"/>
- <source>IMAGE_FILE</source>
- <translation>Fichier image :</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="28"/>
+ <source>IMAGE_FILE</source>
+ <translation>Fichier image :</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="35"/>
- <source>MED_FILE</source>
- <translation>Fichier MED :</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="35"/>
+ <source>MED_FILE</source>
+ <translation>Fichier MED :</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="64"/>
- <source>SELECT_IMAGE_FILE</source>
- <translation>Selectionner un fichier image</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="64"/>
+ <source>SELECT_IMAGE_FILE</source>
+ <translation>Selectionner un fichier image</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="79"/>
- <source>SPECIFY_MED_FILE</source>
- <translation>Spécifier un fichier MED</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="79"/>
+ <source>SPECIFY_MED_FILE</source>
+ <translation>Spécifier un fichier MED</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="82"/>
- <source>LOAD_AUTOMATICALLY</source>
- <translation>Charger automatiquement</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.ui" line="82"/>
+ <source>LOAD_AUTOMATICALLY</source>
+ <translation>Charger automatiquement</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>DlgUseInWorkspace</name>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="13"/>
- <source>FORM</source>
- <translation>Formulaire</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="13"/>
+ <source>FORM</source>
+ <translation>Formulaire</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="49"/>
- <source>PRESSURE</source>
- <translation>Pression :</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="49"/>
+ <source>PRESSURE</source>
+ <translation>Pression :</translation>
</message>
<message utf8="true">
- <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="56"/>
- <source>TEMPERATURE</source>
- <translation>Température :</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgUseInWorkspace.ui" line="56"/>
+ <source>TEMPERATURE</source>
+ <translation>Température :</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>GenericDialog</name>
<message>
- <location filename="MEDCALC/gui/dialogs/GenericDialog.ui" line="13"/>
- <source>DIALOG</source>
- <translation>Dialogue</translation>
+ <location filename="MEDCALC/gui/dialogs/GenericDialog.ui" line="13"/>
+ <source>DIALOG</source>
+ <translation>Dialogue</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>MEDModule</name>
<message>
- <location filename="MEDCALC/gui/MEDModule.cxx" line="68"/>
- <location filename="MEDCALC/gui/MEDModule.cxx" line="157"/>
- <source>IMPORT_FROM_FILE</source>
- <translation>Importer depuis un fichier</translation>
+ <location filename="MEDCALC/gui/MEDModule.cxx" line="68"/>
+ <location filename="MEDCALC/gui/MEDModule.cxx" line="157"/>
+ <source>IMPORT_FROM_FILE</source>
+ <translation>Importer depuis un fichier</translation>
</message>
<message>
- <location filename="MEDCALC/gui/MEDModule.cxx" line="69"/>
- <source>IMPORT_MED_FILE</source>
- <translation>Importer un fichier MED</translation>
+ <location filename="MEDCALC/gui/MEDModule.cxx" line="69"/>
+ <source>IMPORT_MED_FILE</source>
+ <translation>Importer un fichier MED</translation>
</message>
<message>
- <location filename="MEDCALC/gui/MEDModule.cxx" line="72"/>
- <source>MEN_FILE</source>
- <translation>&Fichier</translation>
+ <location filename="MEDCALC/gui/MEDModule.cxx" line="72"/>
+ <source>MEN_FILE</source>
+ <translation>&Fichier</translation>
</message>
<message>
- <source>PREF_TAB_GENERAL</source>
- <translation>Général</translation>
+ <source>PREF_TAB_GENERAL</source>
+ <translation>Général</translation>
</message>
<message>
- <source>PREF_THEME_GROUP</source>
- <translation>Thème</translation>
+ <source>PREF_THEME_GROUP</source>
+ <translation>Thème</translation>
</message>
<message>
- <source>PREF_ICONS</source>
- <translation>Icones</translation>
+ <source>PREF_ICONS</source>
+ <translation>Icones</translation>
</message>
<message>
- <source>PREF_ICON_THEME_MODERN</source>
- <translation>Moderne</translation>
+ <source>PREF_ICON_THEME_MODERN</source>
+ <translation>Moderne</translation>
</message>
<message>
- <source>PREF_ICON_THEME_CLASSIC</source>
- <translation>Classique</translation>
+ <source>PREF_ICON_THEME_CLASSIC</source>
+ <translation>Classique</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>WorkspaceController</name>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="66"/>
- <source>VISUALIZE_SCALAR_MAP</source>
- <translation>Visualiser (carte scalaire)</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="66"/>
+ <source>VISUALIZE_SCALAR_MAP</source>
+ <translation>Visualiser (carte scalaire)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="67"/>
- <source>USE_IN_CONSOLE</source>
- <translation>Utiliser (dans la console)</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="67"/>
+ <source>USE_IN_CONSOLE</source>
+ <translation>Utiliser (dans la console)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="68"/>
- <source>EXPORT_TO_PARAVIS</source>
- <translation>Exporter (vers PARAVIS)</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="68"/>
+ <source>EXPORT_TO_PARAVIS</source>
+ <translation>Exporter (vers PARAVIS)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="69"/>
- <source>SAVE_AS_MED</source>
- <translation>Sauvegarder (dans un fichier MED)</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="69"/>
+ <source>SAVE_AS_MED</source>
+ <translation>Sauvegarder (dans un fichier MED)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="70"/>
- <source>REMOVE_FROM_WORKSPACE</source>
- <translation>Supprimer (de l'espace de travail)</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="70"/>
+ <source>REMOVE_FROM_WORKSPACE</source>
+ <translation>Supprimer (de l'espace de travail)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="91"/>
- <source>LAB_SAVE_WORKSPACE</source>
- <translation>Sauvegarder l'espace de travail</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="91"/>
+ <source>LAB_SAVE_WORKSPACE</source>
+ <translation>Sauvegarder l'espace de travail</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="92"/>
- <source>TIP_SAVE_WORKSPACE</source>
- <translation>Sauvegarder l'espace de travail (champs et maillages) dans un fichier MED</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="92"/>
+ <source>TIP_SAVE_WORKSPACE</source>
+ <translation>Sauvegarder l'espace de travail (champs et maillages) dans un fichier MED</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="97"/>
- <source>LAB_CLEAN_WORKSPACE</source>
- <translation>Nettoyer l'espace de travail</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="97"/>
+ <source>LAB_CLEAN_WORKSPACE</source>
+ <translation>Nettoyer l'espace de travail</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="98"/>
- <source>TIP_CLEAN_WORKSPACE</source>
- <translation>Effacer toute les données de l'espace de travail</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="98"/>
+ <source>TIP_CLEAN_WORKSPACE</source>
+ <translation>Effacer toute les données de l'espace de travail</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="271"/>
- <source>SAVE_SELECTED_FIELDS</source>
- <translation>Sauvegarder les champs sélectionnés</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="271"/>
+ <source>SAVE_SELECTED_FIELDS</source>
+ <translation>Sauvegarder les champs sélectionnés</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="425"/>
- <source>SAVE_WORKSPACE_DATA</source>
- <translation>Sauvegarder les données de l'espace de travail</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="425"/>
+ <source>SAVE_WORKSPACE_DATA</source>
+ <translation>Sauvegarder les données de l'espace de travail</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="439"/>
- <source>NOT_IMPLEMENTED_YET</source>
- <translation>Non implémenté</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="439"/>
+ <source>NOT_IMPLEMENTED_YET</source>
+ <translation>Non implémenté</translation>
</message>
<message>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="440"/>
- <source>FUNCTION_NOT_IMPLEMENTED</source>
- <translation>Cette function n'est pas encore implémentée</translation>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="440"/>
+ <source>FUNCTION_NOT_IMPLEMENTED</source>
+ <translation>Cette function n'est pas encore implémentée</translation>
</message>
- </context>
- <context>
+</context>
+<context>
<name>@default</name>
<message>
- <location filename="MEDCALC/gui/MEDModule.cxx" line="151"/>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="152"/>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="75"/>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="267"/>
- <location filename="MEDCALC/gui/WorkspaceController.cxx" line="420"/>
- <source>FILE_FILTER_MED</source>
- <translation>Fichiers MED (*.med)</translation>
+ <location filename="MEDCALC/gui/MEDModule.cxx" line="151"/>
+ <location filename="MEDCALC/gui/DatasourceController.cxx" line="152"/>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="75"/>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="267"/>
+ <location filename="MEDCALC/gui/WorkspaceController.cxx" line="420"/>
+ <source>FILE_FILTER_MED</source>
+ <translation>Fichiers MED (*.med)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="57"/>
- <source>FILE_FILTER_PNG</source>
- <translation>Image PNG (*.png)</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="57"/>
+ <source>FILE_FILTER_PNG</source>
+ <translation>Image PNG (*.png)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="58"/>
- <source>FILE_FILTER_JPG</source>
- <translation>Image JPG (*.jpg)</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="58"/>
+ <source>FILE_FILTER_JPG</source>
+ <translation>Image JPG (*.jpg)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="59"/>
- <source>FILE_FILTER_PGM</source>
- <translation>Image PGM (*.jpg)</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="59"/>
+ <source>FILE_FILTER_PGM</source>
+ <translation>Image PGM (*.jpg)</translation>
</message>
<message>
- <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="60"/>
- <source>FILE_FILTER_ALL</source>
- <translation>Tous les fichiers (*.*)</translation>
+ <location filename="MEDCALC/gui/dialogs/DlgImageToMed.cxx" line="60"/>
+ <source>FILE_FILTER_ALL</source>
+ <translation>Tous les fichiers (*.*)</translation>
</message>
<message>
- <source>LAB_VIEW_MODE</source>
- <translation>Mode de rendu :</translation>
+ <source>LAB_VIEW_MODE</source>
+ <translation>Mode de rendu :</translation>
</message>
<message>
- <source>LAB_VIEW_MODE_REPLACE</source>
- <translation>Remplacer</translation>
+ <source>LAB_VIEW_MODE_REPLACE</source>
+ <translation>Remplacer</translation>
</message>
<message>
- <source>LAB_VIEW_MODE_OVERLAP</source>
- <translation>Superposer</translation>
+ <source>LAB_VIEW_MODE_OVERLAP</source>
+ <translation>Superposer</translation>
</message>
<message>
- <source>LAB_VIEW_MODE_NEW_LAYOUT</source>
- <translation>Nouvel onglet</translation>
+ <source>LAB_VIEW_MODE_NEW_LAYOUT</source>
+ <translation>Nouvel onglet</translation>
</message>
<message>
- <source>LAB_VIEW_MODE_SPLIT_VIEW</source>
- <translation>Scinder</translation>
+ <source>LAB_VIEW_MODE_SPLIT_VIEW</source>
+ <translation>Scinder</translation>
</message>
- </context>
+</context>
</TS>
#include <SalomeApp_Study.h>
#include <SalomeApp_DataObject.h>
+#include <SALOME_ListIO.hxx>
+#include <LightApp_SelectionMgr.h>
+
#include <SALOMEDS_SObject.hxx>
#include <SALOMEDS_Study.hxx>
delete((*it).second);
}
-/**
- * [ABN] Created this probably because I don't know the right way to deal with non existent
- * attributes in an object from the study ...
- */
int
PresentationController::getIntParamFromStudyEditor(SALOMEDS::SObject_var obj, const char * name)
{
- int theInt = -1;
- try {
- theInt = _studyEditor->getParameterInt(obj,name);
+ if (obj->_is_nil())
+ return -1;
+
+ SALOMEDS::GenericAttribute_var anAttr;
+ SALOMEDS::AttributeParameter_var aParam;
+ if ( obj->FindAttribute(anAttr,"AttributeParameter") ) {
+ aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
+ if (aParam->IsSet(name, PT_INTEGER))
+ return aParam->GetInt(name);
}
- catch(...) { }
- return theInt;
+ return -1;
}
std::string
// Presentations
int presentationToolbarId = _salomeModule->createTool("Presentations", "PresentationToolbar");
- int presentationMenuId = _salomeModule->createMenu(tr("MENU_PRESENTATIONS"), -1, 1);
+ int presentationMenuId = _salomeModule->createMenu(tr("MENU_PRESENTATIONS"), -1, -1, 10);
label = tr("LAB_PRESENTATION_MESH_VIEW");
tooltip = tr("TIP_PRESENTATION_MESH_VIEW");
// visualisation using the tui command (so that the user can see how
// to make a view of an object from the tui console).
for (int i=0; i<listOfSObject->size(); i++) {
- SALOMEDS::SObject_var soField = listOfSObject->at(i);
- int fieldId = getIntParamFromStudyEditor(soField, FIELD_ID);
- if (fieldId < 0) // is it a field serie ?
+ SALOMEDS::SObject_var soObj = listOfSObject->at(i);
+ std::string name(_studyEditor->getName(soObj));
+ if (soObj->_is_nil() || name == "MEDCalc")
+ return;
+
+ int fieldId = getIntParamFromStudyEditor(soObj, FIELD_ID);
+ int meshId = getIntParamFromStudyEditor(soObj, MESH_ID);
+ MEDCALC::FieldHandler* fieldHandler = 0;
+ MEDCALC::MeshHandler* meshHandler = 0;
+
+ // is it a mesh?
+ if (meshId >= 0)
{
- int fieldSeriesId = getIntParamFromStudyEditor(soField, FIELD_SERIES_ID);
- // If fieldId and fieldSeriesId equals -1, then it means that it is not a field
- // managed by the MED module, and we stop this function process.
- if ( fieldSeriesId < 0)
+ if (eventType != PresentationEvent::EVENT_VIEW_OBJECT_MESH_VIEW)
continue;
- MEDCALC::FieldHandlerList* fieldHandlerList = MEDFactoryClient::getDataManager()->getFieldListInFieldseries(fieldSeriesId);
- if (fieldHandlerList->length() < 0)
- continue;
- // For a field series, get the first real field entry:
- MEDCALC::FieldHandler fieldHandler = (*fieldHandlerList)[0];
- fieldId = fieldHandler.id;
+ meshHandler = MEDFactoryClient::getDataManager()->getMeshHandler(meshId);
+ }
+ else
+ {
+ if (fieldId < 0) // is it a field serie ?
+ {
+ int fieldSeriesId = getIntParamFromStudyEditor(soObj, FIELD_SERIES_ID);
+ // If fieldId and fieldSeriesId equals -1, then it means that it is not a field
+ // managed by the MED module, and we stop this function process.
+ if ( fieldSeriesId < 0)
+ continue;
+
+ MEDCALC::FieldHandlerList* fieldHandlerList = MEDFactoryClient::getDataManager()->getFieldListInFieldseries(fieldSeriesId);
+ if (fieldHandlerList->length() < 0)
+ continue;
+ // For a field series, get the first real field entry:
+ MEDCALC::FieldHandler fieldHandler = (*fieldHandlerList)[0];
+ fieldId = fieldHandler.id;
+ }
+ fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
}
- MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
- if (! fieldHandler) {
+ if ((!fieldHandler) && (!meshHandler)) {
QMessageBox::warning(_salomeModule->getApp()->desktop(),
tr("Operation not allowed"),
- tr("No field is defined"));
+ tr("No field (or mesh) is defined"));
return;
}
PresentationEvent* event = new PresentationEvent();
event->eventtype = eventType;
event->fieldHandler = fieldHandler;
+ event->meshHandler = meshHandler;
emit presentationSignal(event); // --> processPresentationEvent()
}
}
// For each object, emit a signal to the workspace to request pres deletion
for (int i=0; i<listOfSObject->size(); i++) {
SALOMEDS::SObject_var soPres = listOfSObject->at(i);
+ std::string name(_studyEditor->getName(soPres));
+ if (soPres->_is_nil() || name == "MEDCalc")
+ return;
int presId = getIntParamFromStudyEditor(soPres,PRESENTATION_ID);
// If fieldId equals -1, then it means that it is not a field
// managed by the MED module, and we stop this function process.
// dedicated widget helper class?
if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_MESH_VIEW ) {
- commands += QString("presentation_id = medcalc.MakeMeshView(accessField(%1), viewMode=%2)").arg(fieldHandler->id).arg(viewMode);
- commands += QString("presentation_id");
+ // Do we request mesh view from a field or from a mesh only?
+ int meshId = event->meshHandler ? event->meshHandler->id : event->fieldHandler->meshid;
+ commands += QString("presentation_id = medcalc.MakeMeshView(%1, viewMode=%2)").arg(meshId).arg(viewMode);
+ commands += QString("presentation_id");
}
else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_SCALAR_MAP ) {
commands += QString("presentation_id = medcalc.MakeScalarMap(accessField(%1), viewMode=%2, scalarBarRange=%3, colorMap=%4)")
{
const char * msg ="findOrCreateWidgetHelper(): NOT IMPLEMENTED !!!";
STDLOG(msg);
+ return wh;
}
_presHelperMap[presId] = wh;
return wh;
}
else
{
+ if(_currentWidgetHelper)
+ _currentWidgetHelper->releaseWidget();
// Activate corresponding ParaView render view
_presManager->activateView(presId);
// Update widgets parameters
// For the first object only, request the dump
for (int i=0; i<listOfSObject->size(); i++) {
SALOMEDS::SObject_var soPres = listOfSObject->at(i);
+ std::string name(_studyEditor->getName(soPres));
+ if (soPres->_is_nil() || name == "MEDCalc")
+ return;
int presId = getIntParamFromStudyEditor(soPres,PRESENTATION_ID);
// If fieldId equals -1, then it means that it is not a field
// managed by the MED module, and we stop this function process.
}
void
-PresentationController::updateTreeViewWithNewPresentation(long fieldId, long presentationId)
+PresentationController::updateTreeViewWithNewPresentation(long dataId, long presentationId)
{
if (presentationId < 0) {
std::cerr << "Unknown presentation\n";
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(_salomeModule->application()->activeStudy());
_PTR(Study) studyDS = study->studyDS();
- _salomeModule->engine()->registerPresentation(_CAST(Study, studyDS)->GetStudy(), fieldId,
- oss.str().c_str(), type.c_str(),ico.c_str(), presentationId);
-
-
- // MEDCALC::ViewModeType viewMode = MEDFactoryClient::getPresentationManager()->getPresentationViewMode(presentationId);
- //
- // // Remove sibling presentations if view mode is set to REPLACE
- // if (viewMode == MEDCALC::VIEW_MODE_REPLACE) {
- // MED_ORB::PresentationsList* presList = _salomeModule->engine()->getSiblingPresentations(_CAST(Study, studyDS)->GetStudy(), presentationId);
- // CORBA::ULong size = presList->length();
- //
- // std::stringstream sstm;
- // sstm << "Removing sibling presentation(s): ";
- // for (int i = 0; i < size; ++i)
- // sstm << (*presList)[i] << " ";
- // STDLOG(sstm.str());
- //
- // for (int i = 0; i < size; ++i) {
- // PresentationEvent* event = new PresentationEvent();
- // event->eventtype = PresentationEvent::EVENT_DELETE_PRESENTATION;
- // XmedDataObject* dataObject = new XmedDataObject();
- // dataObject->setPresentationId((*presList)[i]);
- // event->objectdata = dataObject;
- // emit presentationSignal(event); // --> WorkspaceController::processPresentationEvent
- // }
- //
- // delete presList;
- // }
+ // Mesh views are always registered at the mesh level:
+ if (type == MEDPresentationMeshView::TYPE_NAME)
+ {
+ _salomeModule->engine()->registerPresentationMesh(_CAST(Study, studyDS)->GetStudy(), dataId,
+ oss.str().c_str(), type.c_str(),ico.c_str(), presentationId);
+ }
+ else
+ _salomeModule->engine()->registerPresentationField(_CAST(Study, studyDS)->GetStudy(), dataId,
+ oss.str().c_str(), type.c_str(),ico.c_str(), presentationId);
// update Object browser
_salomeModule->getApp()->updateObjectBrowser(true);
+
+ // auto-select new presentation
+ std::string entry = _salomeModule->engine()->getStudyPresentationEntry(_CAST(Study, studyDS)->GetStudy(), presentationId);
+ SALOME_ListIO selectedObjects;
+ LightApp_Study* lightStudy = dynamic_cast<LightApp_Study*>( _salomeModule->application()->activeStudy() );
+ QString component = lightStudy->componentDataType( entry.c_str() );
+ selectedObjects.Append( new SALOME_InteractiveObject( (const char*)entry.c_str(),
+ (const char*)component.toLatin1(),
+ ""/*refobj->Name().c_str()*/ ) );
+ //QStringList selectedObjects;
+ //selectedObjects << QString(entry.c_str());
+ LightApp_SelectionMgr* aSelectionMgr = _salomeModule->getApp()->selectionMgr();
+ aSelectionMgr->setSelectedObjects(selectedObjects, false);
+
+ // emit onPresentationSelected
+ int presId = -1;
+ _salomeModule->itemClickGeneric(name, type, presId);
+ onPresentationSelected(presId, QString::fromStdString(type), QString::fromStdString(name));
}
void
_salomeModule->getApp()->updateObjectBrowser(true);
}
+void
+PresentationController::_dealWithReplaceMode()
+{
+ // Deal with replace mode: presentations with invalid IDs have to be removed:
+ SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(_salomeModule->application()->activeStudy());
+ _PTR(Study) studyDS = study->studyDS();
+
+ MEDCALC::PresentationsList * lstManager = _presManager->getAllPresentations();
+ MED_ORB::PresentationsList * lstModule = _salomeModule->engine()->getStudyPresentations(_CAST(Study, studyDS)->GetStudy());
+ // The IDs not in the intersection needs deletion:
+ CORBA::Long * last = lstManager->get_buffer() + lstManager->length();
+ for (unsigned i = 0; i < lstModule->length(); i++) {
+ CORBA::Long * ptr = std::find(lstManager->get_buffer(), last, (*lstModule)[i]);
+ if (ptr == last) {
+ STDLOG("Removing pres " << (*lstModule)[i] << " from OB.");
+ // Presentation in module but not in manager anymore: to be deleted from OB:
+ updateTreeViewForPresentationRemoval((*lstModule)[i]);
+ }
+ }
+}
+
void
PresentationController::processWorkspaceEvent(const MEDCALC::MedEvent* event)
{
if ( event->type == MEDCALC::EVENT_ADD_PRESENTATION ) {
- updateTreeViewWithNewPresentation(event->dataId, event->presentationId);
- // Deal with replace mode: presentations with invalid IDs have to be removed:
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(_salomeModule->application()->activeStudy());
- _PTR(Study) studyDS = study->studyDS();
-
- MEDCALC::PresentationsList * lstManager = _presManager->getAllPresentations();
- MED_ORB::PresentationsList * lstModule = _salomeModule->engine()->getStudyPresentations(_CAST(Study, studyDS)->GetStudy());
- // The IDs not in the intersection needs deletion:
- CORBA::Long * last = lstManager->get_buffer() + lstManager->length();
- for (unsigned i = 0; i < lstModule->length(); i++)
- {
- CORBA::Long * ptr = std::find(lstManager->get_buffer(), last, (*lstModule)[i]);
- if (ptr == last)
- {
- STDLOG("Removing pres " << (*lstModule)[i] << " from OB.");
- // Presentation in module but not in manager anymore: to be deleted from OB:
- updateTreeViewForPresentationRemoval((*lstModule)[i]);
- onPresentationSelected(-1, "", ""); // make sure param widget is hidden
- }
- }
+ if (event->dataId == -1) {
+ // A file has been loaded, and we want to create a default presentation (MeshView) for it
+ QString viewMode = getViewModePython();
+ QStringList commands;
+ commands += QString("presentation_id = medcalc.MakeMeshView(medcalc.GetFirstMeshFromDataSource(source_id), viewMode=%1)").arg(viewMode);
+ commands += QString("presentation_id");
+ _consoleDriver->exec(commands);
+ }
+ else {
+ updateTreeViewWithNewPresentation(event->dataId, event->presentationId);
+ _dealWithReplaceMode();
+ }
}
else if ( event->type == MEDCALC::EVENT_REMOVE_PRESENTATION ) {
updateTreeViewForPresentationRemoval(event->presentationId);
{
_dockWidget->setVisible(isVisible);
}
-
void onPresentationSelected(int presId, const QString& presType, const QString& presName);
void processWorkspaceEvent(const MEDCALC::MedEvent*);
- void processPresentationEvent(const PresentationEvent* event);
+ void processPresentationEvent(const PresentationEvent*);
private:
void visualize(PresentationEvent::EventType);
- void updateTreeViewWithNewPresentation(long, long);
- void updateTreeViewForPresentationRemoval(long);
+ void updateTreeViewWithNewPresentation(long dataId, long presentationId);
+ void updateTreeViewForPresentationRemoval(long presId);
std::string _getIconName(const std::string&);
MEDWidgetHelper * findOrCreateWidgetHelper(MEDCALC::MEDPresentationManager_ptr presManager,
int presId, const std::string& type, const std::string& name);
QString getMeshModePython(const int mode) const;
QString getSliceOrientationPython(const int orient) const;
+ void _dealWithReplaceMode();
+
private:
MEDModule* _salomeModule;
XmedConsoleDriver* _consoleDriver; // the same as in WorkspaceController
EventType eventtype;
MEDCALC::FieldHandler * fieldHandler;
+ MEDCALC::MeshHandler * meshHandler;
int presentationId;
int anInteger; // multi-purpose variable
//int anInteger2; // multi-purpose variable
#include "ProcessingController.hxx"
#include <MEDCalcConstants.hxx>
+#include <SALOMEDS_SObject.hxx>
+#include <SALOMEDS_Study.hxx>
+#include CORBA_CLIENT_HEADER(SALOMEDS)
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+
#include "MEDFactoryClient.hxx"
#include "MEDModule.hxx"
#include "Basics_Utils.hxx"
STDLOG("Creating ProcessingController actions");
int processingToolbarId = _salomeModule->createTool("Processing", "ProcessingToolbar");
- int processingMenuId = _salomeModule->createMenu(tr("MENU_PROCESSING"), -1, 1);
+ int processingMenuId = _salomeModule->createMenu(tr("MENU_PROCESSING"), -1, -1, 12);
// Change underlying mesh (note that this action creates a new field in
// the workspace that corresponds to a copy of the selected field
SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
if ( listOfSObject->size() > 0 ) {
SALOMEDS::SObject_var soField = listOfSObject->at(0);
- //int fieldId = _studyEditor->getParameterInt(soField,FIELD_SERIES_ID);
- int fieldId = _studyEditor->getParameterInt(soField,FIELD_ID);
+ std::string name(_studyEditor->getName(soField));
+ if (soField->_is_nil() || name == "MEDCalc")
+ return;
+ SALOMEDS::GenericAttribute_var anAttr;
+ SALOMEDS::AttributeParameter_var aParam;
+ if ( soField->FindAttribute(anAttr,"AttributeParameter") ) {
+ aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
+ if (! aParam->IsSet(FIELD_SERIES_ID, PT_INTEGER))
+ return;
+ }
+ int fieldId = aParam->GetInt(FIELD_SERIES_ID);
// _GBO_ : the dialog should not be modal, so that we can choose a
// mesh in the browser. Then we have to emit a signal from the
// dialog.accept, connected to a slot of the DatasourceControler
SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
if ( listOfSObject->size() > 0 ) {
SALOMEDS::SObject_var soField = listOfSObject->at(0);
- int fieldId = _studyEditor->getParameterInt(soField,FIELD_ID);
+ std::string name(_studyEditor->getName(soField));
+ if (soField->_is_nil() || name == "MEDCalc")
+ return;
+ SALOMEDS::GenericAttribute_var anAttr;
+ SALOMEDS::AttributeParameter_var aParam;
+ if ( soField->FindAttribute(anAttr,"AttributeParameter") ) {
+ aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
+ if (! aParam->IsSet(FIELD_SERIES_ID, PT_INTEGER))
+ return;
+ }
+ int fieldId = aParam->GetInt(FIELD_SERIES_ID);
// _GBO_ : the dialog should not be modal, so that we can choose a
// mesh in the browser. Then we have to emit a signal from the
// dialog.accept, connected to a slot of the DatasourceControler
commands += QString("source_id = medcalc.LoadDataSource('%1')").arg(event->objectalias);
commands += QString("source_id");
_consoleDriver->exec(commands);
+
+ // Create a default presentation when loading a file
+ MEDCALC::MedEvent* evt = new MEDCALC::MedEvent();
+ evt->type = MEDCALC::EVENT_ADD_PRESENTATION;
+ evt->dataId = -1;
+ emit workspaceSignal(evt); // forward to PresentationController
}
else if ( event->eventtype == DatasourceEvent::EVENT_ADD_IMAGE_AS_DATASOURCE ) {
QStringList commands;
#include "DlgChangeUnderlyingMesh.hxx"
#include <MEDCalcConstants.hxx>
+#include <SALOMEDS_SObject.hxx>
+#include <SALOMEDS_Study.hxx>
+#include CORBA_CLIENT_HEADER(SALOMEDS)
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+
#include <QString>
#include <QMessageBox>
SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
if ( listOfSObject->size() > 0 ) {
SALOMEDS::SObject_var soMesh = listOfSObject->at(0);
- // _GBO_ TODO: we should test here if it is a mesh (attribute in
- // the sobject)
- _meshId = _studyEditor->getParameterInt(soMesh,MESH_ID);
+ std::string name(_studyEditor->getName(soMesh));
+ if (soMesh->_is_nil() || name == "MEDCalc")
+ return;
+ SALOMEDS::GenericAttribute_var anAttr;
+ SALOMEDS::AttributeParameter_var aParam;
+ if ( soMesh->FindAttribute(anAttr,"AttributeParameter") ) {
+ aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
+ if (! aParam->IsSet(MESH_ID, PT_INTEGER))
+ return;
+ }
+ _meshId = aParam->GetInt(MESH_ID);
const char * meshname = _studyEditor->getName(soMesh);
this->ui.txtMesh->setText(QString(meshname));
}
#include "DlgInterpolateField.hxx"
#include <MEDCalcConstants.hxx>
+#include <SALOMEDS_SObject.hxx>
+#include <SALOMEDS_Study.hxx>
+#include CORBA_CLIENT_HEADER(SALOMEDS)
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+
#include <QString>
#include <QMessageBox>
#include <QDoubleValidator>
SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
if ( listOfSObject->size() > 0 ) {
SALOMEDS::SObject_var soMesh = listOfSObject->at(0);
- // _GBO_ TODO: we should test here if it is a mesh (attribute in
- // the sobject)
- _meshId = _studyEditor->getParameterInt(soMesh,MESH_ID);
+ std::string name(_studyEditor->getName(soMesh));
+ if (soMesh->_is_nil() || name == "MEDCalc")
+ return;
+ SALOMEDS::GenericAttribute_var anAttr;
+ SALOMEDS::AttributeParameter_var aParam;
+ if ( soMesh->FindAttribute(anAttr,"AttributeParameter") ) {
+ aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
+ if (! aParam->IsSet(MESH_ID, PT_INTEGER))
+ return;
+ }
+ _meshId = aParam->GetInt(MESH_ID);
const char * meshname = _studyEditor->getName(soMesh);
this->ui.txtMesh->setText(QString(meshname));
}
this, SLOT(onComboColorMapIndexChanged(int)) );
QObject::connect(_ui.comboBoxSliceOrient, SIGNAL(activated(int)),
this, SLOT(onComboOrientIndexChanged(int)) );
- QObject::connect(_ui.spinBox, SIGNAL(valueChanged(int)),
- this, SLOT(onSpinBoxValueChanged(int)) );
+ QObject::connect(_ui.spinBox, SIGNAL(editingFinished()),
+ this, SLOT(onSpinBoxEditingFinished()) );
}
void
}
void
-WidgetPresentationParameters::onSpinBoxValueChanged(int val)
+WidgetPresentationParameters::onSpinBoxEditingFinished()
{
- if (!_blockSig) emit spinBoxValueChanged(val);
+ if (!_blockSig) emit spinBoxValueChanged(_ui.spinBox->value());
}
void
string
WidgetPresentationParameters::getComponent() const
{
- if (_ui.comboBoxCompo->currentIndex() == 0) // Euclidean norm
+ if (_ui.comboBoxCompo->count() > 1 && _ui.comboBoxCompo->count() <= 3)
+ if (_ui.comboBoxCompo->currentIndex() == 0) // Euclidean norm
return "";
return _ui.comboBoxCompo->currentText().toStdString();
_ui.comboBoxCompo->show();
_ui.comboBoxCompo->clear();
- _ui.comboBoxCompo->addItem(tr("LAB_EUCLIDEAN_NORM"));
+ bool vectorField = (compos.size() > 1 && compos.size() <= 3);
+ if (vectorField)
+ _ui.comboBoxCompo->addItem(tr("LAB_EUCLIDEAN_NORM"));
for(vector<string>::const_iterator it = compos.begin(); it != compos.end(); ++it)
_ui.comboBoxCompo->addItem(QString::fromStdString(*it));
- _ui.comboBoxCompo->setCurrentIndex(selecIndex);
+ if (!vectorField)
+ _ui.comboBoxCompo->setCurrentIndex(std::max(0, selecIndex-1));
+ else
+ _ui.comboBoxCompo->setCurrentIndex(selecIndex);
_blockSig = false;
}
}
// Show the widget:
- _ui.labelSpinBox->setText(tr("LAB_NB_CONTOURS"));
+ _ui.labelSpinBox->setText(tr("LAB_NB_CONTOURS").arg(MEDCALC::NB_CONTOURS_MAX));
+
_ui.labelSpinBox->show();
_ui.spinBox->show();
+ _ui.spinBox->setRange(1, MEDCALC::NB_CONTOURS_MAX);
_ui.spinBox->setValue(nbContour);
_blockSig = false;
}
// Show the widget:
- _ui.labelSpinBox->setText(tr("LAB_NB_SLICES"));
+ _ui.labelSpinBox->setText(tr("LAB_NB_SLICES").arg(MEDCALC::NB_SLICES_MAX));
_ui.labelSpinBox->show();
_ui.spinBox->show();
+ _ui.spinBox->setRange(1, MEDCALC::NB_SLICES_MAX);
_ui.spinBox->setValue(nbSlices);
_blockSig = false;
void onComboCompoIndexChanged(int);
void onComboOrientIndexChanged(int);
void onComboMeshIndexChanged(int);
- void onSpinBoxValueChanged(int);
+ void onSpinBoxEditingFinished();
private:
Ui_WidgetPresentationParameters _ui; // instance of the class defined in ui_WidgetPresentationParameters.h
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="spinBox">
+ <property name="toolTip">
+ <string>LAB_SPINBOX_TOOLTIP</string>
+ </property>
<property name="minimum">
<number>1</number>
</property>
datafile = os.path.join(GetMEDFileDirTUI(), "smooth_surface_and_field.med")
source_id = medcalc.LoadDataSource(datafile)
-presentation_id = medcalc.MakeMeshView(accessField(0), MEDCALC.VIEW_MODE_REPLACE)
+presentation_id = medcalc.MakeMeshView(0, MEDCALC.VIEW_MODE_REPLACE) # here the ID of the mesh directly
sleep(1)
medcalc.RemovePresentation(presentation_id)
sleep(1)
from fieldproxy import newFieldProxy, FieldProxy
# Input/Output
-from medio import LoadDataSource
-from medio import LoadImageAsDataSource
+from medio import LoadDataSource, LoadImageAsDataSource, GetFirstMeshFromDataSource
# Presentations
from medpresentation import MakeMeshView
# Playing test scenarii
from medtest import PlayQtTestingScenario
from medtest import RequestSALOMETermination
-
#
# containerType = Name of the container factory
#
-componentName = "MEDFactory"
-corbaModule = "MEDCALC"
+factoryComponentName = "MEDFactory"
+medComponentName = "MED"
+#corbaModule = "MEDCALC"
containerType = "FactoryServer"
import salome
if salome.lcc is None:
salome.salome_init()
pass
-__import__(corbaModule)
-factory = salome.lcc.FindOrLoadComponent(containerType,componentName)
+
+import MEDCALC # corbaModule
+med_engine = salome.lcc.FindOrLoadComponent(containerType,medComponentName)
+factory = salome.lcc.FindOrLoadComponent(containerType,factoryComponentName)
# The factory is not the main CORBA component of the SALOME module MED
# (i.e. the engine associated to the active study), but the CORBA
# entry point for MED fields operations (i.e. a CORBA component
builder.image2med(filename, medfilename)
return LoadDataSource(medfilename)
#
+
+def GetFirstMeshFromDataSource(datasource_id):
+ dataManager = medcalc.medcorba.factory.getDataManager()
+ handlerLst = dataManager.getMeshHandlerList(datasource_id)
+ if not len(handlerLst):
+ return -1
+ return handlerLst[0].id
__manager = medcalc.medcorba.factory.getPresentationManager()
-def MakeMeshView(proxy,
+def MakeMeshView(meshID,
viewMode=MEDCALC.VIEW_MODE_DEFAULT,
meshMode=MEDCALC.MESH_MODE_DEFAULT):
# Create the presentation instance in CORBA engine
# The engine in turn creates the ParaView pipeline elements
- params = MEDCALC.MeshViewParameters(proxy.id, meshMode)
+ params = MEDCALC.MeshViewParameters(meshID, meshMode)
try:
presentation_id = __manager.makeMeshView(params, viewMode)
- notifyGui_addPresentation(proxy.id, presentation_id)
+ notifyGui_addPresentation(meshID, presentation_id)
return presentation_id
except SALOME.SALOME_Exception as e:
notifyGui_error("An error occured while creating the mesh view:\n" + e.details.text)
bb, nCells = obj.GetDataInformation().GetBounds(), obj.GetDataInformation().GetNumberOfCells()
bb = zip(bb[::2], bb[1::2])
deltas = [x[1]-x[0] for x in bb]
+ ## Filter out null dimensions:
+ avgDelta = sum(deltas) / 3.0
+ deltas = [d for d in deltas if abs(d) > 1.0e-12*avgDelta]
+ ##
vol = reduce(lambda x,y:x*y, deltas, 1.0)
- cellSize = (vol/nCells)**(1.0/3.0) # necessarily 3D in ParaView
+ cellSize = (vol/nCells)**(1.0/float(len(deltas)))
return cellSize
def GetDomainCenter(obj):
def SelectSourceField(obj, meshName, fieldName, discretisation):
"""
Properly set the AllArrays property of a MEDReader source to point to the correct field.
+ Setting the fieldName to void string is allowed (meaning we work on the mesh only).
"""
+ if fieldName == "":
+ return
tree = obj.GetProperty("FieldsTreeInfo")[::2]
it = None
for t in tree: