myPreviewType = previewElements;
}
//!< Destructor
- virtual ~TPreviewMesh() { delete _myMeshDS; }
+ virtual ~TPreviewMesh() { delete _myMeshDS; _myMeshDS = 0; }
//!< Copy a set of elements
void Copy(const TIDSortedElemSet & theElements,
TIDSortedElemSet& theCopyElements,
SMESH_Mesh* myMesh;
string myMeshPartIOR;
//!< Constructor
- TSearchersDeleter(): SMESH_subMeshEventListener( false ), // won't be deleted by submesh
+ TSearchersDeleter(): SMESH_subMeshEventListener( false, // won't be deleted by submesh
+ "SMESH_MeshEditor_i::TSearchersDeleter"),
myMesh(0) {}
//!< Delete theNodeSearcher
static void Delete()
for ( int i = 0; i < seq.size(); i++ )
IdList.push_back( seq[i] );
- bool ret = anEditor.Remove( IdList, true );
+ int nbNodesBefore = myMesh->NbNodes();
+ anEditor.Remove( IdList, true );
myMesh->GetMeshDS()->Modified();
if ( IdList.size() )
myMesh->SetIsModified( true );
+ int nbNodesAfter = myMesh->NbNodes();
- return ret;
+ return nbNodesBefore - nbNodesAfter;
}
//=============================================================================
anEditor.Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
if(theCopy || myPreviewMode)
- storeResult(anEditor);
- else
+ storeResult(anEditor); // store preview data or new elements
+
+ if ( !myPreviewMode )
{
- myMesh->SetIsModified( true );
- myMesh->GetMeshDS()->Modified();
+ if ( theTargetMesh )
+ {
+ theTargetMesh->GetMeshDS()->Modified();
+ }
+ else
+ {
+ myMesh->GetMeshDS()->Modified();
+ myMesh->SetIsModified( true );
+ }
}
return theMakeGroups ? getGroups(groupIds.get()) : 0;
}
if(theCopy || myPreviewMode)
storeResult(anEditor);
- else
+
+ if ( !myPreviewMode )
{
- myMesh->GetMeshDS()->Modified();
- myMesh->SetIsModified( true );
+ if ( theTargetMesh )
+ {
+ theTargetMesh->GetMeshDS()->Modified();
+ }
+ else
+ {
+ myMesh->GetMeshDS()->Modified();
+ myMesh->SetIsModified( true );
+ }
}
return theMakeGroups ? getGroups(groupIds.get()) : 0;
if(theCopy || myPreviewMode)
storeResult(anEditor);
- else
+
+ if ( !myPreviewMode )
{
- myMesh->GetMeshDS()->Modified();
- myMesh->SetIsModified( true );
+ if ( theTargetMesh )
+ {
+ theTargetMesh->GetMeshDS()->Modified();
+ }
+ else
+ {
+ myMesh->GetMeshDS()->Modified();
+ myMesh->SetIsModified( true );
+ }
}
return theMakeGroups ? getGroups(groupIds.get()) : 0;
if(theCopy || myPreviewMode )
storeResult(anEditor);
- else
+
+ if ( !myPreviewMode )
{
- myMesh->GetMeshDS()->Modified();
- myMesh->SetIsModified( true );
+ if ( theTargetMesh )
+ {
+ theTargetMesh->GetMeshDS()->Modified();
+ }
+ else
+ {
+ myMesh->GetMeshDS()->Modified();
+ myMesh->SetIsModified( true );
+ }
}
+
return theMakeGroups ? getGroups(groupIds.get()) : 0;
}
::SMESH_MeshEditor anEditor( myMesh );
anEditor.MergeEqualElements();
+ myMesh->GetMeshDS()->Modified();
+
TPythonDump() << this << ".MergeEqualElements()";
}
SMESH::SMESH_GroupBase_var aGrp = theDomains[ i ];
if ( !CORBA::is_nil( aGrp ) /*&& ( aGrp->GetType() != SMESH::NODE )*/ )
{
- if ( aGrp->GetType() != SMESH::VOLUME )
- THROW_SALOME_CORBA_EXCEPTION("Not a volume group", SALOME::BAD_PARAM);
+// if ( aGrp->GetType() != SMESH::VOLUME )
+// THROW_SALOME_CORBA_EXCEPTION("Not a volume group", SALOME::BAD_PARAM);
TIDSortedElemSet domain;
domain.clear();
domains.push_back(domain);