X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers_I%2FStdMeshers_StartEndLength_i.cxx;h=91d398a991d5d506c924048f608c9b9ca40be49b;hp=1d175ea632c13158ec2971bcfe88c8844105af3e;hb=71d173d51a36d3a3ad7b51972b5be88c2df9865e;hpb=c38c10811a065cf5b13e8807ed71864d92ca7d80 diff --git a/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx b/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx index 1d175ea63..91d398a99 100644 --- a/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx @@ -31,6 +31,7 @@ using namespace std; #include "StdMeshers_StartEndLength_i.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Gen.hxx" +#include "SMESH_PythonDump.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" @@ -93,11 +94,8 @@ void StdMeshers_StartEndLength_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,18 @@ CORBA::Double StdMeshers_StartEndLength_i::GetLength( CORBA::Boolean theIsStart) MESSAGE( "StdMeshers_StartEndLength_i::GetImpl" ); return ( ::StdMeshers_StartEndLength* )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_StartEndLength_i::IsDimSupported( SMESH::Dimension type ) +{ + return type == SMESH::DIM_1D; +} +