]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESH/SMESH_Algo.hxx
Salome HOME
NPAL16631: EDF281: Crash on update mesh if computation failed because of memory lack.
[modules/smesh.git] / src / SMESH / SMESH_Algo.hxx
index 02c76d253efd2a5b109d6ad4bc50f897384ec130..705e95c00495ca22f030fc4a65767e5104cdfeed 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "SMESH_Hypothesis.hxx"
 #include "SMESH_ComputeError.hxx"
+#include "SMESH_Comment.hxx"
 
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Edge.hxx>
@@ -50,7 +51,6 @@ class SMESHDS_Mesh;
 class SMDS_MeshNode;
 class SMESH_subMesh;
 class SMESH_MesherHelper;
-class SMESH_Comment;
 
 
 class SMESH_Algo:public SMESH_Hypothesis
@@ -258,8 +258,14 @@ public:
     * \param E2 - the 2nd edge
     * \retval GeomAbs_Shape - regularity at the junction between E1 and E2
    */
-  static GeomAbs_Shape Continuity(const TopoDS_Edge & E1,
-                                  const TopoDS_Edge & E2);
+  static GeomAbs_Shape Continuity(const TopoDS_Edge & E1, const TopoDS_Edge & E2);
+
+  /*!
+   * \brief Return true if an edge can be considered as a continuation of another
+   */
+  static bool IsContinuous(const TopoDS_Edge & E1, const TopoDS_Edge & E2) {
+    return ( Continuity( E1, E2 ) >= GeomAbs_G1 );
+  }
 
   /*!
    * \brief Return the node built on a vertex
@@ -277,9 +283,10 @@ protected:
    */
   bool error(int error, const SMESH_Comment& comment = "");
   /*!
-   * \brief To be used as error in previous method
+   * \brief store COMPERR_ALGO_FAILED error and comment and then return false
    */
-  SMESH_ComputeErrorName dfltErr() const { return COMPERR_ALGO_FAILED; }
+  bool error(const SMESH_Comment& comment = "")
+  { return error(COMPERR_ALGO_FAILED, comment); }
   /*!
    * \brief store error and return error->IsOK()
    */