Salome HOME
CMake: rollback of previous changes
[modules/smesh.git] / src / SMESH / SMESH_Algo.hxx
index 8d5d4cf47eca1a566d79961a472b6a6727e622ac..0208934b862ade5b5c9d3c50e2a8d94435cea35c 100644 (file)
@@ -52,6 +52,7 @@ class SMESH_Gen;
 class SMESH_HypoFilter;
 class SMESH_Mesh;
 class SMESH_MesherHelper;
+class SMESH_ProxyMesh;
 class SMESH_subMesh;
 class TopoDS_Face;
 class TopoDS_Shape;
@@ -235,7 +236,7 @@ class SMESH_EXPORT SMESH_Algo : public SMESH_Hypothesis
    */
   SMESH_ComputeErrorPtr GetComputeError() const;
   /*!
-   * \brief initialize compute error before call of Compute()
+   * \brief initialize compute error etc. before call of Compute()
    */
   void InitComputeError();
   /*!
@@ -243,9 +244,9 @@ class SMESH_EXPORT SMESH_Algo : public SMESH_Hypothesis
    */
   double GetProgressByTic() const;
   /*!
-   * Return a storage of "compute cost" of shapes being Compute()d.
+   * Return a vector of sub-meshes to Compute()
    */
-  int& GetComputeCost() { return _computeCost; }
+  std::vector<SMESH_subMesh*>& SubMeshesToCompute() { return _smToCompute; }
 
 public:
   // ==================================================================
@@ -356,6 +357,14 @@ public:
   static bool IsContinuous(const TopoDS_Edge & E1, const TopoDS_Edge & E2) {
     return ( Continuity( E1, E2 ) >= GeomAbs_G1 );
   }
+  /*!
+   * \brief Return true if an edge can be considered straight
+   */
+  static bool isStraight( const TopoDS_Edge & E, const bool degenResult=false );
+  /*!
+   * \brief Return true if an edge has no 3D curve
+   */
+  static bool isDegenerated( const TopoDS_Edge & E );
 
   /*!
    * \brief Return the node built on a vertex
@@ -421,9 +430,11 @@ protected:
   std::list<const SMDS_MeshElement*> _badInputElements; //!< to explain COMPERR_BAD_INPUT_MESH
 
   volatile bool _computeCanceled; //!< is set to True while computing to stop it
-  int           _computeCost;     //!< "compute cost" of shapes being Compute()d
-  int           _progressTic;     //!< counter of calls from SMESH_Mesh::GetComputeProgress()
-  double        _progress;        //!< progress of Compute() [0.,1.]
+
+  double        _progress;        /* progress of Compute() [0.,1.],
+                                     to be set by an algo really tracking the progress */
+  int           _progressTic;     // counter of calls from SMESH_Mesh::GetComputeProgress()
+  std::vector<SMESH_subMesh*> _smToCompute; // sub-meshes to Compute()
 };
 
 
@@ -443,6 +454,13 @@ class SMESH_EXPORT SMESH_2D_Algo: public SMESH_Algo
 {
 public:
   SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+  /*!
+   * \brief Method in which an algorithm generating a structured mesh
+   *        fixes positions of in-face nodes after there movement
+   *        due to insertion of viscous layers.
+   */
+  virtual bool FixInternalNodes(const SMESH_ProxyMesh& mesh,
+                                const TopoDS_Face&     face);
 };
 
 class SMESH_EXPORT SMESH_3D_Algo: public SMESH_Algo