-// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions
/*!
* \brief Saves nothing in a stream
* \param save - the stream
- * \retval virtual std::ostream & - the stream
+ * \retval std::ostream & - the stream
*/
virtual std::ostream & SaveTo(std::ostream & save);
/*!
* \brief Loads nothing from a stream
* \param load - the stream
- * \retval virtual std::ostream & - the stream
+ * \retval std::ostream & - the stream
*/
virtual std::istream & LoadFrom(std::istream & load);
*
* Algorithms that !NeedDescretBoundary() || !OnlyUnaryInput() are
* to set SMESH_ComputeError returned by SMESH_submesh::GetComputeError()
- * to report problematic subshapes
+ * to report problematic sub-shapes
*/
virtual bool Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape) = 0;
*/
virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
+#ifdef WITH_SMESH_CANCEL_COMPUTE
+ virtual void CancelCompute();
+#endif
+
/*!
* \brief evaluates size of prospective mesh on a shape
* \param aMesh - the mesh
*
* 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
+ * By default none listener is set
*/
virtual void SetEventListener(SMESH_subMesh* subMesh);
*/
static std::vector< const SMDS_MeshNode*> GetCommonNodes(const SMDS_MeshElement* e1,
const SMDS_MeshElement* e2);
-protected:
+
+ enum EMeshError { MEr_OK = 0, MEr_HOLES, MEr_BAD_ORI, MEr_EMPTY };
+
+ /*!
+ * \brief Finds topological errors of a sub-mesh
+ */
+ static EMeshError GetMeshError(SMESH_subMesh* subMesh);
+
+ protected:
/*!
* \brief store error and comment and then return ( error == COMPERR_OK )
// Algo features influencing which Compute() and how is called:
// in what turn and with what input shape.
- // This fields must be redefined if necessary by each descendant at constructor.
+ // These fields must be redefined if necessary by each descendant at constructor.
bool _onlyUnaryInput; // mesh one shape of GetDim() at once. Default TRUE
bool _requireDescretBoundary; // GetDim()-1 mesh must be present. Default TRUE
bool _requireShape; // work with GetDim()-1 mesh bound to geom only. Default TRUE