Salome HOME
PAL10494 (SMESH python dump uses idl interface). Python dump using TPythonDump tool
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_LocalLength_i.cxx
index 15b3eb79f39877a655f2d0da5d2698d4868175e5..deb431fca1dbf0649678f17876cc84fc6fba0e97 100644 (file)
 
 using namespace std;
 #include "StdMeshers_LocalLength_i.hxx"
 
 using namespace std;
 #include "StdMeshers_LocalLength_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 #include "SMESH_Gen.hxx"
+#include "SMESH_PythonDump.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_LocalLength_i::StdMeshers_LocalLength_i
 //=============================================================================
 /*!
  *  StdMeshers_LocalLength_i::StdMeshers_LocalLength_i
@@ -87,6 +91,9 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  SMESH::TPythonDump() << _this() << ".SetLength( " << theLength << " )";
 }
 
 //=============================================================================
 }
 
 //=============================================================================
@@ -117,3 +124,18 @@ CORBA::Double StdMeshers_LocalLength_i::GetLength()
   MESSAGE( "StdMeshers_LocalLength_i::GetImpl" );
   return ( ::StdMeshers_LocalLength* )myBaseImpl;
 }
   MESSAGE( "StdMeshers_LocalLength_i::GetImpl" );
   return ( ::StdMeshers_LocalLength* )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_LocalLength_i::IsDimSupported( SMESH::Dimension type )
+{
+  return type == SMESH::DIM_1D;
+}
+