Salome HOME
22806: EDF SMESH: Regression: Prism_3D error
[modules/smesh.git] / src / SMESH_I / SMESH_Filter_i.hxx
index fa9436722ee7435cb9689dbd7e6de5dcddcff1a8..92c4618df1bc21d77a11d057c435f77639c83331 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 #include <list>
 
-class SMESHDS_Mesh;
-
 namespace SMESH
 {
-
-  // ================================================================================
-  namespace Controls
-  {
-
-    /*
-      Class       : BelongToGeom
-      Description : Predicate for verifying whether entiy belong to
-      specified geometrical support
-    */
-    class SMESH_I_EXPORT BelongToGeom: public virtual Predicate
-    {
-    public:
-      BelongToGeom();
-
-      virtual void                    SetMesh( const 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();
-      const SMESHDS_Mesh*             GetMeshDS() const;
-
-      void                            SetTolerance( double );
-      double                          GetTolerance();
-
-    private:
-      virtual void                    init();
-
-      TopoDS_Shape                    myShape;
-      const SMESHDS_Mesh*             myMeshDS;
-      SMDSAbs_ElementType             myType;
-      bool                            myIsSubshape;
-      double                          myTolerance;          // only if myIsSubshape == false
-      Controls::ElementsOnShapePtr    myElementsOnShapePtr; // only if myIsSubshape == false
-    };
-    typedef boost::shared_ptr<BelongToGeom> BelongToGeomPtr;
-
-    /*
-      Class       : LyingOnGeom
-      Description : Predicate for verifying whether entiy lying or partially lying on
-      specified geometrical support
-    */
-    class SMESH_I_EXPORT LyingOnGeom: public virtual Predicate
-    {
-    public:
-      LyingOnGeom();
-      
-      virtual void                    SetMesh( const 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();
-      const SMESHDS_Mesh*             GetMeshDS() const;
-
-      void                            SetTolerance( double );
-      double                          GetTolerance();
-      
-      virtual bool                    Contains( const SMESHDS_Mesh*     theMeshDS,
-                                                const TopoDS_Shape&     theShape,
-                                                const SMDS_MeshElement* theElem,
-                                                TopAbs_ShapeEnum        theFindShapeEnum,
-                                                TopAbs_ShapeEnum        theAvoidShapeEnum = TopAbs_SHAPE );
-    private:
-      virtual void                    init();
-
-      TopoDS_Shape                    myShape;
-      const SMESHDS_Mesh*             myMeshDS;
-      SMDSAbs_ElementType             myType;
-      bool                            myIsSubshape;
-      double                          myTolerance;          // only if myIsSubshape == false
-      Controls::ElementsOnShapePtr    myElementsOnShapePtr; // only if myIsSubshape == false
-    };
-    typedef boost::shared_ptr<LyingOnGeom> LyingOnGeomPtr;
-
-  } // namespace Controls
-
   // ================================================================================
   /*
     FUNCTORS
@@ -162,7 +76,11 @@ namespace SMESH
   {
   public:
     CORBA::Double                   GetValue( CORBA::Long theElementId );
-    SMESH::Histogram*               GetHistogram(CORBA::Short nbIntervals, CORBA::Boolean isLogarithmic);
+    SMESH::Histogram*               GetHistogram(CORBA::Short   nbIntervals,
+                                                 CORBA::Boolean isLogarithmic);
+    SMESH::Histogram*               GetLocalHistogram(CORBA::Short               nbIntervals,
+                                                      CORBA::Boolean            isLogarithmic,
+                                                      SMESH::SMESH_IDSource_ptr object);
     void                            SetPrecision( CORBA::Long thePrecision );
     CORBA::Long                     GetPrecision();
     Controls::NumericalFunctorPtr   GetNumericalFunctor();
@@ -383,6 +301,7 @@ namespace SMESH
   {
   public:
     CORBA::Boolean                  IsSatisfy( CORBA::Long theElementId );
+    CORBA::Long                     NbSatisfying( SMESH::SMESH_IDSource_ptr obj );
     Controls::PredicatePtr          GetPredicate();
     
   protected:
@@ -1029,6 +948,7 @@ namespace SMESH
     // =========================
     virtual SMESH::long_array*           GetIDs();
     virtual SMESH::long_array*           GetMeshInfo();
+    virtual SMESH::long_array*           GetNbElementsByType();
     virtual SMESH::array_of_ElementType* GetTypes();
     virtual SMESH::SMESH_Mesh_ptr        GetMesh();
     virtual bool                         IsMeshInfoCorrect() { return true; }