Salome HOME
PAL7358. Add BadOrientedVolume predicate
[modules/smesh.git] / src / SMESH_I / SMESH_Filter_i.hxx
index 2c3efb20eccbc020c20826ada847aba3a7d5e273..7a09289e05fbc6563a1e1cf789d95cc9ff421867 100644 (file)
@@ -35,7 +35,7 @@
 #include <TopoDS_Shape.hxx>
 
 #include "SALOME_GenericObj_i.hh"
-#include "SMESH_Controls.hxx"
+#include "SMESH_ControlsDef.hxx"
 
 class SMESHDS_Mesh;
 
@@ -72,6 +72,39 @@ private:
   SMDSAbs_ElementType             myType;
 };
 typedef boost::shared_ptr<BelongToGeom> BelongToGeomPtr;
+
+/*
+  Class       : LyingOnGeom
+  Description : Predicate for verifying whether entiy lying or partially lying on
+                specified geometrical support
+*/
+class LyingOnGeom: public virtual Predicate
+{
+public:
+                                  LyingOnGeom();
+  
+  virtual void                    SetMesh( SMDS_Mesh* theMesh );
+  virtual void                    SetGeom( const TopoDS_Shape& theShape );
+
+  virtual bool                    IsSatisfy( long theElementId );
+
+  virtual void                    SetType( SMDSAbs_ElementType theType );
+  virtual                         SMDSAbs_ElementType GetType() const;
+
+  TopoDS_Shape                    GetShape();
+  SMESHDS_Mesh*                   GetMeshDS();
+  
+  virtual bool                    Contains( SMESHDS_Mesh*           theMeshDS,
+                                           const TopoDS_Shape&     theShape,
+                                           const SMDS_MeshElement* theElem,
+                                           TopAbs_ShapeEnum        theFindShapeEnum,
+                                           TopAbs_ShapeEnum        theAvoidShapeEnum = TopAbs_SHAPE );
+private:
+  TopoDS_Shape                    myShape;
+  SMESHDS_Mesh*                   myMeshDS;
+  SMDSAbs_ElementType             myType;
+};
+typedef boost::shared_ptr<LyingOnGeom> LyingOnGeomPtr;
 }
 
 /*
@@ -141,6 +174,19 @@ public:
 };
 
 
+/*
+  Class       : AspectRatio3D_i
+  Description : Functor for calculating aspect ratio for 3D
+*/
+class AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D,
+                      public virtual NumericalFunctor_i
+{
+public:
+                                  AspectRatio3D_i();
+  FunctorType                     GetFunctorType();
+};
+
+
 /*
   Class       : Warping_i
   Description : Functor for calculating warping
@@ -205,6 +251,22 @@ public:
   FunctorType                     GetFunctorType();
 };
 
+/*
+  Class       : Length2D_i
+  Description : Functor for calculating length of edge
+*/
+class Length2D_i: public virtual POA_SMESH::Length2D,
+                 public virtual NumericalFunctor_i
+{
+public:
+                                  Length2D_i();
+  SMESH::Length2D::Values*        GetValues();
+  FunctorType                     GetFunctorType();
+
+protected:
+  Controls::Length2DPtr          myLength2DPtr;
+};
+
 
 /*
   Class       : MultiConnection_i
@@ -218,6 +280,22 @@ public:
   FunctorType                     GetFunctorType();
 };
 
+/*
+  Class       : MultiConnection2D_i
+  Description : Functor for calculating number of faces conneted to the edge
+*/
+class MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D,
+                          public virtual NumericalFunctor_i
+{
+public:
+                                     MultiConnection2D_i();
+  SMESH::MultiConnection2D::Values*  GetValues();
+  FunctorType                        GetFunctorType();
+
+protected:
+  Controls::MultiConnection2DPtr     myMulticonnection2DPtr;
+};
+
 
 /*
                             PREDICATES
@@ -238,6 +316,19 @@ protected:
 };
 
 
+/*
+  Class       : BadOrientedVolume_i
+  Description : Verify whether a mesh volume is incorrectly oriented from
+                the point of view of MED convention
+*/
+class BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume,
+                           public virtual Predicate_i
+{
+ public:
+  BadOrientedVolume_i();
+  FunctorType                     GetFunctorType();
+};
+
 /*
   Class       : BelongToGeom_i
   Description : Predicate for selection on geometrical support
@@ -314,6 +405,30 @@ public:
   FunctorType                     GetFunctorType();
 };
 
+/*
+  Class       : LyingOnGeom_i
+  Description : Predicate for selection on geometrical support(lying or partially lying)
+*/
+class LyingOnGeom_i: public virtual POA_SMESH::LyingOnGeom,
+                    public virtual Predicate_i
+{
+public:
+                                  LyingOnGeom_i();
+  virtual                         ~LyingOnGeom_i();
+    
+  void                            SetGeom( GEOM::GEOM_Object_ptr theGeom );
+  void                            SetElementType( ElementType theType );
+  FunctorType                     GetFunctorType();
+  
+  void                            SetGeom( const TopoDS_Shape& theShape );
+  
+  void                            SetShapeName( const char* theName );
+  char*                           GetShapeName();
+  
+protected:
+  Controls::LyingOnGeomPtr        myLyingOnGeomPtr;
+  char*                           myShapeName;
+};
 
 /*
   Class       : FreeBorders_i
@@ -583,22 +698,29 @@ public:
                             FilterManager_i();
   MinimumAngle_ptr          CreateMinimumAngle();
   AspectRatio_ptr           CreateAspectRatio();
+  AspectRatio3D_ptr         CreateAspectRatio3D();
   Warping_ptr               CreateWarping();
   Taper_ptr                 CreateTaper();
   Skew_ptr                  CreateSkew();
   Area_ptr                  CreateArea();
   Length_ptr                CreateLength();
+  Length2D_ptr              CreateLength2D();
   MultiConnection_ptr       CreateMultiConnection();
+  MultiConnection2D_ptr     CreateMultiConnection2D();
   
   BelongToGeom_ptr          CreateBelongToGeom();
   BelongToPlane_ptr         CreateBelongToPlane();
   BelongToCylinder_ptr      CreateBelongToCylinder();
 
+  LyingOnGeom_ptr           CreateLyingOnGeom();
+
   FreeBorders_ptr           CreateFreeBorders();
   FreeEdges_ptr             CreateFreeEdges();
 
   RangeOfIds_ptr            CreateRangeOfIds();
 
+  BadOrientedVolume_ptr     CreateBadOrientedVolume();
+
   LessThan_ptr              CreateLessThan();
   MoreThan_ptr              CreateMoreThan();
   EqualTo_ptr               CreateEqualTo();