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-Tag: V8_4_0a2~3^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5606395f831825d448f3629adeb41cf4489202bd;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