From: rnv Date: Mon, 20 Feb 2012 12:21:17 +0000 (+0000) Subject: Fix for the "0020314: EDF 993 SMESH : Display bug with Volumes created by GHS3D"... X-Git-Tag: V6_5_0a1~120 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cfddf61e776a621185b74d4650a701d06a87d104;p=modules%2Fsmesh.git Fix for the "0020314: EDF 993 SMESH : Display bug with Volumes created by GHS3D" issue (problem with displaying coincident 3D elements). --- diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 7d1ab09d1..ebe8dca8b 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -203,6 +203,7 @@ SMESH_ActorDef::SMESH_ActorDef() my3DActor->SetProperty(mySurfaceProp); my3DActor->SetBackfaceProperty(myBackSurfaceProp); my3DActor->SetRepresentation(SMESH_DeviceActor::eSurface); + my3DActor->SetCoincident3DAllowed(true); aFilter = my3DActor->GetExtractUnstructuredGrid(); aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding); aFilter->RegisterCellsWithType(VTK_TETRA); @@ -228,6 +229,7 @@ SMESH_ActorDef::SMESH_ActorDef() my3DExtActor->SetProperty(my2DExtProp); my3DExtActor->SetBackfaceProperty(my2DExtProp); my3DExtActor->SetRepresentation(SMESH_DeviceActor::eSurface); + my3DExtActor->SetCoincident3DAllowed(true); aFilter = my3DExtActor->GetExtractUnstructuredGrid(); aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding); aFilter->RegisterCellsWithType(VTK_TETRA); @@ -411,6 +413,7 @@ SMESH_ActorDef::SMESH_ActorDef() myHighlitableActor->SetUserMatrix(aMatrix); myHighlitableActor->PickableOff(); myHighlitableActor->SetRepresentation(SMESH_DeviceActor::eWireframe); + myHighlitableActor->SetCoincident3DAllowed(true); aMatrix->Delete(); diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index 7e2202460..43bf340cb 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -972,3 +972,11 @@ int SMESH_DeviceActor::GetMarkerTexture() { return myMapper->GetMarkerTexture(); } + +void SMESH_DeviceActor::SetCoincident3DAllowed(bool theFlag) { + myGeomFilter->SetAppendCoincident3D(theFlag); +} + +bool SMESH_DeviceActor::IsCoincident3DAllowed() const { + return myGeomFilter->GetAppendCoincident3D(); +} diff --git a/src/OBJECT/SMESH_DeviceActor.h b/src/OBJECT/SMESH_DeviceActor.h index 00b555cee..e00cbb8e0 100644 --- a/src/OBJECT/SMESH_DeviceActor.h +++ b/src/OBJECT/SMESH_DeviceActor.h @@ -130,6 +130,14 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{ bool IsHighlited() { return myIsHighlited;} void SetHighlited(bool theIsHighlited); + virtual + void + SetCoincident3DAllowed(bool theIsFeatureEdgesAllowed); + + virtual + bool + IsCoincident3DAllowed() const; + virtual void Render(vtkRenderer *, vtkMapper *); void SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed);