]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for '54311: Ugly representation in the VTK Viewer after creation of the ParaView...
authorrnv <rnv@opencascade.com>
Thu, 14 Sep 2017 15:25:22 +0000 (18:25 +0300)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 15 Sep 2017 14:52:47 +0000 (16:52 +0200)
src/SVTK/SVTK_DeviceActor.cxx
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/VTKViewer_Actor.h

index efa906100d974096ffee624b68e5ffc665228c4d..8fefd95a8de2f810a978a6a197dbf03356b55418 100644 (file)
@@ -62,8 +62,8 @@ SVTK_DeviceActor
   myRepresentation = VTKViewer::Representation::Surface;
 
   myIsResolveCoincidentTopology = true;
-  vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
-                                                                 myPolygonOffsetUnits);
+  VTKViewer_Actor::GetDefaultPolygonOffsetParameters(myPolygonOffsetFactor,
+                                                     myPolygonOffsetUnits);
 
   myMapper = VTKViewer_DataSetMapper::New();
 
index 76f5d153bde1b9a64534a216f774c4ab2b6b0c82..56312d57d09a6b9f139ca15591a48b63a53de2b4 100755 (executable)
@@ -74,8 +74,8 @@ VTKViewer_Actor
   myIsPreselected(false),
   myIsHighlighted(false)
 {
-  vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
-                                                                 myPolygonOffsetUnits);
+  VTKViewer_Actor::GetDefaultPolygonOffsetParameters(myPolygonOffsetFactor,
+                                                    myPolygonOffsetUnits);
 
   for(int i = 0; i < 6; i++)
     myPassFilter.push_back(vtkPassThroughFilter::New());
@@ -273,6 +273,19 @@ VTKViewer_Actor
   units = myPolygonOffsetUnits;
 }
 
+/*!
+  Get polygon offset parameters
+  \param factor, units  - Opengl polygon offset parameters
+*/
+void
+VTKViewer_Actor
+::GetDefaultPolygonOffsetParameters(double& factor, 
+                                   double& units)
+{
+  factor = 2.0;
+  units = 2.0;
+}
+
 /*!
   \return shrink factor
 */
index e09c1e3e5184d211c428b4e3036aef5aeac3ce2e..306578bec9574cfe0634f4899f506a1d17173414 100755 (executable)
@@ -257,6 +257,12 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   void
   GetPolygonOffsetParameters(double& factor, 
                              double& units);
+  
+  //! Get default ResolveCoincidentTopology parameters
+  static 
+  void
+  GetDefaultPolygonOffsetParameters(double& factor, 
+                                   double& units);
 
   virtual
   void