mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-19 13:00:35 +05:00
0021985: [CEA 715] "Clear mesh data" on a skin mesh without geometry does not preserve the skin mesh
New behavior: - mesh is built on geometry -> "Clear mesh data" removes all nodes/elements - mesh w/o geometry (imported, compound, made from scratch) -> "Clear mesh data" removes only nodes/elements computed by algorithms
This commit is contained in:
parent
93f0557a04
commit
8ae4d1e9ae
@ -346,6 +346,8 @@ void SMESH_Mesh::Load()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void SMESH_Mesh::Clear()
|
void SMESH_Mesh::Clear()
|
||||||
|
{
|
||||||
|
if ( HasShapeToMesh() ) // remove all nodes and elements
|
||||||
{
|
{
|
||||||
// clear mesh data
|
// clear mesh data
|
||||||
_myMeshDS->ClearMesh();
|
_myMeshDS->ClearMesh();
|
||||||
@ -358,6 +360,20 @@ void SMESH_Mesh::Clear()
|
|||||||
sm->ComputeStateEngine( SMESH_subMesh::CLEAN ); // for event listeners (issue 0020918)
|
sm->ComputeStateEngine( SMESH_subMesh::CLEAN ); // for event listeners (issue 0020918)
|
||||||
sm->ComputeSubMeshStateEngine( SMESH_subMesh::CLEAN );
|
sm->ComputeSubMeshStateEngine( SMESH_subMesh::CLEAN );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else // remove only nodes/elements computed by algorithms
|
||||||
|
{
|
||||||
|
if ( SMESH_subMesh *sm = GetSubMeshContaining( GetShapeToMesh() ) )
|
||||||
|
{
|
||||||
|
SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(/*includeSelf=*/true,
|
||||||
|
/*complexShapeFirst=*/true);
|
||||||
|
while ( smIt->more() )
|
||||||
|
{
|
||||||
|
sm = smIt->next();
|
||||||
|
sm->ComputeStateEngine( SMESH_subMesh::CLEAN );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
_isModified = false;
|
_isModified = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user