Salome HOME
PAL10494 (SMESH python dump uses idl interface). Python dump using TPythonDump tool
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_Arithmetic1D_i.cxx
index 9c142aab82e5d20e92ae3031d058e5ec612397f2..1208075f557fcb6bc1579944b6224f9fc19584a3 100644 (file)
@@ -30,6 +30,7 @@ using namespace std;
 #include "StdMeshers_Arithmetic1D_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,8 @@ void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
   }
 
   // Update Python script
-  TCollection_AsciiString aStr, aStrLen ((double)theLength), aStrFlag ((int)theIsStart);
-  SMESH_Gen_i::AddObject(aStr, _this()) += ".SetLength(";
-  aStr += aStrLen + ", " + aStrFlag + ")";
-
-  SMESH_Gen_i::AddToCurrentPyScript(aStr);
+  SMESH::TPythonDump() << _this() << ".SetLength( "
+                       << theLength << ", " << theIsStart << " )";
 }
 
 //=============================================================================
@@ -128,3 +126,17 @@ CORBA::Double StdMeshers_Arithmetic1D_i::GetLength( CORBA::Boolean theIsStart)
   return ( ::StdMeshers_Arithmetic1D* )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_Arithmetic1D_i::IsDimSupported( SMESH::Dimension type )
+{
+  return type == SMESH::DIM_1D;
+}
+