]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Issue 0020749: EDF 1291 SMESH : Create 2D Mesh from 3D improvement
authorouv <ouv@opencascade.com>
Wed, 22 Jun 2011 11:59:31 +0000 (11:59 +0000)
committerouv <ouv@opencascade.com>
Wed, 22 Jun 2011 11:59:31 +0000 (11:59 +0000)
Note 0011034 (small bug in visualization)

src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_ActorDef.h

index e867630dce94d839c4e4e98f7840da09cda967f6..c285e40c1028939a19c0c956fe14bc96f91c29be 100644 (file)
@@ -33,6 +33,7 @@
 #include "SMDS_UnstructuredGrid.hxx"
 #include "SMESH_ScalarBarActor.h"
 #include "VTKViewer_CellCenters.h"
+#include "VTKViewer_DataSetMapper.h"
 #include "VTKViewer_ExtractUnstructuredGrid.h"
 #include "VTKViewer_FramedTextActor.h"
 #include "SALOME_InteractiveObject.hxx"
@@ -365,6 +366,9 @@ SMESH_ActorDef::SMESH_ActorDef()
 
   myPickableActor = myBaseActor;
 
+  myMapper = VTKViewer_DataSetMapper::New();
+  myMapper->SetInput( myPickableActor->GetUnstructuredGrid() );
+
   myHighlightProp = vtkProperty::New();
   myHighlightProp->SetAmbient(1.0);
   myHighlightProp->SetDiffuse(0.0);
@@ -627,6 +631,8 @@ SMESH_ActorDef::~SMESH_ActorDef()
 
   myImplicitBoolean->Delete();
 
+  myMapper->Delete();
+
   myTimeStamp->Delete();
 }
 
@@ -1165,7 +1171,7 @@ void SMESH_ActorDef::ShallowCopy(vtkProp *prop){
 
 
 vtkMapper* SMESH_ActorDef::GetMapper(){
-  return myPickableActor->GetMapper();
+  return myMapper;
 }
 
 
index 6827480071398c7cb1187e4d38bc464b6b3d5e5a..339afd405a4508dc9aaa8f7eb5239b023c7b40d9 100644 (file)
@@ -70,6 +70,7 @@ class vtkImplicitBoolean;
 class vtkTimeStamp;
 
 class VTKViewer_CellCenters;
+class VTKViewer_DataSetMapper;
 
 class SMESH_DeviceActor;
 class SMESH_ScalarBarActor;
@@ -230,6 +231,8 @@ class SMESH_ActorDef : public SMESH_Actor
   vtkProperty* myEdgeProp;
   vtkProperty* myNodeProp;
 
+  VTKViewer_DataSetMapper* myMapper;
+
   SMESH_DeviceActor* myBaseActor;
   SMESH_DeviceActor* myNodeActor;
   SMESH_DeviceActor* myPickableActor;