+ bool OnlyUnaryInput() const { return _onlyUnaryInput; }
+ // 2 - is collection of tesselatable shapes inacceptable as input;
+ // "collection" means a shape containing shapes of dim equal
+ // to GetDim().
+ // Algo which can process a collection shape should expect
+ // an input temporary shape that is neither MainShape nor
+ // its child.
+
+ bool NeedDescretBoundary() const { return _requireDescretBoundary; }
+ // 3 - is a Dim-1 mesh prerequisite
+
+ bool NeedShape() const { return _requireShape; }
+ // 4 - is shape existance required
+
+public:
+ // ==================================================================
+ // Methods to track non hierarchical dependencies between submeshes
+ // ==================================================================
+
+ /*!
+ * \brief Sets event listener to submeshes if necessary
+ * \param subMesh - submesh where algo is set
+ *
+ * This method is called when a submesh gets HYP_OK algo_state.
+ * After being set, event listener is notified on each event of a submesh.
+ * By default non listener is set
+ */
+ virtual void SetEventListener(SMESH_subMesh* subMesh);
+
+ /*!
+ * \brief Allow algo to do something after persistent restoration
+ * \param subMesh - restored submesh
+ *
+ * This method is called only if a submesh has HYP_OK algo_state.
+ */
+ virtual void SubmeshRestored(SMESH_subMesh* subMesh);
+
+public:
+ // ==================================================================
+ // Common algo utilities
+ // ==================================================================
+ /*!
+ * \brief Fill vector of node parameters on geometrical edge, including vertex nodes
+ * \param theMesh - The mesh containing nodes
+ * \param theEdge - The geometrical edge of interest
+ * \param theParams - The resulting vector of sorted node parameters
+ * \retval bool - false if not all parameters are OK
+ */
+ static bool GetNodeParamOnEdge(const SMESHDS_Mesh* theMesh,
+ const TopoDS_Edge& theEdge,
+ std::vector< double > & theParams);
+ /*!
+ * \brief Find out elements orientation on a geometrical face
+ * \param theFace - The face correctly oriented in the shape being meshed
+ * \param theMeshDS - The mesh data structure
+ * \retval bool - true if the face normal and the normal of first element
+ * in the correspoding submesh point in different directions
+ */
+ static bool IsReversedSubMesh (const TopoDS_Face& theFace,
+ SMESHDS_Mesh* theMeshDS);
+ /*!
+ * \brief Compute length of an edge
+ * \param E - the edge
+ * \retval double - the length
+ */
+ static double EdgeLength(const TopoDS_Edge & E);
+
+ /*!
+ * \brief Return continuity of two edges
+ * \param E1 - the 1st edge
+ * \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);
+
+ /*!
+ * \brief Return the node built on a vertex
+ * \param V - the vertex
+ * \param meshDS - mesh
+ * \retval const SMDS_MeshNode* - found node or NULL
+ */
+ static const SMDS_MeshNode* VertexNode(const TopoDS_Vertex& V,
+ SMESHDS_Mesh* meshDS);
+
+protected:
+
+ /*!
+ * \brief store error and comment and then return ( error == COMPERR_OK )
+ */
+ bool error(int error, const SMESH_Comment& comment = "");
+ /*!
+ * \brief store COMPERR_ALGO_FAILED error and comment and then return false
+ */
+ bool error(const SMESH_Comment& comment = "")
+ { return error(COMPERR_ALGO_FAILED, comment); }
+ /*!
+ * \brief store error and return error->IsOK()
+ */
+ bool error(SMESH_ComputeErrorPtr error);