// Module : SMESH
#include "SMESHGUI_Filter.h"
+
+#include "SMESHGUI.h"
#include "SMESHGUI_Utils.h"
+
+#include "SMESH_Actor.h"
#include "SMDS_Mesh.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDSAbs_ElementType.hxx"
-#include <vtkCell.h>
-
+// OCCT Includes
#include <gp_Vec.hxx>
#include <Precision.hxx>
-#include "SMESH_Actor.h"
-#include "SMESHGUI.h"
+
+// VTK Includes
+#include <vtkCell.h>
IMPLEMENT_STANDARD_HANDLE(SMESHGUI_Filter, VTKViewer_Filter)
IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_Filter, VTKViewer_Filter)
SMESH_Actor* anActor = dynamic_cast<SMESH_Actor*>( myActor );
if ( !anActor || anActor->GetObject() == 0 )
return false;
-
+
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
SMESH::ElementType anElemType = myPred->GetElementType();
int aMeshId = anElemType == SMESH::NODE ? anActor->GetNodeObjId( theCellId )
: aMesh->FindElement( aMeshId );
if ( anElem != 0 && anElem->GetType() != (SMDSAbs_ElementType)myPred->GetElementType() )
return true;
-
+
return myPred->IsSatisfy( aMeshId );
}
SMESH_Actor* anActor = ( SMESH_Actor* )myActor;
if ( anActor->GetObject() == 0 )
return false;
-
+
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
SMESH::ElementType anElemType = myPred->GetElementType();
-
+
// if type of element != type of predicate return true because
// this predicate is not intended for filtering sush elements
const SMDS_MeshElement* anElem = anElemType == SMESH::NODE ? aMesh->FindNode( theObjId )
if ( myActor != 0 && !myPred->_is_nil() )
{
- Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
+ SALOME_Actor* sActor = dynamic_cast<SALOME_Actor*>( myActor );
+ Handle(SALOME_InteractiveObject) anIO;
+ if( sActor )
+ anIO = sActor->getIO();
if ( !anIO.IsNull() )
{
SMESH::SMESH_Mesh_var aMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIO);
SMESH_Actor* anActor = ( SMESH_Actor* )myActor;
if ( anActor->GetObject() == 0 )
return false;
-
+
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
const SMDS_MeshElement* anElem = aMesh->FindElement( anActor->GetElemObjId( theCellId ) );
-
+
return anElem && anElem->GetType() == SMDSAbs_Face && anElem->NbNodes() == 4;
}
SMESH_Actor* anActor = ( SMESH_Actor* )myActor;
if ( anActor->GetObject() == 0 )
return false;
-
+
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
const SMDS_MeshElement* anElem = aMesh->FindElement( theObjId );
SMESH_Actor* anActor = ( SMESH_Actor* )myActor;
if ( anActor->GetObject() == 0 )
return false;
-
+
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
const SMDS_MeshElement* anElem = aMesh->FindElement( anActor->GetElemObjId( theCellId ) );
SMESH_Actor* anActor = ( SMESH_Actor* )myActor;
if ( anActor->GetObject() == 0 )
return false;
-
+
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
const SMDS_MeshElement* anElem = aMesh->FindElement( theObjId );
SMESH_Actor* anActor = ( SMESH_Actor* )myActor;
if ( anActor->GetObject() == 0 )
return false;
-
+
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
const SMDS_MeshElement* anElem = aMesh->FindElement( anActor->GetElemObjId( theCellId ) );
SMESH_Actor* anActor = ( SMESH_Actor* )myActor;
if ( anActor->GetObject() == 0 )
return false;
-
+
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
const SMDS_MeshElement* anElem = aMesh->FindElement( theObjId );
SMESH_Actor* anActor = ( SMESH_Actor* )myActor;
if ( anActor->GetObject() == 0 )
return false;
-
+
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
const SMDS_MeshElement* anElem = aMesh->FindElement( anActor->GetElemObjId( theCellId ) );
SMESH_Actor* anActor = ( SMESH_Actor* )myActor;
if ( anActor->GetObject() == 0 )
return false;
-
+
SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
const SMDS_MeshElement* anElem = aMesh->FindElement( theObjId );
{
return false;
}
-
-
-
-
-
-
-
-
-
-
-