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 eb071b6646391c157b3488820adbf18afd13647d..582938b94db7e60f39e4c4502e775ff5fcddabb8 100644 (file)
 
 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"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i
@@ -87,6 +91,9 @@ void StdMeshers_MaxElementVolume_i::SetMaxElementVolume( CORBA::Double theVolume
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  SMESH::TPythonDump() << _this() << ".SetMaxElementVolume( " << theVolume << " )";
 }
 
 //=============================================================================
@@ -118,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;
+}
+