Salome HOME
22261: EDF 2698 SMESH: Memory leak when displaying 2D quadratic elements as arcs
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshEditPreview.cxx
index ac71ddbc44e1231fca74c8b0f742ef99ccf5f677..439abbb57c86c3f93b0d948c7cabe6c76f689e09 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -66,19 +66,19 @@ SMESHGUI_MeshEditPreview::SMESHGUI_MeshEditPreview(SVTK_ViewWindow* theViewWindo
 
   // Create and display actor
   vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
-  aMapper->SetInput( myGrid );
+  aMapper->SetInputData( myGrid );
 
   myPreviewActor = SALOME_Actor::New();
   myPreviewActor->SetInfinitive(true);
   myPreviewActor->VisibilityOn();
   myPreviewActor->PickableOff();
 
-  vtkFloatingPointType aFactor,aUnits;
+  double aFactor,aUnits;
   myPreviewActor->SetResolveCoincidentTopology(true);
   myPreviewActor->GetPolygonOffsetParameters(aFactor,aUnits);
   myPreviewActor->SetPolygonOffsetParameters(aFactor,0.2*aUnits);
 
-  vtkFloatingPointType anRGB[3];
+  double anRGB[3];
   SMESH::GetColor( "SMESH", "selection_element_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
   SetColor( anRGB[0], anRGB[1], anRGB[2] );
 
@@ -111,8 +111,8 @@ SMESHGUI_MeshEditPreview::~SMESHGUI_MeshEditPreview()
 //================================================================================
 
 vtkIdType getCellType( const SMDSAbs_ElementType theType,
-                       const bool thePoly,
-                       const int theNbNodes )
+                       const bool                thePoly,
+                       const int                 theNbNodes )
 {
   switch( theType ) 
   {
@@ -127,6 +127,7 @@ vtkIdType getCellType( const SMDSAbs_ElementType theType,
     else if ( theNbNodes == 3 )   return VTK_TRIANGLE;
     else if ( theNbNodes == 4 )   return VTK_QUAD;
     else if ( theNbNodes == 6 )   return VTK_QUADRATIC_TRIANGLE;
+    else if ( theNbNodes == 7 )   return VTK_BIQUADRATIC_TRIANGLE;
     else if ( theNbNodes == 8 )   return VTK_QUADRATIC_QUAD;
     else if ( theNbNodes == 9 )   return VTK_BIQUADRATIC_QUAD;
     else return VTK_EMPTY_CELL;