Salome HOME
PAL10494 (SMESH python dump uses idl interface). Python dump converted to smesh...
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_MaxElementVolume_i.cxx
index eb071b6646391c157b3488820adbf18afd13647d..d8686ab334528bf053e64bc5053cb0d2984e7943 100644 (file)
 
 using namespace std;
 #include "StdMeshers_MaxElementVolume_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i
@@ -87,6 +90,13 @@ void StdMeshers_MaxElementVolume_i::SetMaxElementVolume( CORBA::Double theVolume
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  TCollection_AsciiString aStr, aStrVol ((double)theVolume);
+  SMESH_Gen_i::AddObject(aStr, _this()) += ".SetMaxElementVolume(";
+  aStr += aStrVol + ")";
+
+  SMESH_Gen_i::AddToCurrentPyScript(aStr);
 }
 
 //=============================================================================
@@ -118,3 +128,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;
+}
+