X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers_I%2FStdMeshers_LocalLength_i.cxx;h=a37b8e14a72ed18f69c6049dbefaba239e3281b7;hb=81a502af8470190be359d6491a20796dbad5bb97;hp=15b3eb79f39877a655f2d0da5d2698d4868175e5;hpb=c3bf92bd87b770fd81631a3853f7f5bb1ac6a4e8;p=modules%2Fsmesh.git diff --git a/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx b/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx index 15b3eb79f..a37b8e14a 100644 --- a/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx @@ -29,11 +29,14 @@ 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 + //============================================================================= /*! * 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); } //============================================================================= @@ -117,3 +127,18 @@ CORBA::Double StdMeshers_LocalLength_i::GetLength() 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; +} +