Salome HOME
First executable version
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_MaxElementArea_i.cxx
index 09544be6b3c67fdb76c44b1ddb4c8f87a0fdaf85..f8cb9063897cee06dce6eaf5f86ef425a7d78066 100644 (file)
 //  Module : SMESH
 //  $Header$
 
-using namespace std;
 #include "StdMeshers_MaxElementArea_i.hxx"
 #include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
+#include "SMESH_PythonDump.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
 #include <TCollection_AsciiString.hxx>
 
+using namespace std;
+
 //=============================================================================
 /*!
  *  StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i
@@ -92,11 +94,7 @@ void StdMeshers_MaxElementArea_i::SetMaxElementArea( CORBA::Double theArea )
   }
 
   // Update Python script
-  TCollection_AsciiString aStr, aStrArea ((double)theArea);
-  SMESH_Gen_i::AddObject(aStr, _this()) += ".SetMaxElementArea(";
-  aStr += aStrArea + ")";
-
-  SMESH_Gen_i::AddToCurrentPyScript(aStr);
+  SMESH::TPythonDump() << _this() << ".SetMaxElementArea( " << theArea << " )";
 }
 
 //=============================================================================
@@ -127,3 +125,18 @@ CORBA::Double StdMeshers_MaxElementArea_i::GetMaxElementArea()
   MESSAGE( "StdMeshers_MaxElementArea_i::GetImpl" );
   return ( ::StdMeshers_MaxElementArea* )myBaseImpl;
 }
+
+//================================================================================
+/*!
+ * \brief Verify whether hypothesis supports given entity type 
+  * \param type - dimension (see SMESH::Dimension enumeration)
+  * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
+ * 
+ * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
+ */
+//================================================================================  
+CORBA::Boolean StdMeshers_MaxElementArea_i::IsDimSupported( SMESH::Dimension type )
+{
+  return type == SMESH::DIM_2D;
+}
+