SMESH_Gen_i::SMESH_Gen_i()
{
- INFOS( "SMESH_Gen_i::SMESH_Gen_i : default constructor" );
}
//=============================================================================
try {
// get mesh servant
SMESH_Mesh_i* meshServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( theMesh ).in() );
- meshServant->Load();
ASSERT( meshServant );
if ( meshServant ) {
+ meshServant->Load();
// NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"
meshServant->CheckGeomModif();
// get local TopoDS_Shape
SMESH_Mesh_i* meshServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( theMesh ).in() );
ASSERT( meshServant );
if ( meshServant ) {
+ meshServant->Load();
// NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"
meshServant->CheckGeomModif();
// get local TopoDS_Shape
{
SMESH_subMesh* sm = anIt->first;
SMESH_ComputeErrorPtr& error = sm->GetComputeError();
- const SMESH_Algo* algo = myGen.GetAlgo( myLocMesh, sm->GetSubShape());
+ const SMESH_Algo* algo = sm->GetAlgo();
if ( (algo && !error.get()) || error->IsOK() )
error.reset( new SMESH_ComputeError( COMPERR_ALGO_FAILED,"Failed to evaluate",algo));
}
aGroup = aListOfGroups[iG];
aGroupType = aGroup->GetType();
aGroupName = aGroup->GetName();
+ string aName = aGroupName.in();
// convert a list of IDs
anNewIDs->length( aGroup->Size() );
// check a current group name and type don't have identical ones in final mesh
aListOfNewGroups.clear();
- TGroupsMap::iterator anIter = aGroupsMap.find( make_pair( aGroupName, aGroupType ));
+ TGroupsMap::iterator anIter = aGroupsMap.find( make_pair( aName, aGroupType ));
if ( anIter == aGroupsMap.end() ) {
// add a new group in the mesh
- aNewGroup = aNewImpl->CreateGroup( aGroupType, aGroupName );
+ aNewGroup = aNewImpl->CreateGroup( aGroupType, aGroupName.in() );
// add elements into new group
aNewGroup->Add( anNewIDs );
aListOfNewGroups.push_back(aNewGroup);
- aGroupsMap.insert(make_pair( make_pair(aGroupName, aGroupType), aListOfNewGroups ));
+ aGroupsMap.insert(make_pair( make_pair(aName, aGroupType), aListOfNewGroups ));
}
else if ( theUniteIdenticalGroups ) {
else {
// rename identical groups
- aNewGroup = aNewImpl->CreateGroup(aGroupType, aGroupName);
+ aNewGroup = aNewImpl->CreateGroup(aGroupType, aGroupName.in());
aNewGroup->Add( anNewIDs );
TListOfNewGroups& aNewGroups = anIter->second;
string aNewGroupName;
if (aNewGroups.size() == 1) {
- aNewGroupName = string(aGroupName) + "_1";
+ aNewGroupName = aName + "_1";
aNewGroups.front()->SetName(aNewGroupName.c_str());
}
char aGroupNum[128];
sprintf(aGroupNum, "%u", aNewGroups.size()+1);
- aNewGroupName = string(aGroupName) + "_" + string(aGroupNum);
+ aNewGroupName = aName + "_" + string(aGroupNum);
aNewGroup->SetName(aNewGroupName.c_str());
aNewGroups.push_back(aNewGroup);
}
const char* theURL,
bool isMultiFile )
{
- INFOS( "SMESH_Gen_i::Save" );
-
// ASSERT( theComponent->GetStudy()->StudyId() == myCurrentStudy->StudyId() )
// san -- in case <myCurrentStudy> differs from theComponent's study,
// use that of the component
if ( !isMultiFile )
SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.ToCString(), aFileSeq.in(), true );
- INFOS( "SMESH_Gen_i::Save() completed" );
return aStreamFile._retn();
}
const char* theURL,
bool isMultiFile )
{
- INFOS( "SMESH_Gen_i::Load" );
-
if ( theComponent->GetStudy()->StudyId() != GetCurrentStudyID() )
SetCurrentStudy( theComponent->GetStudy() );
TCollection_AsciiString tmpDir =
( char* )( isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir().c_str() );
- INFOS( "THE URL++++++++++++++" );
- INFOS( theURL );
- INFOS( "THE TMP PATH+++++++++" );
- INFOS( tmpDir );
-
// Convert the stream into sequence of files to process
SALOMEDS::ListOfFileNames_var aFileSeq = SALOMEDS_Tool::PutStreamToFiles( theStream,
tmpDir.ToCString(),
}
}
- INFOS( "SMESH_Gen_i::Load completed" );
return true;
}