From: eap Date: Mon, 19 Jan 2009 14:07:47 +0000 (+0000) Subject: 0019923: EDF 765 SMESH : default values of hypothesis X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9fbce41ed70691ae478420c5b274eacac0342fcc;p=plugins%2Fblsurfplugin.git 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; --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index 2fdf3be..9772acb 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -507,6 +507,19 @@ bool BLSURFPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh, return false; } +//============================================================================= +/*! + * \brief Initialize my parameter values by linear size of mesh element. + * \retval bool - true if parameter values have been successfully defined + */ +//============================================================================= + +bool BLSURFPlugin_Hypothesis::SetParametersByElementSize( double elemLenght, + const SMESH_Mesh* theMesh) +{ + return bool( _phySize = elemLenght ); +} + //============================================================================= BLSURFPlugin_Hypothesis::Topology BLSURFPlugin_Hypothesis::GetDefaultTopology() { diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx index d933344..b493643 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx @@ -136,6 +136,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: Topology _topology; PhysicalMesh _physicalMesh;