]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
52633: Activation of the ParaVis module leads to the breaking on the pre-selection...
authorakl <alexander.kovalev@opencascade.com>
Thu, 9 Apr 2015 15:23:55 +0000 (19:23 +0400)
committerakl <alexander.kovalev@opencascade.com>
Thu, 9 Apr 2015 15:23:55 +0000 (19:23 +0400)
src/SVTK/SVTK_DeviceActor.cxx
src/VTKViewer/VTKViewer_Actor.cxx

index 675c18408861263d57156b7e04305fc6b14681ff..47f10044b1bbb26366691073e72921f4ef9f497e 100644 (file)
@@ -621,21 +621,24 @@ void
 SVTK_DeviceActor
 ::Render(vtkRenderer *ren, vtkMapper* m)
 {
-  if(myIsResolveCoincidentTopology){
-    int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
-    double aFactor, aUnit; 
-    vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
-    
-    vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
-    vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
-                                                                   myPolygonOffsetUnits);
-    Superclass::Render(ren,m);
-    
-    vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
-    vtkMapper::SetResolveCoincidentTopology(aResolveCoincidentTopology);
-  }else{
-    Superclass::Render(ren,m);
+  int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
+  double aFactor, aUnit; 
+  vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
+  
+  double aNewFactor = myPolygonOffsetFactor, aNewUnit = myPolygonOffsetUnits;
+  if(!myIsResolveCoincidentTopology){
+    static double EPS = .01;
+    aNewFactor *= (1.0-EPS);
+    aNewUnit *= (1.0-EPS);
   }
+  
+  vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
+  vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aNewFactor,
+                                                                aNewUnit);
+  Superclass::Render(ren,m);
+  
+  vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
+  vtkMapper::SetResolveCoincidentTopology(aResolveCoincidentTopology);
 }
 
 /*!
index f68d23d851ba75e245f430a65872a0d5733588d6..2080fe6d7f5b9a7fbc9a8d4b62b6874ad1931332 100755 (executable)
@@ -218,21 +218,24 @@ VTKViewer_Actor
       SetNumberOfCloudPoints(aNbOfPoints);
   }
 
-  if(myIsResolveCoincidentTopology){
-    int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
-    double aFactor, aUnit; 
-    vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
+  int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
+  double aFactor, aUnit; 
+  vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
+  
+  double aNewFactor = myPolygonOffsetFactor, aNewUnit = myPolygonOffsetUnits;
+  if(!myIsResolveCoincidentTopology){
+    static double EPS = .01;
+    aNewFactor *= (1.0-EPS);
+    aNewUnit *= (1.0-EPS);
+  }
     
-    vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
-    vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
-                                                                   myPolygonOffsetUnits);
-    Superclass::Render(ren,m);
+  vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
+  vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aNewFactor,
+                                                                aNewUnit);
+  Superclass::Render(ren,m);
     
-    vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
-    vtkMapper::SetResolveCoincidentTopology(aResolveCoincidentTopology);
-  }else{
-    Superclass::Render(ren,m);
-  }
+  vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
+  vtkMapper::SetResolveCoincidentTopology(aResolveCoincidentTopology);
 }
 
 /*!