]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
fix edge and polygon artifacts. No coincident patch
authorViktor UZLOV <viktor.uzlov@opencascade.com>
Wed, 14 Jul 2021 16:56:00 +0000 (19:56 +0300)
committerViktor UZLOV <viktor.uzlov@opencascade.com>
Wed, 14 Jul 2021 16:56:00 +0000 (19:56 +0300)
src/OBJECT/SMESH_Actor.cxx

index 5c64804eca223a049966f2fa596578f2818f5c12..8baeb3c8b1b3d5c69d5da10b6fc9856d5d2269da 100644 (file)
@@ -1265,12 +1265,20 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
   my2DExtActor->GetMapper()->SetLookupTable(myLookupTable);
   my3DActor->GetMapper()->SetLookupTable(myLookupTable);
   my3DExtActor->GetMapper()->SetLookupTable(myLookupTable);
-    
+
+  // vuzlov: Fix polygons and edges artifacts without Paraview
+  // coincident patch. See also #18940.
+  // NOTE: use Resolve coincident topology for actors in the same 
+  // mapper. If several mappers, then use Relative coincident topology
   double aFactor, aUnits;
   my2DActor->GetPolygonOffsetParameters(aFactor,aUnits);
-  my2DActor->SetPolygonOffsetParameters(aFactor,aUnits*0.75);
+  my2DActor->SetPolygonOffsetParameters(aFactor,aUnits);
   my2DExtActor->SetPolygonOffsetParameters(aFactor,aUnits*0.5);
-  my3DActor->SetPolygonOffsetParameters(2*aFactor,aUnits);
+  my3DActor->SetPolygonOffsetParameters(aFactor*2,aUnits*2);
+  myHighlitableActor->GetMapper()->SetRelativeCoincidentTopologyLineOffsetParameters(aFactor*(-1.0),
+                                                                                     aUnits*(-50));
+  my2DActor->GetMapper()->SetRelativeCoincidentTopologyPolygonOffsetParameters(-aFactor, -aUnits);
+  my3DActor->GetMapper()->SetRelativeCoincidentTopologyLineOffsetParameters(-aUnits-1, -aUnits-1);
 
   SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
   if( !mgr )