}
// Update Python script
- SMESH::TPythonDump() << _this() << ".SetLength( "
- << theLength << ", " << theIsStart << " )";
+ SMESH::TPythonDump()
+ << _this() << ( theIsStart ? ".SetStartLength( " : ".SetEndLength( " ) << theLength << " )";
+}
+
+//=============================================================================
+/*!
+ * Sets <start segment length> parameter value
+ */
+//=============================================================================
+
+void StdMeshers_Arithmetic1D_i::SetStartLength( CORBA::Double length)
+ throw (SALOME::SALOME_Exception)
+{
+ SetLength( length, true );
+}
+
+//=============================================================================
+/*!
+ * Sets <end segment length> parameter value
+ */
+//=============================================================================
+
+void StdMeshers_Arithmetic1D_i::SetEndLength( CORBA::Double length)
+ throw (SALOME::SALOME_Exception)
+{
+ SetLength( length, false );
}
//=============================================================================
void StdMeshers_Arithmetic1D_i::SetReversedEdges( const SMESH::long_array& theIds )
{
- MESSAGE( "StdMeshers_Arithmetic1D_i::SetReversedEdges" );
ASSERT( myBaseImpl );
try {
std::vector<int> ids( theIds.length() );
}
// Update Python script
- /* SMESH::TPythonDump() << _this() << ".SetEdgesToReverse( "
- << theList << " )";*/
+ SMESH::TPythonDump() << _this() << ".SetReversedEdges( " << theIds << " )";
}
//=============================================================================
*/
//=============================================================================
-void StdMeshers_Arithmetic1D_i::SetObjectEntry( const char* entry )
+void StdMeshers_Arithmetic1D_i::SetObjectEntry( const char* theEntry )
{
- MESSAGE( "StdMeshers_Arithmetic1D_i::SetObjectEntry" );
ASSERT( myBaseImpl );
-
+ string entry(theEntry); // actually needed as theEntry is spoiled by moment of dumping
try {
- this->GetImpl()->SetObjectEntry( entry );
+ this->GetImpl()->SetObjectEntry( entry.c_str() );
// Update Python script
- // SMESH::TPythonDump() << _this() << ".SetObjectEntry( '" << entry << "' )";
+ SMESH::TPythonDump() << _this() << ".SetObjectEntry( \"" << entry.c_str() << "\" )";
}
catch ( SALOME_Exception& S_ex ) {
- THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
- SALOME::BAD_PARAM );
+ THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),SALOME::BAD_PARAM );
}
}
// File : StdMeshers_Arithmetic1D_i.hxx
// Author : Damien COQUERET, OCC
// Module : SMESH
-// $Header$
//
#ifndef _SMESH_ARITHMETIC1D_I_HXX_
#define _SMESH_ARITHMETIC1D_I_HXX_
// Constructor
StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA,
int theStudyId,
- ::SMESH_Gen* theGenImpl );
+ ::SMESH_Gen* theGenImpl );
// Destructor
virtual ~StdMeshers_Arithmetic1D_i();
// Set length
+ // * OBSOLETE *. Avoid such a way of interface design
void SetLength( CORBA::Double theLength, CORBA::Boolean theIsStart )
throw ( SALOME::SALOME_Exception );
+ // Sets <start segment length> parameter value
+ void SetStartLength( CORBA::Double length) throw (SALOME::SALOME_Exception);
+
+ // Sets <end segment length> parameter value
+ void SetEndLength( CORBA::Double length) throw (SALOME::SALOME_Exception);
+
// Get length
CORBA::Double GetLength(CORBA::Boolean theIsStart);
// Get implementation
::StdMeshers_Arithmetic1D* GetImpl();
-
+
// Verify whether hypothesis supports given entity type
CORBA::Boolean IsDimSupported( SMESH::Dimension type );
};
void StdMeshers_NumberOfSegments_i::SetReversedEdges( const SMESH::long_array& theIds )
{
- MESSAGE( "StdMeshers_NumberOfSegments_i::SetReversedEdges" );
ASSERT( myBaseImpl );
try {
std::vector<int> ids( theIds.length() );
}
// Update Python script
- /* SMESH::TPythonDump() << _this() << ".SetEdgesToReverse( "
- << theList << " )";*/
+ SMESH::TPythonDump() << _this() << ".SetReversedEdges( " << theIds << " )";
}
//=============================================================================
*/
//=============================================================================
-void StdMeshers_NumberOfSegments_i::SetObjectEntry( const char* entry )
+void StdMeshers_NumberOfSegments_i::SetObjectEntry( const char* theEntry )
{
- MESSAGE( "StdMeshers_NumberOfSegments_i::SetObjectEntry" );
ASSERT( myBaseImpl );
-
+ string entry(theEntry); // actually needed as theEntry is spoiled by moment of dumping
try {
- this->GetImpl()->SetObjectEntry( entry );
- // Update Python script
- // SMESH::TPythonDump() << _this() << ".SetObjectEntry( '" << entry << "' )";
+ this->GetImpl()->SetObjectEntry( entry.c_str() );
}
catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
SALOME::BAD_PARAM );
}
+ // Update Python script
+ SMESH::TPythonDump() << _this() << ".SetObjectEntry( \"" << entry.c_str() << "\" )";
}
//=============================================================================
char* StdMeshers_NumberOfSegments_i::GetObjectEntry()
{
- MESSAGE( "StdMeshers_NumberOfSegments_i::SetObjectEntry" );
ASSERT( myBaseImpl );
const char* entry;
}
// Update Python script
- SMESH::TPythonDump() << _this() << ".SetLength( "
- << theLength << ", " << theIsStart << " )";
+ SMESH::TPythonDump() <<
+ _this() << ( theIsStart ? ".SetStartLength( " : ".SetEndLength( " ) << theLength << " )";
+}
+
+//=============================================================================
+/*!
+ * Sets <start segment length> parameter value
+ */
+//=============================================================================
+
+void StdMeshers_StartEndLength_i::SetStartLength( CORBA::Double length)
+ throw (SALOME::SALOME_Exception)
+{
+ SetLength( length, true );
+}
+
+//=============================================================================
+/*!
+ * Sets <end segment length> parameter value
+ */
+//=============================================================================
+
+void StdMeshers_StartEndLength_i::SetEndLength( CORBA::Double length)
+ throw (SALOME::SALOME_Exception)
+{
+ SetLength( length, false );
}
//=============================================================================
void StdMeshers_StartEndLength_i::SetReversedEdges( const SMESH::long_array& theIds )
{
- MESSAGE( "StdMeshers_StartEndLength_i::SetReversedEdges" );
ASSERT( myBaseImpl );
try {
std::vector<int> ids( theIds.length() );
}
// Update Python script
- /* SMESH::TPythonDump() << _this() << ".SetEdgesToReverse( "
- << theList << " )";*/
+ SMESH::TPythonDump() << _this() << ".SetReversedEdges( " << theIds << " )";
}
//=============================================================================
*/
//=============================================================================
-void StdMeshers_StartEndLength_i::SetObjectEntry( const char* entry )
+void StdMeshers_StartEndLength_i::SetObjectEntry( const char* theEntry )
{
- MESSAGE( "StdMeshers_StartEndLength_i::SetObjectEntry" );
ASSERT( myBaseImpl );
+ string entry(theEntry); // actually needed as theEntry is spoiled by moment of dumping
try {
- this->GetImpl()->SetObjectEntry( entry );
+ this->GetImpl()->SetObjectEntry( entry.c_str() );
// Update Python script
- // SMESH::TPythonDump() << _this() << ".SetObjectEntry( '" << entry << "' )";
+ SMESH::TPythonDump() << _this() << ".SetObjectEntry( '" << entry.c_str() << "' )";
}
catch ( SALOME_Exception& S_ex ) {
- THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
- SALOME::BAD_PARAM );
+ THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),SALOME::BAD_PARAM );
}
}
char* StdMeshers_StartEndLength_i::GetObjectEntry()
{
- MESSAGE( "StdMeshers_StartEndLength_i::SetObjectEntry" );
ASSERT( myBaseImpl );
const char* entry;
try {
entry = this->GetImpl()->GetObjectEntry();
}
catch ( SALOME_Exception& S_ex ) {
- THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
- SALOME::BAD_PARAM );
+ THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
}
return CORBA::string_dup( entry );
}
SMESH::long_array* StdMeshers_StartEndLength_i::GetReversedEdges()
{
- MESSAGE( "StdMeshers_StartEndLength_i::GetReversedEdges" );
ASSERT( myBaseImpl );
SMESH::long_array_var anArray = new SMESH::long_array;
std::vector<int> ids = this->GetImpl()->GetReversedEdges();
// Moved here from SMESH_LocalLength_i.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
-// $Header$
//
#ifndef _SMESH_StartEndLength_I_HXX_
#define _SMESH_StartEndLength_I_HXX_
virtual ~StdMeshers_StartEndLength_i();
// Set length
+ // * OBSOLETE *. Avoid such a way of interface design
void SetLength( CORBA::Double theLength, CORBA::Boolean theIsStart )
throw ( SALOME::SALOME_Exception );
+
+ // Sets <start segment length> parameter value
+ void SetStartLength( CORBA::Double length) throw (SALOME::SALOME_Exception);
+
+ // Sets <end segment length> parameter value
+ void SetEndLength( CORBA::Double length) throw (SALOME::SALOME_Exception);
+
// Get length
CORBA::Double GetLength(CORBA::Boolean theIsStart);