Salome HOME
Fix problems with the OpenGL clipping planes.
authorrnv <rnv@opencascade.com>
Wed, 19 Feb 2014 12:43:32 +0000 (16:43 +0400)
committerrnv <rnv@opencascade.com>
Wed, 19 Feb 2014 12:43:32 +0000 (16:43 +0400)
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_DeviceActor.cxx
src/OBJECT/SMESH_DeviceActor.h

index 4ef6a5ceb4ead5fc32e73dbd93bea66a6a0aff19..e8340e7e9a65c60a0c5007e7123b7abbddfe1dab 100644 (file)
@@ -1313,7 +1313,7 @@ void SMESH_ActorDef::SetShrinkFactor(double theValue){
   Modified();
 }
 
-void SMESH_ActorDef::SetShrink(){
+void SMESH_ActorDef::SetShrink() {
   if(!myIsShrinkable) return;
 
   myBaseActor->SetShrink();
@@ -2207,7 +2207,10 @@ SMESH_ActorDef::SetOpenGLClippingPlane()
   my3DExtActor->SetPlaneCollection( myPlaneCollection );
   my3DExtActor->SetUnstructuredGrid(myVisualObj->GetUnstructuredGrid());
 
-  Modified();
+  if(IsShrunk())
+    SetShrink();
+  else  
+    Modified();
 }
 
 void
index 02eefc529731a14d306fb607f83c91587c6a3307..e286870084f15df7f3b28f05864a3c02784c3d27 100644 (file)
@@ -142,7 +142,6 @@ SMESH_DeviceActor
   if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<<this);
 
   myMapper->Delete();
-  myPlaneCollection->Delete();
 
   myProperty->Delete();
 
index e2931d88f0841d53fc1f3e1fbb86643ba6f0a7e1..a7c4dcb4898b0765f876cfdbbc7e7acd46c65fcf 100644 (file)
@@ -161,7 +161,8 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{
   VTKViewer_PolyDataMapper *myMapper;
   TVisualObjPtr myVisualObj;
 
-  vtkPlaneCollection* myPlaneCollection;
+  vtkSmartPointer<vtkPlaneCollection> myPlaneCollection;
+  
   vtkProperty *myProperty;
   EReperesent myRepresentation;