Salome HOME
0019923: EDF 765 SMESH : default values of hypothesis BR_V5_IMP_P8
authoreap <eap@opencascade.com>
Mon, 19 Jan 2009 14:07:47 +0000 (14:07 +0000)
committereap <eap@opencascade.com>
Mon, 19 Jan 2009 14:07:47 +0000 (14:07 +0000)
+   * \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
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx

index 2fdf3be1780955cc5b13b88077140da8ff73a9ac..9772acbf561dbda06fe066a53a86b4b0bd127a97 100644 (file)
@@ -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()
 {
index d933344418efb6b0053707867309de58914cf0db..b4936435817b182e7768f96095392ca92a626a7d 100644 (file)
@@ -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;