]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0022670: [CEA 1095] Deflection coefficient has no influence on a shape displayed...
authorvsr <vsr@opencascade.com>
Fri, 7 Nov 2014 15:37:50 +0000 (18:37 +0300)
committerFlorian BRUNET <FB15EB3N@dsp0657834.(none)>
Thu, 13 Nov 2014 13:26:25 +0000 (14:26 +0100)
src/GEOMGUI/GEOM_Displayer.cxx

index b13c9321110193693ece36531ff6ff852395ecb4..f9c14313c67474e0f07b1009da6a93b081752e6f 100644 (file)
 
 // Hard-coded value of shape deflection coefficient for VTK viewer
 const double VTK_MIN_DEFLECTION = 0.001;
+// If the next macro is defined, the deflection coefficient for VTK presentation
+// is limited by VTK_MIN_DEFLECTION
+//#define LIMIT_DEFLECTION_FOR_VTK
 
 // Pixmap caching support
 namespace
@@ -1042,7 +1045,11 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
   // actor->SetShape(myShape,aDefPropMap.value(GEOM::propertyName( GEOM::Deflection )).toDouble(),myType == GEOM_VECTOR);
   /////////////////////////////////////////////////////////////////////////
   if ( !actor->getTopo().IsSame( myShape ) )
+#ifdef LIMIT_DEFLECTION_FOR_VTK
     actor->SetShape( myShape, VTK_MIN_DEFLECTION, myType == GEOM_VECTOR );
+#else
+    actor->SetShape( myShape, qMax( propMap.value( GEOM::propertyName( GEOM::Deflection ) ).toDouble(), GEOM::minDeflection() ), myType == GEOM_VECTOR );
+#endif
 
   // set material
   Material_Model material;