Salome HOME
0020948: EDF 1468 SMESH: Histogram of the quality controls
[modules/smesh.git] / src / Controls / SMESH_ControlsDef.hxx
index 3d55ccf3a8ffe0d567efb6bf6d4ca936d375557b..46255a26a6bf4d795b63c4d0175f1db58b0bf79e 100644 (file)
@@ -127,9 +127,10 @@ 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);
       virtual SMDSAbs_ElementType GetType() const = 0;
       virtual double GetBadRate( double Value, int nbNodes ) const = 0;
       long  GetPrecision() const;
@@ -409,6 +410,37 @@ namespace SMESH{
     };
     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
       Description : Predicate for free Edges