SliceOrientationType orientation;
long nbSlices;
};
-//
-// struct DeflectionShapeParameters {
-// long fieldHandlerId;
-// };
-//
+
+ struct DeflectionShapeParameters {
+ long fieldHandlerId;
+ ScalarBarRangeType scalarBarRange;
+ ColorMapType colorMap;
+ };
+
struct PointSpriteParameters {
long fieldHandlerId;
string displayedComponent; // DISPLAY_EUCLIDEAN_NORM or any component name
long makeScalarMap(in ScalarMapParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
long makeContour(in ContourParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
long makeVectorField(in VectorFieldParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
- long makeSlices(in SlicesParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
-// long makeDeflectionShape(in DeflectionShapeParameters params, in ViewModeType viewMode);
- long makePointSprite(in PointSpriteParameters params, in ViewModeType viewMode);
+ long makeSlices(in SlicesParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
+ long makeDeflectionShape(in DeflectionShapeParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
+ long makePointSprite(in PointSpriteParameters params, in ViewModeType viewMode) raises (SALOME::SALOME_Exception);
void setPresentationStringProperty(in long presId, in string propName, in string propValue);
string getPresentationStringProperty(in long presId, in string propName);
SlicesParameters getSlicesParameters(in long presId);
VectorFieldParameters getVectorFieldParameters(in long presId);
PointSpriteParameters getPointSpriteParameters(in long presId);
+ DeflectionShapeParameters getDeflectionShapeParameters(in long presId);
- void updateMeshView(in long presId, in MeshViewParameters params);
- void updateScalarMap(in long presId, in ScalarMapParameters params);
- void updateContour(in long presId, in ContourParameters params);
- void updateVectorField(in long presId, in VectorFieldParameters params);
- void updateSlices(in long presId, in SlicesParameters params);
-// void updateDeflectionShape(in long presId, in DeflectionShapeParameters params);
- void updatePointSprite(in long presId, in PointSpriteParameters params);
+ void updateMeshView(in long presId, in MeshViewParameters params) raises (SALOME::SALOME_Exception);
+ void updateScalarMap(in long presId, in ScalarMapParameters params) raises (SALOME::SALOME_Exception);
+ void updateContour(in long presId, in ContourParameters params) raises (SALOME::SALOME_Exception);
+ void updateVectorField(in long presId, in VectorFieldParameters params) raises (SALOME::SALOME_Exception);
+ void updateSlices(in long presId, in SlicesParameters params) raises (SALOME::SALOME_Exception);
+ void updateDeflectionShape(in long presId, in DeflectionShapeParameters params) raises (SALOME::SALOME_Exception);
+ void updatePointSprite(in long presId, in PointSpriteParameters params) raises (SALOME::SALOME_Exception);
- boolean removePresentation(in long presId);
+ boolean removePresentation(in long presId) raises (SALOME::SALOME_Exception);
// Helper function to keep GUI sync
- boolean activateView(in long presentationId);
+ boolean activateView(in long presentationId) raises (SALOME::SALOME_Exception);
// Low level ParaVis dump
- string getParavisDump(in long presId);
+ string getParavisDump(in long presId) raises (SALOME::SALOME_Exception);
// ViewModeType getPresentationViewMode(in long presId);
MEDPresentationVectorField.cxx
MEDPresentationSlices.cxx
MEDPresentationPointSprite.cxx
-# MEDPresentationDeflectionShape.cxx
+ MEDPresentationDeflectionShape.cxx
)
SET(MEDFactoryEngine_SOURCES
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+#include "MEDPyLockWrapper.hxx"
+
#include "MEDPresentationDeflectionShape.hxx"
+#include "MEDPresentationException.hxx"
+
+#include <SALOME_KernelServices.hxx>
+#undef LOG // should be fixed in KERNEL - double definition
+#include <Basics_Utils.hxx>
+
+#include <sstream>
+
+const std::string MEDPresentationDeflectionShape::TYPE_NAME = "MEDPresentationDeflectionShape";
+
+MEDPresentationDeflectionShape::MEDPresentationDeflectionShape(const MEDCALC::DeflectionShapeParameters& params,
+ const MEDCALC::ViewModeType viewMode) :
+ MEDPresentation(params.fieldHandlerId, TYPE_NAME, viewMode, params.colorMap, params.scalarBarRange), _params(params)
+{
+}
+
+void
+MEDPresentationDeflectionShape::autoScale()
+{
+ std::ostringstream oss;
+ oss << "import medcalc;";
+ pushAndExecPyLine(oss.str()); oss.str("");
+ oss << _objVar << ".ScaleFactor = 3.0*medcalc.ComputeCellAverageSize(__srcObj0)/(" << _rangeVar
+ << "[1]-" << _rangeVar << "[0]);";
+ pushAndExecPyLine(oss.str()); oss.str("");
+}
void
MEDPresentationDeflectionShape::internalGeneratePipeline()
{
-// PyGILState_STATE _gil_state = PyGILState_Ensure();
-//
-// std::string cmd = std::string("import pvsimple as pvs;");
-// cmd += getRenderViewCommand(_params.viewMode); // define __view1
-//
-// cmd += std::string("__obj1 = pvs.MEDReader(FileName='") + _fileName + std::string("');");
-// cmd += std::string("__warpByVector1 = pvs.WarpByVector(Input=__obj1);");
-// cmd += std::string("__disp1 = pvs.Show(__warpByVector1, __view1);");
-// cmd += std::string("pvs.ColorBy(__disp1, ('") + _fieldType + std::string("', '") + _fieldName + std::string("'));");
-// cmd += std::string("__disp1.SetScalarBarVisibility(__view1, True);");
-// cmd += std::string("__disp1.RescaleTransferFunctionToDataRangeOverTime();");
-// cmd += std::string("pvs.Render();");
-//
-// cmd += getResetCameraCommand();
-//
-// //std::cerr << "Python command:" << std::endl;
-// //std::cerr << cmd << std::endl;
-// PyRun_SimpleString(cmd.c_str());
-// // Retrieve Python object for internal storage:
-// PyObject* obj = getPythonObjectFromMain("__warpByVector1");
-// PyObject* disp = getPythonObjectFromMain("__disp1");
-// pushInternal(obj, disp);
-//
-// PyGILState_Release(_gil_state);
+ MEDPresentation::internalGeneratePipeline();
+
+ MEDPyLockWrapper lock;
+
+ setOrCreateRenderView();
+ createSource();
+
+ // Populate internal array of available components:
+ fillAvailableFieldComponents();
+ if (getIntProperty(MEDPresentation::PROP_NB_COMPONENTS) <= 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);
+ }
+
+ // Warp needs point data:
+ applyCellToPointIfNeeded();
+
+ std::ostringstream oss;
+ oss << _objVar << " = pvs.WarpByVector(Input=" << _srcObjVar << ");";
+ pushAndExecPyLine(oss.str()); oss.str("");
+
+ showObject(); // to be done first so that the scale factor computation properly works
+
+ oss << _objVar << ".Vectors = ['POINTS', '" << _fieldName << "'];";
+ pushAndExecPyLine(oss.str()); oss.str("");
+
+ colorBy("POINTS");
+ showScalarBar();
+ selectColorMap();
+ rescaleTransferFunction();
+
+ autoScale(); // to be called after transfer function so we have the range
+
+ resetCameraAndRender();
}
void
MEDPresentationDeflectionShape::updatePipeline(const MEDCALC::DeflectionShapeParameters& params)
{
- // :TODO:
+ if (params.fieldHandlerId != _params.fieldHandlerId)
+ throw KERNEL::createSalomeException("Unexpected updatePipeline error! Mismatching fieldHandlerId!");
+
+ if (params.scalarBarRange != _params.scalarBarRange)
+ {
+ updateScalarBarRange<MEDPresentationDeflectionShape, MEDCALC::DeflectionShapeParameters>(params.scalarBarRange);
+ autoScale();
+ pushAndExecPyLine("pvs.Render();");
+ }
+ if (params.colorMap != _params.colorMap)
+ updateColorMap<MEDPresentationDeflectionShape, MEDCALC::DeflectionShapeParameters>(params.colorMap);
}
class MEDCALC_EXPORT MEDPresentationDeflectionShape : public MEDPresentation
{
public:
- MEDPresentationDeflectionShape(const MEDCALC::DeflectionShapeParameters& params) :
- MEDPresentation(params.fieldHandlerId, "MEDPresentationDeflectionShape"), _params(params)
- {}
+ static const std::string TYPE_NAME;
+
+ MEDPresentationDeflectionShape(const MEDCALC::DeflectionShapeParameters& params, const MEDCALC::ViewModeType viewMode);
virtual ~MEDPresentationDeflectionShape() {}
void updatePipeline(const MEDCALC::DeflectionShapeParameters& params);
- MEDCALC::ViewModeType getViewMode() { return _params.viewMode; }
+
+ void getParameters(MEDCALC::DeflectionShapeParameters & params) const { params = _params; } ;
+ void setParameters(const MEDCALC::DeflectionShapeParameters & params) { _params = params; } ;
protected:
virtual void internalGeneratePipeline();
+ void autoScale();
private:
MEDCALC::DeflectionShapeParameters _params;
#include "MEDPresentationContour.hxx"
#include "MEDPresentationSlices.hxx"
#include "MEDPresentationVectorField.hxx"
-//#include "MEDPresentationDeflectionShape.hxx"
+#include "MEDPresentationDeflectionShape.hxx"
#include "MEDPresentationPointSprite.hxx"
#include <SALOME_KernelServices.hxx>
{
return _makePresentation<MEDPresentationSlices>(params, viewMode);
}
-//
-//MEDPresentation::TypeID
-//MEDPresentationManager_i::makeDeflectionShape(const MEDCALC::DeflectionShapeParameters& params)
-//{
-// return _makePresentation<MEDPresentationDeflectionShape>(params);
-//}
+
+MEDPresentation::TypeID
+MEDPresentationManager_i::makeDeflectionShape(const MEDCALC::DeflectionShapeParameters& params, const MEDCALC::ViewModeType viewMode)
+{
+ return _makePresentation<MEDPresentationDeflectionShape>(params, viewMode);
+}
MEDPresentation::TypeID
MEDPresentationManager_i::makePointSprite(const MEDCALC::PointSpriteParameters& params, const MEDCALC::ViewModeType viewMode)
return tmp._retn();
}
+MEDCALC::DeflectionShapeParameters
+MEDPresentationManager_i::getDeflectionShapeParameters(MEDPresentation::TypeID presentationID)
+{
+ MEDCALC::DeflectionShapeParameters p;
+ _getParameters<MEDPresentationDeflectionShape>(presentationID, p);
+ return p;
+}
+
+
void
MEDPresentationManager_i::updateMeshView(MEDPresentation::TypeID presentationID, const MEDCALC::MeshViewParameters& params)
{
{
return _updatePresentation<MEDPresentationSlices>(presentationID, params);
}
-//
-//void
-//MEDPresentationManager_i::updateDeflectionShape(MEDPresentation::TypeID presentationID, const MEDCALC::DeflectionShapeParameters& params)
-//{
-// return _updatePresentation<MEDPresentationDeflectionShape>(presentationID, params);
-//}
+
+void
+MEDPresentationManager_i::updateDeflectionShape(MEDPresentation::TypeID presentationID, const MEDCALC::DeflectionShapeParameters& params)
+{
+ return _updatePresentation<MEDPresentationDeflectionShape>(presentationID, params);
+}
void
MEDPresentationManager_i::updatePointSprite(MEDPresentation::TypeID presentationID, const MEDCALC::PointSpriteParameters& params)
MEDCALC_EXPORT MEDPresentation::TypeID makeContour(const MEDCALC::ContourParameters&, const MEDCALC::ViewModeType);
MEDCALC_EXPORT MEDPresentation::TypeID makeVectorField(const MEDCALC::VectorFieldParameters&, const MEDCALC::ViewModeType);
MEDCALC_EXPORT MEDPresentation::TypeID makeSlices(const MEDCALC::SlicesParameters&, const MEDCALC::ViewModeType);
-// MEDCALC_EXPORT MEDPresentation::TypeID makeDeflectionShape(const MEDCALC::DeflectionShapeParameters&, const MEDCALC::ViewModeType);
+ MEDCALC_EXPORT MEDPresentation::TypeID makeDeflectionShape(const MEDCALC::DeflectionShapeParameters&, const MEDCALC::ViewModeType);
MEDCALC_EXPORT MEDPresentation::TypeID makePointSprite(const MEDCALC::PointSpriteParameters&, const MEDCALC::ViewModeType);
MEDCALC_EXPORT void setPresentationStringProperty(MEDPresentation::TypeID presentationID, const char* propName, const char* propValue);
MEDCALC_EXPORT MEDCALC::SlicesParameters* getSlicesParameters(MEDPresentation::TypeID presentationID);
MEDCALC_EXPORT MEDCALC::VectorFieldParameters getVectorFieldParameters(MEDPresentation::TypeID presentationID);
MEDCALC_EXPORT MEDCALC::PointSpriteParameters* getPointSpriteParameters(MEDPresentation::TypeID presentationID);
+ MEDCALC_EXPORT MEDCALC::DeflectionShapeParameters getDeflectionShapeParameters(MEDPresentation::TypeID presentationID);
MEDCALC_EXPORT void updateMeshView(MEDPresentation::TypeID, const MEDCALC::MeshViewParameters&);
MEDCALC_EXPORT void updateScalarMap(MEDPresentation::TypeID, const MEDCALC::ScalarMapParameters&);
MEDCALC_EXPORT void updateContour(MEDPresentation::TypeID, const MEDCALC::ContourParameters&);
MEDCALC_EXPORT void updateVectorField(MEDPresentation::TypeID, const MEDCALC::VectorFieldParameters&);
MEDCALC_EXPORT void updateSlices(MEDPresentation::TypeID, const MEDCALC::SlicesParameters&);
-// MEDCALC_EXPORT void updateDeflectionShape(MEDPresentation::TypeID, const MEDCALC::DeflectionShapeParameters&);
+ MEDCALC_EXPORT void updateDeflectionShape(MEDPresentation::TypeID, const MEDCALC::DeflectionShapeParameters&);
MEDCALC_EXPORT void updatePointSprite(MEDPresentation::TypeID, const MEDCALC::PointSpriteParameters&);
MEDCALC_EXPORT CORBA::Boolean removePresentation(MEDPresentation::TypeID);
pushAndExecPyLine(oss.str()); oss.str("");
oss << _objVar << "GlyphTransform = 'Transform2';"; // not sure this is really needed?
pushAndExecPyLine(oss.str()); oss.str("");
- oss << _objVar << ".ScaleFactor = 0.1;";
- pushAndExecPyLine(oss.str()); oss.str("");
colorBy("POINTS");
showScalarBar();
MEDWidgetHelperSlices.hxx
MEDWidgetHelperPointSprite.hxx
MEDWidgetHelperVectorField.hxx
+ MEDWidgetHelperDeflectionShape.hxx
)
IF(SALOME_MED_WITH_QTTESTING)
--- /dev/null
+// Copyright (C) 2016 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef SRC_MEDCALC_GUI_MEDWIDGETHELPERDEFLECTIONSHAPE_HXX_
+#define SRC_MEDCALC_GUI_MEDWIDGETHELPERDEFLECTIONSHAPE_HXX_
+
+#include "MEDWidgetHelperComponent.hxx"
+
+class PresentationController;
+
+class MEDWidgetHelperDeflectionShape: public MEDWidgetHelper
+{
+ Q_OBJECT
+
+public:
+ MEDWidgetHelperDeflectionShape(const PresentationController* presController,
+ MEDCALC::MEDPresentationManager_ptr presManager, int presId, const std::string & presName,
+ WidgetPresentationParameters * paramW):
+ MEDWidgetHelper(presController, presManager, presId, presName, paramW)
+ {}
+ virtual ~MEDWidgetHelperDeflectionShape() {}
+
+ virtual std::string getPythonTag() const { return "DeflectionShape"; }
+
+};
+
+#endif /* SRC_MEDCALC_GUI_MEDWIDGETHELPERDEFLECTIONSHAPE_HXX_ */
#include "MEDPresentationSlices.hxx"
#include "MEDPresentationPointSprite.hxx"
#include "MEDPresentationVectorField.hxx"
-//#include "MEDPresentationDeflectionShape.hxx"
+#include "MEDPresentationDeflectionShape.hxx"
#include "MEDWidgetHelperMeshView.hxx"
#include "MEDWidgetHelperScalarMap.hxx"
#include "MEDWidgetHelperSlices.hxx"
#include "MEDWidgetHelperPointSprite.hxx"
#include "MEDWidgetHelperVectorField.hxx"
-//#include "MEDWidgetHelperDeflectionShape.hxx"
+#include "MEDWidgetHelperDeflectionShape.hxx"
#include <SalomeApp_Application.h>
#include <SalomeApp_Study.h>
QString scalarBarRange = getScalarBarRangePython();
MEDCALC::FieldHandler* fieldHandler = event->fieldHandler;
QStringList commands;
+
+ // [ABN] using event mechanism for all this is awkward? TODO: direct implementation in each
+ // 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");
.arg(fieldHandler->id).arg(viewMode).arg(scalarBarRange).arg(colorMap);
commands += QString("presentation_id");
}
+ else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE ) {
+ commands += QString("presentation_id = medcalc.MakeDeflectionShape(accessField(%1), viewMode=%2, scalarBarRange=%3, colorMap=%4)")
+ .arg(fieldHandler->id).arg(viewMode).arg(scalarBarRange).arg(colorMap);
+ commands += QString("presentation_id");
+ }
- // else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE ) {
- // commands += QString("presentation_id = medcalc.MakeDeflectionShape(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
- // commands += QString("presentation_id");
- // [ABN] using event mechanism for this is awkward? TODO: direct implementation in each
- // dedicated widget helper class?
else if ( event->eventtype == PresentationEvent::EVENT_CHANGE_COMPONENT ) {
std::string typ = getPresTypeFromWidgetHelper(event->presentationId);
commands += QString("params = medcalc.Get%1Parameters(%2)").arg(QString::fromStdString(typ)).arg(event->presentationId);
wh = new MEDWidgetHelperVectorField(this, _presManager, presId, name, _widgetPresentationParameters);
else if (type == MEDPresentationPointSprite::TYPE_NAME)
wh = new MEDWidgetHelperPointSprite(this, _presManager, presId, name, _widgetPresentationParameters);
+ else if (type == MEDPresentationDeflectionShape::TYPE_NAME)
+ wh = new MEDWidgetHelperDeflectionShape(this, _presManager, presId, name, _widgetPresentationParameters);
else
{
const char * msg ="findOrCreateWidgetHelper(): NOT IMPLEMENTED !!!";
SET(_test_files
medfiles/smooth_surface_and_field.med
medfiles/agitateur.med
+ medfiles/deplacements.med
)
SET(TEST_INSTALL_DIRECTORY ${SALOME_MED_INSTALL_TEST}/MEDCalc/tui)
--- /dev/null
+# Copyright (C) 2016 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+from time import sleep
+
+import medcalc
+medcalc.medconsole.setConsoleGlobals(globals())
+import MEDCALC
+from medcalc.medconsole import accessField
+
+from medcalc_testutils import GetMEDFileDirTUI
+
+datafile = os.path.join(GetMEDFileDirTUI(), "deplacements.med")
+source_id = medcalc.LoadDataSource(datafile)
+
+presentation_id = medcalc.MakeDeflectionShape(accessField(0), viewMode=MEDCALC.VIEW_MODE_REPLACE,
+ colorMap=MEDCALC.COLOR_MAP_BLUE_TO_RED_RAINBOW,
+ scalarBarRange=MEDCALC.SCALAR_BAR_CURRENT_TIMESTEP
+ )
+sleep(1)
+medcalc.RemovePresentation(presentation_id)
+sleep(1)
from medpresentation import MakeSlices
from medpresentation import MakePointSprite
from medpresentation import RemovePresentation
-#from medpresentation import MakeDeflectionShape
+from medpresentation import MakeDeflectionShape
from medpresentation import GetMeshViewParameters
from medpresentation import GetScalarMapParameters
from medpresentation import GetSlicesParameters
from medpresentation import GetPointSpriteParameters
from medpresentation import GetVectorFieldParameters
-#from medpresentation import GetDeflectionShapeParameters
+from medpresentation import GetDeflectionShapeParameters
from medpresentation import UpdateMeshView
from medpresentation import UpdateScalarMap
from medpresentation import UpdateSlices
from medpresentation import UpdateVectorField
from medpresentation import UpdatePointSprite
-#from medpresentation import UpdateDeflectionShape
+from medpresentation import UpdateDeflectionShape
from medpresentation import ComputeCellAverageSize, GetDomainCenter, GetSliceOrigins
except SALOME.SALOME_Exception as e:
notifyGui_error("An error occured while creating the slices:\n" + e.details.text)
raise Exception(e.details.text)
-##
-#
-#def MakeDeflectionShape(proxy,
-# viewMode=MEDCALC.VIEW_MODE_DEFAULT
-# ):
-# params = MEDCALC.DeflectionShapeParameters(proxy.id, viewMode)
-# presentation_id = __manager.makeDeflectionShape(params)
-# notifyGui_addPresentation(proxy.id, presentation_id)
-# return presentation_id
-##
-#
+
+
+def MakeDeflectionShape(proxy,
+ viewMode=MEDCALC.VIEW_MODE_DEFAULT,
+ scalarBarRange=MEDCALC.SCALAR_BAR_RANGE_DEFAULT,
+ colorMap=MEDCALC.COLOR_MAP_DEFAULT
+ ):
+ # Create the presentation instance in CORBA engine
+ # The engine in turn creates the ParaView pipeline elements
+ params = MEDCALC.DeflectionShapeParameters(proxy.id, scalarBarRange, colorMap)
+ try:
+ presentation_id = __manager.makeDeflectionShape(params, viewMode)
+ notifyGui_addPresentation(proxy.id, presentation_id)
+ return presentation_id
+ except SALOME.SALOME_Exception as e:
+ notifyGui_error("An error occured while creating the deflection shape:\n" + e.details.text)
+ raise Exception(e.details.text)
+
+
def MakePointSprite(proxy,
viewMode=MEDCALC.VIEW_MODE_DEFAULT,
displayedComponent=MEDCALC.DISPLAY_DEFAULT,
GetSlicesParameters = lambda pres_id: __GetGENERICParameters("Slices", pres_id)
GetPointSpriteParameters = lambda pres_id: __GetGENERICParameters("PointSprite", pres_id)
GetVectorFieldParameters = lambda pres_id: __GetGENERICParameters("VectorField", pres_id)
-#GetDeflectionShapeParameters = lambda pres_id: __GetGENERICParameters("DeflectionShape", pres_id)
+GetDeflectionShapeParameters = lambda pres_id: __GetGENERICParameters("DeflectionShape", pres_id)
def __UpdateGENERIC(tag, presentation_id, params):
UpdateSlices = lambda pres_id, params: __UpdateGENERIC("Slices", pres_id, params)
UpdateVectorField = lambda pres_id, params: __UpdateGENERIC("VectorField", pres_id, params)
UpdatePointSprite = lambda pres_id, params: __UpdateGENERIC("PointSprite", pres_id, params)
-#UpdateDeflectionShape = lambda pres_id, params: __UpdateGENERIC("DeflectionShape", pres_id, params)
+UpdateDeflectionShape = lambda pres_id, params: __UpdateGENERIC("DeflectionShape", pres_id, params)
def ComputeCellAverageSize(obj):
"""