From: ouv Date: Wed, 22 Jun 2011 11:59:31 +0000 (+0000) Subject: Issue 0020749: EDF 1291 SMESH : Create 2D Mesh from 3D improvement X-Git-Tag: V6_3_1rc1~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=03709d64b3ab9e2eb4b5b87a70cc52cb7a6f9810;p=modules%2Fsmesh.git Issue 0020749: EDF 1291 SMESH : Create 2D Mesh from 3D improvement Note 0011034 (small bug in visualization) --- diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index e867630dc..c285e40c1 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -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; } diff --git a/src/OBJECT/SMESH_ActorDef.h b/src/OBJECT/SMESH_ActorDef.h index 682748007..339afd405 100644 --- a/src/OBJECT/SMESH_ActorDef.h +++ b/src/OBJECT/SMESH_ActorDef.h @@ -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;