0019923: EDF 765 SMESH : default values of hypothesis

+   * \brief Initialize my parameter values by linear size of mesh element.
+   *  \retval bool - true if parameter values have been successfully defined
+   */
+  virtual bool SetParametersByElementSize(double elemLenght, const SMESH_Mesh* theMesh=0)=0;
This commit is contained in:
eap 2009-01-14 13:06:10 +00:00
parent 168242d9ab
commit 2a1538968e
4 changed files with 40 additions and 1 deletions

View File

@ -289,11 +289,24 @@ istream & operator >>(istream & load, NETGENPlugin_Hypothesis & hyp)
*/
//================================================================================
bool NETGENPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh,
const TopoDS_Shape& theShape)
const TopoDS_Shape& theShape)
{
return false;
}
//================================================================================
/*!
* \brief Initialize my parameter values by linear size of mesh element.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
bool NETGENPlugin_Hypothesis::SetParametersByElementSize(double elemLenght,
const SMESH_Mesh* /*theMesh*/)
{
return bool( _maxSize = elemLenght );
}
//=============================================================================
/*!
*

View File

@ -102,6 +102,12 @@ public:
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
* \brief Initialize my parameter values by linear size of mesh element.
* \retval bool - true if parameter values have been successfully defined
*/
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
private:
double _maxSize;
double _growthRate;

View File

@ -205,3 +205,17 @@ bool NETGENPlugin_SimpleHypothesis_2D::SetParametersByMesh(const SMESH_Mesh* t
}
return nbEdges;
}
//================================================================================
/*!
* \brief Initialize my parameter values by linear size of mesh element.
* \retval bool - true if parameter values have been successfully defined
*/
//================================================================================
bool NETGENPlugin_SimpleHypothesis_2D::SetParametersByElementSize(double elemLenght,
const SMESH_Mesh* /*theMesh*/)
{
return bool( _segmentLength = elemLenght );
}

View File

@ -91,6 +91,12 @@ public:
*/
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
/*!
* \brief Initialize my parameter values by linear size of mesh element.
* \retval bool - true if parameter values have been successfully defined
*/
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
private:
int _nbSegments;
double _segmentLength, _area;