-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// SMESH SMESH : implementaion of SMESH idl descriptions
+// SMESH SMESH : implementation of SMESH idl descriptions
// File : SMESH_Algo.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
* Methods of the class are grouped into several parts:
* - main lifecycle methods, like Compute()
* - methods describing features of the algorithm, like NeedShape()
- * - methods related to dependencies between sub-meshes imposed by the algorith
+ * - methods related to dependencies between sub-meshes imposed by the algorithm
* - static utilities, like EdgeLength()
*/
// ==================================================================================
/*!
* \brief Creates algorithm
* \param hypId - algorithm ID
- * \param studyId - study ID
* \param gen - SMESH_Gen
*/
- SMESH_Algo(int hypId, int studyId, SMESH_Gen * gen);
+ SMESH_Algo(int hypId, SMESH_Gen * gen);
/*!
* \brief Destructor
*/
virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
+ /*!
+ * \brief Return true if the algorithm can mesh a given shape
+ * \param [in] aShape - shape to check
+ * \param [in] toCheckAll - if true, this check returns OK if all shapes are OK,
+ * else, returns OK if at least one shape is OK
+ * \retval bool - \c true by default
+ */
+ virtual bool IsApplicableToShape(const TopoDS_Shape & shape, bool toCheckAll) const;
+
/*!
* \brief Sets _computeCanceled to true. It's usage depends on
* implementation of a particular mesher.
// ==================================================================
// SMESH_Hypothesis::GetDim();
- // 1 - dimention of target mesh
+ // 1 - dimension of target mesh
bool OnlyUnaryInput() const { return _onlyUnaryInput; }
// 2 - is collection of tesselatable shapes inacceptable as input;
// 3 - is a Dim-1 mesh prerequisite
bool NeedShape() const { return _requireShape; }
- // 4 - is shape existance required
+ // 4 - is shape existence required
bool SupportSubmeshes() const { return _supportSubmeshes; }
// 5 - whether supports submeshes if !NeedDiscreteBoundary()
int _error; //!< SMESH_ComputeErrorName or anything algo specific
std::string _comment; //!< any text explaining what is wrong in Compute()
std::list<const SMDS_MeshElement*> _badInputElements; //!< to explain COMPERR_BAD_INPUT_MESH
+ const SMDS_Mesh* _mesh; //!< mesh being computed, needed to create SMESH_BadInputElements
volatile bool _computeCanceled; //!< is set to True while computing to stop it
class SMESH_EXPORT SMESH_0D_Algo: public SMESH_Algo
{
public:
- SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+ SMESH_0D_Algo(int hypId, SMESH_Gen* gen);
};
class SMESH_EXPORT SMESH_1D_Algo: public SMESH_Algo
{
public:
- SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+ SMESH_1D_Algo(int hypId, SMESH_Gen* gen);
+ /*!
+ * \brief Return true if the algorithm can mesh a given shape
+ * \param [in] aShape - shape to check
+ * \param [in] toCheckAll - if true, this check returns OK if all shapes are OK,
+ * else, returns OK if at least one shape is OK
+ * \retval bool - \c true by default
+ */
+ virtual bool IsApplicableToShape(const TopoDS_Shape & shape, bool toCheckAll) const;
};
class SMESH_EXPORT SMESH_2D_Algo: public SMESH_Algo
{
public:
- SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+ SMESH_2D_Algo(int hypId, SMESH_Gen* gen);
+ /*!
+ * \brief Return true if the algorithm can mesh a given shape
+ * \param [in] aShape - shape to check
+ * \param [in] toCheckAll - if true, this check returns OK if all shapes are OK,
+ * else, returns OK if at least one shape is OK
+ * \retval bool - \c true by default
+ */
+ virtual bool IsApplicableToShape(const TopoDS_Shape & shape, bool toCheckAll) const;
/*!
* \brief Method in which an algorithm generating a structured mesh
* fixes positions of in-face nodes after there movement
class SMESH_EXPORT SMESH_3D_Algo: public SMESH_Algo
{
public:
- SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+ SMESH_3D_Algo(int hypId, SMESH_Gen* gen);
+ /*!
+ * \brief Return true if the algorithm can mesh a given shape
+ * \param [in] aShape - shape to check
+ * \param [in] toCheckAll - if true, this check returns OK if all shapes are OK,
+ * else, returns OK if at least one shape is OK
+ * \retval bool - \c true by default
+ */
+ virtual bool IsApplicableToShape(const TopoDS_Shape & shape, bool toCheckAll) const;
};
#endif