From: rnv Date: Thu, 14 Sep 2017 15:25:22 +0000 (+0300) Subject: Fix for '54311: Ugly representation in the VTK Viewer after creation of the ParaView... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=74379e88524529b80c51c271873db230ba7f5e33;p=modules%2Fgui.git Fix for '54311: Ugly representation in the VTK Viewer after creation of the ParaView Viewer' issue. --- diff --git a/src/SVTK/SVTK_DeviceActor.cxx b/src/SVTK/SVTK_DeviceActor.cxx index efa906100..8fefd95a8 100644 --- a/src/SVTK/SVTK_DeviceActor.cxx +++ b/src/SVTK/SVTK_DeviceActor.cxx @@ -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(); diff --git a/src/VTKViewer/VTKViewer_Actor.cxx b/src/VTKViewer/VTKViewer_Actor.cxx index 76f5d153b..56312d57d 100755 --- a/src/VTKViewer/VTKViewer_Actor.cxx +++ b/src/VTKViewer/VTKViewer_Actor.cxx @@ -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 */ diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index e09c1e3e5..306578bec 100755 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -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