Salome HOME
PAL10494 (SMESH python dump uses idl interface). Python dump using TPythonDump tool
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_MaxElementVolume_i.cxx
index f571bab827e6c868fe70d49a3bbb9f1203c19fe8..582938b94db7e60f39e4c4502e775ff5fcddabb8 100644 (file)
@@ -31,6 +31,7 @@ using namespace std;
 #include "StdMeshers_MaxElementVolume_i.hxx"
 #include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
+#include "SMESH_PythonDump.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
@@ -92,11 +93,7 @@ void StdMeshers_MaxElementVolume_i::SetMaxElementVolume( CORBA::Double theVolume
   }
 
   // Update Python script
-  TCollection_AsciiString aStr, aStrVol ((double)theVolume);
-  SMESH_Gen_i::AddObject(aStr, _this()) += ".SetMaxElementVolume(";
-  aStr += aStrVol + ")";
-
-  SMESH_Gen_i::AddToCurrentPyScript(aStr);
+  SMESH::TPythonDump() << _this() << ".SetMaxElementVolume( " << theVolume << " )";
 }
 
 //=============================================================================
@@ -128,3 +125,17 @@ CORBA::Double StdMeshers_MaxElementVolume_i::GetMaxElementVolume()
   return ( ::StdMeshers_MaxElementVolume* )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_MaxElementVolume_i::IsDimSupported( SMESH::Dimension type )
+{
+  return type == SMESH::DIM_3D;
+}
+