{
// there are methods to convert:
// CreateMesh( shape )
+ // Concatenate( [mesh1, ...], ... )
// CreateHypothesis( theHypType, theLibName )
// Compute( mesh, geom )
// smeshgen.Method() --> smesh.smesh.Method()
theCommand->SetObject( SMESH_2smeshpy::GenName() );
+
+ // Concatenate( [mesh1, ...], ... )
+ if ( theCommand->GetMethod() == "Concatenate" )
+ {
+ AddMeshAccessorMethod( theCommand );
+ }
}
//================================================================================
bool _pyGen::AddMeshAccessorMethod( Handle(_pyCommand) theCmd ) const
{
+ bool added = false;
map< _pyID, Handle(_pyMesh) >::const_iterator id_mesh = myMeshes.begin();
for ( ; id_mesh != myMeshes.end(); ++id_mesh ) {
if ( theCmd->AddAccessorMethod( id_mesh->first, id_mesh->second->AccessorMethod() ))
- return true;
+ added = true;
}
- return false;
+ return added;
}
//================================================================================
bool _pyGen::AddAlgoAccessorMethod( Handle(_pyCommand) theCmd ) const
{
+ bool added = false;
list< Handle(_pyHypothesis) >::const_iterator hyp = myHypos.begin();
for ( ; hyp != myHypos.end(); ++hyp ) {
if ( (*hyp)->IsAlgo() && /*(*hyp)->IsWrapped() &&*/
theCmd->AddAccessorMethod( (*hyp)->GetID(), (*hyp)->AccessorMethod() ))
- return true;
+ added = true;
}
- return false;
+ return added;
}
//================================================================================
int beg = GetBegPos( OBJECT_IND );
if ( beg < 1 || beg > Length() )
return false;
+ bool added = false;
while (( beg = myString.Location( theObjectID, beg, Length() )))
{
// check that theObjectID is not just a part of a longer ID
if ( myBegPos( i ) > afterEnd )
myBegPos( i ) += posDelta;
}
- return true;
+ added = true;
}
}
beg = afterEnd; // is a part - next search
}
- return false;
+ return added;
}
//================================================================================