From: Viktor UZLOV Date: Wed, 14 Jul 2021 16:56:00 +0000 (+0300) Subject: fix edge and polygon artifacts. No coincident patch X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3dd8c2397132f37920ed040db0a55709f43274c8;p=modules%2Fsmesh.git fix edge and polygon artifacts. No coincident patch --- diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 5c64804ec..8baeb3c8b 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -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 )