- for ( int i = 0; i < myObjects.count(); i++ ) {
- QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
- SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
- mesh = aMeshEditor->TranslateObjectMakeMesh(myObjects[i], aVector, makeGroups,
- aName.toLatin1().data());
- if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
- anEntryList.append( aSObject->GetID().c_str() );
-
-#ifdef WITHGENERICOBJ
- // obj has been published in study. Its refcount has been incremented.
- // It is safe to decrement its refcount
- // so that it will be destroyed when the entry in study will be removed
- mesh->UnRegister();
-#endif
- }
- }
- else {
- SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
- mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups,
+ for ( int i = 0; i < myObjects.count(); i++ ) {
+ QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
+ SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ mesh = aMeshEditor->TranslateObjectMakeMesh(myObjects[i], aVector, makeGroups,
+ aName.toLatin1().data());
+ if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
+ anEntryList.append( aSObject->GetID().c_str() );
+ }
+ }
+ else {
+ SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups,