]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Merge from V6_main (04/10/2012) V7_0_0 V7_0_0rc1
authorvsr <vsr@opencascade.com>
Mon, 8 Oct 2012 13:52:12 +0000 (13:52 +0000)
committervsr <vsr@opencascade.com>
Mon, 8 Oct 2012 13:52:12 +0000 (13:52 +0000)
12 files changed:
adm_local/cmake_files/FindPARAVIEW.cmake
resources/SalomeApp.xml.in
src/PVGUI/CMakeLists.txt
src/PVGUI/PVGUI_Module.cxx
src/PVGUI/PVGUI_Module.h
src/PVGUI/PVGUI_Module_widgets.cxx
src/PVGUI/resources/PARAVIS_msg_en.ts
src/Plugins/IntegrationPoints/vtkELNOSurfaceFilter.cxx
src/Plugins/MedReader/IO/vtkMedEntityArray.cxx
src/Plugins/MedReader/IO/vtkMedFamilyOnEntityOnProfile.cxx
src/Plugins/MedReader/IO/vtkMedField.cxx
src/Plugins/MedReader/IO/vtkMedUnstructuredGrid.cxx

index d0dd6abde033daee58baf26a3a8bdab76d725253..030d81a2f6e6741c0807b04f51570e758bf301fb 100644 (file)
@@ -35,6 +35,9 @@ FIND_LIBRARY(vtkPVCommon vtkPVCommon PATHS ${PARAVIEW_LIBRARY_DIRS} NO_DEFAULT_P
 FIND_LIBRARY(vtkPVVTKExtensions vtkPVVTKExtensions PATHS ${PARAVIEW_LIBRARY_DIRS} NO_DEFAULT_PATH)
 FIND_LIBRARY(vtkViews vtkViews PATHS ${PARAVIEW_LIBRARY_DIRS} NO_DEFAULT_PATH)
 FIND_LIBRARY(pqApplicationComponents pqApplicationComponents  PATHS ${PARAVIEW_LIBRARY_DIRS} NO_DEFAULT_PATH)
+FIND_LIBRARY(vtkGraphicsCS vtkGraphicsCS  PATHS ${PARAVIEW_LIBRARY_DIRS} NO_DEFAULT_PATH)
+FIND_LIBRARY(vtkCommonCS vtkCommonCS  PATHS ${PARAVIEW_LIBRARY_DIRS} NO_DEFAULT_PATH)
+
 SET(PARAVIEW_LIBS
   ${QtPython}
   ${QVTK}
@@ -53,4 +56,6 @@ SET(PARAVIEW_LIBS
   ${vtkPVCommon}
   ${vtkViews}
   ${pqApplicationComponents}
-  )
+  ${vtkGraphicsCS}
+  ${vtkCommonCS}
+  )
\ No newline at end of file
index 498ce10b75b34144dd4867b42056cf49931ae76b..3a1f8cd7827d623f0cc9cf0fb69ace49b1d52353 100644 (file)
@@ -28,6 +28,7 @@
     <parameter name="singleton" value="true"/>
     <!-- Lists all additional popup items separated by ':' -->
     <parameter name="popupitems" value="importmed"/>
+    <parameter name="show_color_legend" value="0"/>
   </section>
   <section name="resources">
     <!-- Module resources -->
index 4f25999171584a52d7911b924ed7e0c281f93df2..514e768635de924eeb5f0565a98494aa269a9508 100644 (file)
@@ -47,6 +47,9 @@ SET(vtkWrapIDL_CC_CPPFLAGS
 
 INCLUDE(wrap.cmake)
 
+INCLUDE(${ParaView_CMAKE_DIR}/vtkClientServer.cmake)
+VTK_WRAP_ClientServer(vtkEDFCutterCS vtkEDFCutter_SRCS ${GUI_ROOT_DIR}/include/salome/vtkEDFCutter.h)
+
 # Library sources
 SET(dist_libPARAVIS_la_SOURCES
   PVGUI_Module.h
@@ -74,6 +77,7 @@ SET(dist_libPARAVIS_la_SOURCES
   ${WRAP_IDL_I_HH}
   ${WRAP_IDL_I_CC}
   PARAVIS_CreateClass.cxx
+  ${vtkEDFCutter_SRCS}
   )
 
 # Check ParaView documentation file existence
@@ -160,7 +164,7 @@ TARGET_LINK_LIBRARIES(PARAVIS
   ${VTK_LIBS}
   ${PYTHON_LIBS}
   ${KERNEL_LDFLAGS} ${SalomeDS} ${SALOMELocalTrace} ${SalomeIDLKernel} ${SalomeNS} ${SalomeLifeCycleCORBA} ${SalomeContainer} ${TOOLSDS}
-  ${GUI_LDFLAGS} ${SalomeApp} ${LightApp} ${CAM} ${qtx} ${suit} ${Event} ${PyInterp} ${SalomeObject}
+  ${GUI_LDFLAGS} ${SalomeApp} ${LightApp} ${CAM} ${qtx} ${suit} ${Event} ${PyInterp} ${SalomeObject} ${vtkTools}
   ${MED_LDFLAGS} ${SalomeIDLMED}
   ${VISU_LDFLAGS}
   ${VISU_PARAVIS_LIBS}
index b4f346df7a0388f70a3b9a61fa27f01d33f094c0..f4d072bc8f568e145d4cf634fa1bb6d1f74b70e0 100644 (file)
@@ -99,7 +99,7 @@
 #include <pqVCRController.h>
 #include <pqTabbedMultiViewWidget.h>
 #include <pqPipelineSource.h>
-//#include <vtkPVMain.h>
+#include <pqActiveObjects.h>
 #include <vtkProcessModule.h>
 #include <pqParaViewBehaviors.h>
 #include <pqHelpReaction.h>
 #include <pqPythonScriptEditor.h>
 #include <pqStandardSummaryPanelImplementation.h>
 #include <pqCollaborationBehavior.h>
+#include <pqDataRepresentation.h>
+#include <pqPipelineRepresentation.h>
+#include <pqLookupTableManager.h>
+#include <pqDisplayColorWidget.h>
 
 #include <PARAVIS_version.h>
 
 #include <vtkPVConfig.h>
 
+#include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
+
 /*
  * Make sure all the kits register their classes with vtkInstantiator.
  * Since ParaView uses Tcl wrapping, all of VTK is already compiled in
 #include <pqViewFrameActionsBehavior.h>
 #include <pqServerManagerObserver.h>
 
+#include <vtkClientServerInterpreterInitializer.h>
+
 
 //----------------------------------------------------------------------------
 pqPVApplicationCore* PVGUI_Module::MyCoreApp = 0;
@@ -238,6 +246,66 @@ PVGUI_Module* ParavisModule = 0;
          SALOME module wrapping ParaView GUI.
 */
 
+
+/*
+  Fix for the issue 21730: [CEA 596] Slice of polyhedron in PARAVIS returns no cell.
+  Wrap vtkEDFCutter filter.
+*/
+
+extern "C" void vtkEDFCutterCS_Initialize(vtkClientServerInterpreter*);
+static void vtkEDFHelperInit();
+
+void vtkEDFHelperInit(vtkClientServerInterpreter* interp){
+    vtkEDFCutterCS_Initialize(interp);
+}
+
+void vtkEDFHelperInit() {
+    vtkClientServerInterpreterInitializer::GetInitializer()->
+        RegisterCallback(&vtkEDFHelperInit);
+}
+
+
+  _PTR(SComponent)
+  ClientFindOrCreateParavisComponent(_PTR(Study) theStudyDocument)
+  {
+    _PTR(SComponent) aSComponent = theStudyDocument->FindComponent("PARAVIS");
+    if (!aSComponent) {
+      _PTR(StudyBuilder) aStudyBuilder = theStudyDocument->NewBuilder();
+      aStudyBuilder->NewCommand();
+      int aLocked = theStudyDocument->GetProperties()->IsLocked();
+      if (aLocked) theStudyDocument->GetProperties()->SetLocked(false);
+      aSComponent = aStudyBuilder->NewComponent("PARAVIS");
+      _PTR(GenericAttribute) anAttr =
+        aStudyBuilder->FindOrCreateAttribute(aSComponent, "AttributeName");
+      _PTR(AttributeName) aName (anAttr);
+
+      CORBA::ORB_var anORB = PARAVIS::PARAVIS_Gen_i::GetORB();
+      SALOME_NamingService *NamingService = new SALOME_NamingService( anORB );
+      CORBA::Object_var objVarN = NamingService->Resolve("/Kernel/ModulCatalog");
+      SALOME_ModuleCatalog::ModuleCatalog_var Catalogue =
+        SALOME_ModuleCatalog::ModuleCatalog::_narrow(objVarN);
+      SALOME_ModuleCatalog::Acomponent_var Comp = Catalogue->GetComponent( "PARAVIS" );
+      if (!Comp->_is_nil()) {
+        aName->SetValue(Comp->componentusername());
+      }
+
+      anAttr = aStudyBuilder->FindOrCreateAttribute(aSComponent, "AttributePixMap");
+      _PTR(AttributePixMap) aPixmap (anAttr);
+      aPixmap->SetPixMap( "pqAppIcon16.png" );
+
+      // Create Attribute parameters for future using
+      anAttr = aStudyBuilder->FindOrCreateAttribute(aSComponent, "AttributeParameter");
+
+
+      PARAVIS::PARAVIS_Gen_var aPARAVIS = PARAVIS::PARAVIS_Gen_i::GetParavisGenImpl()->_this();
+
+      aStudyBuilder->DefineComponentInstance(aSComponent, aPARAVIS->GetIOR());
+      if (aLocked) theStudyDocument->GetProperties()->SetLocked(true);
+      aStudyBuilder->CommitCommand();
+    }
+    return aSComponent;
+  }
+
 /*!
   \brief Constructor. Sets the default name for the module.
 */
@@ -404,6 +472,10 @@ void PVGUI_Module::initialize( CAM_Application* app )
   connect(pqApplicationCore::instance()->getObjectBuilder(), SIGNAL(finishedAddingServer(pqServer*)), 
          this, SLOT(onFinishedAddingServer(pqServer*)));
 
+  connect(pqApplicationCore::instance()->getObjectBuilder(), SIGNAL(dataRepresentationCreated(pqDataRepresentation*)), 
+          this, SLOT(onDataRepresentationCreated(pqDataRepresentation*)));
+
+
   SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
   bool isStop = aResourceMgr->booleanValue( "PARAVIS", "stop_trace", false );
   // start timer to activate trace in a proper moment
@@ -417,6 +489,10 @@ void PVGUI_Module::initialize( CAM_Application* app )
     this, SLOT(onStartProgress()));
   this->VTKConnect->Connect(pm, vtkCommand::EndEvent,
     this, SLOT(onEndProgress()));
+
+  connect(&pqActiveObjects::instance(),
+         SIGNAL(representationChanged(pqRepresentation*)),
+         this, SLOT(onRepresentationChanged(pqRepresentation*)));
 }
 
 void PVGUI_Module::onStartProgress()
@@ -437,6 +513,58 @@ void PVGUI_Module::onFinishedAddingServer(pqServer* /*server*/)
     startTimer( 50 );
 }
 
+void PVGUI_Module::onDataRepresentationCreated(pqDataRepresentation* data) {
+  if(!data)
+    return;
+  
+  if(!data->getLookupTable())
+    return;
+  
+  SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
+  if(!aResourceMgr)
+    return;
+
+  bool visible = aResourceMgr->booleanValue( "PARAVIS", "show_color_legend", false );
+  pqLookupTableManager* lut_mgr = pqApplicationCore::instance()->getLookupTableManager();
+  
+  if(lut_mgr) {
+    lut_mgr->setScalarBarVisibility(data,visible);
+  }
+}
+
+void PVGUI_Module::onVariableChanged(pqVariableType t, const QString) {
+  
+  pqDisplayColorWidget* colorWidget = qobject_cast<pqDisplayColorWidget*>(sender());
+  if( !colorWidget )
+    return;
+
+  if( t == VARIABLE_TYPE_NONE )
+    return;
+
+  pqDataRepresentation* data  = colorWidget->getRepresentation();
+
+  if( !data->getLookupTable() )
+    return;
+
+  SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
+  
+  if(!aResourceMgr)
+    return;
+
+  bool visible = aResourceMgr->booleanValue( "PARAVIS", "show_color_legend", false );
+  
+  if(!visible)
+    return;
+  
+  pqLookupTableManager* lut_mgr = pqApplicationCore::instance()->getLookupTableManager();
+
+  if(lut_mgr) {
+    lut_mgr->setScalarBarVisibility(data,visible);
+  }
+  
+}
+
+
 /*!
   \brief Launches a tracing of current server
 */
@@ -684,6 +812,8 @@ bool PVGUI_Module::activateModule( SUIT_Study* study )
 
   if ( myRecentMenuId != -1 ) menuMgr()->show(myRecentMenuId);
 
+  ClientFindOrCreateParavisComponent(PARAVIS::GetCStudy(this));
+
   return isDone;
 }
 
@@ -1026,6 +1156,10 @@ void PVGUI_Module::createPreferences()
   aStrings<<tr("PREF_SAVE_TYPE_2");
   setPreferenceProperty(aSaveType, "strings", aStrings);
   setPreferenceProperty(aSaveType, "indexes", aIndices);
+
+  //rnv: imp 21712: [CEA 581] Preference to display legend by default 
+  int aDispColoreLegend = addPreference( tr( "PREF_SHOW_COLOR_LEGEND" ), aParaVisSettingsTab,
+                                        LightApp_Preferences::Bool, "PARAVIS", "show_color_legend");
 }
 
 /*!
@@ -1371,6 +1505,24 @@ void PVGUI_Module::loadSelectedState(bool toClear)
   }
 }
 
+void PVGUI_Module::onRepresentationChanged(pqRepresentation*) {
+
+
+  //rnv: to fix the issue "21712: [CEA 581] Preference to display legend by default"
+  //     find the pqDisplayColorWidget instances and connect the variableChanged SIGNAL on the 
+  //     onVariableChanged slot of this class. This connection needs to change visibility 
+  //     of the "Colored Legend" after change the "Color By" array.
+  QList<pqDisplayColorWidget*> aWidget = getApp()->desktop()->findChildren<pqDisplayColorWidget*>();
+  
+  for (int i = 0; i < aWidget.size() ; i++ ) {
+    if( aWidget[i] ) {
+      connect( aWidget[i], SIGNAL ( variableChanged ( pqVariableType, const QString ) ), 
+              this, SLOT(onVariableChanged( pqVariableType, const QString) ), Qt::UniqueConnection );
+    }    
+  }
+}
+
+
 /*!
   \fn CAM_Module* createModule();
   \brief Export module instance (factory function).
@@ -1384,7 +1536,13 @@ void PVGUI_Module::loadSelectedState(bool toClear)
 #endif  // WNT
 
 extern "C" {
+
+  bool flag = false;
   PVGUI_EXPORT CAM_Module* createModule() {
+    if(!flag) {
+        vtkEDFHelperInit();
+        flag = true;
+    }      
     return new PVGUI_Module();
   }
   
index 4bbcd749fd5ddd3246d519baac1d86e104333a9e..5c0732ee6a2f5e66b6e5a975db0428861160e730 100644 (file)
@@ -31,6 +31,8 @@
 #include <ostream>
 #include <vtkType.h>
 
+#include <pqVariableType.h>
+
 class QMenu;
 class QDockWidget;
 class QToolBar;
@@ -42,6 +44,8 @@ class pqMainWindowCore;
 class vtkEventQtSlotConnect;
 class pqPythonScriptEditor;
 class pqPVApplicationCore;
+class pqDataRepresentation;
+class pqRepresentation;
 
 
 class PVGUI_Module : public SalomeApp_Module
@@ -220,6 +224,9 @@ private slots:
   //void showHelp(const QString& url);
 
   void onFinishedAddingServer(pqServer*);
+  void onDataRepresentationCreated(pqDataRepresentation*);
+  void onVariableChanged(pqVariableType, const QString);
+  void onRepresentationChanged(pqRepresentation*);
 
   void onStartProgress();
   void onEndProgress();
index 03849f8e23a38381d3cc46ebc7669bb2feace724..feba87a630336de171e2d1aecf7c5aba5b730193 100644 (file)
@@ -28,6 +28,7 @@
 #include <LightApp_Application.h>
 #include <SUIT_Desktop.h>
 
+#include <QApplication>
 #include <QAction>
 #include <QDockWidget>
 #include <QToolBar>
 #include <QShortcut>
 #include <QScrollArea>
 #include <QVBoxLayout>
+#include <QShowEvent>
 
 #include <pqAnimationViewWidget.h> 
+#include <pqAnimationWidget.h> 
 
 #include <pqApplicationCore.h>
 #include <pqComparativeVisPanel.h>
 #include <pqCollaborationPanel.h>
 #include <pqMemoryInspector.h>
 
+class ResizeHelper : public pqPVAnimationWidget
+{
+  // TEMPORARILY WORKAROUND AROUND PARAVIEW 3.14 BUG:
+  // WHEN ANIMATION VIEW IS RESIZED, ITS CONTENTS IS NOT PREPERLY RE-ARRANGED
+  // CAUSING SOME CONTROLS TO STAY NON-VISIBLE
+  // THIS BUG IS NATURALLY FIXED BY ADDING 
+  //      this->updateGeometries();
+  // TO THE
+  //     void pqAnimationWidget::resizeEvent(QResizeEvent* e);
+  // BUT THIS CANNOT BE DONE DIRECTLY, SINCE CORRESPONDING API IS NOT PUBLIC
+  // THE ONLY WAY TO DO THIS BY SENDING SHOW EVENT TO THE WIDGET
+
+public:
+  ResizeHelper( QWidget* parent ) : pqPVAnimationWidget( parent ) {}
+protected:
+  void resizeEvent(QResizeEvent* e)
+  {
+    pqAnimationWidget* w = findChild<pqAnimationWidget*>( "pqAnimationWidget" );
+    if ( w ) { 
+      QShowEvent e;
+      QApplication::sendEvent( w, &e );
+    }
+    pqPVAnimationWidget::resizeEvent( e );
+  }
+};
+
 /*!
   \brief Create dock widgets for ParaView widgets such as object inspector, pipeline browser, etc.
   ParaView pqMainWIndowCore class is fully responsible for these dock widgets' contents.
@@ -176,7 +205,7 @@ void PVGUI_Module::setupDockWidgets()
   QDockWidget* animationViewDock     = new QDockWidget( tr( "TTL_ANIMATION_VIEW" ), desk );
   animationViewDock->setObjectName("animationViewDock");
   desk->addDockWidget( Qt::BottomDockWidgetArea, animationViewDock );
-  pqPVAnimationWidget* animation_panel = new pqPVAnimationWidget(animationViewDock);
+  pqPVAnimationWidget* animation_panel = new ResizeHelper(animationViewDock); //pqPVAnimationWidget
   animationViewDock->setWidget(animation_panel);
   myDockWidgets[animationViewDock] = false; // hidden by default
 
index fe8abdbcc78d33a45e3ff57070d73257d1141bf3..9a8bc0d0e0d5e36a8d1ead5218833a12ae3488c3 100644 (file)
         <source>PREF_STOP_TRACE</source>
         <translation>Deactivate Trace (for next session only)</translation>
     </message>
+    <message>
+        <source>PREF_SHOW_COLOR_LEGEND</source>
+        <translation>Show Color Legend</translation>
+    </message>
     <message>
         <source>TIT_PVISSETTINGS</source>
         <translation>ParaVis Settings</translation>
index 158d8369ade5a948d149d12482fe93bd8999eda8..1e304e83e9eb160564a4c55071642f8f93b8b185 100644 (file)
@@ -84,6 +84,18 @@ int vtkELNOSurfaceFilter::RequestData(vtkInformation *request,
   vtkIdTypeArray* originalPointIds=vtkIdTypeArray::SafeDownCast(
       surface->GetPointData()->GetArray("vtkOriginalPointIds"));
 
+  if( originalCellIds == NULL )
+  {
+    vtkErrorMacro("vtkPVGeometryFilter return NULL 'vtkOriginalCellIds' array");
+    return 0;
+  }
+
+  if(originalPointIds==NULL)
+  {
+    vtkErrorMacro("vtkPVGeometryFilter return NULL 'vtkOriginalPointIds' array");
+    return 0;
+  }
+
   vtkSmartPointer<vtkShrinkFilter> shrink=
       vtkSmartPointer<vtkShrinkFilter>::New();
   shrink->SetInput(surface);
index 931c0acfae99a363717dd1e6a0733f0bc017511c..99ac5070f941993745327489de7d5ad94be42f31 100644 (file)
@@ -185,9 +185,27 @@ int vtkMedEntityArray::IsConnectivityLoaded()
 
   if(this->Connectivity == MED_NODAL && this->Entity.EntityType != MED_STRUCT_ELEMENT)
     {
-    vtkIdType connSize = this->NumberOfEntity
-        * vtkMedUtilities::GetNumberOfPoint(this->Entity.GeometryType);
-
+    vtkIdType connSize = 0;
+    if(this->Entity.GeometryType == MED_POLYHEDRON || this->Entity.GeometryType == MED_POLYGON)
+      {
+      if(!this->NodeIndex || !this->FaceIndex)
+        return 0;
+      for(med_int i  = 0; i < this->NumberOfEntity; i++ ) 
+        {
+        med_int start = this->FaceIndex->GetValue(i)-1;
+        med_int end = this->FaceIndex->GetValue(i+1)-1;
+        for(med_int fi = start ; fi < end; fi++ ) 
+          {          
+          med_int fstart = this->NodeIndex->GetValue(fi)-1;
+          med_int fend = this->NodeIndex->GetValue(fi+1)-1;
+          connSize += (fend-fstart);
+          }
+        }
+      } else
+        {
+        connSize = this->NumberOfEntity * 
+        vtkMedUtilities::GetNumberOfPoint(this->Entity.GeometryType);
+        }
     return connSize == this->ConnectivityArray->GetNumberOfTuples();
     }
   else if (this->Connectivity == MED_NODAL && this->Entity.EntityType == MED_STRUCT_ELEMENT)
index 9666c4a77bc327b48948aac80096509902c1387b..e9ac161fd0beb7e8ae19ff3b22452bb03a85a298 100644 (file)
@@ -269,10 +269,9 @@ void  vtkMedFamilyOnEntityOnProfile::ComputeUsedPoints()
       this->UseAllPoints = true;
       return;
       }
-    // if there is no profile, the grid is structured, the entity is on cell
+    // if there is no profile, the entity is on cell
     // and there is at most 1 family on his entity, then all points are used
-    if(vtkMedUnstructuredGrid::SafeDownCast(grid) == NULL &&
-       this->FamilyOnEntity->GetPointOrCell() == vtkMedUtilities::OnCell &&
+    if(this->FamilyOnEntity->GetPointOrCell() == vtkMedUtilities::OnCell &&
        this->FamilyOnEntity->GetEntityArray()->GetNumberOfFamilyOnEntity() <= 1)
       {
       this->UseAllPoints = true;
index 0661aee66b3825d5cba34d6540c9c4539f5eb1f7..f51a704bb706b87a792703051704026ade271905 100644 (file)
@@ -181,6 +181,7 @@ void  vtkMedField::ExtractFieldType(vtkMedField* otherfield, int type)
     vtkMedFieldStep* otherstep = otherfield->GetFieldStep(stepid);
     vtkMedFieldStep* step = vtkMedFieldStep::New();
     step->SetComputeStep(otherstep->GetComputeStep());
+    step->SetMedIterator(otherstep->GetMedIterator());
     this->AddFieldStep(step);
     step->Delete();
 
index ad186be2393a0a09092af5127eefbde22b4de668..5a43dc053d68305c79fac642ae283e72f686249c 100644 (file)
@@ -246,6 +246,7 @@ vtkDataSet* vtkMedUnstructuredGrid::CreateVTKDataSet(
     if (controller->GetNumberOfProcesses() > 1)
     valid = 1;
 
+  array->LoadConnectivity();
   for (vtkIdType pindex = 0; pindex<maxId && valid; pindex++)
     {
     vtkIdType realIndex = (pids!=NULL?
@@ -255,8 +256,6 @@ vtkDataSet* vtkMedUnstructuredGrid::CreateVTKDataSet(
     if (!foep->KeepCell(realIndex))
       continue;
 
-    array->GetCellVertices(realIndex, pts);
-
     for(int sid = 0; sid < nsupportcell; sid++)
       {
       cellGlobalIds->InsertNextValue(intialGlobalId+pindex);
@@ -288,6 +287,7 @@ vtkDataSet* vtkMedUnstructuredGrid::CreateVTKDataSet(
       }
     else
       {
+      array->GetCellVertices(realIndex, pts);
       vtkpts->Initialize();
       vtkpts->SetNumberOfIds(pts->GetNumberOfIds());