Salome HOME
SMH: Preparation version 3.0.0 - merge (HEAD+POLYWORK)
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_Arithmetic1D_i.cxx
index aad7d1e39c65410206bf238554774f91afce300a..9c142aab82e5d20e92ae3031d058e5ec612397f2 100644 (file)
 
 using namespace std;
 #include "StdMeshers_Arithmetic1D_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i
@@ -87,6 +90,13 @@ void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // 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);
 }
 
 //=============================================================================