Salome HOME
SMH: Preparation version 3.0.0 - merge (HEAD+POLYWORK)
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_LocalLength_i.cxx
index 15b3eb79f39877a655f2d0da5d2698d4868175e5..fe694f7f7a02252779c008abe7e8f201839c295f 100644 (file)
 
 using namespace std;
 #include "StdMeshers_LocalLength_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_LocalLength_i::StdMeshers_LocalLength_i
@@ -87,6 +90,13 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  TCollection_AsciiString aStr, aStrLen ((double)theLength);
+  SMESH_Gen_i::AddObject(aStr, _this()) += ".SetLength(";
+  aStr += aStrLen + ")";
+
+  SMESH_Gen_i::AddToCurrentPyScript(aStr);
 }
 
 //=============================================================================