Salome HOME
PAL10100 - just computed mesh must be selected in VTK
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_MaxElementArea_i.cxx
index 51810e0a71a8d5969cf40153af0588828b571e19..c7ab795552b112001df7c7bab494ca276a34c3c5 100644 (file)
 
 using namespace std;
 #include "StdMeshers_MaxElementArea_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i
@@ -87,6 +90,13 @@ void StdMeshers_MaxElementArea_i::SetMaxElementArea( CORBA::Double theArea )
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  TCollection_AsciiString aStr, aStrArea ((double)theArea);
+  SMESH_Gen_i::AddObject(aStr, _this()) += ".SetMaxElementArea(";
+  aStr += aStrArea + ")";
+
+  SMESH_Gen_i::AddToCurrentPyScript(aStr);
 }
 
 //=============================================================================
@@ -117,3 +127,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;
+}
+