Salome HOME
Update of CheckDone
[modules/smesh.git] / src / Controls / SMESH_ControlsDef.hxx
index c1fe797bc34753f048b7728e8f44389ebdc52069..456f4b30a8237473853594b5fff070764367d0e6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -246,9 +246,35 @@ namespace SMESH{
       virtual SMDSAbs_ElementType GetType() const;
       virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
 
-    private:
+    protected:
       double ComputeA( const gp_XYZ&, const gp_XYZ&, const gp_XYZ&, const gp_XYZ& ) const;
+      double ComputeValue( const TSequenceOfXYZ& thePoints ) const;
     };
+
+    /*
+      Class       : Warping3D
+      Description : Functor for calculating warping
+    */
+    class SMESHCONTROLS_EXPORT Warping3D: public virtual Warping {
+    public:
+      virtual bool IsApplicable(const SMDS_MeshElement* element) const;
+      virtual double GetValue(const TSequenceOfXYZ& thePoints);
+      virtual double GetValue(long theId);
+      virtual SMDSAbs_ElementType GetType() const;
+      
+      struct Value {
+        double myWarp;
+        std::vector<long> myPntIds;
+        bool operator<(const Value& x) const;
+      };
+
+      typedef std::vector<Value> WValues;
+      void GetValues(WValues& theValues);
+
+    private:
+      void ProcessVolumeELement(WValues& theValues);
+    };
+    typedef boost::shared_ptr<Warping3D> Warping3DPtr;
   
   
     /*
@@ -404,6 +430,17 @@ namespace SMESH{
       virtual double GetBadRate( double Value, int nbNodes ) const;
       virtual SMDSAbs_ElementType GetType() const;
     };
+    
+    /*
+      Class       : ScaledJacobian
+      Description : Functor returning the ScaledJacobian as implemeted in VTK for volumetric elements
+    */
+    class SMESHCONTROLS_EXPORT ScaledJacobian: public virtual NumericalFunctor{
+    public:
+      virtual double GetValue( long theNodeId );
+      virtual double GetBadRate( double Value, int nbNodes ) const;
+      virtual SMDSAbs_ElementType GetType() const;
+    };
 
 
     /*
@@ -947,6 +984,7 @@ namespace SMESH{
                         const SMDSAbs_ElementType theType);
       bool    IsSatisfy (const SMDS_MeshElement* elem);
       bool    IsSatisfy (const SMDS_MeshNode* node, TopoDS_Shape* okShape=0);
+      void    GetParams( double & u, double & v ) const { u = myU; v = myV; }
 
     private:
 
@@ -963,6 +1001,7 @@ namespace SMESH{
       SMDSAbs_ElementType        myType;
       TopoDS_Shape               myShape;
       double                     myToler;
+      double                     myU, myV; // result of node projection on EDGE or FACE
       bool                       myAllNodesFlag;
 
       TMeshModifTracer           myMeshModifTracer;