From 9fbce41ed70691ae478420c5b274eacac0342fcc Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 19 Jan 2009 14:07:47 +0000 Subject: [PATCH] 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; --- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx | 13 +++++++++++++ src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx | 6 ++++++ 2 files changed, 19 insertions(+) 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; -- 2.39.2