Salome HOME
Merge from V5_1_main 10/12/2010
[modules/smesh.git] / src / Controls / SMESH_ControlsDef.hxx
index 915bd9f4bf1126485f452b2c1d839fec2453fe9e..0a71438d7806c43053938606b0acfa9d0dc4cc1f 100644 (file)
@@ -127,9 +127,11 @@ namespace SMESH{
       virtual void SetMesh( const SMDS_Mesh* theMesh );
       virtual double GetValue( long theElementId );
       virtual double GetValue(const TSequenceOfXYZ& thePoints) { return -1.0;};
-      void GetHistogram(int                  nbIntervals,
-                        std::vector<int>&    nbEvents,
-                        std::vector<double>& funValues);
+      void GetHistogram(int                     nbIntervals,
+                        std::vector<int>&       nbEvents,
+                        std::vector<double>&    funValues,
+                        const std::vector<int>& elements,
+                        const double*           minmax=0);
       virtual SMDSAbs_ElementType GetType() const = 0;
       virtual double GetBadRate( double Value, int nbNodes ) const = 0;
       long  GetPrecision() const;
@@ -373,11 +375,72 @@ namespace SMESH{
       virtual void SetMesh( const SMDS_Mesh* theMesh );
       virtual bool IsSatisfy( long theElementId );
       virtual SMDSAbs_ElementType GetType() const;
-            
+
     protected:
       const SMDS_Mesh* myMesh;
     };
-   
+
+    /*
+      BareBorderVolume
+    */
+    class SMESHCONTROLS_EXPORT BareBorderVolume: public Predicate
+    {
+    public:
+      BareBorderVolume():myMesh(0) {}
+      virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
+      virtual SMDSAbs_ElementType GetType() const      { return SMDSAbs_Volume; }
+      virtual bool IsSatisfy( long theElementId );
+    protected:
+      const SMDS_Mesh* myMesh;
+    };
+    typedef boost::shared_ptr<BareBorderVolume> BareBorderVolumePtr;
+
+    /*
+      BareBorderFace
+    */
+    class SMESHCONTROLS_EXPORT BareBorderFace: public Predicate
+    {
+    public:
+      BareBorderFace():myMesh(0) {}
+      virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
+      virtual SMDSAbs_ElementType GetType() const      { return SMDSAbs_Face; }
+      virtual bool IsSatisfy( long theElementId );
+    protected:
+      const SMDS_Mesh* myMesh;
+      std::vector< const SMDS_MeshNode* > myLinkNodes;
+    };
+    typedef boost::shared_ptr<BareBorderFace> BareBorderFacePtr;
+
+    /*
+      OverConstrainedVolume
+    */
+    class SMESHCONTROLS_EXPORT OverConstrainedVolume: public Predicate
+    {
+    public:
+      OverConstrainedVolume():myMesh(0) {}
+      virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
+      virtual SMDSAbs_ElementType GetType() const      { return SMDSAbs_Volume; }
+      virtual bool IsSatisfy( long theElementId );
+    protected:
+      const SMDS_Mesh* myMesh;
+    };
+    typedef boost::shared_ptr<OverConstrainedVolume> OverConstrainedVolumePtr;
+
+    /*
+      OverConstrainedFace
+    */
+    class SMESHCONTROLS_EXPORT OverConstrainedFace: public Predicate
+    {
+    public:
+      OverConstrainedFace():myMesh(0) {}
+      virtual void SetMesh( const SMDS_Mesh* theMesh ) { myMesh = theMesh; }
+      virtual SMDSAbs_ElementType GetType() const      { return SMDSAbs_Face; }
+      virtual bool IsSatisfy( long theElementId );
+    protected:
+      const SMDS_Mesh* myMesh;
+      std::vector< const SMDS_MeshNode* > myLinkNodes;
+    };
+    typedef boost::shared_ptr<OverConstrainedFace> OverConstrainedFacePtr;
 
     /*
       Class       : FreeEdges
@@ -399,7 +462,7 @@ namespace SMESH{
       };
       typedef std::set<Border> TBorders;
       void GetBoreders(TBorders& theBorders);
-      
+
     protected:
       const SMDS_Mesh* myMesh;
     };