]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug NPAL13676
authorapo <apo@opencascade.com>
Tue, 27 May 2008 06:36:41 +0000 (06:36 +0000)
committerapo <apo@opencascade.com>
Tue, 27 May 2008 06:36:41 +0000 (06:36 +0000)
 - EDF 318 : VISU Post-processing on quadratic elements

src/CONVERTOR/VISU_ConvertorUtils.cxx
src/CONVERTOR/VISU_ConvertorUtils.hxx
src/VISUGUI/VisuGUI_Selection.cxx

index a4cee79f990bb82bfbe4b74009b62b613584c184..9a2dd969199a7b88c0a008bcad139076e624a9f5 100644 (file)
@@ -233,6 +233,23 @@ namespace VISU
     return aDataSetAttributes->GetArray("VISU_FIELD") != NULL;
   }
 
+  //---------------------------------------------------------------
+  bool 
+  IsElnoData(vtkDataSet* theDataSet)
+  {
+    theDataSet->Update();
+
+    if ( vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData() )
+      if ( aDataSetAttributes->GetArray( "ELNO_FIELD" )  != NULL )
+       return true;
+
+    if ( vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData() )
+      if ( aDataSetAttributes->GetArray( "ELNO_POINT_COORDS" )  != NULL )
+       return true;
+
+    return false;
+  }
+
 
   //---------------------------------------------------------------
   vtkIdType
index 17c12fde39f9c1dfdb3cb15dd70ded4ef90a7a20..2c1bff9222b259fe7fdef61d2c8ab81273306a56 100644 (file)
@@ -90,6 +90,11 @@ namespace VISU
   bool 
   IsDataOnCells(vtkDataSet* theDataSet);
 
+  //---------------------------------------------------------------
+  VISU_CONVERTOR_EXPORT
+  bool 
+  IsElnoData(vtkDataSet* theDataSet);
+
 
   //---------------------------------------------------------------
   VISU_CONVERTOR_EXPORT
index 4670d7cfc85a1d68536807b798a64d36a1d9a53b..d2e699a8ed6aaf3901c7afec33368d2ef4c01845 100644 (file)
@@ -54,6 +54,8 @@
 #include "SVTK_ViewWindow.h"
 #include "SVTK_Selector.h"
 
+#include "VISU_ConvertorUtils.hxx"
+
 #include "utilities.h"
 
 // OCCT Includes
@@ -445,22 +447,28 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
         case 0:
           {
            int aVTKID = anVISUActor->GetNodeVTKID(anID);
-           if(aVTKID >= 0){
+           if ( aVTKID >= 0 ) {
              vtkFloatingPointType* aCoord = anVISUActor->GetNodeCoord(anID);
              myXValLbl->setText( QString::number( aCoord[0] ) );
              myYValLbl->setText( QString::number( aCoord[1] ) );
              myZValLbl->setText( QString::number( aCoord[2] ) );
-             myIDValLbl->setText( QString::number(anID) );
-             myScalarValLbl->setText(getValue(aPntData, aVTKID));
-             myVectorValLbl->setText(getVector(aPntData, aVTKID));
+             myIDValLbl->setText( QString::number( anID ) );
              
+              if ( !VISU::IsElnoData( aDataSet ) ) {
+               myScalarValLbl->setText( getValue( aPntData, aVTKID ) );
+               myVectorValLbl->setText( getVector( aPntData, aVTKID ) );
+             } else {
+               myScalarValLbl->setText( "< ELNO data >" );
+               myVectorValLbl->setText( "< ELNO data >" );
+             }
+
              const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
-             VISU::TStructuredId aStructuredId = aMapper->GetIndexesOfNode(anID);
+             VISU::TStructuredId aStructuredId = aMapper->GetIndexesOfNode( anID );
              myKValLbl->setText( GetNumber( aStructuredId, 2 ) );
              myJValLbl->setText( GetNumber( aStructuredId, 1 ) );
              myIValLbl->setText( GetNumber( aStructuredId, 0 ) );
-           }
-         }
+            }
+          }
           break;
         case 1:
           {